Beispiel #1
0
        void c_PointerReleased(object sender, PointerRoutedEventArgs e)
        {
            if (type == 2)
            {
                ep = e.GetCurrentPoint(pc.SelectLayer).Position;
                dg.DrawRectangle(sp.X, sp.Y, ep.X, ep.Y, false, 2, new SolidColorBrush(ForeColor), new SolidColorBrush(FillColor));
                pc.SelectLayer.setSelect(dg.getRectangleGeometry(sp.X, sp.Y, ep.X, ep.Y));
            }
            if (type == 3)
            {
                ep = e.GetCurrentPoint(pc.SelectLayer).Position;
                dg.DrawEllipse(sp.X, sp.Y, ep.X, ep.Y, false, 2, new SolidColorBrush(ForeColor), new SolidColorBrush(FillColor));
                pc.SelectLayer.setSelect(dg.getEllipseGeometry(sp.X, sp.Y, ep.X, ep.Y));
            }

            if (type == 5)
            {
                begin           = false;
                c.PointerMoved -= new PointerEventHandler(c_PointerMoved);
                pc.SelectLayer.setSelect(pt.Data as PathGeometry);
            }
            c.PointerPressed  -= new PointerEventHandler(c_PointerPressed);
            c.PointerReleased -= new PointerEventHandler(c_PointerReleased);
            e.Handled          = true;
        }