private void tsbtnDatabase_Click(object sender, EventArgs e) { if (DbPanel.IsDisposed) { DbPanel = new DbPanel(); DbPanel.Show(this.dockPanel); tsbtnDatabase.Checked = true; return; } if (tsbtnDatabase.Checked) { DbPanel.Hide(); } else { DbPanel.Show(this.dockPanel); } tsbtnDatabase.Checked = !tsbtnDatabase.Checked; }
private void button1_Click_2(object sender, EventArgs e) { panel2.Hide(); refresh(); DbPanel.Show(); }