public override void execute(AbstractShape sel) { selection = sel; if (selection != null) { backcolor = selection.hBrush.BackgroundColor; //Сохраняем цвет фигуры colorChoose.Color = backcolor; //Вызываем color dialog colorChoose.ShowDialog(); //Задаём кисть с выбранным цветом selection.ColorChange(new HatchBrush(HatchStyle.Cross, Color.PaleVioletRed, colorChoose.Color)); } }
public override void undo() { selection.ColorChange(new HatchBrush(HatchStyle.Cross, Color.PaleVioletRed, backcolor));; }