示例#1
0
 public void HandleMouseMove(MouseEvt me)
 {
     this.dragInfo.MatchSome(
         d =>
     {
         Reposition r = new Reposition(d, me, this.axisLock);
         Canvas.SetLeft(r.Polygon, r.Left);
         Canvas.SetTop(r.Polygon, r.Top);
     });
 }
示例#2
0
 public void HandleMouseMove(MouseEvt me)
 {
     this.dragInfo.Get().Match(
         d =>
         {
             Reposition r = new Reposition(d, me, this.axisLock);
             Canvas.SetLeft(r.Polygon, r.Left);
             Canvas.SetTop(r.Polygon, r.Top);
         },
         () => { });
 }
示例#3
0
 public Reposition(DragInfo dragInfo, MouseEvt me, bool axisLock)
 {
     double tx = me.Pt.X - dragInfo.Me.Pt.X;
     double ty = me.Pt.Y - dragInfo.Me.Pt.Y;
     if (axisLock)
     {
         if (Math.Abs(tx) < Math.Abs(ty))
         {
             tx = 0;
         }
         else
         {
             ty = 0;
         }
     }
     this.output = new Lazy<Tuple<Polygon, Point>>(() => Tuple.Create(dragInfo.Me.Element.Polygon, new Point(dragInfo.OriginalLeft + tx, dragInfo.OriginalTop + ty)));
 }
示例#4
0
        public Reposition(DragInfo dragInfo, MouseEvt me, bool axisLock)
        {
            double tx = me.Pt.X - dragInfo.Me.Pt.X;
            double ty = me.Pt.Y - dragInfo.Me.Pt.Y;

            if (axisLock)
            {
                if (Math.Abs(tx) < Math.Abs(ty))
                {
                    tx = 0;
                }
                else
                {
                    ty = 0;
                }
            }
            this.output = new Lazy <Tuple <Polygon, Point> >(() => Tuple.Create(dragInfo.Me.Element.Polygon, new Point(dragInfo.OriginalLeft + tx, dragInfo.OriginalTop + ty)));
        }
示例#5
0
文件: Frp.cs 项目: swag-FRP/sodium
 public void HandleMouseUp(MouseEvt me) => this.sMouseUp.Send(me);
示例#6
0
文件: Frp.cs 项目: swag-FRP/sodium
 public void HandleMouseMove(MouseEvt me) => this.sMouseMove.Send(me);
示例#7
0
文件: Frp.cs 项目: Angeldude/sodium
 public void HandleMouseUp(MouseEvt me) => this.sMouseUp.Send(me);
示例#8
0
文件: Frp.cs 项目: Angeldude/sodium
 public void HandleMouseMove(MouseEvt me) => this.sMouseMove.Send(me);
示例#9
0
 public void HandleMouseUp(MouseEvt me)
 {
     this.dragInfo.Reset();
 }
示例#10
0
 public EvtMove(MouseEvt me)
     : base(me)
 {
 }
示例#11
0
 public void HandleMouseUp(MouseEvt me)
 {
     Task.Run(() => [email protected](new EvtUp(me), this.cts.Token));
 }
示例#12
0
文件: Actor.cs 项目: Angeldude/sodium
 public EvtUp(MouseEvt me)
     : base(me)
 {
 }
示例#13
0
文件: Actor.cs 项目: Angeldude/sodium
 public EvtMove(MouseEvt me)
     : base(me)
 {
 }
示例#14
0
文件: Actor.cs 项目: Angeldude/sodium
 protected EvtBase(MouseEvt me)
 {
     this.Me = me;
 }
示例#15
0
文件: Actor.cs 项目: Angeldude/sodium
 public void HandleMouseUp(MouseEvt me)
 {
     Task.Run(() => [email protected](new EvtUp(me), this.cts.Token));
 }
示例#16
0
 public void HandleMouseUp(MouseEvt me)
 {
     this.dragInfo = Maybe.None;
 }
示例#17
0
 public EvtUp(MouseEvt me)
     : base(me)
 {
 }
示例#18
0
文件: Classic.cs 项目: zzazang/sodium
 public void HandleMouseUp(MouseEvt me)
 {
     this.dragInfo.Reset();
 }
示例#19
0
 protected EvtBase(MouseEvt me)
 {
     this.Me = me;
 }