Fixing EAR event edition.
EAR HID event now displays 'Press a key' if not valid.
2 using System.Collections.Generic;
5 using System.Threading.Tasks;
6 using System.Runtime.Serialization;
7 using Ear = SharpLib.Ear;
8 using Hid = SharpLib.Hid;
10 namespace SharpDisplayManager
13 [Ear.AttributeObject(Id = "Event.Hid.ConsumerControl", Name = "HID Consumer Control", Description = "Corresponding HID message received.")]
14 public class EventHidConsumerControl : Ear.Event
16 public EventHidConsumerControl()
21 [Ear.AttributeObjectProperty
23 Id = "HID.ConsumerControl.Usage",
25 Description = "The usage corresponding to your remote button."
27 public Hid.Usage.ConsumerControl Usage { get; set; }
30 /// Make sure we distinguish between various configuration of this event
32 /// <returns></returns>
33 public override string Brief()
35 return Name + ": " + Usage.ToString();
41 /// <param name="obj"></param>
42 /// <returns></returns>
43 public override bool Equals(object obj)
45 if (obj is EventHidConsumerControl)
47 EventHidConsumerControl e = (EventHidConsumerControl)obj;
48 bool res = (e.Usage == Usage);