コード例 #1
0
ファイル: CommandEngine.cs プロジェクト: lulzzz/TraceWizard
 bool IsSimilarConstraintExists(TwCommandConstraints constraints)
 {
     foreach (TwCommandConstraint constraint in constraints)
     {
         if (constraint.Attribute == TwCommandConstraintAttribute.Similar && constraint.Relation == TwCommandConstraintRelation.None)
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #2
0
ファイル: CommandEngine.cs プロジェクト: lulzzz/TraceWizard
 bool ContainsAttribute(TwCommandConstraints constraints, TwCommandConstraintAttribute attribute)
 {
     foreach (var constraint in constraints)
     {
         if (constraint.Attribute == attribute)
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #3
0
ファイル: CommandParser.cs プロジェクト: lulzzz/TraceWizard
        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);
        }
コード例 #4
0
ファイル: CommandEngine.cs プロジェクト: lulzzz/TraceWizard
        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;
                }
            }
        }
コード例 #5
0
 public TwCommand()
 {
     Fixtures    = new TwCommandFixtures();
     Constraints = new TwCommandConstraints();
 }