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

View File

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

View File

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

View File

@ -1,5 +1,6 @@
#region Using Statements
using System;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
using ANX.Framework.NonXNA.Development;
@ -71,15 +72,29 @@ namespace ANX.ContentCompiler.GUI.Dialogues
private void ButtonNextClick(object sender, EventArgs e)
{
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!",
{
MessageBox.Show("A folder "+ textBoxLocation.Text +" this name already exists in that path!",
"Will not overwrite existing stuff", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
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
}
}

View File

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

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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
// der Code erneut generiert wird.

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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
// der Code erneut generiert wird.