Exemplo n.º 1
0
        delegate void SetCallback();//델리게이트를 이용해 쓰레드 에러 제거는 구글링을 해왔다

        private void returned()
        {
            if (rtn)
            {
                if (this.InvokeRequired)//이부분은 구글링이다
                {
                    SetCallback d = new SetCallback(returned);
                    this.Invoke(d, new object[] { });
                }
                else
                {
                    if (recv.Contains("null"))
                    {//로그인 실패시
                        MessageBox.Show("로그인 실패\n다시 입력해주세요", "로그인 에러");
                        text_id.Text = "";
                        text_pw.Text = "";
                        reciever.Abort();
                    }
                    else
                    {//성공시
                        PCRoom frm = new PCRoom(this);
                        id = text_id.Text;
                        pw = text_pw.Text;
                        frm.Show();
                        this.Hide();
                        reciever.Abort();
                    }
                }
            }
        }
Exemplo n.º 2
0
 public void setMainFrm(PCRoom _frm)//정보를 보낼 폼을 설정
 {
     mainFrm = _frm;
     frm_num = 1;
 }