Modif sur ControlPlayer pour les videos.
authorsarias
Mon, 03 Aug 2009 22:36:46 +0200
changeset 10 e8bfe1102e03
parent 9 215a7412e544
child 11 99970914728c
Modif sur ControlPlayer pour les videos. Partage du test Control.TimeLine
src/FingersDance.Control.Menu/UserControlMenu.xaml.cs
src/FingersDance.Control.Player/FingersDance.Control.Player.csproj
src/FingersDance.Control.Player/Lake.wmv
src/FingersDance.Control.Player/UserControlPlayer.xaml
src/FingersDance.Control.Player/UserControlPlayer.xaml.cs
src/FingersDance.Control.TimeLine/App.xaml
src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj
src/FingersDance.Control.TimeLine/Lake.wmv
src/FingersDance.Control.TimeLine/SurfaceTimeLineTest.xaml
src/FingersDance.Control.TimeLine/SurfaceTimeLineTest.xaml.cs
src/FingersDance.Control.TimeLine/SurfaceWindow1.xaml
src/FingersDance.Control.TimeLine/SurfaceWindow1.xaml.cs
src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml
src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs
src/FingersDance.Control/SurfaceWindow1.xaml
src/FingersDance.sln
--- a/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs	Mon Aug 03 22:27:27 2009 +0200
+++ b/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs	Mon Aug 03 22:36:46 2009 +0200
@@ -32,6 +32,7 @@
              //Niveau 3
             PanelChild1AxeCam.Width -= 0.05 * this.Width;
             PanelChild1MouvCam.Width -= 0.05 * this.Width;
+
         }
 
          #region Events
--- a/src/FingersDance.Control.Player/FingersDance.Control.Player.csproj	Mon Aug 03 22:27:27 2009 +0200
+++ b/src/FingersDance.Control.Player/FingersDance.Control.Player.csproj	Mon Aug 03 22:36:46 2009 +0200
@@ -84,9 +84,6 @@
     <Compile Include="UserControlPlayer.xaml.cs">
       <DependentUpon>UserControlPlayer.xaml</DependentUpon>
     </Compile>
-    <Content Include="Lake.wmv">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
   </ItemGroup>
   <ItemGroup>
     <ApplicationDefinition Include="App.xaml">
@@ -132,7 +129,9 @@
     <Content Include="Resources\iconPreview.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Include="Resources\Lake.wmv" />
+    <Content Include="Resources\Lake.wmv">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Resource Include="FingersDance.Control.Player.xml" />
   </ItemGroup>
   <ItemGroup>
Binary file src/FingersDance.Control.Player/Lake.wmv has changed
--- a/src/FingersDance.Control.Player/UserControlPlayer.xaml	Mon Aug 03 22:27:27 2009 +0200
+++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml	Mon Aug 03 22:36:46 2009 +0200
@@ -59,7 +59,7 @@
 				</DrawingBrush>
 			</Grid.Background>
 			<Grid Margin="12.366,13.976,12.819,12.508" Background="{x:Null}">
-				<MediaElement x:Name="MediaElementVideo" Source="Lake.wmv"/>
+				<MediaElement x:Name="MediaElementVideo" />
 			</Grid>
 		</Grid>
 		<Custom:SurfaceButton FontSize="12" FontWeight="Bold" x:Name="ButtonPlayPause" Content="Play/Pause" Width="37.873" Height="36.096" ContactDown="ButtonPlayPause_ContactDown" Click="ButtonPlayPause_Click" Foreground="{x:Null}">
--- a/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs	Mon Aug 03 22:27:27 2009 +0200
+++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs	Mon Aug 03 22:36:46 2009 +0200
@@ -28,7 +28,7 @@
         { 
             //init player
             play = false;
-            //MediaElementVideo.Source = new Uri("Resources\\Lake.wmv", UriKind.Relative);
+            MediaElementVideo.Source = new Uri("Resources\\Lake.wmv", UriKind.Relative);
             MediaElementVideo.LoadedBehavior = MediaState.Manual;
         }
 
--- a/src/FingersDance.Control.TimeLine/App.xaml	Mon Aug 03 22:27:27 2009 +0200
+++ b/src/FingersDance.Control.TimeLine/App.xaml	Mon Aug 03 22:36:46 2009 +0200
@@ -1,7 +1,7 @@
 <Application x:Class="FingersDance.Control.TimeLine.App"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    StartupUri="SurfaceWindow1.xaml"
+    StartupUri="SurfaceTimeLineTest.xaml"
     >
     <Application.Resources>
       <ResourceDictionary>
--- a/src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj	Mon Aug 03 22:27:27 2009 +0200
+++ b/src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj	Mon Aug 03 22:36:46 2009 +0200
@@ -73,6 +73,16 @@
     <Reference Include="Microsoft.Surface" />
     <Reference Include="Microsoft.Surface.Presentation" />
     <Reference Include="Microsoft.Surface.Presentation.Generic" />
+    <Page Include="UserControlTimeLine.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="UserControlTimeLine.xaml.cs">
+      <DependentUpon>UserControlTimeLine.xaml</DependentUpon>
+    </Compile>
+    <Content Include="Lake.wmv">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
   </ItemGroup>
   <ItemGroup>
     <ApplicationDefinition Include="App.xaml">
@@ -80,8 +90,8 @@
       <SubType>Designer</SubType>
     </ApplicationDefinition>
     <Compile Include="App.xaml.cs">
+      <SubType>Code</SubType>
       <DependentUpon>App.xaml</DependentUpon>
-      <SubType>Code</SubType>
     </Compile>
   </ItemGroup>
   <ItemGroup>
@@ -105,8 +115,8 @@
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
       <DependentUpon>Settings.settings</DependentUpon>
     </Compile>
-    <Compile Include="SurfaceWindow1.xaml.cs">
-      <DependentUpon>SurfaceWindow1.xaml</DependentUpon>
+    <Compile Include="SurfaceTimeLineTest.xaml.cs">
+      <DependentUpon>SurfaceTimeLineTest.xaml</DependentUpon>
     </Compile>
     <AppDesigner Include="Properties\" />
   </ItemGroup>
@@ -123,7 +133,7 @@
     <Resource Include="Resources\WindowBackground.jpg" />
   </ItemGroup>
   <ItemGroup>
-    <Page Include="SurfaceWindow1.xaml">
+    <Page Include="SurfaceTimeLineTest.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
Binary file src/FingersDance.Control.TimeLine/Lake.wmv has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/SurfaceTimeLineTest.xaml	Mon Aug 03 22:36:46 2009 +0200
@@ -0,0 +1,37 @@
+<s:SurfaceWindow
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:s="http://schemas.microsoft.com/surface/2008"
+    xmlns:FingersDance_Control_TimeLine="clr-namespace:FingersDance.Control.TimeLine"
+    x:Class="FingersDance.Control.TimeLine.SurfaceTimeLineTest"
+    Title="FingersDance.Control.TimeLine" Activated="SurfaceWindow_Activated"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
+    >
+  <s:SurfaceWindow.Resources>
+    <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
+  </s:SurfaceWindow.Resources>
+
+  <Grid Background="{StaticResource WindowBackground}" >
+
+  	<Grid Margin="187,224,198,120">
+  		<MediaElement Source="Lake.wmv" MediaEnded="MediaElement_MediaEnded" x:Name="mediaelement" MediaOpened="mediaelement_MediaOpened" Volume="0"/>
+
+  	</Grid>
+
+  	<s:SurfaceSlider Margin="187,128,229,0" VerticalAlignment="Top" Height="53" x:Name="sliderBase" ValueChanged="sliderBase_ValueChanged" Value="0" DragEnter="sliderBase_DragEnter" DragLeave="sliderBase_DragLeave" ContactEnter="sliderBase_ContactEnter" ContactLeave="sliderBase_ContactLeave" ContactChanged="sliderBase_ContactChanged"/>
+  	<Label Margin="187,37,0,0" Content="SliderPosition" Height="35" VerticalAlignment="Top" Width="161" HorizontalAlignment="Left"/>
+  	<Label Margin="187,81,374,0" VerticalAlignment="Top" Height="24" Content="content" x:Name="labelPosition"/>
+  	<Label HorizontalAlignment="Left" Margin="27,248,0,226" Width="101" Content="MediaDuration"/>
+  	<Label HorizontalAlignment="Left" Margin="27,0,0,186" VerticalAlignment="Bottom" Width="191" Height="40" Content="duration" x:Name="labelDuration"/>
+  	<s:SurfaceButton Margin="0,0,229,63" VerticalAlignment="Bottom" Height="41" Content="Play/Pause" x:Name="butonPlayPause" Click="butonPlayPause_Click" HorizontalAlignment="Right" Width="117"/>
+
+  	<Label Margin="0,233,8,231" Content="Media Position Miliseconds" HorizontalAlignment="Right" x:Name="labelMediaPosition" Width="182"/>
+  	<Label Margin="0,0,-1,214" Content="content" x:Name="labelMediaPositionContent" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="191" Height="24"/>
+  	<s:SurfaceButton Margin="247,0,0,63" VerticalAlignment="Bottom" Height="38" Content="Stop" Click="SurfaceButton_Click" ContactDown="SurfaceButton_ContactDown" HorizontalAlignment="Left" Width="67"/>
+  	<Label Margin="0,21,43,0" Content="SliderMax" VerticalAlignment="Top" Height="35" Width="161" HorizontalAlignment="Right"/>
+  	<Label Margin="0,70,43,0" Content="content" VerticalAlignment="Top" Height="35" HorizontalAlignment="Right" Width="161" x:Name="labelSliderMax" IsEnabled="False"/>
+  	<Label Margin="0,0,12,115" Content="content" HorizontalAlignment="Right" x:Name="labelMediaPositionToString" Width="182" Height="35" VerticalAlignment="Bottom"/>
+  	<Label Margin="0,0,-1,150" Content="MediaPosition Normal" x:Name="labelMediaPositionNormal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="191" Height="24"/>
+
+  </Grid>
+</s:SurfaceWindow>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/SurfaceTimeLineTest.xaml.cs	Mon Aug 03 22:36:46 2009 +0200
@@ -0,0 +1,254 @@
+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.TimeLine
+{
+    /// <summary>
+    /// Interaction logic for SurfaceWindow1.xaml
+    /// </summary>
+    public partial class SurfaceTimeLineTest : SurfaceWindow
+    {
+
+        DispatcherTimer timer;  // handles position of slider and player
+        bool isDragging = false;
+        bool isPlaying = false;
+
+
+
+        /// <summary>
+        /// Default constructor.
+        /// </summary>
+        public SurfaceTimeLineTest()
+        {
+            InitializeComponent();
+
+            // Add handlers for Application activation events
+            initplayer();
+            AddActivationHandlers();
+        }
+
+        #region Handlers
+        /// <summary>
+        /// Occurs when the window is about to close. 
+        /// </summary>
+        /// <param name="e"></param>
+        protected override void OnClosed(EventArgs e)
+        {
+            base.OnClosed(e);
+
+            // Remove handlers for Application activation events
+            RemoveActivationHandlers();
+        }
+
+        /// <summary>
+        /// Adds handlers for Application activation events.
+        /// </summary>
+        private void AddActivationHandlers()
+        {
+            // Subscribe to surface application activation events
+            ApplicationLauncher.ApplicationActivated += OnApplicationActivated;
+            ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed;
+            ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated;
+        }
+
+        /// <summary>
+        /// Removes handlers for Application activation events.
+        /// </summary>
+        private void RemoveActivationHandlers()
+        {
+            // Unsubscribe from surface application activation events
+            ApplicationLauncher.ApplicationActivated -= OnApplicationActivated;
+            ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed;
+            ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated;
+        }
+
+        /// <summary>
+        /// This is called when application has been activated.
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void OnApplicationActivated(object sender, EventArgs e)
+        {
+            //TODO: enable audio, animations here
+        }
+
+        /// <summary>
+        /// This is called when application is in preview mode.
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void OnApplicationPreviewed(object sender, EventArgs e)
+        {
+            //TODO: Disable audio here if it is enabled
+
+            //TODO: optionally enable animations here
+        }
+
+        /// <summary>
+        ///  This is called when application has been deactivated.
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void OnApplicationDeactivated(object sender, EventArgs e)
+        {
+            //TODO: disable audio, animations here
+        }
+        #endregion
+
+        #region SurfaceWindows events
+
+        private void SurfaceWindow_Activated(object sender, EventArgs e)
+        {
+            timer = new DispatcherTimer();
+            //timer.Interval = TimeSpan.FromSeconds(1);
+            timer.Interval = TimeSpan.FromMilliseconds(250);
+            timer.Tick += new EventHandler(timer_Tick);
+        }
+        #endregion
+
+        #region Timer
+        void timer_Tick(object sender, EventArgs e)
+        {
+            //Slider Position
+            labelPosition.Content = sliderBase.Value;
+            //Media Position ToString and TotalMilliseconds
+            labelMediaPositionToString.Content=mediaelement.Position.ToString();
+            labelMediaPositionContent.Content = mediaelement.Position.TotalMilliseconds;
+            //Si le slider n'est pas en train d'etre bougé, on change sa valeur
+            if (!isDragging)
+            {
+                sliderBase.Value = mediaelement.Position.TotalMilliseconds;
+            }
+
+        }
+        #endregion
+
+        #region MediaElement events
+        private void MediaElement_MediaEnded(object sender, RoutedEventArgs e)
+        {
+            mediaelement.Stop();
+        }
+
+        private void mediaelement_MediaOpened(object sender, RoutedEventArgs e)
+        {
+            labelDuration.Content = mediaelement.NaturalDuration.ToString();
+
+            sliderBase.Maximum = mediaelement.NaturalDuration.TimeSpan.TotalMilliseconds;
+            labelSliderMax.Content = sliderBase.Maximum;
+            //initialisation du timer
+            timer.Start();
+        }
+        #endregion
+
+        #region Slider
+
+        private void sliderBase_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+        {
+            //TODO
+            if (!isDragging)
+            {
+
+                int SliderValue = (int)sliderBase.Value;
+
+                // Overloaded constructor takes the arguments days, hours, minutes, seconds, miniseconds.
+                // Create a TimeSpan with miliseconds equal to the slider value.
+                TimeSpan ts = new TimeSpan(0, 0, 0, 0, SliderValue);
+                mediaelement.Position = ts;
+                mediaelement.Play();
+            }
+            
+        }
+
+        private void sliderBase_DragEnter(object sender, DragEventArgs e)
+        {
+            isDragging = true;
+            mediaelement.Pause();
+        }
+
+        private void sliderBase_DragLeave(object sender, DragEventArgs e)
+        {
+            isDragging = false;
+            //mediaelement.Position = TimeSpan.FromSeconds(sliderBase.Value);
+
+        }
+
+        private void sliderBase_ContactEnter(object sender, ContactEventArgs e)
+        {
+            isDragging = true;
+            mediaelement.Pause();
+        }
+
+        private void sliderBase_ContactLeave(object sender, ContactEventArgs e)
+        {
+            isDragging = false;
+            mediaelement.Position = TimeSpan.FromSeconds(sliderBase.Value);
+        }
+
+        private void sliderBase_ContactChanged(object sender, ContactEventArgs e)
+        {
+           // isDragging = false;
+            //mediaelement.Position = TimeSpan.FromMilliseconds(sliderBase.Value);
+        }
+        #endregion
+
+        #region Player
+        private void initplayer()
+        {
+            mediaelement.LoadedBehavior = MediaState.Manual;        
+        }
+
+        private void butonPlayPause_Click(object sender, RoutedEventArgs e)
+        {
+            if (!isPlaying)//Play
+            {
+                isPlaying = true;
+                try
+                {
+                    mediaelement.Play();
+                }
+                catch (Exception ex) { }
+            }
+            else//Pause
+            {
+                isPlaying = false;
+                try
+                {
+                    mediaelement.Pause();
+                }
+                catch (Exception exx) { }
+            }
+        }
+        private void SurfaceButton_Click(object sender, RoutedEventArgs e)
+        {
+            mediaelement.Stop();
+        }
+
+        private void SurfaceButton_ContactDown(object sender, ContactEventArgs e)
+        {
+            mediaelement.Stop();
+        }
+
+    #endregion
+
+
+
+
+
+    }
+        
+
+}
\ No newline at end of file
--- a/src/FingersDance.Control.TimeLine/SurfaceWindow1.xaml	Mon Aug 03 22:27:27 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<s:SurfaceWindow x:Class="FingersDance.Control.TimeLine.SurfaceWindow1"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:s="http://schemas.microsoft.com/surface/2008"
-    Title="FingersDance.Control.TimeLine"
-    >
-  <s:SurfaceWindow.Resources>
-    <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
-  </s:SurfaceWindow.Resources>
-
-  <Grid Background="{StaticResource WindowBackground}" >
-
-  </Grid>
-</s:SurfaceWindow>
--- a/src/FingersDance.Control.TimeLine/SurfaceWindow1.xaml.cs	Mon Aug 03 22:27:27 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.TimeLine
-{
-    /// <summary>
-    /// Interaction logic for SurfaceWindow1.xaml
-    /// </summary>
-    public partial class SurfaceWindow1 : SurfaceWindow
-    {
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        public SurfaceWindow1()
-        {
-            InitializeComponent();
-
-            // Add handlers for Application activation events
-            AddActivationHandlers();
-        }
-
-
-        /// <summary>
-        /// Occurs when the window is about to close. 
-        /// </summary>
-        /// <param name="e"></param>
-        protected override void OnClosed(EventArgs e)
-        {
-            base.OnClosed(e);
-
-            // Remove handlers for Application activation events
-            RemoveActivationHandlers();
-        }
-
-        /// <summary>
-        /// Adds handlers for Application activation events.
-        /// </summary>
-        private void AddActivationHandlers()
-        {
-            // Subscribe to surface application activation events
-            ApplicationLauncher.ApplicationActivated += OnApplicationActivated;
-            ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed;
-            ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated;
-        }
-
-        /// <summary>
-        /// Removes handlers for Application activation events.
-        /// </summary>
-        private void RemoveActivationHandlers()
-        {
-            // Unsubscribe from surface application activation events
-            ApplicationLauncher.ApplicationActivated -= OnApplicationActivated;
-            ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed;
-            ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated;
-        }
-
-        /// <summary>
-        /// This is called when application has been activated.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void OnApplicationActivated(object sender, EventArgs e)
-        {
-            //TODO: enable audio, animations here
-        }
-
-        /// <summary>
-        /// This is called when application is in preview mode.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void OnApplicationPreviewed(object sender, EventArgs e)
-        {
-            //TODO: Disable audio here if it is enabled
-
-            //TODO: optionally enable animations here
-        }
-
-        /// <summary>
-        ///  This is called when application has been deactivated.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void OnApplicationDeactivated(object sender, EventArgs e)
-        {
-            //TODO: disable audio, animations here
-        }
-    }
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml	Mon Aug 03 22:36:46 2009 +0200
@@ -0,0 +1,16 @@
+<UserControl
+	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+	mc:Ignorable="d"
+	x:Class="FingersDance.Control.TimeLine.UserControlTimeLine"
+	x:Name="UserControl"
+	d:DesignWidth="575" xmlns:Custom="http://schemas.microsoft.com/surface/2008" Height="88" Background="#FF898686">
+
+	<Grid x:Name="LayoutRoot" Background="#FFFFFFFF" Height="88" Width="575">
+		<Custom:SurfaceSlider ValueChanged="SurfaceSlider_ValueChanged" Margin="0,0,0,8" Height="27" VerticalAlignment="Bottom" x:Name="SurfaceSlider" Value="0.5"/>
+		<Label HorizontalAlignment="Left" Margin="20,8,0,39" Width="243" Content="" x:Name="LabelSliderPosition" Background="#FCA8A8A8"/>
+		<Label HorizontalAlignment="Right" Margin="0,12,31,35" Width="243" Content="" x:Name="LabelSliderDuration" Background="#FFB2B2B2"/>
+	</Grid>
+</UserControl>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs	Mon Aug 03 22:36:46 2009 +0200
@@ -0,0 +1,43 @@
+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.Animation;
+using System.Windows.Navigation;
+
+namespace FingersDance.Control.TimeLine
+{
+	public partial class UserControlTimeLine
+	{
+        public Microsoft.Surface.Presentation.Controls.SurfaceSlider Slider
+        {
+            get {
+                return SurfaceSlider;
+            }
+            set {
+                SurfaceSlider = value;
+            }
+        }
+        
+		public UserControlTimeLine()
+		{
+			this.InitializeComponent();
+
+			// Insert code required on object creation below this point.
+		}
+
+        private void SurfaceSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+        {
+            /*TimeSpan ts = TimeSpan.FromSeconds(e.NewValue);
+            LabelSliderPosition.Content =
+                String.Format("{0:00}:{1:00}:{2:00}",
+                ts.Hours, ts.Minutes, ts.Seconds);
+            SurfaceSlider.Maximum = ts.TotalSeconds;
+            SurfaceSlider.SmallChange = 1;
+            SurfaceSlider.LargeChange = Math.Min(10, ts.Seconds / 10);*/
+        }
+	}
+}
\ No newline at end of file
--- a/src/FingersDance.Control/SurfaceWindow1.xaml	Mon Aug 03 22:27:27 2009 +0200
+++ b/src/FingersDance.Control/SurfaceWindow1.xaml	Mon Aug 03 22:36:46 2009 +0200
@@ -2,7 +2,7 @@
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:s="http://schemas.microsoft.com/surface/2008"
-    Title="FingersDance.Control"
+    Title="FingersDance.Control" x:Name="SurfaceActionsTest"
     >
   <s:SurfaceWindow.Resources>
     <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
--- a/src/FingersDance.sln	Mon Aug 03 22:27:27 2009 +0200
+++ b/src/FingersDance.sln	Mon Aug 03 22:36:46 2009 +0200
@@ -19,6 +19,8 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.Control.TimeLine", "FingersDance.Control.TimeLine\FingersDance.Control.TimeLine.csproj", "{2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.Actions", "FingersDance.Actions\FingersDance.Actions.csproj", "{1E80D5A1-C45C-443B-8992-4A4D78D280FC}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -99,6 +101,12 @@
 		{2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}.Release|Any CPU.Build.0 = Release|Any CPU
 		{2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}.Release|x86.ActiveCfg = Release|x86
 		{2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}.Release|x86.Build.0 = Release|x86
+		{1E80D5A1-C45C-443B-8992-4A4D78D280FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1E80D5A1-C45C-443B-8992-4A4D78D280FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1E80D5A1-C45C-443B-8992-4A4D78D280FC}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{1E80D5A1-C45C-443B-8992-4A4D78D280FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1E80D5A1-C45C-443B-8992-4A4D78D280FC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{1E80D5A1-C45C-443B-8992-4A4D78D280FC}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE