public static void ShowSimpleToast(string text) { ToastContent toastContent = new ToastContent { Visual = new ToastVisual { BindingGeneric = new ToastBindingGeneric { Children = { new AdaptiveText { Text = text } } } }, }; ToastNotification toast = new ToastNotification(toastContent.GetXml()); OnChatMessageToastEventArgs args = new OnChatMessageToastEventArgs(toast, null); OnChatMessageToast?.Invoke(args); PopToast(toast, args); }
private static ToastNotification PopToast(ToastContent content) { ToastNotification toast = new ToastNotification(content.GetXml()) { Data = new NotificationData() }; OnChatMessageToastEventArgs args = new OnChatMessageToastEventArgs(toast, null); OnChatMessageToast?.Invoke(args); PopToast(toast, args); return(toast); }
private static void PopToast(ToastContent content, ChatModel chat, string group) { ToastNotification toast = new ToastNotification(content.GetXml()) { Group = group }; OnChatMessageToastEventArgs args = new OnChatMessageToastEventArgs(toast, chat); OnChatMessageToast?.Invoke(args); PopToast(toast, args); }
public static void ShowAccountMessageToast(string text, string accountBareJid, string tag) { ToastContent toastContent = new ToastContent { Visual = new ToastVisual { BindingGeneric = new ToastBindingGeneric { Children = { new AdaptiveText { Text = text }, new AdaptiveText { Text = accountBareJid, HintStyle = AdaptiveTextStyle.CaptionSubtle } } } }, }; ToastNotification toast = new ToastNotification(toastContent.GetXml()) { Group = ACCOUNT_GROUP_PREFIX + accountBareJid, Tag = tag }; OnChatMessageToastEventArgs args = new OnChatMessageToastEventArgs(toast, null); OnChatMessageToast?.Invoke(args); ToastNotificationManager.History.Remove(tag, ACCOUNT_GROUP_PREFIX + accountBareJid); PopToast(toast, args); }