コード例 #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            SetupNLog();
            DataContext.OutputPane.Initialize();
            CreateUserDirectories();

            try
            {
                //Invoke getter, will never be null
                if (ConfigHost.Instance == null)
                {
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.InnerException?.Message ?? ex.Message, "FATAL ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
                Shutdown(ExitCodes.ConfigError);
                return;
            }

            // set language before displaying any ui
            LanguageManager.SetDisplayLanguage();

            var dc  = new SplashScreenDataContext();
            var dlg = new SplashScreen(dc);

            dlg.Show();
        }
コード例 #2
0
 public SplashScreen(SplashScreenDataContext dc)
 {
     this.DataContext = dc;
     this.InitializeComponent();
 }