public static new bool TryDecode(byte[] data, Encoding encoding, out ControllerEvent @event) { if (data == null || data.Length == 0) { @event = new NotificatorControllerEvent(null, null, 0); return(false); } byte[][] tokens = data.Split(0, 3); byte sender = tokens[0][0]; string name = encoding.GetString(tokens[1]); string button = encoding.GetString(tokens[2]); @event = new NotificatorControllerEvent(name, button, sender); return(true); }
public ClientActionInfo(NotificatorControllerEvent @event) { Name = @event.Name; Button = @event.Button; }