//When tree-view item selected, fills the content list view with item properties private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (e.Action == TreeViewAction.ByMouse) { DirectoryEntity entity = ((DirectoryEntity)e.Node.Tag); this.listView1.Clear(); this.listView1.Columns.Add("Property", 100); this.listView1.Columns.Add("Value", 300); foreach (string property in entity.Properties.PropertyNames) { object value = entity.Properties[property].Value; if (value.GetType().IsArray) { Array array = (Array)value; for (int i = 0; i < array.Length; i++) { AddText(property, array.GetValue(i).ToString()); } } else { AddText(property, "" + value); } } } }
public User(DirectoryEntity parent, PropertyCollection properties) : base(parent, properties) { }
public OrganizationalUnit(DirectoryEntity parent, PropertyCollection properties) : base(parent, properties) { this.entries = new List <DirectoryEntity>(); }