Esempio n. 1
0
        private void startDecryption_Click(object sender, EventArgs e)
        {
            this.resetErrors();
            this.decryptedString.Clear();
            this.originalTextLengthChecker();

            if (this.TranslationGuide != null)
            {
                ConsoleAppForTranslator.Decoder decoder = new ConsoleAppForTranslator.Decoder(TranslationGuide, this.original.Text);

                this.decryptedString.Text = decoder.startDecoding();
            }
            else
            {
                this.keyAndValuesInitialChecker();
            }
        }
        //Function for calling the Decoder class
        private String decoder(Dictionary <String, String> translationGuide, string originalWord)
        {
            Decoder d = new Decoder(translationGuide, originalWord);

            return(d.startDecoding());
        }