Removed code that is now handled separately by ProcessBuilder

This commit is contained in:
2023-03-29 14:38:29 +02:00
parent 13123b2103
commit dfd8c1d462
2 changed files with 0 additions and 59 deletions

View File

@@ -1,5 +1,3 @@
using System.Diagnostics;
namespace Password_Manager
{
sealed public partial class MainForm : Form
@@ -47,34 +45,6 @@ namespace Password_Manager
private void Decrypt(object sender, EventArgs e)
{
string fileName = ResultList.Text;
try
{
Process proc = new Process()
{
StartInfo = new ProcessStartInfo
{
FileName = "gpg.exe",
Arguments = $"--quiet --decrypt {PathRequest()}\\{fileName}",
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
}
};
proc.Start();
while (!proc.StandardOutput.EndOfStream)
{
string line = proc.StandardOutput.ReadLine();
Clipboard.SetText(line);
Process.Start("./ToastNotification.exe", $"\"{fileName} decrypted\" \"Password copied to clipboard\"");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
Close();
}
}