Ejemplo n.º 1
0
        private void load()
        {
            Titulo      = "Ingresa con tu cuenta";
            Add(textbox = new NumberBox
            {
                PlaceholderText = "Numero de cuenta",
                Height          = 30,
                Width           = 250,
                Anchor          = Anchor.Centre,
                Origin          = Anchor.BottomCentre,
                LengthLimit     = 6,
                Y = -30 / 2f * 3 - 10,
            });
            Add(passbox = new PasswordTextBox
            {
                PlaceholderText = "NIP/Contraseña",
                Height          = 30,
                Width           = 250,
                Anchor          = Anchor.Centre,
                Origin          = Anchor.BottomCentre,
                Y = -30 / 2f - 5
            });
            Add(submit = new BotonHover
            {
                Size             = new Vector2(250, 30),
                BackgroundColour = disabledColor,
                Text             = "Entrar",
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
            });
            Add(textUser = new SpriteText
            {
                Text   = "Cuenta o PIN incorrectos",
                Font   = new FontUsage(size: 30),
                Anchor = Anchor.Centre,
                Origin = Anchor.TopCentre,
                Y      = 30 / 2f * 3 + 10,
                Colour = Color4.OrangeRed,
                Alpha  = 0f,
            });
            submit.Action       += obtenerCuenta;
            submit.Enabled.Value = false;

            passbox.Current.ValueChanged += _ => checkButton();
            textbox.Current.ValueChanged += _ => checkButton();
        }
Ejemplo n.º 2
0
        public DepositoPropioUsuario(CuentaCliente cuenta)
        {
            ColorFondoTitulo = Color4.MediumSlateBlue;
            Titulo           = "Configure su deposito";
            OnAlertHide      = guardarRetiro;
            this.cuenta      = cuenta;
            Add(textbox      = new DecimalBox
            {
                PlaceholderText = "Cantidad",
                Height          = 30,
                Width           = 250,
                Anchor          = Anchor.Centre,
                Origin          = Anchor.BottomCentre,
                Y = -30 / 2f - 10,
            });
            Add(submit = new BotonHover
            {
                Size             = new Vector2(250, 30),
                BackgroundColour = disabledColor,
                Text             = "Entrar",
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
            });
            Add(new BotonOpcion
            {
                Anchor           = Anchor.BottomLeft,
                Origin           = Anchor.BottomLeft,
                BackgroundColour = Color4.OrangeRed,
                Icono            = FontAwesome.Solid.ArrowCircleLeft,
                Text             = "Regresar",
                Margin           = new MarginPadding(20),
                Action           = this.Exit,
            });

            submit.Action       += revisarRetiro;
            submit.Enabled.Value = false;

            textbox.Current.ValueChanged += _ => CheckButton();
        }
Ejemplo n.º 3
0
        public RetiroUsuario(CuentaCliente cuenta)
        {
            this.cuenta = cuenta;

            Add(submit20 = new BotonHover
            {
                Size             = new Vector2(250, 30),
                BackgroundColour = new Color4(90, 120, 198, 255),
                Text             = "$20",
                Anchor           = Anchor.Centre,
                Origin           = Anchor.CentreRight,
                Position         = new Vector2(-5, -35),
                Action           = () => retirar(20)
            });
            Add(submit40 = new BotonHover
            {
                Size             = new Vector2(250, 30),
                BackgroundColour = new Color4(90, 120, 198, 255),
                Text             = "$40",
                Anchor           = Anchor.Centre,
                Origin           = Anchor.CentreLeft,
                Position         = new Vector2(5, -35),
                Action           = () => retirar(40)
            });
            Add(submit60 = new BotonHover
            {
                Size             = new Vector2(250, 30),
                BackgroundColour = new Color4(90, 120, 198, 255),
                Text             = "$60",
                Anchor           = Anchor.Centre,
                Origin           = Anchor.CentreRight,
                Action           = () => retirar(60),
                X = -5
            });
            Add(submit100 = new BotonHover
            {
                Size             = new Vector2(250, 30),
                BackgroundColour = new Color4(90, 120, 198, 255),
                Text             = "$100",
                Anchor           = Anchor.Centre,
                Origin           = Anchor.CentreLeft,
                Action           = () => retirar(100),
                X = 5
            });
            Add(submit200 = new BotonHover
            {
                Size             = new Vector2(250, 30),
                BackgroundColour = new Color4(90, 120, 198, 255),
                Text             = "$200",
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
                Action           = () => retirar(200),
                Y = 35
            });
            Add(new BotonOpcion
            {
                Anchor           = Anchor.BottomLeft,
                Origin           = Anchor.BottomLeft,
                BackgroundColour = Color4.OrangeRed,
                Icono            = FontAwesome.Solid.ArrowCircleLeft,
                Text             = "Regresar",
                Margin           = new MarginPadding(20),
                Action           = this.Exit,
            });
            ColorFondoTitulo = Color4.MediumSlateBlue;
            Titulo           = "Realiza un retiro";
        }