コード例 #1
0
ファイル: Form1.cs プロジェクト: laetemn/NUS_Downloader_Net
        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));
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: laetemn/NUS_Downloader_Net
        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));
        }