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() { _openFileDialog.FileName = null; var rezult = _openFileDialog.ShowDialog(); if (!rezult.HasValue || !rezult.Value) { return; } var fileName = _openFileDialog.FileName; _content.OpenFilePath = fileName; _content.CourseFileModel = CourseFileModel.Load(CourseFileManger.OpenFile(fileName)); }