private void UnCheckAllFrontsButton_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < FrontsCheckedListBox.Items.Count; i++)
     {
         FrontsCheckedListBox.SetItemChecked(i, false);
     }
 }
        private void FrontsCheckedListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            int actualcount = listBox1_selectionhistory.Count;

            if (actualcount == 1)
            {
                if (Control.ModifierKeys == Keys.Shift)
                {
                    int lastindex    = listBox1_selectionhistory[0];
                    int currentindex = FrontsCheckedListBox.SelectedIndex;
                    int upper        = Math.Max(lastindex, currentindex);
                    int lower        = Math.Min(lastindex, currentindex);
                    for (int i = lower; i <= upper; i++)
                    {
                        FrontsCheckedListBox.SetItemCheckState(i, CheckState.Checked);
                    }
                }
                listBox1_selectionhistory.Clear();
                listBox1_selectionhistory.Add(FrontsCheckedListBox.SelectedIndex);
            }
            else
            {
                listBox1_selectionhistory.Clear();
                listBox1_selectionhistory.Add(FrontsCheckedListBox.SelectedIndex);
            }
        }