Inheritance: GoogleCloudExtension.Theming.CommonDialogWindowBase
Exemple #1
0
        /// <summary>
        /// Shows the tool window when the menu item is clicked.
        /// </summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event args.</param>
        private void ShowToolWindow(object sender, EventArgs e)
        {
            ExtensionAnalytics.EnsureAnalyticsOptIn();

            ExtensionAnalytics.ReportCommand(CommandName.OpenManageAccountsDialog, CommandInvocationSource.ToolsMenu);

            ManageAccountsWindow.PromptUser();
        }
Exemple #2
0
        public ManageAccountsViewModel(ManageAccountsWindow owner)
        {
            _owner            = owner;
            _userAccountsList = LoadUserCredentialsViewModel();

            CurrentAccountName = CredentialsStore.Default.CurrentAccount?.AccountName;

            SetAsCurrentAccountCommand = new WeakCommand(OnSetAsCurrentAccountCommand, canExecuteCommand: false);
            DeleteAccountCommand       = new WeakCommand(OnDeleteAccountCommand);
            CloseCommand      = new WeakCommand(owner.Close);
            AddAccountCommand = new WeakCommand(OnAddAccountCommand);
        }
        public ManageAccountsViewModel(ManageAccountsWindow owner)
        {
            _owner = owner;
            _userAccountsList = LoadUserCredentialsViewModel();

            CurrentAccountName = CredentialsStore.Default.CurrentAccount?.AccountName;

            SetAsCurrentAccountCommand = new ProtectedCommand(OnSetAsCurrentAccountCommand, canExecuteCommand: false);
            DeleteAccountCommand = new ProtectedCommand(OnDeleteAccountCommand);
            CloseCommand = new ProtectedCommand(owner.Close);
            AddAccountCommand = new ProtectedCommand(OnAddAccountCommand);
        }
        public static void PromptUser()
        {
            var dialog = new ManageAccountsWindow();

            dialog.ShowModal();
        }
 public static void PromptUser()
 {
     var dialog = new ManageAccountsWindow();
     dialog.ShowModal();
 }
        /// <summary>
        /// Shows the tool window when the menu item is clicked.
        /// </summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event args.</param>
        private void ShowToolWindow(object sender, EventArgs e)
        {
            EventsReporterWrapper.EnsureAnalyticsOptIn();

            ManageAccountsWindow.PromptUser();
        }