public MainWindow() { InitializeComponent(); EncryptionService encryption = new EncryptionService(); HashingService hashing = new HashingService(); DataContext = new MainViewModel(encryption, hashing); }
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); }