2024-05-21 20:15:19 +01:00
|
|
|
|
using SPT.Launcher.Helpers;
|
2023-03-03 19:25:33 +00:00
|
|
|
|
using ReactiveUI;
|
|
|
|
|
|
2024-05-21 20:15:19 +01:00
|
|
|
|
namespace SPT.Launcher.ViewModels.Dialogs
|
2023-03-03 19:25:33 +00:00
|
|
|
|
{
|
|
|
|
|
public class WarningDialogViewModel : ViewModelBase
|
|
|
|
|
{
|
|
|
|
|
public string ButtonText { get; set; }
|
|
|
|
|
public string WarningMessage { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A warning dialog
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="Host">Set to null when <see cref="ViewModelBase.ShowDialog(object)"/> is used, since the dialog host is handling routing</param>
|
|
|
|
|
/// <param name="ButtonText"></param>
|
|
|
|
|
/// <param name="WarningMessage"></param>
|
|
|
|
|
public WarningDialogViewModel(IScreen Host, string WarningMessage, string? ButtonText = null) : base(Host)
|
|
|
|
|
{
|
|
|
|
|
this.WarningMessage = WarningMessage;
|
|
|
|
|
this.ButtonText = ButtonText ?? LocalizationProvider.Instance.ok;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|