Example #1
0
 /// <summary>
 /// 系数读取
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnFactorRead_Click(object sender, RoutedEventArgs e)
 {
     if ((upnpCalibration != null) && calibrationTcpRun)
     {
         var data = oldCalibration.MakeFactorCallData();
         upnpCalibration.SendMessage(data);
         BeginInvokeUpdateHistory(data, data.Length, "主站发送:D帧:召唤系数");
         MakeLogMessage(sender, "系数读取", Log.LogType.Calibration);
     }
     else
     {
         MessageBox.Show("没有开启网络连接", "主站发送:D帧:召唤系数");
     }
 }
Example #2
0
 /// <summary>
 /// 发送数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSend_Click(object sender, RoutedEventArgs e)
 {
     if (isTcpRun)
     {
         upnpServer.SendMessage(txtSendMsg.Text);
     }
     else
     {
         MessageBox.Show("upnpServer未启动,发送数据无效");
     }
 }