private void OnBtnZoomSettings_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnZoomSettings.PerformClick(); } }
private void OnGaze(object sender, GazeAwareEventArgs e) { var ctr = sender as PictureBox; if (ctr != null) { if (e.HasGaze) { ctr.Select(); richTextBox1.Clear(); richTextBox1.Text = "Título: " + ctr.Image.Tag.ToString(); CBook oBook = CConfig.Instance.GetBook(ctr.Image.Tag.ToString()); richTextBox1.AppendText("\n"); richTextBox1.AppendText("ISBN: " + oBook.ISBN); richTextBox1.AppendText("\n"); richTextBox1.AppendText("Autor: " + oBook.Author); richTextBox1.AppendText("\n"); richTextBox1.AppendText("Editora: " + oBook.Editora); richTextBox2.Clear(); richTextBox2.AppendText("Descrição: " + oBook.Description); m_iBookId = oBook.Id; circularButton1.Location = new System.Drawing.Point(ctr.Location.X + ctr.Width - 30, ctr.Location.Y + ctr.Height - 30); //circularButton1.BackColor = System.Drawing.Color.FromArgb(64, circularButton1.BackColor); } } }
private void OnGazeWord(object sender, GazeAwareEventArgs e) { var button = sender as Button; if (button != null) { if (e.HasGaze) { int index = richTextBox1.Find(button.Text); if (index != -1) { richTextBox1.SelectionStart = index; richTextBox1.SelectionLength = button.Text.Length; richTextBox1.SelectionColor = Color.Red; if (speaker.State != SynthesizerState.Speaking) { speaker.SpeakAsync(button.Text); } Controller.getEvento(button); } } else { } } }
private void OnGazeClick(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btNext_Click(sender, e); } }
private void OnbtnFixTimeLengthMins_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnFixTimeLengthMins.PerformClick(); } }
private void OnBtnRearrangeSetting_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnRearrangeSetting.PerformClick(); } }
private void OnbtnAutoStart_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnAutoStart.PerformClick(); } }
private void OnBtnActionMic_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnActionMic.PerformClick(); } }
private void OnBtnZoomAmountPlus_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnZoomAmountPlus.PerformClick(); } }
private void OnBtnFeedback_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnFeedback.PerformClick(); } }
private void OnButtonStickyLeftClick_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { buttonStickyLeftClick.PerformClick(); } }
private void OnBtnActionDoubleLeftClick_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnActionDoubleLeftClick.PerformClick(); } }
private void OnButtonCrosshairUp_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { buttonCrosshairUp.PerformClick(); } }
private void OnGaze(object sender, GazeAwareEventArgs e) { var panel = sender as Panel; if (count > 4) { button1.Visible = true; label1.Text = "Great ! Your Gaze test is successful."; timer.Interval = 2000; timer.Tick += new EventHandler(closeGazeForm); timer.Start(); } else { if (panel != null) { if (count == 4) { panel5.BackColor = Color.White; panel5.BorderStyle = BorderStyle.None; panel5.Visible = true; } if (panel.BackColor != Color.White) { count++; panel.BorderStyle = (e.HasGaze) ? BorderStyle.FixedSingle : BorderStyle.None; panel.BackColor = (e.HasGaze) ? BackColor = Color.White : BackColor = this.BackColor; } } } }
private void OnBtnRemove_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnRemove.PerformClick(); } }
private void OnBtnDefaultConfirmNo_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnDefaultConfirmNo.PerformClick(); } }
private void OnGazeCircularButton(object sender, GazeAwareEventArgs e) { CBook oBook = CConfig.Instance.GetBook(m_iBookId); FBook fBook = new FBook(oBook); fBook.Show(); }
private void OnBtnKeyboardSetting_Click(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { btnShortCutKeySetting.PerformClick(); } }
private void OnBtnKeyboard(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { resetButtonsColor(); btnKeyboard.PerformClick(); } }
private void OnBtnRightClick(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { resetButtonsColor(); btnRightClick.BackColor = Constants.SelectedColor; btnRightClick.PerformClick(); } }
private void onGazepictureBox(object sender, GazeAwareEventArgs e) { var pic = sender as PictureBox; if (pic != null) { pic.BackColor = (e.HasGaze) ? Color.Black : Color.DarkGray; } }
private void onGazeLabel(object sender, GazeAwareEventArgs e) { var label = sender as Label; if (label != null) { label.Font = (e.HasGaze) ? new Font(label.Font, FontStyle.Underline) : new Font(label.Font, FontStyle.Bold); } }
private void OnBtnSingleClick(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { resetButtonsColor(); btnSingleLeftClick.BackColor = ValueNeverChange.SelectedColor; btnSingleLeftClick.PerformClick(); } }
private void OnGazeCircularButton(object sender, GazeAwareEventArgs e) { if (e.HasGaze) { FBook fBook = new FBook(m_oBook, circularButton1.Tag); fBook.Show(); this.Close(); } }
private void OnGaze(object sender, GazeAwareEventArgs e) { var panel = sender as Panel; if (panel != null) { panel.BorderStyle = (e.HasGaze) ? BorderStyle.FixedSingle : BorderStyle.None; } }
//toggle border on and off on gaze to gaze to give feed back. private void OnGazeChangeBTColour(object s, GazeAwareEventArgs e) { var sentButton = s as Panel; if (sentButton != null) { sentButton.BackColor = (e.HasGaze) ? Color.Red : Color.Black; } }
private void OnGazeRichTextBox(object sender, GazeAwareEventArgs e) { var richTextBox = sender as RichTextBox; if (richTextBox != null) { richTextBox.ForeColor = (e.HasGaze) ? Color.Blue : Color.Gray; } }
private void OnGaze(object sender, GazeAwareEventArgs e) { var button = sender as Button; if (button != null) { button.ForeColor = (e.HasGaze) ? Color.Green : Color.Gray; button.Select(); } }
private void OnGazeExit(object sender, GazeAwareEventArgs e) { var button = sender as Button; button.Select(); if (e.HasGaze) { btExit_Click(sender, e); } }
private static void OnHasGazeChanged(object sender, GazeAwareEventArgs e) { var element = sender as FrameworkElement; if (null == element) { return; } element.SetHasGaze(e.HasGaze); element.RaiseEvent(new RoutedEventArgs(Behavior.HasGazeChangedEvent, element)); }