Beispiel #1
0
 public void Add(myCookies _myCookies)
 {
   if (Information.IsNothing((object) _myCookies))
     return;
   try
   {
     int num1 = 0;
     int num2 = checked (_myCookies.Count - 1);
     int index = num1;
     while (index <= num2)
     {
       string str1 = _myCookies.Values.Cast<object>().ElementAtOrDefault<object>(index).ToString();
       if (str1.Length > 0)
       {
         this.Add(_myCookies.Keys.Cast<object>().ElementAtOrDefault<object>(index).ToString(), str1);
       }
       else
       {
         string str2 = _myCookies.Keys.Cast<object>().ElementAtOrDefault<object>(index).ToString();
         if (this.ContainsKey((object) str2))
           this.Remove((object) str2);
       }
       checked { ++index; }
     }
   }
   catch (Exception ex)
   {
     ProjectData.SetProjectError(ex);
     Exception exception = ex;
     _FUNCTION.clsTXT fn = _FUNCTION.FN;
     string sText = "Ex myCookies.Add: " + exception.Message;
     fn.TXT(ref sText);
     ProjectData.ClearProjectError();
   }
 }
 private static void NextStep_HttpLoadProxy()
 {
     checked { ++md_HttpLoadProxy.HttpLoadProxy_Step; }
     if (md_HttpLoadProxy.HttpLoadProxy_Step > Information.UBound((Array)md_HttpLoadProxy.HttpLoadProxy.VALUE, 1))
     {
         string StrBuffer = md_HttpLoadProxy.SB_HttpLoadProxy.ToString().Replace("\r", "");
         md_HttpLoadProxy.SB_HttpLoadProxy = (StringBuilder)null;
         if (md_HttpLoadProxy.HttpLoadProxy.RegEx_Use)
         {
             MatchCollection matchCollection = new Regex(md_HttpLoadProxy.HttpLoadProxy.RegEx_Text).Matches(StrBuffer);
             int             count           = matchCollection.Count;
             string[]        SourceArray     = new string[checked (count - 1 + 1)];
             int             num1            = 0;
             int             num2            = checked (count - 1);
             int             index           = num1;
             while (index <= num2)
             {
                 SourceArray[index] = matchCollection[index].Value;
                 checked { ++index; }
             }
             StrBuffer = "\n" + Strings.Join(SourceArray, "\n");
         }
         string str;
         if (md_HttpLoadProxy.HttpLoadProxy.Append)
         {
             str = Application.StartupPath + "\\data\\proxy.txt";
             _LOADSAVE.FileAppend(ref str, ref StrBuffer);
         }
         else
         {
             str = Application.StartupPath + "\\data\\proxy.txt";
             _LOADSAVE.FileSave(ref str, ref StrBuffer);
         }
         StrBuffer = (string)null;
         _LOADSAVE.LoadProxy();
         MyProject.Forms.frmOptions.lblHttpLoadProxy_Count.Text = Conversions.ToString(Information.UBound((Array)_VARIABLES.Proxy, 1));
         if (!md_HttpLoadProxy.HttpLoadProxy.LoadRequired)
         {
             return;
         }
         md_HttpLoadProxy.HttpLoadProxy.LoadRequired = false;
         if (md_HttpLoadProxy.HttpLoadProxy.AfterLoadStartOne)
         {
             _FUNCTION.AccountSelect(1);
             _FUNCTION.clsTXT fn = _FUNCTION.FN;
             str = "Согласно настройкам, выбираю первый аккаунт.";
             fn.TXT(ref str);
         }
         if (md_HttpLoadProxy.HttpLoadProxy.Append)
         {
             _FUNCTION.clsTXT fn = _FUNCTION.FN;
             str = "Согласно настройкам, продолжаю проверку proxy с " + Conversions.ToString(checked (mdConnect.ProxCNT + 1));
             fn.TXT(ref str);
         }
         else
         {
             mdConnect.ProxCNT = 0;
             _FUNCTION.clsTXT fn = _FUNCTION.FN;
             str = "Согласно настройкам, начинаю проверку proxy с первой.";
             fn.TXT(ref str);
         }
         MyProject.Forms.frmMain.btmStart_Click((object)null, (EventArgs)null);
     }
     else
     {
         SocketNET wsHttpLoadProxy = md_HttpLoadProxy.WS_HttpLoadProxy;
         string    set_URL         = _FUNCTION.UrlEncode(ref md_HttpLoadProxy.HttpLoadProxy.VALUE[md_HttpLoadProxy.HttpLoadProxy_Step].URL);
         myCookies set_Cookies     = (myCookies)null;
         string    set_Referer     = (string)null;
         string    set_PostData    = (string)null;
         // ISSUE: variable of the null type
         __Null local               = null;
         short  set_UseBrowser      = 0;
         string set_X_Forwarded_For = (string)null;
         string set_ContentType     = (string)null;
         object set_Accept_Charset  = (object)1251;
         string set_Headers_Add     = (string)null;
         wsHttpLoadProxy.Connect(ref set_URL, ref set_Cookies, ref set_Referer, ref set_PostData, (myProxy)local, ref set_UseBrowser, ref set_X_Forwarded_For, ref set_ContentType, ref set_Accept_Charset, ref set_Headers_Add);
     }
 }