//----------------------------------------------------
        #endregion

        #region Cyphers Decryption
        //----------------------------------------------------

        private void ShiftCypherDecrypt()
        {
            ShiftCypher cypher = new ShiftCypher {
                Alphabet = alphabet
            };
            string C = textBoxEncryptedText.Text;

            DoEvents();
            int Key = (gridKey.Children[1] as ComboBox).SelectedIndex;

            textBoxDecryptedText.Text = cypher.Decrypt(C, Key);
        }
        //----------------------------------------------------

        private void ShiftCypherEncrypt()
        {
            ShiftCypher cipher = new ShiftCypher {
                Alphabet = alphabet
            };
            string text = Regex.Replace(textBoxOpenText.Text.ToLower(), "[^" + alphabet.GetStringValue() + "]", "");
            string M    = Regex.Replace(text, @"\s+", " ");

            DoEvents();
            int Key = (gridKey.Children[1] as ComboBox).SelectedIndex;

            textBoxEncryptedText.Text = cipher.Encrypt(M, Key);
        }