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@238: using System.Runtime.Serialization; StephaneLenclud@238: using Ear = SharpLib.Ear; StephaneLenclud@238: using Hid = SharpLib.Hid; StephaneLenclud@237: StephaneLenclud@238: namespace SharpDisplayManager StephaneLenclud@237: { StephaneLenclud@238: [DataContract] StephaneLenclud@238: [Ear.AttributeObject(Id = "Event.Hid.WindowsMediaCenter", Name = "HID Windows Media Center", Description = "Corresponding HID message received.")] StephaneLenclud@238: public class EventHidWindowsMediaCenter : Ear.Event StephaneLenclud@237: { StephaneLenclud@238: public EventHidWindowsMediaCenter() StephaneLenclud@238: { StephaneLenclud@238: } StephaneLenclud@238: StephaneLenclud@238: [DataMember] StephaneLenclud@238: [Ear.AttributeObjectProperty StephaneLenclud@238: ( StephaneLenclud@238: Id = "HID.WMC.Usage", StephaneLenclud@238: Name = "Usage", StephaneLenclud@238: Description = "The usage corresponding to your remote button." StephaneLenclud@238: )] StephaneLenclud@238: public Hid.Usage.WindowsMediaCenterRemoteControl Usage { get; set; } StephaneLenclud@238: StephaneLenclud@238: /// StephaneLenclud@238: /// Make sure we distinguish between various configuration of this event StephaneLenclud@238: /// StephaneLenclud@238: /// StephaneLenclud@238: public override string Brief() StephaneLenclud@238: { StephaneLenclud@238: return Name + ": " + Usage.ToString(); StephaneLenclud@238: } StephaneLenclud@238: StephaneLenclud@238: /// StephaneLenclud@238: /// StephaneLenclud@238: /// StephaneLenclud@238: /// StephaneLenclud@238: /// StephaneLenclud@238: public override bool Equals(object obj) StephaneLenclud@238: { StephaneLenclud@238: if (obj is EventHidWindowsMediaCenter) StephaneLenclud@238: { StephaneLenclud@238: EventHidWindowsMediaCenter e = (EventHidWindowsMediaCenter)obj; StephaneLenclud@238: bool res = (e.Usage == Usage); StephaneLenclud@238: return res; StephaneLenclud@238: } StephaneLenclud@238: StephaneLenclud@238: return false; StephaneLenclud@238: } StephaneLenclud@238: StephaneLenclud@237: } StephaneLenclud@237: }