示例#1
0
 public void updateContextMenu(L2Watcher watcher)
 {
     this.Invoke(new Action(() =>
     {
         contextProcessSelector.Items.Clear();
     }));
     if (watcher.processes.Count > 0)
     {
         foreach (Process process in watcher.processes.Values)
         {
             this.Invoke(new Action(() =>
             {
                 ToolStripItem item = contextProcessSelector.Items.Add(process.StartTime.ToLongTimeString(), PrettyClick.Properties.Resources.Lineage_II, new EventHandler(onContextClicked));
                 item.Tag = process.Id;
             }));
         }
     }
     else
     {
         this.Invoke(new Action(() =>
         {
             ToolStripItem item = contextProcessSelector.Items.Add("Запущенных процессов не найдено");
             item.Enabled = false;
         }));
     }
 }
示例#2
0
文件: NewForm.cs 项目: rkbrth/rkbrth
 private void NewForm_Load(object sender, EventArgs e)
 {
     watcher = new L2Watcher("L2.bin");
     watcher.Add += watcher_Add;
     watcher.Remove += watcher_Remove;
 }
示例#3
0
文件: MainForm.cs 项目: rkbrth/rkbrth
 private void Form2_Load(object sender, EventArgs e)
 {
     watcher = new L2Watcher("L2.bin");
     this.processControl1.watcher = watcher;
 }