public void RecNodeMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { switch (e.ClickedItem.ToString()) { case "Add Chip": FormChipSettings frm_NewChip = new FormChipSettings(this.ProjectRoot); frm_NewChip.parent = this; frm_NewChip.NewChipUpdated += new FormChipSettings.NewChipUpdateHandler(frm_NewChip_NewChipUpdated); if (frm_NewChip.ShowDialog() == DialogResult.OK) { UpdateTreeView(); DisplayStatusMessage("A new chip has been added.", MessageColor.Normal); } break; case "Edit Record Settings": FormRecSettings frm_EditRec = new FormRecSettings(this.ProjectRoot, Records.GetRecordInfo(LastRightClickedNode.Text)); frm_EditRec.NewRecUpdated += new FormRecSettings.NewRecUpdateHandler(frm_EditRec_EditRecUpdated); if (frm_EditRec.ShowDialog() == DialogResult.OK) { LastRightClickedNode.Text = "Record - " + Records.GetLastRecordName(); } break; case "Delete Record": break; } }
public void ChipNodeMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { switch (e.ClickedItem.ToString()) { case "Edit Chip Settings": FormChipSettings frm_EditChip = new FormChipSettings(this.ProjectRoot, Chips.GetChipInfo(LastRightClickedNode.Text)); //frm_EditChip.EditChipUpdated += new FormChipSettings.NewChipUpdateHandler(frm_EditChip_EditChipUpdated); frm_EditChip.NewChipUpdated += new FormChipSettings.NewChipUpdateHandler(frm_EditChip_EditChipUpdated); if (frm_EditChip.ShowDialog() == DialogResult.OK) { LastRightClickedNode.Text = "Chip - " + Chips.GetLastChipName(); } break; case "Delete Chip": break; } }