Example #1
0
        public AsistimePassReset()
        {
            InitializeComponent();

            Label mailLabel = new Label()
            {
                Text  = "MAIL",
                Font  = Constants.H2LabelFont,
                Width = 400
            };

            this.Controls.Add(mailLabel);

            mailTextBox = new AsistimeSearchBox()
            {
                Font     = Constants.TextBoxFont,
                Parent   = this,
                Width    = 400,
                TextName = null
            };
            this.Controls.Add(mailTextBox);

            mailTextBox.Location = new Point(this.Width / 2 - mailTextBox.Width / 2, initControlsHeight);
            mailLabel.Location   = new Point(mailTextBox.Location.X, mailTextBox.Location.Y - spaceBeforeTextBox);

            resetPassButton            = new AsistimeActionButton();
            resetPassButton.Click     += new EventHandler(ResetPassword);
            resetPassButton.ButtonText = "Restablecer contraseña";
            this.Controls.Add(resetPassButton);

            //this.Load += new System.EventHandler(this.AsistimePassReset_Load);
        }
        public AsistimeSignUpPanel()
        {
            this.title.Text = "CREACIÓN DE CUENTA DE ADULTO";


            Label nameLabel = new Label()
            {
                Text  = "NOMBRE",
                Font  = Constants.H2LabelFont,
                Width = 400
            };

            this.Controls.Add(nameLabel);
            nameLabel.BringToFront();

            nameTextBox = new AsistimeSearchBox()
            {
                Font     = Constants.TextBoxFont,
                Parent   = this,
                Width    = 400,
                TextName = null
            };
            this.Controls.Add(nameTextBox);
            nameTextBox.BringToFront();

            nameTextBox.Location = new Point(this.Width / 2 - nameTextBox.Width / 2, initControlsHeight);
            nameLabel.Location   = new Point(nameTextBox.Location.X, nameTextBox.Location.Y - spaceBeforeTextBox);

            Label mailLabel = new Label()
            {
                Text  = "MAIL",
                Font  = Constants.H2LabelFont,
                Width = 400
            };

            this.Controls.Add(mailLabel);
            mailLabel.BringToFront();

            mailTextBox = new AsistimeSearchBox()
            {
                Font     = Constants.TextBoxFont,
                Parent   = this,
                Width    = 400,
                TextName = null
            };
            this.Controls.Add(mailTextBox);
            mailTextBox.BringToFront();

            mailTextBox.Location = new Point(this.Width / 2 - mailTextBox.Width / 2, nameTextBox.Location.Y + spaceBetweenTextBoxes);
            mailLabel.Location   = new Point(mailTextBox.Location.X, mailTextBox.Location.Y - spaceBeforeTextBox);

            Label passwrdLabel = new Label()
            {
                Text  = "PASSWORD",
                Font  = Constants.H2LabelFont,
                Width = 400
            };

            this.Controls.Add(passwrdLabel);
            passwrdLabel.BringToFront();

            passwrdTextBox = new AsistimeSearchBox()
            {
                Font       = Constants.TextBoxFont,
                Parent     = this,
                Width      = 400,
                TextName   = null,
                IsPassword = true
            };
            this.Controls.Add(passwrdTextBox);
            passwrdTextBox.BringToFront();

            passwrdTextBox.Location = new Point(this.Width / 2 - passwrdTextBox.Width / 2, mailTextBox.Location.Y + spaceBetweenTextBoxes);
            passwrdLabel.Location   = new Point(passwrdTextBox.Location.X, passwrdTextBox.Location.Y - spaceBeforeTextBox);

            Label passwrdConfirmationLabel = new Label()
            {
                Text  = "REPETIR PASSWORD",
                Font  = Constants.H2LabelFont,
                Width = 400
            };

            this.Controls.Add(passwrdConfirmationLabel);
            passwrdConfirmationLabel.BringToFront();

            passwrdConfirmationTextBox = new AsistimeSearchBox()
            {
                Font       = Constants.TextBoxFont,
                Parent     = this,
                Width      = 400,
                TextName   = null,
                IsPassword = true
            };
            this.Controls.Add(passwrdConfirmationTextBox);
            passwrdConfirmationTextBox.BringToFront();

            passwrdConfirmationTextBox.Location = new Point(this.Width / 2 - passwrdConfirmationTextBox.Width / 2, passwrdTextBox.Location.Y + spaceBetweenTextBoxes);
            passwrdConfirmationLabel.Location   = new Point(passwrdConfirmationTextBox.Location.X, passwrdConfirmationTextBox.Location.Y - spaceBeforeTextBox);

            registerAccountButton            = new AsistimeActionButton();
            registerAccountButton.Click     += new EventHandler(RegisterAccount);
            registerAccountButton.ButtonText = "Registrar cuenta";
            this.Controls.Add(registerAccountButton);
            registerAccountButton.BringToFront();

            backToLoginButton            = new AsistimeActionButton();
            backToLoginButton.Click     += new EventHandler(Back);
            backToLoginButton.ButtonText = "Cancelar";
            this.Controls.Add(backToLoginButton);
            backToLoginButton.BringToFront();

            int loginButtonWidth;

            using (Graphics cg = this.CreateGraphics())
            {
                SizeF size = cg.MeasureString(registerAccountButton.ButtonText, registerAccountButton.Font);
                size.Width      += 40;
                loginButtonWidth = (int)size.Width;
            }
            registerAccountButton.Location = new Point(this.Width / 2 - loginButtonWidth / 2, passwrdConfirmationTextBox.Location.Y + spaceBeforeActionButtons);

            int registerButtonWidth;

            using (Graphics cg = this.CreateGraphics())
            {
                SizeF size = cg.MeasureString(backToLoginButton.ButtonText, backToLoginButton.Font);
                size.Width         += 40;
                registerButtonWidth = (int)size.Width;
            }
            backToLoginButton.Location = new Point(this.Width / 2 - registerButtonWidth / 2, registerAccountButton.Location.Y + spaceBetweeActionButtons);
        }
Example #3
0
        public AsistimeLogin() : base()
        {
            InitializeComponent();

            Label userLabel = new Label()
            {
                Text  = "CUENTA DE MAIL",
                Font  = Constants.H2LabelFont,
                Width = 400
            };

            this.Controls.Add(userLabel);

            userTextBox = new AsistimeSearchBox()
            {
                Font     = Constants.TextBoxFont,
                Parent   = this,
                Width    = 400,
                TextName = null
            };
            this.Controls.Add(userTextBox);

            userTextBox.Location = new Point(this.Width / 2 - userTextBox.Width / 2, initControlsHeight);
            userLabel.Location   = new Point(userTextBox.Location.X, userTextBox.Location.Y - spaceBeforeTextBox);

            Label passwrdLabel = new Label()
            {
                Text  = "CONTRASEÑA",
                Font  = Constants.H2LabelFont,
                Width = 400
            };

            this.Controls.Add(passwrdLabel);

            passwrdTextBox = new AsistimeSearchBox()
            {
                Font       = Constants.TextBoxFont,
                Parent     = this,
                Width      = 400,
                TextName   = null,
                IsPassword = true
            };
            this.Controls.Add(passwrdTextBox);

            passwrdTextBox.Location = new Point(this.Width / 2 - passwrdTextBox.Width / 2, userTextBox.Location.Y + spaceBetweenTextBoxes);
            passwrdLabel.Location   = new Point(passwrdTextBox.Location.X, passwrdTextBox.Location.Y - spaceBeforeTextBox);

            loginButton            = new AsistimeActionButton();
            loginButton.Click     += new EventHandler(LogUser);
            loginButton.ButtonText = "Ingresar";
            this.Controls.Add(loginButton);

            registerButton            = new AsistimeActionButton();
            registerButton.Click     += new EventHandler(RegisterUser);
            registerButton.ButtonText = "Registrarse";
            this.Controls.Add(registerButton);

            forgotPasswordButton            = new AsistimeActionButton();
            forgotPasswordButton.Click     += new EventHandler(ForgotPassword);
            forgotPasswordButton.ButtonText = "Olvidé mi contraseña";
            this.Controls.Add(forgotPasswordButton);
        }