示例#1
1
 public void Start(ReceiveClient rc,string name)
 {
     inst = new InstanceContext(rc);
     chatClient = new ChatService.SendChatServiceClient(inst);
     chatClient.Start(name);
 }
示例#2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtUserName.Text.Length > 0)
            {
                txtMsgs.Enabled     = true;
                txtSend.Enabled     = true;
                btnSend.Enabled     = true;
                txtUserName.Enabled = false;
                btnLogin.Enabled    = false;

                myName = txtUserName.Text.Trim();

                rc = new ReceiveClient();
                rc.Start(rc, myName);

                rc.NewNames   += new GotNames(rc_NewNames);
                rc.ReceiveMsg += new ReceviedMessage(rc_ReceiveMsg);
            }
            else
            {
                txtUserName.Enabled = true;
                btnLogin.Enabled    = true;
                txtMsgs.Enabled     = false;
                txtSend.Enabled     = false;
                btnSend.Enabled     = false;
            }
        }
示例#3
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtUserName.Text.Length > 0)
                {
                    myName = txtUserName.Text.Trim();

                    rc = new ReceiveClient();
                    rc.Start(rc, myName);

                    rc.NewNames   += new GotNames(rc_NewNames);
                    rc.ReceiveMsg += new ReceviedMessage(rc_ReceiveMsg);

                    txtEnabled(true);
                    txtUserName.Enabled = false;
                    btnLogin.Enabled    = false;
                }
                else
                {
                    txtEnabled(false);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Hata : " + ex.Message);
                //txtEnabled(false);
            }
        }
示例#4
0
        private void _log_()
        {
            //  MessageBox.Show("","");
            login            = true;
            btnLogin.Enabled = false;
            if (txtUserName.Text.Length > 0)
            {
                txtMsgs.Enabled = true;
                txtSend.Enabled = true;
                btnSend.Enabled = true;

                myName = txtUserName.Text.Trim();

                rc = new ReceiveClient();
                rc.Start(rc, myName);

                rc.NewNames   += new GotNames(rc_NewNames);
                rc.ReceiveMsg += new ReceviedMessage(rc_ReceiveMsg);
            }
            else
            {
                txtMsgs.Enabled = false;
                txtSend.Enabled = false;
                btnSend.Enabled = false;
            }


            timer1.Start();
        }
示例#5
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtUserName.Text.Length > 0)
            {
                txtMsgs.Enabled = true;
                txtSend.Enabled = true;
                btnSend.Enabled = true;

                myName = txtUserName.Text.Trim();

                rc = new ReceiveClient();
                rc.Start(rc, myName);

                rc.NewNames += new GotNames(rc_NewNames);
                rc.ReceiveMsg += new ReceviedMessage(rc_ReceiveMsg);
            }
            else
            {
                txtMsgs.Enabled = false;
                txtSend.Enabled = false;
                btnSend.Enabled = false;
            }
        }
 public void Start(ReceiveClient rc, string name)
 {
     inst       = new InstanceContext(rc);
     chatClient = new ChatService.SendChatServiceClient(inst);
     chatClient.Start(name);
 }