Beispiel #1
0
        public bool ChangeEffect(ContentEffect effect)
        {
            if (!IsConnected())
            {
                return(false);
            }
            try
            {
                switch (effect)
                {
                case ContentEffect.MediaPortalLiveMode:
                case ContentEffect.GIFReader:
                case ContentEffect.VUMeter:
                case ContentEffect.VUMeterRainbow:
                    return(true);

                case ContentEffect.StaticColor:
                    ChangeStaticColor(coreObject.staticColor);
                    return(true);

                case ContentEffect.LEDsDisabled:
                case ContentEffect.Undefined:
                default:
                    ChangeStaticColor(new int[] { 0, 0, 0 });
                    return(true);
                }
            }
            catch (Exception ex)
            {
                Log.Error("BoblightHandler - Error changing effect to {0}", effect.ToString());
                Log.Error("BoblightHandler - Exception: {0}", ex.Message);
                ReInitialise();
                return(false);
            }
        }
Beispiel #2
0
 public bool ChangeEffect(ContentEffect effect)
 {
   if (!IsConnected())
   {
     return false;
   }
   try
   {
     switch (effect)
     {
       case ContentEffect.MediaPortalLiveMode:
       case ContentEffect.GIFReader:
       case ContentEffect.VUMeter:
       case ContentEffect.VUMeterRainbow:
         return true;
       case ContentEffect.StaticColor:
         ChangeStaticColor(coreObject.staticColor);
         return true;
       case ContentEffect.LEDsDisabled:
       case ContentEffect.Undefined:
       default:
         ChangeStaticColor(new int[] { 0, 0, 0 });
         return true;
     }
   }
   catch (Exception ex)
   {
     Log.Error("BoblightHandler - Error changing effect to {0}", effect.ToString());
     Log.Error("BoblightHandler - Exception: {0}", ex.Message);
     ReInitialise();
     return false;
   }
 }
Beispiel #3
0
        /// <summary>
        /// Change effect.
        /// </summary>
        /// <param name="effect">Effect to change to</param>
        /// <param name="force">Force the effect change</param>
        /// <returns></returns>
        public bool ChangeEffect(ContentEffect effect, bool force = false)
        {
            if (!IsConnected() && !force)
              {
            return false;
              }
              // Static color gets excluded so we can actually change it.
              if ((effect == currentEffect) && (!force))
              {
            Log.Debug("Effect \"{0}\" is already active. Nothing to do.", effect);
            return false;
              }
              currentEffect = effect;
              Log.Info("Changing AtmoLight effect to: {0}", effect.ToString());
              StopAllThreads();

              lock (targetsLock)
              {
            foreach (var target in targets)
            {
              if (target.IsConnected())
              {
            target.ChangeEffect(effect);
              }
            }
              }

              if (effect == ContentEffect.MediaPortalLiveMode)
              {
            blackbarDetectionRect = new Rectangle(0, 0, GetCaptureWidth(), GetCaptureHeight());
            if (delayEnabled)
            {
              Log.Debug("Adding {0}ms delay to the LEDs.", delayTime);
              StartSetPixelDataThread();
            }
              }
              else if (effect == ContentEffect.GIFReader)
              {
            StartGIFReaderThread();
              }
              else if (effect == ContentEffect.VUMeter || effect == ContentEffect.VUMeterRainbow)
              {
            StartVUMeterThread();
              }
              return true;
        }
Beispiel #4
0
    /// <summary>
    /// Change effect.
    /// </summary>
    /// <param name="effect">Effect to change to</param>
    /// <param name="force">Force the effect change</param>
    /// <returns></returns>
    public bool ChangeEffect(ContentEffect effect, bool force = false, bool skipTargetsAndThreads = false, bool apiCommand = false)
    {
      if (!IsConnected() && !force)
      {
        return false;
      }

      if ((effect == currentEffect) && (!force))
      {
        Log.Debug("Effect \"{0}\" is already active. Nothing to do.", effect);
        return false;
      }

      currentEffect = effect;
      StopAllThreads();

      if (skipTargetsAndThreads)
      {
        Log.Debug("Setting internal AtmoLight effect (skipping targets and threads) to: {0}", effect.ToString());
        return true;
      }

      // Only log if it isn't a API command (would flood it otherwise)
      if (!apiCommand)
      {
        Log.Info("Changing AtmoLight effect to: {0}", effect.ToString());
      }

      lock (targetsLock)
      {
        foreach (var target in targets)
        {
          if (target.IsConnected())
          {
            target.ChangeEffect(effect);
          }
        }
      }

      if (effect == ContentEffect.MediaPortalLiveMode)
      {
        blackbarDetectionRect = new Rectangle(0, 0, GetCaptureWidth(), GetCaptureHeight());
        if (delayEnabled)
        {
          Log.Debug("Adding {0}ms delay to the LEDs.", delayTime);
          StartSetPixelDataThread();
        }
      }
      else if (effect == ContentEffect.GIFReader)
      {
        StartGIFReaderThread();
      }
      else if (effect == ContentEffect.VUMeter || effect == ContentEffect.VUMeterRainbow)
      {
        StartVUMeterThread();
      }

      return true;
    }
Beispiel #5
0
        public static void SaveSettings()
        {
            using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Config, "MediaPortal.xml")))
            {
                reader.SetValue("atmolight", "atmowinexe", atmowinExe);
                reader.SetValue("atmolight", "effectVideo", effectVideo.ToString());
                reader.SetValue("atmolight", "effectMusic", effectMusic.ToString());
                reader.SetValue("atmolight", "effectRadio", effectRadio.ToString());
                reader.SetValue("atmolight", "effectMenu", effectMenu.ToString());
                reader.SetValue("atmolight", "effectMPExit", effectMPExit.ToString());
                reader.SetValue("atmolight", "killbutton", (int)killButton);
                reader.SetValue("atmolight", "cmbutton", (int)profileButton);
                reader.SetValue("atmolight", "menubutton", (int)menuButton);
                reader.SetValueAsBool("atmolight", "OffOnStart", manualMode);
                reader.SetValueAsBool("atmolight", "SBS_3D_ON", sbs3dOn);
                reader.SetValueAsBool("atmolight", "lowCPU", lowCPU);
                reader.SetValue("atmolight", "lowCPUTime", lowCPUTime);
                reader.SetValueAsBool("atmolight", "Delay", delay);
                reader.SetValue("atmolight", "DelayTime", delayReferenceTime);
                reader.SetValue("atmolight", "DelayRefreshRate", delayReferenceRefreshRate);
                reader.SetValue("atmolight", "DelayTime23", delayReferenceTime23);
                reader.SetValue("atmolight", "DelayTime24", delayReferenceTime24);
                reader.SetValue("atmolight", "DelayTime50", delayReferenceTime50);
                reader.SetValue("atmolight", "DelayTime59", delayReferenceTime59);
                reader.SetValueAsBool("atmolight", "ExitAtmoWin", exitAtmoWin);
                reader.SetValueAsBool("atmolight", "StartAtmoWin", startAtmoWin);
                reader.SetValueAsBool("atmolight", "atmoWakeHelperEnabled", atmoWakeHelperEnabled);
                reader.SetValue("atmolight", "atmoWakeHelperComPort", atmoWakeHelperComPort);
                reader.SetValue("atmolight", "atmoWakeHelperResumeDelay", atmoWakeHelperResumeDelay);
                reader.SetValue("atmolight", "atmoWakeHelperDisconnectDelay", atmoWakeHelperDisconnectDelay);
                reader.SetValue("atmolight", "atmoWakeHelperConnectDelay", atmoWakeHelperConnectDelay);
                reader.SetValue("atmolight", "atmoWakeHelperReinitializationDelay", atmoWakeHelperReinitializationDelay);
                reader.SetValue("atmolight", "excludeTimeStart", excludeTimeStart.ToString("HH:mm"));
                reader.SetValue("atmolight", "excludeTimeEnd", excludeTimeEnd.ToString("HH:mm"));
                reader.SetValue("atmolight", "currentLanguage", currentLanguage);
                reader.RemoveEntry("atmolight", "currentLanguageFile");
                reader.SetValue("atmolight", "StaticColorRed", staticColorRed);
                reader.SetValue("atmolight", "StaticColorGreen", staticColorGreen);
                reader.SetValue("atmolight", "StaticColorBlue", staticColorBlue);
                reader.SetValueAsBool("atmolight", "RestartOnError", restartOnError);
                reader.SetValueAsBool("atmolight", "TrueGrabbing", trueGrabbing);
                reader.SetValueAsBool("atmolight", "BlackbarDetection", blackbarDetection);
                reader.SetValue("atmolight", "BlackbarDetectionTime", blackbarDetectionTime);
                reader.SetValue("atmolight", "GIFFile", gifFile);
                reader.SetValue("atmolight", "captureWidth", (int)captureWidth);
                reader.SetValue("atmolight", "captureHeight", (int)captureHeight);
                reader.SetValueAsBool("atmolight", "monitorScreensaverState", monitorScreensaverState);
                reader.SetValueAsBool("atmolight", "monitorWindowState", monitorWindowState);
                reader.SetValue("atmolight", "hyperionIP", hyperionIP);
                reader.SetValue("atmolight", "hyperionPort", (int)hyperionPort);
                reader.SetValue("atmolight", "hyperionPriority", (int)hyperionPriority);
                reader.SetValue("atmolight", "hyperionReconnectDelay", (int)hyperionReconnectDelay);
                reader.SetValue("atmolight", "hyperionReconnectAttempts", (int)hyperionReconnectAttempts);
                reader.SetValue("atmolight", "hyperionStaticColorPriority", (int)hyperionPriorityStaticColor);
                reader.SetValueAsBool("atmolight", "hyperionLiveReconnect", hyperionLiveReconnect);
                reader.SetValue("atmolight", "hueExe", hueExe);
                reader.SetValueAsBool("atmolight", "hueStart", hueStart);
                reader.SetValueAsBool("atmolight", "hueIsRemoteMachine", hueIsRemoteMachine);
                reader.SetValue("atmolight", "hueIP", hueIP);
                reader.SetValue("atmolight", "huePort", (int)huePort);
                reader.SetValue("atmolight", "hueReconnectDelay", (int)hueReconnectDelay);
                reader.SetValue("atmolight", "hueReconnectAttempts", (int)hueReconnectAttempts);
                reader.SetValueAsBool("atmolight", "hueBridgeEnableOnResume", hueBridgeEnableOnResume);
                reader.SetValueAsBool("atmolight", "hueBridgeDisableOnSuspend", hueBridgeDisableOnSuspend);
                reader.SetValueAsBool("atmolight", "hueTheaterEnabled", hueTheaterEnabled);
                reader.SetValueAsBool("atmolight", "hueTheaterRestoreLights", hueTheaterRestoreLights);
                reader.SetValueAsBool("atmolight", "hueTheaterEnabledVU", hueTheaterEnabledVU);
                reader.SetValue("atmolight", "boblightIP", boblightIP);
                reader.SetValue("atmolight", "boblightPort", boblightPort);
                reader.SetValue("atmolight", "boblightMaxFPS", boblightMaxFPS);
                reader.SetValue("atmolight", "boblightMaxReconnectAttempts", boblightMaxReconnectAttempts);
                reader.SetValue("atmolight", "boblightReconnectDelay", boblightReconnectDelay);
                reader.SetValue("atmolight", "boblightSpeed", boblightSpeed);
                reader.SetValue("atmolight", "boblightAutospeed", boblightAutospeed);
                reader.SetValue("atmolight", "boblightSaturation", boblightSaturation);
                reader.SetValue("atmolight", "boblightValue", boblightValue);
                reader.SetValue("atmolight", "boblightThreshold", boblightThreshold);
                reader.SetValueAsBool("atmolight", "boblightInterpolation", boblightInterpolation);
                reader.SetValue("atmolight", "boblightGamma", boblightGamma.ToString());
                reader.SetValue("atmolight", "blackbarDetectionThreshold", blackbarDetectionThreshold.ToString());
                reader.SetValue("atmolight", "powerModeChangedDelay", powerModeChangedDelay.ToString());
                reader.SetValue("atmolight", "ambiBoxIP", ambiBoxIP.ToString());
                reader.SetValue("atmolight", "ambiBoxPort", ambiBoxPort.ToString());
                reader.SetValue("atmolight", "ambiBoxMaxReconnectAttempts", ambiBoxMaxReconnectAttempts.ToString());
                reader.SetValue("atmolight", "ambiBoxReconnectDelay", ambiBoxReconnectDelay.ToString());
                reader.SetValue("atmolight", "ambiBoxChangeImageDelay", ambiBoxChangeImageDelay.ToString());
                reader.SetValue("atmolight", "ambiBoxMediaPortalProfile", ambiBoxMediaPortalProfile.ToString());
                reader.SetValue("atmolight", "ambiBoxExternalProfile", ambiBoxExternalProfile.ToString());
                reader.SetValue("atmolight", "ambiBoxPath", ambiBoxPath.ToString());
                reader.SetValueAsBool("atmolight", "ambiBoxAutoStart", ambiBoxAutoStart);
                reader.SetValueAsBool("atmolight", "ambiBoxAutoStop", ambiBoxAutoStop);
                reader.SetValue("atmolight", "vuMeterMindB", vuMeterMindB.ToString());
                reader.SetValue("atmolight", "vuMeterMinHue", vuMeterMinHue.ToString());
                reader.SetValue("atmolight", "vuMeterMaxHue", vuMeterMaxHue.ToString());
                reader.SetValueAsBool("atmolight", "atmoWinTarget", atmoWinTarget);
                reader.SetValueAsBool("atmolight", "boblightTarget", boblightTarget);
                reader.SetValueAsBool("atmolight", "hueTarget", hueTarget);
                reader.SetValueAsBool("atmolight", "hyperionTarget", hyperionTarget);
                reader.SetValueAsBool("atmolight", "ambiBoxTarget", ambiBoxTarget);
                reader.SetValueAsBool("atmolight", "atmoOrbTarget", atmoOrbTarget);
                reader.SetValue("atmolight", "atmoOrbBlackThreshold", atmoOrbBlackThreshold.ToString());
                reader.SetValue("atmolight", "atmoOrbBroadcastPort", atmoOrbBroadcastPort.ToString());
                reader.SetValue("atmolight", "atmoOrbGamma", atmoOrbGamma.ToString());
                reader.SetValue("atmolight", "atmoOrbMinDiversion", atmoOrbMinDiversion.ToString());
                reader.SetValue("atmolight", "atmoOrbSaturation", atmoOrbSaturation.ToString());
                reader.SetValue("atmolight", "atmoOrbThreshold", atmoOrbThreshold.ToString());
                reader.SetValueAsBool("atmolight", "atmoOrbUseOverallLightness", atmoOrbUseOverallLightness);
                reader.SetValueAsBool("atmolight", "atmoOrbUseSmoothing", atmoOrbUseSmoothing);
                reader.SetValue("atmolight", "atmoOrbSmoothingThreshold", atmoOrbSmoothingThreshold.ToString());

                string atmoOrbLampsTemp = "";
                for (int i = 0; i < atmoOrbLamps.Count; i++)
                {
                    if (i > 0)
                    {
                        atmoOrbLampsTemp += "|";
                    }
                    atmoOrbLampsTemp += atmoOrbLamps[i];
                }
                reader.SetValue("atmolight", "atmoOrbLamps", atmoOrbLampsTemp);
                reader.SetValue("atmolight", "hueMinDiversion", hueMinDiversion.ToString());
                reader.SetValue("atmolight", "hueThreshold", hueThreshold.ToString());
                reader.SetValue("atmolight", "hueBlackThreshold", hueBlackThreshold.ToString());
                reader.SetValue("atmolight", "hueSaturation", hueSaturation.ToString());
                reader.SetValueAsBool("atmolight", "hueUseOverallLightness", hueUseOverallLightness);
                reader.SetValueAsBool("atmolight", "blackbarDetectionHorizontal", blackbarDetectionHorizontal);
                reader.SetValueAsBool("atmolight", "blackbarDetectionVertical", blackbarDetectionVertical);
                reader.SetValueAsBool("atmolight", "blackbarDetectionLinkAreas", blackbarDetectionLinkAreas);
                reader.SetValueAsBool("atmolight", "remoteApiServer", remoteApiServer);
                reader.SetValueAsBool("atmolight", "doNotShowConnectionErrorsDuringPlayback", doNotShowConnectionErrorsDuringPlayback);
            }
        }
Beispiel #6
0
        public static void LoadSettings()
        {
            using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Config, "MediaPortal.xml")))
            {
                // Legacy support
                // The effect settings were integers in the past, but now are strings.
                // In order to avoid a lot of people loosing their effect settings during an update,
                // we convert the old settings to the new ones.
                int effectVideoInt;
                if (int.TryParse(reader.GetValueAsString("atmolight", "effectVideo", "MediaPortalLiveMode"), out effectVideoInt))
                {
                    effectVideo = OldIntToNewContentEffect(effectVideoInt);
                    SaveSpecificSetting("effectVideo", effectVideo.ToString());
                }
                else
                {
                    effectVideo = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectVideo", "MediaPortalLiveMode"));
                }

                int effectMusicInt;
                if (int.TryParse(reader.GetValueAsString("atmolight", "effectMusic", "LEDsDisabled"), out effectMusicInt))
                {
                    effectMusic = OldIntToNewContentEffect(effectMusicInt);
                    SaveSpecificSetting("effectMusic", effectMusic.ToString());
                }
                else
                {
                    effectMusic = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectMusic", "LEDsDisabled"));
                }

                int effecRadioInt;
                if (int.TryParse(reader.GetValueAsString("atmolight", "effectRadio", "LEDsDisabled"), out effecRadioInt))
                {
                    effectRadio = OldIntToNewContentEffect(effecRadioInt);
                    SaveSpecificSetting("effectRadio", effectRadio.ToString());
                }
                else
                {
                    effectRadio = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectRadio", "LEDsDisabled"));
                }

                int effectMenuInt;
                if (int.TryParse(reader.GetValueAsString("atmolight", "effectMenu", "LEDsDisabled"), out effectMenuInt))
                {
                    effectMenu = OldIntToNewContentEffect(effectMenuInt);
                    SaveSpecificSetting("effectMenu", effectMenu.ToString());
                }
                else
                {
                    effectMenu = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectMenu", "LEDsDisabled"));
                }

                int effectMPExitInt;
                if (int.TryParse(reader.GetValueAsString("atmolight", "effectMPExit", "LEDsDisabled"), out effectMPExitInt))
                {
                    effectMPExit = OldIntToNewContentEffect(effectMPExitInt == 4 ? 5 : effectMPExitInt);
                    SaveSpecificSetting("effectMPExit", effectMPExit.ToString());
                }
                else
                {
                    effectMPExit = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectMPExit", "LEDsDisabled"));
                }

                currentLanguage = reader.GetValueAsString("atmolight", "currentLanguage", "English");

                // Check for presence of legacy file location (1.7.0.5 or lower)
                currentLanguageFileLegacy = reader.GetValueAsString("atmolight", "currentLanguageFile", "");

                if (!string.IsNullOrEmpty(currentLanguageFileLegacy))
                {
                    if (currentLanguageFileLegacy.Contains("nl.xml"))
                    {
                        currentLanguage = "Dutch";
                    }
                    else if (currentLanguageFileLegacy.Contains("en.xml"))
                    {
                        currentLanguage = "English";
                    }
                    else if (currentLanguageFileLegacy.Contains("fr.xml"))
                    {
                        currentLanguage = "French";
                    }
                    else if (currentLanguageFileLegacy.Contains("de.xml"))
                    {
                        ;
                        currentLanguage = "German";
                    }
                }

                string mediaportalLanguageDir =
                    MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Language) + "\\";

                if (string.IsNullOrEmpty(mediaportalLanguageDir) || !Directory.Exists(mediaportalLanguageDir))
                {
                    mediaportalLanguageDir = @"C:\ProgramData\Team MediaPortal\MediaPortal\Language\";
                }

                try
                {
                    switch (currentLanguage)
                    {
                    case "Dutch":
                        currentLanguageFileLocation = mediaportalLanguageDir + "\\AtmoLight\\nl.xml";
                        break;

                    case "English":
                        currentLanguageFileLocation = mediaportalLanguageDir + "\\AtmoLight\\en.xml";
                        break;

                    case "French":
                        currentLanguageFileLocation = mediaportalLanguageDir + "\\AtmoLight\\fr.xml";
                        break;

                    case "German":
                        currentLanguageFileLocation = mediaportalLanguageDir + "\\AtmoLight\\de.xml";
                        break;
                    }
                }
                catch (Exception ex)
                {
                    Log.Error("Error during LoadSettings");
                    Log.Error(ex.Message);
                    throw;
                }

                // Normal settings loading
                atmowinExe                = reader.GetValueAsString("atmolight", "atmowinexe", "");
                killButton                = reader.GetValueAsInt("atmolight", "killbutton", 4);
                profileButton             = reader.GetValueAsInt("atmolight", "cmbutton", 4);
                menuButton                = reader.GetValueAsInt("atmolight", "menubutton", 4);
                excludeTimeStart          = LoadTimeSetting(reader, "excludeTimeStart", "00:00");
                excludeTimeEnd            = LoadTimeSetting(reader, "excludeTimeEnd", "00:00");
                manualMode                = reader.GetValueAsBool("atmolight", "OffOnStart", false);
                sbs3dOn                   = reader.GetValueAsBool("atmolight", "SBS_3D_ON", false);
                lowCPU                    = reader.GetValueAsBool("atmolight", "lowCPU", false);
                lowCPUTime                = reader.GetValueAsInt("atmolight", "lowCPUTime", 0);
                delay                     = reader.GetValueAsBool("atmolight", "Delay", false);
                delayReferenceRefreshRate = reader.GetValueAsInt("atmolight", "DelayRefreshRate", 0);

                // Legacy reference time
                delayReferenceTime = reader.GetValueAsInt("atmolight", "DelayTime", 0);

                // New reference times
                delayReferenceTime23 = reader.GetValueAsInt("atmolight", "DelayTime23", 0);
                delayReferenceTime24 = reader.GetValueAsInt("atmolight", "DelayTime24", 0);
                delayReferenceTime50 = reader.GetValueAsInt("atmolight", "DelayTime50", 0);
                delayReferenceTime59 = reader.GetValueAsInt("atmolight", "DelayTime59", 0);

                // If all of the specific refresh values are 0, assume upgrade setting from single rate
                if (delayReferenceTime23 == 0 && delayReferenceTime24 == 0 && delayReferenceTime50 == 0 && delayReferenceTime59 == 0)
                {
                    switch (delayReferenceRefreshRate)
                    {
                    case 23:
                        delayReferenceTime23 = delayReferenceTime;
                        break;

                    case 24:
                        delayReferenceTime24 = delayReferenceTime;
                        break;

                    case 50:
                        delayReferenceTime50 = delayReferenceTime;
                        break;

                    case 59:
                        delayReferenceTime59 = delayReferenceTime;
                        break;
                    }
                }
                exitAtmoWin                         = reader.GetValueAsBool("atmolight", "ExitAtmoWin", true);
                startAtmoWin                        = reader.GetValueAsBool("atmolight", "StartAtmoWin", true);
                atmoWakeHelperEnabled               = reader.GetValueAsBool("atmolight", "atmoWakeHelperEnabled", false);
                atmoWakeHelperComPort               = reader.GetValueAsString("atmolight", "atmoWakeHelperComPort", "");
                atmoWakeHelperResumeDelay           = reader.GetValueAsInt("atmolight", "atmoWakeHelperResumeDelay", 2500);
                atmoWakeHelperDisconnectDelay       = reader.GetValueAsInt("atmolight", "atmoWakeHelperDisconnectDelay", 1500);
                atmoWakeHelperConnectDelay          = reader.GetValueAsInt("atmolight", "atmoWakeHelperConnectDelay", 1500);
                atmoWakeHelperReinitializationDelay = reader.GetValueAsInt("atmolight", "atmoWakeHelperReinitializationDelay", 0);
                staticColorRed                      = reader.GetValueAsInt("atmolight", "StaticColorRed", 0);
                staticColorGreen                    = reader.GetValueAsInt("atmolight", "StaticColorGreen", 0);
                staticColorBlue                     = reader.GetValueAsInt("atmolight", "StaticColorBlue", 0);
                restartOnError                      = reader.GetValueAsBool("atmolight", "RestartOnError", true);
                trueGrabbing                        = reader.GetValueAsBool("atmolight", "TrueGrabbing", true);
                blackbarDetection                   = reader.GetValueAsBool("atmolight", "BlackbarDetection", false);
                blackbarDetectionTime               = reader.GetValueAsInt("atmolight", "BlackbarDetectionTime", 1000);
                gifFile                     = reader.GetValueAsString("atmolight", "GIFFile", "");
                captureWidth                = reader.GetValueAsInt("atmolight", "captureWidth", 64);
                captureHeight               = reader.GetValueAsInt("atmolight", "captureHeight", 64);
                monitorScreensaverState     = reader.GetValueAsBool("atmolight", "monitorScreensaverState", true);
                monitorWindowState          = reader.GetValueAsBool("atmolight", "monitorWindowState", true);
                hyperionIP                  = reader.GetValueAsString("atmolight", "hyperionIP", "127.0.0.1");
                hyperionPort                = reader.GetValueAsInt("atmolight", "hyperionPort", 19445);
                hyperionReconnectDelay      = reader.GetValueAsInt("atmolight", "hyperionReconnectDelay", 10000);
                hyperionReconnectAttempts   = reader.GetValueAsInt("atmolight", "hyperionReconnectAttempts", 5);
                hyperionPriority            = reader.GetValueAsInt("atmolight", "hyperionPriority", 1);
                hyperionPriorityStaticColor = reader.GetValueAsInt("atmolight", "hyperionStaticColorPriority", 1);
                hyperionLiveReconnect       = reader.GetValueAsBool("atmolight", "hyperionLiveReconnect", false);
                hueExe             = reader.GetValueAsString("atmolight", "hueExe", "");
                hueStart           = reader.GetValueAsBool("atmolight", "hueStart", true);
                hueIsRemoteMachine = reader.GetValueAsBool("atmolight", "hueIsRemoteMachine", false);
                hueIP                        = reader.GetValueAsString("atmolight", "hueIP", "127.0.0.1");
                huePort                      = reader.GetValueAsInt("atmolight", "huePort", 20123);
                hueReconnectDelay            = reader.GetValueAsInt("atmolight", "hueReconnectDelay", 10000);
                hueReconnectAttempts         = reader.GetValueAsInt("atmolight", "hueReconnectAttempts", 5);
                hueBridgeEnableOnResume      = reader.GetValueAsBool("atmolight", "hueBridgeEnableOnResume", false);
                hueBridgeDisableOnSuspend    = reader.GetValueAsBool("atmolight", "hueBridgeDisableOnSuspend", false);
                hueTheaterEnabled            = reader.GetValueAsBool("atmolight", "hueTheaterEnabled", false);
                hueTheaterRestoreLights      = reader.GetValueAsBool("atmolight", "hueTheaterRestoreLights", false);
                hueTheaterEnabledVU          = reader.GetValueAsBool("atmolight", "hueTheaterEnabledVU", false);
                boblightIP                   = reader.GetValueAsString("atmolight", "boblightIP", "127.0.0.1");
                boblightPort                 = reader.GetValueAsInt("atmolight", "boblightPort", 19333);
                boblightMaxFPS               = reader.GetValueAsInt("atmolight", "boblightMaxFPS", 10);
                boblightMaxReconnectAttempts = reader.GetValueAsInt("atmolight", "boblightMaxReconnectAttempts", 5);
                boblightReconnectDelay       = reader.GetValueAsInt("atmolight", "boblightReconnectDelay", 5000);
                boblightSpeed                = reader.GetValueAsInt("atmolight", "boblightSpeed", 100);
                boblightAutospeed            = reader.GetValueAsInt("atmolight", "boblightAutospeed", 0);
                boblightInterpolation        = reader.GetValueAsBool("atmolight", "boblightInterpolation", true);
                boblightSaturation           = reader.GetValueAsInt("atmolight", "boblightSaturation", 1);
                boblightValue                = reader.GetValueAsInt("atmolight", "boblightValue", 1);
                boblightThreshold            = reader.GetValueAsInt("atmolight", "boblightThreshold", 20);
                boblightGamma                = Double.Parse(reader.GetValueAsString("atmolight", "boblightGamma", "2.2").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
                atmoWinTarget                = reader.GetValueAsBool("atmolight", "atmoWinTarget", true);
                boblightTarget               = reader.GetValueAsBool("atmolight", "boblightTarget", false);
                hueTarget                    = reader.GetValueAsBool("atmolight", "hueTarget", false);
                hyperionTarget               = reader.GetValueAsBool("atmolight", "hyperionTarget", false);
                blackbarDetectionThreshold   = reader.GetValueAsInt("atmolight", "blackbarDetectionThreshold", 20);
                powerModeChangedDelay        = reader.GetValueAsInt("atmolight", "powerModeChangedDelay", 5000);
                ambiBoxTarget                = reader.GetValueAsBool("atmolight", "ambiBoxTarget", false);
                ambiBoxIP                    = reader.GetValueAsString("atmolight", "ambiBoxIP", "127.0.0.1");
                ambiBoxPort                  = reader.GetValueAsInt("atmolight", "ambiBoxPort", 3636);
                ambiBoxMaxReconnectAttempts  = reader.GetValueAsInt("atmolight", "ambiBoxMaxReconnectAttempts", 5);
                ambiBoxReconnectDelay        = reader.GetValueAsInt("atmolight", "ambiBoxReconnectDelay", 5000);
                ambiBoxChangeImageDelay      = reader.GetValueAsInt("atmolight", "ambiBoxChangeImageDelay", 10);
                ambiBoxMediaPortalProfile    = reader.GetValueAsString("atmolight", "ambiBoxMediaPortalProfile", "MediaPortal");
                ambiBoxExternalProfile       = reader.GetValueAsString("atmolight", "ambiBoxExternalProfile", "External");
                ambiBoxPath                  = reader.GetValueAsString("atmolight", "ambiBoxPath", "C:\\Program Files (x86)\\AmbiBox\\AmbiBox.exe");
                ambiBoxAutoStart             = reader.GetValueAsBool("atmolight", "ambiBoxAutoStart", false);
                ambiBoxAutoStop              = reader.GetValueAsBool("atmolight", "ambiBoxAutoStop", false);
                atmoOrbTarget                = reader.GetValueAsBool("atmolight", "atmoOrbTarget", false);
                atmoOrbBlackThreshold        = reader.GetValueAsInt("atmolight", "atmoOrbBlackThreshold", 16);
                atmoOrbBroadcastPort         = reader.GetValueAsInt("atmolight", "atmoOrbBroadcastPort", 49692);
                atmoOrbGamma                 = Double.Parse(reader.GetValueAsString("atmolight", "atmoOrbGamma", "1").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
                atmoOrbMinDiversion          = reader.GetValueAsInt("atmolight", "atmoOrbMinDiversion", 16);
                atmoOrbSaturation            = Double.Parse(reader.GetValueAsString("atmolight", "atmoOrbSaturation", "0.2").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
                atmoOrbThreshold             = reader.GetValueAsInt("atmolight", "atmoOrbThreshold", 0);
                atmoOrbUseOverallLightness   = reader.GetValueAsBool("atmolight", "atmoOrbUseOverallLightness", true);
                atmoOrbUseSmoothing          = reader.GetValueAsBool("atmolight", "atmoOrbUseSmoothing", true);
                atmoOrbSmoothingThreshold    = reader.GetValueAsInt("atmolight", "atmoOrbSmoothingThreshold", 200);

                string   atmoOrbLampTemp      = reader.GetValueAsString("atmolight", "atmoOrbLamps", "");
                string[] atmoOrbLampTempSplit = atmoOrbLampTemp.Split('|');
                for (int i = 0; i < atmoOrbLampTempSplit.Length; i++)
                {
                    if (!string.IsNullOrEmpty(atmoOrbLampTempSplit[i]))
                    {
                        atmoOrbLamps.Add(atmoOrbLampTempSplit[i]);
                    }
                }
                vuMeterMindB                            = reader.GetValueAsInt("atmolight", "vuMeterMindB", -24);
                vuMeterMinHue                           = Double.Parse(reader.GetValueAsString("atmolight", "vuMeterMinHue", "0,74999").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
                vuMeterMaxHue                           = Double.Parse(reader.GetValueAsString("atmolight", "vuMeterMaxHue", "0,95833").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
                hueThreshold                            = reader.GetValueAsInt("atmolight", "hueThreshold", 16);
                hueBlackThreshold                       = reader.GetValueAsInt("atmolight", "hueBlackThreshold", 16);
                hueMinDiversion                         = reader.GetValueAsInt("atmolight", "hueMinDiversion", 16);
                hueSaturation                           = Double.Parse(reader.GetValueAsString("atmolight", "hueSaturation", "0.2").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
                hueUseOverallLightness                  = reader.GetValueAsBool("atmolight", "hueUseOverallLightness", true);
                blackbarDetectionHorizontal             = reader.GetValueAsBool("atmolight", "blackbarDetectionHorizontal", true);
                blackbarDetectionVertical               = reader.GetValueAsBool("atmolight", "blackbarDetectionVertical", true);
                blackbarDetectionLinkAreas              = reader.GetValueAsBool("atmolight", "blackbarDetectionLinkAreas", true);
                remoteApiServer                         = reader.GetValueAsBool("atmolight", "remoteApiServer", false);
                doNotShowConnectionErrorsDuringPlayback = reader.GetValueAsBool("atmolight", "doNotShowConnectionErrorsDuringPlayback", false);
            }
        }
Beispiel #7
0
    public static void LoadSettings()
    {
      using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Config, "MediaPortal.xml")))
      {
        // Legacy support
        // The effect settings were integers in the past, but now are strings.
        // In order to avoid a lot of people loosing their effect settings during an update,
        // we convert the old settings to the new ones.
        int effectVideoInt;
        if (int.TryParse(reader.GetValueAsString("atmolight", "effectVideo", "MediaPortalLiveMode"), out effectVideoInt))
        {
          effectVideo = OldIntToNewContentEffect(effectVideoInt);
          SaveSpecificSetting("effectVideo", effectVideo.ToString());
        }
        else
        {
          effectVideo = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectVideo", "MediaPortalLiveMode"));
        }

        int effectMusicInt;
        if (int.TryParse(reader.GetValueAsString("atmolight", "effectMusic", "LEDsDisabled"), out effectMusicInt))
        {
          effectMusic = OldIntToNewContentEffect(effectMusicInt);
          SaveSpecificSetting("effectMusic", effectMusic.ToString());
        }
        else
        {
          effectMusic = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectMusic", "LEDsDisabled"));
        }

        int effecRadioInt;
        if (int.TryParse(reader.GetValueAsString("atmolight", "effectRadio", "LEDsDisabled"), out effecRadioInt))
        {
          effectRadio = OldIntToNewContentEffect(effecRadioInt);
          SaveSpecificSetting("effectRadio", effectRadio.ToString());
        }
        else
        {
          effectRadio = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectRadio", "LEDsDisabled"));
        }

        int effectMenuInt;
        if (int.TryParse(reader.GetValueAsString("atmolight", "effectMenu", "LEDsDisabled"), out effectMenuInt))
        {
          effectMenu = OldIntToNewContentEffect(effectMenuInt);
          SaveSpecificSetting("effectMenu", effectMenu.ToString());
        }
        else
        {
          effectMenu = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectMenu", "LEDsDisabled"));
        }

        int effectMPExitInt;
        if (int.TryParse(reader.GetValueAsString("atmolight", "effectMPExit", "LEDsDisabled"), out effectMPExitInt))
        {
          effectMPExit = OldIntToNewContentEffect(effectMPExitInt == 4 ? 5 : effectMPExitInt);
          SaveSpecificSetting("effectMPExit", effectMPExit.ToString());
        }
        else
        {
          effectMPExit = (ContentEffect)Enum.Parse(typeof(ContentEffect), reader.GetValueAsString("atmolight", "effectMPExit", "LEDsDisabled"));
        }

        currentLanguageFile = reader.GetValueAsString("atmolight", "CurrentLanguageFile", Win32API.GetSpecialFolder(Win32API.CSIDL.CSIDL_COMMON_APPDATA) + "\\Team MediaPortal\\MediaPortal\\language\\AtmoLight\\en.xml");
        if (currentLanguageFile.Substring(currentLanguageFile.Length - 3, 3).ToLower() == "lng")
        {
          int lastBackslash = currentLanguageFile.LastIndexOf("\\") + 1;
          int lastDot = currentLanguageFile.LastIndexOf(".");

          switch (currentLanguageFile.Substring(lastBackslash, lastDot - lastBackslash))
          {
            case "GermanDE":
              currentLanguageFile = Win32API.GetSpecialFolder(Win32API.CSIDL.CSIDL_COMMON_APPDATA) + "\\Team MediaPortal\\MediaPortal\\language\\AtmoLight\\de.xml";
              break;
            case "DutchNL":
              currentLanguageFile = Win32API.GetSpecialFolder(Win32API.CSIDL.CSIDL_COMMON_APPDATA) + "\\Team MediaPortal\\MediaPortal\\language\\AtmoLight\\nl.xml";
              break;
            case "FrenchFR":
              currentLanguageFile = Win32API.GetSpecialFolder(Win32API.CSIDL.CSIDL_COMMON_APPDATA) + "\\Team MediaPortal\\MediaPortal\\language\\AtmoLight\\fr.xml";
              break;
            default:
            case "EnglishUS":
              currentLanguageFile = Win32API.GetSpecialFolder(Win32API.CSIDL.CSIDL_COMMON_APPDATA) + "\\Team MediaPortal\\MediaPortal\\language\\AtmoLight\\en.xml";
              break;
          }
        }
        
        // Normal settings loading
        atmowinExe = reader.GetValueAsString("atmolight", "atmowinexe", "");
        killButton = reader.GetValueAsInt("atmolight", "killbutton", 4);
        profileButton = reader.GetValueAsInt("atmolight", "cmbutton", 4);
        menuButton = reader.GetValueAsInt("atmolight", "menubutton", 4);
        excludeTimeStart = LoadTimeSetting(reader, "excludeTimeStart", "00:00");
        excludeTimeEnd = LoadTimeSetting(reader, "excludeTimeEnd", "00:00");
        manualMode = reader.GetValueAsBool("atmolight", "OffOnStart", false);
        sbs3dOn = reader.GetValueAsBool("atmolight", "SBS_3D_ON", false);
        lowCPU = reader.GetValueAsBool("atmolight", "lowCPU", false);
        lowCPUTime = reader.GetValueAsInt("atmolight", "lowCPUTime", 0);
        delay = reader.GetValueAsBool("atmolight", "Delay", false);
        delayReferenceTime = reader.GetValueAsInt("atmolight", "DelayTime", 0);
        exitAtmoWin = reader.GetValueAsBool("atmolight", "ExitAtmoWin", true);
        startAtmoWin = reader.GetValueAsBool("atmolight", "StartAtmoWin", true);
        atmoWakeHelperEnabled = reader.GetValueAsBool("atmolight", "atmoWakeHelperEnabled", false);
        atmoWakeHelperComPort = reader.GetValueAsString("atmolight", "atmoWakeHelperComPort", "");
        atmoWakeHelperResumeDelay = reader.GetValueAsInt("atmolight", "atmoWakeHelperResumeDelay", 2500);
        atmoWakeHelperDisconnectDelay = reader.GetValueAsInt("atmolight", "atmoWakeHelperDisconnectDelay", 1500);
        atmoWakeHelperConnectDelay = reader.GetValueAsInt("atmolight", "atmoWakeHelperConnectDelay", 1500);
        atmoWakeHelperReinitializationDelay = reader.GetValueAsInt("atmolight", "atmoWakeHelperReinitializationDelay", 0);
        staticColorRed = reader.GetValueAsInt("atmolight", "StaticColorRed", 0);
        staticColorGreen = reader.GetValueAsInt("atmolight", "StaticColorGreen", 0);
        staticColorBlue = reader.GetValueAsInt("atmolight", "StaticColorBlue", 0);
        restartOnError = reader.GetValueAsBool("atmolight", "RestartOnError", true);
        trueGrabbing = reader.GetValueAsBool("atmolight", "TrueGrabbing", true);
        delayReferenceRefreshRate = reader.GetValueAsInt("atmolight", "DelayRefreshRate", 50);
        blackbarDetection = reader.GetValueAsBool("atmolight", "BlackbarDetection", false);
        blackbarDetectionTime = reader.GetValueAsInt("atmolight", "BlackbarDetectionTime", 1000);
        gifFile = reader.GetValueAsString("atmolight", "GIFFile", "");
        captureWidth = reader.GetValueAsInt("atmolight", "captureWidth", 64);
        captureHeight = reader.GetValueAsInt("atmolight", "captureHeight", 64);
        monitorScreensaverState = reader.GetValueAsBool("atmolight", "monitorScreensaverState", true);
        monitorWindowState = reader.GetValueAsBool("atmolight", "monitorWindowState", true);
        hyperionIP = reader.GetValueAsString("atmolight", "hyperionIP", "127.0.0.1");
        hyperionPort = reader.GetValueAsInt("atmolight", "hyperionPort", 19445);
        hyperionReconnectDelay = reader.GetValueAsInt("atmolight", "hyperionReconnectDelay", 10000);
        hyperionReconnectAttempts = reader.GetValueAsInt("atmolight", "hyperionReconnectAttempts", 5);
        hyperionPriority = reader.GetValueAsInt("atmolight", "hyperionPriority", 1);
        hyperionPriorityStaticColor = reader.GetValueAsInt("atmolight", "hyperionStaticColorPriority", 1);
        hyperionLiveReconnect = reader.GetValueAsBool("atmolight", "hyperionLiveReconnect", false);
        hueExe = reader.GetValueAsString("atmolight", "hueExe", "");
        hueStart = reader.GetValueAsBool("atmolight", "hueStart", true);
        hueIsRemoteMachine = reader.GetValueAsBool("atmolight", "hueIsRemoteMachine", false);
        hueIP = reader.GetValueAsString("atmolight", "hueIP", "127.0.0.1");
        huePort = reader.GetValueAsInt("atmolight", "huePort", 20123);
        hueReconnectDelay = reader.GetValueAsInt("atmolight", "hueReconnectDelay", 10000);
        hueReconnectAttempts = reader.GetValueAsInt("atmolight", "hueReconnectAttempts", 5);
        hueBridgeEnableOnResume = reader.GetValueAsBool("atmolight", "hueBridgeEnableOnResume", false);
        hueBridgeDisableOnSuspend = reader.GetValueAsBool("atmolight", "hueBridgeDisableOnSuspend", false);
        hueTheaterEnabled = reader.GetValueAsBool("atmolight", "hueTheaterEnabled", false);
        hueTheaterRestoreLights = reader.GetValueAsBool("atmolight", "hueTheaterRestoreLights", false);
        boblightIP = reader.GetValueAsString("atmolight", "boblightIP", "127.0.0.1");
        boblightPort = reader.GetValueAsInt("atmolight", "boblightPort", 19333);
        boblightMaxFPS = reader.GetValueAsInt("atmolight", "boblightMaxFPS", 10);
        boblightMaxReconnectAttempts = reader.GetValueAsInt("atmolight", "boblightMaxReconnectAttempts", 5);
        boblightReconnectDelay = reader.GetValueAsInt("atmolight", "boblightReconnectDelay", 5000);
        boblightSpeed = reader.GetValueAsInt("atmolight", "boblightSpeed", 100);
        boblightAutospeed = reader.GetValueAsInt("atmolight", "boblightAutospeed", 0);
        boblightInterpolation = reader.GetValueAsBool("atmolight", "boblightInterpolation", true);
        boblightSaturation = reader.GetValueAsInt("atmolight", "boblightSaturation", 1);
        boblightValue = reader.GetValueAsInt("atmolight", "boblightValue", 1);
        boblightThreshold = reader.GetValueAsInt("atmolight", "boblightThreshold", 20);
        boblightGamma = Double.Parse(reader.GetValueAsString("atmolight", "boblightGamma", "2.2").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
        atmoWinTarget = reader.GetValueAsBool("atmolight", "atmoWinTarget", true);
        boblightTarget = reader.GetValueAsBool("atmolight", "boblightTarget", false);
        hueTarget = reader.GetValueAsBool("atmolight", "hueTarget", false);
        hyperionTarget = reader.GetValueAsBool("atmolight", "hyperionTarget", false);
        blackbarDetectionThreshold = reader.GetValueAsInt("atmolight", "blackbarDetectionThreshold", 20);
        powerModeChangedDelay = reader.GetValueAsInt("atmolight", "powerModeChangedDelay", 5000);
        ambiBoxTarget = reader.GetValueAsBool("atmolight", "ambiBoxTarget", false);
        ambiBoxIP = reader.GetValueAsString("atmolight", "ambiBoxIP", "127.0.0.1");
        ambiBoxPort = reader.GetValueAsInt("atmolight", "ambiBoxPort", 3636);
        ambiBoxMaxReconnectAttempts = reader.GetValueAsInt("atmolight", "ambiBoxMaxReconnectAttempts", 5);
        ambiBoxReconnectDelay = reader.GetValueAsInt("atmolight", "ambiBoxReconnectDelay", 5000);
        ambiBoxMediaPortalProfile = reader.GetValueAsString("atmolight", "ambiBoxMediaPortalProfile", "MediaPortal");
        ambiBoxExternalProfile = reader.GetValueAsString("atmolight", "ambiBoxExternalProfile", "External");
        ambiBoxPath = reader.GetValueAsString("atmolight", "ambiBoxPath", "C:\\Program Files (x86)\\AmbiBox\\AmbiBox.exe");
        ambiBoxAutoStart = reader.GetValueAsBool("atmolight", "ambiBoxAutoStart", false);
        ambiBoxAutoStop = reader.GetValueAsBool("atmolight", "ambiBoxAutoStop", false);
        atmoOrbTarget = reader.GetValueAsBool("atmolight", "atmoOrbTarget", false);
        atmoOrbBlackThreshold = reader.GetValueAsInt("atmolight", "atmoOrbBlackThreshold", 16);
        atmoOrbBroadcastPort = reader.GetValueAsInt("atmolight", "atmoOrbBroadcastPort", 49692);
        atmoOrbGamma = Double.Parse(reader.GetValueAsString("atmolight", "atmoOrbGamma", "1").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
        atmoOrbMinDiversion = reader.GetValueAsInt("atmolight", "atmoOrbMinDiversion", 16);
        atmoOrbSaturation = Double.Parse(reader.GetValueAsString("atmolight", "atmoOrbSaturation", "0.2").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
        atmoOrbThreshold = reader.GetValueAsInt("atmolight", "atmoOrbThreshold", 0);
        atmoOrbUseOverallLightness = reader.GetValueAsBool("atmolight", "atmoOrbUseOverallLightness", true);
        string atmoOrbLampTemp = reader.GetValueAsString("atmolight", "atmoOrbLamps", "");
        string[] atmoOrbLampTempSplit = atmoOrbLampTemp.Split('|');
        for (int i = 0; i < atmoOrbLampTempSplit.Length; i++)
        {
          if (!string.IsNullOrEmpty(atmoOrbLampTempSplit[i]))
          {
            atmoOrbLamps.Add(atmoOrbLampTempSplit[i]);
          }
        }
        vuMeterMindB = reader.GetValueAsInt("atmolight", "vuMeterMindB", -24);
        vuMeterMinHue = Double.Parse(reader.GetValueAsString("atmolight", "vuMeterMinHue", "0,74999").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
        vuMeterMaxHue = Double.Parse(reader.GetValueAsString("atmolight", "vuMeterMaxHue", "0,95833").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
        hueThreshold = reader.GetValueAsInt("atmolight", "hueThreshold", 16);
        hueBlackThreshold = reader.GetValueAsInt("atmolight", "hueBlackThreshold", 16);
        hueMinDiversion = reader.GetValueAsInt("atmolight", "hueMinDiversion", 16);
        hueSaturation = Double.Parse(reader.GetValueAsString("atmolight", "hueSaturation", "0.2").Replace(",", "."), CultureInfo.InvariantCulture.NumberFormat);
        hueUseOverallLightness = reader.GetValueAsBool("atmolight", "hueUseOverallLightness", true);
        blackbarDetectionHorizontal = reader.GetValueAsBool("atmolight", "blackbarDetectionHorizontal", true);
        blackbarDetectionVertical = reader.GetValueAsBool("atmolight", "blackbarDetectionVertical", true);
        blackbarDetectionLinkAreas = reader.GetValueAsBool("atmolight", "blackbarDetectionLinkAreas", true);
        remoteApiServer = reader.GetValueAsBool("atmolight", "remoteApiServer", false);
      }
    }