From 238b881a3d8c6aff68adb1093bea75b81d8b12e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Sejkora?= Date: Mon, 8 Jul 2024 13:00:21 +0200 Subject: [PATCH] Inspector: Add filename to window title --- ArcdpsLogManager/CHANGELOG.md | 1 + EVTCInspector/InspectorForm.cs | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ArcdpsLogManager/CHANGELOG.md b/ArcdpsLogManager/CHANGELOG.md index d836e45d..a834172b 100644 --- a/ArcdpsLogManager/CHANGELOG.md +++ b/ArcdpsLogManager/CHANGELOG.md @@ -21,6 +21,7 @@ This is the full changelog of the arcdps Log Manager. - Fixed encounter durations rounding to 1m60s (thanks, @Linkaaaaa!). #### EVTC Inspector notes +- Added current open file name into the window title - Processed agents attacker/defender hitbox is now a more general source/target checkbox, which also works for buff events and visual effect events. - Added profession/elite specialization to AgentEnterCombatEvent (useful for mid-log specialization changes); requires arcdps 2024-06-12 or newer. - Added SquadGroundMarkerPlace and SquadGroundMarkerRemove events; requires arcdps 2024-03-28 or newer. diff --git a/EVTCInspector/InspectorForm.cs b/EVTCInspector/InspectorForm.cs index cef1fcfe..ef92e26f 100644 --- a/EVTCInspector/InspectorForm.cs +++ b/EVTCInspector/InspectorForm.cs @@ -18,9 +18,10 @@ namespace GW2Scratch.EVTCInspector { public sealed class InspectorForm : Form { + private const string WindowTitle = "Scratch EVTC Inspector"; private static readonly Padding MainTabPadding = new Padding(2); - private string OpenedLogFile { get; set; }= null; + private string OpenedLogFile { get; set; } = null; private bool SkipParsing { get; set; } = false; private bool PruneForEncounterData { get; set; } = false; @@ -56,7 +57,7 @@ public sealed class InspectorForm : Form public InspectorForm() { - Title = "Scratch EVTC Inspector"; + Title = WindowTitle; ClientSize = new Size(800, 600); var formLayout = new DynamicLayout(); Content = formLayout; @@ -175,9 +176,11 @@ private void ReprocessButtonOnClick(object s, EventArgs e) } } - public void SelectLog(string logFilename) + public void SelectLog(string logFilePath) { - OpenedLogFile = logFilename; + OpenedLogFile = logFilePath; + var filename = System.IO.Path.GetFileName(logFilePath); + Title = $"{WindowTitle} – {filename}"; var statusStringBuilder = new StringBuilder(); var parser = new EVTCParser { SinglePassFilteringOptions = { PruneForEncounterData = PruneForEncounterData } }; @@ -193,7 +196,7 @@ public void SelectLog(string logFilename) { try { - parsedLog = parser.ParseLog(logFilename); + parsedLog = parser.ParseLog(logFilePath); var parseTime = sw.Elapsed; statusStringBuilder.AppendLine($"Parsed in {parseTime}"); @@ -243,7 +246,7 @@ public void SelectLog(string logFilename) } else { - processedLog = processor.ProcessLog(logFilename, parser); + processedLog = processor.ProcessLog(logFilePath, parser); } var processTime = sw.Elapsed;