예제 #1
0
		private static void CreateViewportCommands(Service service)
		{
			var dragTrigger = new MouseDragTrigger(MouseButton.Middle);
			var zoomTrigger = new MouseZoomTrigger();
			new Command(service.Viewport.OnViewportPanning).Add(dragTrigger);
			new Command(service.Viewport.OnViewPortZooming).Add(zoomTrigger);
		}
예제 #2
0
		public void SetCommands()
		{
			var leftClickTrigger = new MouseButtonTrigger();
			leftClickTrigger.AddTag("temporary");
			var leftClickCommand = new Command(LeftMouseButton).Add(leftClickTrigger);
			leftClickCommand.AddTag("temporary");
			var middleDragTrigger = new MouseDragTrigger(MouseButton.Middle);
			middleDragTrigger.AddTag("temporary");
			var middleDragCommand = new Command(MiddleMouseDrag).Add(middleDragTrigger);
			middleDragCommand.AddTag("temporary");
			var dragLeftTrigger = new MouseDragTrigger();
			dragLeftTrigger.AddTag("temporary");
			var dragLeftCommand = new Command(LeftMouseDrag).Add(dragLeftTrigger);
			dragLeftCommand.AddTag("temporary");
			var zoomTrigger = new MouseZoomTrigger();
			zoomTrigger.AddTag("temporary");
			var zoomCommand = new Command(Zoom).Add(zoomTrigger);
			zoomCommand.AddTag("temporary");
			var leftReleaseTrigger = new MouseButtonTrigger(State.Releasing);
			leftReleaseTrigger.AddTag("temporary");
			var leftReleaseCommand = new Command(LeftMouseRelease).Add(leftReleaseTrigger);
			leftReleaseCommand.AddTag("temporary");
		}
예제 #3
0
 private static void CreateViewportCommands(Service service)
 {
     var dragTrigger = new MouseDragTrigger(Input.MouseButton.Middle);
     dragTrigger.AddTag("ViewControl");
     var zoomTrigger = new MouseZoomTrigger();
     zoomTrigger.AddTag("ViewControl");
     var panningCommand = new Command(service.Viewport.OnViewportPanning).Add(dragTrigger);
     var zoomCommand = new Command(service.Viewport.OnViewPortZooming).Add(zoomTrigger);
     panningCommand.AddTag("ViewControl");
     zoomCommand.AddTag("ViewControl");
 }