| ofs | hex dump | ascii |
|---|
| 0000 | ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 48 00 48 00 00 ff ed 1d e8 50 68 6f 74 6f 73 68 6f | ......JFIF.....H.H......Photosho |
| 0020 | 70 20 33 2e 30 00 38 42 49 4d 04 04 00 00 00 00 00 27 1c 01 5a 00 03 1b 25 47 1c 02 00 00 02 00 | p.3.0.8BIM.......'..Z...%G...... |
| 0040 | 00 1c 02 37 00 08 32 30 31 31 31 31 30 37 1c 02 3c 00 06 31 36 32 31 34 38 00 38 42 49 4d 04 25 | ...7..20111107..<..162148.8BIM.% |
| 0060 | 00 00 00 00 00 10 8c a6 f6 40 eb 03 cf 11 31 2a 1d f0 ba 3e ac d8 38 42 49 4d 04 3a 00 00 00 00 | .........@....1*...>..8BIM.:.... |
| 0080 | 00 8f 00 00 00 10 00 00 00 01 00 00 00 00 00 0b 70 72 69 6e 74 4f 75 74 70 75 74 00 00 00 04 00 | ................printOutput..... |
| 00a0 | 00 00 00 50 73 74 53 62 6f 6f 6c 01 00 00 00 00 49 6e 74 65 65 6e 75 6d 00 00 00 00 49 6e 74 65 | ...PstSbool.....Inteenum....Inte |
| 00c0 | 00 00 00 00 43 6c 72 6d 00 00 00 0f 70 72 69 6e 74 53 69 78 74 65 65 6e 42 69 74 62 6f 6f 6c 00 | ....Clrm....printSixteenBitbool. |
| 00e0 | 00 00 00 0b 70 72 69 6e 74 65 72 4e 61 6d 65 54 45 58 54 00 00 00 0d 00 4c 00 65 00 78 00 6d 00 | ....printerNameTEXT.....L.e.x.m. |
| 0100 | 61 00 72 00 6b 00 20 00 43 00 35 00 31 00 30 00 00 00 38 42 49 4d 04 3b 00 00 00 00 01 b2 00 00 | a.r.k...C.5.1.0...8BIM.;........ |
| 0120 | 00 10 00 00 00 01 00 00 00 00 00 12 70 72 69 6e 74 4f 75 74 70 75 74 4f 70 74 69 6f 6e 73 00 00 | ............printOutputOptions.. |
| 0140 | 00 12 00 00 00 00 43 70 74 6e 62 6f 6f 6c 00 00 00 00 00 43 6c 62 72 62 6f 6f 6c 00 00 00 00 00 | ......Cptnbool.....Clbrbool..... |
| 0160 | 52 67 73 4d 62 6f 6f 6c 00 00 00 00 00 43 72 6e 43 62 6f 6f 6c 00 00 00 00 00 43 6e 74 43 62 6f | RgsMbool.....CrnCbool.....CntCbo |
| 0180 | 6f 6c 00 00 00 00 00 4c 62 6c 73 62 6f 6f 6c 00 00 00 00 00 4e 67 74 76 62 6f 6f 6c 00 00 00 00 | ol.....Lblsbool.....Ngtvbool.... |
| 01a0 | 00 45 6d 6c 44 62 6f 6f 6c 00 00 00 00 00 49 6e 74 72 62 6f 6f 6c 00 00 00 00 00 42 63 6b 67 4f | .EmlDbool.....Intrbool.....BckgO |
| 01c0 | 62 6a 63 00 00 00 01 00 00 00 00 00 00 52 47 42 43 00 00 00 03 00 00 00 00 52 64 20 20 64 6f 75 | bjc..........RGBC........Rd..dou |
| 01e0 | 62 40 6f e0 00 00 00 00 00 00 00 00 00 47 72 6e 20 64 6f 75 62 40 6f e0 00 00 00 00 00 00 00 00 | b@o..........Grn.doub@o......... |
| 0200 | 00 42 6c 20 20 64 6f 75 62 40 6f e0 00 00 00 00 00 00 00 00 00 42 72 64 54 55 6e 74 46 23 52 6c | .Bl..doub@o..........BrdTUntF#Rl |
| 0220 | 74 00 00 00 00 00 00 00 00 00 00 00 00 42 6c 64 20 55 6e 74 46 23 52 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.Core.Commands;
using Tango.PMR.Diagnostics;
using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.Technician.TechItems
{
[TechItem(10)]
public class ValveItem : TechItem
{
/// <summary>
/// Occurs when the user has changed the current value.
/// </summary>
public event EventHandler<ValveStateCode> StateChanged;
/// <summary>
/// Gets or sets the set command.
/// </summary>
[XmlIgnore]
public RelayCommand<String> SetCommand { get; set; }
private TechValve _techValve;
/// <summary>
/// Gets or sets the db tech item.
/// </summary>
[XmlIgnore]
public TechValve TechValve
{
get { return _techValve; }
set
{
_techValve = value; RaisePropertyChangedAuto(); TechName = _techValve != null ? _techValve.Description : null; ItemGuid = value != null ? value.Guid : null;
if (_techValve != null)
{
State = (ValveStateCode)Enum.Parse(typeof(ValveStateCode), _techValve.State1.Replace(" ", ""), true);
}
}
}
private ValveStateCode _state;
/// <summary>
/// Gets or sets a value indicating whether this <see cref="ValveItem"/> is on.
/// </summary>
[XmlIgnore]
public ValveStateCode State
{
get { return _state; }
set { _state = value; RaisePropertyChangedAuto(); }
}
private ValveStateCode _effectiveState;
/// <summary>
/// Gets or sets the effective value received from the embedded device.
/// </summary>
[XmlIgnore]
public ValveStateCode EffectiveState
{
get { return _effectiveState; }
set
{
if (_effectiveState != value)
{
_effectiveState = value;
RaisePropertyChangedAuto();
_state = value;
RaisePropertyChanged(nameof(State));
}
}
}
/// <summary>
/// Initializes a new instance of the <see cref="ValveItem"/> class.
/// </summary>
public ValveItem() : base()
{
Name = "Valve Controller";
Description = "Valve Controller";
Image = ResourceHelper.GetImageFromResources("Images/valve.png");
Color = Colors.White;
SetCommand = new RelayCommand<string>((x) =>
{
State = (ValveStateCode)Enum.Parse(typeof(ValveStateCode), x.Replace(" ", ""), true);
StateChanged?.Invoke(this, State);
});
}
/// <summary>
/// Initializes a new instance of the <see cref="ValveItem"/> class.
/// </summary>
/// <param name="techValve">The db tech item.</param>
public ValveItem(TechValve techValve) : this()
{
TechValve = techValve;
}
/// <summary>
/// Clones this instance.
/// </summary>
/// <returns></returns>
public override TechItem Clone()
{
ValveItem cloned = base.Clone() as ValveItem;
cloned.TechValve = TechValve;
cloned.State = State;
return cloned;
}
}
}
|