Пример #1
0
 public ArrayLookupNavigator(LookupDirection direction, LookupArguments arguments, ParsingContext parsingContext)
     : base(direction, arguments, parsingContext)
 {
     Require.That(arguments).Named("arguments").IsNotNull();
     Require.That(arguments.DataArray).Named("arguments.DataArray").IsNotNull();
     _arrayData = arguments.DataArray.ToArray();
     Initialize();
 }
Пример #2
0
 public ArrayLookupNavigator(LookupDirection direction, LookupArguments arguments, ParsingContext parsingContext)
     : base(direction, arguments, parsingContext)
 {
     Require.That(arguments).Named("arguments").IsNotNull();
     Require.That(arguments.DataArray).Named("arguments.DataArray").IsNotNull();
     _arrayData = arguments.DataArray.ToArray();
     Initialize();
 }
Пример #3
0
 public LookupNavigator(LookupDirection direction, LookupArguments arguments, ParsingContext parsingContext)
 {
     Require.That(arguments).Named("arguments").IsNotNull();
     Require.That(parsingContext).Named("parsingContext").IsNotNull();
     Require.That(parsingContext.ExcelDataProvider).Named("parsingContext.ExcelDataProvider").IsNotNull();
     Direction      = direction;
     Arguments      = arguments;
     ParsingContext = parsingContext;
 }
Пример #4
0
 public LookupNavigator(LookupDirection direction, LookupArguments arguments, ParsingContext parsingContext)
 {
     Require.That(arguments).Named("arguments").IsNotNull();
     Require.That(parsingContext).Named("parsingContext").IsNotNull();
     Require.That(parsingContext.ExcelDataProvider).Named("parsingContext.ExcelDataProvider").IsNotNull();
     Direction = direction;
     Arguments = arguments;
     ParsingContext = parsingContext;
 }
Пример #5
0
        public EventLookupValue()
        {
            OnlyNetworkValues = true;                  // Default
            LookupDirection   = LookupDirection.Prior; // Default;

            Criteria   = new List <EventLookupValueCriteria>();
            ValueNames = new List <EventLookupValueName>();
            Conditions = new List <EventLookupValueCondition>();
        }
Пример #6
0
 public static LookupNavigator Create(LookupDirection direction, LookupArguments args, ParsingContext parsingContext)
 {
     if (args.ArgumentDataType == LookupArguments.LookupArgumentDataType.ExcelRange)
     {
         return(new ExcelLookupNavigator(direction, args, parsingContext));
     }
     else if (args.ArgumentDataType == LookupArguments.LookupArgumentDataType.DataArray)
     {
         return(new ArrayLookupNavigator(direction, args, parsingContext));
     }
     throw new NotSupportedException("Invalid argument datatype");
 }
Пример #7
0
 public static LookupNavigator Create(LookupDirection direction, LookupArguments args, ParsingContext parsingContext)
 {
     if (args.ArgumentDataType == LookupArguments.LookupArgumentDataType.ExcelRange)
     {
         return new ExcelLookupNavigator(direction, args, parsingContext);
     }
     else if (args.ArgumentDataType == LookupArguments.LookupArgumentDataType.DataArray)
     {
         return new ArrayLookupNavigator(direction, args, parsingContext);
     }
     throw new NotSupportedException("Invalid argument datatype");
 }
Пример #8
0
    protected void LookupMatchingColors(Match3BoardPiece startPiece, LookupDirection lookupDir)
    {
        int lookupOffset = (int)lookupDir;

        int numPatterns = baseLookupPattern.GetLength(0);

        for (int i = 0; i < numPatterns; i++)
        {
            Match3BoardPiece.LinkType lookupDirA = (Match3BoardPiece.LinkType)((int)baseLookupPattern[i, 0] + lookupOffset);
            Match3BoardPiece.LinkType lookupDirB = (Match3BoardPiece.LinkType)((int)baseLookupPattern[i, 1] + lookupOffset);

            ignoreCount = AddToIgnoreList(GetMatchingColorBetweenDirections(startPiece, lookupDirA, lookupDirB));
        }
    }
Пример #9
0
 public BitmapPixelTracker(LookupDirection direction)
 {
     _direction = direction;
 }
Пример #10
0
	protected void LookupMatchingColors(Match3BoardPiece startPiece, LookupDirection lookupDir)
	{
		int lookupOffset = (int)lookupDir;
		
		int numPatterns = baseLookupPattern.GetLength(0);
		for(int i = 0; i < numPatterns; i++)
		{
			Match3BoardPiece.LinkType lookupDirA = (Match3BoardPiece.LinkType)( (int)baseLookupPattern[i, 0] + lookupOffset );
			Match3BoardPiece.LinkType lookupDirB = (Match3BoardPiece.LinkType)( (int)baseLookupPattern[i, 1] + lookupOffset );
			
			ignoreCount = AddToIgnoreList( GetMatchingColorBetweenDirections(startPiece, lookupDirA, lookupDirB) );
		}
	}
Пример #11
0
 public ExcelLookupNavigator(LookupDirection direction, LookupArguments arguments, ParsingContext parsingContext)
     : base(direction, arguments, parsingContext)
 {
     Initialize();
 }
Пример #12
0
 public ExcelLookupNavigator(LookupDirection direction, LookupArguments arguments, ParsingContext parsingContext)
     : base(direction, arguments, parsingContext)
 {
     Initialize();
 }