2012-10-19 20:04:05 +00:00
|
|
|
|
#region Using Statements
|
|
|
|
|
using System;
|
2012-09-09 15:44:49 +00:00
|
|
|
|
using ANX.Framework.Content.Pipeline;
|
2012-09-10 19:10:39 +00:00
|
|
|
|
using ANX.Framework.NonXNA.Development;
|
2015-09-03 23:43:55 +02:00
|
|
|
|
using System.ServiceModel;
|
2012-10-19 20:04:05 +00:00
|
|
|
|
#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
|
2012-09-09 15:44:49 +00:00
|
|
|
|
|
|
|
|
|
namespace ANX.ContentCompiler.GUI
|
|
|
|
|
{
|
2012-09-10 19:10:39 +00:00
|
|
|
|
[Developer("SilentWarrior/Eagle Eye Studios")]
|
2015-09-03 23:43:55 +02:00
|
|
|
|
[PercentageComplete(99)] //TODO: Logging to a file would be cool!
|
2012-09-10 19:10:39 +00:00
|
|
|
|
[TestState(TestStateAttribute.TestState.Tested)]
|
2015-09-03 23:43:55 +02:00
|
|
|
|
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
|
2012-09-09 15:44:49 +00:00
|
|
|
|
public class CCompilerBuildLogger : ContentBuildLogger
|
|
|
|
|
{
|
|
|
|
|
public override void LogImportantMessage(string message, params object[] messageArgs)
|
|
|
|
|
{
|
2015-09-03 23:43:55 +02:00
|
|
|
|
MainWindow.Instance.BeginInvoke(new Action(() =>
|
|
|
|
|
{
|
|
|
|
|
MainWindow.Instance.ribbonTextBox.SetTextColor(System.Drawing.Color.Blue);
|
|
|
|
|
MainWindow.Instance.ribbonTextBox.AddMessage("[IMPORTANT] " + String.Format(message, messageArgs));
|
|
|
|
|
}));
|
2012-09-09 15:44:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-09-03 23:43:55 +02:00
|
|
|
|
#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
|
|
|
|
|
|
2012-09-09 15:44:49 +00:00
|
|
|
|
public override void LogMessage(string message, params object[] messageArgs)
|
|
|
|
|
{
|
2015-09-03 23:43:55 +02:00
|
|
|
|
MainWindow.Instance.BeginInvoke(new Action(() =>
|
|
|
|
|
{
|
|
|
|
|
MainWindow.Instance.ribbonTextBox.ResetTextColor();
|
|
|
|
|
MainWindow.Instance.ribbonTextBox.AddMessage("[Info] " + String.Format(message, messageArgs));
|
|
|
|
|
}));
|
2012-09-09 15:44:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void LogWarning(string helpLink, ContentIdentity contentIdentity, string message,
|
|
|
|
|
params object[] messageArgs)
|
|
|
|
|
{
|
2015-09-03 23:43:55 +02:00
|
|
|
|
MainWindow.Instance.BeginInvoke(new Action(() =>
|
|
|
|
|
{
|
|
|
|
|
MainWindow.Instance.ribbonTextBox.SetTextColor(System.Drawing.Color.Yellow);
|
|
|
|
|
MainWindow.Instance.ribbonTextBox.AddMessage("[WARNING] " + String.Format(message, messageArgs));
|
|
|
|
|
}));
|
2012-09-09 15:44:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|