Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 689b48f4 authored by Franz KOBER josef's avatar Franz KOBER josef
Browse files

Merge branch 'feature/VECTO-1410-multistage-tool-buses' of...

Merge branch 'feature/VECTO-1410-multistage-tool-buses' of git+ssh://129.27.107.191:2211/vecto-dev into feature/VECTO-1410-multistage-tool-buses

# Conflicts:
#	VectoCommon/VectoCommon/Resources/XMLNames.resx
#	VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.8/vecto_vehicle-stage_input_full-sample.xml
#	VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.8/vecto_vehicle-stage_input_only_mandatory_standard_value_airdrag.xml
parents b27993bf d3ec5c27
No related branches found
No related tags found
No related merge requests found
Showing
with 600 additions and 3667 deletions
Source diff could not be displayed: it is too large. Options to address this: view the blob.
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/XML/CSS/VectoReports.css"?>
<VectoOutput schemaVersion="0.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.5" xmlns:di="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.5 https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/XML/XSD/VectoOutputManufacturer.0.5.xsd">
<Data id="RESULT-bf220343fe634daa8708">
<Vehicle>
<VIN>1234</VIN>
<LegislativeClass>N2</LegislativeClass>
<VehicleGroup>2</VehicleGroup>
<AxleConfiguration>4x2</AxleConfiguration>
<GrossVehicleMass unit="t">12.0</GrossVehicleMass>
<CurbMassChassis unit="kg">4670</CurbMassChassis>
<PTO>false</PTO>
<Components>
<Engine>
<Model>175kW 6.8l Engine</Model>
<CertificationNumber>1234</CertificationNumber>
<DigestValue>JZmOioDqDbJWb3SWfxl/wSaxs9/WN5mLPh8vtJjs8Vs=</DigestValue>
<RatedPower unit="kW">0</RatedPower>
<IdlingSpeed unit="rpm">650</IdlingSpeed>
<RatedSpeed unit="rpm">2200</RatedSpeed>
<Displacement unit="ltr">6.9</Displacement>
<FuelType>Diesel CI</FuelType>
</Engine>
<Gearbox>
<Model>AT Serial</Model>
<CertificationMethod>Standard values</CertificationMethod>
<DigestValue>XopOvOsapfoRb6Px3dioaWrK2gzG4ICU22YvmCA3YEU=</DigestValue>
<TransmissionType>APT-S</TransmissionType>
<GearsCount>6</GearsCount>
<TransmissionRatioFinalGear>0.620</TransmissionRatioFinalGear>
</Gearbox>
<TorqueConverter>
<Model />
<CertificationMethod>Standard values</CertificationMethod>
<DigestValue />
</TorqueConverter>
<Retarder>
<RetarderType>None</RetarderType>
</Retarder>
<Axlegear>
<Model>N.A.</Model>
<CertificationMethod>Standard values</CertificationMethod>
<DigestValue>6SDJDUVv0NR59jxJVNVERv65KBwvwbqAPNuOa1b+3HM=</DigestValue>
<LineType>Single reduction axle</LineType>
<Ratio>6.200</Ratio>
</Axlegear>
<AirDrag>
<Model>N.A.</Model>
<CertificationMethod>Measured</CertificationMethod>
<CertificationNumber>1234</CertificationNumber>
<DigestValue>IkK48GO1AjmbFybyld4/BYI0ymwJTnaglLqwALludTw=</DigestValue>
<CdxA>4.83</CdxA>
</AirDrag>
<AxleWheels>
<Axle axleNumber="1">
<TyreDimension>265/70 R19.5</TyreDimension>
<TyreCertificationNumber>e12*0815/8051*2017/05E0000*00</TyreCertificationNumber>
<DigestValue>m5RsKXsyG5IZ5K397SrIGJjsuXbmdVOuTmdRY3RSdcM=</DigestValue>
<TyreRRCDeclared>0.0055</TyreRRCDeclared>
<TwinTyres>false</TwinTyres>
</Axle>
<Axle axleNumber="2">
<TyreDimension>265/70 R19.5</TyreDimension>
<TyreCertificationNumber>e12*0815/8051*2017/05E0000*00</TyreCertificationNumber>
<DigestValue>N8+9tAQ3TWT7He9gM/aHRmcU76J2keixu8ONXE7sMjM=</DigestValue>
<TyreRRCDeclared>0.0063</TyreRRCDeclared>
<TwinTyres>true</TwinTyres>
</Axle>
</AxleWheels>
<Auxiliaries>
<FanTechnology>Hydraulic driven - Constant displacement pump</FanTechnology>
<SteeringPumpTechnology>Variable displacement elec. controlled</SteeringPumpTechnology>
<ElectricSystemTechnology>Standard technology - LED headlights, all</ElectricSystemTechnology>
<PneumaticSystemTechnology>Medium Supply 2-stage + ESS</PneumaticSystemTechnology>
<HVACTechnology>Default</HVACTechnology>
</Auxiliaries>
</Components>
<InputDataSignature>
<di:Reference URI="#VEH-N.A.">
<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>d1VI47bzCHCfd2bpCt4fZwDwwze/OUK3U0vDY1s1QYQ=</di:DigestValue>
</di:Reference>
</InputDataSignature>
</Vehicle>
<Results>
<Status>success</Status>
<Result status="success">
<Mission>Long Haul</Mission>
<Distance unit="km">100.185</Distance>
<SimulationParameters>
<TotalVehicleMass unit="kg">11274</TotalVehicleMass>
<Payload unit="kg">1304</Payload>
<FuelType>Diesel CI</FuelType>
</SimulationParameters>
<VehiclePerformance>
<AverageSpeed unit="km/h">79.8</AverageSpeed>
<AverageDrivingSpeed unit="km/h">81.0</AverageDrivingSpeed>
<MinSpeed unit="km/h">0.0</MinSpeed>
<MaxSpeed unit="km/h">85.0</MaxSpeed>
<MaxDeceleration unit="m/s²">1.00</MaxDeceleration>
<MaxAcceleration unit="m/s²">1.00</MaxAcceleration>
<FullLoadDrivingtimePercentage>4.59</FullLoadDrivingtimePercentage>
<GearshiftCount>33</GearshiftCount>
<EngineSpeedDriving>
<Min unit="rpm">683.7</Min>
<Average unit="rpm">1977.1</Average>
<Max unit="rpm">2059.4</Max>
</EngineSpeedDriving>
</VehiclePerformance>
<FuelConsumption unit="g/km">207.6</FuelConsumption>
<FuelConsumption unit="g/t-km">159.2</FuelConsumption>
<FuelConsumption unit="g/m³-km">2.44</FuelConsumption>
<FuelConsumption unit="MJ/km">8.86</FuelConsumption>
<FuelConsumption unit="MJ/t-km">6.80</FuelConsumption>
<FuelConsumption unit="MJ/m³-km">0.104</FuelConsumption>
<FuelConsumption unit="l/100km">24.8</FuelConsumption>
<FuelConsumption unit="l/t-km">0.190</FuelConsumption>
<FuelConsumption unit="l/m³-km">0.00292</FuelConsumption>
<CO2 unit="g/km">649.8</CO2>
<CO2 unit="g/t-km">498.3</CO2>
<CO2 unit="g/m³-km">7.64</CO2>
</Result>
<Result status="success">
<Mission>Long Haul</Mission>
<Distance unit="km">100.185</Distance>
<SimulationParameters>
<TotalVehicleMass unit="kg">19811</TotalVehicleMass>
<Payload unit="kg">9841</Payload>
<FuelType>Diesel CI</FuelType>
</SimulationParameters>
<VehiclePerformance>
<AverageSpeed unit="km/h">78.3</AverageSpeed>
<AverageDrivingSpeed unit="km/h">79.4</AverageDrivingSpeed>
<MinSpeed unit="km/h">0.0</MinSpeed>
<MaxSpeed unit="km/h">87.5</MaxSpeed>
<MaxDeceleration unit="m/s²">1.00</MaxDeceleration>
<MaxAcceleration unit="m/s²">1.00</MaxAcceleration>
<FullLoadDrivingtimePercentage>17.09</FullLoadDrivingtimePercentage>
<GearshiftCount>39</GearshiftCount>
<EngineSpeedDriving>
<Min unit="rpm">677.3</Min>
<Average unit="rpm">1954.9</Average>
<Max unit="rpm">2192.7</Max>
</EngineSpeedDriving>
</VehiclePerformance>
<FuelConsumption unit="g/km">241.1</FuelConsumption>
<FuelConsumption unit="g/t-km">24.5</FuelConsumption>
<FuelConsumption unit="g/m³-km">2.84</FuelConsumption>
<FuelConsumption unit="MJ/km">10.3</FuelConsumption>
<FuelConsumption unit="MJ/t-km">1.05</FuelConsumption>
<FuelConsumption unit="MJ/m³-km">0.121</FuelConsumption>
<FuelConsumption unit="l/100km">28.8</FuelConsumption>
<FuelConsumption unit="l/t-km">0.0293</FuelConsumption>
<FuelConsumption unit="l/m³-km">0.00339</FuelConsumption>
<CO2 unit="g/km">754.7</CO2>
<CO2 unit="g/t-km">76.7</CO2>
<CO2 unit="g/m³-km">8.88</CO2>
</Result>
<Result status="success">
<Mission>Regional Delivery</Mission>
<Distance unit="km">100.000</Distance>
<SimulationParameters>
<TotalVehicleMass unit="kg">7174</TotalVehicleMass>
<Payload unit="kg">604</Payload>
<FuelType>Diesel CI</FuelType>
</SimulationParameters>
<VehiclePerformance>
<AverageSpeed unit="km/h">61.1</AverageSpeed>
<AverageDrivingSpeed unit="km/h">70.0</AverageDrivingSpeed>
<MinSpeed unit="km/h">0.0</MinSpeed>
<MaxSpeed unit="km/h">85.0</MaxSpeed>
<MaxDeceleration unit="m/s²">1.00</MaxDeceleration>
<MaxAcceleration unit="m/s²">1.00</MaxAcceleration>
<FullLoadDrivingtimePercentage>1.41</FullLoadDrivingtimePercentage>
<GearshiftCount>127</GearshiftCount>
<EngineSpeedDriving>
<Min unit="rpm">650.0</Min>
<Average unit="rpm">1738.4</Average>
<Max unit="rpm">2059.4</Max>
</EngineSpeedDriving>
</VehiclePerformance>
<FuelConsumption unit="g/km">153.8</FuelConsumption>
<FuelConsumption unit="g/t-km">254.7</FuelConsumption>
<FuelConsumption unit="g/m³-km">3.40</FuelConsumption>
<FuelConsumption unit="MJ/km">6.57</FuelConsumption>
<FuelConsumption unit="MJ/t-km">10.9</FuelConsumption>
<FuelConsumption unit="MJ/m³-km">0.145</FuelConsumption>
<FuelConsumption unit="l/100km">18.4</FuelConsumption>
<FuelConsumption unit="l/t-km">0.305</FuelConsumption>
<FuelConsumption unit="l/m³-km">0.00407</FuelConsumption>
<CO2 unit="g/km">481.4</CO2>
<CO2 unit="g/t-km">797.1</CO2>
<CO2 unit="g/m³-km">10.6</CO2>
</Result>
<Result status="success">
<Mission>Regional Delivery</Mission>
<Distance unit="km">100.000</Distance>
<SimulationParameters>
<TotalVehicleMass unit="kg">9590</TotalVehicleMass>
<Payload unit="kg">3020</Payload>
<FuelType>Diesel CI</FuelType>
</SimulationParameters>
<VehiclePerformance>
<AverageSpeed unit="km/h">61.0</AverageSpeed>
<AverageDrivingSpeed unit="km/h">69.9</AverageDrivingSpeed>
<MinSpeed unit="km/h">0.0</MinSpeed>
<MaxSpeed unit="km/h">86.1</MaxSpeed>
<MaxDeceleration unit="m/s²">1.00</MaxDeceleration>
<MaxAcceleration unit="m/s²">1.00</MaxAcceleration>
<FullLoadDrivingtimePercentage>3.85</FullLoadDrivingtimePercentage>
<GearshiftCount>127</GearshiftCount>
<EngineSpeedDriving>
<Min unit="rpm">662.6</Min>
<Average unit="rpm">1736.9</Average>
<Max unit="rpm">2086.8</Max>
</EngineSpeedDriving>
</VehiclePerformance>
<FuelConsumption unit="g/km">166.2</FuelConsumption>
<FuelConsumption unit="g/t-km">55.1</FuelConsumption>
<FuelConsumption unit="g/m³-km">3.68</FuelConsumption>
<FuelConsumption unit="MJ/km">7.10</FuelConsumption>
<FuelConsumption unit="MJ/t-km">2.35</FuelConsumption>
<FuelConsumption unit="MJ/m³-km">0.157</FuelConsumption>
<FuelConsumption unit="l/100km">19.9</FuelConsumption>
<FuelConsumption unit="l/t-km">0.0659</FuelConsumption>
<FuelConsumption unit="l/m³-km">0.00440</FuelConsumption>
<CO2 unit="g/km">520.4</CO2>
<CO2 unit="g/t-km">172.3</CO2>
<CO2 unit="g/m³-km">11.5</CO2>
</Result>
<Result status="success">
<Mission>Urban Delivery</Mission>
<Distance unit="km">99.999</Distance>
<SimulationParameters>
<TotalVehicleMass unit="kg">7174</TotalVehicleMass>
<Payload unit="kg">604</Payload>
<FuelType>Diesel CI</FuelType>
</SimulationParameters>
<VehiclePerformance>
<AverageSpeed unit="km/h">26.6</AverageSpeed>
<AverageDrivingSpeed unit="km/h">35.4</AverageDrivingSpeed>
<MinSpeed unit="km/h">0.0</MinSpeed>
<MaxSpeed unit="km/h">86.4</MaxSpeed>
<MaxDeceleration unit="m/s²">1.00</MaxDeceleration>
<MaxAcceleration unit="m/s²">1.00</MaxAcceleration>
<FullLoadDrivingtimePercentage>3.10</FullLoadDrivingtimePercentage>
<GearshiftCount>1351</GearshiftCount>
<EngineSpeedDriving>
<Min unit="rpm">650.0</Min>
<Average unit="rpm">1133.3</Average>
<Max unit="rpm">2093.8</Max>
</EngineSpeedDriving>
</VehiclePerformance>
<FuelConsumption unit="g/km">183.8</FuelConsumption>
<FuelConsumption unit="g/t-km">304.4</FuelConsumption>
<FuelConsumption unit="g/m³-km">4.07</FuelConsumption>
<FuelConsumption unit="MJ/km">7.85</FuelConsumption>
<FuelConsumption unit="MJ/t-km">13.0</FuelConsumption>
<FuelConsumption unit="MJ/m³-km">0.174</FuelConsumption>
<FuelConsumption unit="l/100km">22.0</FuelConsumption>
<FuelConsumption unit="l/t-km">0.364</FuelConsumption>
<FuelConsumption unit="l/m³-km">0.00486</FuelConsumption>
<CO2 unit="g/km">575.4</CO2>
<CO2 unit="g/t-km">952.7</CO2>
<CO2 unit="g/m³-km">12.7</CO2>
</Result>
<Result status="success">
<Mission>Urban Delivery</Mission>
<Distance unit="km">99.999</Distance>
<SimulationParameters>
<TotalVehicleMass unit="kg">9590</TotalVehicleMass>
<Payload unit="kg">3020</Payload>
<FuelType>Diesel CI</FuelType>
</SimulationParameters>
<VehiclePerformance>
<AverageSpeed unit="km/h">26.5</AverageSpeed>
<AverageDrivingSpeed unit="km/h">35.2</AverageDrivingSpeed>
<MinSpeed unit="km/h">0.0</MinSpeed>
<MaxSpeed unit="km/h">87.5</MaxSpeed>
<MaxDeceleration unit="m/s²">1.00</MaxDeceleration>
<MaxAcceleration unit="m/s²">1.00</MaxAcceleration>
<FullLoadDrivingtimePercentage>6.91</FullLoadDrivingtimePercentage>
<GearshiftCount>1355</GearshiftCount>
<EngineSpeedDriving>
<Min unit="rpm">650.0</Min>
<Average unit="rpm">1136.5</Average>
<Max unit="rpm">2119.9</Max>
</EngineSpeedDriving>
</VehiclePerformance>
<FuelConsumption unit="g/km">214.4</FuelConsumption>
<FuelConsumption unit="g/t-km">71.0</FuelConsumption>
<FuelConsumption unit="g/m³-km">4.74</FuelConsumption>
<FuelConsumption unit="MJ/km">9.16</FuelConsumption>
<FuelConsumption unit="MJ/t-km">3.03</FuelConsumption>
<FuelConsumption unit="MJ/m³-km">0.203</FuelConsumption>
<FuelConsumption unit="l/100km">25.6</FuelConsumption>
<FuelConsumption unit="l/t-km">0.0849</FuelConsumption>
<FuelConsumption unit="l/m³-km">0.00567</FuelConsumption>
<CO2 unit="g/km">671.1</CO2>
<CO2 unit="g/t-km">222.2</CO2>
<CO2 unit="g/m³-km">14.8</CO2>
</Result>
</Results>
<ApplicationInformation>
<SimulationToolVersion>3.3.0.1250</SimulationToolVersion>
<Date>2018-06-12T11:38:13.0616599Z</Date>
</ApplicationInformation>
</Data>
<Signature>
<di:Reference URI="#RESULT-bf220343fe634daa8708">
<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>jqnxgZOnQyrwc2f4Is+7/vmp6Kps8zck64lYx2YFU+w=</di:DigestValue>
</di:Reference>
</Signature>
</VectoOutput>
\ No newline at end of file
......@@ -74,6 +74,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoAPI", "..\VECTO_API_DE
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VECTO3GUI2020", "VECTO3GUI2020\VECTO3GUI2020.csproj", "{7E9172D4-07E3-4077-814E-7117AB2B3E22}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vecto3GUITest", "Vecto3GUITest\Vecto3GUITest.csproj", "{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug PerformanceStats|Any CPU = Debug PerformanceStats|Any CPU
......@@ -908,6 +910,48 @@ Global
{7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x64.Build.0 = Release|Any CPU
{7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x86.ActiveCfg = Release|Any CPU
{7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x86.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|Any CPU.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|x64.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|x64.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|x86.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|x86.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|Any CPU.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|Any CPU.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|x64.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|x64.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|x86.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -8,11 +8,14 @@
<!-- Add new ResourceDictionaries here-->
<ResourceDictionary Source="Resources/ViewModelBindings.xaml"/>
<ResourceDictionary Source="Resources/Converter.xaml"/>
<ResourceDictionary Source="Resources/GlobalStyles.xaml"/>
<ResourceDictionary Source="Resources/Colors.xaml"/>
<ResourceDictionary Source="Resources\Styles\ButtonStyles.xaml"/>
<ResourceDictionary Source="Resources/Styles/GlobalStyles.xaml"/>
<ResourceDictionary Source="Resources/Styles/Colors.xaml"/>
<ResourceDictionary Source="Resources/Styles/ButtonStyles.xaml"/>
<ResourceDictionary Source="DataGridStyles.xaml"/>
<ResourceDictionary Source="ButtonTemplates.xaml"/>
<ResourceDictionary Source="ButtonStyles.xaml"/>
<ResourceDictionary Source="Resources/Templates/ErrorTemplates.xaml"/>
<ResourceDictionary Source="Resources/ObjectProvider.xaml"/>
<ResourceDictionary Source="Resources/Icons/drawables.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VECTO3GUI2020" xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
<Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
<Setter Property="Width" Value="8"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Cursor" Value="SizeWE"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="JobListDataGridHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
<Grid>
<Themes:DataGridHeaderBorder BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" IsClickable="{TemplateBinding CanUserSort}" IsPressed="{TemplateBinding IsPressed}" IsHovered="{TemplateBinding IsMouseOver}" Padding="{TemplateBinding Padding}" SortDirection="{TemplateBinding SortDirection}" SeparatorBrush="{TemplateBinding SeparatorBrush}" SeparatorVisibility="{TemplateBinding SeparatorVisibility}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Themes:DataGridHeaderBorder>
<Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" Style="{StaticResource ColumnHeaderGripperStyle}"/>
<Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource ColumnHeaderGripperStyle}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Padding" Value="4 0 0 0"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Background" Value="White"/>
</Style>
<Style x:Key="DataGridCellStyle1" TargetType="{x:Type DataGridCell}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource ButtonHighlightColor}"/>
<!-- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> -->
<Setter Property="Foreground" Value="Black"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true"/>
<Condition Property="Selector.IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
\ No newline at end of file
......@@ -3,10 +3,16 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TUGraz.VectoCommon.Utils;
namespace VECTO3GUI2020.Helper
{
public static class XMLHelper
public static class ConvertedSIDummyCreator
{
public static ConvertedSI CreateMillimeterDummy()
{
return new ConvertedSI(0, "mm");
}
}
}
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using Castle.Core.Internal;
using TUGraz.VectoCommon.Utils;
namespace VECTO3GUI2020.Helper.Converter
{
class EnumConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null) {
return Binding.DoNothing;
}
Type valueType = value.GetType();
if (!valueType.IsEnum) {
return value;
}
var attributes =
valueType.GetField(value.ToString())?.GetCustomAttributes( typeof(GuiLabelAttribute),false);
GuiLabelAttribute attribute = attributes.IsNullOrEmpty() ? null : attributes.First() as GuiLabelAttribute;
if (attribute == null) {
return value;
} else {
return attribute.Label;
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
}
}
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using VECTO3GUI2020.Views.Multistage.CustomControls;
namespace VECTO3GUI2020.Helper.Converter
{
public class MultistageParameterModeToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var selectedMode = (MultistageParameterViewMode)value;
if (parameter is MultistageParameterViewMode mode) {
if (selectedMode == mode) {
return Visibility.Visible;
} else {
return Visibility.Collapsed;
}
} else {
throw new ArgumentException("Provide a MultiStageParameter.MODE as parameter!");
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
\ No newline at end of file
......@@ -13,10 +13,9 @@ namespace VECTO3GUI2020.Helper.Converter
{
return Visibility.Collapsed;
}
else
{
return Binding.DoNothing;
}
else {
return Visibility.Visible;
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
......
......@@ -9,7 +9,11 @@ namespace VECTO3GUI2020.Helper.Converter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null) {
return Binding.DoNothing;
}
if(value is SI SIValue)
{
if (SIValue.UnitString == "1/s")
......@@ -17,24 +21,28 @@ namespace VECTO3GUI2020.Helper.Converter
return "rpm";
}
return SIValue.UnitString;
} else {
try {
dynamic type = value?.GetType();
if (type == null) {
return Binding.DoNothing;
}
return type.GetUnitString();
} catch {
return Binding.DoNothing;
}
}
return Binding.DoNothing;
if (value is ConvertedSI convertedSI) {
return convertedSI.Units;
}
return Binding.DoNothing;
}
//TRY GET DYNAMIC UNIT STRING
try {
dynamic type = value?.GetType();
if (type == null) {
return Binding.DoNothing;
}
var unitString = type.GetUnitString();
return unitString;
} catch (Exception e){
return Binding.DoNothing;
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
......
......@@ -13,10 +13,10 @@ namespace VECTO3GUI2020.Helper.Converter
class SIValueToStringConverter : IValueConverter
{
private SI _si;
private ConvertedSI _convertedSI;
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
{
if (value == null) {
_si = null;
return value;
}
if(value is SI SIvalue) {
......@@ -24,22 +24,38 @@ namespace VECTO3GUI2020.Helper.Converter
return SIvalue.ToGUIFormat();
}
if (value is ConvertedSI convertedSI) {
_convertedSI = convertedSI;
return convertedSI.ToOutputFormat(showUnit: false, decimals:0);
}
return Binding.DoNothing;
}
return value?.ToString();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (_si == null) {
return value;
}
try {
var newSi = SIUtils.CreateSIValue(_si.GetType(), Double.Parse(value as string));
return newSi;
} catch (Exception e) {
var hackedString = value as string;
hackedString = hackedString.Replace(",", ".");
//if (!hackedString.Contains(".")) {
// hackedString = hackedString + ".0";
//}
var doubleVal = Double.Parse(hackedString, CultureInfo.InvariantCulture);
if (_convertedSI != null) {
return new ConvertedSI(doubleVal, _convertedSI.Units);
}
if (_si != null)
{
var newSi = SIUtils.CreateSIValue(_si.GetType(), doubleVal);
return newSi;
}
}
catch (Exception e) {
return value;
}
return value;
}
}
}
using System;
using System.Globalization;
using System.Windows.Data;
namespace VECTO3GUI2020.Helper.Converter
{
/// <summary>
/// Converts bool to bool and object to null; used to avoid errors in collapsed checkboxes;
/// </summary>
public class XToBoolConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
bool? b = value as bool?;
return b;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
\ No newline at end of file
using System;
namespace VECTO3GUI2020.Helper
{
/// <summary>
/// Exception to notify the view that a field is not allowed to be empty. Should be ignored by the debugger
/// </summary>
public class VectoEmptyFieldException : Exception
{
public VectoEmptyFieldException()
: base("Field must not be empty")
{
}
public VectoEmptyFieldException(string message)
: base(message)
{
}
public VectoEmptyFieldException(string message, Exception inner)
: base(message, inner)
{
}
}
}
\ No newline at end of file
using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Schema;
using Castle.Core.Resource;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCore.Utils;
using TUGraz.VectoHashing.Impl;
using VECTO3GUI2020.Util.XML;
using VECTO3GUI2020.Util.XML.Interfaces;
......@@ -18,7 +22,7 @@ namespace VECTO3GUI2020.Helper
{
var di = XMLNamespaces.Di;
var signatureElement = new XElement(nameSpace + XMLNames.DI_Signature);
signatureElement.Add(new XElement(di + XMLNames.DI_Signature_Reference, new XAttribute(XMLNames.DI_Signature_Reference_URI_Attr, uri)));
signatureElement.Add(new XElement(di + XMLNames.DI_Signature_Reference, new XAttribute(XMLNames.DI_Signature_Reference_URI_Attr, digestData.Reference)));
var refElement = signatureElement.FirstNode as XElement;
refElement?.Add(new XElement(di + XMLNames.DI_Signature_Reference_Transforms));
......@@ -34,10 +38,70 @@ namespace VECTO3GUI2020.Helper
if (hash) {
throw new NotImplementedException("Hashing not implemented");
}
refElement?.Add(new XElement(di + XMLNames.DI_Signature_Reference_DigestValue, ""));
refElement?.Add(new XElement(di + XMLNames.DI_Signature_Reference_DigestValue, digestData.DigestValue));
return signatureElement;
}
}
public static XmlDocument ToXmlDocument(this XDocument xDocument)
{
var xmlDocument = new XmlDocument();
using (var reader = xDocument.CreateReader())
{
xmlDocument.Load(reader);
}
var xDeclaration = xDocument.Declaration;
if (xDeclaration != null)
{
var xmlDeclaration = xmlDocument.CreateXmlDeclaration(
xDeclaration.Version,
xDeclaration.Encoding,
xDeclaration.Standalone);
xmlDocument.InsertBefore(xmlDeclaration, xmlDocument.FirstChild);
}
return xmlDocument;
}
public static XmlNode ToXmlNode(this XElement element)
{
using (XmlReader xmlReader = element.CreateReader())
{
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(xmlReader);
return xmlDocument;
}
}
public static string GetVersion(this XElement element)
{
return element.ToXmlNode().GetVersion();
}
public static string GetVersion(this XmlNode node)
{
if (node == null)
{
return null;
}
var version = XMLHelper.GetXsdType(node.SchemaInfo.SchemaType);
if (string.IsNullOrWhiteSpace(version))
{
version = XMLHelper.GetVersionFromNamespaceUri((node.SchemaInfo.SchemaType?.Parent as XmlSchemaElement)?.QualifiedName.Namespace);
}
return version;
}
public static string ToXmlFormat(this DateTime dateTime)
{
return XmlConvert.ToString(dateTime, XmlDateTimeSerializationMode.Utc);
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Schema;
using Castle.Core.Internal;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCore.Utils;
using VECTO3GUI2020.Util.XML;
using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType;
namespace VECTO3GUI2020.Helper
{
public static class XmlHelper
{
public static XmlDocument ReadXmlDocument(string filePath)
{
if (filePath.IsNullOrEmpty())
return null;
var xmlDocument = new XmlDocument();
xmlDocument.Load(filePath);
return xmlDocument;
}
public static XmlNodeList GetComponentNodes(XmlDocument xmlDocument, string parentNode, string nodeName)
{
if (xmlDocument == null || parentNode.IsNullOrEmpty() || nodeName.IsNullOrEmpty())
return null;
return xmlDocument.SelectNodes($"//*[local-name()='{parentNode}']//*[local-name()='{nodeName}']");
}
public static bool ValidateXDocument(XDocument xDocument, Action<bool> resultAction = null,
Action<XmlSeverityType, ValidationEvent> validationErrorAction = null)
{
var xmlDocument = xDocument.ToXmlDocument();
if (xmlDocument == null)
return false;
var documentType = XMLHelper.GetDocumentType(xmlDocument.DocumentElement.LocalName);
if (documentType == null)
{
throw new VectoException("unknown xml file! {0}", xmlDocument.DocumentElement.LocalName);
}
var validator = new XMLValidator(xmlDocument, resultAction, validationErrorAction);
return validator.ValidateXML(documentType.Value); ;
}
public static string GetXmlAbsoluteFilePath(string baseUri)
{
if (baseUri == null)
return null;
return Uri.UnescapeDataString(new Uri(baseUri).AbsolutePath);
}
public static XDocument CreateWrapperDocument(this XElement xElement, XNamespace defaultNamespace,
XmlDocumentType docType = XmlDocumentType.DeclarationJobData)
{
var prefixMap = new Dictionary<string, XNamespace>();
var xDocument = new XDocument();
var rootElement = new XElement(XMLNamespaces.Tns_v20 + XMLNames.VectoInputDeclaration, new XAttribute(XNamespace.Xmlns + "tns",
XMLNamespaces.Tns_v20));
Debug.WriteLine(rootElement.ToString());
rootElement.Add(new XAttribute("xmlns", defaultNamespace));
rootElement.Add(new XAttribute("schemaVersion", XMLHelper.GetVersionFromNamespaceUri(defaultNamespace)));
xDocument.Add(rootElement);
Dictionary<string, XNamespace> nsAttributes = new Dictionary<string, XNamespace> {
["xsi"] = XMLNamespaces.Xsi
};
foreach (var element in xElement.DescendantsAndSelf()) {
var ns = element.Name.Namespace;
if (ns != defaultNamespace) {
var prefix = XMLNamespaces.GetPrefix(ns);
if(prefix != null)
nsAttributes[prefix] = ns;
}
}
foreach (var nsAttribute in nsAttributes) {
rootElement.Add(new XAttribute(XNamespace.Xmlns + nsAttribute.Key, nsAttribute.Value));
}
var LocalSchemaLocation = @"V:\VectoCore\VectoCore\Resources\XSD\";
rootElement.Add(new XAttribute(XMLNamespaces.Xsi + "schemaLocation",
$"{XMLNamespaces.DeclarationRootNamespace} {LocalSchemaLocation}VectoDeclarationJob.xsd"));
rootElement.Add(xElement);
return xDocument;
}
}
}
......@@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VECTO3GUI2020"
xmlns:Implementation="clr-namespace:VECTO3GUI2020.ViewModel.Implementation" x:Class="VECTO3GUI2020.MainWindow"
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">
......@@ -16,27 +16,28 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="40"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="0,0,0,0">
<Grid Grid.Row="0">
<StackPanel Orientation="Vertical">
<Menu IsMainMenu="True">
<MenuItem Header="File" VerticalAlignment="Center">
<MenuItem Header="File" VerticalAlignment="Stretch">
<MenuItem Header="Settings" Command="{Binding OpenSettings}"/>
<MenuItem Header="New File" Command="{Binding NewInterimFile}"/>
<MenuItem Header="Open File" Command="{Binding AddJob}"/>
</MenuItem>
</Menu>
</StackPanel>
</Grid>
<Grid Grid.Row="1" Margin="0,0,0,0">
<Grid Grid.Row="1" Margin="0,4,0,0">
<ContentControl Content="{Binding CurrentViewModelTop}"/>
</Grid>
<Grid Grid.Row="2" Visibility="Collapsed" Margin="0,0,0,0">
<Grid Grid.Row="2" Margin="0,0,0,0">
<ContentControl Content="{Binding CurrentViewModelBottom}"/>
</Grid>
......
......@@ -18,8 +18,9 @@ namespace VECTO3GUI2020.Ninject
{
public override void Load()
{
Bind<IXMLWriterFactory>().ToFactory(() => new UseFirstArgumentTypeAsNameInstanceProvider());
Bind<IMultiStageViewModelFactory>().ToFactory(() => new UseFirstArgumentAsNameInstanceProvider(skipFirstArgument: true, fallback: true));
Bind<IXMLWriterFactory>().ToFactory(() => new UseFirstArgumentTypeAsNameInstanceProvider(fallback:true));
//Bind<IMultiStageViewModelFactory>().ToFactory(() => new UseFirstArgumentAsNameInstanceProvider(skipFirstArgument: true, fallback: true));
Bind<IMultiStageViewModelFactory>().ToFactory();
Bind<IJobEditViewModelFactory>().ToFactory(() => new UseFirstArgumentTypeAsNameInstanceProvider());
Bind<IDocumentViewModelFactory>().ToFactory(() => new UseFirstArgumentAsNameInstanceProvider(false));
Bind<IComponentViewModelFactory>().ToFactory(
......
using System;
using System.Windows.Forms;
using TUGraz.VectoCore.InputData.FileIO.XML;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Factory;
using TUGraz.VectoCore.Utils;
using VECTO3GUI2020.Helper;
using VECTO3GUI2020.Util.XML.Interfaces;
using VECTO3GUI2020.ViewModel.Interfaces.JobEdit.Vehicle.Components;
namespace VECTO3GUI2020.Ninject
{
public interface IMultistageDependencies
{
Lazy<IDialogHelper> DialogHelperLazy { get; }
Lazy<IXMLInputDataReader> InputDataReaderLazy { get; }
IDialogHelper DialogHelper { get; }
IXMLInputDataReader InputDataReader { get; }
IDeclarationInjectFactory InjectFactory { get; }
IComponentViewModelFactory ComponentViewModelFactory { get; }
IXMLWriterFactory XMLWriterFactory { get; }
}
}
\ No newline at end of file
using System;
using TUGraz.VectoCore.InputData.FileIO.XML;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Factory;
using TUGraz.VectoCore.Utils;
using VECTO3GUI2020.Helper;
using VECTO3GUI2020.Util.XML.Interfaces;
using VECTO3GUI2020.ViewModel.Interfaces.JobEdit.Vehicle.Components;
using VECTO3GUI2020.ViewModel.MultiStage.Interfaces;
namespace VECTO3GUI2020.Ninject
{
public class MultistageLazyDependencies : IMultistageDependencies
{
private readonly Lazy<IDialogHelper> _dialogHelper;
public Lazy<IDialogHelper> DialogHelperLazy => _dialogHelper;
public IDialogHelper DialogHelper => _dialogHelper.Value;
private readonly Lazy<IXMLInputDataReader> _inputDataReader;
public Lazy<IXMLInputDataReader> InputDataReaderLazy => _inputDataReader;
public IXMLInputDataReader InputDataReader => _inputDataReader.Value;
//private readonly Lazy<XMLValidator> _xmlValidator = new Lazy<XMLValidator>(() => {return });
//public Lazy<XMLValidator> XMLValidatorLazy => _xmlValidator;
//public XMLValidator XMLValidator => _xmlValidator.Value;
public IDeclarationInjectFactory InjectFactory => _injectFactory.Value;
public IComponentViewModelFactory ComponentViewModelFactory => _componentViewModelFactory.Value;
public IXMLWriterFactory XMLWriterFactory => _xmlWriterFactory.Value;
private Lazy<IXMLWriterFactory> _xmlWriterFactory;
private readonly Lazy<IDeclarationInjectFactory> _injectFactory;
private readonly Lazy<IComponentViewModelFactory> _componentViewModelFactory;
public MultistageLazyDependencies(
Lazy<IDialogHelper> dialogHelper,
Lazy<IXMLInputDataReader> inputDataReader,
Lazy<IDeclarationInjectFactory> injectFactory,
Lazy<IComponentViewModelFactory> componentViewModelFactory,
Lazy<IXMLWriterFactory> xmlWriterFactory,
Lazy<IMultiStageViewModelFactory> viewModelFactory)
{
_dialogHelper = dialogHelper;
_inputDataReader = inputDataReader;
_componentViewModelFactory = componentViewModelFactory;
_injectFactory = injectFactory;
_xmlWriterFactory = xmlWriterFactory;
}
}
}
\ No newline at end of file
......@@ -3,8 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Automation.Peers;
using Ninject.Extensions.Factory;
using Ninject.Modules;
using TUGraz.VectoCore.Models.SimulationComponent;
using VECTO3GUI2020.Ninject.Util;
using VECTO3GUI2020.ViewModel.Interfaces.Common;
using VECTO3GUI2020.ViewModel.Interfaces.JobEdit.Vehicle;
......@@ -18,19 +20,25 @@ namespace VECTO3GUI2020.Ninject
public override void Load()
{
Bind<IViewModelBase>().To<NewMultiStageJobViewModel>();
Bind<IViewModelBase>().To<NewMultiStageJobViewModel>().
NamedLikeFactoryMethod((IMultiStageViewModelFactory f) => f.GetNewMultistageJobViewModel());
Bind<IMultiStageJobViewModel>().To<MultiStageJobViewModel_v0_1>().
NamedLikeFactoryMethod((IMultiStageViewModelFactory f) => f.GetMultiStageJobViewModel(null));
Bind<IMultiStageJobViewModel>().To<MultiStageJobViewModel_v0_1>()
.Named(MultiStageJobViewModel_v0_1.INPUTPROVIDERTYPE);
Bind<IVehicleViewModel>().To<DeclarationInterimStageBusVehicleViewModel_v2_8>().
NamedLikeFactoryMethod((IMultiStageViewModelFactory f)=>f.GetInterimStageVehicleViewModel());
Bind<IVehicleViewModel>().To<DeclarationInterimStageBusVehicleViewModel_v2_8>()
.Named(DeclarationInterimStageBusVehicleViewModel_v2_8.INPUTPROVIDERTYPE);
Bind<IManufacturingStageViewModel>().To<ManufacturingStageViewModel_v0_1>().
NamedLikeFactoryMethod((IMultiStageViewModelFactory f) => f.GetManufacturingStageViewModel(null));
Bind<IManufacturingStageViewModel>().To<ManufacturingStageViewModel_v0_1>()
.Named(ManufacturingStageViewModel_v0_1.INPUTPROVIDERTYPE);
Bind<IMultistageAirdragViewModel>().To<MultistageAirdragViewModel>().
NamedLikeFactoryMethod((IMultiStageViewModelFactory f) => f.GetMultistageAirdragViewModel());
Bind<IMultistageAirdragViewModel>().To<MultistageAirdragViewModel>();
Bind<IMultistageAuxiliariesViewModel>().To<MultistageAuxiliariesViewModel>().
NamedLikeFactoryMethod((IMultiStageViewModelFactory f) => f.GetAuxiliariesViewModel(null));
Bind<IMultistageDependencies>().To<MultistageLazyDependencies>();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment