diff options
| author | Roy <Roy.mail.net@gmail.com> | 2022-09-12 05:58:56 +0300 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2022-09-12 05:58:56 +0300 |
| commit | 34cb4b4ffeebb27c579c58a81320fb974f366aed (patch) | |
| tree | 009714dd5ea346c3ee13a6e805397cf82875d51c /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models | |
| parent | b31c6f64122ea7fbcab951ab0980b9a0db75b41b (diff) | |
| parent | ea4957385f2d1a3da2a3a6f5e0db95ca624c8173 (diff) | |
| download | Tango-34cb4b4ffeebb27c579c58a81320fb974f366aed.tar.gz Tango-34cb4b4ffeebb27c579c58a81320fb974f366aed.zip | |
Added RML Extensions Washing properties.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models')
2 files changed, 266 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs index c2b00fe92..bac5f62b8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs @@ -26,6 +26,17 @@ namespace Tango.MachineStudio.ThreadExtensions.Models } } + private DateTime _lastUpdated; + /// <summary> + /// Gets or sets the entity last updated data and time. + /// </summary> + public DateTime LastUpdated + { + get { return _lastUpdated; } + set { _lastUpdated = value; + RaisePropertyChanged(nameof(LastUpdated)); } + } + private bool _hasRMLTest; public bool HasRMLTest diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/WashingMaterialColorModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/WashingMaterialColorModel.cs new file mode 100644 index 000000000..868ce1d58 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/WashingMaterialColorModel.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + public class WashingMaterialColorModel : ExtendedObject + { + public class MaterialColorValueModel: ExtendedObject + { + private string _materialName; + + public string MaterialName + { + get { return _materialName; } + set + { + _materialName = value; + RaisePropertyChangedAuto(); + } + } + + private double? _colorValue; + + public double? ColorValue + { + get { return _colorValue; } + set { + _colorValue= value; + RaisePropertyChangedAuto(); + } + } + + public string RmlExtensionTestWashingResultGUID { get; set; } + } + + private int _index; + + public int Index + { + get { return _index; } + set { _index = value; } + } + + private int _color; + + public int Color + { + get { return _color; } + set + { + _color = value; + RaisePropertyChangedAuto(); + } + } + + private List<MaterialColorValueModel> _colorValues; + + public List<MaterialColorValueModel> ColorValues + { + get { return _colorValues; } + set { _colorValues = value; + RaisePropertyChangedAuto(); } + } + + + public double? WashingValue1 + { + get { + if (ColorValues.Count >= 1) + return ColorValues[0].ColorValue; + return null; + } + set { + if (ColorValues.Count >= 1) + ColorValues[0].ColorValue = value; + RaisePropertyChangedAuto(); + } + } + + public double? WashingValue2 + { + get + { + if (ColorValues.Count > 1) + return ColorValues[1].ColorValue; + return null; + } + set + { + if (ColorValues.Count > 1) + ColorValues[1].ColorValue = value; + RaisePropertyChangedAuto(); + } + } + + public double? WashingValue3 + { + get + { + if (ColorValues.Count > 2) + return ColorValues[2].ColorValue; + return null; + } + set + { + if (ColorValues.Count > 2) + ColorValues[2].ColorValue = value; + RaisePropertyChangedAuto(); + } + } + + public double? WashingValue4 + { + get + { + if (ColorValues.Count > 3) + return ColorValues[3].ColorValue; + return null; + } + set + { + if (ColorValues.Count > 3) + ColorValues[3].ColorValue = value; + RaisePropertyChangedAuto(); + } + } + + public double? WashingValue5 + { + get + { + if (ColorValues.Count > 4) + return ColorValues[4].ColorValue; + return null; + } + set + { + if (ColorValues.Count > 4) + ColorValues[4].ColorValue = value; + RaisePropertyChangedAuto(); + } + } + + public double? WashingValue6 + { + get + { + if (ColorValues.Count > 5) + return ColorValues[5].ColorValue; + return null; + } + set + { + if (ColorValues.Count > 5) + ColorValues[5].ColorValue = value; + RaisePropertyChangedAuto(); + } + } + + public double? WashingValue7 + { + get + { + if (ColorValues.Count > 6) + return ColorValues[6].ColorValue; + return null; + } + set + { + if (ColorValues.Count > 6) + ColorValues[6].ColorValue = value; + RaisePropertyChangedAuto(); + } + } + + public string Header1 + { + get + { + if (ColorValues.Count >= 1) + return ColorValues[0].MaterialName; + return null; + } + } + public string Header2 + { + get + { + if (ColorValues.Count > 1) + return ColorValues[1].MaterialName; + return null; + } + } + public string Header3 + { + get + { + if (ColorValues.Count > 2) + return ColorValues[2].MaterialName; + return null; + } + } + public string Header4 + { + get + { + if (ColorValues.Count > 3) + return ColorValues[3].MaterialName; + return null; + } + } + public string Header5 + { + get + { + if (ColorValues.Count > 4) + return ColorValues[4].MaterialName; + return null; + } + } + public string Header6 + { + get + { + if (ColorValues.Count > 5) + return ColorValues[5].MaterialName; + return null; + } + } + public string Header7 + { + get + { + if (ColorValues.Count > 6) + return ColorValues[6].MaterialName; + return null; + } + } + + public WashingMaterialColorModel() + { + ColorValues = new List<MaterialColorValueModel>(); + } + + public void AddMaterial(string rmlExtensionTestWashingResultGuid, string materialName, double? colorValue) + { + ColorValues.Add(new MaterialColorValueModel(){ MaterialName = materialName, ColorValue = colorValue, RmlExtensionTestWashingResultGUID = rmlExtensionTestWashingResultGuid}); + } + } +} |
