1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using System;
- using System.Collections.Generic;
- using System.Windows;
- namespace EfemDualUI
- {
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- public partial class App : Application
- {
- protected override void OnStartup(StartupEventArgs e)
- {
- Dictionary<int, string> StyleList = new Dictionary<int, string>
- {
- {1, "Cyan"},
- {2, "DeepBlue"},
- {3, "GrayBlue"},
- {4, "LightBlue"},
- {5, "lightgreen"},
- {6, "OceanBlue"},
- {7, "SeaBlue"},
- {8, "SkyBlue"},
- {9, "Standard"}
- };
- string ThemeType = StyleList[6];
- //ThemeType = StyleList[1];
- //ThemeType = StyleList[9];
- string[] resources = new[]
- {
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/TextBox.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Button.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/ComboBox.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/MenuItem.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Listview.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/DataGrid.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Tab.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/ListBox.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/TreeView.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/GroupBox.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Scrollbar.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Expander.xaml",
- $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Skin.xaml",
- };
- foreach (var resource in resources)
- {
- Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary()
- {
- Source = new Uri(resource, UriKind.RelativeOrAbsolute)
- });
- }
- FrameworkCompatibilityPreferences.KeepTextBoxDisplaySynchronizedWithTextProperty = false;
- base.OnStartup(e);
- }
- }
- }
|