示例#1
0
        public void InitDownload(ThemeConfig theme)
        {
            ThemeManager.downloadMode = true;
            this.Invoke(new Action(() =>
                                   label1.Text = string.Format(_("Downloading images for '{0}'..."),
                                                               ThemeManager.GetThemeName(theme))));

            imagesZipDest = theme.themeId + "_images.zip";
            themeUris     = CustomAppConfig.GetThemeUriList(theme.themeId).ToList();
            themeUriIndex = 0;
            DownloadNext(theme);
        }
示例#2
0
        public static void Initialize()
        {
            Directory.CreateDirectory("themes");

            defaultThemes = CustomAppConfig.GetDefaultThemes();
            List <string> themeIds = new List <string>();

            foreach (string filePath in Directory.EnumerateFiles("themes", "*.json",
                                                                 SearchOption.AllDirectories))
            {
                string themeId = Path.GetFileName(Path.GetDirectoryName(filePath));

                if (!themeId.StartsWith("."))
                {
                    themeIds.Add(themeId);
                }
            }

            LoadInstalledThemes(themeIds);
        }