예제 #1
0
 public void OnRequestViewOperation(ViewOperationEventArgs e)
 {
     if (RequestViewOperation != null)
     {
         RequestViewOperation(e);
     }
 }
예제 #2
0
        void DynamoViewModelRequestViewOperation(ViewOperationEventArgs e)
        {
            if (dynamoViewModel.BackgroundPreviewViewModel.CanNavigateBackground == false)
                return;

            switch (e.ViewOperation)
            {
                case ViewOperationEventArgs.Operation.FitView:
                    if (dynamoViewModel.BackgroundPreviewViewModel != null)
                    {
                        dynamoViewModel.BackgroundPreviewViewModel.ZoomToFitCommand.Execute(null);
                        return;
                    }
                    BackgroundPreview.View.ZoomExtents();
                    break;

                case ViewOperationEventArgs.Operation.ZoomIn:
                    var camera1 = BackgroundPreview.View.CameraController;
                    camera1.Zoom(-0.5 * BackgroundPreview.View.ZoomSensitivity);
                    break;

                case ViewOperationEventArgs.Operation.ZoomOut:
                    var camera2 = BackgroundPreview.View.CameraController;
                    camera2.Zoom(0.5 * BackgroundPreview.View.ZoomSensitivity);
                    break;
            }
        }
예제 #3
0
        void DynamoViewModelRequestViewOperation(ViewOperationEventArgs e)
        {
            if (dynamoViewModel.CanNavigateBackground == false)
                return;

            switch (e.ViewOperation)
            {
                case ViewOperationEventArgs.Operation.FitView:
                    background_preview.View.ZoomExtents();
                    break;

                case ViewOperationEventArgs.Operation.ZoomIn:
                    var camera1 = background_preview.View.CameraController;
                    camera1.Zoom(-0.5 * background_preview.View.ZoomSensitivity);
                    break;

                case ViewOperationEventArgs.Operation.ZoomOut:
                    var camera2 = background_preview.View.CameraController;
                    camera2.Zoom(0.5 * background_preview.View.ZoomSensitivity);
                    break;
            }
        }