equal
deleted
inserted
replaced
35 public UserControlPlayer() |
35 public UserControlPlayer() |
36 { |
36 { |
37 this.InitializeComponent(); |
37 this.InitializeComponent(); |
38 MediaElementVideo.LoadedBehavior = MediaState.Manual; |
38 MediaElementVideo.LoadedBehavior = MediaState.Manual; |
39 MediaElementVideo.UnloadedBehavior = MediaState.Manual; |
39 MediaElementVideo.UnloadedBehavior = MediaState.Manual; |
|
40 //SAR |
|
41 //Control User Info |
40 usercontrolInfoUser.LabelSession.Content = "Seance Test"; |
42 usercontrolInfoUser.LabelSession.Content = "Seance Test"; |
41 usercontrolInfoUser.LabelUser.Content = "User Test"; |
43 usercontrolInfoUser.LabelUser.Content = "User Test"; |
|
44 //Gesture Control |
|
45 gestureControl.GestureEvent+= new GestureControl.GestureControl.GestureRoutedEventHandler(GestureDetected); |
42 } |
46 } |
43 #endregion |
47 #endregion |
44 |
48 |
45 |
49 |
46 #region Properties |
50 #region Properties |
95 PlayerStopOrPause(false, new EventArgs()); |
99 PlayerStopOrPause(false, new EventArgs()); |
96 } |
100 } |
97 |
101 |
98 #endregion |
102 #endregion |
99 |
103 |
100 |
104 #region GestureEvents |
|
105 |
|
106 public void GestureDetected(object sender, GestureControl.GestureRoutedEventArgs e) |
|
107 { |
|
108 Console.WriteLine("gesture detected: " + e.Gesture); |
|
109 switch (e.Gesture) |
|
110 { |
|
111 case "UP": |
|
112 // |
|
113 usercontrolInfoUser.LabelSession.Content = "UP!"; |
|
114 break; |
|
115 case "LEFT": |
|
116 usercontrolInfoUser.LabelSession.Content = "LEFT!"; |
|
117 break; |
|
118 case "RIGHT": |
|
119 usercontrolInfoUser.LabelSession.Content = "RIGHT!"; |
|
120 break; |
|
121 case "DOWN": |
|
122 usercontrolInfoUser.LabelSession.Content = "DOWN!"; |
|
123 break; |
|
124 default: |
|
125 //this.TxtGesture.Text = e.Gesture; |
|
126 break; |
|
127 } |
|
128 } |
|
129 #endregion |
|
130 |
101 #region Button Simple Player Actions |
131 #region Button Simple Player Actions |
102 private void ButtonPlayPause_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
132 private void ButtonPlayPause_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
103 { |
133 { |
104 if (!isPlaying)//Play |
134 if (!isPlaying)//Play |
105 { |
135 { |