public bool AddRecordToRepo(DeviceGPX gpx) { int oldCount = DeviceGPXCollection.Count; if (gpx == null) { throw new ArgumentNullException("Error: The argument is Null"); } DeviceGPXCollection.Add(gpx); AddToDictionary(gpx.GPS, Entities.GPXFileViewModel.GetFile(gpx.GPS, gpx.Filename)); return(DeviceGPXCollection.Count > oldCount); }
public bool AddRecordToRepo(DeviceGPX gpx) { int oldCount = DeviceGPXCollection.Count; if (gpx == null) throw new ArgumentNullException("Error: The argument is Null"); DeviceGPXCollection.Add(gpx); if (_editSuccess) { GPXFile gpxFile = Entities.GPXFileViewModel.GetFile(gpx.GPS, gpx.Filename); if (gpxFile == null) { gpxFile = new GPXFile(gpx.Filename) { GPS = gpx.GPS, XML = gpx.GPX }; gpxFile.ComputeStats(gpx); Entities.GPXFileViewModel.Add(gpxFile); } AddToDictionary(gpx.GPS, gpxFile); } return DeviceGPXCollection.Count > oldCount; }