void realHost_ThreadUpdate(ITarget sender, ThreadUpdateEventArgs args) { if (mForm != null && mForm.IsHandleCreated) { mForm.BeginInvoke(new MethodInvoker(delegate() { if (this.ThreadUpdate != null) { this.ThreadUpdate(this, args); } })); } }
void OnThreadUpdate(ThreadUpdateEventArgs args) { if (mForm != null && mForm.IsHandleCreated) { mForm.BeginInvoke(new MethodInvoker(delegate() { if (this.ThreadUpdate != null) { this.ThreadUpdate(this, args); } })); } }
void target_ThreadUpdate(Target sender, ThreadUpdateEventArgs args) { threadListView.BeginUpdate(); threadListView.ListViewItemSorter = null; for (int index = 0; index < threadListView.Items.Count; ) { ListViewItem item = threadListView.Items[index]; if (item.BackColor == Color.LightPink) { threadListView.Items.RemoveAt(index); } else { SetItemForeColor(item, threadListView.ForeColor); SetItemBackColor(item, threadListView.BackColor); ++index; } } foreach (ThreadDetails thread in args.Threads) { ListViewItem item = threadListView.Items[thread.Thread.ToString()]; if (!thread.Valid) { if(item != null) SetItemBackColor(item, Color.LightPink); } else { if (item == null) { item = CreateItem(thread, threadListView.Items.Count, 0); threadListView.Items.Add(item); SetItemBackColor(item, Color.LightBlue); UpdateItem(item, thread, false); } else { UpdateItem(item, thread, true); } } } UpdateStates(); UpdateSorting(); threadListView.EndUpdate(); }
void realHost_ThreadUpdate(ITarget sender, ThreadUpdateEventArgs args) { if (mForm != null && mForm.IsHandleCreated) mForm.BeginInvoke(new MethodInvoker(delegate() { if (this.ThreadUpdate != null) this.ThreadUpdate(this, args); })); }
void OnThreadUpdate(ThreadUpdateEventArgs args) { if (mForm != null && mForm.IsHandleCreated) mForm.BeginInvoke(new MethodInvoker(delegate() { if (this.ThreadUpdate != null) this.ThreadUpdate(this, args); })); }