diff --git a/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs b/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs index fe3e3e6fcac98fff399b752ac0b0666f99abef11..2b18d352282c7a928c9ee52f1d50a64d1dad6534 100644 --- a/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs +++ b/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLVehicleWriter.cs @@ -327,8 +327,11 @@ namespace VECTO3GUI2020.Util.XML.Implementation.ComponentWriter _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Vehicle_RegisteredClass, _inputData.RegisteredClass.ToXMLFormat())); - _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_NumberPassengersLowerDeck, _inputData.NumberPassengerSeatsLowerDeck)); - _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_NumberPassengersUpperDeck, _inputData.NumberPassengerSeatsUpperDeck)); + _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_NumberPassengerSeatsLowerDeck, _inputData.NumberPassengerSeatsLowerDeck)); + _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_NumberPassengersStandingLowerDeck, _inputData.NumberPassengersStandingUpperDeck)); + + _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_NumberPassengerSeatsUpperDeck, _inputData.NumberPassengerSeatsUpperDeck)); + _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_NumberPassengersStandingUpperDeck, _inputData.NumberPassengersStandingUpperDeck)); _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Vehicle_BodyworkCode, _inputData.VehicleCode.ToXMLFormat())); _Xelement.Add(new XElement(_defaultNamespace + XMLNames.Bus_LowEntry, _inputData.LowEntry)); diff --git a/VECTO3GUI2020/Views/Multistage/VehicleView_v2_8_exempted.xaml b/VECTO3GUI2020/Views/Multistage/VehicleView_v2_8_exempted.xaml index 21ae48bcda99c8d4000a73346353fefd5168948b..e3f52ba7dbc010f5226c8134035eb564a88b0d24 100644 --- a/VECTO3GUI2020/Views/Multistage/VehicleView_v2_8_exempted.xaml +++ b/VECTO3GUI2020/Views/Multistage/VehicleView_v2_8_exempted.xaml @@ -36,10 +36,15 @@ Content="{Binding ParameterViewModels[HeightInMm]}"/> <Label Style="{DynamicResource LabelStyle1}">Number of Passengers</Label> + <ContentControl Content="{Binding ParameterViewModels[NumberPassengerSeatsLowerDeck]}"/> + <ContentControl + Content="{Binding ParameterViewModels[NumberPassengersStandingLowerDeck]}"/> <ContentControl Content="{Binding ParameterViewModels[NumberPassengerSeatsUpperDeck]}"/> + <ContentControl + Content="{Binding ParameterViewModels[NumberPassengersStandingUpperDeck]}"/> diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs index ea13e3759db58378ab0701a775dfe9dc99851083..a8d5dbf9f7d60634e2bad6a4dd40f40d2158370a 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs @@ -1187,9 +1187,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider { get { - if (!ElementExists(XMLNames.Bus_NumberPassengersLowerDeck)) + if (!ElementExists(XMLNames.Bus_NumberPassengerSeatsLowerDeck)) return null; - var node = GetNode(XMLNames.Bus_NumberPassengersLowerDeck); + var node = GetNode(XMLNames.Bus_NumberPassengerSeatsLowerDeck); return XmlConvert.ToInt32(node.InnerText); } } @@ -1198,13 +1198,37 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider { get { - if (!ElementExists(XMLNames.Bus_NumberPassengersUpperDeck)) + if (!ElementExists(XMLNames.Bus_NumberPassengerSeatsUpperDeck)) + return null; + var node = GetNode(XMLNames.Bus_NumberPassengerSeatsUpperDeck); + return XmlConvert.ToInt32(node.InnerText); + } + } + + + public override int? NumberPassengersStandingLowerDeck + { + get + { + if (!ElementExists(XMLNames.Bus_NumberPassengersStandingLowerDeck)) + return null; + var node = GetNode(XMLNames.Bus_NumberPassengersStandingLowerDeck); + return XmlConvert.ToInt32(node.InnerText); + } + } + + public override int? NumberPassengersStandingUpperDeck + { + get + { + if (!ElementExists(XMLNames.Bus_NumberPassengersStandingUpperDeck)) return null; - var node = GetNode(XMLNames.Bus_NumberPassengersUpperDeck); + var node = GetNode(XMLNames.Bus_NumberPassengersStandingUpperDeck); return XmlConvert.ToInt32(node.InnerText); } } + public override VehicleCode? VehicleCode => ElementExists(XMLNames.Vehicle_BodyworkCode) ? GetString(XMLNames.Vehicle_BodyworkCode).ParseEnum<VehicleCode>() diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs index d93b4915ab1ebe4ea0c0def387c789afee553dbf..987ccd5d86ba9759ce9825121bc5ff4ec799b212 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs @@ -669,7 +669,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl & InputComplete(GrossVehicleMassRating, nameof(GrossVehicleMassRating)) & InputComplete(RegisteredClass, nameof(RegisteredClass)) & InputComplete(NumberPassengerSeatsLowerDeck, nameof(NumberPassengerSeatsLowerDeck)) + & InputComplete(NumberPassengersStandingLowerDeck, nameof(NumberPassengersStandingLowerDeck)) & InputComplete(NumberPassengerSeatsUpperDeck, nameof(NumberPassengerSeatsUpperDeck)) + & InputComplete(NumberPassengersStandingUpperDeck, nameof(NumberPassengersStandingUpperDeck)) & InputComplete(VehicleCode, nameof(VehicleCode)) & InputComplete(LowEntry, nameof(LowEntry)) & InputComplete(Height, nameof(Height));