From c77e6b8616ef1ae263d71b5f3edabd27a1c5a116 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Oct 2025 18:22:19 +0000 Subject: [PATCH 1/2] Initial plan From 8b22c7812d58fb6299949434d935e592b1c2611f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Oct 2025 18:27:54 +0000 Subject: [PATCH 2/2] Fix: Set ConfirmCloseConnection to Never instead of decrementing When user checks "Do not show this dialog again" while closing a connection, the ConfirmCloseConnection setting should be set to Never (1) instead of being decremented. The decrement approach was incorrectly changing All (4) to Multiple (3) instead of Never (1), which didn't match user expectations. Fixed in: - ConnectionTab.cs - ConnectionWindow.cs (2 occurrences) - ConnectionContextMenu.cs - frmMain.cs Co-authored-by: Kvarkas <3611964+Kvarkas@users.noreply.github.com> --- mRemoteNG/UI/Controls/ConnectionContextMenu.cs | 2 +- mRemoteNG/UI/Forms/frmMain.cs | 2 +- mRemoteNG/UI/Tabs/ConnectionTab.cs | 2 +- mRemoteNG/UI/Window/ConnectionWindow.cs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mRemoteNG/UI/Controls/ConnectionContextMenu.cs b/mRemoteNG/UI/Controls/ConnectionContextMenu.cs index a2e5357c..320003a8 100644 --- a/mRemoteNG/UI/Controls/ConnectionContextMenu.cs +++ b/mRemoteNG/UI/Controls/ConnectionContextMenu.cs @@ -810,7 +810,7 @@ namespace mRemoteNG.UI.Controls ESysIcons.Question); if (CTaskDialog.VerificationChecked) { - Settings.Default.ConfirmCloseConnection--; + Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; } if (result == DialogResult.No) diff --git a/mRemoteNG/UI/Forms/frmMain.cs b/mRemoteNG/UI/Forms/frmMain.cs index b1a38662..2e7ae7c2 100644 --- a/mRemoteNG/UI/Forms/frmMain.cs +++ b/mRemoteNG/UI/Forms/frmMain.cs @@ -470,7 +470,7 @@ namespace mRemoteNG.UI.Forms DialogResult result = CTaskDialog.MessageBox(this, Application.ProductName, Language.ConfirmExitMainInstruction, "", "", "", Language.CheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.YesNo, ESysIcons.Question, ESysIcons.Question); if (CTaskDialog.VerificationChecked) { - Properties.Settings.Default.ConfirmCloseConnection--; //--? + Properties.Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; } if (result == DialogResult.No) diff --git a/mRemoteNG/UI/Tabs/ConnectionTab.cs b/mRemoteNG/UI/Tabs/ConnectionTab.cs index 82d2926f..a6c1fbdd 100644 --- a/mRemoteNG/UI/Tabs/ConnectionTab.cs +++ b/mRemoteNG/UI/Tabs/ConnectionTab.cs @@ -55,7 +55,7 @@ namespace mRemoteNG.UI.Tabs ESysIcons.Question); if (CTaskDialog.VerificationChecked) { - Settings.Default.ConfirmCloseConnection--; + Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; } if (result == DialogResult.No) diff --git a/mRemoteNG/UI/Window/ConnectionWindow.cs b/mRemoteNG/UI/Window/ConnectionWindow.cs index 506e88e3..f2c9485d 100644 --- a/mRemoteNG/UI/Window/ConnectionWindow.cs +++ b/mRemoteNG/UI/Window/ConnectionWindow.cs @@ -297,7 +297,7 @@ namespace mRemoteNG.UI.Window ESysIcons.Question); if (CTaskDialog.VerificationChecked) { - Settings.Default.ConfirmCloseConnection--; + Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; } if (result == DialogResult.No) @@ -662,7 +662,7 @@ namespace mRemoteNG.UI.Window ESysIcons.Question); if (CTaskDialog.VerificationChecked) { - Settings.Default.ConfirmCloseConnection--; + Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; } if (result == DialogResult.No)