Close the dialog with 'OK' result when list view item is activated

This commit is contained in:
Michael Becker 2019-08-04 11:09:13 -04:00
parent 8dde2cde5a
commit 0bbf8ac806

View File

@ -158,9 +158,17 @@ namespace UniversalEditor.UserInterface.Dialogs
{
base.OnCreating(e);
tvTemplate.RowActivated += tvTemplate_RowActivated;
InitializeTreeView();
}
private void tvTemplate_RowActivated (object sender, ListViewRowActivatedEventArgs e)
{
cmdOK_Click (sender, e);
}
private void InitializeTreeView()
{
switch (this.Mode)
@ -484,6 +492,7 @@ namespace UniversalEditor.UserInterface.Dialogs
private void cmdOK_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
/*
if (String.IsNullOrEmpty(this.txtFileName.Text))
{