mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-25 03:09:54 +08:00
35 lines
794 B
C#
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);
|
|
}
|
|
}
|
|
}
|