AvalonGUIConfig.settings.Save C# (CSharp) Метод

Save() публичный статический Метод

public static Save ( string section ) : void
section string
Результат void
        public static void Save(string section)
        {
            using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "Avalon.xml")))
            {
                switch (section)
                {
                    #region MovingPictures
                    case settings.cXMLSectionMovingPictures:
                        xmlwriter.SetValue(section, cXMLSettingMovingPicturesView, MovingPicturesConfig.IsDefaultStyle ? 1 : 0);
                        xmlwriter.SetValue(section, cXMLSettingMovingPicturesThumbMod, (int)MovingPicturesConfig.ThumbViewMod);
                        break;
                    #endregion

                    #region TV
                    case settings.cXMLSectionTV:
                        xmlwriter.SetValue(section, cXMLSettingTVMiniGuideSize, (int)TVConfig.TVMiniGuideRowSize);
                        xmlwriter.SetValue(section, cXMLSettingTVGuideSize, (int)TVConfig.TVGuideRowSize);
                        xmlwriter.SetValue(section, cXMLSettingTVHomeLayout, (int)TVConfig.TVHomeLayoutType);
                        break;
                    #endregion

                    #region TVSeries
                    case settings.cXMLSectionTVSeries:
                        xmlwriter.SetValue(section, cXMLSettingTVSeriesView, TVSeriesConfig.IsDefaultStyle ? 1 : 0);
                        xmlwriter.SetValue(section, cXMLSettingTVSeriesWidebannerMod, (int)TVSeriesConfig.widebannerMod);
                        break;
                    #endregion

                    #region Update
                    case settings.cXMLSectionUpdate:
                        xmlwriter.SetValue(section, settings.cXMLSettingUpdateCheckOnStart, AvalonGUIConfig.checkOnStart ? 1 : 0);
                        xmlwriter.SetValue(section, settings.cXMLSettingUpdateCheckForUpdateAt, AvalonGUIConfig.checkForUpdateAt ? 1 : 0);
                        xmlwriter.SetValue(section, settings.cXMLSettingUpdateCheckInterval, AvalonGUIConfig.checkInterval);
                        xmlwriter.SetValue(section, settings.cXMLSettingUpdateCheckTime, AvalonGUIConfig.checkTime.ToShortTimeString());
                        xmlwriter.SetValue(section, settings.cXMLSettingUpdateNextUpdateCheck, AvalonGUIConfig.nextUpdateCheck);
                        xmlwriter.SetValue(section, settings.cXMLSettingUpdateRunPatchUtilityUnattended, AvalonGUIConfig.patchUtilityRunUnattended ? 1 : 0);
                        xmlwriter.SetValue(section, settings.cXMLSettingUpdatePatchUtilityRestartMP, AvalonGUIConfig.patchUtilityRestartMP ? 1 : 0);
                        xmlwriter.SetValue(section, settings.cXMLSettingUpdatePatchAppliedLastRun, AvalonGUIConfig.patchAppliedLastRun ? 1 : 0);
                        break;
                    #endregion

                    #region MyFilms
                    case settings.cXMLSectionMyFilms:
                        xmlwriter.SetValue(section, cXMLSettingMyFilmsView, MyFilmsConfig.IsDefaultStyle ? 1 : 0);
                        xmlwriter.SetValue(section, cXMLSettingMyFilmsThumbMod, (int)MyFilmsConfig.ThumbViewMod);
                        break;
                    #endregion

                    #region Misc
                    case settings.cXMLSectionMisc:
                        xmlwriter.SetValue(section, cXMLSettingMiscHidePoster, MiscConfigGUI.HidePoster ? 1 : 0);
                        xmlwriter.SetValue(section, cXMLSettingMiscShowRSS, MiscConfigGUI.showRSS ? 1 : 0);
                        xmlwriter.SetValue(section, cXMLSettingMiscShowHiddenMenu, MiscConfigGUI.showHiddenMenu ? 1 : 0);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscUnfocusedAlphaListItems, MiscConfigGUI.UnfocusedAlphaListItems);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscUnfocusedAlphaThumbs, MiscConfigGUI.UnfocusedAlphaThumbs);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscUseLargeFonts, MiscConfigGUI.UseLargeFonts ? 1 : 0);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscShow5DayWeather, MiscConfigGUI.showFiveDayWeather ? 1 : 0);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscTrailerSite, MiscConfigGUI.siteUtil);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscTextColor, MiscConfigGUI.TextColor);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscTextColor2, MiscConfigGUI.TextColor2);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscTextColor3, MiscConfigGUI.TextColor3);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscRemoteColor, MiscConfigGUI.RemoteColor);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscWatchedColor, MiscConfigGUI.WatchedColor);
                        xmlwriter.SetValue(section, settings.cXMLSettingMiscUseWeatherInfoservice, MiscConfigGUI.UseWeatherInfoservice ? 1 : 0);
                        break;
                    #endregion

                    #region Video
                    case settings.cXMLSectionVideo:
                        xmlwriter.SetValue(section, cXMLSettingVideoView, VideoConfig.IsDefaultStyle ? 1 : 0);
                        xmlwriter.SetValue(section, cXMLSettingVideoThumbMod, (int)VideoConfig.ThumbViewMod);
                        break;
                    #endregion
                }
            }
        }