Beispiel #1
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);
        }
Beispiel #2
0
        public AsistimeFormsPanel()
        {
            this.title.Text = "CREACIÓN DE FORMAS";

            textbox           = new TextBox();
            textbox.Multiline = true;
            textbox.Width     = 450;
            textbox.Height    = 250;
            this.Controls.Add(textbox);
            textbox.BorderStyle = BorderStyle.None;
            textbox.Font        = Constants.H2LabelFont;
            textbox.BringToFront();
            textbox.Text      = "¡Dale forma al tour! Cada una de las siguientes formas está pensada para resaltar sectores del sitio web. Con ellas podés indicarle al adulto mayor en qué sector de la página debe realizar una acción, qué componentes debe observar, o restringir el 'click' en algún sector.";
            textbox.TextAlign = HorizontalAlignment.Center;
            textbox.Location  = new Point(this.Width / 2 - textbox.Width / 2, 120);

            AsistimeRoundButton RectangleButton = new AsistimeRoundButton(84, 84, Constants.RectImage, Constants.RectHoverImage, Constants.RectClickImage)
            {
                Parent = this.Parent
            };
            Label rectLabel = new Label()
            {
                Text = "Rectángulo", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            RectangleButton.Location = new Point(87, 400);
            Center_With(rectLabel, RectangleButton);
            RectangleButton.Click += new EventHandler(DrawRectangle);
            this.Controls.Add(RectangleButton);
            this.Controls.Add(rectLabel);

            AsistimeRoundButton DivButton = new AsistimeRoundButton(84, 84, Constants.DivImage, Constants.DivHoverImage, Constants.DivClickImage)
            {
                Parent = this.Parent
            };
            Label divLabel = new Label()
            {
                Text = "Recuadrar", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            DivButton.Location = new Point(RectangleButton.Location.X + 110, RectangleButton.Location.Y);
            Center_With(divLabel, DivButton);
            DivButton.Click += new EventHandler(DrawDiv);
            this.Controls.Add(DivButton);
            this.Controls.Add(divLabel);

            AsistimeRoundButton DialogButton = new AsistimeRoundButton(84, 84, Constants.DialogImage, Constants.DialogHoverImage, Constants.DialogClickImage)
            {
                Parent = this.Parent
            };
            Label dialogLabel = new Label()
            {
                Text = "Diálogo", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            DialogButton.Location = new Point(RectangleButton.Location.X + 220, RectangleButton.Location.Y);
            Center_With(dialogLabel, DialogButton);
            DialogButton.Click += new EventHandler(DrawDialog);
            this.Controls.Add(DialogButton);
            this.Controls.Add(dialogLabel);

            AsistimeRoundButton TextButton = new AsistimeRoundButton(84, 84, Constants.TextImage, Constants.TextHoverImage, Constants.TextClickImage)
            {
                Parent = this.Parent
            };
            Label textLabel = new Label()
            {
                Text = "Texto", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            TextButton.Location = new Point(RectangleButton.Location.X + 330, RectangleButton.Location.Y);
            Center_With(textLabel, TextButton);
            TextButton.Click += new EventHandler(DrawText);
            this.Controls.Add(TextButton);
            this.Controls.Add(textLabel);

            AsistimeRoundButton CircleButton = new AsistimeRoundButton(84, 84, Constants.CircleImage, Constants.CircleHoverImage, Constants.CircleClickImage)
            {
                Parent = this.Parent
            };
            Label circleLabel = new Label()
            {
                Text = "Círculo", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            CircleButton.Location = new Point(RectangleButton.Location.X + 440, RectangleButton.Location.Y);
            Center_With(circleLabel, CircleButton);
            CircleButton.Click += new EventHandler(DrawCircle);
            this.Controls.Add(CircleButton);
            this.Controls.Add(circleLabel);

            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 = "Anterior";
            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);
        }
Beispiel #3
0
        public AsistimeAudioPanel()
        {
            this.title.Text = "GRABACIÓN DE AUDIO";

            textbox           = new TextBox();
            textbox.Multiline = true;
            textbox.Width     = 450;
            textbox.Height    = 250;
            this.Controls.Add(textbox);
            textbox.BorderStyle = BorderStyle.None;
            textbox.Font        = Constants.H2LabelFont;
            textbox.BringToFront();
            textbox.Text      = "Recordá hablar despacio y claro, para que alguien mayor te pueda entender. ¡Ojo! Sólo puede haber un audio por paso, si ya existe un audio y grabás uno nuevo vas a borrar el anterior.";
            textbox.TextAlign = HorizontalAlignment.Center;
            textbox.Location  = new Point(this.Width / 2 - textbox.Width / 2, 120);

            ReproductorWav = new SoundPlayer();

            RecordButton = new AsistimeRoundButton(84, 84, Constants.RecordImage, Constants.RecordHoverImage, Constants.RecordClickImage)
            {
                Parent = this.Parent
            };
            Label recordLabel = new Label()
            {
                Text = "Grabar", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            RecordButton.Location = new Point(103, 400);
            Center_With(recordLabel, RecordButton);
            RecordButton.Click += new EventHandler(RecordAudio);
            this.Controls.Add(RecordButton);
            this.Controls.Add(recordLabel);
            recordLabel.BringToFront();
            RecordButton.BringToFront();

            StopButton = new AsistimeRoundButton(84, 84, Constants.StopImage, Constants.StopHoverImage, Constants.StopClickImage)
            {
                Parent = this.Parent
            };
            Label stopLabel = new Label()
            {
                Text = "Parar", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            StopButton.Location = new Point(RecordButton.Location.X + 205, RecordButton.Location.Y);
            Center_With(stopLabel, StopButton);
            StopButton.Click += new EventHandler(StopRecording);
            this.Controls.Add(StopButton);
            StopButton.Enabled = false;
            this.Controls.Add(stopLabel);
            stopLabel.BringToFront();
            StopButton.BringToFront();

            PlayButton = new AsistimeRoundButton(84, 84, Constants.ListenImage, Constants.ListenHoverImage, Constants.ListenClickImage)
            {
                Parent = this.Parent
            };
            Label playLabel = new Label()
            {
                Text = "Reproducir", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            PlayButton.Location = new Point(RecordButton.Location.X + 410, RecordButton.Location.Y);
            Center_With(playLabel, PlayButton);
            PlayButton.Click += new EventHandler(PlayAudio);
            this.Controls.Add(PlayButton);
            PlayButton.Enabled = false;
            this.Controls.Add(playLabel);
            playLabel.BringToFront();
            PlayButton.BringToFront();


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

            /*cancelButton = new AsistimeActionButton();
             * cancelButton.Click += new EventHandler(Cancel);
             * cancelButton.ButtonText = "Salir";
             * 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);

            try
            {
                if (File.Exists(UrlReproductor))
                {
                    PlayButton.Enabled = false;
                }
                ;
            }
            catch
            {
                new PopupNotification("Error", "Error al crear el directorio para los audios");
            }

            /*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);*/
        }
Beispiel #4
0
        //private List<Step>;

        public AsistimeStepsPanel()
        {
            this.title.Text = "ALTA DE PASOS";
            stepCount       = 0;

            /*tourNameLabel = new Label()
             * {
             *  Font = Constants.H2LabelFont,
             *  Width = 400
             * };
             * this.Controls.Add(tourNameLabel);*/

            textbox           = new TextBox();
            textbox.Multiline = true;
            textbox.Width     = 450;
            textbox.Height    = 300;
            this.Controls.Add(textbox);
            textbox.BorderStyle = BorderStyle.None;
            textbox.Font        = Constants.H2LabelFont;
            textbox.BringToFront();
            textbox.Text      = "¡Agregá pasos al tour! En cada paso, indicale al adulto mayor qué es lo que debe hacer, ayudándolo con dibujos en pantalla y un audio opcional. Recordá que cuanta menos información incluyas en cada paso, el adulto mayor podrá realizar el tour con mas facilidad.";
            textbox.TextAlign = HorizontalAlignment.Center;
            textbox.Location  = new Point(this.Width / 2 - textbox.Width / 2, 120);
            //tourNameLabel.Location = new Point(textbox.Location.X, textbox.Location.Y - 30);

            Label stepsLabel = new Label()
            {
                Text  = "CANTIDAD DE PASOS: " + stepCount,
                Font  = Constants.H2LabelFont,
                Width = 400
            };

            stepsLabel.Location = new Point(textbox.Location.X, textbox.Location.Y + textbox.Height);
            this.Controls.Add(stepsLabel);

            AsistimeRoundButton AddStepButton = new AsistimeRoundButton(84, 84, Constants.AddStepImage, Constants.AddStepHoverImage, Constants.AddStepClickImage)
            {
                Parent = this.Parent
            };
            Label addLabel = new Label()
            {
                Text = "Agregar paso", ForeColor = ColorTranslator.FromHtml(Constants.AppPrimaryColour), Font = Constants.H1LabelFont, Height = 40
            };

            AddStepButton.Location = new Point(450, textbox.Location.Y + textbox.Height - 30);
            Center_With(addLabel, AddStepButton);
            AddStepButton.Click += new EventHandler(AddStep);
            this.Controls.Add(AddStepButton);
            AddStepButton.BringToFront();
            this.Controls.Add(addLabel);

            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 = "Anterior";
            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);
        }