Content Compiler:

- Added Developer Attributes & did some cleaning
- Fixed RibbonButton image aligning bug (Worldicon not centered)
- Added some comments to da code
- Implemented cleaning of ContentProject (Deleting bin files)
This commit is contained in:
SND\eagleeyestudios_cp 2012-09-10 19:10:39 +00:00
parent 0251a7a2e7
commit 8b735c16c2
26 changed files with 468 additions and 485 deletions

View File

@ -14,11 +14,11 @@
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<OutputPath>..\..\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -36,6 +36,24 @@
<PropertyGroup>
<StartupObject>ANX.ContentCompiler.GUI.Program</StartupObject>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -145,15 +163,9 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TreeViewExtensions.cs" />
<EmbeddedResource Include="Controls\RibbonTextBox.resx">
<DependentUpon>RibbonTextBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Dialogues\ErrorLogScreen.resx">
<DependentUpon>ErrorLogScreen.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainWindow.resx">
<DependentUpon>MainWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@ -201,6 +213,22 @@
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.DX10\ANX.RenderSystem.Windows.DX10.csproj">
<Project>{5be49183-2f6f-4527-ac90-d816911fcf90}</Project>
<Name>ANX.RenderSystem.Windows.DX10</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.GL3\ANX.RenderSystem.Windows.GL3.csproj">
<Project>{eb8258e0-6741-4db9-b756-1ebdf67b1ed6}</Project>
<Name>ANX.RenderSystem.Windows.GL3</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX11\ANX.RenderSystem.Windows.DX11.csproj">
<Project>{b30de9c2-0926-46b6-8351-9af276c472d5}</Project>
<Name>ANX.RenderSystem.Windows.DX11</Name>
</ProjectReference>
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio.csproj">
<Project>{6a582788-c4d2-410c-96cd-177f75712d65}</Project>
<Name>ANX.SoundSystem.Windows.XAudio</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@ -1,7 +1,9 @@
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
</configuration>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
</configuration>

View File

@ -1,18 +1,22 @@
using System;
using ANX.Framework.Content.Pipeline;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(99)] //TODO: Logging to a file and (RTF) colors would be cool!
[TestState(TestStateAttribute.TestState.Tested)]
public class CCompilerBuildLogger : ContentBuildLogger
{
public override void LogImportantMessage(string message, params object[] messageArgs)
{
MainWindow.Instance.ribbonTextBox.AddMessage("[IMPORTANT] " + String.Format(message, messageArgs));
MainWindow.Instance.ribbonTextBox.AddMessage("[IMPORTANT] " + String.Format(message, messageArgs));
}
public override void LogMessage(string message, params object[] messageArgs)
{
MainWindow.Instance.ribbonTextBox.AddMessage("[Info] " + String.Format(message, messageArgs));
MainWindow.Instance.ribbonTextBox.AddMessage("[Info] " + String.Format(message, messageArgs));
}
public override void LogWarning(string helpLink, ContentIdentity contentIdentity, string message,

View File

@ -1,10 +1,13 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Controls
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public partial class ArrowButton : UserControl
{
public ArrowButton()

View File

@ -28,24 +28,11 @@
/// </summary>
private void InitializeComponent()
{
this.pictureBox = new System.Windows.Forms.PictureBox();
this.labelText = new System.Windows.Forms.Label();
this.pictureBox = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
this.SuspendLayout();
//
// pictureBox
//
this.pictureBox.Location = new System.Drawing.Point(0, 0);
this.pictureBox.Name = "pictureBox";
this.pictureBox.Size = new System.Drawing.Size(60, 60);
this.pictureBox.TabIndex = 0;
this.pictureBox.TabStop = false;
this.pictureBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RibbonButtonMouseDown);
this.pictureBox.MouseEnter += new System.EventHandler(this.RibbonButtonMouseEnter);
this.pictureBox.MouseLeave += new System.EventHandler(this.RibbonButtonMouseLeave);
this.pictureBox.MouseHover += new System.EventHandler(this.RibbonButtonMouseHover);
this.pictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.RibbonButtonMouseUp);
//
// labelText
//
this.labelText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
@ -62,6 +49,22 @@
this.labelText.MouseHover += new System.EventHandler(this.RibbonButtonMouseHover);
this.labelText.MouseUp += new System.Windows.Forms.MouseEventHandler(this.RibbonButtonMouseUp);
//
// pictureBox
//
this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox.Location = new System.Drawing.Point(0, 0);
this.pictureBox.Name = "pictureBox";
this.pictureBox.Size = new System.Drawing.Size(60, 60);
this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pictureBox.TabIndex = 0;
this.pictureBox.TabStop = false;
this.pictureBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.RibbonButtonMouseDown);
this.pictureBox.MouseEnter += new System.EventHandler(this.RibbonButtonMouseEnter);
this.pictureBox.MouseLeave += new System.EventHandler(this.RibbonButtonMouseLeave);
this.pictureBox.MouseHover += new System.EventHandler(this.RibbonButtonMouseHover);
this.pictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.RibbonButtonMouseUp);
//
// RibbonButton
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -85,7 +88,7 @@
#endregion
private System.Windows.Forms.PictureBox pictureBox;
private System.Windows.Forms.Label labelText;
private System.Windows.Forms.PictureBox pictureBox;
}
}

View File

@ -2,9 +2,13 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Controls
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public partial class RibbonButton : UserControl
{
public RibbonButton()

View File

@ -1,15 +1,15 @@
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 ANX.ContentCompiler.GUI.Dialogues;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Controls
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public partial class RibbonTextBox : UserControl
{
public RibbonTextBox()
@ -32,4 +32,4 @@ namespace ANX.ContentCompiler.GUI.Controls
}
}
}
}
}

View File

@ -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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,9 +1,12 @@
using System;
using System.IO;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Dialogues
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public partial class ErrorLogScreen : Form
{
public ErrorLogScreen(string[] errorLog)

View File

@ -1,7 +1,11 @@
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Dialogues
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(80)] //TODO: Implement tour in MainWindow and launch it from here!
[TestState(TestStateAttribute.TestState.Untested)]
public partial class FirstStartScreen : Form
{
public FirstStartScreen()

View File

@ -1,9 +1,12 @@
using System;
using System.IO;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Dialogues
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public partial class NewFolderScreen : Form
{
public NewFolderScreen()
@ -32,7 +35,8 @@ namespace ANX.ContentCompiler.GUI.Dialogues
private void ButtonNextClick(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(textBoxName.Text))
MessageBox.Show("You need to type a name!", "Missing value", MessageBoxButtons.OK, MessageBoxIcon.Warning);
MessageBox.Show("You need to type a name!", "Missing value", MessageBoxButtons.OK,
MessageBoxIcon.Warning);
else
DialogResult = DialogResult.OK;
}

View File

@ -1,8 +1,12 @@
using System;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Dialogues
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.InProgress)]
public partial class NewProjectImportersScreen : Form
{
public NewProjectImportersScreen()

View File

@ -1,8 +1,12 @@
using System;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Dialogues
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.InProgress)]
public partial class NewProjectOutputScreen : Form
{
public NewProjectOutputScreen()

View File

@ -1,9 +1,13 @@
using System;
using System.IO;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Dialogues
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public partial class NewProjectScreen : Form
{
public NewProjectScreen()
@ -60,7 +64,8 @@ namespace ANX.ContentCompiler.GUI.Dialogues
if (String.IsNullOrEmpty(textBoxName.Text))
MessageBox.Show("Give your child a name!", "Missing value", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else if (Directory.Exists(textBoxLocation.Text))
MessageBox.Show("A project with this name already exists in that path!", "Will not overwrite existing stuff", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("A project with this name already exists in that path!",
"Will not overwrite existing stuff", MessageBoxButtons.OK, MessageBoxIcon.Error);
else
DialogResult = DialogResult.OK;
}

View File

@ -1,30 +1,35 @@
using System;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Dialogues
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.InProgress)]
public partial class NewProjectSummaryScreen : Form
{
public NewProjectSummaryScreen(String projectName, String projectDir, String outputDir, bool customImporters, String customImportersDir, int customImportersFound, int customProcessorsFound)
public NewProjectSummaryScreen(String projectName, String projectDir, String outputDir, bool customImporters,
String customImportersDir, int customImportersFound, int customProcessorsFound)
{
InitializeComponent();
SetUpColors();
textBox.Text =
"Summary for new project " + projectName + Environment.NewLine +
"=========================================" + Environment.NewLine +
"Name: " + projectName + Environment.NewLine +
"Name: " + projectName + Environment.NewLine +
"Media Directory: " + projectDir + Environment.NewLine + Environment.NewLine +
"Output Directory: " + outputDir + Environment.NewLine + Environment.NewLine +
"Custom Importers/Processors: " + customImporters + Environment.NewLine;
if (customImporters)
{
textBox.Text +=
"Custom Importers/Processors Location: " + customImportersDir + Environment.NewLine + Environment.NewLine +
"Importers/Processors found in given Location:" + Environment.NewLine +
"Custom Importers/Processors Location: " + customImportersDir + Environment.NewLine +
Environment.NewLine +
"Importers/Processors found in given Location:" + Environment.NewLine +
"Importers: " + customImportersFound + Environment.NewLine +
"Processors: " + customProcessorsFound;
}
}
private void SetUpColors()

View File

@ -1,9 +1,12 @@
using System;
using System.IO;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.Dialogues
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public partial class OpenProjectScreen : Form
{
public OpenProjectScreen()
@ -11,7 +14,7 @@ namespace ANX.ContentCompiler.GUI.Dialogues
InitializeComponent();
SetUpColors();
listBoxRecentProjects.Items.Clear();
foreach(var project in MainWindow.Instance.RecentProjects)
foreach (string project in MainWindow.Instance.RecentProjects)
{
listBoxRecentProjects.Items.Add(project);
}
@ -57,7 +60,8 @@ namespace ANX.ContentCompiler.GUI.Dialogues
private void ButtonNextClick(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(textBoxLocation.Text) && listBoxRecentProjects.SelectedItem == null)
MessageBox.Show("You need to select a project!", "Missing value", MessageBoxButtons.OK, MessageBoxIcon.Warning);
MessageBox.Show("You need to select a project!", "Missing value", MessageBoxButtons.OK,
MessageBoxIcon.Warning);
else
DialogResult = DialogResult.OK;
}

View File

@ -1,4 +1,5 @@
using ANX.ContentCompiler.GUI.States;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI
{
@ -32,13 +33,6 @@ namespace ANX.ContentCompiler.GUI
{
this.components = new System.ComponentModel.Container();
this.splitContainerMenuLayout = new System.Windows.Forms.SplitContainer();
this.ribbonTextBox = new ANX.ContentCompiler.GUI.Controls.RibbonTextBox();
this.ribbonButtonHelp = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonWeb = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonClean = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonSave = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonLoad = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonNew = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.buttonQuit = new System.Windows.Forms.Button();
this.buttonMenu = new System.Windows.Forms.Button();
this.labelTitle = new System.Windows.Forms.Label();
@ -50,11 +44,18 @@ namespace ANX.ContentCompiler.GUI
this.treeViewItemRename = new System.Windows.Forms.ToolStripMenuItem();
this.treeViewItemDelete = new System.Windows.Forms.ToolStripMenuItem();
this.splitContainerProperties = new System.Windows.Forms.SplitContainer();
this.editingState = new ANX.ContentCompiler.GUI.States.EditingState();
this.startState = new ANX.ContentCompiler.GUI.States.StartState();
this.labelProperties = new System.Windows.Forms.Label();
this.propertyGrid = new System.Windows.Forms.PropertyGrid();
this.menuState = new ANX.ContentCompiler.GUI.States.MenuState();
this.ribbonTextBox = new ANX.ContentCompiler.GUI.Controls.RibbonTextBox();
this.ribbonButtonHelp = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonWeb = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonClean = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonSave = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonLoad = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.ribbonButtonNew = new ANX.ContentCompiler.GUI.Controls.RibbonButton();
this.editingState = new ANX.ContentCompiler.GUI.States.EditingState();
this.startState = new ANX.ContentCompiler.GUI.States.StartState();
((System.ComponentModel.ISupportInitialize)(this.splitContainerMenuLayout)).BeginInit();
this.splitContainerMenuLayout.Panel1.SuspendLayout();
this.splitContainerMenuLayout.Panel2.SuspendLayout();
@ -100,79 +101,6 @@ namespace ANX.ContentCompiler.GUI
this.splitContainerMenuLayout.SplitterDistance = 99;
this.splitContainerMenuLayout.TabIndex = 0;
//
// ribbonTextBox
//
this.ribbonTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.ribbonTextBox.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ribbonTextBox.Location = new System.Drawing.Point(532, 26);
this.ribbonTextBox.Name = "ribbonTextBox";
this.ribbonTextBox.Size = new System.Drawing.Size(320, 70);
this.ribbonTextBox.TabIndex = 9;
//
// ribbonButtonHelp
//
this.ribbonButtonHelp.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonHelp.Content = "Help";
this.ribbonButtonHelp.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_question;
this.ribbonButtonHelp.Location = new System.Drawing.Point(299, 26);
this.ribbonButtonHelp.Name = "ribbonButtonHelp";
this.ribbonButtonHelp.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonHelp.TabIndex = 8;
//
// ribbonButtonWeb
//
this.ribbonButtonWeb.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonWeb.Content = "Website";
this.ribbonButtonWeb.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_globe;
this.ribbonButtonWeb.Location = new System.Drawing.Point(237, 26);
this.ribbonButtonWeb.Name = "ribbonButtonWeb";
this.ribbonButtonWeb.Size = new System.Drawing.Size(63, 68);
this.ribbonButtonWeb.TabIndex = 7;
//
// ribbonButtonClean
//
this.ribbonButtonClean.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.ribbonButtonClean.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonClean.Content = "Clean";
this.ribbonButtonClean.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_clean;
this.ribbonButtonClean.Location = new System.Drawing.Point(186, 26);
this.ribbonButtonClean.Name = "ribbonButtonClean";
this.ribbonButtonClean.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonClean.TabIndex = 6;
//
// ribbonButtonSave
//
this.ribbonButtonSave.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonSave.Content = "Save";
this.ribbonButtonSave.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_save;
this.ribbonButtonSave.Location = new System.Drawing.Point(105, 26);
this.ribbonButtonSave.Name = "ribbonButtonSave";
this.ribbonButtonSave.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonSave.TabIndex = 5;
this.ribbonButtonSave.Click += new System.EventHandler(this.SaveProject);
//
// ribbonButtonLoad
//
this.ribbonButtonLoad.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonLoad.Content = "Open";
this.ribbonButtonLoad.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_folder_open;
this.ribbonButtonLoad.Location = new System.Drawing.Point(54, 26);
this.ribbonButtonLoad.Name = "ribbonButtonLoad";
this.ribbonButtonLoad.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonLoad.TabIndex = 4;
this.ribbonButtonLoad.Click += new System.EventHandler(this.OpenProjectDialog);
//
// ribbonButtonNew
//
this.ribbonButtonNew.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonNew.Content = "New";
this.ribbonButtonNew.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_page_multiple;
this.ribbonButtonNew.Location = new System.Drawing.Point(3, 26);
this.ribbonButtonNew.Name = "ribbonButtonNew";
this.ribbonButtonNew.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonNew.TabIndex = 3;
this.ribbonButtonNew.Click += new System.EventHandler(this.NewProject);
//
// buttonQuit
//
this.buttonQuit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -334,26 +262,6 @@ namespace ANX.ContentCompiler.GUI
this.splitContainerProperties.SplitterDistance = 366;
this.splitContainerProperties.TabIndex = 0;
//
// editingState
//
this.editingState.Dock = System.Windows.Forms.DockStyle.Fill;
this.editingState.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.editingState.Location = new System.Drawing.Point(0, 0);
this.editingState.Name = "editingState";
this.editingState.Size = new System.Drawing.Size(364, 547);
this.editingState.TabIndex = 1;
this.editingState.Visible = false;
//
// startState
//
this.startState.Dock = System.Windows.Forms.DockStyle.Fill;
this.startState.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.startState.Location = new System.Drawing.Point(0, 0);
this.startState.Name = "startState";
this.startState.Size = new System.Drawing.Size(364, 547);
this.startState.TabIndex = 0;
this.startState.Visible = false;
//
// labelProperties
//
this.labelProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@ -402,6 +310,100 @@ namespace ANX.ContentCompiler.GUI
this.menuState.TabIndex = 1;
this.menuState.Visible = false;
//
// ribbonTextBox
//
this.ribbonTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.ribbonTextBox.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ribbonTextBox.Location = new System.Drawing.Point(532, 26);
this.ribbonTextBox.Name = "ribbonTextBox";
this.ribbonTextBox.Size = new System.Drawing.Size(320, 70);
this.ribbonTextBox.TabIndex = 9;
//
// ribbonButtonHelp
//
this.ribbonButtonHelp.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonHelp.Content = "Help";
this.ribbonButtonHelp.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_question;
this.ribbonButtonHelp.Location = new System.Drawing.Point(299, 26);
this.ribbonButtonHelp.Name = "ribbonButtonHelp";
this.ribbonButtonHelp.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonHelp.TabIndex = 8;
//
// ribbonButtonWeb
//
this.ribbonButtonWeb.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonWeb.Content = "Website";
this.ribbonButtonWeb.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_globe;
this.ribbonButtonWeb.Location = new System.Drawing.Point(237, 26);
this.ribbonButtonWeb.Name = "ribbonButtonWeb";
this.ribbonButtonWeb.Size = new System.Drawing.Size(63, 68);
this.ribbonButtonWeb.TabIndex = 7;
//
// ribbonButtonClean
//
this.ribbonButtonClean.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.ribbonButtonClean.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonClean.Content = "Clean";
this.ribbonButtonClean.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_clean;
this.ribbonButtonClean.Location = new System.Drawing.Point(186, 26);
this.ribbonButtonClean.Name = "ribbonButtonClean";
this.ribbonButtonClean.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonClean.TabIndex = 6;
this.ribbonButtonClean.Click += new System.EventHandler(this.RibbonButtonCleanClick);
//
// ribbonButtonSave
//
this.ribbonButtonSave.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonSave.Content = "Save";
this.ribbonButtonSave.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_save;
this.ribbonButtonSave.Location = new System.Drawing.Point(105, 26);
this.ribbonButtonSave.Name = "ribbonButtonSave";
this.ribbonButtonSave.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonSave.TabIndex = 5;
this.ribbonButtonSave.Click += new System.EventHandler(this.SaveProject);
//
// ribbonButtonLoad
//
this.ribbonButtonLoad.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonLoad.Content = "Open";
this.ribbonButtonLoad.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_folder_open;
this.ribbonButtonLoad.Location = new System.Drawing.Point(54, 26);
this.ribbonButtonLoad.Name = "ribbonButtonLoad";
this.ribbonButtonLoad.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonLoad.TabIndex = 4;
this.ribbonButtonLoad.Click += new System.EventHandler(this.OpenProjectDialog);
//
// ribbonButtonNew
//
this.ribbonButtonNew.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ribbonButtonNew.Content = "New";
this.ribbonButtonNew.Image = global::ANX.ContentCompiler.GUI.Properties.Resources.appbar_page_multiple;
this.ribbonButtonNew.Location = new System.Drawing.Point(3, 26);
this.ribbonButtonNew.Name = "ribbonButtonNew";
this.ribbonButtonNew.Size = new System.Drawing.Size(52, 68);
this.ribbonButtonNew.TabIndex = 3;
this.ribbonButtonNew.Click += new System.EventHandler(this.NewProject);
//
// editingState
//
this.editingState.Dock = System.Windows.Forms.DockStyle.Fill;
this.editingState.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.editingState.Location = new System.Drawing.Point(0, 0);
this.editingState.Name = "editingState";
this.editingState.Size = new System.Drawing.Size(364, 547);
this.editingState.TabIndex = 1;
this.editingState.Visible = false;
//
// startState
//
this.startState.Dock = System.Windows.Forms.DockStyle.Fill;
this.startState.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.startState.Location = new System.Drawing.Point(0, 0);
this.startState.Name = "startState";
this.startState.Size = new System.Drawing.Size(364, 547);
this.startState.TabIndex = 0;
this.startState.Visible = false;
//
// MainWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@ -1,31 +1,39 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using ANX.ContentCompiler.GUI.Dialogues;
using ANX.Framework.Content.Pipeline;
using ANX.Framework.Content.Pipeline.Tasks;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(71)] //TODO: Implement parameter handling, Tour, HelpButton, WebsiteButton, Preview!
[TestState(TestStateAttribute.TestState.InProgress)]
public partial class MainWindow : Form
{
#region Fields
public static String DefaultOutputPath = "bin";
public static String SettingsFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ANX Content Compiler" + Path.DirectorySeparatorChar + "settings.ees");
private Point _lastPos;
private bool _mouseDown;
private bool _menuMode;
public static String DefaultOutputPath = "bin";
public static String SettingsFile =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"ANX Content Compiler" + Path.DirectorySeparatorChar + "settings.ees");
private readonly bool _firstStart = true;
private ContentProject _contentProject;
private Point _lastPos;
private bool _menuMode;
private bool _mouseDown;
#endregion
#region Properties
public static MainWindow Instance { get; private set; }
public String ProjectName { get; set; }
@ -34,10 +42,12 @@ namespace ANX.ContentCompiler.GUI
public String ProjectOutputDir { get; set; }
public String ProjectImportersDir { get; set; }
public RecentProjects RecentProjects { get; set; }
#endregion
#region Init
public MainWindow()
public MainWindow(string[] args)
{
InitializeComponent();
Instance = this;
@ -67,9 +77,11 @@ namespace ANX.ContentCompiler.GUI
ShowFirstStartStuff();
ChangeEnvironmentStartState();
}
#endregion
#region NewProject
public void NewProject(object sender, EventArgs e)
{
using (var dlg = new NewProjectScreen())
@ -77,7 +89,9 @@ namespace ANX.ContentCompiler.GUI
if (dlg.ShowDialog() == DialogResult.OK)
{
ProjectName = dlg.textBoxName.Text;
ProjectFolder = !String.IsNullOrEmpty(dlg.textBoxLocation.Text) ? dlg.textBoxLocation.Text : Path.Combine(Settings.DefaultProjectPath, ProjectName);
ProjectFolder = !String.IsNullOrEmpty(dlg.textBoxLocation.Text)
? dlg.textBoxLocation.Text
: Path.Combine(Settings.DefaultProjectPath, ProjectName);
ProjectPath = Path.Combine(ProjectFolder, ProjectName + ".cproj");
}
else
@ -89,7 +103,9 @@ namespace ANX.ContentCompiler.GUI
{
if (dlg2.ShowDialog() == DialogResult.OK)
{
ProjectOutputDir = !String.IsNullOrEmpty(dlg2.textBoxLocation.Text) ? dlg2.textBoxLocation.Text : Path.Combine(ProjectFolder, DefaultOutputPath);
ProjectOutputDir = !String.IsNullOrEmpty(dlg2.textBoxLocation.Text)
? dlg2.textBoxLocation.Text
: Path.Combine(ProjectFolder, DefaultOutputPath);
}
else
return;
@ -101,11 +117,13 @@ namespace ANX.ContentCompiler.GUI
else
return;
}
var importersEnabled = !String.IsNullOrEmpty(ProjectImportersDir);
var importers = 0;
var processors = 0;
bool importersEnabled = !String.IsNullOrEmpty(ProjectImportersDir);
int importers = 0;
int processors = 0;
using (var dlg4 = new NewProjectSummaryScreen(ProjectName, ProjectFolder, ProjectOutputDir, importersEnabled, ProjectImportersDir, importers, processors))
using (
var dlg4 = new NewProjectSummaryScreen(ProjectName, ProjectFolder, ProjectOutputDir, importersEnabled,
ProjectImportersDir, importers, processors))
{
dlg4.ShowDialog();
}
@ -120,9 +138,11 @@ namespace ANX.ContentCompiler.GUI
};
ChangeEnvironmentOpenProject();
}
#endregion
#region OpenProject
public void OpenProjectDialog(object sender, EventArgs e)
{
using (var dlg = new OpenProjectScreen())
@ -132,9 +152,10 @@ namespace ANX.ContentCompiler.GUI
if (dlg.listBoxRecentProjects.SelectedItem == null)
OpenProject(dlg.textBoxLocation.Text);
else
OpenProject((string)dlg.listBoxRecentProjects.SelectedItem);
OpenProject((string) dlg.listBoxRecentProjects.SelectedItem);
}
}
public void OpenProject(string path)
{
if (!File.Exists(path))
@ -152,9 +173,11 @@ namespace ANX.ContentCompiler.GUI
_contentProject.Creator = "ANX Content Compiler (4.0)";
ChangeEnvironmentOpenProject();
}
#endregion
#region SaveProject
public void SaveProject(object sender, EventArgs e)
{
if (_contentProject == null) return;
@ -166,9 +189,11 @@ namespace ANX.ContentCompiler.GUI
RecentProjects.Remove(ProjectPath);
RecentProjects.Add(ProjectPath);
}
#endregion
#region SaveProjectAs
public void SaveProjectAs(object sender, EventArgs e)
{
using (var dlg = new SaveFileDialog())
@ -183,25 +208,42 @@ namespace ANX.ContentCompiler.GUI
}
}
}
#endregion
#region CleanProject
public void CleanProject()
{
if (Directory.Exists(ProjectOutputDir))
Directory.Delete(ProjectOutputDir, true);
}
#endregion
#region BuildProject
public void BuildProject(object sender, EventArgs e)
{
DisableUI();
BuildContent builderTask = new BuildContent();
builderTask.BuildLogger = new CCompilerBuildLogger();
builderTask.OutputDirectory = _contentProject.OutputDirectory;
builderTask.TargetPlatform = _contentProject.Platform;
builderTask.TargetProfile = _contentProject.Profile;
builderTask.CompressContent = false;
var builderTask = new BuildContent
{
BuildLogger = new CCompilerBuildLogger(),
OutputDirectory = _contentProject.OutputDirectory,
TargetPlatform = _contentProject.Platform,
TargetProfile = _contentProject.Profile,
CompressContent = false
};
try
{
foreach (var dir in _contentProject.BuildItems.Select(buildItem => Path.GetDirectoryName(buildItem.OutputFilename)).Where(dir => !Directory.Exists(dir)))
{
Directory.CreateDirectory(dir);
}
builderTask.Execute(_contentProject.BuildItems);
ribbonTextBox.AddMessage("[Info] Build process successfully finished.");
}
catch(Exception ex)
catch (Exception ex)
{
ribbonTextBox.AddMessage("[ERROR] " + ex.ToString() + "\n Stack: " + ex.StackTrace);
ribbonTextBox.AddMessage("[ERROR] " + ex + "\n Stack: " + ex.StackTrace);
EnableUI();
}
EnableUI();
@ -232,35 +274,52 @@ namespace ANX.ContentCompiler.GUI
ribbonButtonLoad.Enabled = true;
ribbonButtonClean.Enabled = true;
}
#endregion
#region FileMethods
/// <summary>
/// Adds a file to the project
/// </summary>
/// <param name="file">the file to add</param>
private void AddFile(string file)
{
if (!File.Exists(file))
throw new FileNotFoundException();
var folder = _contentProject.ContentRoot;
var node = treeView.SelectedNode;
string folder = _contentProject.ContentRoot;
TreeNode node = treeView.SelectedNode;
if (node != null)
folder = node.Name;
var absPath = ProjectFolder + Path.DirectorySeparatorChar + folder + Path.DirectorySeparatorChar + Path.GetFileName(file);
string absPath = ProjectFolder + Path.DirectorySeparatorChar + folder + Path.DirectorySeparatorChar +
Path.GetFileName(file);
if (!Directory.Exists(Path.Combine(ProjectFolder, folder)))
Directory.CreateDirectory(Path.Combine(ProjectFolder, folder));
File.Copy(file, absPath, true);
var item = new BuildItem
{
AssetName = folder.Equals(_contentProject.ContentRoot) ? Path.GetFileNameWithoutExtension(file) : folder.Replace(_contentProject.ContentRoot + Path.DirectorySeparatorChar, "") + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(file),
AssetName =
folder.Equals(_contentProject.ContentRoot)
? Path.GetFileNameWithoutExtension(file)
: folder.Replace(_contentProject.ContentRoot + Path.DirectorySeparatorChar, "") +
Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(file),
SourceFilename = absPath,
OutputFilename = ProjectOutputDir + Path.DirectorySeparatorChar + folder + Path.DirectorySeparatorChar + Path.GetFileName(file),
ImporterName = ImporterManager.GuessImporterByFileExtension(file)
OutputFilename =
ProjectOutputDir + Path.DirectorySeparatorChar + folder + Path.DirectorySeparatorChar +
Path.GetFileNameWithoutExtension(file) + ".xnb", //<- Change this if you want some other extension (i.e. to annoy modders or whatever)
ImporterName = ImporterManager.GuessImporterByFileExtension(file)//,
//ProcessorName = ProcessorManager.GuessImporterByFileExtension(file) //<- This still needs to be implemented, Pipeline devs! *poke*
};
_contentProject.BuildItems.Add(item);
}
/// <summary>
/// Wrapper for adding moar files! (Just a foreach loop, nothing special)
/// </summary>
/// <param name="files">files to add</param>
public void AddFiles(string[] files)
{
foreach (var file in files)
foreach (string file in files)
{
AddFile(file);
}
@ -270,34 +329,35 @@ namespace ANX.ContentCompiler.GUI
public void AddFolder(string name)
{
string folder = _contentProject.ContentRoot;
var node = treeView.SelectedNode;
TreeNode node = treeView.SelectedNode;
if (node != null)
folder = node.Name;
else
node = treeView.Nodes[0];
var newFolder = new TreeNode(name) { Name = folder + Path.DirectorySeparatorChar + name};
var newFolder = new TreeNode(name) {Name = folder + Path.DirectorySeparatorChar + name};
node.Nodes.Add(newFolder);
}
public void RemoveFile(string name)
{
}
public void RemoveFiles(string[] files)
{
}
public void RemoveFolder(string name)
{
}
#endregion
#region EnvironmentStates
/// <summary>
/// Changes the current editor state to the "No project open" state
/// </summary>
public void ChangeEnvironmentStartState()
{
editingState.Visible = false;
@ -308,6 +368,9 @@ namespace ANX.ContentCompiler.GUI
propertyGrid.SelectedObject = null;
}
/// <summary>
/// Changes the current editor state to edit mode
/// </summary>
public void ChangeEnvironmentOpenProject()
{
startState.Visible = false;
@ -317,40 +380,47 @@ namespace ANX.ContentCompiler.GUI
ProjectFolder = _contentProject.InputDirectory;
treeView.Nodes.Clear();
var rootNode = new TreeNode(ProjectName + "(" + _contentProject.ContentRoot + ")") {Name = _contentProject.ContentRoot};
var rootNode = new TreeNode(ProjectName + "(" + _contentProject.ContentRoot + ")")
{Name = _contentProject.ContentRoot};
treeView.Nodes.Add(rootNode);
var lastNode = rootNode;
foreach (var parts in _contentProject.BuildItems.Select(buildItem => buildItem.AssetName.Split(Path.DirectorySeparatorChar)).Where(parts => parts.Length >= 2))
TreeNode lastNode = rootNode;
//aaaand here comes the nasty part. Watch out, it bites...um bugs!
foreach (
var parts in
_contentProject.BuildItems.Select(
buildItem => buildItem.AssetName.Split(Path.DirectorySeparatorChar)).Where(
parts => parts.Length >= 2)) //all BuildItems which names contain more than two elements (ContentRoot + FileName), Split by SeperatorChar (=> platform independent coding :))
{
string folder = "";
string parent = _contentProject.ContentRoot;
for (int i=0; i < parts.Length - 1; i++)
for (int i = 0; i < parts.Length - 1; i++) //Examine everything between ContentRoot and fileName. If we find something, add a folder!
{
if (parts[i] == null) continue;
if (i > 0)
if (parts[i] == null) continue;
if (i > 0) //if there is already a path we need to add the new part with a SeperatorChar!
folder += Path.DirectorySeparatorChar + parts[i];
else
folder = parts[0];
folder = parts[0]; //Yay! We are first! Let's make ourselves comfortable here!
if (parts.Length > 2 && i < parts.Length -2)
if (parts.Length > 2 && i < parts.Length - 2) // if we have more than two parts we have another parent than the content root!
parent += Path.DirectorySeparatorChar + parts[i];
//else if (parts.Length == 2)
// parent += Path.DirectorySeparatorChar + parts[0];
// parent += Path.DirectorySeparatorChar + parts[0];
}
lastNode = treeView.RecursiveSearch(parent);
var node = new TreeNode(parts[parts.Length - 2]) { Name = _contentProject.ContentRoot + Path.DirectorySeparatorChar + folder };
lastNode = treeView.RecursiveSearch(parent); //Search for parent node! Often an Exception Candidate! Check the 'parent' var then.
var node = new TreeNode(parts[parts.Length - 2])
{Name = _contentProject.ContentRoot + Path.DirectorySeparatorChar + folder}; //Finally glue a new folder node together
if (!ContainsTreeNode(lastNode, node))
{
lastNode.Nodes.Add(node);
lastNode.Nodes.Add(node); // If the folder is new, add it - else it's just wasted memory :)
}
lastNode = rootNode;
}
if (_contentProject.BuildItems.Count > 0)
if (_contentProject.BuildItems.Count > 0) //Only do this when there are items, it'll get nasty soon if there isn't one!
{
foreach (var buildItem in _contentProject.BuildItems)
foreach (BuildItem buildItem in _contentProject.BuildItems)
{
String[] parts = null;
String[] parts = null; //Split by seperator char
if (buildItem.AssetName.Contains("\\"))
parts = buildItem.AssetName.Split('\\');
else if (buildItem.AssetName.Contains("/"))
@ -362,8 +432,9 @@ namespace ANX.ContentCompiler.GUI
lastNode = lastNode.Nodes[parts[i]];
}
}*/
//Add the actual files to the tree in their apropriate subdirs
string path = _contentProject.ContentRoot;
if (parts != null)
if (parts != null)
{
for (int i = 0; i < parts.Length - 1; i++)
{
@ -372,39 +443,56 @@ namespace ANX.ContentCompiler.GUI
}
if (parts != null)
{
var node = treeView.RecursiveSearch(path);
TreeNode node = treeView.RecursiveSearch(path);
if (node == null) throw new ArgumentNullException("Node not found!");
var item = new TreeNode(parts[parts.Length - 1]) {Name = buildItem.AssetName};
node.Nodes.Add(item);
}
else
else //if the node is "forever alone", put him into the rootNode to make some friends!
{
var item = new TreeNode(buildItem.AssetName) {Name = buildItem.AssetName};
treeView.Nodes[0].Nodes.Add(item);
}
}
}
}
#endregion
#region ButtonHandlers
private void ButtonQuitClick(object sender, EventArgs e)
{
Application.Exit();
}
private void ButtonMenuClick(object sender, EventArgs e)
{
ToggleMenuMode();
}
private void RibbonButtonCleanClick(object sender, EventArgs e)
{
if (!Directory.Exists(ProjectOutputDir)) return;
if (MessageBox.Show(
"You are about to delete stuff you previously built! That already built content will be lost forever (which is a very long time!). Still want to continue?",
"Delete Output?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
CleanProject();
MessageBox.Show("Your build directory has been emptied. Goodbye Files!", "Success", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
#endregion
#region WindowMoveMethods
private void LabelTitleMouseMove(object sender, MouseEventArgs e)
{
if (!_mouseDown) return;
var xoffset = MousePosition.X - _lastPos.X;
var yoffset = MousePosition.Y - _lastPos.Y;
int xoffset = MousePosition.X - _lastPos.X;
int yoffset = MousePosition.Y - _lastPos.Y;
Left += xoffset;
Top += yoffset;
_lastPos = MousePosition;
@ -420,21 +508,25 @@ namespace ANX.ContentCompiler.GUI
{
_mouseDown = false;
}
#endregion
#region TreeVieItemDesignMethods
void TreeViewItemeLeave(object sender, EventArgs e)
private void TreeViewItemeLeave(object sender, EventArgs e)
{
((ToolStripItem)sender).BackColor = Color.FromArgb(0, 64, 64, 64);
((ToolStripItem) sender).BackColor = Color.FromArgb(0, 64, 64, 64);
}
void TreeViewItemMouseEnter(object sender, EventArgs e)
private void TreeViewItemMouseEnter(object sender, EventArgs e)
{
((ToolStripItem)sender).BackColor = Color.Green;
((ToolStripItem) sender).BackColor = Color.Green;
}
#endregion
#region MenuMethods
public void ToggleMenuMode()
{
_menuMode = !_menuMode;
@ -453,19 +545,21 @@ namespace ANX.ContentCompiler.GUI
#endregion
#region ShowFirstStartStuff
private void ShowFirstStartStuff()
{
using (var dlg = new FirstStartScreen())
{
if (dlg.ShowDialog() == DialogResult.OK)
{
}
}
}
#endregion
#region SetUpColors
private void SetUpColors()
{
BackColor = Settings.MainColor;
@ -486,9 +580,11 @@ namespace ANX.ContentCompiler.GUI
propertyGrid.ViewBackColor = Settings.DarkMainColor;
propertyGrid.ViewForeColor = Settings.ForeColor;
}
#endregion
#region Exit
private void MainWindowFormClosed(object sender, FormClosedEventArgs e)
{
Settings.Save(SettingsFile);
@ -497,18 +593,22 @@ namespace ANX.ContentCompiler.GUI
private void MainWindowFormClosing(object sender, FormClosingEventArgs e)
{
}
#endregion
#region TreeViewEvents
private void TreeViewAfterSelect(object sender, TreeViewEventArgs e)
{
if (treeView.SelectedNode == treeView.TopNode)
propertyGrid.SelectedObject = _contentProject;
else
{
foreach (var buildItem in _contentProject.BuildItems.Where(buildItem => buildItem.AssetName.Equals(treeView.SelectedNode.Name)))
foreach (
BuildItem buildItem in
_contentProject.BuildItems.Where(
buildItem => buildItem.AssetName.Equals(treeView.SelectedNode.Name)))
{
propertyGrid.SelectedObject = buildItem;
}
@ -523,6 +623,7 @@ namespace ANX.ContentCompiler.GUI
#endregion
#region PropertyGridEvents
private void PropertyGridPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
ProjectName = _contentProject.Name;
@ -533,12 +634,14 @@ namespace ANX.ContentCompiler.GUI
{
foreach (BuildItem buildItem in _contentProject.BuildItems)
{
buildItem.AssetName = buildItem.AssetName.Replace((string)e.OldValue, _contentProject.ContentRoot);
buildItem.AssetName = buildItem.AssetName.Replace((string) e.OldValue, _contentProject.ContentRoot);
}
treeView.Nodes[0].RecursivelyReplacePartOfName((string)e.OldValue, _contentProject.ContentRoot);
treeView.Nodes[0].RecursivelyReplacePartOfName((string) e.OldValue, _contentProject.ContentRoot);
}
ChangeEnvironmentOpenProject();
}
#endregion
}
}

View File

@ -1,123 +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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="treeViewContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>16, 30</value>
</metadata>
</root>

View File

@ -1,19 +1,23 @@
using System;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
internal static class Program
{
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
private static void Main()
private static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainWindow());
Application.Run(new MainWindow(args));
}
}
}

View File

@ -2,18 +2,23 @@
using System.Collections.Generic;
using System.Text;
using System.Xml;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public class RecentProjects : List<String>
{
private static readonly string Path =
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + System.IO.Path.DirectorySeparatorChar + "ANX Content Compiler" + System.IO.Path.DirectorySeparatorChar + "recentProjects.ees";
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +
System.IO.Path.DirectorySeparatorChar + "ANX Content Compiler" + System.IO.Path.DirectorySeparatorChar +
"recentProjects.ees";
public RecentProjects()
: base(10)
{
}
public void Save()

View File

@ -4,9 +4,13 @@ using System.Drawing;
using System.IO;
using System.Text;
using System.Xml;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(90)]
[TestState(TestStateAttribute.TestState.Tested)]
public static class Settings
{
public static String DefaultProjectPath { get; set; }
@ -17,12 +21,13 @@ namespace ANX.ContentCompiler.GUI
public static Color AccentColor { get; set; }
public static Color AccentColor2 { get; set; }
public static Color AccentColor3 { get; set; }
public static List<String> RecentProjects { get; set; }
public static List<String> RecentProjects { get; set; }
public static void Defaults()
{
DefaultProjectPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
"ANX Content Compiler" + Path.DirectorySeparatorChar + "4.0" + Path.DirectorySeparatorChar);
"ANX Content Compiler" + Path.DirectorySeparatorChar + "4.0" +
Path.DirectorySeparatorChar);
RecentProjects = new List<string>();
MainColor = Color.FromArgb(64, 64, 64);
//MainColor = Color.Goldenrod;
@ -32,7 +37,7 @@ namespace ANX.ContentCompiler.GUI
//LightMainColor = Color.Gold;
ForeColor = Color.White;
//ForeColor = Color.DarkRed;
AccentColor = Color.FromArgb(0, 192, 0);
AccentColor = Color.FromArgb(0, 192, 0);
//AccentColor = Color.HotPink;
AccentColor2 = Color.LimeGreen;
//AccentColor2 = Color.IndianRed;
@ -42,7 +47,8 @@ namespace ANX.ContentCompiler.GUI
public static void Load(string path)
{
DefaultProjectPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
"ANX Content Compiler" + Path.DirectorySeparatorChar + "4.0" + Path.DirectorySeparatorChar);
"ANX Content Compiler" + Path.DirectorySeparatorChar + "4.0" +
Path.DirectorySeparatorChar);
RecentProjects = new List<string>();
if (!File.Exists(path)) return;
XmlReader reader = new XmlTextReader(path);
@ -95,7 +101,13 @@ namespace ANX.ContentCompiler.GUI
if (!Directory.Exists(Path.GetDirectoryName(path)))
Directory.CreateDirectory(Path.GetDirectoryName(path));
XmlWriter writer = XmlWriter.Create(path, new XmlWriterSettings() { Encoding = Encoding.UTF8, Indent = true, NewLineHandling = NewLineHandling.Entitize });
XmlWriter writer = XmlWriter.Create(path,
new XmlWriterSettings
{
Encoding = Encoding.UTF8,
Indent = true,
NewLineHandling = NewLineHandling.Entitize
});
writer.WriteStartDocument();
writer.WriteStartElement("CCompiler4Settings");
writer.WriteStartElement("MainColor");
@ -120,7 +132,7 @@ namespace ANX.ContentCompiler.GUI
writer.WriteValue(GetStringFromColor(AccentColor3));
writer.WriteFullEndElement();
writer.WriteStartElement("RecentProjects");
foreach (var recentProject in RecentProjects)
foreach (string recentProject in RecentProjects)
{
writer.WriteStartElement("Path");
writer.WriteString(recentProject);
@ -140,8 +152,8 @@ namespace ANX.ContentCompiler.GUI
private static Color GetColorFromString(string xml)
{
var s = xml.Split(new[] {','}, 3);
string[] s = xml.Split(new[] {','}, 3);
return Color.FromArgb(Convert.ToInt32(s[0]), Convert.ToInt32(s[1]), Convert.ToInt32(s[2]));
}
}
}
}

View File

@ -1,9 +1,13 @@
using System;
using System.Windows.Forms;
using ANX.ContentCompiler.GUI.Dialogues;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.States
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(90)] //TODO: Add click event to open preview window!
[TestState(TestStateAttribute.TestState.Tested)]
public partial class EditingState : UserControl
{
public EditingState()
@ -43,6 +47,5 @@ namespace ANX.ContentCompiler.GUI.States
{
MainWindow.Instance.BuildProject(sender, e);
}
}
}
}

View File

@ -1,15 +1,13 @@
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 ANX.ContentCompiler.GUI.Dialogues;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.States
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(90)] //TODO: Actually implement Import dialogue, for now just using the usual one
[TestState(TestStateAttribute.TestState.Tested)]
public partial class MenuState : UserControl
{
public MenuState()
@ -18,6 +16,7 @@ namespace ANX.ContentCompiler.GUI.States
}
#region HelperMethods
private void SetUpColors()
{
BackColor = Settings.MainColor;
@ -60,15 +59,18 @@ namespace ANX.ContentCompiler.GUI.States
panelSaveAs.Visible = false;
panelSettings.Visible = false;
}
#endregion
#region MenuButtons
private void ButtonNewClick(object sender, EventArgs e)
{
ResetMenuState();
buttonNew.BackColor = Settings.AccentColor;
panelNew.Visible = true;
}
private void ButtonOpenClick(object sender, EventArgs e)
{
ResetMenuState();
@ -108,9 +110,11 @@ namespace ANX.ContentCompiler.GUI.States
ResetMenuState();
Application.Exit();
}
#endregion
#region MenuNew
private void ArrowButtonFileClick(object sender, EventArgs e)
{
using (var dlg = new OpenFileDialog())
@ -139,9 +143,11 @@ namespace ANX.ContentCompiler.GUI.States
{
MainWindow.Instance.NewProject(sender, e);
}
#endregion
#region MenuOpen
private void ArrowButtonOpenClick(object sender, EventArgs e)
{
MainWindow.Instance.OpenProjectDialog(sender, e);
@ -153,9 +159,11 @@ namespace ANX.ContentCompiler.GUI.States
MainWindow.Instance.OpenProjectDialog(sender, e);
MainWindow.Instance.ToggleMenuMode();
}
#endregion
#region MenuSave
private void ArrowButtonSaveAsCprojClick(object sender, EventArgs e)
{
MainWindow.Instance.SaveProjectAs(sender, e);
@ -167,8 +175,10 @@ namespace ANX.ContentCompiler.GUI.States
MainWindow.Instance.SaveProjectAs(sender, e);
MainWindow.Instance.ToggleMenuMode();
}
#endregion
#region Load
private void MenuState_Load(object sender, EventArgs e)
{
SetUpColors();
@ -176,5 +186,6 @@ namespace ANX.ContentCompiler.GUI.States
buttonNew.BackColor = Settings.AccentColor;
panelNew.Visible = true;
}
#endregion
}
}
}

View File

@ -1,7 +1,12 @@
using System.Windows.Forms;
using System;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI.States
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public partial class StartState : UserControl
{
public StartState()
@ -15,17 +20,17 @@ namespace ANX.ContentCompiler.GUI.States
ForeColor = Settings.ForeColor;
}
private void StartStateLoad(object sender, System.EventArgs e)
private void StartStateLoad(object sender, EventArgs e)
{
SetUpColor();
}
private void ArrowButtonNewClick(object sender, System.EventArgs e)
private void ArrowButtonNewClick(object sender, EventArgs e)
{
MainWindow.Instance.NewProject(sender, e);
}
private void ArrowButtonLoadClick(object sender, System.EventArgs e)
private void ArrowButtonLoadClick(object sender, EventArgs e)
{
MainWindow.Instance.OpenProjectDialog(sender, e);
}

View File

@ -1,8 +1,12 @@
using System;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
namespace ANX.ContentCompiler.GUI
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
public static class TreeViewExtensions
{
/// <summary>
@ -18,7 +22,7 @@ namespace ANX.ContentCompiler.GUI
if (treeNode.Name.Equals(name))
return treeNode;
var retNode = treeNode.RecursiveSearch(name);
TreeNode retNode = treeNode.RecursiveSearch(name);
if (retNode != null)
{
return retNode;
@ -40,7 +44,7 @@ namespace ANX.ContentCompiler.GUI
if (node.Name.Equals(name))
return node;
var ret = node.RecursiveSearch(name);
TreeNode ret = node.RecursiveSearch(name);
if (ret != null)
return ret;
}
@ -63,4 +67,4 @@ namespace ANX.ContentCompiler.GUI
}
}
}
}
}