Esempio n. 1
0
        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));
            }
        }
Esempio n. 2
0
 public override void undo()
 {
     selection.ColorChange(new HatchBrush(HatchStyle.Cross,
                                          Color.PaleVioletRed, backcolor));;
 }