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(); }
public override void Refresh(int security) { RefreshFullCommand(); InfoAsTop = LongInfo; //InfoBadusage = InfoAsTop; //String unknownChildText = "Unknown subcommand for " + FullCommand + // ", did you mean on of these? :"; InfoAsChild = FullCommand + " - " + ShortInfo; ChildrenInfo = ""; if (Children.Count > 0) { foreach (Node child in Children) { child.Refresh(security); if (security >= child.Security) ChildrenInfo += child.InfoAsChild + "\n"; ChildWords += " " + child.Word; } InfoAsTop += "\n\nCommands:\n\n" + ChildrenInfo; //InfoBadusage += "\n\n Incorrect usage. Commands: "; InfoAsChild += "\n" + ChildrenInfo; } InfoNotice = new WindowNotification() { Text = InfoAsTop, BigLabel = BigLabel, SmallLabel = SmallLabel }; /* UnknownChildNotice = new ChatNotification() { Text = unknownChildText }; * */ }
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(); }
/// <summary> /// FullCommand can change depending on command's position in the Tree /// </summary> /// <param name="security"></param> public override void Refresh(int security) { RefreshFullCommand(); String fullCommandWithArgs = FullCommand + " " + String.Join(" ", ArgNames); InfoAsTop = fullCommandWithArgs + "\n\n" + LongInfo; //InfoBadusage = "Incorrect usage.\n\n" + InfoAsTop; InfoAsChild = fullCommandWithArgs + " - " + ShortInfo; InfoNotice = new WindowNotification() { Text = InfoAsTop, BigLabel = BigLabel, SmallLabel = SmallLabel }; ArgsErrorNotice = new ChatNotification() { Text = "Expected " + ArgCount + " arguments -\n" + fullCommandWithArgs }; }
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(); }