private void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args) { if (Globals.LogonCore == null) { return; } Frame rootFrame = Window.Current.Content as Frame; if (Globals.LogonCore.State.IsRegistered && Globals.LogonCore.State.HasSecureStore) { args.Request.ApplicationCommands.Add( new SettingsCommand( "delreg", "Delete Registration", (handler) => { if (Globals.LogonCore != null) { if (SharedContext.Context.CanEditItems) { RegistrationHelper.DeleteRegistration(); } else { SharedContext.Context.OperationFinished += this.Context_OperationFinished; } } })); } }
private void MenuItemDeleteRegistrationClick(object sender, RoutedEventArgs e) { this.ShouldExitAppOnClose = false; // close the window ((NavigationWindow)(this.Parent)).Close(); RegistrationHelper.DeleteRegistration(); }
private void MenuItemDeleteRegistrationClick(object sender, RoutedEventArgs e) { LoggingContext.Context.Logger.LogInfo("E2ETracing - Deleting registration"); this.ShouldExitAppOnClose = false; DeleteRegistrationWindowClose = true; // close the window ((NavigationWindow)(this.Parent)).Close(); RegistrationHelper.DeleteRegistration(); }
void Context_OperationFinished(object sender, EventArgs e) { SharedContext.Context.OperationFinished -= this.Context_OperationFinished; RegistrationHelper.DeleteRegistration(); }
private void AppBarButtonDeleteRegistrationClick(object sender, RoutedEventArgs e) { RegistrationHelper.DeleteRegistration(); }