/// <summary> /// Closes modem's serial port connection and updates UI accordingly. /// </summary> private void CloseShop() { if (_modem.IsOpen) { _modem.Received -= Modem_ReceiveEvent; _modem.Error -= Modem_ErrorEvent; _modem.Close(); _view.DisableDeviceRelatedControls(false); _view.UpdateProvider(Resources.NoRealValue); _view.UpdateRSSI(1); _view.UpdateCSNetwork(6); _view.UpdatePSNetwork(6); _view.UpdatePSAttachment(2); _view.UpdateToolStripStatus($"Disconnected from {_view.SelectedModem}"); } }