Exemplo n.º 1
0
 bool IsSimilarConstraintExists(TwCommandConstraints constraints)
 {
     foreach (TwCommandConstraint constraint in constraints)
     {
         if (constraint.Attribute == TwCommandConstraintAttribute.Similar && constraint.Relation == TwCommandConstraintRelation.None)
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 bool ContainsAttribute(TwCommandConstraints constraints, TwCommandConstraintAttribute attribute)
 {
     foreach (var constraint in constraints)
     {
         if (constraint.Attribute == attribute)
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 3
0
        TwCommandConstraints GetConstraints(string[] tokens, ref int index, ref string error)
        {
            var constraints = new TwCommandConstraints();

            TwCommandConstraint constraint;

            while ((index < tokens.Length) && (constraint = GetConstraint(tokens, ref index, ref error)) != null)
            {
                constraints.Add(constraint);
            }

            return(constraints);
        }
Exemplo n.º 4
0
        void PackageConstraints(TwCommandConstraints constraints, Event @event)
        {
            foreach (var constraint in constraints)
            {
                var constraintBoolEvent = constraint as TwCommandConstraintBoolEvent;
                if (constraintBoolEvent != null)
                {
                    constraintBoolEvent.EventSource = @event;
                }

                var constraintListItem = constraint as TwCommandConstraintListItem;
                if (constraintListItem != null)
                {
                    constraintListItem.FixtureProfiles = analysisPanel.Analysis.FixtureProfiles;
                }
            }
        }
Exemplo n.º 5
0
 public TwCommand()
 {
     Fixtures    = new TwCommandFixtures();
     Constraints = new TwCommandConstraints();
 }