private bool createRxSettingsWindow() { bool flag = false; if (((this.comm != null) && !this.comm.comPort.IsOpen) && (!this.comm.CMC.HostAppClient.IsOpen() && !this.comm.CMC.HostAppServer.IsOpen())) { frmCommSettings settings = new frmCommSettings(ref this.comm); if (settings.ShowDialog() != DialogResult.Cancel) { this._isInit = true; flag = true; } return flag; } MessageBox.Show("Port is connected! Disconnect port before configuring.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Hand); return flag; }
private bool createRxSettingsWindow(ref CommunicationManager comm) { bool flag = false; if (comm != null) { if (!comm.IsSourceDeviceOpen()) { frmCommSettings settings = new frmCommSettings(ref comm); if (settings.ShowDialog() != DialogResult.Cancel) { flag = true; } } return flag; } MessageBox.Show("Port is connected! Disconnect port before configuring.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Hand); return flag; }