|
|
@ -275,14 +275,14 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs |
|
|
|
if (name.Length == 0 || !char.IsLetter(name[0]) && name[0] != '_') { |
|
|
|
if (name.Length == 0 || !char.IsLetter(name[0]) && name[0] != '_') { |
|
|
|
return "${res:ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.ProjectNameMustStartWithLetter}"; |
|
|
|
return "${res:ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.ProjectNameMustStartWithLetter}"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (name.EndsWith(".", StringComparison.Ordinal)) { |
|
|
|
|
|
|
|
return "${res:ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.ProjectNameMustNotEndWithDot}"; |
|
|
|
|
|
|
|
} |
|
|
|
if (!FileUtility.IsValidDirectoryEntryName(solution) |
|
|
|
if (!FileUtility.IsValidDirectoryEntryName(solution) |
|
|
|
|| !FileUtility.IsValidDirectoryEntryName(name)) |
|
|
|
|| !FileUtility.IsValidDirectoryEntryName(name)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return "${res:ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.IllegalProjectNameError}"; |
|
|
|
return "${res:ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.IllegalProjectNameError}"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (name.EndsWith(".")) { |
|
|
|
|
|
|
|
return "${res:ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.ProjectNameMustNotEndWithDot}"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!FileUtility.IsValidPath(location) || !Path.IsPathRooted(location)) { |
|
|
|
if (!FileUtility.IsValidPath(location) || !Path.IsPathRooted(location)) { |
|
|
|
return "${res:ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.SpecifyValidLocation}"; |
|
|
|
return "${res:ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.SpecifyValidLocation}"; |
|
|
|
} |
|
|
|
} |
|
|
@ -349,6 +349,7 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs |
|
|
|
if (result != null) |
|
|
|
if (result != null) |
|
|
|
item.Template.RunOpenActions(result); |
|
|
|
item.Template.RunOpenActions(result); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProjectBrowserPad.RefreshViewAsync(); |
|
|
|
DialogResult = DialogResult.OK; |
|
|
|
DialogResult = DialogResult.OK; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|