/* Конструктор класса */ public CClient(Socket socket, CServer serv, sbyte id, CView currUI) { clientSocket = socket; server = serv; UI = currUI; ID = id; IsClientBanned = false; }
public MainWindow() { InitializeComponent(); colorDialog = new System.Windows.Forms.ColorDialog(); colorDialog.FullOpen = true; colorsManager = CColorsLoader.GetInstance(); currentUI = new CView(this); MakeColorsPalette(); SetAvailabiltyOfMenuItems(); }
/* Конструктор класса */ public CServer(string ip, int port, int clientsAmo, CView currUI) { idManager = CIDManager.GetInstance(); clients = new List <CClient>(); listenPoint = new IPEndPoint(IPAddress.Parse(ip), port); listenSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); UI = currUI; maxAmoOfConnectedClients = clientsAmo; AmoOfConnectedClients = 0; IsServerWork = false; IsServerClosed = false; }