예제 #1
0
 private void OnBtnZoomSettings_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnZoomSettings.PerformClick();
     }
 }
예제 #2
0
        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);
                }
            }
        }
예제 #3
0
파일: FBook.cs 프로젝트: ThiagoF97/tcc
        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
                {
                }
            }
        }
예제 #4
0
파일: FBook.cs 프로젝트: ThiagoF97/tcc
 private void OnGazeClick(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btNext_Click(sender, e);
     }
 }
예제 #5
0
 private void OnbtnFixTimeLengthMins_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnFixTimeLengthMins.PerformClick();
     }
 }
예제 #6
0
 private void OnBtnRearrangeSetting_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnRearrangeSetting.PerformClick();
     }
 }
예제 #7
0
 private void OnbtnAutoStart_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnAutoStart.PerformClick();
     }
 }
예제 #8
0
 private void OnBtnActionMic_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnActionMic.PerformClick();
     }
 }
예제 #9
0
 private void OnBtnZoomAmountPlus_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnZoomAmountPlus.PerformClick();
     }
 }
예제 #10
0
 private void OnBtnFeedback_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnFeedback.PerformClick();
     }
 }
예제 #11
0
 private void OnButtonStickyLeftClick_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         buttonStickyLeftClick.PerformClick();
     }
 }
예제 #12
0
 private void OnBtnActionDoubleLeftClick_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnActionDoubleLeftClick.PerformClick();
     }
 }
예제 #13
0
 private void OnButtonCrosshairUp_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         buttonCrosshairUp.PerformClick();
     }
 }
예제 #14
0
        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;
                    }
                }
            }
        }
예제 #15
0
 private void OnBtnRemove_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnRemove.PerformClick();
     }
 }
예제 #16
0
 private void OnBtnDefaultConfirmNo_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnDefaultConfirmNo.PerformClick();
     }
 }
예제 #17
0
        private void OnGazeCircularButton(object sender, GazeAwareEventArgs e)
        {
            CBook oBook = CConfig.Instance.GetBook(m_iBookId);
            FBook fBook = new FBook(oBook);

            fBook.Show();
        }
예제 #18
0
 private void OnBtnKeyboardSetting_Click(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         btnShortCutKeySetting.PerformClick();
     }
 }
예제 #19
0
 private void OnBtnKeyboard(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         resetButtonsColor();
         btnKeyboard.PerformClick();
     }
 }
예제 #20
0
 private void OnBtnRightClick(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         resetButtonsColor();
         btnRightClick.BackColor = Constants.SelectedColor;
         btnRightClick.PerformClick();
     }
 }
예제 #21
0
        private void onGazepictureBox(object sender, GazeAwareEventArgs e)
        {
            var pic = sender as PictureBox;

            if (pic != null)
            {
                pic.BackColor = (e.HasGaze) ? Color.Black : Color.DarkGray;
            }
        }
예제 #22
0
        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);
            }
        }
예제 #23
0
 private void OnBtnSingleClick(object sender, GazeAwareEventArgs e)
 {
     if (e.HasGaze)
     {
         resetButtonsColor();
         btnSingleLeftClick.BackColor = ValueNeverChange.SelectedColor;
         btnSingleLeftClick.PerformClick();
     }
 }
예제 #24
0
 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;
            }
        }
예제 #26
0
        //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;
            }
        }
예제 #27
0
파일: FBook.cs 프로젝트: ThiagoF97/tcc
        private void OnGazeRichTextBox(object sender, GazeAwareEventArgs e)
        {
            var richTextBox = sender as RichTextBox;

            if (richTextBox != null)
            {
                richTextBox.ForeColor = (e.HasGaze) ? Color.Blue : Color.Gray;
            }
        }
예제 #28
0
파일: FBook.cs 프로젝트: ThiagoF97/tcc
        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();
            }
        }
예제 #29
0
        private void OnGazeExit(object sender, GazeAwareEventArgs e)
        {
            var button = sender as Button;

            button.Select();

            if (e.HasGaze)
            {
                btExit_Click(sender, e);
            }
        }
예제 #30
0
        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));
        }
예제 #31
0
        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));
        }