mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-24 10:49:51 +08:00
message result sync
This commit is contained in:
+19
-5
@@ -1,20 +1,34 @@
|
||||
using ReactiveUI;
|
||||
using System.Application.Services;
|
||||
|
||||
namespace System.Application.UI.ViewModels.Windows
|
||||
{
|
||||
public class MessageWindowViewModel : WindowViewModel
|
||||
public class MessageWindowViewModel<T> : WindowViewModel
|
||||
{
|
||||
public MessageWindowViewModel()
|
||||
private readonly T Window;
|
||||
public MessageWindowViewModel(T window)
|
||||
{
|
||||
|
||||
Window = window;
|
||||
}
|
||||
|
||||
private string _Content;
|
||||
public string Content
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user