client/src/Iri.Modernisation.Controls/ViewModel/VideoViewer/VideoViewerVM.cs
changeset 15 3f70aee2432f
parent 0 249d70e7b32d
child 22 69a2910ec6f9
equal deleted inserted replaced
14:a48c44bc825b 15:3f70aee2432f
    42                     return null;
    42                     return null;
    43                 }
    43                 }
    44             }
    44             }
    45 
    45 
    46         }
    46         }
       
    47         
    47         public String Info
    48         public String Info
    48         {
    49         {
    49             get
    50             get
    50             {
    51             {
    51                 return position + ":" + Source;
    52                 return position + ":" + Source;
    52             }
    53             }
    53             
    54             
    54         }
    55         }
       
    56         
    55         private TimeSpan position = new TimeSpan(0,0,0);
    57         private TimeSpan position = new TimeSpan(0,0,0);
    56         public TimeSpan Position
    58         public TimeSpan Position
    57         {
    59         {
    58             get
    60             get
    59             {
    61             {
    65                 //OnPropertyChanged("Position");
    67                 //OnPropertyChanged("Position");
    66                OnPropertyChanged("Info");
    68                OnPropertyChanged("Info");
    67             
    69             
    68             }
    70             }
    69         }
    71         }
    70         public VideoViewerVM()
    72 
       
    73         private bool _playControl;
       
    74         public bool PlayControl
       
    75         {
       
    76             get
       
    77             {
       
    78                 return _playControl;
       
    79             }
       
    80             set
       
    81             {
       
    82                 _playControl = value;
       
    83                 OnPropertyChanged("PlayControl");
       
    84             }
       
    85         }
       
    86 
       
    87         private bool _recordControl;
       
    88         public bool RecordControl
       
    89         {
       
    90             get
       
    91             {
       
    92                 return _recordControl;
       
    93             }
       
    94             set
       
    95             {
       
    96                 _recordControl = value;
       
    97                 OnPropertyChanged("RecordControl");
       
    98             }
       
    99         }
       
   100         public VideoViewerVM(bool playControl,bool recordControl )
       
   101         {
       
   102             _playControl = playControl;
       
   103             _recordControl = recordControl;
       
   104             InitializeCommands();
       
   105         }
       
   106         private void InitializeCommands()
    71         {
   107         {
    72             Commands.VideoViewer.SendPosition.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(SendPosition_Executed);
   108             Commands.VideoViewer.SendPosition.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(SendPosition_Executed);
    73             //Commands.GoToTime.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(GoToTime_Executed);
   109             //Commands.GoToTime.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(GoToTime_Executed);
       
   110         
    74         }
   111         }
    75 
       
    76         void SendPosition_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
   112         void SendPosition_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
    77         {
   113         {
    78             //Position = (TimeSpan)(e.Parameter);
   114             //Position = (TimeSpan)(e.Parameter);
    79         }
   115         }
    80 
   116