Chapter 14 samples

This commit is contained in:
Alvin Ashcraft
2023-09-23 15:10:27 -04:00
parent 800f0c3a8a
commit 7ec132eee3
52 changed files with 2195 additions and 0 deletions
@@ -0,0 +1,43 @@
using Microsoft.UI.Xaml.Controls;
using MyMediaCollection.Views;
namespace MyMediaCollection.Helpers
{
public class NotificationShared
{
public const string scenarioTag = "scenarioId";
public struct Notification
{
public string Originator;
public string Action;
public bool HasInput;
public string Input;
};
public static void CouldNotSendToast()
{
MainPage.Current.NotifyUser("Could not send toast", InfoBarSeverity.Error);
}
public static void ToastSentSuccessfully()
{
MainPage.Current.NotifyUser("Toast sent successfully!", InfoBarSeverity.Success);
}
public static void AppLaunchedFromNotification()
{
MainPage.Current.NotifyUser("App launched from notifications", InfoBarSeverity.Informational);
}
public static void NotificationReceived()
{
MainPage.Current.NotifyUser("Notification received", InfoBarSeverity.Informational);
}
public static void UnrecognizedToastOriginator()
{
MainPage.Current.NotifyUser("Unrecognized Toast Originator or Unknown Error", InfoBarSeverity.Error);
}
}
}