aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Printing/BrushStop.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-18 18:48:16 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-18 18:48:16 +0200
commit95b4e14bc4e06ffb94199f5ec4e0d2d9bebceeff (patch)
treede29ed87bd7c7b966d35b6f6bc8b13d65313c88c /Software/Visual_Studio/Tango.Integration/Printing/BrushStop.cs
parent99136fc92c8b75c3783f543051c065c28961d393 (diff)
downloadTango-95b4e14bc4e06ffb94199f5ec4e0d2d9bebceeff.tar.gz
Tango-95b4e14bc4e06ffb94199f5ec4e0d2d9bebceeff.zip
Working on new developer module.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Printing/BrushStop.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Printing/BrushStop.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Printing/BrushStop.cs b/Software/Visual_Studio/Tango.Integration/Printing/BrushStop.cs
index 6b328e1fb..ebc77e615 100644
--- a/Software/Visual_Studio/Tango.Integration/Printing/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.Integration/Printing/BrushStop.cs
@@ -1,4 +1,5 @@
using ColorMine.ColorSpaces;
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -29,6 +30,7 @@ namespace Tango.Integration.Observables
/// Gets or sets the collection of this brush stop liquid volumes.
/// </summary>
[NotMapped]
+ [JsonIgnore]
public ObservableCollection<LiquidVolume> LiquidVolumes
{
get { return _liquidVolumes; }
@@ -40,6 +42,7 @@ namespace Tango.Integration.Observables
/// Gets or sets the brush stop color.
/// </summary>
[NotMapped]
+ [JsonIgnore]
public Color Color
{
get { return _color; }
@@ -66,6 +69,7 @@ namespace Tango.Integration.Observables
/// Gets a value indicating whether this brush stop is the first one within its segment brush stops.
/// </summary>
[NotMapped]
+ [JsonIgnore]
public bool IsFirst
{
get { return Segment.BrushStops.IndexOf(this) == 0; }
@@ -75,6 +79,7 @@ namespace Tango.Integration.Observables
/// Gets a value indicating whether this brush stop is the last one within its segment brush stops.
/// </summary>
[NotMapped]
+ [JsonIgnore]
public bool IsLast
{
get { return Segment.BrushStops.IndexOf(this) == Segment.BrushStops.Count - 1; }
@@ -84,6 +89,7 @@ namespace Tango.Integration.Observables
/// Gets a value indicating whether this brush stop is not the first nor last within its segment brush stops.
/// </summary>
[NotMapped]
+ [JsonIgnore]
public bool IsMiddle
{
get { return !IsFirst && !IsLast; }
@@ -93,6 +99,7 @@ namespace Tango.Integration.Observables
/// Gets this brush stop offset in meters.
/// </summary>
[NotMapped]
+ [JsonIgnore]
public double OffsetMeters
{
get
@@ -167,6 +174,20 @@ namespace Tango.Integration.Observables
}
}
+ public override BrushStop Clone()
+ {
+ BrushStop cloned = base.Clone();
+ return cloned;
+ }
+
+ public BrushStop Clone(Segment segment)
+ {
+ BrushStop cloned = base.Clone();
+ cloned.Segment = segment;
+ cloned.SegmentGuid = segment.Guid;
+ return cloned;
+ }
+
#endregion
#region Private Methods