Пример #1
0
        private void txtInput_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key < Key.A || e.Key > Key.Z)
            {
                e.Handled = true;
                return;
            }

            char key = e.Key.ToString()[0];

            MoveRotors();
            UpdateOffsetLabel();
            char output = GetPlugboardTrans(rightRotor.GetInput(GetPlugboardTrans(key)));

            txtOutput.Text          += output;
            txtInput.CharacterCasing = CharacterCasing.Upper;
        }