/// <summary>
        /// Sets how the specified control is docked within its parent
        /// </summary>
        protected override void SetupDockOfControl(IControlHabanero control, Position pos)
        {
            _ctl = control.GetControl();
            switch (pos)
            {
            case Position.Centre:
                _ctl.Dock = DockStyle.Fill;
                break;

            case Position.North:
                _ctl.Dock = DockStyle.Top;
                break;

            case Position.South:
                _ctl.Dock = DockStyle.Bottom;
                break;

            case Position.East:
                _ctl.Dock = DockStyle.Right;
                break;

            case Position.West:
                _ctl.Dock = DockStyle.Left;
                break;
            }
        }
 /// <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;
 }
Esempio n. 3
0
        protected virtual Control GetControl(IControlHabanero objControl)
        {
            var controlWin = objControl.GetControl();

            if (controlWin != null)
            {
                return(controlWin);
            }
            return(new Control());
        }
Esempio n. 4
0
 /// <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;
 }
        /// <summary>
        /// Sets how the specified control is docked within its parent
        /// </summary>
        protected override void SetupDockOfControl(IControlHabanero control, Position pos)
        {
            _ctl = control.GetControl();
            switch (pos)
            {
                case Position.Centre:
                    _ctl.Dock = DockStyle.Fill;
                    break;
                case Position.North:
                    _ctl.Dock = DockStyle.Top;
                    break;
                case Position.South:
                    _ctl.Dock = DockStyle.Bottom;
                    break;
                case Position.East:
                    _ctl.Dock = DockStyle.Right;
                    break;
                case Position.West:
                    _ctl.Dock = DockStyle.Left;
                    break;

            }
        }
Esempio n. 6
0
 /// <summary>
 /// Retrieves the ToolTip text associated with the specified control
 /// </summary>
 /// <param name="controlHabanero">The Control for which to retrieve the ToolTip text</param>
 public string GetToolTip(IControlHabanero controlHabanero)
 {
     return base.GetToolTip(controlHabanero.GetControl());
 }
Esempio n. 7
0
 /// <summary>
 /// Associates ToolTip text with the specified control
 /// </summary>
 /// <param name="controlHabanero">The Control to associate the ToolTip text with</param>
 /// <param name="toolTipText">The ToolTip text to display when the pointer is on the control</param>
 public void SetToolTip(IControlHabanero controlHabanero, string toolTipText)
 {
     base.SetToolTip(controlHabanero.GetControl(), toolTipText);
 }
 protected virtual Control GetControl(IControlHabanero objControl)
 {
     var controlWin = objControl.GetControl();
     if(controlWin != null) return controlWin;
     return new Control();
 }
Esempio n. 9
0
 /// <summary>
 /// Retrieves the ToolTip text associated with the specified control
 /// </summary>
 /// <param name="controlHabanero">The Control for which to retrieve the ToolTip text</param>
 public string GetToolTip(IControlHabanero controlHabanero)
 {
     return(base.GetToolTip(controlHabanero.GetControl()));
 }
Esempio n. 10
0
 /// <summary>
 /// Associates ToolTip text with the specified control
 /// </summary>
 /// <param name="controlHabanero">The Control to associate the ToolTip text with</param>
 /// <param name="toolTipText">The ToolTip text to display when the pointer is on the control</param>
 public void SetToolTip(IControlHabanero controlHabanero, string toolTipText)
 {
     base.SetToolTip(controlHabanero.GetControl(), toolTipText);
 }
 /// <summary>
 /// Provides the index position of the control specified
 /// </summary>
 /// <param name="value">The control to search for</param>
 /// <returns>Returns the index position if found, or -1</returns>
 public int IndexOf(IControlHabanero value)
 {
     return(_col.IndexOf(value.GetControl()));
 }
 /// <summary>
 /// Adds a control to the collection
 /// </summary>
 /// <param name="value">The control to add</param>
 /// <returns>Returns the position at which the control was added</returns>
 public void Add(IControlHabanero value)
 {
     _col.Add(value.GetControl());
 }
 /// <summary>
 /// Provides the index position of the control specified
 /// </summary>
 /// <param name="value">The control to search for</param>
 /// <returns>Returns the index position if found, or -1</returns>
 public int IndexOf(IControlHabanero value)
 {
     return _col.IndexOf(value.GetControl());
 }
 /// <summary>
 /// Adds a control to the collection
 /// </summary>
 /// <param name="value">The control to add</param>
 /// <returns>Returns the position at which the control was added</returns>
 public void Add(IControlHabanero value)
 {
     _col.Add(value.GetControl());
 }