예제 #1
0
 public DownloadDashboard(NugetManagerParams p)
 {
     mNugetManager = new NugetManager(p);
     mNugetManager.ProgressChanged += new NugetManager.NugetProgressChangedHandler(HandleProgressChanged);
     //mNugetManager.WroteConsole += new NugetManager.WriteConsoleHandler(HandleWroteConsole);
     InitializeComponent();
 }
        public NugetDownloaderWorker(NugetManager pManager, int pId, BackgroundWorker worker)
        {
            mManager = pManager;
            mId      = pId;

            webClient = new WebClient();
            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgress);
            webClient.DownloadFileCompleted   += new AsyncCompletedEventHandler(DownloadCompleted);

            mWorker = worker;
            mWorker.WorkerReportsProgress      = true;
            mWorker.WorkerSupportsCancellation = true;
            mWorker.DoWork += new DoWorkEventHandler(ProcessUntilDone);
        }