Exemplo n.º 1
0
        private bool IsActive(ITransition iTransition)
        {
            bool?hideIfCriteriaDoNotFit = null;
            var  targetState            = iTransition.TargetState as XPBaseObject;

            if (targetState != null)
            {
                hideIfCriteriaDoNotFit = targetState.GetMemberValue(HideIfCriteriaDoNotFit) as bool?;
            }

            if (hideIfCriteriaDoNotFit.HasValue && hideIfCriteriaDoNotFit.Value && View.CurrentObject != null)
            {
                var ruleSetValidationResult = _stateMachineLogic.ValidateTransition(iTransition.TargetState, View.CurrentObject);
                return(ruleSetValidationResult.State != ValidationState.Invalid);
            }
            return(true);
        }
Exemplo n.º 2
0
 RuleSetValidationResult RuleSetValidationResult(XpoTransition xpoTransition, StateMachineLogic stateMachineLogic)
 {
     return(stateMachineLogic.ValidateTransition(xpoTransition.TargetState, View.CurrentObject));
 }