anx.framework/Tools/ANXContentCompilerGUI/CCompilerBuildLogger.cs
Konstantin Koch a8588a30a5 Update ContentCompiler, make Visual Studio Extension work without having Anx Framework installed.
Make ContentCompilerGui compatible to recent changes in pipeline and did
some usability changes.
Make the Visual Studio Extension work even if the ANX Framework is not
installed additionally..
Improve that the path for assembly refernces in a content project
doesn't get automatically updated, only if the reference is actually
saved, this is so you can specify a relative path yourself.
Fix missing icon for ContentProject when it was opened with Visual
Studio.
Made create_shaders.bat directly executable under windows by fixing the
directory separators.
2015-09-03 23:43:55 +02:00

60 lines
2.6 KiB
C#

#region Using Statements
using System;
using ANX.Framework.Content.Pipeline;
using ANX.Framework.NonXNA.Development;
using System.ServiceModel;
#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
{
[Developer("SilentWarrior/Eagle Eye Studios")]
[PercentageComplete(99)] //TODO: Logging to a file would be cool!
[TestState(TestStateAttribute.TestState.Tested)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
public class CCompilerBuildLogger : ContentBuildLogger
{
public override void LogImportantMessage(string message, params object[] messageArgs)
{
MainWindow.Instance.BeginInvoke(new Action(() =>
{
MainWindow.Instance.ribbonTextBox.SetTextColor(System.Drawing.Color.Blue);
MainWindow.Instance.ribbonTextBox.AddMessage("[IMPORTANT] " + String.Format(message, messageArgs));
}));
}
#if XNAEXT
public override void LogImportantMessage(string helpLink, ContentIdentity contentIdentity, string message, params object[] messageArgs)
{
MainWindow.Instance.BeginInvoke(new Action(() =>
{
MainWindow.Instance.ribbonTextBox.SetTextColor(System.Drawing.Color.Blue);
MainWindow.Instance.ribbonTextBox.AddMessage("[IMPORTANT] " + String.Format(message, messageArgs));
}));
}
#endif
public override void LogMessage(string message, params object[] messageArgs)
{
MainWindow.Instance.BeginInvoke(new Action(() =>
{
MainWindow.Instance.ribbonTextBox.ResetTextColor();
MainWindow.Instance.ribbonTextBox.AddMessage("[Info] " + String.Format(message, messageArgs));
}));
}
public override void LogWarning(string helpLink, ContentIdentity contentIdentity, string message,
params object[] messageArgs)
{
MainWindow.Instance.BeginInvoke(new Action(() =>
{
MainWindow.Instance.ribbonTextBox.SetTextColor(System.Drawing.Color.Yellow);
MainWindow.Instance.ribbonTextBox.AddMessage("[WARNING] " + String.Format(message, messageArgs));
}));
}
}
}