| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Windows;
 
- using System.Windows.Controls;
 
- using System.Windows.Data;
 
- using System.Windows.Documents;
 
- using System.Windows.Input;
 
- using System.Windows.Media;
 
- using System.Windows.Media.Imaging;
 
- using System.Windows.Shapes;
 
- namespace InABox.Wpf.Editors
 
- {
 
-     /// <summary>
 
-     /// Interaction logic for PasswordDialog.xaml
 
-     /// </summary>
 
-     public partial class PasswordDialog : ThemableWindow
 
-     {
 
-         public PasswordDialog(string caption, string password = "")
 
-         {
 
-             InitializeComponent();
 
-             Title = caption;
 
-             PasswordEditor.Password = password;
 
-         }
 
-         public string Password
 
-         {
 
-             get => PasswordEditor.Password;
 
-             set => PasswordEditor.Password = value;
 
-         }
 
-         private void OK_Click(object sender, RoutedEventArgs e)
 
-         {
 
-             DialogResult = true;
 
-             Close();
 
-         }
 
-         private void Cancel_Click(object sender, RoutedEventArgs e)
 
-         {
 
-             DialogResult = false;
 
-             Close();
 
-         }
 
-         public static bool Execute(string caption, ref string password)
 
-         {
 
-             var editor = new PasswordDialog(caption, password);
 
-             if (editor.ShowDialog() == true)
 
-             {
 
-                 password = editor.Password;
 
-                 return true;
 
-             }
 
-             return false;
 
-         }
 
-     }
 
- }
 
 
  |