public virtual void PerformDelete() { ConfirmationDialogController cwc = new ConfirmationDialogController("Are you sure?"); nint result = NSApplication.SharedApplication.RunModalForWindow(cwc.Window); if (result == (nint)VMIdentityConstants.DIALOGOK) { UIErrorHelper.CheckedExec(delegate() { ServerDTO.Connection.DeleteObject(Dn); ScopeNode node = this.Parent; if (node != null) { node.Children.Remove(this); if (node is DirectoryNode) { (node as DirectoryNode).ReloadChildren(); } NSNotificationCenter.DefaultCenter.PostNotificationName("ReloadOutlineView", node); NSNotificationCenter.DefaultCenter.PostNotificationName("ReloadTableView", node); UIErrorHelper.ShowInformation(VMDirConstants.STAT_OBJ_DEL_SUCC); } else { UIErrorHelper.ShowInformation(VMDirConstants.STAT_BASE_OBJ_DEL_SUCC); } }); } }
public DirectoryNode(string dn, List <string> ocSet, VMDirServerDTO dto, ScopeNode parent) : base(dto) { Dn = dn; ObjectClass = ocSet; DisplayName = VMDirServerDTO.DN2CN(Dn); Parent = parent; IsBaseNode = false; InitPageSearch(); }
public ScopeNode ChildAtIndex(int n) { if (this.Children != null && n < NumberOfChildren()) { ScopeNode item = this.Children[n]; return(item); } else { return(null); } }