Ejemplo n.º 1
0
        internal override SdtControlProperties Clone()
        {
            SdtCheckBox box = (SdtCheckBox)base.MemberwiseClone();

            box.class67_0 = this.class67_0.method_0();
            box.class67_1 = this.class67_1.method_0();
            return(box);
        }
Ejemplo n.º 2
0
        internal void method_8()
        {
            TextRange           range;
            SdtDropDownListBase controlProperties;

            switch (this.SDTType)
            {
            case SdtType.ComboBox:
            case SdtType.DropDownList:
            {
                controlProperties = this.ControlProperties as SdtDropDownListBase;
                range             = null;
                if (!(this.documentObject_0 is StructureDocumentTagCell))
                {
                    if (this.documentObject_0 is StructureDocumentTagInline)
                    {
                        StructureDocumentTagInline inline3 = this.documentObject_0 as StructureDocumentTagInline;
                        if (inline3.ChildObjects.Count > 0)
                        {
                            range = inline3.ChildObjects[0] as TextRange;
                        }
                    }
                    else if (this.documentObject_0 is StructureDocumentTag)
                    {
                        StructureDocumentTag tag = this.documentObject_0 as StructureDocumentTag;
                        if (((tag.ChildObjects.Count > 0) && (tag.ChildObjects[0] is Paragraph)) && ((tag.ChildObjects[0] as Paragraph).ChildObjects.Count > 0))
                        {
                            range = (tag.ChildObjects[0] as Paragraph).ChildObjects[0] as TextRange;
                        }
                    }
                    break;
                }
                StructureDocumentTagCell cell = this.documentObject_0 as StructureDocumentTagCell;
                if (((cell.ChildObjects.Count > 0) && (cell.ChildObjects[0] is Paragraph)) && ((cell.ChildObjects[0] as Paragraph).ChildObjects.Count > 0))
                {
                    range = (cell.ChildObjects[0] as Paragraph).ChildObjects[0] as TextRange;
                }
                break;
            }

            case SdtType.Picture:
            {
                SdtPicture picture = this.ControlProperties as SdtPicture;
                Image      image   = picture.Image;
                if (image != null)
                {
                    DocPicture picture2 = null;
                    if (this.documentObject_0 is StructureDocumentTagCell)
                    {
                        StructureDocumentTagCell cell2 = this.documentObject_0 as StructureDocumentTagCell;
                        if (((cell2.ChildObjects.Count > 0) && (cell2.ChildObjects[0] is Paragraph)) && ((cell2.ChildObjects[0] as Paragraph).ChildObjects.Count > 0))
                        {
                            picture2 = (cell2.ChildObjects[0] as Paragraph).ChildObjects[0] as DocPicture;
                        }
                    }
                    else if (this.documentObject_0 is StructureDocumentTagInline)
                    {
                        StructureDocumentTagInline inline = this.documentObject_0 as StructureDocumentTagInline;
                        if (inline.ChildObjects.Count > 0)
                        {
                            picture2 = inline.ChildObjects[0] as DocPicture;
                        }
                    }
                    else if (this.documentObject_0 is StructureDocumentTag)
                    {
                        StructureDocumentTag tag3 = this.documentObject_0 as StructureDocumentTag;
                        if (((tag3.ChildObjects.Count > 0) && (tag3.ChildObjects[0] is Paragraph)) && ((tag3.ChildObjects[0] as Paragraph).ChildObjects.Count > 0))
                        {
                            picture2 = (tag3.ChildObjects[0] as Paragraph).ChildObjects[0] as DocPicture;
                        }
                    }
                    if (picture2 != null)
                    {
                        picture2.method_89(image);
                        this.IsShowingPlaceHolder = false;
                        picture.Image             = null;
                    }
                }
                return;
            }

            case SdtType.CheckBox:
            {
                SdtCheckBox box    = this.ControlProperties as SdtCheckBox;
                TextRange   range2 = null;
                if (this.documentObject_0 is StructureDocumentTagCell)
                {
                    StructureDocumentTagCell cell3 = this.documentObject_0 as StructureDocumentTagCell;
                    if (((cell3.ChildObjects.Count > 0) && (cell3.ChildObjects[0] is Paragraph)) && ((cell3.ChildObjects[0] as Paragraph).ChildObjects.Count > 0))
                    {
                        range2 = (cell3.ChildObjects[0] as Paragraph).ChildObjects[0] as TextRange;
                    }
                }
                else if (this.documentObject_0 is StructureDocumentTagInline)
                {
                    StructureDocumentTagInline inline2 = this.documentObject_0 as StructureDocumentTagInline;
                    if (inline2.ChildObjects.Count > 0)
                    {
                        range2 = inline2.ChildObjects[0] as TextRange;
                    }
                }
                else if (this.documentObject_0 is StructureDocumentTag)
                {
                    StructureDocumentTag tag2 = this.documentObject_0 as StructureDocumentTag;
                    if (((tag2.ChildObjects.Count > 0) && (tag2.ChildObjects[0] is Paragraph)) && ((tag2.ChildObjects[0] as Paragraph).ChildObjects.Count > 0))
                    {
                        range2 = (tag2.ChildObjects[0] as Paragraph).ChildObjects[0] as TextRange;
                    }
                }
                if (range2 != null)
                {
                    if (box.Checked)
                    {
                        range2.Text = ((char)box.CheckedState.method_3()).ToString();
                        return;
                    }
                    range2.Text = ((char)box.UncheckedState.method_3()).ToString();
                }
                return;
            }

            default:
                return;
            }
            if ((range != null) && (controlProperties.ListItems.SelectedValue != null))
            {
                if (!this.IsShowingPlaceHolder)
                {
                    range.CharacterFormat.method_55(Color.Empty);
                    range.CharacterFormat.TextBackgroundColor = Color.Empty;
                }
                range.Text = controlProperties.ListItems.SelectedValue.DisplayText;
            }
        }