Implementing ProcessBuilder
This commit is contained in:
@@ -43,8 +43,18 @@ namespace Password_Manager
|
||||
Close();
|
||||
}
|
||||
|
||||
private void CopyAndNotify(string line)
|
||||
{
|
||||
Clipboard.SetText(line);
|
||||
|
||||
ProcessBuilder.ProcessFailed += (e) => MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
ProcessBuilder.Run("./ToastNotification.exe", $"\"{fileName} decrypted\" \"Password copied to clipboard\"");
|
||||
}
|
||||
|
||||
private void Decrypt(object sender, EventArgs e)
|
||||
{
|
||||
ProcessBuilder.ProcessFailed += (e) => MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
CopyAndNotify(ProcessBuilder.GetOutput("gpg.exe", $"--quiet --decrypt {PathRequest()}\\{ResultList.Text}"));
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user