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.SharedUI.Helpers;
namespace Tango.MachineStudio.Technician.TechItems
{
/// <summary>
/// Represents a digital output pin item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
[TechItem(1)]
public class DigitalOutItem : TechItem
{
/// <summary>
/// Occurs when the user has changed the current value.
/// </summary>
public event EventHandler<bool> ValueChanged;
private TechIo _techIo;
/// <summary>
/// Gets or sets the db tech item.
/// </summary>
[XmlIgnore]
public TechIo TechIo
{
get { return _techIo; }
set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.InterfaceName : null; ItemGuid = value != null ? value.Guid : null; }
}
private bool _value;
/// <summary>
/// Gets or sets a value indicating whether this <see cref="DigitalOutItem"/> is on.