2023-03-03 19:25:33 +00:00
|
|
|
/* NotificationItem.cs
|
|
|
|
* License: NCSA Open Source License
|
|
|
|
*
|
2024-05-21 20:15:19 +01:00
|
|
|
* Copyright: SPT
|
2023-03-03 19:25:33 +00:00
|
|
|
* AUTHORS:
|
|
|
|
* waffle.lord
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.ComponentModel;
|
2024-09-02 07:53:58 +00:00
|
|
|
using SPT.Launcher.Utilities;
|
2023-03-03 19:25:33 +00:00
|
|
|
|
2024-05-21 20:15:19 +01:00
|
|
|
namespace SPT.Launcher.Models.Launcher.Notifications
|
2023-03-03 19:25:33 +00:00
|
|
|
{
|
2024-09-02 07:53:58 +00:00
|
|
|
public class NotificationItem : NotifyPropertyChangedBase
|
2023-03-03 19:25:33 +00:00
|
|
|
{
|
2024-09-02 07:53:58 +00:00
|
|
|
private string _message;
|
2023-03-03 19:25:33 +00:00
|
|
|
public string Message
|
|
|
|
{
|
2024-09-02 07:53:58 +00:00
|
|
|
get => _message;
|
|
|
|
set => SetProperty(ref _message, value);
|
2023-03-03 19:25:33 +00:00
|
|
|
}
|
|
|
|
|
2024-09-02 07:53:58 +00:00
|
|
|
private string _buttonText;
|
2023-03-03 19:25:33 +00:00
|
|
|
public string ButtonText
|
|
|
|
{
|
2024-09-02 07:53:58 +00:00
|
|
|
get => _buttonText;
|
|
|
|
set => SetProperty(ref _buttonText, value);
|
2023-03-03 19:25:33 +00:00
|
|
|
}
|
|
|
|
|
2024-09-02 07:53:58 +00:00
|
|
|
private bool _hasButton;
|
2023-03-03 19:25:33 +00:00
|
|
|
public bool HasButton
|
|
|
|
{
|
2024-09-02 07:53:58 +00:00
|
|
|
get => _hasButton;
|
|
|
|
set => SetProperty(ref _hasButton, value);
|
2023-03-03 19:25:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public Action ItemAction = null;
|
|
|
|
|
2024-09-02 07:53:58 +00:00
|
|
|
public NotificationItem(string message)
|
2023-03-03 19:25:33 +00:00
|
|
|
{
|
2024-09-02 07:53:58 +00:00
|
|
|
Message = message;
|
2023-03-03 19:25:33 +00:00
|
|
|
ButtonText = string.Empty;
|
|
|
|
HasButton = false;
|
|
|
|
}
|
|
|
|
|
2024-09-02 07:53:58 +00:00
|
|
|
public NotificationItem(string message, string buttonText, Action itemAction)
|
2023-03-03 19:25:33 +00:00
|
|
|
{
|
2024-09-02 07:53:58 +00:00
|
|
|
Message = message;
|
|
|
|
ButtonText = buttonText;
|
2023-03-03 19:25:33 +00:00
|
|
|
HasButton = true;
|
2024-09-02 07:53:58 +00:00
|
|
|
ItemAction = itemAction;
|
2023-03-03 19:25:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|