BExplorer.Shell.ShellTreeViewEx.LoadChilds C# (CSharp) Метод

LoadChilds() приватный Метод

private LoadChilds ( ) : void
Результат void
		private void LoadChilds() {
			while (true) {
				//this._ResetEvent.WaitOne();
				var handle = childsQueue.Dequeue();
				TreeNode node = null;
				IntPtr treeHandle = IntPtr.Zero;
				var visible = true;
				//var pidl = IntPtr.Zero;
				this.ShellTreeView?.BeginInvoke((Action)(() => {
					node = TreeNode.FromHandle(ShellTreeView, handle);
					treeHandle = this.ShellTreeView.Handle;
					if (node != null) visible = node.IsVisible;
				}));

				if (!visible) continue;

				if (node?.Nodes?.Count > 0) {
					var childItem = node.Nodes[0];
					if (childItem != null) {
						var nodeHandle = childItem.Handle;

						try {
							var sho = (node.Tag as IListItemEx);
							if (!sho.HasSubFolders) User32.SendMessage(treeHandle, MSG.TVM_DELETEITEM, 0, nodeHandle);
							this.CheckedFroChilds.Add(handle);
						}
						catch (Exception) {
						}
					}
				}
			}
		}