예제 #1
0
        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));
        }
예제 #2
0
 private void SendControlMessage(ControlCommand command)
 {
     _remoteEndpoint.SendControlCommand((int)command, command.ToString(), null, _remoteEndpoint);
 }
예제 #3
0
 private void SendControlMessage(ControlCommand command)
 {
     _remoteEndpoint.SendControlCommand((int)command, command.ToString(), null, _remoteEndpoint);
 }
예제 #4
0
 void parser_OnControlCommandAck(ControlCommand cmd, Status sts)
 {
     clsLog.WLog("CommandAck:" + cmd.ToString());
 }