Subversion Repository Public Repository

Nextrek

Diff Revisions 33 vs 34 for /WindowsPhone/NotizieTL/NotizieTL/MainPage.xaml.cs

Diff revisions: vs.
  @@ -23,6 +23,7 @@
23 23 {
24 24 List<Articolo> listArticoli1;
25 25 List<Articolo> listArticoli3;
26 + List<ArticoloPreferito> listArticoliP = new List<ArticoloPreferito>();
26 27
27 28 // Constructor
28 29 public MainPage()
  @@ -329,6 +330,57 @@
329 330 return text;
330 331 }
331 332
333 + private void CheckBox_Checked(object sender, RoutedEventArgs e)
334 + {
335 + ListBoxItem checedItem = this.feedListPreferiti.ItemContainerGenerator.ContainerFromItem((sender as CheckBox).DataContext) as ListBoxItem;
336 + if (checedItem != null)
337 + {
338 + checedItem.IsSelected = true;
339 + }
340 + }
341 +
342 + private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
343 + {
344 + ListBoxItem checedItem = this.feedListPreferiti.ItemContainerGenerator.ContainerFromItem((sender as CheckBox).DataContext) as ListBoxItem;
345 + if (checedItem != null)
346 + {
347 + checedItem.IsSelected = false;
348 + }
349 + }
350 +
351 + private void MenuItem_Click(object sender, RoutedEventArgs e)
352 + {
353 +
354 + feedListPreferiti.ItemsSource = listArticoliP;
355 +
356 + }
357 +
358 + private void feedListBoxNews1_Hold(object sender, System.Windows.Input.GestureEventArgs e)
359 + {
360 + ListBox listBox = sender as ListBox;
361 + bool a = (listBox.SelectedItem != null);
362 + bool b = true;
363 +
364 +
365 +
366 + if (listBox != null && listBox.SelectedItem != null)
367 + {
368 + // Get the SyndicationItem that was tapped.
369 + Articolo sItem = (Articolo)listBox.SelectedItem;
370 +
371 + String ti = sItem.Titolo;
372 + String te = sItem.Testo;
373 + String l = sItem.Link;
374 + String d = sItem.DataPub;
375 + Boolean isC = false;
376 +
377 + ArticoloPreferito ap = new ArticoloPreferito(ti, te, l, d, isC);
378 + listArticoliP.Add(ap);
379 +
380 +
381 + }
382 + }
383 +
332 384
333 385
334 386