Пример #1
0
 public override void Reset()
 {
     Id                 = 0;
     fileUrl            = "";
     filePath           = "";
     fileType           = DownloadFileType.None;
     onScriptDownloaded = null;
     isSaved            = false;
 }
Пример #2
0
    public void Download(string url, string targetPath, DownloadFileType fileType,
                         OnScriptDownloadFinishedEvent downloadedEvent = null, bool isSaved = false)
    {
        var file = new DownloadFileRequest();

        file.Id                 = DateTime.Now.Millisecond;
        file.fileUrl            = url;
        file.filePath           = targetPath;
        file.fileType           = fileType;
        file.onScriptDownloaded = downloadedEvent;
        file.isSaved            = isSaved;
        _downloadFileList.Add(file);

        StartDownloadFile();
    }
Пример #3
0
    public void Download(string url, string targetPath, DownloadFileType fileType,
                         OnScriptDownloadFinishedEvent downloadedEvent = null, bool isSaved = false)
    {
        var file = PoolManager.GetInstance().Get <DownloadFileRequest>("DownloadFileRequest");

        file.Id                 = System.DateTime.Now.Millisecond;
        file.fileUrl            = url;
        file.filePath           = targetPath;
        file.fileType           = fileType;
        file.onScriptDownloaded = downloadedEvent;
        file.isSaved            = isSaved;
        _downloadFileList.Add(file);

        StartDownloadFile();
    }