日期:2014-05-17 浏览次数:20965 次
/// <summary>
/// 清空ie代理
/// </summary>
/// <returns></returns>
public bool SetCleanIEPoxy()
{
try
{
//打开注册表键
Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
//设置代理不可用
rk.SetValue("ProxyEnable", 0);
rk.Close();
return true;
}
catch { return false; }
}
/// <summary>
/// 设置ie代理
/// </summary>
/// <returns></returns>
public bool SetIEPoxy()
{
try
{
string TempPoxy = "";
int Tmi = 0;
cs:
try
{
if (!MainForm.NowRead)
TempPoxy = MainForm.ProxyList[Rd.Next(ProxyIndex)].Trim();
else
TempPoxy =