コード例 #1
0
 private void OnFeedback(object sender, SendingReportViaEmailFeedbackEventArgs e)
 {
     try
     {
         Invoke(new SendingReportViaEmailFeedbackEventHandler(Feedback), new object[] { sender, e });
     }
     catch (InvalidOperationException)
     {
     }
 }
コード例 #2
0
        private void Feedback(object sender, SendingReportViaEmailFeedbackEventArgs e)
        {
            switch (e.Step)
            {
            case SendingReportViaEmailStep.PreparingReport:
                if (e.Failed)
                {
                    preparingFeedback.Stop(e.ErrorMessage);
                    retrySending.Visible = true;
                    retrySending.Focus();
                }
                else
                {
                    preparingFeedback.Start();
                }
                break;

            case SendingReportViaEmailStep.Transfering:
                if (e.Failed)
                {
                    waitSendingReport.Visible = false;
                    transferingFeedback.Stop(e.ErrorMessage);
                    retrySending.Visible = true;
                    retrySending.Focus();
                }
                else
                {
                    preparingFeedback.Stop();
                    transferingFeedback.Start();
                    waitSendingReport.Visible = true;
                }
                break;

            case SendingReportViaEmailStep.Finished:
                waitSendingReport.Visible = false;
                transferingFeedback.Stop();
                completedFeedback.Stop();
                ok.Enabled = true;
                ok.Focus();
                cancelSending.Enabled = false;
                break;
            }
        }