Ejemplo n.º 1
0
            public void Disconnect()
            {
                try
                {
                    if (_system == null || _system.State != ConnectionState.Connected)
                    {
                        return;
                    }

                    _system.Disconnect();

                    CleanupConnection();

                    _results.ClearCachedResults();
                    _results = null;
                }
                catch { }
            }
Ejemplo n.º 2
0
        private void btnDisconnect_Click(object sender, EventArgs e)
        {
            try
            {
                if (_system == null || _system.State != ConnectionState.Connected)
                {
                    return;
                }

                btnDisconnect.Enabled = false;

                _autoconnect = false;
                _system.Disconnect();

                CleanupConnection();

                _results.ClearCachedResults();
                _results = null;
            }
            finally
            {
                RefreshGui();
            }
        }