aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-07-28 18:33:11 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-07-28 18:33:11 +0300
commit516ee0b585d84bda4fcc3c31aa44d1e3b7da5e93 (patch)
tree053fbe2319447bc13bcf188cc369d7f2dc2df809 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models
parent8c5f88c83e1c81202aeafe64b9a9381e3ebf852d (diff)
downloadTango-516ee0b585d84bda4fcc3c31aa44d1e3b7da5e93.tar.gz
Tango-516ee0b585d84bda4fcc3c31aa44d1e3b7da5e93.zip
MS. RML extension. Added table washing test results , GUI and database.
Related Work Items: #6660
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/WashingMaterialColorModel.cs255
1 files changed, 255 insertions, 0 deletions
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});
+ }
+ }
+}