Example #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            BusinessContext.SetWebParameter(false);

            LoggerConfiguration.Configurate();

            string pathUpdater = Path.Combine(Directory.GetParent(Environment.CurrentDirectory).FullName,
                                              "Updater/AIS_Enterprise_Updater.exe");

            if (File.Exists(pathUpdater))
            {
                if (!Process.GetProcessesByName("AIS_Enterprise_Updater").Any())
                {
                    Process.Start(pathUpdater);
                }
            }

            //Database.SetInitializer(new MigrateDatabaseToLatestVersion<DataContext, Configuration>());

            HelperMethods.ShowView(new MainViewModel(), new MainView());
        }