# HG changeset patch
# User sarias
# Date 1248993942 -7200
# Node ID 4f1ea403073d689db868255242b7d7533c6c1083
# Parent 06de3a61998f114abf1a3d703357cdf55e5ebe91
Projet Menu avec profondeur complete.
Projet Player sans design play pause basique
Les deux projets ont un Surface[name]Test.xaml & .cs pour montrer les fonctionalites.
(pour tester il faut "set up as start up project")
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Menu/UserControlMenu.xaml
--- a/src/FingersDance.Control.Menu/UserControlMenu.xaml Wed Jul 29 00:55:57 2009 +0200
+++ b/src/FingersDance.Control.Menu/UserControlMenu.xaml Fri Jul 31 00:45:42 2009 +0200
@@ -27,8 +27,26 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Menu/UserControlMenu.xaml.cs
--- a/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs Wed Jul 29 00:55:57 2009 +0200
+++ b/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs Fri Jul 31 00:45:42 2009 +0200
@@ -23,10 +23,19 @@
//Premet de deplacer les sous menus vers la droite pour avoir un effect tree view
private void initChildSize()
{
- PanelAnnotation.Width -= 0.20*this.Width;
- PanelRecherche.Width -= 0.20 * this.Width;
+ //Niveau 1
+ PanelAnnotation.Width -= 0.10*this.Width;
+ PanelRecherche.Width -= 0.10 * this.Width;
+ //Niveau 2
+ PanelChildChore.Width -= 0.10 * this.Width;
+ PanelChildCine.Width -= 0.10 * this.Width;
+ //Niveau 3
+ PanelChild1AxeCam.Width -= 0.05 * this.Width;
+ PanelChild1MouvCam.Width -= 0.05 * this.Width;
}
+ #region Events
+ //Annotation
private void ButtonAnnotation_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
{
if (PanelAnnotation.Visibility == Visibility.Collapsed)
@@ -39,6 +48,18 @@
}
}
+ private void ButtonAnnotation_Click(object sender, RoutedEventArgs e)
+ {
+ if (PanelAnnotation.Visibility == Visibility.Collapsed)
+ {
+ PanelAnnotation.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelAnnotation.Visibility = Visibility.Collapsed;
+ }
+ }
+ //Recherche
private void ButtonRecherche_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
{
if (PanelRecherche.Visibility == Visibility.Collapsed)
@@ -49,20 +70,8 @@
{
PanelRecherche.Visibility = Visibility.Collapsed;
}
- }
-
- private void ButtonAnnotation_Click(object sender, RoutedEventArgs e)
- {
- if (PanelAnnotation.Visibility == Visibility.Collapsed)
- {
- PanelAnnotation.Visibility = Visibility.Visible;
- }
- else
- {
- PanelAnnotation.Visibility = Visibility.Collapsed;
- }
- }
-
+ }
+
private void ButtonRecherche_Click(object sender, RoutedEventArgs e)
{
if (PanelRecherche.Visibility == Visibility.Collapsed)
@@ -74,5 +83,104 @@
PanelRecherche.Visibility = Visibility.Collapsed;
}
}
- }
+ //ChildCine
+ private void ButtonChildCine_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (PanelChildCine.Visibility == Visibility.Collapsed)
+ {
+ PanelChildCine.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelChildCine.Visibility = Visibility.Collapsed;
+ }
+ }
+
+ private void ButtonChildCine_Click(object sender, RoutedEventArgs e)
+ {
+ if (PanelChildCine.Visibility == Visibility.Collapsed)
+ {
+ PanelChildCine.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelChildCine.Visibility = Visibility.Collapsed;
+ }
+ }
+ //ChildCore
+ private void ButtonChildChore_Click(object sender, RoutedEventArgs e)
+ {
+ if (PanelChildChore.Visibility == Visibility.Collapsed)
+ {
+ PanelChildChore.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelChildChore.Visibility = Visibility.Collapsed;
+ }
+ }
+
+ private void ButtonChildChore_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (PanelChildChore.Visibility == Visibility.Collapsed)
+ {
+ PanelChildChore.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelChildChore.Visibility = Visibility.Collapsed;
+ }
+ }
+ //Child1MouvCam
+ private void ButtonChild1MouvCam_Click(object sender, RoutedEventArgs e)
+ {
+ if (PanelChild1MouvCam.Visibility == Visibility.Collapsed)
+ {
+ PanelChild1MouvCam.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelChild1MouvCam.Visibility = Visibility.Collapsed;
+ }
+ }
+
+ private void ButtonChild1MouvCam_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (PanelChild1MouvCam.Visibility == Visibility.Collapsed)
+ {
+ PanelChild1MouvCam.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelChild1MouvCam.Visibility = Visibility.Collapsed;
+ }
+ }
+ //Child1AxeCam
+ private void buttonChild1AxeCam_Click(object sender, RoutedEventArgs e)
+ {
+ if (PanelChild1AxeCam.Visibility == Visibility.Collapsed)
+ {
+ PanelChild1AxeCam.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelChild1AxeCam.Visibility = Visibility.Collapsed;
+ }
+ }
+
+ private void buttonChild1AxeCam_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (PanelChild1AxeCam.Visibility == Visibility.Collapsed)
+ {
+ PanelChild1AxeCam.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelChild1AxeCam.Visibility = Visibility.Collapsed;
+ }
+ }
+ #endregion
+
+
+ }
}
\ No newline at end of file
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/App.xaml
--- a/src/FingersDance.Control.Player/App.xaml Wed Jul 29 00:55:57 2009 +0200
+++ b/src/FingersDance.Control.Player/App.xaml Fri Jul 31 00:45:42 2009 +0200
@@ -1,7 +1,7 @@
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/FingersDance.Control.Player.csproj
--- a/src/FingersDance.Control.Player/FingersDance.Control.Player.csproj Wed Jul 29 00:55:57 2009 +0200
+++ b/src/FingersDance.Control.Player/FingersDance.Control.Player.csproj Fri Jul 31 00:45:42 2009 +0200
@@ -56,6 +56,16 @@
+
+ MSBuild:Compile
+ Designer
+
+
+ UserControlPlayer.xaml
+
+
+ PreserveNewest
+
@@ -88,25 +98,27 @@
True
Settings.settings
-
- SurfaceWindow1.xaml
+
+ SurfacePlayerTest.xaml
+
PreserveNewest
PreserveNewest
+
-
+
MSBuild:Compile
Designer
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/Lake.wmv
Binary file src/FingersDance.Control.Player/Lake.wmv has changed
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/Properties/Resources.Designer.cs
--- a/src/FingersDance.Control.Player/Properties/Resources.Designer.cs Wed Jul 29 00:55:57 2009 +0200
+++ b/src/FingersDance.Control.Player/Properties/Resources.Designer.cs Fri Jul 31 00:45:42 2009 +0200
@@ -8,11 +8,10 @@
//
//------------------------------------------------------------------------------
-namespace FingersDance.Control.Player.Properties
-{
+namespace FingersDance.Control.Player.Properties {
using System;
-
-
+
+
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
@@ -23,48 +22,40 @@
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
+ internal class Resources {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
+ internal Resources() {
}
-
+
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if (object.ReferenceEquals(resourceMan, null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFAppTemplate.Properties.Resources", typeof(Resources).Assembly);
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FingersDance.Control.Player.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
return resourceCulture;
}
- set
- {
+ set {
resourceCulture = value;
}
}
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/Properties/Resources.resx
--- a/src/FingersDance.Control.Player/Properties/Resources.resx Wed Jul 29 00:55:57 2009 +0200
+++ b/src/FingersDance.Control.Player/Properties/Resources.resx Fri Jul 31 00:45:42 2009 +0200
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
+
@@ -68,9 +69,10 @@
-
+
+
@@ -85,9 +87,10 @@
-
+
+
@@ -109,9 +112,9 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
\ No newline at end of file
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/Resources/Butterfly.wmv
Binary file src/FingersDance.Control.Player/Resources/Butterfly.wmv has changed
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/Resources/Lake.wmv
Binary file src/FingersDance.Control.Player/Resources/Lake.wmv has changed
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/SurfacePlayerTest.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Player/SurfacePlayerTest.xaml Fri Jul 31 00:45:42 2009 +0200
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/SurfacePlayerTest.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Player/SurfacePlayerTest.xaml.cs Fri Jul 31 00:45:42 2009 +0200
@@ -0,0 +1,103 @@
+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.Shapes;
+using System.Windows.Threading;
+using Microsoft.Surface;
+using Microsoft.Surface.Presentation;
+using Microsoft.Surface.Presentation.Controls;
+
+namespace FingersDance.Control.Player
+{
+ ///
+ /// Interaction logic for SurfaceWindow1.xaml
+ ///
+ public partial class SurfaceWindow1 : SurfaceWindow
+ {
+ ///
+ /// Default constructor.
+ ///
+ public SurfaceWindow1()
+ {
+ InitializeComponent();
+
+ // Add handlers for Application activation events
+ AddActivationHandlers();
+ }
+
+
+ ///
+ /// Occurs when the window is about to close.
+ ///
+ ///
+ protected override void OnClosed(EventArgs e)
+ {
+ base.OnClosed(e);
+
+ // Remove handlers for Application activation events
+ RemoveActivationHandlers();
+ }
+
+ ///
+ /// Adds handlers for Application activation events.
+ ///
+ private void AddActivationHandlers()
+ {
+ // Subscribe to surface application activation events
+ ApplicationLauncher.ApplicationActivated += OnApplicationActivated;
+ ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed;
+ ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated;
+ }
+
+ ///
+ /// Removes handlers for Application activation events.
+ ///
+ private void RemoveActivationHandlers()
+ {
+ // Unsubscribe from surface application activation events
+ ApplicationLauncher.ApplicationActivated -= OnApplicationActivated;
+ ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed;
+ ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated;
+ }
+
+ ///
+ /// This is called when application has been activated.
+ ///
+ ///
+ ///
+ private void OnApplicationActivated(object sender, EventArgs e)
+ {
+ //TODO: enable audio, animations here
+ }
+
+ ///
+ /// This is called when application is in preview mode.
+ ///
+ ///
+ ///
+ private void OnApplicationPreviewed(object sender, EventArgs e)
+ {
+ //TODO: Disable audio here if it is enabled
+
+ //TODO: optionally enable animations here
+ }
+
+ ///
+ /// This is called when application has been deactivated.
+ ///
+ ///
+ ///
+ private void OnApplicationDeactivated(object sender, EventArgs e)
+ {
+ //TODO: disable audio, animations here
+ }
+ }
+}
\ No newline at end of file
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/SurfaceWindow1.xaml
--- a/src/FingersDance.Control.Player/SurfaceWindow1.xaml Wed Jul 29 00:55:57 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/SurfaceWindow1.xaml.cs
--- a/src/FingersDance.Control.Player/SurfaceWindow1.xaml.cs Wed Jul 29 00:55:57 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-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.Shapes;
-using System.Windows.Threading;
-using Microsoft.Surface;
-using Microsoft.Surface.Presentation;
-using Microsoft.Surface.Presentation.Controls;
-
-namespace FingersDance.Control.Player
-{
- ///
- /// Interaction logic for SurfaceWindow1.xaml
- ///
- public partial class SurfaceWindow1 : SurfaceWindow
- {
- ///
- /// Default constructor.
- ///
- public SurfaceWindow1()
- {
- InitializeComponent();
-
- // Add handlers for Application activation events
- AddActivationHandlers();
- }
-
-
- ///
- /// Occurs when the window is about to close.
- ///
- ///
- protected override void OnClosed(EventArgs e)
- {
- base.OnClosed(e);
-
- // Remove handlers for Application activation events
- RemoveActivationHandlers();
- }
-
- ///
- /// Adds handlers for Application activation events.
- ///
- private void AddActivationHandlers()
- {
- // Subscribe to surface application activation events
- ApplicationLauncher.ApplicationActivated += OnApplicationActivated;
- ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed;
- ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated;
- }
-
- ///
- /// Removes handlers for Application activation events.
- ///
- private void RemoveActivationHandlers()
- {
- // Unsubscribe from surface application activation events
- ApplicationLauncher.ApplicationActivated -= OnApplicationActivated;
- ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed;
- ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated;
- }
-
- ///
- /// This is called when application has been activated.
- ///
- ///
- ///
- private void OnApplicationActivated(object sender, EventArgs e)
- {
- //TODO: enable audio, animations here
- }
-
- ///
- /// This is called when application is in preview mode.
- ///
- ///
- ///
- private void OnApplicationPreviewed(object sender, EventArgs e)
- {
- //TODO: Disable audio here if it is enabled
-
- //TODO: optionally enable animations here
- }
-
- ///
- /// This is called when application has been deactivated.
- ///
- ///
- ///
- private void OnApplicationDeactivated(object sender, EventArgs e)
- {
- //TODO: disable audio, animations here
- }
- }
-}
\ No newline at end of file
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/UserControlPlayer.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml Fri Jul 31 00:45:42 2009 +0200
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 06de3a61998f -r 4f1ea403073d src/FingersDance.Control.Player/UserControlPlayer.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs Fri Jul 31 00:45:42 2009 +0200
@@ -0,0 +1,80 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Animation;
+using System.Windows.Navigation;
+using System.ComponentModel;
+
+namespace FingersDance.Control.Player
+{
+ public partial class UserControlPlayer
+ {
+
+ private bool play;
+
+ public UserControlPlayer()
+ {
+ this.InitializeComponent();
+
+ initPlayer();
+ }
+
+ void initPlayer()
+ {
+ //init player
+ play = false;
+ //MediaElementVideo.Source = new Uri("Resources\\Lake.wmv", UriKind.Relative);
+ MediaElementVideo.LoadedBehavior = MediaState.Manual;
+ }
+
+ private void ButtonPlayPause_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (!play)//Play
+ {
+ play = true;
+ try
+ {
+ MediaElementVideo.Play();
+ }
+ catch (Exception ex) { }
+ }
+ else//Pause
+ {
+ play = false;
+ try
+ {
+ MediaElementVideo.Pause();
+ }
+ catch (Exception exx ) { }
+ }
+
+ }
+
+ private void ButtonPlayPause_Click(object sender, RoutedEventArgs e)
+ {
+ if (!play)//Play
+ {
+ play = true;
+ try
+ {
+ MediaElementVideo.Play();
+ }
+ catch (Exception ex ) { }
+ }
+ else//Pause
+ {
+ play = false;
+ try
+ {
+ MediaElementVideo.Pause();
+ }
+ catch (Exception exx ) { }
+ }
+ }
+ }
+}
\ No newline at end of file