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 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(Name); 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.ShowAlert("", "Successfully deleted object"); } else { UIErrorHelper.ShowAlert("", "Deleted base object. Please Refresh the Server"); } }); } }
public DirectoryNode (string dn, VMDirServerDTO dto, ScopeNode parent) : base (dto) { Name = dn; DisplayName = VMDirServerDTO.DN2CN (Name); Parent = parent; IsBaseNode = false; _properties = new Dictionary<string, VMDirBagItem> (); }
public DirectoryNode(string dn, VMDirServerDTO dto, ScopeNode parent) : base(dto) { Name = dn; DisplayName = VMDirServerDTO.DN2CN(Name); Parent = parent; IsBaseNode = false; _properties = new Dictionary <string, VMDirBagItem> (); }
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); } }
public OutlineViewDataSource (DirectoryNode node) : base () { RootNode = node; }