client/src/Iri.Modernisation.Controls/ViewModel/VideoViewer/VideoViewerVM.cs
changeset 0 249d70e7b32d
child 15 3f70aee2432f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/VideoViewer/VideoViewerVM.cs	Wed Nov 18 15:30:31 2009 +0100
@@ -0,0 +1,84 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Iri.Modernisation.BaseMVVM.Commands;
+using Iri.Modernisation.BaseMVVM.ViewModel;
+namespace Iri.Modernisation.Controls.ViewModel
+{
+    public class VideoViewerVM : BaseMVVM.ViewModel.ViewModel
+    {
+
+        private String _source;
+        public String Source
+        {
+            get
+            {
+                return _source;
+            }
+            set
+            {
+                _source = value;
+               
+                OnPropertyChanged(null);
+            }
+        }
+        public Uri USource
+        {
+            get
+            {
+                if (Source != null)
+                {
+                    return new Uri(Source, UriKind.RelativeOrAbsolute);
+                }
+                else
+                {
+                    return null;
+                }
+            }
+
+        }
+        public String Info
+        {
+            get
+            {
+                return position + ":" + Source;
+            }
+            
+        }
+        private TimeSpan position = new TimeSpan(0,0,0);
+        public TimeSpan Position
+        {
+            get
+            {
+                return position;
+            }
+            set
+            {
+                position = value;
+                //OnPropertyChanged("Position");
+               OnPropertyChanged("Info");
+            
+            }
+        }
+        public VideoViewerVM()
+        {
+            Commands.VideoViewer.SendPosition.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(SendPosition_Executed);
+            //Commands.GoToTime.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(GoToTime_Executed);
+        }
+
+        void SendPosition_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+        {
+            //Position = (TimeSpan)(e.Parameter);
+        }
+
+       
+
+    }
+}