Exemple #1
0
 private void StartSession(List <Guid> scenarioIds)
 {
     try
     {
         _sessionManager.StartSession(scenarioIds);
     }
     catch (Exception ex)
     {
         ApplicationExceptionHandler.UnhandledException(ex);
     }
 }
Exemple #2
0
 private void Show <T>(object sender, EventArgs e) where T : Form, new()
 {
     try
     {
         T form = new T();
         form.Show(this);
     }
     catch (Exception ex)
     {
         ApplicationExceptionHandler.UnhandledException(ex);
     }
 }
Exemple #3
0
 private void StartSession(List <Guid> scenarioIds)
 {
     try
     {
         SessionConfigurationWizard wizard = new SessionConfigurationWizard(scenarioIds);
         _sessionManager.StartSession(wizard, wizard.Ticket);
     }
     catch (Exception ex)
     {
         ApplicationExceptionHandler.UnhandledException(ex);
     }
 }
Exemple #4
0
 private void ShowSessionReports(object sender, EventArgs e)
 {
     try
     {
         var form = new STFReportGenerationForm();
         form.StartPosition = FormStartPosition.CenterParent;
         form.Show((IWin32Window)this);
     }
     catch (Exception ex)
     {
         ApplicationExceptionHandler.UnhandledException(ex);
     }
 }
Exemple #5
0
 private void ShowDialog <T>(object sender, EventArgs e) where T : Form, new()
 {
     try
     {
         using (T form = new T())
         {
             form.ShowDialog(this);
         }
     }
     catch (Exception ex)
     {
         ApplicationExceptionHandler.UnhandledException(ex);
     }
 }
Exemple #6
0
        private void OnLoaded(object sender, EventArgs e)
        {
            Application.Idle -= new EventHandler(OnLoaded);

            try
            {
                if (!ConnectToEnvironment())
                {
                    Application.Exit();
                }
            }
            catch (Exception ex)
            {
                // Inform the user of the error and allow them to send but do not kill the app unless they choose
                // For example, they may instead want to change environment.
                ApplicationExceptionHandler.UnhandledException(ex);
            }
        }
Exemple #7
0
        private void AdminControlPanel_Load(object sender, EventArgs e)
        {
            try
            {
                if (!ConnectToEnvironment())
                {
                    Application.Exit();
                }
            }
            catch (Exception ex)
            {
                // Inform the user of the error and allow them to send but do not kill the app unless they choose
                // For example, they may instead want to change environment.
                ApplicationExceptionHandler.UnhandledException(ex);
            }

            decimal version = 0;

            using (SqlAdapter adapter = new SqlAdapter(EnterpriseTestSqlConnection.ConnectionString))
            {
                try
                {
                    string sqlText = "SELECT value FROM fn_listextendedproperty(N'STF Revision', NULL, NULL, NULL, NULL, NULL, NULL)";
                    var    reader  = adapter.ExecuteReader(sqlText);
                    if (reader != null && reader.Read())
                    {
                        version = decimal.Parse(reader["value"].ToString());
                    }
                }
                catch (Exception)
                {
                }
            }

            if (version != 0)
            {
                versionLabel.Text = "STB v{0:#.##}".FormatWith(version);
            }
            else
            {
                versionLabel.Text = string.Empty;
            }
        }
Exemple #8
0
 private void DispatcherErrorReceived(object sender, ExceptionDetailEventArgs e)
 {
     ApplicationExceptionHandler.UnhandledException(e.Message, e.Detail, UserManager.CurrentUserName);
 }