Exemplo n.º 1
0
 /// <summary>
 /// Creates the ListFormPropertyElement
 /// </summary>
 /// <param name="property">Property containing this element</param>
 /// <param name="propValue">Element value</param>
 public ListFormPropertyElement(FormProperty property, string propValue)
 {
     Document           = property.Document;
     Node               = new XElement(Ns.Form + "list-value");
     _propertyValueType = property.PropertyValueType;
     Value              = propValue;
 }
Exemplo n.º 2
0
        private void PropertyCollection_Removed(int index, object value)
        {
            XElement formProp = Node.Element(Ns.Form + "properties");

            if (formProp != null)
            {
                FormProperty prop = (FormProperty)value;
                prop.Node.Remove();
                if (index == 0)
                {
                    formProp.Remove();
                }
            }
        }
Exemplo n.º 3
0
        private void PropertyCollection_Inserted(int index, object value)
        {
            XElement formProp = Node.Element(Ns.Form + "properties");

            if (formProp == null)
            {
                formProp = new XElement(Ns.Form + "properties");
                Node.Add(formProp);
            }

            FormProperty prop = (FormProperty)value;

            formProp.Add(prop.Node);
        }
Exemplo n.º 4
0
        private void PropertyCollection_Removed(int index, object value)
        {
            XmlNode form_prop;

            form_prop = this.Node.SelectSingleNode("form:properties", this.Document.NamespaceManager);

            if (form_prop != null)
            {
                FormProperty prop = value as FormProperty;
                form_prop.RemoveChild(prop.Node);
                if (index == 0)
                {
                    Node.RemoveChild(form_prop);
                }
            }
        }
Exemplo n.º 5
0
        private void PropertyCollection_Inserted(int index, object value)
        {
            XmlNode form_prop;

            form_prop = this.Node.SelectSingleNode("form:properties", this.Document.NamespaceManager);

            if (form_prop == null)
            {
                form_prop = Document.CreateNode("properties", "form");
            }

            FormProperty prop = value as FormProperty;

            form_prop.AppendChild(prop.Node);
            this.Node.AppendChild(form_prop);
        }