void OnMenuActionStateChanged(WorkflowAction action) { Invalidate(); }
protected static int Compare(WorkflowAction a, WorkflowAction b) { int res = Compare(a.DisplayCategory, b.DisplayCategory); if (res != 0) return res; return Compare(a.SortOrder, b.SortOrder); }
protected void RegisterActionChangeHandler(NavigationContext context, WorkflowAction action) { lock (context.SyncRoot) { object regs; ICollection<WorkflowAction> registrations; if (context.ContextVariables.TryGetValue(Consts.KEY_REGISTERED_ACTIONS, out regs)) registrations = (ICollection<WorkflowAction>) regs; else context.ContextVariables[Consts.KEY_REGISTERED_ACTIONS] = registrations = new List<WorkflowAction>(); action.StateChanged += OnMenuActionStateChanged; registrations.Add(action); } }
private bool IsManuallyPositioned(WorkflowAction wfAction) { return _menuSettings.Settings.MenuItems.Keys.Any(key => _menuSettings.Settings.MenuItems[key].ContainsKey(wfAction.ActionId)); }