本文整理汇总了C#中Flood.GUI.Controls.Control类的典型用法代码示例。如果您正苦于以下问题:C# Control类的具体用法?C# Control怎么用?C# Control使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Control类属于Flood.GUI.Controls命名空间,在下文中一共展示了Control类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CheckBox
/// <summary>
/// Initializes a new instance of the <see cref="CheckBox"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public CheckBox(Control parent)
: base(parent)
{
SetSize(15, 15);
//m_Checked = true; // [omeg] why?!
//Toggle();
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:CheckBox.cs
示例2: MenuStrip
/// <summary>
/// Initializes a new instance of the <see cref="MenuStrip"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public MenuStrip(Control parent)
: base(parent)
{
SetBounds(0, 0, 200, 22);
Dock = Pos.Top;
m_InnerPanel.Padding = new Padding(5, 0, 0, 0);
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:MenuStrip.cs
示例3: ColorDisplay
//private bool m_DrawCheckers;
/// <summary>
/// Initializes a new instance of the <see cref="ColorDisplay"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public ColorDisplay(Control parent)
: base(parent)
{
SetSize(32, 32);
m_Color = new Color(255, 0, 0, 255);
//m_DrawCheckers = true;
}
开发者ID:chartly,项目名称:flood,代码行数:12,代码来源:ColorDisplay.cs
示例4: NumericUpDown
/// <summary>
/// Initializes a new instance of the <see cref="NumericUpDown"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public NumericUpDown(Control parent)
: base(parent)
{
SetSize(100, 20);
m_Splitter = new Splitter(this);
m_Splitter.Dock = Pos.Right;
m_Splitter.SetSize(13, 13);
m_Up = new UpDownButton_Up(m_Splitter);
m_Up.Clicked += OnButtonUp;
m_Up.IsTabable = false;
m_Splitter.SetPanel(0, m_Up, false);
m_Down = new UpDownButton_Down(m_Splitter);
m_Down.Clicked += OnButtonDown;
m_Down.IsTabable = false;
m_Down.Padding = new Padding(0, 1, 1, 0);
m_Splitter.SetPanel(1, m_Down, false);
m_Max = 100;
m_Min = 0;
m_Value = 0f;
Text = "0";
}
开发者ID:tritao,项目名称:flood,代码行数:29,代码来源:NumericUpDown.cs
示例5: Control
/// <summary>
/// Initializes a new instance of the <see cref="Control"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public Control(Control parent)
{
m_Children = new List<Control>();
m_Accelerators = new Dictionary<string, GwenEventHandler>();
Parent = parent;
m_Hidden = false;
m_Bounds = new Rectangle(0, 0, 10, 10);
m_Padding = Padding.Zero;
m_Margin = Margin.Zero;
RestrictToParent = false;
MouseInputEnabled = true;
KeyboardInputEnabled = false;
Invalidate();
Cursor = Cursors.Default;
//ToolTip = null;
IsTabable = false;
ShouldDrawBackground = true;
m_Disabled = false;
m_CacheTextureDirty = true;
m_CacheToTexture = false;
BoundsOutlineColor = Color.Red;
MarginOutlineColor = Color.Green;
PaddingOutlineColor = Color.Blue;
}
开发者ID:chartly,项目名称:flood,代码行数:34,代码来源:Control.cs
示例6: Disable
/// <summary>
/// Disables tooltip display for the specified control.
/// </summary>
/// <param name="control">Target control.</param>
public static void Disable(Control control)
{
if (g_ToolTip == control)
{
g_ToolTip = null;
}
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:ToolTip.cs
示例7: Enable
/// <summary>
/// Enables tooltip display for the specified control.
/// </summary>
/// <param name="control">Target control.</param>
public static void Enable(Control control)
{
if (null == control.ToolTip)
return;
g_ToolTip = control;
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:ToolTip.cs
示例8: ColorDisplay
//private bool m_DrawCheckers;
/// <summary>
/// Initializes a new instance of the <see cref="ColorDisplay"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public ColorDisplay(Control parent)
: base(parent)
{
SetSize(32, 32);
m_Color = Color.FromArgb(255, 255, 0, 0);
//m_DrawCheckers = true;
}
开发者ID:tritao,项目名称:flood,代码行数:12,代码来源:ColorDisplay.cs
示例9: ColorSlider
/// <summary>
/// Initializes a new instance of the <see cref="ColorSlider"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public ColorSlider(Control parent)
: base(parent)
{
SetSize(32, 128);
MouseInputEnabled = true;
m_Depressed = false;
}
开发者ID:chartly,项目名称:flood,代码行数:11,代码来源:ColorSlider.cs
示例10: CrossSplitter
private int m_ZoomedSection; // 0-3
#endregion Fields
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="CrossSplitter"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public CrossSplitter(Control parent)
: base(parent)
{
m_Sections = new Control[4];
m_VSplitter = new SplitterBar(this);
m_VSplitter.SetPosition(0, 128);
m_VSplitter.Dragged += OnVerticalMoved;
m_VSplitter.Cursor = Cursors.SizeNS;
m_HSplitter = new SplitterBar(this);
m_HSplitter.SetPosition(128, 0);
m_HSplitter.Dragged += OnHorizontalMoved;
m_HSplitter.Cursor = Cursors.SizeWE;
m_CSplitter = new SplitterBar(this);
m_CSplitter.SetPosition(128, 128);
m_CSplitter.Dragged += OnCenterMoved;
m_CSplitter.Cursor = Cursors.SizeAll;
m_HVal = 0.5f;
m_VVal = 0.5f;
SetPanel(0, null);
SetPanel(1, null);
SetPanel(2, null);
SetPanel(3, null);
SplitterSize = 5;
SplittersVisible = false;
m_ZoomedSection = -1;
}
开发者ID:chartly,项目名称:flood,代码行数:43,代码来源:CrossSplitter.cs
示例11: TabControl
/// <summary>
/// Initializes a new instance of the <see cref="TabControl"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public TabControl(Control parent)
: base(parent)
{
m_Scroll = new ScrollBarButton[2];
m_ScrollOffset = 0;
m_TabStrip = new TabStrip(this);
m_TabStrip.StripPosition = Pos.Top;
// Make this some special control?
m_Scroll[0] = new ScrollBarButton(this);
m_Scroll[0].SetDirectionLeft();
m_Scroll[0].Clicked += ScrollPressedLeft;
m_Scroll[0].SetSize(14, 16);
m_Scroll[1] = new ScrollBarButton(this);
m_Scroll[1].SetDirectionRight();
m_Scroll[1].Clicked += ScrollPressedRight;
m_Scroll[1].SetSize(14, 16);
m_InnerPanel = new TabControlInner(this);
m_InnerPanel.Dock = Pos.Fill;
m_InnerPanel.SendToBack();
IsTabable = false;
}
开发者ID:FloodProject,项目名称:flood,代码行数:30,代码来源:TabControl.cs
示例12: ScrollControl
/// <summary>
/// Initializes a new instance of the <see cref="ScrollControl"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public ScrollControl(Control parent)
: base(parent)
{
MouseInputEnabled = false;
m_VerticalScrollBar = new VerticalScrollBar(this);
m_VerticalScrollBar.Dock = Pos.Right;
m_VerticalScrollBar.BarMoved += VBarMoved;
m_CanScrollV = true;
m_VerticalScrollBar.NudgeAmount = 30;
m_HorizontalScrollBar = new HorizontalScrollBar(this);
m_HorizontalScrollBar.Dock = Pos.Bottom;
m_HorizontalScrollBar.BarMoved += HBarMoved;
m_CanScrollH = true;
m_HorizontalScrollBar.NudgeAmount = 30;
m_InnerPanel = new Control(this);
m_InnerPanel.SetPosition(0, 0);
m_InnerPanel.Margin = Margin.Five;
m_InnerPanel.SendToBack();
m_InnerPanel.MouseInputEnabled = false;
m_AutoHideBars = false;
}
开发者ID:chartly,项目名称:flood,代码行数:29,代码来源:ScrollControl.cs
示例13: TextView
public TextView(Control parent, TextDocument textDocument)
: base(parent)
{
Dock = Pos.Fill;
TextLayer = new TextLayer(this, textDocument);
CarretLayer = new CarretLayer(this);
}
开发者ID:chartly,项目名称:flood,代码行数:7,代码来源:TextView.cs
示例14: RadioButton
/// <summary>
/// Initializes a new instance of the <see cref="RadioButton"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public RadioButton(Control parent)
: base(parent)
{
SetSize(15, 15);
MouseInputEnabled = true;
IsTabable = false;
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:RadioButton.cs
示例15: Add
public static void Add(Control control, Animation animation)
{
animation.m_Control = control;
if (!m_Animations.ContainsKey(control))
m_Animations[control] = new List<Animation>();
m_Animations[control].Add(animation);
}
开发者ID:tritao,项目名称:flood,代码行数:7,代码来源:Animation.cs
示例16: AlignRight
/// <summary>
/// Moves the control to the right of its parent.
/// </summary>
/// <param name="control"></param>
public static void AlignRight(Control control)
{
Control parent = control.Parent;
if (null == parent) return;
control.SetPosition(parent.Width - control.Width - parent.Padding.Right, control.Y);
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:Align.cs
示例17: CenterHorizontally
/// <summary>
/// Centers the control horizontally inside its parent.
/// </summary>
/// <param name="control"></param>
public static void CenterHorizontally(Control control)
{
Control parent = control.Parent;
if (null == parent) return;
control.SetPosition(parent.Padding.Left + (((parent.Width - parent.Padding.Left - parent.Padding.Right) - control.Width) / 2), control.Y);
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:Align.cs
示例18: AlignLeft
/// <summary>
/// Moves the control to the left of its parent.
/// </summary>
/// <param name="control"></param>
public static void AlignLeft(Control control)
{
Control parent = control.Parent;
if (null == parent) return;
control.SetPosition(parent.Padding.Left, control.Y);
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:Align.cs
示例19: AlignBottom
/// <summary>
/// Moves the control to the bottom of its parent.
/// </summary>
/// <param name="control"></param>
public static void AlignBottom(Control control)
{
Control parent = control.Parent;
if (null == parent) return;
control.SetPosition(control.X, parent.Height - control.Height);
}
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:Align.cs
示例20: Button
/// <summary>
/// Control constructor.
/// </summary>
/// <param name="parent">Parent control.</param>
public Button(Control parent)
: base(parent)
{
SetSize(100, 20);
MouseInputEnabled = true;
Alignment = Pos.Center;
TextPadding = new Padding(3, 3, 3, 3);
}
开发者ID:tritao,项目名称:flood,代码行数:12,代码来源:Button.cs
注:本文中的Flood.GUI.Controls.Control类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论