private void btnKill_Click(object sender, RoutedEventArgs e) { btnKill.IsEnabled = true; string exename = (string)lstbxProcesses.SelectedValue; service.CloseCustomProcess(parent.getParent().getSelectedClients(), exename); procList.Remove(exename); lstbxProcesses.ItemsSource = null; lstbxProcesses.ItemsSource = procList; parent.ProcessStopped(exename); }
public KillProcessWindow(CustomRun parent) { InitializeComponent(); this.parent = parent; foreach (var client in parent.getParent().getSelectedClients()) { foreach (var temp in service.CompAndProcesseses) { if (temp.computer == client) allProcList.Add(temp.processName); } } procList = new HashSet<string>(allProcList); lstbxProcesses.ItemsSource = procList; }
private void btnKill_Click(object sender, RoutedEventArgs e) { btnKill.IsEnabled = true; var exename = (string)lstbxProcesses.SelectedValue; var threadId = ""; string test1 = exename; foreach (var client in parent.getParent().getSelectedClients()) { foreach (var temp in service.CompAndProcesseses) { if (temp.computer == client && temp.processName == exename) { threadId = temp.threadID; } } } service.KillRemoteProcess(parent.getParent().getSelectedClients(), threadId); procList.Remove(exename); lstbxProcesses.ItemsSource = null; lstbxProcesses.ItemsSource = procList; parent.ProcessStopped(exename); }
public KillProcessWindow(CustomRun parent) { InitializeComponent(); this.parent = parent; foreach (var client in parent.getParent().getSelectedClients()) { foreach (var temp in service.CompAndProcesseses) { if (temp.computer == client) { allProcList.Add(temp.processName); } } } procList = new HashSet <string>(allProcList); lstbxProcesses.ItemsSource = procList; }
public KillProcessWindow(CustomRun parent) { InitializeComponent(); this.parent = parent; List <string> allProcList = new List <string>(); foreach (LabClient client in parent.getParent().getSelectedClients()) { foreach (CompAndProcesses temp in parent.procList) { if (temp.computer == client) { allProcList.AddRange(temp.processes); } } } procList = new HashSet <string>(allProcList); lstbxProcesses.ItemsSource = procList; }