public void IncludeItem() { SdsiteXmlDocument doc = Service.Sdsite.CurrentDocument; foreach (BaseTreeNode node in SelectedNodes) { if (node is FileOutsideNode) { doc.IncludeItem(Utility.File.GetXmlDocumentId(((OutsideNode)node).FilePath)); } else if (node is FolderOutsideNode) { doc.IncludeItem(Utility.File.GetXmlDocumentId(((OutsideNode)node).FilePath)); } } }