Пример #1
0
        private void ViewButtonClick(object sender, EncodDecodEventArgs e)
        {
            IEncryption coder;

            switch (e.CoderType)
            {
            case Coder.PolybiusCoder:
                coder = securityManager.PolybiusCoder(e.Key);
                break;

            case Coder.VizhinerCoder:
                coder = securityManager.VizhinerCoder(e.Key);
                break;

            case Coder.PairedСipherCoder:
                coder = securityManager.PairedСipher(e.Key);
                break;

            default:
                coder = securityManager.CeasarCoder(e.KeyOne, e.KeyTwo);
                break;
            }

            Task.Run(() =>
            {
                ProcessText(e.ProcessType, coder, e.Text);
            });
        }