Esempio n. 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.checkBox1.Checked = Properties.Settings.Default.Remember;
            this.UsernameBX.Text   = Properties.Settings.Default.Username;
            //this.PasswordBX.Text = Properties.Settings.Default.Password;

            if (Properties.Settings.Default.LanguageStt.Equals("hrv"))
            {
                rbHrv.Checked = true;
                rbEng.Checked = false;
            }
            else if (Properties.Settings.Default.LanguageStt.Equals("eng"))
            {
                rbHrv.Checked = false;
                rbEng.Checked = true;
            }
            else
            {
                rbHrv.Checked = true;
                rbEng.Checked = false;
            }


            PasswordBX.SelectAll();

            Properties.Settings.Default.Save();
            if (Properties.Settings.Default.AutoLogin == true)
            {
                checkBox2.Checked = true;
                //OkBT_Click_1(sender, e);
                OkBT.PerformClick();
            }
        }
Esempio n. 2
0
 private void checkBox2_CheckedChanged(object sender, EventArgs e)
 {
     if (!UsernameBX.Equals("") && !PasswordBX.Equals(""))
     {
         if (checkBox2.Checked)
         {
             checkBox1.Checked = true;
         }
     }
 }
Esempio n. 3
0
 private void Logins()
 {
     if (!InitData.IsBusy)
     {
         if (PasswordBX.Text.Equals(""))
         {
             PasswordTLTP.ToolTipTitle = "Password";
             PasswordTLTP.Show("Please enter your password", PasswordBX);
         }
         else if (UsernameBX.Text.Equals(""))
         {
             UsernameTLTP.ToolTipTitle = "Username";
             UsernameTLTP.Show("Please enter your username", UsernameBX);
         }
         else
         {
             if (Login.Authenticate(UsernameBX.Text, PasswordBX.Text))
             {
                 ErrorLBL.Visible = false;
                 PasswordBX.Clear();
                 UsernameBX.SelectAll();
                 var mf = new MainForm {
                     Opacity  = 0,
                     Lf       = this,
                     Location = new Point(Location.X - 50, Location.Y - 66),
                     User     = UsernameBX.Text[0].ToString().ToUpper() + UsernameBX.Text.Substring(1).ToLower()
                 };
                 mf.Show();
                 Hide();
             }
             else
             {
                 ErrorLBL.Visible = true;
             }
         }
     }
 }
Esempio n. 4
0
 private void PasswordBX_Enter(object sender, EventArgs e)
 {
     PasswordBX.SelectAll();
 }