private static void smethod_9(Hashtable A_0, WordAttrCollection A_1, SprmCode A_2, CellAlign A_3, Interface53 A_4)
    {
        int    num  = A_4.imethod_1(A_2, A_3);
        object obj2 = A_1.method_31(num);

        if ((A_1 is CellFormat) && (A_1 as CellFormat).SamePaddingsAsTable)
        {
            switch (num)
            {
            case 0xc12:
            case 0xc1c:
            case 0xbfe:
            case 0xc08:
                obj2 = null;
                break;
            }
        }
        if (obj2 != null)
        {
            if (A_0[obj2] != null)
            {
                A_3 |= (CellAlign)A_0[obj2];
            }
            A_0[obj2] = A_3;
        }
    }
 internal Class127(int A_0, int A_1, CellAlign A_2, object A_3)
 {
     this.int_0       = A_0;
     this.int_1       = A_1;
     this.cellAlign_0 = A_2;
     this.object_0    = A_3;
 }
    internal static void smethod_4(Class732 A_0, SprmCode A_1, Interface53 A_2, IComparer A_3)
    {
        ArrayList list = new ArrayList();
        CellAlign none = CellAlign.None;

        for (int i = 0; i < A_0.Count; i++)
        {
            Hashtable hashtable = smethod_8(A_0.method_0(i), A_1, A_2);
            Class656  class2    = new Class656();
            foreach (object obj2 in hashtable.Keys)
            {
                CellAlign align3 = (CellAlign)hashtable[obj2];
                class2.method_5((int)align3, obj2);
                none |= align3;
            }
            list.Add(class2);
        }
        ArrayList list2 = new ArrayList();

        for (CellAlign align2 = CellAlign.None; align2 <= none; align2 += 1)
        {
            list2.AddRange(smethod_6(list, (int)align2));
        }
        smethod_5(list2, A_1, A_2, A_3);
    }
Exemple #4
0
    internal void method_7()
    {
        int       num    = this.binaryReader_0.ReadByte();
        int       num2   = this.binaryReader_0.ReadByte();
        CellAlign align  = (CellAlign)this.binaryReader_0.ReadByte();
        Class15   class2 = smethod_2(this.binaryReader_0);

        if (class2.method_57())
        {
            num  = Math.Min(num, this.class732_0.Count);
            num2 = Math.Min(num2, this.class732_0.Count);
            int num3 = (int)class2.method_49();
            for (int i = num; i < num2; i++)
            {
                CellFormat format = this.class732_0.method_0(i);
                format.SamePaddingsAsTable = false;
                if ((align & CellAlign.Left) != CellAlign.None)
                {
                    format.SetAttr(0xc12, ((float)num3) / 20f);
                }
                if ((align & CellAlign.Top) != CellAlign.None)
                {
                    format.SetAttr(0xbfe, ((float)num3) / 20f);
                }
                if ((align & CellAlign.Bottom) != CellAlign.None)
                {
                    format.SetAttr(0xc08, ((float)num3) / 20f);
                }
                if ((align & CellAlign.Right) != CellAlign.None)
                {
                    format.SetAttr(0xc1c, ((float)num3) / 20f);
                }
            }
        }
    }
Exemple #5
0
    float CalcCellAlignOffset(bool isHorizontal, CellAlign align)
    {
        float offset = 0f, cellHold = 0f, contentHold = 0f;

        if (isHorizontal)
        {
            cellHold    = this.padding.top + this.cellSize.y * this.numPerRowOrCol + this.spacing.y * (this.numPerRowOrCol - 1) + this.padding.bottom;
            contentHold = this.contentRT.rect.height;
        }
        else
        {
            cellHold    = this.padding.left + this.cellSize.x * this.numPerRowOrCol + this.spacing.x * (this.numPerRowOrCol - 1) + this.padding.right;
            contentHold = this.contentRT.rect.width;
        }
        if (this.cellAlign == CellAlign.LeftOrTop)
        {
            offset = 0;
        }
        else if (this.cellAlign == CellAlign.Center)
        {
            offset = (contentHold - cellHold) / 2f;
        }
        else
        {
            Debug.LogError("UITableView CellAlign wrong: " + this.cellAlign);
        }
        return(Mathf.Max(offset, 0f));
    }
Exemple #6
0
    public void Init()
    {
        if (this.isInited)
        {
            return;
        }
        if (this.scroll == null)
        {
            this.scroll = GetComponent <ScrollRect>();
        }
        this.scroll.onValueChanged.AddListener(OnScrolling);

        this.isHorizontal    = this.scroll.horizontal;
        this.scaleFactor     = this.scroll.content.localScale;
        this.gridConfig      = this.scroll.content.transform.GetComponent <GridLayoutGroup>();
        this.padding         = gridConfig.padding;
        this.cellSize        = gridConfig.cellSize;
        this.spacing         = gridConfig.spacing;
        this.numPerRowOrCol  = gridConfig.constraintCount;
        gridConfig.enabled   = false;
        this.contentRT       = this.scroll.content;
        this.viewRT          = this.scroll.viewport;
        this.cellAlign       = gridConfig.childAlignment == 0 ? CellAlign.LeftOrTop : CellAlign.Center;
        this.cellTotal       = 0;
        this.curVisibleRange = new VisibleRange()
        {
            from = 0, to = -1
        };
        this.newVisibleRange = new VisibleRange()
        {
            from = 0, to = -1
        };
        this.isInited = true;
    }
    internal static void smethod_2(WordAttrCollection A_0, SprmCode A_1, Interface53 A_2, IComparer A_3)
    {
        Hashtable hashtable = smethod_8(A_0, A_1, A_2);
        ArrayList list      = new ArrayList();

        foreach (object obj2 in hashtable.Keys)
        {
            CellAlign align = (CellAlign)hashtable[obj2];
            list.Add(new Class127(0, 0, align, obj2));
        }
        smethod_5(list, A_1, A_2, A_3);
    }
    private void method_72()
    {
        base.binaryReader_0.ReadByte();
        base.binaryReader_0.ReadByte();
        CellAlign align  = (CellAlign)base.binaryReader_0.ReadByte();
        Class15   class2 = this.method_74();

        if ((align == CellAlign.Box) && class2.method_57())
        {
            base.wordAttrCollection_0.SetAttr(0x10c2, class2.method_49() / 20f);
        }
    }
Exemple #9
0
 private void method_27(int A_0, int A_1, Border A_2, CellAlign A_3, SprmCode A_4)
 {
     if ((A_2 != null) && !A_2.IsDefault)
     {
         this.class345_0.method_5(A_4);
         int num = 3 + Class355.smethod_7(A_4 == SprmCode.TSetBrc);
         this.class345_0.Write((byte)num);
         this.class345_0.Write((byte)A_0);
         this.class345_0.Write((byte)A_1);
         this.class345_0.Write((byte)A_3);
         Class355.smethod_6(A_2.Equals(new Border()) ? null : A_2, this.class345_0, false, A_4 == SprmCode.TSetBrc);
     }
 }
Exemple #10
0
 internal static void smethod_5(Class345 A_0, SprmCode A_1, int A_2, int A_3, CellAlign A_4, object A_5)
 {
     if ((A_5 != null) && (float.Parse(A_5.ToString()) >= 0f))
     {
         A_0.method_5(A_1);
         A_0.Write((byte)6);
         A_0.Write((byte)A_2);
         A_0.Write((byte)A_3);
         A_0.Write((byte)A_4);
         A_0.Write((byte)3);
         int num2 = (int)Math.Round((double)(float.Parse(A_5.ToString()) * 20f));
         A_0.Write((short)num2);
     }
 }
Exemple #11
0
    private int imethod_1(SprmCode A_0, CellAlign A_1)
    {
        int      num  = 0x12;
        SprmCode code = A_0;

        if (code == SprmCode.TSetBrc)
        {
            return(smethod_4(A_1));
        }
        if (code != SprmCode.TCellPadding)
        {
            throw new InvalidOperationException(string.Format(BookmarkStart.b("瘷唹䠻ḽ⤿⽁㑃⩅ⵇ❉⥋⁍⑏㝑こ癕㹗㕙⹛繝᭟剡ᥣ䙥ṧ୩k᭭ᕯ山", num), A_0));
        }
        return(smethod_5(A_1));
    }
    private int imethod_1(SprmCode A_0, CellAlign A_1)
    {
        switch (A_1)
        {
        case CellAlign.Top:
            return(0x10cc);

        case CellAlign.Left:
            return(0xfb4);

        case CellAlign.Bottom:
            return(0x10d6);

        case CellAlign.Right:
            return(0x10e0);
        }
        return(0);
    }
    private void method_73()
    {
        int num;

        base.binaryReader_0.ReadByte();
        base.binaryReader_0.ReadByte();
        CellAlign align  = (CellAlign)base.binaryReader_0.ReadByte();
        Class15   class2 = this.method_74();

        if (class2.method_57())
        {
            num = (int)class2.method_49();
        }
        else
        {
            align &= CellAlign.Right | CellAlign.Left;
            num    = 0;
        }
        if (base.method_54())
        {
            (base.wordAttrCollection_0 as CellFormat).Paddings.IsDefault = false;
        }
        else
        {
            (base.wordAttrCollection_0 as RowFormat).Paddings.IsDefault = false;
        }
        if ((align & CellAlign.Left) != CellAlign.None)
        {
            base.wordAttrCollection_0.SetAttr(base.method_54() ? 0xc12 : 0xfb4, ((float)num) / 20f);
        }
        if ((align & CellAlign.Top) != CellAlign.None)
        {
            base.wordAttrCollection_0.SetAttr(base.method_54() ? 0xbfe : 0x10cc, ((float)num) / 20f);
        }
        if ((align & CellAlign.Bottom) != CellAlign.None)
        {
            base.wordAttrCollection_0.SetAttr(base.method_54() ? 0xc08 : 0x10d6, ((float)num) / 20f);
        }
        if ((align & CellAlign.Right) != CellAlign.None)
        {
            base.wordAttrCollection_0.SetAttr(base.method_54() ? 0xc1c : 0x10e0, ((float)num) / 20f);
        }
    }
Exemple #14
0
    private static int smethod_5(CellAlign A_0)
    {
        switch (A_0)
        {
        case CellAlign.Top:
            return(0xbfe);

        case CellAlign.Left:
            return(0xc12);

        case CellAlign.Bottom:
            return(0xc08);

        case CellAlign.Right:
            return(0xc1c);

        case CellAlign.DiagonalDown:
        case CellAlign.DiagonalUp:
            return(0);
        }
        throw new InvalidOperationException();
    }
Exemple #15
0
    internal void method_10(SprmCode A_0)
    {
        int       num    = this.binaryReader_0.ReadByte();
        int       num2   = this.binaryReader_0.ReadByte();
        CellAlign align  = (CellAlign)this.binaryReader_0.ReadByte();
        Border    border = (A_0 == SprmCode.TSetBrc) ? Class355.smethod_1(this.binaryReader_0, null) : Class355.smethod_0(this.binaryReader_0, null);

        num  = Math.Min(num, this.class732_0.Count);
        num2 = Math.Min(num2, this.class732_0.Count);
        for (int i = num; i < num2; i++)
        {
            CellFormat format = this.class732_0.method_0(i);
            if ((align & CellAlign.Left) != CellAlign.None)
            {
                this.method_28(format, 0xc30, border);
            }
            if ((align & CellAlign.Top) != CellAlign.None)
            {
                this.method_28(format, 0xc26, border);
            }
            if ((align & CellAlign.Bottom) != CellAlign.None)
            {
                this.method_28(format, 0xc3a, border);
            }
            if ((align & CellAlign.Right) != CellAlign.None)
            {
                this.method_28(format, 0xc44, border);
            }
            if ((align & CellAlign.DiagonalDown) != CellAlign.None)
            {
                this.method_28(format, 0xc4e, border);
            }
            if ((align & CellAlign.DiagonalUp) != CellAlign.None)
            {
                this.method_28(format, 0xc58, border);
            }
        }
    }
Exemple #16
0
    private static int smethod_4(CellAlign A_0)
    {
        switch (A_0)
        {
        case CellAlign.Top:
            return(0xc26);

        case CellAlign.Left:
            return(0xc30);

        case CellAlign.Bottom:
            return(0xc3a);

        case CellAlign.Right:
            return(0xc44);

        case CellAlign.DiagonalDown:
            return(0xc4e);

        case CellAlign.DiagonalUp:
            return(0xc58);
        }
        throw new InvalidOperationException();
    }
Exemple #17
0
    private void imethod_2(SprmCode A_0, int A_1, int A_2, CellAlign A_3, object A_4)
    {
        int      num  = 0x10;
        SprmCode code = A_0;

        if (code <= SprmCode.TSetBrc)
        {
            if (code > SprmCode.TTextFlow)
            {
                if (code == SprmCode.TVertAlign)
                {
                    VerticalAlignment alignment = (VerticalAlignment)A_4;
                    if (alignment != VerticalAlignment.Top)
                    {
                        this.class345_0.method_5(SprmCode.TVertAlign);
                        this.class345_0.Write((byte)3);
                        this.class345_0.Write((byte)A_1);
                        this.class345_0.Write((byte)A_2);
                        this.class345_0.Write((byte)alignment);
                        return;
                    }
                    return;
                }
                if (code == SprmCode.TSetBrc)
                {
                    this.method_27(A_1, A_2, (Border)A_4, A_3, SprmCode.TSetBrc);
                    return;
                }
            }
            else
            {
                if (code == SprmCode.TDxaCol)
                {
                    int num2 = (int)Math.Round((double)(float.Parse(A_4.ToString()) * 20f));
                    this.class345_0.method_5(SprmCode.TDxaCol);
                    this.class345_0.Write((byte)A_1);
                    this.class345_0.Write((byte)A_2);
                    this.class345_0.Write((short)num2);
                    return;
                }
                if (code == SprmCode.TTextFlow)
                {
                    TextDirection direction = (TextDirection)A_4;
                    if (direction != TextDirection.TopToBottom)
                    {
                        this.class345_0.method_5(SprmCode.TTextFlow);
                        this.class345_0.Write((byte)A_1);
                        this.class345_0.Write((byte)A_2);
                        this.class345_0.Write((ushort)direction);
                        return;
                    }
                    return;
                }
            }
        }
        else if (code > SprmCode.TCellWidth)
        {
            switch (code)
            {
            case SprmCode.TFCellNoWrap:
                if (!((bool)A_4))
                {
                    this.class345_0.method_5(SprmCode.TFCellNoWrap);
                    this.class345_0.Write((byte)3);
                    this.class345_0.Write((byte)A_1);
                    this.class345_0.Write((byte)A_2);
                    this.class345_0.Write((byte)1);
                    return;
                }
                return;

            case SprmCode.TCellHideMark:
                if ((bool)A_4)
                {
                    this.class345_0.method_5(SprmCode.TCellHideMark);
                    this.class345_0.Write((byte)3);
                    this.class345_0.Write((byte)A_1);
                    this.class345_0.Write((byte)A_2);
                    this.class345_0.Write((byte)1);
                }
                return;

            case SprmCode.TFitText:
                if ((bool)A_4)
                {
                    this.class345_0.method_5(SprmCode.TFitText);
                    this.class345_0.Write((byte)A_1);
                    this.class345_0.Write((byte)A_2);
                    this.class345_0.Write((byte)1);
                }
                return;
            }
        }
        else
        {
            if (code == SprmCode.TCellPadding)
            {
                Class354.smethod_5(this.class345_0, SprmCode.TCellPadding, A_1, A_2, A_3, A_4);
                return;
            }
            if (code == SprmCode.TCellWidth)
            {
                Class15 class2 = new Class15(FtsWidth.None, 0);
                switch (this.class732_0.method_0(A_1).WidthUnit)
                {
                case FtsWidth.Auto:
                    class2 = new Class15(FtsWidth.Auto, 0);
                    break;

                case FtsWidth.Percentage:
                    class2 = new Class15(FtsWidth.Percentage, (short)Math.Round((double)(this.class732_0.method_0(A_1).CellWidth * 50f)));
                    break;

                case FtsWidth.Point:
                    class2 = new Class15(FtsWidth.Point, (short)Math.Round((double)(this.class732_0.method_0(A_1).CellWidth * 20f)));
                    break;
                }
                this.method_23(A_1, A_2, (int)class2.method_51(), (int)class2.method_49());
                class2.Close();
                class2 = null;
                return;
            }
        }
        throw new InvalidOperationException(string.Format(BookmarkStart.b("砵圷丹᰻圽ⴿ㉁⡃⍅╇⽉≋㩍㕏㙑瑓さ㝗⡙籛╝偟ὡ䑣ၥ१٩ᥫ୭幯", num), A_0));
    }
Exemple #18
0
 internal static void smethod_4(Class345 A_0, SprmCode A_1, CellAlign A_2, object A_3)
 {
     smethod_5(A_0, A_1, 0, 1, A_2, A_3);
 }
 private void imethod_2(SprmCode A_0, int A_1, int A_2, CellAlign A_3, object A_4)
 {
     Class354.smethod_5(base.class345_0, SprmCode.TCellPaddingDefault, 0, 1, A_3, A_4);
 }