message result sync

This commit is contained in:
rmbgame
2021-03-08 17:42:26 +08:00
parent 54a2874156
commit 49cd9d0342
14 changed files with 101 additions and 40 deletions
@@ -28,11 +28,20 @@ namespace System.Application.UI.ViewModels
public void DebugButton_Click()
{
Services.ToastService.Current.Notify("Test CommandTest CommandTest CommandTest CommandTest CommandTest Command");
Services.ToastService.Current.Notify("Test CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest CommandTest Command");
DebugString += Services.ToastService.Current.Message + Environment.NewLine;
DebugString += Services.ToastService.Current.IsVisible + Environment.NewLine;
//DI.Get<IMessageWindowService>().ShowDialog("Test", "Test");
var result = DI.Get<IMessageWindowService>().ShowDialog(@"Steam++ v1.1.2 2021-01-29
更新内容
1、新增账号切换的状态栏右下角登录新账号功能
2、新增实时刷新获取Steam新登录的账号数据功能
3、新增FAQ常见问题疑难解答文本,可以在关于中找到它
4、优化配置文件备份机制,如果配置文件出错会提示还原上次读取成功的配置
5、优化错误日志记录,现在它更详细了
6、修复谷歌验证码代理方式为全局跳转recatpcha
7、修复配置文件加载时提示根元素错误
8、修复某些情况下开机自启失效问题", "Title").ContinueWith(s => DebugString += s.Result + Environment.NewLine);
}
}
}
@@ -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);
}
}
}