Пример #1
0
        private static string smethod_2(TextFormField A_0)
        {
            int num = 15;

            switch (A_0.TextFormat)
            {
            case TextFormat.Uppercase:
                return(BookmarkStart.b("怴朶椸縺漼簾@၂D", num));

            case TextFormat.Lowercase:
                return(BookmarkStart.b("礴砶游縺漼簾@၂D", num));

            case TextFormat.FirstCapital:
                return(BookmarkStart.b("猴縶欸栺椼Ἶɀɂᕄๆᵈ੊Ō", num));

            case TextFormat.Titlecase:
                return(BookmarkStart.b("愴縶洸眺砼ἾɀɂᙄɆ", num));
            }
            return(string.Empty);
        }
Пример #2
0
        private void method_246(FormField A_0, Spire.Doc.Documents.FormFieldType A_1, BinaryWriter A_2)
        {
            string str;
            int    num = 5;

            A_2.Write(uint.MaxValue);
            int num2 = 0;

            num2  = (int)(Spire.Doc.Documents.FormFieldType.TextInput | A_1);
            num2 |= this.method_247(A_0, A_1) << 2;
            num2 |= A_0.OwnHelpText ? 0x80 : 0;
            num2 |= A_0.OwnStatusText ? 0x100 : 0;
            num2 |= !A_0.Enabled ? 0x200 : 0;
            if (A_1 == Spire.Doc.Documents.FormFieldType.CheckBox)
            {
                num2 |= ((A_0 as CheckBoxFormField).SizeType != CheckBoxSizeType.Auto) ? 0x400 : 0;
            }
            if (A_1 == Spire.Doc.Documents.FormFieldType.TextInput)
            {
                num2 |= ((int)(A_0 as TextFormField).TextFieldType) << 11;
            }
            num2 |= A_0.CalculateOnExit ? 0x4000 : 0;
            num2 |= (A_1 == Spire.Doc.Documents.FormFieldType.DropDown) ? 0x8000 : 0;
            A_2.Write((ushort)num2);
            int num3 = (A_0 is TextFormField) ? (A_0 as TextFormField).MaximumLength : 0;
            int num4 = (A_0 is CheckBoxFormField) ? ((int)((A_0 as CheckBoxFormField).CheckBoxSize * 2f)) : 20;

            A_2.Write((ushort)num3);
            A_2.Write((ushort)num4);
            Class1029.smethod_2(A_0.Name, 20, A_2, true, true);
            switch (A_1)
            {
            case Spire.Doc.Documents.FormFieldType.TextInput:
            {
                TextFormField field = A_0 as TextFormField;
                switch (field.TextFieldType)
                {
                case TextFormFieldType.RegularText:
                case TextFormFieldType.NumberText:
                case TextFormFieldType.DateText:
                case TextFormFieldType.Calculation:
                    Class1029.smethod_2(field.DefaultText, 0xff, A_2, true, true);
                    goto Label_01CB;

                case TextFormFieldType.CurrentDate:
                case TextFormFieldType.CurrentTime:
                    Class1029.smethod_2("", 0xff, A_2, true, true);
                    goto Label_01CB;
                }
                throw new InvalidOperationException(BookmarkStart.b("縪䌬䐮弰尲䈴夶ᤸ伺堼䜾㕀捂ⱄ⥆㥈㹊㥌潎═⩒╔㉖睘", num));
            }

            case Spire.Doc.Documents.FormFieldType.CheckBox:
                A_2.Write((A_0 as CheckBoxFormField).DefaultCheckBoxValue ? ((ushort)1) : ((ushort)0));
                break;

            case Spire.Doc.Documents.FormFieldType.DropDown:
                A_2.Write((ushort)(A_0 as DropDownFormField).DefaultDropDownValue);
                break;

            default:
                throw new InvalidOperationException(BookmarkStart.b("縪䌬䐮弰尲䈴夶ᤸ崺刼䴾ⱀ捂⍄⹆ⱈ❊⥌潎═⩒╔㉖睘", num));
            }
Label_01CB:
            str = (A_0 is TextFormField) ? (A_0 as TextFormField).StringFormat : "";
            Class1029.smethod_2(str, 0x40, A_2, true, true);
            Class1029.smethod_2(A_0.Help, 0xff, A_2, true, true);
            Class1029.smethod_2(A_0.StatusBarHelp, 0x8a, A_2, true, true);
            Class1029.smethod_2(A_0.MacroOnStart, 0x20, A_2, true, true);
            Class1029.smethod_2(A_0.MacroOnEnd, 0x20, A_2, true, true);
            if (A_1 == Spire.Doc.Documents.FormFieldType.DropDown)
            {
                A_2.Write((ushort)0xffff);
                A_2.Write((uint)(A_0 as DropDownFormField).DropDownItems.Count);
                for (int i = 0; i < (A_0 as DropDownFormField).DropDownItems.Count; i++)
                {
                    Class1029.smethod_2((A_0 as DropDownFormField).DropDownItems[i].Text, 0x7fffffff, A_2, true, false);
                }
            }
        }