From 8a4bccee9ddb58fdd6b2ad3ff07cd7b7ca6229b2 Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Sat, 30 Jun 2012 16:04:19 +0000 Subject: [PATCH] --- source2/VSIP/Cosmos.VS.Package/CosmosPage.cs | 36 +++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/source2/VSIP/Cosmos.VS.Package/CosmosPage.cs b/source2/VSIP/Cosmos.VS.Package/CosmosPage.cs index 6e8a932cd..1c1a56f26 100644 --- a/source2/VSIP/Cosmos.VS.Package/CosmosPage.cs +++ b/source2/VSIP/Cosmos.VS.Package/CosmosPage.cs @@ -95,38 +95,32 @@ namespace Cosmos.VS.Package { } } - protected void UpdateUI() { - var xProfile = (ProfileItem)lboxProfile.SelectedItem; - + protected void UpdatePresetsUI() { chckEnableDebugStub.Checked = false; cmboCosmosPort.Enabled = true; cmboVisusalStudioPort.Enabled = true; - // Set visibilty and for preset set/reset values. if (mProps.Profile == "ISO") { - mProps.Deployment = Deployment.ISO; - mProps.Launch = Launch.None; } else if (mProps.Profile == "USB") { mShowTabUSB = true; - mProps.Deployment = Deployment.USB; - mProps.Launch = Launch.PXE; } else if (mProps.Profile == "VMware") { mShowTabVMware = true; chckEnableDebugStub.Checked = true; cmboCosmosPort.Enabled = false; cmboVisusalStudioPort.Enabled = false; - mProps.Deployment = Deployment.ISO; - mProps.Launch = Launch.VMware; } else if (mProps.Profile == "PXE") { - mProps.Deployment = Deployment.PXE; - mProps.Launch = Launch.None; } else { lablDeployText.Text = "Oops. What the frak did you click?"; } + } + + protected void UpdateUI() { + UpdatePresetsUI(); + var xProfile = (ProfileItem)lboxProfile.SelectedItem; lablCurrentProfile.Text = xProfile.ToString(); lablDeployText.Text = xProfile.Description; @@ -351,6 +345,24 @@ namespace Cosmos.VS.Package { foreach (var xName in BuildProperties.PropNames) { mProps.SetProperty(xName, GetConfigProperty(aName + "_" + xName)); } + + // Reforce fixed settings for presets on each load. + if (mProps.Profile == "ISO") { + mProps.Deployment = Deployment.ISO; + mProps.Launch = Launch.None; + + } else if (mProps.Profile == "USB") { + mProps.Deployment = Deployment.USB; + mProps.Launch = Launch.PXE; + + } else if (mProps.Profile == "VMware") { + mProps.Deployment = Deployment.ISO; + mProps.Launch = Launch.VMware; + + } else if (mProps.Profile == "PXE") { + mProps.Deployment = Deployment.PXE; + mProps.Launch = Launch.None; + } } protected override void FillProperties() {