protected override void OnClosing(CancelEventArgs e)
        {
            base.OnClosing(e);

            SavedValueRegistry.SaveValue("LoginName", txtLoginName.Text);
            SavedValueRegistry.SaveValue("LoginServer", txtLoginServer.Text);
            SavedValueRegistry.SaveValue("LogServer", txtLogServer.Text);
            SavedValueRegistry.SaveValue("ProcessName", txtLogId.Text);

            m_TickTimer.Stop();
            m_TickTimer = null;


            if (m_OnlineClient != null)
            {
                m_OnlineClient.DisconnectAll();
                m_OnlineClient.Dispose();
                m_OnlineClient = null;
            }

            if (m_MessageRouter != null)
            {
                m_MessageRouter.Dispose();
                m_MessageRouter = null;
            }

            GlobalEngine.Stop();
        }