private void OnClose(object sender, System.ComponentModel.CancelEventArgs e) { if (ConfigFile.Read("mpcClose").ToBoolean() && m_mpcAPI != null && m_mpcAPI.isHooked) { m_mpcAPI.CloseMPC(); } m_myList.Close(); m_aniDBAPI.Logout(); m_notifyIcon.Dispose(); m_notifyIcon = null; }