private void BaeScanEdit_TextChanged(object sender, TextChangedEventArgs e) { if (string.IsNullOrWhiteSpace(e.NewTextValue)) { return; } if (ScanResultCommand == null) { return; } if (e.NewTextValue.Contains("\n")) { // xiehuoViewModel.SearchOrderCommand.Execute(e.OldTextValue); ScanResultCommand.Execute(e.NewTextValue); try { } catch (Exception exception) { Console.WriteLine(exception); throw; } this.Text = ""; this.Focus(); } }
public void RaiseScanResult(Result result) { Result = result; OnScanResult?.Invoke(Result); ScanResultCommand?.Execute(Result); }