private void OnSaveCommand()
        {
            if (!Validate())
            {
                return;
            }

            if (ManualPassword)
            {
                Debug.WriteLine("The user is supplying the password.");
                Result = new AddWindowsCredentialResult(UserName, Password);
            }
            else
            {
                Debug.WriteLine("The user is requesting the password to be generated.");
                Result = new AddWindowsCredentialResult(UserName);
            }

            _owner.Close();
            return;
        }
        private void OnSaveCommand()
        {
            if (!Validate())
            {
                return;
            }

            if (ManualPassword)
            {
                Debug.WriteLine("The user is supplying the password.");
                Result = new AddWindowsCredentialResult(UserName, Password);
            }
            else
            {
                Debug.WriteLine("The user is requesting the password to be generated.");
                Result = new AddWindowsCredentialResult(UserName);
            }

            _owner.Close();
            return;
        }