_proxyManager.UpdatePacFile();\r
PerformZoom();\r
_shipLabels.AdjustAkashiTimers();\r
- LoadState();\r
+ LoadData();\r
_sniffer.RepeatingTimerController = new RepeatingTimerController(_notificationManager, _config);\r
}\r
\r
private readonly FileSystemWatcher _watcher = new FileSystemWatcher\r
{\r
Path = AppDomain.CurrentDomain.BaseDirectory,\r
- Filter = "status.xml",\r
NotifyFilter = NotifyFilters.LastWrite\r
};\r
\r
private readonly Timer _watcherTimer = new Timer {Interval = 1000};\r
\r
- private void LoadState()\r
+ private void LoadData()\r
{\r
+ var target = "";\r
_sniffer.LoadState();\r
+ ItemSpec.LoadTpSpec();\r
_watcher.SynchronizingObject = this;\r
_watcherTimer.Tick += (sender, ev) =>\r
{\r
_watcherTimer.Stop();\r
- _sniffer.LoadState();\r
+ switch (target)\r
+ {\r
+ case "status.xml":\r
+ _sniffer.LoadState();\r
+ break;\r
+ case "TP.csv":\r
+ ItemSpec.LoadTpSpec();\r
+ break;\r
+ }\r
};\r
_watcher.Changed += (sender, ev) =>\r
{\r
+ target = ev.Name;\r
_watcherTimer.Stop();\r
_watcherTimer.Start();\r
};\r