private void ReceiveConcealedGridsResponse(byte[] body) { Log.Trace("Receiving Concealed Grids Response", "ReceiveConcealedGridsResponse"); ConcealedGridsResponse response = ConcealedGridsResponse.FromBytes(body); Session.Client.ConcealedGrids = response.ConcealedGrids; String result = "Concealed Grids:\n\n"; int i = 1; foreach (Records.Entities.ConcealableGrid grid in Session.Client.ConcealedGrids) { result += String.Format("{0}: \"{1}\" - Revealability: {2}\n", i, grid.DisplayName, grid.Revealability); i++; } Notification notice = new WindowNotification() { Text = result, BigLabel = "Garden Performance", SmallLabel = "Concealed Grids" }; notice.Raise(); }
private void ReceiveRevealedGridsResponse(byte[] body) { Log.Trace("Receiving Revealed Grids Response", "ReceiveRevealedGridsResponse"); RevealedGridsResponse response = RevealedGridsResponse.FromBytes(body); Session.RevealedGrids = response.RevealedGrids; String result = Session.RevealedGrids.Count + " Revealed Grids:\n\n"; int i = 1; foreach (RevealedGrid grid in Session.RevealedGrids) { // Ids result += i + ": \"" + grid.DisplayName + "\" - "; result += (grid.IsConcealable) ? "Concealable" : "Not concealable"; result += "\n"; i++; } Notification notice = new WindowNotification() { Text = result, BigLabel = "Garden Performance", SmallLabel = "Revealed Grids" }; notice.Raise(); }
private void ReceiveObservingEntitiesResponse(byte[] body) { Log.Trace("Receiving Observing Entities Response", "ReceiveObservingEntitiesResponse"); Log.Trace("body size is " + body.Count(), "ReceiveObservingEntitiesResponse"); ObservingEntitiesResponse response = ObservingEntitiesResponse.FromBytes(body); Session.ObservingEntities = response.ObservingEntities; String result = Session.ObservingEntities.Count + " Observing Entities:\n\n"; int i = 1; foreach (ObservingEntity e in Session.ObservingEntities) { // Ids result += i + ": \"" + e.ObservationDetails() + "\n"; i++; } Notification notice = new WindowNotification() { Text = result, BigLabel = "Garden Performance", SmallLabel = "Observing Entities" }; notice.Raise(); }