• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ViewBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ViewBase的典型用法代码示例。如果您正苦于以下问题:C# ViewBase类的具体用法?C# ViewBase怎么用?C# ViewBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ViewBase类属于命名空间,在下文中一共展示了ViewBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ViewManager

 /// <summary>
 /// Initialize a new instance of the ViewManager class.
 /// </summary>
 /// <param name="control">Owning control.</param>
 /// <param name="root">Root of the view hierarchy.</param>
 public ViewManager(Control control, ViewBase root)
 {
     _root = root;
     _root.OwningControl = control;
     _control = control;
     _alignControl = control;
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:12,代码来源:ViewManager.cs


示例2: GraphView

        /// <summary>
        /// Initializes a new instance of the <see cref="GraphView" /> class.
        /// </summary>
        public GraphView(ViewBase owner = null)
            : base(owner)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.GraphView.glade", "vbox1");
            gxml.Autoconnect(this);
            _mainWidget = vbox1;

            plot1 = new PlotView();
            plot1.Model = new PlotModel();
            plot1.SetSizeRequest(-1, 100);
            vbox2.PackStart(plot1, true, true, 0);

            smallestDate = DateTime.MaxValue;
            largestDate = DateTime.MinValue;
            this.LeftRightPadding = 40;
            expander1.Visible = false;
            captionEventBox.Visible = true;

            plot1.Model.MouseDown += OnChartClick;

            captionLabel.Text = null;
            captionEventBox.ButtonPressEvent += OnCaptionLabelDoubleClick;
            _mainWidget.Destroyed += _mainWidget_Destroyed;
            BackColor = OxyPlot.OxyColors.White;
        }
开发者ID:her123,项目名称:ApsimX,代码行数:28,代码来源:GraphView.cs


示例3: ViewLayoutControl

        /// <summary>
        /// Initialize a new instance of the ViewLayoutControl class.
        /// </summary>
        /// <param name="viewControl">View control to use as child.</param>
        /// <param name="rootControl">Top level visual control.</param>
        /// <param name="viewChild">View used to size and position the child control.</param>
        public ViewLayoutControl(ViewControl viewControl,
                                 VisualControl rootControl,
                                 ViewBase viewChild)
        {
            Debug.Assert(viewControl != null);
            Debug.Assert(rootControl != null);
            Debug.Assert(viewChild != null);

            // Default values
            _layoutOffset = Point.Empty;

            // Remember the view
            _viewChild = viewChild;

            // Ensure the child is hooked into the hierarchy of elements
            _viewChild.Parent = this;

            // Create the view control instance
            _viewControl = viewControl;

            // Back reference hookup
            _viewControl.ViewLayoutControl = this;

            // Start off invisible until first layed out
            _viewControl.Visible = false;

            // Ensure that all view elements inside here use our control
            OwningControl = _viewControl;

            // Add our new control to the provided parent collection
            CommonHelper.AddControlToParent(rootControl, _viewControl);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:38,代码来源:ViewLayoutControl.cs


示例4: LegendView

        /// <summary>
        /// Construtor
        /// </summary>
        public LegendView(ViewBase owner)
            : base(owner)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.LegendView.glade", "hbox1");
            gxml.Autoconnect(this);
            _mainWidget = hbox1;
            combobox1.Model = comboModel;
            combobox1.PackStart(comboRender, false);
            combobox1.AddAttribute(comboRender, "text", 0);
            combobox1.Changed += OnPositionComboChanged;
            combobox1.Focused += OnTitleTextBoxEnter;

            listview.Model = listModel;
            TreeViewColumn column = new TreeViewColumn();
            column.Title = "Series name";
            column.PackStart(listToggle, false);
            listRender.Editable = false;
            column.PackStart(listRender, true);
            column.SetAttributes(listToggle, "active", 0);
            column.SetAttributes(listRender, "text", 1);
            listview.AppendColumn(column);
            listToggle.Activatable = true;
            listToggle.Toggled += OnItemChecked;
            _mainWidget.Destroyed += _mainWidget_Destroyed;
        }
开发者ID:hol353,项目名称:ApsimX,代码行数:28,代码来源:LegendView.cs


示例5: configure

 public void configure(int controllerID, ControllerBase controller, ModelBase model, ViewBase view)
 {
     addControllerRoute(new RouteBase(controllerID, controller));
     controller.configure(view, model);
     model.configure();
     view.configure(model);
 }
开发者ID:akiken,项目名称:TetrisV0,代码行数:7,代码来源:MVC.cs


示例6: drawLine

 private void drawLine(Point p1, Point p2, ViewBase view)
 {
     TSD.Line newLine = new TSD.Line(view, p1, p2);
     LineTypeAttributes lineParams = new LineTypeAttributes(LineTypes.SolidLine, DrawingColors.Black);
     newLine.Attributes.Line = lineParams;
     newLine.Insert();
 }
开发者ID:hostage112,项目名称:TeklaScriptsDev,代码行数:7,代码来源:DMT_drawCircleOpening.cs


示例7: Dodaj_Click

        private void Dodaj_Click(object sender, RoutedEventArgs e)
        {
            ViewBase vb = new ViewBase(1);
            vb.AddItemCallback = new AddItemDelegate(this.AddItemCallbackFn);
            vb.ShowDialog();

        }
开发者ID:vitsv,项目名称:Apteka,代码行数:7,代码来源:ZamWindow.xaml.cs


示例8: SeriesView

        /// <summary>Initializes a new instance of the <see cref="SeriesView" /> class</summary>
        public SeriesView(ViewBase owner)
            : base(owner)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.SeriesView.glade", "vbox1");
            gxml.Autoconnect(this);
            _mainWidget = vbox1;

            graphView1 = new GraphView(this);
            vbox1.PackStart(graphView1.MainWidget, true, true, 0);

            dropDownView1 = new DropDownView(this);
            dropDownView2 = new DropDownView(this);
            dropDownView3 = new DropDownView(this);
            dropDownView4 = new DropDownView(this);
            dropDownView5 = new DropDownView(this);
            dropDownView6 = new DropDownView(this);
            dropDownView7 = new DropDownView(this);
            dropDownView8 = new DropDownView(this);
            dropDownView9 = new ColourDropDownView(this);
            dropDownView10 = new DropDownView(this);
            dropDownView11 = new DropDownView(this);

            checkBoxView1 = new CheckBoxView(this);
            checkBoxView1.TextOfLabel = "on top?";
            checkBoxView2 = new CheckBoxView(this);
            checkBoxView2.TextOfLabel = "on right?";
            checkBoxView3 = new CheckBoxView(this);
            checkBoxView3.TextOfLabel = "cumulative?";
            checkBoxView4 = new CheckBoxView(this);
            checkBoxView4.TextOfLabel = "cumulative?";
            checkBoxView5 = new CheckBoxView(this);
            checkBoxView5.TextOfLabel = "Show in legend?";
            checkBoxView6 = new CheckBoxView(this);
            checkBoxView6.TextOfLabel = "Include series name in legend?";

            editView1 = new EditView(this);

            table1.Attach(dropDownView1.MainWidget, 1, 2, 0, 1, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(dropDownView2.MainWidget, 1, 2, 1, 2, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(dropDownView3.MainWidget, 1, 2, 2, 3, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(dropDownView5.MainWidget, 1, 2, 3, 4, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(dropDownView4.MainWidget, 1, 2, 4, 5, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(dropDownView6.MainWidget, 1, 2, 5, 6, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(dropDownView7.MainWidget, 1, 2, 6, 7, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(dropDownView8.MainWidget, 1, 2, 7, 8, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(dropDownView9.MainWidget, 1, 2, 8, 9, AttachOptions.Fill, 0, 10, 2);
            table1.Attach(editView1.MainWidget, 1, 2, 9, 10, AttachOptions.Fill, 0, 10, 2);

            table1.Attach(checkBoxView1.MainWidget, 2, 3, 1, 2, AttachOptions.Fill, 0, 0, 0);
            table1.Attach(checkBoxView2.MainWidget, 2, 3, 2, 3, AttachOptions.Fill, 0, 0, 0);
            table1.Attach(checkBoxView3.MainWidget, 3, 4, 1, 2, AttachOptions.Fill, 0, 0, 0);
            table1.Attach(checkBoxView4.MainWidget, 3, 4, 2, 3, AttachOptions.Fill, 0, 0, 0);

            table1.Attach(checkBoxView5.MainWidget, 2, 4, 8, 9, AttachOptions.Fill, 0, 0, 0);
            table1.Attach(checkBoxView6.MainWidget, 2, 4, 9, 10, AttachOptions.Fill, 0, 0, 0);

            table1.Attach(dropDownView10.MainWidget, 3, 4, 6, 7, AttachOptions.Fill, 0, 0, 5);
            table1.Attach(dropDownView11.MainWidget, 3, 4, 7, 8, AttachOptions.Fill, 0, 0, 5);
        }
开发者ID:hut104,项目名称:ApsimX,代码行数:60,代码来源:SeriesView.cs


示例9: EditView

 /// <summary>Constructor</summary>
 public EditView(ViewBase owner)
     : base(owner)
 {
     textentry1 = new Entry();
     _mainWidget = textentry1;
     textentry1.FocusOutEvent += OnSelectionChanged;
     _mainWidget.Destroyed += _mainWidget_Destroyed;
 }
开发者ID:hut104,项目名称:ApsimX,代码行数:9,代码来源:EditBoxView.cs


示例10: OutlookMiniController

        /// <summary>
        /// Initialize a new instance of the OutlookMiniController class.
        /// </summary>
        /// <param name="target">Target for state changes.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public OutlookMiniController(ViewBase target,
                                     NeedPaintHandler needPaint)
        {
            Debug.Assert(needPaint != null);

            _target = target;
            NeedPaint = needPaint;
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:13,代码来源:OutlookMiniController.cs


示例11: ToolTipEventArgs

        /// <summary>
        /// Initialize a new instance of the ButtonSpecEventArgs class.
        /// </summary>
        /// <param name="target">Reference to view element that requires tooltip.</param>
        /// <param name="screenPt">Screen location of mouse when tooltip was required.</param>
        public ToolTipEventArgs(ViewBase target, Point screenPt)
        {
            Debug.Assert(target != null);

            // Remember parameter details
            _target = target;
            _screenPt = screenPt;
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:13,代码来源:TooltipEventArgs.cs


示例12: ButtonView

 /// <summary>Constructor</summary>
 public ButtonView(ViewBase owner)
     : base(owner)
 {
     button = new Button();
     _mainWidget = button;
     button.Clicked += OnButtonClick;
     button.SetSizeRequest(80, 36);
     _mainWidget.Destroyed += _mainWidget_Destroyed;
 }
开发者ID:hol353,项目名称:ApsimX,代码行数:10,代码来源:ButtonView.cs


示例13: TitleView

 /// <summary>
 /// Construtor
 /// </summary>
 public TitleView(ViewBase owner)
     : base(owner)
 {
     Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.TitleView.glade", "hbox1");
     gxml.Autoconnect(this);
     _mainWidget = hbox1;
     entry1.Changed += OnPositionComboChanged;
     _mainWidget.Destroyed += _mainWidget_Destroyed;
 }
开发者ID:hol353,项目名称:ApsimX,代码行数:12,代码来源:TitleView.cs


示例14: ViewHightlightController

        /// <summary>
        /// Initialize a new instance of the ViewHightlightController class.
        /// </summary>
        /// <param name="target">Target for state changes.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public ViewHightlightController(ViewBase target,
                                        NeedPaintHandler needPaint)
        {
            Debug.Assert(target != null);
            Debug.Assert(needPaint != null);

            _target = target;
            NeedPaint = needPaint;
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:14,代码来源:ViewHighlightController.cs


示例15: button1_Click

 private void button1_Click(object sender, RoutedEventArgs e)
 { 
     AptekaDataDataContext con = new AptekaDataDataContext();
     ViewBase viewbase = new ViewBase();
     List<Lek> lek = (from l in con.Leks where l.Nazwa.StartsWith(textBox1.Text) || l.M_nazwa.StartsWith(textBox2.Text) select l).ToList();
     viewbase.LekGird.ItemsSource = lek;
     viewbase.search = 1;
     viewbase.ShowDialog();
 }
开发者ID:vitsv,项目名称:Apteka,代码行数:9,代码来源:Search.xaml.cs


示例16: ViewDrawRibbonAppMenu

 /// <summary>
 /// Initialize a new instance of the ViewDrawRibbonAppMenu class.
 /// </summary>
 /// <param name="paletteBack">Palette source for the background.</param>		
 /// <param name="paletteBorder">Palette source for the border.</param>
 /// <param name="fixedElement">Element to display at provided screen rect.</param>
 /// <param name="fixedScreenRect">Screen rectangle for showing the element at.</param>
 public ViewDrawRibbonAppMenu(IPaletteBack paletteBack,
                              IPaletteBorder paletteBorder,
                              ViewBase fixedElement,
                              Rectangle fixedScreenRect)
     : base(paletteBack, paletteBorder)
 {
     _fixedElement = fixedElement;
     _fixedScreenRect = fixedScreenRect;
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:16,代码来源:ViewDrawRibbonAppMenu.cs


示例17: FolderView

 public FolderView(ViewBase owner)
     : base(owner)
 {
     scroller = new ScrolledWindow();
     scroller.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
     table = new Table(1, 1, false);
     scroller.AddWithViewport(table);
     _mainWidget = scroller;
 }
开发者ID:hol353,项目名称:ApsimX,代码行数:9,代码来源:FolderView.cs


示例18: XYPairsView

 /// <summary>
 /// Initializes a new instance of the <see cref="InitialWaterView" /> class.
 /// </summary>
 public XYPairsView(ViewBase owner)
     : base(owner)
 {
     vpaned = new VPaned();
     _mainWidget = vpaned;
     gridView = new GridView(this);
     graphView = new GraphView(this);
     vpaned.Pack1(gridView.MainWidget, true, false);
     vpaned.Pack2(graphView.MainWidget, true, false);
 }
开发者ID:her123,项目名称:ApsimX,代码行数:13,代码来源:XYPairsView.cs


示例19: DropDownView

 /// <summary>Constructor</summary>
 public DropDownView(ViewBase owner)
     : base(owner)
 {
     combobox1 = new ComboBox(comboModel);
     _mainWidget = combobox1;
     combobox1.PackStart(comboRender, false);
     combobox1.AddAttribute(comboRender, "text", 0);
     combobox1.Changed += OnSelectionChanged;
     _mainWidget.Destroyed += _mainWidget_Destroyed;
 }
开发者ID:hol353,项目名称:ApsimX,代码行数:11,代码来源:DropDownView.cs


示例20: ManagerView

 /// <summary>
 /// Constructor
 /// </summary>
 public ManagerView(ViewBase owner)
     : base(owner)
 {
     notebook = new Notebook();
     _mainWidget = notebook;
     Grid = new GridView(this);
     ScriptEditor = new EditorView(this);
     notebook.AppendPage(Grid.MainWidget, new Label("Properties"));
     notebook.AppendPage(ScriptEditor.MainWidget, new Label("Script"));
 }
开发者ID:ykhorzon,项目名称:ApsimX,代码行数:13,代码来源:ManagerView.cs



注:本文中的ViewBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ViewContext类代码示例发布时间:2022-05-24
下一篇:
C# View类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap