private void findFreqsButton_Click(object sender, EventArgs e)
        {
            int[] scores = CaesarAndVigenere.letterFrequencyAnalyser(parent.ciphertext);
            freqsListView.Items.Clear();

            for (int x = 0; x < 26; x++)
            {
                string[]     rowStrings = new string[] { CaesarAndVigenere.ALPHABET[x].ToString(), scores[x].ToString() };
                ListViewItem item       = new ListViewItem(rowStrings);
                freqsListView.Items.Add(item);
            }

            updateChart();
        }
        private void updateChart()
        {
            //chart1.Series["Actual Frequencies"].Points.DataBindY(CaesarAndVigenere.ALPHABET.ToArray());

            chart1.Series["English Frequencies"].Enabled = false;
            chart1.Series["Actual Frequencies"].Enabled  = false;
            chart1.Series["Frequencies of Caesar Decryption"].Enabled = false;

            string text = CaesarAndVigenere.stripText(parent.ciphertext);

            if (text.Length == 0)
            {
                return;
            }

            if (expectedFreqsCheckBox.Checked)
            {
                chart1.Series["English Frequencies"].Enabled = true;
                double[] percentageScores = CaesarAndVigenere.ENGLISH_FREQUENCIES.Select(x => 100.0 * x).ToArray();
                chart1.Series["English Frequencies"].Points.DataBindY(percentageScores);
            }

            if (userCaesarShiftCheckBox.Checked)
            {
                if (!invalidKeyLabel.Visible)
                {
                    chart1.Series["Frequencies of Caesar Decryption"].Enabled = true;
                    double   textLength       = text.Length;
                    int[]    scores           = CaesarAndVigenere.letterFrequencyAnalyser(CaesarAndVigenere.caesarText(text, caesarShiftLetterBox.Text[0], false));
                    double[] percentageScores = scores.Select(x => 100.0 * x / textLength).ToArray();
                    chart1.Series["Frequencies of Caesar Decryption"].Points.DataBindY(percentageScores);
                }
            }
            else
            {
                chart1.Series["Actual Frequencies"].Enabled = true;
                double   textLength       = text.Length;
                int[]    scores           = CaesarAndVigenere.letterFrequencyAnalyser(text);
                double[] percentageScores = scores.Select(x => 100.0 * x / textLength).ToArray();
                chart1.Series["Actual Frequencies"].Points.DataBindY(percentageScores);
            }
        }