public DecryptCommand(CipherViewModel cipherViewModel, Action action) { this._cipherViewModel = cipherViewModel; this._action = action; this._cipherViewModel.PropertyChanged += (s, e) => { if (CanExecuteChanged != null && e.PropertyName == "Ciphertext") { CanExecuteChanged(this, EventArgs.Empty); } }; }
public EncryptCommand(CipherViewModel cipherViewModel, Action action) { this._cipherViewModel = cipherViewModel; this._action = action; this._cipherViewModel.PropertyChanged += (s, e) => { if (CanExecuteChanged != null && (e.PropertyName == "Plaintext" || e.PropertyName == "Passphrase" || e.PropertyName == "Salt")) { CanExecuteChanged(this, EventArgs.Empty); } }; }