/// <summary> /// Expands the item to display any child items. /// </summary> public virtual void Expand() // Aulofee customization - start. Made method virtual. Custo end { if (_expanded) { return; } if (_listView != null) { TreeListViewCancelEventArgs e = new TreeListViewCancelEventArgs(null, this); _listView.OnItemExpanding(e); if (e.Cancel) { return; } } _expanded = true; if (_items != null && _items.Count > 0) { _listView.RecalculateItemPositions(this); } else { _listView.Invalidate(); } if (_listView != null) { _listView.OnItemExpanded(new TreeListViewEventArgs(null, this)); } }
internal void Invalidate() { if (m_owner != null) { m_owner.Invalidate(); } }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { object result = base.EditValue(context, provider, value); TreeListView owner = this.Context.Instance as TreeListView; owner.Invalidate(); return(result); }
public FlagUpdateManager(ConcurrentQueue <object> source, TreeListView myTreeView) { stack = new BlockingCollection <object>(source); treeView = myTreeView; Form1 frm = (Form1)treeView.Parent.Parent.Parent; consumer = Task.Run(() => { List <object> accumulator = new List <object>(); foreach (object myObj in stack.GetConsumingEnumerable()) { accumulator.Add(myObj); if (stack.Count == 0) { treeView.Invalidate(); accumulator.Clear(); Thread.Sleep(200); // fist run ok, but now wait a little to build the queue for the next run } } }); }