public async void ShowActiveStreamers(TwitchActiveStreamer[] streamers, TwitchLiveStreamersLongPressAction longPressAction)
        {
            Logger.Instance.LogMessage(TracingLevel.INFO, $"ShowActiveStreamers called");
            StopFlashAndReset();

            await SwitchToFullScreen();

            // Wait until the UI Action keys have subscribed to get events
            int retries = 0;

            while (!IsReady && retries < 60)
            {
                Thread.Sleep(100);
                retries++;
            }
            if (!IsReady)
            {
                Logger.Instance.LogMessage(TracingLevel.WARN, "Could not get full screen ready!");
                await connection.SwitchProfileAsync(null);

                return;
            }
            StopFlashAndReset();
            streamersEventArgs = new ActiveStreamersEventArgs(streamers, longPressAction, numberOfKeys, 0);

            ActiveStreamersChanged?.Invoke(this, streamersEventArgs);
        }
 public void MoveToNextStreamersPage()
 {
     if (streamersEventArgs == null)
     {
         return;
     }
     StopFlash();
     streamersEventArgs.CurrentPage++;
     ActiveStreamersChanged?.Invoke(this, streamersEventArgs);
 }
예제 #3
0
        public void MoveToPrevStreamersPage()
        {
            if (streamersEventArgs == null)
            {
                return;
            }

            if (streamersEventArgs.CurrentPage == 0) // Already on first page
            {
                return;
            }

            StopFlashAndReset();
            streamersEventArgs.CurrentPage--;
            ActiveStreamersChanged?.Invoke(this, streamersEventArgs);
        }
예제 #4
0
        public async void ShowActiveStreamers(TwitchActiveStreamer[] streamers, TwitchLiveStreamersLongPressAction longPressAction)
        {
            Logger.Instance.LogMessage(TracingLevel.INFO, $"ShowActiveStreamers called");
            StopFlashAndReset();

            switch (connection.DeviceInfo().Type)
            {
            case StreamDeckDeviceType.StreamDeckClassic:
                await connection.SwitchProfileAsync("FullScreenAlert");

                break;

            case StreamDeckDeviceType.StreamDeckMini:
                await connection.SwitchProfileAsync("FullScreenAlertMini");

                break;

            case StreamDeckDeviceType.StreamDeckXL:
                await connection.SwitchProfileAsync("FullScreenAlertXL");

                break;

            default:
                Logger.Instance.LogMessage(TracingLevel.WARN, $"SwitchProfileAsync: Unsupported device type: {connection.DeviceInfo().Type}");
                break;
            }

            // Wait until the UI Action keys have subscribed to get events
            int retries = 0;

            while (!IsReady && retries < 60)
            {
                Thread.Sleep(100);
                retries++;
            }
            if (!IsReady)
            {
                Logger.Instance.LogMessage(TracingLevel.WARN, "Could not get full screen ready!");
                await connection.SwitchProfileAsync(null);

                return;
            }
            StopFlashAndReset();
            streamersEventArgs = new ActiveStreamersEventArgs(streamers, longPressAction, numberOfKeys, 0);

            ActiveStreamersChanged?.Invoke(this, streamersEventArgs);
        }