ImageGlass.Theme.Theme.ApplyTheme C# (CSharp) Méthode

ApplyTheme() public méthode

Apply the new theme
public ApplyTheme ( string themePath ) : void
themePath string Đường dẫn đầy đủ của *.igtheme
Résultat void
        public void ApplyTheme(string themePath)
        {
            //Save theme path
            GlobalSetting.SetConfig("Theme", themePath);

            //Save background color
            try
            {
                ImageGlass.Theme.Theme th = new ImageGlass.Theme.Theme(themePath);
                GlobalSetting.SetConfig("BackgroundColor", th.backcolor.ToArgb().ToString());
            }
            catch
            {
                GlobalSetting.SetConfig("BackgroundColor", Color.White.ToArgb().ToString());
            }
        }