Exemplo n.º 1
0
 private void controller1_MouseLeave(object sender, MouseEventArgs e)
 {
     panelStatus = EPanelStatus.none;
     controller1Brush.Opacity = 0;
     controller2Brush.Opacity = 0;
     timer.Stop();
 }
Exemplo n.º 2
0
        private void setController2(Point mp, Point cp)
        {
            Vector vec = mp - cp;

            vec = new Vector(vec.X / controller2.ActualWidth * 2, -vec.Y / controller2.ActualHeight * 2);
            double angle = Vector.AngleBetween(vec, new Vector(1, 0));

            controller2Rotate.Angle = angle - 135;

            moveVec     = vec;
            panelStatus = EPanelStatus.move;
            controller2Brush.Opacity = 1;
        }