Ejemplo n.º 1
0
 void camera_Completed(object sender, PhotoResult e)
 {
     if (e.TaskResult == TaskResult.OK)
     {
         PictureStore.AddPicture(e.ChosenPhoto);
     }
 }
Ejemplo n.º 2
0
 // Constructor
 public MainPage()
 {
     InitializeComponent();
     var ps = new PictureStore();
     // Sample code to localize the ApplicationBar
     //BuildLocalizedApplicationBar();
 }
Ejemplo n.º 3
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            WebClient wc = new WebClient();

            wc.DownloadStringCompleted += (s, args) =>
            {
                var        xdoc  = XDocument.Parse(args.Result);
                XNamespace media = "http://search.yahoo.com/mrss";
                var        res   = (from z in xdoc.Descendants("item")
                                    select
                                        (from x in z.Descendants(media + "thumbnail")
                                        select x.Attribute("url").Value).First()).First();
                PictureStore.AddFromUrl(res);
            };
            wc.DownloadStringAsync(new Uri("http://fotki.yandex.ru/top/rss2"));
        }