private void ExpandNode(object sender, TreeNode src) { if (((Control)sender).InvokeRequired) { ChangeNodeCallback d = new ChangeNodeCallback(ExpandNode); this.Invoke(d, new object[] { sender, src }); } else { PlexUtils.populateSubNodes(src, this); } }
private void ClearNodes(object sender, TreeNode src) { if (((Control)sender).InvokeRequired) { ChangeNodeCallback d = new ChangeNodeCallback(ClearNodes); this.Invoke(d, new object[] { sender, src }); } else { Application.DoEvents(); src.Nodes.Clear(); } }
private void ClearNodes(object sender, TreeNode src) { if (((Control)sender).InvokeRequired) { ChangeNodeCallback d = new ChangeNodeCallback(ClearNodes); try { this.Invoke(d, new object[] { sender, src }); } catch { } } else { src.Nodes.Clear(); } }