摘要:
step1: reconstruct the WebClient classpublicclassMyWebClient:WebClient{protectedoverrideWebRequestGetWebRequest(Uriaddress){HttpWebRequestrequest=base.GetWebRequest(address)asHttpWebRequest;request.Timeout=-1;request.CachePolicy=newSystem.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLe. 阅读全文
摘要:
steps:open the window code page, and find the construction function;add code like below:publicMainWindow(){InitializeComponent();//CreatetheCommandBinding.CommandBindingcmd=newCommandBinding();cmd.Command=ApplicationCommands.New;cmd.Executed+=newExecutedRoutedEventHandler(CommandBinding_CmdKey_Exec. 阅读全文