Beispiel #1
0
    /// <summary>
    /// (Re)loads all workflow resources from the skin resource manager. This also includes shortcut definitions.
    /// </summary>
    protected void ReloadWorkflowActions()
    {
      ServiceRegistration.Get<ILogger>().Debug(_states.Count == 0 ? "WorkflowManager: Loading workflow actions and shortcuts" :
          "WorkflowManager: Reloading workflow actions and shortcuts");

      WorkflowResourcesLoader loader = new WorkflowResourcesLoader();
      loader.Load();
      EnterWriteLock("ReloadWorkflowActions");

      // First remove any previously created shortcuts
      UnregisterActionShortcuts();

      _menuActions = loader.MenuActions;

      ServiceRegistration.Get<ILogger>().Debug("WorkflowManager: Loading workflow action shortcuts");
      ShortcutResourcesLoader shortcutLoader = new ShortcutResourcesLoader();
      shortcutLoader.LoadWorkflowActionShortcuts();
      _workflowActionShortcuts = shortcutLoader.WorkflowActionShortcuts;

      // Register shortcuts after (re-)loading
      RegisterActionShortcuts();

      ExitWriteLock();
    }
 /// <summary>
 /// (Re)loads all workflow resources from the skin resource manager.
 /// </summary>
 protected void ReloadWorkflowActions()
 {
   ServiceRegistration.Get<ILogger>().Debug(_states.Count == 0 ? "WorkflowManager: Loading workflow actions" :
       "WorkflowManager: Reloading workflow actions");
   WorkflowResourcesLoader loader = new WorkflowResourcesLoader();
   loader.Load();
   EnterWriteLock("ReloadWorkflowActions");
   _menuActions = loader.MenuActions;
   ExitWriteLock();
 }