// Token: 0x060017A0 RID: 6048 RVA: 0x0003DF3C File Offset: 0x0003C13C
        protected Enum107 method_20(int interval, Class150 original_capture, Struct46 bounds, Class104 settings, ManualResetEventSlim waitHandle = null)
        {
            while (!this.manualResetEventSlim_0.IsSet && (waitHandle == null || !waitHandle.IsSet))
            {
                this.method_7();
                switch (Class433.smethod_0(this.class142_0.ToonTownProcess, original_capture, bounds, settings))
                {
                case Enum107.const_0:
                    return(Enum107.const_0);

                case Enum107.const_1:
                    if (waitHandle == null)
                    {
                        this.manualResetEventSlim_0.Wait(interval);
                    }
                    else
                    {
                        WaitHandle.WaitAny(new WaitHandle[]
                        {
                            this.manualResetEventSlim_0.WaitHandle,
                            waitHandle.WaitHandle
                        }, interval);
                    }
                    break;

                case Enum107.const_2:
                    return(Enum107.const_2);
                }
            }
            return(Enum107.const_1);
        }
 // Token: 0x06002126 RID: 8486 RVA: 0x0006F6A0 File Offset: 0x0006D8A0
 protected override void vmethod_2(BinaryReader reader, int version)
 {
     this.CastBounds                   = reader.smethod_21();
     this.CastCapture                  = reader.smethod_4();
     this.ExitFishingBounds            = reader.smethod_21();
     this.ExitFishingCapture           = reader.smethod_4();
     this.FishCaughtBounds             = reader.smethod_21();
     this.FishCaughtCapture            = reader.smethod_4();
     this.FishCaughtDuringBingoBounds  = reader.smethod_21();
     this.FishCaughtDuringBingoCapture = reader.smethod_4();
     this.BootCaughtBounds             = reader.smethod_21();
     this.BootCaughtCapture            = reader.smethod_4();
     this.BucketFullBounds             = reader.smethod_21();
     this.BucketFullCapture            = reader.smethod_4();
     this.SellFishBounds               = reader.smethod_21();
     this.SellFishCapture              = reader.smethod_4();
     this.NoBeansBounds                = reader.smethod_21();
     this.NoBeansCapture               = reader.smethod_4();
     this.EstateSellFishBounds         = reader.smethod_21();
     this.EstateSellFishCapture        = reader.smethod_4();
     this.NewSpeciesBounds             = reader.smethod_21();
     this.NewSpeciesCapture            = reader.smethod_4();
     this.NewSpeciesDuringBingoBounds  = reader.smethod_21();
     this.NewSpeciesDuringBingoCapture = reader.smethod_4();
 }
 // Token: 0x0600172F RID: 5935 RVA: 0x0000702B File Offset: 0x0000522B
 protected void method_11(Class150 pix, Control ctr)
 {
     this.method_12();
     this.pixelatorRenderer_0 = new PixelatorRenderer(pix);
     this.class359_0          = new Class359(this.pixelatorRenderer_0);
     this.class359_0.method_1(ctr);
 }
 // Token: 0x06002804 RID: 10244 RVA: 0x000121B5 File Offset: 0x000103B5
 public Class108(Enum57 playground, PointF dockLocation, Size windowClientSize, Class95 <Struct54> pondCapture, Class150 dockReferenceCapture)
 {
     this.Playground           = playground;
     this.DockLocation         = dockLocation;
     this.WindowClientSize     = windowClientSize;
     this.PondCapture          = pondCapture;
     this.DockReferenceCapture = dockReferenceCapture;
 }
Example #5
0
 internal Class349()
 {
     this.class149_0  = new Class149();
     this.class150_0  = new Class150();
     this.hashtable_0 = new Hashtable();
     this.class264_0  = new Class264();
     this.class701_0  = new Class701();
 }
 // Token: 0x0600172E RID: 5934 RVA: 0x00038514 File Offset: 0x00036714
 protected static void smethod_0(Class150 pix, Control12 led)
 {
     if (pix == null)
     {
         led.BaseColor = Color.FromArgb(255, 255, 128, 128);
         return;
     }
     led.BaseColor = Color.FromArgb(255, 153, 255, 54);
 }
        // Token: 0x0600214D RID: 8525 RVA: 0x0006FF4C File Offset: 0x0006E14C
        public unsafe static void smethod_5(this BinaryWriter writer, Class150 pix)
        {
            if (pix == null)
            {
                writer.Write(false);
                return;
            }
            Size size_ = pix.size_0;

            writer.Write(true);
            writer.Write(size_.Width);
            writer.Write(size_.Height);
            byte[]     array     = new byte[size_.Width * size_.Height * 3];
            Struct54[] getPixels = pix.GetPixels;
            byte[]     array2;
            byte *     ptr;

            if ((array2 = array) != null && array2.Length != 0)
            {
                fixed(byte *ptr = &array2[0])
                {
                }
            }
            else
            {
                ptr = null;
            }
            Struct54 *ptr2 = (Struct54 *)ptr;

            Struct54[] array3;
            Struct54 * ptr3;

            if ((array3 = getPixels) != null && array3.Length != 0)
            {
                fixed(Struct54 *ptr3 = &array3[0])
                {
                }
            }
            else
            {
                ptr3 = null;
            }
            Struct54 *ptr4 = ptr3;

            for (int i = 0; i < size_.Width * size_.Height; i++)
            {
                *ptr2 = *ptr4;
                ptr4++;
                ptr2++;
            }
            ptr3 = null;
            ptr  = null;
            writer.smethod_6(array);
        }
 // Token: 0x06002806 RID: 10246 RVA: 0x00093D74 File Offset: 0x00091F74
 protected override void vmethod_2(BinaryReader reader, int version)
 {
     this.DockLocation     = reader.smethod_12();
     this.Playground       = (Enum57)reader.ReadUInt16();
     this.WindowClientSize = reader.smethod_14();
     this.PondCapture      = reader.smethod_2();
     if (version > 1)
     {
         this.DockReferenceCapture = reader.smethod_4();
     }
     base.vmethod_2(reader, version);
 }
Example #9
0
        DynamicMetaObject DynamicMetaObject.BindCreateInstance(CreateInstanceBinder binder, DynamicMetaObject[] args)
        {
            Class150 <T> class2 = new Class150 <T> {
                createInstanceBinder_0 = binder,
                dynamicMetaObject_0    = args,
                class143_0             = (Class143 <T>) this
            };

            if (!this.method_0("TryCreateInstance"))
            {
                return(base.BindCreateInstance(class2.createInstanceBinder_0, class2.dynamicMetaObject_0));
            }
            return(this.method_1("TryCreateInstance", class2.createInstanceBinder_0, Class143 <T> .smethod_1(class2.dynamicMetaObject_0), new Delegate2 <T>(class2.method_0), null));
        }
Example #10
0
 internal Class349(Class703 A_0, BinaryReader A_1)
 {
     this.class149_0  = new Class149();
     this.class150_0  = new Class150();
     this.hashtable_0 = new Hashtable();
     this.class264_0  = new Class264();
     this.class701_0  = new Class701();
     if (A_0.class868_0.class1111_1.int_1 != 0)
     {
         this.class264_0.method_0(A_1, A_0.class868_0.class1111_1);
         this.class701_0.method_0(A_1, A_0.class868_0.class1111_0);
         this.class149_0.method_23(A_1, A_0.class868_0.class1111_2);
         this.class150_0.method_23(A_1, A_0.class868_0.class1111_3);
         if (bool_0)
         {
             this.method_7();
         }
     }
 }
Example #11
0
        // Token: 0x0600280B RID: 10251 RVA: 0x00093E4C File Offset: 0x0009204C
        public static Enum107 smethod_0(Class141 toontownWindow, Class150 original_capture, Struct46 bounds, Class104 settings)
        {
            if (original_capture == null)
            {
                return(Enum107.const_2);
            }
            if (bounds.IsSizeEmpty)
            {
                return(Enum107.const_2);
            }
            IntPtr mainWindowHandle = toontownWindow.MainWindowHandle;

            if (!toontownWindow.ProcessOpen)
            {
                return(Enum107.const_2);
            }
            if (original_capture != null && !Struct46.smethod_0(bounds, Struct46.struct46_0))
            {
                Rectangle rec = bounds.method_0(Class410.smethod_16(mainWindowHandle).Size);
                Enum107   result;
                using (Bitmap bitmap = Class364.smethod_3(mainWindowHandle, rec))
                {
                    using (Class125 @class = new Class125(bitmap))
                    {
                        using (Class150 class2 = new Class150(@class))
                        {
                            if (Class150.smethod_1(class2, original_capture, settings.MaxColorRange))
                            {
                                result = Enum107.const_0;
                            }
                            else
                            {
                                result = Enum107.const_1;
                            }
                        }
                    }
                }
                return(result);
            }
            return(Enum107.const_2);
        }
        // Token: 0x0600179F RID: 6047 RVA: 0x0003DE78 File Offset: 0x0003C078
        protected Enum107 method_19(int interval, int timeout, Class150 original_capture, Struct46 bounds, Class104 settings)
        {
            RunBaseForm.Class163 @class = new RunBaseForm.Class163();
            @class.int_0 = timeout;
            Action action = null;

            RunBaseForm.Class164 class2 = new RunBaseForm.Class164();
            class2.class163_0             = @class;
            class2.manualResetEventSlim_0 = new ManualResetEventSlim(false);
            Enum107 result;

            try
            {
                if (action == null)
                {
                    action = new Action(class2.method_0);
                }
                using (Task task = new Task(action))
                {
                    try
                    {
                        task.Start();
                        result = this.method_20(interval, original_capture, bounds, settings, class2.manualResetEventSlim_0);
                    }
                    finally
                    {
                        class2.manualResetEventSlim_0.Set();
                        task.Wait();
                    }
                }
            }
            finally
            {
                if (class2.manualResetEventSlim_0 != null)
                {
                    ((IDisposable)class2.manualResetEventSlim_0).Dispose();
                }
            }
            return(result);
        }
Example #13
0
        // Token: 0x0600280C RID: 10252 RVA: 0x00093F24 File Offset: 0x00092124
        public static Enum107 smethod_1(Class141 toontownWindow, Class150 original_capture, Rectangle capture_bounds, Class104 settings)
        {
            if (original_capture == null)
            {
                return(Enum107.const_2);
            }
            IntPtr mainWindowHandle = toontownWindow.MainWindowHandle;

            if (!toontownWindow.ProcessOpen)
            {
                return(Enum107.const_2);
            }
            if (original_capture != null && capture_bounds.Size.smethod_1())
            {
                Enum107 result;
                using (Bitmap bitmap = Class364.smethod_3(mainWindowHandle, capture_bounds))
                {
                    using (Class125 @class = new Class125(bitmap))
                    {
                        using (Class150 class2 = new Class150(@class))
                        {
                            if (Class150.smethod_1(class2, original_capture, settings.MaxColorRange))
                            {
                                result = Enum107.const_0;
                            }
                            else
                            {
                                result = Enum107.const_1;
                            }
                        }
                    }
                }
                return(result);
            }
            return(Enum107.const_2);
        }
 public abstract void Visit(Class150 c);
 public override void Visit(Class150 c) { }
Example #16
0
    // Token: 0x06000505 RID: 1285 RVA: 0x0002B6EC File Offset: 0x000298EC
    public static Class144 smethod_1(object object_0, Type type_0)
    {
        Class144 @class = object_0 as Class144;

        if (@class != null)
        {
            return(@class);
        }
        if (type_0 == null)
        {
            if (object_0 == null)
            {
                return(new Class171());
            }
            type_0 = object_0.GetType();
        }
        type_0 = Class107.smethod_1(type_0);
        if (type_0 == Class28.type_0)
        {
            @class = new Class171();
            if (object_0 != null && object_0.GetType() != Class28.type_0)
            {
                @class.method_1(object_0.GetType());
            }
        }
        else if (Class104.smethod_0 <Array>(type_0))
        {
            @class = new Class145();
        }
        else if (Class104.smethod_0 <string>(type_0))
        {
            @class = new Class148();
        }
        else if (Class104.smethod_0 <IntPtr>(type_0))
        {
            @class = new Class151();
        }
        else if (Class104.smethod_0 <UIntPtr>(type_0))
        {
            @class = new Class162();
        }
        else if (Class104.smethod_0 <ulong>(type_0))
        {
            @class = new Class170();
        }
        else if (Class104.smethod_0 <uint>(type_0))
        {
            @class = new Class168();
        }
        else if (Class104.smethod_0 <ushort>(type_0))
        {
            @class = new Class164();
        }
        else if (Class104.smethod_0 <long>(type_0))
        {
            @class = new Class161();
        }
        else if (Class104.smethod_0 <int>(type_0))
        {
            @class = new Class150();
        }
        else if (Class104.smethod_0 <short>(type_0))
        {
            @class = new Class146();
        }
        else if (Class104.smethod_0 <byte>(type_0))
        {
            @class = new Class169();
        }
        else if (Class104.smethod_0 <sbyte>(type_0))
        {
            @class = new Class166();
        }
        else if (Class104.smethod_0 <double>(type_0))
        {
            @class = new Class163();
        }
        else if (Class104.smethod_0 <float>(type_0))
        {
            @class = new Class167();
        }
        else if (Class104.smethod_0 <bool>(type_0))
        {
            @class = new Class149();
        }
        else if (Class104.smethod_0 <char>(type_0))
        {
            @class = new Class160();
        }
        else if (Class28.smethod_0(type_0))
        {
            Class171 class2 = new Class171();
            class2.method_1(type_0);
            @class = class2;
        }
        else
        {
            if (Class104.smethod_0 <Enum>(type_0))
            {
                Enum enum_;
                if (object_0 == null)
                {
                    if (type_0 == Class28.type_2)
                    {
                        enum_ = null;
                    }
                    else
                    {
                        enum_ = (Enum)Activator.CreateInstance(type_0);
                    }
                }
                else if (type_0 == Class28.type_2 && object_0 is Enum)
                {
                    enum_ = (Enum)object_0;
                }
                else
                {
                    enum_ = (Enum)Enum.ToObject(type_0, object_0);
                }
                return(new Class165(enum_));
            }
            if (Class104.smethod_0 <ValueType>(type_0))
            {
                if (object_0 == null)
                {
                    object object_;
                    if (type_0 == Class28.type_3)
                    {
                        object_ = null;
                    }
                    else
                    {
                        object_ = Activator.CreateInstance(type_0);
                    }
                    @class = new Class159(object_);
                }
                else
                {
                    if (object_0.GetType() != type_0)
                    {
                        try
                        {
                            object_0 = Convert.ChangeType(object_0, type_0);
                        }
                        catch
                        {
                        }
                    }
                    @class = new Class159(object_0);
                }
                return(@class);
            }
            @class = new Class171();
        }
        if (object_0 != null)
        {
            @class.vmethod_1(object_0);
        }
        return(@class);
    }
 // Token: 0x06001FE1 RID: 8161 RVA: 0x00069778 File Offset: 0x00067978
 public PixelatorRenderer(Class150 pix)
 {
     this.InitializeComponent();
     this.PixelatorPreview.Image = (this.bitmap_0 = pix.GetBitmap);
 }
Example #18
0
 internal void method_28(Class150 A_0)
 {
     base.method_25(this, A_0);
 }