private void fMain_Load(object sender, EventArgs e) { gvProcessor.AutoGenerateColumns = false; DataGridViewColumn column = new DataGridViewTextBoxColumn(); column.DataPropertyName = "Name"; column.Name = "Модель"; gvProcessor.Columns.Add(column); column = new DataGridViewTextBoxColumn(); column.DataPropertyName = "Country"; column.Name = "Країна"; gvProcessor.Columns.Add(column); column = new DataGridViewTextBoxColumn(); column.DataPropertyName = "kernel"; column.Name = "Ядро"; gvProcessor.Columns.Add(column); column = new DataGridViewTextBoxColumn(); column.DataPropertyName = "VidCard"; column.Name = "Відеокарта"; gvProcessor.Columns.Add(column); column = new DataGridViewTextBoxColumn(); column.DataPropertyName = "TypeMemory"; column.Name = "Тип пам'яті"; gvProcessor.Columns.Add(column); column = new DataGridViewCheckBoxColumn(); column.DataPropertyName = "Potoki"; column.Name = "Потоки"; gvProcessor.Columns.Add(column); EventArgs args = new EventArgs(); OnResize(args); ProcessorClass processor = new ProcessorClass(); }
private void btnEdit_Click(object sender, EventArgs e) { ProcessorClass processor = (ProcessorClass)bindSrcProcessor.List[bindSrcProcessor.Position]; Form2 form2 = new Form2(); if (form2.ShowDialog() == DialogResult.OK) { bindSrcProcessor.List[bindSrcProcessor.Position] = processor; } }
private void btnAdd_Click(object sender, EventArgs e) { ProcessorClass processor = new ProcessorClass(); Form2 form2 = new Form2(); if (form2.ShowDialog() == DialogResult.OK) { bindSrcProcessor.Add(processor); } }