Example #1
0
        //** AddEyeObject **
        //Insert new eye object
        public int AddEyeObject(int idEye, string objectName)
        {
            int toReturn = 1;

            List <EyeObject> tList = eyesObjectsList.Where(x => x.IDEye == idEye).ToList();

            if (tList.Count > 0)
            {
                toReturn = tList.OrderBy(x => x.ID).Last().ID + 1;
            }

            EyeObject toAdd = new EyeObject();

            toAdd.ID         = toReturn;
            toAdd.IDEye      = idEye;
            toAdd.ObjectName = objectName;

            eyesObjectsList.Add(toAdd);

            return(toReturn);
        }
Example #2
0
        //** EditEyeObject **
        //Edit an eye object
        public void EditEyeObject(int idEye, int idObject, string objectName)
        {
            EyeObject toEdit = eyesObjectsList.Find(x => x.IDEye == idEye && x.ID == idObject);

            toEdit.ObjectName = objectName;
        }