示例#1
0
        private void PWBox_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.Enter)
            {
                string loginKeyResult = loginReceive.loginReveiveToServer("userLogin", IDBox.Text, PWBox.Text);
                if (loginKeyResult.Equals("true"))
                {
                    contextMenuStripForm.LockIconVisiblefalse();
                    sbloginformCheck       = false;
                    Mainform.mainformCheck = true;
                    mainform.Show();
                    contextMenuStripForm.IconVisibletrue();
                    PWBox.Clear();
                    this.Dispose();

                    //서버로 로그인 id에 맞는 값을 받아와야 함.
                }
                else
                {
                    //MessageBox.Show("비밀번호가 일치하지 않습니다.", "로그인실패", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    sbLoginStatus.Text      = "비밀번호가 일치하지 않습니다.";
                    sbLoginStatus.ForeColor = Color.Red;
                    PWBox.Clear();
                }
            }
        }
示例#2
0
 private void ResetBtn_Click(object sender, EventArgs e)
 {
     //clears up the boxs on the page
     emailBox.Clear();
     PWBox.Clear();
     //moves cursor to the box
     emailBox.Focus();
 }
示例#3
0
        private void loginbtn_Click(object sender, EventArgs e)
        {
            if (!IDBox.Text.Equals("") && !PWBox.Text.Equals(""))
            {
                string loginResult = loginReceive.loginReveiveToServer("userLogin", IDBox.Text, PWBox.Text);
                if (loginResult.Equals("true"))
                {
                    if (enterRoomCheck.enterRoomformCheck == true)
                    {
                        contextMenuStripForm.LockIconVisiblefalse();
                        sbloginformCheck = false;
                        mainform.Show();
                        enterRoomcheck.Show();
                        enterRoomcheck.Focus();
                        enterRoomCheck.enterRoomformCheck = true;
                        contextMenuStripForm.IconVisibletrue();
                        PWBox.Clear();
                        this.Dispose();
                    }
                    else if (Chat_Form.ChatFormCheck == true)
                    {
                        contextMenuStripForm.LockIconVisiblefalse();
                        chatform.Show();
                        chatform.Focus();
                        sbloginformCheck        = false;
                        Chat_Form.ChatFormCheck = true;
                        contextMenuStripForm.IconVisibletrue();
                        PWBox.Clear();
                        this.Dispose();
                    }
                    else if (CreateRoom_Form.createRoomCheck == true)
                    {
                        contextMenuStripForm.LockIconVisiblefalse();
                        mainform.Show();
                        createroom.Show();
                        createroom.Focus();
                        sbloginformCheck = false;
                        CreateRoom_Form.createRoomCheck = true;
                        contextMenuStripForm.IconVisibletrue();
                        PWBox.Clear();
                        this.Dispose();
                    }
                    else if (UserList_Form.userlistformCheck == true)
                    {
                        contextMenuStripForm.LockIconVisiblefalse();
                        mainform.Show();
                        createroom.Show();
                        userlistform.Show();
                        userlistform.Focus();
                        sbloginformCheck = false;
                        UserList_Form.userlistformCheck = true;
                        contextMenuStripForm.IconVisibletrue();
                        PWBox.Clear();
                        this.Dispose();
                    }
                    else
                    {
                        contextMenuStripForm.LockIconVisiblefalse();
                        mainform.Show();
                        mainform.Focus();
                        sbloginformCheck       = false;
                        Mainform.mainformCheck = true;
                        contextMenuStripForm.IconVisibletrue();
                        PWBox.Clear();
                        this.Dispose();
                    }


                    //서버로 로그인 id에 맞는 값을 받아와야 함.
                }
                else
                {
                    //MessageBox.Show("비밀번호가 일치하지 않습니다.", "로그인실패", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    sbLoginStatus.Text      = "비밀번호가 일치하지 않습니다.";
                    sbLoginStatus.ForeColor = Color.Red;
                    PWBox.Clear();
                }
            }
            else
            {
                sbLoginStatus.Text      = "비밀번호를 적어주세요.";
                sbLoginStatus.ForeColor = Color.Red;
                //MessageBox.Show("비밀번호를 적어주세요.", "로그인실패", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }