public void Save() { if (State == FileState.OK) { if (type == TypeFile.txt) { File.WriteAllText(Path, file.ToString()); } else { File.WriteAllBytes(Path, DVPL.ToDVPL(file.ToString())); } } }
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; } }