public RoomChose(string playerName, LogInForm loginForm) { InitializeComponent(); this.PlayerName = playerName; DoubleBuffered = true; this.loginForm = loginForm; }
private void guna2Button1_Click(object sender, EventArgs e) { if (Mycnt.State != ConnectionState.Open) { Mycnt.Open(); } SqlCommand com; string query; if (ishost == 1) { room_info.HostID = ""; query = string.Format("Update Roomlist set HostID ='',IsClosed ='0',IsReady ='0',IsStart ='0' where RoomID ='{0}'", room_info.RoomID); com = new SqlCommand(query, Mycnt); com.ExecuteNonQuery(); } else { room_info.GuestID = ""; query = string.Format("Update Roomlist set GuestID ='',IsClosed ='0',IsReady ='0',IsStart ='0' where RoomID ='{0}'", room_info.RoomID); com = new SqlCommand(query, Mycnt); com.ExecuteNonQuery(); } query = string.Format("update RoomList set HostID = GuestID, GuestID = ''where HostID = '' and GuestID != ''" + " delete from RoomQuestions Where RoomID in (select RoomID from RoomList Where HostId = '' and guestID = '')" + "delete from Roomlist where HostID = '' and GuestID = ''"); com = new SqlCommand(query, Mycnt); com.ExecuteNonQuery(); Mycnt.Close(); //RoomChose newroomchose = new RoomChose(Playername,this.parent.loginForm); LogInForm a = this.parent.loginForm; string b = Playername; this.parent.Dispose(); parent = new RoomChose(b, a);// sua ở đây this.Close(); this.parent.Show(); //newroomchose.Show(); }
public ResetPass(LogInForm logInForm) { this.logInForm = logInForm; InitializeComponent(); }
public SignUpForm(LogInForm logInForm) { InitializeComponent(); this.logInForm = logInForm; Control.CheckForIllegalCrossThreadCalls = false; }