private void button1_Click(object sender, EventArgs e) { string i = textBox1.Text; switch (i.Trim()) { case "": { textBox1.BackColor = Color.Red; break; } default: { if ((check == "yes" && textBox1.Text.EndsWith("#")) || (check == "no" && !textBox1.Text.EndsWith("#"))) { Nizzc_Collection.Form4.com2.Text = textBox1.Text; Nizzc_Collection.Form4.com1.Text = Nizzc_Collection.Form4.com2.Text; Close(); } else { Nizzc_Collection.tags show = new tags(); if (check == "yes") { show.Message("Command Error", "You should end your command with '#'", false, "Ok", ""); show.ShowDialog(); } else if (check == "no") { show.Message("Command Error", "You should NOT end your command with '#'", false, "Ok", ""); show.ShowDialog(); } } break; } } }
public Form4() { InitializeComponent(); try { Botmanager.LoadFile(@"org", RichTextBoxStreamType.PlainText); } catch { Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags(); ShowMessage.Message("Error occured!", "Some files are missing. The application may not work perfectly. Please reinstall the application.", false, "Ok", ""); ShowMessage.ShowDialog(); } }
private void button1_Click(object sender, EventArgs e) { if (this.textBox1.Text.Trim() == string.Empty || textBox1.Text.Length < 5) { textBox1.BackColor = Color.Red; Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags(); ShowMessage.Message("Requirement", "Password should be at least 6 digits.", false, "Ok", ""); ShowMessage.ShowDialog(); //textBox3.BackColor = Color.White; textBox2.BackColor = Color.White; label4.BackColor = Color.Transparent; } else if (textBox2.Text.Trim() == string.Empty || textBox2.Text.Trim() != textBox1.Text.Trim()) { textBox2.BackColor = Color.Red; //label4.Text = "Passwords is not matched"; Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags(); ShowMessage.Message("Password Match error", "Your passwords are not matched", false, "Ok", ""); ShowMessage.ShowDialog(); textBox1.BackColor = Color.White; // textBox3.BackColor = Color.White; label4.BackColor = Color.Transparent; } else if (textBox1.Text.Trim() != string.Empty && textBox2.Text.Trim() == textBox1.Text.Trim()) { if (textBox3.Text.Trim() == textBox1.Text.Trim()) { Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags(); ShowMessage.Message("Password hint error", "Hint should not be same to your password.", false, "Ok", ""); ShowMessage.ShowDialog(); } else { label4.BackColor = Color.Transparent; // textBox3.BackColor = Color.White; textBox2.BackColor = Color.White; textBox1.BackColor = Color.White; Nizzc_Mobile_Ser.Form1.lockingopt = textBox1.Text + ":on:" + textBox3.Text; Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags(); ShowMessage.Message("Success", "Locker activated! \nTo lock the application click 'Lock' button.", false, "Ok", ""); ShowMessage.ShowDialog(); tags t = new tags(); Close(); } } }
private void button2_Click(object sender, EventArgs e) { try { string[] sp = originalHELP.Text.Split('|'); cm1.Text = sp[0]; cm2.Text = sp[1]; cm3.Text = sp[2]; cm4.Text = sp[3]; } catch { tags msgshow = new tags(); msgshow.Message("Error", "There is error occured!", false, "Ok", "Ok"); msgshow.ShowDialog(); } }
private void button1_Click(object sender, EventArgs e) { try { SetCommands.Text = cm1.Text + "|" + cm2.Text + "|" + cm3.Text + "|" + cm4.Text; SetCommands.SaveFile(@"spcm", RichTextBoxStreamType.PlainText); SetCommands.SaveFile(@"spcm", RichTextBoxStreamType.PlainText); IsOk = true; tags msgshow = new tags(); msgshow.Message("Information", "Commands saved!", false, "Ok", "Ok"); msgshow.ShowDialog(); Close(); } catch (Exception v) { tags msgshow = new tags(); msgshow.Message("Error", "There is error occured while saving", false, "Ok", "Ok"); msgshow.ShowDialog(); } }
private void button8_Click(object sender, EventArgs e) { if (rich1 == richTextBox1.Text && rich3 == richTextBox3.Text) { Close(); } else { Nizzc_Collection.tags show = new tags(); show.Message("Confirmation", "There are unsaved changes made. Do you want to save?", true, "No", "Yes"); show.ShowDialog(); if (Nizzc_Mobile_Ser.Form1.YesNo == "yes") { button10.PerformClick(); } else { Close(); } } }
private void button10_Click(object sender, EventArgs e) { if (Form1.Con.Trim().ToLower() != "connected") { cl.Text = richTextBox1.Text; ml.Text = richTextBox3.Text; richTextBox1.SaveFile(@"Amarada", RichTextBoxStreamType.PlainText); richTextBox1.SaveFile(@"Amarada", RichTextBoxStreamType.PlainText); richTextBox3.SaveFile(@"Oraahda", RichTextBoxStreamType.PlainText); richTextBox3.SaveFile(@"Oraahda", RichTextBoxStreamType.PlainText); Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags(); ShowMessage.Message("Information", "All changes are saved", false, "Ok", ""); ShowMessage.ShowDialog(); Form1.ifch = "yes"; this.Close(); } else { Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags(); ShowMessage.Message("Saving Error", "Couldn't save changes while bot is connected.", false, "Ok", ""); ShowMessage.ShowDialog(); } }