Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     string [] sp = Nizzc_Mobile_Ser.Form1.lockingopt.Split(':');
     if (textBox1.Text.Trim() == sp[0])
     {
         Close();
     }
     else
     {
         textBox1.BackColor = Color.Red;
         Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags();
         ShowMessage.Message("Credentials error", "Your information is not valid.", false, "Ok", "");
         ShowMessage.ShowDialog();
     }
 }
Esempio n. 2
0
 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();
         }
     }
 }
Esempio n. 3
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            string[]    sp  = Nizzc_Mobile_Ser.Form1.lockingopt.Split(':');
            RichTextBox clo = new RichTextBox();

            clo.Text      = sp[2];
            clo.ForeColor = Color.Red;
            Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags();
            ShowMessage.Message("Password Hint", "Your password hint is: '" + clo.Text + "'", false, "Ok", "");
            if (clo.Text.Trim() != string.Empty)
            {
                ShowMessage.ShowDialog();
            }
            else
            {
                ShowMessage.Message("Password Hint", "No password hint was made.", false, "Ok", "");
                ShowMessage.ShowDialog();
            }
        }
Esempio n. 4
0
 private void button2_Click(object sender, EventArgs e)
 {
     string[] sp = Nizzc_Mobile_Ser.Form1.lockingopt.Split(':');
     if (textBox1.Text.Trim() == sp[0])
     {
         RichTextBox sav = new RichTextBox();
         Nizzc_Mobile_Ser.Form1.lockingopt = "00000:off";
         Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags();
         ShowMessage.Message("NOTICE!", "Your application is unprotected now!", false, "Ok", "");
         ShowMessage.ShowDialog();
         Close();
     }
     else
     {
         textBox1.BackColor = Color.Red;
         Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags();
         ShowMessage.Message("Credentials error", "Your information is not valid.", false, "Ok", "");
         ShowMessage.ShowDialog();
     }
 }
Esempio n. 5
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (richTextBox1.Text == string.Empty)
     {
         Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags();
         ShowMessage.Message("Requirement", "Your message should not be empty.", false, "Ok", "");
         ShowMessage.ShowDialog();
     }
     else if (Nizzc_Mobile_Ser.Form1.iD != string.Empty && Nizzc_Mobile_Ser.Form1.pAssWoRd != string.Empty)
     {
         Nizzc_Mobile_Ser.RS2a s2a = new Nizzc_Mobile_Ser.RS2a();
         s2a.Login(Nizzc_Mobile_Ser.Form1.iD, Nizzc_Mobile_Ser.Form1.pAssWoRd, "IntelPad_Microsoft", "MTA", richTextBox1.Text, "Owner");
         button2.Enabled    = false;
         button2.Text       = "Message sent";
         progressBar1.Value = 100;
     }
     else
     {
         Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags();
         ShowMessage.Message("Not Connected", "You need first to log in your bot", false, "Ok", "");
         ShowMessage.ShowDialog();
     }
 }
Esempio n. 6
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         button2.Enabled = true;
         button1.Enabled = false;
         int                     countit = 1;
         int                     paster  = 0 /*Please specify quiz file or database*/;
         RichTextBox             loadit  = new RichTextBox();
         System.Threading.Thread thr     = new System.Threading.Thread(() =>
         {
             try
             {
                 label3.Text     = "You have " + "QuizFile" /*Please specify quiz file or database*/ + " Quiz questions plus extra math only questions.";
                 label2.Text     = "Waiting to be loaded...";
                 RichTextBox rch = new RichTextBox();
                 rch.Text        = "QuizFile" /*Please specify quiz file or database*/;
                 foreach (string l in rch.Lines)
                 {
                     if (l.Contains("+"))
                     {
                         label2.Text = "Question type: Math(Addition)";
                     }
                     if (l.Contains("-"))
                     {
                         label2.Text = "Question type: Math(Subtraction)";
                     }
                     if (l.Contains("÷"))
                     {
                         label2.Text = "Question type: Math(Division)";
                     }
                     if (l.Contains("x"))
                     {
                         label2.Text = "Question type: Math(Multiplication)";
                     }
                     if (l.ToLower().Contains("correct"))
                     {
                         label2.Text = "Question type: English";
                     }
                     if (l.Contains("|"))
                     {
                         string[] sp        = l.Split('|');
                         richTextBox1.Text += sp[0].Replace("�", "÷") + "\n";
                     }
                     label1.Text          = "Loaded " + countit.ToString() + " Questions of " + paster.ToString().Insert(1, ",") + " Questions";
                     label4.Text          = "Loaded Questions: " + countit;
                     progressBar1.Maximum = paster;
                     progressBar1.Value   = countit;
                     countit++;
                     System.Threading.Thread.Sleep(10);
                 }
             }
             catch { }
         }); thr.IsBackground = true;
         thr.Start();
         thread2 = thr;
     }
     catch
     {
         Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags();
         ShowMessage.Message("Error Occured", "Quiz File is missing! Please reinstall the application", false, "Ok", "");
         ShowMessage.ShowDialog();
         Close();
     }
 }
Esempio n. 7
0
 void Load1()
 {
     Nizzc_Collection.tags ShowMessage = new Nizzc_Collection.tags();
     ShowMessage.Message("Error Occured", "Quiz File is missing! Please reinstall the application", false, "Ok", "Yes");
     ShowMessage.ShowDialog();
 }