From d1edff1bbd9ba298b9da6cd01853022762db21dd Mon Sep 17 00:00:00 2001 From: Sigmanor Date: Sun, 24 Jan 2016 23:04:24 +0200 Subject: [PATCH] Deleted try-catch --- Crypto Notepad/Form1.cs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Crypto Notepad/Form1.cs b/Crypto Notepad/Form1.cs index 3eb1565..11cce9a 100644 --- a/Crypto Notepad/Form1.cs +++ b/Crypto Notepad/Form1.cs @@ -288,23 +288,14 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) Application.Exit(); } - try + if (res == DialogResult.No) { - if (res == DialogResult.No) - { - Environment.Exit(0); - } - - if (res == DialogResult.Cancel) - { - - e.Cancel = true; - } - + Environment.Exit(0); } - catch - { + if (res == DialogResult.Cancel) + { + e.Cancel = true; } } }