// private string _fileName = null; /// <summary> /// Creates a new XMind workbook if loadContent is false, otherwise the file content will be loaded. /// </summary> // /// <param name="loadContent">If true, the current data from the file will be loaded, otherwise an empty workbook will be created.</param> internal XMindWorkBook(string name, XMindConfiguration bookConfiguration, IXMindDocumentBuilder builder) { Name = name; _xMindSettings = XMindConfigurationLoader.Configuration.XMindConfigCollection; this._bookConfiguration = bookConfiguration; _documentBuilder = builder; _documentBuilder.CreateMetaFile(); _documentBuilder.CreateManifestFile(); _documentBuilder.CreateContentFile(); _implementation = _documentBuilder.ContentFile.Descendants().First(); _adaptableRegistry = new NodeAdaptableRegistry(_documentBuilder.ContentFile, this); //Create default sheet if needed //TODO: if (DOMUtils.GetFirstElementByTagName(_implementation, TAG_SHEET) == null) { AddSheet(CreateSheet()); } }