Advertisement
MusicFreak

asd

Jan 31st, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.52 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace Bojenje_Krugova
  11. {
  12.     public partial class Form1 : Form
  13.     {
  14.         public Form1()
  15.         {
  16.             InitializeComponent();
  17.         }
  18.         SolidBrush cetka = new SolidBrush(Color.Blue);
  19.         private void radioButton1_CheckedChanged(object sender, EventArgs e)
  20.         {
  21.             pictureBox1.Refresh();
  22.             if (radioButton1.Checked)
  23.             {
  24.                 Graphics g = pictureBox1.CreateGraphics();
  25.                 Pen olovka = new Pen(Color.Red, 5);
  26.                 g.DrawEllipse(olovka, 200, 50, 200, 200);
  27.             }
  28.            
  29.         }
  30.  
  31.         private void groupBox1_Enter(object sender, EventArgs e)
  32.         {
  33.  
  34.         }
  35.  
  36.         private void radioButton2_CheckedChanged(object sender, EventArgs e)
  37.         {
  38.             pictureBox1.Refresh();
  39.             if (radioButton2.Checked)
  40.             {
  41.                 Graphics g = pictureBox1.CreateGraphics();
  42.                 Pen olovka = new Pen(Color.Green, 5);
  43.                 g.DrawEllipse(olovka, 200, 50, 200, 200);
  44.             }
  45.         }
  46.  
  47.         private void radioButton3_CheckedChanged(object sender, EventArgs e)
  48.         {
  49.             pictureBox1.Refresh();
  50.             if (radioButton3.Checked)
  51.             {
  52.                 Graphics g = pictureBox1.CreateGraphics();
  53.                 Pen olovka = new Pen(Color.Blue, 5);
  54.                 g.DrawEllipse(olovka, 200, 50, 200, 200);
  55.             }
  56.         }
  57.  
  58.         private void checkBox1_CheckedChanged(object sender, EventArgs e)
  59.         {
  60.             if ((checkBox1.Checked) && (radioButton1.Checked))
  61.            {
  62.                Graphics g = pictureBox1.CreateGraphics();
  63.                 Brush cetka = new SolidBrush(Color.Red);
  64.                 g.FillEllipse(cetka, 200,50,200,200);
  65.             }
  66.             else if ((checkBox1.Checked) && (radioButton2.Checked))
  67.            {
  68.                Graphics g = pictureBox1.CreateGraphics();
  69.                 Brush cetka = new SolidBrush(Color.Green);
  70.                 g.FillEllipse(cetka, 200, 50, 200, 200);
  71.             }
  72.             else if ((checkBox1.Checked) && (radioButton3.Checked))
  73.            {
  74.                Graphics g = pictureBox1.CreateGraphics();
  75.                 Brush cetka = new SolidBrush(Color.Blue);
  76.                 g.FillEllipse(cetka, 200, 50, 200, 200);
  77.             }
  78.         }
  79.     }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement