コード例 #1
0
 /// <summary>
 /// 设置程序状态
 /// </summary>
 /// <param name="state"></param>
 void SetAppState(EnAppState state)
 {
     enAppState                = state;
     this.btnStart.Enabled     = (enAppState == EnAppState.ST_STOPED);
     this.btnStop.Enabled      = (enAppState == EnAppState.ST_STARTED);
     this.txtIpAddress.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.txtPort.Enabled      = (enAppState == EnAppState.ST_STOPED);
     this.txtDisConn.Enabled   = (enAppState == EnAppState.ST_STARTED);
     this.btnDisconn.Enabled   = (enAppState == EnAppState.ST_STARTED && this.txtDisConn.Text.Length > 0);
 }
コード例 #2
0
ファイル: frmClient.cs プロジェクト: zxsted/HP-Socket
 /// <summary>
 /// 设置程序状态
 /// </summary>
 /// <param name="state"></param>
 void SetAppState(EnAppState state)
 {
     enAppState                = state;
     this.btnStart.Enabled     = (enAppState == EnAppState.ST_STOPED);
     this.btnStop.Enabled      = (enAppState == EnAppState.ST_STARTED);
     this.txtIpAddress.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.txtPort.Enabled      = (enAppState == EnAppState.ST_STOPED);
     this.cbxAsyncConn.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.btnSend.Enabled      = (enAppState == EnAppState.ST_STARTED);
 }
コード例 #3
0
ファイル: frmServer.cs プロジェクト: happygao521/HP-Socket
 /// <summary>
 /// 设置程序状态
 /// </summary>
 /// <param name="state"></param>
 void SetAppState(EnAppState state)
 {
     enAppState = state;
     this.btnStart.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.btnStop.Enabled = (enAppState == EnAppState.ST_STARTED);
     this.txtIpAddress.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.txtPort.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.txtDisConn.Enabled = (enAppState == EnAppState.ST_STARTED);
     this.btnDisconn.Enabled = (enAppState == EnAppState.ST_STARTED && this.txtDisConn.Text.Length > 0);
 }
コード例 #4
0
ファイル: frmClient.cs プロジェクト: happygao521/HP-Socket
 /// <summary>
 /// 设置程序状态
 /// </summary>
 /// <param name="state"></param>
 void SetAppState(EnAppState state)
 {
     enAppState = state;
     this.btnStart.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.btnStop.Enabled = (enAppState == EnAppState.ST_STARTED);
     this.txtIpAddress.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.txtPort.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.cbxAsyncConn.Enabled = (enAppState == EnAppState.ST_STOPED);
     this.btnSend.Enabled = (enAppState == EnAppState.ST_STARTED);
 }