|
|
@ -18,12 +18,13 @@ namespace DownKyi.Services
|
|
|
|
/// 显示一个信息弹窗
|
|
|
|
/// 显示一个信息弹窗
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="message"></param>
|
|
|
|
/// <param name="message"></param>
|
|
|
|
|
|
|
|
/// <param name="buttonNumber"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public ButtonResult ShowInfo(string message)
|
|
|
|
public ButtonResult ShowInfo(string message, int buttonNumber = 2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
VectorImage image = SystemIcon.Instance().Info;
|
|
|
|
VectorImage image = SystemIcon.Instance().Info;
|
|
|
|
string title = DictionaryResource.GetString("Info");
|
|
|
|
string title = DictionaryResource.GetString("Info");
|
|
|
|
return ShowMessage(image, title, message);
|
|
|
|
return ShowMessage(image, title, message, buttonNumber);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -35,7 +36,7 @@ namespace DownKyi.Services
|
|
|
|
{
|
|
|
|
{
|
|
|
|
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);
|
|
|
|
return ShowMessage(image, title, message, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -47,10 +48,10 @@ namespace DownKyi.Services
|
|
|
|
{
|
|
|
|
{
|
|
|
|
VectorImage image = SystemIcon.Instance().Error;
|
|
|
|
VectorImage image = SystemIcon.Instance().Error;
|
|
|
|
string title = DictionaryResource.GetString("Error");
|
|
|
|
string title = DictionaryResource.GetString("Error");
|
|
|
|
return ShowMessage(image, title, message);
|
|
|
|
return ShowMessage(image, title, message, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ButtonResult ShowMessage(VectorImage image, string type, string message)
|
|
|
|
public ButtonResult ShowMessage(VectorImage image, string type, string message, int buttonNumber)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ButtonResult result = ButtonResult.None;
|
|
|
|
ButtonResult result = ButtonResult.None;
|
|
|
|
if (dialogService == null)
|
|
|
|
if (dialogService == null)
|
|
|
@ -62,7 +63,8 @@ namespace DownKyi.Services
|
|
|
|
{
|
|
|
|
{
|
|
|
|
{ "image", image },
|
|
|
|
{ "image", image },
|
|
|
|
{ "title", type },
|
|
|
|
{ "title", type },
|
|
|
|
{ "message", message }
|
|
|
|
{ "message", message },
|
|
|
|
|
|
|
|
{ "button_number", buttonNumber }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
dialogService.ShowDialog(ViewAlertDialogViewModel.Tag, param, buttonResult =>
|
|
|
|
dialogService.ShowDialog(ViewAlertDialogViewModel.Tag, param, buttonResult =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|