public static bool InvokeAction(KeyAssignActionDescription desc)
 {
     KeyAssignAction callback;
     if (Actions.TryGetValue(desc.ActionName, out callback))
     {
         System.Diagnostics.Debug.WriteLine("$ Key assign invoke: " + desc.ActionName);
         callback.Invoke(desc.Argument);
         return true;
     }
     System.Diagnostics.Debug.WriteLine("$ Key assign not matched: " + desc.ActionName);
     return false;
 }
Beispiel #2
0
 public static bool InvokeAction(KeyAssignActionDescription desc)
 {
     KeyAssignAction callback;
     if (Actions.TryGetValue(desc.ActionName, out callback))
     {
         System.Diagnostics.Debug.WriteLine("$ Key assign invoke: " + desc.ActionName);
         try
         {
             callback.Invoke(desc.Argument);
         }
         catch (Exception ex)
         {
             BackstageModel.RegisterEvent(new OperationFailedEvent(SettingModelResources.KeyAssignError, ex));
         }
         return true;
     }
     System.Diagnostics.Debug.WriteLine("$ Key assign not matched: " + desc.ActionName);
     return false;
 }
 public static bool InvokeAction(KeyAssignActionDescription desc)
 {
     KeyAssignAction callback;
     if (Actions.TryGetValue(desc.ActionName, out callback))
     {
         callback.Invoke(desc.Argument);
         return true;
     }
     return false;
 }