コード例 #1
0
        public static void Load()
        {
            foreach (var p in typeof(Settings).GetProperties())
            {
                var    value = SettingsFile.GetValue(SettingsSection, p.Name, "");
                object convertedValue;

                if (p.PropertyType == typeof(LanguageFile))
                {
                    convertedValue = LanguageFile.LoadFromDefault(value);
                }

                else if (p.PropertyType == typeof(WindowBorderSkin))
                {
                    convertedValue = WindowBorderSkinProvider.LoadTheme(value.Split(',')[0], value.Split(',')[1]);
                }

                else if (p.PropertyType == typeof(ExplorerSkin))
                {
                    convertedValue = ExplorerSkin.LoadTheme(value.Split(',')[0], value.Split(',')[1]);
                }

                else
                {
                    convertedValue = Convert.ChangeType(value, p.PropertyType);
                }

                p.SetValue(null, convertedValue, null);
            }

            PropertyChanged += AutoSave;
        }
コード例 #2
0
 public void ChangeExpSkin(string Name, string Color)
 {
     Settings.ExplorerSkin.Dispose();
     Settings.ExplorerSkin = ExplorerSkin.LoadTheme(Name, Color);
     RebuildColorsLists();
     ReBuildSkinGroups();
 }