public void ShowAddGroup ()
 {
     GroupDTO dto = new GroupDTO ();
     AddNewGroupController agc = new AddNewGroupController (dto);
     nint res = NSApplication.SharedApplication.RunModalForWindow (agc.Window);
     if (res == (nint)VMIdentityConstants.DIALOGOK) {
         UIErrorHelper.CheckedExec (delegate() {
             LdapMod[] user = new LdapMod[4];
             user [0] = new LdapMod ((int)LdapMod.mod_ops.LDAP_MOD_ADD, VMDirConstants.ATTR_CN, new string[] {
                 dto.cn,
                 null
             });
             user [1] = new LdapMod ((int)LdapMod.mod_ops.LDAP_MOD_ADD, VMDirConstants.ATTR_GROUPTYPE, new string[] {
                 dto.groupType.ToString (),
                 null
             });
             user [2] = new LdapMod ((int)LdapMod.mod_ops.LDAP_MOD_ADD, VMDirConstants.ATTR_SAM_ACCOUNT_NAME, new string[] {
                 dto.sAMAccountName,
                 null
             });
             user [3] = new LdapMod ((int)LdapMod.mod_ops.LDAP_MOD_ADD, VMDirConstants.ATTR_OBJECT_CLASS, new string[] {
                 dto.objectClass,
                 null
             });
             string dn = string.Format ("cn={0},{1}", dto.cn, Name);
             ServerDTO.Connection.AddObject (dn, user);
             UIErrorHelper.ShowAlert ("", "Successfully added object");
             ReloadChildren ();
             RefreshProperties ();
             NSNotificationCenter.DefaultCenter.PostNotificationName ("ReloadOutlineView", this);
             NSNotificationCenter.DefaultCenter.PostNotificationName ("ReloadTableView", this);
         });
     }
 }
 public AddNewGroupController(GroupDTO dto) : base("AddNewGroup")
 {
     _dto             = dto;
     _dto.groupType   = VMDirConstants.GROUPTYPE_ACCOUNT;
     _dto.objectClass = "group";
 }
 public AddNewGroupController (GroupDTO dto) : base ("AddNewGroup")
 {
     _dto = dto;
     _dto.groupType = VMDirConstants.GROUPTYPE_ACCOUNT;
     _dto.objectClass = "group";
 }