Try to come up with smart project names if no default is specified in template

This commit is contained in:
Michael Becker 2014-06-06 12:05:25 -04:00
parent 9da0053b1c
commit 1581403478

View File

@ -259,7 +259,16 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs
ProjectTemplate pt = (lvProjectTemplates.SelectedItems[0].Data as ProjectTemplate);
if (pt == null) return;
if (!txtProjectTitle_IsChanged) txtProjectTitle.Text = pt.ProjectNamePrefix + "1";
if (!txtProjectTitle_IsChanged)
{
string projectNamePrefix = pt.ProjectNamePrefix;
if (String.IsNullOrEmpty(projectNamePrefix))
{
projectNamePrefix = pt.Title.Replace(" ", String.Empty);
// projectNamePrefix = "Project";
}
txtProjectTitle.Text = projectNamePrefix + "1";
}
}
private bool txtProjectTitle_IsChanged = false;