ASDV-C-Sharp/Lab4_2/Lab4_5_CalebFontenot/Form1.cs
2022-09-13 15:08:17 -05:00

56 lines
1.5 KiB
C#
Executable File

namespace Lab4_5_CalebFontenot
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void yellowRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (yellowRadioButton.Checked)
{
this.BackColor = Color.Yellow;
}
}
private void redRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (redRadioButton.Checked)
{
this.BackColor = Color.Red;
}
}
private void whiteRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (whiteRadioButton.Checked)
{
this.BackColor = Color.White;
}
}
private void blackRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (blackRadioButton.Checked)
{
this.BackColor = Color.Gray; //Shh I know it's not black
}
}
private void normalRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (normalRadioButton.Checked)
{
this.BackColor = SystemColors.Control;
}
}
private void exitButton_Click(object sender, EventArgs e)
{
// Close the form.
this.Close();
}
}
}