static void OnRemoteKeyButton(Message m, RemoteKeyButton button) { var e = RemoteKeyButtonPressed; if (e != null) { e(new RemoteKeyEventArgs(button)); } m.ReceiverDescription = "Remote key: '" + button.ToStringValue() + "' was pressed"; }
static void OnRemoteKeyButton(Message m, RemoteKeyButton button) { var e = RemoteKeyButtonPressed; if (e != null) { e(new RemoteKeyEventArgs(button)); } m.ReceiverDescription = "Remote key press " + button.ToStringValue() + " button"; Logger.Info(m.ReceiverDescription); }
public static string ToStringValue(this RemoteKeyButton e) { switch (e) { case RemoteKeyButton.Lock: return("Lock"); case RemoteKeyButton.Trunk: return("Trunk"); case RemoteKeyButton.Unlock: return("Unlock"); } return("NotSpecified(" + e.ToString() + ")"); }
public RemoteKeyEventArgs(RemoteKeyButton button) { Button = button; }