Example #1
0
        public void addTheme(Theme theme)
        {
            string newName = theme.Name.ToLower();

            if(newName == "dark" || newName == "light")
            {
                return;
            }
            themes.Add(theme);
        }
 public void loadTheme(Theme t)
 {
     txtName.Text = t.Name;
     txtTitleColour.Text = t.Title;
     txtTextColourDefault.Text = t.SideText.DefaultText;
     txtTextColourHover.Text = t.SideText.HoverText;
     txtLeftPanel.Text = t.RectangleSide;
     txtTitleBar.Text = t.RectangleTop;
     txtBackgroundColour.Text = t.Background;
     txtSeperatorColour.Text = t.Seperators;
     txtTab.Text = t.TabSelector;
     txtScrollables.Text = t.Scrollables;
     txtScrollablesHover.Text = t.ScrollersHover;
     txtSliderKnob.Text = t.SliderKnob;
     txtSliderRight.Text = t.SliderRight;
 }
Example #3
0
        public ThemeSystem()
        {
            try
            {
                if (!System.IO.Directory.Exists(Constants.CACHE_PATH))
                {
                    System.IO.Directory.CreateDirectory(Constants.CACHE_PATH);
                }

                if (!System.IO.File.Exists(fileName))
                {
                    System.IO.File.Create(fileName);
                }
            }
            catch { }

            loadDefaultThemes();
            currentTheme = getThemeByName("dark");
            loadThemes();
        }