Ejemplo n.º 1
0
		private bool?  RunLogin (LoginScreen log)
		{
			log = new LoginScreen() { Title = "Login to University Logbook" };
			var _dialogres = log.ShowDialog();
			if (_dialogres == true)
			{
				isAdmin = log.IsAdmin;
				TeachID = log.Teacher;
				return true;
			}
			return false;
		}
Ejemplo n.º 2
0
		public App()
		{
			LoginScreen lgscr = new LoginScreen();
			bool? logout = true;
			while (logout == true)
			{
				MainWindow lw = new MainWindow() {Title="University Logbook"};
				if (RunLogin(lgscr) == true)
				{
					var tmp = new MainWindowVM(isAdmin, TeachID);
					lw.DataContext = tmp;
					logout = lw.ShowDialog();
				}
				else
				{ 
					logout = false;
				}
			}
			this.Shutdown();
		}