Ejemplo n.º 1
0
        private static ActionDismissToastContentInfo GetCheckDesktopDataToastContentInfo(Some <NotificationProfile> notificationProfile, string groupName,
                                                                                         DesktopDataInfo desktopDataInfo)
        {
            var title                = string.Format(CultureInfo.InvariantCulture, strings.DesktopData_Title_F0, desktopDataInfo.TotalSizeInBytes.BytesToReadableString());
            var content              = strings.DesktopData_Content;
            var content2             = strings.DesktopData_Content2;
            var action               = ToastActions.CreateMyDocumentsShortcut;
            var actionActivationType = ToastActivationType.Foreground;
            var greeting             = F.GetGreeting(notificationProfile);

            return(new ActionDismissToastContentInfo(greeting, title, content, content2, action, actionActivationType, strings.Desktop_Action_Button_Content, strings.NotNowActionButtonContent, ToastActions.Dismiss, groupName, Option <string> .None, notificationProfile.Value.CompanyName));
        }
Ejemplo n.º 2
0
 internal static bool IsNonCompliant(DesktopDataInfo desktopDataInfo)
 {
     return(desktopDataInfo.HasDesktopData);
 }
Ejemplo n.º 3
0
 public static async Task <Result <ToastNotificationVisibility> > ShowDesktopDataToastNotification(Some <NotificationProfile> userProfile, DesktopDataInfo desktopDataInfo, string tag, string groupName)
 {
     return(await ToastHelper.ShowToastNotification(async() =>
     {
         var toastContentInfo = GetCheckDesktopDataToastContentInfo(userProfile, groupName, desktopDataInfo);
         var toastContent = await ActionDismissToastContent.CreateToastContent(toastContentInfo).ConfigureAwait(true);
         return toastContent;
     }, tag, groupName).ConfigureAwait(false));
 }