Ejemplo n.º 1
0
        private void rescan()
        {
            PSWindows ps = new PSWindows();

            if (!ps.scan())
            {
                MessageBox.Show("There was an error scanning the processes.",
                                "Scan processes",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
            }
            else
            {
                lvProcessWindows.Groups.Clear();
                lvProcessWindows.BeginUpdate();

                foreach (string key in ps.mProcesses.Keys)
                {
                    if (mExistingProcesses.ContainsKey(key))
                    {
                        continue;
                    }

                    ListViewGroup grp = lvProcessWindows.Groups.Add(key, key);
                    grp.Tag = ps.mProcesses[key];
                }

                lvProcessWindows.EndUpdate();
            }
        }
Ejemplo n.º 2
0
        private void refreshMapping()
        {
            stopTimers();

            //populate currently running processes
            mProcessSnapshot.scan();

            //populate currently running processes
            refreshProcessList();

            //highlight those which are mapped
            mapProcessList();

            //sort
            ListViewColumnSorter sorter = (ListViewColumnSorter)lvProcesses.ListViewItemSorter;

            sorter.SortColumn = 0;
            sorter.Order      = SortOrder.Ascending;
            lvProcesses.Sort();

            startTimers();
        }