Пример #1
0
        private void UpdatePassword()
        {
            var encoded = new Password(Current);
            var parts   = AlphabetMapper.Split(encoded.Encoded);

            txtRaw.Text = string.Join(" ", parts);
        }
Пример #2
0
 private void txtPart1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.V)
     {
         string text = Clipboard.GetText();
         try {
             string[] parts = AlphabetMapper.Split(text);
             txtPart1.Text = parts[0];
             txtPart2.Text = parts[1];
             txtPart3.Text = parts[2];
             txtPart4.Text = parts[3];
             CheckButton();
         }
         catch (Exception) {
             lblError.Text = "Paste failed; invalid format";
         }
         e.SuppressKeyPress = true;
     }
 }