From fe58783b4f705fb4aedbb23f6cfcdfd1c352d202 Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Wed, 27 Jun 2012 15:44:25 +0000 Subject: [PATCH] --- .../Cosmos.Build.Common/BuildProperties.cs | 14 +++- source2/Build/Cosmos.Build.Common/Enums.cs | 20 ++++++ .../Cosmos.VS.Package/CosmosPage.Designer.cs | 68 +++++++++---------- source2/VSIP/Cosmos.VS.Package/CosmosPage.cs | 53 +++++++++++---- 4 files changed, 106 insertions(+), 49 deletions(-) diff --git a/source2/Build/Cosmos.Build.Common/BuildProperties.cs b/source2/Build/Cosmos.Build.Common/BuildProperties.cs index 6c58fbc9d..8a95ccd3c 100644 --- a/source2/Build/Cosmos.Build.Common/BuildProperties.cs +++ b/source2/Build/Cosmos.Build.Common/BuildProperties.cs @@ -6,12 +6,24 @@ using System.Text; namespace Cosmos.Build.Common { public class BuildProperties : PropertiesBase { - // Execute + // Profile public Profile Profile { get { return this.GetProperty("Profile", Profile.VMware); } set { this.SetProperty("Profile", value); } } + // Deployment + public Deployment Deployment { + get { return this.GetProperty("Deployment", Deployment.ISO); } + set { this.SetProperty("Deployment", value); } + } + + // Launch + public Launch Launch { + get { return this.GetProperty("Launch", Launch.VMware); } + set { this.SetProperty("Launch", value); } + } + // VMware public VMwareEdition VMwareEdition { get { return GetProperty("VMwareEdition", VMwareEdition.Player); } diff --git a/source2/Build/Cosmos.Build.Common/Enums.cs b/source2/Build/Cosmos.Build.Common/Enums.cs index d98b6539d..7883520c6 100644 --- a/source2/Build/Cosmos.Build.Common/Enums.cs +++ b/source2/Build/Cosmos.Build.Common/Enums.cs @@ -17,6 +17,26 @@ namespace Cosmos.Build.Common { PXE } + public enum Deployment { + [Description("ISO Image")] + ISO, + [Description("USB Device")] + USB, + [Description("PXE Network Boot")] + PXE + } + + public enum Launch { + [Description("None or Manual")] + None, + [Description("VMware")] + VMware, + [Description("PXE Server")] + PXE, + [Description("Specially attached slave")] + Slave + } + public enum VMwareEdition { Workstation, Player diff --git a/source2/VSIP/Cosmos.VS.Package/CosmosPage.Designer.cs b/source2/VSIP/Cosmos.VS.Package/CosmosPage.Designer.cs index 920bfa8ec..7a5060e28 100644 --- a/source2/VSIP/Cosmos.VS.Package/CosmosPage.Designer.cs +++ b/source2/VSIP/Cosmos.VS.Package/CosmosPage.Designer.cs @@ -37,10 +37,10 @@ this.lablDeployText = new System.Windows.Forms.Label(); this.lablBuildOnly = new System.Windows.Forms.Label(); this.lboxProfile = new System.Windows.Forms.ListBox(); - this.tabDeploy = new System.Windows.Forms.TabPage(); - this.lboxDeploy = new System.Windows.Forms.ListBox(); + this.tabDeployment = new System.Windows.Forms.TabPage(); + this.lboxDeployment = new System.Windows.Forms.ListBox(); this.tabLunch = new System.Windows.Forms.TabPage(); - this.listBox2 = new System.Windows.Forms.ListBox(); + this.lboxLaunch = new System.Windows.Forms.ListBox(); this.tabCompile = new System.Windows.Forms.TabPage(); this.comboFramework = new System.Windows.Forms.ComboBox(); this.buttonOutputBrowse = new System.Windows.Forms.Button(); @@ -77,7 +77,7 @@ this.panel1.SuspendLayout(); this.TabControl1.SuspendLayout(); this.tabProfile.SuspendLayout(); - this.tabDeploy.SuspendLayout(); + this.tabDeployment.SuspendLayout(); this.tabLunch.SuspendLayout(); this.tabCompile.SuspendLayout(); this.tabAssembler.SuspendLayout(); @@ -120,7 +120,7 @@ // TabControl1 // this.TabControl1.Controls.Add(this.tabProfile); - this.TabControl1.Controls.Add(this.tabDeploy); + this.TabControl1.Controls.Add(this.tabDeployment); this.TabControl1.Controls.Add(this.tabLunch); this.TabControl1.Controls.Add(this.tabCompile); this.TabControl1.Controls.Add(this.tabAssembler); @@ -192,29 +192,29 @@ this.lboxProfile.Sorted = true; this.lboxProfile.TabIndex = 2; // - // tabDeploy + // tabDeployment // - this.tabDeploy.Controls.Add(this.lboxDeploy); - this.tabDeploy.Location = new System.Drawing.Point(4, 22); - this.tabDeploy.Name = "tabDeploy"; - this.tabDeploy.Size = new System.Drawing.Size(627, 293); - this.tabDeploy.TabIndex = 11; - this.tabDeploy.Text = "Deploy"; - this.tabDeploy.UseVisualStyleBackColor = true; + this.tabDeployment.Controls.Add(this.lboxDeployment); + this.tabDeployment.Location = new System.Drawing.Point(4, 22); + this.tabDeployment.Name = "tabDeployment"; + this.tabDeployment.Size = new System.Drawing.Size(627, 293); + this.tabDeployment.TabIndex = 11; + this.tabDeployment.Text = "Deployment"; + this.tabDeployment.UseVisualStyleBackColor = true; // - // lboxDeploy + // lboxDeployment // - this.lboxDeploy.Dock = System.Windows.Forms.DockStyle.Left; - this.lboxDeploy.FormattingEnabled = true; - this.lboxDeploy.Location = new System.Drawing.Point(0, 0); - this.lboxDeploy.Name = "lboxDeploy"; - this.lboxDeploy.Size = new System.Drawing.Size(206, 293); - this.lboxDeploy.Sorted = true; - this.lboxDeploy.TabIndex = 3; + this.lboxDeployment.Dock = System.Windows.Forms.DockStyle.Left; + this.lboxDeployment.FormattingEnabled = true; + this.lboxDeployment.Location = new System.Drawing.Point(0, 0); + this.lboxDeployment.Name = "lboxDeployment"; + this.lboxDeployment.Size = new System.Drawing.Size(206, 293); + this.lboxDeployment.Sorted = true; + this.lboxDeployment.TabIndex = 3; // // tabLunch // - this.tabLunch.Controls.Add(this.listBox2); + this.tabLunch.Controls.Add(this.lboxLaunch); this.tabLunch.Location = new System.Drawing.Point(4, 22); this.tabLunch.Name = "tabLunch"; this.tabLunch.Size = new System.Drawing.Size(627, 293); @@ -222,15 +222,15 @@ this.tabLunch.Text = "Launch"; this.tabLunch.UseVisualStyleBackColor = true; // - // listBox2 + // lboxLaunch // - this.listBox2.Dock = System.Windows.Forms.DockStyle.Left; - this.listBox2.FormattingEnabled = true; - this.listBox2.Location = new System.Drawing.Point(0, 0); - this.listBox2.Name = "listBox2"; - this.listBox2.Size = new System.Drawing.Size(206, 336); - this.listBox2.Sorted = true; - this.listBox2.TabIndex = 3; + this.lboxLaunch.Dock = System.Windows.Forms.DockStyle.Left; + this.lboxLaunch.FormattingEnabled = true; + this.lboxLaunch.Location = new System.Drawing.Point(0, 0); + this.lboxLaunch.Name = "lboxLaunch"; + this.lboxLaunch.Size = new System.Drawing.Size(206, 293); + this.lboxLaunch.Sorted = true; + this.lboxLaunch.TabIndex = 3; // // tabCompile // @@ -619,7 +619,7 @@ this.TabControl1.ResumeLayout(false); this.tabProfile.ResumeLayout(false); this.tabProfile.PerformLayout(); - this.tabDeploy.ResumeLayout(false); + this.tabDeployment.ResumeLayout(false); this.tabLunch.ResumeLayout(false); this.tabCompile.ResumeLayout(false); this.tabCompile.PerformLayout(); @@ -649,10 +649,10 @@ private System.Windows.Forms.Label lablDeployText; private System.Windows.Forms.Label lablBuildOnly; private System.Windows.Forms.ListBox lboxProfile; - private System.Windows.Forms.TabPage tabDeploy; - private System.Windows.Forms.ListBox lboxDeploy; + private System.Windows.Forms.TabPage tabDeployment; + private System.Windows.Forms.ListBox lboxDeployment; private System.Windows.Forms.TabPage tabLunch; - private System.Windows.Forms.ListBox listBox2; + private System.Windows.Forms.ListBox lboxLaunch; private System.Windows.Forms.TabPage tabCompile; private System.Windows.Forms.ComboBox comboFramework; private System.Windows.Forms.Button buttonOutputBrowse; diff --git a/source2/VSIP/Cosmos.VS.Package/CosmosPage.cs b/source2/VSIP/Cosmos.VS.Package/CosmosPage.cs index 40ac93754..69feede3d 100644 --- a/source2/VSIP/Cosmos.VS.Package/CosmosPage.cs +++ b/source2/VSIP/Cosmos.VS.Package/CosmosPage.cs @@ -116,13 +116,40 @@ namespace Cosmos.VS.Package { public CosmosPage() { InitializeComponent(); - textOutputPath.TextChanged += delegate(Object sender, EventArgs e) { - string value = textOutputPath.Text; - if (!string.Equals(value, mProps.OutputPath, StringComparison.InvariantCultureIgnoreCase)) { - mProps.OutputPath = textOutputPath.Text; + # region Profile + lboxProfile.Items.AddRange(EnumValue.GetEnumValues(typeof(Profile), true)); + lboxProfile.SelectedIndexChanged += delegate(Object sender, EventArgs e) { + var xValue = (Profile)((EnumValue)lboxProfile.SelectedItem).Value; + if (xValue != mProps.Profile) { + mProps.Profile = xValue; + IsDirty = true; + UpdateUI(); + } + }; + #endregion + + # region Deploy + lboxDeployment.Items.AddRange(EnumValue.GetEnumValues(typeof(Deployment), true)); + lboxDeployment.SelectedIndexChanged += delegate(Object sender, EventArgs e) { + var xValue = (Deployment)((EnumValue)lboxDeployment.SelectedItem).Value; + if (xValue != mProps.Deployment) { + mProps.Deployment = xValue; IsDirty = true; } }; + #endregion + + # region Launch + lboxLaunch.Items.AddRange(EnumValue.GetEnumValues(typeof(Launch), true)); + lboxLaunch.SelectedIndexChanged += delegate(Object sender, EventArgs e) { + var xValue = (Launch)((EnumValue)lboxLaunch.SelectedItem).Value; + if (xValue != mProps.Launch) { + mProps.Launch = xValue; + IsDirty = true; + } + }; + #endregion + comboFramework.Items.AddRange(EnumValue.GetEnumValues(typeof(Framework), true)); comboFramework.SelectedIndexChanged += delegate(Object sender, EventArgs e) { var value = (Framework)((EnumValue)comboFramework.SelectedItem).Value; @@ -132,6 +159,14 @@ namespace Cosmos.VS.Package { } }; + textOutputPath.TextChanged += delegate(Object sender, EventArgs e) { + string value = textOutputPath.Text; + if (!string.Equals(value, mProps.OutputPath, StringComparison.InvariantCultureIgnoreCase)) { + mProps.OutputPath = textOutputPath.Text; + IsDirty = true; + } + }; + checkUseInternalAssembler.CheckedChanged += delegate(Object sender, EventArgs e) { bool value = checkUseInternalAssembler.Checked; if (value != mProps.UseInternalAssembler) { @@ -141,16 +176,6 @@ namespace Cosmos.VS.Package { }; - lboxProfile.Items.AddRange(EnumValue.GetEnumValues(typeof(Profile), true)); - lboxProfile.SelectedIndexChanged += delegate(Object sender, EventArgs e) { - var value = (Profile)((EnumValue)lboxProfile.SelectedItem).Value; - if (value != mProps.Profile) { - mProps.Profile = value; - IsDirty = true; - UpdateUI(); - } - }; - #region VMware cmboVMwareEdition.Items.AddRange(EnumValue.GetEnumValues(typeof(VMwareEdition), true)); cmboVMwareEdition.SelectedIndexChanged += delegate(Object sender, EventArgs e) {