/// <summary> /// Initializes the input bindings. /// </summary> private void InitializeBindings() { this.changeLookAtHandler = new RotateHandler(this, true); this.rotateHandler = new RotateHandler(this); this.zoomRectangleHandler = new ZoomRectangleHandler(this); this.zoomHandler = new ZoomHandler(this); this.panHandler = new PanHandler(this); this.changeFieldOfViewHandler = new ZoomHandler(this, true); this.setTargetHandler = new RotateHandler(this, true); }
/// <summary> /// Initializes the input bindings. /// </summary> private void InitializeBindings() { this.CommandBindings.Clear(); this.changeLookAtHandler = new RotateHandler(this.Viewport, true); this.rotateHandler = new RotateHandler(this.Viewport); this.zoomRectangleHandler = new ZoomRectangleHandler(this.Viewport); this.zoomHandler = new ZoomHandler(this.Viewport); this.panHandler = new PanHandler(this.Viewport); this.changeFieldOfViewHandler = new ZoomHandler(this.Viewport, true); this.CommandBindings.Add(new CommandBinding(ZoomRectangleCommand, this.zoomRectangleHandler.Execute)); this.CommandBindings.Add(new CommandBinding(ZoomExtentsCommand, this.ZoomExtentsHandler)); this.CommandBindings.Add(new CommandBinding(RotateCommand, this.rotateHandler.Execute)); this.CommandBindings.Add(new CommandBinding(ZoomCommand, this.zoomHandler.Execute)); this.CommandBindings.Add(new CommandBinding(PanCommand, this.panHandler.Execute)); this.CommandBindings.Add(new CommandBinding(ResetCameraCommand, this.ResetCameraHandler)); this.CommandBindings.Add(new CommandBinding(ChangeLookAtCommand, this.changeLookAtHandler.Execute)); this.CommandBindings.Add( new CommandBinding(ChangeFieldOfViewCommand, this.changeFieldOfViewHandler.Execute)); this.CommandBindings.Add(new CommandBinding(TopViewCommand, this.TopViewHandler)); this.CommandBindings.Add(new CommandBinding(BottomViewCommand, this.BottomViewHandler)); this.CommandBindings.Add(new CommandBinding(LeftViewCommand, this.LeftViewHandler)); this.CommandBindings.Add(new CommandBinding(RightViewCommand, this.RightViewHandler)); this.CommandBindings.Add(new CommandBinding(FrontViewCommand, this.FrontViewHandler)); this.CommandBindings.Add(new CommandBinding(BackViewCommand, this.BackViewHandler)); }