private void _GroupAction() { List <FigureAbstract> Figures = new List <FigureAbstract>(); if (_specialIndex == 0) { int C = _figures.Count; for (int i = 0; i < C; i++) { if (_figures[i].Selected) { Figures.Add(_figures[i]); Figures[Figures.Count - 1].Selected = false; _figures.RemoveAt(i--); C--; } } FigureComplex NewCFg = _factories[3].CreateFigure(_currentColorScheme) as FigureComplex; NewCFg.ComposeIn(Figures); _figures.Add(NewCFg); } else { if (_selectedFigureIndex != -1 && _figures[_selectedFigureIndex].GetType() == typeof(FigureComplex)) { Figures = (_figures[_selectedFigureIndex] as FigureComplex).Decompose(); int C = Figures.Count; _figures.RemoveAt(_selectedFigureIndex); for (int i = 0; i < C; i++) { _figures.Add(Figures[i]); } } _Deselect(); } }
public FactoryComplex(PictureClass PicController, ColorScheme CS) { _protoComplex = new FigureComplex(PicController, CS); }