Skip to content

Commit

Permalink
Inspector: Add filename to window title
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejsel committed Jul 8, 2024
1 parent 2c47094 commit 238b881
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions ArcdpsLogManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 9 additions & 6 deletions EVTCInspector/InspectorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 } };
Expand All @@ -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}");
Expand Down Expand Up @@ -243,7 +246,7 @@ public void SelectLog(string logFilename)
}
else
{
processedLog = processor.ProcessLog(logFilename, parser);
processedLog = processor.ProcessLog(logFilePath, parser);
}

var processTime = sw.Elapsed;
Expand Down

0 comments on commit 238b881

Please sign in to comment.