el=gameLogicControls.SelectedWordLabel; .Refresh ();=pb.CreateGraphics () ;. displaySettings=displaySettings;=new Pen (displaySettings.cellBorderColor, displaySettings.MatrixCellBorderWidth);=new SolidBrush (displaySettings.cellBackgroundColor);=new SolidBrush (displaySettings.selectedCellBackroundColor);=new SolidBrush (displaySettings.cellLetterColor);=new Font (FontFamily.GenericMonospace, (displaySettings.MatrixCellSize/2) , FontStyle.Bold);=displaySettings.MatrixCellBorderWidth/2;=displaySettings.MatrixCellSize - displaySettings.MatrixCellBorderWidth;=displaySettings.MatrixCellBorderWidth/2 + 6;=logiccells; ();
}
void CreateDisplayCells ()
{= new List lt; DisplayCell gt; ();=new Dictionary lt; LogicCell, DisplayCell gt; () ;. ForEach (lc= gt;
{dispayCell=new DisplayCell
{= lc,=(lc.X - 1) * displaySettings.MatrixCellSize + cellBackgroundOffset,=(lc.Y - 1) * displaySettings.MatrixCellSize + cellBackgroundOffset,
} ;. Add (dispayCell) ;. Add (lc, dispayCell);
});
}
void DrawCell (DisplayCell cell, Brush backGroundBrush)
{
{(cell!=null)
{. DrawRectangle (pen, cell.offsetX, cell.offsetY, displaySettings.MatrixCellSize, displaySettings.MatrixCellSize) ;. FillRectangle (backGroundBrush, cell.offsetX + cellBackgroundOffset, cell.offsetY + cellBackgroundOffset ,, cellBackgroundSize ); (! String.IsNullOrEmpty (cell.LogicCell.Letter)). DrawString (cell.LogicCell.Letter, font, textBrush, cell.offsetX + cellTextOffset, .offsetY + cellTextOffset);
}
} (Exception ex)
{ex;
}
}
void DrawLightCell (DisplayCell cell)
{
}
void DrawFullMatrix ()
{. ForEach (cell= gt; DrawCell (cell, primaryBrush));
}
void DisplayCells (List lt; LogicCell gt; logCells)
{. ForEach (lc= gt; DrawCell (cellDictionary [lc], primaryBrush));
} void DisplayCellsAsLight (List lt; LogicCell gt; logCells)
{. ForEach (lc= gt; DrawCell (cellDictionary [lc], lightBrush));
}
bool SelectCellForInsertingLetter (int xCor, int yCor)
{(previousSelectedCell!=null)
{(previousSelectedCell, primaryBrush);
} (xCor, yCor); true;
}
void LightCellByCor (int xCor, int yCor)
{cell=GetDisplayCellByCor (xCor, yCor);=cell; (cell, lightBrush);
}
DisplayCell GetDisplayCellByCor (int xCor, int yCor)
{logicX=xCor/displaySettings.MatrixCellSize + 1; logicY=yCor/displaySettings.MatrixCellSize + 1; GetCellByLogicCor (logicX, logicY);
} DisplayCell GetCellByLogicCor (int x, int y)
{displayCells.FirstOrDefault (cell= gt; (cell.LogicCell.X == x) amp; amp; (cell.LogicCell.Y == y));
}
LogicCell GetLogicCellByCor (int x, int y)
{logicX=x/displaySettings.MatrixCellSize + 1; logicY=y/displaySettings.MatrixCellSize + 1; displayCell=GetCellByLogicCor (logicX, logicY); (displayCell!=null)? displayCell.LogicCell: null;
}
void DispalyCurrentWord (string message)
{. Text=message;
}
void DisplayCurrentPlayerName (string message)
{. CurrentPlayerLabel.Text=message;
}
void DisplayCurrentGuide (string message)
{. GuideLabel.Text=message;
}
void DisplayCurrentError (string message)
{. ErrorLabel.Text=message;
}
}
}System;System.Collections.Generic;System.IO;System.Linq;System.Net;System.Net.Sockets;System.Text;System.Threading;System.Threading.Tasks;System.Windows.Forms;
delegate void HandleMassageActivity (String message);
BaldaClient.NetworkModel
{class NetworkClient: IDisposable
{StreamWriter swSender; StreamReader srReceiver; TcpClient tcpServer; delegate void Upd...