Esempio 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);
     }
 }
Esempio 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);
     }
 }