private void method_31()
        {
            int startIndex = this.int_1;

            while (true)
            {
                char ch2 = this.char_2[this.int_1];
                if (ch2 != '\0')
                {
                    char ch = this.char_2[this.int_1];
                    if (!this.method_30(ch))
                    {
                        if (!char.IsWhiteSpace(ch) && (ch != ':'))
                        {
                            throw JsonReaderException.smethod_1(this, "Invalid JavaScript property identifier character: {0}.".smethod_0(CultureInfo.InvariantCulture, ch));
                        }
                        this.struct29_0 = new Struct29(this.char_2, startIndex, this.int_1 - startIndex);
                        return;
                    }
                    this.int_1++;
                }
                else
                {
                    if (this.int_0 != this.int_1)
                    {
                        this.struct29_0 = new Struct29(this.char_2, startIndex, this.int_1 - startIndex);
                        return;
                    }
                    if (this.method_18(true) == 0)
                    {
                        throw JsonReaderException.smethod_1(this, "Unexpected end while parsing unquoted property name.");
                    }
                }
            }
        }
 private void method_26()
 {
     if (this.class190_0 != null)
     {
         this.class190_0.Int32_0 = 0;
     }
     this.struct29_0 = new Struct29();
 }
示例#3
0
    internal Struct29 method_11(Struct28 A_0, Class883 A_1)
    {
        if (A_0.method_0())
        {
            return(new Struct29());
        }
        Struct29 struct3 = new Struct29();
        Struct28 struct4 = A_0.method_1();
        bool     flag    = false;
        int      num2    = -1;
        int      num     = 0;
        int      count   = A_1.list_0.Count;

        while (num < count)
        {
            Struct28 struct5 = A_1.list_0[num];
            if ((!flag && (struct4.int_1 >= struct5.int_1)) && (struct4.int_1 < struct5.int_0))
            {
                Struct30 struct6 = A_1.list_2[num];
                struct6.method_3(struct4.int_1 - A_1.list_0[num].int_1);
                struct3.method_3(struct6);
                num2 = num;
                flag = true;
            }
            if ((flag && (struct4.int_0 > struct5.int_1)) && (struct4.int_0 <= struct5.int_0))
            {
                if ((num < (count - 1)) && (struct4.int_0 < struct5.int_0))
                {
                    struct3.method_1(A_1.list_2[num]);
                }
                else if ((num < (count - 1)) && (struct4.int_0 == struct5.int_0))
                {
                    struct3.method_1(A_1.list_2[num + 1]);
                }
                else if (num2 == (count - 1))
                {
                    struct3.method_1(struct3.method_2());
                }
                else
                {
                    struct3.method_1(this.struct30_1);
                }
            }
            num++;
        }
        return(struct3);
    }
示例#4
0
        public static void smethod_1(IntPtr hWnd, Point location, Size size, Bitmap bitmap, byte opacity)
        {
            if (bitmap.PixelFormat != PixelFormat.Format32bppArgb)
            {
                throw new ApplicationException("The bitmap must be 32ppp with alpha-channel.");
            }
            IntPtr dc      = Class265.GetDC(IntPtr.Zero);
            IntPtr intPtr  = Class265.CreateCompatibleDC(dc);
            IntPtr intPtr2 = IntPtr.Zero;
            IntPtr hObject = IntPtr.Zero;

            try
            {
                intPtr2 = bitmap.GetHbitmap(Color.FromArgb(0));
                hObject = Class265.SelectObject(intPtr, intPtr2);
                Point    empty   = Point.Empty;
                Struct29 @struct = new Struct29
                {
                    byte_0 = Class410.byte_0,
                    byte_1 = 0,
                    byte_2 = opacity,
                    byte_3 = Class410.byte_1
                };
                if (!Class265.UpdateLayeredWindow(hWnd, dc, ref location, ref size, intPtr, ref empty, 0, ref @struct, Class410.int_0))
                {
                    throw new Win32Exception();
                }
            }
            finally
            {
                Class265.ReleaseDC(IntPtr.Zero, dc);
                if (intPtr2 != IntPtr.Zero)
                {
                    Class265.SelectObject(intPtr, hObject);
                    Class265.DeleteObject(intPtr2);
                }
                Class265.DeleteDC(intPtr);
            }
        }
示例#5
0
        public static void smethod_2(IntPtr Handle, Bitmap bitmap, byte opacity, Point Location)
        {
            if (bitmap.PixelFormat != PixelFormat.Format32bppArgb)
            {
                throw new ApplicationException("The bitmap must be 32bpp.");
            }
            IntPtr dc      = Class265.GetDC(IntPtr.Zero);
            IntPtr intPtr  = Class265.CreateCompatibleDC(dc);
            IntPtr intPtr2 = IntPtr.Zero;
            IntPtr hObject = IntPtr.Zero;

            try
            {
                intPtr2 = bitmap.GetHbitmap(Color.FromArgb(0));
                hObject = Class265.SelectObject(intPtr, intPtr2);
                Size     size    = new Size(bitmap.Width, bitmap.Height);
                Point    point   = new Point(0, 0);
                Point    point2  = Location;
                Struct29 @struct = default(Struct29);
                @struct.byte_0 = Class410.byte_0;
                @struct.byte_1 = 0;
                @struct.byte_2 = opacity;
                @struct.byte_3 = Class410.byte_1;
                Class265.UpdateLayeredWindow(Handle, dc, ref point2, ref size, intPtr, ref point, 0, ref @struct, Class410.int_0);
            }
            finally
            {
                Class265.ReleaseDC(IntPtr.Zero, dc);
                if (intPtr2 != IntPtr.Zero)
                {
                    Class265.SelectObject(intPtr, hObject);
                    Class265.DeleteObject(intPtr2);
                }
                Class265.DeleteDC(intPtr);
            }
        }
 public static extern bool UpdateLayeredWindow(IntPtr hwnd, IntPtr hdcDst, ref Point pptDst, ref Size psize, IntPtr hdcSrc, ref Point pprSrc, int crKey, ref Struct29 pblend, int dwFlags);
        private void method_36()
        {
            int  num2;
            char ch;

            if (!this.method_40("new"))
            {
                throw JsonReaderException.smethod_1(this, "Unexpected content while parsing JSON.");
            }
            this.method_35(false);
            int startIndex = this.int_1;

Label_0050:
            ch = this.char_2[this.int_1];
            if (ch != '\0')
            {
                if (!char.IsLetterOrDigit(ch))
                {
                    switch (ch)
                    {
                    case '\r':
                        num2 = this.int_1;
                        this.method_34(true);
                        goto Label_00DA;

                    case '\n':
                        num2 = this.int_1;
                        this.method_33();
                        goto Label_00DA;
                    }
                    if (char.IsWhiteSpace(ch))
                    {
                        num2 = this.int_1;
                        this.int_1++;
                    }
                    else
                    {
                        if (ch != '(')
                        {
                            throw JsonReaderException.smethod_1(this, "Unexpected character while parsing constructor: {0}.".smethod_0(CultureInfo.InvariantCulture, ch));
                        }
                        num2 = this.int_1;
                    }
                    goto Label_00DA;
                }
                this.int_1++;
                goto Label_0050;
            }
            if (this.int_0 != this.int_1)
            {
                num2 = this.int_1;
                this.int_1++;
            }
            else
            {
                if (this.method_18(true) == 0)
                {
                    throw JsonReaderException.smethod_1(this, "Unexpected end while parsing constructor.");
                }
                goto Label_0050;
            }
Label_00DA:
            this.struct29_0 = new Struct29(this.char_2, startIndex, num2 - startIndex);
            string str = this.struct29_0.ToString();

            this.method_35(false);
            if (this.char_2[this.int_1] != '(')
            {
                throw JsonReaderException.smethod_1(this, "Unexpected character while parsing constructor: {0}.".smethod_0(CultureInfo.InvariantCulture, this.char_2[this.int_1]));
            }
            this.int_1++;
            this.method_26();
            base.SetToken(JsonToken.StartConstructor, str);
        }
        private void method_22(char char_3)
        {
            int      num4;
            char     ch;
            char     ch2;
            char     ch4;
            int      index      = this.int_1;
            int      startIndex = this.int_1;
            int      num3       = this.int_1;
            Class190 class2     = null;

            goto Label_0299;
Label_009B:
            ch2 = ch;
            index++;
Label_0211:
            if (class2 == null)
            {
                class2 = this.method_14();
            }
            this.method_23(class2, ch2, num3, num4);
            num3 = index;
Label_0299:
            ch4 = this.char_2[index++];
            if (ch4 > '\r')
            {
                switch (ch4)
                {
                case '"':
                case '\'':
                    if (this.char_2[index - 1] != char_3)
                    {
                        goto Label_0299;
                    }
                    index--;
                    if (startIndex == num3)
                    {
                        this.struct29_0 = new Struct29(this.char_2, startIndex, index - startIndex);
                    }
                    else
                    {
                        if (class2 == null)
                        {
                            class2 = this.method_14();
                        }
                        if (index > num3)
                        {
                            class2.method_1(this.char_2, num3, index - num3);
                        }
                        this.struct29_0 = new Struct29(class2.method_5(), 0, class2.Int32_0);
                    }
                    index++;
                    this.int_1 = index;
                    return;
                }
                if (ch4 != '\\')
                {
                    goto Label_0299;
                }
                this.int_1 = index;
                if (!this.method_20(0, true))
                {
                    this.int_1 = index;
                    throw JsonReaderException.smethod_1(this, "Unterminated string. Expected delimiter: {0}.".smethod_0(CultureInfo.InvariantCulture, char_3));
                }
                num4 = index - 1;
                ch   = this.char_2[index];
                char ch5 = ch;
                if (ch5 > '\\')
                {
                    if (ch5 <= 'f')
                    {
                        if (ch5 != 'b')
                        {
                            if (ch5 != 'f')
                            {
                                goto Label_02F8;
                            }
                            index++;
                            ch2 = '\f';
                        }
                        else
                        {
                            index++;
                            ch2 = '\b';
                        }
                        goto Label_0211;
                    }
                    switch (ch5)
                    {
                    case 'r':
                        index++;
                        ch2 = '\r';
                        goto Label_0211;

                    case 't':
                        index++;
                        ch2 = '\t';
                        goto Label_0211;

                    case 'u':
                        index++;
                        this.int_1 = index;
                        ch2        = this.method_24();
                        if (!Class198.smethod_12(ch2))
                        {
                            if (Class198.smethod_11(ch2))
                            {
                                bool flag;
                                do
                                {
                                    flag = false;
                                    if (!this.method_20(2, true) || ((this.char_2[this.int_1] != '\\') || (this.char_2[this.int_1 + 1] != 'u')))
                                    {
                                        ch2 = 0xfffd;
                                    }
                                    else
                                    {
                                        char ch3 = ch2;
                                        this.int_1 += 2;
                                        ch2         = this.method_24();
                                        if (!Class198.smethod_12(ch2))
                                        {
                                            if (Class198.smethod_11(ch2))
                                            {
                                                ch3  = 0xfffd;
                                                flag = true;
                                            }
                                            else
                                            {
                                                ch3 = 0xfffd;
                                            }
                                        }
                                        if (class2 == null)
                                        {
                                            class2 = this.method_14();
                                        }
                                        this.method_23(class2, ch3, num3, num4);
                                        num3 = this.int_1;
                                    }
                                }while (flag);
                            }
                        }
                        else
                        {
                            ch2 = 0xfffd;
                        }
                        index = this.int_1;
                        goto Label_0211;

                    case 'n':
                        index++;
                        ch2 = '\n';
                        goto Label_0211;
                    }
                    goto Label_02F8;
                }
                if (ch5 <= '\'')
                {
                    switch (ch5)
                    {
                    case '"':
                    case '\'':
                        goto Label_009B;
                    }
                    goto Label_02F8;
                }
                if (ch5 != '/')
                {
                    if (ch5 != '\\')
                    {
                        goto Label_02F8;
                    }
                    index++;
                    ch2 = '\\';
                    goto Label_0211;
                }
                goto Label_009B;
            }
            switch (ch4)
            {
            case '\0':
                if (this.int_0 == (index - 1))
                {
                    index--;
                    if (this.method_18(true) == 0)
                    {
                        this.int_1 = index;
                        throw JsonReaderException.smethod_1(this, "Unterminated string. Expected delimiter: {0}.".smethod_0(CultureInfo.InvariantCulture, char_3));
                    }
                }
                break;

            case '\n':
                this.int_1 = index - 1;
                this.method_33();
                index = this.int_1;
                break;

            case '\r':
                this.int_1 = index - 1;
                this.method_34(true);
                index = this.int_1;
                break;
            }
            goto Label_0299;
Label_02F8:
            index++;
            this.int_1 = index;
            throw JsonReaderException.smethod_1(this, "Bad JSON escape sequence: {0}.".smethod_0(CultureInfo.InvariantCulture, @"\" + ch));
        }
        private void method_38()
        {
            this.int_1++;
            if (!this.method_20(1, false) || (this.char_2[this.int_1] != '*'))
            {
                throw JsonReaderException.smethod_1(this, "Error parsing comment. Expected: *, got {0}.".smethod_0(CultureInfo.InvariantCulture, this.char_2[this.int_1]));
            }
            this.int_1++;
            int  startIndex = this.int_1;
            bool flag       = false;

            while (!flag)
            {
                char ch = this.char_2[this.int_1];
                if (ch <= '\n')
                {
                    if (ch != '\0')
                    {
                        if (ch != '\n')
                        {
                            goto Label_00AF;
                        }
                        this.method_33();
                    }
                    else if (this.int_0 == this.int_1)
                    {
                        if (this.method_18(true) == 0)
                        {
                            throw JsonReaderException.smethod_1(this, "Unexpected end while parsing comment.");
                        }
                    }
                    else
                    {
                        this.int_1++;
                    }
                    continue;
                }
                switch (ch)
                {
                case '\r':
                    goto Label_0116;

                case '*':
                {
                    this.int_1++;
                    if (this.method_20(0, true) && (this.char_2[this.int_1] == '/'))
                    {
                        this.struct29_0 = new Struct29(this.char_2, startIndex, (this.int_1 - startIndex) - 1);
                        this.int_1++;
                        flag = true;
                    }
                    continue;
                }
                }
Label_00AF:
                this.int_1++;
                continue;
Label_0116:
                this.method_34(true);
            }
            base.SetToken(JsonToken.Comment, this.struct29_0.ToString());
            this.method_26();
        }
示例#10
0
        private void method_37()
        {
            object    obj2;
            JsonToken integer;

            this.method_17();
            char c          = this.char_2[this.int_1];
            int  startIndex = this.int_1;

            this.method_25();
            this.struct29_0 = new Struct29(this.char_2, startIndex, this.int_1 - startIndex);
            bool flag  = char.IsDigit(c) && (this.struct29_0.Int32_1 == 1);
            bool flag2 = (((c == '0') && (this.struct29_0.Int32_1 > 1)) && ((this.struct29_0.Char_0[this.struct29_0.Int32_0 + 1] != '.') && (this.struct29_0.Char_0[this.struct29_0.Int32_0 + 1] != 'e'))) && (this.struct29_0.Char_0[this.struct29_0.Int32_0 + 1] != 'E');

            if (base.enum14_0 == Enum14.ReadAsInt32)
            {
                if (flag)
                {
                    obj2 = c - '0';
                }
                else if (flag2)
                {
                    string str  = this.struct29_0.ToString();
                    int    num2 = str.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt32(str, 0x10) : Convert.ToInt32(str, 8);
                    obj2 = num2;
                }
                else
                {
                    obj2 = Class181.smethod_15(this.struct29_0.Char_0, this.struct29_0.Int32_0, this.struct29_0.Int32_1);
                }
                integer = JsonToken.Integer;
            }
            else if (base.enum14_0 == Enum14.ReadAsDecimal)
            {
                if (flag)
                {
                    obj2 = c - 48M;
                }
                else if (flag2)
                {
                    string str2 = this.struct29_0.ToString();
                    long   num3 = str2.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt64(str2, 0x10) : Convert.ToInt64(str2, 8);
                    obj2 = Convert.ToDecimal(num3);
                }
                else
                {
                    obj2 = decimal.Parse(this.struct29_0.ToString(), NumberStyles.Float | NumberStyles.AllowThousands | NumberStyles.AllowTrailingSign, CultureInfo.InvariantCulture);
                }
                integer = JsonToken.Float;
            }
            else if (flag)
            {
                obj2    = ((long)c) - 0x30L;
                integer = JsonToken.Integer;
            }
            else if (flag2)
            {
                string str4 = this.struct29_0.ToString();
                obj2    = str4.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt64(str4, 0x10) : Convert.ToInt64(str4, 8);
                integer = JsonToken.Integer;
            }
            else
            {
                long   num4;
                Enum18 enum2 = Class181.smethod_16(this.struct29_0.Char_0, this.struct29_0.Int32_0, this.struct29_0.Int32_1, out num4);
                switch (enum2)
                {
                case Enum18.Success:
                    obj2    = num4;
                    integer = JsonToken.Integer;
                    goto Label_032C;

                case Enum18.Invalid:
                {
                    string s = this.struct29_0.ToString();
                    if (base.floatParseHandling_0 == FloatParseHandling.Decimal)
                    {
                        obj2 = decimal.Parse(s, NumberStyles.Float | NumberStyles.AllowThousands | NumberStyles.AllowTrailingSign, CultureInfo.InvariantCulture);
                    }
                    else
                    {
                        obj2 = Convert.ToDouble(s, CultureInfo.InvariantCulture);
                    }
                    integer = JsonToken.Float;
                    goto Label_032C;
                }

                case Enum18.Overflow:
                    obj2    = BigInteger.Parse(this.struct29_0.ToString(), CultureInfo.InvariantCulture);
                    integer = JsonToken.Integer;
                    goto Label_032C;
                }
                if (enum2 != Enum18.Overflow)
                {
                    throw JsonReaderException.smethod_1(this, "Unknown error parsing integer.");
                }
                obj2    = BigInteger.Parse(this.struct29_0.ToString(), CultureInfo.InvariantCulture);
                integer = JsonToken.Integer;
            }
Label_032C:
            this.method_26();
            base.SetToken(integer, obj2);
        }