Created
August 16, 2013 21:54
-
-
Save Neferetheka/6253798 to your computer and use it in GitHub Desktop.
Utility class to simplify tasks usage on Windows Phone 7/8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Phone.Tasks; | |
using System; | |
namespace Tools | |
{ | |
public abstract class TaskHelper | |
{ | |
/// <summary> | |
/// Launch a share task | |
/// </summary> | |
/// <param name="message">Message to share</param> | |
public static void ShareTask(string message) | |
{ | |
ShareStatusTask shareTask = new ShareStatusTask(); | |
shareTask.Status = message + " - via MyApp"; | |
shareTask.Show(); | |
} | |
public static void MailTask(string receiver, string subject) | |
{ | |
var emailComposeTask = new EmailComposeTask | |
{ | |
To = receiver, | |
Subject = subject | |
}; | |
emailComposeTask.Show(); | |
} | |
public static void MarketPlaceMarkTask() | |
{ | |
MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask(); | |
marketplaceReviewTask.Show(); | |
} | |
public static void BrowserTask(string uri) | |
{ | |
WebBrowserTask task = new WebBrowserTask(); | |
task.Uri = new Uri(uri, UriKind.Absolute); | |
task.Show(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment