diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs
index 199a5527..2e882384 100644
--- a/SabreTools.Library/DatFiles/DatFile.cs
+++ b/SabreTools.Library/DatFiles/DatFile.cs
@@ -752,6 +752,27 @@ namespace SabreTools.Library.DatFiles
}
// Statistical data related to the DAT
+ public StatReportFormat ReportFormat
+ {
+ get
+ {
+ if (_datStats == null)
+ {
+ _datStats = new DatStats();
+ }
+
+ return _datStats.ReportFormat;
+ }
+ set
+ {
+ if (_datStats == null)
+ {
+ _datStats = new DatStats();
+ }
+
+ _datStats.ReportFormat = value;
+ }
+ }
public long Count
{
get
@@ -5884,9 +5905,9 @@ namespace SabreTools.Library.DatFiles
bool baddumpCol, bool nodumpCol, StatReportFormat statDatFormat)
{
// If there's no output format, set the default
- if (statDatFormat == 0x0)
+ if (statDatFormat == StatReportFormat.None)
{
- statDatFormat = StatReportFormat.None;
+ statDatFormat = StatReportFormat.Textfile;
}
// Get the proper output file name
@@ -5916,7 +5937,7 @@ namespace SabreTools.Library.DatFiles
BaseReport report = null;
switch (kvp.Key)
{
- case StatReportFormat.None:
+ case StatReportFormat.Textfile:
report = new Textfile(null, kvp.Value, baddumpCol, nodumpCol);
break;
case StatReportFormat.CSV:
@@ -6071,9 +6092,9 @@ Please check the log folder if the stats scrolled offscreen", false);
}
// For each output format, get the appropriate stream writer
- if ((statDatFormat & StatReportFormat.None) != 0)
+ if ((statDatFormat & StatReportFormat.Textfile) != 0)
{
- output.Add(StatReportFormat.None, CreateOutStatsNamesHelper(outDir, ".txt", reportName, overwrite));
+ output.Add(StatReportFormat.Textfile, CreateOutStatsNamesHelper(outDir, ".txt", reportName, overwrite));
}
if ((statDatFormat & StatReportFormat.CSV) != 0)
{
diff --git a/SabreTools.Library/DatFiles/DatStats.cs b/SabreTools.Library/DatFiles/DatStats.cs
index 72d045c0..ed9ef559 100644
--- a/SabreTools.Library/DatFiles/DatStats.cs
+++ b/SabreTools.Library/DatFiles/DatStats.cs
@@ -12,6 +12,9 @@ namespace SabreTools.Library.DatFiles
{
#region Private instance variables
+ // Statistics report format
+ private StatReportFormat _reportFormat = StatReportFormat.None;
+
// Object used to lock stats updates
private object _lockObject = new object();
@@ -50,6 +53,13 @@ namespace SabreTools.Library.DatFiles
#region Publicly facing variables
+ // Statistics report format
+ public StatReportFormat ReportFormat
+ {
+ get { return _reportFormat; }
+ set { _reportFormat = value; }
+ }
+
// Overall item count
public long Count
{
diff --git a/SabreTools.Library/Data/Flags.cs b/SabreTools.Library/Data/Flags.cs
index fba694bc..0069815b 100644
--- a/SabreTools.Library/Data/Flags.cs
+++ b/SabreTools.Library/Data/Flags.cs
@@ -245,15 +245,16 @@ namespace SabreTools.Library.Data
///
/// Determine which format to output Stats to
///
- /// [Flags]
+ [Flags]
public enum StatReportFormat
{
- None = 0x01,
- HTML = None << 1,
+ None = 0x0,
+ Textfile = 0x01,
+ HTML = Textfile << 1,
CSV = HTML << 1,
TSV = CSV << 1,
- All = None | HTML | CSV | TSV,
+ All = Textfile | HTML | CSV | TSV,
}
///
diff --git a/SabreTools/SabreTools.cs b/SabreTools/SabreTools.cs
index ce602465..2ccb922b 100644
--- a/SabreTools/SabreTools.cs
+++ b/SabreTools/SabreTools.cs
@@ -127,7 +127,7 @@ namespace SabreTools
OutputFormat outputFormat = OutputFormat.Folder;
SkipFileType skipFileType = SkipFileType.None;
SplitType splitType = SplitType.None;
- StatReportFormat statDatFormat = 0x0;
+ StatReportFormat statDatFormat = StatReportFormat.None;
UpdateMode updateMode = UpdateMode.None;
// User inputs
@@ -638,7 +638,7 @@ namespace SabreTools
break;
case "-txt":
case "--text":
- statDatFormat |= StatReportFormat.None;
+ statDatFormat |= StatReportFormat.Textfile;
break;
case "-tzip":
case "--tzip":