public void OnCanvasMouseDown(object sender, MouseButtonEventArgs e) { if (!IsCurrentToolFloodFill()) { Draw action = _commandFactory.CreateDrawCommand(_currentTool, (Canvas)sender, e) as Draw; _currentCommandInAction = action; _canvasService.Apply(action); } else { UIElement originalSender = e.OriginalSource as UIElement; Fill fillAction = _commandFactory.CreateFillCommand(_currentTool, originalSender) as Fill; _canvasService.Apply(fillAction); } }
public void OnCanvasMouseUp(object sender, MouseButtonEventArgs e) { if (!IsCurrentToolFloodFill()) { _currentCommandInAction = null; SubscribeToLatestChildEvent(); } }