コード例 #1
0
        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;
                        }
                    }
                }));
            }
        }
コード例 #2
0
        private void MenuItemDeleteRegistrationClick(object sender, RoutedEventArgs e)
        {
            this.ShouldExitAppOnClose = false;
            // close the window
            ((NavigationWindow)(this.Parent)).Close();

            RegistrationHelper.DeleteRegistration();
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 void Context_OperationFinished(object sender, EventArgs e)
 {
     SharedContext.Context.OperationFinished -= this.Context_OperationFinished;
     RegistrationHelper.DeleteRegistration();
 }
コード例 #5
0
 private void AppBarButtonDeleteRegistrationClick(object sender, RoutedEventArgs e)
 {
     RegistrationHelper.DeleteRegistration();
 }