-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99de654
commit aa0b5c5
Showing
12 changed files
with
700 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
194 changes: 194 additions & 0 deletions
194
...cts/Coree.Template.Project/Package/Root/content/WinformsDI/.template.config/template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/template", | ||
"author": "Carsten Riedel", | ||
"classifications": [ "Common", "dotnet", "Windows", "Winforms", "Coree" ], | ||
"identity": "CoreeTemplatesProjectWinformsDependencyInjection", | ||
"name": ".NET Winforms Dependency Injection", | ||
"shortName": "winformsdi-coree", | ||
"tags": { | ||
"language": "C#", | ||
"type": "project" | ||
}, | ||
"defaultName": "Organization.Domain.Winforms", // Default Solution and Projectname scheme "Organization.Domain.Functionality" | ||
"sourceName": "WinformsDI", // Matching nameingscheme folders, csproj and namespace | ||
"preferNameDirectory": true, | ||
"symbols": { | ||
"TargetFramework": { | ||
"type": "parameter", | ||
"description": "The target frameworks for the project.", | ||
"datatype": "choice", | ||
"allowMultipleValues": false, | ||
"enableQuotelessLiterals": true, | ||
"choices": [ | ||
{ | ||
"choice": "net6.0-windows", | ||
"description": "Target .NET 6.0", | ||
"displayName": ".NET 6.0 Windows" | ||
}, | ||
{ | ||
"choice": "net7.0-windows", | ||
"description": "Target .NET 7.0", | ||
"displayName": ".NET 7.0 Windows" | ||
}, | ||
{ | ||
"choice": "net8.0-windows", | ||
"description": "Target .NET 8.0", | ||
"displayName": ".NET 8.0 Windows" | ||
} | ||
], | ||
"defaultValue": "net8.0-windows", | ||
"replaces": "net8.0-windows" | ||
|
||
}, | ||
"RuntimeIdentifier": { | ||
"type": "parameter", | ||
"description": "The target RuntimeIdentifier for the project.", | ||
"datatype": "choice", | ||
"allowMultipleValues": false, | ||
"enableQuotelessLiterals": true, | ||
"choices": [ | ||
{ | ||
"choice": "win-x86", | ||
"description": "Target x86", | ||
"displayName": "Windows x86" | ||
}, | ||
{ | ||
"choice": "win-x64", | ||
"description": "Target x64", | ||
"displayName": "Windows x64" | ||
} | ||
], | ||
"defaultValue": "win-x64" | ||
}, | ||
"Publish": { | ||
"type": "parameter", | ||
"description": "Choose the publish type. Option 2) or 3) recommended.", | ||
"datatype": "choice", | ||
"allowMultipleValues": false, | ||
"enableQuotelessLiterals": true, | ||
"choices": [ | ||
{ | ||
"choice": "FrameworkRequired", | ||
"description": "", | ||
"displayName": "1) Framework-required. (Purpose: Installer)" | ||
}, | ||
{ | ||
"choice": "FrameworkRequiredSingle", | ||
"description": "", | ||
"displayName": "2) Framework-required, Single-file. (Purpose: Copy smallest)" | ||
}, | ||
{ | ||
"choice": "FrameworkIncluded", | ||
"description": "", | ||
"displayName": "3) Framework-included. (Purpose: Installer)" | ||
}, | ||
{ | ||
"choice": "FrameworkIncludedSingle", | ||
"description": "See Single-file deployment. -> DOTNET_BUNDLE_EXTRACT_BASE_DIR", | ||
"displayName": "4) Framework-included, Single-file. (Purpose: Copy large)" | ||
}, | ||
{ | ||
"choice": "FrameworkIncludedSingleCompressed", | ||
"description": "See Single-file deployment. -> DOTNET_BUNDLE_EXTRACT_BASE_DIR", | ||
"displayName": "5) Framework-included, Single-file, Compressed. (Purpose: Copy medium)" | ||
} | ||
], | ||
"defaultValue": "FrameworkRequiredSingle" | ||
}, | ||
"Author": { | ||
"type": "parameter", | ||
"dataType": "string", | ||
"replaces": "MyAuthor", | ||
"description": "The author of the project.", | ||
"displayName": "Author", | ||
"isRequired": "true" | ||
}, | ||
"Company": { | ||
"type": "parameter", | ||
"dataType": "string", | ||
"defaultValue": "", | ||
"replaces": "MyCompany", | ||
"description": "The company of the project.", | ||
"displayName": "Company" | ||
}, | ||
"CompanyIsSet": { | ||
"type": "computed", | ||
"value": "(PackageCompany != \"\")" | ||
}, | ||
"CopyrightYear": { | ||
"type": "generated", | ||
"generator": "now", | ||
"replaces": "1975", | ||
"parameters": { | ||
"format": "yyyy" | ||
} | ||
}, | ||
"DateNowShort": { | ||
"type": "generated", | ||
"generator": "now", | ||
"replaces": "1975-01-01", | ||
"parameters": { | ||
"format": "yyyy-MM-dd" | ||
} | ||
}, | ||
"AssemblyVersioningScheme": { | ||
"type": "parameter", | ||
"dataType": "bool", | ||
"defaultValue": "true", | ||
"description": "Generates assembly versioning scheme utilizing build and revision date.", | ||
"displayName": "Automatic assembly versioning scheme." | ||
}, | ||
"DefaultRename": { | ||
"type": "derived", | ||
"valueSource": "name", | ||
"valueTransform": "WithoutTrailingNumbers", | ||
"description": "A value derived from the 'name' param, used to rename Application1.cs", | ||
"fileRename": "Default" | ||
}, | ||
"DefaultSourceNameWithoutTrailingNumbers": { | ||
"type": "derived", | ||
"valueSource": "name", | ||
"valueTransform": "WithoutTrailingNumbers", | ||
"description": "A value derived from the 'name' param, used to rename Application1.cs", | ||
"replaces" : "SourceNameWithoutTrailingNumbers" | ||
}, | ||
"DefaultSourceNameRemoveDots": { | ||
"type": "derived", | ||
"valueSource": "name", | ||
"valueTransform": "RemoveDots", | ||
"description": "A value derived from the 'name' param, used to rename Application1.cs", | ||
"replaces" : "SourceNameRemoveDots" | ||
}, | ||
"ProfileOptimizationStartup": { | ||
"type": "parameter", | ||
"dataType": "bool", | ||
"defaultValue": "true", | ||
"description": "ProfileOptimization in startup.", | ||
"displayName": "ProfileOptimization in startup." | ||
}, | ||
"StartupMutex": { | ||
"type": "parameter", | ||
"dataType": "bool", | ||
"defaultValue": "true", | ||
"description": "Startup mutex.", | ||
"displayName": "Startup mutex." | ||
} | ||
}, | ||
"guids": [ | ||
"8CDD8387-B905-44A8-B5D5-07BB50E05BEA", | ||
"35BBE988-7105-4CF2-BF49-11DBD588309E", | ||
"43DA960A-5EB3-4648-9643-7F837744A68C" | ||
], | ||
"forms": { | ||
"WithoutTrailingNumbers": { | ||
"identifier": "replace", | ||
"pattern": "\\d+$", // regex to match every number at the end of the string | ||
"replacement": "" // replace it with empty string | ||
}, | ||
"RemoveDots": { | ||
"identifier": "replace", | ||
"pattern": "\\.", // regex to match every number at the end of the string | ||
"replacement": "" // replace it with empty string | ||
} | ||
} | ||
} |
79 changes: 79 additions & 0 deletions
79
...ect/Package/Root/content/WinformsDI/Projects/WinformsDI.Library/WinformsDI.Library.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
<DebugType>embedded</DebugType> | ||
<!--#if (RuntimeIdentifier == win-x86) --> | ||
<RuntimeIdentifier>win-x86</RuntimeIdentifier> | ||
<!--#endif --> | ||
<!--#if (RuntimeIdentifier == win-x64) --> | ||
<RuntimeIdentifier>win-x64</RuntimeIdentifier> | ||
<!--#endif --> | ||
</PropertyGroup> | ||
|
||
<!-- Specific package specs --> | ||
<PropertyGroup> | ||
<IsPackable>false</IsPackable> | ||
<PublishRelease>false</PublishRelease> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<VersionMajor>0</VersionMajor> | ||
<VersionMinor>1</VersionMinor> | ||
<VersionBuild>0</VersionBuild> | ||
<VersionRevision>0</VersionRevision> | ||
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision)</VersionPrefix> | ||
<VersionSuffix Condition="'$(Configuration)' == 'Debug'">prerelease</VersionSuffix> | ||
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)</PackageVersion> | ||
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion> | ||
<InformationalVersion>$(PackageVersion)</InformationalVersion> | ||
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<Authors>MyAuthor</Authors> | ||
<!--#if (PackageCompany != '') --> | ||
<Owners>MyCompany</Owners> | ||
<!--#endif --> | ||
<!--#if (PackageCompany == '') --> | ||
<Owners>MyAuthor</Owners> | ||
<!--#endif --> | ||
<!--#if (PackageCompany != '') --> | ||
<Company>MyCompany</Company> | ||
<!--#endif --> | ||
<!--#if (PackageCompany == '') --> | ||
<Company></Company> | ||
<!--#endif --> | ||
<!--#if (PackageCompany != '') --> | ||
<Copyright>Copyright © MyCompany 1975</Copyright> | ||
<!--#endif --> | ||
<!--#if (PackageCompany == '') --> | ||
<Copyright>Copyright © MyAuthor 1975</Copyright> | ||
<!--#endif --> | ||
</PropertyGroup> | ||
|
||
<!--#if (AssemblyVersioningScheme == true) --> | ||
<Target Name="OverrideBuildRevision" BeforeTargets="GenerateNuspec" AfterTargets="BeforeBuild" > | ||
<PropertyGroup> | ||
<AssemblyVersionBaseTicks>$([MSBuild]::Subtract($([System.DateTime]::UtcNow.Ticks), 630822816000000000))</AssemblyVersionBaseTicks> | ||
<TicksPerDay>$([System.TimeSpan]::TicksPerDay)</TicksPerDay> | ||
<TicksPerSecond>$([System.TimeSpan]::TicksPerSecond)</TicksPerSecond> | ||
<AssemblyVersionBuild>$([System.Math]::Truncate($([MSBuild]::Divide($(AssemblyVersionBaseTicks), $(TicksPerDay)))))</AssemblyVersionBuild> | ||
<AssemblyVersionTotalSeconds>$([System.Math]::Truncate($([MSBuild]::Divide($(AssemblyVersionBaseTicks), $(TicksPerSecond)))))</AssemblyVersionTotalSeconds> | ||
<AssemblyVersionRemainingSeconds>$([System.Math]::Truncate($([MSBuild]::Modulo($(AssemblyVersionTotalSeconds), 86400))))</AssemblyVersionRemainingSeconds> | ||
<AssemblyVersionRevision>$([System.Math]::Truncate($([MSBuild]::Divide($(AssemblyVersionRemainingSeconds), 2))))</AssemblyVersionRevision> | ||
<VersionBuild>$(AssemblyVersionBuild)</VersionBuild> | ||
<VersionRevision>$(AssemblyVersionRevision)</VersionRevision> | ||
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision)</VersionPrefix> | ||
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)</PackageVersion> | ||
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion> | ||
<InformationalVersion>$(PackageVersion)</InformationalVersion> | ||
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion> | ||
</PropertyGroup> | ||
</Target> | ||
<!--#endif --> | ||
|
||
</Project> |
46 changes: 46 additions & 0 deletions
46
...Template.Project/Package/Root/content/WinformsDI/Projects/WinformsDI/MainForm.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.