상속: object, System.ComponentModel.INotifyPropertyChanged
예제 #1
0
 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();
         }
     }
 }
예제 #2
0
        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;
        }
예제 #3
0
 public void UnCheckPermission(string identifier)
 {
     /// add new perm to xml
     qnxPermission perm = new qnxPermission();
     perm.Value = identifier;
     _qnxSchema.DeletePermission(perm);
     DesignerDirty = true;
 }
예제 #4
0
 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;
 }
예제 #5
0
 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();
         }
     }
 }
예제 #6
0
        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;
        }