示例#1
0
 /// <summary>
 /// Adds an object to the end of the CollectionBase.
 /// </summary>
 /// <param name="value">The Object to be added to the end of the CollectionBase. </param>
 /// <returns>The CollectionBase index at which the value has been added.</returns>
 public override int Add(AttributeValueElementReadWrite value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     return(List.Add(new AttributeValueElement(value.Value, value.SchemaVersion)));
 }
 /// <summary>
 /// Clones an attribute value element into a new element.
 /// </summary>
 /// <param name="attributeValueElement">The value element to clone.</param>
 public AttributeValueElementReadWrite(AttributeValueElementReadWrite attributeValueElement)
     : base(XacmlSchema.Context, attributeValueElement.SchemaVersion)
 {
     if (attributeValueElement == null)
     {
         throw new ArgumentNullException("attributeValueElement");
     }
     _contents = attributeValueElement._contents;
 }
示例#3
0
        private void btnRemove_Click(object sender, System.EventArgs e)
        {
            con.AttributeValueElementReadWrite attr = lstAttributeValue.SelectedItem as con.AttributeValueElementReadWrite;

            try
            {
                LoadingData = true;

                txtValue.Text = string.Empty;
                _attribute.AttributeValues.RemoveAt(lstAttributeValue.SelectedIndex);
                lstAttributeValue.Items.RemoveAt(lstAttributeValue.SelectedIndex);
            }
            finally
            {
                LoadingData = false;
            }
        }
示例#4
0
        private void lstAttributeValue_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (index != lstAttributeValue.SelectedIndex)
            {
                if (index != -1)
                {
                    con.AttributeValueElementReadWrite attrAux = lstAttributeValue.Items[index] as con.AttributeValueElementReadWrite;
                    attrAux.Value = txtValue.Text;
                    lstAttributeValue.Items.RemoveAt(index);
                    lstAttributeValue.Items.Insert(index, attrAux);
                }

                if (!LoadingData)
                {
                    try
                    {
                        LoadingData = true;
                        index       = lstAttributeValue.SelectedIndex;
                        con.AttributeValueElementReadWrite attribute = lstAttributeValue.SelectedItem as con.AttributeValueElementReadWrite;

                        if (attribute != null)
                        {
                            txtValue.Text = attribute.Value;
                        }
                    }
                    finally
                    {
                        LoadingData = false;
                    }
                }
                else
                {
                    index = -1;
                }
            }
        }
 /// <summary>
 /// Clones an attribute value element into a new element.
 /// </summary>
 /// <param name="attributeValueElement">The value element to clone.</param>
 public AttributeValueElementReadWrite(AttributeValueElementReadWrite attributeValueElement)
     : base(XacmlSchema.Context, attributeValueElement.SchemaVersion)
 {
     if (attributeValueElement == null) throw new ArgumentNullException("attributeValueElement");
     _contents = attributeValueElement._contents;
 }
 /// <summary>
 /// Adds an object to the end of the CollectionBase.
 /// </summary>
 /// <param name="value">The Object to be added to the end of the CollectionBase. </param>
 /// <returns>The CollectionBase index at which the value has been added.</returns>
 public override int Add(AttributeValueElementReadWrite value)
 {
     if (value == null) throw new ArgumentNullException("value");
     return (List.Add(new AttributeValueElement(value.Value, value.SchemaVersion)));
 }
 /// <summary>
 /// Adds an object to the end of the CollectionBase.
 /// </summary>
 /// <param name="value">The Object to be added to the end of the CollectionBase. </param>
 /// <returns>The CollectionBase index at which the value has been added.</returns>
 public virtual int Add(AttributeValueElementReadWrite value)
 {
     return(List.Add(value));
 }
示例#8
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdd_Click(object sender, System.EventArgs e)
 {
     LoadingData = true;
     con.AttributeValueElementReadWrite att = new AttributeValueElementReadWrite( "TODO: Add value", Xacml.XacmlVersion.Version11 );
     lstAttributeValue.Items.Add(att);
     _attribute.AttributeValues.Add( att );
     LoadingData = false;
 }
 /// <summary>
 /// Adds an object to the end of the CollectionBase.
 /// </summary>
 /// <param name="value">The Object to be added to the end of the CollectionBase. </param>
 /// <returns>The CollectionBase index at which the value has been added.</returns>
 public virtual int Add(AttributeValueElementReadWrite value)
 {
     return (List.Add(value));
 }