Пример #1
0
 public PatcherValidation(bool expectedResult, PatcherRectangle patcherRectangle, PatcherSize patcherSize, bool isThreshold)
 {
     ExpectedResult   = expectedResult;
     PatcherRectangle = patcherRectangle;
     PatcherSize      = patcherSize;
     IsThreshold      = isThreshold;
 }
Пример #2
0
        public static Bitmap GetImage(string locale, PatcherSize patcherSize, PatcherRectangle patcherRectangle)
        {
            Thread.CurrentThread.CurrentCulture   = CultureInfo.GetCultureInfo(locale);
            Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(locale);

            switch (patcherSize)
            {
            case PatcherSize.Small:
                return(SmallPatcherImagesAccessor.GetImage(patcherRectangle));

            case PatcherSize.Large:
                return(LargePatcherImagesAccessor.GetImage(patcherRectangle));
            }

            return(null);
        }
        private bool CheckPatcher(out PatcherSize patcherSize)
        {
            patcherSize = PatcherSize.Small;

            if (!FindWindow(Static.PATCHER_CLASS_NAME, Strings.Strings.PatcherText))
            {
                return(false);
            }

            foreach (PatcherSize candidateSize in Enum.GetValues(typeof(PatcherSize)) as PatcherSize[])
            {
                if (targetWindow.Rect.Size == Static.PATCHER_SIZES[candidateSize])
                {
                    patcherSize = candidateSize;
                    break;
                }
            }

            return(true);
        }