Content Compiler:

-Changed behavior of the NewProjectScreen to fix a wrong message when changing the project path manually.
- Fixed application icon
- Fixed a bug when trying to open a preview with nothing selected
This commit is contained in:
SND\eagleeyestudios_cp 2012-11-17 12:23:47 +00:00 committed by Konstantin Koch
parent 86936c2004
commit 47c57e3222
7 changed files with 29 additions and 6 deletions

View File

@ -11,6 +11,11 @@
</SccAuxPath> </SccAuxPath>
<SccProvider> <SccProvider>
</SccProvider> </SccProvider>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>anx.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@ -230,6 +235,7 @@
<None Include="Resources\arrow1.png" /> <None Include="Resources\arrow1.png" />
<None Include="Resources\arrow2.png" /> <None Include="Resources\arrow2.png" />
<None Include="Resources\anx.ico" /> <None Include="Resources\anx.ico" />
<Content Include="anx.ico" />
<Content Include="Resources\clouds.png" /> <Content Include="Resources\clouds.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

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

View File

@ -130,6 +130,7 @@
this.textBoxLocation.Name = "textBoxLocation"; this.textBoxLocation.Name = "textBoxLocation";
this.textBoxLocation.Size = new System.Drawing.Size(402, 22); this.textBoxLocation.Size = new System.Drawing.Size(402, 22);
this.textBoxLocation.TabIndex = 19; this.textBoxLocation.TabIndex = 19;
this.textBoxLocation.TextChanged += new System.EventHandler(this.TextBoxLocationTextChanged);
// //
// labelLocation // labelLocation
// //

View File

@ -1,5 +1,6 @@
#region Using Statements #region Using Statements
using System; using System;
using System.Globalization;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using ANX.Framework.NonXNA.Development; using ANX.Framework.NonXNA.Development;
@ -71,15 +72,29 @@ namespace ANX.ContentCompiler.GUI.Dialogues
private void ButtonNextClick(object sender, EventArgs e) private void ButtonNextClick(object sender, EventArgs e)
{ {
if (String.IsNullOrEmpty(textBoxName.Text)) if (String.IsNullOrEmpty(textBoxName.Text))
MessageBox.Show("Give your child a name!", "Missing value", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("Give your child a name!", "Missing value", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else if (Directory.Exists(textBoxLocation.Text)) else if (Directory.Exists(textBoxLocation.Text))
MessageBox.Show("A project with this name already exists in that path!", {
MessageBox.Show("A folder "+ textBoxLocation.Text +" this name already exists in that path!",
"Will not overwrite existing stuff", MessageBoxButtons.OK, MessageBoxIcon.Error); "Will not overwrite existing stuff", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else else
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
} }
private void TextBoxLocationTextChanged(object sender, EventArgs e)
{
if (!textBoxLocation.Text.EndsWith(textBoxName.Text))
{
if (textBoxLocation.Text.EndsWith(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture)))
textBoxLocation.Text += textBoxName.Text;
else
textBoxLocation.Text += Path.DirectorySeparatorChar + textBoxName.Text;
}
}
#endregion #endregion
} }
} }

View File

@ -889,6 +889,8 @@ namespace ANX.ContentCompiler.GUI
internal void ShowPreview() internal void ShowPreview()
{ {
BuildItem buildItem = null; BuildItem buildItem = null;
if (treeView.SelectedNode == null)
return;
foreach (var item in _contentProject.BuildItems.Where(item => item.AssetName == treeView.SelectedNode.Text)) foreach (var item in _contentProject.BuildItems.Where(item => item.AssetName == treeView.SelectedNode.Text))
{ {
buildItem = item; buildItem = item;

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.17929 // Laufzeitversion:4.0.30319.18010
// //
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird. // der Code erneut generiert wird.

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.17929 // Laufzeitversion:4.0.30319.18010
// //
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird. // der Code erneut generiert wird.