XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEToolBox

【WPF】XFE工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using XFEToolBox.Client.Installer.Utilities;
using XFEToolBox.WpfCore.Controls;
using XFEToolBox.Client.Installer.Views.Pages.Popups;

namespace XFEToolBox.Client.Installer.ViewModel.Pages.Popups
{
    public partial class AgreementDialogPopupPageViewModel(AgreementDialogPopupPage viewPage) : ViewModelBase
    {
        [ObservableProperty]
        string agreementContent = "";
        public AgreementDialogPopupPage ViewPage { get; set; } = viewPage;

        [RelayCommand]
        void Confirm()
        {
            if (ViewPage.PopupWindow is not null)
            {
                ViewPage.PopupWindow.Result = System.Windows.MessageBoxResult.Yes;
                ViewPage.PopupWindow.Close();
            }
        }
    }
}