32 lines
948 B
C#
32 lines
948 B
C#
using System;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace PLCDataMonitor
|
|
{
|
|
public partial class HomePage : UserControl
|
|
{
|
|
// 定义事件用于与主窗口通信
|
|
public event EventHandler<string> ConnectButtonClicked;
|
|
|
|
public HomePage()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
// 更新数据显示
|
|
public void UpdateData(string pressure1, string pressure2, string friction1, string friction2, int count1, int count2, string t1, string t2, string Distince)
|
|
{
|
|
TbStation1Pressure.Text = pressure1;
|
|
TbStation2Pressure.Text = pressure2;
|
|
TbFriction1.Text = friction1;
|
|
TbFriction2.Text = friction2;
|
|
txtcount1.Text = count1.ToString();
|
|
txtcount2.Text = count2.ToString();
|
|
|
|
txtT1.Text = t1;
|
|
txtT2.Text = t2;
|
|
txtDistince.Text = Distince;
|
|
}
|
|
}
|
|
} |