public void CloseDocument(Type doctype, string key) { DocumentsDictionary docs = _documents[doctype]; QDockingWindow doc = null; if (docs.TryGetValue(key, out doc)) { doc.Close(); } }