Browse Source

You can now insert custom formatted dates with StringParser.Parse() via ${DATE:formatstring}. This string gets passed to DateTime.Now.ToString() and the results returned. All project templates that have an AssemblyInfo.cs now set the AssemblyCopuRight to this year.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3247 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Justin Dearing 17 years ago
parent
commit
bc1f3d9112
  1. 2
      data/templates/project/CSharp/DefaultAssemblyInfo.cs
  2. 3
      data/templates/project/CSharp/WPFApplication.xpt
  3. 29
      data/templates/project/CSharp/WPFAssemblyInfo.cs
  4. 3
      data/templates/project/CSharp/WPFNavigationApplication.xpt
  5. 2
      data/templates/project/VBNet/DefaultAssemblyInfo.vb
  6. 2
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/DefaultAssemblyInfo.boo
  7. 8
      src/Main/Core/Project/Src/Services/StringParser/StringParser.cs

2
data/templates/project/CSharp/DefaultAssemblyInfo.cs

@ -14,7 +14,7 @@ using System.Runtime.InteropServices; @@ -14,7 +14,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("${ProjectName}")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyCopyright("Copyright ${DATE:yyyy}")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

3
data/templates/project/CSharp/WPFApplication.xpt

@ -104,7 +104,8 @@ namespace ${StandardNamespace} @@ -104,7 +104,8 @@ namespace ${StandardNamespace}
}
}
}]]></File>
<File name="Properties\AssemblyInfo.cs" src="WPFAssemblyInfo.cs" />
<File name="Properties\WPFAssemblyInfo.cs" src="WPFAssemblyInfo.cs" />
<File name="Properties\AssemblyInfo.cs" src="DefaultAssemblyInfo.cs" />
</Files>
</Project>
</Template>

29
data/templates/project/CSharp/WPFAssemblyInfo.cs

@ -1,29 +1,11 @@ @@ -1,29 +1,11 @@
#region Using directives
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Resources;
using System.Globalization;
using System.Windows;
using System.Runtime.InteropServices;
#endregion
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("${ProjectName}")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("${ProjectName}")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
@ -43,12 +25,3 @@ using System.Runtime.InteropServices; @@ -43,12 +25,3 @@ using System.Runtime.InteropServices;
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]

3
data/templates/project/CSharp/WPFNavigationApplication.xpt

@ -105,7 +105,8 @@ namespace ${StandardNamespace} @@ -105,7 +105,8 @@ namespace ${StandardNamespace}
}
}
}]]></File>
<File name="Properties\AssemblyInfo.cs" src="WPFAssemblyInfo.cs" />
<File name="Properties\AssemblyInfo.cs" src="DefaultAssemblyInfo.cs" />
<File name="Properties\WPFAssemblyInfo.cs" src="WPFAssemblyInfo.cs" />
</Files>
</Project>
</Template>

2
data/templates/project/VBNet/DefaultAssemblyInfo.vb

@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<assembly: AssemblyConfiguration("")>
<assembly: AssemblyCompany("")>
<assembly: AssemblyProduct("${ProjectName}")>
<assembly: AssemblyCopyright("")>
<assembly: AssemblyCopyright("Copyright ${DATE:yyyy}")>
<assembly: AssemblyTrademark("")>
<assembly: AssemblyCulture("")>

2
src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/DefaultAssemblyInfo.boo

@ -10,7 +10,7 @@ import System.Runtime.InteropServices @@ -10,7 +10,7 @@ import System.Runtime.InteropServices
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("${ProjectName}")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyCopyright("Copyright ${DATE:yyyy}")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

8
src/Main/Core/Project/Src/Services/StringParser/StringParser.cs

@ -156,6 +156,14 @@ namespace ICSharpCode.Core @@ -156,6 +156,14 @@ namespace ICSharpCode.Core
return null;
}
}
if (propertyName.StartsWith("DATE:", StringComparison.OrdinalIgnoreCase))
{
try {
return DateTime.Now.ToString(propertyName.Split(':')[1]);
} catch (Exception ex) {
return ex.Message;
}
}
if (propertyName.Equals("DATE", StringComparison.OrdinalIgnoreCase))
return DateTime.Today.ToShortDateString();
if (propertyName.Equals("TIME", StringComparison.OrdinalIgnoreCase))

Loading…
Cancel
Save