コード例 #1
0
 private void OnMouseUp(object sender, MouseButtonEventArgs e)
 {
     if (e.ChangedButton == MouseButton.Left)
     {
         isMouseDown = false;
         if (clickPos == e.GetPosition(plotter.CentralGrid))
         {
             timer.Stop();
             animation = null;
         }
         else
         {
             if (animation.IsFinished)
             {
                 timer.Stop();
                 animation = null;
             }
             else
             {
                 animation.UseMouse = false;
                 animation.LiquidFrictionQuadraticCoeff = 1;
             }
         }
     }
 }
コード例 #2
0
		private void OnMouseUp(object sender, MouseButtonEventArgs e)
		{
			if (e.ChangedButton == MouseButton.Left)
			{
				isMouseDown = false;
				if (clickPos == e.GetPosition(plotter.CentralGrid))
				{
					timer.Stop();
					animation = null;
				}
				else
				{
					if (animation.IsFinished)
					{
						timer.Stop();
						animation = null;
					}
					else
					{
						animation.UseMouse = false;
						animation.LiquidFrictionQuadraticCoeff = 1;
					}
				}
			}
		}
コード例 #3
0
        private void OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.ChangedButton == MouseButton.Left)
            {
                clickPos = e.GetPosition(plotter.CentralGrid);

                isMouseDown = true;
                startTime   = DateTime.Now;

                animation = new PhysicalRectAnimation(
                    plotter.Viewport,
                    e.GetPosition(plotter.ViewportPanel));

                timer.Start();
            }
        }
コード例 #4
0
		private void OnMouseDown(object sender, MouseButtonEventArgs e)
		{
			if (e.ChangedButton == MouseButton.Left)
			{
				clickPos = e.GetPosition(plotter.CentralGrid);

				isMouseDown = true;
				startTime = DateTime.Now;

				animation = new PhysicalRectAnimation(
					plotter.Viewport,
					e.GetPosition(plotter.ViewportPanel));

				timer.Start();
			}
		}