设备编辑管理界面

This commit is contained in:
hsc
2026-06-12 10:00:13 +08:00
parent ffb22e1f20
commit 02d9923474
23 changed files with 2098 additions and 16 deletions

View File

@@ -0,0 +1,21 @@
using UIShare.UIViewModel;
namespace UIShare.PubEvent
{
/// <summary>
/// 其他模块向弹窗管理器添加 Tab 的事件。
/// 发布方:任何需要将弹窗托管到 DialogManagerView 的模块。
/// 订阅方:<c>DialogMangerViewModel</c>(仅一处订阅)。
/// <code>
/// // 示例:在某个 ViewModel 中发布
/// _eventAggregator.GetEvent&lt;AddDialogTabEvent&gt;().Publish(new DialogTabInfo
/// {
/// Title = "设备配置",
/// Content = new DeviceConfigView()
/// });
/// </code>
/// </summary>
public class AddDialogTabEvent : PubSubEvent<DialogTabInfo>
{
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UIShare.PubEvent
{
public class CancelMinimizeEvent:PubSubEvent
{
}
}

View File

@@ -0,0 +1,19 @@
namespace UIShare.UIViewModel
{
/// <summary>
/// 弹窗 Tab 信息载体(事件负载,轻量 POCO
/// 其他模块发布 <c>AddDialogTabEvent</c> 时填充此对象,
/// DialogMangerViewModel 接收后创建对应的 Tab 项。
/// </summary>
public class DialogTabInfo
{
/// <summary>Tab 标题(显示在标签页上)。</summary>
public string Title { get; set; } = string.Empty;
/// <summary>
/// Tab 内容:传入一个已实例化的 <see cref="System.Windows.FrameworkElement"/>(通常是 UserControl
/// 由 ContentControl 直接承载展示。
/// </summary>
public object? Content { get; set; }
}
}