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

Skip to content
Snippets Groups Projects
Commit 67df6494 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
parents 5cef72ab 1f765e84
No related branches found
No related tags found
No related merge requests found
Showing
with 339 additions and 89 deletions
using System;
using System.Diagnostics;
using System.Globalization;
using System.Linq.Expressions;
using System.Runtime.InteropServices;
using System.Windows.Data;
using TUGraz.VectoCommon.Utils;
using VECTO3GUI2020.Util;
using SIUtils = VECTO3GUI2020.Util.SIUtils;
namespace VECTO3GUI2020.Helper.Converter
{
class SIValueToStringConverter : IValueConverter
{
{
private SI _si;
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if(value is SI SIvalue)
{
return SIvalue.ToGUIFormat();
}
if (value == null) {
_si = null;
return value;
}
if(value is SI SIvalue) {
_si = SIvalue;
return SIvalue.ToGUIFormat();
}
return Binding.DoNothing;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
if (_si == null) {
return value;
}
try {
var newSi = SIUtils.CreateSIValue(_si.GetType(), Double.Parse(value as string));
return newSi;
} catch (Exception e) {
return value;
}
}
}
}
using System;
using System.Globalization;
using System.Windows.Controls;
namespace VECTO3GUI2020.Helper
{
public class DoubleValidation : ValidationRule
{
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
{
try {
Double.Parse(value as string);
} catch (Exception e) {
return new ValidationResult(false, "Not a number");
}
return ValidationResult.ValidResult;
}
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ using System.Reflection;
using TUGraz.VectoCommon.Utils;
//Copied from VECTO3GUI franzjosefkober
//Copied from VECTO3GUI franz kober
namespace VECTO3GUI2020.Util
{
public static class SIUtils
......
......@@ -129,6 +129,7 @@
<Compile Include="Helper\Converter\SIToUnitString.cs" />
<Compile Include="Helper\Converter\SIValueToStringConverter.cs" />
<Compile Include="Helper\Converter\VehicleCategoryToStringConverter.cs" />
<Compile Include="Helper\DoubleValidation.cs" />
<Compile Include="Helper\Extension.cs" />
<Compile Include="Helper\IWindowHelper.cs" />
<Compile Include="Helper\DialogHelper.cs" />
......@@ -242,6 +243,8 @@
<Compile Include="ViewModel\Interfaces\JobEdit\Vehicle\Components\ITyreViewModel.cs" />
<Compile Include="ViewModel\Interfaces\JobEdit\Vehicle\IVehicleViewModel.cs" />
<Compile Include="ViewModel\MultiStage\Implementation\DeclarationInterimStageBusVehicleViewModel_v2_8.cs" />
<Compile Include="ViewModel\MultiStage\Implementation\InterimStageBusAuxiliariesViewModel_v2_8.cs" />
<Compile Include="ViewModel\MultiStage\Implementation\InterimStageViewModel.cs" />
<Compile Include="ViewModel\MultiStage\Implementation\ManufacturingStageViewModel_v0_1.cs" />
<Compile Include="ViewModel\MultiStage\Implementation\MultistageAirdragViewModel.cs" />
<Compile Include="ViewModel\MultiStage\Implementation\NewMultiStageJobViewModel.cs" />
......
......@@ -12,6 +12,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation.Common
///
public class ViewModelBase : INotifyPropertyChanged, IViewModelBase
{
private string _error;
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// Needs to be called when a Property is changed
......@@ -24,7 +25,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation.Common
}
//borrowed from Franz Josef Kober
//borrowed from Franz Kober
protected virtual bool SetProperty<T>(ref T field, T value, [CallerMemberName] string propertyName = null)
{
bool propertyChanged = false;
......
......@@ -6,6 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Castle.Core.Internal;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
......@@ -15,6 +16,7 @@ using VECTO3GUI2020.Properties;
using VECTO3GUI2020.ViewModel.Implementation.Common;
using VECTO3GUI2020.ViewModel.Interfaces.JobEdit.Vehicle;
using VECTO3GUI2020.ViewModel.Interfaces.JobEdit.Vehicle.Components;
using VECTO3GUI2020.ViewModel.MultiStage.Interfaces;
namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
{
......@@ -42,16 +44,39 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
get { throw new NotImplementedException(); }
}
#region Implementation used fields in IVehicleInputData
private string _manufacturer;
private string _model;
private string _vin;
private string _manufacturerAddress;
private bool _measurementsGroupEditingEnabled = false;
private bool _numberOfPassengersEditingEnabled = false;
private int? _numberOfPassengersUpperDeck;
private int? _numberOfPassengersLowerDeck;
private Kilogram _grossVehicleMassRating;
private Meter _entranceHeight;
private bool? _lowEntry;
private VehicleCode? _vehicleCode;
private RegistrationClass? _registeredClass;
private bool? _airdragModifiedMultistage;
private LegislativeClass? _legislativeClass;
private ConsumerTechnology? _doorDriveTechnology;
private TankSystem? _tankSystem;
private Kilogram _curbMassChassis;
private Meter _length;
private Meter _height;
private Meter _width;
public string Manufacturer
{
get { return _manufacturer; }
set { SetProperty(ref _manufacturer, value); }
set
{
SetProperty(ref _manufacturer, value);
}
}
public string Model
......@@ -72,49 +97,44 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
set { SetProperty(ref _manufacturerAddress, value); }
}
private bool _measurementsGroupEditingEnabled = false;
public bool MeasurementsGroupEditingEnabled
{
get { return _measurementsGroupEditingEnabled; }
set { SetProperty(ref _measurementsGroupEditingEnabled, value); }
}
private Meter _height;
public Meter Height
{
get { return _height; }
set { SetProperty(ref _height, value); }
}
private Meter _length;
public Meter Length
{
get { return _length; }
set { SetProperty(ref _length, value); }
}
private Meter _width;
public Meter Width
{
get { return _width; }
set { SetProperty(ref _width, value); }
}
private Kilogram _curbMassChassis;
public Kilogram CurbMassChassis
public Kilogram CurbMassChassis //Corrected Actual Mass
{
get { return _curbMassChassis; }
set { SetProperty(ref _curbMassChassis, value); }
}
private bool __numberOfPassengersEditingEnabled = false;
private int? _numberOfPassengersUpperDeck;
private int? _numberOfPassengersLowerDeck;
public bool NumberOfPassengersEditingEnabled
{
get { return __numberOfPassengersEditingEnabled; }
set { SetProperty(ref __numberOfPassengersEditingEnabled, value); }
get { return _numberOfPassengersEditingEnabled; }
set { SetProperty(ref _numberOfPassengersEditingEnabled, value); }
}
......@@ -130,19 +150,77 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
set { SetProperty(ref _numberOfPassengersLowerDeck, value); }
}
private TankSystem? _tankSystem;
public TankSystem? TankSystem
{
get { return _tankSystem; }
set { SetProperty(ref _tankSystem, value); }
}
public Kilogram GrossVehicleMassRating //Technical Permissible Maximum Laden Mass
{
get =>_grossVehicleMassRating;
set => SetProperty(ref _grossVehicleMassRating, value);
}
private IList<IComponentViewModel> _componentViewModels;
private IVehicleDeclarationInputData _inputData;
public ConsumerTechnology? DoorDriveTechnology
{
get => _doorDriveTechnology;
set => SetProperty(ref _doorDriveTechnology, value);
}
public LegislativeClass? LegislativeClass
{
get => _legislativeClass;
set => SetProperty(ref _legislativeClass, value);
}
public bool? AirdragModifiedMultistage
{
get => _airdragModifiedMultistage;
set => SetProperty(ref _airdragModifiedMultistage, value);
}
public RegistrationClass? RegisteredClass
{
get => _registeredClass;
set => SetProperty(ref _registeredClass , value);
}
public VehicleCode? VehicleCode
{
get => _vehicleCode;
set => SetProperty(ref _vehicleCode, value);
}
public bool? LowEntry
{
get => _lowEntry;
set => SetProperty(ref _lowEntry, value);
}
public Meter EntranceHeight
{
get => _entranceHeight;
set => SetProperty(ref _entranceHeight, value);
}
public VehicleDeclarationType VehicleDeclarationType
{
get => _vehicleDeclarationType;
set => SetProperty(ref _vehicleDeclarationType, value);
}
#endregion
private IList<IComponentViewModel> _componentViewModels;
private IVehicleDeclarationInputData _inputData;
private Dictionary<string, object> _accumulatedProperties = new Dictionary<string, object>();
private IVehicleViewModel _prevStageVehicleViewModel;
private IVehicleDeclarationInputData _prevStageInputData;
private VehicleDeclarationType _vehicleDeclarationType;
public ObservableCollection<IComponentViewModel> ComponentViewModels
{
......@@ -150,6 +228,11 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
set { throw new NotImplementedException(); }
}
public IVehicleViewModel PreviousStageVehicleViewModel
{
get => _prevStageVehicleViewModel;
}
public DeclarationInterimStageBusVehicleViewModel_v2_8()
{
......@@ -157,6 +240,16 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
}
public DeclarationInterimStageBusVehicleViewModel_v2_8(IVehicleDeclarationInputData prevStageInputData, IMultiStageViewModelFactory vmFactory)
{
PrevStageInputData = prevStageInputData;
}
public IVehicleDeclarationInputData PrevStageInputData
{
get { return _prevStageInputData; }
set { SetProperty(ref _prevStageInputData, value); }
}
#region implementation of IVehicleDeclarationInputData;
......@@ -196,10 +289,6 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
}
public LegislativeClass? LegislativeClass
{
get { throw new NotImplementedException(); }
}
public VehicleCategory VehicleCategory
{
......@@ -212,10 +301,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
}
public Kilogram GrossVehicleMassRating
{
get { throw new NotImplementedException(); }
}
public IList<ITorqueLimitInputData> TorqueLimits
{
......@@ -238,10 +324,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
get { throw new NotImplementedException(); }
}
public bool? AirdragModifiedMultistage
{
get { throw new NotImplementedException(); }
}
......@@ -275,10 +358,6 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
get { throw new NotImplementedException(); }
}
public RegistrationClass? RegisteredClass
{
get { throw new NotImplementedException(); }
}
public CubicMeter CargoVolume
......@@ -286,35 +365,15 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
get { throw new NotImplementedException(); }
}
public VehicleCode? VehicleCode
{
get { throw new NotImplementedException(); }
}
public bool? LowEntry
{
get { throw new NotImplementedException(); }
}
public bool Articulated
{
get { throw new NotImplementedException(); }
}
public Meter EntranceHeight
{
get { throw new NotImplementedException(); }
}
public ConsumerTechnology? DoorDriveTechnology
{
get { throw new NotImplementedException(); }
}
public VehicleDeclarationType VehicleDeclarationType
{
get { throw new NotImplementedException(); }
}
public IVehicleComponentsDeclaration Components
{
......@@ -351,6 +410,12 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
get { throw new NotImplementedException(); }
}
public Dictionary<string, object> AccumulatedProperties
{
get => _accumulatedProperties;
set => throw new NotImplementedException();
}
#endregion;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VECTO3GUI2020.ViewModel.Implementation.Common;
namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
{
public class InterimStageBusAuxiliariesViewModel_v2_8 : ViewModelBase
{
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TUGraz.VectoCommon.InputData;
using VECTO3GUI2020.ViewModel.Implementation.Common;
namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
{
public class InterimStageViewModel : ViewModelBase, IManufacturingStageViewModel
{
private DigestData _hashPreviousStage;
private int _stageCount;
private IVehicleDeclarationInputData _vehicle;
private IApplicationInformation _applicationInformation;
private DigestData _signature;
public DigestData HashPreviousStage => _hashPreviousStage;
public int StageCount => _stageCount;
public IVehicleDeclarationInputData Vehicle => _vehicle;
public IApplicationInformation ApplicationInformation => _applicationInformation;
public DigestData Signature => _signature;
}
}
......@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using System.Windows.Input;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider;
using TUGraz.VectoCore.InputData.Impl;
using TUGraz.VectoCore.Models.GenericModelData;
using VECTO3GUI2020.Util;
using VECTO3GUI2020.ViewModel.Implementation.Common;
......@@ -27,9 +28,17 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
public static readonly string QualifiedXSD = XMLDeclarationMultistageTypeInputDataV01.QUALIFIED_XSD_TYPE;
private Dictionary<string, IViewModelBase> Components = new Dictionary<string, IViewModelBase>(StringComparer.CurrentCultureIgnoreCase);
public DigestData HashPreviousStage => throw new NotImplementedException();
public DigestData HashPreviousStage
{
get => _hashPreviousStage;
set => SetProperty(ref _hashPreviousStage, value);
}
public int StageCount => throw new NotImplementedException();
public int StageCount
{
get => _stageCount;
set => SetProperty(ref _stageCount, value);
}
public IVehicleDeclarationInputData Vehicle => _vehicleViewModel;
......@@ -39,7 +48,9 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
set => SetProperty(ref _currentview, value);
}
private IApplicationInformation _applicationInformation;
private IApplicationInformation _applicationInformation = new ApplicationInformation {
Date = DateTime.Today,
};
private IVehicleViewModel _vehicleViewModel;
private IMultiStageViewModelFactory _viewModelFactory;
private IViewModelBase _currentview;
......@@ -62,28 +73,34 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
public ManufacturingStageViewModel_v0_1(IManufacturingStageInputData prevStageInputData, IMultiStageViewModelFactory viewModelFactory)
{
_viewModelFactory = viewModelFactory;
StageCount = prevStageInputData.StageCount + 1;
HashPreviousStage = prevStageInputData.Signature;
VehicleViewModel =
_viewModelFactory.CreateInterimStageVehicleViewModel(prevStageInputData.Vehicle.GetType().ToString());
CurrentView = VehicleViewModel as IViewModelBase;
VehicleViewModel =
_viewModelFactory.CreateInterimStageVehicleViewModel(prevStageInputData.Vehicle.GetType().ToString(), prevStageInputData.Vehicle);
CurrentView = VehicleViewModel as IViewModelBase;
Components.Add(VehicleViewModel.Name, VehicleViewModel as IViewModelBase);
var airDragEditViewModel = viewModelFactory.createMultistageAirdragViewModel();
var airDragEditViewModel = viewModelFactory.CreateMultistageAirdragViewModel();
Components.Add("Airdrag", airDragEditViewModel as IViewModelBase);
}
private ICommand _switchComponentViewCommand;
private int _stageCount;
private DigestData _hashPreviousStage;
public ICommand SwitchComponentViewCommand
{
get {
return _switchComponentViewCommand ?? new RelayCommand<string>(SwitchViewExecute, (string s) => true);
}
}
......@@ -95,7 +112,20 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
CurrentView = newView;
}
}
private class ApplicationInformationMultistage : IApplicationInformation
{
public string SimulationToolVersion => "VECTO3";
public DateTime Date => DateTime.Today;
}
}
public interface IManufacturingStageViewModel : IManufacturingStageInputData { }
public interface IManufacturingStageViewModel : IManufacturingStageInputData
{
}
}
......@@ -20,8 +20,10 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Interfaces
IVehicleViewModel CreateInterimStageVehicleViewModel(string inputProviderType);
IVehicleViewModel CreateInterimStageVehicleViewModel(string inputProviderType, IVehicleDeclarationInputData prevStageInputData);
IManufacturingStageViewModel CreateManufacturingStageViewModel(string inputProviderType, IManufacturingStageInputData prevStageInputData);
IMultistageAirdragViewModel createMultistageAirdragViewModel();
IMultistageAirdragViewModel CreateMultistageAirdragViewModel();
}
}
......@@ -30,21 +30,24 @@
Mode=TwoWay}"/>
<TextBox Grid.Column="2" VerticalAlignment="Center" Margin="2 0 2 0" IsReadOnly="True"
Text="{Binding ElementName=MultistageParameterControl, Path=PreviousContent, Converter={StaticResource SIValueToStringConverter}}"
Visibility="{Binding Optional,
ElementName=MultistageParameterControl, Converter={StaticResource BooleanToVisibilityConverter}, UpdateSourceTrigger=PropertyChanged}"/>
<TextBox Grid.Column="3" Name ="TextBoxContent" VerticalAlignment="Center" Margin="2 0 2 0"
Text="{Binding Content,
ElementName=MultistageParameterControl }"
Text="{Binding Content,
ElementName=MultistageParameterControl,
Converter={StaticResource SIValueToStringConverter},
ValidatesOnExceptions=True,
UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding ElementName=MultistageParameterControl,
Path=EditingEnabled, Converter={StaticResource InvertBoolConverter}}"/>
Path=EditingEnabled, Converter={StaticResource InvertBoolConverter}}" MouseDoubleClick="Control_OnMouseDoubleClick"/>
<Label Grid.Column="4" x:Name="AutoUnitLabel"
Content="{Binding DummyContent, ElementName=MultistageParameterControl, Converter={StaticResource SIToUnitStringConverter}}">
</Label>
</Grid>
<!-- ______________________________________________ Comboboxmode ___________________________________________________-->
<Grid Visibility="{Binding ElementName=MultistageParameterControl,
<Grid Visibility="{Binding ElementName=MultistageParameterControl,
Path=ComboBoxMode,
Converter={StaticResource BooleanToVisibilityConverter}}">
<Grid.ColumnDefinitions>
......@@ -66,7 +69,9 @@
<ComboBox Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="2 0 2 0" Visibility="{Binding Optional,
ElementName=MultistageParameterControl,
Converter={StaticResource BooleanToVisibilityConverter}}" IsHitTestVisible="False" Focusable="False" IsEditable="False"/>
Converter={StaticResource BooleanToVisibilityConverter}}" IsHitTestVisible="False" Focusable="False" IsEditable="False"
SelectedValue="{Binding PreviousContent, Mode=TwoWay, ElementName=MultistageParameterControl}"
ItemsSource="{Binding ListItems, ElementName=MultistageParameterControl}"/>
<ComboBox Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="2 0 2 0"
SelectedValue="{Binding Content, Mode=TwoWay, ElementName=MultistageParameterControl}"
......
......@@ -186,15 +186,20 @@ namespace VECTO3GUI2020.Views.Multistage.CustomControls
var dummyContent = createMethod?.Invoke(null, new object[] { (new double()) });
return dummyContent;
} else{
var bindingProperty = userControl.GetBindingExpression(e.Property);
var dataItemType = bindingProperty?.DataItem.GetType();
var sourcePropertyType =
dataItemType?.GetProperty(bindingProperty?.ResolvedSourcePropertyName)?.PropertyType;
var underlyingType = Nullable.GetUnderlyingType(type);
Enum dummyEnum;
if (underlyingType != null) {
dummyEnum = Enum.Parse(underlyingType, underlyingType.GetEnumNames()[0]);
} else {
dummyEnum = Enum.Parse(type, type.GetEnumNames()[0]);
}
var dummyEnum = Enum.Parse(underlyingType, underlyingType.GetEnumNames()[0]);
return dummyEnum;
}
......@@ -210,11 +215,13 @@ namespace VECTO3GUI2020.Views.Multistage.CustomControls
private static void EditingEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
MultiStageParameter multiStageParameter = (MultiStageParameter)d;
if ((bool)e.NewValue == false)
if((bool)e.NewValue == false)
{
multiStageParameter.Content = null;
} else {
if (multiStageParameter.DummyContent != null) {
multiStageParameter.Content = multiStageParameter.DummyContent;
}
}
}
......@@ -230,5 +237,10 @@ namespace VECTO3GUI2020.Views.Multistage.CustomControls
//LabelText = this.GetLabelByPropertyName(ContentProperty, Strings.ResourceManager);
}
private void Control_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
EditingEnabled = true;
}
}
}
......@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:VECTO3GUI2020.Views.Multistage"
xmlns:implementation="clr-namespace:VECTO3GUI2020.ViewModel.MultiStage.Implementation"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance implementation:ManufacturingStageViewModel_v0_1 }">
<Grid MaxWidth="900">
<DockPanel>
<Grid Margin="4" DockPanel.Dock="Top">
......@@ -22,6 +22,12 @@
Margin="4" Command="{Binding SwitchComponentViewCommand}" CommandParameter="Airdrag">Airdrag</Button>
<Button DockPanel.Dock="Left" Style="{DynamicResource MultiStageButtonStyle1}"
Margin="4" Command="{Binding SwitchComponentViewCommand}" CommandParameter="Auxiliaries">Auxiliaries</Button>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right">
<Label>Manufacturing Stage</Label>
<Label Content="{Binding StageCount}"/>
</StackPanel>
</DockPanel>
<ContentControl Content="{Binding CurrentView}"></ContentControl>
</DockPanel>
......
......@@ -8,6 +8,10 @@
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance implementation:MultiStageJobViewModel_v0_1}">
<Grid>
<ContentControl Content="{Binding ManufacturingStageViewModel}"/>
<ScrollViewer>
<DockPanel>
<ContentControl DockPanel.Dock="Top" Content="{Binding ManufacturingStageViewModel}"/>
</DockPanel>
</ScrollViewer>
</Grid>
</UserControl>
......@@ -14,27 +14,55 @@
<custom:MultiStageParameter Optional="False" Content="{Binding ManufacturerAddress}"/>
<custom:MultiStageParameter Optional="False" Content="{Binding VIN}"/>
<custom:MultiStageParameter
PreviousContent="{Binding PrevStageInputData.Model}"
Content="{Binding Model}"/>
<Separator/>
<custom:MultiStageParameter EditingEnabled="{Binding
MeasurementsGroupEditingEnabled}"
PreviousContent="{Binding PrevStageInputData.Height}"
Content="{Binding Height}"/>
<custom:MultiStageParameter EditingEnabled="{Binding
MeasurementsGroupEditingEnabled}"
PreviousContent="{Binding PrevStageInputData.Width}"
Content="{Binding Width}"
HideCheckBox="True"/>
<custom:MultiStageParameter EditingEnabled="{Binding
MeasurementsGroupEditingEnabled}"
PreviousContent="{Binding PrevStageInputData.Length}"
Content="{Binding Length}"
HideCheckBox="True"/>
<Separator/>
<custom:MultiStageParameter EditingEnabled="{Binding
NumberOfPassengersEditingEnabled}"
PreviousContent="{Binding PrevStageInputData.NumberOfPassengersUpperDeck}"
Content="{Binding NumberOfPassengersUpperDeck}"/>
<custom:MultiStageParameter EditingEnabled="{Binding
NumberOfPassengersEditingEnabled}"
PreviousContent="{Binding PrevStageInputData.NumberOfPassengersLowerDeck}"
Content="{Binding NumberOfPassengersLowerDeck}"
HideCheckBox="True"/>
<custom:MultiStageParameter Content="{Binding TankSystem}" ComboBoxMode="True"/>
<Separator/>
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.GrossVehicleMassRating}"
Content="{Binding GrossVehicleMassRating}"/>
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.DoorDriveTechnology}"
Content="{Binding DoorDriveTechnology}" ComboBoxMode="True" />
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.LegislativeClass}"
Content="{Binding LegislativeClass}" ComboBoxMode="True" />
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.RegisteredClass}"
Content="{Binding RegisteredClass}" ComboBoxMode="True" />
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.VehicleCode}"
Content="{Binding VehicleCode}" ComboBoxMode="True" />
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.LowEntry}"
Content="{Binding LowEntry}" />
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.EntranceHeight}"
Content="{Binding EntranceHeight}" />
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.TankSystem}"
Content="{Binding TankSystem}" ComboBoxMode="True" />
<custom:MultiStageParameter PreviousContent="{Binding PrevStageInputData.VehicleDeclarationType}"
Content="{Binding VehicleDeclarationType}" ComboBoxMode="True" />
</StackPanel>
</Grid>
......
......@@ -962,5 +962,15 @@ namespace TUGraz.VectoCommon.InputData
throw new ArgumentOutOfRangeException();
}
}
public static string GetLabel(this VehicleDeclarationType type)
{
switch (type)
{
case VehicleDeclarationType.final: return nameof(VehicleDeclarationType.final);
case VehicleDeclarationType.interim:
return nameof(VehicleDeclarationType.interim);
default: return null;
}
}
}
}
}
\ No newline at end of file
......@@ -32,12 +32,15 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.Declaration;
[assembly: InternalsVisibleTo("VECTO3GUI2020")]
namespace TUGraz.VectoCore.InputData.Impl
{
public class CycleInputData : ICycleData
......
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