예제 #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 LoginPanelBack(double opacity, ForgotPasswordForm form1, DarkenForm form2, string position)
        {
            InitializeComponent();
            Opacity     = opacity;
            focusedForm = form1;
            darkForm    = form2;
            mode        = "shadow";

            if (position == "top")
            {
                BackgroundImage = Properties.Resources.bt_LoginPanel3DTopShadow;
                TransparencyKey = Color.Black;
            }
            else if (position == "bottom")
            {
                BackgroundImage = Properties.Resources.bt_LoginPanel3DBottomShadow;
                TransparencyKey = Color.Black;
            }
            FormBorderStyle = FormBorderStyle.None;
        }