public void UnhookEvents() { this.UserStyle.KeyPressEvt -= this.UserHandler; this.UserStyle.CharEvt -= this.UserHandler; this.UserStyle.KeyReleaseEvt -= this.UserHandler; this.Interactor.AnyEvt -= this.InteractorHandler; this.UserHandler = null; this.UserStyle = null; this.InteractorHandler = null; this.Interactor = null; }
public void HookEvents() { this.HookErrorWindowEvents(); this.Interactor = this.renderWindowControl1.RenderWindow.GetInteractor(); this.InteractorHandler = new Kitware.VTK.vtkObject.vtkObjectEventHandler(Interactor_AnyEventHandler); this.Interactor.AnyEvt += this.InteractorHandler; // Give our own style a higher priority than the built-in one // so that we see the events first: // float builtInPriority = this.Interactor.GetInteractorStyle().GetPriority(); this.UserStyle = Kitware.VTK.vtkInteractorStyleUser.New(); this.UserStyle.SetPriority(0.5f); this.UserStyle.SetInteractor(this.Interactor); this.UserHandler = new Kitware.VTK.vtkObject.vtkObjectEventHandler(UserStyle_MultipleEventHandler); // Keyboard events: this.UserStyle.KeyPressEvt += this.UserHandler; this.UserStyle.CharEvt += this.UserHandler; this.UserStyle.KeyReleaseEvt += this.UserHandler; }
public void HookEvents() { this.HookErrorWindowEvents(); this.Interactor = this.renderWindowControl1.RenderWindow.GetInteractor(); this.InteractorHandler = new Kitware.VTK.vtkObject.vtkObjectEventHandler(Interactor_AnyEventHandler); this.Interactor.AnyEvt += this.InteractorHandler; // Give our own style a higher priority than the built-in one // so that we see the events first: // float builtInPriority = this.Interactor.GetInteractorStyle().GetPriority(); this.UserStyle = Kitware.VTK.vtkInteractorStyleUser.New(); this.UserStyle.SetPriority(0.5f); this.UserStyle.SetInteractor(this.Interactor); this.UserHandler = new Kitware.VTK.vtkObject.vtkObjectEventHandler(UserStyle_MultipleEventHandler); // Keyboard events: this.UserStyle.KeyPressEvt += this.UserHandler; this.UserStyle.CharEvt += this.UserHandler; this.UserStyle.KeyReleaseEvt += this.UserHandler; }
public void UnhookEvents() { this.UserStyle.KeyPressEvt -= this.UserHandler; this.UserStyle.CharEvt -= this.UserHandler; this.UserStyle.KeyReleaseEvt -= this.UserHandler; this.Interactor.AnyEvt -= this.InteractorHandler; this.UserHandler = null; this.UserStyle = null; this.InteractorHandler = null; this.Interactor = null; }