Beispiel #1
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            _serverConnection = new ServerConnection();
            _serverConnection.Connect(txtServerIP.Text, Convert.ToInt32(txtServerPort.Text), txtNickname.Text);
            //TODO: Connect to server
            this.Close();

         
        }
Beispiel #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            LoginForm login = new LoginForm();
            login.ShowDialog();
            _serverConnection = login.ServerConnection;

            _serverConnection.NewUserConnected += OnNewUserConnect;
            _serverConnection.MessageReceived += OnNewMessage;
        }