コード例 #1
0
    private static Field smethod_7(string A_0, Document A_1)
    {
        int       num   = 12;
        Field     field = null;
        string    str   = A_0.Trim();
        FieldType type  = Class819.smethod_2(str);
        FieldType type2 = type;

        if (type2 <= FieldType.FieldMergeField)
        {
            if (type2 != FieldType.FieldIf)
            {
                if (type2 != FieldType.FieldMergeField)
                {
                    goto Label_005C;
                }
                field = new MergeField(A_1);
            }
            else
            {
                field = new IfField(A_1);
            }
            goto Label_0113;
        }
        switch (type2)
        {
        case FieldType.FieldFormTextInput:
        case FieldType.FieldFormCheckBox:
        case FieldType.FieldFormDropDown:
        {
            string str2 = str.ToUpper();
            if (str2 != null)
            {
                if ((str2 == BookmarkStart.b("昱焳渵氷猹爻渽ᔿᙁ", num)) || (str2 == BookmarkStart.b("琱笳搵男渹礻昽ᐿ", num)))
                {
                    field = new TextFormField(A_1);
                }
                else if ((str2 == BookmarkStart.b("瘱瀳稵焷椹栻", num)) || (str2 == BookmarkStart.b("琱笳搵男縹渻焽ဿفୃᅅه", num)))
                {
                    field = new DropDownFormField(A_1);
                }
                else if ((str2 == BookmarkStart.b("焱簳猵笷焹縻焽ᠿ", num)) || (str2 == BookmarkStart.b("琱笳搵男礹琻笽̿ुكॅ၇", num)))
                {
                    field = new CheckBoxFormField(A_1);
                }
            }
            (field as FormField).HasFFData = false;
            goto Label_0113;
        }
        }
Label_005C:
        field = new Field(A_1);
Label_0113:
        field.Code = field.Code + A_0;
        if (!(field is FormField))
        {
            field.Type = type;
        }
        return(field);
    }
コード例 #2
0
    private static Field smethod_1(string A_0, Document A_1)
    {
        int       num   = 9;
        Field     field = null;
        string    str   = A_0.Trim();
        FieldType type  = Class819.smethod_2(str);
        FieldType type2 = type;

        if (type2 <= FieldType.FieldMergeField)
        {
            if (type2 != FieldType.FieldIf)
            {
                if (type2 != FieldType.FieldMergeField)
                {
                    goto Label_005C;
                }
                field = new MergeField(A_1);
            }
            else
            {
                field = new IfField(A_1);
            }
            goto Label_0113;
        }
        switch (type2)
        {
        case FieldType.FieldFormTextInput:
        case FieldType.FieldFormCheckBox:
        case FieldType.FieldFormDropDown:
        {
            string str2 = str.ToUpper();
            if (str2 != null)
            {
                if ((str2 == BookmarkStart.b("笮琰欲愴縶眸欺格款", num)) || (str2 == BookmarkStart.b("椮縰愲破挶簸挺椼", num)))
                {
                    field = new TextFormField(A_1);
                }
                else if ((str2 == BookmarkStart.b("欮田缲簴搶洸", num)) || (str2 == BookmarkStart.b("椮縰愲破猶欸琺洼笾เᑂୄ", num)))
                {
                    field = new DropDownFormField(A_1);
                }
                else if ((str2 == BookmarkStart.b("氮礰瘲瘴簶笸琺攼", num)) || (str2 == BookmarkStart.b("椮縰愲破琶焸縺縼琾̀ూᵄ", num)))
                {
                    field = new CheckBoxFormField(A_1);
                }
            }
            (field as FormField).HasFFData = false;
            goto Label_0113;
        }
        }
Label_005C:
        field = new Field(A_1);
Label_0113:
        field.Code = field.Code + A_0;
        if (!(field is FormField))
        {
            field.Type = type;
        }
        return(field);
    }
コード例 #3
0
    private void imethod_15(CharacterFormat A_0, FieldType A_1)
    {
        Field     field;
        FieldType type = A_1;

        if (type <= FieldType.FieldMergeField)
        {
            if (type != FieldType.FieldIf)
            {
                if (type != FieldType.FieldMergeField)
                {
                    goto Label_0044;
                }
                field = new MergeField(this.document_0);
            }
            else
            {
                field = new IfField(this.document_0);
            }
            goto Label_007A;
        }
        switch (type)
        {
        case FieldType.FieldFormTextInput:
            field = new TextFormField(this.document_0);
            goto Label_007A;

        case FieldType.FieldFormCheckBox:
            field = new CheckBoxFormField(this.document_0);
            goto Label_007A;

        case FieldType.FieldFormDropDown:
            field = new DropDownFormField(this.document_0);
            goto Label_007A;
        }
Label_0044:
        field = new Field(this.document_0);
Label_007A:
        this.fieldCharType_0  = FieldCharType.Begin;
        field.Type            = A_1;
        field.CharacterFormat = (CharacterFormat)A_0.Clone();
        this.documentObject_0.method_13(field);
        if (A_1 == FieldType.FieldTOC)
        {
            (this.documentObject_0 as Paragraph).IsTOCPara = true;
        }
        this.stack_0.Push(field);
    }
コード例 #4
0
        //Create the IF Field like:{IF { MERGEFIELD Count } > "100" "Thanks" " The minimum order is 100 units "}
        static void CreateIfField(Document document, Paragraph paragraph)
        {
            IfField ifField = new IfField(document);

            ifField.Type = FieldType.FieldIf;
            ifField.Code = "IF ";

            paragraph.Items.Add(ifField);
            paragraph.AppendField("Count", FieldType.FieldMergeField);
            paragraph.AppendText(" > ");
            paragraph.AppendText("\"100\" ");
            paragraph.AppendText("\"Thanks\" ");
            paragraph.AppendText("\"The minimum order is 100 units\"");

            IParagraphBase end = document.CreateParagraphItem(ParagraphItemType.FieldMark);

            (end as FieldMark).Type = FieldMarkType.FieldEnd;
            paragraph.Items.Add(end);
            ifField.End = end as FieldMark;
        }
コード例 #5
0
        private void CreateIFField2(Document document, Paragraph paragraph)
        {
            IfField ifField = new IfField(document);

            ifField.Type = FieldType.FieldIf;
            ifField.Code = "IF ";
            paragraph.Items.Add(ifField);

            paragraph.AppendField("Age", FieldType.FieldMergeField);
            paragraph.AppendText(" > ");
            paragraph.AppendText("\"50\" ");
            paragraph.AppendText("\"The old man\" ");
            paragraph.AppendText("\"The young man\"");

            IParagraphBase end = document.CreateParagraphItem(ParagraphItemType.FieldMark);

            (end as FieldMark).Type = FieldMarkType.FieldEnd;
            paragraph.Items.Add(end);

            ifField.End = end as FieldMark;
        }
コード例 #6
0
        private void CreateIFField1(Document document, Paragraph paragraph)
        {
            IfField ifField = new IfField(document);

            ifField.Type = FieldType.FieldIf;
            ifField.Code = "IF ";
            paragraph.Items.Add(ifField);

            paragraph.AppendField("Count", FieldType.FieldMergeField);
            paragraph.AppendText(" > ");
            paragraph.AppendText("\"1\" ");
            paragraph.AppendText("\"Greater than one\" ");
            paragraph.AppendText("\"Less than one\"");

            IParagraphBase end = document.CreateParagraphItem(ParagraphItemType.FieldMark);

            (end as FieldMark).Type = FieldMarkType.FieldEnd;
            paragraph.Items.Add(end);

            ifField.End = end as FieldMark;
        }
コード例 #7
0
    private static Field smethod_3(string A_0, Document A_1)
    {
        Field     field = null;
        FieldType type  = Class819.smethod_2(A_0.Trim());
        FieldType type2 = type;

        if (type2 <= FieldType.FieldMergeField)
        {
            if (type2 != FieldType.FieldIf)
            {
                if (type2 != FieldType.FieldMergeField)
                {
                    goto Label_004A;
                }
                field = new MergeField(A_1);
            }
            else
            {
                field = new IfField(A_1);
            }
            goto Label_0051;
        }
        switch (type2)
        {
        case FieldType.FieldFormTextInput:
        case FieldType.FieldFormCheckBox:
        case FieldType.FieldFormDropDown:
            goto Label_0051;
        }
Label_004A:
        field = new Field(A_1);
Label_0051:
        field.Code = field.Code + A_0;
        if (!(field is FormField))
        {
            field.Type = type;
        }
        return(field);
    }