06 2013 档案
摘要:C# 用Mutex或进程限制一台电脑上同时打开多个实例
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Diagnostics;namespace CmdCallbackShow{ // 1.定义委托 public delegate void DelReadStdOutput(string result); public d
阅读全文
摘要:private void button4_Click(object sender, EventArgs e) { int marktime = 0; MyMethod my = method; IAsyncResult asyncResult = my.BeginInvoke(MethodCompleted, my); while (!asyncResult.IsCompleted && marktime < 4) { marktime +=...
阅读全文
摘要:Public Sub DeownloadFile(ByVal networkfile As String, ByVal locationFileName As String, ByVal PaperDownloadLog As String, ByVal strReferer As String) For index = 1 To 3 '如获取不了重试3次 Dim task As NewTaskDelegate = AddressOf TrytoDownloadFile Dim asyncResult As IAsyncResult = task.BeginInvoke(network
阅读全文
摘要:代理通过http取这个资源的时候,要在在request Header上加入一个被允许的 Referere,一般是那个网站的host判断浏览器请求时HTTP头的Referer字段的值,这个值在asp.net里面可以用 Request.UrlReferrer属性取得Dim myHttpWebRequest As HttpWebRequest = DirectCast(WebRequest.Create(BaseUrl & PDFLinks(i)), HttpWebRequest) myHttpWebRequest.ContentType = "text/html" my
阅读全文