StephaneLenclud@237: using System;
StephaneLenclud@237: using System.Collections.Generic;
StephaneLenclud@237: using System.Linq;
StephaneLenclud@237: using System.Text;
StephaneLenclud@237: using System.Threading.Tasks;
StephaneLenclud@237: using System.Runtime.Serialization;
StephaneLenclud@237: using Ear = SharpLib.Ear;
StephaneLenclud@237: using Hid = SharpLib.Hid;
StephaneLenclud@237:
StephaneLenclud@237: namespace SharpDisplayManager
StephaneLenclud@237: {
StephaneLenclud@237: [DataContract]
StephaneLenclud@237: [Ear.AttributeObject(Id = "Event.Hid.ConsumerControl", Name = "HID Consumer Control", Description = "Corresponding HID message received.")]
StephaneLenclud@237: public class EventHidConsumerControl : Ear.Event
StephaneLenclud@237: {
StephaneLenclud@237: public EventHidConsumerControl()
StephaneLenclud@237: {
StephaneLenclud@237: }
StephaneLenclud@237:
StephaneLenclud@237: [DataMember]
StephaneLenclud@237: [Ear.AttributeObjectProperty
StephaneLenclud@237: (
StephaneLenclud@237: Id = "HID.ConsumerControl.Usage",
StephaneLenclud@237: Name = "Usage",
StephaneLenclud@237: Description = "The usage corresponding to your remote button."
StephaneLenclud@237: )]
StephaneLenclud@237: public Hid.Usage.ConsumerControl Usage { get; set; }
StephaneLenclud@237:
StephaneLenclud@237: ///
StephaneLenclud@237: /// Make sure we distinguish between various configuration of this event
StephaneLenclud@237: ///
StephaneLenclud@237: ///
StephaneLenclud@237: public override string Brief()
StephaneLenclud@237: {
StephaneLenclud@237: return Name + ": " + Usage.ToString();
StephaneLenclud@237: }
StephaneLenclud@237:
StephaneLenclud@237: ///
StephaneLenclud@237: ///
StephaneLenclud@237: ///
StephaneLenclud@237: ///
StephaneLenclud@237: ///
StephaneLenclud@237: public override bool Equals(object obj)
StephaneLenclud@237: {
StephaneLenclud@238: if (obj is EventHidConsumerControl)
StephaneLenclud@238: {
StephaneLenclud@238: EventHidConsumerControl e = (EventHidConsumerControl)obj;
StephaneLenclud@238: bool res = (e.Usage == Usage);
StephaneLenclud@238: return res;
StephaneLenclud@238: }
StephaneLenclud@238:
StephaneLenclud@238: return false;
StephaneLenclud@237: }
StephaneLenclud@237: }
StephaneLenclud@237: }