Beispiel #1
0
        //
        //xử lý đăng nhập
        //

        void login_process()
        {
            Form_Login frmLogin = new Form_Login();

            frmLogin.StartPosition = FormStartPosition.CenterParent;
            frmLogin.ShowDialog(this);
            //send_command("connect|" + frmLogin.textBox_UserFormLogin.Text);
            send_command("connect|" + frmLogin.labelName);
            frmLogin.Dispose();
            user = frmLogin.textBox_UserFormLogin.Text;
            user = frmLogin.labelName;
            label_UsernameFixed.Text = user;
        }
Beispiel #2
0
        private void Form_Main_Load(object sender, EventArgs e)
        {
            Form_Login frmLogin = new Form_Login();

            button_Connect.Focus();
            button_PublicChat.Enabled = false;
            button_Send.Enabled       = false;
            button_Update.Enabled     = false;
            //try
            //{
            //    client = new TcpClient("localhost", PORT_NUMBER);
            //    client.GetStream().BeginRead(readBuffer, 0, MAX_BUFFER_SIZE, new AsyncCallback(read), null);
            //    this.Show();
            //    login_process();
            //    textBox_Input.Focus();
            //}

            //catch (Exception ex)
            //{
            //
            //}
        }