diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlListCutting.xaml.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/FingersDance.Control.SessionInput/UserControlListCutting.xaml.cs Thu Nov 05 13:13:52 2009 +0100 @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using FingersDance.Data; +using FingersDance.Control; + +namespace FingersDance.Control.SessionInput +{ + /// + /// Interaction logic for UserControlListCutting.xaml + /// + public partial class UserControlListCutting : UserControl + { + //Creation d'un Event pour Chaque Item Video + public event EventHandler EH_Item_ContactDown; + public string SelectedItem = ""; + + public UserControlListCutting(Dictionary cuttings) + { + InitializeComponent(); + OpenSessions(cuttings); + } + + private void OpenSessions(Dictionary cuttings) + { + try + { + CustomListBoxItem Contener = new CustomListBoxItem(); + Contener.Name = "New Cutting"; + UserControlCustomLabel l = new UserControlCustomLabel("New Cutting"); + Contener.Content = l; + stackPanel.Children.Add(Contener); + Contener.ContactTapGesture += Item_ContactTapGesture; + foreach (KeyValuePair elt in cuttings) + { + Contener = new CustomListBoxItem(); + Contener.Name = elt.Key; + l = new UserControlCustomLabel(elt.Key); + Contener.Content = l; + stackPanel.Children.Add(Contener); + Contener.ContactTapGesture += Item_ContactTapGesture; + } + } + catch (Exception) { } + } + + //Event appelé lors de la selection d'un Item dans la Liste + private void Item_ContactTapGesture(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) + { + SelectedItem = ((CustomListBoxItem)sender).Name; + if (EH_Item_ContactDown != null) + EH_Item_ContactDown(this, new EventArgs()); + } + + + } +}