public void OnIconIdChanged(string oldIconId, string newIconId)
 {
     //
     for (int i = 0; i < Nodes.Count; i++)
     {
         TreeNodeWixShortcutCollection tnic = Nodes[i] as TreeNodeWixShortcutCollection;
         if (tnic != null)
         {
             if (tnic.NextLevelLoaded)
             {
                 foreach (TreeNode tn in tnic.Nodes)
                 {
                     TreeNodeWixShortcut tnwi = tn as TreeNodeWixShortcut;
                     if (tnwi != null)
                     {
                         if (string.CompareOrdinal(oldIconId, tnwi.ShortcutNode.Icon) == 0)
                         {
                             tnwi.ShortcutNode.Icon = newIconId;
                         }
                     }
                 }
             }
             break;
         }
     }
     _rootNode.OnIconIdChanged(oldIconId, newIconId);
 }
        private void mnu_removeShortcut(object sender, EventArgs e)
        {
            TreeViewWix tv = this.TreeView as TreeViewWix;
            Form        f  = null;

            if (this.TreeView != null)
            {
                f = this.TreeView.FindForm();
            }
            if (MessageBox.Show(f, "Do you want to remove this shortcut from the setup?", "Remove Shortcut", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                TreeNodeWixShortcutCollection ip = this.Parent as TreeNodeWixShortcutCollection;
                WixShortcut ico = ShortcutNode;
                XmlNode     p   = ico.XmlData.ParentNode;
                p.RemoveChild(ico.XmlData);
                ip.ShortcutNodes.Shortcuts.Remove(ico);
                this.Remove();
                if (tv != null)
                {
                    tv.OnPropertyValueChanged();
                }
            }
        }