Пример #1
0
        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);
                }
            }
        }
Пример #2
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            processorForm processorForm = new processorForm(null, processorsList);

            processorForm.ShowDialog();
        }