private void OnButtonEdit_Click(object sender, System.EventArgs e) { int selectedIndex = 0; for (int i = 0; i < _ListViewMaterials.Items.Count; i++) { if (_ListViewMaterials.Items[i].Selected) { selectedIndex = i; break; } } AddOrEditDryingMaterialForm form = new AddOrEditDryingMaterialForm(_DryingMaterialsControl.GetSelectedDryingMaterial(), _NumericFormat); form.ShowDialog(); _ListViewMaterials.Items[selectedIndex].Selected = true; }
private void OnButtonAdd_Click(object sender, System.EventArgs e) { AddOrEditDryingMaterialForm form = new AddOrEditDryingMaterialForm(null, _NumericFormat); form.ShowDialog(); }
private void buttonEdit_Click(object sender, System.EventArgs e) { AddOrEditDryingMaterialForm form = new AddOrEditDryingMaterialForm(this.dryingMaterialsControl.GetSelectedDryingMaterial(), this.numericFormat); form.ShowDialog(); }