コード例 #1
0
 private void ConnectToFile(Uri URL, string Filename, object token, bool trySimpler)
 {
     try
     {
         wsFile                = new WebClientCore();
         wsFile.KeepAlive      = false;
         wsFile.ErrorBypass    = true;
         wsFile.ManualRedirect = false;
         System.Threading.Timer tmrSocket = new System.Threading.Timer(new TimerCallback(DownloadFile), new object[] { URL, Filename, token, trySimpler }, 250, System.Threading.Timeout.Infinite);
         tmrSocket.GetType();
     }
     catch
     {
         c_callback.Invoke(Gdk.Pixbuf.LoadFromResource("RestrictionTrackerGTK.Resources.error.png"), Gdk.Pixbuf.LoadFromResource("RestrictionTrackerGTK.Resources.config.linux.advanced_nettest_error.png"), token, new Exception(" Failed to initialize connection to \"" + URL.OriginalString + "\"!"));
     }
 }