mainform.cs
来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 856 行 · 第 1/3 页
CS
856 行
//
// menuItemStatusBar
//
this.menuItemStatusBar.Checked = true;
this.menuItemStatusBar.Index = 7;
this.menuItemStatusBar.Text = "Status B&ar";
this.menuItemStatusBar.Click += new System.EventHandler(this.menuItemStatusBar_Click);
//
// menuItem2
//
this.menuItem2.Index = 8;
this.menuItem2.Text = "-";
//
// menuItemLayoutByCode
//
this.menuItemLayoutByCode.Index = 9;
this.menuItemLayoutByCode.Text = "Layout By &Code";
this.menuItemLayoutByCode.Click += new System.EventHandler(this.menuItemLayoutByCode_Click);
//
// menuItemLayoutByXml
//
this.menuItemLayoutByXml.Index = 10;
this.menuItemLayoutByXml.Text = "Layout By &XML";
this.menuItemLayoutByXml.Click += new System.EventHandler(this.menuItemLayoutByXml_Click);
//
// menuItemTools
//
this.menuItemTools.Index = 2;
this.menuItemTools.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemLockLayout,
this.menuItem3,
this.menuItemSchemaDefault,
this.menuItemSchemaOverride,
this.menuItemSchemaFromBase,
this.menuItem5,
this.menuItemOptions});
this.menuItemTools.MergeOrder = 2;
this.menuItemTools.Text = "&Tools";
this.menuItemTools.Popup += new System.EventHandler(this.menuItemTools_Popup);
//
// menuItemLockLayout
//
this.menuItemLockLayout.Index = 0;
this.menuItemLockLayout.Text = "&Lock Layout";
this.menuItemLockLayout.Click += new System.EventHandler(this.menuItemLockLayout_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "-";
//
// menuItemSchemaDefault
//
this.menuItemSchemaDefault.Checked = true;
this.menuItemSchemaDefault.Index = 2;
this.menuItemSchemaDefault.Text = "Schema: &Default";
this.menuItemSchemaDefault.Click += new System.EventHandler(this.SetSchema);
//
// menuItemSchemaOverride
//
this.menuItemSchemaOverride.Index = 3;
this.menuItemSchemaOverride.Text = "Schema: &Override From Default";
this.menuItemSchemaOverride.Click += new System.EventHandler(this.SetSchema);
//
// menuItemSchemaFromBase
//
this.menuItemSchemaFromBase.Index = 4;
this.menuItemSchemaFromBase.Text = "Schema: &Built From Base";
this.menuItemSchemaFromBase.Click += new System.EventHandler(this.SetSchema);
//
// menuItem5
//
this.menuItem5.Index = 5;
this.menuItem5.Text = "-";
//
// menuItemOptions
//
this.menuItemOptions.Index = 6;
this.menuItemOptions.Text = "&Options...";
this.menuItemOptions.Click += new System.EventHandler(this.menuItemOptions_Click);
//
// menuItemWindow
//
this.menuItemWindow.Index = 3;
this.menuItemWindow.MdiList = true;
this.menuItemWindow.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemNewWindow});
this.menuItemWindow.MergeOrder = 2;
this.menuItemWindow.Text = "&Window";
//
// menuItemNewWindow
//
this.menuItemNewWindow.Index = 0;
this.menuItemNewWindow.Text = "&New Window";
this.menuItemNewWindow.Click += new System.EventHandler(this.menuItemNewWindow_Click);
//
// menuItemHelp
//
this.menuItemHelp.Index = 4;
this.menuItemHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemAbout});
this.menuItemHelp.MergeOrder = 3;
this.menuItemHelp.Text = "&Help";
//
// menuItemAbout
//
this.menuItemAbout.Index = 0;
this.menuItemAbout.Text = "&About DockSample...";
this.menuItemAbout.Click += new System.EventHandler(this.menuItemAbout_Click);
//
// dockPanel
//
this.dockPanel.ActiveAutoHideContent = null;
this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.dockPanel.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((System.Byte)(0)));
this.dockPanel.Location = new System.Drawing.Point(0, 28);
this.dockPanel.Name = "dockPanel";
this.dockPanel.Size = new System.Drawing.Size(579, 359);
this.dockPanel.TabIndex = 0;
//
// statusBar
//
this.statusBar.Location = new System.Drawing.Point(0, 387);
this.statusBar.Name = "statusBar";
this.statusBar.ShowPanels = true;
this.statusBar.Size = new System.Drawing.Size(579, 22);
this.statusBar.TabIndex = 4;
//
// imageList
//
this.imageList.ImageSize = new System.Drawing.Size(16, 16);
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
//
// toolBar
//
this.toolBar.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButtonNew,
this.toolBarButtonOpen,
this.toolBarButtonSeparator1,
this.toolBarButtonSolutionExplorer,
this.toolBarButtonPropertyWindow,
this.toolBarButtonToolbox,
this.toolBarButtonOutputWindow,
this.toolBarButtonTaskList,
this.toolBarButtonSeparator2,
this.toolBarButtonLayoutByCode,
this.toolBarButtonLayoutByXml});
this.toolBar.DropDownArrows = true;
this.toolBar.ImageList = this.imageList;
this.toolBar.Location = new System.Drawing.Point(0, 0);
this.toolBar.Name = "toolBar";
this.toolBar.ShowToolTips = true;
this.toolBar.Size = new System.Drawing.Size(579, 28);
this.toolBar.TabIndex = 6;
this.toolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
//
// toolBarButtonNew
//
this.toolBarButtonNew.ImageIndex = 0;
this.toolBarButtonNew.ToolTipText = "Show Layout From XML";
//
// toolBarButtonOpen
//
this.toolBarButtonOpen.ImageIndex = 1;
this.toolBarButtonOpen.ToolTipText = "Open";
//
// toolBarButtonSeparator1
//
this.toolBarButtonSeparator1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// toolBarButtonSolutionExplorer
//
this.toolBarButtonSolutionExplorer.ImageIndex = 2;
this.toolBarButtonSolutionExplorer.ToolTipText = "Solution Explorer";
//
// toolBarButtonPropertyWindow
//
this.toolBarButtonPropertyWindow.ImageIndex = 3;
this.toolBarButtonPropertyWindow.ToolTipText = "Property Window";
//
// toolBarButtonToolbox
//
this.toolBarButtonToolbox.ImageIndex = 4;
this.toolBarButtonToolbox.ToolTipText = "Tool Box";
//
// toolBarButtonOutputWindow
//
this.toolBarButtonOutputWindow.ImageIndex = 5;
this.toolBarButtonOutputWindow.ToolTipText = "Output Window";
//
// toolBarButtonTaskList
//
this.toolBarButtonTaskList.ImageIndex = 6;
this.toolBarButtonTaskList.ToolTipText = "Task List";
//
// toolBarButtonSeparator2
//
this.toolBarButtonSeparator2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// toolBarButtonLayoutByCode
//
this.toolBarButtonLayoutByCode.ImageIndex = 7;
this.toolBarButtonLayoutByCode.ToolTipText = "Show Layout By Code";
//
// toolBarButtonLayoutByXml
//
this.toolBarButtonLayoutByXml.ImageIndex = 8;
//
// MainForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(579, 409);
this.Controls.Add(this.dockPanel);
this.Controls.Add(this.toolBar);
this.Controls.Add(this.statusBar);
this.IsMdiContainer = true;
this.Menu = this.mainMenu;
this.Name = "MainForm";
this.Text = "DockSample";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Closing += new System.ComponentModel.CancelEventHandler(this.MainForm_Closing);
this.Load += new System.EventHandler(this.MainForm_Load);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new MainForm());
}
private void menuItemExit_Click(object sender, System.EventArgs e)
{
Close();
Application.Exit();
}
private void menuItemSolutionExplorer_Click(object sender, System.EventArgs e)
{
m_solutionExplorer.Show(dockPanel);
}
private void menuItemPropertyWindow_Click(object sender, System.EventArgs e)
{
m_propertyWindow.Show(dockPanel);
}
private void menuItemToolbox_Click(object sender, System.EventArgs e)
{
m_toolbox.Show(dockPanel);
}
private void menuItemOutputWindow_Click(object sender, System.EventArgs e)
{
m_outputWindow.Show(dockPanel);
}
private void menuItemTaskList_Click(object sender, System.EventArgs e)
{
m_taskList.Show(dockPanel);
}
private void menuItemAbout_Click(object sender, System.EventArgs e)
{
AboutDialog aboutDialog = new AboutDialog();
aboutDialog.ShowDialog(this);
}
private DockContent FindDocument(string text)
{
DockContent[] documents = dockPanel.Documents;
foreach (DockContent content in documents)
if (content.Text == text)
return content;
return null;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?