protected override void OnEvent (Context context, Event ev)
			{
				MyLogger.Information (this.Class.SimpleName, string.Format ("Event Received: Mojio Id ({0}) Type ({1}) ", ev.MojioId, ev.EventType.ToString ()));

				if (context is EventBaseActivity)
					(context as EventBaseActivity).OnMojioEventReceived (ev);
				else
					MyLogger.Error (this.Class.SimpleName, string.Format ("Received Event Didn't Invoke OnMojioEventReceived ({0})", ev.ToString ()));
			}
 public void TestFindEvent()
 {
     notificationManager.Clear ();
     Event mojioEvent = new Event ();
     System.Guid id = new System.Guid ();
     mojioEvent.OwnerId = id;
     notificationManager.Add (mojioEvent);
     Assert.AreEqual (mojioEvent, notificationManager.Find(id.ToString()));
 }
 private Button CreateEventItem(Event Event)
 {
     Button button = new Button (this);
     button.SetBackgroundDrawable(Resources.GetDrawable(Resource.Drawable.android_button));
     button.Text = string.Format ("Latest Tow Event");
     button.Click += (sender, e) => {
         LatLng latln = new LatLng (Event.Location.Lat, Event.Location.Lng);
         map.MoveCamera (CameraUpdateFactory.NewLatLngZoom (latln, 15));
         locationDialog.Hide ();
     };
     ;
     return button;
 }
 protected override void OnMojioEventReceived(Event eve)
 {
     base.OnMojioEventReceived (eve);
     UpdateNumberOfNewEvents ();
 }
		/// <summary>
		/// This is all the action starts once a mojio event is received.
		/// </summary>
		/// <param name="eve">Mojio Event</param>
		protected virtual void OnMojioEventReceived (Event eve)
		{
			switch (eve.EventType) {
			case EventType.TowStart:
				LoadMojioDevices ();
				var location = eve.Location;				
				(eve as TowEvent).Location = eve.Location;
				MyLogger.Error (this.LocalClassName, string.Format ("Location ({0}) added to the event just received.", location.ToString ()));	
				TowManager.Add (eve);
				TowManager.IncrementNewEventNumber ();
				if (ActivityVisible)
					NotifyViaToast (Resources.GetString (Resource.String.towEventNotice));
				else
					NotifyViaLocalNotification (Resources.GetString (Resource.String.towEventNotice));
				break;
			default:
//				if (ActivityVisible)
//					NotifyViaToast ();
//				else
//					NotifyViaLocalNotification ();
				break;
			}
			
			if (MainApp.GetCurrentActivity () is NotificationsActivity) {
				((NotificationsActivity)MainApp.GetCurrentActivity ()).Update ();
				TowManager.ClearNewEventNumber ();
			} else if (MainApp.GetCurrentActivity () is MainMenuActivity) {
				((MainMenuActivity)MainApp.GetCurrentActivity ()).UpdateEvents ();
			}

		}
 public void TestAddEvent()
 {
     notificationManager.Clear ();
     Event mojioEvent = new Event ();
     Assert.True(notificationManager.Add(mojioEvent));
 }