测试样例

This commit is contained in:
2026-04-23 16:02:05 +08:00
parent 546453c82c
commit d41fe49863
2 changed files with 39 additions and 25 deletions

View File

@@ -8,6 +8,7 @@ using System.Net.Sockets;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
@@ -198,17 +199,23 @@ namespace 头罩视野.Views
}
//试样测试
private void RadioButton_Checked(object sender, RoutedEventArgs e)
private void TbTest_Checked(object sender, RoutedEventArgs e)
{
ma.BtnClickFunction(Function.ButtonType., 41);
// 选中 → 试样测试
var btn = sender as ToggleButton;
btn.Content = "试样测试";
btn.Background = System.Windows.Media.Brushes.LightBlue;
//_modbusMaster.WriteSingleCoilAsync(1, 41, true);
}
private void RadioButton_Unchecked(object sender, RoutedEventArgs e)
private void TbTest_Unchecked(object sender, RoutedEventArgs e)
{
ma.BtnClickFunction(Function.ButtonType., 41);
// 取消 → 空白测试
var btn = sender as ToggleButton;
btn.Content = "空白测试";
btn.Background = System.Windows.Media.Brushes.LightGray;
//_modbusMaster.WriteSingleCoilAsync(1, 41, false);
}
private void Button_Click_home(object sender, RoutedEventArgs e)
{