本文整理汇总了C#中System.Windows.Forms.FlowLayoutPanel.ResumeLayout方法的典型用法代码示例。如果您正苦于以下问题:C# FlowLayoutPanel.ResumeLayout方法的具体用法?C# FlowLayoutPanel.ResumeLayout怎么用?C# FlowLayoutPanel.ResumeLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.FlowLayoutPanel
的用法示例。
在下文中一共展示了FlowLayoutPanel.ResumeLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: prepareBlocksPanel
public static void prepareBlocksPanel(FlowLayoutPanel blocksPanel, Size buttonSize, ImageList buttonsImages, EventHandler buttonBlockClick, int startIndex, int count)
{
blocksPanel.Controls.Clear();
blocksPanel.SuspendLayout();
for (int i = startIndex; i < startIndex + count; i++)
{
var but = new Button();
but.FlatStyle = FlatStyle.Flat;
but.Size = buttonSize;
but.ImageList = buttonsImages;
but.ImageIndex = i;
but.Click += buttonBlockClick;
but.Margin = new Padding(0);
but.Padding = new Padding(0);
blocksPanel.Controls.Add(but);
}
blocksPanel.ResumeLayout();
}
示例2: Container
public static FlowLayoutPanel Container(IXsdPart part, ToolTip tooltip = null)
{
var panel = new FlowLayoutPanel();
panel.SuspendLayout();
panel.FlowDirection = FlowDirection.TopDown;
panel.AutoSize = true;
panel.Font = Methods.BaseFont;
panel.Name = "p" + part.Name;
panel.Size = new System.Drawing.Size(208, 53);
panel.AutoSize = true;
//panel.BorderStyle = BorderStyle.Fixed3D;
panel.BorderStyle = BorderStyle.None;
panel.Controls.Add(Controls.Label(part, tooltip));
panel.ResumeLayout();
return panel;
}
示例3: AddLinkList
private void AddLinkList(FlowLayoutPanel Panel, int Columns, IEnumerable<BaseLinkable> List)
{
Panel.SuspendLayout();
//Panel.Controls.Clear();
Panel.Margin = new Padding(0);
Panel.Padding = new Padding(0);
List.ForEach((Index, Item) =>
{
var Label = new LinkLabel();
Label.Padding = new Padding(0);
Label.Margin = new Padding(0);
Label.Width = Panel.Width / Columns;
Label.Text = Item.ToString();
Label.Click += (_sender, _e) =>
{
Process.Start(Item.Url);
};
Panel.Controls.Add(Label);
});
Panel.ResumeLayout();
}
示例4: Section
public static FlowLayoutPanel Section(Element element, ToolTip tooltip = null)
{
var panel = new FlowLayoutPanel();
panel.SuspendLayout();
panel.FlowDirection = FlowDirection.LeftToRight;
panel.AutoSize = true;
panel.Font = Methods.BaseFont;
panel.Name = "s" + element.Name;
panel.Tag = element;
//panel.BorderStyle = BorderStyle.Fixed3D;
panel.BorderStyle = BorderStyle.None;
if (element.Parent !=null && element.Parent.Name != "configuration")
{
panel.BackColor = System.Drawing.Color.FromArgb(238, 238, 238);
}
panel.Size = new System.Drawing.Size(208, 53);
panel.AutoSize = true;
panel.Location = new System.Drawing.Point(0, 24);
if (tooltip != null)
{
tooltip.SetToolTip(panel, element.Documentation);
}
if (!element.RootElement)
{
panel.Controls.Add(Controls.Label(element, tooltip));
}
else
{
// hide the root to create the menu selections...
panel.Visible = false;
}
panel.ResumeLayout();
return panel;
}
示例5: InitializeComponent
//.........这里部分代码省略.........
table.Controls.Add(seasonLabel, 0, 0);
table.Controls.Add(episodeLabel, 0, 1);
table.Dock = System.Windows.Forms.DockStyle.Fill;
table.Location = new System.Drawing.Point(0, 0);
table.Name = "table";
table.RowCount = 2;
table.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
table.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
table.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 56F));
table.Size = new System.Drawing.Size(213, 81);
table.TabIndex = 3;
//
// flowButtons
//
table.SetColumnSpan(flowButtons, 2);
flowButtons.Controls.Add(this.okButton);
flowButtons.Controls.Add(this.cancelButton);
flowButtons.Dock = System.Windows.Forms.DockStyle.Fill;
flowButtons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
flowButtons.Location = new System.Drawing.Point(0, 50);
flowButtons.Margin = new System.Windows.Forms.Padding(0);
flowButtons.Name = "flowButtons";
flowButtons.Size = new System.Drawing.Size(213, 56);
flowButtons.TabIndex = 0;
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(135, 3);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 1;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.OkButtonClick);
//
// cancelButton
//
this.cancelButton.Location = new System.Drawing.Point(54, 3);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 2;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.CancelButtonClick);
//
// episodeNumber
//
this.episodeNumber.Dock = System.Windows.Forms.DockStyle.Fill;
this.episodeNumber.Location = new System.Drawing.Point(96, 28);
this.episodeNumber.Name = "episodeNumber";
this.episodeNumber.Size = new System.Drawing.Size(114, 20);
this.episodeNumber.TabIndex = 1;
//
// seasonNumber
//
this.seasonNumber.Dock = System.Windows.Forms.DockStyle.Fill;
this.seasonNumber.Location = new System.Drawing.Point(96, 3);
this.seasonNumber.Name = "seasonNumber";
this.seasonNumber.Size = new System.Drawing.Size(114, 20);
this.seasonNumber.TabIndex = 0;
//
// seasonLabel
//
seasonLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
seasonLabel.AutoSize = true;
seasonLabel.Location = new System.Drawing.Point(6, 6);
seasonLabel.Name = "seasonLabel";
seasonLabel.Size = new System.Drawing.Size(84, 13);
seasonLabel.TabIndex = 2;
seasonLabel.Text = "Season number:";
//
// episodeLabel
//
episodeLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
episodeLabel.AutoSize = true;
episodeLabel.Location = new System.Drawing.Point(4, 31);
episodeLabel.Name = "episodeLabel";
episodeLabel.Size = new System.Drawing.Size(86, 13);
episodeLabel.TabIndex = 3;
episodeLabel.Text = "Episode number:";
//
// NumberInputDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(213, 81);
this.ControlBox = false;
this.Controls.Add(table);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "NumberInputDialog";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Set Episode";
table.ResumeLayout(false);
table.PerformLayout();
flowButtons.ResumeLayout(false);
this.ResumeLayout(false);
}
示例6: InitializeComponent
//.........这里部分代码省略.........
//
this.sourceFileColumn.Text = "Source File";
this.sourceFileColumn.Width = 200;
//
// tvShowColumn
//
this.tvShowColumn.Text = "TV Show";
this.tvShowColumn.Width = 92;
//
// seasonColumn
//
this.seasonColumn.Text = "Season";
this.seasonColumn.Width = 56;
//
// episodeColumn
//
this.episodeColumn.Text = "Episode";
this.episodeColumn.Width = 51;
//
// episodeNameColumn
//
this.episodeNameColumn.Text = "Episode Name";
this.episodeNameColumn.Width = 99;
//
// destinationFile
//
this.destinationFile.Text = "Destination";
this.destinationFile.Width = 172;
//
// selectButtonsFlow
//
selectButtonsFlow.Controls.Add(this.selectAllButton);
selectButtonsFlow.Controls.Add(this.deselectAllButton);
selectButtonsFlow.Controls.Add(this.setShowButton);
selectButtonsFlow.Controls.Add(this.setEpisodeButton);
selectButtonsFlow.Dock = System.Windows.Forms.DockStyle.Top;
selectButtonsFlow.Location = new System.Drawing.Point(0, 31);
selectButtonsFlow.Name = "selectButtonsFlow";
selectButtonsFlow.Size = new System.Drawing.Size(678, 35);
selectButtonsFlow.TabIndex = 3;
//
// selectAllButton
//
this.selectAllButton.Location = new System.Drawing.Point(3, 3);
this.selectAllButton.Name = "selectAllButton";
this.selectAllButton.Size = new System.Drawing.Size(75, 23);
this.selectAllButton.TabIndex = 0;
this.selectAllButton.Text = "Select All";
this.toolTip.SetToolTip(this.selectAllButton, "Selects all the epsodes.");
this.selectAllButton.UseVisualStyleBackColor = true;
this.selectAllButton.Click += new System.EventHandler(this.SelectAllButtonClick);
//
// deselectAllButton
//
this.deselectAllButton.Location = new System.Drawing.Point(84, 3);
this.deselectAllButton.Name = "deselectAllButton";
this.deselectAllButton.Size = new System.Drawing.Size(75, 23);
this.deselectAllButton.TabIndex = 1;
this.deselectAllButton.Text = "Deselect All";
this.toolTip.SetToolTip(this.deselectAllButton, "Deselects all the episodes.");
this.deselectAllButton.UseVisualStyleBackColor = true;
this.deselectAllButton.Click += new System.EventHandler(this.DeselectAllButtonClick);
//
// setShowButton
//
this.setShowButton.Location = new System.Drawing.Point(165, 3);
this.setShowButton.Name = "setShowButton";
this.setShowButton.Size = new System.Drawing.Size(79, 23);
this.setShowButton.TabIndex = 2;
this.setShowButton.Text = "Set Show";
this.toolTip.SetToolTip(this.setShowButton, "Overrides the show of the selected episodes.");
this.setShowButton.UseVisualStyleBackColor = true;
this.setShowButton.Click += new System.EventHandler(this.SetShowButtonClick);
//
// setEpisodeButton
//
this.setEpisodeButton.Location = new System.Drawing.Point(250, 3);
this.setEpisodeButton.Name = "setEpisodeButton";
this.setEpisodeButton.Size = new System.Drawing.Size(75, 23);
this.setEpisodeButton.TabIndex = 4;
this.setEpisodeButton.Text = "Set Episode";
this.toolTip.SetToolTip(this.setEpisodeButton, ".");
this.setEpisodeButton.UseVisualStyleBackColor = true;
this.setEpisodeButton.Click += new System.EventHandler(this.SetEpisodeButtonClick);
//
// SortEpisodes
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.resultsList);
this.Controls.Add(selectButtonsFlow);
this.Controls.Add(topButtonsFlow);
this.Name = "SortEpisodes";
this.Size = new System.Drawing.Size(678, 414);
this.Load += new System.EventHandler(this.SortEpisodesLoad);
topButtonsFlow.ResumeLayout(false);
selectButtonsFlow.ResumeLayout(false);
this.ResumeLayout(false);
}
示例7: Main
//.........这里部分代码省略.........
textBoxOutput.Name = "textBox2";
textBoxOutput.ReadOnly = true;
textBoxOutput.Size = new Size(363, 150);
textBoxOutput.TabIndex = 1;
//
// statusStrip1
//
statusStrip.Items.AddRange(new ToolStripItem[] {statusLabel});
statusStrip.Location = new Point(0, 238);
statusStrip.Name = "statusStrip1";
statusStrip.Size = new Size(363, 22);
statusStrip.TabIndex = 2;
statusStrip.Text = "statusStrip1";
//
// toolStripStatusLabel1
//
statusLabel.Name = "toolStripStatusLabel1";
statusLabel.Size = new Size(29, 17);
statusLabel.Spring = true;
statusLabel.TextAlign = ContentAlignment.MiddleLeft;
//
// Form1
//
form.AutoScaleDimensions = new SizeF(6F, 12F);
form.AutoScaleMode = AutoScaleMode.Font;
form.ClientSize = new Size(363, 260);
form.Controls.Add(statusStrip);
form.Controls.Add(panelFill);
form.Controls.Add(flowLayoutPanelTop);
form.Name = "Form1";
form.Text = "二进制打印";
form.StartPosition = FormStartPosition.CenterScreen;
form.ImeMode = ImeMode.On;
flowLayoutPanelTop.ResumeLayout(false);
flowLayoutPanelTop.PerformLayout();
panelFill.ResumeLayout(false);
panelFill.PerformLayout();
statusStrip.ResumeLayout(false);
statusStrip.PerformLayout();
form.ResumeLayout(false);
form.PerformLayout();
}
radioButtonText.Click += (o, e) =>
{
textBoxInput.Text = "";
textBoxOutput.Text = "";
var commonUse = new List<string>();
commonUse.Add(Encoding.Unicode.WebName);
commonUse.Add(Encoding.UTF8.WebName);
commonUse.Add(Encoding.Default.WebName);
commonUse.Add(Encoding.UTF7.WebName);
commonUse.Add(Encoding.UTF32.WebName);
var fullList = Encoding.GetEncodings().Select(i=>i.GetEncoding().WebName);
comboBox.DataSource = commonUse.Concat(fullList.Except(commonUse)).ToArray();
};
radioButtonNumber.Click += (o, e) =>
{
textBoxInput.Text = "";
textBoxOutput.Text = "";
comboBox.DataSource = new string[] { "unsigned oct", "signed oct", "hex", };
示例8: AutoSizeGrowOnly_ResizeIfSmaller_DockRight
public void AutoSizeGrowOnly_ResizeIfSmaller_DockRight ()
{
f.ClientSize = new Size (300, 100);
var panel = new FlowLayoutPanel ();
panel.SuspendLayout ();
panel.AutoSize = true;
panel.AutoSizeMode = AutoSizeMode.GrowOnly;
panel.WrapContents = true;
panel.Bounds = new Rectangle(5, 5, 100, 100);
panel.Dock = DockStyle.Right;
var c = new Label ();
c.Size = new Size (25, 90);
panel.Controls.Add (c);
f.Controls.Add(panel);
panel.ResumeLayout (true);
Assert.AreEqual (269, panel.Left, "1");
Assert.AreEqual (f.ClientRectangle.Height, panel.Height, "2");
Assert.AreEqual (31, panel.Width, "3"); // 25 + 2*3 margin
}
示例9: NoAutoSize_DontResizeIfSmaller_DockBottom
public void NoAutoSize_DontResizeIfSmaller_DockBottom ()
{
var panel = new FlowLayoutPanel ();
panel.SuspendLayout ();
panel.AutoSize = false;
panel.WrapContents = true;
panel.Bounds = new Rectangle(5, 5, 100, 100);
panel.Dock = DockStyle.Bottom;
var c = new Label ();
c.Size = new Size (90, 25);
panel.Controls.Add (c);
f.Controls.Add(panel);
panel.ResumeLayout (true);
Assert.AreEqual (200, panel.Top, "1");
Assert.AreEqual (f.ClientRectangle.Width, panel.Width, "2");
Assert.AreEqual (100, panel.Height, "3");
}
示例10: RefreshZXCVRow
private void RefreshZXCVRow(FlowLayoutPanel panel, RefreshFor modify)
{
if (ZXCVRowScancodes.Length != panel.Controls.Count)
{
return;
}
if ((modify & RefreshFor.Label) == RefreshFor.Label)
{
for (int i = 0; i < panel.Controls.Count; i++)
{
SoftKey key = panel.Controls[i] as SoftKey;
ChangeStyleForKey(key);
key.Text = GetDisplayStringFromVK(key.ScanCode);
}
}
if ((modify & RefreshFor.Font) == RefreshFor.Font)
{
for (int i = 0; i < panel.Controls.Count; i++)
{
panel.Controls[i].Font = ButtonFont;
}
}
if ((modify & RefreshFor.Size) == RefreshFor.Size)
{
panel.SuspendLayout();
Size[] sizes = ZXCVSize(panel.Size);
if (sizes.Length != panel.Controls.Count)
{
return;
}
for (int i = 0; i < sizes.Length; i++)
{
panel.Controls[i].Size = sizes[i];
}
panel.ResumeLayout();
Control b = panel.Controls[panel.Controls.Count - 1];
b.Width = panel.Width - b.Location.X - (buttonMargin.Left + buttonMargin.Right);
}
}
示例11: AppTileList
/// <summary>
/// Creates a new <see cref="AppTile"/> list.
/// </summary>
public AppTileList()
{
Size = new Size(425, 200);
AutoScaleDimensions = new SizeF(6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
SuspendLayout();
TextSearch = new HintTextBox
{
Dock = DockStyle.Top, Height = 20,
HintText = Resources.Search, ShowClearButton = true,
TabIndex = 0
};
TextSearch.TextChanged += delegate { RefilterTiles(); };
_flowLayout = new FlowLayoutPanel
{
Location = new Point(0, 0), Size = Size.Empty, Margin = Padding.Empty,
FlowDirection = FlowDirection.TopDown
};
_scrollPanel = new Panel
{
Dock = DockStyle.Fill, Margin = Padding.Empty,
AutoScroll = true, Controls = {_flowLayout},
TabIndex = 1
};
// Must add scroll panel first for docking to work correctly
Controls.Add(_scrollPanel);
Controls.Add(TextSearch);
Resize += delegate
{
_flowLayout.SuspendLayout();
_flowLayout.Width = _scrollPanel.Width - (int)(20 * AutoScaleDimensions.Width / 6F);
foreach (Control control in _flowLayout.Controls)
control.Width = _flowLayout.Width;
_flowLayout.ResumeLayout(false);
};
ResumeLayout(false);
}
示例12: selectChannel
/// <summary>
/// To handle files
/// </summary>
/// <param name="p"></param>
public selectChannel(string p)
{
try
{
TabControl streamParameterTabControl = new TabControl();
int maximumX = 0;
int maximumY = 0;
TabPage[] tabStream = new TabPage[Globals.limitPCAP.Keys.Count];
int pktCnt = 0;
foreach (int stream in Globals.limitPCAP.Keys)
{
string[] streamFiles = Array.FindAll(Globals.fileDump_list, element => element.Contains(String.Format("{0}_", stream)));
List<string> parametersList = new List<string>(streamFiles.ToList());
CheckBox[] dataSelect = new CheckBox[streamFiles.Length];
System.Windows.Forms.Label[] dataLabels = new System.Windows.Forms.Label[streamFiles.Length];
TableLayoutPanel[] dataColumns = new TableLayoutPanel[streamFiles.Length / 20 + 1];
FlowLayoutPanel flow = new FlowLayoutPanel();
flow.FlowDirection = FlowDirection.LeftToRight;
tabStream[pktCnt] = new TabPage();
for (int i = 0; i != streamFiles.Length; i++)
{
string streamString = stream.ToString();
var parName = parametersList[i].Substring((streamString.Length + 1) + (parametersList[i].IndexOf(String.Format("{0}_", stream))));
parName = parName.Substring(0, parName.LastIndexOf(".dat"));
int whichColumn = i / 20;
dataLabels[i] = new System.Windows.Forms.Label();
dataLabels[i].Name = i.ToString();
dataLabels[i].AutoSize = false;
dataLabels[i].Text = String.Format("{0}", parName.ToString());
dataLabels[i].Font = new Font(dataLabels[i].Font.FontFamily, 8, dataLabels[i].Font.Style);
dataLabels[i].Size = dataLabels[i].PreferredSize;
dataSelect[i] = new CheckBox();
dataSelect[i].Name = String.Format("{0}", parName.ToString());
dataSelect[i].AutoSize = false;
dataSelect[i].Font = new Font(dataLabels[i].Font.FontFamily, 8, dataLabels[i].Font.Style);
//Globals.dataHolders[i].TextAlign = ContentAlignment.BottomLeft;
dataSelect[i].Size = dataSelect[i].PreferredSize;
if (i % 20 == 0)
{
dataColumns[whichColumn] = new TableLayoutPanel();
dataColumns[whichColumn].ColumnCount = 2;
dataColumns[whichColumn].RowCount = 20;
}
dataColumns[whichColumn].Controls.Add(dataLabels[i]);
dataColumns[whichColumn].Controls.Add(dataSelect[i]);
dataColumns[whichColumn].Size = dataColumns[whichColumn].PreferredSize;
if (dataColumns[whichColumn].Size.Height > maximumY) maximumY = dataColumns[whichColumn].Size.Height;
//if (tabStream[pktCnt].Size.Width > maximumX) maximumX = tabStream[pktCnt].Size.Width;
}
for (int i = 0; i != dataColumns.Length; i++)
{
flow.Controls.Add(dataColumns[i]);
}
flow.SuspendLayout();
flow.ResumeLayout(false);
//tabStream[pktCnt].AutoScroll = true;
//tabStream[pktCnt].AutoScrollPosition = new System.Drawing.Point(349, 0);
flow.Size = flow.PreferredSize;
tabStream[pktCnt].Controls.Add(flow);
tabStream[pktCnt].Name = stream.ToString();
tabStream[pktCnt].Text = String.Format("ID={0}", stream);
tabStream[pktCnt].Size = tabStream[pktCnt].PreferredSize;
if (tabStream[pktCnt].Size.Height > maximumY) maximumY = tabStream[pktCnt].Size.Height;
if (tabStream[pktCnt].Size.Width > maximumX) maximumX = tabStream[pktCnt].Size.Width;
pktCnt++;
}
foreach (TabPage stream in tabStream)
{
streamParameterTabControl.Controls.Add(stream);
}
streamParameterTabControl.SuspendLayout(); streamParameterTabControl.ResumeLayout(false);
streamParameterTabControl.Size = new Size(maximumX + 5, maximumY + 15);//streamParameterTabControl.PreferredSize;
//this.Size = this.PreferredSize;
FlowLayoutPanel selectionFlow = new FlowLayoutPanel();
selectionFlow.FlowDirection = FlowDirection.LeftToRight;
selectionFlow.Controls.Add(streamParameterTabControl);
//streamParameterTabControl.Dock = DockStyle.Fill;
Button btnOK = new Button();
btnOK.Text = "Draw";
btnOK.Click += new EventHandler(selectChannelClick);
selectionFlow.Controls.Add(btnOK);
Button btnAll = new Button();
btnAll.Text = "All";
btnAll.Click += new EventHandler(selectAllClick);
selectionFlow.Controls.Add(btnAll);
selectionFlow.Size = selectionFlow.PreferredSize;
selectionFlow.SuspendLayout();
selectionFlow.ResumeLayout(false);
this.Controls.Add(selectionFlow);
this.Size = this.PreferredSize;//new Size(maximumX + 50, maximumY + 45);
this.Text = "Select Channels to Plot";
this.SuspendLayout();
this.ResumeLayout(false);
//.........这里部分代码省略.........
示例13: InitializeComponent
//.........这里部分代码省略.........
changelogLink.TabStop = true;
changelogLink.Text = "Changelog";
changelogLink.LinkClicked += new LinkLabelLinkClickedEventHandler(LinkClicked);
bugLink.AutoSize = true;
bugLink.Location = new Point(8, 78);
bugLink.Name = "bugLink";
bugLink.Size = new Size(61, 13);
bugLink.TabIndex = 2;
bugLink.TabStop = true;
bugLink.Text = "Bug reports";
bugLink.LinkClicked += new LinkLabelLinkClickedEventHandler(LinkClicked);
scriptsLink.AutoSize = true;
scriptsLink.Location = new Point(8, 34);
scriptsLink.Name = "scriptsLink";
scriptsLink.Size = new Size(68, 13);
scriptsLink.TabIndex = 1;
scriptsLink.TabStop = true;
scriptsLink.Text = "Scripts forum";
scriptsLink.LinkClicked += new LinkLabelLinkClickedEventHandler(LinkClicked);
installLink.AutoSize = true;
installLink.Location = new Point(8, 12);
installLink.Name = "installLink";
installLink.Size = new Size(86, 13);
installLink.TabIndex = 0;
installLink.TabStop = true;
installLink.Text = "Installation guide";
installLink.LinkClicked += new LinkLabelLinkClickedEventHandler(LinkClicked);
dotaFindTimer.Interval = 125;
dotaFindTimer.Tick += new EventHandler(dotaFindTimer_Tick);
taskbarIcon.Icon = (Icon)componentResourceManager.GetObject("taskbarIcon.Icon");
taskbarIcon.Text = "Ensage";
taskbarIcon.Visible = true;
taskbarIcon.Click += new EventHandler(notifyIcon1_Click);
injectWorker.WorkerReportsProgress = true;
injectWorker.DoWork += new DoWorkEventHandler(injectWorker_DoWork);
injectWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(injectWorker_RunWorkerCompleted);
pipeWorker.WorkerReportsProgress = true;
pipeWorker.DoWork += new DoWorkEventHandler(pipeWorker_DoWork);
pipeWorker.ProgressChanged += new ProgressChangedEventHandler(pipeWorker_ProgressChanged);
serverWorker.DoWork += new DoWorkEventHandler(serverWorker_DoWork);
updateTimer.Interval = 60000;
updateTimer.Tick += new EventHandler(updateTimer_Tick);
loadWorker.WorkerReportsProgress = true;
loadWorker.DoWork += new DoWorkEventHandler(loadWorker_DoWork);
loadWorker.ProgressChanged += new ProgressChangedEventHandler(loadWorker_ProgressChanged);
DisableVAC.AutoSize = true;
DisableVAC.Location = new Point(11, 151);
DisableVAC.Name = "DisableVAC";
DisableVAC.Size = new Size(103, 17);
DisableVAC.TabIndex = 9;
DisableVAC.Text = "disable anti-VAC";
DisableVAC.UseVisualStyleBackColor = true;
AutoScaleDimensions = new SizeF(6f, 13f);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(683, 428);
Controls.Add(tabControl1);
Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
MinimumSize = new Size(683, 428);
Name = "Main";
Text = "Ensage - Main";
FormClosing += new FormClosingEventHandler(Main_FormClosing);
Shown += new EventHandler(Main_Shown);
Resize += new EventHandler(Main_Resize);
tabControl1.ResumeLayout(false);
mainPage.ResumeLayout(false);
mainPage.PerformLayout();
groupBox1.ResumeLayout(false);
chatPage.ResumeLayout(false);
ircTabControl.ResumeLayout(false);
tabPage1.ResumeLayout(false);
splitContainer1.Panel1.ResumeLayout(false);
splitContainer1.Panel1.PerformLayout();
splitContainer1.Panel2.ResumeLayout(false);
splitContainer1.EndInit();
splitContainer1.ResumeLayout(false);
tabPage2.ResumeLayout(false);
splitContainer2.Panel1.ResumeLayout(false);
splitContainer2.Panel2.ResumeLayout(false);
splitContainer2.EndInit();
splitContainer2.ResumeLayout(false);
splitContainer3.Panel1.ResumeLayout(false);
splitContainer3.Panel2.ResumeLayout(false);
splitContainer3.EndInit();
splitContainer3.ResumeLayout(false);
flowLayoutPanel1.ResumeLayout(false);
flowLayoutPanel1.PerformLayout();
scriptsPage.ResumeLayout(false);
((ISupportInitialize)scriptsDataGrid).EndInit();
((ISupportInitialize)listBinding).EndInit();
scriptConfigPage.ResumeLayout(false);
repository.ResumeLayout(false);
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel2.ResumeLayout(false);
tableLayoutPanel3.ResumeLayout(false);
tableLayoutPanel3.PerformLayout();
configPage.ResumeLayout(false);
helpPage.ResumeLayout(false);
helpPage.PerformLayout();
ResumeLayout(false);
}
示例14: SelectIP
private void SelectIP()
{
if (Globals.sourceIP != null) //disabled
{
TextBox inputIP = new TextBox();
Label inputIPLabel = new Label();
FlowLayoutPanel panel = new FlowLayoutPanel();
panel.FlowDirection = FlowDirection.TopDown;
inputIPLabel.Text = "Please specify IP Adress of source of packets in 192.168.2.1 format\nLeave blank for no filtering";
inputIPLabel.Size = inputIPLabel.PreferredSize;
inputIP.Size = inputIPLabel.Size;
Button btnOK = new Button();
btnOK.Text = "OK";
btnOK.Click += new EventHandler(selectIPClick);
panel.Controls.AddRange(new Control[] { inputIPLabel, inputIP, btnOK });
panel.SuspendLayout();
panel.ResumeLayout(false);
panel.Size = panel.PreferredSize;
IPobj = new selectIP();
IPobj.Text = "Please select IP Adress of the source";
IPobj.Controls.Add(panel);
IPobj.Size = IPobj.PreferredSize;
IPobj.Show();
}
this.WindowState = FormWindowState.Normal;
this.BringToFront();
}
示例15: DrawParametersThread
private void DrawParametersThread()
{
this.streamParametersFlow0.Dispose();
this.tabPage1.Dispose();
this.tabStream0.Dispose();
//if (Globals.streamID != -1) { this.streamParametersFlow0.Controls.Clear(); }
try
{
TabPage[] tabStream = new TabPage[Globals.limitPCAP.Keys.Count];
TabPage[] tabSummary = new TabPage[Globals.limitPCAP.Keys.Count];
int pktCnt = 0;
foreach (int stream in Globals.limitPCAP.Keys)
{
//string[] parametersList = new string[] { Globals.limitPCAP[stream].Keys};
List<string> parametersList = new List<string>(Globals.limitPCAP[stream].Keys);
double[] data = new double[Globals.limitPCAP[stream].Count];
Label[] dataHolders = new Label[data.Length];
Label[] dataLabels = new Label[data.Length];
TableLayoutPanel[] dataColumns = new TableLayoutPanel[data.Length / 30 + 1];
FlowLayoutPanel flow = new FlowLayoutPanel();
flow.FlowDirection = FlowDirection.LeftToRight;
tabStream[pktCnt] = new TabPage();
for (int i = 0; i != data.Length; i++)
{
int whichColumn = i / 30;
dataLabels[i] = new Label();
dataLabels[i].Name = "DataLabel" + i;
dataLabels[i].AutoSize = false;
//dataLabels[i].Text = String.Format("P{0}", i.ToString().PadLeft(3, '0')); // Changed to parameter name as ACLS has XX123 convention
dataLabels[i].Text = String.Format("{0}", parametersList[i].ToString());
dataLabels[i].Font = new Font(dataLabels[i].Font.FontFamily, 8, dataLabels[i].Font.Style);
dataLabels[i].Size = dataLabels[i].PreferredSize;
dataHolders[i] = new Label();
dataHolders[i].Name = i.ToString();
dataHolders[i].AutoSize = false;
dataHolders[i].Text = String.Format("{0}", data[i].ToString().PadLeft(Globals.digitsNumber, '0'));
dataHolders[i].Font = new Font(dataLabels[i].Font.FontFamily, 8, dataLabels[i].Font.Style);
//Globals.dataHolders[i].TextAlign = ContentAlignment.BottomLeft;
dataHolders[i].Size = dataHolders[i].PreferredSize;
if (i % 30 == 0)
{
dataColumns[whichColumn] = new TableLayoutPanel();
dataColumns[whichColumn].ColumnCount = 2;
dataColumns[whichColumn].RowCount = 30;
}
dataColumns[whichColumn].Controls.Add(dataLabels[i]);
dataColumns[whichColumn].Controls.Add(dataHolders[i]);
dataColumns[whichColumn].Size = dataColumns[whichColumn].PreferredSize;
}
for (int i = 0; i != dataColumns.Length; i++)
{
flow.Controls.Add(dataColumns[i]);
}
flow.SuspendLayout();
flow.ResumeLayout(false);
//tabStream[pktCnt].AutoScroll = true;
//tabStream[pktCnt].AutoScrollPosition = new System.Drawing.Point(349, 0);
flow.Size = flow.PreferredSize;
tabStream[pktCnt].Controls.Add(flow);
tabStream[pktCnt].Name = stream.ToString();
tabStream[pktCnt].Text = String.Format("ID={0}", stream);
tabStream[pktCnt].Size = tabStream[pktCnt].PreferredSize;
//create summary tab
tabSummary[pktCnt] = new TabPage(String.Format("ID={0}", stream));
tabSummary[pktCnt].Name = stream.ToString();
tabStream[pktCnt].AutoScroll = true;
Label[] summaryLabel = new Label[8];
Panel sumpanel = new Panel();
for (int i = 0; i != summaryLabel.Length; i++) summaryLabel[i] = new Label();
summaryLabel[0].Text = "Lost Packets";
summaryLabel[1].Text = "Sequence Errors";
summaryLabel[2].Text = "Parameter Errors";
summaryLabel[3].Text = "Frames Received";// +stream.ToString();
summaryLabel[0].Name = "l";
summaryLabel[1].Name = "l";
summaryLabel[2].Name = "l";
summaryLabel[3].Name = "l";
summaryLabel[0].Location = new System.Drawing.Point(6, 3);
summaryLabel[1].Location = new System.Drawing.Point(6, 16);
summaryLabel[2].Location = new System.Drawing.Point(6, 29);
summaryLabel[3].Location = new System.Drawing.Point(6, 42);
//summary dataHolders
summaryLabel[4].Text = "".PadLeft(10, '0');
summaryLabel[5].Text = "".PadLeft(10, '0');
summaryLabel[6].Text = "".PadLeft(10, '0');
summaryLabel[7].Text = "".PadLeft(10, '0');
summaryLabel[4].Name = "Lost Packets";
summaryLabel[5].Name = "Sequence Errors";
summaryLabel[6].Name = "Parameter Errors";
summaryLabel[7].Name = "Frames Received";
summaryLabel[4].Location = new System.Drawing.Point(98, 3);
summaryLabel[5].Location = new System.Drawing.Point(98, 16);
summaryLabel[6].Location = new System.Drawing.Point(98, 29);
summaryLabel[7].Location = new System.Drawing.Point(98, 42);
summaryLabel[4].BackColor = System.Drawing.Color.Red;
summaryLabel[5].BackColor = System.Drawing.Color.Red;
summaryLabel[6].BackColor = System.Drawing.Color.Red;
summaryLabel[7].BackColor = System.Drawing.Color.White;
//.........这里部分代码省略.........