protected override Task OnKeyUp(ActionEventArgs <KeyPayload> args) { StreamDeckSendSocketService.SendRequest(new ShowDeckListRequest { Deck = Deck }); return(Task.CompletedTask); }
private void SendStatValueRequest(bool increase) { var response = StreamDeckSendSocketService.SendRequest <ChangeStatValueResponse>(new ChangeStatValueRequest { Deck = Deck, StatType = StatType, Increase = increase }); _value = response.Value; SetTitleAsync(_value.ToString()); }
private Task GetButtonImage() { var request = new ButtonImageRequest { Deck = _settings.Deck.AsDeck(), Index = CardButtonIndex, FromCardSet = ShowCardSet }; var response = StreamDeckSendSocketService.SendRequest <ButtonImageResponse>(request); ImageUtils.ImageCache[response.Name] = response.Bytes; return(Task.CompletedTask); }
protected override Task OnWillAppear(ActionEventArgs <AppearancePayload> args) { //make sure the overlay app aware of us- otherwise we won't get updates var request = new RegisterForUpdatesRequest { Port = StreamDeckTcpInfo.Port }; StreamDeckSendSocketService.SendRequest <OkResponse>(request); return(Task.CompletedTask); }
public async Task GetButtonInfo() { try { var request = new GetCardInfoRequest { Deck = _settings.Deck.AsDeck(), Index = CardButtonIndex, FromCardSet = ShowCardSet }; var cardInfo = StreamDeckSendSocketService.SendRequest <CardInfoResponse>(request); await UpdateButtonInfo(cardInfo); } catch { } }
private void SendClick(ButtonClick click) { var request = new ClickCardButtonRequest { Deck = _settings.Deck.AsDeck(), Index = CardButtonIndex, FromCardSet = ShowCardSet, Click = click }; StreamDeckSendSocketService.SendRequest <CardInfoResponse>(request); //setting the card name, just because we want the button to update to show the opration is finished (no longer have the "pressed in" look if (_currentCardInfo != null) { SetTitleAsync(TextUtils.WrapTitle(_currentCardInfo.Name)); } }
protected override Task OnKeyDown(ActionEventArgs <KeyPayload> args) { StreamDeckSendSocketService.SendRequest(new ClearAllCardsRequest()); return(Task.CompletedTask); }
protected override Task OnKeyUp(ActionEventArgs <KeyPayload> args) { StreamDeckSendSocketService.SendRequest <OkResponse>(new ToggleActAgendaBarRequest()); return(Task.CompletedTask); }