From c14f525569a1c06cf5fea7b0f2fd9ef1c2a32678 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 15 Oct 2019 20:18:04 +0300 Subject: [PATCH] Now when click "Cancel" in the "Enter Key" window, app will close. --- Crypto Notepad/MainForm.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index a2dc46c..bb327bc 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -122,8 +122,15 @@ private void OpenAsotiations() { OpenAsotiations(); } + if (dialogResult == DialogResult.Cancel) + { + if (!Visible) + { + Application.Exit(); } } + } + } else { string opnfile = File.ReadAllText(args[1]); @@ -164,8 +171,15 @@ private void SendTo() { SendTo(); } + if (dialogResult == DialogResult.Cancel) + { + if (!Visible) + { + Application.Exit(); } } + } + } else { string opnfile = File.ReadAllText(argsPath);