Files
SteamTools/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Windows/MessageWindowViewModel.cs
T
2021-03-08 17:45:29 +08:00

35 lines
794 B
C#

using ReactiveUI;
using System.Application.Services;
namespace System.Application.UI.ViewModels.Windows
{
public class MessageWindowViewModel<T> : WindowViewModel
{
private readonly T Window;
public MessageWindowViewModel(T window)
{
Window = window;
}
private string? _Content;
public string? Content
{
get => _Content;
set => this.RaiseAndSetIfChanged(ref _Content, value);
}
public void OK()
{
DialogResult = true;
DI.Get<IMessageWindowService>().CloseWindow(Window);
}
public void Cancel()
{
DialogResult = false;
DI.Get<IMessageWindowService>().CloseWindow(Window);
}
}
}