Browse Source

冲突处理

master
sc 6 days ago
parent
commit
b9c2d9fb2d
  1. 8
      QueryPage.xaml.cs
  2. 5
      View/LogPage.xaml.cs

8
QueryPage.xaml.cs

@ -4,14 +4,18 @@ namespace SunlightAggregationTerminal;
public partial class QueryPage : ContentPage
{
// 定义一个静态的回调动作
public static Action<string>? OnScanQuery;
public QueryPage()
{
InitializeComponent();
WeakReferenceMessenger.Default.Register<string>(this, (r, scannedValue) =>
{
{
ResultEntry.Text = scannedValue;
});
});
};
}
private async void OnScanButtonClicked(object sender, EventArgs e)
{

5
View/LogPage.xaml.cs

@ -7,14 +7,15 @@ namespace SunlightAggregationTerminal.View;
public partial class LogPage : ContentPage
{
public static Action<string>? OnScanProfile;
public LogPage()
{
InitializeComponent();
WeakReferenceMessenger.Default.Register<string>(this, (r, scannedValue) =>
{
Enterprise.Text = scannedValue;
});
Enterprise.Text = scannedValue;
});
}
private void OnScanButtonClicked(object sender, EventArgs e)

Loading…
Cancel
Save