/// <summary> /// Clear the AerialWithLabels imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> public void LabelsCheckBox_Unchecked() { if (Imagery == ImagerySet.AerialWithLabels) { Imagery = ImagerySet.Unknown; } }
/// <summary> /// Clear the Road imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> public void RoadCheckBox_Unchecked() { if (Imagery == ImagerySet.Road) { Imagery = ImagerySet.Unknown; } }
/// <summary> /// Clear the Aerial imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> public void AerialCheckBox_Unchecked() { if (Imagery == ImagerySet.Aerial) { Imagery = ImagerySet.Unknown; } }
// Constructor public TripService(NotificationFlagType notificationTypes) { NotifyData = new NotificationData(); NotificationFlag = notificationTypes; IsRawBound = false; Imagery = ImagerySet.Unknown; UpdateStatus("Starting..."); HttpChannel = EstablishChannel(); }
/// <summary> /// Contact the Tile web service to subscribe to a notification /// </summary> /// <param name="baseAddress">The base Uri of the service</param> /// <param name="stopId">The stop to notify on arrival</param> /// <param name="tripId">The trip to track</param> /// <param name="notify">The number of minutes before arrival to trigger a notification</param> /// <param name="imagery">The imagery set to use</param> /// <param name="subscription">The Uri for the channel from the notification service</param> private void SubscribeToTripService(Uri baseAddress, string stopId, string tripId, int notify, ImagerySet imagery, Uri subscription) { // // The Transit Tile Service REST request format (Note: "unregister" also exists with same format) // var UriFormat = "stop/{0}/register?trip={1}¬ify={2}&type={3}&imageryset={4}&uri={5}"; var CallUri = String.Format(UriFormat, stopId, tripId, notify.ToString(), NotificationFlag.ToString().Replace(" ", ""), imagery, subscription.AbsoluteUri); var Client = new WebClient(); Client.DownloadStringCompleted += (s, e) => { if (e.Error == null) { UpdateStatus("Registration succeeded"); } else { UpdateStatus("Registration failed: " + e.Error.Message); throw e.Error; } }; Client.DownloadStringAsync(new Uri(baseAddress, CallUri)); }
/// <summary> /// Clear the Road imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> public void RoadCheckBox_Unchecked() { if (Imagery == ImagerySet.Road) Imagery = ImagerySet.Unknown; }
/// <summary> /// Set the Road imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> /// <remarks>Only one imagery checkbox can be set</remarks> public void RoadCheckBox_Checked() { Imagery = ImagerySet.Road; }
/// <summary> /// Clear the AerialWithLabels imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> public void LabelsCheckBox_Unchecked() { if (Imagery == ImagerySet.AerialWithLabels) Imagery = ImagerySet.Unknown; }
/// <summary> /// Set the AerialWithLabels imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> /// <remarks>Only one imagery checkbox can be set</remarks> public void LabelsCheckBox_Checked() { Imagery = ImagerySet.AerialWithLabels; }
/// <summary> /// Clear the Aerial imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> public void AerialCheckBox_Unchecked() { if (Imagery == ImagerySet.Aerial) Imagery = ImagerySet.Unknown; }
/// <summary> /// Set the Aerial imagery set /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> /// <remarks>Only one imagery checkbox can be set</remarks> public void AerialCheckBox_Checked() { Imagery = ImagerySet.Aerial; }