Пример #1
0
 public void Execute(object parameter)
 {
     FtpHelper ftp = new FtpHelper();
     bool ok = ftp.httpRequest("GET", "", PackageSubVM.Instance.requestResult) == "True";
     if (!ok)
     {
         PackageSubVM.Instance.CheckFlushTimer = new System.Timers.Timer();
         PackageSubVM.Instance.CheckFlushTimer.Elapsed += new System.Timers.ElapsedEventHandler(dt_Tick);
         PackageSubVM.Instance.CheckFlushTimer.Interval = 20000;
         PackageSubVM.Instance.CheckFlushTimer.Enabled = true;
     }
     else
     {
         MessageBox.Show("刷新成功!");
     }
 }
Пример #2
0
 public void Execute(object parameter)
 {
     if (true || PackageSubVM.Instance.FlushCDNUrl != "")
     {
         FtpHelper ftp = new FtpHelper();
         PackageSubVM.Instance.requestResult = ftp.httpRequest("POST", PackageSubVM.Instance.FlushCDNUrl, "");
         //ftp.TencentCDNRequest("asldkfj");
     }
     else
     {
         string url = "http://push.dnion.com/cdnUrlPush.do?captcha=436bd644&type=0&url=http://shenqu.cdn.feiliu.com/update/";
         System.Diagnostics.Process.Start(url);
     }
 }
Пример #3
0
 public static void dt_Tick(object sender, EventArgs e)
 {
     // check flush
     FtpHelper ftp = new FtpHelper();
     bool ok = ftp.httpRequest("GET", "", PackageSubVM.Instance.requestResult) == "True";
     if (ok)
     {
         PackageSubVM.Instance.CheckFlushTimer.Dispose();
         MessageBox.Show("刷新成功!");
     }
 }