From 9da0053b1cd76b2937aec7ea679842ff1f18ddc2 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Fri, 6 Jun 2014 11:40:59 -0400 Subject: [PATCH] Activating an item in the list (double-click usually) should accept the dialog --- .../Dialogs/NewDialog.Designer.cs | 2 ++ .../Dialogs/NewDialog.cs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.Designer.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.Designer.cs index c73e4329..c454453a 100644 --- a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.Designer.cs +++ b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.Designer.cs @@ -132,6 +132,7 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs this.lvFileTemplates.SmallImageList = null; this.lvFileTemplates.SortColumn = null; this.lvFileTemplates.TabIndex = 0; + this.lvFileTemplates.ItemActivate += new System.EventHandler(this.lvTemplates_ItemActivate); this.lvFileTemplates.SelectionChanged += new System.EventHandler(this.lvFileTemplates_SelectionChanged); // // cmdCancel @@ -223,6 +224,7 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs this.lvProjectTemplates.SmallImageList = null; this.lvProjectTemplates.SortColumn = null; this.lvProjectTemplates.TabIndex = 0; + this.lvProjectTemplates.ItemActivate += new System.EventHandler(this.lvTemplates_ItemActivate); this.lvProjectTemplates.SelectionChanged += new System.EventHandler(this.lvProjectTemplates_SelectionChanged); // // optSeparate diff --git a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.cs index 6bfd8fb7..b4793111 100644 --- a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.cs +++ b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/NewDialog.cs @@ -278,6 +278,11 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs { if (!txtSolutionTitle_IsChanged) txtSolutionTitle.Text = txtProjectTitle.Text; } + + private void lvTemplates_ItemActivate(object sender, EventArgs e) + { + cmdOK_Click(sender, e); + } } public enum NewDialogMode {