当前位置: 首页>>代码示例>>C#>>正文


C# IView.SetController方法代码示例

本文整理汇总了C#中IView.SetController方法的典型用法代码示例。如果您正苦于以下问题:C# IView.SetController方法的具体用法?C# IView.SetController怎么用?C# IView.SetController使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IView的用法示例。


在下文中一共展示了IView.SetController方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GridController

        public GridController(IView<string> view, GridFieldModel model)
        {
            _view = view;
            _model = model;
            _zoomCheckbox = false;

            _view.SetController(this);
            _panel = (Panel) _view.Get("Panel");
            _trackBar = (TrackBar) _view.Get("Trackbar");
            _trackBar.Enabled = false;
            _comboBox = (ComboBox) _view.Get("ComboBox");

            float tWidth = _panel.Width/_model.Rows.GetLength(1);
            float tHeight = _panel.Height/_model.Rows.GetLength(0);
            // Doing these checks to make sure that we don't have pixels left

            _tileWidth = (_panel.Width%_model.Rows.GetLength(1) != 0 // if width%length != 0
                ? (int) tWidth++ // then set to width++
                : (int) tWidth) // else set to width
                         *_model.Rows[0, 0].Width; // finally multiply by the tile width
            _tileHeight = (_panel.Width%_model.Rows.GetLength(0) != 0
                ? (int) tHeight++
                : (int) tHeight)
                          *_model.Rows[0, 0].Height;

            // only need to draw the grid once, so we can set it as the panel's background
            _panel.BackgroundImage = PaintBackground();
            _rectangle = new Rectangle(0, 0, 50, 50);
            _buffer = new Bitmap(_panel.Width, _panel.Height);

            PopulateCombobox();
            Resize(this, null);
        }
开发者ID:SanderBouwman,项目名称:KantoorInrichting,代码行数:33,代码来源:GridController.cs

示例2: IController

 public IController(IView view)
 {
     this.view = view;
     view.SetController(this);
     comModel.comCloseEvent += new SerialPortEventHandler(view.CloseComEvent);
     comModel.comOpenEvent += new SerialPortEventHandler(view.OpenComEvent);
     comModel.comReceiveDataEvent += new SerialPortEventHandler(view.ComReceiveDataEvent);
 }
开发者ID:taonylu,项目名称:COMDBG,代码行数:8,代码来源:IController.cs

示例3: Controller

 public Controller(IView view, IModel model)
 {
     this.view = view;
     this.model = model;
     view.SetController(this);
     model.Attach((IModelObserver) view);
     view.Changed += new ViewHandler<IView>(this.ViewChanged);
 }
开发者ID:brianrose,项目名称:CapstoneSimulation,代码行数:8,代码来源:Controller.cs

示例4: Controller

        public Controller(IModel model, IView view, IEmailObjectFactory factory)
        {
            _model = model;

            _view = view;
            _view.Closed += new EventHandler(view_Closed);
            _view.SetController(this);
            _view.SetModel(_model);

            _helperFactory = factory;

            _view.ShowView();
        }
开发者ID:ttu,项目名称:Email-Statistics,代码行数:13,代码来源:Controller.cs

示例5: ComController

        public ComController(IView view, Datamanipulation model)
        {
            this._myView = view;
            this._myModel = model;

            _myView.SetController(this);

            // Need to cast IView v TO MainForm. What for orders form ? =======
            this._myModel.Subscribe((MainForm)view);

            // Notify if the view is changed:
            this._myView.viewChanged += new ViewHandler<IView>(this.ViewChangeDetected);

            // ???
            // view.changed += new ViewHandler<IView>(this.CustomerAdded);
        }
开发者ID:LooN3Y,项目名称:COM,代码行数:16,代码来源:ComController.cs

示例6: AppController

 public AppController(IView view)
 {
     _view = view;
     view.SetController(this);
 }
开发者ID:Choochet,项目名称:TDR7K,代码行数:5,代码来源:AppController.cs


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