public void LoadLogInPage()
 {
     if (!LoggedUser.isLogged)
     {
         IWindowManager manager   = new WindowManager();
         LogInViewModel logInView = new LogInViewModel();
         bool?          result    = manager.ShowDialog(logInView, null, null);
         if (result == true)
         {
             ChangeVisibilty();
             ChangeLogInButtonContent();
         }
     }
     else
     {
         if (LogInViewModel.LogOut())
         {
             ActiveItem = new BlankViewModel();
             ChangeVisibilty();
             ChangeLogInButtonContent();
             IWindowManager manager   = new WindowManager();
             LogInViewModel logInView = new LogInViewModel();
             bool?          result    = manager.ShowDialog(logInView, null, null);
             if (result == true)
             {
                 ChangeVisibilty();
                 ChangeLogInButtonContent();
             }
         }
     }
 }
        protected override void OnViewLoaded(object view)
        {
            if (!context.Database.Exists())
            {
                IWindowManager            manager            = new WindowManager();
                DBInitializationViewModel dbInitializingView = new DBInitializationViewModel(context);
                bool?result2 = manager.ShowDialog(dbInitializingView, null, null);
            }

            IWindowManager manager2  = new WindowManager();
            LogInViewModel logInView = new LogInViewModel();
            bool?          result    = manager2.ShowDialog(logInView, null, null);

            if (result == true)
            {
                ChangeVisibilty();
                ChangeLogInButtonContent();
                ActiveItem = new EventReadOnlyGridViewModel();
            }
            else
            {
                ActiveItem = new BlankViewModel();
            }
        }