Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Bojenje_Krugova
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- SolidBrush cetka = new SolidBrush(Color.Blue);
- private void radioButton1_CheckedChanged(object sender, EventArgs e)
- {
- pictureBox1.Refresh();
- if (radioButton1.Checked)
- {
- Graphics g = pictureBox1.CreateGraphics();
- Pen olovka = new Pen(Color.Red, 5);
- g.DrawEllipse(olovka, 200, 50, 200, 200);
- }
- }
- private void groupBox1_Enter(object sender, EventArgs e)
- {
- }
- private void radioButton2_CheckedChanged(object sender, EventArgs e)
- {
- pictureBox1.Refresh();
- if (radioButton2.Checked)
- {
- Graphics g = pictureBox1.CreateGraphics();
- Pen olovka = new Pen(Color.Green, 5);
- g.DrawEllipse(olovka, 200, 50, 200, 200);
- }
- }
- private void radioButton3_CheckedChanged(object sender, EventArgs e)
- {
- pictureBox1.Refresh();
- if (radioButton3.Checked)
- {
- Graphics g = pictureBox1.CreateGraphics();
- Pen olovka = new Pen(Color.Blue, 5);
- g.DrawEllipse(olovka, 200, 50, 200, 200);
- }
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- if ((checkBox1.Checked) && (radioButton1.Checked))
- {
- Graphics g = pictureBox1.CreateGraphics();
- Brush cetka = new SolidBrush(Color.Red);
- g.FillEllipse(cetka, 200,50,200,200);
- }
- else if ((checkBox1.Checked) && (radioButton2.Checked))
- {
- Graphics g = pictureBox1.CreateGraphics();
- Brush cetka = new SolidBrush(Color.Green);
- g.FillEllipse(cetka, 200, 50, 200, 200);
- }
- else if ((checkBox1.Checked) && (radioButton3.Checked))
- {
- Graphics g = pictureBox1.CreateGraphics();
- Brush cetka = new SolidBrush(Color.Blue);
- g.FillEllipse(cetka, 200, 50, 200, 200);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement