Beispiel #1
0
        /// <summary>
        /// Lauches the entry form on startup
        /// </summary>
        /// <param name="e">Arguments of the startup event</param>
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            var currentUser = Authentification.GetCurrentUser();

            if (Authentification.Instance.Authentificated())
            {
                MainViewModel main   = new MainViewModel();
                MainView      window = new View.MainView {
                    DataContext = main
                };
                window.Show();
            }
            else
            {
                LoginViewModel authVm = new LoginViewModel();
                LoginView      authV  = new LoginView();
                authV.Show();
            }
        }