本文整理汇总了C#中Panel.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.BringToFront方法的具体用法?C# Panel.BringToFront怎么用?C# Panel.BringToFront使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Panel
的用法示例。
在下文中一共展示了Panel.BringToFront方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DockableControl
public DockableControl()
{
Size = new Size(200, 400);
/*initialize the working area*/
p_WorkingArea = new Panel() {
Location = new Point(0, CaptionHeight),
Size = new Size(
Width,
Height - CaptionHeight),
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom
};
Controls.Add(p_WorkingArea);
p_WorkingArea.BringToFront();
}
示例2: BuildURLTabs
public static TabPage BuildURLTabs(int ID, EventHandler eh)
{
try
{
TabPage TP = new TabPage(Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetAssembly(typeof(URLTabPlugin)).Location).Replace("_", " "));
Panel p = new Panel();
TP.Controls.Add(p);
p.Dock = DockStyle.Fill;
p.BringToFront();
p.Tag = ID;
p.VisibleChanged += new EventHandler(eh);
return TP;
}
catch (Exception e)
{
return null;
}
}
示例3: MainIDE
public MainIDE(Splash splash)
{
BackColor = Color.FromArgb(255, 200, 200, 200);
Icon = Icons.GetIcon("icons.logo", 32);
Text = "OS Development Studio";
//once the form has loaded, send a signal to the
//splash screen to close.
Load += delegate(object sender, EventArgs e) {
splash.Ready();
Focus();
};
//set the minimum size of the window to 75% of the current screen
Size screenSize = Screen.FromPoint(Cursor.Position).WorkingArea.Size;
MinimumSize = new Size(
(int)(screenSize.Width * 0.75),
(int)(screenSize.Height * 0.75));
//create the initial panels
StatusStrip status = new StatusStrip();
p_WorkingArea = new Panel { Dock = DockStyle.Fill };
ToolStrip menu = new ToolStrip {
GripStyle = ToolStripGripStyle.Hidden,
Renderer = new ToolStripProfessionalRenderer() {
RoundedEdges = false
}
};
//add the controls
Controls.Add(menu);
Controls.Add(status);
Controls.Add(p_WorkingArea);
p_WorkingArea.BringToFront();
/*Build the main menu items*/
ToolStripItem fileMenu = menu.Items.Add("File");
fileMenu.Click += delegate(object sender, EventArgs e) {
buildSplitContainer(
null,
new Control() { BackColor = Color.Red },
p_SolutionExplorer);
};
ToolStripItem editMenu = menu.Items.Add("Edit");
ToolStripItem buildMenu = menu.Items.Add("Build");
ToolStripItem helpMenu = menu.Items.Add("Help");
menu.Items.Add(new ToolStripSeparator());
ToolStripItem run = menu.Items.Add(Icons.GetBitmap("tools.run", 16));
run.ToolTipText = "Run";
/*Test code*/
Solution solution = new Solution("./testsolution/solution.ossln");
//initialize the components
p_SolutionExplorer = new SolutionBrowserControl();
p_TextEditor = new TextEditor();
p_SolutionExplorer.AddSolution(solution);
//create the components to seperate the different working area
//components.
buildSplitContainer(null, null, p_SolutionExplorer);
}
示例4: MainIDE
public MainIDE(Splash splash)
{
BackColor = Color.FromArgb(255, 230, 230, 230);
ForeColor = Color.Black;
Icon = Icons.GetIcon("icons.logo", 32);
Text = "OS Development Studio";
//trigger initialization of the text editor core
TextEditor.Initialize();
//once the form has loaded, send a signal to the
//splash screen to close.
Load += delegate(object sender, EventArgs e) {
splash.Ready();
Focus();
};
//load the size and location of the window the last time the application
//was running.
if (RuntimeState.ObjectExists("mainIDE.windowRect")) {
RuntimeState.RECTANGLE rect = (RuntimeState.RECTANGLE)RuntimeState.GetObject(
"mainIDE.windowRect",
typeof(RuntimeState.RECTANGLE));
//StartPosition = FormStartPosition.Manual;
Location = new Point(rect.X, rect.Y);
Size = new Size(rect.Width, rect.Height);
//restore the window state
if (RuntimeState.ObjectExists("mainIDE.windowState")) {
WindowState = (FormWindowState)(byte)RuntimeState.GetObject(
"mainIDE.windowState",
typeof(byte));
}
}
else {
//set the initial size of the window to 75% of the current screen
Size screenSize = Screen.FromPoint(Cursor.Position).WorkingArea.Size;
Size = new Size(
(int)(screenSize.Width * 0.75),
(int)(screenSize.Height * 0.75));
StartPosition = FormStartPosition.CenterScreen;
}
#region Create the initial panels
p_StatusStrip = new StatusStrip { BackColor = BackColor };
p_WorkingArea = new Panel { Dock = DockStyle.Fill };
ToolStrip menu = new ToolStrip {
GripStyle = ToolStripGripStyle.Hidden,
Renderer = new toolStripRenderer(),
BackColor = BackColor,
ForeColor = ForeColor
};
p_Menu = menu;
Controls.Add(menu);
Controls.Add(p_StatusStrip);
Controls.Add(p_WorkingArea);
p_WorkingArea.BringToFront();
#endregion
#region Menu
/*Build the main menu items*/
menu.Items.Add(new ToolStripMenuItem("File", null, getFileMenuItems()));
menu.Items.Add(new ToolStripMenuItem("Edit", null, getEditMenuItems()));
menu.Items.Add(new ToolStripMenuItem("Build", null, getBuildMenuItems()));
menu.Items.Add(new ToolStripMenuItem("Tools", null, getToolsMenuItems()));
menu.Items.Add(new ToolStripMenuItem("Help", null, getHelpMenuItems()));
/*Build shortcuts*/
menu.Items.Add(new ToolStripSeparator());
p_MenuStripRunButton = menu.Items.Add(null, Icons.GetBitmap("tools.run", 16), menu_build_run);
menu.Items.Add(null, Icons.GetBitmap("tools.stop", 16), menu_build_stop);
menu.Items.Add(new ToolStripSeparator());
menu.Items.Add(null, Icons.GetBitmap("tools.build", 16), menu_build_build);
#endregion
//initialize the components
initializeComponentSkeleton();
initializeSolutionBrowser();
initializeFileEditor();
initializeOutputWindow();
initializeStatusStrip();
//create a UI update timer
Timer updTimer = new Timer() {
Interval = 30,
Enabled = true
};
updTimer.Tick += uiUpdate;
//clean up
p_WorkingArea.BringToFront();
p_SaveStateEnabled = true;
}