private void DownloadOneTitle(string titleId, string version, int curr, int total) { titleId = titleId.ToUpper(); mLastDownSize = 0; string outputDir = Path.Combine(Environment.CurrentDirectory, "NusData"); WebClient nusWC = new TimeoutWebClient(60 * 1000); // Create\Configure NusClient mNusClient = new libWiiSharp.WiiuNusClient(titleId, version, outputDir); mNusClient.ConfigureNusClient(nusWC); mNusClient.UseLocalFiles = true; mNusClient.SetToWiiServer(); // Events mNusClient.Debug += nusClient_Debug; mNusClient.CurrProgress += NusClient_CurrProgress; mNusClient.TotalProgress += NusClient_TotalProgress; mNusClient.cancelDownload = false; ShowLog(""); ShowLog(string.Format(" Download [{0}/{1}] - TitleId:{2} Start...", curr + 1, total, titleId)); mNusClient.downloadTitle(); ShowLog(string.Format(" Download [{0}/{1}] - TitleId:{2} Finish...", curr + 1, total, titleId)); }
private void ExportOneTitle(string titleId, string version, int curr, int total) { titleId = titleId.ToUpper(); string outputDir = Path.Combine(Environment.CurrentDirectory, "NusExport"); WebClient nusWC = new TimeoutWebClient(60 * 1000); // Create\Configure NusClient mNusClient = new libWiiSharp.WiiuNusClient(titleId, version, outputDir); mNusClient.ConfigureNusClient(nusWC); mNusClient.UseLocalFiles = true; mNusClient.SetToWiiServer(); // Events mNusClient.Debug += nusClient_Debug; ShowLog(""); ShowLog(string.Format(" Export [{0}/{1}] - TitleId:{2} Start...", curr + 1, total, titleId)); mNusClient.exportTitle(); ShowLog(string.Format(" Export [{0}/{1}] - TitleId:{2} Finish...", curr + 1, total, titleId)); }