void shellBrowser_ShellItemUpdate(object sender, ShellItemUpdateEventArgs e)
 {
     if (updating)
     {
         if (this.InvokeRequired)
         {
             Invoke(updateInvoker, sender, e);
         }
         else
         {
             ShellItemUpdateInvoke(sender, e);
         }
     }
 }
        private void ShellItemUpdateInvoke(object sender, ShellItemUpdateEventArgs e)
        {
            switch (e.UpdateType)
            {
            case ShellItemUpdateType.Created:
                #region Created
            {
                if (e.NewItem.IsFolder)
                {
                    ShellItem parent = sender as ShellItem;
                    TreeNode  parentNode;

                    if (folderView.GetTreeNode(parent, out parentNode))
                    {
                        TreeNode newNode = new TreeNode(
                            e.NewItem.Text,
                            e.NewItem.ImageIndex,
                            e.NewItem.SelectedImageIndex);
                        newNode.Tag = e.NewItem;

                        if (e.NewItem.HasSubfolder)
                        {
                            newNode.Nodes.Add(string.Empty);
                        }

                        newNode.Name = newNode.Text;

                        parentNode.Nodes.Add(newNode);
                    }
                }
            }
                #endregion
                break;

            case ShellItemUpdateType.Deleted:
                #region Deleted
            {
                if (e.OldItem.IsFolder)
                {
                    ShellItem parent = sender as ShellItem;
                    TreeNode  parentNode;

                    if (folderView.GetTreeNode(parent, out parentNode))
                    {
                        parentNode.Nodes.RemoveByKey(e.OldItem.Text);
                    }
                }
            }
                #endregion
                break;

            case ShellItemUpdateType.Renamed:
                #region Renamed
            {
                if (e.NewItem.IsFolder)
                {
                    TreeNode node;

                    if (folderView.GetTreeNode(e.NewItem, out node))
                    {
                        node.Text = e.NewItem.Text;
                        node.Name = node.Text;

                        TreeNode parent = node.Parent;
                        parent.Nodes.Remove(node);
                        parent.Nodes.Add(node);
                    }
                }
            }
                #endregion
                break;

            case ShellItemUpdateType.IconChange:
                #region IconChange
            {
                if (e.NewItem.IsFolder)
                {
                    TreeNode node;

                    if (folderView.GetTreeNode(e.NewItem, out node) && node.ImageIndex != e.NewItem.ImageIndex)
                    {
                        node.ImageIndex = e.NewItem.ImageIndex;
                    }
                }
            }
                #endregion
                break;

            case ShellItemUpdateType.MediaChange:
                #region MediaChange
            {
                TreeNode node;
                if (folderView.GetTreeNode(e.NewItem, out node))
                {
                    node.Collapse(true);

                    if (node.Equals(selectedNode) || folderView.IsParentNode(node, selectedNode))
                    {
                        folderView.SelectedNode = node.Parent;
                    }

                    node.Nodes.Clear();
                    node.ImageIndex = e.NewItem.ImageIndex;

                    if (e.NewItem.HasSubfolder)
                    {
                        node.Nodes.Add(string.Empty);
                    }
                }
            }
                #endregion
                break;
            }
        }