Пример #1
0
 void LoadTargetInfo(object d)
 {
     try {
         target = TrackMeApp.GetPublicShareInfo (targetId);
         if (target != null)
             RunOnUiThread (ShowTarget);
         else
             RunOnUiThread (ShowError);
     } catch (Exception ex) {
         Console.WriteLine (ex);
         RunOnUiThread (ShowError);
     }
 }
Пример #2
0
 public static void AddTarget(PublicLocationShare target)
 {
     var t = new TrackedShare () {
         Id = target.Id,
         Latitude = target.Latitude,
         Longitude = target.Longitude,
         User = target.User
     };
     lock (StatusLock) {
         Targets.Add (t);
     }
     NotifyTrackedSharesChanged ();
     System.Threading.ThreadPool.QueueUserWorkItem (delegate {
         var rt = WebService.RegisterTracker (target.Id, TrackMeApp.LocalUser);
         t.TrackerId = rt.TrackerId;
         NotifyTrackedSharesChanged ();
     });
 }