Exemplo n.º 1
0
 public static async Task <bool> ShowMessage(string information, string title)
 {
     try
     {
         MessageContentDialog msgDialog = new MessageContentDialog(information, title);
         return(await msgDialog.ShowMessage());
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
         return(false);
     }
 }
Exemplo n.º 2
0
 public static async Task <bool> ShowMessage(string information, string title, string firstButtonText, string secondButtonText, TypedEventHandler <ContentDialog, ContentDialogButtonClickEventArgs> onPrimaryClick)
 {
     try
     {
         MessageContentDialog msgDialog = new MessageContentDialog(information, title);
         msgDialog.PrimaryButtonText   = firstButtonText;
         msgDialog.SecondaryButtonText = secondButtonText;
         msgDialog.PrimaryButtonClick += onPrimaryClick;
         return(await msgDialog.ShowMessage());
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
         return(false);
     }
 }