Beispiel #1
0
 public void Save(String target, IProgressReport progress)
 {
     using (FileStream stream = new FileStream(target, FileMode.OpenOrCreate, FileAccess.Write))
     {
         using (BinaryWriter writer = new BinaryWriter(stream))
         {
             writer.Write(StringRes.USER_PROFILE_TAG);
             writer.Write(StringRes.USER_PROFILE_VERSION);
             using (XBinaryWriter xwriter = new XBinaryWriter(stream))
             {
                 Save(xwriter, progress);
             }
         }
     }
 }
Beispiel #2
0
 public void Save(String target, IProgressReport progress)
 {
     using (FileStream stream = new FileStream(target, FileMode.OpenOrCreate, FileAccess.Write))
     {
         using (BinaryWriter writer = new BinaryWriter(stream))
         {
             writer.Write(StringRes.VOCABULARY_TAG);
             writer.Write(StringRes.VOCABULARY_VERSION);
             using (XBinaryWriter xwriter = new XBinaryWriter(stream))
             {
                 PrepareSave();
                 Save(xwriter, progress);
                 FinalizeSave();
             }
         }
     }
     Modify(false);
 }