Exemplo n.º 1
0
        private void PictureCanvas_MouseMove(object sender, MouseEventArgs e)
        {
            p2 = e.GetPosition(PictureCanvas); /* Get current position */

            /* Refresh position */
            TextBlockX.Text = p2.X.ToString();
            TextBlockY.Text = p2.Y.ToString();

            if (RadioButtonPen.IsChecked == true)        /* Continue drawing normal line */
            {
                manager.ContinueDrawingLine(p2);
            }

            else if (RadioButtonRuler.IsChecked == true) /* Continue drawing ruler line */
            {
                if (RadioButtonUpDown.IsChecked == true)
                {
                    manager.ContinueDrawingStraightLine(p2, 1);
                }
                else if (RadioButtonLeftRight.IsChecked == true)
                {
                    manager.ContinueDrawingStraightLine(p2, 2);
                }
                else if (RadioButtonUpLeft.IsChecked == true)
                {
                    manager.ContinueDrawingStraightLine(p2, 3);
                }
                else if (RadioButtonUpRight.IsChecked == true)
                {
                    manager.ContinueDrawingStraightLine(p2, 4);
                }
            }
        }