private void BeginDragNewShape() { PickerShape = null; PickerCanvas.Invalidate(); SetDragNewShape(); }
private void SymbolCanvas_PointerReleased(object sender, PointerRoutedEventArgs e) { if (_symbolPointerPressed) { _symbolPointerPressed = false; if (SelectedShapes.Count > 0) { SelectedShapes.Clear(); SetIdleOnVoid(); } else { foreach (var shape in SymbolShapes) { SelectedShapes.Add(shape); } SetShapesAreSelected(); } PickerShape = null; PickerCanvas.Invalidate(); } }
private void PickerCanvas_PointerPressed(object sender, PointerRoutedEventArgs e) { PickerShape = null; _pickerIndex = GetPickerShapeIndex(e); PickerCanvas.Invalidate(); }
private void SetShapesAreSelected() { if (SetEditorState(EditorState.ShapesAreSelected)) //enable hit test { SetEventAction(PointerEvent.Begin, TargetPointerDown); SetEventAction(PointerEvent.Hover, TargetPointerHover); PickerShape = null; PickerCanvas.Invalidate(); EditorCanvas.Invalidate(); } }
private void SetIdleOnVoid() { if (SetEditorState(EditorState.IdleOnVoid)) { PickerShape = null; SelectedShapes.Clear(); SetSizeSliders(); PickerCanvas.Invalidate(); EditorCanvas.Invalidate(); } }
private void PickerCanvas_PointerReleased(object sender, PointerRoutedEventArgs e) { var index = GetPickerShapeIndex(e); if (index < 0 || (index != _pickerIndex)) { return; } SetPicker(PickerShapes[index]); PickerCanvas.Invalidate(); EditorCanvas.Invalidate(); }
private void ShapeSelectorHit(int index) { var shape = SymbolShapes[index]; if (IsSelectOneOrMoreShapeMode) { if (SelectedShapes.Contains(shape)) { SelectedShapes.Remove(shape); } else { SelectedShapes.Add(shape); } } else { SelectedShapes.Clear(); SelectedShapes.Add(shape); } GrtProperty(shape); PickerShape = null; if (SelectedShapes.Count > 0) { SetShapesAreSelected(); } else { SetIdleOnVoid(); } PickerShape = null; SetSizeSliders(); PickerCanvas.Invalidate(); EditorCanvas.Invalidate(); }