Beispiel #1
0
 public DownloadDashboard(NugetManagerParams p)
 {
     mNugetManager = new NugetManager(p);
     mNugetManager.ProgressChanged += new NugetManager.NugetProgressChangedHandler(HandleProgressChanged);
     //mNugetManager.WroteConsole += new NugetManager.WriteConsoleHandler(HandleWroteConsole);
     InitializeComponent();
 }
        private void btnDownload_Click(object sender, EventArgs e)
        {
            if (!ValidateAll())
            {
                return;
            }
            if (!ValidatePathExists(txtLocalNugetPath.Text))
            {
                if (!PromptCreatePath(txtLocalNugetPath.Text))
                {
                    return;
                }
            }
            if (!ValidatePathExists(txtStagingNugetPath.Text))
            {
                if (!PromptCreatePath(txtStagingNugetPath.Text))
                {
                    return;
                }
            }
            if (!ValidatePathExists(txtOutputReportPath.Text))
            {
                if (!PromptCreatePath(txtOutputReportPath.Text))
                {
                    return;
                }
            }

            NugetManagerParams p = new NugetManagerParams();

            p.localNugetPath   = ensureEndsWithSlash(txtLocalNugetPath.Text);
            p.stagingNugetPath = ensureEndsWithSlash(txtStagingNugetPath.Text);
            p.remoteNugetPath  = ensureEndsWithSlash(txtRemoteNugetPath.Text);
            p.outputReportPath = ensureEndsWithSlash(txtOutputReportPath.Text);

            p.framework        = txtFramework.Text;
            p.frameworkVersion = txtFrameworkVersion.Text;

            char[] split = { '\n' };
            Nuget  nuget;

            foreach (string sNuget in txtNugets.Text.Split(split, StringSplitOptions.RemoveEmptyEntries))
            {
                if (Nuget.TryParse(sNuget, out nuget))
                {
                    p.nugetsToDownload.Add(nuget);
                }
            }

            if (p.nugetsToDownload.Count <= 0)
            {
                MessageBox.Show("No nugets detected.");
                return;
            }

            DownloadDashboard form = new DownloadDashboard(p);

            form.Show();
        }
Beispiel #3
0
 public NugetManager(NugetManagerParams p)
 {
     mParams = p;
 }