Account.App.OnStartup C# (CSharp) Метод

OnStartup() защищенный Метод

protected OnStartup ( System.Windows.StartupEventArgs e ) : void
e System.Windows.StartupEventArgs
Результат void
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            //显示初始化提示框
            GuoKun.CustomControls.CustomMessageBox messageBox = new GuoKun.CustomControls.CustomMessageBox("系统正在初始化······");
            messageBox.Show();
            this.DispatcherUnhandledException += App_DispatcherUnhandledException;
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            //加载系统样式
            ResourceDictionary defaultDictionary = new ResourceDictionary()
            {
                Source = new Uri("/GuoKun.Themes;component/Themes/Default.xaml", UriKind.RelativeOrAbsolute),
            };
            this.Resources.MergedDictionaries.Add(defaultDictionary);

            //系统初始化
            BootstrapperConfiguration bootstrapperConfiguration = ConfigurationManager.GetSection("account/bootstrapper") as BootstrapperConfiguration;
            CustomMefBootstrapper<Shell> bootstrapper = new CustomMefBootstrapper<Shell>(bootstrapperConfiguration);
            bootstrapper.Run(true);

            _log = UnityContainerFactory.GetUnityContainer().Resolve<ILog>();

            messageBox.Close();
            Application.Current.MainWindow.Show();
        }