private void buttonGenerate_Click(object sender, EventArgs e) { PublicKeyAlgorithm algorithm; if (algorithmBox.Text == "RSA") { algorithm = PublicKeyAlgorithm.RSA; } else { algorithm = PublicKeyAlgorithm.DSA; } labelfingerprint.Hide(); labelpublicKey.Hide(); labelTag.Hide(); textBoxTag.Hide(); publicKeyBox.Hide(); fingerprintBox.Hide(); labelRandomness.Show(); progressBarGenerate.Show(); _gotKey = false; _key = null; _OpenSSHstring = ""; KeyGenThread t = new KeyGenThread(this, algorithm, Int32.Parse(bitCountBox.Text)); _mmhandler = t.OnMouseMove; progressBarGenerate.MouseMove += _mmhandler; this.MouseMove += _mmhandler; t.Start(); }
private void buttonGenerate_Click(object sender, EventArgs e) { PublicKeyAlgorithm algorithm; if (algorithmBox.Text == "RSA") algorithm= PublicKeyAlgorithm.RSA; else algorithm= PublicKeyAlgorithm.DSA; labelfingerprint.Hide(); labelpublicKey.Hide(); labelTag.Hide(); textBoxTag.Hide(); publicKeyBox.Hide(); fingerprintBox.Hide(); labelRandomness.Show(); progressBarGenerate.Show(); _gotKey = false; _key = null; _OpenSSHstring = ""; KeyGenThread t = new KeyGenThread(this, algorithm, Int32.Parse(bitCountBox.Text)); _mmhandler = t.OnMouseMove; progressBarGenerate.MouseMove += _mmhandler; this.MouseMove += _mmhandler; t.Start(); }