public void LoadDataTest() { var dialog = new FileDialogView(null){ Mode = Mode.Open, DefaultExt = "*.xml" }; if (dialog.ShowDialog() == true && dialog.FileNames != null && dialog.FileNames.Length > 0) { DataCenterRepository repo = new DataCenterRepository(dialog.FileNames[0]); var dcs = repo.GetDataCenters(); dcs.ToArray(); } }
public void Save() { FileDialogView dialogView = new FileDialogView(null) { DefaultExt = "xml", Filter = "|*.xml", IsEnabled = true, Mode = Mode.Save }; if (dialogView.ShowDialog() == true && dialogView.FileNames != null && dialogView.FileNames.Length > 0) { string filename = dialogView.FileNames[0]; WriteTo(this, filename); } }