diff --git a/VECTO3GUI2020/App.config b/VECTO3GUI2020/App.config index a19dee83ebc8f82210bba163a5e1addf19cd0d25..55c4aebced4c762c50554c2a2d6d987e30f2f4a8 100644 --- a/VECTO3GUI2020/App.config +++ b/VECTO3GUI2020/App.config @@ -42,6 +42,14 @@ <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> + </dependentAssembly> </assemblyBinding> </runtime> </configuration> \ No newline at end of file diff --git a/VECTO3GUI2020/MainWindow.xaml b/VECTO3GUI2020/MainWindow.xaml index a0a3a80ffade2c760efa51bf512dc669a704c3fa..cd6168a435e9a2eb0ea9218aad5399bef7d6b2fc 100644 --- a/VECTO3GUI2020/MainWindow.xaml +++ b/VECTO3GUI2020/MainWindow.xaml @@ -7,11 +7,12 @@ xmlns:Implementation="clr-namespace:VECTO3GUI2020.ViewModel.Implementation" d:DataContext="{d:DesignInstance Type=Implementation:MainWindowViewModel}" x:Class="VECTO3GUI2020.MainWindow" mc:Ignorable="d" Title="Vecto" Height="450" Width="820" - WindowStartupLocation="CenterScreen"> + WindowStartupLocation="CenterScreen" + AutomationProperties.Name="MainWindow"> - <Grid> + <Grid x:Name="Grid" > <Grid.ColumnDefinitions> <ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions> @@ -23,7 +24,7 @@ <Grid Grid.Row="0"> <StackPanel Orientation="Vertical"> - <Menu IsMainMenu="True"> + <Menu x:Name="menu" IsMainMenu="True"> <MenuItem Header="File" VerticalAlignment="Stretch"> <MenuItem Header="Settings" Command="{Binding OpenSettings}"/> <MenuItem Header="New File" Command="{Binding NewInterimFile}"/> @@ -38,7 +39,7 @@ </Grid> <Grid Grid.Row="2" Margin="0,0,0,0"> - <ContentControl Content="{Binding CurrentViewModelBottom}"/> + <ContentControl Name="ContentControlBottom" Content="{Binding CurrentViewModelBottom}"/> </Grid> </Grid> diff --git a/VECTO3GUI2020/Ninject/DocumentModule.cs b/VECTO3GUI2020/Ninject/DocumentModule.cs index b989696e777d65d62950502aee7ac1d4c742470f..8e2f284c2f865e218d820bbef3cef9a0cfdbedcd 100644 --- a/VECTO3GUI2020/Ninject/DocumentModule.cs +++ b/VECTO3GUI2020/Ninject/DocumentModule.cs @@ -16,6 +16,8 @@ namespace VECTO3GUI2020.Ninject { Bind<IDocumentViewModel>().To<DeclarationJobViewModel>().Named(XmlDocumentType.DeclarationJobData.ToString()); + Bind<IDocumentViewModel>().To<MultiStageJobViewModel_v0_1>() + .Named(XmlDocumentType.MultistageOutputData.ToString()); //Bind<IDocumentViewModel>().To<MultistageJobViewModel>().Named(XmlDocumentType.MultistageOutputData.ToString()); //Bind<IDocumentViewModel>().To<DeclarationTrailerJobDocumentViewModel>().Named(XmlDocumentType.DeclarationTrailerJobData.ToString()); diff --git a/VECTO3GUI2020/Properties/BusStrings.Designer.cs b/VECTO3GUI2020/Properties/BusStrings.Designer.cs new file mode 100644 index 0000000000000000000000000000000000000000..e17be8e7d5c36f7341ad3e5d3df6f1d66e16f4aa --- /dev/null +++ b/VECTO3GUI2020/Properties/BusStrings.Designer.cs @@ -0,0 +1,216 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace VECTO3GUI2020.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class BusStrings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal BusStrings() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VECTO3GUI2020.Properties.BusStrings", typeof(BusStrings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// <summary> + /// Looks up a localized string similar to Airdrag Area 0. + /// </summary> + public static string AirdragArea0 { + get { + return ResourceManager.GetString("AirdragArea0", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to ATP Eco Roll Release Lockup Clutch. + /// </summary> + public static string ATEcoRollReleaseLockupClutch { + get { + return ResourceManager.GetString("ATEcoRollReleaseLockupClutch", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Compressor Drive. + /// </summary> + public static string CompressorDrive { + get { + return ResourceManager.GetString("CompressorDrive", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Corrected Actual Mass. + /// </summary> + public static string CurbmassChassis { + get { + return ResourceManager.GetString("CurbmassChassis", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Eco Roll Type. + /// </summary> + public static string EcoRollTypeNullable { + get { + return ResourceManager.GetString("EcoRollTypeNullable", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Engine Stop Start. + /// </summary> + public static string EngineStopStartNullable { + get { + return ResourceManager.GetString("EngineStopStartNullable", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Entrance Height. + /// </summary> + public static string EntranceHeightInMm { + get { + return ResourceManager.GetString("EntranceHeightInMm", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Tech. Perm. Max. Laden Mass. + /// </summary> + public static string GrossVehicleMassRating { + get { + return ResourceManager.GetString("GrossVehicleMassRating", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Height. + /// </summary> + public static string HeightInMm { + get { + return ResourceManager.GetString("HeightInMm", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Legislative Category. + /// </summary> + public static string LegislativeClass { + get { + return ResourceManager.GetString("LegislativeClass", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Length. + /// </summary> + public static string LengthInMm { + get { + return ResourceManager.GetString("LengthInMm", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Manufacturer. + /// </summary> + public static string Manufacturer { + get { + return ResourceManager.GetString("Manufacturer", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Predictive Cruise Control. + /// </summary> + public static string PredictiveCruiseControlNullable { + get { + return ResourceManager.GetString("PredictiveCruiseControlNullable", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Ng Tank System. + /// </summary> + public static string TankSystem { + get { + return ResourceManager.GetString("TankSystem", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Transferred Airdrag Area. + /// </summary> + public static string TransferredAirDragArea { + get { + return ResourceManager.GetString("TransferredAirDragArea", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Bodywork Code. + /// </summary> + public static string VehicleCode { + get { + return ResourceManager.GetString("VehicleCode", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Width. + /// </summary> + public static string WidthInMm { + get { + return ResourceManager.GetString("WidthInMm", resourceCulture); + } + } + } +} diff --git a/VECTO3GUI2020/Properties/BusStrings.resx b/VECTO3GUI2020/Properties/BusStrings.resx new file mode 100644 index 0000000000000000000000000000000000000000..d32171bef157809e056d70370d2423ec71b28d25 --- /dev/null +++ b/VECTO3GUI2020/Properties/BusStrings.resx @@ -0,0 +1,171 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="AirdragArea0" xml:space="preserve"> + <value>Airdrag Area 0</value> + </data> + <data name="ATEcoRollReleaseLockupClutch" xml:space="preserve"> + <value>ATP Eco Roll Release Lockup Clutch</value> + </data> + <data name="CompressorDrive" xml:space="preserve"> + <value>Compressor Drive</value> + </data> + <data name="CurbmassChassis" xml:space="preserve"> + <value>Corrected Actual Mass</value> + </data> + <data name="EcoRollTypeNullable" xml:space="preserve"> + <value>Eco Roll Type</value> + </data> + <data name="EngineStopStartNullable" xml:space="preserve"> + <value>Engine Stop Start</value> + </data> + <data name="EntranceHeightInMm" xml:space="preserve"> + <value>Entrance Height</value> + </data> + <data name="GrossVehicleMassRating" xml:space="preserve"> + <value>Tech. Perm. Max. Laden Mass</value> + </data> + <data name="HeightInMm" xml:space="preserve"> + <value>Height</value> + </data> + <data name="LegislativeClass" xml:space="preserve"> + <value>Legislative Category</value> + </data> + <data name="LengthInMm" xml:space="preserve"> + <value>Length</value> + </data> + <data name="Manufacturer" xml:space="preserve"> + <value>Manufacturer</value> + </data> + <data name="PredictiveCruiseControlNullable" xml:space="preserve"> + <value>Predictive Cruise Control</value> + </data> + <data name="TankSystem" xml:space="preserve"> + <value>Ng Tank System</value> + </data> + <data name="TransferredAirDragArea" xml:space="preserve"> + <value>Transferred Airdrag Area</value> + </data> + <data name="VehicleCode" xml:space="preserve"> + <value>Bodywork Code</value> + </data> + <data name="WidthInMm" xml:space="preserve"> + <value>Width</value> + </data> +</root> \ No newline at end of file diff --git a/VECTO3GUI2020/Properties/Strings.Designer.cs b/VECTO3GUI2020/Properties/Strings.Designer.cs index 89bcc4dc547641e67f3dc60b23e4d2f61354ada5..9bfed0555c237947cc2e509e186c08c8abc4b441 100644 --- a/VECTO3GUI2020/Properties/Strings.Designer.cs +++ b/VECTO3GUI2020/Properties/Strings.Designer.cs @@ -97,7 +97,7 @@ namespace VECTO3GUI2020.Properties { } /// <summary> - /// Looks up a localized string similar to Heater Power. + /// Looks up a localized string similar to Auxiliary Heater Power. /// </summary> public static string AuxHeaterPower { get { diff --git a/VECTO3GUI2020/Properties/Strings.resx b/VECTO3GUI2020/Properties/Strings.resx index ae1fe2220c2a1ef102fc18eae4a3bee106b94fed..a9a089d6adcf5cf41b444bd8221589f4c39cba33 100644 --- a/VECTO3GUI2020/Properties/Strings.resx +++ b/VECTO3GUI2020/Properties/Strings.resx @@ -233,7 +233,7 @@ <value>Air Electric Heater</value> </data> <data name="AuxHeaterPower" xml:space="preserve"> - <value>Heater Power</value> + <value>Auxiliary Heater Power</value> </data> <data name="BrakelightsLED" xml:space="preserve"> <value>Brake Lights LED</value> diff --git a/VECTO3GUI2020/Resources/ObjectProvider.xaml b/VECTO3GUI2020/Resources/ObjectProvider.xaml index 3a81ded5705d19ff629abc157468c868091a9a04..1c858f64f60896d10c1172ad92ddc26a8d65996b 100644 --- a/VECTO3GUI2020/Resources/ObjectProvider.xaml +++ b/VECTO3GUI2020/Resources/ObjectProvider.xaml @@ -1,7 +1,11 @@ <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:helper="clr-namespace:VECTO3GUI2020.Helper"> + xmlns:helper="clr-namespace:VECTO3GUI2020.Helper" + xmlns:properties="clr-namespace:VECTO3GUI2020.Properties" + xmlns:resources="clr-namespace:System.Resources;assembly=mscorlib"> <ObjectDataProvider x:Key="milimeterDummy" ObjectType="{x:Type helper:ConvertedSIDummyCreator}" MethodName="CreateMillimeterDummy"/> + + <ObjectDataProvider x:Key="BusStringResourceManager" ObjectType="{x:Type resources:ResourceManager}" ObjectInstance="{x:Static properties:BusStrings.ResourceManager}"/> </ResourceDictionary> \ No newline at end of file diff --git a/VECTO3GUI2020/VECTO3GUI2020.csproj b/VECTO3GUI2020/VECTO3GUI2020.csproj index 68c4221d5862a07679ee2355f34180f75a1c6019..609d62c169e619107a966753d14ab712434bad12 100644 --- a/VECTO3GUI2020/VECTO3GUI2020.csproj +++ b/VECTO3GUI2020/VECTO3GUI2020.csproj @@ -59,11 +59,17 @@ <Reference Include="InteractiveDataDisplay.WPF, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\packages\InteractiveDataDisplay.WPF.1.0.0\lib\net452\InteractiveDataDisplay.WPF.dll</HintPath> </Reference> + <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> + </Reference> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.Maps.MapControl.WPF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\packages\Microsoft.Maps.MapControl.WPF.1.0.0.3\lib\net40-Client\Microsoft.Maps.MapControl.WPF.dll</HintPath> </Reference> + <Reference Include="Microsoft.Toolkit.Mvvm, Version=7.0.0.0, Culture=neutral, PublicKeyToken=4aff67a105548ee2, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Toolkit.Mvvm.7.0.2\lib\netstandard2.0\Microsoft.Toolkit.Mvvm.dll</HintPath> + </Reference> <Reference Include="Microsoft.VisualStudio.DebuggerVisualizers, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath> @@ -82,8 +88,22 @@ </Reference> <Reference Include="PresentationFramework.Aero2" /> <Reference Include="System" /> + <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath> + </Reference> + <Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath> + </Reference> + <Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> + <Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath> + </Reference> + <Reference Include="System.Numerics" /> + <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath> + </Reference> <Reference Include="System.Reactive, Version=5.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL"> <HintPath>..\packages\System.Reactive.5.0.0\lib\net472\System.Reactive.dll</HintPath> </Reference> @@ -148,6 +168,11 @@ <Compile Include="Ninject\MultistageLazyDependencies.cs" /> <Compile Include="Ninject\MultistageModule.cs" /> <Compile Include="Properties\Annotations.cs" /> + <Compile Include="Properties\BusStrings.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>BusStrings.resx</DependentUpon> + </Compile> <Compile Include="Test.xaml.cs"> <DependentUpon>Test.xaml</DependentUpon> </Compile> @@ -634,6 +659,10 @@ <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> + <EmbeddedResource Include="Properties\BusStrings.resx"> + <Generator>PublicResXFileCodeGenerator</Generator> + <LastGenOutput>BusStrings.Designer.cs</LastGenOutput> + </EmbeddedResource> <EmbeddedResource Include="Properties\Strings.resx"> <Generator>PublicResXFileCodeGenerator</Generator> <LastGenOutput>Strings.Designer.cs</LastGenOutput> diff --git a/VECTO3GUI2020/ViewModel/Implementation/JobListViewModel.cs b/VECTO3GUI2020/ViewModel/Implementation/JobListViewModel.cs index 014b95dc66735ba0c4d905237ddba2ac2db8dd0e..7e22eb3e0204d773bbe4a1104cb5cf72c9115175 100644 --- a/VECTO3GUI2020/ViewModel/Implementation/JobListViewModel.cs +++ b/VECTO3GUI2020/ViewModel/Implementation/JobListViewModel.cs @@ -4,13 +4,19 @@ using System; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; +using System.Threading.Tasks; +using System.Windows; using System.Windows.Input; +using Microsoft.Toolkit.Mvvm.Input; +using Microsoft.WindowsAPICodePack.Shell.PropertySystem; +using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCore.InputData.FileIO.XML; using TUGraz.VectoCore.Utils; +using VECTO3GUI2020.Annotations; using VECTO3GUI2020.Helper; using VECTO3GUI2020.Model.Interfaces; using VECTO3GUI2020.Properties; -using VECTO3GUI2020.Util; using VECTO3GUI2020.ViewModel.Implementation.Common; using VECTO3GUI2020.ViewModel.Interfaces; using VECTO3GUI2020.ViewModel.Interfaces.Document; @@ -18,6 +24,7 @@ using VECTO3GUI2020.ViewModel.MultiStage.Implementation; using VECTO3GUI2020.ViewModel.MultiStage.Interfaces; using VECTO3GUI2020.Views; using IDocumentViewModel = VECTO3GUI2020.ViewModel.Interfaces.Document.IDocumentViewModel; +using RelayCommand = VECTO3GUI2020.Util.RelayCommand; namespace VECTO3GUI2020.ViewModel.Implementation { @@ -43,6 +50,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation private BackgroundWorker fileReadingBackgroundWorker; + private ObservableCollection<IDocumentViewModel> _jobs = new ObservableCollection<IDocumentViewModel>(); public ObservableCollection<IDocumentViewModel> Jobs{ get => _jobs; set => SetProperty(ref _jobs, value);} @@ -51,17 +59,24 @@ namespace VECTO3GUI2020.ViewModel.Implementation private IDocumentViewModelFactory _documentViewModelFactory; private ICommand _newMultiStageFileCommand; private IMultiStageViewModelFactory _multiStageViewModelFactory; + private IAsyncRelayCommand _addJobAsync; + private readonly IXMLInputDataReader _inputDataReader; #endregion + + public JobListViewModel() { + InitFileBackGroundWorker(); + } public JobListViewModel(IDocumentViewModelFactory documentViewModelFactory, + IXMLInputDataReader inputDataReader, IDialogHelper dialogHelper, IWindowHelper windowHelper, IMultiStageViewModelFactory multiStageViewModelFactory) : this() @@ -69,6 +84,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation _documentViewModelFactory = documentViewModelFactory; _dialogHelper = dialogHelper; _windowHelper = windowHelper; + _inputDataReader = inputDataReader; _multiStageViewModelFactory = multiStageViewModelFactory; } @@ -78,20 +94,29 @@ namespace VECTO3GUI2020.ViewModel.Implementation { fileReadingBackgroundWorker = new BackgroundWorker { - WorkerReportsProgress = false + WorkerReportsProgress = true }; fileReadingBackgroundWorker.DoWork += fileworker_DoWork; fileReadingBackgroundWorker.ProgressChanged += fileworker_ProgressChanged; fileReadingBackgroundWorker.RunWorkerCompleted += fileworker_RunWorkerCompleted; } + private void fileworker_ProgressChanged(object sender, ProgressChangedEventArgs e) + { + Debug.WriteLine(e.ProgressPercentage); + } + + public void JobDataGrid_OnDrop(object sender, DragEventArgs e) + { + throw new System.NotImplementedException(); + } #region Commands - public ICommand NewManufacturingStageFile + public ICommand NewManufacturingStageFile { get { @@ -104,6 +129,62 @@ namespace VECTO3GUI2020.ViewModel.Implementation _windowHelper.ShowWindow(_multiStageViewModelFactory.GetNewMultistageJobViewModel()); } + public IAsyncRelayCommand AddJobAsyncCommand + { + get + { + return _addJobAsync ?? new AsyncRelayCommand(AddJobExecuteAsync + , () => true); + } + } + + private async Task<IDocumentViewModel> AddJobExecuteAsync() + { + var fileName = _dialogHelper.OpenXMLFileDialog(); + if (fileName != null) { + return await AddJobAsync(fileName); + } + + return null; + + } + + public async Task<IDocumentViewModel> AddJobAsync(string fileName) + { + if (fileName != null) { + try { + var result = await LoadFileAsync(fileName); + Jobs.Add(result); + return result; + } catch (Exception e) { + var errorString = ""; + errorString = $"{fileName}\n"; + errorString += e.Message; + _dialogHelper.ShowMessageBox(errorString, "Error", MessageBoxButton.OK, MessageBoxImage.Error); + } + } + + + return null; + } + + private Task<IDocumentViewModel> LoadFileAsync([NotNull] string fileName) + { + var xElement = new System.Xml.XmlDocument(); + xElement.Load(fileName); + + var documentType = XMLHelper.GetDocumentType(xElement?.DocumentElement?.LocalName); + if (documentType == XmlDocumentType.MultistageOutputData) { + var inputDataProvider = _inputDataReader.Create(fileName) as IMultistageBusInputDataProvider; + return Task.FromResult(_multiStageViewModelFactory.GetMultiStageJobViewModel(inputDataProvider) as IDocumentViewModel); + } else { + throw new VectoXMLException($"{documentType.ToString()} not supported"); + } + + return null; + } + + public ICommand AddJob { @@ -121,11 +202,12 @@ namespace VECTO3GUI2020.ViewModel.Implementation private void AddJobExecute() { + //Another possibility is to use IsAsync true property of Binding. IsLoading = true; var filename = _dialogHelper.OpenXMLFileDialog(); if (filename != null) { - fileReadingBackgroundWorker.RunWorkerAsync(filename); + LoadJob(filename); } else { @@ -133,12 +215,17 @@ namespace VECTO3GUI2020.ViewModel.Implementation } } + public void LoadJob([NotNull] string fileName) + { + fileReadingBackgroundWorker.RunWorkerAsync(fileName); + } + public ICommand EditJob { get { - return _editJobCommand ?? new RelayCommand<IJobViewModel>(EditJobExecute, + return _editJobCommand ?? new Util.RelayCommand<IJobViewModel>(EditJobExecute, (IJobViewModel jobentry) => { return (jobentry != null); @@ -163,7 +250,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation { get { - return _viewXMLCommand ?? new RelayCommand<IJobViewModel>(ViewXMLFileExecute, + return _viewXMLCommand ?? new Util.RelayCommand<IJobViewModel>(ViewXMLFileExecute, (IJobViewModel jobentry) => { return (jobentry != null); @@ -192,7 +279,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation { get { - return _removeJobCommand ?? new RelayCommand<IDocumentViewModel>(RemoveJobExecute, (IDocumentViewModel jobentry) => + return _removeJobCommand ?? new Util.RelayCommand<IDocumentViewModel>(RemoveJobExecute, (IDocumentViewModel jobentry) => { return (jobentry != null); }); @@ -217,7 +304,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation { get { - return _moveJobUpCommand ?? new RelayCommand<IDocumentViewModel>(MoveJobUpExecute, (IDocumentViewModel jobentry) => + return _moveJobUpCommand ?? new Util.RelayCommand<IDocumentViewModel>(MoveJobUpExecute, (IDocumentViewModel jobentry) => { return (jobentry != null && Jobs.Count > 1 && Jobs.IndexOf(jobentry) != 0); }); @@ -243,7 +330,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation { get { - return _moveJobDownCommand ?? new RelayCommand<IDocumentViewModel>(MoveJobDownExecute, (IDocumentViewModel jobentry) => + return _moveJobDownCommand ?? new Util.RelayCommand<IDocumentViewModel>(MoveJobDownExecute, (IDocumentViewModel jobentry) => { return (jobentry != null && Jobs.Count > 1 && Jobs.IndexOf(jobentry) != Jobs.Count - 1); }); @@ -276,34 +363,32 @@ namespace VECTO3GUI2020.ViewModel.Implementation string filename = e.Argument as string; Debug.Assert(filename != null); - //TODO: update usage of GetDocumentType; - //Loading the file try { var xElement = new System.Xml.XmlDocument(); xElement.Load(filename); + var documentType = XMLHelper.GetDocumentType(xElement?.DocumentElement?.LocalName); if (documentType == null) { - Debug.WriteLine("Unknown Document Type"); + Debug.WriteLine("Unknown Document Type"); e.Cancel = true; return; } - var result = _documentViewModelFactory.CreateDocumentViewModel((XmlDocumentType)documentType, filename); + + + + var result = _documentViewModelFactory.CreateDocumentViewModel((XmlDocumentType)documentType, filename); e.Result = result; } catch (Exception) { - e.Cancel = true; + e.Cancel = true; throw; } } - void fileworker_ProgressChanged(object sender, ProgressChangedEventArgs e) - { - - } void fileworker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { diff --git a/VECTO3GUI2020/ViewModel/Interfaces/IJobListViewModel.cs b/VECTO3GUI2020/ViewModel/Interfaces/IJobListViewModel.cs index 03e44d2df9553fa167311b8c6c9554a74b32a778..6b09b8717c8fab496c4bae1091a04c2640d9cbce 100644 --- a/VECTO3GUI2020/ViewModel/Interfaces/IJobListViewModel.cs +++ b/VECTO3GUI2020/ViewModel/Interfaces/IJobListViewModel.cs @@ -1,4 +1,5 @@ using System.Collections.ObjectModel; +using System.Threading.Tasks; using System.Windows.Input; using VECTO3GUI2020.Model.Interfaces; using VECTO3GUI2020.ViewModel.Interfaces.Document; @@ -11,5 +12,6 @@ namespace VECTO3GUI2020.ViewModel.Interfaces ICommand EditJob { get; } ObservableCollection<IDocumentViewModel> Jobs { get; } ICommand NewManufacturingStageFile { get; } + Task<IDocumentViewModel> AddJobAsync(string fileName); } } diff --git a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs index e1524ad0a8afc56f392f06fbaeaaa8724b89423c..a5d94f3f09734aee490ef1db3e09e89e7e6bc323 100644 --- a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs +++ b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs @@ -70,6 +70,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation Dictionary<string, string> Errors { get; } IMultistageAirdragViewModel MultistageAirdragViewModel { get; set; } IMultistageAuxiliariesViewModel MultistageAuxiliariesViewModel { get; set; } + bool PrimaryVehicleHybridElectric { get; set; } void SetAirdragData(IAirdragDeclarationInputData airdragData); void SetVehicleInputData(IVehicleDeclarationInputData vehicleInputData); } @@ -96,6 +97,17 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation set => SetProperty(ref _multistageAuxiliariesViewModel, value); } + private bool _primaryVehicleHybridElectric; + public bool PrimaryVehicleHybridElectric + { + get => _primaryVehicleHybridElectric; + set + { + SetProperty(ref _primaryVehicleHybridElectric, value); + MultistageAuxiliariesViewModel.PrimaryVehicleHybridElectric = value; + } + } + #endregion public static readonly string INPUTPROVIDERTYPE = @@ -543,7 +555,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation private bool? _engineStopStartNullable; private EcoRollType? _ecoRollTypeNullable; private PredictiveCruiseControlType? _predictiveCruiseControlNullable; - + public IAdvancedDriverAssistantSystemDeclarationInputData ADAS diff --git a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/ManufacturingStageViewModel_v0_1.cs b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/ManufacturingStageViewModel_v0_1.cs index ae4fa9940d3b4d85fc9c30c304ed02ee30693684..c9559da36e055430e911d31b1bfea4b9976394a2 100644 --- a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/ManufacturingStageViewModel_v0_1.cs +++ b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/ManufacturingStageViewModel_v0_1.cs @@ -139,5 +139,6 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation public interface IManufacturingStageViewModel : IManufacturingStageInputData { void SetInputData(IVehicleDeclarationInputData vehicleInputData); + IMultistageVehicleViewModel VehicleViewModel { get; } } } diff --git a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/MultistageAuxiliariesViewModel.cs b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/MultistageAuxiliariesViewModel.cs index 4744da5fe314f4e04ff9386472f657c4a209180b..a4dd118e5b71a2321b0d447fde615d2a0531e78e 100644 --- a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/MultistageAuxiliariesViewModel.cs +++ b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/MultistageAuxiliariesViewModel.cs @@ -22,6 +22,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation { void SetAuxiliariesInputData(IBusAuxiliariesDeclarationData componentsAuxiliaryInputData); bool HasValues { get; } + object PrimaryVehicleHybridElectric { get; set; } } @@ -68,6 +69,13 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation } } + private object _primaryVehicleHybridElectric = false; + public object PrimaryVehicleHybridElectric + { + get => _primaryVehicleHybridElectric; + set => SetProperty(ref _primaryVehicleHybridElectric, value); + } + #region HVAC @@ -312,6 +320,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation } private CompressorDrive _compressorDrive; + public CompressorDrive CompressorDrive diff --git a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/MultistageJobViewModel_v0_1.cs b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/MultistageJobViewModel_v0_1.cs index f8647ffb1a012719179a0190cfc07b41ebab0c2d..29768682d4cbb9fe4badade2725211b329c39ee3 100644 --- a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/MultistageJobViewModel_v0_1.cs +++ b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/MultistageJobViewModel_v0_1.cs @@ -11,6 +11,7 @@ using System.Xml; using System.Xml.Linq; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; +using TUGraz.VectoCore.InputData.FileIO.JSON; using TUGraz.VectoCore.InputData.FileIO.XML; using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider; using TUGraz.VectoCore.Models.Simulation.Impl; @@ -33,7 +34,7 @@ using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation { - public interface IMultiStageJobViewModel : IDeclarationMultistageJobInputData, IMultistageVIFInputData, IMultistageBusInputDataProvider + public interface IMultiStageJobViewModel : IDeclarationMultistageJobInputData, IMultistageVIFInputData, IMultistageBusInputDataProvider, IJobViewModel, IEditViewModel { IManufacturingStageViewModel ManufacturingStageViewModel { get; } } @@ -57,6 +58,27 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation set => SetProperty(ref _manufacturingStageViewModel, value); } + public MultiStageJobViewModel_v0_1(IMultistageBusInputDataProvider inputData, IMultiStageViewModelFactory vmFactory, IMultistageDependencies multistageDependencies, IXMLInputDataReader inputDataReader) + { + + _dataSource = inputData.DataSource; + _jobInputData = inputData.JobInputData; + _inputData = inputData; + _vmFactory = vmFactory; + _consolidateManufacturingStage = _jobInputData.ConsolidateManufacturingStage; + _manufacturingStages = _jobInputData.ManufacturingStages; + _primaryVehicle = _jobInputData.PrimaryVehicle; + _dialogHelper = multistageDependencies.DialogHelperLazy; + _inputDataReader = inputDataReader; + _manufacturingStageViewModel = + vmFactory.GetManufacturingStageViewModel(_consolidateManufacturingStage); + + // QUESTION: HEV/PEV ? + //var hybridElectric = inputData.PrimaryVehicleData.Vehicle.HybridElectricHDV; + //_manufacturingStageViewModel.VehicleViewModel.PrimaryVehicleHybridElectric = hybridElectric; + _multistageDependencies = multistageDependencies; + } + #region Commands @@ -200,6 +222,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation private string _vehicleInputDataFilePath = null; private readonly IMultistageDependencies _multistageDependencies; private readonly DataSource _dataSource; + private readonly IMultistageBusInputDataProvider _inputData; public ICommand LoadVehicleDataCommand { @@ -244,26 +267,19 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation #endregion - public MultiStageJobViewModel_v0_1(IMultistageBusInputDataProvider inputData, IMultiStageViewModelFactory vmFactory, IMultistageDependencies multistageDependencies, IXMLInputDataReader inputDataReader) - { - _dataSource = inputData.DataSource; - _jobInputData = inputData.JobInputData; - _vmFactory = vmFactory; - _consolidateManufacturingStage = _jobInputData.ConsolidateManufacturingStage; - _manufacturingStages =_jobInputData.ManufacturingStages; - _primaryVehicle = _jobInputData.PrimaryVehicle; - _dialogHelper = multistageDependencies.DialogHelperLazy; - _inputDataReader = inputDataReader; - _manufacturingStageViewModel = - vmFactory.GetManufacturingStageViewModel(_consolidateManufacturingStage); - _multistageDependencies = multistageDependencies; - } + #region Implementation of IInputDataProvider + public string DocumentName => Path.GetFileNameWithoutExtension(_inputData.DataSource.SourceFile); + + public XmlDocumentType DocumentType => XmlDocumentType.MultistageOutputData; + public DataSource DataSource => _dataSource; + public IEditViewModel EditViewModel => this; + #endregion #region Implementation of IMultistageVIFInputData @@ -321,6 +337,12 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation } + #endregion + + #region Implementation of IEditViewModel + + public string Name => "Multistage"; + #endregion } diff --git a/VECTO3GUI2020/Views/CustomControls/CustomControlExtensionMethods.cs b/VECTO3GUI2020/Views/CustomControls/CustomControlExtensionMethods.cs index 39c340cab1c0b53be00821ad7b767b3d8b523926..9e20a7d91150eef7b68948a48496b9e6ec322127 100644 --- a/VECTO3GUI2020/Views/CustomControls/CustomControlExtensionMethods.cs +++ b/VECTO3GUI2020/Views/CustomControls/CustomControlExtensionMethods.cs @@ -2,26 +2,32 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using System.Net.NetworkInformation; using System.Resources; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using TUGraz.VectoCommon.Utils; +using VECTO3GUI2020.Annotations; namespace VECTO3GUI2020.Views.CustomControls { public static class CustomControlExtensionMethods { + + private static string unresolved = "unresolved"; + private static string _suffix = "_"; //used to mark properties; + /// <summary> /// Looks up the Label by the name the Property that is used for the binding /// </summary> /// <param name="dependencyProperty"></param> - /// <param name="resourceManager"></param> + /// <param name="resourceManagers">The resourceManagers where the name of the property will be looked up if</param> /// <returns></returns> - public static string GetLabelByPropertyName(this UserControl userControl, DependencyProperty dependencyProperty, ResourceManager resourceManager) + public static string GetLabelByPropertyName(this UserControl userControl, DependencyProperty dependencyProperty, params ResourceManager[] resourceManagers) { - var name = "unresolved"; + string name = null; var binding = userControl.GetBindingExpression(dependencyProperty); var propertyName = binding?.ResolvedSourcePropertyName; @@ -30,13 +36,29 @@ namespace VECTO3GUI2020.Views.CustomControls return name; } + foreach (var resourceManager in resourceManagers) { + var resolvedName = resourceManager?.GetString(propertyName); + if (resolvedName != null) { + name = resolvedName; + return name; + } + } + - var extendedPropertyName = binding?.ResolvedSource.GetType().Name + "_" + propertyName; - name = resourceManager?.GetString(extendedPropertyName) ?? resourceManager?.GetString(propertyName) ?? (propertyName + "_"); //_Postfix to label Property Names that are not in strings.resx + name = propertyName + _suffix; + + //var extendedPropertyName = binding?.ResolvedSource.GetType().Name + "_" + propertyName; + //name = resourceManager?.GetString(extendedPropertyName) ?? resourceManager?.GetString(propertyName) ?? (propertyName + "_"); //_Postfix to label Property Names that are not in strings.resx return name; } + public static string GetLabelByPropertyName(this UserControl userControl, DependencyProperty dependencyProperty, + [NotNull] ResourceManager resourceManager) + { + return GetLabelByPropertyName(userControl, dependencyProperty, resourceManagers:resourceManager); + } + public static Type GetPropertyType(this UserControl userControl, DependencyProperty dependencyProperty) { var Binding = userControl.GetBindingExpression(dependencyProperty); diff --git a/VECTO3GUI2020/Views/JoblistView.xaml b/VECTO3GUI2020/Views/JoblistView.xaml index 1498fe07bc94389bbf6ebb408054aa68a823e5fd..e73d67579a6737dbd733e8e10f9d7c6462e25843 100644 --- a/VECTO3GUI2020/Views/JoblistView.xaml +++ b/VECTO3GUI2020/Views/JoblistView.xaml @@ -6,6 +6,7 @@ xmlns:local="clr-namespace:VECTO3GUI2020.Views" xmlns:converter="clr-namespace:VECTO3GUI2020.Helper.Converter" xmlns:implementation="clr-namespace:VECTO3GUI2020.ViewModel.Implementation" d:DataContext="{d:DesignInstance Type=implementation:JobListViewModel}" mc:Ignorable="d" + AutomationProperties.Name="JobListView" d:DesignHeight="450" d:DesignWidth="1000"> <Grid> @@ -32,32 +33,33 @@ </Grid> </Border> <Grid Grid.Column="1"> - <Border BorderBrush="{StaticResource AccentColorButton}" BorderThickness="1"> - <StackPanel VerticalAlignment="Stretch"> - <DataGrid ItemsSource="{Binding Jobs}" - Name="JobDataGrid" - HorizontalAlignment="Stretch" - IsReadOnly="True" - CanUserReorderColumns="False" - AutoGenerateColumns="False" - SelectionMode="Single" - GridLinesVisibility="None" - HorizontalScrollBarVisibility="Disabled" - RowHeaderWidth="0" - ColumnHeaderHeight="30" - VerticalAlignment="Stretch" - VerticalContentAlignment="Stretch" - BorderThickness="0" - ColumnHeaderStyle="{StaticResource JobListDataGridHeaderStyle}" - Height="Auto" - RowHeight="30" - AlternatingRowBackground="LightGray" CellStyle="{DynamicResource DataGridCellStyle1}" - > + <Border BorderBrush="{StaticResource AccentColorButton}" BorderThickness="0" > + <DataGrid ItemsSource="{Binding Jobs}" + BorderBrush ="{StaticResource AccentColorButton}" BorderThickness="1" + Name="JobDataGrid" + HorizontalAlignment="Stretch" + IsReadOnly="True" + CanUserReorderColumns="False" + AutoGenerateColumns="False" + SelectionMode="Single" + GridLinesVisibility="None" + HorizontalScrollBarVisibility="Disabled" + RowHeaderWidth="0" + ColumnHeaderHeight="30" + VerticalAlignment="Stretch" + VerticalContentAlignment="Stretch" + AllowDrop="True" Drop="JobDataGrid_OnDrop" + PreviewDrop = "JobDataGrid_OnPreviewDrop" + ColumnHeaderStyle="{StaticResource JobListDataGridHeaderStyle}" + + RowHeight="30" + AlternatingRowBackground="LightGray" CellStyle="{DynamicResource DataGridCellStyle1}" + > <DataGrid.Columns> <DataGridTextColumn Header="Name" Binding="{Binding DocumentName}" Width="1*"></DataGridTextColumn> <DataGridTextColumn Header="Type" Binding="{Binding DocumentType}" Width="1*"></DataGridTextColumn> </DataGrid.Columns> - <DataGrid.RowDetailsTemplate> + <DataGrid.RowDetailsTemplate> <DataTemplate> <StackPanel Orientation="Vertical"> <Label x:Name="label" Content="Filename"/> @@ -65,15 +67,14 @@ </StackPanel> </DataTemplate> </DataGrid.RowDetailsTemplate> - <DataGrid.InputBindings> + <DataGrid.InputBindings> <MouseBinding MouseAction="LeftDoubleClick" Command="{Binding EditJob}" CommandParameter="{Binding ElementName=JobDataGrid, Path=SelectedItem}"></MouseBinding> </DataGrid.InputBindings> </DataGrid> - <Label x:Name="label" Content="Loading . . ." Visibility="{Binding IsLoading, Converter={StaticResource BooleanToVisibilityConverter}}"/> - </StackPanel> + <!--<Label x:Name="label" Content="Loading . . ." Visibility="{Binding IsLoading, Converter={StaticResource BooleanToVisibilityConverter}}"/>--> </Border> </Grid> <Grid Grid.Column="2"> @@ -81,7 +82,7 @@ <StackPanel > <Button x:Name="button3" Margin="4" HorizontalAlignment="Stretch" Style="{StaticResource MultiStageButtonStyle1}" - Command="{Binding AddJob}" Background="#FFDDDDDD"> + Command="{Binding AddJobAsyncCommand}" Background="#FFDDDDDD"> OpenFile</Button> <Button x:Name="button4" Margin ="4" HorizontalAlignment="Stretch" Style="{StaticResource MultiStageButtonStyle1}" diff --git a/VECTO3GUI2020/Views/JoblistView.xaml.cs b/VECTO3GUI2020/Views/JoblistView.xaml.cs index 0016ff85ba47f5089869cdf6ce8f3e868e028a38..b64cacf114f17b87aeb375903b41251c696ad156 100644 --- a/VECTO3GUI2020/Views/JoblistView.xaml.cs +++ b/VECTO3GUI2020/Views/JoblistView.xaml.cs @@ -1,4 +1,7 @@ -using System.Windows.Controls; +using System.Windows; +using System.Windows.Controls; +using VECTO3GUI2020.ViewModel.Implementation; +using VECTO3GUI2020.ViewModel.Interfaces; namespace VECTO3GUI2020.Views { @@ -7,9 +10,41 @@ namespace VECTO3GUI2020.Views /// </summary> public partial class JobListView : UserControl { - public JobListView() - { - InitializeComponent(); - } - } + + public JobListView() + { + InitializeComponent(); + + } + + + private void JobDataGrid_OnDrop(object sender, DragEventArgs e) + { + var success = true; + if (e.Data.GetDataPresent(DataFormats.FileDrop)) { + + + var fileNames = e.Data.GetData(DataFormats.FileDrop, true) as string[]; + if (fileNames != null) { + foreach (var fileName in fileNames) { + ((JobListViewModel)this.DataContext).AddJobAsync(fileName); + } + } + + } else { + success = false; + } + + if (!success) { + e.Effects = DragDropEffects.None; //DO NOT ACCEPT THE DROP + } + } + + private void JobDataGrid_OnPreviewDrop(object sender, DragEventArgs e) + { + if (!e.Data.GetDataPresent(DataFormats.FileDrop)) { + e.Effects = DragDropEffects.None; + } + } + } } diff --git a/VECTO3GUI2020/Views/Multistage/CustomControls/LabledTextBoxMultistage.xaml b/VECTO3GUI2020/Views/Multistage/CustomControls/LabledTextBoxMultistage.xaml index 70a9405da64668068b8b8f80ad368e5a6eeed25e..8cbe4833020ab645120abad5c0ce701ea2a7c60f 100644 --- a/VECTO3GUI2020/Views/Multistage/CustomControls/LabledTextBoxMultistage.xaml +++ b/VECTO3GUI2020/Views/Multistage/CustomControls/LabledTextBoxMultistage.xaml @@ -14,7 +14,13 @@ <ColumnDefinition Width="1*" SharedSizeGroup="N"/> </Grid.ColumnDefinitions> - <Label Content="{Binding LabelText, ElementName=labledTextBoxMultistage}"/> + <Label> + <PriorityBinding> + <Binding ElementName="lableTextBoxMultistage" Path="Label" Converter="{StaticResource NullToUnsetValue}"></Binding> + <Binding ElementName="labledTextBoxMultistage" Path="GeneratedLabelText"></Binding> + </PriorityBinding> + </Label> + <TextBox Grid.Column="1" Name ="TextBoxContent" VerticalAlignment="Center" Margin="2 0 2 0" Text="{Binding ElementName=labledTextBoxMultistage, Path=Content, Converter={StaticResourceExtension SIValueToStringConverter}, diff --git a/VECTO3GUI2020/Views/Multistage/CustomControls/LabledTextBoxMultistage.xaml.cs b/VECTO3GUI2020/Views/Multistage/CustomControls/LabledTextBoxMultistage.xaml.cs index 8fd84d304a34df546fd1f5c539263a198f576c5d..35a572c648b1d766b4c146d8c4e04d1baa79c903 100644 --- a/VECTO3GUI2020/Views/Multistage/CustomControls/LabledTextBoxMultistage.xaml.cs +++ b/VECTO3GUI2020/Views/Multistage/CustomControls/LabledTextBoxMultistage.xaml.cs @@ -63,13 +63,13 @@ namespace VECTO3GUI2020.Views.Multistage.CustomControls } - public static readonly DependencyProperty LabelTextProperty = DependencyProperty.Register( - "LabelText", typeof(string), typeof(LabledTextBoxMultistage), new PropertyMetadata(null)); + public static readonly DependencyProperty GeneratedLabelTextProperty = DependencyProperty.Register( + "GeneratedLabelText", typeof(string), typeof(LabledTextBoxMultistage), new PropertyMetadata(null)); - public string LabelText + public string GeneratedLabelText { - get { return (string)GetValue(LabelTextProperty); } - set { SetValue(LabelTextProperty, value); } + get { return (string)GetValue(GeneratedLabelTextProperty); } + set { SetValue(GeneratedLabelTextProperty, value); } } public static readonly DependencyProperty ModeProperty = DependencyProperty.Register( @@ -91,11 +91,11 @@ namespace VECTO3GUI2020.Views.Multistage.CustomControls labledTextBoxMultistage.DummyContent = labledTextBoxMultistage.CreateDummyContent(e, createEnum:labledTextBoxMultistage.Mode == MultistageParameterViewMode.COMBOBOX); - if (labledTextBoxMultistage.LabelText != null) + if (labledTextBoxMultistage.GeneratedLabelText != null) { return; } - labledTextBoxMultistage.LabelText = labledTextBoxMultistage.GetLabelByPropertyName( + labledTextBoxMultistage.GeneratedLabelText = labledTextBoxMultistage.GetLabelByPropertyName( LabledTextBoxMultistage.ContentProperty, Strings.ResourceManager); } diff --git a/VECTO3GUI2020/Views/Multistage/CustomControls/MultiStageParameter.xaml b/VECTO3GUI2020/Views/Multistage/CustomControls/MultiStageParameter.xaml index f98cf65220b7bd8e10e4894e676a6601ab0e44dd..3a9a0549a89212bb77ae222e32629eea1a0683d9 100644 --- a/VECTO3GUI2020/Views/Multistage/CustomControls/MultiStageParameter.xaml +++ b/VECTO3GUI2020/Views/Multistage/CustomControls/MultiStageParameter.xaml @@ -23,7 +23,12 @@ <ColumnDefinition Width="1*" SharedSizeGroup="N"/> </Grid.ColumnDefinitions> - <Label x:Name="label" Content="{Binding LabelText, ElementName=MultistageParameterControl}"></Label> + <Label x:Name="label" > + <PriorityBinding> + <Binding ElementName="MultistageParameterControl" Path="Label" Converter="{StaticResource NullToUnsetValue}"></Binding> + <Binding ElementName="MultistageParameterControl" Path="GeneratedLabelText"></Binding> + </PriorityBinding> + </Label> <CheckBox Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Name="CheckBox" Visibility="{Binding ShowCheckBox, ElementName=MultistageParameterControl, @@ -66,7 +71,12 @@ <ColumnDefinition Width="1*" SharedSizeGroup="N"/> </Grid.ColumnDefinitions> - <Label x:Name="label1" Content="{Binding LabelText, ElementName=MultistageParameterControl}"></Label> + <Label x:Name="label1"> + <PriorityBinding> + <Binding ElementName="MultistageParameterControl" Path="Label" Converter="{StaticResource NullToUnsetValue}"></Binding> + <Binding ElementName="MultistageParameterControl" Path="GeneratedLabelText"></Binding> + </PriorityBinding> + </Label> <CheckBox Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Name="CheckBoxCombo" Visibility="{Binding ShowCheckBox, ElementName=MultistageParameterControl, @@ -123,7 +133,12 @@ <ColumnDefinition Width="1*" SharedSizeGroup="N"/> </Grid.ColumnDefinitions> - <Label x:Name="label3" Content="{Binding LabelText, ElementName=MultistageParameterControl}"></Label> + <Label x:Name="label3"> + <PriorityBinding> + <Binding ElementName="MultistageParameterControl" Path="Label" Converter="{StaticResource NullToUnsetValue}"></Binding> + <Binding ElementName="MultistageParameterControl" Path="GeneratedLabelText"></Binding> + </PriorityBinding> + </Label> <CheckBox Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Name="CheckBoxCheckBox" Visibility="{Binding ShowCheckBox, ElementName=MultistageParameterControl, diff --git a/VECTO3GUI2020/Views/Multistage/CustomControls/MultiStageParameter.xaml.cs b/VECTO3GUI2020/Views/Multistage/CustomControls/MultiStageParameter.xaml.cs index 56b9132540b91478afe68c9529058223168266a6..6c5bcd53d3e429cb7b6990608dff992dfa1b6e5e 100644 --- a/VECTO3GUI2020/Views/Multistage/CustomControls/MultiStageParameter.xaml.cs +++ b/VECTO3GUI2020/Views/Multistage/CustomControls/MultiStageParameter.xaml.cs @@ -87,23 +87,45 @@ namespace VECTO3GUI2020.Views.Multistage.CustomControls set { SetValue(ModeProperty, value); } } + public static readonly DependencyProperty LabelProperty = DependencyProperty.Register( + "Label", typeof(string), typeof(MultiStageParameter), new PropertyMetadata(default(string))); + + public string Label + { + get { return (string)GetValue(LabelProperty); } + set { SetValue(LabelProperty, value); } + } - public static readonly DependencyProperty LabelTextProperty = DependencyProperty.Register( - "LabelText", typeof(string), typeof(MultiStageParameter), new PropertyMetadata(null)); + public static readonly DependencyProperty GeneratedLabelTextProperty = DependencyProperty.Register( + "GeneratedLabelText", typeof(string), typeof(MultiStageParameter), new PropertyMetadata(null)); - public string LabelText + public string GeneratedLabelText { - get { return (string)GetValue(LabelTextProperty); } - set { SetValue(LabelTextProperty, value); } + get { return (string)GetValue(GeneratedLabelTextProperty); } + set { SetValue(GeneratedLabelTextProperty, value); } } + public static readonly DependencyProperty NameLookUpResourceManagerProperty = DependencyProperty.Register( + "NameLookUpResourceManager", typeof(ResourceManager), typeof(MultiStageParameter), new PropertyMetadata(default(ResourceManager), NameLookUpResourceManagerChanged)); + + private static void NameLookUpResourceManagerChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var multistageParameter = (MultiStageParameter)d; + multistageParameter.SetLabelText(); + } + + public ResourceManager NameLookUpResourceManager + { + get { return (ResourceManager)GetValue(NameLookUpResourceManagerProperty); } + set { SetValue(NameLookUpResourceManagerProperty, value); } + } + + public static readonly DependencyProperty EditingEnabledProperty = DependencyProperty.Register( "EditingEnabled", typeof(bool), typeof(MultiStageParameter), new FrameworkPropertyMetadata( false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(EditingEnabledChanged))); - - public bool EditingEnabled { get @@ -200,9 +222,17 @@ namespace VECTO3GUI2020.Views.Multistage.CustomControls } - if (multiStageParameter.LabelText == null) { - multiStageParameter.LabelText = multiStageParameter.GetLabelByPropertyName( + if (multiStageParameter.GeneratedLabelText == null) { + multiStageParameter.SetLabelText(); + } + } + + public void SetLabelText() + { + if (Label == null) { + this.GeneratedLabelText = this.GetLabelByPropertyName( MultiStageParameter.ContentProperty, + this.NameLookUpResourceManager, Strings.ResourceManager); } } diff --git a/VECTO3GUI2020/Views/Multistage/ManufacturingStageAuxiliariesView.xaml b/VECTO3GUI2020/Views/Multistage/ManufacturingStageAuxiliariesView.xaml index 0b9e70fcc9d0f0d0b53feb6767ccb779ba5608a8..0efa6ea2f18f2d296816507deeb731c2fa21b114 100644 --- a/VECTO3GUI2020/Views/Multistage/ManufacturingStageAuxiliariesView.xaml +++ b/VECTO3GUI2020/Views/Multistage/ManufacturingStageAuxiliariesView.xaml @@ -59,6 +59,9 @@ ListItems="{Binding HeatPumpModePassengerCompartmentAllowedValues}" ShowCheckBox="False"/> <Separator/> + <!--<customControls:MultiStageParameter Mode="COMBOBOX" + PreviousContent="{Binding ConsolidatedInputData.PneumaticSupply.CompressorDrive}" + Content="{Binding CompressorDrive}"></customControls:MultiStageParameter>--> <customControls:MultiStageParameter Mode="TEXTBOX" Validation.ErrorTemplate="{DynamicResource multistageParameterControlErrorTemplate}" PreviousContent="{Binding ConsolidatedInputData.HVACAux.AuxHeaterPower}" @@ -72,16 +75,18 @@ <customControls:MultiStageParameter Mode="CHECKBOX" PreviousContent="{Binding ConsolidatedInputData.HVACAux.SeparateAirDistributionDucts}" Content="{Binding SeparateAirDistributionDucts}"/> + + <StackPanel Visibility="{Binding PrimaryVehicleHybridElectric, Converter={StaticResource BooleanToVisibilityConverter}}"> <customControls:MultiStageParameter Mode="CHECKBOX" - PreviousContent="{Binding ConsolidatedInputData.HVACAux.WaterElectricHeater}" - Content="{Binding WaterElectricHeater}"/> + PreviousContent="{Binding ConsolidatedInputData.HVACAux.WaterElectricHeater}" + Content="{Binding WaterElectricHeater}"/> <customControls:MultiStageParameter Mode="CHECKBOX" PreviousContent="{Binding ConsolidatedInputData.HVACAux.AirElectricHeater}" Content="{Binding AirElectricHeater}"/> <customControls:MultiStageParameter Mode="CHECKBOX" PreviousContent="{Binding ConsolidatedInputData.HVACAux.OtherHeatingTechnology}" Content="{Binding OtherHeatingTechnology}"/> - + </StackPanel> <Separator/> </StackPanel> </DockPanel> diff --git a/VECTO3GUI2020/Views/Multistage/VehicleView_v2_8.xaml b/VECTO3GUI2020/Views/Multistage/VehicleView_v2_8.xaml index a456f13b2c03dc6d2c06523657b39608076e2496..e10142f82367902087c5e473f7e81b48cbd052c0 100644 --- a/VECTO3GUI2020/Views/Multistage/VehicleView_v2_8.xaml +++ b/VECTO3GUI2020/Views/Multistage/VehicleView_v2_8.xaml @@ -4,9 +4,18 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VECTO3GUI2020.Views.Multistage" - xmlns:custom="clr-namespace:VECTO3GUI2020.Views.Multistage.CustomControls" xmlns:implementation="clr-namespace:VECTO3GUI2020.ViewModel.MultiStage.Implementation" d:DataContext="{d:DesignInstance Type=implementation:DeclarationInterimStageBusVehicleViewModel_v2_8}" + xmlns:custom="clr-namespace:VECTO3GUI2020.Views.Multistage.CustomControls" xmlns:implementation="clr-namespace:VECTO3GUI2020.ViewModel.MultiStage.Implementation" + xmlns:properties="clr-namespace:VECTO3GUI2020.Properties" + xmlns:resources="clr-namespace:System.Resources;assembly=mscorlib" + d:DataContext="{d:DesignInstance Type=implementation:DeclarationInterimStageBusVehicleViewModel_v2_8}" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" BorderBrush="{DynamicResource ButtonHighlightColor}" BorderThickness="2px" Margin="4px"> + <UserControl.Resources> + <Style TargetType="custom:MultiStageParameter"> + <!--<Setter Property="NameLookUpResourceManager" Value="{Binding Source=BusStringResourceManager}"></Setter>--> + <Setter Property="NameLookUpResourceManager" Value="{x:Static properties:BusStrings.ResourceManager}"></Setter> + </Style> + </UserControl.Resources> <Grid> <ScrollViewer> <DockPanel> @@ -43,6 +52,7 @@ <custom:MultiStageParameter x:Name="AirdragModified" + Label="Airdrag modified" Validation.ErrorTemplate="{StaticResource multistageParameterControlErrorTemplate}" EditingEnabled="{Binding AirdragModifiedMultistageEditingEnabled}" PreviousContent="{Binding ConsolidatedAirdragmodified}" diff --git a/VECTO3GUI2020/packages.config b/VECTO3GUI2020/packages.config index 0276e5449b4acc356224fcf078f00f9c1f866c08..858916a3f79f42e0406d5119d5d69b34c14416a4 100644 --- a/VECTO3GUI2020/packages.config +++ b/VECTO3GUI2020/packages.config @@ -2,10 +2,16 @@ <packages> <package id="Castle.Core" version="4.4.1" targetFramework="net48" /> <package id="InteractiveDataDisplay.WPF" version="1.0.0" targetFramework="net48" /> + <package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net48" /> <package id="Microsoft.Maps.MapControl.WPF" version="1.0.0.3" targetFramework="net48" /> + <package id="Microsoft.Toolkit.Mvvm" version="7.0.2" targetFramework="net48" /> <package id="Ninject" version="3.3.4" targetFramework="net48" /> <package id="Ninject.Extensions.ChildKernel" version="3.3.0" targetFramework="net48" /> <package id="Ninject.Extensions.Factory" version="3.3.3" targetFramework="net48" /> + <package id="System.Buffers" version="4.5.1" targetFramework="net48" /> + <package id="System.ComponentModel.Annotations" version="5.0.0" targetFramework="net48" /> + <package id="System.Memory" version="4.5.4" targetFramework="net48" /> + <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" /> <package id="System.Reactive" version="5.0.0" targetFramework="net48" /> <package id="System.Reactive.Core" version="5.0.0" targetFramework="net48" /> <package id="System.Reactive.Linq" version="5.0.0" targetFramework="net48" /> diff --git a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/123.VIF_Report_5.xml b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/123.VIF_Report_5.xml index b3433061102c1be274c50f29dc77ddb0528f1854..a73cb24e4ace7203954022ec67ebe52d6ed7a3f2 100644 --- a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/123.VIF_Report_5.xml +++ b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/123.VIF_Report_5.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<VectoOutputMultistage xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.6="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.6" xmlns:v2.8="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.8" xmlns:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1 E:\VECTO_DEV\fk_vecto-dev\VectoCore\VectoCore\Resources\XSD/VectoOutputMultistage.0.1.xsd"> +<VectoOutputMultistage xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.6="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.6" xmlns:v2.8="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.8" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1 E:\VECTO_DEV\fk_vecto-dev\VectoCore\VectoCore\Resources\XSD/VectoOutputMultistage.0.1.xsd"> <PrimaryVehicle> <Data id="text" xsi:type="PrimaryVehicleDataType"> <Vehicle xsi:type="VehiclePIFType"> @@ -809,7 +809,7 @@ </Signature> </ManufacturingStage> <ManufacturingStage stageCount="5"> - <Data xsi:type="BusManufacturingStageDataType" id="MST-8a622efa2f0145e684b7"> + <Data xsi:type="BusManufacturingStageDataType" id="MST-076becd8299f4cd6b7ed"> <HashPreviousStage> <di:Reference URI="#RESULT-8f30c7fe665a47938f7b"> <di:Transforms> @@ -820,78 +820,26 @@ <di:DigestValue>GHpFCKh1bu/YPwYj38kJK1uCrv++BTLf2OUZcOt43Os=</di:DigestValue> </di:Reference> </HashPreviousStage> - <Vehicle xsi:type="v2.8:InterimStageInputType" id="VEH-5cc3b782c52a421d8636"> - <v2.8:Manufacturer>Some Manufacturer</v2.8:Manufacturer> - <v2.8:ManufacturerAddress>Some Manufacturer Address</v2.8:ManufacturerAddress> - <v2.8:VIN>VEH-1234567890</v2.8:VIN> - <v2.8:Date>2021-05-09T22:00:00Z</v2.8:Date> - <v2.8:Model>Sample Bus Model</v2.8:Model> - <v2.8:LegislativeCategory>M3</v2.8:LegislativeCategory> - <v2.8:CorrectedActualMass>500</v2.8:CorrectedActualMass> - <v2.8:TechnicalPermissibleMaximumLadenMass>3500</v2.8:TechnicalPermissibleMaximumLadenMass> - <v2.8:AirdragModifiedMultistage>false</v2.8:AirdragModifiedMultistage> - <v2.8:NgTankSystem>Compressed</v2.8:NgTankSystem> - <v2.8:ClassBus>II+III</v2.8:ClassBus> - <v2.8:NumberPassengersLowerDeck>0</v2.8:NumberPassengersLowerDeck> - <v2.8:NumberPassengersUpperDeck>10</v2.8:NumberPassengersUpperDeck> - <v2.8:BodyworkCode>CB</v2.8:BodyworkCode> - <v2.8:LowEntry>false</v2.8:LowEntry> - <v2.8:HeightIntegratedBody>2500</v2.8:HeightIntegratedBody> - <v2.8:VehicleLength>0</v2.8:VehicleLength> - <v2.8:VehicleWidth>0</v2.8:VehicleWidth> - <v2.8:EntranceHeight>0</v2.8:EntranceHeight> - <v2.8:DoorDriveTechnology>electric</v2.8:DoorDriveTechnology> - <v2.8:VehicleDeclarationType>interim</v2.8:VehicleDeclarationType> - <v2.8:ADAS> - <v2.3:EngineStopStart>true</v2.3:EngineStopStart> - <v2.3:EcoRollWithoutEngineStop>false</v2.3:EcoRollWithoutEngineStop> - <v2.3:EcoRollWithEngineStop>false</v2.3:EcoRollWithEngineStop> - <v2.3:PredictiveCruiseControl>none</v2.3:PredictiveCruiseControl> - <v2.3:APTEcoRollReleaseLockupClutch>true</v2.3:APTEcoRollReleaseLockupClutch> - </v2.8:ADAS> - <v2.8:Components xmlns:v2.8="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.8" xsi:type="v2.8:CompletedVehicleComponentsDeclarationType"> - <v2.8:Auxiliaries> - <v2.8:Data xsi:type="v2.8:CompletedVehicleAuxiliaryDataDeclarationType"> - <v2.8:ElectricSystem> - <v2.8:LEDLights> - <v2.8:Interiorlights>false</v2.8:Interiorlights> - <v2.8:Dayrunninglights>true</v2.8:Dayrunninglights> - <v2.8:Positionlights>true</v2.8:Positionlights> - <v2.8:Brakelights>true</v2.8:Brakelights> - <v2.8:Headlights>false</v2.8:Headlights> - </v2.8:LEDLights> - </v2.8:ElectricSystem> - <v2.8:HVAC> - <v2.8:SystemConfiguration>0</v2.8:SystemConfiguration> - <v2.8:HeatPumpTypeDriverCompartment>none</v2.8:HeatPumpTypeDriverCompartment> - <v2.8:HeatPumpModeDriverCompartment>heating</v2.8:HeatPumpModeDriverCompartment> - <v2.8:HeatPumpTypePassengerCompartment>non R-744 2-stage</v2.8:HeatPumpTypePassengerCompartment> - <v2.8:HeatPumpModePassengerCompartment>cooling</v2.8:HeatPumpModePassengerCompartment> - <v2.8:AuxiliaryHeaterPower>50</v2.8:AuxiliaryHeaterPower> - <v2.8:DoubleGlazing>false</v2.8:DoubleGlazing> - <v2.8:AdjustableAuxiliaryHeater>true</v2.8:AdjustableAuxiliaryHeater> - <v2.8:SeparateAirDistributionDucts>false</v2.8:SeparateAirDistributionDucts> - <v2.8:WaterElectricHeater>true</v2.8:WaterElectricHeater> - <v2.8:AirElectricHeater>false</v2.8:AirElectricHeater> - <v2.8:OtherHeatingTechnology>false</v2.8:OtherHeatingTechnology> - </v2.8:HVAC> - </v2.8:Data> - </v2.8:Auxiliaries> - </v2.8:Components> + <Vehicle xsi:type="v2.8:InterimStageInputType" id="VEH-d76d03c792dc4a258381"> + <v2.8:Manufacturer>Manufq</v2.8:Manufacturer> + <v2.8:ManufacturerAddress>asdflköj</v2.8:ManufacturerAddress> + <v2.8:VIN>sadsadf</v2.8:VIN> + <v2.8:Date>2021-05-16T22:00:00Z</v2.8:Date> + <v2.8:VehicleDeclarationType>final</v2.8:VehicleDeclarationType> </Vehicle> <ApplicationInformation> <SimulationToolVersion>0.7.3.2171-DEV</SimulationToolVersion> - <Date>2021-05-10T11:15:01.2883833Z</Date> + <Date>2021-05-17T07:22:26.5083903Z</Date> </ApplicationInformation> </Data> <Signature> - <di:Reference URI="#MST-8a622efa2f0145e684b7"> + <di:Reference URI="#MST-076becd8299f4cd6b7ed"> <di:Transforms> <di:Transform Algorithm="urn:vecto:xml:2017:canonicalization" /> <di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> </di:Transforms> <di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /> - <di:DigestValue>Ikl36H/utDgp3JX2g/rJOWb3+GhUeJ4h90gVNz8IUQQ=</di:DigestValue> + <di:DigestValue>OuOo05XjBzDuVaiSHqbLWrQbHy5xdFaDCzNQnCLymYE=</di:DigestValue> </di:Reference> </Signature> </ManufacturingStage> diff --git a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/123.xml b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/123.xml index 49f28078a4cf663438bc501f24645eba2447431f..4cd626571f94b24788bfc1e1e8649718c98f53d7 100644 --- a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/123.xml +++ b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/123.xml @@ -1,28 +1,55 @@ <?xml version="1.0" encoding="utf-8"?> -<tns:VectoInputDeclaration xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationInput:v2.0" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.8" schemaVersion="2.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationJob V:\VectoCore\VectoCore\Resources\XSD\VectoDeclarationJob.xsd"> +<tns:VectoInputDeclaration xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationInput:v2.0" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.8" schemaVersion="2.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:di="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationJob V:\VectoCore\VectoCore\Resources\XSD\VectoDeclarationJob.xsd"> <v2.0:Vehicle id="TODO_ADDIDENTIFIER" xsi:type="InterimStageInputType"> <Manufacturer>Some Manufacturer</Manufacturer> <ManufacturerAddress>Some Manufacturer Address</ManufacturerAddress> <VIN>VEH-1234567890</VIN> - <Date>2021-05-02T22:00:00Z</Date> + <Date>2021-05-11T22:00:00Z</Date> <Model>Sample Bus Model</Model> <LegislativeCategory>M3</LegislativeCategory> <CorrectedActualMass>500</CorrectedActualMass> <TechnicalPermissibleMaximumLadenMass>3500</TechnicalPermissibleMaximumLadenMass> - <AirdragModifiedMultistage>false</AirdragModifiedMultistage> <NgTankSystem>Compressed</NgTankSystem> <ClassBus>II+III</ClassBus> - <VehicleCode>CB</VehicleCode> + <NumberPassengersLowerDeck>0</NumberPassengersLowerDeck> + <NumberPassengersUpperDeck>10</NumberPassengersUpperDeck> + <BodyworkCode>CB</BodyworkCode> <LowEntry>false</LowEntry> + <HeightIntegratedBody>2500</HeightIntegratedBody> + <VehicleLength>0</VehicleLength> + <VehicleWidth>0</VehicleWidth> + <EntranceHeight>0</EntranceHeight> <DoorDriveTechnology>electric</DoorDriveTechnology> - <DeclarationType>interim</DeclarationType> + <VehicleDeclarationType>interim</VehicleDeclarationType> <ADAS> - <v2.3:EngineStopStart>false</v2.3:EngineStopStart> + <v2.3:EngineStopStart>true</v2.3:EngineStopStart> <v2.3:EcoRollWithoutEngineStop>false</v2.3:EcoRollWithoutEngineStop> <v2.3:EcoRollWithEngineStop>false</v2.3:EcoRollWithEngineStop> <v2.3:PredictiveCruiseControl>none</v2.3:PredictiveCruiseControl> </ADAS> <Components xsi:type="CompletedVehicleComponentsDeclarationType"> + <AirDrag> + <v2.0:Data id="CabinX23h" xsi:type="v2.0:AirDragDataDeclarationType"> + <v2.0:Manufacturer>Generic Manufacturer</v2.0:Manufacturer> + <v2.0:Model>Generic Model</v2.0:Model> + <v2.0:CertificationNumber>e12*0815/8051*2017/05E0000*00</v2.0:CertificationNumber> + <v2.0:Date>2017-03-24T15:00:00Z</v2.0:Date> + <v2.0:AppVersion>Vecto AirDrag x.y</v2.0:AppVersion> + <v2.0:CdxA_0>6.31</v2.0:CdxA_0> + <v2.0:TransferredCdxA>6.32</v2.0:TransferredCdxA> + <v2.0:DeclaredCdxA>6.34</v2.0:DeclaredCdxA> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#CabinX23h"> + <di:Transforms> + <di:Transform Algorithm="urn:vecto:xml:2017:canonicalization" /> + <di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> + </di:Transforms> + <di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /> + <di:DigestValue>b9SHCfOoVrBxFQ8wwDK32OO+9bd85DuaUdgs6j/29N8=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </AirDrag> <Auxiliaries> <Data xsi:type="CompletedVehicleAuxiliaryDataDeclarationType"> <ElectricSystem>