<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      修復iReaper

            iReaper是下載WebCast的利器,可惜作者早已不再維護,相關更新地址也被關閉,現在使用,就會發現無法獲取課程列表.

            還好,這個軟件是開源軟件.使用者可以下載代碼自行維護,且課程列表是由微軟發布的,只要軟件設計合理,理論上存在恢復的可能.經過一段時間的研究,我終于成功修復,現將方法分享如下.

            1.從官方下載源碼并解壓.下載地址

       

            2.打開位于Client-1.2R2目錄下的解決方案后,取消源代碼管理,取消所有項目的數字簽名.此時編譯解決方法,應是能通過的.

       

            3.在iReaper.Download項目Initializer文件夾CheckInfoXMLTask文件CheckInfoXMLTask類內,增加如下方法

      private void ConditionalGetXml(DateTime LocalDate)
      { 
          string path = "http://www.microsoft.com/china/msdn/webcast/sdk/info.xml";
          //create HttpWebRequest
          request = (HttpWebRequest)WebRequest.Create(path);
          request.IfModifiedSince = LocalDate;
          request.Method = WebRequestMethods.Http.Get;
          //try to get response
          try
          {
              response = (HttpWebResponse)request.GetResponse();
          }
          catch (Exception e) //For some reason the HttpWebResponse class throws an exception on 3xx responses
          {
              WebException we = e as WebException;
              if ( we != null && we.Response != null)
              {
                  response = (HttpWebResponse)we.Response;
              }
              else
              {
                  throw;
              }
          }
          //if responseCode is 304,which means no need to update.
          if (response.StatusCode == HttpStatusCode.NotModified)//check if not modified
          {
              response.Close();
              this.resultObj = "NotModified";
              return;
          }
          //if means there is something mistake.
          else if (response.ContentLength == -1)
          {
              throw new ApplicationException(StringResources.ERROR_GetInfoXML + response.StatusDescription + "(" + response.StatusCode.ToString() + ")");
          }
          else if (response.ContentType == "text/xml") //the index.zip is updated since last time
          {
      
              File.Delete(InfoXmlPath);
      
              //set message
              this.InitManager.SetMessage(StringResources.BeginDownload + DataFileName);
              //get last modified date of 
              DateTime LastModified = response.LastModified;
              //get the network stream
              Stream netStream = response.GetResponseStream();
              //create the file local stream
              try
              {
                  fsStream = new FileStream(InfoXmlPath, FileMode.Create, FileAccess.ReadWrite, FileShare.None);
                  //set the creation time as minValue in case the download is interrputed.
      
                  //download
                  long length = response.ContentLength;
                  byte[] buffer = new byte[1024];
                  fsStream.SetLength(response.ContentLength);
                  int iRead = 0;
                  while (fsStream.Position < length)
                  {
                      iRead = netStream.Read(buffer, 0, 1024);
                      fsStream.Write(buffer, 0, iRead);
                      //set message
                      int percentage = (int)(fsStream.Position * 100 / length);
                      this.InitManager.SetMessage(StringResources.Downloading + percentage.ToString() + "%");
                  }
                  fsStream.Close();
              }
              catch
              {
                  //close the stream to set the last write time
                  fsStream.Close();
                  throw;
              }
              finally
              {
                  netStream.Close();
              }
      
              File.SetLastWriteTime(InfoXmlPath, LastModified);
              //set message
              this.resultObj = "Modified";
              // Extract this zip file to l
          }
      }

            將JobContent方法內的

      this.ConditionalGet(localDate);

            修改為

      this.ConditionalGetXml(localDate);

       

            4.iReaper項目Initializer文件夾WelcomePanel.cs文件WebcomePanel類InitTask方法內,注釋第37到第39行,即檢查新版本數據,如下

      //檢查新版本數據
      //task = new CheckNewVersionTask();
      //task.InitManager = this.initalizer1;
      //task.Invoke();

       

            5.iReaper.Download項目CourseData文件夾CourseXmlParser.cs文件CourseXmlParser類LoadXml方法內,注釋if語句內代碼,如下

      //工廠
      public static void LoadXml()
      {
          CourseXmlParser parser = new InfoXMLParser();
          parser.ParseCourseXml();
          if (OnCourseAddedFinished != null)
          {
              //OnCourseAddedFinished(parser, EventArgs.Empty);
          }
      }

       

            此時應能打開程序并成功加載課程了,但要想實現下載,則還需繼續修改

            6.AppServices項目Properties文件夾Settings.settings文件內,將DownloadBaseUrl值由

      http://www.daiyue.info/download.aspx

            修改為

      http://www.microsoft.com/china/msdn/webcast/download.aspx

       

            7.iReaper.Download項目Running文件夾CourseFileWorker.cs文件CourseFileWorker類onFinished方法,注釋第542行代碼,如下

      private void onFinished()
      {
          this.cData.LifetimeStatue = LifetimePosition.DownloadProcessed;
          this.cData.RunState = RunningStatue.Finished;
          //this.RegisterForCounter();
          if (OnFileDownloaded != null)
          {
              OnFileDownloaded(this.cData);
          }
      }

       

            OK,現在就請愉快的使用并下載吧.

            上面的修改,其實是禁用了軟件版本更新檢查,禁用了查詢并修改了下載地址.在實際使用中會發現課程列表不是最新的,這其實是微軟更新不及時導致的,與軟件無關.

            如果你需要下載最新的課程,推薦使用下面兩個網站.

            iReaper For Web

            WebCast

            最后吐槽兩句,現在微軟是不是不重視WebCast了,記得以前,特別是08年以前,每當微軟推出一個新技術或版本升級時,都會及時發布最新的課程進行推廣,比如.Net 3.0就有好幾個課程.怎么現在我最想知道的Asp.Net Mvc 4, .Net 4.0/4.5, C# 5.0, Wcf 4.0, Wwf 4.0, 異步編程等,一個合適的也沒有呢?

       

            參考

            Webcast的課程信息接口 為什么不更新了?

      posted @ 2013-05-13 10:05  永遠的阿哲  閱讀(971)  評論(1)    收藏  舉報
      主站蜘蛛池模板: 欧美牲交videossexeso欧美| 高淳县| 亚洲自拍偷拍福利小视频| 国产一区二区不卡91| 国产成人综合网亚洲第一| 中文字幕亚洲人妻系列| 国产午夜亚洲精品不卡网站| 欧洲国产成人久久精品综合| 国产精品无遮挡猛进猛出| 色偷偷亚洲女人天堂观看| 国产精品污www在线观看| 在线精品国精品国产尤物| 国产精品日日摸夜夜添夜夜添2021 | 两个人的视频www免费| 中国女人熟毛茸茸A毛片| 久久www免费人成看片中文| 亚洲精品日本久久一区二区三区| 人妻无码中文字幕| 蜜臀一区二区三区精品免费| 欧美老熟妇乱子伦牲交视频| 中文字幕乱码人妻综合二区三区| 日韩中文字幕国产精品| 中文字幕亚洲人妻系列| 最新国产精品好看的精品| 波多野结衣美乳人妻hd电影欧美| 日韩中文字幕有码午夜美女| 亚洲日本精品一区二区| 当涂县| 国产精品色三级在线观看| 中文亚洲成A人片在线观看| 无码AV无码免费一区二区| 久热色精品在线观看视频| 国产乱人对白| 亚洲不卡一区二区在线看| 欧洲中文字幕一区二区| 2020精品自拍视频曝光| 亚洲日韩精品一区二区三区无码| 精品亚洲精品日韩精品| 黄色特级片一区二区三区| 欧美精品一区二区三区中文字幕| 亚洲中文字幕在线无码一区二区|