Ejemplo n.º 1
0
        /*=====================================================*\
        |                   Login UI visuals                    |
        \*=====================================================*/
        private void LoginUsernameInput_Enter(object sender, EventArgs e)
        {
            if (LoginUsernameInput.ForeColor == Color.Gray)
            {
                LoginUsernameInput.Clear();
            }

            LoginUsernameInput.ForeColor = Color.White;
            LoginUnderline1.BackColor    = Color.FromArgb(78, 184, 206);
        }
Ejemplo n.º 2
0
 private void LoginPasswordInput_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (LoginUsernameInput.ForeColor != Color.Gray && LoginPasswordInput.ForeColor != Color.Gray)
         {
             if (LoginPasswordInput.Text != "")
             {
                 login();
             }
         }
         else if (LoginUsernameInput.ForeColor == Color.Gray)
         {
             LoginUsernameInput.Focus();
         }
     }
 }