本文整理汇总了C#中System.Windows.Forms.LayoutEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# LayoutEventArgs类的具体用法?C# LayoutEventArgs怎么用?C# LayoutEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LayoutEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了LayoutEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CGFX_Layout
private void CGFX_Layout(object sender, LayoutEventArgs e)
{
if (ModViewer != null)
{
ModViewer.Render();
}
}
开发者ID:Ermelber,项目名称:EveryFileExplorer,代码行数:7,代码来源:CGFXViewer.cs
示例2: ValidateForm_Layout
private void ValidateForm_Layout(object sender, LayoutEventArgs e)
{
switch (activeState)
{
case "InputFile":
xslRadioButton.Enabled = false;
break;
case "XsdFile":
xslRadioButton.Enabled = false;
againstXSDRadioButton.Enabled = false;
break;
}
switch (selectedValidationType)
{
case "XSL":
xslRadioButton.Checked = true;
break;
case "XSD":
againstXSDRadioButton.Checked = true;
break;
default:
xmlRadioButton.Checked = true;
selectedValidationType = "Xml";
break;
}
}
开发者ID:zippy1981,项目名称:XmlVisualizerv2,代码行数:27,代码来源:ValidateForm.cs
示例3: OnLayout
protected override void OnLayout(LayoutEventArgs levent)
{
try
{
DataGridCell currentCell = Grid.CurrentCell;
if (currentCell.ColumnNumber == Cell)
{
DataTable ds = Grid.DataSource as DataTable;
if (ds != null)
{
foreach (string item in Items)
{
if (currentCell.RowNumber < ds.Rows.Count)
{
DataRow row = ds.Rows[currentCell.RowNumber];
string currentValue = (string)row.ItemArray[Cell];
if (currentValue == item)
{
SelectedItem = item;
break;
}
}
}
}
}
base.OnLayout(levent);
}
catch (Exception) {}
}
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:30,代码来源:GeneralCDSpeed.cs
示例4: InfoForm_Layout
private void InfoForm_Layout(object sender, LayoutEventArgs e)
{
textBoxInfo.Location = new Point(2, 2);
textBoxInfo.Size = new Size(ClientRectangle.Width - 4, ClientRectangle.Height - buttonOK.Size.Height*2);
buttonOK.Location = new Point(ClientRectangle.Width - 100, ClientRectangle.Height - buttonOK.Size.Height*3/2);
}
开发者ID:amatos,项目名称:EDDiscovery,代码行数:7,代码来源:InfoForm.cs
示例5: VKAuth_Layout
private void VKAuth_Layout(object sender, LayoutEventArgs e)
{
webBrowser1.Url = new System.Uri(
"https://oauth.vk.com/authorize?client_id=5159394&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=friends&response_type=token&v=5.40&scope="
+ Settings.VKscope, System.UriKind.Absolute
);
}
开发者ID:skynetxxx,项目名称:MitroshinVK,代码行数:7,代码来源:VKAuth.cs
示例6: AddressTextBox_Layout
private void AddressTextBox_Layout(object sender, LayoutEventArgs e)
{
comboBoxHistory.Parent = this.Parent;
comboBoxHistory.Location = this.Location;
comboBoxHistory.Width = this.Width;
comboBoxHistory.DropDownWidth = comboBoxHistory.Width + 15;
}
开发者ID:PokeAcer549,项目名称:geckowii,代码行数:7,代码来源:AddressTextBox.cs
示例7: MarathonLayout
void MarathonLayout(object sender, LayoutEventArgs e)
{
scorePanel.SetBounds(5, 5, Width - 10, 40);
questionPanel.SetBounds(5, 50, (Width - 10) / 2, Height - 50);
gamePanel.SetBounds((Width / 2)+5, 50, (Width / 2) -10, Height-100);
}
开发者ID:wichtounet,项目名称:MarathonMillions,代码行数:7,代码来源:Form1.cs
示例8: OnLayout
protected override void OnLayout(LayoutEventArgs e)
{
if ((this.ParentToolStrip != null) && this.ParentToolStrip.IsInDesignMode)
{
if (FlowLayout.GetFlowDirection(this) != FlowDirection.TopDown)
{
FlowLayout.SetFlowDirection(this, FlowDirection.TopDown);
}
if (FlowLayout.GetWrapContents(this))
{
FlowLayout.SetWrapContents(this, false);
}
}
else
{
if (FlowLayout.GetFlowDirection(this) != FlowDirection.LeftToRight)
{
FlowLayout.SetFlowDirection(this, FlowDirection.LeftToRight);
}
if (!FlowLayout.GetWrapContents(this))
{
FlowLayout.SetWrapContents(this, true);
}
}
base.OnLayout(e);
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:ToolStripOverflow.cs
示例9: Layout
/// <summary>
/// 布局
/// </summary>
/// <param name="container">容器</param>
/// <param name="layoutEventArgs">Layout事件数据</param>
/// <returns>是否成功 true-是 false-否</returns>
public override bool Layout(object container, LayoutEventArgs layoutEventArgs)
{
Control parent = container as Control;
Rectangle parentClientRectangle = parent.ClientRectangle;
Point nextControlLocation = parentClientRectangle.Location;
int parentWidth = parentClientRectangle.Width;
foreach (Control c in parent.Controls)
{
if (!c.Visible)
{
continue;
}
nextControlLocation.Offset(c.Margin.Left, 0);
c.Location = nextControlLocation;
if (c.Location.X + c.Width * 2 > parentWidth)
{
nextControlLocation.X = parentClientRectangle.X;
nextControlLocation.Y += c.Height;
}
else
{
nextControlLocation.X += c.Width;
}
}
return false;
}
开发者ID:JackWangCUMT,项目名称:winform-control-lib,代码行数:38,代码来源:WSNItemLayoutPanel.cs
示例10: Form1_Layout
private void Form1_Layout(object sender, LayoutEventArgs e)
{
Rect = ClientRectangle;
Rect.Inflate(-10, -10);
StrSize = string.Format("폭 = {0}, 높이 = {1}", Rect.Width, Rect.Height);
Invalidate();
}
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:7,代码来源:Form1.cs
示例11: OnLayout
protected override void OnLayout(LayoutEventArgs e)
{
int offset = AutoScrollPosition.Y;
foreach (Control control in Controls)
{
var size = control.GetPreferredSize(new Size(ClientSize.Width, int.MaxValue));
control.SetBounds(
0,
offset,
ClientSize.Width,
size.Height
);
offset += size.Height;
}
bool vScroll = VScroll;
AdjustFormScrollbars(AutoScroll);
if (vScroll != VScroll)
BeginInvoke(new Action(PerformLayout));
}
开发者ID:netide,项目名称:netide,代码行数:25,代码来源:PackageListContainer.cs
示例12: OnLayout
protected override void OnLayout(LayoutEventArgs levent)
{
base.OnLayout(levent);
// calculate the rectangle we will paint within
_controlRectangle = new Rectangle(0, 1, Width, Height - 1);
// calculate the image rectanagle (if we have an image)
_imageRectangle = Rectangle.Empty;
if (_image != null)
{
int IMAGE_TOP_OFFSET = 3;
int IMAGE_LEFT_OFFSET = 2;
_imageRectangle = new Rectangle(IMAGE_LEFT_OFFSET, IMAGE_TOP_OFFSET, _image.Width, _image.Height);
}
//calculate the text rectangle
int TEXT_TOP_OFFSET = 4;
int TEXT_LEFT_MARGIN = 2;
int TEXT_LEFT_OFFSET = _imageRectangle.Right + TEXT_LEFT_MARGIN;
_textRectangle = new Rectangle(TEXT_LEFT_OFFSET, TEXT_TOP_OFFSET, _controlRectangle.Width - TEXT_LEFT_OFFSET, _controlRectangle.Height - TEXT_TOP_OFFSET);
// make sure the control is repainted
Invalidate();
}
开发者ID:gmilazzoitag,项目名称:OpenLiveWriter,代码行数:26,代码来源:HtmlEditorSidebarStatus.cs
示例13: OnLayout
/// <summary>
/// See <see cref="Control.OnLayout"/>
/// </summary>
protected override void OnLayout(LayoutEventArgs e)
{
base.OnLayout(e);
_caption.Width = Width - 2;
Padding = new Padding(1, _caption.Height + 2, 1, 1);
_caption.Top = 1;
}
开发者ID:rsdn,项目名称:janus,代码行数:10,代码来源:Pane.cs
示例14: SettingsLayout_Layout
private void SettingsLayout_Layout(object sender, LayoutEventArgs e)
{
foreach (UserControl ctrl in SettingsLayout.Controls)
{
ctrl.Width = SettingsLayout.Width - 25;
}
}
开发者ID:webba,项目名称:WurmAssistant2,代码行数:7,代码来源:EditTrigger.cs
示例15: OnLayout
protected override void OnLayout(LayoutEventArgs levent)
{
labelControl.Location = new Point(WIDTH_PADDING, 8);
labelControl.Width = Width - WIDTH_PADDING * 2;
labelControl.Height = Height;
base.OnLayout(levent);
}
开发者ID:gmilazzoitag,项目名称:OpenLiveWriter,代码行数:7,代码来源:MessageSidebarControl.cs
示例16: FolderBrowser_Layout
private void FolderBrowser_Layout(object sender, LayoutEventArgs e)
{
textBoxFolderPath.Left = labelCaption.Right;
buttonBrowse.Left = this.Width - buttonBrowse.Width - 2;
int width = buttonBrowse.Left - labelCaption.Right - 2;
textBoxFolderPath.Width = width > 0 ? width : 0;
}
开发者ID:ErhanKaraca,项目名称:excellibrary,代码行数:7,代码来源:FolderBrowser.cs
示例17: Layout
public override bool Layout(object container, LayoutEventArgs layoutEventArgs)
{
Panel parent = container as Panel;
// Use DisplayRectangle so that parent.Padding is honored.
Rectangle parentDisplayRectangle = parent.DisplayRectangle;
Point nextControlLocation = parentDisplayRectangle.Location;
foreach (Control c in parent.Controls)
{
// Only apply layout to visible controls.
if (!c.Visible)
{
continue;
}
// Respect the margin of the control:
// shift over the left and the top.
nextControlLocation.Offset(c.Margin.Left, c.Margin.Top);
// Set the location of the control.
c.Location = nextControlLocation;
// Set the autosized controls to their
// autosized heights.
Size preferredSize;
if (c.AutoSize)
{
preferredSize = c.GetPreferredSize(parentDisplayRectangle.Size);
}
else
{
preferredSize = c.Size;
}
//if (parent.ClientRectangle.Width > preferredSize.Width)
preferredSize = new Size(parent.ClientRectangle.Width, preferredSize.Height);
c.Size = preferredSize;
// Move X back to the display rectangle origin.
nextControlLocation.X = parentDisplayRectangle.X;
// Increment Y by the height of the control
// and the bottom margin.
nextControlLocation.Y += c.Height + c.Margin.Bottom;
}
if (!parent.AutoScroll)
{
parent.Height = nextControlLocation.Y;
}
// Optional: Return whether or not the container's
// parent should perform layout as a result of this
// layout. Some layout engines return the value of
// the container's AutoSize property.
return true;
}
开发者ID:gleblebedev,项目名称:toe,代码行数:59,代码来源:VerticalStackPanelLayout.cs
示例18: OnLayout
private void OnLayout(object sender, LayoutEventArgs e)
{
for (int i = 0; i < flpListBox.Controls.Count; i++)
{
flpListBox.Controls[i].Width = flpListBox.Size.Width - SystemInformation.VerticalScrollBarWidth;
}
}
开发者ID:Glynn-Taylor,项目名称:MC-SignLocalisation,代码行数:8,代码来源:ListControl.cs
示例19: OnLayout
protected override void OnLayout(LayoutEventArgs e)
{
base.OnLayout(e);
int lineHeight = TextRenderer.MeasureText("W", Font).Height;
_moreInformationLink.Top = (lineHeight + LineSpacing) * _lines.Count + TextPadding.Vertical;
}
开发者ID:netide,项目名称:netide,代码行数:8,代码来源:PackageDetailsControl.cs
示例20: OnLayout
protected override void OnLayout(LayoutEventArgs levent)
{
textBox.Location = new Point(2, ((Height - 1) / 2) - (textBox.Height / 2));
textBox.Size = new Size(Width - 4, textBox.Height);
Refresh();
base.OnLayout(levent);
}
开发者ID:PokeD,项目名称:Ohana3DS-Rebirth,代码行数:8,代码来源:OTextBox.cs
注:本文中的System.Windows.Forms.LayoutEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论