Activating an item in the list (double-click usually) should accept the dialog

This commit is contained in:
Michael Becker 2014-06-06 11:40:59 -04:00
parent a0aa58c1a3
commit 9da0053b1c
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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
{