| ofs | hex dump | ascii |
|---|
| 0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 05 4d 00 00 02 b7 08 02 00 00 00 3e aa f9 | .PNG........IHDR...M.........>.. |
| 0020 | f3 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b 13 01 00 9a 9c 18 00 00 00 07 74 49 4d 45 07 e2 | .....pHYs.................tIME.. |
| 0040 | 02 1a 0d 35 38 50 d7 1d c9 00 00 20 00 49 44 41 54 78 da ec 7d 79 74 5b e5 99 fe d5 be ef 91 65 | ...58P.......IDATx..}yt[.......e |
| 0060 | 59 96 77 3b de e2 d8 ce 42 96 86 3d d0 34 a5 0d 9c 76 da 4c 87 02 a7 74 a1 d3 69 4b 29 4c 87 d3 | Y.w;....B..=.4...v.L...t..iK)L.. |
| 0080 | f9 b5 9c 72 5a da 29 43 4b a7 9c a1 0c a5 74 18 da 02 a5 14 0a 81 a6 40 58 02 59 ed d8 89 d7 78 | ...rZ.)CK.....t........@X.Y....x |
| 00a0 | 97 64 59 96 b5 ef 57 db ef 8f e7 e4 3b aa 2c b9 31 50 48 e0 7d fe d0 51 1c 59 be ba ba f7 fb de | .dY...W.....;.,.1PH.}..Q.Y...... |
| 00c0 | e7 7d 9f f7 79 05 f9 7c 9e 23 10 08 04 02 81 40 20 10 08 04 02 81 f0 be 80 90 4e 01 81 40 20 10 | .}..y..|.#.....@..........N..@.. |
| 00e0 | 08 04 02 81 40 20 10 08 c4 f3 09 04 02 81 40 20 10 08 04 02 81 40 20 10 cf 27 10 08 04 02 81 40 | ....@.........@......@...'.....@ |
| 0100 | 20 10 08 04 02 81 40 3c 9f 40 20 10 08 04 02 81 40 20 10 08 04 02 f1 7c 02 81 40 20 10 08 04 02 | ......@<.@......@......|..@..... |
| 0120 | 81 40 20 10 88 e7 13 08 04 02 81 40 20 10 08 04 02 81 40 20 9e 4f 20 10 08 04 02 81 40 20 10 08 | .@.........@......@..O......@... |
| 0140 | 04 02 81 78 3e 81 40 20 10 08 04 02 81 40 20 10 08 04 e2 f9 04 02 81 40 20 10 08 04 02 81 40 20 | ...x>.@......@.........@......@. |
| 0160 | 10 88 e7 13 08 04 02 81 40 20 10 08 04 02 81 40 3c 9f 40 20 10 08 04 02 81 40 20 10 08 04 02 f1 | ........@......@<.@......@...... |
| 0180 | 7c 02 81 40 20 10 08 04 02 81 40 20 10 08 c4 f3 09 04 02 81 40 20 10 08 04 02 81 40 20 10 cf 27 | |..@......@.........@......@...' |
| 01a0 | 10 08 04 02 81 40 20 10 08 04 02 81 78 3e 81 70 1e 22 9f cf e3 11 4f 08 67 73 c6 e8 74 11 08 04 | .....@......x>.p."....O.gs..t... |
| 01c0 | 02 81 40 20 10 08 ef 63 88 e9 14 10 ce 5f 7a cf 71 5c 2e 97 13 0a 85 b9 5c 8e e3 38 a1 50 28 10 | ..@....c....._z.q\......\..8.P(. |
| 01e0 | 08 e8 e4 ac 7c de 70 ae 70 ba d8 cf e9 bc 11 08 04 02 81 40 20 10 08 ef 1b 50 3d 9f 70 1e 03 94 | ....|.p.p..........@.....P=.p... |
| 0200 | 95 11 57 f6 84 b0 f2 19 63 cf e9 8c 11 08 04 02 81 40 20 10 08 c4 f3 09 84 73 e9 f2 15 0a 0b 8b | ..W.....c........@.......s...... |
| 0220 | d2 85 cf 09 e5 ce 58 b9 b3 47 20 10 08 04using 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.Core.Commands;
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
{
public event Action SetCommandClicked;
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>
/// Gets or sets the set command.
/// </summary>
[XmlIgnore]
public RelayCommand SetCommand { get; set; }
/// <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");
SetCommand = new RelayCommand(() =>
{
SetCommandClicked?.Invoke();
IsEditing = false;
}, (x) => HeaterState.CurrentValue != SetPoint);
HeaterState = new HeaterState();
}
/// <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();
if (!IsEditing)
{
SetPoint = _heaterState.SetPoint;
}
InvokeUI(() =>
{
SetCommand.RaiseCanExecuteChanged();
});
}
}
private double _setPoint;
/// <summary>
/// Gets or sets the set point.
/// </summary>
public double SetPoint
{
get { return _setPoint; }
set { _setPoint = value; RaisePropertyChangedAuto(); }
}
private bool _isEditing;
[XmlIgnore]
public bool IsEditing
{
get { return _isEditing; }
set { _isEditing = value; RaisePropertyChangedAuto(); }
}
/// <summary>
/// Clones this instance.
/// </summary>
/// <returns></returns>
public override TechItem Clone()
{
HeaterItem cloned = base.Clone() as HeaterItem;
cloned.TechHeater = TechHeater;
return cloned;
}
}
}
|