public void BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Cancelled)
            {
                MessageBox.Show(String.Format("Processing was cancelled prior to completion"));
            }
            else
            {
                if (e.Result is Exception)
                {
                    var ex = e.Result as Exception;

                    ErrorHelper.WriteExceptionTraceInformation(ex);

                    MessageBox.Show(
                        String.Format("The following exception has occurred:{0}{0}{1}", Environment.NewLine, ex.Message),
                        Application.Current.MainWindow.Tag.ToString(), MessageBoxButton.OK, MessageBoxImage.Error);
                }
                else
                {
                    m_analysisJobViewModel.Database = e.Result as TargetDatabase;
                }

                HostProcessWindow.DialogResult = !(e.Result is Exception);
            }
            HostProcessWindow.Close();
        }
Exemplo n.º 2
0
        public void BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            HostProcessWindow.Close();

            if (e.Result == null)
            {
                MessageBox.Show(String.Format("The MTDB has been created successfully.{0}{0}Path:{0}{0}{1}", Environment.NewLine, DatabaseFileName), Application.Current.MainWindow.Tag.ToString(), MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }