private void OccasionalProgram_Click(object sender, RoutedEventArgs e) { this.Dispatcher.Invoke(() => { AdminPasswordWindow adminPasswordWindow = new AdminPasswordWindow(OccasionalPermission.ProgramLimit); adminPasswordWindow.Tag = "child"; adminPasswordWindow.ShowDialog(); }); }
private void ProcessController_ProgramStartedOccassional(object sender, IProcessEventArgs e) { this.Dispatcher.Invoke(() => { AdminPasswordWindow adminPasswordWindow = new AdminPasswordWindow(OccasionalPermission.ProgramLimit, e.ID); adminPasswordWindow.Tag = "child"; bool?result = adminPasswordWindow.ShowDialog(); if (result == true) { this.LimitedProgramStarted(); } else if (result == false) { this.viewModel.BL.ProcessController.KillProcess(e.ID); } }); }
private void BL_UserLoggedInOccassional(object sender, EventArgs e) { this.Dispatcher.Invoke(() => { AdminPasswordWindow adminPasswordWindow = new AdminPasswordWindow(OccasionalPermission.TimeLimit); adminPasswordWindow.Tag = "child"; bool?result = adminPasswordWindow.ShowDialog(); if (result == true) { this.LimitedUserLoggedIn(); } else if (result == false) { this.viewModel.BL.LogOut(); this.txtUsername.Text = string.Empty; this.pswPassword.Password = string.Empty; } }); }