1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-29 01:00:13 +00:00
msfs-popout-panel-manager/Shared/Logger.cs
2022-02-06 13:24:59 -05:00

38 lines
960 B
C#

using System;
namespace MSFSPopoutPanelManager.Shared
{
public class Logger
{
public static event EventHandler<EventArgs<StatusMessage>> OnStatusLogged;
public static void LogStatus(string message, StatusMessageType MessageType)
{
var statusMessage = new StatusMessage() { Message = message, MessageType = MessageType };
OnStatusLogged?.Invoke(null, new EventArgs<StatusMessage>(statusMessage));
}
public static void ClearStatus()
{
LogStatus(String.Empty, StatusMessageType.Info);
}
}
public class StatusMessage
{
public string Message { get; set; }
public StatusMessageType MessageType { get; set; }
}
public enum StatusMessageType
{
Info,
Error
}
public class PopoutManagerException : Exception
{
public PopoutManagerException(string message) : base(message) { }
}
}