예제 #1
0
파일: Form1.cs 프로젝트: nikita6274/laba2
        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);
     }
 }