Esempio n. 1
0
 /// <summary>
 /// 获取按时间下载的下载进度按钮按下处理
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnGetDownLoadPos2_Click(object sender, EventArgs e)
 {
     if (btnDownLoad2.Tag.ToString().Equals("下载中"))
     {
         int  dwTotal         = 0;
         int  dwSize          = 0;
         bool blnGetPosSucced = DHClient.DHGetDownloadPos(pDownloadHandleByTime, out dwTotal, out dwSize);
         if (blnGetPosSucced)
         {
             MessageUtil.ShowMsgBox(StringUtil.ConvertString("下载统计:") + "\n\t" +
                                    StringUtil.ConvertString("总长度:") +
                                    dwTotal.ToString() + "\n\t" + StringUtil.ConvertString("己下载:") + dwSize.ToString(),
                                    StringUtil.ConvertString(pMsgTitle));
         }
         else
         {
             MessageUtil.ShowMsgBox(StringUtil.ConvertString(DHClient.LastOperationInfo.errMessage, "ErrorMessage"),
                                    StringUtil.ConvertString(pMsgTitle));
         }
     }
     else
     {
         MessageUtil.ShowMsgBox(StringUtil.ConvertString("当前没有下载任务!"),
                                StringUtil.ConvertString(pMsgTitle));
     }
 }