From 47c57e3222cd730e74d3cf382a6fd5959b15b876 Mon Sep 17 00:00:00 2001 From: "SND\\eagleeyestudios_cp" Date: Sat, 17 Nov 2012 12:23:47 +0000 Subject: [PATCH] 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 --- .../ANX.ContentCompiler.GUI.csproj | 6 ++++++ Tools/ANXContentCompilerGUI/App.config | 5 ++--- .../Dialogues/NewProjectScreen.Designer.cs | 1 + .../Dialogues/NewProjectScreen.cs | 17 ++++++++++++++++- Tools/ANXContentCompilerGUI/MainWindow.cs | 2 ++ .../Properties/Resources.Designer.cs | 2 +- .../ShowStrings.Designer.cs | 2 +- 7 files changed, 29 insertions(+), 6 deletions(-) diff --git a/Tools/ANXContentCompilerGUI/ANX.ContentCompiler.GUI.csproj b/Tools/ANXContentCompilerGUI/ANX.ContentCompiler.GUI.csproj index ad05e162..c28a7201 100644 --- a/Tools/ANXContentCompilerGUI/ANX.ContentCompiler.GUI.csproj +++ b/Tools/ANXContentCompilerGUI/ANX.ContentCompiler.GUI.csproj @@ -11,6 +11,11 @@ + v4.0 + Client + + + anx.ico @@ -230,6 +235,7 @@ + diff --git a/Tools/ANXContentCompilerGUI/App.config b/Tools/ANXContentCompilerGUI/App.config index 50ff016f..2ede14cf 100644 --- a/Tools/ANXContentCompilerGUI/App.config +++ b/Tools/ANXContentCompilerGUI/App.config @@ -1,9 +1,8 @@ - - + - \ No newline at end of file + diff --git a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.Designer.cs b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.Designer.cs index b825b67b..4cb6def2 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.Designer.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.Designer.cs @@ -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 // diff --git a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.cs index a8e19118..a03f0ffa 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.cs @@ -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 + } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/MainWindow.cs b/Tools/ANXContentCompilerGUI/MainWindow.cs index 85bfe592..0c10ce2f 100644 --- a/Tools/ANXContentCompilerGUI/MainWindow.cs +++ b/Tools/ANXContentCompilerGUI/MainWindow.cs @@ -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; diff --git a/Tools/ANXContentCompilerGUI/Properties/Resources.Designer.cs b/Tools/ANXContentCompilerGUI/Properties/Resources.Designer.cs index 43b1ab76..5d844ac0 100644 --- a/Tools/ANXContentCompilerGUI/Properties/Resources.Designer.cs +++ b/Tools/ANXContentCompilerGUI/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // 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. diff --git a/Tools/ANXContentCompilerGUI/ShowStrings.Designer.cs b/Tools/ANXContentCompilerGUI/ShowStrings.Designer.cs index 08582c1f..7b68e4a3 100644 --- a/Tools/ANXContentCompilerGUI/ShowStrings.Designer.cs +++ b/Tools/ANXContentCompilerGUI/ShowStrings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // 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.