diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-06-24 19:13:33 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-06-24 19:13:33 +0300 |
| commit | a27ef72084d844ef703aaa9b1c6f4ec032ca182e (patch) | |
| tree | 6899419d1dbce9e5509f7eec3c0415a3de232464 /Software/Visual_Studio/Tango.BL | |
| parent | 7e77e5877a6ab6a03c672199fd3edbe9395e4c45 (diff) | |
| parent | 545f603c873cd026faf5560dae83da947f0a02a6 (diff) | |
| download | Tango-a27ef72084d844ef703aaa9b1c6f4ec032ca182e.tar.gz Tango-a27ef72084d844ef703aaa9b1c6f4ec032ca182e.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/Tango.BL')
4 files changed, 53 insertions, 9 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs index ccc6df2cb..63f6563ed 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineStudioVersion.cs @@ -105,6 +105,26 @@ namespace Tango.BL.Entities } + protected Boolean _forceupdate; + /// <summary> + /// Gets or sets the machinestudioversion force update. + /// </summary> + [Column("FORCE_UPDATE")] + + public Boolean ForceUpdate + { + get + { + return _forceupdate; + } + + set + { + _forceupdate = value; RaisePropertyChanged(nameof(ForceUpdate)); + } + + } + protected User _user; /// <summary> /// Gets or sets the machinestudioversion user. diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs index ad5781b7b..de887d8fe 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs @@ -204,6 +204,11 @@ namespace Tango.BL.Entities RaisePropertyChanged(prop.Name); } + if (Segment != null) + { + Segment.RaiseSegmentBrushChanged(); + } + _ignorePropChanged = false; } } diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs index 2c08cbf37..c4bbd0f65 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs @@ -61,6 +61,29 @@ namespace Tango.BL.Entities set { _completed = value; RaisePropertyChangedAuto(); } } + [NotMapped] + [JsonIgnore] + public Brush SegmentBrush + { + get + { + GradientStopCollection stops = new GradientStopCollection(); + + foreach (var stop in BrushStops.OrderBy(x => x.StopIndex)) + { + stops.Add(new GradientStop(stop.Color, stop.OffsetPercent / 100d)); + } + + LinearGradientBrush brush = new LinearGradientBrush(); + brush.StartPoint = new Point(0, 0); + brush.EndPoint = new Point(1, 0); + + brush.GradientStops = stops; + + return brush; + } + } + public override Segment Clone() { Segment cloned = base.Clone(); @@ -140,5 +163,10 @@ namespace Tango.BL.Entities return System.Drawing.Brushes.Black; } } + + public void RaiseSegmentBrushChanged() + { + RaisePropertyChanged(nameof(SegmentBrush)); + } } } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs index 4c703a96b..8c0957e9a 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs @@ -80,14 +80,5 @@ namespace Tango.BL return new ObservablesContext(source); } } - - /// <summary> - /// Creates a default remote database context by the address specified in <see cref="SettingsManager.Default.DataBase.SQLServerAddress" />. - /// </summary> - /// <returns></returns> - public static ObservablesContext CreateDefaultForWeb() - { - return new ObservablesContext("localhost\\SQLTWINE"); - } } } |
