Browse Source

Added support for string properties in file templates. Property grid is now anchored in the new file dialog.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2948 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 18 years ago
parent
commit
4a0379d84f
  1. 5
      src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs

5
src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs

@ -219,6 +219,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -219,6 +219,7 @@ namespace ICSharpCode.SharpDevelop.Gui
if (!Controls.Contains(propertyGrid)) {
this.SuspendLayout();
propertyGrid.Location = new Point(Width - GridMargin, GridMargin);
propertyGrid.Anchor = AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
localizedTypeDescriptor.Properties.Clear();
foreach (TemplateProperty property in SelectedTemplate.Properties) {
LocalizedProperty localizedProperty;
@ -247,6 +248,10 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -247,6 +248,10 @@ namespace ICSharpCode.SharpDevelop.Gui
}
StringParser.Properties["Properties." + localizedProperty.Name] = defVal;
localizedProperty.DefaultValue = Boolean.Parse(defVal);
} else {
string defVal = property.DefaultValue == null ? String.Empty : property.DefaultValue.ToString();
StringParser.Properties["Properties." + localizedProperty.Name] = defVal;
localizedProperty.DefaultValue = defVal;
}
}
localizedProperty.LocalizedName = property.LocalizedName;

Loading…
Cancel
Save