コード例 #1
0
        private void Button_ForgotPassword_Click(object sender, EventArgs e)
        {
            ForgotPasswordForm forgotPassword = new ForgotPasswordForm();
            DarkenForm         dark1          = new DarkenForm(.7, forgotPassword);
            DarkenForm         dark2          = new DarkenForm(.7, forgotPassword);
            LoginPanelBack     dark3          = new LoginPanelBack(.7, forgotPassword, dark2, "top");
            LoginPanelBack     dark4          = new LoginPanelBack(.7, forgotPassword, dark2, "bottom");

            dark1.Size     = dark1.MinimumSize = dark1.MaximumSize = new Size(Width / 2, Height);
            dark1.Location = new Point(Left, Top);
            dark1.Owner    = this;

            dark2.Size     = dark2.MinimumSize = dark2.MaximumSize = new Size(loginPanel.Width, loginPanel.Height);
            dark2.Location = new Point(loginPanel.Left, loginPanel.Top);
            dark2.Owner    = loginPanel;

            dark3.Size     = dark3.MinimumSize = dark3.MaximumSize = new Size(20, 20);
            dark3.Location = new Point(Left + ((Width / 2) - 20), Top - 20);
            dark3.Owner    = this;

            dark4.Size     = dark4.MinimumSize = dark4.MaximumSize = new Size(20, 20);
            dark4.Location = new Point(Left + ((Width / 2) - 20), Bottom);
            dark4.Owner    = this;

            forgotPassword.GetDarkenForms(dark1, dark2, dark3, dark4);
            forgotPassword.Location = new Point(Left + Width / 4, Top + Height / 4);
            forgotPassword.Owner    = this;

            dark3.Show();
            dark4.Show();
            dark1.Show();
            dark2.Show();
            forgotPassword.Show();
        }
コード例 #2
0
 public void GetDarkenForms(DarkenForm form1, DarkenForm form2, LoginPanelBack form3, LoginPanelBack form4)
 {
     dark1 = form1;
     dark2 = form2;
     dark3 = form3;
     dark4 = form4;
 }
コード例 #3
0
        public LoginForm()
        {
            InitializeComponent();

            if (Properties.Settings.Default.StayLoggedIn == true)
            {
                CheckBox_StayLoggedIn.Checked = true;
            }
            else
            {
                CheckBox_StayLoggedIn.Checked = false;
            }

            SplashPage1 = new SplashForm(1);
            SplashPage2 = new SplashForm(2);
            SplashPage3 = new SplashForm(3);
            SplashPage4 = new SplashForm(4);

            loginPanel          = new LoginPanel(SplashPage1, SplashPage2, SplashPage3, SplashPage4);
            loginPanel.Location = new Point(Left + (Width / 2), Top - 20);
            loginPanel.Owner    = this;

            loginPanelBackTop          = new LoginPanelBack(loginPanel, "top");
            loginPanelBackTop.Location = new Point(Left + ((Width / 2) - 20), Top - 20);
            loginPanelBackTop.Owner    = this;

            loginPanelBackBottom          = new LoginPanelBack(loginPanel, "bottom");
            loginPanelBackBottom.Location = new Point(Left + ((Width / 2) - 20), Bottom);
            loginPanelBackBottom.Owner    = this;

            SplashPage1.Location = new Point(loginPanel.Left + 41, loginPanel.Top + 137);
            SplashPage1.Owner    = loginPanel;

            SplashPage2.Location = new Point(loginPanel.Left + 41, loginPanel.Top + 137);
            SplashPage2.Owner    = loginPanel;

            SplashPage3.Location = new Point(loginPanel.Left + 41, loginPanel.Top + 137);
            SplashPage3.Owner    = loginPanel;

            SplashPage4.Location = new Point(loginPanel.Left + 41, loginPanel.Top + 137);
            SplashPage4.Owner    = loginPanel;

            SplashPage1.Opacity = 1;

            loginPanelBackTop.Show();
            loginPanelBackBottom.Show();
            loginPanel.Show();
            loginPanel.BringToFront();

            SplashPage1.Show();
            SplashPage2.Show();
            SplashPage3.Show();
            SplashPage4.Show();
        }