Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 2f494cf6 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 https://citnet.tech.ec.europa.eu/CITnet/stash/scm/vecto/fk_vecto-dev into feature/VECTO-1410-multistage-tool-buses
parents d04e77a9 170598cc
No related branches found
No related tags found
No related merge requests found
Showing
with 379 additions and 3659 deletions
...@@ -211,3 +211,4 @@ Documentation/VehiclesReleaseComparisonDeclarationMode/tmp/ ...@@ -211,3 +211,4 @@ Documentation/VehiclesReleaseComparisonDeclarationMode/tmp/
.vs/ .vs/
**/dev/*.vmod **/dev/*.vmod
**/dev/*.vsum **/dev/*.vsum
/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/testVif.VIF_Report_5.xml
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 ...@@ -74,6 +74,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoAPI", "..\VECTO_API_DE
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VECTO3GUI2020", "VECTO3GUI2020\VECTO3GUI2020.csproj", "{7E9172D4-07E3-4077-814E-7117AB2B3E22}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VECTO3GUI2020", "VECTO3GUI2020\VECTO3GUI2020.csproj", "{7E9172D4-07E3-4077-814E-7117AB2B3E22}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vecto3GUI2020Test", "Vecto3GUI2020Test\Vecto3GUI2020Test.csproj", "{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug PerformanceStats|Any CPU = Debug PerformanceStats|Any CPU Debug PerformanceStats|Any CPU = Debug PerformanceStats|Any CPU
...@@ -908,6 +910,48 @@ Global ...@@ -908,6 +910,48 @@ Global
{7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x64.Build.0 = Release|Any CPU {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.ActiveCfg = Release|Any CPU
{7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x86.Build.0 = Release|Any CPU {7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x86.Build.0 = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceStats|Any CPU.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceStats|Any CPU.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceStats|x64.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceStats|x64.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceStats|x86.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceStats|x86.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceTrace|Any CPU.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceTrace|Any CPU.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceTrace|x64.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceTrace|x64.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceTrace|x86.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug PerformanceTrace|x86.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug|x64.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug|x64.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug|x86.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Debug|x86.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.DebugTUG|Any CPU.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.DebugTUG|x64.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.DebugTUG|x64.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.DebugTUG|x86.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.DebugTUG|x86.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Deploy|Any CPU.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Deploy|x64.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Deploy|x64.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Deploy|x86.ActiveCfg = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Deploy|x86.Build.0 = Debug|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Release|Any CPU.Build.0 = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Release|x64.ActiveCfg = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Release|x64.Build.0 = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Release|x86.ActiveCfg = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.Release|x86.Build.0 = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.ReleaseTUG|Any CPU.ActiveCfg = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.ReleaseTUG|Any CPU.Build.0 = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.ReleaseTUG|x64.ActiveCfg = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.ReleaseTUG|x64.Build.0 = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.ReleaseTUG|x86.ActiveCfg = Release|Any CPU
{7F4FF473-96B3-461E-9CE6-76D3B75F87CB}.ReleaseTUG|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=HashingTool_002EAnnotations/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=HashingTool_002EAnnotations/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=VECTO3GUI2020_002EAnnotations/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">Default: Reformat Code</s:String> <s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">Default: Reformat Code</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CommonFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CommonFormatter/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGNMENT_TAB_FILL_STYLE/@EntryValue">USE_TABS_ONLY</s:String>
......
...@@ -619,6 +619,7 @@ Public Class DummyVehicle ...@@ -619,6 +619,7 @@ Public Class DummyVehicle
Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
Public Property VIN As String Implements IVehicleDeclarationInputData.VIN Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory
Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
......
...@@ -801,6 +801,7 @@ Public Class MockEngineeringVehicle ...@@ -801,6 +801,7 @@ Public Class MockEngineeringVehicle
Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
Public Property VIN As String Implements IVehicleDeclarationInputData.VIN Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory
Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
......
...@@ -19,6 +19,7 @@ Public Class MockVehicleInputData ...@@ -19,6 +19,7 @@ Public Class MockVehicleInputData
Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
Public Property VIN As String Implements IVehicleDeclarationInputData.VIN Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory
Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
......
...@@ -362,6 +362,8 @@ Public Class Vehicle ...@@ -362,6 +362,8 @@ Public Class Vehicle
End Get End Get
End Property End Property
Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory
Public ReadOnly Property LegislativeClass As LegislativeClass? Implements IVehicleEngineeringInputData.LegislativeClass Public ReadOnly Property LegislativeClass As LegislativeClass? Implements IVehicleEngineeringInputData.LegislativeClass
Get Get
Return legClass Return legClass
...@@ -406,6 +408,9 @@ Public Class Vehicle ...@@ -406,6 +408,9 @@ Public Class Vehicle
End Get End Get
End Property End Property
Public ReadOnly Property TransferredAirDragArea As SquareMeter Implements IAirdragDeclarationInputData.TransferredAirDragArea
Public ReadOnly Property AirDragArea_0 As SquareMeter Implements IAirdragDeclarationInputData.AirDragArea_0
Public ReadOnly Property IVehicleEngineeringInputData_Axles As IList(Of IAxleEngineeringInputData) _ Public ReadOnly Property IVehicleEngineeringInputData_Axles As IList(Of IAxleEngineeringInputData) _
Implements IAxlesEngineeringInputData.AxlesEngineering Implements IAxlesEngineeringInputData.AxlesEngineering
Get Get
......
<Application x:Class="VECTO3GUI2020.App" <Application x:Class="VECTO3GUI2020.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VECTO3GUI2020"> xmlns:local="clr-namespace:VECTO3GUI2020"
ShutdownMode="OnMainWindowClose">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<!-- Add new ResourceDictionaries here--> <!-- Add new ResourceDictionaries here-->
<ResourceDictionary Source="Resources/ViewModelBindings.xaml"/> <ResourceDictionary Source="Resources/ViewModelBindings.xaml"/>
<ResourceDictionary Source="Resources/Converter.xaml"/> <ResourceDictionary Source="Resources/Converter.xaml"/>
<ResourceDictionary Source="Resources/GlobalStyles.xaml"/> <ResourceDictionary Source="Resources\Styles\ButtonStyles.xaml"/>
<ResourceDictionary Source="Resources/Colors.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="DataGridStyles.xaml"/>
<ResourceDictionary Source="ButtonTemplates.xaml"/> <ResourceDictionary Source="Resources/Templates/ErrorTemplates.xaml"/>
<ResourceDictionary Source="ButtonStyles.xaml"/> <ResourceDictionary Source="Resources/ObjectProvider.xaml"/>
<ResourceDictionary Source="Resources/Icons/drawables.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>
</Application> </Application>
...@@ -48,7 +48,7 @@ namespace VECTO3GUI2020 ...@@ -48,7 +48,7 @@ namespace VECTO3GUI2020
container.Bind<ISettingsModel>().To<SettingsModel>(); container.Bind<ISettingsModel>().To<SettingsModel>();
container.Bind<IDialogHelper>().To<DialogHelper>(); container.Bind<IDialogHelper>().To<DialogHelper>().InSingletonScope();
container.Bind<IWindowHelper>().To<WindowHelper>(); container.Bind<IWindowHelper>().To<WindowHelper>();
} }
...@@ -63,6 +63,7 @@ namespace VECTO3GUI2020 ...@@ -63,6 +63,7 @@ namespace VECTO3GUI2020
var mainwindow = container.Get<MainWindow>(); var mainwindow = container.Get<MainWindow>();
this.MainWindow = mainwindow; this.MainWindow = mainwindow;
Application.Current.MainWindow = mainwindow;
this.MainWindow.Show(); this.MainWindow.Show();
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
xmlns:local="clr-namespace:VECTO3GUI2020" 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> </ResourceDictionary>
\ No newline at end of file
...@@ -3,11 +3,16 @@ using System.Collections.Generic; ...@@ -3,11 +3,16 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VECTO3GUI2020.ViewModel.Implementation.Common; using TUGraz.VectoCommon.Utils;
namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation namespace VECTO3GUI2020.Helper
{ {
public class InterimStageBusAuxiliariesViewModel_v2_8 : ViewModelBase 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;
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
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace VECTO3GUI2020.Helper.Converter
{
public class NullToUnsetValueConverter : IValueConverter
{
#region Implementation of IValueConverter
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null) {
return DependencyProperty.UnsetValue;
} else {
return value;
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
}
\ No newline at end of file
...@@ -7,15 +7,29 @@ namespace VECTO3GUI2020.Helper.Converter ...@@ -7,15 +7,29 @@ namespace VECTO3GUI2020.Helper.Converter
{ {
class NullToVisibilityConverter : IValueConverter class NullToVisibilityConverter : IValueConverter
{ {
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <param name="targetType"></param>
/// <param name="parameter">set to "invert" to invert the result</param>
/// <param name="culture"></param>
/// <returns></returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
bool invert = parameter as string == "invert";
if (value == null) if (value == null)
{ {
if (invert) {
return Visibility.Visible;
}
return Visibility.Collapsed; return Visibility.Collapsed;
} }
else else {
{ if (invert) {
return Binding.DoNothing; return Visibility.Collapsed;
}
return Visibility.Visible;
} }
} }
......
...@@ -9,30 +9,34 @@ namespace VECTO3GUI2020.Helper.Converter ...@@ -9,30 +9,34 @@ namespace VECTO3GUI2020.Helper.Converter
{ {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
var unitString = getUnitString(value);
if(value is SI SIValue) if (unitString != null) {
{ unitString = unitString.Replace("^2", ((char)0xB2).ToString());
if (SIValue.UnitString == "1/s") unitString = unitString.Replace("^3", ((char)0xB3).ToString());
{ return unitString;
return "rpm";
}
return SIValue.UnitString;
} else { } else {
try {
dynamic type = value?.GetType();
if (type == null) {
return Binding.DoNothing;
}
return type.GetUnitString();
} catch {
return Binding.DoNothing; return Binding.DoNothing;
} }
//if (value == null) {
// return Binding.DoNothing;
//}
}
return Binding.DoNothing;
// if(value is SI SIValue)
// {
// if (SIValue.UnitString == "1/s")
// {
// return "rpm";
// }
// return SIValue.UnitString;
// }
//if (value is ConvertedSI convertedSI) {
// return convertedSI.Units;
//}
//return Binding.DoNothing;
} }
...@@ -40,5 +44,29 @@ namespace VECTO3GUI2020.Helper.Converter ...@@ -40,5 +44,29 @@ namespace VECTO3GUI2020.Helper.Converter
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
private string getUnitString(object value)
{
if (value == null) {
return null;
}
if (value is SI SIValue)
{
if (SIValue.UnitString == "1/s")
{
return "rpm";
}
return SIValue.UnitString;
}
if (value is ConvertedSI convertedSI)
{
return convertedSI.Units;
}
return null;
}
} }
} }
...@@ -13,10 +13,10 @@ namespace VECTO3GUI2020.Helper.Converter ...@@ -13,10 +13,10 @@ namespace VECTO3GUI2020.Helper.Converter
class SIValueToStringConverter : IValueConverter class SIValueToStringConverter : IValueConverter
{ {
private SI _si; private SI _si;
private ConvertedSI _convertedSI;
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (value == null) { if (value == null) {
_si = null;
return value; return value;
} }
if(value is SI SIvalue) { if(value is SI SIvalue) {
...@@ -24,22 +24,38 @@ namespace VECTO3GUI2020.Helper.Converter ...@@ -24,22 +24,38 @@ namespace VECTO3GUI2020.Helper.Converter
return SIvalue.ToGUIFormat(); 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) public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (_si == null) {
return value;
}
try { try {
var newSi = SIUtils.CreateSIValue(_si.GetType(), Double.Parse(value as string)); 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; return newSi;
} catch (Exception e) { }
}
catch (Exception e) {
return value; 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment