예제 #1
0
        private void OnMouseUp(object sender, MouseButtonEventArgs e)
        {
            ControlCircle viewModel = (ControlCircle)((FrameworkElement)sender).DataContext;

            viewModel.OnMouseUp();
            UpdateSvg();
        }
예제 #2
0
        private string GetNewStrokeContent()
        {
            StringBuilder ret = new StringBuilder();

            ControlCircle firstCircle = Circles.First();

            ret.AppendFormat("M{0} {1}", firstCircle.Pos.X, firstCircle.Pos.Y);

            foreach (ControlCircle circle in Circles.Skip(1))
            {
                ret.AppendFormat(" L{0} {1}", circle.Pos.X, circle.Pos.Y);
            }

            return(ret.ToString());
        }
예제 #3
0
        private void OnMouseEnter(object sender, MouseEventArgs e)
        {
            ControlCircle viewModel = (ControlCircle)((FrameworkElement)sender).DataContext;

            viewModel.OnMouseEnter();
        }
예제 #4
0
        private void OnMouseMove(object sender, MouseEventArgs e)
        {
            ControlCircle viewModel = (ControlCircle)((FrameworkElement)sender).DataContext;

            viewModel.OnMouseMove(e.LeftButton, e.GetPosition(ConstructionCanvas));
        }