Visual Designer:

* foreach iterations are halted once a object has been added to the designer.
This commit is contained in:
Scionwest_cp 2009-11-21 10:21:27 -08:00
parent 89e01e75e1
commit c6c2e4dc9c
4 changed files with 241 additions and 179 deletions

View file

@ -44,6 +44,7 @@ namespace MudDesigner
legalApps.Add(app); legalApps.Add(app);
} }
} }
string filename = ""; string filename = "";
foreach (string app in legalApps) foreach (string app in legalApps)
{ {
@ -53,10 +54,12 @@ namespace MudDesigner
break; break;
} }
} }
info.FileName = filename; info.FileName = filename;
#else #else
info.FileName = appName; info.FileName = appName;
#endif #endif
info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
info.WorkingDirectory = Application.StartupPath; info.WorkingDirectory = Application.StartupPath;

View file

@ -47,6 +47,12 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="RoomDesigner.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="RoomDesigner.Designer.cs">
<DependentUpon>RoomDesigner.cs</DependentUpon>
</Compile>
<Compile Include="VisualContainer.cs"> <Compile Include="VisualContainer.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
@ -56,11 +62,21 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="RoomDesigner.resx">
<DependentUpon>RoomDesigner.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="VisualContainer.resx"> <EmbeddedResource Include="VisualContainer.resx">
<DependentUpon>VisualContainer.cs</DependentUpon> <DependentUpon>VisualContainer.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MUDEngine\MUDEngine.csproj">
<Project>{33828B3B-F227-4726-8FCD-3D9D780E643D}</Project>
<Name>MUDEngine</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -28,43 +28,47 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Game Objects"); System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("Game Objects");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("Game", new System.Windows.Forms.TreeNode[] { System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("Game", new System.Windows.Forms.TreeNode[] {
treeNode3}); treeNode11});
this.containerMain = new System.Windows.Forms.SplitContainer(); this.containerMain = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.containerProperties = new System.Windows.Forms.SplitContainer(); this.containerProperties = new System.Windows.Forms.SplitContainer();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.page1 = new System.Windows.Forms.TabPage();
this.panel4 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.containerLeftPane = new System.Windows.Forms.SplitContainer(); this.containerLeftPane = new System.Windows.Forms.SplitContainer();
this.treeProjectExplorer = new System.Windows.Forms.TreeView();
this.panel2 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.panel3 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel(); this.projectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.label1 = new System.Windows.Forms.Label(); this.createNewObjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.label2 = new System.Windows.Forms.Label(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.panel2 = new System.Windows.Forms.Panel(); this.refreshObjectBrowserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.label3 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.page1 = new System.Windows.Forms.TabPage();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.treeProjectExplorer = new System.Windows.Forms.TreeView();
this.containerMain.Panel1.SuspendLayout(); this.containerMain.Panel1.SuspendLayout();
this.containerMain.Panel2.SuspendLayout(); this.containerMain.Panel2.SuspendLayout();
this.containerMain.SuspendLayout(); this.containerMain.SuspendLayout();
this.panel1.SuspendLayout();
this.containerProperties.Panel1.SuspendLayout(); this.containerProperties.Panel1.SuspendLayout();
this.containerProperties.Panel2.SuspendLayout(); this.containerProperties.Panel2.SuspendLayout();
this.containerProperties.SuspendLayout(); this.containerProperties.SuspendLayout();
this.tabControl1.SuspendLayout();
this.panel4.SuspendLayout();
this.containerLeftPane.Panel1.SuspendLayout(); this.containerLeftPane.Panel1.SuspendLayout();
this.containerLeftPane.Panel2.SuspendLayout(); this.containerLeftPane.Panel2.SuspendLayout();
this.containerLeftPane.SuspendLayout(); this.containerLeftPane.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.panel3.SuspendLayout(); this.panel3.SuspendLayout();
this.panel4.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// containerMain // containerMain
@ -88,73 +92,6 @@
this.containerMain.SplitterDistance = 133; this.containerMain.SplitterDistance = 133;
this.containerMain.TabIndex = 0; this.containerMain.TabIndex = 0;
// //
// containerProperties
//
this.containerProperties.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.containerProperties.Dock = System.Windows.Forms.DockStyle.Fill;
this.containerProperties.Location = new System.Drawing.Point(0, 0);
this.containerProperties.Name = "containerProperties";
//
// containerProperties.Panel1
//
this.containerProperties.Panel1.Controls.Add(this.tabControl1);
this.containerProperties.Panel1.Controls.Add(this.panel4);
//
// containerProperties.Panel2
//
this.containerProperties.Panel2.Controls.Add(this.containerLeftPane);
this.containerProperties.Size = new System.Drawing.Size(913, 589);
this.containerProperties.SplitterDistance = 667;
this.containerProperties.TabIndex = 0;
//
// containerLeftPane
//
this.containerLeftPane.Dock = System.Windows.Forms.DockStyle.Fill;
this.containerLeftPane.Location = new System.Drawing.Point(0, 0);
this.containerLeftPane.Name = "containerLeftPane";
this.containerLeftPane.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// containerLeftPane.Panel1
//
this.containerLeftPane.Panel1.Controls.Add(this.treeProjectExplorer);
this.containerLeftPane.Panel1.Controls.Add(this.panel2);
//
// containerLeftPane.Panel2
//
this.containerLeftPane.Panel2.Controls.Add(this.propertyGrid1);
this.containerLeftPane.Panel2.Controls.Add(this.panel3);
this.containerLeftPane.Size = new System.Drawing.Size(240, 587);
this.containerLeftPane.SplitterDistance = 297;
this.containerLeftPane.TabIndex = 0;
//
// menuStrip1
//
this.menuStrip1.BackColor = System.Drawing.Color.Silver;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.menuStrip1.Size = new System.Drawing.Size(1050, 24);
this.menuStrip1.TabIndex = 1;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.closeToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// closeToolStripMenuItem
//
this.closeToolStripMenuItem.BackColor = System.Drawing.Color.Silver;
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
this.closeToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.closeToolStripMenuItem.Text = "Close";
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
//
// panel1 // panel1
// //
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42))))); this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
@ -179,85 +116,24 @@
this.label1.Text = "Object Browser"; this.label1.Text = "Object Browser";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// label2 // containerProperties
// //
this.label2.Dock = System.Windows.Forms.DockStyle.Fill; this.containerProperties.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.containerProperties.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.ForeColor = System.Drawing.Color.Silver; this.containerProperties.Location = new System.Drawing.Point(0, 0);
this.label2.Location = new System.Drawing.Point(0, 0); this.containerProperties.Name = "containerProperties";
this.label2.Name = "label2";
this.label2.Padding = new System.Windows.Forms.Padding(0, 4, 0, 0);
this.label2.Size = new System.Drawing.Size(238, 27);
this.label2.TabIndex = 0;
this.label2.Text = "Project Explorer";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// panel2 // containerProperties.Panel1
// //
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42))))); this.containerProperties.Panel1.Controls.Add(this.tabControl1);
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.containerProperties.Panel1.Controls.Add(this.panel4);
this.panel2.Controls.Add(this.label2);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(240, 29);
this.panel2.TabIndex = 1;
// //
// label3 // containerProperties.Panel2
// //
this.label3.Dock = System.Windows.Forms.DockStyle.Fill; this.containerProperties.Panel2.Controls.Add(this.containerLeftPane);
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.containerProperties.Size = new System.Drawing.Size(913, 589);
this.label3.ForeColor = System.Drawing.Color.Silver; this.containerProperties.SplitterDistance = 667;
this.label3.Location = new System.Drawing.Point(0, 0); this.containerProperties.TabIndex = 0;
this.label3.Name = "label3";
this.label3.Padding = new System.Windows.Forms.Padding(0, 4, 0, 0);
this.label3.Size = new System.Drawing.Size(238, 27);
this.label3.TabIndex = 0;
this.label3.Text = "Object Properties";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.label3);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(240, 29);
this.panel3.TabIndex = 1;
//
// label4
//
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.ForeColor = System.Drawing.Color.Silver;
this.label4.Location = new System.Drawing.Point(0, 0);
this.label4.Name = "label4";
this.label4.Padding = new System.Windows.Forms.Padding(0, 4, 0, 0);
this.label4.Size = new System.Drawing.Size(663, 27);
this.label4.TabIndex = 0;
this.label4.Text = "Visual Designer";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// panel4
//
this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel4.Controls.Add(this.label4);
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(665, 29);
this.panel4.TabIndex = 1;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 29);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(131, 558);
this.flowLayoutPanel1.TabIndex = 1;
// //
// tabControl1 // tabControl1
// //
@ -284,6 +160,89 @@
this.page1.DragDrop += new System.Windows.Forms.DragEventHandler(this.page1_DragDrop); this.page1.DragDrop += new System.Windows.Forms.DragEventHandler(this.page1_DragDrop);
this.page1.DragEnter += new System.Windows.Forms.DragEventHandler(this.page1_DragEnter); this.page1.DragEnter += new System.Windows.Forms.DragEventHandler(this.page1_DragEnter);
// //
// panel4
//
this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel4.Controls.Add(this.label4);
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(665, 29);
this.panel4.TabIndex = 1;
//
// label4
//
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.ForeColor = System.Drawing.Color.Silver;
this.label4.Location = new System.Drawing.Point(0, 0);
this.label4.Name = "label4";
this.label4.Padding = new System.Windows.Forms.Padding(0, 4, 0, 0);
this.label4.Size = new System.Drawing.Size(663, 27);
this.label4.TabIndex = 0;
this.label4.Text = "Visual Designer";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// containerLeftPane
//
this.containerLeftPane.Dock = System.Windows.Forms.DockStyle.Fill;
this.containerLeftPane.Location = new System.Drawing.Point(0, 0);
this.containerLeftPane.Name = "containerLeftPane";
this.containerLeftPane.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// containerLeftPane.Panel1
//
this.containerLeftPane.Panel1.Controls.Add(this.treeProjectExplorer);
this.containerLeftPane.Panel1.Controls.Add(this.panel2);
//
// containerLeftPane.Panel2
//
this.containerLeftPane.Panel2.Controls.Add(this.propertyGrid1);
this.containerLeftPane.Panel2.Controls.Add(this.panel3);
this.containerLeftPane.Size = new System.Drawing.Size(240, 587);
this.containerLeftPane.SplitterDistance = 297;
this.containerLeftPane.TabIndex = 0;
//
// treeProjectExplorer
//
this.treeProjectExplorer.BackColor = System.Drawing.Color.Gray;
this.treeProjectExplorer.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeProjectExplorer.Location = new System.Drawing.Point(0, 29);
this.treeProjectExplorer.Name = "treeProjectExplorer";
treeNode11.Name = "nodeGameObjects";
treeNode11.Text = "Game Objects";
treeNode12.Name = "nodeGame";
treeNode12.Text = "Game";
this.treeProjectExplorer.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode12});
this.treeProjectExplorer.Size = new System.Drawing.Size(240, 268);
this.treeProjectExplorer.TabIndex = 2;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.label2);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(240, 29);
this.panel2.TabIndex = 1;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.Color.Silver;
this.label2.Location = new System.Drawing.Point(0, 0);
this.label2.Name = "label2";
this.label2.Padding = new System.Windows.Forms.Padding(0, 4, 0, 0);
this.label2.Size = new System.Drawing.Size(238, 27);
this.label2.TabIndex = 0;
this.label2.Text = "Project Explorer";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// propertyGrid1 // propertyGrid1
// //
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill; this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
@ -292,20 +251,93 @@
this.propertyGrid1.Size = new System.Drawing.Size(240, 257); this.propertyGrid1.Size = new System.Drawing.Size(240, 257);
this.propertyGrid1.TabIndex = 2; this.propertyGrid1.TabIndex = 2;
// //
// treeProjectExplorer // panel3
// //
this.treeProjectExplorer.BackColor = System.Drawing.Color.Gray; this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.treeProjectExplorer.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.treeProjectExplorer.Location = new System.Drawing.Point(0, 29); this.panel3.Controls.Add(this.label3);
this.treeProjectExplorer.Name = "treeProjectExplorer"; this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
treeNode3.Name = "nodeGameObjects"; this.panel3.Location = new System.Drawing.Point(0, 0);
treeNode3.Text = "Game Objects"; this.panel3.Name = "panel3";
treeNode4.Name = "nodeGame"; this.panel3.Size = new System.Drawing.Size(240, 29);
treeNode4.Text = "Game"; this.panel3.TabIndex = 1;
this.treeProjectExplorer.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { //
treeNode4}); // label3
this.treeProjectExplorer.Size = new System.Drawing.Size(240, 268); //
this.treeProjectExplorer.TabIndex = 2; this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.ForeColor = System.Drawing.Color.Silver;
this.label3.Location = new System.Drawing.Point(0, 0);
this.label3.Name = "label3";
this.label3.Padding = new System.Windows.Forms.Padding(0, 4, 0, 0);
this.label3.Size = new System.Drawing.Size(238, 27);
this.label3.TabIndex = 0;
this.label3.Text = "Object Properties";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// menuStrip1
//
this.menuStrip1.BackColor = System.Drawing.Color.Silver;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.projectToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.menuStrip1.Size = new System.Drawing.Size(1050, 24);
this.menuStrip1.TabIndex = 1;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.closeToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// closeToolStripMenuItem
//
this.closeToolStripMenuItem.BackColor = System.Drawing.Color.Silver;
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
this.closeToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.closeToolStripMenuItem.Text = "Close";
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
//
// projectToolStripMenuItem
//
this.projectToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.createNewObjectToolStripMenuItem,
this.toolStripMenuItem1,
this.refreshObjectBrowserToolStripMenuItem});
this.projectToolStripMenuItem.Name = "projectToolStripMenuItem";
this.projectToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
this.projectToolStripMenuItem.Text = "Objects";
//
// createNewObjectToolStripMenuItem
//
this.createNewObjectToolStripMenuItem.Name = "createNewObjectToolStripMenuItem";
this.createNewObjectToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
this.createNewObjectToolStripMenuItem.Text = "Managed Objects";
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(193, 6);
//
// refreshObjectBrowserToolStripMenuItem
//
this.refreshObjectBrowserToolStripMenuItem.Name = "refreshObjectBrowserToolStripMenuItem";
this.refreshObjectBrowserToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
this.refreshObjectBrowserToolStripMenuItem.Text = "Refresh Object Browser";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 29);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(131, 558);
this.flowLayoutPanel1.TabIndex = 2;
// //
// frmMain // frmMain
// //
@ -323,19 +355,19 @@
this.containerMain.Panel1.ResumeLayout(false); this.containerMain.Panel1.ResumeLayout(false);
this.containerMain.Panel2.ResumeLayout(false); this.containerMain.Panel2.ResumeLayout(false);
this.containerMain.ResumeLayout(false); this.containerMain.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.containerProperties.Panel1.ResumeLayout(false); this.containerProperties.Panel1.ResumeLayout(false);
this.containerProperties.Panel2.ResumeLayout(false); this.containerProperties.Panel2.ResumeLayout(false);
this.containerProperties.ResumeLayout(false); this.containerProperties.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.containerLeftPane.Panel1.ResumeLayout(false); this.containerLeftPane.Panel1.ResumeLayout(false);
this.containerLeftPane.Panel2.ResumeLayout(false); this.containerLeftPane.Panel2.ResumeLayout(false);
this.containerLeftPane.ResumeLayout(false); this.containerLeftPane.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false); this.panel3.ResumeLayout(false);
this.panel4.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false); this.menuStrip1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -357,11 +389,15 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage page1; private System.Windows.Forms.TabPage page1;
private System.Windows.Forms.PropertyGrid propertyGrid1; private System.Windows.Forms.PropertyGrid propertyGrid1;
private System.Windows.Forms.TreeView treeProjectExplorer; private System.Windows.Forms.TreeView treeProjectExplorer;
private System.Windows.Forms.ToolStripMenuItem projectToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem createNewObjectToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem refreshObjectBrowserToolStripMenuItem;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
} }
} }

View file

@ -138,6 +138,11 @@ namespace VisualDesigner
if (page1.Text == "Empty") if (page1.Text == "Empty")
{ {
page1.Text = currentScript.Name; page1.Text = currentScript.Name;
if (currentScript.Name == "Room")
{
page1.Controls.Add(new VisualComponents.RoomDesigner((Room)currentScript.Instance));
}
break;
} }
//Otherwise create a new page //Otherwise create a new page
else else
@ -148,9 +153,11 @@ namespace VisualDesigner
tab.DragEnter += new DragEventHandler(page1_DragEnter); tab.DragEnter += new DragEventHandler(page1_DragEnter);
tab.AllowDrop = true; tab.AllowDrop = true;
tab.BackColor = Color.FromArgb(64,64,64); tab.BackColor = Color.FromArgb(64,64,64);
page1.Text = currentScript.Name;
tabControl1.TabPages.Add(tab); tabControl1.TabPages.Add(tab);
//select the tab. //select the tab.
tabControl1.SelectedTab = tab; tabControl1.SelectedTab = tab;
break;
} }
} }
} }