Ejemplo n.º 1
0
        public Present Evaluate(Present[] paramList)
        {
            Present result;

            try
            {
                TileAddress ta         = (TileAddress)paramList[0];
                string      renderPath = namingScheme.GetRenderPath(ta);
                if (File.Exists(renderPath))
                {
                    GDIBigLockedImage gDIBigLockedImage = GDIBigLockedImage.FromFile(renderPath);
                    gDIBigLockedImage.CopyPixels();
                    result = new ImageRef(new ImageRefCounted(gDIBigLockedImage));
                }
                else
                {
                    result = new BeyondImageBounds();
                }
            }
            catch (Exception ex)
            {
                result = new PresentFailureCode(ex);
            }

            return(result);
        }
Ejemplo n.º 2
0
		public Present Evaluate(Present[] paramList)
		{
			Present result;
			try
			{
				TileAddress ta = (TileAddress)paramList[0];
				string renderPath = this.namingScheme.GetRenderPath(ta);
				if (File.Exists(renderPath))
				{
					GDIBigLockedImage gDIBigLockedImage = GDIBigLockedImage.FromFile(renderPath);
					gDIBigLockedImage.CopyPixels();
					result = new ImageRef(new ImageRefCounted(gDIBigLockedImage));
				}
				else
				{
					result = new BeyondImageBounds();
				}
			}
			catch (Exception ex)
			{
				result = new PresentFailureCode(ex);
			}
			return result;
		}