Exemple #1
0
        public AsistimeMultilineTextbox()
        {
            box        = new AsistimeSearchBox();
            box.Width  = 400;
            box.Height = 300;
            this.Controls.Add(box);
            box.BringToFront();

            textbox           = new TextBox();
            textbox.Multiline = true;
            textbox.Width     = 380; //20 menos que el ancho del searchbox
            textbox.Height    = 280; //20 menos que la altura del searchbox
            textbox.Location  = new Point(10, 10);
            this.Controls.Add(textbox);
            textbox.BorderStyle = BorderStyle.None;
            textbox.Font        = Constants.TextBoxFont;
            textbox.BringToFront();

            textbox.Text = texto;
        }
        public AsistimeRegister() : base()
        {
            InitializeComponent();

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

            this.Controls.Add(nameLabel);

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

            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);

            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, nameTextBox.Location.Y + spaceBetweenTextBoxes / 2);
            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);

            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, mailTextBox.Location.Y + spaceBetweenTextBoxes / 2);
            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);

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

            passwrdConfirmationTextBox.Location = new Point(this.Width / 2 - passwrdConfirmationTextBox.Width / 2, passwrdTextBox.Location.Y + spaceBetweenTextBoxes / 2);
            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);

            backToLoginButton            = new AsistimeActionButton();
            backToLoginButton.Click     += new EventHandler(BackToLogin);
            backToLoginButton.ButtonText = "Volver al Login";
            this.Controls.Add(backToLoginButton);
        }
Exemple #3
0
        public TextElement()
        {
            this.Width     = 700;
            this.Height    = 450;
            this.BackColor = Color.White;

            Panel frontPanel = new Panel();

            frontPanel.Width     = this.Width - 10;
            frontPanel.Height    = this.Height - 10;
            frontPanel.BackColor = Color.White;
            frontPanel.Location  = new Point(this.Location.X + 5, this.Location.Y + 5);
            Controls.Add(frontPanel);
            frontPanel.SendToBack();
            frontPanel.Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, frontPanel.Width, frontPanel.Height, 18, 18));

            Panel backPanel = new Panel();

            backPanel.Width     = this.Width;
            backPanel.Height    = this.Height;
            backPanel.BackColor = ColorTranslator.FromHtml(Constants.AppSecondaryColour);
            backPanel.Location  = new Point(this.Location.X, this.Location.Y);
            Controls.Add(backPanel);
            backPanel.SendToBack();

            title = new Label()
            {
                Text      = "ESCRIBÍ EL TEXTO",
                Font      = Constants.HLabelFont,
                Width     = 400,
                Height    = 40,
                TextAlign = ContentAlignment.MiddleCenter,
            };
            title.Location = new Point(this.Width / 2 - title.Width / 2, 50);
            this.Controls.Add(title);
            title.BringToFront();

            subTitle           = new TextBox();
            subTitle.Multiline = true;
            subTitle.Width     = 450;
            subTitle.Height    = 100;
            this.Controls.Add(subTitle);
            subTitle.BorderStyle = BorderStyle.None;
            subTitle.Font        = Constants.H2LabelFont;
            subTitle.BringToFront();
            subTitle.Text      = "Escribí el texto que quieras colocar en pantalla. Recordá no colocarlo donde el adulto tenga que hacer click.";
            subTitle.TextAlign = HorizontalAlignment.Center;
            subTitle.Location  = new Point(this.Width / 2 - subTitle.Width / 2, 120);
            subTitle.TabStop   = false;
            subTitle.BringToFront();

            textbox = new AsistimeSearchBox()
            {
                Font     = Constants.TextBoxFont,
                Parent   = this,
                Width    = 400,
                TextName = null
            };
            textbox.Location = new Point(this.Width / 2 - title.Width / 2, title.Location.Y + 220);
            this.Controls.Add(textbox);
            textbox.BringToFront();


            BackButton = new AsistimeRoundButton(98, 98, Constants.CancelRedImageW, Constants.CancelRedHoverImageW, Constants.CancelRedClickImageW)
            {
                Parent = this.Parent
            };
            BackButton.Location = new Point(30, this.Height - 128);
            BackButton.Click   += new EventHandler(this.Back);
            this.Controls.Add(BackButton);
            BackButton.BringToFront();

            ForwardButton = new AsistimeRoundButton(98, 98, Constants.ConfirmGreenImageW, Constants.ConfirmGreenHoverImageW, Constants.ConfirmGreenClickImageW)
            {
                Parent = this.Parent
            };
            ForwardButton.Location = new Point(572, this.Height - 128);
            ForwardButton.Click   += new EventHandler(this.Forward);
            this.Controls.Add(ForwardButton);
            ForwardButton.BringToFront();

            Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
        }
Exemple #4
0
        public AsistimeCreatePanel()
        {
            this.title.Text = "CREACIÓN DE TOUR";

            tourNameLabel = new Label()
            {
                Text  = "NOMBRE DEL TOUR",
                Font  = Constants.H2LabelFont,
                Width = 400
            };
            this.Controls.Add(tourNameLabel);
            tourNameLabel.BringToFront();

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

            Label tourDescTextBox = new Label()
            {
                Text  = "DESCRIPCIÓN",
                Font  = Constants.H2LabelFont,
                Width = 400
            };

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

            box        = new AsistimeSearchBox();
            box.Width  = 400;
            box.Height = 300;
            this.Controls.Add(box);
            box.BringToFront();

            textbox           = new TextBox();
            textbox.Multiline = true;
            textbox.Width     = 380; //20 menos que el ancho del searchbox
            textbox.Height    = 280; //20 menos que la altura del searchbox
            this.Controls.Add(textbox);
            textbox.BorderStyle = BorderStyle.None;
            textbox.Font        = Constants.H2LabelFont;
            textbox.BringToFront();

            box.Location             = new Point(this.Width / 2 - box.Width / 2, 260);
            textbox.Location         = new Point(box.Location.X + 10, box.Location.Y + 10);
            tourDescTextBox.Location = new Point(box.Location.X, box.Location.Y - 30);
            tourNameTextBox.Location = new Point(this.Width / 2 - tourNameTextBox.Width / 2, 150);
            tourNameLabel.Location   = new Point(tourNameTextBox.Location.X, tourNameTextBox.Location.Y - 30);

            nextButton            = new AsistimeActionButton();
            nextButton.Click     += new EventHandler(Next);
            nextButton.ButtonText = "Siguiente";
            this.Controls.Add(nextButton);
            nextButton.BringToFront();

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

            int nextButtonWidth;

            using (Graphics cg = this.CreateGraphics())
            {
                SizeF size = cg.MeasureString(nextButton.ButtonText, nextButton.Font);
                size.Width     += 40;
                nextButtonWidth = (int)size.Width;
            }
            nextButton.Location = new Point(this.Width / 2 - nextButtonWidth / 2, 600);

            int cancelButtonWidth;

            using (Graphics cg = this.CreateGraphics())
            {
                SizeF size = cg.MeasureString(cancelButton.ButtonText, cancelButton.Font);
                size.Width       += 40;
                cancelButtonWidth = (int)size.Width;
            }
            cancelButton.Location = new Point(this.Width / 2 - cancelButtonWidth / 2, nextButton.Location.Y + 80);
        }
        public AsistimeAppBar()
        {
            BackColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour);
            ForeColor = ColorTranslator.FromHtml(Constants.AppSecondaryColour);
            Height    = Constants.AppBarHeight;
            Width     = Constants.AppBarWidth;

            this.Controls.Add(this.GetNavBackButton(20, 15));
            this.Controls.Add(this.GetNavRefreshButton(130, 15));
            this.Controls.Add(this.GetNavForwardButton(240, 15));
            this.Controls.Add(this.GetNavProfileButton(this.ClientSize.Width - 150, 15));

            Label backLabel = new Label()
            {
                Text = "Atrás", ForeColor = Color.White, Font = Constants.H1LabelFont, Height = 40
            };

            Center_With(backLabel, NavBackButton);
            this.Controls.Add(backLabel);
            Label refreshLabel = new Label()
            {
                Text = "Recargar", ForeColor = Color.White, Font = Constants.H1LabelFont, Height = 40
            };

            Center_With(refreshLabel, NavRefreshButton);
            this.Controls.Add(refreshLabel);
            Label forwardLabel = new Label()
            {
                Text = "Adelante", ForeColor = Color.White, Font = Constants.H1LabelFont, Height = 40
            };

            Center_With(forwardLabel, NavForwardButton);
            this.Controls.Add(forwardLabel);
            Label profileLabel = new Label()
            {
                Text = "Menú", ForeColor = Color.White, Font = Constants.H1LabelFont, Height = 40
            };

            Center_With(profileLabel, NavProfileButton);
            this.Controls.Add(profileLabel);

            searchTextBox = new AsistimeSearchBox()
            {
                Font     = Constants.TextBoxFont,
                TextName = Constants.SearchBoxText,
                Parent   = this
            };
            searchTextBox.Location = new System.Drawing.Point(350, 37);
            searchTextBox.KeyDown += directionBox_KeyDown;
            this.Controls.Add(searchTextBox);

            AsistimeActionButton searchButton = new AsistimeActionButton()
            {
                Font       = Constants.ActionbuttonFont,
                ButtonText = Constants.SearchButtonText,
                Parent     = this
            };

            searchButton.Click   += new EventHandler(this.Navigate);
            searchButton.Location = new System.Drawing.Point(searchTextBox.Location.X + searchTextBox.Width, searchTextBox.Location.Y);
            this.Controls.Add(searchButton);

            AsistimeActionButton goGoogle = new AsistimeActionButton()
            {
                Font       = Constants.ActionbuttonFont,
                ButtonText = "Google",
                Parent     = this
            };

            goGoogle.Click   += new EventHandler(this.NavigateToGoogle);
            goGoogle.Location = new System.Drawing.Point(searchTextBox.Location.X + searchTextBox.Width + searchButton.Width - 75, searchTextBox.Location.Y);
            this.Controls.Add(goGoogle);

            /*AsistimeActionButton seeToursButton = new AsistimeActionButton()
             * {
             *  Font = Constants.ActionbuttonFont,
             *  ButtonText = Constants.SeeToursButtonText,
             *  Parent = this
             * };
             * seeToursButton.Location = new System.Drawing.Point(searchTextBox.Location.X, searchTextBox.Location.Y + 50);
             * seeToursButton.Click += new EventHandler(ShowTour);
             * this.Controls.Add(seeToursButton);*/
        }