干掉了浩方查马甲代码

This commit is contained in:
2024-08-24 01:54:11 +02:00
parent 08700abd4f
commit 66458e831c
15 changed files with 217 additions and 434 deletions

View File

@@ -13,12 +13,10 @@ namespace AnotherReplayReader
/// </summary>
internal partial class Window1 : Window
{
private readonly PlayerIdentity _identity;
public Window1(PlayerIdentity identity)
public Window1()
{
InitializeComponent();
_identity = identity;
Refresh(true);
}
@@ -34,7 +32,6 @@ namespace AnotherReplayReader
await Display();
_dataGrid.ItemsSource = loading.Concat(_dataGrid.ItemsSource.Cast<IpAndPlayer>());
}
await _identity.Fetch();
await Display();
}
catch (Exception e)
@@ -49,26 +46,6 @@ namespace AnotherReplayReader
private async Task Display(string filter = "", string nameFilter = "")
{
var result = await Task.Run(() =>
{
var pinyin = nameFilter.ToPinyin();
var query = _identity
.AsSortedList()
.Where(x =>
{
if (!x.IpString.Contains(filter))
{
return false;
}
if (x.PinyinId?.ContainsIgnoreCase(pinyin) is true)
{
return true;
}
return x.Id.ContainsIgnoreCase(nameFilter);
});
return new ObservableCollection<IpAndPlayer>(query);
});
_dataGrid.ItemsSource = result;
}
private async void OnClick(object sender, RoutedEventArgs e)
@@ -114,7 +91,7 @@ namespace AnotherReplayReader
{
var bytes = ip.GetAddressBytes();
var ipNum = (uint)bytes[0] * 256 * 256 * 256 + bytes[1] * 256 * 256 + bytes[2] * 256 + bytes[3];
return await _identity.UpdateIpTable(checked((uint)ipNum), idText).ConfigureAwait(false);
return false;
}
private async void OnIpFieldChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)