Skip to content
Snippets Groups Projects
Commit 2d9f5616 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Read in status file during startup, make method static.

Refers to #2
parent 177416b1
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,7 @@ namespace ATXTray ...@@ -34,6 +34,7 @@ namespace ATXTray
_notifyIcon.Icon = new Icon("AutoTx.ico"); _notifyIcon.Icon = new Icon("AutoTx.ico");
_config = ServiceConfig.Deserialize(ConfigFile); _config = ServiceConfig.Deserialize(ConfigFile);
ReadStatus();
_miExit.Text = @"Exit"; _miExit.Text = @"Exit";
_miExit.Click += MiExitClick; _miExit.Click += MiExitClick;
...@@ -113,7 +114,7 @@ namespace ATXTray ...@@ -113,7 +114,7 @@ namespace ATXTray
/// <summary> /// <summary>
/// Read (or re-read) the service status file if it has changed since last time. /// Read (or re-read) the service status file if it has changed since last time.
/// </summary> /// </summary>
private void ReadStatus() { private static void ReadStatus() {
var age = new FileInfo(StatusFile).LastWriteTime; var age = new FileInfo(StatusFile).LastWriteTime;
if (age == _statusAge) if (age == _statusAge)
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment