public void Render(CellState[,] grid, ControlCommand currentComand) { const string header = "CONWAYS GAME OF LIFE"; var status = currentComand.ToString(); const string footer = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; Console.Clear(); Console.WriteLine(String.Format("{0," + ((Console.WindowWidth / 2) + (header.Length / 2)) + "}", header)); Console.WriteLine(String.Format("{0," + ((Console.WindowWidth / 2) + (status.Length / 2)) + "}", status)); Console.WriteLine(GridAsString(grid)); Console.WriteLine(String.Format("{0," + ((Console.WindowWidth / 2) + (footer.Length / 2)) + "}", footer)); }
private void SendControlMessage(ControlCommand command) { _remoteEndpoint.SendControlCommand((int)command, command.ToString(), null, _remoteEndpoint); }
void parser_OnControlCommandAck(ControlCommand cmd, Status sts) { clsLog.WLog("CommandAck:" + cmd.ToString()); }