Ejemplo n.º 1
0
        private void run(object _mode)
        {
            tracking_mode = (MODE)_mode; // get the meter's mode

            parser         = new Parser(this);
            group          = new Group();                 // the players group, with who use it
            effect_tracker = new OverTimeEffectTracker(); // the DOT and HOT tracker
            pet_tracker    = new PetTracker();            // Pet Tracker

            if (tracking_mode == MODE.LIVE)
            {
                // scan the previous lines of log file, to get the current group members
                if (Config.get_scan_previos_session_on_startup())
                {
                    Replay r = new Replay(Replay.MODE.IGNORE_COMBAT, Config.get_game_log_path());
                    r.Dispose();
                }
                log_tracker = new LiveTracker(); // init the log reader & file watcher
            }
            else if (tracking_mode == MODE.REPLAY)
            {
                Replay r = new Replay(Replay.MODE.NORMAL, Config.get_game_log_path());
                r.Dispose();
            }
            else if (tracking_mode == MODE.REPLAY_DEBUG)
            {
                Replay r = new Replay(Replay.MODE.DEBUG, Config.get_game_log_path());
                r.Dispose();
            }
        }
Ejemplo n.º 2
0
 public void resume()
 {
     if (tracking_mode == MODE.PAUSED)
     {
         tracking_mode = MODE.LIVE;
         log_tracker   = new LiveTracker();
     }
 }
Ejemplo n.º 3
0
 public void pause()
 {
     if (tracking_mode == MODE.LIVE)
     {
         tracking_mode = MODE.PAUSED;
         log_tracker   = null;
     }
 }
Ejemplo n.º 4
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             if (thread != null)
             {
                 thread.Abort();
                 thread = null;
             }
             if (parser != null)
             {
                 parser.Dispose();
                 parser = null;
             }
             if (group != null)
             {
                 group.Dispose();
                 group = null;
             }
             if (effect_tracker != null)
             {
                 effect_tracker.Dispose();
                 effect_tracker = null;
             }
             if (pet_tracker != null)
             {
                 pet_tracker.Dispose();
                 pet_tracker = null;
             }
             if (log_tracker != null)
             {
                 log_tracker.Dispose();
                 log_tracker = null;
             }
             Meter.active_meter = null;
             GC.Collect();
         }
     }
     disposed = true;
 }