From aa22f7e1ef2a212775eed092e77877f9d9aaddf2 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 10 Jul 2022 11:19:50 +0200 Subject: [PATCH] Delete function: set the default button to be "no" --- I18N Commander/UI WinForms/Components/SectionTree.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/I18N Commander/UI WinForms/Components/SectionTree.cs b/I18N Commander/UI WinForms/Components/SectionTree.cs index 1ecf74a..76d6952 100644 --- a/I18N Commander/UI WinForms/Components/SectionTree.cs +++ b/I18N Commander/UI WinForms/Components/SectionTree.cs @@ -159,7 +159,7 @@ public partial class SectionTree : UserControl var numberChildren = await SectionProcessor.NumberChildren(this.db, selectedNode.Name); // Ask the user, if he really wants to remove the section: - if(MessageBox.Show(numberChildren > 0 ? $"Are you sure, you want to remove the section '{selectedNode.Text}', its {numberChildren} children and so on?" : $"Are you sure, you want to remove the section '{selectedNode.Text}'?", "Remove section", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + if(MessageBox.Show(numberChildren > 0 ? $"Are you sure, you want to remove the section '{selectedNode.Text}', its {numberChildren} children and so on?" : $"Are you sure, you want to remove the section '{selectedNode.Text}'?", "Remove section", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No) return; // Remove the section from the database: