弹窗优化

This commit is contained in:
hsc
2026-06-23 10:50:43 +08:00
parent 1e21d5f9f2
commit 5b721d2557
5 changed files with 33 additions and 12 deletions

View File

@@ -10,6 +10,12 @@ namespace UIShare.UIViewModel
/// <summary>Tab 标题(显示在标签页上)。</summary>
public string Title { get; set; } = string.Empty;
/// <summary>
/// 设备硬件指纹(如 "Tcp:192.168.1.100:502"),用于去重判断,
/// 防止同一物理设备被重复打开多个 Tab。
/// </summary>
public string Fingerprint { get; set; } = string.Empty;
/// <summary>
/// Tab 内容:传入一个已实例化的 <see cref="System.Windows.FrameworkElement"/>(通常是 UserControl
/// 由 ContentControl 直接承载展示。

View File

@@ -21,6 +21,14 @@ namespace DeviceEditModule.ViewModels
set => SetProperty(ref _title, value);
}
private string _fingerprint = string.Empty;
/// <summary>设备硬件指纹,用于去重字典的 Key。</summary>
public string Fingerprint
{
get => _fingerprint;
set => SetProperty(ref _fingerprint, value);
}
private object? _content;
/// <summary>Tab 内容区域(通常为 UserControl 实例)。</summary>
public object? Content