예제 #1
0
        private void BeginDragNewShape()
        {
            PickerShape = null;
            PickerCanvas.Invalidate();

            SetDragNewShape();
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
        private void PickerCanvas_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            PickerShape = null;

            _pickerIndex = GetPickerShapeIndex(e);

            PickerCanvas.Invalidate();
        }
예제 #4
0
        private void SetShapesAreSelected()
        {
            if (SetEditorState(EditorState.ShapesAreSelected)) //enable hit test
            {
                SetEventAction(PointerEvent.Begin, TargetPointerDown);
                SetEventAction(PointerEvent.Hover, TargetPointerHover);

                PickerShape = null;
                PickerCanvas.Invalidate();
                EditorCanvas.Invalidate();
            }
        }
예제 #5
0
        private void SetIdleOnVoid()
        {
            if (SetEditorState(EditorState.IdleOnVoid))
            {
                PickerShape = null;
                SelectedShapes.Clear();
                SetSizeSliders();

                PickerCanvas.Invalidate();
                EditorCanvas.Invalidate();
            }
        }
예제 #6
0
        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();
        }
예제 #7
0
        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();
        }