private void Bootstrapper_BootFailed(object sender, AssociatableEventArgs <StartupFailureReason> e) { string message; switch (e.AssociatedObject) { case StartupFailureReason.DatabaseConnectionError: message = "Connection with the database failed."; break; case StartupFailureReason.SqlConnectionStringRetrivalError: message = "Error retrieving sql connection string"; break; case StartupFailureReason.IncompleteAccountSetup: message = "Account setup is incomplete"; break; case StartupFailureReason.ErrorSettingSqlConnectionString: message = "Error in setting sql connection string"; break; default: throw new ArgumentOutOfRangeException(); } if (e.AssociatedObject == StartupFailureReason.DatabaseConnectionError) { _messengerService.ShowMessageBox("Error", message, MessageBoxButtons.OK, MessageBoxIcon.Error); } _application.Shutdown(); }
private void Bootstrapper_Initialized(object sender, AssociatableEventArgs <IShellVM> e) { _shell = new Shell { DataContext = e.AssociatedObject }; _shell.Show(); AddMappingInIocContainer(); }
private void appStartupManager_Completed(object sender, AssociatableEventArgs <StartupFailureReason> e) { if (e.AssociatedObject == StartupFailureReason.NoError) { _shellVM.StartApplication(); } else { RaiseBootFailedEvent(e.AssociatedObject); } }
private void appStartupManager_Failed(object sender, AssociatableEventArgs <StartupFailureReason> e) { RaiseBootFailedEvent(e.AssociatedObject); }
private void loginManagerVM_UserLoggedIn(object sender, AssociatableEventArgs <IResult <IUser> > e) { StartupMainApplicationCource(e.AssociatedObject.Value); }