功能更新
This commit is contained in:
43
Melskin/Controls/Notification/NotificationModel.cs
Normal file
43
Melskin/Controls/Notification/NotificationModel.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace Melskin.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// 代表系统通知的模型,包含标题、消息内容、类型和显示时长等信息。此类用于在应用程序中创建并配置通知。
|
||||
/// </summary>
|
||||
public class NotificationModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取此通知的唯一标识符。每个通知实例生成时都会自动分配一个全局唯一的ID。
|
||||
/// </summary>
|
||||
public Guid Id { get; } = Guid.NewGuid();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置通知的标题。此属性用于存储和显示通知的标题文本。
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置通知的消息内容。此属性用于存储和显示通知的具体信息。
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代表通知的类型,用于区分不同的通知类别,如信息、成功、警告或错误。
|
||||
/// </summary>
|
||||
public NotificationType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置通知显示的持续时间。此属性用于定义从通知显示到自动关闭的时间间隔。
|
||||
/// </summary>
|
||||
public TimeSpan Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代表系统通知的模型,包含标题、消息内容、类型和显示时长等信息。
|
||||
/// </summary>
|
||||
public NotificationModel(string title, string message, NotificationType type, TimeSpan duration)
|
||||
{
|
||||
Title = title;
|
||||
Message = message;
|
||||
Type = type;
|
||||
Duration = duration;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user