下载列表弹出框优化

pull/896/head
leiurayer 2 years ago
parent 6221dd504e
commit 11538b6efa

@ -31,12 +31,13 @@ namespace DownKyi.Services
/// 显示一个警告弹窗 /// 显示一个警告弹窗
/// </summary> /// </summary>
/// <param name="message"></param> /// <param name="message"></param>
/// <param name="buttonNumber"></param>
/// <returns></returns> /// <returns></returns>
public ButtonResult ShowWarning(string message) public ButtonResult ShowWarning(string message, int buttonNumber = 1)
{ {
VectorImage image = SystemIcon.Instance().Warning; VectorImage image = SystemIcon.Instance().Warning;
string title = DictionaryResource.GetString("Warning"); string title = DictionaryResource.GetString("Warning");
return ShowMessage(image, title, message, 1); return ShowMessage(image, title, message, buttonNumber);
} }
/// <summary> /// <summary>

@ -155,7 +155,7 @@ namespace DownKyi.ViewModels.DownloadManager
private void ExecuteRemoveVideoCommand() private void ExecuteRemoveVideoCommand()
{ {
AlertService alertService = new AlertService(DialogService); AlertService alertService = new AlertService(DialogService);
ButtonResult result = alertService.ShowWarning(DictionaryResource.GetString("ConfirmDelete")); ButtonResult result = alertService.ShowWarning(DictionaryResource.GetString("ConfirmDelete"), 2);
if (result != ButtonResult.OK) if (result != ButtonResult.OK)
{ {
return; return;

@ -218,7 +218,7 @@ namespace DownKyi.ViewModels.DownloadManager
private void ExecuteDeleteCommand() private void ExecuteDeleteCommand()
{ {
AlertService alertService = new AlertService(DialogService); AlertService alertService = new AlertService(DialogService);
ButtonResult result = alertService.ShowWarning(DictionaryResource.GetString("ConfirmDelete")); ButtonResult result = alertService.ShowWarning(DictionaryResource.GetString("ConfirmDelete"), 2);
if (result != ButtonResult.OK) if (result != ButtonResult.OK)
{ {
return; return;

Loading…
Cancel
Save