/// <summary> /// Creates the file. /// </summary> /// <param name="path">The path.</param> /// <param name="name">The name.</param> /// <param name="menuName">Name of the menu.</param> private void CreateFile(string path, string name, string menuName) { string fileDirectory = GetDocumentDirectory(path); string filename = GetDocumentFilename(path, name); Directory.CreateDirectory(fileDirectory); XmlDocument document = new XmlDocument(); CommonXml.GetNode(document, "page/attributes/pagename", EmptyNodeHandling.CreateNew).InnerText = menuName; CommonXml.SaveXmlDocument(filename, document); }
/// <summary> /// Saves the page. /// </summary> /// <param name="page">The page.</param> /// <param name="saveTree">if set to <c>true</c> [save tree].</param> private void SavePage(Page page, bool saveTree) { if (page != null) { string filename = GetDocumentFilename(page.TreeNode); CommonXml.SaveXmlDocument(filename, page.Node.OwnerDocument); if (saveTree) { Save(); } } }
/// <summary> /// Saves the tree. /// </summary> public void Save() { Rebuild(); CommonXml.SaveXmlDocument(_treeFilename, _treeDocument); }