private void listToolStripMenuItem_Click(object sender, EventArgs e) { if (!isListFormShown) { ListForm listform = new ListForm(this, StoredObjects); //regise custom events of List form listform.CloseForm += Listform_CloseForm; listform.Show(); //disable btnOpenListForm btnOpenListForm.Enabled = false; isListFormShown = true; } }
private void btnOpenListForm_Click(object sender, EventArgs e) { if (!isListFormShown) { ListForm listform = new ListForm(this, StoredObjects); //regise custom events of List form listform.CloseForm += Listform_CloseForm; listform.ClearData += Listform_ClearData; listform.ListViewDoubleClick += Listform_ListViewDoubleClick; listform.Show(); //disable btnOpenListForm btnOpenListForm.Enabled = false; isListFormShown = true; } }