private void OpenTCPConnection() { int tcpPort; string host; int timeout; tcpPort = Convert.ToInt32(textBoxPort.Text); host = this.textBoxHost.Text; timeout = Convert.ToInt32(this.textBoxTimeout.Text); try { fedm.ConnectTCP(host, tcpPort); fedm.SetPortPara("Timeout", timeout.ToString()); } catch (FePortDriverException ex) { MessageBox.Show(ex.ToString(), "Connection Error!"); } }
private void OpenTCPConnection() { int tcpPort; string host; int timeout; tcpPort = Convert.ToInt32(textBoxPort.Text); host = this.textBoxHost.Text; timeout = Convert.ToInt32(this.textBoxTimeout.Text); try { fedm.ConnectTCP(host, tcpPort); // in this methode the readout of ReadInfo is already included fedm.SetPortPara("Timeout", timeout.ToString()); } catch (FePortDriverException ex) { MessageBox.Show(ex.ToString(), "Error"); } }
public bool ConnectTCP() { _reader.ConnectTCP(Settings.Instance.IPAddress, Settings.Instance.IPPort); return(_reader.Connected); }