mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-13 08:08:24 +08:00
3272575f70
* Fix typo in dialog title * Pass Remap Keys/Shortcuts dialog titles as argument
18 lines
727 B
C++
18 lines
727 B
C++
#include "pch.h"
|
|
#include "Dialog.h"
|
|
|
|
IAsyncOperation<bool> Dialog::PartialRemappingConfirmationDialog(XamlRoot root, std::wstring dialogTitle)
|
|
{
|
|
ContentDialog confirmationDialog;
|
|
confirmationDialog.XamlRoot(root);
|
|
confirmationDialog.Title(box_value(dialogTitle));
|
|
confirmationDialog.IsPrimaryButtonEnabled(true);
|
|
confirmationDialog.DefaultButton(ContentDialogButton::Primary);
|
|
confirmationDialog.PrimaryButtonText(winrt::hstring(L"Continue Anyway"));
|
|
confirmationDialog.IsSecondaryButtonEnabled(true);
|
|
confirmationDialog.SecondaryButtonText(winrt::hstring(L"Cancel"));
|
|
|
|
ContentDialogResult res = co_await confirmationDialog.ShowAsync();
|
|
co_return res == ContentDialogResult::Primary;
|
|
}
|