private void btnTransferSeed_Click(object sender, EventArgs e) { if (picChksum_Failed.Visible == true) { DialogResult res = MessageBox.Show("The Data loaded from the QR Code couldnĀ“t be proven correct.\r\n" + "If you generated this QR Code with this software try to feed the QR Code again into the software to get the green Symbol.\r\n" + "Try for example with better light conditions or a better camera. You can also take a picture and load it into the software.\r\n\r\n" + "Do you want to proceed with possibly wrong data (not recommended)?", "QR Code Data corrupt - Try once more", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning); if (res != DialogResult.Yes) { return; } } Form_Encrypt fe = new Form_Encrypt(); // Check if there are just allowed chars, to avoid problems with send-keys (should be fixed in future) string allowed_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + fe.chkspecial1.Text.Trim() + fe.chkspecial2.Text.Trim(); fe.Dispose(); foreach (char ch in txtSeed.Text) { if (allowed_chars.IndexOf(ch) < 0) { MessageBox.Show("The selected text contains chars you have added yourself but this chars could possibly not sent correctly with this automated method.\r\n" + "The first char found was: '" + ch + "'\r\n" + "You can remove this char and add it in the target textbox by hand.\r\n" + "There is intentionally no option for sending it anyway to ensure compatibility with future versions.", "Not possible to send char '" + ch + "'", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } } set_anchor_top(); timerexpand.Start(); timerSendKeys.Start(); time2wait_counter = time2wait_forsendkeys; // Start Counter at max. Time and count down btnTransferSeed.Text = countdown(time2wait_forsendkeys, btnTransferSeed.Text); }
private void buttonencrypt_Click(object sender, EventArgs e) { Form_Encrypt frm = new Form_Encrypt(); frm.Show(); }