Exemplo n.º 1
0
        protected void OnDidReceiveGlobalSettings(StreamDeckEventPayload args)
        {
            StreamDeckEventPayload.SetModelProperties(args, GlobalProfileSettings);
            GlobalProfileSettings.UpdateSettings(manifestProfiles, DeckManager.Info.devices);
            DeckManager.SetGlobalSettingsAsync(DeckManager.PluginUUID, GlobalProfileSettings);

            UpdateProfileSwitchers();

            //For Test/Debugging - clear GlobalSettings
            //GlobalProfileSettings = new ModelProfileSwitcher();
            //GlobalProfileSettings.UpdateSettings(manifestProfiles, DeckManager.Info.devices);
            //DeckManager.SetGlobalSettingsAsync(DeckManager.PluginUUID, GlobalProfileSettings);
            //DeckManager.SetGlobalSettingsAsync(DeckManager.PluginUUID, null);

            Log.Logger.Information($"ActionController:OnDidReceiveGlobalSettings - Switching => {GlobalProfileSettings.EnableSwitching} | DeviceMappings => {GlobalProfileSettings?.DeviceMappings?.Count} | Installed => {GlobalProfileSettings.ProfilesInstalled}");
        }
 //CHANGED
 protected void SetModelProperties(StreamDeckEventPayload args)
 {
     StreamDeckEventPayload.SetModelProperties(args, SettingsModel);
 }