protected override void RadGridView1_DoubleClick(object sender, EventArgs e) { if (SelectedItem == null) { return; } if (SelectedItem.ProductType == ProductType.ComponentModel) { var editForm = new ModelForm(SelectedItem as ComponentModel); if (editForm.ShowDialog() == DialogResult.OK) { var subs = GetListViewSubItems(SelectedItem); for (int i = 0; i < subs.Count; i++) { radGridView1.SelectedRows[0].Cells[i].Value = subs[i].Text; } } } else { var editForm = new ProductForm(SelectedItem); if (editForm.ShowDialog() == DialogResult.OK) { var subs = GetListViewSubItems(SelectedItem); for (int i = 0; i < subs.Count; i++) { radGridView1.SelectedRows[0].Cells[i].Value = subs[i].Text; } } } }
public void Preview() { using (ModelForm form = new ModelForm()) { form.ShowDialog((MDL0Node)_resource); } }
private void Button2_Click(object sender, EventArgs e) { var form = new ModelForm(new ComponentModel()); if (form.ShowDialog() == DialogResult.OK) { if (textBoxPartNumber.Text != "") { metroProgressSpinner1.Visible = true; Task.Run(() => DoWork()) .ContinueWith(task => Complete(), TaskScheduler.FromCurrentSynchronizationContext()); } } }
public void Preview() { using (ModelForm form = new ModelForm()) form.ShowDialog(_owner, (MDL0Node)_resource); }