public HandlerBase(string context, ModelBase settings, StreamDeckType deckType) { Context = context; CommonSettings = settings; DeckType = deckType; DrawImage = DefaultImage; }
public static string GetImageFileReal(string image, StreamDeckType deckType) { string imageReal = image; switch (deckType) { case StreamDeckType.StreamDeckXL: if (!image.Contains(AppSettings.hqImageSuffix)) { int idx = image.IndexOf(".png"); imageReal = image.Insert(idx, AppSettings.hqImageSuffix); if (!File.Exists(imageReal)) { if (File.Exists(image)) { imageReal = image; } else { imageReal = AppSettings.waitImage; } } } break; default: if (image.Contains(AppSettings.hqImageSuffix)) { imageReal = image.Replace(AppSettings.hqImageSuffix, ""); } break; } return(imageReal); }
public ImageDefinition(string image, StreamDeckType deckType, bool loadImage) { FileNameCommon = image; FileNameReal = GetImageFileReal(image, deckType); DeckType = deckType; if (loadImage) { Load(); } }
public static int GetRowsForStreamDeckType(StreamDeckType streamDeckType) { switch (streamDeckType) { case (StreamDeckType.Classic): return(3); case (StreamDeckType.Mini): return(2); case (StreamDeckType.XL): return(4); } return(0); }
public static int GetColumnsForStreamDeckType(StreamDeckType streamDeckType) { switch (streamDeckType) { case (StreamDeckType.Classic): return(5); case (StreamDeckType.Mini): return(3); case (StreamDeckType.XL): return(8); } return(0); }
public static void DisplayKeyLayout(StreamDeckType streamDeckType) { int rows = GetRowsForStreamDeckType(streamDeckType); int cols = GetColumnsForStreamDeckType(streamDeckType); Console.WriteLine("---------- STREAM DECK LAYOUT ----------"); for (int idx = 0; idx < rows; idx++) { for (int idx2 = 0; idx2 < cols; idx2++) { Console.Write($"[{idx2},{idx}] "); } Console.WriteLine(""); } Console.WriteLine("----------------------------------------"); }
public HandlerSwitch(string context, ModelSwitch settings, StreamDeckType deckType) : base(context, settings, deckType) { Settings = settings; }
public HandlerDisplayGauge(string context, ModelDisplayGauge settings, StreamDeckType deckType) : base(context, settings, deckType) { Settings = settings; IsArc = settings.DrawArc; }
public HandlerSwitchKorry(string context, ModelSwitchKorry settings, StreamDeckType deckType) : base(context, settings, deckType) { Settings = settings; KorrySettings.Address = KorrySettings.AddressTop; }
public HandlerDisplayRadio(string context, ModelDisplayRadio settings, StreamDeckType deckType) : base(context, settings, deckType) { Settings = settings; }
public HandlerDisplayGaugeDual(string context, ModelDisplayGaugeDual settings, StreamDeckType deckType) : base(context, settings, deckType) { Settings = settings; }
public HandlerDisplayText(string context, ModelDisplayText settings, StreamDeckType deckType) : base(context, settings, deckType) { Settings = settings; DrawBox = settings.DrawBox; }