コード例 #1
0
    public void StartDownLoad(DownLoadFileInfo info)
    {
        if (IsDownLoading)
        {
            return;
        }
        Init();
        CurDownLoadFileInfo = info;
        Progress            = 0;
        IsDone        = false;
        IsDownLoading = true;
        string serverGameResPath = URLFactory.GetServerGameResPath(info);
        string localSavePath     = URLFactory.GetLocalGameResSavePath(info);

        if (File.Exists(localSavePath))
        {
            File.Delete(localSavePath);
        }
        _myWebClient.DownloadFileAsync(new Uri(serverGameResPath), localSavePath);
    }