/// <summary> /// Constructor /// </summary> /// <param name="coordinates"></param> /// <param name="settings"></param> /// <param name="state"></param> /// <param name="userDesiredState"></param> /// <param name="isInMultiAction"></param> public KeyPayload(KeyCoordinates coordinates, JObject settings, uint state, uint userDesiredState, bool isInMultiAction) { Coordinates = coordinates; Settings = settings; State = state; UserDesiredState = userDesiredState; IsInMultiAction = isInMultiAction; }
/// <summary> /// Constructor /// </summary> /// <param name="coordinates"></param> /// <param name="settings"></param> /// <param name="state"></param> /// <param name="isInMultiAction"></param> /// <param name="deviceInfo"></param> public InitialPayload(KeyCoordinates coordinates, JObject settings, uint state, bool isInMultiAction, StreamDeckInfo deviceInfo) { Coordinates = coordinates; Settings = settings; State = state; IsInMultiAction = isInMultiAction; DeviceInfo = deviceInfo; }
/// <summary> /// Checks if too KeyCoordinates match to the same key /// </summary> /// <param name="coordinates"></param> /// <param name="secondCoordinates"></param> /// <returns></returns> public static bool IsCoordinatesSame(this KeyCoordinates coordinates, KeyCoordinates secondCoordinates) { if (secondCoordinates == null) { return(false); } return(coordinates.Row == secondCoordinates.Row && coordinates.Column == secondCoordinates.Column); }