diff --git a/src/DownKyi/Services/AlertService.cs b/src/DownKyi/Services/AlertService.cs index 4b46ecf..910842d 100644 --- a/src/DownKyi/Services/AlertService.cs +++ b/src/DownKyi/Services/AlertService.cs @@ -31,12 +31,13 @@ namespace DownKyi.Services /// 显示一个警告弹窗 /// </summary> /// <param name="message"></param> + /// <param name="buttonNumber"></param> /// <returns></returns> - public ButtonResult ShowWarning(string message) + public ButtonResult ShowWarning(string message, int buttonNumber = 1) { VectorImage image = SystemIcon.Instance().Warning; string title = DictionaryResource.GetString("Warning"); - return ShowMessage(image, title, message, 1); + return ShowMessage(image, title, message, buttonNumber); } /// <summary> diff --git a/src/DownKyi/ViewModels/DownloadManager/DownloadedItem.cs b/src/DownKyi/ViewModels/DownloadManager/DownloadedItem.cs index 7ddde0b..244459c 100644 --- a/src/DownKyi/ViewModels/DownloadManager/DownloadedItem.cs +++ b/src/DownKyi/ViewModels/DownloadManager/DownloadedItem.cs @@ -155,7 +155,7 @@ namespace DownKyi.ViewModels.DownloadManager private void ExecuteRemoveVideoCommand() { AlertService alertService = new AlertService(DialogService); - ButtonResult result = alertService.ShowWarning(DictionaryResource.GetString("ConfirmDelete")); + ButtonResult result = alertService.ShowWarning(DictionaryResource.GetString("ConfirmDelete"), 2); if (result != ButtonResult.OK) { return; diff --git a/src/DownKyi/ViewModels/DownloadManager/DownloadingItem.cs b/src/DownKyi/ViewModels/DownloadManager/DownloadingItem.cs index 0f090eb..7e54bf2 100644 --- a/src/DownKyi/ViewModels/DownloadManager/DownloadingItem.cs +++ b/src/DownKyi/ViewModels/DownloadManager/DownloadingItem.cs @@ -218,7 +218,7 @@ namespace DownKyi.ViewModels.DownloadManager private void ExecuteDeleteCommand() { AlertService alertService = new AlertService(DialogService); - ButtonResult result = alertService.ShowWarning(DictionaryResource.GetString("ConfirmDelete")); + ButtonResult result = alertService.ShowWarning(DictionaryResource.GetString("ConfirmDelete"), 2); if (result != ButtonResult.OK) { return;