using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; namespace PepperDash.Core { /// /// Bool change event args /// public class BoolChangeEventArgs : EventArgs { /// /// Boolean state property /// public bool State { get; set; } /// /// Boolean ushort value property /// public ushort IntValue { get { return (ushort)(State ? 1 : 0); } } /// /// Boolean change event args type /// public ushort Type { get; set; } /// /// Boolean change event args index /// public ushort Index { get; set; } /// /// Constructor /// public BoolChangeEventArgs() { } /// /// Constructor overload /// /// /// public BoolChangeEventArgs(bool state, ushort type) { State = state; Type = type; } /// /// Constructor overload /// /// /// /// public BoolChangeEventArgs(bool state, ushort type, ushort index) { State = state; Type = type; Index = index; } } /// /// Ushort change event args /// public class UshrtChangeEventArgs : EventArgs { /// /// Ushort change event args integer value /// public ushort IntValue { get; set; } /// /// Ushort change event args type /// public ushort Type { get; set; } /// /// Ushort change event args index /// public ushort Index { get; set; } /// /// Constructor /// public UshrtChangeEventArgs() { } /// /// Constructor overload /// /// /// public UshrtChangeEventArgs(ushort intValue, ushort type) { IntValue = intValue; Type = type; } /// /// Constructor overload /// /// /// /// public UshrtChangeEventArgs(ushort intValue, ushort type, ushort index) { IntValue = intValue; Type = type; Index = index; } } /// /// String change event args /// public class StringChangeEventArgs : EventArgs { /// /// String change event args value /// public string StringValue { get; set; } /// /// String change event args type /// public ushort Type { get; set; } /// /// string change event args index /// public ushort Index { get; set; } /// /// Constructor /// public StringChangeEventArgs() { } /// /// Constructor overload /// /// /// public StringChangeEventArgs(string stringValue, ushort type) { StringValue = stringValue; Type = type; } /// /// Constructor overload /// /// /// /// public StringChangeEventArgs(string stringValue, ushort type, ushort index) { StringValue = stringValue; Type = type; Index = index; } } }