Demo 2アナログ簡易ログインクライアントコード

4809 ワード

NetworkCommsネットワーク フレームワークの 

public partial class Form1 : Form { // public ConnectionInfo connInfo = null; // Connection newTcpConnection; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { // connInfo = new ConnectionInfo(txtIP.Text, int.Parse(txtPort.Text)); // newTcpConnection = TCPConnection.GetConnection(connInfo); button1.Enabled = false; button1.Text = " "; } private void button2_Click(object sender, EventArgs e) { // LoginContract contract = new LoginContract(); contract.UserID = txtUserName.Text; contract.PassWord = txtPassword.Text; // ResMsgContract resMsg = newTcpConnection.SendReceiveObject<ResMsgContract>("ReqLogin", "ResLogin", 5000, contract); if (resMsg.Message == " ") { MessageBox.Show(" "); } else { MessageBox.Show(" "); } } //http://shop115882994.taobao.com private void Form1_FormClosing(object sender, FormClosingEventArgs e) { NetworkComms.Shutdown(); this.Dispose(); this.Close(); } } www.networkcomms.cn
http://www.cnblogs.com/networkcomms