/// <summary> /// clears all available text fields /// </summary> private void ClearTextFields() { First_Name_text.Clear(); Last_name_text.Clear(); Address_text.Clear(); City_text.Clear(); States_text.Clear(); ZIP_text.Clear(); Phone_text.Clear(); Email_text.Clear(); }
private void SingUp_Btn_Click(object sender, EventArgs e) { if (CheckID_Btn.Enabled) { MessageBox.Show("아이디 확인을 해주세요.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); ID_text.Focus(); return; } if (PW_text.Text.Length < 8) { MessageBox.Show("비밀번호는 8자 이상 입력하셔야합니다.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); PW_text.Focus(); return; } if (Email_text.Text.Length == 0 || Email_Combo.SelectedItem.ToString().Length == 0) { MessageBox.Show("이메일을 입력하세요.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Email_text.Focus(); return; } Http http = new Http("SignUp.php"); http.PostParam.Append("ID=" + ID_text.Text); http.PostParam.Append("&PW=" + PW_text.Text); http.PostParam.Append("&Email=" + Email_text.Text + "@" + Email_Combo.SelectedItem.ToString()); http.Data = UTF8Encoding.UTF8.GetBytes(http.PostParam.ToString()); string result = http.Client_To_Server(); if (result.Equals("-1"))//회원 가입 실패 { MessageBox.Show("회원 가입도중 오류가 났습니다 잠시 후 다시 실행해주세요.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (result.Equals("1"))//회원 가입 성공 { F_Account = new Account(Home_Panel, ID_text.Text); F_Account.TopLevel = false; F_Account.Dock = System.Windows.Forms.DockStyle.Fill; Home_Panel.Controls.Add(F_Account); F_Account.Show(); Close(); } }