private void txDoorGroups_Click(object sender, EventArgs e) { if (doorGroupForm == null || doorGroupForm.IsDisposed) { doorGroupForm = new NewDoorGroupForm(objects); doorGroupForm.MdiParent = this; doorGroupForm.Text = "Door Groups"; doorGroupForm.Show(); } else { doorGroupForm.Focus(); } }
private void treeViewSummary_AfterSelect(object sender, TreeViewEventArgs e) { if (treelaoded) { if (e.Node.Tag.Equals("rings")) { if (keyRingForm == null || keyRingForm.IsDisposed) { keyRingForm = new NewKeyringForm(objects); keyRingForm.MdiParent = this; keyRingForm.Text = "Key Rings"; keyRingForm.Show(); } else { keyRingForm.Focus(); } } if (e.Node.Tag.Equals("groups")) { if (doorGroupForm == null || doorGroupForm.IsDisposed) { doorGroupForm = new NewDoorGroupForm(objects); doorGroupForm.MdiParent = this; doorGroupForm.Text = "Door Groups"; doorGroupForm.Show(); } else { doorGroupForm.Focus(); } } if (e.Node.Tag.Equals("people")) { if (personnelForm == null || personnelForm.IsDisposed) { personnelForm = new NewPersonnelForm(objects); personnelForm.MdiParent = this; personnelForm.Text = "Personnel"; personnelForm.Show(); } else { personnelForm.Focus(); } } } else { treelaoded = true; } }