From 2d9f5616e2020bb9315c842346fa6dac783bdee0 Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Wed, 10 Jan 2018 23:54:07 +0100
Subject: [PATCH] Read in status file during startup, make method static.

Refers to #2
---
 ATXTray/AutoTxTray.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ATXTray/AutoTxTray.cs b/ATXTray/AutoTxTray.cs
index 5458f73..e76356b 100644
--- a/ATXTray/AutoTxTray.cs
+++ b/ATXTray/AutoTxTray.cs
@@ -34,6 +34,7 @@ namespace ATXTray
             _notifyIcon.Icon = new Icon("AutoTx.ico");
 
             _config = ServiceConfig.Deserialize(ConfigFile);
+            ReadStatus();
 
             _miExit.Text = @"Exit";
             _miExit.Click += MiExitClick;
@@ -113,7 +114,7 @@ namespace ATXTray
         /// <summary>
         /// Read (or re-read) the service status file if it has changed since last time.
         /// </summary>
-        private void ReadStatus() {
+        private static void ReadStatus() {
             var age = new FileInfo(StatusFile).LastWriteTime;
             if (age == _statusAge)
                 return;
-- 
GitLab