private void RotationButton_Click(object sender, RoutedEventArgs e) { var noShapesSelected = this.GetCurrentSelection().Type != PowerPoint.PpSelectionType.ppSelectionShapes; if (noShapesSelected) { ShowErrorMessageBox(ErrorMessageNoSelection); return; } var selectedShapes = this.GetCurrentSelection().ShapeRange; if (selectedShapes.Count <= 1) { ShowErrorMessageBox(ErrorMessageFewerThanTwoSelection); return; } ClearAllEventHandlers(); var currentSlide = this.GetCurrentSlide(); _refPoint = selectedShapes[1]; _shapesToBeRotated = ConvertShapeRangeToShapeList(selectedShapes, 2); _allShapesInSlide = ConvertShapesToShapeList(currentSlide.Shapes); _dispatcherTimer.Tick += RotationHandler; _leftMouseUpListener = new LMouseUpListener(); _leftMouseUpListener.LButtonUpClicked += _leftMouseUpListener_Rotation; _leftMouseDownListener = new LMouseDownListener(); _leftMouseDownListener.LButtonDownClicked += _leftMouseDownListener_Rotation; HighlightButton(rotationButton, lightBlueBrush, darkBlueBrush); }
private void StartLockAxisMode() { _dispatcherTimer.Tick += LockAxisHandler; _leftMouseUpListener = new LMouseUpListener(); _leftMouseUpListener.LButtonUpClicked += _leftMouseUpListener_LockAxis; _leftMouseDownListener = new LMouseDownListener(); _leftMouseDownListener.LButtonDownClicked += _leftMouseDownListener_LockAxis; HighlightButton(lockAxisButton, lightBlueBrush, darkBlueBrush); }
private void BeginEyedropping() { if (!VerifyIsShapeSelected()) return; _timerCounter = 0; timer1.Start(); _native = new LMouseUpListener(); _native.LButtonUpClicked += new EventHandler<SysMouseEventInfo>(_native_LButtonClicked); }