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.SetValueAsBool("HyperionScreenCapture", "disableOnStart", DisableOnStart);
         reader.SetValueAsBool("HyperionScreenCapture", "onlyEnableWithMadVr", OnlyEnableWithMadVr);
         reader.SetValue("HyperionScreenCapture", "remoteToggleKey", RemoteToggleKey);
         reader.SetValue("HyperionScreenCapture", "apiPort", ApiPort);
     }
 }
示例#2
0
        /// <summary>
        /// Save changed vars to mediaportal settings file
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SetupForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                UInt16 portCheck = UInt16.Parse(textBoxPort.Text);
                if (portCheck == 0)
                {
                    resetPort();
                }
            }
            catch (Exception)
            {
                resetPort();
            }

            using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
            {
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "port", textBoxPort.Text);
                xmlwriter.SetValueAsBool(WifiRemote.PLUGIN_NAME, "disableBonjour", checkBoxDisableBonjour.Checked);
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "serviceName", textBoxName.Text);
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "username", WifiRemote.EncryptString(txtUsername.Text));
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "password", WifiRemote.EncryptString(txtPassword.Text));
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "passcode", WifiRemote.EncryptString(txtPasscode.Text));
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "auth", cbAuthMethod.SelectedIndex);
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "autologinTimeout", numericUpDownAutologin.Value);
                xmlwriter.SetValueAsBool(WifiRemote.PLUGIN_NAME, "showNotifications", checkBoxShowConnectionMessage.Checked);
                // Save plugins order, custom names and if they should be displayed
                List <string> pluginIdsToSave = new List <String>();

                foreach (WindowPlugin plugin in pluginsDataSource)
                {
                    pluginIdsToSave.Add(plugin.WindowId.ToString());
                    pluginIdsToSave.Add(plugin.Name);

                    // Don't display plugin
                    if (!plugin.DisplayPlugin && !ignoredPluginsList.Contains(plugin.WindowId))
                    {
                        // Plugin disabled, add to ignored plugins list
                        ignoredPluginsList.Add(plugin.WindowId);
                    }
                    else if (plugin.DisplayPlugin && ignoredPluginsList.Contains(plugin.WindowId))
                    {
                        // Plugin not disabled but on disabled list. Remove it.
                        ignoredPluginsList.Remove(plugin.WindowId);
                    }
                }
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "savedPlugins", String.Join("|", pluginIdsToSave.ToArray()));
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "ignoredPlugins", String.Join("|", ignoredPluginsList.ConvertAll <string>(x => x.ToString()).ToArray()));
            }
        }
示例#3
0
 private void btSave_Click(object sender, System.EventArgs e)
 {
     using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
     {
         xmlwriter.SetValue("myLyrics", "useDefaultSitesMode", rdDefault.Checked.ToString());
         xmlwriter.SetValue("myLyrics", "defaultSitesModeValue", trackBar.Value);
         xmlwriter.SetValue("myLyrics", "limit", tbLimit.Text);
         xmlwriter.SetValue("myLyrics", "pluginsName", tbPluginName.Text);
         xmlwriter.SetValue("myLyrics", "useLyricWiki", cbLyricWiki.Checked.ToString());
         xmlwriter.SetValue("myLyrics", "useEvilLabs", cbEvilLabs.Checked.ToString());
         xmlwriter.SetValue("myLyrics", "useLyrics007", cbLyrics007.Checked.ToString());
         xmlwriter.SetValue("myLyrics", "useLyricsOnDemand", cbLyricsOnDemand.Checked.ToString());
         xmlwriter.SetValue("myLyrics", "useSeekLyrics", cbSeekLyrics.Checked.ToString());
         xmlwriter.SetValue("myLyrics", "useHotLyrics", cbHotLyrics.Checked.ToString());
         xmlwriter.SetValueAsBool("myLyrics", "automaticFetch", cbAutoFetch.Checked);
         xmlwriter.SetValueAsBool("myLyrics", "automaticUpdateWhenFirstFound", cbAutomaticUpdate.Checked);
         xmlwriter.SetValueAsBool("myLyrics", "moveLyricFromMarkedDatabase", cbMoveSongFrom.Checked);
     }
 }
示例#4
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("AudioSwitcher", "remoteKeyDialogContextMenu", RemoteKeyDialogContextMenu);
                reader.SetValue("AudioSwitcher", "defaultPlaybackDevice", DefaultPlaybackDevice);

                reader.SetValueAsBool("AudioSwitcher", "LAVbitstreamAlwaysShowToggleInContextMenu", LAVbitstreamAlwaysShowToggleInContextMenu);
                reader.SetValueAsBool("AudioSwitcher", "LAVbitstreamPerDevice", LAVbitstreamPerDevice);
                reader.SetValue("AudioSwitcher", "LAVbitstreamPropertyList", LAVbitstreamPropertyList);

                reader.SetValueAsBool("AudioSwitcher", "LAVaudioDelayControlsInContextMenu", LAVaudioDelayControlsInContextMenu);
                reader.SetValueAsBool("AudioSwitcher", "LAVaudioDelayEnabled", LAVaudioDelayEnabled);
                reader.SetValue("AudioSwitcher", "LAVaudioDelay", LAVaudioDelay);
            }
        }
示例#5
0
        /// <summary>
        /// Save changed vars to mediaportal settings file
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SetupForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                UInt16 portCheck = UInt16.Parse(textBoxPort.Text);
                if (portCheck == 0)
                {
                    resetPort();
                }
            }
            catch (Exception)
            {
                resetPort();
            }

            using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
            {
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "port", textBoxPort.Text);
                xmlwriter.SetValueAsBool(WifiRemote.PLUGIN_NAME, "disableBonjour", checkBoxDisableBonjour.Checked);
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "serviceName", textBoxName.Text);
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "username", WifiRemote.EncryptString(txtUsername.Text));
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "password", WifiRemote.EncryptString(txtPassword.Text));
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "passcode", WifiRemote.EncryptString(txtPasscode.Text));
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "auth", cbAuthMethod.SelectedIndex);
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "autologinTimeout", numericUpDownAutologin.Value);
                xmlwriter.SetValueAsBool(WifiRemote.PLUGIN_NAME, "showNotifications", checkBoxShowConnectionMessage.Checked);
                // Save plugins order, custom names and if they should be displayed
                List<string> pluginIdsToSave = new List<String>();

                foreach (WindowPlugin plugin in pluginsDataSource)
                {
                    pluginIdsToSave.Add(plugin.WindowId.ToString());
                    pluginIdsToSave.Add(plugin.Name);

                    // Don't display plugin
                    if (!plugin.DisplayPlugin && !ignoredPluginsList.Contains(plugin.WindowId))
                    {
                        // Plugin disabled, add to ignored plugins list
                        ignoredPluginsList.Add(plugin.WindowId);
                    }
                    else if (plugin.DisplayPlugin && ignoredPluginsList.Contains(plugin.WindowId))
                    {
                        // Plugin not disabled but on disabled list. Remove it.
                        ignoredPluginsList.Remove(plugin.WindowId);
                    }
                }
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "savedPlugins", String.Join("|", pluginIdsToSave.ToArray()));
                xmlwriter.SetValue(WifiRemote.PLUGIN_NAME, "ignoredPlugins", String.Join("|", ignoredPluginsList.ConvertAll<string>(x => x.ToString()).ToArray()));
            }
        }
示例#6
0
 protected override void OnPageDestroy(int newWindowId)
 {
   LogMyFilms.Debug("MyFilmsDetail.OnPageDestroy(" + newWindowId.ToString() + ") started.");
   if (MyFilms.conf.PersonsEnableDownloads)
   {
     if (downloadingWorker.IsBusy) downloadingWorker.CancelAsync();
     // while (downloadingWorker.IsBusy) System.Windows.Forms.Application.DoEvents();
     // downloadingWorker = null;
     downloadingWorker.ProgressChanged -= new ProgressChangedEventHandler(downloadingWorker_ProgressChanged);
   }
   if (Configuration.CurrentConfig != "")
     Configuration.SaveConfiguration(Configuration.CurrentConfig, MyFilms.conf.StrIndex, MyFilms.conf.StrTIndex);
   using (var xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
   {
     string currentmoduleid = "7986";
     bool currentmodulefullscreen = (GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_TVFULLSCREEN || GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_FULLSCREEN_MUSIC || GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO || GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_FULLSCREEN_TELETEXT);
     string currentmodulefullscreenstate = GUIPropertyManager.GetProperty("#currentmodulefullscreenstate");
     // if MP was closed/hibernated by the use of remote control, we have to retrieve the fullscreen state in an alternative manner.
     if (!currentmodulefullscreen && currentmodulefullscreenstate == "True")
       currentmodulefullscreen = true;
     xmlreader.SetValue("general", "lastactivemodule", currentmoduleid);
     xmlreader.SetValueAsBool("general", "lastactivemodulefullscreen", currentmodulefullscreen);
     LogMyFilms.Debug("SaveLastActiveModule - module {0}", currentmoduleid);
     LogMyFilms.Debug("SaveLastActiveModule - fullscreen {0}", currentmodulefullscreen);
   }
   LogMyFilms.Debug("MyFilms.OnPageDestroy(" + newWindowId + ") completed.");
   base.OnPageDestroy(newWindowId);
 }
示例#7
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);
            }
        }
示例#8
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.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", "CurrentLanguageFile", 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.SetValue("atmolight", "DelayRefreshRate", delayReferenceRefreshRate);
     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.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", "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);
     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);
   }
 }