private void simpleButtonEdit_Click(object sender, EventArgs e) { if (gridViewDialog.RowCount < 1) return; WaitDialog.Show(ParentForm, "Loading components..."); popupDialog = new PopupDialog(); Padding pads = popupDialog.Padding; pads.Left = 5; popupDialog.StartPosition = FormStartPosition.CenterScreen; popupDialog.Text = "Edit Dialog"; GridView view = gridViewDialog; if (view != null || view.SelectedRowsCount > 0) { var ctscd = view.GetRow(view.GetSelectedRows()[0]) as CTSubCampaignDialogs; ucNewDialog1 = new NewDialog(ctscd); ucNewDialog1.ParentController = this; } ucNewDialog1.Dock = DockStyle.Fill; popupDialog.Controls.Add(ucNewDialog1); popupDialog.ClientSize = new Size(1460, 930); popupDialog.FormClosing += new FormClosingEventHandler(popupDialog_FormClosing); WaitDialog.Close(); popupDialog.ShowDialog(this.ParentForm); }
private void simpleButtonAdd_Click(object sender, EventArgs e) { WaitDialog.Show(ParentForm, "Loading components..."); popupDialog = new PopupDialog(); Padding pads = popupDialog.Padding; pads.Left = 5; popupDialog.StartPosition = FormStartPosition.CenterScreen; popupDialog.Text = "Add Dialog"; ucNewDialog1 = new NewDialog(); ucNewDialog1.ParentController = this; ucNewDialog1.Dock = DockStyle.Fill; popupDialog.Controls.Add(ucNewDialog1); popupDialog.ClientSize = new Size(1460, 930); popupDialog.FormClosing += new FormClosingEventHandler(popupDialog_FormClosing); WaitDialog.Close(); popupDialog.ShowDialog(this.ParentForm); }