public override bool ToXML(System.Xml.XmlElement myElement)
        {
            if (myElement != null)
            {
                this.Attributes.ToXML(myElement);
                base.ToXML(myElement);
                myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
                myElement.SetAttribute("name", this.Name);
                if (this.Type == ElementType.HaveNotElement)
                {
                    myElement.SetAttribute("prifix", this.Prifix);
                    myElement.SetAttribute("postfix", this.Postfix);
                }

                myElement.SetAttribute("text", this.text);



                foreach (ZYSelectableElementItem eleItem in this.myList)
                {
                    XmlElement item = myElement.OwnerDocument.CreateElement(eleItem.GetXMLName());
                    myElement.AppendChild(item);
                    eleItem.ToXML(item);
                }
                return(true);
            }
            return(false);
        }
Exemple #2
0
 public override bool ToXML(System.Xml.XmlElement myElement)
 {
     if (myElement != null)
     {
         myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
         myElement.SetAttribute("name", this.Name);
         return(true);
     }
     return(false);
 }
Exemple #3
0
 public override bool ToXML(System.Xml.XmlElement myElement)
 {
     if (myElement != null)
     {
         myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
         myElement.SetAttribute("name", this.Name);
         myElement.SetAttribute("lineHeight", this.LineHeight.ToString());
         myElement.SetAttribute("percent", this.Percent.ToString());
         //return base.ToXML(myElement);
     }
     return(false);
 }
Exemple #4
0
        public override bool ToXML(System.Xml.XmlElement myElement)
        {
            if (myElement != null)
            {
                this.Attributes.ToXML(myElement);
                myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
                myElement.SetAttribute("name", this.Name);

                myElement.InnerText = this.Text;
                //return base.ToXML(myElement);
            }
            return(false);
        }
Exemple #5
0
 /// <summary>
 /// 将元素转为XML
 /// </summary>
 /// <param name="myElement"></param>
 /// <returns></returns>
 public override bool ToXML(System.Xml.XmlElement myElement)
 {
     if (myElement != null)
     {
         myAttributes.ToXML(myElement);
         myElement.SetAttribute("mustclick", this.MustClick.ToString());
         myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
         myElement.SetAttribute("code", this.Code);
         myElement.SetAttribute("name", this.Name);
         myElement.SetAttribute("leftup", this.LeftUp);
         myElement.SetAttribute("leftdown", this.LeftDown);
         myElement.SetAttribute("rightup", this.RightUp);
         myElement.SetAttribute("rightdown", this.RightDown);
     }
     return(false);
 }
Exemple #6
0
        public override bool ToXML(System.Xml.XmlElement myElement)
        {
            if (myElement != null)
            {
                this.Attributes.ToXML(myElement);
                myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));

                myElement.SetAttribute("name", this.Name);
                myElement.SetAttribute("codevalue", this.CodeValue);
                myElement.SetAttribute("wordbook", this.Wordbook);
                myElement.SetAttribute("multi", this.Multi.ToString());
                myElement.InnerText = this.Text;
                //return base.ToXML(myElement);
            }
            return(false);
        }
Exemple #7
0
        public override bool ToXML(System.Xml.XmlElement myElement)
        {
            if (myElement != null)
            {
                this.Attributes.ToXML(myElement);
                myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
                myElement.SetAttribute("name", this.Name);
                myElement.SetAttribute("event", this.Event);
                myElement.SetAttribute("print", this.Print.ToString());
                myElement.SetAttribute("candelete", this.CanDelete.ToString());

                myElement.InnerText = this.Event;
                return(true);

                //return base.ToXML(myElement);
            }
            return(false);
        }
Exemple #8
0
        public override bool ToXML(System.Xml.XmlElement myElement)
        {
            if (myElement != null)
            {
                this.Attributes.ToXML(myElement);
                base.ToXML(myElement);
                myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
                myElement.SetAttribute("name", this.Name);

                myElement.SetAttribute("maxvalue", this.MaxValue.ToString());
                myElement.SetAttribute("minvalue", this.MinValue.ToString());
                myElement.SetAttribute("length", this.Length.ToString());
                myElement.SetAttribute("decimalDigits", this.DecimalDigits.ToString());
                myElement.SetAttribute("value", this.Value.ToString());

                myElement.InnerText = this.Text;
                //return base.ToXML(myElement);
            }
            return(false);
        }
Exemple #9
0
        public override bool ToXML(System.Xml.XmlElement myElement)
        {
            if (myElement != null)
            {
                myAttributes.ToXML(myElement);
                myElement.SetAttribute("mustclick", this.MustClick.ToString());
                myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
                myElement.SetAttribute("code", this.Code);
                myElement.SetAttribute("name", this.Name);


                myElement.SetAttribute("last", this.Last);
                myElement.SetAttribute("period", this.Period);

                myElement.SetAttribute("firstage", this.FirstAge);
                myElement.SetAttribute("finallyageordate", this.FinallyAgeOrdate);

                //return base.ToXML(myElement);
            }
            return(false);
        }
Exemple #10
0
        public override bool ToXML(System.Xml.XmlElement myElement)
        {
            if (myElement != null)
            {
                myElement.SetAttribute("type", StringCommon.GetNameByType(this.Type));
                myElement.SetAttribute("name", this.Name);
                myElement.SetAttribute("code", this.Code);

                //Add by wwj 2013-08-01
                myElement.SetAttribute("candelete", this.CanDelete.ToString());

                //Add by wwj 2013-08-01
                myElement.SetAttribute("direction", this.Direction.ToString());

                //Add by wwj 2013-08-01
                myElement.SetAttribute("isholdspacewhenprint", this.IsHoldSpaceWhenPrint.ToString());

                return(true);
            }
            return(false);
        }