static void Main() { //DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true; WindowsFormsSettings.DefaultFont = new System.Drawing.Font("Segoe UI", 9); WindowsFormsSettings.ScrollUIMode = ScrollUIMode.Desktop; UserLookAndFeel.Default.SetSkinStyle(SettingsStore.Default.SelectedThemeName); WindowsFormsSettings.FormThickBorder = true; if (UserLookAndFeel.Default.SkinName == "The Bezier") { if (string.IsNullOrEmpty(SettingsStore.Default.SelectedPaletteName)) { SettingsStore.Default.SelectedPaletteName = "Gloom Gloom"; } var skin = CommonSkins.GetSkin(UserLookAndFeel.Default); DevExpress.Utils.Svg.SvgPalette pallete = skin.CustomSvgPalettes[SettingsStore.Default.SelectedPaletteName]; skin.SvgPalettes[Skin.DefaultSkinPaletteName].SetCustomPalette(pallete); LookAndFeelHelper.ForceDefaultLookAndFeelChanged(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(true); WindowsFormsSettings.ForceDirectXPaint(); Application.Run(new MainForm()); }
static void Main() { DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true; //SettingsStore.ApplicationDirectory = Path.GetDirectoryName(Application.ExecutablePath); WindowsFormsSettings.DefaultFont = new System.Drawing.Font("Segoe UI", 9); WindowsFormsSettings.ScrollUIMode = ScrollUIMode.Desktop; UserLookAndFeel.Default.SetSkinStyle(SettingsStore.Default.SelectedThemeName); WindowsFormsSettings.FormThickBorder = true; if (UserLookAndFeel.Default.SkinName == "The Bezier") { if (string.IsNullOrEmpty(SettingsStore.Default.SelectedPaletteName)) { SettingsStore.Default.SelectedPaletteName = "VS Light"; } var skin = CommonSkins.GetSkin(UserLookAndFeel.Default); DevExpress.Utils.Svg.SvgPalette pallete = skin.CustomSvgPalettes[SettingsStore.Default.SelectedPaletteName]; skin.SvgPalettes[Skin.DefaultSkinPaletteName].SetCustomPalette(pallete); LookAndFeelHelper.ForceDefaultLookAndFeelChanged(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(true); WindowsFormsSettings.ForceDirectXPaint(); ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; CheckShowApiKeysForm(); //Settings Ticker.UseHtmlString = false; Application.Run(new MainForm()); }
public static void SavePalette(XafApplication application) { var model = (IModelApplicationOptionsSkinSvg)application.Model.Options; var commonSkin = CommonSkins.GetSkin(UserLookAndFeel.Default); DevExpress.Utils.Svg.SvgPalette customPallete = commonSkin.SvgPalettes[Skin.DefaultSkinPaletteName].CustomPalette; var name = commonSkin.CustomSvgPalettes.FirstOrDefault(x => x.Value == customPallete).Key?.Name; model.Palette = name; }
private void LoadSkin() { WindowsFormsSettings.DefaultLookAndFeel.SkinName = Properties.Settings.Default.SkinName; var paletteName = Properties.Settings.Default.SkinPalette; if (!string.IsNullOrWhiteSpace(paletteName)) { var skin = CommonSkins.GetSkin(UserLookAndFeel.Default); DevExpress.Utils.Svg.SvgPalette palette = skin.CustomSvgPalettes[paletteName]; skin.SvgPalettes[Skin.DefaultSkinPaletteName].SetCustomPalette(palette); LookAndFeelHelper.ForceDefaultLookAndFeelChanged(); } }
public Form1() { InitializeComponent(); UserLookAndFeel.Default.SkinName = Settings.Default["ApplicationSkinName"].ToString(); var skin = CommonSkins.GetSkin(UserLookAndFeel.Default); DevExpress.Utils.Svg.SvgPalette fireBall = skin.CustomSvgPalettes[Settings.Default["ApplicationPalletName"].ToString()]; skin.SvgPalettes[Skin.DefaultSkinPaletteName].SetCustomPalette(fireBall); LookAndFeelHelper.ForceDefaultLookAndFeelChanged(); FormClosing += (s, e) => { Settings.Default["ApplicationSkinName"] = UserLookAndFeel.Default.SkinName; Settings.Default["ApplicationPalletName"] = UserLookAndFeel.Default.ActiveSvgPaletteName; Settings.Default.Save(); }; }
public static void RestorePalette(XafApplication application) { var model = (IModelApplicationOptionsSkinSvg)application.Model.Options; if (model.Palette == null) { return; } var skin = CommonSkins.GetSkin(UserLookAndFeel.Default); DevExpress.Utils.Svg.SvgPalette palette = skin.CustomSvgPalettes[model.Palette]; if (palette != null) { skin.SvgPalettes[Skin.DefaultSkinPaletteName].SetCustomPalette(palette); LookAndFeelHelper.ForceDefaultLookAndFeelChanged(); } }