コード例 #1
0
        private void BreakingButton_Click(object sender, EventArgs e)
        {
            var input = ClearText(InputTextBox.Text);

            if (!string.IsNullOrEmpty(input))
            {
                try
                {
                    var result = cipher.Breaking(ClearText(InputTextBox.Text));
                    ResultTextBox.Text        = TextWithSpaces(result.text);
                    DecryptionKeyTextBox.Text = (string)result.cipherKey;
                }
                catch (KeyNotFoundException ex)
                {
                    MessageBox.Show(ex.Message,
                                    "Ошибка",
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Error
                                    );
                }
            }
        }