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; } /// /// Gets or sets the IntValue /// public ushort IntValue { get { return (ushort)(State ? 1 : 0); } } /// /// Gets or sets the Type /// public ushort Type { get; set; } /// /// Gets or sets the 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; } } /// /// Represents a UshrtChangeEventArgs /// public class UshrtChangeEventArgs : EventArgs { /// /// Ushort change event args integer value /// public ushort IntValue { get; set; } /// /// Gets or sets the Type /// public ushort Type { get; set; } /// /// Gets or sets the 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; } } /// /// Represents a StringChangeEventArgs /// public class StringChangeEventArgs : EventArgs { /// /// String change event args value /// public string StringValue { get; set; } /// /// Gets or sets the Type /// public ushort Type { get; set; } /// /// Gets or sets the 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; } } }