public bool WorkerInit() { netSettings = new NetSettings(CommonFunctions.SettingsPath + CommonFunctions.NetSettingsFile); Settings = new appSettings(CommonFunctions.SettingsPath + CommonFunctions.AppSettingsFile); if (netSettings.LoadConfig() != NetConfigStatus.OK) { StatusChange(WorkerStatus.FatalError, netSettings.ConfigError); return(false); } if (!Settings.LoadConfig()) { StatusChange(WorkerStatus.FatalError, Settings.ConfigError); return(false); } ClearTemp(); try { Directory.CreateDirectory(Unpdir); } catch (Exception ex) { StatusChange(WorkerStatus.FatalError, ex.Message); return(false); } Downloader = new SendRequest(Settings.PageAddr, Workdir + HTMLPage); Downloader.ConnectionTimeout = netSettings.ConnectionTimeout; Downloader.ConnectionType = netSettings.ConnectionType; Downloader.ProxyAddress = netSettings.ProxyAddress; Downloader.ProxyPassword = netSettings.ProxyPassword; Downloader.ProxyPort = netSettings.ProxyPort; Downloader.ProxyUser = netSettings.ProxyUser; return(true); }
private void btnSystemProxy_Click(object sender, EventArgs e) { NetSettings.ShowSystemProxyWindow(); }