示例#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;
 }