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


C# IControlHabanero类代码示例

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


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

示例1: AddControl

        /// <summary>
        /// Add a control to the layout
        /// </summary>
        /// <param name="control">The control to add</param>
        /// /// <param name="pos">The position at which to add the control</param>
        /// <param name="includeSplitter">True to include a splitter between the controls</param>
        /// <returns>Returns the control added</returns>
        public override IControlHabanero AddControl(IControlHabanero control, Position pos, bool includeSplitter)
        {
            SetupDockOfControl(control, pos);
            _controls[(int)pos] = control;
            _splitters[(int)pos] = includeSplitter;
            this.ManagedControl.Controls.Clear();
            //this.ManagedControl.Width = 100;
            //this.ManagedControl.Height = 100;
            for (int i = 0; i < _controls.Length; i++)
            {
                IControlHabanero habaneroControl = _controls[i];
                if (habaneroControl != null)
                {
                    if (_splitters[i])
                    {
                        ISplitter splt = _controlFactory.CreateSplitter();
                        Color newBackColor =
                            Color.FromArgb(Math.Min(splt.BackColor.R - 30, 255), Math.Min(splt.BackColor.G - 30, 255),
                                           Math.Min(splt.BackColor.B - 30, 255));
                        splt.BackColor = newBackColor;

                        if (_controls[i].Dock != Base.DockStyle.Fill)
                            splt.Dock = _controls[i].Dock;
                        ManagedControl.Controls.Add(splt);
                    }
                    this.ManagedControl.Controls.Add(habaneroControl);
                }
            }

            return control;
        }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:38,代码来源:BorderLayoutManagerWin.cs

示例2: GridLayoutManager

 /// <summary>
 /// Constructor to initialise a new grid layout
 /// </summary>
 /// <param name="managedControl">The control to manage</param>
 /// <param name="controlFactory">The control factory used to create any controls</param>
 public GridLayoutManager(IControlHabanero managedControl, IControlFactory controlFactory)
     : base(managedControl, controlFactory)
 {
     _controls = new List<IControlHabanero>();
     _controlInfoTable = new Hashtable();
     this.SetGridSize(2, 2);
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:12,代码来源:GridLayoutManager.cs

示例3: ListComboBoxMapper

 ///<summary>
 /// Constructor form <see cref="ListComboBoxMapper"/>
 ///</summary>
 ///<param name="ctl"></param>
 ///<param name="propName"></param>
 ///<param name="isReadOnly"></param>
 ///<param name="factory"></param>
 public ListComboBoxMapper(IControlHabanero ctl, string propName, bool isReadOnly, IControlFactory factory)
     : base(ctl, propName, isReadOnly, factory)
 {
     _comboBox = (IComboBox)ctl;
     _mapperStrategy = factory.CreateListComboBoxMapperStrategy();
     _mapperStrategy.AddItemSelectedEventHandler(this);
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:14,代码来源:ListComboBoxMapper.cs

示例4: AddControlToForm

 protected override void AddControlToForm(IControlHabanero control, int formHeight)
 {
     Gizmox.WebGUI.Forms.Form frm = new Gizmox.WebGUI.Forms.Form();
     frm.Controls.Add((Gizmox.WebGUI.Forms.Control)control);
     frm.Height = formHeight;
     frm.Visible = true;
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:7,代码来源:TestReadOnlyGridControlVWG.cs

示例5: FlowLayoutManager

 /// <summary>
 /// Constructor to initialise a new manager
 /// </summary>
 /// <param name="managedControl">The control to manage e.g. a Panel</param>
 /// <param name="controlFactory">The factory which generates controls</param>
 public FlowLayoutManager(IControlHabanero managedControl, IControlFactory controlFactory)
     : base(managedControl, controlFactory)
 {
     _controls = new List<IControlHabanero>();
     _newLinePositions = new ArrayList(3);
     _gluePositions = new ArrayList(5);
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:12,代码来源:FlowLayoutManager.cs

示例6: SetManagedControl

 private void SetManagedControl(IControlHabanero managedControl)
 {
     _managedControl = managedControl;
     if (managedControl == null)
         return;
     _managedControl.Resize += this.ManagedControlResizeHandler;
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:7,代码来源:LayoutManager.cs

示例7: AddControlToForm

 private static Form AddControlToForm(IControlHabanero parentControl)
 {
     Form frm = new Form();
     frm.Controls.Clear();
     frm.Controls.Add((Control)parentControl);
     return frm;
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:7,代码来源:TestCheckBoxMapperWin.cs

示例8: AssertControlDockedInForm

 protected override void AssertControlDockedInForm(IControlHabanero control, IFormHabanero form)
 {
     Assert.AreEqual(1, form.Controls.Count, "No container control found in form");
     IControlHabanero contentControl = form.Controls[0];
     Assert.AreEqual(1, contentControl.Controls.Count);
     Assert.AreSame(control, contentControl.Controls[0]);
     Assert.AreEqual(DockStyle.Fill, control.Dock);
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:8,代码来源:TestMenuBuilderVWG.cs

示例9: PanelFactoryInfo

 /// <summary>
 /// Constructor to initialise a new instance of the class
 /// </summary>
 /// <param name="panel">The panel control being managed</param>
 /// <param name="mappers">The control mappers collection</param>
 /// <param name="uiDefName">The UI definition name to use</param>
 /// <param name="firstControlToFocus">The first control to focus on</param>
 public PanelFactoryInfo(IPanel panel, IControlMapperCollection mappers, string uiDefName, IControlHabanero firstControlToFocus)
 {
     _panel = panel;
     _mappers = mappers;
     _firstControlToFocus = firstControlToFocus;
     _uiDefName = uiDefName;
     _formGrids = new Dictionary<string, IEditableGridControl>();
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:15,代码来源:PanelFactoryInfo.cs

示例10: AddControlToForm

        protected override IFormHabanero AddControlToForm(IControlHabanero cntrl)
        {
            FormVWG form = (FormVWG)GetControlFactory().CreateForm();
            Form formVWG = form;
            formVWG.Controls.Add((Control)cntrl);

            return GetControlledLifetimeFor(form);
        }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:8,代码来源:TestEditableGridControlVWG.cs

示例11: AddControlToForm

 protected override void AddControlToForm(IControlHabanero control, int formHeight)
 {
     System.Windows.Forms.Form frmLocal = new System.Windows.Forms.Form();
     DisposeOnTearDown(frmLocal);
     frmLocal.Controls.Add((System.Windows.Forms.Control)control);
     frmLocal.Height = formHeight;
     frmLocal.Visible = true;
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:8,代码来源:TestReadOnlyGridControlWin.cs

示例12: AddKeyPressEventHandler

 /// <summary>
 /// Handles the default key press behaviours on a control.
 /// This is typically used to change the handling of the enter key (such as having
 /// the enter key cause focus to move to the next control).
 /// </summary>
 /// <param name="control">The control whose events will be handled</param>
 public void AddKeyPressEventHandler(IControlHabanero control)
 {
     if (control == null) throw new ArgumentNullException("control");
     _control = control.GetControl();
     if (_control == null) return;
     _control.KeyUp += CtlKeyUpHandler;
     _control.KeyDown += CtlKeyDownHandler;
     _control.KeyPress += CtlKeyPressHandler;
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:15,代码来源:ControlMapperStrategyWin.cs

示例13: CreateOKCancelPanel

 /// <summary>
 /// Creates a panel containing OK and Cancel buttons
 /// </summary>
 /// <param name="nestedControl">The control to place above the buttons</param>
 /// <returns>Returns the created panel</returns>
 public IOKCancelPanel CreateOKCancelPanel(IControlHabanero nestedControl)
 {
     OKCancelPanelVWG mainPanel = new OKCancelPanelVWG(_controlFactory);
     mainPanel.Width = nestedControl.Width;
     mainPanel.Height = nestedControl.Height + mainPanel.ButtonGroupControl.Height;
     mainPanel.ContentPanel.Controls.Add(nestedControl);
     nestedControl.Dock = DockStyle.Fill;
     return mainPanel;
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:14,代码来源:OKCancelDialogFactoryVWG.cs

示例14: AddControl

 /// <summary>
 /// Adds a control to the layout
 /// </summary>
 /// <param name="control">The control to add</param>
 /// <returns>Returns the control once it has been added</returns>
 public override IControlHabanero AddControl(IControlHabanero control)
 {
     _controls.Add(control);
     RefreshControlPositions();
     control.VisibleChanged += ControlVisibleChangedHandler;
     control.Resize += ControlResizedHandler;
     this.ManagedControl.Controls.Add(control);
     return control;
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:14,代码来源:FlowLayoutManager.cs

示例15: AddControlToForm

        //protected override IGridBase CreateGridBaseStub()
        //{
        //    GridBaseWinStub gridBase = new GridBaseWinStub();
        //    System.Windows.Forms.Form frm = new System.Windows.Forms.Form();
        //    frm.Controls.Add(gridBase);
        //    return gridBase;
        //}

        //private static System.Windows.Forms.DataGridViewCell GetCell(int rowIndex, string propName,
        //                                                             IGridBase gridBase)
        //{
        //    System.Windows.Forms.DataGridView dgv = (System.Windows.Forms.DataGridView) gridBase;
        //    System.Windows.Forms.DataGridViewRow row = dgv.Rows[rowIndex];
        //    return row.Cells[propName];
        //}

        //protected override void AddControlToForm(IGridBase gridBase)
        //{
        //    throw new NotImplementedException();
        //}
        protected override IFormHabanero AddControlToForm(IControlHabanero cntrl)
        {
            //System.Windows.Forms.Form frm = new System.Windows.Forms.Form();
            //frm.Controls.Add((System.Windows.Forms.Control)cntrl);

            IFormHabanero frm = GetControlFactory().CreateForm();
            frm.Controls.Add(cntrl);
            return frm;
        }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:29,代码来源:TestEditableGridControlWin.cs


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