# HG changeset patch
# User sarias
# Date 1249595696 -7200
# Node ID 8f2692c743ffacba6d94bb4a5fd0d64823e1647d
# Parent d3582ce60905294c6ef4be8d85360e42b05cda51
Control.Player.Test Project
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/App.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/App.xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/App.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/App.xaml.cs Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace Control.Player.Test
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+
+ }
+}
\ No newline at end of file
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Control.Player.Test.Skin.Ressources.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Control.Player.Test.Skin.Ressources.xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Control.Player.Test.csproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Control.Player.Test.csproj Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,147 @@
+
+
+ Debug
+ AnyCPU
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ FingersDance.Control.Player
+ FingersDance.Control.Player
+ v3.5
+ 4
+ winexe
+ true
+ Web
+ true
+ Foreground
+ 7
+ Days
+ false
+ false
+ false
+ 1.0.0.*
+ true
+ true
+ Publish\
+ OnBuildSuccess
+
+
+ true
+ full
+ false
+ .\bin\Debug\
+ DEBUG;TRACE
+
+
+ false
+ true
+ .\bin\Release\
+ TRACE
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE
+ full
+ x86
+ true
+ GlobalSuppressions.cs
+
+
+ bin\x86\Release\
+ TRACE
+ true
+ x86
+ true
+ GlobalSuppressions.cs
+
+
+
+
+ 3.5
+
+
+ 3.5
+
+
+ 3.5
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ UserControlPlayer.xaml
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+
+
+
+ ResXFileCodeGenerator
+ Designer
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ True
+ Settings.settings
+
+
+ SurfacePlayerTest.xaml
+
+
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
\ No newline at end of file
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Control.Player.Test.sln
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Control.Player.Test.sln Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Control.Player.Test", "Control.Player.Test.csproj", "{D5625AA4-362F-4E46-9916-65F3B173ECBE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}.Debug|x86.ActiveCfg = Debug|x86
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}.Debug|x86.Build.0 = Debug|x86
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}.Release|x86.ActiveCfg = Release|x86
+ {D5625AA4-362F-4E46-9916-65F3B173ECBE}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Control.Player.Test.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Control.Player.Test.xml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,64 @@
+
+
+
+
+
+ Control.Player.Test
+ Control.Player.Test
+ Control.Player.Test.exe
+
+ Resources\icon.png
+
+ Resources\iconPreview.png
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Properties/AssemblyInfo.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Properties/AssemblyInfo.cs Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,62 @@
+#region Using directives
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Resources;
+using System.Globalization;
+using System.Windows;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Control.Player.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Control.Player.Test")]
+[assembly: AssemblyCopyright("Copyright @ 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+// Specifies the location in which theme dictionaries are stored for types in an assembly.
+[assembly: ThemeInfo(
+ // Specifies the location of system theme-specific resource dictionaries for this project.
+ // The default setting in this project is "None" since this default project does not
+ // include these user-defined theme files:
+ // Themes\Aero.NormalColor.xaml
+ // Themes\Classic.xaml
+ // Themes\Luna.Homestead.xaml
+ // Themes\Luna.Metallic.xaml
+ // Themes\Luna.NormalColor.xaml
+ // Themes\Royale.NormalColor.xaml
+ ResourceDictionaryLocation.None,
+
+ // Specifies the location of the system non-theme specific resource dictionary:
+ // Themes\generic.xaml
+ ResourceDictionaryLocation.SourceAssembly)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.*")]
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Properties/Resources.Designer.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Properties/Resources.Designer.cs Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3074
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Control.Player.Test.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [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 {
+
+ 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() {
+ }
+
+ ///
+ /// 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("Control.Player.Test.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 {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Properties/Resources.resx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Properties/Resources.resx Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.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 d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Properties/Settings.Designer.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Properties/Settings.Designer.cs Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3074
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Control.Player.Test.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Properties/Settings.settings
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Properties/Settings.settings Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/Butterfly.wmv
Binary file test/Control.Player.Test/Resources/Butterfly.wmv has changed
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1 Player .xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1 Player .xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1] Circle label.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1] Circle label.xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1] Pause button.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1] Pause button.xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1] Play button.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1] Play button.xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1] Rectangle label.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1] Rectangle label.xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1]Triangle Label .xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/Resources/FingersDance.Control.Player.Skin.Ressources_files/[Skin 1]Triangle Label .xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/Lake.wmv
Binary file test/Control.Player.Test/Resources/Lake.wmv has changed
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/WindowBackground.jpg
Binary file test/Control.Player.Test/Resources/WindowBackground.jpg has changed
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/icon.png
Binary file test/Control.Player.Test/Resources/icon.png has changed
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/Resources/iconPreview.png
Binary file test/Control.Player.Test/Resources/iconPreview.png has changed
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/SurfacePlayerTest.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/SurfacePlayerTest.xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/SurfacePlayerTest.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/SurfacePlayerTest.xaml.cs Thu Aug 06 23:54:56 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 Control.Player.Test
+{
+ ///
+ /// 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 d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/UserControlPlayer.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/UserControlPlayer.xaml Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r d3582ce60905 -r 8f2692c743ff test/Control.Player.Test/UserControlPlayer.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Control.Player.Test/UserControlPlayer.xaml.cs Thu Aug 06 23:54:56 2009 +0200
@@ -0,0 +1,121 @@
+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 Control.Player.Test
+{
+ 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 ) { }
+ //ButtonPlayPause.Background = FindResource("[Skin_1]_Play_button_xaml") as Brush;
+ }
+ }
+
+ private void ButtonFastForward_Click(object sender, RoutedEventArgs e)
+ {
+ if(MediaElementVideo.SpeedRatio <= 3)
+ MediaElementVideo.SpeedRatio += 1;
+ }
+
+ private void ButtonFastForward_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (MediaElementVideo.SpeedRatio <= 3)
+ MediaElementVideo.SpeedRatio += 1;
+ }
+
+ private void ButtonRewind_Click(object sender, RoutedEventArgs e)
+ {
+ //TimeSpan ts = new TimeSpan(0, 0, 0, 0);
+ if (MediaElementVideo.SpeedRatio > 1)
+ {
+ MediaElementVideo.SpeedRatio -= 1;
+ }
+ else
+ {
+ MediaElementVideo.Position = MediaElementVideo.Position.Add(new TimeSpan(0, 0, 0, -5));
+ }
+ }
+
+ private void ButtonRewind_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+
+ //TimeSpan ts = new TimeSpan(0, 0, 0,0);
+ if (MediaElementVideo.SpeedRatio > 1)
+ {
+ MediaElementVideo.SpeedRatio -= 1;
+ }
+ else
+ {
+ MediaElementVideo.Position = MediaElementVideo.Position.Add(new TimeSpan(0, 0, 0, -5));
+ }
+ }
+ }
+}
\ No newline at end of file