private void CheckSelectAllPCCsList(bool SelectAll, bool FromButton)
{
bool state = true;
// KFreon: Check all unless all already checked, then uncheck all
if (PCCsCheckListBox.CheckedIndices.Count == PCCsCheckListBox.Items.Count)
state = false;
this.Invoke(new Action(() => PCCSelectAllButton.Text = (!state ? "Uncheck All" : "Check All")));
if (SelectAll)
for (int i = 0; i < PCCsCheckListBox.Items.Count; i++)
PCCsCheckListBox.Items[i].Checked = state;
if (FromButton)
PCCsCheckBox_IndexChanged(null, null);
}