Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
John Kauffman committed May 15, 2024
1 parent 000fe90 commit bb3f27b
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 38 deletions.
7 changes: 5 additions & 2 deletions EQLogParser/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ protected override void OnStartup(StartupEventArgs e)
LockingModel = new FileAppender.MinimalLock(),
Layout = new PatternLayout("%date [%thread] %level %logger - %message%newline"),
MaxSizeRollBackups = 5,
MaximumFileSize = "5MB",
StaticLogFileName = true
MaximumFileSize = "2MB",
StaticLogFileName = true,
RollingStyle = RollingFileAppender.RollingMode.Size,
PreserveLogFileNameExtension = true,
CountDirection = -1
};

// Activate the options on the file appender
Expand Down
4 changes: 2 additions & 2 deletions EQLogParser/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.18")]
[assembly: AssemblyFileVersion("2.2.18")]
[assembly: AssemblyVersion("2.2.19")]
[assembly: AssemblyFileVersion("2.2.19")]
[assembly: XmlConfigurator(Watch = true)]
[assembly: SupportedOSPlatform("windows10.0")]
11 changes: 9 additions & 2 deletions EQLogParser/data/releasenotes.rtf
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{\rtf1\ansi\ansicpg1252\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Segoe UI;}{\f1\fnil\fcharset2 Symbol;}}
{\*\generator Riched20 10.0.22621}\viewkind4\uc1
\pard\ul\f0\fs20\lang1033 Updates in Version 2.2.18\ulnone\par
\pard\ul\f0\fs20\lang1033 Updates in Version 2.2.19\ulnone\par
\par

\pard\par
\pard
{\pntext\f0 1.\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pndec{\pntxta.}}
\fi-360\li720 Updated to save changes made more often and before a computer is suspended to avoid changes being lost if the application crashes.\par

\pard\ul\par
Updated in Version 2.2.18\ulnone\par
\par

\pard
{\pntext\f0 1.\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pndec{\pntxta.}}
Expand Down
49 changes: 22 additions & 27 deletions EQLogParser/src/ui/main/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public partial class MainWindow : ChromelessWindow
private static DateTime _startLoadTime;
private DamageOverlayWindow _damageOverlay;
private readonly DispatcherTimer _computeStatsTimer;
private readonly DispatcherTimer _saveTimer;
private readonly NpcDamageManager _npcDamageManager = new();
private LogReader _eqLogReader;
private readonly List<bool> _logWindows = [];
Expand Down Expand Up @@ -215,7 +216,11 @@ public MainWindow()
enableAutoMonitorIcon.Visibility = Visibility.Hidden;
}

_computeStatsTimer = new DispatcherTimer(DispatcherPriority.Render) { Interval = new TimeSpan(0, 0, 0, 0, 500) };
_computeStatsTimer = new DispatcherTimer(DispatcherPriority.Render)
{
Interval = new TimeSpan(0, 0, 0, 0, 500)
};

_computeStatsTimer.Tick += (_, _) =>
{
if (!_isLoading)
Expand All @@ -225,6 +230,20 @@ public MainWindow()
}
};

_saveTimer = new DispatcherTimer(DispatcherPriority.Background)
{
Interval = new TimeSpan(0, 0, 0, 30)
};

_saveTimer.Tick += (_, _) =>
{
if (!_isLoading)
{
ConfigUtil.Save();
}
};
_saveTimer.Start();

SystemEvents.PowerModeChanged += SystemEventsPowerModeChanged;

// data old stuff
Expand Down Expand Up @@ -262,31 +281,6 @@ public MainWindow()
}
}

// not used anymore. time to cleanup
Dispatcher.Invoke(() =>
{
ConfigUtil.RemoveSetting("AudioTriggersWatchForGINA");
ConfigUtil.RemoveSetting("TriggersWatchForGINA");
ConfigUtil.RemoveSetting("AudioTriggersEnabled");
ConfigUtil.RemoveSetting("OverlayRankColor1");
ConfigUtil.RemoveSetting("OverlayRankColor2");
ConfigUtil.RemoveSetting("OverlayRankColor3");
ConfigUtil.RemoveSetting("OverlayRankColor4");
ConfigUtil.RemoveSetting("OverlayRankColor5");
ConfigUtil.RemoveSetting("OverlayRankColor6");
ConfigUtil.RemoveSetting("OverlayRankColor7");
ConfigUtil.RemoveSetting("OverlayRankColor8");
ConfigUtil.RemoveSetting("OverlayRankColor9");
ConfigUtil.RemoveSetting("OverlayRankColor10");
ConfigUtil.RemoveSetting("OverlayShowCritRate");
ConfigUtil.RemoveSetting("EnableHardwareAcceleration");
ConfigUtil.RemoveSetting("TriggersVoiceRate");
ConfigUtil.RemoveSetting("TriggersSelectedVoice");
ConfigUtil.RemoveSetting("ShowDamageSummaryAtStartup");
ConfigUtil.RemoveSetting("ShowHealingSummaryAtStartup");
ConfigUtil.RemoveSetting("ShowTankingSummaryAtStartup");
}, DispatcherPriority.Background);

// cleanup downloads
Dispatcher.InvokeAsync(MainActions.Cleanup, DispatcherPriority.Background);
}
Expand All @@ -303,6 +297,7 @@ private void SystemEventsPowerModeChanged(object sender, PowerModeChangedEventAr
{
case PowerModes.Suspend:
Log.Warn("Suspending");
ConfigUtil.Save();
TriggerManager.Instance.Stop();
DataManager.Instance.EventsNewOverlayFight -= EventsNewOverlayFight;
CloseDamageOverlay();
Expand All @@ -319,7 +314,7 @@ private void SystemEventsPowerModeChanged(object sender, PowerModeChangedEventAr

private void EventsNewOverlayFight(object sender, Fight e)
{
// an other lazy optimization to avoid extra dispatches
// another lazy optimization to avoid extra dispatches
if (_damageOverlay == null)
{
Dispatcher.InvokeAsync(() =>
Expand Down
25 changes: 22 additions & 3 deletions EQLogParser/src/util/ConfigUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ internal static class ConfigUtil
private const string AppData = @"%AppData%\EQLogParser";
private const string PetmapFile = "petmapping.txt";
private const string PlayersFile = "players.txt";

private static string _archiveDir;
private static string _settingsFile;
private static string _triggersDbFile;
private static bool _initDone;
private static bool _settingsUpdated;

private static readonly ConcurrentDictionary<string, string> ApplicationSettings = new();

internal static void SetSetting(string key, bool value) => SetSetting(key, value.ToString());
internal static void SetSetting(string key, double value) => SetSetting(key, value.ToString(CultureInfo.InvariantCulture));
internal static void SetSetting(string key, int value) => SetSetting(key, value.ToString(CultureInfo.InvariantCulture));
Expand Down Expand Up @@ -174,7 +173,28 @@ internal static void Save()
ApplicationSettings.TryRemove("IncludeAEHealing", out _); // not used anymore
ApplicationSettings.TryRemove("HealingColumns", out _); // not used anymore
ApplicationSettings.TryRemove("TankingColumns", out _); // not used anymore
ApplicationSettings.TryRemove("AudioTriggersWatchForGINA", out _); // not used anymore);
ApplicationSettings.TryRemove("TriggersWatchForGINA", out _); // not used anymore);
ApplicationSettings.TryRemove("AudioTriggersEnabled", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor1", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor2", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor3", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor4", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor5", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor6", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor7", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor8", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor9", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayRankColor10", out _); // not used anymore);
ApplicationSettings.TryRemove("OverlayShowCritRate", out _); // not used anymore);
ApplicationSettings.TryRemove("EnableHardwareAcceleration", out _); // not used anymore);
ApplicationSettings.TryRemove("TriggersVoiceRate", out _); // not used anymore);
ApplicationSettings.TryRemove("TriggersSelectedVoice", out _); // not used anymore);
ApplicationSettings.TryRemove("ShowDamageSummaryAtStartup", out _); // not used anymore);
ApplicationSettings.TryRemove("ShowHealingSummaryAtStartup", out _); // not used anymore);
ApplicationSettings.TryRemove("ShowTankingSummaryAtStartup", out _); // not used anymore);
SaveProperties(_settingsFile, ApplicationSettings);
_settingsUpdated = false;
}
}

Expand All @@ -199,7 +219,6 @@ private static void Init()
Directory.CreateDirectory(ConfigDir);
// create logs dir if it doesn't exist
Directory.CreateDirectory(LogsDir);

LoadProperties(ApplicationSettings, ReadList(_settingsFile));
}
}
Expand Down
2 changes: 1 addition & 1 deletion EQLogParserInstall/EQLogParserInstall.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "EQLogParser"
#define MyAppVersion "2.2.18"
#define MyAppVersion "2.2.19"
#define MyAppPublisher "Kizant"
#define MyAppURL "https://github.com/kauffman12/EQLogParser"
#define MyAppExeName "EQLogParser.exe"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Everquest Log Parser for Live/TLP servers with basic support for P99.

Link to DOWNLOAD the latest Installer:</br>
https://github.com/kauffman12/EQLogParser/raw/master/Release/EQLogParser-install-2.2.18.exe
https://github.com/kauffman12/EQLogParser/raw/master/Release/EQLogParser-install-2.2.19.exe

### IMPORTANT --- If after install the Log Search feature crashes and you're missing Syncfusion.Edit.WPF.dll and Syncfusion.GridCommon.WPF.dll from where you installed EQLogParser.. try running the installer again and choosing Repair to fix the problem.

Expand Down
Binary file not shown.

0 comments on commit bb3f27b

Please sign in to comment.