public static void LoadThemeEngine() { ProgressIndicator.OnCreate = ProgressIndicatorThemeHelper.ApplyTheme; if (File.Exists(Path.Combine(PluginPaths.InternalSystemConfigPath, "last_style.txt"))) { string file = File.ReadAllText( Path.Combine(PluginPaths.InternalSystemConfigPath, "last_style.txt") ); StyleManager.ApplyThemeFile(file); } }
private void btnLoadStyle_Click(object sender, EventArgs e) { if (cbStyle.SelectedIndex != -1) { StyleManager.ApplyThemeFile( Path.Combine( StylePath, cbStyle.SelectedItem + ".style" ) ); File.WriteAllText( Path.Combine(PluginPaths.InternalSystemConfigPath, "last_style.txt"), Path.Combine( StylePath, cbStyle.SelectedItem + ".style" ) ); } }