コード例 #1
0
        private void TextBox_RegisterUsername_Leave(object sender, EventArgs e)
        {
            if (TextBox_RegisterUsername.TextLength == 0)
            {
                Label_RegisterUsernameSeparator.BackColor = Color.FromArgb(119, 119, 136);

                registerUserX = Label_RegisterUsername.Location.X;
                registerUserY = Label_RegisterUsername.Location.Y;

                while (Label_RegisterUsername.Location.Y != 164)
                {
                    registerUserY += 1;
                    Label_RegisterUsername.Location = new Point(registerUserX, registerUserY);
                    Thread.Sleep(3);
                }
            }
            else
            {
                Label_RegisterUsernameSeparator.BackColor   = Color.FromArgb(38, 174, 96);
                TextBox_RegisterUsername.ForeColor          = Color.FromArgb(38, 174, 96);
                PictureBox_RegisterUsername.BackgroundImage = USERNAME_SUCCESS;
                Button_Register.BackColor = Color.FromArgb(255, 85, 0);
                Label_RegisterUsernameError.Hide();
            }
        }
コード例 #2
0
        private void ShowRegisterUsernameError(string message)
        {
            Label_RegisterUsernameError.Text = message;
            Label_RegisterUsernameError.Show();

            Label_RegisterUsernameSeparator.BackColor   = Color.FromArgb(255, 85, 85);
            TextBox_RegisterUsername.ForeColor          = Color.FromArgb(255, 85, 85);
            PictureBox_RegisterUsername.BackgroundImage = ERROR;
            Button_Register.BackColor = Color.FromArgb(255, 85, 85);
        }
コード例 #3
0
        private void Button_GoToLogin_Click(object sender, EventArgs e)
        {
            TextBox_RegisterUsername.Clear();
            TextBox_RegisterPassword.Clear();
            TextBox_RegisterEmail.Clear();

            lpX  = loginPanel.Location.X;
            lpY  = loginPanel.Location.Y;
            sp1X = SplashPage1.Location.X;
            sp1Y = SplashPage1.Location.Y;
            sp2X = SplashPage2.Location.X;
            sp2Y = SplashPage2.Location.Y;
            sp3X = SplashPage3.Location.X;
            sp3Y = SplashPage3.Location.Y;
            sp4X = SplashPage4.Location.X;
            sp4Y = SplashPage4.Location.Y;

            while (loginPanel.Location.X != (Left + (Width / 2)))
            {
                lpX  += 1;
                sp1X += 1;
                sp2X += 1;
                sp3X += 1;
                sp4X += 1;
                loginPanel.Location  = new Point(lpX, lpY);
                SplashPage1.Location = new Point(sp1X, sp1Y);
                SplashPage2.Location = new Point(sp2X, sp2Y);
                SplashPage3.Location = new Point(sp3X, sp3Y);
                SplashPage4.Location = new Point(sp4X, sp4Y);
            }
            position = 'r';

            passwordVisible = false;
            HidePasswords();

            Label_RegisterUsername.Location = new Point(29, 164);
            Label_RegisterPassword.Location = new Point(29, 253);
            Label_RegisterEmail.Location    = new Point(29, 339);

            Label_RegisterUsernameSeparator.BackColor = Color.FromArgb(119, 119, 136);
            Label_RegisterPasswordSeparator.BackColor = Color.FromArgb(119, 119, 136);
            Label_RegisterEmailSeparator.BackColor    = Color.FromArgb(119, 119, 136);

            PictureBox_RegisterUsername.BackgroundImage = USERNAME;
            PictureBox_RegisterPassword.BackgroundImage = PASSWORD;
            PictureBox_RegisterEmail.BackgroundImage    = EMAIL;

            Label_RegisterUsernameError.Hide();
            Label_RegisterPasswordError.Hide();
            Label_RegisterEmailError.Hide();
        }