Esempio n. 1
0
        /*
         * Get the option selected by user and perform an action
         */
        private void activation(object sender, ActivationRoutedEventArgs e)
        {
            String name = ((Rectangle)sender).Name;

            switch (name)
            {
            case "save":    //Save the document
                this.parent.SendCommand("save", null);
                break;

            case "load":    //Open an other document
                this.parent.SendCommand("load", null);
                break;

            case "style":    //Open style window
                this.parent.SendCommand("style", null);
                break;

            case "spell":    //Open spell checker
                this.parent.SendCommand("spell", null);
                break;

            case "exit":    //Exit the application
                this.parent.SendCommand("exit", null);;
                break;
            }
        }
Esempio n. 2
0
        private void BtnNext_OnActivated(object sender, ActivationRoutedEventArgs e)
        {
            if (!_mainPanelSet1Manager.HasPanel())
            {
                return;
            }

            MainPanel.Content = _mainPanelSet1Manager.GetNextPanel(true);
        }
Esempio n. 3
0
        /**
         * Trigger with the user validate a button on the spelling window with eye
         */
        public void SpellButton(object sender, ActivationRoutedEventArgs e)
        {
            string bt_name = ((Button)sender).Name;

            switch (bt_name)
            {
            case "bt_quit":     //Quit the splelling correction
                this.Close();
                break;

            case "bt_ignore":     //Ignore on go to the next available error
                this.spErr.IgnoreAll();
                try
                {
                    this.nextError = this.parent.TextEdit.GetNextSpellingErrorPosition(this.nextError, LogicalDirection.Forward);
                    if (this.nextError == null)
                    {
                        this.Close();
                    }
                    else
                    {
                        this.NextCorrection();
                        this.ToCorrect();
                    }
                }
                catch (ArgumentNullException)
                {
                    this.Close();
                }
                break;

            case "bt_ok":     //Validation of the correction
                if (this.suggestions.SelectedItem != null)
                {
                    string choice = ((TextBlock)this.suggestions.SelectedItem).Text;
                    this.spErr.Correct(choice);
                    try
                    {
                        this.nextError = this.parent.TextEdit.GetNextSpellingErrorPosition(this.nextError, LogicalDirection.Forward);
                        if (this.nextError == null)
                        {
                            this.Close();
                        }
                        else
                        {
                            this.NextCorrection();
                            this.ToCorrect();
                        }
                    }
                    catch (ArgumentNullException)
                    {
                        this.Close();
                    }
                }
                break;
            }
        }
Esempio n. 4
0
        /*
         * Get the button activated by the user and perform an action
         */
        private void ValidButton(object sender, ActivationRoutedEventArgs e)
        {
            string bt_name = ((Button)sender).Name;

            switch (bt_name)
            {
            case "bt_ok":    //Valide the user choice and send to the text box the change
                String family = ((String)((ListBoxItem)this.fontfamily.SelectedItem).Content);
                String size   = ((TextBlock)(this.fontsize.SelectedItem)).Text.ToString();
                this.parent.SendCommand("fontsize", size);
                this.parent.SendCommand("fontfamily", family);
                this.Close();
                break;

            case "bt_quit":    //Exit the font change without modification
                this.Close();
                break;
            }
        }
 private void Btn3_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("It doesn't matter!");
 }
 private void Btn2_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("I dont like that!");
 }
Esempio n. 7
0
 private void Key_A_Click(object sender, ActivationRoutedEventArgs e)
 {
     typingResults.Text += "A";
 }
Esempio n. 8
0
 private void BtnTired_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("I'm Tired");
 }
Esempio n. 9
0
 //Activation Events
 private void BtnYes_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("Yes!");
 }
 private void Btn3_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("I\'ve no Idea!");
 }
 private void Btn2_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("That is bad!");
 }
Esempio n. 12
0
 private void GazeArea_Activated(object sender, ActivationRoutedEventArgs e)
 {
 }
Esempio n. 13
0
 private void BtnHowIsEveryone_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("How is everyone?");
 }
Esempio n. 14
0
 private void BtnHowAreYou_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("How are you?");
 }
Esempio n. 15
0
 /*
  * Get the font family selected by user
  */
 private void fontFamilyActiv(object sender, ActivationRoutedEventArgs e)
 {
     this.fontfamily.SelectedItem = ((ListBoxItem)sender);
 }
Esempio n. 16
0
 private void BtnMaybe_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("Maybe!");
 }
Esempio n. 17
0
 private void BtnHungry_OnActivated(object sender, ActivationRoutedEventArgs e)
 {
     TextToSpeech.Speak("I'm Hungry");
 }