示例#1
0
		/// <summary>
		/// Event handler called when the ADD (of the property list) is clicked.
		/// </summary>
		/// <param name="sender">Sender</param>
		/// <param name="e">Event argument</param>
		private void AddProp_Click(object sender, System.EventArgs e)
		{
			SimpleEdit dlg = new SimpleEdit();
			if (dlg.ShowDialog() == DialogResult.OK)
			{
				int index = this.listAttributes.SelectedIndex;
				((AttributeToShow)(AttributesToShow[index])).PropertiesToShow.Add(dlg.Value);
				UpdateAttributes();
			}
		}
示例#2
0
		/// <summary>
		/// Event handler called when the EDIT (of the property list) is clicked.
		/// </summary>
		/// <param name="sender">Sender</param>
		/// <param name="e">Event argument</param>
		private void EditProp_Click(object sender, System.EventArgs e)
		{
			int index = this.listAttributes.SelectedIndex;
			if (index >= 0)
			{
				int indexProp = this.listProperties.SelectedIndex;
				if (indexProp >= 0)
				{
					SimpleEdit dlg = new SimpleEdit();
					dlg.Value = (string) ((AttributeToShow)(AttributesToShow[index])).PropertiesToShow[indexProp];
					if (dlg.ShowDialog() == DialogResult.OK)
					{
						AttributeToShow att = new AttributeToShow();
						att.Name = ((AttributeToShow)this.AttributesToShow[index]).Name;
						att.PropertiesToShow = (ArrayList)(((AttributeToShow)this.AttributesToShow[index]).PropertiesToShow.Clone());
						att.PropertiesToShow[indexProp] = dlg.Value;
						this.AttributesToShow.RemoveAt(index);
						AttributesToShow.Insert(index, att);
						UpdateAttributes();
					}
				}
			}
		}
示例#3
0
		/// <summary>
		/// Event handler called when the ADD button is clicked.
		/// </summary>
		/// <param name="sender">Sender</param>
		/// <param name="e">Event argument</param>
		private void Add_Click(object sender, System.EventArgs e)
		{
			SimpleEdit dlg = new SimpleEdit();
			if (dlg.ShowDialog() == DialogResult.OK)
			{
				AttributeToShow att = new AttributeToShow();
				att.Name = dlg.Value;
				this.AttributesToShow.Add(att);
				UpdateAttributes();
			}
		}