diff --git a/EliteBGS/DiscordLogGenerator.cs b/EliteBGS/DiscordLogGenerator.cs index 797d8cf..2d640f9 100644 --- a/EliteBGS/DiscordLogGenerator.cs +++ b/EliteBGS/DiscordLogGenerator.cs @@ -111,10 +111,6 @@ public class DiscordLogGenerator { string summary = GenerateSummary(objective); - log.AppendFormat("**Log Generated:** {0} by {1}\n", - DateTime.Now.ToString("dd/MM/yyyy"), - GetToolVersion() - ); var earliest = GetDateOfEarliestEntry(objective); var latest = GetDateOfLatestEntry(objective); if (earliest != null && latest != null) { @@ -149,6 +145,16 @@ public class DiscordLogGenerator { return log; } + public virtual string Name { + get { return "GenericLog"; } + } + + protected virtual string BotHeader() { + var sb = new StringBuilder(); + sb.AppendFormat("**Bot-Header**: {0}; {1}\n", GetToolVersion(), this.Name); + return sb.ToString(); + } + public virtual string GenerateDiscordLog(Report report) { StringBuilder log = new StringBuilder(); @@ -164,6 +170,7 @@ public class DiscordLogGenerator { return ""; } + log.AppendFormat("{0}", BotHeader()); log.AppendFormat("{0}", GenerateHeader()); foreach (Objective objective in objectives) { diff --git a/EliteBGS/GenericDiscordLog.cs b/EliteBGS/GenericDiscordLog.cs index 9aa5266..eeb73c8 100644 --- a/EliteBGS/GenericDiscordLog.cs +++ b/EliteBGS/GenericDiscordLog.cs @@ -2,6 +2,10 @@ public class GenericDiscordLog : DiscordLogGenerator { public override string ToString() { - return "Generic Log"; + return "Generic"; + } + + public override string Name { + get { return "Generic"; } } } diff --git a/EliteBGS/MainWindow.xaml.cs b/EliteBGS/MainWindow.xaml.cs index 67bab15..17f8249 100644 --- a/EliteBGS/MainWindow.xaml.cs +++ b/EliteBGS/MainWindow.xaml.cs @@ -32,8 +32,8 @@ public partial class MainWindow : MetroWindow { private LoadEntriesWindow loadentries = null; private static readonly List logtypes = new List() { - new NonaDiscordLog(), new GenericDiscordLog(), + new NonaDiscordLog(), new OneLineDiscordLog(), }; diff --git a/EliteBGS/NonaDiscordLog.cs b/EliteBGS/NonaDiscordLog.cs index 33f7937..59d8ea5 100644 --- a/EliteBGS/NonaDiscordLog.cs +++ b/EliteBGS/NonaDiscordLog.cs @@ -7,6 +7,12 @@ using System.Linq; namespace EliteBGS.BGS; public class NonaDiscordLog : DiscordLogGenerator { + protected override string BotHeader() { + var sb = new StringBuilder(); + sb.AppendFormat(":robot: `Bot-Header`: {0}; {1}\n", GetToolVersion(), this.Name); + return sb.ToString(); + } + private string FormatDate() { CultureInfo cultureInfo = CultureInfo.InvariantCulture; StringBuilder date = new StringBuilder(); @@ -79,6 +85,10 @@ public class NonaDiscordLog : DiscordLogGenerator { } public override string ToString() { - return "Nova Navy Log"; + return "Nova Navy"; + } + + public override string Name { + get { return "NovaNavy"; } } } diff --git a/EliteBGS/OneLineDiscordLog.cs b/EliteBGS/OneLineDiscordLog.cs index e1b74d9..5384d15 100644 --- a/EliteBGS/OneLineDiscordLog.cs +++ b/EliteBGS/OneLineDiscordLog.cs @@ -40,6 +40,8 @@ public class OneLineDiscordLog : DiscordLogGenerator { return ""; } + log.AppendFormat("{0}\n", BotHeader()); + foreach (Objective objective in objectives) { log.AppendFormat("{0}", GenerateObjectiveHeader(objective)); @@ -60,6 +62,10 @@ public class OneLineDiscordLog : DiscordLogGenerator { } public override string ToString() { - return "One Line Report"; + return "One Line"; + } + + public override string Name { + get { return "OneLine"; } } }