Пример #1
0
        private void BtnExport_Click(object sender, EventArgs e)
        {
            if (curForm == null)
            {
                return;
            }

            var table = tables[cbxExportData.SelectedIndex];

            curForm.Data = table;
            curForm.ExportWithColumnName = ExportWithColumnName;
            curForm.StartExport();

            curForm.DoWorkCorrectly = false;
            curForm.CancelWork      = false;

            WaitProgressForm wait = new WaitProgressForm(this, curForm.Export, EndExport)
            {
                WidthDialog = this.Size.Width - 10,
                Maximum     = table.Rows.Count,
                Value       = 0
            };

            wait.CancelWork += new EventHandler(Wait_CancelWork);
            wait.CancelImage = this.CancelImage;
            wait.Message     = "Configuration";
            wait.BeginOperation();
        }
Пример #2
0
        private void btnWaitProgress_Click(object sender, EventArgs e)
        {
            WaitProgressForm wait = new WaitProgressForm(
                this, BeginWaitProgress, EndWaitProgress, true);

            wait.WidthDialog = this.Size.Width - 10;
            wait.Maximum     = 20;
            wait.Value       = 0;
            wait.CancelWork += new EventHandler(CancelWorkWaitProgress);
            wait.BeginOperation();
        }