Ejemplo n.º 1
0
 private void Note_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "InputMode")
     {
         Note note = (Note)sender;
         InputModeChangedEventArgs args = new InputModeChangedEventArgs(note, note.InputMode);
         OnNoteInputModeChanged(args);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Handles transitions into and out of dictation mode
 /// for the focused <see cref="Note"/> control.
 /// </summary>
 /// <param name="noteControl">The <see cref="Note"/> control.</param>
 /// <param name="e">The event data.</param>
 private async void taskPanel_NoteInputModeChanged(object sender, InputModeChangedEventArgs e)
 {
     // Transition out of dictation mode.
     if (_speechManager.RecognitionMode ==
         SpeechRecognitionMode.Dictation &&
         e.NewInputMode != NoteInputMode.Dictation)
     {
         await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() =>
         {
             await _speechManager.SetRecognitionMode(SpeechRecognitionMode.CommandPhrases);
         });
     }
     // Transition to dictation mode.
     else if (_speechManager.RecognitionMode !=
              SpeechRecognitionMode.Dictation &&
              e.NewInputMode == NoteInputMode.Dictation)
     {
         await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() =>
         {
             await _speechManager.SpeakAsync("Dictate your note", _media);
             await _speechManager.SetRecognitionMode(SpeechRecognitionMode.Dictation);
         });
     }
 }
Ejemplo n.º 3
0
 private void Note_InputModeChanged(Note sender, InputModeChangedEventArgs e)
 {
     OnNoteInputModeChanged(e);
 }
Ejemplo n.º 4
0
 protected void OnNoteInputModeChanged(InputModeChangedEventArgs e)
 {
     NoteInputModeChanged?.Invoke(e.SourceNote, e);
 }
Ejemplo n.º 5
0
 private void CanvasControl_NoteInputModeChanged(object sender, InputModeChangedEventArgs e)
 {
     OnNoteInputModeChanged(e);
 }