Пример #1
0
 private void OnPreviewKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Handled)
     {
         return;
     }
     if (m_actions == null || m_actions.Count <= 0 || IsVisible == false)
     {
         return;
     }
     if (e.Key == Key.Down)
     {
         MoveToNextAction();
         e.Handled = true;
     }
     else if (e.Key == Key.Up)
     {
         MoveToPreviousAction();
         e.Handled = true;
     }
     else if (e.Key == Key.Enter)
     {
         ActionBase action = list_actions.SelectedItem as ActionBase;
         if (!action.IsExecutable)
         {
             e.Handled = true; return;
         }
         ExecutionRequested?.Invoke(this, new ExecutionRequestedEventArgs(action));
         e.Handled = true;
     }
 }
Пример #2
0
 /// <summary>
 /// Event that is raised when the execution of an asynchronous process is requested.
 /// </summary>
 private void OnExecutionRequested(IExecuteEventArgs e)
 {
     ExecutionRequested?.Invoke(this, e);
 }
Пример #3
0
 /// <summary>
 ///		Lanza el evento para preparar la ejecución
 /// </summary>
 private void RaiseEventPrepareExecution()
 {
     ExecutionRequested?.Invoke(this, EventArgs.Empty);
 }