示例#1
0
 /// <summary>
 /// Updates the current drawing shape hint.
 /// </summary>
 private void UpdateCurrentDrawingShapeHint(Point mousePosition)
 {
     if (mousePosition == null)
     {
         throw new ArgumentNullException(ERROR_MOUSE_POSITION_IS_NULL);
     }
     _currentDrawingShapeHintShapeDrawer.DrawingEndingPoint = mousePosition;
     _canvasDrawer.NotifyCanvasRefreshDrawRequested();
 }
示例#2
0
        public void TestNotifyCanvasRefreshDrawRequested()
        {
            int count = 0;

            _canvasDrawer.CanvasRefreshDrawRequested += () => count++;
            _canvasDrawer.NotifyCanvasRefreshDrawRequested();
            Assert.AreEqual(count, 1);
            _canvasDrawer.NotifyCanvasRefreshDrawRequested();
            Assert.AreEqual(count, 2);
        }
 /// <summary>
 /// Clears the canvas.
 /// </summary>
 public void ClearCanvas()
 {
     _currentSelectedShapeShapeDrawer = null;
     _canvasDrawer.NotifyCurrentShapeChanged();
     _canvasDrawer.ClearShapeDrawersManager();
     _canvasDrawer.NotifyCanvasRefreshDrawRequested();
 }
 /// <summary>
 /// Clears the canvas.
 /// </summary>
 public void ClearCanvas()
 {
     _canvasDrawer.ClearShapeDrawersManager();
     _canvasDrawer.NotifyCanvasRefreshDrawRequested();
 }