예제 #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 ChangeSkin(string Name, string Color)
 {
     Settings.Skin.Dispose();
     Settings.Skin = WindowBorderSkinProvider.LoadTheme(SkinList.Text, SkinColorList.Text);
     RebuildColorsLists();
     ReBuildSkinGroups();
 }
예제 #3
0
        public ExcludedWindow(string exclusionName, string processName, string classNames, string skinName, string colorSchemeName, bool hasSkin)
        {
            ExclusionName = exclusionName;
            ProcessName   = processName.ToLower();

            ClassNames = classNames;

            SkinName        = skinName;
            ColorSchemeName = colorSchemeName;
            HasSkin         = hasSkin;
            if (hasSkin)
            {
                Skin = WindowBorderSkinProvider.LoadTheme(skinName, colorSchemeName);
            }
        }