예제 #1
0
        // as the mouse moves, determine how to handle the change
        private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
        {
            if (thinking == true)
            {
                return;
            }
            if (e.Button == MouseButtons.None)
            {
                return;
            }

            switch (e.Button.ToString())
            {
            case "Left":
                SP.MousePan(e.X, e.Y);
                UpdateGraph();
                return;

            case "Right":
                SP.MouseZoom(e.X, e.Y);
                UpdateGraph();
                return;

            case "Middle":
                return;

            default:
                return;
            }
        }