From 8071cebb37f7410cbb574e9a22c3865f78276dc1 Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Mon, 9 May 2016 15:27:12 +0200 Subject: [PATCH] ModalResults Serializable --- VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs | 4 ++++ VectoCore/VectoCore/VectoCore.csproj | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs b/VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs index db5fd352f6..4c98903fd6 100644 --- a/VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs +++ b/VectoCore/VectoCore/Models/Simulation/Data/ModalResult.cs @@ -33,6 +33,7 @@ using System; using System.ComponentModel; using System.Data; using System.Reflection; +using System.Runtime.Serialization; using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Utils; @@ -42,6 +43,7 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.Simulation.Data { [DesignerCategory("")] // Full qualified attribute needed to disable design view in VisualStudio + [Serializable] public class ModalResults : DataTable { public static class ExtendedPropertyNames @@ -51,6 +53,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data public const string ShowUnit = "showUnit"; } + protected ModalResults(SerializationInfo info, StreamingContext context) : base(info, context){} + public ModalResults() { foreach (var value in EnumHelper.GetValues<ModalResultField>()) { diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 645bd17134..fa99d46a50 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -240,7 +240,6 @@ <Compile Include="Models\SimulationComponent\IGearbox.cs" /> <Compile Include="Models\Connector\Ports\ISimulationPort.cs" /> <Compile Include="Models\SimulationComponent\Impl\DistanceBasedDrivingCycle.cs" /> - <Compile Include="Models\SimulationComponent\Impl\TimeBasedDrivingCycle.cs" /> <Compile Include="Models\SimulationComponent\Impl\CombustionEngine.cs" /> <Compile Include="Models\SimulationComponent\Impl\Gearbox.cs" /> <Compile Include="Models\SimulationComponent\Impl\Wheels.cs" /> -- GitLab