private void button1_Click(object sender, EventArgs e)//로그인 버튼 클릭 { reciever = new Thread(new ThreadStart(returned)); reciever.Start(); string _id = text_id.Text; string _pw = text_pw.Text; string query = "select name_room,seatnum from owner where ID = '" + _id + "' and PW = '" + _pw + "'"; socket.changeFrmNum(0); socket.send(query); }
private void button1_Click(object sender, EventArgs e) {//회원가입 버튼 클릭시 string id = text_id.Text; string pw = text_pw.Text; string name = text_name.Text; string x = text_x.Text; string y = text_y.Text; string sit = "00000000000000000000000000000000000000000000000000"; string query = "Insert into owner (ID,PW,name_room,seatnum,loc_x,loc_y,socket_num) values ('" + id + "','" + pw + "','" + name + "','" + sit + "'," + x + "," + y + "," + 0 + ")"; text_id.Text = query; socketLink.changeFrmNum(2); socketLink.send(query); this.Close(); }
private void sit_Click(object sender, EventArgs e) {//좌석 버튼을 눌렀을 때 정보가 변하고 서버로 변한 정보를 업데이트 함 Label clicked = (Label)sender; if (sit[clicked.TabIndex - 1] == 0) { sit[clicked.TabIndex - 1] = 1; clicked.BackColor = Color.DimGray; } else { sit[clicked.TabIndex - 1] = 0; clicked.BackColor = Color.Silver; } string sitlist = ""; for (int i = 0; i < 50; i++) { sitlist = sitlist + sit[i].ToString(); } string query = "update owner set seatnum = '" + sitlist + "' where id = '" + frm.id + "'"; socketLink.send(query); }