private void UncheckAllToolStripMenuItem_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < SourceClasses.Items.Count; i++)
     {
         SourceClasses.SetItemCheckState(i, CheckState.Unchecked);
     }
 }
 private void InvertToolStripMenuItem_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < SourceClasses.Items.Count; i++)
     {
         var stateChecked = SourceClasses.GetItemCheckState(i) == CheckState.Checked;
         SourceClasses.SetItemCheckState(i, (stateChecked ? CheckState.Unchecked : CheckState.Checked));
     }
 }