client/src/Iri.Modernisation.Controls/ViewModel/VideoViewer/VideoViewerVM.cs
changeset 25 a9c815025a1b
parent 23 10acb6a11a73
child 29 5f8d275750e7
equal deleted inserted replaced
24:c031f1132dde 25:a9c815025a1b
    95             {
    95             {
    96                 _recordControl = value;
    96                 _recordControl = value;
    97                 OnPropertyChanged("RecordControl");
    97                 OnPropertyChanged("RecordControl");
    98             }
    98             }
    99         }
    99         }
       
   100 
       
   101         private bool _autoPlay;
       
   102         public bool AutoPlay
       
   103         {
       
   104             get
       
   105             {
       
   106                 return _autoPlay;
       
   107             }
       
   108             set
       
   109             {
       
   110                 _autoPlay = value;
       
   111                 OnPropertyChanged("AutoPlay");
       
   112             }
       
   113 
       
   114         }
       
   115 
   100         public VideoViewerVM(bool playControl,bool recordControl )
   116         public VideoViewerVM(bool playControl,bool recordControl )
   101         {
   117         {
   102             _playControl = playControl;
   118             _playControl = playControl;
   103             _recordControl = recordControl;
   119             _recordControl = recordControl;
       
   120              
   104             InitializeCommands();
   121             InitializeCommands();
       
   122             AutoPlay = false;
       
   123             
   105         }
   124         }
   106         public event EventHandler<VideoViewerVMEventArgs> Tick;
   125         public event EventHandler<VideoViewerVMEventArgs> Tick;
   107 
   126 
   108         private void InitializeCommands()
   127         private void InitializeCommands()
   109         {
   128         {
   111         }
   130         }
   112         public void GoTo(TimeSpan pos)
   131         public void GoTo(TimeSpan pos)
   113         {
   132         {
   114             Position = pos;
   133             Position = pos;
   115             Commands.GoToTime.Execute(Position,this);
   134             Commands.GoToTime.Execute(Position,this);
       
   135         }
       
   136         public void Pause()
       
   137         {
       
   138             Commands.VideoViewer.Pause.Execute(null, this);
   116         }
   139         }
   117         public void LaunchTick(TimeSpan Pos)
   140         public void LaunchTick(TimeSpan Pos)
   118         {
   141         {
   119             if(Tick!=null)
   142             if(Tick!=null)
   120             {
   143             {