private void EncryptButton_Click(object sender, RoutedEventArgs e) { if (!ValidateEncryptButton()) { return; } string fileFormatted = ""; for (int i = 0; i < files.Length; i++) { string file = files[i]; if (i >= files.Length - 1) { fileFormatted += file; } else { fileFormatted += file + ","; } } if (!FileEncryptionAndDecryption.Encrypt(fileFormatted, _outputFolderPathForEncryption, passwordTextBox.Text, bgw_encryption)) { MessageBox.Show("Currenlty Decrypting , Wait Till Process Is Finished", "Task Running", MessageBoxButton.OK, MessageBoxImage.Stop); } }
private void DecryptButton_Click(object sender, RoutedEventArgs e) { //Only one file is needed if (!ValidateDecryptButton()) { return; } if (!FileEncryptionAndDecryption.Decrypt(openFileTextBox_Decrypt.Text, _outputFolderPathForDecryption, passwordTextBox_Decrypt.Text, bgw_decryption)) { MessageBox.Show("Currenlty Encrypting , Wait Till Process Is Finished", "Task Running", MessageBoxButton.OK, MessageBoxImage.Stop); } }