//add device private void addDeviceBtn_Click(object sender, EventArgs e) { String strUserName = this.userNameText.Text; String strPassword = this.passwordText.Text; if (strUserName == "" || strPassword == "") { return; } for (int i = 0; i < oDeviceIPList.Count() && i < oDevicePortList.Count(); i++) { m_oNetDemo.LoginLocalDevice(oDeviceIPList[i], oDevicePortList[i], strUserName, strPassword); } this.Close(); }
private void OKBtn_Click(object sender, EventArgs e) { String strIPAddr = this.ipDomainNameText.Text; short sPort = 0; try { sPort = Convert.ToInt16(this.portText.Text); } catch (FormatException) { return; } catch (OverflowException) { return; } String strUserName = this.userNameText.Text; String strPassword = this.passwordText.Text; m_oNetDemo.LoginLocalDevice(strIPAddr, sPort, strUserName, strPassword); this.Close(); }