示例#1
0
    private static double smethod_1(double A_0, NMLUnit A_1, NMLUnit A_2)
    {
        int    num  = 4;
        double num2 = A_0;

        if (A_1 == A_2)
        {
            return(num2);
        }
        switch (A_1)
        {
        case NMLUnit.Pica:
            num2 *= 12.0;
            break;

        case NMLUnit.Point:
            break;

        case NMLUnit.Inch:
            num2 = Class969.smethod_13(A_0);
            break;

        case NMLUnit.Milimiter:
            num2 = Class969.smethod_15(A_0);
            break;

        case NMLUnit.Centimeter:
            num2 = Class969.smethod_22(A_0);
            break;

        default:
            throw new InvalidOperationException(BookmarkStart.b("缩䈫䔭帯崱䌳堵ᠷ伹刻圽㘿❁㙃㕅⥇♉汋⍍㕏㍑❓⍕⩗㽙牛", num));
        }
        return(num2 * smethod_2(A_2));
    }
示例#2
0
    private static float smethod_2(NMLUnit A_0)
    {
        switch (A_0)
        {
        case NMLUnit.HalfPoints:
            return(2f);

        case NMLUnit.Twips:
            return(20f);
        }
        return(1f);
    }
示例#3
0
    private static NMLUnit smethod_3(string A_0, NMLUnit A_1)
    {
        int    num = 0x11;
        string key = A_0;

        if (key != null)
        {
            int num2;
            if (Class1160.dictionary_26 == null)
            {
                Dictionary <string, int> dictionary1 = new Dictionary <string, int>(7);
                dictionary1.Add(BookmarkStart.b("帶圸", num), 0);
                dictionary1.Add(BookmarkStart.b("䜶䴸", num), 1);
                dictionary1.Add(BookmarkStart.b("娶吸", num), 2);
                dictionary1.Add(BookmarkStart.b("吶吸", num), 3);
                dictionary1.Add(BookmarkStart.b("䜶娸", num), 4);
                dictionary1.Add(BookmarkStart.b("䜶倸", num), 5);
                dictionary1.Add("", 6);
                Class1160.dictionary_26 = dictionary1;
            }
            if (Class1160.dictionary_26.TryGetValue(key, out num2))
            {
                switch (num2)
                {
                case 0:
                    return(NMLUnit.Inch);

                case 1:
                    return(NMLUnit.Point);

                case 2:
                    return(NMLUnit.Milimiter);

                case 3:
                    return(NMLUnit.Centimeter);

                case 4:
                case 5:
                    return(NMLUnit.Pica);

                case 6:
                    return(A_1);
                }
            }
        }
        throw new ArgumentOutOfRangeException(string.Format(BookmarkStart.b("戶圸债匼倾㙀ⵂ敄㉆❈≊㭌⩎⍐⁒㑔㭖祘㙚㡜㹞በᙢᝤɦ䥨ၪ嵬ቮ", num), A_0));
    }
示例#4
0
    internal double method_49(string A_0, NMLUnit A_1)
    {
        double num = 0.0;

        if (A_0 != string.Empty)
        {
            int num2 = A_0.Length - 1;
            while (num2 >= 0)
            {
                if ((A_0[num2] >= '0') && (A_0[num2] <= '9'))
                {
                    break;
                }
                num2--;
            }
            double  d    = Class1041.smethod_15(A_0.Substring(0, num2 + 1));
            NMLUnit unit = smethod_3(A_0.Substring(num2 + 1, (A_0.Length - num2) - 1), A_1);
            if (!double.IsNaN(d))
            {
                num = (float)smethod_1(d, unit, A_1);
            }
        }
        return(num);
    }