Пример #1
0
 public SelectionMovedOrResizedCI(DoCommandStack commandStack, StrokeCollection selection, Rect newrect, Rect oldrect, int editingOperationCount)
     : base(commandStack)
 {
     _selection             = selection;
     _newrect               = newrect;
     _oldrect               = oldrect;
     _editingOperationCount = editingOperationCount;
 }
Пример #2
0
        public StrokesAddedOrRemovedCI(DoCommandStack commandStack, InkCanvasEditingMode editingMode, StrokeCollection added, StrokeCollection removed, int editingOperationCount)
            : base(commandStack)
        {
            _editingMode = editingMode;

            _added   = added;
            _removed = removed;

            _editingOperationCount = editingOperationCount;
        }
Пример #3
0
        public SelectionColorOrWidthCI(DoCommandStack commandStack, StrokeCollection selection,
                                       Brush old_foreground, Brush new_foreground, Brush old_background, Brush new_background,
                                       int old_width, int new_width, int editingOperationCount)
            : base(commandStack)
        {
            _selection      = selection;
            _old_foreground = old_foreground;
            _new_foreground = new_foreground;
            _old_background = old_background;
            _new_background = new_background;
            _old_width      = old_width;
            _new_width      = new_width;

            _editingOperationCount = editingOperationCount;
        }
Пример #4
0
        public MainViewModel(InkCanvas _inkCanvas)
        {
            inkCanvas = _inkCanvas;
            inkCanvas.PreviewMouseLeftButtonDown += CanvasMouseDown;
            inkCanvas.MouseMove         += CanvasMouseMove;
            inkCanvas.MouseLeave        += CanvasMouseLeave;
            inkCanvas.MouseUp           += CanvasMouseUp;
            inkCanvas.SelectionMoving   += Canvas_SelectionMovingOrResizing;
            inkCanvas.SelectionResizing += Canvas_SelectionMovingOrResizing;
            inkCanvas.SizeChanged       += InkCanvas_SizeChanged;

            doCmdStack         = new DoCommandStack(_inkCanvas.Strokes);
            lstStrokeClipBoard = new StrokeCollection();

            //Init
            PenWidthIndex      = 0;
            Foreground         = Brushes.Black;
            Background         = Brushes.White;
            curColorMode       = ColorModeEnum.Foreground;
            curColorPickerMode = ColorPickerModeEnum.False;
            SelectColor        = Colors.Black;

            PenMode();
        }
Пример #5
0
        public StrokesAddedOrRemovedCI(DoCommandStack commandStack, InkCanvasEditingMode editingMode, StrokeCollection added, StrokeCollection removed, int editingOperationCount)
            : base(commandStack)
        {
            _editingMode = editingMode;

            _added = added;
            _removed = removed;

            _editingOperationCount = editingOperationCount;
        }
Пример #6
0
 public SelectionMovedOrResizedCI(DoCommandStack commandStack, StrokeCollection selection, Rect newrect, Rect oldrect, int editingOperationCount)
     : base(commandStack)
 {
     _selection = selection;
     _newrect = newrect;
     _oldrect = oldrect;
     _editingOperationCount = editingOperationCount;
 }
Пример #7
0
 protected CommandItem(DoCommandStack commandStack)
 {
     _commandStack = commandStack;
 }
Пример #8
0
        public SelectionColorOrWidthCI(DoCommandStack commandStack, StrokeCollection selection,
            Brush old_foreground, Brush new_foreground, Brush old_background, Brush new_background,
            int old_width, int new_width, int editingOperationCount)
            : base(commandStack)
        {
            _selection = selection;
            _old_foreground = old_foreground;
            _new_foreground = new_foreground;
            _old_background = old_background;
            _new_background = new_background;
            _old_width = old_width;
            _new_width = new_width;

            _editingOperationCount = editingOperationCount;
        }
Пример #9
0
 protected CommandItem(DoCommandStack commandStack)
 {
     _commandStack = commandStack;
 }