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 a2b84222 authored by Franz KOBER josef's avatar Franz KOBER josef
Browse files

added complete bus vehicle to gui without input check and save function at the moment

parent e554496a
Branches
Tags
No related merge requests found
Showing
with 495 additions and 82 deletions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TUGraz.VectoCommon.InputData;
namespace VECTO3GUI.Model
{
public class AlternatorDeclarationInputData : IAlternatorDeclarationInputData
{
public string Technology { get; set; }
public double Ratio { get; set; }
}
}
......@@ -69,6 +69,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Model\InterfacesImpl.cs" />
<Compile Include="Util\AllowedEntry.cs" />
<Compile Include="Util\Component.cs" />
<Compile Include="Util\RelayCommand.cs" />
......
......@@ -12,6 +12,7 @@ namespace VECTO3GUI.ViewModel.Impl
private SquareMeter _transferredCdxA;
private SquareMeter _declaredCdxA;
private bool _useStandardValues;
private string _appVersion;
#region Implementation of IAirdragViewModel
......@@ -43,6 +44,13 @@ namespace VECTO3GUI.ViewModel.Impl
set { SetProperty(ref _declaredCdxA, value); }
}
public string AppVersion
{
get { return _appVersion; }
set { SetProperty(ref _appVersion, value); }
}
#endregion
protected override void InputDataChanged()
......@@ -62,9 +70,8 @@ namespace VECTO3GUI.ViewModel.Impl
Model = airdrag.Model;
Manufacturer = airdrag.Manufacturer;
CertificationNumber = airdrag.CertificationNumber;
//ToDo
//Date = DateTime.Parse(airdrag.Date);
Date = airdrag.Date;
AppVersion = airdrag.AppVersion;
DeclaredCdxA = airdrag.AirDragArea;
}
}
......
......@@ -2,22 +2,27 @@
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using Castle.Core.Internal;
using Ninject;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Utils;
using VECTO3GUI.Util;
using VECTO3GUI.ViewModel.Adapter;
using VECTO3GUI.ViewModel.Adapter.Declaration;
using VECTO3GUI.ViewModel.Interfaces;
using VECTO3GUI.Model;
using Component = VECTO3GUI.Util.Component;
namespace VECTO3GUI.ViewModel.Impl {
namespace VECTO3GUI.ViewModel.Impl
{
public class AuxiliariesViewModel : AbstractViewModel, IAuxiliariesViewModel
{
[Inject] public IAdapterFactory AdapterFactory { set; protected get; }
[Inject]
public IAdapterFactory AdapterFactory { set; protected get; }
#region Members
private string _pneumaticSystemTechnology;
private string _fanTechnology;
......@@ -26,6 +31,25 @@ namespace VECTO3GUI.ViewModel.Impl {
private readonly ObservableCollection<SteeringPumpEntry> _steeringPumpTechnologies = new ObservableCollection<SteeringPumpEntry>();
private IAxlesViewModel axlesViewModel;
private ObservableCollection<IAlternatorDeclarationInputData> _alternators;
private bool _dayRunningLightsLED;
private bool _headlightyLED;
private bool _positionlightsLED;
private bool _breaklightsLED;
private bool _interiorLightsLED;
private ConsumerTechnology _doorDriveTechnology;
private BusHVACSystemConfiguration _systemConfiguration;
private ACCompressorType _compressorTypeDriver;
private ACCompressorType _compressorTypePassenger;
private Watt _auxHeaterPower;
private bool _doubleGlasing;
private bool _heatPump;
private bool _adjustableAuxiliaryHeater;
private bool _separateAirDistributionDucts;
#endregion
#region Implementation of IAuxiliariesViewModel
public IAuxiliariesDeclarationInputData ModelData { get { return AdapterFactory.AuxiliariesDeclarationAdapter(this); } }
......@@ -51,8 +75,10 @@ namespace VECTO3GUI.ViewModel.Impl {
public ObservableCollection<SteeringPumpEntry> SteeringPumpTechnologies
{
get {
if (axlesViewModel == null) {
get
{
if (axlesViewModel == null)
{
ConnectAxleViewModel();
}
......@@ -78,14 +104,112 @@ namespace VECTO3GUI.ViewModel.Impl {
public AllowedEntry<string>[] AllowedHVACTechnologies { get { return DeclarationData.HeatingVentilationAirConditioning.GetTechnologies().Select(t => AllowedEntry.Create(t, t)).ToArray(); } }
public bool DayrunninglightsLED
{
get { return _dayRunningLightsLED; }
set { SetProperty(ref _dayRunningLightsLED, value); }
}
public bool HeadlightsLED
{
get { return _headlightyLED; }
set { SetProperty(ref _headlightyLED, value); }
}
public bool PositionlightsLED
{
get { return _positionlightsLED; }
set { SetProperty(ref _positionlightsLED, value); }
}
public bool BrakelightsLED
{
get { return _breaklightsLED; }
set { SetProperty(ref _breaklightsLED, value); }
}
public bool InteriorLightsLED
{
get { return _interiorLightsLED; }
set { SetProperty(ref _interiorLightsLED, value); }
}
public ObservableCollection<IAlternatorDeclarationInputData> Alternators
{
get { return _alternators; }
set { SetProperty(ref _alternators, value); }
}
public ConsumerTechnology DoorDriveTechnology
{
get { return _doorDriveTechnology; }
set { SetProperty(ref _doorDriveTechnology, value); }
}
public BusHVACSystemConfiguration SystemConfiguration
{
get { return _systemConfiguration; }
set { SetProperty(ref _systemConfiguration, value); }
}
public ACCompressorType CompressorTypeDriver
{
get { return _compressorTypeDriver; }
set { SetProperty(ref _compressorTypeDriver, value); }
}
public ACCompressorType CompressorTypePassenger
{
get { return _compressorTypePassenger; }
set { SetProperty(ref _compressorTypePassenger, value); }
}
public Watt AuxHeaterPower
{
get { return _auxHeaterPower; }
set { SetProperty(ref _auxHeaterPower, value); }
}
public bool DoubleGlasing
{
get { return _doubleGlasing; }
set { SetProperty(ref _doubleGlasing, value); }
}
public bool HeatPump
{
get { return _heatPump; }
set { SetProperty(ref _heatPump, value); }
}
public bool AdjustableAuxiliaryHeater
{
get { return _adjustableAuxiliaryHeater; }
set { SetProperty(ref _adjustableAuxiliaryHeater, value); }
}
public bool SeparateAirDistributionDucts
{
get { return _separateAirDistributionDucts; }
set { SetProperty(ref _separateAirDistributionDucts, value); }
}
public AllowedEntry<BusHVACSystemConfiguration>[] AllowedSystemConfigurations { get; private set; }
public AllowedEntry<ACCompressorType>[] AllowedDriverACCompressorTypes { get; private set; }
public AllowedEntry<ACCompressorType>[] AllowedPassengerACCompressorTypes { get; private set; }
public AllowedEntry<ConsumerTechnology>[] AllowedConsumerTechnologies { get; private set; }
#endregion
protected override void InputDataChanged()
{
//ToDo
var inputData = JobViewModel.InputDataProvider as IDeclarationInputDataProvider;
//SetValues(inputData.JobInputData.Vehicle.Components.);
////ToDo
//JobViewModel.InputDataProvider.Switch()
// .If<IDeclarationInputDataProvider>(d => SetValues(d.JobInputData.Vehicle.Components.AuxiliaryInputData()))
// .If<IEngineeringInputDataProvider>(e => SetValues(e.JobInputData.Vehicle.Components.AuxiliaryInputData()));
if (inputData.JobInputData.Vehicle.Components.BusAuxiliaries != null)
SetValues(inputData.JobInputData.Vehicle.Components.BusAuxiliaries);
ConnectAxleViewModel();
}
......@@ -93,7 +217,8 @@ namespace VECTO3GUI.ViewModel.Impl {
{
var axlesVm = ParentViewModel.GetComponentViewModel(Component.Axles);
if (axlesVm == null) {
if (axlesVm == null)
{
return;
}
......@@ -104,21 +229,25 @@ namespace VECTO3GUI.ViewModel.Impl {
private void UpdateSteeringPump(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "NumSteeredAxles") {
if (e.PropertyName == "NumSteeredAxles")
{
DoUpdateSteeringPumpTechnologies();
}
}
private void DoUpdateSteeringPumpTechnologies()
{
if (axlesViewModel == null) {
if (axlesViewModel == null)
{
return;
}
while (_steeringPumpTechnologies.Count > axlesViewModel.NumSteeredAxles) {
while (_steeringPumpTechnologies.Count > axlesViewModel.NumSteeredAxles)
{
_steeringPumpTechnologies.RemoveAt(_steeringPumpTechnologies.Count - 1);
}
while (_steeringPumpTechnologies.Count < axlesViewModel.NumSteeredAxles) {
while (_steeringPumpTechnologies.Count < axlesViewModel.NumSteeredAxles)
{
_steeringPumpTechnologies.Add(new SteeringPumpEntry(_steeringPumpTechnologies.Count + 1, AllowedSteeringPumpTechnologies.First().Label));
}
}
......@@ -135,9 +264,57 @@ namespace VECTO3GUI.ViewModel.Impl {
HVACTechnology = aux.Auxiliaries.First(x => x.Type == AuxiliaryType.HVAC).Technology.FirstOrDefault();
PneumaticSystemTechnology = aux.Auxiliaries.First(x => x.Type == AuxiliaryType.PneumaticSystem).Technology.FirstOrDefault();
SteeringPumpTechnologies.Clear();
foreach (var tech in aux.Auxiliaries.First(x => x.Type == AuxiliaryType.SteeringPump).Technology) {
foreach (var tech in aux.Auxiliaries.First(x => x.Type == AuxiliaryType.SteeringPump).Technology)
{
SteeringPumpTechnologies.Add(new SteeringPumpEntry(SteeringPumpTechnologies.Count + 1, tech));
}
}
private void SetValues(IBusAuxiliariesDeclarationData busAux)
{
if (!busAux.ElectricSupply.Alternators.IsNullOrEmpty()) {
Alternators = new ObservableCollection<IAlternatorDeclarationInputData>();
for (int i = 0; i < busAux.ElectricSupply.Alternators.Count; i++) {
Alternators.Add(new AlternatorDeclarationInputData
{
Ratio = busAux.ElectricSupply.Alternators[i].Ratio,
Technology = busAux.ElectricSupply.Alternators[i].Technology
});
}
}
DayrunninglightsLED = busAux.ElectricConsumers.DayrunninglightsLED;
HeadlightsLED = busAux.ElectricConsumers.HeadlightsLED;
PositionlightsLED = busAux.ElectricConsumers.PositionlightsLED;
BrakelightsLED = busAux.ElectricConsumers.BrakelightsLED;
InteriorLightsLED = busAux.ElectricConsumers.InteriorLightsLED;
DoorDriveTechnology = busAux.PneumaticConsumers.DoorDriveTechnology;
SystemConfiguration = busAux.HVACAux.SystemConfiguration;
CompressorTypeDriver = busAux.HVACAux.CompressorTypeDriver;
CompressorTypePassenger = busAux.HVACAux.CompressorTypePassenger;
AuxHeaterPower = busAux.HVACAux.AuxHeaterPower;
DoubleGlasing = busAux.HVACAux.DoubleGlasing;
HeatPump = busAux.HVACAux.HeatPump;
AdjustableAuxiliaryHeater = busAux.HVACAux.AdjustableAuxiliaryHeater;
SeparateAirDistributionDucts = busAux.HVACAux.SeparateAirDistributionDucts;
SetAllowedValues();
}
private void SetAllowedValues()
{
AllowedSystemConfigurations = Enum.GetValues(typeof(BusHVACSystemConfiguration)).Cast<BusHVACSystemConfiguration>()
.Select(sc => AllowedEntry.Create(sc, sc.GetLabel())).ToArray();
AllowedDriverACCompressorTypes = Enum.GetValues(typeof(ACCompressorType)).Cast<ACCompressorType>()
.Select(acc => AllowedEntry.Create(acc, acc.GetLabel())).ToArray();
AllowedPassengerACCompressorTypes = AllowedDriverACCompressorTypes;
AllowedConsumerTechnologies = Enum.GetValues(typeof(ConsumerTechnology)).Cast<ConsumerTechnology>()
.Select(sc => AllowedEntry.Create(sc, sc.GetLabel())).ToArray();
}
}
}
\ No newline at end of file
......@@ -36,7 +36,7 @@ namespace VECTO3GUI.ViewModel.Impl
private Meter _vehicleLength;
private Meter _vehicleWidth;
private Meter _entranceHeight;
private string _doorDriveTechnology;
private ConsumerTechnology _doorDriveTechnology;
#endregion
......@@ -129,15 +129,16 @@ namespace VECTO3GUI.ViewModel.Impl
get { return _entranceHeight;}
set { SetProperty(ref _entranceHeight, value); }
}
public string DoorDriveTechnology
public ConsumerTechnology DoorDriveTechnology
{
get { return _doorDriveTechnology;}
set { SetProperty(ref _doorDriveTechnology, value); }
}
public AllowedEntry<LegislativeClass>[] AllowedLegislativeClass { get; set; }
public AllowedEntry<VehicleCode>[] AllowedVehicleCode { get; set; }
public AllowedEntry<FloorType>[] AllowedFloorType { get; set; }
public AllowedEntry<LegislativeClass>[] AllowedLegislativeClasses { get; private set; }
public AllowedEntry<VehicleCode>[] AllowedVehicleCodes { get; private set; }
public AllowedEntry<FloorType>[] AllowedFloorTypes { get; private set; }
public AllowedEntry<ConsumerTechnology>[] AllowedConsumerTechnologies { get; private set; }
#endregion
......@@ -177,14 +178,17 @@ namespace VECTO3GUI.ViewModel.Impl
private void SetAllowedEntries()
{
AllowedLegislativeClass = Enum.GetValues(typeof(LegislativeClass)).Cast<LegislativeClass>()
AllowedLegislativeClasses = Enum.GetValues(typeof(LegislativeClass)).Cast<LegislativeClass>()
.Select(lc => AllowedEntry.Create(lc, lc.GetLabel())).ToArray();
AllowedVehicleCode = Enum.GetValues(typeof(VehicleCode)).Cast<VehicleCode>()
AllowedVehicleCodes = Enum.GetValues(typeof(VehicleCode)).Cast<VehicleCode>()
.Select(vc => AllowedEntry.Create(vc, vc.GetLabel())).ToArray();
AllowedFloorType = Enum.GetValues(typeof(FloorType)).Cast<FloorType>()
AllowedFloorTypes = Enum.GetValues(typeof(FloorType)).Cast<FloorType>()
.Select(ft => AllowedEntry.Create(ft, ft.GetLabel())).ToArray();
AllowedConsumerTechnologies = Enum.GetValues(typeof(ConsumerTechnology)).Cast<ConsumerTechnology>()
.Select(sc => AllowedEntry.Create(sc, sc.GetLabel())).ToArray();
}
#endregion
......
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Utils;
using VECTO3GUI.Util;
namespace VECTO3GUI.ViewModel.Interfaces {
......@@ -21,5 +24,40 @@ namespace VECTO3GUI.ViewModel.Interfaces {
string HVACTechnology { get; set; }
AllowedEntry<string>[] AllowedHVACTechnologies { get; }
#region Bus Auxiliaries
#region Electric System
ObservableCollection<IAlternatorDeclarationInputData> Alternators { get; set; }
bool DayrunninglightsLED { get; set; }
bool HeadlightsLED { get; set; }
bool PositionlightsLED { get; set; }
bool BrakelightsLED { get; set; }
bool InteriorLightsLED { get; set; }
#endregion
ConsumerTechnology DoorDriveTechnology { get; set; }
#region Havac
BusHVACSystemConfiguration SystemConfiguration { get; set; }
ACCompressorType CompressorTypeDriver { get; set; }
ACCompressorType CompressorTypePassenger { get; set; }
Watt AuxHeaterPower { get; set; }
bool DoubleGlasing { get; set; }
bool HeatPump { get; set; }
bool AdjustableAuxiliaryHeater { get; set; }
bool SeparateAirDistributionDucts { get; set; }
#endregion
AllowedEntry<BusHVACSystemConfiguration>[] AllowedSystemConfigurations { get; }
AllowedEntry<ACCompressorType>[] AllowedDriverACCompressorTypes { get; }
AllowedEntry<ACCompressorType>[] AllowedPassengerACCompressorTypes { get; }
AllowedEntry<ConsumerTechnology>[] AllowedConsumerTechnologies { get; }
#endregion
}
}
\ No newline at end of file
......@@ -30,18 +30,16 @@ namespace VECTO3GUI.ViewModel.Interfaces
#region CompleteBusDataProviderV26
string DoorDriveTechnology { get; set; }
ConsumerTechnology DoorDriveTechnology { get; set; }
#endregion
#region MyRegion
AllowedEntry<LegislativeClass>[] AllowedLegislativeClass { get; set; }
AllowedEntry<VehicleCode>[] AllowedVehicleCode{ get; set; }
AllowedEntry<FloorType>[] AllowedFloorType { get; set; }
//public AllowedEntry<AxleConfiguration>[] AllowedAxleConfigurations { get; set; }
//public AllowedEntry<RetarderType>[] AllowedRetarderTypes { get; set; }
//public AllowedEntry<AngledriveType>[] AllowedAngledriveTypes { get; set; }
AllowedEntry<LegislativeClass>[] AllowedLegislativeClasses { get;}
AllowedEntry<VehicleCode>[] AllowedVehicleCodes{ get;}
AllowedEntry<FloorType>[] AllowedFloorTypes { get; }
AllowedEntry<ConsumerTechnology>[] AllowedConsumerTechnologies { get;}
#endregion
......
......@@ -3,45 +3,52 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:viewModel="clr-namespace:VECTO3GUI.ViewModel"
xmlns:interfaces="clr-namespace:VECTO3GUI.ViewModel.Interfaces"
xmlns:customControls="clr-namespace:VECTO3GUI.Views.CustomControls"
xmlns:helper="clr-namespace:VECTO3GUI.Helper"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="800">
<d:AirdragDeclarationView.DataContext>
<x:Type Type="interfaces:IAirdragViewModel"/>
</d:AirdragDeclarationView.DataContext>
<Grid>
<StackPanel Orientation="Vertical" Width="400" HorizontalAlignment="Left" Grid.IsSharedSizeScope="True">
<customControls:CheckboxParameter
Caption="Use Measured Values" CaptionWidthGroup="lblWidth"
Value="{Binding UseMeasuredValues}" UnitWidthGroup="unitWidth"
/>
Value="{Binding UseMeasuredValues}" UnitWidthGroup="unitWidth"/>
<customControls:CommonDeclarationComponentData
Model="{Binding Model}"
Manufacturer="{Binding Manufacturer}"
Date="{Binding Date}"
CertificationNumber="{Binding CertificationNumber}"
IsEnabled="{Binding UseMeasuredValues}"/>
<customControls:VectoParameterControl
Caption="App Version" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding AppVersion}" />
<customControls:VectoParameterControl
Caption="Cd x A 0" CaptionWidthGroup="lblWidth"
Unit="{helper:SIUnit CdxA_0}" UnitWidthGroup="unitWidth"
Value="{Binding CdxA_0}"
IsEnabled="{Binding UseMeasuredValues}"
/>
Value="{Binding CdxA_0, Converter={helper:SIValueConverter}, ConverterParameter=int}"
IsEnabled="{Binding UseMeasuredValues}"/>
<customControls:VectoParameterControl
Caption="Transferred Cd x A 0" CaptionWidthGroup="lblWidth"
Unit="{helper:SIUnit TransferredCdxA}" UnitWidthGroup="unitWidth"
Value="{Binding TransferredCdxA}"
IsEnabled="{Binding UseMeasuredValues}"
/>
Value="{Binding TransferredCdxA, Converter={helper:SIValueConverter}, ConverterParameter=double}"
IsEnabled="{Binding UseMeasuredValues}"/>
<customControls:VectoParameterControl
Caption="DeclaredCd x A 0" CaptionWidthGroup="lblWidth"
Unit="{helper:SIUnit DeclaredCdxA}" UnitWidthGroup="unitWidth"
Value="{Binding DeclaredCdxA}"
IsEnabled="{Binding UseMeasuredValues}"
/>
Value="{Binding DeclaredCdxA, Converter={helper:SIValueConverter}, ConverterParameter=double}"
IsEnabled="{Binding UseMeasuredValues}"/>
</StackPanel>
</Grid>
</UserControl>
......@@ -5,13 +5,115 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:interfaces="clr-namespace:VECTO3GUI.ViewModel.Interfaces"
xmlns:customControls="clr-namespace:VECTO3GUI.Views.CustomControls"
xmlns:helper="clr-namespace:VECTO3GUI.Helper"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="800">
<d:EditCyclesView.DataContext>
<x:Type Type="interfaces:IAuxiliariesViewModel"/>
</d:EditCyclesView.DataContext>
<Grid>
<StackPanel Orientation="Vertical" Width="400" HorizontalAlignment="Left" Grid.IsSharedSizeScope="True">
<GroupBox Header="Electric Systems">
<StackPanel Orientation="Vertical">
<DataGrid AutoGenerateColumns="False" ColumnWidth="*" IsReadOnly="False" CanUserAddRows="False" VerticalAlignment="Top"
HeadersVisibility="All" RowHeaderWidth="30" ItemsSource="{Binding Alternators}">
<DataGrid.Columns>
<DataGridTextColumn Header="Ratio" Binding="{Binding Ratio}" />
<DataGridTextColumn Header="Technology" Binding="{Binding Technology}" />
</DataGrid.Columns>
</DataGrid>
<customControls:CheckboxParameter
Caption="Dayrunniglights LED" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding DayrunninglightsLED}"/>
<customControls:CheckboxParameter
Caption="Headlights LED" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding HeadlightsLED}"/>
<customControls:CheckboxParameter
Caption="Positionlights LED" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding PositionlightsLED}"/>
<customControls:CheckboxParameter
Caption="Brakelights LED" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding BrakelightsLED}"/>
<customControls:CheckboxParameter
Caption="Interiorlights LED" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding InteriorLightsLED}"/>
</StackPanel>
</GroupBox>
<GroupBox Header="Pneumatic System">
<customControls:ComboParameter
Caption="DoorDriveTechnology" CaptionWidthGroup="lblWidth"
UnitWidthGroup="unitWidth"
Value="{Binding DoorDriveTechnology}"
AllowedValues="{Binding AllowedConsumerTechnologies}" />
</GroupBox>
<GroupBox Header="HVAC">
<StackPanel>
<customControls:ComboParameter
Caption="System Configuration"
CaptionWidthGroup="lblWidth" UnitWidthGroup="unitWidth"
Value="{Binding SystemConfiguration}"
AllowedValues="{Binding AllowedSystemConfigurations}" />
<customControls:ComboParameter
Caption="Compressor Type Driver"
CaptionWidthGroup="lblWidth" UnitWidthGroup="unitWidth"
Value="{Binding CompressorTypeDriver}"
AllowedValues="{Binding AllowedDriverACCompressorTypes}" />
<customControls:ComboParameter
Caption="Compressor Type Passenger"
CaptionWidthGroup="lblWidth" UnitWidthGroup="unitWidth"
Value="{Binding CompressorTypePassenger}"
AllowedValues="{Binding AllowedPassengerACCompressorTypes}" />
<customControls:VectoParameterControl
Caption="Height Integrated Body" Unit="{helper:SIUnit AuxHeaterPower}" CaptionWidthGroup="lblWidth" UnitWidthGroup="unitWidth"
Value="{Binding AuxHeaterPower, Converter={helper:SIValueConverter}, ConverterParameter=double}" />
<customControls:CheckboxParameter
Caption="Double Glasing" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding DoubleGlasing}"/>
<customControls:CheckboxParameter
Caption="Heat Pump" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding HeatPump}"/>
<customControls:CheckboxParameter
Caption="Adjustable Auxiliary Heater" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding AdjustableAuxiliaryHeater}"/>
<customControls:CheckboxParameter
Caption="Separate Air Distribution Ducts" CaptionWidthGroup="lblWidth"
Unit="" UnitWidthGroup="unitWidth"
Value="{Binding SeparateAirDistributionDucts}"/>
</StackPanel>
</GroupBox>
<!--<customControls:ComboParameter
Caption="Fan Technology" CaptionWidthGroup="lblWidth"
Value="{Binding FanTechnology}"
AllowedValues="{Binding AllowedFanTechnologies}" />
......@@ -42,6 +144,8 @@
<customControls:ComboParameter
Caption="HVAC Technology" CaptionWidthGroup="lblWidth"
Value="{Binding HVACTechnology}"
AllowedValues="{Binding AllowedHVACTechnologies}" />
AllowedValues="{Binding AllowedHVACTechnologies}" />-->
</StackPanel>
</Grid>
</UserControl>
......@@ -35,7 +35,7 @@
Caption="Legislative Class"
CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding LegislativeClass}"
AllowedValues="{Binding AllowedLegislativeClass}" />
AllowedValues="{Binding AllowedLegislativeClasses}" />
<customControls:VectoParameterControl
Caption="Registered Class" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
......@@ -45,7 +45,7 @@
Caption="Vehicle Code"
CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding VehicleCode}"
AllowedValues="{Binding AllowedVehicleCode}" />
AllowedValues="{Binding AllowedVehicleCodes}" />
<customControls:VectoParameterControl
Caption="Curb Mass Chassis" Unit="{helper:SIUnit CurbMassChassis}" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
......@@ -67,7 +67,7 @@
Caption="Floor Type"
CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding FloorType}"
AllowedValues="{Binding AllowedFloorType}" />
AllowedValues="{Binding AllowedFloorTypes}" />
<customControls:VectoParameterControl
Caption="Height Integrated Body" Unit="{helper:SIUnit HeightIntegratedBody}" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
......@@ -86,9 +86,11 @@
Value="{Binding EntranceHeight, Converter={helper:SIValueConverter}, ConverterParameter=double}" />
<customControls:VectoParameterControl
Caption="Door Drive Technology" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding DoorDriveTechnology}" />
<customControls:ComboParameter
Caption="Door Drive Technology"
CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth"
Value="{Binding DoorDriveTechnology}"
AllowedValues="{Binding AllowedConsumerTechnologies}" />
</StackPanel>
</StackPanel>
......
......@@ -16,18 +16,22 @@
<local:VectoParameterControl
Grid.Row="0"
Caption="Manufacturer" Unit=""
UnitWidthGroup="unitWidth"
Value="{Binding Manufacturer}" CaptionWidthGroup="cddl"/>
<local:VectoParameterControl
Grid.Row="1"
Caption="Model" Unit=""
UnitWidthGroup="unitWidth"
Value="{Binding Model}" CaptionWidthGroup="cddl"/>
<local:VectoParameterControl
Grid.Row="2"
Caption="Date" Unit=""
UnitWidthGroup="unitWidth"
Value="{Binding Date}" CaptionWidthGroup="cddl"/>
<local:VectoParameterControl
Grid.Row="3"
Caption="Certification Number" Unit=""
UnitWidthGroup="unitWidth"
Value="{Binding CertificationNumber}" CaptionWidthGroup="cddl"/>
</Grid>
</UserControl>
using TUGraz.VectoCommon.Utils;
using System.Text.RegularExpressions;
using TUGraz.VectoCommon.Utils;
namespace TUGraz.VectoCommon.BusAuxiliaries {
public enum BusHVACSystemConfiguration
......@@ -23,5 +24,32 @@ namespace TUGraz.VectoCommon.BusAuxiliaries {
{
return (Prefix + text).ParseEnum<BusHVACSystemConfiguration>();
}
public static string GetLabel(this BusHVACSystemConfiguration havacConfiguration)
{
switch (havacConfiguration) {
case BusHVACSystemConfiguration.Configuration1:
return $"{Prefix} 1";
case BusHVACSystemConfiguration.Configuration2:
return $"{Prefix} 2";
case BusHVACSystemConfiguration.Configuration3:
return $"{Prefix} 3";
case BusHVACSystemConfiguration.Configuration4:
return $"{Prefix} 4";
case BusHVACSystemConfiguration.Configuration5:
return $"{Prefix} 5";
case BusHVACSystemConfiguration.Configuration6:
return $"{Prefix} 6";
case BusHVACSystemConfiguration.Configuration7:
return $"{Prefix} 7";
case BusHVACSystemConfiguration.Configuration8:
return $"{Prefix} 8";
case BusHVACSystemConfiguration.Configuration9:
return $"{Prefix} 9";
default:
return BusHVACSystemConfiguration.Unknown.ToString();
}
}
}
}
\ No newline at end of file
......@@ -50,5 +50,19 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
return ConsumerTechnology.Unknown;
}
}
public static string GetLabel(this ConsumerTechnology technology)
{
switch (technology) {
case ConsumerTechnology.Electrically:
return "Electric";
case ConsumerTechnology.Mechanically:
return "Mechanic";
case ConsumerTechnology.Pneumatically:
return "Pneumatic";
default:
return ConsumerTechnology.Unknown.ToString();
}
}
}
}
......@@ -132,6 +132,18 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
}
}
public static string GetLabel(this ACCompressorType type)
{
switch (type)
{
case ACCompressorType.TwoStage: return "2-stage";
case ACCompressorType.ThreeStage: return "3-stage";
case ACCompressorType.FourStage: return "4-stage";
default: return type.ToString();
}
}
public static bool IsElectrical(this ACCompressorType type)
{
return type == ACCompressorType.Continuous;
......
......@@ -878,9 +878,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
get { return GetDouble(XMLNames.Bus_EntranceHeight).SI<Meter>(); }
}
public virtual string DoorDriveTechnology
public virtual ConsumerTechnology DoorDriveTechnology
{
get { return GetString(XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology); }
get { return ConsumerTechnologyHelper.Parse(GetString(XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology)); }
}
......
......@@ -63,7 +63,7 @@ namespace TUGraz.VectoCore.Tests.XML
Assert.AreEqual(11.830, vehicle.Length.Value());
Assert.AreEqual(2.550, vehicle.Width.Value());
Assert.AreEqual(0.120, vehicle.EntranceHeight.Value());
Assert.AreEqual("pneumatic", ((XMLDeclarationCompletedBusDataProviderV26)vehicle).DoorDriveTechnology);
Assert.AreEqual(ConsumerTechnology.Pneumatically, ((XMLDeclarationCompletedBusDataProviderV26)vehicle).DoorDriveTechnology);
var components = inputDataProvider.JobInputData.Vehicle.Components;
Assert.IsNotNull(components);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment