예제 #1
0
 void SendFile(String fileName, String root)
 {
     DME_FileFormat entity = new DME_FileFormat(fileName, root);
     MemoryStream format = new MemoryStream();
     entity.Write(format);
     format.Position = 0;
     Client.Send(format);
     Client.Send(entity.Stream);
 }
예제 #2
0
 /// <summary>
 /// 从流中加载一个文件格式对象
 /// </summary>
 /// <param name="stream"></param>
 /// <returns></returns>
 public static DME_FileFormat Load(Stream stream)
 {
     DME_FileFormat ff = new DME_FileFormat();
     ff.Read(stream);
     return ff;
 }