public void BroadcastIt(string message, string id) { if (!string.IsNullOrEmpty(message) && !string.IsNullOrEmpty(id)) { var info = new ChangedEventArgs(message, id); OnChange(this, info); } }
void HandleMapChanged(object s, ChangedEventArgs ea) { if (ea.ModuleName == "updated-location") { if (lon != App.Self.Longitude || lat != App.Self.Latitude) { myMap.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(App.Self.Longitude, App.Self.Latitude), Distance.FromMiles(0.3))); lon = App.Self.Longitude; lat = App.Self.Latitude; } } }
protected void OnChange(object s, ChangedEventArgs e) { if (Change != null) Change(s, e); }