Beispiel #1
0
        private void Panel_board_MouseUp(object sender, MouseEventArgs e)
        {
            isholding = false;
            if (point.Equals(e.Location))
            {
                return;
            }

            switch (drawTool)
            {
            case 0:
                break;

            //case 1:     //Pencil
            //    pencilbool = false;
            //    break;
            case 2:         //Line
                m_Write.WriteLine("Line");
                m_Write.WriteLine(myLine.getPoint1().X);
                m_Write.WriteLine(myLine.getPoint1().Y);
                m_Write.WriteLine(myLine.getPoint2().X);
                m_Write.WriteLine(myLine.getPoint2().Y);
                m_Write.WriteLine(myLine.GetPen().Width);
                m_Write.WriteLine(myLine.GetPen().Color.ToArgb());
                m_Write.Flush();
                break;

            case 3:         //Circle
                m_Write.WriteLine("Circle");
                m_Write.WriteLine(myCircle.getRectC().X);
                m_Write.WriteLine(myCircle.getRectC().Y);
                m_Write.WriteLine(myCircle.getRectC().Width);
                m_Write.WriteLine(myCircle.getRectC().Height);
                m_Write.WriteLine(myCircle.GetPen().Width);
                m_Write.WriteLine(myCircle.GetPen().Color.ToArgb());
                m_Write.WriteLine(myCircle.GetBrush().Color.ToArgb());
                m_Write.Flush();
                //shapes.Add(myCircle);
                break;

            case 4:         //Rectangle
                m_Write.WriteLine("Rectangle");
                m_Write.WriteLine(myRect.getRect().X);
                m_Write.WriteLine(myRect.getRect().Y);
                m_Write.WriteLine(myRect.getRect().Width);
                m_Write.WriteLine(myRect.getRect().Height);
                m_Write.WriteLine(myRect.GetPen().Width);
                m_Write.WriteLine(myRect.GetPen().Color.ToArgb());
                m_Write.WriteLine(myRect.GetBrush().Color.ToArgb());
                m_Write.Flush();
                //shapes.Add(myRect);
                break;
            }
        }