예제 #1
0
        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);
        }
예제 #2
0
 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;
 }
예제 #3
0
        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);
        }
예제 #4
0
 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;
 }
예제 #5
0
        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;
        }