Пример #1
0
 public void HandlePreviewMouseUp(Point mousePos)
 {
     LastMousePos = mousePos;
     //this.isDragging = false;
     if (this.StrokeBeingDragged != null)
     {
         editeur.ShowEncrage     = false;
         this.Canvas.EditingMode = InkCanvasEditingMode.Select;
         editeur.UpdateArrow(this.StrokeBeingDragged, this.IndexBeingDragged, mousePos);
         //this.StrokeBeingDragged.StylusPoints[this.IndexBeingDragged] = new StylusPoint(mousePos.X, mousePos.Y);
         Shape[] shapes = new Shape[1];
         shapes[0] = (this.StrokeBeingDragged as Form).ConvertToShape(this.SocketManager.SessionID);
         if (IsOffline)
         {
             this.editeur.ModifiedElements(shapes);
         }
         else
         {
             this.SocketManager.HandleModification(shapes);
         }
         this.StrokeBeingDragged = null;
         this.IndexBeingDragged  = -1;
     }
     else if (this.StrokeBeingRotated != null)
     {
         //this.Canvas.EditingMode = InkCanvasEditingMode.Select;
         this.Canvas.MoveEnabled = true;
         Shape[] shapes = new Shape[1];
         shapes[0] = (this.StrokeBeingRotated as Form).ConvertToShape(this.SocketManager.SessionID);
         if (IsOffline)
         {
             this.editeur.ModifiedElements(shapes);
         }
         else
         {
             this.SocketManager.HandleModification(shapes);
         }
         this.StrokeBeingRotated = null;
     }
 }