public void TestOpenSaveFiles() { var path = "E:\\Temp\\xml"; var fileOpen = "courseplay.xml"; var fileSave = "courseplay_gen.xml"; var coursePlay = CourseFileManger.OpenFile(Path.Combine(path, fileOpen)); CourseFileManger.SaveFile(Path.Combine(path, fileSave), coursePlay); }
private void OnExecute() { if (_content.CourseFileModel == null) { throw new Exception("Не открыто не одного файла."); } if (string.IsNullOrEmpty(_content.OpenFilePath)) { throw new Exception("Нет пути сохранения открыто файла."); } CourseFileManger.SaveFile(_content.OpenFilePath, _content.CourseFileModel.Save(), _settings.IsCreateBackup, _settings.CountBackups); }