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