コード例 #1
0
ファイル: CosmosPage.cs プロジェクト: nathansoz/Cosmos
        protected void UpdateUI()
        {
            UpdatePresetsUI();
            var xProfile = (ProfileItem)lboxProfile.SelectedItem;

            if (xProfile == null)
            {
                return;
            }

            if (mShowTabDebug == false)
            {
                chckEnableDebugStub.Checked = false;
            }

            lablCurrentProfile.Text     = xProfile.Name;
            lablDeployText.Text         = mProps.Description;
            lboxDeployment.SelectedItem = mProps.Deployment;

            // Launch
            lboxLaunch.SelectedItem = mProps.Launch;

            lablBuildOnly.Visible = mProps.Launch == LaunchType.None;

            lboxDeployment.SelectedItem                     = EnumValue.Find(lboxDeployment.Items, mProps.Deployment);
            lboxLaunch.SelectedItem                         = EnumValue.Find(lboxLaunch.Items, mProps.Launch);
            cmboVMwareEdition.SelectedItem                  = EnumValue.Find(cmboVMwareEdition.Items, mProps.VMwareEdition);
            chckEnableDebugStub.Checked                     = mProps.DebugEnabled;
            chkEnableStackCorruptionDetection.Checked       = mProps.StackCorruptionDetectionEnabled;
            comboStackCorruptionDetectionLevel.SelectedItem = EnumValue.Find(comboStackCorruptionDetectionLevel.Items, mProps.StackCorruptionDetectionLevel);

            panlDebugSettings.Enabled         = mProps.DebugEnabled;
            cmboCosmosDebugPort.SelectedIndex = cmboCosmosDebugPort.Items.IndexOf(mProps.CosmosDebugPort);
            if (!String.IsNullOrWhiteSpace(mProps.VisualStudioDebugPort))
            {
                cmboVisualStudioDebugPort.SelectedIndex =
                    cmboVisualStudioDebugPort.Items.IndexOf(mProps.VisualStudioDebugPort);
            }
            textOutputPath.Text               = mProps.OutputPath;
            comboFramework.SelectedItem       = EnumValue.Find(comboFramework.Items, mProps.Framework);
            comboBinFormat.SelectedItem       = EnumValue.Find(comboBinFormat.Items, mProps.BinFormat);
            checkUseInternalAssembler.Checked = mProps.UseInternalAssembler;
            checkEnableGDB.Checked            = mProps.EnableGDB;
            checkStartCosmosGDB.Checked       = mProps.StartCosmosGDB;
            checkEnableBochsDebug.Checked     = mProps.EnableBochsDebug;
            checkStartBochsDebugGui.Checked   = mProps.StartBochsDebugGui;
            // Locked to COM1 for now.
            //cmboCosmosDebugPort.SelectedIndex = 0;

            #region Slave

            cmboSlavePort.SelectedIndex = cmboSlavePort.Items.IndexOf(mProps.SlavePort);

            #endregion

            checkIgnoreDebugStubAttribute.Checked = mProps.IgnoreDebugStubAttribute;
            comboDebugMode.SelectedItem           = EnumValue.Find(comboDebugMode.Items, mProps.DebugMode);
            comboTraceMode.SelectedItem           = EnumValue.Find(comboTraceMode.Items, mProps.TraceAssemblies);

            lablPreset.Visible = xProfile.IsPreset;

            mShowTabDeployment = !xProfile.IsPreset;
            mShowTabLaunch     = !xProfile.IsPreset;
            //
            mShowTabISO = mProps.Deployment == DeploymentType.ISO;
            mShowTabUSB = mProps.Deployment == DeploymentType.USB;
            mShowTabPXE = mProps.Deployment == DeploymentType.PXE;
            //
            mShowTabVMware = mProps.Launch == LaunchType.VMware;
            mShowTabHyperV = mProps.Launch == LaunchType.HyperV;
            mShowTabSlave  = mProps.Launch == LaunchType.Slave;
            mShowTabBochs  = (LaunchType.Bochs == mProps.Launch);
            //
            UpdateTabs();
        }