protected override void OnStartup(StartupEventArgs e) { ExceptionHelper.Initialize(); AppDomain.CurrentDomain.AssemblyResolve += OnCurrentDomainAssemblyResolve; DevAVDataDirectoryHelper.LocalPrefix = "WpfOutlookInspiredApp"; AssemblyResolver.Subcribe(); #if !DXCORE3 ServiceContainer.Default.RegisterService(new ApplicationJumpListService()); #endif Theme.RegisterPredefinedPaletteThemes(); ImagesAssemblyLoader.Load(); Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata(200)); LoadPlugins(); base.OnStartup(e); ViewLocator.Default = new ViewLocator(typeof(App).Assembly); bool exit; singleInstanceApplicationGuard = DevAVDataDirectoryHelper.SingleInstanceApplicationGuard("DevExpressWpfOutlookInspiredApp", out exit); if (exit) { Shutdown(); return; } Theme.TouchlineDark.ShowInThemeSelector = false; ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019Colorful.Name; SetCultureInfo(); }
protected override void OnStartup(StartupEventArgs e) { ExceptionHelper.Initialize(); DevAVDataDirectoryHelper.LocalPrefix = "NextBO"; Theme.RegisterPredefinedPaletteThemes(); ImagesAssemblyLoader.Load(); Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata(200)); base.OnStartup(e); ViewLocator.Default = new ViewLocator(typeof(App).Assembly); bool exit; singleInstanceApplicationGuard = DevAVDataDirectoryHelper.SingleInstanceApplicationGuard("NextBOApp", out exit); if (exit) { Shutdown(); return; } Theme.TouchlineDark.ShowInThemeSelector = false; ApplicationThemeHelper.ApplicationThemeName = string.IsNullOrEmpty(Settings.Default.UserTheme) ? Theme.Office2019Colorful.Name : Settings.Default.UserTheme; SetCultureInfo(); var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); Configuration = builder.Build(); }
protected override void OnStartup(StartupEventArgs e) { ExceptionHelper.Initialize(); ClearAutomationEventsHelper.IsEnabled = false; AppDomain.CurrentDomain.AssemblyResolve += OnCurrentDomainAssemblyResolve; DevAVDataDirectoryHelper.LocalPrefix = "WpfHybridApp"; #if !DXCORE3 ServiceContainer.Default.RegisterService(new ApplicationJumpListService()); #endif ImagesAssemblyLoader.Load(); Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata(200)); LoadPlugins(); base.OnStartup(e); ViewLocator.Default = new ViewLocator(typeof(App).Assembly); bool exit; singleInstanceApplicationGuard = DevAVDataDirectoryHelper.SingleInstanceApplicationGuard("DevExpressWpfHybridApp", out exit); if (exit) { Shutdown(); return; } ApplicationThemeHelper.ApplicationThemeName = Theme.HybridApp.Name; SetCultureInfo(); SetLocalization(); }
static void Main() { TaskbarAssistant.Default.Initialize(); AppDomain.CurrentDomain.AssemblyResolve += OnCurrentDomainAssemblyResolve; DevAVDataDirectoryHelper.LocalPrefix = "WinOutlookInspiredApp"; // bool exit; using (DevAVDataDirectoryHelper.SingleInstanceApplicationGuard(AppName, out exit)) { if (exit) { return; } // Global Appearance Settings DevExpress.XtraEditors.WindowsFormsSettings.SetDPIAware(); DevExpress.XtraEditors.WindowsFormsSettings.EnableFormSkins(); DevExpress.XtraEditors.WindowsFormsSettings.ForceDirectXPaint(); DevExpress.XtraEditors.WindowsFormsSettings.DefaultLookAndFeel.SetSkinStyle(LookAndFeel.SkinStyle.Office2019Colorful); DevExpress.XtraEditors.WindowsFormsSettings.DefaultRibbonStyle = XtraEditors.DefaultRibbonControlStyle.Office2019; DevExpress.XtraEditors.WindowsFormsSettings.AllowPixelScrolling = Utils.DefaultBoolean.True; DevExpress.Utils.AppearanceObject.DefaultFont = new Font("Segoe UI", AppHelper.GetDefaultSize()); // Global Behavior Settings DevExpress.XtraEditors.WindowsFormsSettings.ScrollUIMode = XtraEditors.ScrollUIMode.Touch; DevExpress.XtraEditors.WindowsFormsSettings.CustomizationFormSnapMode = Utils.Controls.SnapMode.OwnerControl; DevExpress.XtraEditors.WindowsFormsSettings.ColumnFilterPopupMode = XtraEditors.ColumnFilterPopupMode.Excel; DevExpress.XtraEditors.WindowsFormsSettings.AllowSkinEditorAttach = Utils.DefaultBoolean.True; // Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (new StartUpProcess()) { using (StartUpProcess.Status.Subscribe(new DemoStartUp())) { Application.Run(new MainForm()); } } } }