Exemplo n.º 1
0
 private void simpleButtonAdd_Click(object sender, EventArgs e)
 {
     WaitDialog.CreateWaitDialog("Loading components...");
     popupDialog = new PopupDialog();
     Padding pads = popupDialog.Padding;
     pads.Left = 5;
     popupDialog.WindowState = FormWindowState.Maximized;
     popupDialog.StartPosition = FormStartPosition.CenterScreen;
     popupDialog.Text = "Add Dialog";
     ucNewDialog1 = new NewDialog();
     ucNewDialog1.Dock = DockStyle.Fill;
     popupDialog.Controls.Add(ucNewDialog1);
     popupDialog.ClientSize = new Size(ucNewDialog1.Width + 10, ucNewDialog1.Height + 10);
     popupDialog.ShowDialog(this.ParentForm);
     WaitDialog.CloseWaitDialog();
 }
Exemplo n.º 2
0
        private void simpleButtonEdit_Click(object sender, EventArgs e)
        {
            WaitDialog.CreateWaitDialog("Loading components...");
            popupDialog = new PopupDialog();
            Padding pads = popupDialog.Padding;
            pads.Left = 5;
            popupDialog.WindowState = FormWindowState.Maximized;
            popupDialog.StartPosition = FormStartPosition.CenterScreen;
            popupDialog.Text = "Edit Question";

            GridView view = gridViewDialog;
            if (view != null || view.SelectedRowsCount > 0) {
                var ctscd = view.GetRow(view.GetSelectedRows()[0]) as CTSubCampaignDialogs;
                ucNewDialog1 = new NewDialog(ctscd);
            }

            ucNewDialog1.Dock = DockStyle.Fill;
            popupDialog.Controls.Add(ucNewDialog1);
            popupDialog.ClientSize = new Size(ucNewDialog1.Width + 10, ucNewDialog1.Height + 10);
            popupDialog.ShowDialog(this.ParentForm);
            popupDialog.FormClosing += new FormClosingEventHandler(popupDialog_FormClosing);
            WaitDialog.CloseWaitDialog();
        }