public SaveResult SaveDocumentFile(String folderPath) { // ちゃんとしたファイルを書き出す。 XmlSerializer serializer = new XmlSerializer(typeof(XmlSaveObjectVer4_0_0)); // Tempフォルダーに書き出し隔離 FileStream outstream = new System.IO.FileStream(folderPath + "\\" + "document.xml", System.IO.FileMode.Create); var saveObj = new XmlSaveObjectVer4_0_0(); saveObj.SetSavableObject(); serializer.Serialize(outstream, saveObj); outstream.Close(); return(SaveResult.Succeed); }
public ExpandResult Expand(string folderPath, IEditor iEditor) { _iEditor = iEditor; string fileCompositePath = folderPath + "\\document.xml"; // ちゃんとしたファイルを書き出す。 XmlSerializer serializer = new XmlSerializer(typeof(XmlSaveObjectVer4_0_0)); FileStream outstream = new System.IO.FileStream(fileCompositePath, System.IO.FileMode.Open); LoadComposition = (XmlSaveObjectVer4_0_0)serializer.Deserialize(outstream); outstream.Close(); ExpandObject(); return(ExpandResult.Succeeded); }