private void Loginbtn_Click(object sender, EventArgs e) { Loginbtn.ImageIndex = 2; if ((UsrTxtbox.Text.Contains("USERNAME") == false) & (PssTxtbox.Text.Contains("PASSWORD") == false)) { string[] lines = File.ReadAllLines("main.js"); lines[23] = string.Format("USERNAME = \"{0}\"", UsrTxtbox.Text); lines[25] = string.Format("PASSWORD = \"{0}\"", PssTxtbox.Text); File.WriteAllLines("main.js", lines); this.Hide(); RefToForm1.Visible = true; RefToForm1.TopMost = true; RefToForm1.Show(); RefToForm1.BringToFront(); RefToForm1.Focus(); RefToForm1.TopMost = false; } else { Emptywarning.Visible = true; } }
private void Back_Click(object sender, EventArgs e) { this.Close(); RefToForm1.Show(); }