public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            bool prevKeydownDelay = Settings.KeydownDelay;

            // New in StreamDeck-Tools v2.0:
            Tools.AutoPopulateSettings(Settings, payload.Settings);
            Logger.Instance.LogMessage(TracingLevel.INFO, $"Settings loaded: {payload.Settings}");
            if (Settings.KeydownDelay && !prevKeydownDelay && Settings.Delay < CommandTools.RECOMMENDED_KEYDOWN_DELAY)
            {
                Settings.Delay = CommandTools.RECOMMENDED_KEYDOWN_DELAY;
            }
            HandleFilenames();
        }
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            bool showTitle = settings.ShowVolume || settings.ShowAppName;

            Tools.AutoPopulateSettings(settings, payload.Settings);
            InitializeSettings();

            // Clear title if setting changed
            if (showTitle != (settings.ShowVolume || settings.ShowAppName))
            {
                Connection.SetTitleAsync((string)null);
            }
        }
        public async override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            string appOld = settings.Application;

            Tools.AutoPopulateSettings(settings, payload.Settings);
            if (appOld != settings.Application) // Application has changed
            {
                InitializeStartInDirectory();
            }
            InitializeSettings();
            await Connection.SetTitleAsync((String)null);

            await SaveSettings();
        }
Example #4
0
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            string previousInitialValue = settings.InitialValue;

            Tools.AutoPopulateSettings(settings, payload.Settings);
            SaveSettings();
            LoadCounterFromFile();
            InitializeSettings();

            if (previousInitialValue != settings.InitialValue)
            {
                Logger.Instance.LogMessage(TracingLevel.INFO, $"InitialValue setting was modified");
                ResetCounter();
            }
        }
Example #5
0
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            // Save original values
            string oldChatMessage   = settings.ChatMessage;
            bool   twoLettersPerKey = settings.TwoLettersPerKey;
            string alertColor       = settings.AlertColor;

            // Populate new values
            Tools.AutoPopulateSettings(settings, payload.Settings);
            ResetChat();
            if (oldChatMessage != settings.ChatMessage || twoLettersPerKey != settings.TwoLettersPerKey || alertColor != settings.AlertColor)
            {
                SetGlobalSettings();
            }
        }
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            bool prevKeydownDelay = Settings.KeydownDelay;

            // New in StreamDeck-Tools v2.0:
            Tools.AutoPopulateSettings(Settings, payload.Settings);
            Logger.Instance.LogMessage(TracingLevel.INFO, $"Settings loaded: {payload.Settings}");

            if (Settings.KeydownDelay && !prevKeydownDelay && Settings.Delay < CommandTools.RECOMMENDED_KEYDOWN_DELAY)
            {
                Settings.Delay = CommandTools.RECOMMENDED_KEYDOWN_DELAY;
                Connection.SetSettingsAsync(JObject.FromObject(Settings));
            }
            LoadMacros();
            SaveSettings();
        }
Example #7
0
        public async override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            string apiToken = settings.ApiToken;

            Tools.AutoPopulateSettings(settings, payload.Settings);
            lastRefresh = DateTime.MinValue;
            if (apiToken != settings.ApiToken)
            {
                if (settings.ApiToken != HIDDEN_API_TOKEN)
                {
                    stockComm.SetStockToken(settings.ApiToken);
                }
                settings.ApiToken = HIDDEN_API_TOKEN;
                await SaveSettings();
            }
        }
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            bool previousPubsubNotifications = Settings.PubsubNotifications;

            // Populate new values
            Tools.AutoPopulateSettings(Settings, payload.Settings);
            InitializeSettings();
            ResetChat();

            if (previousPubsubNotifications != Settings.PubsubNotifications && Settings.PubsubNotifications) // Enabled checkbox
            {
                ResetNotificationMessages();
            }

            Logger.Instance.LogMessage(TracingLevel.INFO, "TwitchPagerAction ReceivedSettings calling SetGlobalSettings");
            SetGlobalSettings();
        }
        public override async void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            string deviceName      = settings.AudioDevice;
            bool   showLevelAsText = settings.ShowLevelAsText;

            Tools.AutoPopulateSettings(settings, payload.Settings);
            if (deviceName != settings.AudioDevice)
            {
                mmDevice = null;
            }

            if (showLevelAsText != settings.ShowLevelAsText)
            {
                await Connection.SetTitleAsync((String)null);
            }
            await InitializeSettings();
            await SaveSettings();
        }
Example #10
0
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            try
            {
                Tools.AutoPopulateSettings(settings, payload.Settings);
                settings.UpdateSettingsEnum();
                watcher           = WatcherFactory.GetWatcher(settings);
                initialDateOffset = initialDateOffset.Subtract(new TimeSpan(settings.InitialOffset, 0, 0, 0));

                UpdateTimer();
                SaveSettings();
            }
            catch (Exception ex)
            {
                Logger.Instance.LogMessage(TracingLevel.ERROR, ex.Message);
                Connection.ShowAlert().Wait();
            }
        }
Example #11
0
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            bool   clearOnReset     = settings.ClearFileOnReset;
            string countdownEndText = settings.CountdownEndText;

            // New in StreamDeck-Tools v2.0:
            Tools.AutoPopulateSettings(settings, payload.Settings);

            if (clearOnReset != settings.ClearFileOnReset)
            {
                settings.CountdownEndText = String.Empty;
            }
            else if (countdownEndText != settings.CountdownEndText)
            {
                settings.ClearFileOnReset = false;
            }
            InitializeSettings();
            SaveSettings();
        }
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            bool screenFriendlyName = settings.ScreenFriendlyName;

            Tools.AutoPopulateSettings(settings, payload.Settings);
            if (screenFriendlyName != settings.ScreenFriendlyName)
            {
                PopulateScreens();
            }


            // Make sure TopmostWindow is set, if I choose the OnlyTopmost setting
            if (settings.OnlyTopmost && !settings.TopmostWindow)
            {
                settings.TopmostWindow = true;
            }

            SaveSettings();
        }
Example #13
0
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            bool showTitle  = settings.ShowDeviceName || settings.ShowAppName;
            bool appCurrent = settings.AppCurrent;

            Tools.AutoPopulateSettings(settings, payload.Settings);
            InitializeSettings();

            // Clear title if setting changed
            if (showTitle != (settings.ShowDeviceName || settings.ShowAppName) ||
                appCurrent != settings.AppCurrent)
            {
                Connection.SetTitleAsync((string)null);
            }

            if (appCurrent != settings.AppCurrent)
            {
                SaveSettings();
            }
        }
Example #14
0
 /// <inheritdoc/>
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     base.ReceivedSettings(payload);
     GetInitialData().ConfigureAwait(true);
 }
 public override async void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     Tools.AutoPopulateSettings(settings, payload.Settings);
     await InitializeSettings();
     await SaveSettings();
 }
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     Tools.AutoPopulateSettings(settings, payload.Settings);
     InitializeSettings();
     Logger.Instance.LogMessage(TracingLevel.INFO, $"Settings loaded: {payload.Settings}");
 }
Example #17
0
 /// <inheritdoc/>
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     base.ReceivedSettings(payload);
     CreateNewWebSocket();
 }
        public override void ReceivedSettings(ReceivedSettingsPayload payload)
        {
            string playerIdString = payload.Settings["playerId"].ToString();

            playerId = int.Parse(playerIdString);
        }
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     Tools.AutoPopulateSettings(settings, payload.Settings);
     LoadCurrencyLists();
     CryptoComm.Instance.GetLatestSymbols();
 }
Example #20
0
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     Tools.AutoPopulateSettings(settings, payload.Settings);
     SaveSettings(JObject.FromObject(settings));
     CreatePlugin(settings);
 }
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     Tools.AutoPopulateSettings(settings, payload.Settings);
     SaveSettings();
 }
Example #22
0
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
 }
Example #23
0
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     Tools.AutoPopulateSettings(Settings, payload.Settings);
     InitializeSettings();
 }
Example #24
0
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     // New in StreamDeck-Tools v2.0:
     Tools.AutoPopulateSettings(settings, payload.Settings);
     Logger.Instance.LogMessage(TracingLevel.INFO, $"Settings loaded: {payload.Settings}");
 }
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     // New in StreamDeck-Tools v2.0:
     Tools.AutoPopulateSettings(settings, payload.Settings);
 }
Example #26
0
 public override void ReceivedSettings(ReceivedSettingsPayload payload)
 {
     Tools.AutoPopulateSettings(settings, payload.Settings);
     lastRefresh = DateTime.MinValue;
 }