Exemple #1
0
        private void bunifuFlatButton2_Click(object sender, EventArgs e)
        {
            string username = bunifuMetroTextbox1.Text;
            string password = bunifuMetroTextbox2.Text;

            if ((bunifuMetroTextbox1.Text == string.Empty) || (bunifuMetroTextbox2.Text == string.Empty))
            {
                MessageBox.Show("Please enter a username and password.", "Insta Tool Info");
            }
            else
            {
                authClass authentication = new authClass();
                bool      authStatus     = authentication.authenticate(username, password);

                if (authStatus == false)
                {
                    bunifuCustomLabel6.Text = "Could not authenticate as: " + username;
                }
                else
                {
                    this.Hide();
                    var form1 = new Form1();
                    form1.Closed += (s, args) => this.Close();
                    form1.Show();
                }
            }
        }
Exemple #2
0
        private void bunifuFlatButton2_Click(object sender, EventArgs e)
        {
            string username = bunifuMetroTextbox1.Text;
            string password = bunifuMetroTextbox2.Text;
            string keygen   = bunifuMetroTextbox3.Text;

            if ((bunifuMetroTextbox1.Text == string.Empty) || (bunifuMetroTextbox2.Text == string.Empty) || (bunifuMetroTextbox3.Text == string.Empty))
            {
                MessageBox.Show("Please enter a username, a password and a serial key.", "Insta Tool Info");
            }
            else
            {
                authClass authentication = new authClass();
                bool      registerStatus = authentication.register(username, password, keygen);

                if (registerStatus == false)
                {
                    bunifuCustomLabel6.Text = "Could not register: " + username + ". Please try again.";
                }
                else
                {
                    MessageBox.Show("The account: " + username + " was successful registered. You can login now.", "Insta Tool Info");
                    this.Hide();
                    var auth = new auth();
                    auth.Closed += (s, args) => this.Close();
                    auth.Show();
                }
            }
        }