public void SetStreamDeckPanelInstance(StreamDeckPanel streamDeckPanel) { foreach (var streamDeckLayer in LayerList) { streamDeckLayer.StreamDeckPanelInstance = streamDeckPanel; } }
public DCSBIOSDecoder(StreamDeckPanel streamDeckPanel) : base(streamDeckPanel) { _jaceId = RandomFactory.Get(); _imageUpdateTread = new Thread(ImageRefreshingThread); _imageUpdateTread.Start(); DCSBIOS.GetInstance().AttachDataReceivedListener(this); EventHandlers.AttachDCSBIOSDecoder(this); }
public static List <StreamDeckButton> GetStaticButtons(StreamDeckPanel streamDeckPanel) { if (streamDeckPanel == null) { return(_staticStreamDeckButtons); } return(_staticStreamDeckButtons.FindAll(o => o.StreamDeckPanelInstance.BindingHash == streamDeckPanel.BindingHash).ToList()); }
protected override void Show() { if (_refreshBitmap) { _bitmap = BitMapCreator.CreateStreamDeckBitmap(_buttonText, _textFont, _fontColor, _backgroundColor, OffsetX, OffsetY); _refreshBitmap = false; } StreamDeckPanel.GetInstance(StreamDeckInstanceId).SetImage(StreamDeckButtonName, _bitmap); }
protected override void Show() { DrawBitmap(); if (Bitmap == null) { return; } StreamDeckPanel.GetInstance(PanelHash).SetImage(StreamDeckButtonName, Bitmap); }
public void SetEssentials(StreamDeckPanel streamDeckPanel) { foreach (var streamDeckButton in StreamDeckButtons) { if (streamDeckButton.FaceType == EnumStreamDeckFaceType.DCSBIOS) { ((DCSBIOSDecoder)streamDeckButton.Face).SetEssentials(streamDeckPanel.InstanceId, streamDeckButton.StreamDeckButtonName); } } }
protected override void DrawBitmap() { if (_bitmap == null || RefreshBitmap) { _bitmap = StreamDeckPanel.Validate(_imageFile); RefreshBitmap = false; } if (_keyBitmap == null) { _keyBitmap = KeyBitmap.Create.FromBitmap(_bitmap); } }
protected override void DrawBitmap() { if (_backgroundBitmap == null || _loadBackground) { _backgroundBitmap = StreamDeckPanel.Validate(_backgroundBitmapPath); RefreshBitmap = true; } if (_bitmap == null || RefreshBitmap) { _bitmap = BitMapCreator.CreateStreamDeckBitmap(ButtonFinalText, TextFont, FontColor, OffsetX, OffsetY, _backgroundBitmap); RefreshBitmap = false; } }
protected override void Show() { if (StreamDeckButtonName == EnumStreamDeckButtonNames.BUTTON0_NO_BUTTON) { return; } if (_refreshBitmap) { _bitmap = new Bitmap(_imageFile); _refreshBitmap = false; } var keyBitmap = KeyBitmap.Create.FromBitmap(_bitmap); StreamDeckPanel.GetInstance(StreamDeckInstanceId).StreamDeckBoard.SetKeyBitmap(StreamDeckFunction.ButtonNumber(StreamDeckButtonName) - 1, keyBitmap); }
protected override void DrawBitmap() { if (_bitmap == null || RefreshBitmap) { _bitmap = StreamDeckPanel.Validate(_imageFile); if (BitMapCreator.IsSmallerThanStreamdeckDefault(_bitmap)) { _bitmap = BitMapCreator.AdjustBitmap(_bitmap, 1.0f, 4.0f, 1.0f); _bitmap = BitMapCreator.EnlargeBitmapCanvas(_bitmap); } RefreshBitmap = false; } if (_keyBitmap == null) { _keyBitmap = KeyBitmap.Create.FromBitmap(_bitmap); } }
protected override void DrawBitmap() { if (_backgroundBitmap == null || _loadBackground) { _backgroundBitmap = StreamDeckPanel.Validate(_backgroundBitmapPath); RefreshBitmap = true; } if (_bitmap == null || RefreshBitmap) { if (string.IsNullOrEmpty(_backgroundBitmapPath)) //User maybe only wants text displayed. { _bitmap = BitMapCreator.CreateStreamDeckBitmap(ButtonFinalText, TextFont, FontColor, Color.LightGray, OffsetX, OffsetY); } else { _bitmap = BitMapCreator.CreateStreamDeckBitmap(ButtonFinalText, TextFont, FontColor, OffsetX, OffsetY, _backgroundBitmap); } RefreshBitmap = true; } }
/// <summary> /// This is used when creating buttons for the UI that wasn't in the JSON /// </summary> /// <param name="enumStreamDeckButton"></param> /// <param name="streamDeckPanel"></param> public StreamDeckButton(EnumStreamDeckButtonNames enumStreamDeckButton, StreamDeckPanel streamDeckPanel) { _streamDeckButtonName = enumStreamDeckButton; _streamDeckPanel = streamDeckPanel; }
public StreamDeckLayer(StreamDeckPanel streamDeckPanel) { _streamDeckPanel = streamDeckPanel; }
public DCSBIOSConverter(StreamDeckPanel streamDeckPanel) { _streamDeckPanel = streamDeckPanel; _faceTypeDCSBIOSOverlay = new FaceTypeDCSBIOSOverlay(); }
protected override void Show() { DrawBitmap(); StreamDeckPanel.GetInstance(PanelHash).SetImage(StreamDeckButtonName, Bitmap); }
public FaceTypeDCSBIOS(StreamDeckPanel streamDeckPanel) { _streamDeckPanel = streamDeckPanel; }
public ActionTypeKey(StreamDeckPanel streamDeckPanel) { _streamDeckPanel = streamDeckPanel; }
public static void ShowOnly(DCSBIOSDecoder dcsbiosDecoder, string panelHash) { EventHandlers.HideDCSBIOSDecoders(dcsbiosDecoder, StreamDeckPanel.GetInstance(panelHash).SelectedLayerName); dcsbiosDecoder.IsVisible = true; }
public static void ShowOnly(DCSBIOSDecoder dcsbiosDecoder, StreamDeckPanel streamDeckPanel) { EventHandlers.HideDCSBIOSDecoders(dcsbiosDecoder, streamDeckPanel.SelectedLayerName, streamDeckPanel.BindingHash); dcsbiosDecoder.IsVisible = true; }
public void ClearFace() { StreamDeckPanel.GetInstance(_panelHash).ClearFace(_streamDeckButtonName); }
public FaceTypeDCSBIOSOverlay(StreamDeckPanel streamDeckPanel) : base(streamDeckPanel) { }
public StreamDeckLayerHandler(StreamDeckPanel streamDeckPanel) { _streamDeckPanel = streamDeckPanel; _streamDeckBoard = streamDeckPanel.StreamDeckBoard; }
public StreamDeckLayerHandler(StreamDeckPanel streamDeckPanel) { _instanceId = _instanceIdCounter++; _streamDeckPanel = streamDeckPanel; _streamDeckBoard = streamDeckPanel.StreamDeckBoard; }
public ActionTypeDCSBIOS(StreamDeckPanel streamDeckPanel) { _streamDeckPanel = streamDeckPanel; }
public ActionTypeLayer(StreamDeckPanel streamDeckPanel) { _streamDeckPanel = streamDeckPanel; }
protected override void Show() { DrawBitmap(); StreamDeckPanel.GetInstance(PanelHash).StreamDeckBoard.SetKeyBitmap(StreamDeckCommon.ButtonNumber(StreamDeckButtonName) - 1, _keyBitmap); }