📄 mainform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Xml;
using System.Runtime.Serialization;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace bs
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem helptopic;
private System.Windows.Forms.MenuItem miFile;
private System.Windows.Forms.MenuItem miNew;
private System.Windows.Forms.MenuItem miOpen;
private System.Windows.Forms.MenuItem miExit;
private System.Windows.Forms.MenuItem miView;
private System.Windows.Forms.MenuItem miToolBar;
private System.Windows.Forms.MenuItem miStatusBar;
private System.Windows.Forms.MenuItem miHelpTopic;
private System.Windows.Forms.MenuItem miAbout;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.StatusBar statusBar1;
private int windowCount = 0;
private ToolStrip toolStrip1;
private ToolStripButton toolStripButton1;
private ToolStripButton toolStripButton2;
private ToolStripButton toolStripButton3;
private ToolStripButton toolStripButton4;
private MenuItem misave;
private StatusBarPanel statusBarPanel1;
public Doc currentdoc;
public MainForm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
// this.miView.MergeMenu(Doc.contextMenu1);
this.Menu=this.mainMenu1;
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
this.miFile = new System.Windows.Forms.MenuItem();
this.miNew = new System.Windows.Forms.MenuItem();
this.miOpen = new System.Windows.Forms.MenuItem();
this.miExit = new System.Windows.Forms.MenuItem();
this.misave = new System.Windows.Forms.MenuItem();
this.miView = new System.Windows.Forms.MenuItem();
this.miToolBar = new System.Windows.Forms.MenuItem();
this.miStatusBar = new System.Windows.Forms.MenuItem();
this.miHelpTopic = new System.Windows.Forms.MenuItem();
this.helptopic = new System.Windows.Forms.MenuItem();
this.miAbout = new System.Windows.Forms.MenuItem();
this.statusBar1 = new System.Windows.Forms.StatusBar();
this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.miFile,
this.miView,
this.miHelpTopic});
//
// miFile
//
this.miFile.Index = 0;
this.miFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.miNew,
this.miOpen,
this.miExit,
this.misave});
this.miFile.MergeOrder = 90;
this.miFile.Text = "&File";
//
// miNew
//
this.miNew.Index = 0;
this.miNew.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
this.miNew.Text = "&New";
this.miNew.Click += new System.EventHandler(this.miNew_Click);
//
// miOpen
//
this.miOpen.Index = 1;
this.miOpen.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
this.miOpen.Text = "&Open";
this.miOpen.Click += new System.EventHandler(this.miOpen_Click);
//
// miExit
//
this.miExit.Index = 2;
this.miExit.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
this.miExit.Text = "E&xit";
this.miExit.Click += new System.EventHandler(this.miExit_Click);
//
// misave
//
this.misave.Index = 3;
this.misave.Text = "&Save";
this.misave.Click += new System.EventHandler(this.misave_Click);
//
// miView
//
this.miView.Index = 1;
this.miView.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.miToolBar,
this.miStatusBar});
this.miView.MergeOrder = 110;
this.miView.Text = "&View";
//
// miToolBar
//
this.miToolBar.Checked = true;
this.miToolBar.Index = 0;
this.miToolBar.Shortcut = System.Windows.Forms.Shortcut.CtrlT;
this.miToolBar.Text = "&Tool Bar";
this.miToolBar.Click += new System.EventHandler(this.miToolBar_Click);
//
// miStatusBar
//
this.miStatusBar.Checked = true;
this.miStatusBar.Index = 1;
this.miStatusBar.Text = "&Status Bar";
this.miStatusBar.Click += new System.EventHandler(this.miStatusBar_Click);
//
// miHelpTopic
//
this.miHelpTopic.Index = 2;
this.miHelpTopic.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.helptopic,
this.miAbout});
this.miHelpTopic.MergeOrder = 130;
this.miHelpTopic.Text = "&Help";
//
// helptopic
//
this.helptopic.Index = 0;
this.helptopic.Text = "&Help Topic";
this.helptopic.Click += new System.EventHandler(this.helptopic_Click);
//
// miAbout
//
this.miAbout.Index = 1;
this.miAbout.Text = "&About";
this.miAbout.Click += new System.EventHandler(this.miAbout_Click);
//
// statusBar1
//
this.statusBar1.Location = new System.Drawing.Point(0, 311);
this.statusBar1.Name = "statusBar1";
this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
this.statusBarPanel1});
this.statusBar1.Size = new System.Drawing.Size(480, 22);
this.statusBar1.TabIndex = 3;
//
// statusBarPanel1
//
this.statusBarPanel1.Name = "statusBarPanel1";
this.statusBarPanel1.Text = "statusBarPanel1";
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.toolStripButton2,
this.toolStripButton3,
this.toolStripButton4});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(480, 25);
this.toolStrip1.TabIndex = 5;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "新建文档";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// toolStripButton2
//
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(23, 22);
this.toolStripButton2.Text = "打开xml文档";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
//
// toolStripButton3
//
this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton3.Name = "toolStripButton3";
this.toolStripButton3.Size = new System.Drawing.Size(23, 22);
this.toolStripButton3.Text = "保存文档";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click);
//
// toolStripButton4
//
this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image")));
this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton4.Name = "toolStripButton4";
this.toolStripButton4.Size = new System.Drawing.Size(23, 22);
this.toolStripButton4.Text = "帮助";
this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click);
//
// MainForm
//
this.AllowDrop = true;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(480, 333);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.statusBar1);
this.IsMdiContainer = true;
this.Menu = this.mainMenu1;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "贝叶斯网络学习";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.MdiChildActivate += new System.EventHandler(this.MainForm_MdiChildActivate);
this.Load += new System.EventHandler(this.MainForm_Load);
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
this.toolStrip1.ResumeLayout(false);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -