2025-07-01 21:34:20 +08:00
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
2025-07-28 13:06:36 +08:00
|
|
|
using CommunityToolkit.Mvvm.Input;
|
2025-07-01 21:34:20 +08:00
|
|
|
|
2025-07-19 11:11:01 +08:00
|
|
|
namespace DMS.WPF.ViewModels.Dialogs;
|
2025-07-01 21:34:20 +08:00
|
|
|
|
2025-08-24 11:31:07 +08:00
|
|
|
public partial class ConfirmDialogViewModel : DialogViewModelBase<Boolean>
|
2025-07-01 21:34:20 +08:00
|
|
|
{
|
2025-07-28 13:06:36 +08:00
|
|
|
|
|
|
|
|
[ObservableProperty]
|
2025-08-23 09:09:07 +08:00
|
|
|
private string _message;
|
|
|
|
|
|
2025-08-24 11:31:07 +08:00
|
|
|
public ConfirmDialogViewModel(string title,string message,string primaryButText)
|
2025-08-23 09:09:07 +08:00
|
|
|
{
|
|
|
|
|
Message = message;
|
|
|
|
|
Title = title;
|
2025-08-23 16:01:30 +08:00
|
|
|
PrimaryButText = primaryButText;
|
2025-08-23 09:09:07 +08:00
|
|
|
}
|
2025-07-01 21:34:20 +08:00
|
|
|
|
2025-07-28 13:06:36 +08:00
|
|
|
|
|
|
|
|
[RelayCommand]
|
2025-08-23 09:09:07 +08:00
|
|
|
private void PrimaryButton()
|
2025-07-28 13:06:36 +08:00
|
|
|
{
|
2025-08-23 09:09:07 +08:00
|
|
|
Close(true);
|
2025-07-28 13:06:36 +08:00
|
|
|
}
|
|
|
|
|
[RelayCommand]
|
2025-08-23 09:09:07 +08:00
|
|
|
private void CancleButton()
|
2025-07-28 13:06:36 +08:00
|
|
|
{
|
2025-08-23 09:09:07 +08:00
|
|
|
Close(false);
|
2025-07-28 13:06:36 +08:00
|
|
|
}
|
2025-07-01 21:34:20 +08:00
|
|
|
}
|