private void BruteForcer_ProgressChanged(object sender, ProgressChangedEventArgs e) { if (BruteForcer.CancellationPending) { return; } if (LockPing()) { // Display code tbStartValue.Text = ICode; txtConsole.AppendText(ICode + Environment.NewLine); } else { BruteForcer.CancelAsync(); } }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { // Stop iterations if (BruteForcer.IsBusy) { BruteForcer.CancelAsync(); } try { HTool.ComPort.Close(); HTool.ComPort = null; serialPort1.Dispose(); } catch (System.Exception ex) { HTool.LastError = ex.Message; } HTool.IsConnected = false; }
private void BtnStop_Click(object sender, EventArgs e) { BruteForcer.CancelAsync(); txtConsole.AppendText("Pass search eagerly cancelled." + Environment.NewLine); }