/// <summary> /// Разгрупиране формите. /// </summary> public void UnGroup() { for (int i = 0; i < Selection.Count; i++) { if (Selection[i] is GroupShape) { var ungroupedShapes = (Selection[i] as GroupShape).SubItems; ShapeList.AddRange(ungroupedShapes); ShapeList.RemoveAt(ShapeList.IndexOf(Selection[i])); Selection.AddRange(ungroupedShapes); Selection.RemoveAt(i); i -= 1; } } }