public void removeGroup(MyThumb one)
        {
            nextIndexToBeFilled = one.groupNumber;
            ThumbGroups group = thumbGroupsList[one.groupNumber];

            foreach (MyThumb thumb in group.getListOfThumbs())
            {
                thumb.grouplinecount = 0;;
                thumb.groupNumber    = -1;
            }
            thumbGroupsList[one.groupNumber] = null;
        }
        public void unSelectWholeGroup()
        {
            Console.Write("\nUNselectWholeGroup");
            //currentGroupSelectionThumb = one;
            ThumbGroups group = thumbGroupsList[currentGroupSelectionThumb.groupNumber];

            foreach (MyThumb thumb in group.getListOfThumbs())
            {
                windowRef.myCanvas.Children.Remove(thumb.rect);
            }
            currentGroupSelectionThumb = dummy;
            currentSelectedGroup       = null;
        }
        public void createGroup(MyThumb one, MyThumb two)
        {
            //if (nextIndexToBeFilled != -1)
            //{
            //    currentIndex = nextIndexToBeFilled;
            //    nextIndexToBeFilled = -1;
            //}
            //else
            //{}
            currentIndex = thumbGroupsList.Count;
            ThumbGroups group = new ThumbGroups(currentIndex + 1, 3, currentIndex);

            one.groupNumber = two.groupNumber = group.getGroupNumber();
            group.getListOfThumbs().Add(one);
            group.getListOfThumbs().Add(two);
            thumbGroupsList.Add(group);
            windowRef.createLink(one, two, currentIndex + 1, 3);
        }
        public void removeThumbFromGroup(MyThumb one)
        {
            ThumbGroups group = thumbGroupsList[one.groupNumber];
            bool        found = false;

            for (int i = 0; i < group.getListOfThumbs().Count&& !found; i++)
            {
                if (one == group.getListOfThumbs()[i])
                {
                    group.getListOfThumbs()[i].grouplinecount = 0;;
                    group.getListOfThumbs()[i].groupNumber    = -1;
                    found = true;
                }
            }
            if (found)
            {
                group.getListOfThumbs().Remove(one);
            }
        }
 public bool selectWholeGroup(MyThumb one)
 {
     Console.Write("\nselectWholeGroup");
     if (one.groupNumber == -1)
     {
         return(false);
     }
     if (currentGroupSelectionThumb != one)
     {
         currentGroupSelectionThumb = one;
         ThumbGroups group = thumbGroupsList[one.groupNumber];
         currentSelectedGroup = group;
         foreach (MyThumb thumb in group.getListOfThumbs())
         {
             thumb.rect = windowRef.addRectangle(thumb, 3);
             windowRef.myCanvas.Children.Add(thumb.rect);
         }
     }
     return(true);
 }