|
|
@@ -204,7 +204,7 @@ public partial class MainWindow : Window
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- SetStatus($"已发现 {_discoveredDevices.Count} 台设备,请双击 IP 连接。", StatusMessageType.Success, true);
|
|
|
+ SetStatus($"已发现 {_discoveredDevices.Count} 台设备,请点击右侧连接。", StatusMessageType.Success, true);
|
|
|
}
|
|
|
catch (OperationCanceledException)
|
|
|
{
|
|
|
@@ -272,9 +272,9 @@ public partial class MainWindow : Window
|
|
|
SetStatus($"已发现 {_discoveredDevices.Count} 台设备,搜索仍在继续。", StatusMessageType.Success, true);
|
|
|
}
|
|
|
|
|
|
- private async void DiscoveredDevicesListView_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
|
|
+ private async void ConnectDeviceButton_OnClick(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- if (!_isBusy && DiscoveredDevicesListView.SelectedItem is DiscoveredDevice device)
|
|
|
+ if (!_isBusy && sender is Button { DataContext: DiscoveredDevice device })
|
|
|
{
|
|
|
await ConnectToDeviceAsync(device);
|
|
|
}
|
|
|
@@ -288,9 +288,11 @@ public partial class MainWindow : Window
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- DeviceIpColumn.Width = Math.Max(130, availableWidth * 0.26);
|
|
|
- DeviceHostnameColumn.Width = Math.Max(150, availableWidth * 0.30);
|
|
|
- DeviceMacColumn.Width = Math.Max(180, availableWidth - DeviceIpColumn.Width - DeviceHostnameColumn.Width);
|
|
|
+ DeviceActionColumn.Width = 88;
|
|
|
+ var contentWidth = Math.Max(0, availableWidth - DeviceActionColumn.Width);
|
|
|
+ DeviceIpColumn.Width = Math.Max(130, contentWidth * 0.26);
|
|
|
+ DeviceHostnameColumn.Width = Math.Max(150, contentWidth * 0.30);
|
|
|
+ DeviceMacColumn.Width = Math.Max(180, contentWidth - DeviceIpColumn.Width - DeviceHostnameColumn.Width);
|
|
|
}
|
|
|
|
|
|
private void DiscoveredDevicesListView_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
|