public static FormToolbar CreateInstance() { if (instance == null) { instance = new FormToolbar(); } return(instance); }
private void menuView_Toolbar_Click(object sender, EventArgs e) { if (frmToolbar != null) { this.frmToolbar.Show(); } else { this.frmToolbar = FormToolbar.CreateInstance(); this.frmToolbar.Show(this.dockMain, DockState.DockLeft); frmToolbar.FormMain = this;//什么意思? frmToolbar.FormMain = this; } }
private void FormMain_Load(object sender, EventArgs e) { this.frmToolbar = FormToolbar.CreateInstance(); this.frmToolbar.Show(this.dockMain, DockState.DockLeft); frmToolbar.FormMain = this; }