This class represents a dialog that can be used to choose a set of Windows VM credentials.
Inheritance: GoogleCloudExtension.Theming.CommonDialogWindowBase
Exemple #1
0
        /// <summary>
        /// Opens the dialog and returns the selected credentials if any.
        /// </summary>
        /// <param name="instance">The Windows VM.</param>
        /// <param name="options">The options for the dialog</param>
        /// <returns>The selected credentials, null if cancelled out.</returns>
        public static WindowsInstanceCredentials PromptUser(Instance instance, Options options)
        {
            var dialog = new WindowsCredentialsChooserWindow(instance, options);

            dialog.ShowModal();
            return(dialog.ViewModel.Result);
        }
        public WindowsCredentialsChooserViewModel(
            Instance instance,
            WindowsCredentialsChooserWindow.Options options,
            WindowsCredentialsChooserWindow owner)
        {
            _instance = instance;
            _options  = options;
            _owner    = owner;

            ActionCommand            = new ProtectedCommand(OnActionCommand, canExecuteCommand: false);
            ManageCredentialsCommand = new ProtectedCommand(OnManageCredentialsCommand);

            LoadCredentials();
        }
 /// <summary>
 /// Opens the dialog and returns the selected credentials if any.
 /// </summary>
 /// <param name="instance">The Windows VM.</param>
 /// <param name="options">The options for the dialog</param>
 /// <returns>The selected credentials, null if cancelled out.</returns>
 public static WindowsInstanceCredentials PromptUser(Instance instance, Options options)
 {
     var dialog = new WindowsCredentialsChooserWindow(instance, options);
     dialog.ShowModal();
     return dialog.ViewModel.Result;
 }
        public WindowsCredentialsChooserViewModel(
            Instance instance,
            WindowsCredentialsChooserWindow.Options options,
            WindowsCredentialsChooserWindow owner)
        {
            _instance = instance;
            _options = options;
            _owner = owner;

            ActionCommand = new ProtectedCommand(OnActionCommand, canExecuteCommand: false);
            ManageCredentialsCommand = new ProtectedCommand(OnManageCredentialsCommand);

            LoadCredentials();
        }