diff --git a/VECTO/GUI/EngineForm.vb b/VECTO/GUI/EngineForm.vb index a0161499b033c9fb7734754d48cbcc1f75f98e22..34e679d559085c8c5f6045c22e3377e8755f0b2f 100644 --- a/VECTO/GUI/EngineForm.vb +++ b/VECTO/GUI/EngineForm.vb @@ -67,8 +67,21 @@ Public Class EngineForm If Not Cfg.DeclMode Then Exit Sub + Dim gbxType as GearboxType = GearboxType.AMT + + Dim jobFile As String = VectoJobForm.VectoFile + If Not jobFile Is Nothing AndAlso File.Exists(jobFile) Then + + Dim inputData As IEngineeringInputDataProvider = TryCast(JSONInputDataFactory.ReadJsonJob(jobFile), + IEngineeringInputDataProvider) + If (not inputData Is Nothing) Then + Dim gbx as IGearboxDeclarationInputData = inputData.JobInputData.Vehicle.GearboxInputData + gbxType = gbx.Type + End If + End If + TbInertia.Text = DeclarationData.Engine.EngineInertia((TbDispl.Text.ToDouble(0.0)/1000.0/1000.0).SI (Of CubicMeter), - GearboxType.AMT).ToGUIFormat() + gbxType).ToGUIFormat() End Sub diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb index c1a30f50dc1e9c01a17ade1c32cd76f70f9c704c..2e72d6382d4564aa140281742f692dd662a9c799 100644 --- a/VECTO/GUI/GearboxForm.vb +++ b/VECTO/GUI/GearboxForm.vb @@ -911,9 +911,9 @@ Public Class GearboxForm If (vehicle.Axles.Count < 2) Then Return Nothing End If - rdyn = vehicle.Axles.Where(Function(axle) axle.AxleType = AxleType.VehicleDriven) _ - .Select(Function(da) DeclarationData.Wheels.Lookup(da.Tyre.Dimension).DynamicTyreRadius) _ - .Average() + rdyn = vehicle.Axles.Where(Function(axle) axle.AxleType = AxleType.VehicleDriven) _ + .Select(Function(da) DeclarationData.Wheels.Lookup(da.Tyre.Dimension).DynamicTyreRadius) _ + .Average() End If If (rDyn.IsEqual(0)) Then Return Nothing diff --git a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj index b025d4a954b716a56d672da705837ab1934fe6cc..625ae6cc108fd7ba0f2c78a68f722c14d1bcf530 100644 --- a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj +++ b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -25,6 +26,8 @@ </SccAuxPath> <SccProvider> </SccProvider> + <NuGetPackageImportStamp> + </NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -421,6 +424,12 @@ </Choose> <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props'))" /> + </Target> <!-- 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/VECTOAux/VectoAuxiliariesTests/packages.config b/VECTOAux/VectoAuxiliariesTests/packages.config index c615f29bd01bb471852f2ea9a9712f455efdc6db..281208f4b1fba200a1f50be59edd8570305ce410 100644 --- a/VECTOAux/VectoAuxiliariesTests/packages.config +++ b/VECTOAux/VectoAuxiliariesTests/packages.config @@ -3,4 +3,5 @@ <package id="Moq" version="4.2.1510.2205" targetFramework="net40" /> <package id="Newtonsoft.Json" version="8.0.3" targetFramework="net40" requireReinstallation="True" /> <package id="NUnit" version="3.7.1" targetFramework="net45" /> + <package id="NUnit3TestAdapter" version="3.12.0" targetFramework="net45" /> </packages> \ No newline at end of file diff --git a/VectoCommon/VectoHashingTest/VectoHashingTest.csproj b/VectoCommon/VectoHashingTest/VectoHashingTest.csproj index 42f336719fd30aa8246de221fbe86ef27002db93..b96d30f89a4546a8d5a39d10026d50470aaf8487 100644 --- a/VectoCommon/VectoHashingTest/VectoHashingTest.csproj +++ b/VectoCommon/VectoHashingTest/VectoHashingTest.csproj @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -16,6 +17,8 @@ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> <IsCodedUITest>False</IsCodedUITest> <TestProjectType>UnitTest</TestProjectType> + <NuGetPackageImportStamp> + </NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -199,6 +202,12 @@ </Choose> <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props'))" /> + </Target> <!-- 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/VectoCommon/VectoHashingTest/packages.config b/VectoCommon/VectoHashingTest/packages.config index 48fcf5ddc6a1e5ad74b420bca1cd07f5f1d20c4e..44ccea325df5493cd292b80dc612e9fd0afe0ea2 100644 --- a/VectoCommon/VectoHashingTest/packages.config +++ b/VectoCommon/VectoHashingTest/packages.config @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="NUnit" version="3.7.1" targetFramework="net45" /> + <package id="NUnit3TestAdapter" version="3.12.0" targetFramework="net45" /> </packages> \ No newline at end of file diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 79c76a037b6544c50299b29d909e1bfdf498bd4a..a27b66197fba483afc8074232af195964c8150e7 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -20,7 +20,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG</DefineConstants> + <DefineConstants>DEBUG;BETA_RELEASE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> diff --git a/VectoCore/VectoCoreTest/VectoCoreTest.csproj b/VectoCore/VectoCoreTest/VectoCoreTest.csproj index 3d82ab74837ad682ad6adcb7426ee7b5509fa310..2db98b2cdafb6f477ef5a410b89ce69aa3ec606a 100644 --- a/VectoCore/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCore/VectoCoreTest/VectoCoreTest.csproj @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props')" /> <Import Project="..\..\packages\NUnit3TestAdapter.3.8.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\..\packages\NUnit3TestAdapter.3.8.0\build\net35\NUnit3TestAdapter.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -2897,6 +2898,7 @@ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\..\packages\NUnit3TestAdapter.3.8.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NUnit3TestAdapter.3.8.0\build\net35\NUnit3TestAdapter.props'))" /> + <Error Condition="!Exists('..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NUnit3TestAdapter.3.12.0\build\net35\NUnit3TestAdapter.props'))" /> </Target> <!-- 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. diff --git a/VectoCore/VectoCoreTest/packages.config b/VectoCore/VectoCoreTest/packages.config index d3f6a12509f89ed83547b6da854ee504d892fc74..1e99513b47dd35cd84c61fba74921bbcbf64b6f1 100644 --- a/VectoCore/VectoCoreTest/packages.config +++ b/VectoCore/VectoCoreTest/packages.config @@ -3,4 +3,5 @@ <package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" /> <package id="NLog" version="4.2.3" targetFramework="net45" /> <package id="NUnit" version="3.7.1" targetFramework="net45" /> + <package id="NUnit3TestAdapter" version="3.12.0" targetFramework="net45" /> </packages> \ No newline at end of file