mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-10 02:02:30 +00:00
This commit is contained in:
parent
d2294b607e
commit
df3259810c
18 changed files with 85 additions and 411 deletions
|
|
@ -164,14 +164,14 @@ Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e
|
|||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.BuildPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\cosmos.vs.package.dll
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: string; ValueName: ThreadingModel; ValueData: Both
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.DebugOptionsPropertyPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.DebugPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: InprocServer32; ValueData: {sys}\MSCOREE.DLL
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.DebugOptionsPropertyPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.DebugPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\cosmos.vs.package.dll
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: ThreadingModel; ValueData: Both
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.VMOptionsPropertyPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.VMPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: InprocServer32; ValueData: {sys}\MSCOREE.DLL
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.VMOptionsPropertyPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.VMPage
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\cosmos.vs.package.dll
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: ThreadingModel; ValueData: Both
|
||||
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: ; ValueData: VSProjectFactory
|
||||
|
|
|
|||
|
|
@ -11,18 +11,16 @@ using Cosmos.Build.Common;
|
|||
using Microsoft.VisualStudio.Project;
|
||||
using Microsoft.VisualStudio;
|
||||
|
||||
namespace Cosmos.VS.Package
|
||||
{
|
||||
namespace Cosmos.VS.Package {
|
||||
[Guid(Guids.BuildPage)]
|
||||
public partial class BuildPage : ConfigurationBase
|
||||
{
|
||||
public partial class BuildPage : ConfigurationBase {
|
||||
public static TargetHost CurrentBuildTarget = (TargetHost)(-1);
|
||||
public static event EventHandler BuildTargetChanged;
|
||||
|
||||
protected static void OnBuildTargetChanged(Object sender, EventArgs e)
|
||||
{
|
||||
if (BuildPage.BuildTargetChanged != null)
|
||||
{ BuildPage.BuildTargetChanged(sender, e); }
|
||||
protected static void OnBuildTargetChanged(Object sender, EventArgs e) {
|
||||
if (BuildPage.BuildTargetChanged != null) {
|
||||
BuildPage.BuildTargetChanged(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
private BuildProperties projProperties;
|
||||
|
|
@ -31,12 +29,12 @@ namespace Cosmos.VS.Package
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.comboTarget.Items.AddRange(EnumValue.GetEnumValues(typeof(TargetHost)));
|
||||
this.comboFramework.Items.AddRange(EnumValue.GetEnumValues(typeof(Framework)));
|
||||
comboTarget.Items.AddRange(EnumValue.GetEnumValues(typeof(TargetHost)));
|
||||
comboFramework.Items.AddRange(EnumValue.GetEnumValues(typeof(Framework)));
|
||||
|
||||
this.projProperties = new BuildProperties();
|
||||
projProperties = new BuildProperties();
|
||||
|
||||
this.CreateUIMonitorEvents();
|
||||
CreateUIMonitorEvents();
|
||||
}
|
||||
|
||||
private void CreateUIMonitorEvents()
|
||||
|
|
@ -46,8 +44,8 @@ namespace Cosmos.VS.Package
|
|||
String value = this.textOutputPath.Text;
|
||||
if (String.Equals(value, this.PageProperties.OutputPath, StringComparison.InvariantCultureIgnoreCase) == false)
|
||||
{
|
||||
this.PageProperties.OutputPath = this.textOutputPath.Text;
|
||||
this.IsDirty = true;
|
||||
PageProperties.OutputPath = this.textOutputPath.Text;
|
||||
IsDirty = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -56,8 +54,8 @@ namespace Cosmos.VS.Package
|
|||
TargetHost value = (TargetHost)((EnumValue)this.comboTarget.SelectedItem).Value;
|
||||
if( value != this.PageProperties.Target)
|
||||
{
|
||||
this.PageProperties.Target = value;
|
||||
this.IsDirty = true;
|
||||
PageProperties.Target = value;
|
||||
IsDirty = true;
|
||||
|
||||
BuildPage.CurrentBuildTarget = value;
|
||||
BuildPage.OnBuildTargetChanged(this, EventArgs.Empty);
|
||||
|
|
@ -69,8 +67,8 @@ namespace Cosmos.VS.Package
|
|||
Framework value = (Framework)((EnumValue)this.comboFramework.SelectedItem).Value;
|
||||
if (value != this.PageProperties.Framework)
|
||||
{
|
||||
this.PageProperties.Framework = value;
|
||||
this.IsDirty = true;
|
||||
PageProperties.Framework = value;
|
||||
IsDirty = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -79,8 +77,8 @@ namespace Cosmos.VS.Package
|
|||
Boolean value = this.checkUseInternalAssembler.Checked;
|
||||
if (value != this.PageProperties.UseInternalAssembler)
|
||||
{
|
||||
this.PageProperties.UseInternalAssembler = value;
|
||||
this.IsDirty = true;
|
||||
PageProperties.UseInternalAssembler = value;
|
||||
IsDirty = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -95,31 +93,29 @@ namespace Cosmos.VS.Package
|
|||
{
|
||||
base.FillProperties();
|
||||
|
||||
this.PageProperties.Reset();
|
||||
PageProperties.Reset();
|
||||
PageProperties.SetProperty("OutputPath", this.GetConfigProperty("OutputPath"));
|
||||
PageProperties.SetProperty("BuildTarget", this.GetConfigProperty("BuildTarget"));
|
||||
PageProperties.SetProperty("Framework", this.GetConfigProperty("Framework"));
|
||||
PageProperties.SetProperty("UseInternalAssembler", this.GetConfigProperty("UseInternalAssembler"));
|
||||
|
||||
this.PageProperties.SetProperty("OutputPath", this.GetConfigProperty("OutputPath"));
|
||||
this.PageProperties.SetProperty("BuildTarget", this.GetConfigProperty("BuildTarget"));
|
||||
this.PageProperties.SetProperty("Framework", this.GetConfigProperty("Framework"));
|
||||
this.PageProperties.SetProperty("UseInternalAssembler", this.GetConfigProperty("UseInternalAssembler"));
|
||||
|
||||
this.textOutputPath.Text = this.PageProperties.OutputPath;
|
||||
this.comboTarget.SelectedItem = EnumValue.Find(this.comboTarget.Items, this.PageProperties.Target);
|
||||
this.comboFramework.SelectedItem = EnumValue.Find(this.comboFramework.Items, this.PageProperties.Framework);
|
||||
this.checkUseInternalAssembler.Checked = this.PageProperties.UseInternalAssembler;
|
||||
textOutputPath.Text = this.PageProperties.OutputPath;
|
||||
comboTarget.SelectedItem = EnumValue.Find(this.comboTarget.Items, this.PageProperties.Target);
|
||||
comboFramework.SelectedItem = EnumValue.Find(this.comboFramework.Items, this.PageProperties.Framework);
|
||||
checkUseInternalAssembler.Checked = this.PageProperties.UseInternalAssembler;
|
||||
}
|
||||
|
||||
private void OutputBrowse_Click(object sender, EventArgs e)
|
||||
{
|
||||
String folderPath = String.Empty;
|
||||
FolderBrowserDialog dialog;
|
||||
dialog = new FolderBrowserDialog();
|
||||
var dialog = new FolderBrowserDialog();
|
||||
dialog.ShowNewFolderButton = true;
|
||||
|
||||
folderPath = textOutputPath.Text;
|
||||
if ((String.IsNullOrEmpty(folderPath) == false) && (folderPath.IndexOfAny(System.IO.Path.GetInvalidPathChars()) == -1))
|
||||
{
|
||||
if (System.IO.Path.IsPathRooted(folderPath) == false)
|
||||
{ folderPath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(this.Project.FullName), folderPath); }
|
||||
if ((String.IsNullOrEmpty(folderPath) == false) && (folderPath.IndexOfAny(System.IO.Path.GetInvalidPathChars()) == -1)) {
|
||||
if (System.IO.Path.IsPathRooted(folderPath) == false) {
|
||||
folderPath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(this.Project.FullName), folderPath);
|
||||
}
|
||||
|
||||
while ((System.IO.Directory.Exists(folderPath) == false) && (String.IsNullOrEmpty(folderPath) == false))
|
||||
{
|
||||
|
|
@ -128,14 +124,16 @@ namespace Cosmos.VS.Package
|
|||
if (index > -1)
|
||||
{
|
||||
folderPath = folderPath.Substring(0, index - 1);
|
||||
} else { folderPath = String.Empty; }
|
||||
} else {
|
||||
folderPath = String.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(folderPath) == true)
|
||||
{ folderPath = System.IO.Path.GetDirectoryName(this.Project.FullName); }
|
||||
} else
|
||||
{
|
||||
folderPath = System.IO.Path.GetDirectoryName(this.Project.FullName);
|
||||
if (String.IsNullOrEmpty(folderPath) == true) {
|
||||
folderPath = System.IO.Path.GetDirectoryName(Project.FullName);
|
||||
}
|
||||
} else {
|
||||
folderPath = System.IO.Path.GetDirectoryName(Project.FullName);
|
||||
}
|
||||
|
||||
dialog.SelectedPath = folderPath;
|
||||
|
|
@ -146,20 +144,11 @@ namespace Cosmos.VS.Package
|
|||
}
|
||||
}
|
||||
|
||||
private void comboTarget_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var xEnumValue = (EnumValue)comboTarget.SelectedItem;
|
||||
var xValue = (TargetHost)xEnumValue.Value;
|
||||
if (!(xValue == TargetHost.VMWareWorkstation || xValue == TargetHost.QEMU))
|
||||
{
|
||||
MessageBox.Show("The selected Target is temporarily not supported!");
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
File.AppendAllText(@"e:\cosmoserrors.txt", "ERROR\r\n" + E.ToString() + "\r\n\r\n\r\n");
|
||||
private void comboTarget_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
var xEnumValue = (EnumValue)comboTarget.SelectedItem;
|
||||
var xValue = (TargetHost)xEnumValue.Value;
|
||||
if (!(xValue == TargetHost.VMWareWorkstation || xValue == TargetHost.QEMU)) {
|
||||
MessageBox.Show("This type is temporarily unsupported.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,18 +85,18 @@
|
|||
<Compile Include="CustomPropertyPage.Designer.cs">
|
||||
<DependentUpon>CustomPropertyPage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DebugOptionsPropertyPage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DebugOptionsPropertyPage.Designer.cs">
|
||||
<DependentUpon>DebugOptionsPropertyPage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DebugPage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DebugPage.Designer.cs">
|
||||
<DependentUpon>DebugPage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DebugPageSub.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DebugPageSub.Designer.cs">
|
||||
<DependentUpon>DebugPageSub.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Guids.cs" />
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="LogUtility.cs" />
|
||||
|
|
@ -118,17 +118,17 @@
|
|||
<Compile Include="UnsavedConfigChangesDialog.Designer.cs">
|
||||
<DependentUpon>UnsavedConfigChangesDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="VMOptionsPropertyPage.cs">
|
||||
<Compile Include="VMPage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VMOptionsPropertyPage.Designer.cs">
|
||||
<DependentUpon>VMOptionsPropertyPage.cs</DependentUpon>
|
||||
<Compile Include="VMPage.Designer.cs">
|
||||
<DependentUpon>VMPage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="VMOptionsQemu.cs">
|
||||
<Compile Include="VMPageQemu.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VMOptionsQemu.Designer.cs">
|
||||
<DependentUpon>VMOptionsQemu.cs</DependentUpon>
|
||||
<Compile Include="VMPageQemu.Designer.cs">
|
||||
<DependentUpon>VMPageQemu.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="VsConfigProvider.cs" />
|
||||
<Compile Include="VsProjectConfig.cs" />
|
||||
|
|
@ -157,12 +157,12 @@
|
|||
<EmbeddedResource Include="CustomPropertyPage.resx">
|
||||
<DependentUpon>CustomPropertyPage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DebugOptionsPropertyPage.resx">
|
||||
<DependentUpon>DebugOptionsPropertyPage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DebugPage.resx">
|
||||
<DependentUpon>DebugPage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DebugPageSub.resx">
|
||||
<DependentUpon>DebugPageSub.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\CosmosProjectNode.bmp" />
|
||||
<EmbeddedResource Include="SubPropertyPageBase.resx">
|
||||
<DependentUpon>SubPropertyPageBase.cs</DependentUpon>
|
||||
|
|
@ -173,11 +173,11 @@
|
|||
<EmbeddedResource Include="UnsavedConfigChangesDialog.resx">
|
||||
<DependentUpon>UnsavedConfigChangesDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="VMOptionsPropertyPage.resx">
|
||||
<DependentUpon>VMOptionsPropertyPage.cs</DependentUpon>
|
||||
<EmbeddedResource Include="VMPage.resx">
|
||||
<DependentUpon>VMPage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="VMOptionsQemu.resx">
|
||||
<DependentUpon>VMOptionsQemu.cs</DependentUpon>
|
||||
<EmbeddedResource Include="VMPageQemu.resx">
|
||||
<DependentUpon>VMPageQemu.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<ZipProject Include="Templates\Projects\CosmosProject\AssemblyInfo.cs" />
|
||||
<ZipProject Include="Templates\Projects\CosmosProject\CosmosProject.Cosmos" />
|
||||
|
|
|
|||
|
|
@ -1,69 +0,0 @@
|
|||
namespace Cosmos.VS.Package
|
||||
{
|
||||
partial class DebugOptionsPropertyPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.labelNoConfig = new System.Windows.Forms.Label();
|
||||
this.panelSubPage = new System.Windows.Forms.Panel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelNoConfig
|
||||
//
|
||||
this.labelNoConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelNoConfig.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||
this.labelNoConfig.Location = new System.Drawing.Point(0, 41);
|
||||
this.labelNoConfig.Name = "labelNoConfig";
|
||||
this.labelNoConfig.Size = new System.Drawing.Size(492, 16);
|
||||
this.labelNoConfig.TabIndex = 1;
|
||||
this.labelNoConfig.Text = "<no debug configuration avaliable for current build target>";
|
||||
this.labelNoConfig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelSubPage
|
||||
//
|
||||
this.panelSubPage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panelSubPage.AutoScroll = true;
|
||||
this.panelSubPage.Location = new System.Drawing.Point(0, 41);
|
||||
this.panelSubPage.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.panelSubPage.Name = "panelSubPage";
|
||||
this.panelSubPage.Size = new System.Drawing.Size(492, 247);
|
||||
this.panelSubPage.TabIndex = 3;
|
||||
this.panelSubPage.Visible = false;
|
||||
//
|
||||
// DebugOptionsPropertyPage
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.panelSubPage);
|
||||
this.Controls.Add(this.labelNoConfig);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 8.25F);
|
||||
this.Name = "DebugOptionsPropertyPage";
|
||||
this.Title = "Debug";
|
||||
this.Controls.SetChildIndex(this.labelNoConfig, 0);
|
||||
this.Controls.SetChildIndex(this.panelSubPage, 0);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label labelNoConfig;
|
||||
private System.Windows.Forms.Panel panelSubPage;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cosmos.Build.Common;
|
||||
|
||||
namespace Cosmos.VS.Package
|
||||
{
|
||||
[Guid(Guids.DebugPage)]
|
||||
public partial class DebugOptionsPropertyPage : ConfigurationBase
|
||||
{
|
||||
|
||||
private SubPropertyPageBase pageSubPage;
|
||||
|
||||
public DebugOptionsPropertyPage() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
BuildPage.BuildTargetChanged += new EventHandler(BuildOptionsPropertyPage_BuildTargetChanged);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
|
||||
BuildPage.BuildTargetChanged -= new EventHandler(BuildOptionsPropertyPage_BuildTargetChanged);
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
void BuildOptionsPropertyPage_BuildTargetChanged(object sender, EventArgs e)
|
||||
{ this.FillProperties(); }
|
||||
|
||||
private void ClearSubPage()
|
||||
{
|
||||
foreach (Control control in this.panelSubPage.Controls)
|
||||
{
|
||||
this.panelSubPage.Controls.Remove(control);
|
||||
control.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSubPropertyPage(TargetHost target)
|
||||
{
|
||||
Boolean subpageChanged = false;
|
||||
|
||||
switch (target)
|
||||
{
|
||||
case TargetHost.QEMU:
|
||||
if ((this.pageSubPage is DebugPage) == false)
|
||||
{
|
||||
subpageChanged = true;
|
||||
this.pageSubPage = new DebugPage();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
subpageChanged = true;
|
||||
this.pageSubPage = null;
|
||||
break;
|
||||
}
|
||||
|
||||
if( subpageChanged == true)
|
||||
{
|
||||
this.panelSubPage.SuspendLayout();
|
||||
|
||||
this.ClearSubPage();
|
||||
if (this.pageSubPage != null)
|
||||
{
|
||||
this.pageSubPage.SetOwner(this);
|
||||
this.panelSubPage.Controls.Add(pageSubPage);
|
||||
|
||||
this.pageSubPage.Location = new Point(0, 0);
|
||||
this.pageSubPage.Anchor = AnchorStyles.Top;
|
||||
|
||||
this.pageSubPage.Size = new Size(this.ClientSize.Width, this.pageSubPage.Size.Height);
|
||||
this.pageSubPage.Anchor = this.pageSubPage.Anchor | AnchorStyles.Left | AnchorStyles.Right;
|
||||
|
||||
if (this.pageSubPage.Size.Height <= this.ClientSize.Height)
|
||||
{
|
||||
this.pageSubPage.Size = new Size(this.pageSubPage.Size.Width, this.ClientSize.Height);
|
||||
this.pageSubPage.Anchor = this.pageSubPage.Anchor | AnchorStyles.Bottom;
|
||||
}
|
||||
|
||||
this.panelSubPage.Visible = true;
|
||||
} else {
|
||||
this.panelSubPage.Visible = false;
|
||||
}
|
||||
|
||||
this.panelSubPage.ResumeLayout();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected override void FillProperties()
|
||||
{
|
||||
base.FillProperties();
|
||||
|
||||
this.SetSubPropertyPage(BuildPage.CurrentBuildTarget);
|
||||
|
||||
if (this.pageSubPage != null)
|
||||
{ this.pageSubPage.FillProperties(); }
|
||||
}
|
||||
|
||||
public override PropertiesBase Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (pageSubPage != null)
|
||||
{ return pageSubPage.Properties; }
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
namespace Cosmos.VS.Package
|
||||
{
|
||||
partial class DebugPage
|
||||
partial class DebugPageSub
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
|
@ -10,11 +10,11 @@ using Cosmos.Build.Common;
|
|||
|
||||
namespace Cosmos.VS.Package
|
||||
{
|
||||
public partial class DebugPage : SubPropertyPageBase
|
||||
public partial class DebugPageSub : SubPropertyPageBase
|
||||
{
|
||||
private DebugQemuProperties projProperties;
|
||||
|
||||
public DebugPage()
|
||||
public DebugPageSub()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ namespace Cosmos.VS.Package {
|
|||
// or GUIDs you need to update the .iss as well.
|
||||
public const string BuildPage = "d33a2d29-c4fd-4e12-a510-4c01a14d63e1";
|
||||
public const string DebugPage = "39801176-289f-405f-9425-2931a2c03912";
|
||||
public const string VMOptionsPropertyPage = "3b72bb68-7363-45a2-9eba-55c8d5f36e36";
|
||||
public const string VMPage = "3b72bb68-7363-45a2-9eba-55c8d5f36e36";
|
||||
|
||||
public static readonly Guid guidProjectCmdSet = new Guid(guidProjectCmdSetString);
|
||||
public static readonly Guid guidProjectFactory = new Guid(guidProjectFactoryString);
|
||||
|
|
|
|||
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
namespace Cosmos.VS.Package
|
||||
{
|
||||
partial class VMOptionsPropertyPage
|
||||
partial class VMPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
|
@ -11,12 +11,12 @@ using Cosmos.Build.Common;
|
|||
|
||||
namespace Cosmos.VS.Package
|
||||
{
|
||||
[Guid(Guids.VMOptionsPropertyPage)]
|
||||
public partial class VMOptionsPropertyPage : ConfigurationBase
|
||||
[Guid(Guids.VMPage)]
|
||||
public partial class VMPage : ConfigurationBase
|
||||
{
|
||||
private SubPropertyPageBase pageSubPage;
|
||||
|
||||
public VMOptionsPropertyPage() {
|
||||
public VMPage() {
|
||||
InitializeComponent();
|
||||
BuildPage.BuildTargetChanged += new EventHandler(BuildOptionsPropertyPage_BuildTargetChanged);
|
||||
}
|
||||
|
|
@ -56,10 +56,10 @@ namespace Cosmos.VS.Package
|
|||
switch (target)
|
||||
{
|
||||
case TargetHost.QEMU:
|
||||
if ((this.pageSubPage is VMOptionsQemu) == false)
|
||||
if ((this.pageSubPage is VMPageQemu) == false)
|
||||
{
|
||||
subpageChanged = true;
|
||||
this.pageSubPage = new VMOptionsQemu();
|
||||
this.pageSubPage = new VMPageQemu();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
namespace Cosmos.VS.Package
|
||||
{
|
||||
partial class VMOptionsQemu
|
||||
partial class VMPageQemu
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
|
@ -11,11 +11,11 @@ using Cosmos.Build.Common;
|
|||
|
||||
namespace Cosmos.VS.Package
|
||||
{
|
||||
public partial class VMOptionsQemu : SubPropertyPageBase
|
||||
public partial class VMPageQemu : SubPropertyPageBase
|
||||
{
|
||||
private Cosmos.Build.Common.VMQemuProperties projProperties;
|
||||
|
||||
public VMOptionsQemu()
|
||||
public VMPageQemu()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
|
@ -50,8 +50,8 @@ namespace Cosmos.VS.Package {
|
|||
//[ProvideObject(typeof(PropPageEnvironment), RegisterUsing = RegistrationMethod.CodeBase)]
|
||||
//[ProvideObject(typeof(PropPageTest), RegisterUsing = RegistrationMethod.CodeBase)]
|
||||
[ProvideObject(typeof(BuildPage), RegisterUsing = RegistrationMethod.CodeBase)]
|
||||
[ProvideObject(typeof(DebugOptionsPropertyPage), RegisterUsing = RegistrationMethod.CodeBase)]
|
||||
[ProvideObject(typeof(VMOptionsPropertyPage), RegisterUsing = RegistrationMethod.CodeBase)]
|
||||
[ProvideObject(typeof(DebugPage), RegisterUsing = RegistrationMethod.CodeBase)]
|
||||
[ProvideObject(typeof(VMPage), RegisterUsing = RegistrationMethod.CodeBase)]
|
||||
[Guid(Guids.guidProjectPkgString)]
|
||||
public sealed class VSProject : ProjectPackage {
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ namespace Cosmos.VS.Package {
|
|||
// typeof(PropPageEnvironment).GUID,
|
||||
//typeof(PropPageTest).GUID,
|
||||
typeof(BuildPage).GUID,
|
||||
typeof(DebugOptionsPropertyPage).GUID,
|
||||
typeof(VMOptionsPropertyPage).GUID,
|
||||
typeof(DebugPage).GUID,
|
||||
typeof(VMPage).GUID,
|
||||
};
|
||||
}
|
||||
finally
|
||||
|
|
|
|||
Loading…
Reference in a new issue