private GlDoc CurrentSelectedDoc() { if (treeDocs.SelectedNode == null) { return(null); } Guid doc_guid = Guid.Empty; if (!Guid.TryParse(treeDocs.SelectedNode.Name, out doc_guid)) { return(null); } return(CurrentDocSet.FindDoc(doc_guid)); }