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; } } }
private void button9_Click(object sender, EventArgs e) { try { richTextBox1.LoadFile(@"Cbkup", RichTextBoxStreamType.PlainText); richTextBox3.LoadFile(@"Mbkup", RichTextBoxStreamType.PlainText); } catch { ShowMessage.Message("Loading file Error", "Some files are missing. Please try to reinstall.", false, "Ok", ""); ShowMessage.ShowDialog(); } }
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 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(); } }