author | cavaliet |
Tue, 24 Nov 2009 22:08:57 +0100 | |
changeset 229 | 05aba5def1fc |
parent 187 | b266af50744c |
permissions | -rw-r--r-- |
187
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
1 |
using System; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
2 |
using System.Collections.Generic; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
3 |
using System.Linq; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
4 |
using System.Text; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
5 |
using System.Windows; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
6 |
using System.Windows.Controls; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
7 |
using System.Windows.Data; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
8 |
using System.Windows.Documents; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
9 |
using System.Windows.Input; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
10 |
using System.Windows.Media; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
11 |
using System.Windows.Media.Imaging; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
12 |
using System.Windows.Navigation; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
13 |
using System.Windows.Shapes; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
14 |
using FingersDance.Data; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
15 |
using FingersDance.Control; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
16 |
|
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
17 |
namespace FingersDance.Control.SessionInput |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
18 |
{ |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
19 |
/// <summary> |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
20 |
/// Interaction logic for UserControlListCutting.xaml |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
21 |
/// </summary> |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
22 |
public partial class UserControlListCutting : UserControl |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
23 |
{ |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
24 |
//Creation d'un Event pour Chaque Item Video |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
25 |
public event EventHandler EH_Item_ContactDown; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
26 |
public string SelectedItem = ""; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
27 |
|
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
28 |
public UserControlListCutting(Dictionary<string, Cutting> cuttings) |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
29 |
{ |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
30 |
InitializeComponent(); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
31 |
OpenSessions(cuttings); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
32 |
} |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
33 |
|
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
34 |
private void OpenSessions(Dictionary<string, Cutting> cuttings) |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
35 |
{ |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
36 |
try |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
37 |
{ |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
38 |
CustomListBoxItem Contener = new CustomListBoxItem(); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
39 |
Contener.Name = "New Cutting"; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
40 |
UserControlCustomLabel l = new UserControlCustomLabel("New Cutting"); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
41 |
Contener.Content = l; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
42 |
stackPanel.Children.Add(Contener); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
43 |
Contener.ContactTapGesture += Item_ContactTapGesture; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
44 |
foreach (KeyValuePair<string, Cutting> elt in cuttings) |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
45 |
{ |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
46 |
Contener = new CustomListBoxItem(); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
47 |
Contener.Name = elt.Key; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
48 |
l = new UserControlCustomLabel(elt.Key); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
49 |
Contener.Content = l; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
50 |
stackPanel.Children.Add(Contener); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
51 |
Contener.ContactTapGesture += Item_ContactTapGesture; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
52 |
} |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
53 |
} |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
54 |
catch (Exception) { } |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
55 |
} |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
56 |
|
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
57 |
//Event appelé lors de la selection d'un Item dans la Liste |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
58 |
private void Item_ContactTapGesture(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
59 |
{ |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
60 |
SelectedItem = ((CustomListBoxItem)sender).Name; |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
61 |
if (EH_Item_ContactDown != null) |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
62 |
EH_Item_ContactDown(this, new EventArgs()); |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
63 |
} |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
64 |
|
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
65 |
|
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
66 |
} |
b266af50744c
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff
changeset
|
67 |
} |