测试
This commit is contained in:
@@ -160,8 +160,8 @@ Margin="200,0,0,0" Height="194"/>
|
||||
Padding="25,20" Margin="0,0,0,15" >
|
||||
<StackPanel Cursor="">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,15">
|
||||
<TextBlock Text="左目视野面积:" Style="{StaticResource LabelStyle}"/>
|
||||
<TextBox Name="zmsyarea" Text="" Style="{StaticResource TextBoxStyle}"/>
|
||||
<TextBlock Text="左目视野面积:" Style="{StaticResource LabelStyle}" />
|
||||
<TextBox Name="zmsyarea" Text="" Style="{StaticResource TextBoxStyle}" />
|
||||
<TextBlock Text="cm²" Style="{StaticResource UnitStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace 头罩视野.Views
|
||||
data.VisionRetentionRate == _lastRecord.VisionRetentionRate)
|
||||
{
|
||||
return; // 一样就不添加
|
||||
}
|
||||
}
|
||||
// 不一样 → 插入表格
|
||||
TestDataStore.AddNewRecord(data);
|
||||
_lastRecord = data;
|
||||
@@ -380,17 +380,19 @@ namespace 头罩视野.Views
|
||||
}
|
||||
private void dqangle_GotFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ma.WriteToPLCForNew(fbspeed.Text.Trim(), 202, Function.DataType.浮点型);
|
||||
ma.WriteToPLCForNew(dqangle.Text.Trim(), 202, Function.DataType.浮点型);
|
||||
System.Threading.Tasks.Task.Delay(50);
|
||||
fbspeed.Focus();
|
||||
dqangle.Focus();
|
||||
}
|
||||
private void zdangle_GotFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ma.WriteToPLCForNew(fbspeed.Text.Trim(), 310, Function.DataType.浮点型);
|
||||
ma.WriteToPLCForNew(zdangle.Text.Trim(), 310, Function.DataType.浮点型);
|
||||
System.Threading.Tasks.Task.Delay(50);
|
||||
fbspeed.Focus();
|
||||
zdangle.Focus();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//错误信息提示
|
||||
private void ShowError(string msg) => MessageBox.Show(msg, "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
private void GoHome(object s, RoutedEventArgs e) => NavigationService.Content = null;
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace 头罩视野.Views
|
||||
// 获取客户端
|
||||
var client = ModbusHelper.TcpClient;
|
||||
//进入页面是否要保留原来的数据????,
|
||||
//RecordDataGrid.ItemsSource = null;
|
||||
RecordDataGrid.ItemsSource = null;
|
||||
RecordDataGrid.ItemsSource = TestDataStore.Records;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user