///////////////////////////////////////////////////////////////////////////// public bool Save(string sFileName) { try { Serializer serializer = new Serializer(true/*bXml*/); string sDocument = serializer.Serialize<Document>(this); if (sDocument == null) return false; DocumentIO docIO = new DocumentIO(); bool bOK = docIO.Open(sFileName, true/*bWriter*/); if (!bOK) return false; docIO.Write(sDocument); docIO.Close(); return true; } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); e.Assert(); } return false; }
internal bool Save(string fileName) { try { Serializer serializer = new Serializer(false/*isDCS*/); string document = serializer.Serialize(this); if (document == null) return false; IsolatedFileHelper.WriteFileString(fileName, document); return true; } catch (Exception ex) { ex.Alert(); } return false; }