public bool Reload(XmlConfigSync mode) { string fileName = BuildName(false, true); if (fileName == null) { return(false); } //- First save changes if asked for lock (typeof(XmlConfig)) { XmlConfigFile cfgFile = (XmlConfigFile)mXmlDocs [fileName]; if (XmlDoc != null && ((mbXmlModifieds.Contains(XmlDoc) == true && mode != XmlConfigSync.Discard) || mode != XmlConfigSync.ForceSave ) ) { XmlDoc.Save(fileName); mbXmlModifieds.Remove(XmlDoc); return(true); } //- Reload Xml document mbXmlModifieds.Remove(XmlDoc); //- Reload the document cfgFile.Reload(fileName); return(true); } }
public bool Reload (XmlConfigSync mode) { string fileName =BuildName (false, true) ; if ( fileName == null ) return (false) ; //- First save changes if asked for lock (typeof (XmlConfig)) { XmlConfigFile cfgFile =(XmlConfigFile)mXmlDocs [fileName] ; if ( XmlDoc != null && ( (mbXmlModifieds.Contains (XmlDoc) == true && mode != XmlConfigSync.Discard) || mode != XmlConfigSync.ForceSave ) ) { XmlDoc.Save (fileName) ; mbXmlModifieds.Remove (XmlDoc) ; return (true) ; } //- Reload Xml document mbXmlModifieds.Remove (XmlDoc) ; //- Reload the document cfgFile.Reload (fileName) ; return (true) ; } }