Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 9th, 2012  |  syntax: C#  |  size: 1.22 KB  |  hits: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.                     _log.AppendLine("Detecting keyword...");
  2.  
  3.                     string response = ReadResponse(CreateSimpleRequest("999999.9"));
  4.                     string response2 = ReadResponse(CreateSimpleRequest("999999.9'"));
  5.                     bool found = false;
  6.  
  7.                     for (int i = 0; i < response.Length && !found; i++)
  8.                     {
  9.                         string sub = "";
  10.  
  11.                         for (int n = i; n < response.Length && !found; n++)
  12.                         {
  13.                             char c = response[n];
  14.  
  15.                             if (!char.IsLetterOrDigit(c) && !char.IsPunctuation(c) && !char.IsSeparator(c) && !char.IsSymbol(c))
  16.                             {
  17.                                 i += sub.Length;
  18.                                 break;
  19.                             }
  20.  
  21.                             sub += c;
  22.                             found = !response2.Contains(sub);
  23.                         }
  24.  
  25.                         if (found)
  26.                             _options.Keyword = sub;
  27.                     }
  28.  
  29.                     if (!found)
  30.                         _log.LastLine = "^FF0000Can not find keyword but let me do a try!";
  31.                 }