void UpdateZone(Zone zone)
        {
            // Find the zone in the cells
            var zoneCell = ZoneCells.FirstOrDefault(z => z.Zone.ObjectId == zone.ObjectId);
            if (zoneCell == null)
                return;

            var index = ZoneCells.IndexOf(zoneCell);
            Zones.RemoveAt(index);
            ZoneCells.RemoveAt(index);

            Zones.Insert(index, zone);
            ZoneCells.Insert(index, new ZoneCell { Zone = zone });
        }
Example #2
0
 private void PublishUserCallback(Zone obj)
 {
     throw new NotImplementedException();
 }
Example #3
0
 public void PublishZone(Zone zone)
 {
     //pubnub.EnableJsonEncodingForPublish = false;
     pubnub.Publish<Zone>("Zones", Mapper.Map<Zone>(zone), PublishUserCallback, PublishErrorCallback);
 }