public void Register() { WebClient client = new WebClient(); try { string response = client.DownloadString(url); } catch (Exception /*ex*/) { MessageBox.Show("Cant connect to RegServer", "Error"); return; } Request(); if (Response.Contains("In use")) { MessageBox.Show("This E-mail or Username is already in use!", "Error"); } if (Response.Contains("registered succesfully!")) { MessageBox.Show("Registered Succesfully! You may now login!", "Info"); LoginForm frm = new LoginForm(); frm.Show(); this.Hide(); } if (Response.Contains("register failed!")) { MessageBox.Show("Register failed!", "Error"); } }
private void btnClose_Click(object sender, EventArgs e) { LoginForm frm = new LoginForm(); frm.Show(); this.Hide(); }