public App() { var waypointsService = new WaypointsService(); var groupsService = new GroupsService(waypointsService); GeoLayoutBuildingService = new GeoLayoutBuildingService(waypointsService, groupsService); SettingsService = new SettingsService(); var importService = new ImportService( new List <IGeoImporter>(new [] { new GpxImporter() }), new MultiFileDialogService(Current.MainWindow), waypointsService); var exportService = new ExportService( new List <IGeoExporter>(new [] { new GpxExporter() }), new SaveFileDialogService(Current.MainWindow), waypointsService); MainViewModel = new MainViewModel(importService, exportService, waypointsService, groupsService, GeoLayoutBuildingService); MapViewModel = new MapViewModel(waypointsService, groupsService, GeoLayoutBuildingService); GroupsViewModel = new GroupsViewModel(groupsService, waypointsService); }
public MainViewModel(ImportService importService, ExportService exportService, WaypointsService waypointsService, GroupsService groupsService, GeoLayoutBuildingService layoutBuildingService) { ImportService = importService; ExportService = exportService; WaypointsService = waypointsService; GroupsService = groupsService; GeoLayoutBuildingService = layoutBuildingService; OpenCommand = new DelegateCommand(() => ImportService.ImportWaypoints()); SaveCommand = new DelegateCommand(() => ExportService.ExportWaypoints()); //var inputFile = @"C:\Users\Епишкин Дмитрий\Desktop\ВЛУ\keyPoints2.gpx"; //var importer = new GpxImporter(); //var keyPoints = importer.ImportWaypoints(inputFile); //foreach (var p in keyPoints) { // waypointsService.Waypoints.Add(p); //} }
public MapViewModel(WaypointsService waypointsService, GroupsService groupsService, GeoLayoutBuildingService geoLayoutBuildingService) { WaypointsService = waypointsService; GroupsService = groupsService; GeoLayoutBuildingService = geoLayoutBuildingService; }