diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-05 02:38:10 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-12-05 02:38:10 +0200 |
| commit | b77fbb01ed5b63b65f6e755fef9ca49c3e58ea50 (patch) | |
| tree | 40013e359a230404d0bf4fd4e6fbfb7bdd862432 /Software/Visual_Studio/Tango.BL | |
| parent | ec3b8fd0d0b4d980a5d93c5fa11b4717cbd0c875 (diff) | |
| download | Tango-b77fbb01ed5b63b65f6e755fef9ca49c3e58ea50.tar.gz Tango-b77fbb01ed5b63b65f6e755fef9ca49c3e58ea50.zip | |
Last say on extra inks branch
Diffstat (limited to 'Software/Visual_Studio/Tango.BL')
6 files changed, 484 insertions, 5 deletions
diff --git a/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs index 139223d8d..08e8d7337 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs @@ -357,5 +357,69 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// blue quantity + /// </summary> + public Int64 BlueQuantity + { + get; set; + } + + /// <summary> + /// light blue quantity + /// </summary> + public Int64 LightBlueQuantity + { + get; set; + } + + /// <summary> + /// orange quantity + /// </summary> + public Int64 OrangeQuantity + { + get; set; + } + + /// <summary> + /// light orange quantity + /// </summary> + public Int64 LightOrangeQuantity + { + get; set; + } + + /// <summary> + /// rubine quantity + /// </summary> + public Int64 RubineQuantity + { + get; set; + } + + /// <summary> + /// light rubine quantity + /// </summary> + public Int64 LightRubineQuantity + { + get; set; + } + + /// <summary> + /// navy quantity + /// </summary> + public Int64 NavyQuantity + { + get; set; + } + + /// <summary> + /// violet quantity + /// </summary> + public Int64 VioletQuantity + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/LiquidTypeDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/LiquidTypeDTOBase.cs index 1cb00d6bc..eba35dbd6 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/LiquidTypeDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/LiquidTypeDTOBase.cs @@ -93,5 +93,21 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// is light ink + /// </summary> + public Boolean IsLightInk + { + get; set; + } + + /// <summary> + /// dark ink code + /// </summary> + public Int32 DarkInkCode + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs b/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs index 6da5b8f8b..54685f7ee 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs @@ -101,6 +101,22 @@ namespace Tango.BL.Entities public event EventHandler<Double> ActualEndPositionChanged; + public event EventHandler<Int64> BlueQuantityChanged; + + public event EventHandler<Int64> LightBlueQuantityChanged; + + public event EventHandler<Int64> OrangeQuantityChanged; + + public event EventHandler<Int64> LightOrangeQuantityChanged; + + public event EventHandler<Int64> RubineQuantityChanged; + + public event EventHandler<Int64> LightRubineQuantityChanged; + + public event EventHandler<Int64> NavyQuantityChanged; + + public event EventHandler<Int64> VioletQuantityChanged; + protected String _machineguid; /// <summary> @@ -1227,6 +1243,222 @@ namespace Tango.BL.Entities } } + protected Int64 _bluequantity; + + /// <summary> + /// Gets or sets the jobrunbase blue quantity. + /// </summary> + + [Column("BLUE_QUANTITY")] + + public Int64 BlueQuantity + { + get + { + return _bluequantity; + } + + set + { + if (_bluequantity != value) + { + _bluequantity = value; + + OnBlueQuantityChanged(value); + + } + } + } + + protected Int64 _lightbluequantity; + + /// <summary> + /// Gets or sets the jobrunbase light blue quantity. + /// </summary> + + [Column("LIGHT_BLUE_QUANTITY")] + + public Int64 LightBlueQuantity + { + get + { + return _lightbluequantity; + } + + set + { + if (_lightbluequantity != value) + { + _lightbluequantity = value; + + OnLightBlueQuantityChanged(value); + + } + } + } + + protected Int64 _orangequantity; + + /// <summary> + /// Gets or sets the jobrunbase orange quantity. + /// </summary> + + [Column("ORANGE_QUANTITY")] + + public Int64 OrangeQuantity + { + get + { + return _orangequantity; + } + + set + { + if (_orangequantity != value) + { + _orangequantity = value; + + OnOrangeQuantityChanged(value); + + } + } + } + + protected Int64 _lightorangequantity; + + /// <summary> + /// Gets or sets the jobrunbase light orange quantity. + /// </summary> + + [Column("LIGHT_ORANGE_QUANTITY")] + + public Int64 LightOrangeQuantity + { + get + { + return _lightorangequantity; + } + + set + { + if (_lightorangequantity != value) + { + _lightorangequantity = value; + + OnLightOrangeQuantityChanged(value); + + } + } + } + + protected Int64 _rubinequantity; + + /// <summary> + /// Gets or sets the jobrunbase rubine quantity. + /// </summary> + + [Column("RUBINE_QUANTITY")] + + public Int64 RubineQuantity + { + get + { + return _rubinequantity; + } + + set + { + if (_rubinequantity != value) + { + _rubinequantity = value; + + OnRubineQuantityChanged(value); + + } + } + } + + protected Int64 _lightrubinequantity; + + /// <summary> + /// Gets or sets the jobrunbase light rubine quantity. + /// </summary> + + [Column("LIGHT_RUBINE_QUANTITY")] + + public Int64 LightRubineQuantity + { + get + { + return _lightrubinequantity; + } + + set + { + if (_lightrubinequantity != value) + { + _lightrubinequantity = value; + + OnLightRubineQuantityChanged(value); + + } + } + } + + protected Int64 _navyquantity; + + /// <summary> + /// Gets or sets the jobrunbase navy quantity. + /// </summary> + + [Column("NAVY_QUANTITY")] + + public Int64 NavyQuantity + { + get + { + return _navyquantity; + } + + set + { + if (_navyquantity != value) + { + _navyquantity = value; + + OnNavyQuantityChanged(value); + + } + } + } + + protected Int64 _violetquantity; + + /// <summary> + /// Gets or sets the jobrunbase violet quantity. + /// </summary> + + [Column("VIOLET_QUANTITY")] + + public Int64 VioletQuantity + { + get + { + return _violetquantity; + } + + set + { + if (_violetquantity != value) + { + _violetquantity = value; + + OnVioletQuantityChanged(value); + + } + } + } + /// <summary> /// Called when the JobName has changed. /// </summary> @@ -1561,6 +1793,78 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the BlueQuantity has changed. + /// </summary> + protected virtual void OnBlueQuantityChanged(Int64 bluequantity) + { + BlueQuantityChanged?.Invoke(this, bluequantity); + RaisePropertyChanged(nameof(BlueQuantity)); + } + + /// <summary> + /// Called when the LightBlueQuantity has changed. + /// </summary> + protected virtual void OnLightBlueQuantityChanged(Int64 lightbluequantity) + { + LightBlueQuantityChanged?.Invoke(this, lightbluequantity); + RaisePropertyChanged(nameof(LightBlueQuantity)); + } + + /// <summary> + /// Called when the OrangeQuantity has changed. + /// </summary> + protected virtual void OnOrangeQuantityChanged(Int64 orangequantity) + { + OrangeQuantityChanged?.Invoke(this, orangequantity); + RaisePropertyChanged(nameof(OrangeQuantity)); + } + + /// <summary> + /// Called when the LightOrangeQuantity has changed. + /// </summary> + protected virtual void OnLightOrangeQuantityChanged(Int64 lightorangequantity) + { + LightOrangeQuantityChanged?.Invoke(this, lightorangequantity); + RaisePropertyChanged(nameof(LightOrangeQuantity)); + } + + /// <summary> + /// Called when the RubineQuantity has changed. + /// </summary> + protected virtual void OnRubineQuantityChanged(Int64 rubinequantity) + { + RubineQuantityChanged?.Invoke(this, rubinequantity); + RaisePropertyChanged(nameof(RubineQuantity)); + } + + /// <summary> + /// Called when the LightRubineQuantity has changed. + /// </summary> + protected virtual void OnLightRubineQuantityChanged(Int64 lightrubinequantity) + { + LightRubineQuantityChanged?.Invoke(this, lightrubinequantity); + RaisePropertyChanged(nameof(LightRubineQuantity)); + } + + /// <summary> + /// Called when the NavyQuantity has changed. + /// </summary> + protected virtual void OnNavyQuantityChanged(Int64 navyquantity) + { + NavyQuantityChanged?.Invoke(this, navyquantity); + RaisePropertyChanged(nameof(NavyQuantity)); + } + + /// <summary> + /// Called when the VioletQuantity has changed. + /// </summary> + protected virtual void OnVioletQuantityChanged(Int64 violetquantity) + { + VioletQuantityChanged?.Invoke(this, violetquantity); + RaisePropertyChanged(nameof(VioletQuantity)); + } + + /// <summary> /// Initializes a new instance of the <see cref="JobRunBase" /> class. /// </summary> public JobRunBase() : base() diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs index d7b0f4f58..b9a7d3557 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidType.cs @@ -39,6 +39,13 @@ namespace Tango.BL.Entities get { return (LiquidTypes)Code; } } + [NotMapped] + [JsonIgnore] + public LiquidTypes? DarkType + { + get { return DarkInkCode < 0 ? null : (LiquidTypes?)DarkInkCode; } + } + /// <summary> /// Initializes a new instance of the <see cref="LiquidType" /> class. /// </summary> diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs index bfdc8cfb7..82403a11b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs @@ -45,6 +45,10 @@ namespace Tango.BL.Entities public event EventHandler<Boolean> IsExtraInkChanged; + public event EventHandler<Boolean> IsLightInkChanged; + + public event EventHandler<Int32> DarkInkCodeChanged; + public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged; public event EventHandler<SynchronizedObservableCollection<IdsPack>> IdsPacksChanged; @@ -296,6 +300,60 @@ namespace Tango.BL.Entities } } + protected Boolean _islightink; + + /// <summary> + /// Gets or sets the liquidtypebase is light ink. + /// </summary> + + [Column("IS_LIGHT_INK")] + + public Boolean IsLightInk + { + get + { + return _islightink; + } + + set + { + if (_islightink != value) + { + _islightink = value; + + OnIsLightInkChanged(value); + + } + } + } + + protected Int32 _darkinkcode; + + /// <summary> + /// Gets or sets the liquidtypebase dark ink code. + /// </summary> + + [Column("DARK_INK_CODE")] + + public Int32 DarkInkCode + { + get + { + return _darkinkcode; + } + + set + { + if (_darkinkcode != value) + { + _darkinkcode = value; + + OnDarkInkCodeChanged(value); + + } + } + } + protected SynchronizedObservableCollection<Cat> _cats; /// <summary> @@ -478,6 +536,24 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the IsLightInk has changed. + /// </summary> + protected virtual void OnIsLightInkChanged(Boolean islightink) + { + IsLightInkChanged?.Invoke(this, islightink); + RaisePropertyChanged(nameof(IsLightInk)); + } + + /// <summary> + /// Called when the DarkInkCode has changed. + /// </summary> + protected virtual void OnDarkInkCodeChanged(Int32 darkinkcode) + { + DarkInkCodeChanged?.Invoke(this, darkinkcode); + RaisePropertyChanged(nameof(DarkInkCode)); + } + + /// <summary> /// Called when the Cats has changed. /// </summary> protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats) diff --git a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs index 5b4cec488..014ca040a 100644 --- a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs +++ b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs @@ -14,6 +14,7 @@ namespace Tango.BL public class LiquidVolume : ExtendedObject { public event Action VolumeChanged; + private static object _lock = new object(); private BrushStop _brushStop; [JsonIgnore] @@ -82,14 +83,25 @@ namespace Tango.BL public void Invalidate() { - if (BrushStop.LiquidVolumes != null) + lock (_lock) { - InvalidateSolo(); - - foreach (var liquidVolume in BrushStop.LiquidVolumes.ToList().Where(x => x != this)) + try { - liquidVolume.InvalidateSolo(); + if (BrushStop.LiquidVolumes != null) + { + InvalidateSolo(); + + foreach (var liquidVolume in BrushStop.LiquidVolumes.ToList().Where(x => x != this)) + { + liquidVolume.InvalidateSolo(); + } + } } + catch (Exception ex) + { + + throw; + } } } |
