2025-07-19 11:11:01 +08:00
|
|
|
|
using DMS.WPF.ViewModels.Dialogs;
|
2025-07-07 21:15:27 +08:00
|
|
|
|
using iNKORE.UI.WPF.Modern.Controls;
|
|
|
|
|
|
|
2025-07-26 10:05:43 +08:00
|
|
|
|
namespace DMS.WPF.Views.Dialogs;
|
2025-07-07 21:15:27 +08:00
|
|
|
|
|
|
|
|
|
|
public partial class IsActiveDialog : ContentDialog
|
|
|
|
|
|
{
|
|
|
|
|
|
|
2025-09-02 18:29:58 +08:00
|
|
|
|
public IsActiveDialog()
|
2025-07-07 21:15:27 +08:00
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
|
|
|
|
|
{
|
|
|
|
|
|
// 确认按钮点击时,ViewModel.SelectedIsActive 已经通过绑定更新
|
|
|
|
|
|
// 如果用户没有选择任何选项,可以阻止关闭对话框
|
2025-09-02 18:29:58 +08:00
|
|
|
|
//if (!ViewModel.SelectedIsActive.HasValue)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// args.Cancel = true;
|
|
|
|
|
|
//}
|
2025-07-07 21:15:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
|
|
|
|
|
{
|
|
|
|
|
|
// 取消按钮点击时,将 SelectedIsActive 设置为 null
|
2025-09-02 18:29:58 +08:00
|
|
|
|
//ViewModel.SelectedIsActive = null;
|
2025-07-07 21:15:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|