Updated Write output

This commit is contained in:
Jeroen Saey
2025-07-28 13:52:56 +02:00
parent fe283384af
commit 19e713eb21
8 changed files with 619 additions and 650 deletions

View File

@@ -40,9 +40,9 @@ namespace EonaCat.HID.Analyzer
_deviceManager.OnDeviceRemoved += Hid_Removed;
}
public void RefreshDevices(ushort? vendorId = null, ushort? productId = null)
public async Task RefreshDevicesAsync(ushort? vendorId = null, ushort? productId = null)
{
_deviceList = _deviceManager.Enumerate(vendorId, productId);
_deviceList = await _deviceManager.EnumerateAsync(vendorId, productId).ConfigureAwait(false);
}
private void MainForm_Load(object sender, System.EventArgs e)
@@ -61,7 +61,7 @@ namespace EonaCat.HID.Analyzer
{
try
{
RefreshDevices();
RefreshDevicesAsync();
UpdateDeviceList();
toolStripStatusLabel1.Text = "Please select device and click open to start.";
}
@@ -182,7 +182,7 @@ namespace EonaCat.HID.Analyzer
{
try
{
RefreshDevices();
RefreshDevicesAsync();
UpdateDeviceList();
}
catch (Exception ex)
@@ -203,7 +203,7 @@ namespace EonaCat.HID.Analyzer
vid = ushort.Parse(str[0], NumberStyles.AllowHexSpecifier);
pid = ushort.Parse(str[1], NumberStyles.AllowHexSpecifier);
}
RefreshDevices(vid, pid);
RefreshDevicesAsync(vid, pid);
UpdateDeviceList();
}
catch (Exception ex)