示例#1
0
 internal static void ShareViaClipBoard(ShareModel model)
 {
     string text = model.Description + "\n" + @"http://en.wikipedia.org" + model.Link;
     if (MessageBox.Show(text, "Copy to Clipboard?", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
     {
         Clipboard.SetText(text);
     }
 }
示例#2
0
 internal static void ShareViaSms(ShareModel model)
 {
     try
     {
         var task = new SmsComposeTask()
         {
             Body = model.Description + "\n" + @"http://en.wikipedia.org" + model.Link
         };
         task.Show();
     }
     catch (Exception)
     {
         // fast-clicking can result in exception, so we just handle it
     }
 }
示例#3
0
 internal static void ShareViaSocial(ShareModel model)
 {
     try
     {
         var task = new ShareLinkTask
         {
             Title = model.Title,
             Message = model.Description,
             LinkUri = new Uri(@"http://en.wikipedia.org" + model.Link, UriKind.Absolute)
         };
         task.Show();
     }
     catch (Exception)
     {
         // fast-clicking can result in exception, so we just handle it
     }
 }