diff --git a/Tools/ANXContentCompilerGUI/CCompilerBuildLogger.cs b/Tools/ANXContentCompilerGUI/CCompilerBuildLogger.cs index 9c20c247..1d42eb7f 100644 --- a/Tools/ANXContentCompilerGUI/CCompilerBuildLogger.cs +++ b/Tools/ANXContentCompilerGUI/CCompilerBuildLogger.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using ANX.Framework.Content.Pipeline; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI { diff --git a/Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs b/Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs index e3271506..8c81031d 100644 --- a/Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs +++ b/Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs @@ -1,7 +1,14 @@ -using System; +#region Using Statements +using System; using System.ComponentModel; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Controls { @@ -15,13 +22,16 @@ namespace ANX.ContentCompiler.GUI.Controls InitializeComponent(); } + #region Properties [EditorBrowsable(EditorBrowsableState.Always)] public String Content { get { return labelText.Text; } set { labelText.Text = value; } } + #endregion + #region Private private void ArrowButtonMouseEnter(object sender, EventArgs e) { BorderStyle = BorderStyle.FixedSingle; @@ -62,5 +72,6 @@ namespace ANX.ContentCompiler.GUI.Controls BackColor = Settings.MainColor; ForeColor = Settings.ForeColor; } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Controls/RibbonButton.cs b/Tools/ANXContentCompilerGUI/Controls/RibbonButton.cs index 06da897a..2561095f 100644 --- a/Tools/ANXContentCompilerGUI/Controls/RibbonButton.cs +++ b/Tools/ANXContentCompilerGUI/Controls/RibbonButton.cs @@ -1,8 +1,15 @@ -using System; +#region Using Statements +using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Controls { @@ -11,25 +18,31 @@ namespace ANX.ContentCompiler.GUI.Controls [TestState(TestStateAttribute.TestState.Tested)] public partial class RibbonButton : UserControl { + #region Constructor public RibbonButton() { InitializeComponent(); } + #endregion - [Category("Content"), Description("Text der auf dem Button gezeigt werden soll.")] + #region Properties + [Category("Content"), Description("Text that will be displayed on the button.")] public String Content { get { return labelText.Text; } set { labelText.Text = value; } } - [Category("Design"), Description("Das Bild, das als Icon dienen soll. (60x60)")] + [Category("Design"), Description("Picture that will be the icon. (60x60)")] public Image Image { get { return pictureBox.Image; } set { pictureBox.Image = value; } } + #endregion + + #region Private private void RibbonButtonMouseEnter(object sender, EventArgs e) { BackColor = Settings.LightMainColor; @@ -62,5 +75,6 @@ namespace ANX.ContentCompiler.GUI.Controls ForeColor = Settings.ForeColor; Refresh(); } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Controls/RibbonTextBox.cs b/Tools/ANXContentCompilerGUI/Controls/RibbonTextBox.cs index 0845bf0f..873ba53f 100644 --- a/Tools/ANXContentCompilerGUI/Controls/RibbonTextBox.cs +++ b/Tools/ANXContentCompilerGUI/Controls/RibbonTextBox.cs @@ -1,9 +1,16 @@ -using System; +#region Using Statements +using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using ANX.ContentCompiler.GUI.Dialogues; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Controls { @@ -12,18 +19,23 @@ namespace ANX.ContentCompiler.GUI.Controls [TestState(TestStateAttribute.TestState.Tested)] public partial class RibbonTextBox : UserControl { + #region Constructor public RibbonTextBox() { InitializeComponent(); } + #endregion + #region Public public void AddMessage(string msg) { List contents = textBox.Lines.ToList(); contents.Add(msg); textBox.Lines = contents.ToArray(); } + #endregion + #region Private private void ButtonDownClick(object sender, EventArgs e) { using (var dlg = new ErrorLogScreen(textBox.Lines)) @@ -31,5 +43,6 @@ namespace ANX.ContentCompiler.GUI.Controls dlg.ShowDialog(); } } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/ErrorLogScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/ErrorLogScreen.cs index 719ba92a..e1109b10 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/ErrorLogScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/ErrorLogScreen.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { @@ -9,13 +16,16 @@ namespace ANX.ContentCompiler.GUI.Dialogues [TestState(TestStateAttribute.TestState.Tested)] public partial class ErrorLogScreen : Form { + #region Constructor public ErrorLogScreen(string[] errorLog) { InitializeComponent(); SetUpColors(); textBox.Lines = errorLog; } + #endregion + #region Private Methods private void SetUpColors() { BackColor = Settings.MainColor; @@ -31,6 +41,7 @@ namespace ANX.ContentCompiler.GUI.Dialogues buttonCancel.FlatAppearance.BorderColor = Settings.LightMainColor; } + #region Events private void ButtonNextClick(object sender, EventArgs e) { DialogResult = DialogResult.OK; @@ -41,5 +52,7 @@ namespace ANX.ContentCompiler.GUI.Dialogues Clipboard.SetText(textBox.Text); buttonCancel.Text = "Copied."; } + #endregion + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/FirstStartScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/FirstStartScreen.cs index 297c6c0a..465e607f 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/FirstStartScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/FirstStartScreen.cs @@ -1,13 +1,21 @@ -using System.Windows.Forms; +#region Using Statements +using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { [Developer("SilentWarrior/Eagle Eye Studios")] - [PercentageComplete(100)] //TODO: Implement tour in MainWindow and launch it from here! + [PercentageComplete(100)] [TestState(TestStateAttribute.TestState.Tested)] public partial class FirstStartScreen : Form { + #region Constructor public FirstStartScreen() { InitializeComponent(); @@ -20,10 +28,13 @@ namespace ANX.ContentCompiler.GUI.Dialogues button2.FlatAppearance.MouseDownBackColor = Settings.AccentColor3; button3.FlatAppearance.MouseDownBackColor = Settings.AccentColor3; } + #endregion + #region Private Methods private void Button2Click(object sender, System.EventArgs e) { MainWindow.Instance.StartShow(); } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/NewFolderScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/NewFolderScreen.cs index a9f210c5..d90975a6 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/NewFolderScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/NewFolderScreen.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { @@ -9,12 +16,15 @@ namespace ANX.ContentCompiler.GUI.Dialogues [TestState(TestStateAttribute.TestState.Tested)] public partial class NewFolderScreen : Form { + #region Constructor public NewFolderScreen() { InitializeComponent(); SetUpColors(); } + #endregion + #region Private Methods private void SetUpColors() { BackColor = Settings.MainColor; @@ -40,5 +50,6 @@ namespace ANX.ContentCompiler.GUI.Dialogues else DialogResult = DialogResult.OK; } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectImportersScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectImportersScreen.cs index aea15ec1..74608e3c 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectImportersScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectImportersScreen.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { @@ -9,12 +16,15 @@ namespace ANX.ContentCompiler.GUI.Dialogues [TestState(TestStateAttribute.TestState.InProgress)] public partial class NewProjectImportersScreen : Form { + #region Constructor public NewProjectImportersScreen() { InitializeComponent(); SetUpColors(); } + #endregion + #region Private Methods private void SetUpColors() { BackColor = Settings.MainColor; @@ -71,5 +81,6 @@ namespace ANX.ContentCompiler.GUI.Dialogues else DialogResult = DialogResult.OK; } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectOutputScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectOutputScreen.cs index f9e79e61..5d697146 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectOutputScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectOutputScreen.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { @@ -9,12 +16,15 @@ namespace ANX.ContentCompiler.GUI.Dialogues [TestState(TestStateAttribute.TestState.InProgress)] public partial class NewProjectOutputScreen : Form { + #region Constructor public NewProjectOutputScreen() { InitializeComponent(); SetUpColors(); } + #endregion + #region Private Methods private void ArrowButtonYesClick(object sender, EventArgs e) { labelLocation.Visible = true; @@ -63,5 +73,6 @@ namespace ANX.ContentCompiler.GUI.Dialogues } DialogResult = DialogResult.None; } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.cs index b7667086..a8e19118 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectScreen.cs @@ -1,7 +1,14 @@ -using System; +#region Using Statements +using System; using System.IO; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { @@ -10,13 +17,16 @@ namespace ANX.ContentCompiler.GUI.Dialogues [TestState(TestStateAttribute.TestState.Tested)] public partial class NewProjectScreen : Form { + #region Constructor public NewProjectScreen() { InitializeComponent(); textBoxLocation.Text = Settings.DefaultProjectPath; SetUpColors(); } + #endregion + #region Private Methods private void SetUpColors() { BackColor = Settings.MainColor; @@ -69,5 +79,7 @@ namespace ANX.ContentCompiler.GUI.Dialogues else DialogResult = DialogResult.OK; } + + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectSummaryScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectSummaryScreen.cs index 243b3e2f..3f089e96 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/NewProjectSummaryScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/NewProjectSummaryScreen.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { @@ -9,6 +16,7 @@ namespace ANX.ContentCompiler.GUI.Dialogues [TestState(TestStateAttribute.TestState.InProgress)] public partial class NewProjectSummaryScreen : Form { + #region Contructor public NewProjectSummaryScreen(String projectName, String projectDir, String outputDir, bool customImporters, String customImportersDir, int customImportersFound, int customProcessorsFound) { @@ -31,7 +39,9 @@ namespace ANX.ContentCompiler.GUI.Dialogues "Processors: " + customProcessorsFound; } } + #endregion + #region Private Methods private void SetUpColors() { BackColor = Settings.MainColor; @@ -50,5 +60,6 @@ namespace ANX.ContentCompiler.GUI.Dialogues { DialogResult = DialogResult.OK; } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/OpenProjectScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/OpenProjectScreen.cs index bfba5ee2..4cb3171a 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/OpenProjectScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/OpenProjectScreen.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { @@ -9,6 +16,7 @@ namespace ANX.ContentCompiler.GUI.Dialogues [TestState(TestStateAttribute.TestState.Tested)] public partial class OpenProjectScreen : Form { + #region Constructor public OpenProjectScreen() { InitializeComponent(); @@ -19,7 +27,9 @@ namespace ANX.ContentCompiler.GUI.Dialogues listBoxRecentProjects.Items.Add(project); } } + #endregion + #region Private Methods private void SetUpColors() { BackColor = Settings.MainColor; @@ -65,5 +75,6 @@ namespace ANX.ContentCompiler.GUI.Dialogues else DialogResult = DialogResult.OK; } + #endregion } } \ No newline at end of file diff --git a/Tools/ANXContentCompilerGUI/Dialogues/PreviewScreen.Designer.cs b/Tools/ANXContentCompilerGUI/Dialogues/PreviewScreen.Designer.cs index 7098b360..90a05642 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/PreviewScreen.Designer.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/PreviewScreen.Designer.cs @@ -100,9 +100,8 @@ this.Name = "PreviewScreen"; this.ShowIcon = false; this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Preview"; - this.Load += new System.EventHandler(this.PreviewScreenLoad); this.drawSurface.ResumeLayout(false); this.ResumeLayout(false); diff --git a/Tools/ANXContentCompilerGUI/Dialogues/PreviewScreen.cs b/Tools/ANXContentCompilerGUI/Dialogues/PreviewScreen.cs index 5b3c49fe..c0eb37ed 100644 --- a/Tools/ANXContentCompilerGUI/Dialogues/PreviewScreen.cs +++ b/Tools/ANXContentCompilerGUI/Dialogues/PreviewScreen.cs @@ -1,30 +1,35 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; +#region Using Statements +using System; using System.Drawing; using System.IO; -using System.Linq; -using System.Text; using System.Threading; using System.Windows.Forms; -using ANX.Framework.Content; using ANX.Framework.Content.Pipeline; using ANX.Framework.Content.Pipeline.Tasks; using ANX.Framework.Graphics; +using ANX.Framework.NonXNA.Development; using Timer = System.Windows.Forms.Timer; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.Dialogues { + [PercentageComplete(50)] + [Developer("SilentWarrior/Eagle Eye Studios")] + [TestState(TestStateAttribute.TestState.InProgress)] public partial class PreviewScreen : Form { #region Fields private Point _lastPos; private bool _mouseDown; - private readonly BuildItem _item; + private BuildItem _item; private Thread _loaderThread; - private readonly string _outputFile; - private readonly string _outputDir; + private string _outputFile; + private string _outputDir; private volatile bool _started; private volatile bool _error; private volatile string _errorMessage; @@ -35,12 +40,10 @@ namespace ANX.ContentCompiler.GUI.Dialogues private SpriteBatch _batch; #endregion - public PreviewScreen(BuildItem item) + #region Constructor + public PreviewScreen() { InitializeComponent(); - _item = item; - _outputFile = Path.GetTempFileName(); - _outputDir = Path.GetTempPath(); _graphicsDevice = new GraphicsDevice( GraphicsAdapter.DefaultAdapter, GraphicsProfile.HiDef, @@ -53,6 +56,7 @@ namespace ANX.ContentCompiler.GUI.Dialogues PresentationInterval = PresentInterval.Default, }); } + #endregion #region WindowMoveMethods @@ -79,12 +83,54 @@ namespace ANX.ContentCompiler.GUI.Dialogues #endregion + #region Events private void ButtonQuitClick(object sender, EventArgs e) { Close(); DialogResult = DialogResult.Cancel; } + + void CheckThread(object sender, EventArgs e) + { + if (!_started) + { + ((Timer)sender).Interval = 100; + _loaderThread = new Thread(CompileFile); + _loaderThread.Start(); + _started = true; + } + else + { + if (_loaderThread.IsAlive) + return; + if (_error) + { + labelStatus.Text = "Loading of Preview failed with: \n" + _errorMessage; + return; + } + labelStatus.Text = "Loading successful"; + labelStatus.Hide(); + _tickTimer = new Timer { Interval = 120 }; + _tickTimer.Tick += Tick; + _batch = new SpriteBatch(_graphicsDevice); + _tickTimer.Start(); + } + } + + void Tick(object sender, EventArgs e) + { + _graphicsDevice.Clear(Framework.Color.CornflowerBlue); + if (_processor == "TextureProcessor") + { + _batch.Begin(); + + _batch.End(); + } + } + #endregion + + #region Public methods public void CompileFile() { var builderTask = new BuildContent @@ -117,49 +163,16 @@ namespace ANX.ContentCompiler.GUI.Dialogues } } - private void PreviewScreenLoad(object sender, EventArgs e) + public void SetFile(BuildItem item) { - _checkTimer = new Timer {Interval = 1000}; + labelStatus.Text = "Loading Preview..."; + _item = item; + _outputFile = Path.GetTempFileName(); + _outputDir = Path.GetTempPath(); + _checkTimer = new Timer { Interval = 1000 }; _checkTimer.Tick += CheckThread; _checkTimer.Start(); } - - void CheckThread(object sender, EventArgs e) - { - if (!_started) - { - ((Timer) sender).Interval = 100; - _loaderThread = new Thread(CompileFile); - _loaderThread.Start(); - _started = true; - } - else - { - if (_loaderThread.IsAlive) - return; - if (_error) - { - labelStatus.Text = "Loading of Preview failed with: \n" + _errorMessage; - return; - } - labelStatus.Text = "Loading successful"; - labelStatus.Hide(); - _tickTimer = new Timer {Interval = 120}; - _tickTimer.Tick += Tick; - _batch = new SpriteBatch(_graphicsDevice); - _tickTimer.Start(); - } - } - - void Tick(object sender, EventArgs e) - { - _graphicsDevice.Clear(Framework.Color.CornflowerBlue); - if (_processor == "TextureProcessor") - { - _batch.Begin(); - - _batch.End(); - } - } + #endregion } } diff --git a/Tools/ANXContentCompilerGUI/FakeBuildLogger.cs b/Tools/ANXContentCompilerGUI/FakeBuildLogger.cs new file mode 100644 index 00000000..f3680129 --- /dev/null +++ b/Tools/ANXContentCompilerGUI/FakeBuildLogger.cs @@ -0,0 +1,35 @@ +using ANX.Framework.Content.Pipeline; +using ANX.Framework.NonXNA.Development; + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.ContentCompiler.GUI +{ + [PercentageComplete(100)] + [Developer("SilentWarrior/Eagle Eye Studios")] + [TestState(TestStateAttribute.TestState.Tested)] + public class FakeBuildLogger : ContentBuildLogger + { + #region Overrides of ContentBuildLogger + + public override void LogImportantMessage(string message, params object[] messageArgs) + { + + } + + public override void LogMessage(string message, params object[] messageArgs) + { + + } + + public override void LogWarning(string helpLink, ContentIdentity contentIdentity, string message, params object[] messageArgs) + { + + } + + #endregion + } +} diff --git a/Tools/ANXContentCompilerGUI/MainWindow.cs b/Tools/ANXContentCompilerGUI/MainWindow.cs index 1949b8c3..85bfe592 100644 --- a/Tools/ANXContentCompilerGUI/MainWindow.cs +++ b/Tools/ANXContentCompilerGUI/MainWindow.cs @@ -1,5 +1,5 @@ -using System; -using System.Collections.Generic; +#region Using Statements +using System; using System.Diagnostics; using System.Drawing; using System.IO; @@ -10,6 +10,12 @@ using ANX.ContentCompiler.GUI.Properties; using ANX.Framework.Content.Pipeline; using ANX.Framework.Content.Pipeline.Tasks; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI { @@ -35,8 +41,9 @@ namespace ANX.ContentCompiler.GUI private readonly string[] _args; private int _showCounter = 0; - private ImporterManager iManager; - private ProcessorManager pManager; + private readonly ImporterManager _iManager; + private readonly ProcessorManager _pManager; + private PreviewScreen _previewScreen; #endregion #region Properties @@ -78,8 +85,8 @@ namespace ANX.ContentCompiler.GUI treeViewItemDelete.MouseEnter += TreeViewItemMouseEnter; treeViewItemRename.MouseEnter += TreeViewItemMouseEnter; SetUpColors(); - iManager = new ImporterManager(); - pManager = new ProcessorManager(); + _iManager = new ImporterManager(); + _pManager = new ProcessorManager(); } private void MainWindowShown(object sender, EventArgs e) @@ -273,7 +280,7 @@ namespace ANX.ContentCompiler.GUI if (String.IsNullOrEmpty(bI.ProcessorName)) { - bI.ProcessorName = pManager.GetProcessorForImporter(iManager.GetInstance(bI.ImporterName)); + bI.ProcessorName = _pManager.GetProcessorForImporter(_iManager.GetInstance(bI.ImporterName)); } } try @@ -352,7 +359,7 @@ namespace ANX.ContentCompiler.GUI 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 = pManager.GetProcessorForImporter(iManager.GetInstance(ImporterManager.GuessImporterByFileExtension(file))) + ProcessorName = _pManager.GetProcessorForImporter(_iManager.GetInstance(ImporterManager.GuessImporterByFileExtension(file))) }; _contentProject.BuildItems.Add(item); } @@ -687,6 +694,11 @@ namespace ANX.ContentCompiler.GUI buildItem => buildItem.AssetName.Equals(treeView.SelectedNode.Name))) { propertyGrid.SelectedObject = buildItem; + + if (_previewScreen != null) + { + _previewScreen.SetFile(buildItem); + } } } } @@ -882,11 +894,11 @@ namespace ANX.ContentCompiler.GUI buildItem = item; } - using (var preview = new PreviewScreen(buildItem)) - { - if ((string)treeView.SelectedNode.Tag == "File") - preview.ShowDialog(); - } + if (_previewScreen == null) + _previewScreen = new PreviewScreen(); + if ((string) treeView.SelectedNode.Tag != "File") return; + _previewScreen.Show(); + _previewScreen.SetFile(buildItem); } #endregion } diff --git a/Tools/ANXContentCompilerGUI/Program.cs b/Tools/ANXContentCompilerGUI/Program.cs index 9b1fac3b..abb77b86 100644 --- a/Tools/ANXContentCompilerGUI/Program.cs +++ b/Tools/ANXContentCompilerGUI/Program.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI { diff --git a/Tools/ANXContentCompilerGUI/RecentProjects.cs b/Tools/ANXContentCompilerGUI/RecentProjects.cs index 4d6b7769..445c77d6 100644 --- a/Tools/ANXContentCompilerGUI/RecentProjects.cs +++ b/Tools/ANXContentCompilerGUI/RecentProjects.cs @@ -1,9 +1,16 @@ -using System; +#region Using Statements +using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Xml; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI { diff --git a/Tools/ANXContentCompilerGUI/Settings.cs b/Tools/ANXContentCompilerGUI/Settings.cs index 234670d5..feae0841 100644 --- a/Tools/ANXContentCompilerGUI/Settings.cs +++ b/Tools/ANXContentCompilerGUI/Settings.cs @@ -1,10 +1,17 @@ -using System; +#region Using Statements +using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Text; using System.Xml; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI { diff --git a/Tools/ANXContentCompilerGUI/States/EditingState.cs b/Tools/ANXContentCompilerGUI/States/EditingState.cs index 09116b69..c9178cb2 100644 --- a/Tools/ANXContentCompilerGUI/States/EditingState.cs +++ b/Tools/ANXContentCompilerGUI/States/EditingState.cs @@ -1,7 +1,14 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.ContentCompiler.GUI.Dialogues; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.States { diff --git a/Tools/ANXContentCompilerGUI/States/MenuState.cs b/Tools/ANXContentCompilerGUI/States/MenuState.cs index 87eaae64..5ae7e182 100644 --- a/Tools/ANXContentCompilerGUI/States/MenuState.cs +++ b/Tools/ANXContentCompilerGUI/States/MenuState.cs @@ -1,8 +1,15 @@ -using System; +#region Using Statements +using System; using System.Reflection; using System.Windows.Forms; using ANX.ContentCompiler.GUI.Dialogues; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.States { diff --git a/Tools/ANXContentCompilerGUI/States/StartState.cs b/Tools/ANXContentCompilerGUI/States/StartState.cs index 8bb9cb17..6029726d 100644 --- a/Tools/ANXContentCompilerGUI/States/StartState.cs +++ b/Tools/ANXContentCompilerGUI/States/StartState.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI.States { diff --git a/Tools/ANXContentCompilerGUI/TreeViewExtensions.cs b/Tools/ANXContentCompilerGUI/TreeViewExtensions.cs index 0e924b79..3e3f6e4f 100644 --- a/Tools/ANXContentCompilerGUI/TreeViewExtensions.cs +++ b/Tools/ANXContentCompilerGUI/TreeViewExtensions.cs @@ -1,6 +1,13 @@ -using System; +#region Using Statements +using System; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +#endregion + +// This file is part of the EES Content Compiler 4, +// © 2008 - 2012 by Eagle Eye Studios. +// The EES Content Compiler 4 is released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license namespace ANX.ContentCompiler.GUI {