Ejemplo n.º 1
0
 /*  Конструктор класса  */
 public CClient(Socket socket, CServer serv, sbyte id, CView currUI)
 {
     clientSocket   = socket;
     server         = serv;
     UI             = currUI;
     ID             = id;
     IsClientBanned = false;
 }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            colorDialog          = new System.Windows.Forms.ColorDialog();
            colorDialog.FullOpen = true;
            colorsManager        = CColorsLoader.GetInstance();
            currentUI            = new CView(this);
            MakeColorsPalette();
            SetAvailabiltyOfMenuItems();
        }
Ejemplo n.º 3
0
        /*  Конструктор класса  */
        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;
        }