예제 #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            //#if DEBUG
            //            System.Diagnostics.Debugger.Launch();
            //#endif
            Log.LogLevel = Bierstrichler.Properties.Settings.Default.LogLevel;
            FrameworkElement.LanguageProperty.OverrideMetadata(
                typeof(FrameworkElement),
                new FrameworkPropertyMetadata(
                XmlLanguage.GetLanguage(
                CultureInfo.CurrentCulture.IetfLanguageTag))
            );
            StatusBar = new StatusBarViewModel(new Views.StatusBar());
            if (Bierstrichler.Properties.Settings.Default.LoggedInUsers == null)
                Bierstrichler.Properties.Settings.Default.LoggedInUsers = new System.Collections.Specialized.StringCollection();

            LoadFiles();
            MailScheduler.Setup();
            if(!UpdateIfNeccessary())
                ShowLogin();
        }
예제 #2
0
 internal static void StartApplicationMainWindow()
 {
     MainWindow mw = new MainWindow();
     MainWindowViewModel = new MainWindowViewModel(mw);
     StatusBar = MainWindowViewModel.StatusBar;
     StatusBar.CurrentUser = CurrentVendor.Name;
     DashBoard = new DashBoard(Persons);
     MainWindowViewModel.CreateDashList(DashBoard);
     MainWindowViewModel.CreateQuestionList(Questions);
     BeerCharts.UpdateCharts();
     QuestionMaster.Reset();
     mw.Show();
     App.Current.ShutdownMode = ShutdownMode.OnLastWindowClose;
 }