private void editListItem() { if (processorsListView.SelectedItems.Count == 1) { Processor processor = (Processor)processorsListView.SelectedItems[0].Tag; processorForm processorForm = new processorForm(processor, processorsList); if (processorForm.ShowDialog() == DialogResult.OK) { processor.Name = processorForm.ProcessorName; processor.Cores = processorForm.ProcessorCores; processor.TDP = processorForm.ProcessorTDP; processorsList.UpdateProcessor(processor); } } }
private void addToolStripMenuItem_Click(object sender, EventArgs e) { processorForm processorForm = new processorForm(null, processorsList); processorForm.ShowDialog(); }