private void Grid_MouseDown(object sender, MouseButtonEventArgs e) { if (t_selectionMade == false) { // creates the selection rectangle and adds it to the container t_selection = new PaintualUI.Controls.SelectionRectangle(Glass, e.GetPosition(this), t_zoomFactor); t_selection.DoubleClick += T_selection_DoubleClick; t_drawingMode = Engine.DrawingBoardModes.Draw; } }
private void Grid_MouseUp(object sender, MouseButtonEventArgs e) { // this can happen when user moves mouse over drawign board before clicking the Apply button if (t_selection == null) { return; } t_selectionMade = true; t_drawingMode = Engine.DrawingBoardModes.None; t_selection.AllowResize = true; }