Пример #1
0
        private void Check(int CountRequiredDots, Point AdditionalPoint)
        {
            int Value = AdditionalListOfNewPoints.Count - 1;

            if (AdditionalListOfNewPoints[Value].Count == CountRequiredDots)
            {
                ListOfShape.Add(new InfoShape {
                    Shape = AdditionalShape, ListOfPoints = AdditionalListOfNewPoints[Value]
                });

                AdditionalShape.Draw(ListOfShape[ListOfShape.Count - 1], g);
                AdditionalListOfNewPoints.Add(new List <Point>());
            }
        }
Пример #2
0
 private void pictureBox1_Paint(object sender, PaintEventArgs e)
 {
     if (TempShape != null)
     {
         TempShape.Draw(e.Graphics, GreenPen);
     }
     foreach (Shape p in Shapes)
     {
         p.Draw(e.Graphics, RedPen);
     }
     foreach (int i in Shapes_list.SelectedIndices)
     {
         Shapes[i].Draw(e.Graphics, pSelect);
     }
 }