Example #1
0
        /// <summary>
        /// Close the connection.
        /// </summary>
        public void Close()
        {
            bool wasConnected = IsConnected;

            IsConnected = false;

            connectionImplementation.Close();

            CommunicationStatistics.Stop();

            if (wasConnected == true)
            {
                OnInfo(string.Format(Strings.Connection_Disconnected, Name));
            }

            OnDisconnect();
        }
 void AuxiliarySerialTerminal_Disposed(object sender, EventArgs e)
 {
     CommunicationStatistics.Stop();
 }