本文整理汇总了C#中IControlHabanero.GetControl方法的典型用法代码示例。如果您正苦于以下问题:C# IControlHabanero.GetControl方法的具体用法?C# IControlHabanero.GetControl怎么用?C# IControlHabanero.GetControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IControlHabanero
的用法示例。
在下文中一共展示了IControlHabanero.GetControl方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: SetupDockOfControl
/// <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;
}
}
示例3: GetToolTip
/// <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());
}
示例4: SetToolTip
/// <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);
}
示例5: GetControl
protected virtual Control GetControl(IControlHabanero objControl)
{
var controlWin = objControl.GetControl();
if(controlWin != null) return controlWin;
return new Control();
}
示例6: IndexOf
/// <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());
}
示例7: Add
/// <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());
}