private void miClose_Click(object sender, RoutedEventArgs e) { if (online.ID == open.Admin.ID) { MessageBoxResult rsltMessageBox = MessageBox.Show("Are you sure you want to close this project?", online.Username, MessageBoxButton.YesNo); switch (rsltMessageBox) { case MessageBoxResult.Yes: open.Active = false; ProjectController.Serialize(); MessageBox.Show("Project Closed!"); this.Hide(); UserMainWindow umw = new UserMainWindow(online); umw.Show(); this.Hide(); break; case MessageBoxResult.No: break; } } else { MessageBox.Show("Only the admin can close the project!"); } }
private void btnBack_Click(object sender, RoutedEventArgs e) { this.Hide(); UserMainWindow umw = new UserMainWindow(this.admin); umw.Show(); this.Close(); }
private void miClose_Click(object sender, RoutedEventArgs e) { MessageBoxResult rsltMessageBox = MessageBox.Show("Are you sure you want to close this task?", online.Username, MessageBoxButton.YesNo); switch (rsltMessageBox) { case MessageBoxResult.Yes: current.Active = false; TaskController.Serialize(); MessageBox.Show("Task Closed!"); this.Hide(); UserMainWindow umw = new UserMainWindow(online); umw.Show(); this.Hide(); break; case MessageBoxResult.No: break; } }
private void btnLogin_Click(object sender, RoutedEventArgs e) { UserController uc = new UserController(); if (uc.LogIn(tbxUsername.Text, pbxPassword.Password) == true) { if (uc.GetUser(tbxUsername.Text).Active == true) { this.Hide(); UserMainWindow umw = new UserMainWindow(uc.GetUser(tbxUsername.Text)); umw.Show(); this.Close(); } else { MessageBox.Show("This user no longer exists!"); } } else { MessageBox.Show("Username and Password do not Match!"); } }