client/src/Iri.Modernisation.Controls/ViewModel/VideoViewer/VideoViewerVM.cs
changeset 22 69a2910ec6f9
parent 15 3f70aee2432f
child 23 10acb6a11a73
equal deleted inserted replaced
21:253f142174ac 22:69a2910ec6f9
   101         {
   101         {
   102             _playControl = playControl;
   102             _playControl = playControl;
   103             _recordControl = recordControl;
   103             _recordControl = recordControl;
   104             InitializeCommands();
   104             InitializeCommands();
   105         }
   105         }
       
   106         public event EventHandler<VideoViewerVMEventArgs> Tick;
       
   107 
   106         private void InitializeCommands()
   108         private void InitializeCommands()
   107         {
   109         {
   108             Commands.VideoViewer.SendPosition.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(SendPosition_Executed);
   110            
   109             //Commands.GoToTime.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(GoToTime_Executed);
       
   110         
       
   111         }
   111         }
   112         void SendPosition_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
   112        
       
   113         public void LaunchTick(TimeSpan Pos)
   113         {
   114         {
   114             //Position = (TimeSpan)(e.Parameter);
   115             if(Tick!=null)
       
   116             {
       
   117                 Tick(this, new VideoViewerVMEventArgs(Pos));
       
   118             }
   115         }
   119         }
   116 
       
   117        
   120        
   118 
   121 
   119     }
   122     }
       
   123     public class VideoViewerVMEventArgs : EventArgs
       
   124     {
       
   125          public TimeSpan Position { get; set; }
       
   126         public VideoViewerVMEventArgs(TimeSpan pos)
       
   127         {
       
   128             Position = pos;
       
   129         }
       
   130     }
   120 }
   131 }