private void enableLogWatcher(bool enable) { try { if (logWatcher != null) logWatcher.Close(); if (enable) { logWatcher = new LogWatcher(); foreach (Player player in players) { logWatcher.Add(player.LogDir, "_Event.*.txt"); logWatcher.Add(player.LogDir, "_Skills.*.txt"); logWatcher.PollInterval = 5000; } logWatcher.FileNotify += new LogWatcher.FileNotificationEventHandler(logWatcher_FileNotify); } else { logWatcher = null; } } catch (Exception e) { MessageBox.Show(e.Message); } }
public void Start() { if (logWatcher != null) { logWatcher.Close(); } logWatcher = new LogWatcher(); logWatcher.Add(player.LogDir, "_Event.*.txt"); logWatcher.PollInterval = 500; logWatcher.Notify += new LogWatcher.NotificationEventHandler(logWatcher_Notify); }
private void Start() { ticks = 0; actions = 0; actionStart = -1; actionEnd = -1; totalSkill = 0; totalTime = 0; skillTime = 0; rel = 0; srel = 0; trel = 0; UpdateDisplay(); if (logWatcher != null) { logWatcher.Close(); } logWatcher = new LogWatcher(); logWatcher.Add(player.LogDir, "_Event.*.txt"); logWatcher.Add(player.LogDir, "_Skills.*.txt"); logWatcher.PollInterval = 500; logWatcher.Notify += new LogWatcher.NotificationEventHandler(logWatcher_Notify); }