private void RemoveTool(DrawingTool tool) { tool.OnRemove(); DrawingTools.Remove(tool); Rectangle lRect = tool.Tracker.SurroundingRect; InvalidateRect(lRect); IsDirty = true; }
private void OnBringTo(Func <IEnumerable <DrawingTool>, int> getPositionfunc) { var overlappedTools = GetOverlappedTools(SelectedTool); if (overlappedTools.Count() > 0) { DrawingTools.Remove(SelectedTool); DrawingTools.Insert(getPositionfunc(overlappedTools), SelectedTool); Invalidate(); IsDirty = true; } }