Beispiel #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            _starter = new AppStarter(e.Args);
            //var isConsole = AppStarter.IsConsole();

            var workWindow = _starter.Provider.GetService <MainWindow>();

            workWindow.Show();
            base.OnStartup(e);
        }
Beispiel #2
0
        public Db CreateDbContext(string[] args)
        {
            var contentRoot = AppStarter.GetContentPath(AppStarter.ProjectName, args);
            var dbFileName  = Path.GetFullPath(Path.Combine(contentRoot, AppStarter.DbFileName));
            var conStr      = $"Data Source={dbFileName};";
            var starter     = new AppStarter(args, AppStarter.DbDefaultProvider, conStr, AppStarter.ProjectName, false);
            var db          = starter.Provider.GetRequiredService <Db>();

            return(db);
        }