Esempio n. 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)));
 }
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdd_Click(object sender, EventArgs e)
 {
     LoadingData = true;
     con.AttributeValueElementReadWrite att = new con.AttributeValueElementReadWrite("TODO: Add value", XacmlVersion.Version11);
     lstAttributeValue.Items.Add(att);
     _attribute.AttributeValues.Add(att);
     LoadingData = false;
 }
 /// <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;
 }
Esempio n. 4
0
        private void btnRemove_Click(object sender, 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;
            }
        }
Esempio n. 5
0
        private void lstAttributeValue_SelectedIndexChanged(object sender, 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>
		/// 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 ) );
		}
Esempio n. 8
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnAdd_Click(object sender, EventArgs e)
		{
			LoadingData = true;
			con.AttributeValueElementReadWrite att = new con.AttributeValueElementReadWrite( "TODO: Add value", 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));
 }