示例#1
0
 /// <summary>
 /// The Click command for the Start button that is used to start the Premutation Brute Forcing.
 /// </summary>
 private void cmdStart_Click(object sender, EventArgs e)
 {
     if (running)
     {
         try
         {
             cts.Cancel();
         }
         catch (ObjectDisposedException ex)
         {
         }
         ContribText.Enabled = true;
         CPUlevel.Enabled    = true;
         statuslbl.ForeColor = Color.Red;
         statuslbl.Text      = "STOPPING...";
         do
         {
             Application.DoEvents();
             System.Threading.Thread.Sleep(100);
         } while (BruteForceWorker.IsBusy);
         Pbar.Visible = false;
         UpdateLogTimer.Stop();
         statuslbl.ForeColor = Color.Black;
         statuslbl.Text      = "IDLE";
         cmdStart.Text       = "Start Factoring";
         running             = false;
     }
     else
     {
         cts = new System.Threading.CancellationTokenSource();
         ContribText.Enabled = false;
         CPUlevel.Enabled    = false;
         CPUperc             = CPUlevel.Text;
         if (ContribText.Text == "UrRedditName")
         {
             ContributerName = "N/A";
         }
         else
         {
             ContributerName = ContribText.Text;
         }
         //Start the Main Brute Forcing Method
         BruteForceWorker.RunWorkerAsync();
         Pbar.Visible = true;
         UpdateLogTimer.Start();
         statuslbl.ForeColor = Color.LimeGreen;
         statuslbl.Text      = "Working...";
         cmdStart.Text       = "Stop Factoring";
         running             = true;
     }
 }
示例#2
0
文件: Form1.cs 项目: EthanC/ADFGX
 /// <summary>
 /// The Click command for the Start button that is used to start the Premutation Brute Forcing.
 /// </summary>
 private void cmdStart_Click(object sender, EventArgs e)
 {
     cts = new System.Threading.CancellationTokenSource();
     CPUperc = CPUlevel.Text;
     if (ContribText.Text == "UrRedditName")
         ContributerName = "N/A";
     else
         ContributerName = ContribText.Text;
     //Start the Main Brute Forcing Method
     BruteForceWorker.RunWorkerAsync();
     Pbar.Visible = true;
     UpdateLogTimer.Start();
     statuslbl.ForeColor = Color.LimeGreen;
     statuslbl.Text = "Working...";
 }