public void execute() { LocationSource locationSource = LocationSourceManager.Instance.createLocationSource("LocationSource" + LocationSourceManager.Instance.LocationSources.Count, new DummyDiscriminator()); //user.Discri = new ColorDiscriminator(); LocationSourcePlayer locationSourcePlayer = null; try { locationSourcePlayer = new LocationSourcePlayer(locationSource, path); } catch (XmlException) { LocationSourceManager.Instance.deleteLocationSource(locationSource); System.Windows.Forms.MessageBox.Show("There is an error in your XML file. ", "Format Error", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation); return; } MapOverlayForm.Instance.AddUserMarker(locationSource.mapMarker); locationSource.Attach(locationSource.mapMarker); LocationSourceTrackForm locationSourceView = new LocationSourceTrackForm(locationSource, userListContainer, locationSourcePlayer); }
public void RegisterUserTrackForm(LocationSourceTrackForm userTrackForm) { this.userTrackForm = userTrackForm; }