Beispiel #1
0
        /// <summary>
        /// Initializes a new <see cref="App"/>
        /// </summary>
        /// <param name="containerBuilder">An optional <see cref="Container"/></param>
        public App(ContainerBuilder containerBuilder = null)
        {
            this.LogAppStart();
            this.Exit += this.OnExit;
            AppDomain.CurrentDomain.UnhandledException += this.CurrentDomainUnhandledException;
            var splashScreenViewModel = new DXSplashScreenViewModel()
            {
                Title = "DEHP-EcosimPro Adapter", Logo = new Uri($"pack://application:,,,/Resources/logo.png")
            };

            SplashScreenManager.Create(() => new SplashScreen(), splashScreenViewModel).ShowOnStartup();
            containerBuilder ??= new ContainerBuilder();
            RegisterTypes(containerBuilder);
            RegisterViewModels(containerBuilder);
            AppContainer.BuildContainer(containerBuilder);
        }