Example #1
0
        private void SetCellTyping(string clientId, string cellName)
        {
            var cell = new GuiCell(cellName);

            int id;

            if (!int.TryParse(clientId, out id))
            {
                id = _random.Next();
            }

            if (!Clients.ContainsKey(clientId))
            {
                Clients.Add(clientId, new Client
                {
                    Color        = ClientPallete[id % ClientPallete.Length],
                    SelectedCell = cell.CellName
                });
            }
            else
            {
                Clients[clientId].SelectedCell = cellName;
            }

            _window.CellBackgroundColor(cell.CellColumn, cell.CellRow, Clients[clientId].Color);
        }