Exemplo n.º 1
0
        private void bw2_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            this.progressBar2.Value = e.ProgressPercentage;
            string reportmsg = e.UserState as String;

            ResultBox2.AppendText(reportmsg + Environment.NewLine);
        }
Exemplo n.º 2
0
        private void Start2_Click(object sender, EventArgs e)
        {
            Start2.Enabled = false;
            totalErrors2   = 0;

            if (bw2.IsBusy != true)
            {
                bw2.RunWorkerAsync();
                ResultBox2.AppendText("Running..." + Environment.NewLine);
            }
        }
Exemplo n.º 3
0
        private void bw2_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                ResultBox2.AppendText("Errors occured. Please see log above." + Environment.NewLine);
                totalErrors1++;
            }
            else
            {
                if (e.Cancelled)
                {
                    ResultBox2.AppendText("Cancelled." + Environment.NewLine);
                    totalErrors1++;
                }
                else
                {
                    WorkResult result = e.Result as WorkResult;
                    ResultBox2.AppendText(result.ToString() + Environment.NewLine);
                    totalErrors2 += result.errors();
                }
            }

            Start2.Enabled = true;
        }