void onBomberResult(BomberResultEventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            if (e.BomberResult)
            {
                successcount++;
            }
            else
            {
                failcount++;
            }
            sb.AppendLine(e.UsesUrl);
            sb.AppendLine(e.ReturnValue);
            TimeSpan usestime = DateTime.Now - last;
            int      speed    = (int)(((double)successcount) / (usestime.TotalMinutes));

            statisticText.Text = ("[" + "成功:" + successcount + " 失败:" + failcount + " 平均速度:" + speed + "/分钟]");
            outputText.Text    = sb.ToString();
        }
        private static void Sb_OnBomberComplete(object sender, BomberResultEventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            if (e.BomberResult)
            {
                successcount++;
            }
            else
            {
                failcount++;
            }
            Console.ForegroundColor = colors[color];
            if (rgb)
            {
                color++;
            }
            if (color >= colors.Length)
            {
                color = 0;
            }
            sb.AppendLine(e.UsesUrl);
            sb.AppendLine(e.ReturnValue);
            TimeSpan usestime = DateTime.Now - last;
            int      speed    = (int)(((double)successcount) / (usestime.TotalMinutes));

            sb.AppendLine("=======================" + "成功:" + successcount + " 失败:" + failcount + " 平均速度:" + speed + "/分钟======================");

            if (null == OutputHandler)
            {
                lock (syncobj)
                {
                    Console.WriteLine(sb.ToString());
                }
            }
            else
            {
                OutputHandler.Invoke(syncobj, sb.ToString());
            }
        }
 private void Bomber_OnBomberComplete(object sender, BomberResultEventArgs e)
 {
     RunOnUiThread(() => onBomberResult(e));
 }
Ejemplo n.º 4
0
 private void Bomber_OnBomberComplete(object sender, BomberResultEventArgs e)
 {
     cnt++;
     Console.Title = cnt.ToString();
     BomberUtils.PrintResult(e.UsesUser, e.UsesPassword, e.ReturnValue);
 }