Пример #1
0
 public ProcesyForm()
 {
     InitializeComponent();
     watcher = new Watcher() { ListView = listView1 };
     watcher.LoadSettings();
     backgroundWorker1.RunWorkerAsync();
 }
Пример #2
0
        public static void RefreshProcessesListView(ListView listView, Watcher watcher)
        {
            listView.Items.Clear();

            foreach (ProcessToWatch p in watcher.Processes)
            {
                ListViewItem t = new ListViewItem(p.ToString());
                t.Text = p.ToString();
                t.Name = p.ToString();
                listView.Items.Add(t);
            }
        }
Пример #3
0
 public Form3(Watcher watcher)
     : this()
 {
     this.watcher = watcher;
     Utility.RefreshProcessesListView(listView1, watcher);
 }