private void StartSession(List <Guid> scenarioIds) { try { _sessionManager.StartSession(scenarioIds); } catch (Exception ex) { ApplicationExceptionHandler.UnhandledException(ex); } }
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); } }
private void StartSession(List <Guid> scenarioIds) { try { SessionConfigurationWizard wizard = new SessionConfigurationWizard(scenarioIds); _sessionManager.StartSession(wizard, wizard.Ticket); } catch (Exception ex) { ApplicationExceptionHandler.UnhandledException(ex); } }
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); } }
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); } }
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); } }
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; } }
private void DispatcherErrorReceived(object sender, ExceptionDetailEventArgs e) { ApplicationExceptionHandler.UnhandledException(e.Message, e.Detail, UserManager.CurrentUserName); }