Пример #1
0
        public MainWindow()
        {
            InitializeComponent();

            EncryptionService encryption = new EncryptionService();
            HashingService    hashing    = new HashingService();

            DataContext = new MainViewModel(encryption, hashing);
        }
Пример #2
0
        public MainViewModel(EncryptionService encryptionService, HashingService hashingService)
        {
            encryption            = encryptionService;
            hashing               = hashingService;
            DoubleClickCommand    = new DelegateCommand <string>(DoubleClickExecute);
            EncryptDecryptCommand = new DelegateCommand <string>(EncryptDecryptExecute);
            HashCommand           = new DelegateCommand <string>(HashExecute);

            EncryptDecryptLabel = "Encrypt";
            CurrentFolder       = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
        }