Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2036 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
5 changed files with 385 additions and 3 deletions
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Justin Dearing" version="1.0"> |
||||
<Config |
||||
name = "${res:Templates.File.ConfigurationElement.Name}" |
||||
icon = "C#.File.Form" |
||||
category = "C#" |
||||
defaultname = "Class${Number}.cs" |
||||
language = "C#"/> |
||||
<Description>${res:Templates.File.ConfigurationElement.Description}</Description> |
||||
<!-- |
||||
Special new file templates: |
||||
${StandardNamespace} -> Standardnamespace of the current project or FileNameWithoutExtension |
||||
${FullName} -> Full generated path name |
||||
${FileName} -> File name with extension |
||||
${FileNameWithoutExtension} -> File name without extension |
||||
${Extension} -> Extension in the form ".cs" |
||||
${Path} -> Full path of the file |
||||
${ClassName} -> Class name (generally FileNameWithoutExtension w/o 'bad' characters) |
||||
--> |
||||
<Files> |
||||
<File name="${Path}/${FileNameWithoutExtension}.cs" language="C#"><![CDATA[${StandardHeader.C#} |
||||
|
||||
using System; |
||||
using System.Configuration; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
public sealed class ${ClassName}Element : ConfigurationElement |
||||
{ |
||||
/// <summary> |
||||
/// The attribute <c>name</c> of a <c>${ClassName}Element</c>. |
||||
/// </summary> |
||||
[ConfigurationProperty("name", IsKey = true, IsRequired = true)] |
||||
public string Name |
||||
{ |
||||
get { return (string)this["name"]; } |
||||
set { this["name"] = value; } |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// A demonstration of how to use a boolean property. |
||||
/// </summary> |
||||
[ConfigurationProperty("special")] |
||||
public bool IsSpecial { |
||||
get { return (bool)this["special"]; } |
||||
set { this["special"] = value; } |
||||
} |
||||
} |
||||
|
||||
} |
||||
]]></File> |
||||
</Files> |
||||
<AdditionalOptions/> |
||||
</Template> |
@ -0,0 +1,150 @@
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Justin Dearing" version="1.0"> |
||||
<Config |
||||
name = "${res:Templates.File.ConfigurationElementCollection.Name}" |
||||
icon = "C#.File.Form" |
||||
category = "C#" |
||||
defaultname = "Class${Number}.cs" |
||||
language = "C#"/> |
||||
<Description>${res:Templates.File.ConfigurationElementCollection.Description}</Description> |
||||
<!-- |
||||
Special new file templates: |
||||
${StandardNamespace} -> Standardnamespace of the current project or FileNameWithoutExtension |
||||
${FullName} -> Full generated path name |
||||
${FileName} -> File name with extension |
||||
${FileNameWithoutExtension} -> File name without extension |
||||
${Extension} -> Extension in the form ".cs" |
||||
${Path} -> Full path of the file |
||||
${ClassName} -> Class name (generally FileNameWithoutExtension w/o 'bad' characters) |
||||
--> |
||||
<Files> |
||||
<File name="${Path}/${FileNameWithoutExtension}Element.cs" language="C#"><![CDATA[${StandardHeader.C#} |
||||
|
||||
using System; |
||||
using System.Configuration; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
public sealed class ${ClassName}Element : ConfigurationElement |
||||
{ |
||||
/// <summary> |
||||
/// The attribute <c>name</c> of a <c>${ClassName}Element</c>. |
||||
/// </summary> |
||||
[ConfigurationProperty("name", IsKey = true, IsRequired = true)] |
||||
public string Name |
||||
{ |
||||
get { return (string)this["name"]; } |
||||
set { this["name"] = value; } |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// A demonstration of how to use a boolean property. |
||||
/// </summary> |
||||
[ConfigurationProperty("special")] |
||||
public bool IsSpecial { |
||||
get { return (bool)this["special"]; } |
||||
set { this["special"] = value; } |
||||
} |
||||
} |
||||
|
||||
} |
||||
]]></File> |
||||
<File name="${Path}/${FileNameWithoutExtension}Collection.cs" language="C#"><![CDATA[${StandardHeader.C#} |
||||
|
||||
using System; |
||||
using System.Configuration; |
||||
|
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
/// <summary> |
||||
/// Description of ${ClassName}. |
||||
/// </summary> |
||||
public sealed class ${ClassName}Collection : ConfigurationElementCollection |
||||
{ |
||||
#region Properties |
||||
|
||||
/// <summary> |
||||
/// Gets the CollectionType of the ConfigurationElementCollection. |
||||
/// </summary> |
||||
public override ConfigurationElementCollectionType CollectionType |
||||
{ |
||||
get { return ConfigurationElementCollectionType.BasicMap; } |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// Gets the Name of Elements of the collection. |
||||
/// </summary> |
||||
protected override string ElementName |
||||
{ |
||||
get { return "${ClassName}"; } |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// Retrieve and item in the collection by index. |
||||
/// </summary> |
||||
public ${ClassName}Element this[int index] |
||||
{ |
||||
get { return (${ClassName}Element)BaseGet(index); } |
||||
set |
||||
{ |
||||
if (BaseGet(index) != null) |
||||
{ |
||||
BaseRemoveAt(index); |
||||
} |
||||
BaseAdd(index, value); |
||||
} |
||||
} |
||||
|
||||
|
||||
#endregion |
||||
|
||||
/// <summary> |
||||
/// Adds a ${ClassName}Element to the configuration file. |
||||
/// </summary> |
||||
/// <param name="element">The ${ClassName}Element to add.</param> |
||||
public void Add(${ClassName}Element element) |
||||
{ |
||||
BaseAdd(element); |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// Creates a new ${ClassName}Element. |
||||
/// </summary> |
||||
/// <returns>A new <c>${ClassName}Element</c></returns> |
||||
protected override ConfigurationElement CreateNewElement() |
||||
{ |
||||
return new ${ClassName}Element(); |
||||
} |
||||
|
||||
|
||||
|
||||
/// <summary> |
||||
/// Gets the key of an element based on it's Id. |
||||
/// </summary> |
||||
/// <param name="element">Element to get the key of.</param> |
||||
/// <returns>The key of <c>element</c>.</returns> |
||||
protected override object GetElementKey(ConfigurationElement element) |
||||
{ |
||||
return ((${ClassName}Element)element).Name; |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// Removes a ${ClassName}Element with the given name. |
||||
/// </summary> |
||||
/// <param name="name">The name of the ${ClassName}Element to remove.</param> |
||||
public void Remove (string name) { |
||||
base.BaseRemove(name); |
||||
} |
||||
|
||||
} |
||||
} |
||||
]]></File> |
||||
</Files> |
||||
<AdditionalOptions/> |
||||
</Template> |
@ -0,0 +1,174 @@
@@ -0,0 +1,174 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Justin Dearing" version="1.0"> |
||||
<Config |
||||
name = "${res:Templates.File.ConfigurationSection.Name}" |
||||
icon = "C#.File.Form" |
||||
category = "C#" |
||||
defaultname = "Class${Number}.cs" |
||||
language = "C#"/> |
||||
<Description>${res:Templates.File.ConfigurationSection.Description}</Description> |
||||
<!-- |
||||
Special new file templates: |
||||
${StandardNamespace} -> Standardnamespace of the current project or FileNameWithoutExtension |
||||
${FullName} -> Full generated path name |
||||
${FileName} -> File name with extension |
||||
${FileNameWithoutExtension} -> File name without extension |
||||
${Extension} -> Extension in the form ".cs" |
||||
${Path} -> Full path of the file |
||||
${ClassName} -> Class name (generally FileNameWithoutExtension w/o 'bad' characters) |
||||
--> |
||||
<Files> |
||||
<File name="${Path}/${FileNameWithoutExtension}Element.cs" language="C#"><![CDATA[${StandardHeader.C#} |
||||
|
||||
using System; |
||||
using System.Configuration; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
public sealed class ${ClassName}Element : ConfigurationElement |
||||
{ |
||||
/// <summary> |
||||
/// The attribute <c>name</c> of a <c>${ClassName}Element</c>. |
||||
/// </summary> |
||||
[ConfigurationProperty("name", IsKey = true, IsRequired = true)] |
||||
public string Name |
||||
{ |
||||
get { return (string)this["name"]; } |
||||
set { this["name"] = value; } |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// A demonstration of how to use a boolean property. |
||||
/// </summary> |
||||
[ConfigurationProperty("special")] |
||||
public bool IsSpecial { |
||||
get { return (bool)this["special"]; } |
||||
set { this["special"] = value; } |
||||
} |
||||
} |
||||
|
||||
} |
||||
]]></File> |
||||
<File name="${Path}/${FileNameWithoutExtension}Collection.cs" language="C#"><![CDATA[${StandardHeader.C#} |
||||
|
||||
using System; |
||||
using System.Configuration; |
||||
|
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
/// <summary> |
||||
/// Description of ${ClassName}. |
||||
/// </summary> |
||||
public sealed class ${ClassName}Collection : ConfigurationElementCollection |
||||
{ |
||||
#region Properties |
||||
|
||||
/// <summary> |
||||
/// Gets the CollectionType of the ConfigurationElementCollection. |
||||
/// </summary> |
||||
public override ConfigurationElementCollectionType CollectionType |
||||
{ |
||||
get { return ConfigurationElementCollectionType.BasicMap; } |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// Gets the Name of Elements of the collection. |
||||
/// </summary> |
||||
protected override string ElementName |
||||
{ |
||||
get { return "${ClassName}"; } |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// Retrieve and item in the collection by index. |
||||
/// </summary> |
||||
public ${ClassName}Element this[int index] |
||||
{ |
||||
get { return (${ClassName}Element)BaseGet(index); } |
||||
set |
||||
{ |
||||
if (BaseGet(index) != null) |
||||
{ |
||||
BaseRemoveAt(index); |
||||
} |
||||
BaseAdd(index, value); |
||||
} |
||||
} |
||||
|
||||
|
||||
#endregion |
||||
|
||||
/// <summary> |
||||
/// Adds a ${ClassName}Element to the configuration file. |
||||
/// </summary> |
||||
/// <param name="element">The ${ClassName}Element to add.</param> |
||||
public void Add(${ClassName}Element element) |
||||
{ |
||||
BaseAdd(element); |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// Creates a new ${ClassName}Element. |
||||
/// </summary> |
||||
/// <returns>A new <c>${ClassName}Element</c></returns> |
||||
protected override ConfigurationElement CreateNewElement() |
||||
{ |
||||
return new ${ClassName}Element(); |
||||
} |
||||
|
||||
|
||||
|
||||
/// <summary> |
||||
/// Gets the key of an element based on it's Id. |
||||
/// </summary> |
||||
/// <param name="element">Element to get the key of.</param> |
||||
/// <returns>The key of <c>element</c>.</returns> |
||||
protected override object GetElementKey(ConfigurationElement element) |
||||
{ |
||||
return ((${ClassName}Element)element).Name; |
||||
} |
||||
|
||||
|
||||
/// <summary> |
||||
/// Removes a ${ClassName}Element with the given name. |
||||
/// </summary> |
||||
/// <param name="name">The name of the ${ClassName}Element to remove.</param> |
||||
public void Remove (string name) { |
||||
base.BaseRemove(name); |
||||
} |
||||
|
||||
} |
||||
} |
||||
]]></File> |
||||
<File name="${Path}/${FileNameWithoutExtension}Section.cs" language="C#"><![CDATA[${StandardHeader.C#} |
||||
|
||||
using System; |
||||
using System.Configuration; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
/// <summary> |
||||
/// Configuration settings for ${ClassName}. |
||||
/// </summary> |
||||
public class ${ClassName}Section : ConfigurationSection |
||||
{ |
||||
/// <summary> |
||||
/// Collection of tables (auctually views) to generate |
||||
/// reports from. |
||||
/// </summary> |
||||
[ConfigurationProperty("customSection", IsDefaultCollection = true)] |
||||
public ${ClassName}Collection ${ClassName} |
||||
{ |
||||
get { return (${ClassName}Collection) base["customSection"]; } |
||||
} |
||||
} |
||||
} |
||||
]]></File> |
||||
</Files> |
||||
<AdditionalOptions/> |
||||
</Template> |
@ -1,8 +1,8 @@
@@ -1,8 +1,8 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<PropertyGroup> |
||||
<SetupProductBuildVersion>1</SetupProductBuildVersion> |
||||
<SetupProductCodeGuid>A0AB2551-A579-42D3-9A90-D6424B3AC2CD</SetupProductCodeGuid> |
||||
<SetupPackageCodeGuid>DFC87BE9-A5A6-434D-97BA-F34BB1C1C1A7</SetupPackageCodeGuid> |
||||
<SetupProductBuildVersion>2035</SetupProductBuildVersion> |
||||
<SetupProductCodeGuid>91D535F9-0EB3-4C12-BE79-3DC17D4EA9A8</SetupProductCodeGuid> |
||||
<SetupPackageCodeGuid>9D95DFA7-F496-4482-9830-059797D3D678</SetupPackageCodeGuid> |
||||
<OutputName>SharpDevelop2_2.1.0.$(SetupProductBuildVersion)</OutputName> |
||||
<DefineConstants>PACKAGECODEGUID=$(SetupPackageCodeGuid);PRODUCTCODEGUID=$(SetupProductCodeGuid);PRODUCTBUILDVERSION=$(SetupProductBuildVersion)</DefineConstants> |
||||
</PropertyGroup> |
||||
|
Loading…
Reference in new issue