Great.. i will have to customize my implementation two.. we are running a multi language interface, and alle buttons need to be translated. currently there is no way to translate the buttons without writing a overcomplex overload:
public async Task<QuestionDialogResult> ShowQuestionAsync(
string message,
string title = null)
{
var questionDialogResult = default(QuestionDialogResult);
var dialogResult = string.Empty;
try
{
dialogResult =
await _manager.ShowMessageAsync(message, new List<string> { Resources.Dialog_Yes, Resources.Dialog_No }, title);
}
catch (TaskCanceledException)
{
questionDialogResult = QuestionDialogResult.No;
}
if (dialogResult.Equals(Resources.Dialog_Yes))
questionDialogResult = QuestionDialogResult.Yes;
if (dialogResult.Equals(Resources.Dialog_No))
questionDialogResult = QuestionDialogResult.No;
_logger.Info(
string.Format(
"Displayed Question: --> {0} <-- to User: {1}, he choosed option: {2}",
message,
Thread.CurrentPrincipal.Identity.Name,
questionDialogResult));
return questionDialogResult;
}
i really don't like to write so much code, for a very simple translation.