Beispiel #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     System.Drawing.Graphics Desen;
     Desen = this.CreateGraphics();
     System.Drawing.Pen        Creion_albastru;
     System.Drawing.SolidBrush Pensula_albastra;
     Pensula_albastra = new System.Drawing.SolidBrush(System.Drawing.Color.Blue);
     Creion_albastru  = new System.Drawing.Pen(System.Drawing.Color.Blue);
     if (this.radioButton1.Checked)
     {
         Desen.DrawLine(Creion_albastru, 150, 50, 350, 100);
     }
     if (this.radioButton2.Checked)
     {
         Desen.Clear(this.BackColor);
         Desen.DrawRectangle(Creion_albastru, 250, 50, 200, 100);
     }
     if (this.radioButton3.Checked)
     {
         Desen.Clear(this.BackColor);
         Desen.DrawEllipse(Creion_albastru, 250, 150, 105, 105);
     }
     if (this.radioButton4.Checked)
     {
         Desen.Clear(this.BackColor);
         Desen.DrawEllipse(Creion_albastru, 150, 50, 95, 200);
     }
     if (this.radioButton5.Checked)
     {
         Desen.Clear(this.BackColor);
         Desen.FillRectangle(Pensula_albastra, 250, 50, 200, 100);
     }
     if (this.radioButton6.Checked)
     {
         Desen.Clear(this.BackColor);
         Desen.FillEllipse(Pensula_albastra, 150, 50, 95, 200);
     }
 }