public AddWindowsCredentialViewModel(AddWindowsCredentialWindow owner, Instance instance) { _owner = owner; _instance = instance; SaveCommand = new ProtectedCommand(OnSaveCommand); }
/// <summary> /// Prompt the user for the Windows credentials to use, returns the result of the operation. /// </summary> /// <param name="instance">The instance for which the credentials are added.</param> /// <returns>An instance of <seealso cref="AddWindowsCredentialResult"/> if the user accepeted, null if canceled.</returns> public static AddWindowsCredentialResult PromptUser(Instance instance) { var dialog = new AddWindowsCredentialWindow(instance); dialog.ShowModal(); return(dialog.ViewModel.Result); }
/// <summary> /// Prompt the user for the Windows credentials to use, returns the result of the operation. /// </summary> /// <param name="instance">The instance for which the credentials are added.</param> /// <returns>An instance of <seealso cref="AddWindowsCredentialResult"/> if the user accepeted, null if canceled.</returns> public static AddWindowsCredentialResult PromptUser(Instance instance) { var dialog = new AddWindowsCredentialWindow(instance); dialog.ShowModal(); return dialog.ViewModel.Result; }