Пример #1
0
 public void Save()
 {
     if (State == FileState.OK)
     {
         if (type == TypeFile.txt)
         {
             File.WriteAllText(Path, file.ToString());
         }
         else
         {
             File.WriteAllBytes(Path, DVPL.ToDVPL(file.ToString()));
         }
     }
 }
Пример #2
0
 public void SaveAs(string path)
 {
     if (State == FileState.OK)
     {
         if (System.IO.Path.GetExtension(path) == "dvpl")
         {
             File.WriteAllBytes(path, DVPL.ToDVPL(file.ToString()));
         }
         else
         {
             File.WriteAllText(path, file.ToString());
         }
         Path = path;
     }
 }