Exemplo n.º 1
0
 private bool Group()
 {
     if (DrawObj.Count(shape => shape.IsSelected) > 1)
     {
         DrawObj.Add(new Group(DrawObj));
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 private bool Group()
 {
     if (DrawObj.Count(shape => shape.IsSelected) > 1)
     {
         Group group = new Group();
         for (int i = 0; i < DrawObj.Count; i++)
         {
             if (DrawObj[i].IsSelected)
             {
                 group.Add(DrawObj[i]);
                 DrawObj.RemoveAt(i--);
             }
         }
         group.IsSelected = true;
         DrawObj.Add(group);
         return(true);
     }
     else
     {
         return(false);
     }
 }