public static void GrabberIp()
 {
     while (true)
     {
         Thread.Sleep(1000*20);
         using (_client = new WebClient())
         {
             var db = new DataProviderProxy();
             _client.Encoding = Encoding.UTF8;
             Dictionary<int, string> dbResault = db.GetSiteWithId();
             if (dbResault == null) continue;
             try
             {
                 string resault = _client.DownloadString(@"http://" + dbResault.Values.ElementAt(0));
                 _regex = new Regex(_patternIp);
                 _matchCol = _regex.Matches(resault);
                 foreach (Match match in _matchCol)
                 {
                     Console.WriteLine("найден ip: " + match.Groups[1].Value);
                     db.InsertIp(dbResault.Keys.ElementAt(0), match.Groups[1].Value);
                 }
             }
             catch
             {
                 Console.WriteLine("errorConnect 404");
             }
             finally
             {
                 db.UpdateDate(dbResault.Keys.ElementAt(0), DateTime.Now);
             }
         }
     }
 }
 public static void ReGrabber()
 {
     while (true)
     {
         Thread.Sleep(1000*60*60);
         var db = new DataProviderProxy();
         Dictionary<int, string> resault = db.GetOldSites();
         if (resault == null) continue;
         foreach (var item in resault)
         {
             db.UpdateDate(item.Key, null);
             db.UpdateStatus(item.Key.ToString(), StatusIp.Unchecked, "idSite");
         }
     }
 }