//Шифрование 1 методом - Система Цезаря с ключевым словом private void FirstEncrypt() { try { int.TryParse(textBox2.Text, out int KeyNumber); if (textBox3.Text.Length >= 60) { throw new Exception("Длина ключевого слова слишком велика!"); } if (!(KeyNumber >= 0 && KeyNumber < 999999999)) { throw new Exception("Не корректный ключевой сдвиг!"); } FirstCipher firstCipher = new FirstCipher(textBox3.Text, KeyNumber, textBox1.Text); label1.Text = firstCipher.Encode(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }