diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-09-17 18:01:34 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-09-17 18:01:34 +0300 |
| commit | fccf28feafb784d16603a8ce1cdeddc57be9471d (patch) | |
| tree | 5805f33af71e78be124d1a58a0b90414484d33f2 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems | |
| parent | 09d6814981ea6103f27843aef998ae261269c632 (diff) | |
| download | Tango-fccf28feafb784d16603a8ce1cdeddc57be9471d.tar.gz Tango-fccf28feafb784d16603a8ce1cdeddc57be9471d.zip | |
Started working on tech heaters.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems')
2 files changed, 83 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs new file mode 100644 index 000000000..e1221e1f2 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using System.Xml.Serialization; +using Tango.BL.Entities; +using Tango.PMR.Diagnostics; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.Technician.TechItems +{ + /// <summary> + /// Represents a heater controller. + /// </summary> + /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" /> + [TechItem(10)] + public class HeaterItem : TechItem + { + private TechHeater _techHeater; + /// <summary> + /// Gets or sets the db tech monitor. + /// </summary> + [XmlIgnore] + public TechHeater TechHeater + { + get { return _techHeater; } + set { _techHeater = value; RaisePropertyChangedAuto(); TechName = _techHeater != null ? _techHeater.Description : null; ItemGuid = value != null ? value.Guid : null; } + } + /// <summary> + /// Initializes a new instance of the <see cref="HeaterItem"/> class. + /// </summary> + public HeaterItem() : base() + { + Name = "Heater Controller"; + Color = Colors.White; + Description = "Heater Controller"; + Image = ResourceHelper.GetImageFromResources("Images/heater-controller.png"); + } + + /// <summary> + /// Initializes a new instance of the <see cref="HeaterItem"/> class. + /// </summary> + /// <param name="TechHeater">The db tech monitor.</param> + public HeaterItem(TechHeater techHeater) : this() + { + TechHeater = techHeater; + } + + private HeaterState _heaterState; + /// <summary> + /// Gets or sets the state of the heater. + /// </summary> + public HeaterState HeaterState + { + get { return _heaterState; } + set { _heaterState = value; RaisePropertyChangedAuto(); } + } + + private double _setPoint; + /// <summary> + /// Gets or sets the set point. + /// </summary> + public double SetPoint + { + get { return _setPoint; } + set { _setPoint = value; RaisePropertyChangedAuto(); } + } + + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> + public override TechItem Clone() + { + HeaterItem cloned = base.Clone() as HeaterItem; + cloned.TechHeater = TechHeater; + return cloned; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index 04b6c1fab..0d7568d68 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -39,6 +39,7 @@ namespace Tango.MachineStudio.Technician.TechItems [XmlInclude(typeof(ProcessParametersItem))] [XmlInclude(typeof(JobRunnerItem))] [XmlInclude(typeof(TextItem))] + [XmlInclude(typeof(HeaterItem))] public abstract class TechItem : ExtendedObject { /// <summary> |
