richcb has a valid point ... a checkedListBox would prove useful. In which case you could use
private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (e.NewValue == CheckState.Checked)
progressBar1.Value += 10;
else
progressBar1.Value -= 10;
}
or
if(e.NewValue==CheckState.Checked)
progressBar1.Value = (checkedListBox1.CheckedItems.Count + 1) * 10;
else
progressBar1.Value = (checkedListBox1.CheckedItems.Count - 1) * 10;
But if you have to use individual checkboxes then write a single function e.g.
private void checkBox_CheckedChanged(object sender, EventArgs e)
{
CheckBox cb = (CheckBox)sender;
if(cb.Checked)
progressBar1.Value += 10;
else
progressBar1.Value -= 10;
}
and in the form Designer.cs add this as the event handler for each of the checkboxes
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox_CheckedChanged);
...
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox_CheckedChanged);
etc...