Exemple #1
0
        void btnSend_Click(object sender, EventArgs e)
        {
            try {
                if (Model == null)
                {
                    return;
                }

                Model.Comments = txtComments.Text;

                BackgroundSendModel sendModel = BackgroundSendModelAccessor.SendReportInBackgroundThread(Model.SendReport);

                ReportSendProgressForm progressForm = new ReportSendProgressForm(sendModel);
                DialogResult           result       = progressForm.ShowDialog(this);
                if (result == DialogResult.OK)
                {
                    this.DialogResult = DialogResult.OK;
                }
                else if (result == DialogResult.Retry)
                {
                    MessageBox.Show(this, "Unable to send, please try again", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch {
            }
        }
Exemple #2
0
        void OnSendClick(object sender, RoutedEventArgs e)
        {
            try {
                if (Model == null)
                {
                    return;
                }

                Model.Comments = txtComments.Text;
                BackgroundSendModel sendModel = BackgroundSendModelAccessor.SendReportInBackgroundThread(Model.SendReport);

                ReportSendProgressForm progressForm = new ReportSendProgressForm(sendModel);
                progressForm.Owner = this;
                progressForm.ShowDialog();
                ReportSendProgressDialogResult result = progressForm.Result;
                if (result == ReportSendProgressDialogResult.OK)
                {
                    this.DialogResult = true;
                }
                else if (result == ReportSendProgressDialogResult.Retry)
                {
                    MessageBox.Show(this, "Unable to send, please try again", this.Title, MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }
            catch {
            }
        }