public void DeletePermission(qnxPermission oldPermission) { foreach (qnxPermission perm in permission) { if (perm.Value == oldPermission.Value) { List <qnxPermission> permissionList = new List <qnxPermission>(permission); permissionList.Remove(perm); permission = permissionList.ToArray(); } } }
public void AddPermission(qnxPermission newPermission) { if (permission == null) { permission = new qnxPermission[0]; } var newPermissionsList = permission; Array.Resize(ref newPermissionsList, newPermissionsList.Length + 1); newPermissionsList[newPermissionsList.Length - 1] = newPermission; permission = newPermissionsList; }
public void UnCheckPermission(string identifier) { /// add new perm to xml qnxPermission perm = new qnxPermission(); perm.Value = identifier; _qnxSchema.DeletePermission(perm); DesignerDirty = true; }
public void CheckPermission(string identifier) { if (!isPermissionChecked(identifier)) { /// add new perm to xml qnxPermission perm = new qnxPermission(); perm.Value = identifier; _qnxSchema.AddPermission(perm); } DesignerDirty = true; }
public void DeletePermission(qnxPermission oldPermission) { foreach (qnxPermission perm in permission) { if (perm.Value == oldPermission.Value) { List<qnxPermission> permissionList = new List<qnxPermission>(permission); permissionList.Remove(perm); permission = permissionList.ToArray(); } } }