diff --git a/CHANGELOG.md b/CHANGELOG.md
index 801280b..3f2db04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+# 1.1.4 - 02/09/2024
+- Migrated to .NET 8.0
+- Fixed detection of broken eicon and icon tags.
+- Refactored color tag selection.
+- Many, many changes and optimizations to assembly-level code.
+- Massive refactoring of XAML backend interactions, including additional data bindings for sharing info between tabs.
+
# 1.1.3.15 - 02/07/2024
- Fixed a crash occurring when the user mouses over a UI object during single-file processing.
diff --git a/ContextSettings.cs b/ContextSettings.cs
index c02f946..f1bcc71 100644
--- a/ContextSettings.cs
+++ b/ContextSettings.cs
@@ -11,6 +11,7 @@ public class ContextSettings : INotifyPropertyChanged
private DateTime? _afterDate;
private DateTime? _beforeDate;
private string _corruptedTimestamps = "Corrupted Timestamps:";
+ private bool? _divideLogs = false;
private string _emptyMessages = "Empty Messages:";
private string _exception = "";
private string _intactMessages = "Intact Messages:";
@@ -18,6 +19,8 @@ public class ContextSettings : INotifyPropertyChanged
private double _progress = 0.0;
private double _progressMax = 100.0;
private string _runLabel = "Run";
+ private bool? _saveHTML = false;
+ private bool? _saveTruncated = false;
private string _themeLabel = "Dark";
private string _truncatedMessages = "Truncated Messages:";
private string _unreadData = "Unread Data:";
@@ -26,6 +29,7 @@ public class ContextSettings : INotifyPropertyChanged
public DateTime? AfterDate { get => _afterDate; set { _afterDate = value; OnPropertyChanged(); } }
public DateTime? BeforeDate { get => _beforeDate; set { _beforeDate = value; OnPropertyChanged(); } }
public string CorruptedTimestamps { get => _corruptedTimestamps; set { _corruptedTimestamps = value; OnPropertyChanged(); } }
+ public bool? DivideLogs { get => _divideLogs; set { _divideLogs = value; OnPropertyChanged(); } }
public string EmptyMessages { get => _emptyMessages; set { _emptyMessages = value; OnPropertyChanged(); } }
public string Exception { get => _exception; set { _exception = value; OnPropertyChanged(); } }
public string IntactMessages { get => _intactMessages; set { _intactMessages = value; OnPropertyChanged(); } }
@@ -34,6 +38,8 @@ public class ContextSettings : INotifyPropertyChanged
public double ProgressMax { get => _progressMax; set { _progressMax = value; OnPropertyChanged(); } }
public event PropertyChangedEventHandler? PropertyChanged;
public string RunLabel { get => _runLabel; set { _runLabel = value; OnPropertyChanged(); } }
+ public bool? SaveHTML { get => _saveHTML; set { _saveHTML = value; OnPropertyChanged(); } }
+ public bool? SaveTruncated { get => _saveTruncated; set { _saveTruncated = value; OnPropertyChanged(); } }
public string ThemeLabel { get => _themeLabel; set { _themeLabel = value; OnPropertyChanged(); } }
public string TruncatedMessages { get => _truncatedMessages; set { _truncatedMessages = value; OnPropertyChanged(); } }
public string UnreadData { get => _unreadData; set { _unreadData = value; OnPropertyChanged(); } }
diff --git a/FLogS.csproj b/FLogS.csproj
index 3ebb670..e988f69 100644
--- a/FLogS.csproj
+++ b/FLogS.csproj
@@ -1,42 +1,43 @@
- WinExe
- net8.0-windows10.0.22621.0
- enable
- enable
- true
- FLogS
- 1.1.4
- Taica
+ WinExe
+ net8.0-windows10.0.22621.0
+ enable
+ enable
+ true
+ FLogS
+ 1.1.4
+ Taica
- embedded
+ embedded
- embedded
+ embedded
- build$([System.DateTime]::UtcNow.ToString("yyyyMMdd"))
- 7.0
+ build$([System.DateTime]::UtcNow.ToString("yyyyMMdd"))
+ 7.0
+ en-US
-
- True
- True
- Settings.settings
-
+
+ True
+ True
+ Settings.settings
+
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
diff --git a/KNOWN.md b/KNOWN.md
index adc1a0c..5770079 100644
--- a/KNOWN.md
+++ b/KNOWN.md
@@ -1,6 +1,7 @@
# Known Issues
- Ads are read correctly as they are in later versions, but much older clients didn't record ads as uniquely ID'd messages - they appear to have just been plaintext, with no delimiter. Reading them causes patches of garbage.
- The scrollbar on the log window cannot be enabled under any circumstances, as in I have memory-manipulated it to be active and it still doesn't work. This presents a problem with viewing error messages when they appear.
+- We don't currently detect existing output files within date-separated subdirectories, so the related warning message doesn't appear.
# Todo
- Android version for mobile users of F-Chat.
\ No newline at end of file
diff --git a/MainWindow.xaml b/MainWindow.xaml
index d41c6fe..1fe40a2 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -12,25 +12,25 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -59,15 +59,15 @@
-
+
-
+
-
+
@@ -90,7 +90,7 @@
-
+
@@ -101,25 +101,25 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -148,15 +148,15 @@
-
+
-
+
-
+
@@ -179,7 +179,7 @@
-
+
@@ -190,25 +190,25 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -242,15 +242,15 @@
-
+
-
+
-
+
@@ -273,7 +273,7 @@
-
+
@@ -284,12 +284,12 @@
-
-
+
+
-
-
+
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 4f8b1a4..f5d7856 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -32,10 +32,9 @@ public partial class MainWindow : Window
[Brushes.LightBlue, Brushes.DarkBlue], // Hyperlinks
];
private static (int, int) brushPalette = (1, 0);
- private static (FLogS_ERROR, FLogS_ERROR, FLogS_ERROR) localError = (0, 0, 0);
- private static (FLogS_WARNING, FLogS_WARNING, FLogS_WARNING) localWarning = (0, 0, 0);
+ private static (FLogS_ERROR, FLogS_ERROR, FLogS_ERROR) localError = (FLogS_ERROR.NO_SOURCE, FLogS_ERROR.NO_SOURCES, FLogS_ERROR.NO_SOURCES);
+ private static (FLogS_WARNING, FLogS_WARNING, FLogS_WARNING) localWarning = (FLogS_WARNING.None, FLogS_WARNING.None, FLogS_WARNING.None);
private static int filesProcessed;
- private static bool overrideFormat = false;
private static MessagePool pool = new();
private readonly static ContextSettings settings = new();
@@ -145,32 +144,6 @@ private static string DialogFolderSelect()
return string.Empty;
}
- private void FormatOverride(object? sender, RoutedEventArgs e)
- {
- if (sender is null)
- return;
-
- var senderBox = (CheckBox)sender;
-
- if (senderBox.Name.Contains("DivideLogs"))
- {
- F_DivideLogsCheckbox.IsChecked = D_DivideLogsCheckbox.IsChecked = P_DivideLogsCheckbox.IsChecked = senderBox.IsChecked;
- return;
- }
-
- if (senderBox.Name.Contains("SaveTruncated"))
- {
- F_SaveTruncatedCheckbox.IsChecked = D_SaveTruncatedCheckbox.IsChecked = P_SaveTruncatedCheckbox.IsChecked = senderBox.IsChecked;
- return;
- }
-
- if (senderBox.Name.Contains("SaveHTML"))
- {
- F_SaveHTMLCheckbox.IsChecked = D_SaveHTMLCheckbox.IsChecked = P_SaveHTMLCheckbox.IsChecked = overrideFormat = (senderBox.IsChecked ?? false);
- return;
- }
- }
-
private static string GetErrorMessage(FLogS_ERROR eCode, FLogS_WARNING wCode) => (eCode, wCode) switch
{
(FLogS_ERROR.BAD_REGEX, _) => "Search text contains an invalid RegEx pattern.",
@@ -226,13 +199,6 @@ private void MainGrid_MouseMove(object sender, System.Windows.Input.MouseEventAr
TextboxUpdated(sender, e);
RegExLink.Foreground = brushCombos[RegExLink.IsMouseOver ? 3 : 8][brushPalette.Item1];
-
- if (!overrideFormat)
- {
- F_SaveHTMLCheckbox.IsChecked = F_Output.Text.EndsWith(".html");
- D_SaveHTMLCheckbox.IsChecked = D_Output.Text.EndsWith(".html");
- P_SaveHTMLCheckbox.IsChecked = P_Output.Text.EndsWith(".html");
- }
}
private void MultiDest_Click(object sender, RoutedEventArgs e)
@@ -252,17 +218,6 @@ private void ProcessErrors()
static string outputPath(string directory, string file) => Path.Join(directory, Path.GetFileNameWithoutExtension(file)) + (Common.plaintext ? ".txt" : ".html");
- localError.Item2 = new[] {
- (D_Source.Text.Length == 0, FLogS_ERROR.NO_SOURCES),
- (dirSources.Any(file => !File.Exists(file)), FLogS_ERROR.SOURCES_NOT_FOUND),
- (D_Output.Text.Length == 0, FLogS_ERROR.NO_DEST_DIR),
- (File.Exists(D_Output.Text), FLogS_ERROR.DEST_NOT_DIRECTORY),
- (!Directory.Exists(D_Output.Text), FLogS_ERROR.DEST_NOT_FOUND),
- (dirSources.Any(file => file.Equals(outputPath(D_Output.Text, file))), FLogS_ERROR.SOURCE_CONFLICT),
- (dirSources.Any(file => Common.LogTest(outputPath(D_Output.Text, file))), FLogS_ERROR.DEST_SENSITIVE),
- (true, FLogS_ERROR.None)
- }.First(condition => condition.Item1).Item2;
-
localError.Item1 = new[] {
(F_Source.Text.Length == 0, FLogS_ERROR.NO_SOURCE),
(!File.Exists(F_Source.Text), FLogS_ERROR.SOURCE_NOT_FOUND),
@@ -274,6 +229,17 @@ private void ProcessErrors()
(true, FLogS_ERROR.None)
}.First(condition => condition.Item1).Item2;
+ localError.Item2 = new[] {
+ (D_Source.Text.Length == 0, FLogS_ERROR.NO_SOURCES),
+ (dirSources.Any(file => !File.Exists(file)), FLogS_ERROR.SOURCES_NOT_FOUND),
+ (D_Output.Text.Length == 0, FLogS_ERROR.NO_DEST_DIR),
+ (File.Exists(D_Output.Text), FLogS_ERROR.DEST_NOT_DIRECTORY),
+ (!Directory.Exists(D_Output.Text), FLogS_ERROR.DEST_NOT_FOUND),
+ (dirSources.Any(file => file.Equals(outputPath(D_Output.Text, file))), FLogS_ERROR.SOURCE_CONFLICT),
+ (dirSources.Any(file => Common.LogTest(outputPath(D_Output.Text, file))), FLogS_ERROR.DEST_SENSITIVE),
+ (true, FLogS_ERROR.None)
+ }.First(condition => condition.Item1).Item2;
+
localError.Item3 = new[] {
(P_Source.Text.Length == 0, FLogS_ERROR.NO_SOURCES),
(phraseSources.Any(file => !File.Exists(file)), FLogS_ERROR.SOURCES_NOT_FOUND),
@@ -287,15 +253,15 @@ private void ProcessErrors()
(true, FLogS_ERROR.None)
}.First(condition => condition.Item1).Item2;
- localWarning.Item2 = new[]
+ localWarning.Item1 = new[]
{
- (dirSources.Any(file => File.Exists(outputPath(D_Output.Text, file))), FLogS_WARNING.MULTI_OVERWRITE),
+ (File.Exists(F_Output.Text), FLogS_WARNING.SINGLE_OVERWRITE),
(true, FLogS_WARNING.None)
}.First(condition => condition.Item1).Item2;
- localWarning.Item1 = new[]
+ localWarning.Item2 = new[]
{
- (File.Exists(F_Output.Text), FLogS_WARNING.SINGLE_OVERWRITE),
+ (dirSources.Any(file => File.Exists(outputPath(D_Output.Text, file))), FLogS_WARNING.MULTI_OVERWRITE),
(true, FLogS_WARNING.None)
}.First(condition => condition.Item1).Item2;
@@ -322,7 +288,6 @@ private void ProcessFiles(string[] args)
{
settings.Exception = string.Empty;
filesProcessed = args.Length;
- overrideFormat = false;
Common.processing = true;
pool.totalSize.Simplify();
@@ -359,15 +324,15 @@ private void RunButton_Click(object? sender, RoutedEventArgs e)
try
{
string[] files = GridObject("Source").Text.Split(';');
- Common.plaintext = GridObject("SaveHTMLCheckbox").IsChecked == false;
+ Common.plaintext = GridObject("SaveHTML").IsChecked == false || GridObject("Output").Text.EndsWith(".html");
pool = new()
{
destDir = GridObject("Output").Text,
- divide = GridObject("DivideLogsCheckbox").IsChecked is true,
+ divide = GridObject("DivideLogs").IsChecked is true,
dtAfter = GridObject("AfterDate").SelectedDate ?? Common.DTFromStamp(1),
dtBefore = GridObject("BeforeDate").SelectedDate ?? DateTime.UtcNow,
- phrase = bTag.Equals("Phrase") ? P_Search.Text : string.Empty,
- saveTruncated = GridObject("SaveTruncatedCheckbox").IsChecked is true,
+ phrase = bTag.Equals("P_") ? P_Search.Text : string.Empty,
+ saveTruncated = GridObject("SaveTruncated").IsChecked is true,
srcFile = GridObject("Source").Text,
totalSize = new()
};