Beispiel #1
0
        private void BtnBuild_Click(object sender, EventArgs e)
        {
            var spec = new NuSpec();

            spec.Id          = txtId.Text;
            spec.Author      = txtId.Text;
            spec.Description = txtDescription.Text;
            spec.Tags        = txtTags.Text;
            spec.Relnotes    = txtRelNotes.Text;
            spec.Version     = txtVersion.Text;
            spec.Title       = txtTitle.Text;
            spec.Description = txtDescription.Text;
            spec.Debug64     = chkDebug64.Checked;
            spec.Debug32     = chkDebug32.Checked;
            spec.Release64   = chkRelease64.Checked;
            spec.Releas32    = chkRelease32.Checked;

            for (int i = 0; i < headerFiles.Items.Count; i++)
            {
                if (headerFiles.GetItemChecked(i))
                {
                    spec.Files.Add((FileElement)headerFiles.Items[i]);
                }
            }

            for (int i = 0; i < chkDirs.Items.Count; i++)
            {
                if (!chkDirs.GetItemChecked(i))
                {
                    spec.DirsToRemove.Add(chkDirs.Items[i].ToString());
                }
            }

            controller.BuildPackage(spec);
        }
Beispiel #2
0
        public void Fill(NuSpec spec)
        {
            txtId.Text          = spec.Id;
            txtTitle.Text       = spec.Title;
            txtTags.Text        = spec.Tags;
            txtVersion.Text     = spec.Version;
            txtRelNotes.Text    = spec.Relnotes;
            txtAuthor.Text      = spec.Author;
            txtDescription.Text = spec.Description;

            chkDebug32.CheckedChanged   -= CheckedChanged;
            chkDebug64.CheckedChanged   -= CheckedChanged;
            chkRelease32.CheckedChanged -= CheckedChanged;
            chkRelease64.CheckedChanged -= CheckedChanged;

            chkDebug32.Checked   = spec.Debug32;
            chkDebug64.Checked   = spec.Debug64;
            chkRelease32.Checked = spec.Releas32;
            chkRelease64.Checked = spec.Release64;

            chkDebug32.CheckedChanged   += CheckedChanged;
            chkDebug64.CheckedChanged   += CheckedChanged;
            chkRelease32.CheckedChanged += CheckedChanged;
            chkRelease64.CheckedChanged += CheckedChanged;
        }
Beispiel #3
0
 public void BuildPackage(NuSpec spec)
 {
     if (model.BuildPackage(spec))
     {
         view.ShowMsgBox("Success");
     }
     else
     {
         view.ShowMsgBox("Failed");
     }
 }