From ca978a1dcc3c28b14616c64a5b00734a14a5e119 Mon Sep 17 00:00:00 2001 From: AJ Date: Thu, 2 Mar 2023 19:56:19 -0500 Subject: [PATCH] Made objects serializable so they work with winforms UI --- PepLib/Machine.cs | 5 ++++- PepLib/Material.cs | 5 ++++- PepLib/Part.cs | 1 + PepLib/Plate.cs | 1 + PepLib/Size.cs | 5 ++++- PepLib/Spacing.cs | 3 +++ 6 files changed, 17 insertions(+), 3 deletions(-) diff --git a/PepLib/Machine.cs b/PepLib/Machine.cs index 8fbb0c7..a2b3e96 100644 --- a/PepLib/Machine.cs +++ b/PepLib/Machine.cs @@ -1,5 +1,8 @@ -namespace PepLib +using System; + +namespace PepLib { + [Serializable] public class Machine { public int Id { get; set; } diff --git a/PepLib/Material.cs b/PepLib/Material.cs index e219c2d..3f9dcfe 100644 --- a/PepLib/Material.cs +++ b/PepLib/Material.cs @@ -1,5 +1,8 @@ -namespace PepLib +using System; + +namespace PepLib { + [Serializable] public class Material { public int Id { get; set; } diff --git a/PepLib/Part.cs b/PepLib/Part.cs index 4dc10ee..bd21958 100644 --- a/PepLib/Part.cs +++ b/PepLib/Part.cs @@ -2,6 +2,7 @@ namespace PepLib { + [Serializable] public class Part : IMovable { private Loop baseLoop; diff --git a/PepLib/Plate.cs b/PepLib/Plate.cs index 354edf8..e79f960 100644 --- a/PepLib/Plate.cs +++ b/PepLib/Plate.cs @@ -4,6 +4,7 @@ using System.Linq; namespace PepLib { + [Serializable] public class Plate : IMovable { public Plate() diff --git a/PepLib/Size.cs b/PepLib/Size.cs index fd9f2cb..ec2d005 100644 --- a/PepLib/Size.cs +++ b/PepLib/Size.cs @@ -1,5 +1,8 @@ -namespace PepLib +using System; + +namespace PepLib { + [Serializable] public class Size { public Size(double height, double width) diff --git a/PepLib/Spacing.cs b/PepLib/Spacing.cs index 3fdfc81..fc70cfd 100644 --- a/PepLib/Spacing.cs +++ b/PepLib/Spacing.cs @@ -1,6 +1,9 @@  +using System; + namespace PepLib { + [Serializable] public class Spacing { public Spacing()