Esempio n. 1
0
        protected override void UnloadData()
        {
            try
            {
                Utilities.SessionClosing = true;

                if (Utilities.AbortAllTasks())
                {
                    Logging.Instance.WriteDebug("CAUGHT AND ABORTED TASK!!!!");
                }

                RemoveMessageHandler();

                if (Logging.Instance != null)
                {
                    Logging.Instance.Close();
                }

                Communication.UnregisterHandlers();

                foreach (ShipyardItem yard in ProcessShipyardDetection.ShipyardsList.ToArray())
                {
                    yard.Disable(false);
                }
            }
            catch
            {
                //ignore errors on session close
            }
        }