设备编辑管理界面
This commit is contained in:
21
UIShare/PubEvent/AddDialogTabEvent.cs
Normal file
21
UIShare/PubEvent/AddDialogTabEvent.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using UIShare.UIViewModel;
|
||||
|
||||
namespace UIShare.PubEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// 其他模块向弹窗管理器添加 Tab 的事件。
|
||||
/// 发布方:任何需要将弹窗托管到 DialogManagerView 的模块。
|
||||
/// 订阅方:<c>DialogMangerViewModel</c>(仅一处订阅)。
|
||||
/// <code>
|
||||
/// // 示例:在某个 ViewModel 中发布
|
||||
/// _eventAggregator.GetEvent<AddDialogTabEvent>().Publish(new DialogTabInfo
|
||||
/// {
|
||||
/// Title = "设备配置",
|
||||
/// Content = new DeviceConfigView()
|
||||
/// });
|
||||
/// </code>
|
||||
/// </summary>
|
||||
public class AddDialogTabEvent : PubSubEvent<DialogTabInfo>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
UIShare/PubEvent/CancelMinimizeEvent.cs
Normal file
12
UIShare/PubEvent/CancelMinimizeEvent.cs
Normal 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
|
||||
{
|
||||
}
|
||||
}
|
||||
19
UIShare/UIViewModel/DialogTabInfo.cs
Normal file
19
UIShare/UIViewModel/DialogTabInfo.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user