/// <summary>
        /// Performs all neccesary shutdown activities for this module
        /// </summary>
        private void Shutdown()
        {
            logger.Debug("Shutting down Commerce Module");

            // Shut down the zone copmletion controller
            this.zoneCompletionController.Shutdown();

            // Shutdown the view controller
            this.viewController.Shutdown();

            // Make sure we have saved all user data
            // Note that this is a little redundant given the AutoSave feature,
            // but it does help to make sure the user's data is really saved
            ZoneCompletionUserData.SaveData(this.UserData, ZoneCompletionUserData.Filename);
        }
示例#2
0
        public ZoneCompletionController(IZoneService zoneService, IPlayerService playerService, ISystemService systemService, IHasZoneName zoneNameObject, ZoneCompletionUserData userData)
        {
            logger.Debug("Initializing Zone Completion Controller");
            this.zoneService    = zoneService;
            this.playerService  = playerService;
            this.systemService  = systemService;
            this.zoneNameObject = zoneNameObject;
            this.isStopped      = false;

            this.UserData = userData;

            // Initialize refresh timers
            this.zoneRefreshTimer          = new Timer(this.RefreshZone);
            this.ZoneRefreshInterval       = 1000;
            this.itemLocationsRefreshTimer = new Timer(this.RefreshLocations);
            this.LocationsRefreshInterval  = 250; // TODO: Tweak this until we get good performance without sucking up the CPU

            this.startCallCount = 0;
            this.CurrentMapID   = -1;
            logger.Info("Zone Completion Controller initialized");
        }