Esempio n. 1
0
 public void BeginEditing()
 {
     if (!this.host.PropertyEditor.CaptureMouse())
     {
         return;
     }
     this.host.PropertyEditor.LostMouseCapture += new MouseEventHandler(this.Owner_LostMouseCapture);
     this.host.PropertyEditor.MouseDown        += new MouseButtonEventHandler(this.Owner_MouseDown);
     this.state = new PickWhipEngine.PickState(this.host);
     InputManager.Current.PostNotifyInput += new NotifyInputEventHandler(this.Current_PostNotifyInput);
     if (this.state.View != null && this.state.View.ViewModel != null)
     {
         this.state.View.ViewModel.Closing += new EventHandler(this.ViewModel_Closing);
     }
     this.state.OnMouseMovement();
 }
Esempio n. 2
0
 public void FinishEditing()
 {
     if (this.state != null)
     {
         if (this.state.View != null && this.state.View.ViewModel != null)
         {
             this.state.View.ViewModel.Closing -= new EventHandler(this.ViewModel_Closing);
         }
         this.state.ClearState();
         this.state = (PickWhipEngine.PickState)null;
     }
     InputManager.Current.PostNotifyInput -= new NotifyInputEventHandler(this.Current_PostNotifyInput);
     this.host.PropertyEditor.ReleaseMouseCapture();
     this.host.PropertyEditor.LostMouseCapture -= new MouseEventHandler(this.Owner_LostMouseCapture);
     this.host.PropertyEditor.MouseDown        -= new MouseButtonEventHandler(this.Owner_MouseDown);
 }