public HowToAudio() { this.ForwardButton.Hide(); AsistimeRoundButton ConfirmButton = new AsistimeRoundButton(98, 98, Constants.ConfirmGreenImageW, Constants.ConfirmGreenHoverImageW, Constants.ConfirmGreenClickImageW) { Parent = this.Parent }; ConfirmButton.Location = new Point(ForwardButton.Location.X, ForwardButton.Location.Y); ConfirmButton.Click += new EventHandler(this.Confirm); this.Controls.Add(ConfirmButton); ConfirmButton.BringToFront(); title.Text = "GRABACIÓN DE AUDIO"; subTitle.Text = "¡Con audio se entiende mejor! Podés grabar una ayuda auditiva que explique la acción que se debe realizar. Recordá hablar despacio y claro, para que alguien mayor te pueda entender. Si querés, podés saltear este paso."; }
public HowToTour() { this.BackButton.Hide(); AsistimeRoundButton CancelButton = new AsistimeRoundButton(98, 98, Constants.CancelRedImageW, Constants.CancelRedHoverImageW, Constants.CancelRedClickImageW) { Parent = this.Parent }; CancelButton.Location = new Point(BackButton.Location.X, BackButton.Location.Y); CancelButton.Click += new EventHandler(this.Cancel); this.Controls.Add(CancelButton); CancelButton.BringToFront(); title.Text = "CREACIÓN DE TOUR"; subTitle.Text = "Creá un tour para un adulto mayor. Dale un nombre que represente para qué sirve, y una descripción para que la persona que lo realice entienda de qué se trata."; }
public TutorialAssign() { this.Width = 700; this.Height = 500; 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 = "ASIGNÁ EL TOUR A UN ADULTO", Font = Constants.HLabelFont, Width = 500, 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 = "Seleccioná los adultos a los que quieras asignar el tour y después hacé click en la tilde para completar:"; subTitle.TextAlign = HorizontalAlignment.Center; subTitle.Location = new Point(this.Width / 2 - subTitle.Width / 2, 120); subTitle.TabStop = false; subTitle.BringToFront(); BackButton = new AsistimeRoundButton(98, 98, Constants.CancelRedImageW, Constants.CancelRedHoverImageW, Constants.CancelRedClickImageW) { Parent = this.Parent }; BackButton.Location = new Point(30, 372); 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, 372); ForwardButton.Click += new EventHandler(this.Forward); this.Controls.Add(ForwardButton); ForwardButton.BringToFront(); userController = new UserController(); adultsChecked = new List <int>(); //Busco lista de usuarios adults = userController.GetAdults().Result; var ad = adults.Select(a => a.name).ToArray(); checkedListBox1 = new CheckedListBox(); checkedListBox1.Items.AddRange(ad); checkedListBox1.SelectedIndexChanged += new EventHandler(OnSelect); this.Controls.Add(checkedListBox1); checkedListBox1.BringToFront(); checkedListBox1.CheckOnClick = true; checkedListBox1.Font = Constants.H2LabelFont; checkedListBox1.BorderStyle = BorderStyle.None; checkedListBox1.Width = this.Width / 2; checkedListBox1.Height = this.Height / 2; checkedListBox1.Location = new Point((this.Width / 2) - (checkedListBox1.Width / 2), 220); Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20)); }
public TutorialStep() { this.Width = 700; this.Height = 500; 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 = " ", 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 = 250; this.Controls.Add(subTitle); subTitle.BorderStyle = BorderStyle.None; subTitle.Font = Constants.H2LabelFont; subTitle.BringToFront(); subTitle.Text = " "; subTitle.TextAlign = HorizontalAlignment.Center; subTitle.Location = new Point(this.Width / 2 - subTitle.Width / 2, 120); subTitle.TabStop = false; subTitle.BringToFront(); BackButton = new AsistimeRoundButton(98, 98, Constants.PreviousImage, Constants.PreviousHoverImage, Constants.PreviousClickImage) { Parent = this.Parent }; BackButton.Location = new Point(30, 372); BackButton.Click += new EventHandler(this.Back); this.Controls.Add(BackButton); BackButton.BringToFront(); ForwardButton = new AsistimeRoundButton(98, 98, Constants.NextImage, Constants.NextHoverImage, Constants.NextClickImage) { Parent = this.Parent }; ForwardButton.Location = new Point(572, 372); ForwardButton.Click += new EventHandler(this.Forward); this.Controls.Add(ForwardButton); ForwardButton.BringToFront(); Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20)); }
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);*/ }
//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); }
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)); }