public void Save() { //LibSys.StatusBar.Trace("Tools:Save: " + isDirty); if (isDirty) { try { string toolsFilePath = Project.GetMiscPath(Project.TOOLS_FILE_NAME); string seedXml = Project.SEED_XML + "<tools></tools>"; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(seedXml); XmlNode root = xmlDoc.DocumentElement; Project.SetValue(xmlDoc, root, "time", "" + DateTime.Now); foreach (ToolDescr tool in tools) { XmlNode node = tool.ToXml(xmlDoc); root.AppendChild(node); } xmlDoc.Save(toolsFilePath); isDirty = false; } catch (Exception e) { LibSys.StatusBar.Error("Tools:Save() " + e.Message); } } }