diff --git a/VECTO/GUI/F_AboutBox.vb b/VECTO/GUI/F_AboutBox.vb index f9ffecab645c96862030bbd3c49421a14795cec3..2cacd679b1dc20b58a6bf393b5b938ae5782ea07 100644 --- a/VECTO/GUI/F_AboutBox.vb +++ b/VECTO/GUI/F_AboutBox.vb @@ -1,42 +1,43 @@ -' Copyright 2014 European Union. -' Licensed under the EUPL (the 'Licence'); -' -' * You may not use this work except in compliance with the Licence. -' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl -' * Unless required by applicable law or agreed to in writing, -' software distributed under the Licence is distributed on an "AS IS" basis, -' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -' -' See the LICENSE.txt for the specific language governing permissions and limitations. - -''' <summary> -''' About Dialog. Shows Licence and contact/support information -''' </summary> -''' <remarks></remarks> -Public Class F_AboutBox - - - 'Initialize - Private Sub F10_AboutBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load - Me.Text = "VECTO " & VECTOvers '& "/ GUI " & GUIvers - Me.LabelLic.Text = Lic.LicString - Me.LabelLicDate.Text = "Expiring date (y/m/d): " & Lic.ExpTime - End Sub - - 'e-mail links---------------------------------------------------------------- - Private Sub LinkLabel1_LinkClicked_1(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked - System.Diagnostics.Process.Start("mailto:vecto@jrc.ec.europa.eu") - End Sub - - '---------------------------------------------------------------------------- - - 'Picture Links------------------------------------------------------------------ - Private Sub PictureBoxJRC_Click(sender As System.Object, e As System.EventArgs) Handles PictureBoxJRC.Click - System.Diagnostics.Process.Start("http://ec.europa.eu/dgs/jrc/index.cfm") - End Sub - - +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. +Imports System.Linq +Imports System.Reflection + +''' <summary> +''' About Dialog. Shows Licence and contact/support information +''' </summary> +''' <remarks></remarks> +Public Class F_AboutBox + 'Initialize + Private Sub F10_AboutBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load + Me.Text = "VECTO " & VECTOvers & " / VectoCore " & COREVers + Me.LabelLic.Text = Lic.LicString + Me.LabelLicDate.Text = "Expiring date (y/m/d): " & Lic.ExpTime + End Sub + + 'e-mail links---------------------------------------------------------------- + Private Sub LinkLabel1_LinkClicked_1(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) _ + Handles LinkLabel1.LinkClicked + System.Diagnostics.Process.Start("mailto:vecto@jrc.ec.europa.eu") + End Sub + + '---------------------------------------------------------------------------- + + 'Picture Links------------------------------------------------------------------ + Private Sub PictureBoxJRC_Click(sender As System.Object, e As System.EventArgs) Handles PictureBoxJRC.Click + System.Diagnostics.Process.Start("http://ec.europa.eu/dgs/jrc/index.cfm") + End Sub + + Private Sub LinkLabel2_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked - System.Diagnostics.Process.Start("https://joinup.ec.europa.eu/software/page/eupl") - End Sub -End Class + System.Diagnostics.Process.Start("https://joinup.ec.europa.eu/software/page/eupl") + End Sub +End Class diff --git a/VECTO/GUI/F_MAINForm.vb b/VECTO/GUI/F_MAINForm.vb index 59992c574291d7f21bbe6e2dc25038b9e554cbb5..087c869ccd3b66fba7d4a56082995e7133c19d38 100644 --- a/VECTO/GUI/F_MAINForm.vb +++ b/VECTO/GUI/F_MAINForm.vb @@ -464,7 +464,7 @@ Imports TUGraz.VectoCore.Models.Simulation FB_Initialize() - Me.Text = "VECTO " & VECTOvers + Me.Text = "VECTO " & VECTOvers & " / VectoCore " & COREvers 'FileLists @@ -529,11 +529,11 @@ Imports TUGraz.VectoCore.Models.Simulation Private Sub DeclOnOff() If Cfg.DeclMode Then - Me.Text = "VECTO " & VECTOvers & " - Declaration Mode" + Me.Text = "VECTO " & VECTOvers & " / VectoCore " & COREvers & " - Declaration Mode" Me.CbBatch.Checked = False Cfg.DeclInit() Else - Me.Text = "VECTO " & VECTOvers + Me.Text = "VECTO " & VECTOvers & " / VectoCore " & COREvers End If If Cfg.DeclMode Then diff --git a/VECTO/GUI/F_Welcome.vb b/VECTO/GUI/F_Welcome.vb index e901b530894730e3ae8439b91ea8528443eae0c4..fd53aee8ed773d7e8af708ea7140b6dc422c9df0 100644 --- a/VECTO/GUI/F_Welcome.vb +++ b/VECTO/GUI/F_Welcome.vb @@ -24,7 +24,7 @@ Public Class F_Welcome 'Init Private Sub F_Welcome_Load(sender As Object, e As System.EventArgs) Handles Me.Load - Me.Text = "VECTO " & VECTOvers + Me.Text = "VECTO " & VECTOvers & " / VectoCore " & COREvers End Sub 'Open Release Notes diff --git a/VECTO/VECTO_Global.vb b/VECTO/VECTO_Global.vb index 19c8369f170a6f4843797e8a689493ac166a57cf..c25cb2582c58a1a75b230e1fdb62e4c4aa540eb4 100644 --- a/VECTO/VECTO_Global.vb +++ b/VECTO/VECTO_Global.vb @@ -9,9 +9,15 @@ ' ' See the LICENSE.txt for the specific language governing permissions and limitations. Imports System.Collections.Generic +Imports System.Linq +Imports System.Reflection +Imports Microsoft.VisualBasic.ApplicationServices +Imports TUGraz.VectoCore.Models.Simulation.Impl Module VECTO_Global Public Const VECTOvers As String = "2.2" + Public COREvers As String = Assembly.LoadFrom("VectoCore.dll").GetName().Version.ToString() + Public Const LicSigAppCode As String = "VECTO-Release-0093C61E0A2E4BFA9A7ED7E729C56AE4" Public MyAppPath As String Public MyConfPath As String @@ -51,7 +57,7 @@ Module VECTO_Global Public ProgBarCtrl As cProgBarCtrl - Public SetCulture As Boolean 'Damit der Backgroundworker das richtige Format verwendet + Public SetCulture As Boolean 'Damit der Backgroundworker das richtige Format verwendet Public Function nMtoPe(ByVal nU As Double, ByVal M As Double) As Double Return ((nU*2*Math.PI/60)*M/1000) diff --git a/VectoConsole/Properties/AssemblyInfo.cs b/VectoConsole/Properties/AssemblyInfo.cs index 72db279670249ea6a29add82f31e61c18f563ad1..2d3069dd6213cbb7f984c34577998fefb94d05e8 100644 --- a/VectoConsole/Properties/AssemblyInfo.cs +++ b/VectoConsole/Properties/AssemblyInfo.cs @@ -1,10 +1,6 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// 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("Vecto Console")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] @@ -13,24 +9,5 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("29bc5a9a-40b4-4e43-a86b-cee6298b6a73")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: Guid("29bc5a9a-40b4-4e43-a86b-cee6298b6a73")] \ No newline at end of file diff --git a/VectoConsole/Properties/Version.cs b/VectoConsole/Properties/Version.cs new file mode 100644 index 0000000000000000000000000000000000000000..b6ee1efd0cb329fa46e435822e483d1796a9c865 --- /dev/null +++ b/VectoConsole/Properties/Version.cs @@ -0,0 +1,6 @@ +using System.Reflection; + +// generated on 05.11.2015 11:37:30 +[assembly: AssemblyVersion("3.0.1.308")] +[assembly: AssemblyFileVersion("3.0.1.308")] + diff --git a/VectoConsole/Properties/Version.tt b/VectoConsole/Properties/Version.tt new file mode 100644 index 0000000000000000000000000000000000000000..5fd5704ae6c1af994a8634347a5f6bca23ee4617 --- /dev/null +++ b/VectoConsole/Properties/Version.tt @@ -0,0 +1,11 @@ +<#@ template language="C#" #> +<#@ output extension=".cs"#> +using System.Reflection; + +// generated on <#= DateTime.UtcNow.ToString() #> +[assembly: AssemblyVersion("3.0.1.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("3.0.1.<#= this.RevisionNumber #>")] + +<#+ + int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays; +#> \ No newline at end of file diff --git a/VectoConsole/VectoConsole.csproj b/VectoConsole/VectoConsole.csproj index b77f7c1cf2e40c75a10c0f7700a691bdef4752f4..80ae0ca32e315ed87a99151cb00532c5d3697a0d 100644 --- a/VectoConsole/VectoConsole.csproj +++ b/VectoConsole/VectoConsole.csproj @@ -68,6 +68,11 @@ <ItemGroup> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Properties\Version.cs"> + <DependentUpon>Version.tt</DependentUpon> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + </Compile> </ItemGroup> <ItemGroup> <None Include="App.config" /> @@ -119,6 +124,10 @@ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Include="packages.config" /> + <None Include="Properties\Version.tt"> + <Generator>TextTemplatingFileGenerator</Generator> + <LastGenOutput>Version.cs</LastGenOutput> + </None> <None Include="VECTO.ico" /> </ItemGroup> <ItemGroup> @@ -138,7 +147,13 @@ <Install>false</Install> </BootstrapperPackage> </ItemGroup> + <ItemGroup> + <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent>forfiles /p "$(ProjectDir)." /m "*.tt" /s /c "cmd /c echo Transforming @path && \"%25CommonProgramFiles(x86)%25\Microsoft Shared\TextTemplating\12.0\TextTransform.exe\" @file"</PreBuildEvent> + </PropertyGroup> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> diff --git a/VectoCore/Properties/AssemblyInfo.cs b/VectoCore/Properties/AssemblyInfo.cs index b8cf9458fc88b48c18c0fe9f6859c38a679a0867..417914863d34b28d66dbff8c426ee3f2cdebc0a7 100644 --- a/VectoCore/Properties/AssemblyInfo.cs +++ b/VectoCore/Properties/AssemblyInfo.cs @@ -1,40 +1,14 @@ using System.Reflection; using System.Runtime.InteropServices; -// 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("VectoCore")] [assembly: AssemblyDescription("Core Library for VECTO Simulations")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("VectoCore")] -[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. - [assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM - [assembly: Guid("b843f4c2-660b-4a3e-a336-c1f9c20aa993")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] - -[assembly: AssemblyVersion("3.0.*")] -[assembly: AssemblyFileVersion("3.0.0.0")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("VectoCoreTest")] \ No newline at end of file diff --git a/VectoCore/Properties/Version.cs b/VectoCore/Properties/Version.cs new file mode 100644 index 0000000000000000000000000000000000000000..b2ba9ed8753f5d2c6aca4dfc5398cdb79ddd9fc8 --- /dev/null +++ b/VectoCore/Properties/Version.cs @@ -0,0 +1,5 @@ +using System.Reflection; +// generated on 05.11.2015 11:37:29 +[assembly: AssemblyVersion("3.0.1.308")] +[assembly: AssemblyFileVersion("3.0.1.308")] + diff --git a/VectoCore/Properties/Version.tt b/VectoCore/Properties/Version.tt new file mode 100644 index 0000000000000000000000000000000000000000..d2a128cd5f45d0b169d4418477d3469a9a78cf59 --- /dev/null +++ b/VectoCore/Properties/Version.tt @@ -0,0 +1,10 @@ +<#@ template language="C#" #> +<#@ output extension=".cs"#> +using System.Reflection; +// generated on <#= DateTime.UtcNow.ToString() #> +[assembly: AssemblyVersion("3.0.1.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("3.0.1.<#= this.RevisionNumber #>")] + +<#+ + int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays; +#> \ No newline at end of file diff --git a/VectoCore/VectoCore.csproj b/VectoCore/VectoCore.csproj index 765e6bf46630c3013919656c21a8020ffb442b2c..f636ce113fd2e8f0d559cc106ee08e31a383d479 100644 --- a/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore.csproj @@ -12,6 +12,7 @@ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <CodeContractsAssemblyMode>1</CodeContractsAssemblyMode> + <NuGetPackageImportStamp>5f3566e7</NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -181,6 +182,11 @@ <Compile Include="Models\Simulation\Impl\DistanceRun.cs" /> <Compile Include="Models\Simulation\Impl\PowertrainBuilder.cs" /> <Compile Include="Models\Simulation\Impl\TimeRun.cs" /> + <Compile Include="Properties\Version.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Version.tt</DependentUpon> + </Compile> <Compile Include="Utils\DataTableExtensionMethods.cs" /> <Compile Include="Utils\EnumHelper.cs" /> <Compile Include="Utils\RessourceHelper.cs" /> @@ -289,6 +295,10 @@ <EmbeddedResource Include="Resources\Declaration\Report\cyclePageTemplate.pdf" /> <EmbeddedResource Include="Resources\Declaration\Report\title2CyclesTemplate.pdf" /> <EmbeddedResource Include="Resources\Declaration\Report\title3CyclesTemplate.pdf" /> + <None Include="Properties\Version.tt"> + <Generator>TextTemplatingFileGenerator</Generator> + <LastGenOutput>Version.cs</LastGenOutput> + </None> </ItemGroup> <ItemGroup> <EmbeddedResource Include="Resources\Declaration\Report\4x2r.png" /> @@ -299,7 +309,13 @@ <EmbeddedResource Include="Resources\Declaration\Report\6x2tt.png" /> <EmbeddedResource Include="Resources\Declaration\Report\Undef.png" /> </ItemGroup> + <ItemGroup> + <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent>forfiles /p "$(ProjectDir)." /m "*.tt" /s /c "cmd /c echo Transforming @path && \"%25CommonProgramFiles(x86)%25\Microsoft Shared\TextTemplating\12.0\TextTransform.exe\" @file"</PreBuildEvent> + </PropertyGroup> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild">