Ejemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Brush    B = new SolidBrush(Color.White);
            Pen      P = new Pen(B);
            Graphics G = this.CreateGraphics();

            triangle t = new triangle(G, P);

            tri.Add(t);
        }
Ejemplo n.º 2
0
        private void Form1_Click(object sender, EventArgs e)
        {
            int count = tri.Count;

            for (int i = 0; i < count; i++)
            {
                triangle t1 = new triangle(tri[i], 0);
                triangle t2 = new triangle(tri[i], 1);
                triangle t3 = new triangle(tri[i], 2);
                tri.Add(t1);
                tri.Add(t2);
                tri.Add(t3);
            }
            this.Refresh();
        }