Beispiel #1
0
        public Client()
        {
            InitializeComponent();
            mysocketManage = ClientSocketManage.getInstance();
            clientSocket   = mysocketManage.getSocket();
            _mysendFactory = new MySendFactory(clientSocket);

            isRunning = true;

            _listenFromServer = new Thread(listenFromServer);
            _listenFromServer.Start();
        }
Beispiel #2
0
        public Login()
        {
            InitializeComponent();

            _socketMange   = ClientSocketManage.getInstance();
            clientSocket   = _socketMange.getSocket();
            _mysendFactory = new MySendFactory(clientSocket);

            tbIpServer.Text         = "127.0.0.1";
            tbName.Text             = "Name 1";
            tbPassword.Text         = "";
            tbPassword.PasswordChar = '*';
        }
Beispiel #3
0
        public MyClient(TcpClient socketClient, Server currentForm)
        {
            setCurrentForm(currentForm);
            id              = NEXT_ID_NUMBER;
            NEXT_ID_NUMBER += 1;
            _socket         = socketClient;
            isRunning       = true;

            _threadManage = ServerTheadingManage.getInstance();
            _idThread     = _threadManage.addNewWork(listenServer);
            _threadManage.startInstance(_idThread);

            _mysendFactory         = new MySendFactory(_socket);
            _listQuestionAnswereds = new List <string>();
        }