Ejemplo n.º 1
0
 void addTrackEvent(VideoControlModel model)
 {
     if (model.RealTimeControl.TrackSource.TrackRectEvent == null)
     {
         model.RealTimeControl.TrackSource.TrackRectEvent  += onTrackRect;
         model.RealTimeControl.TrackSource.PropertyChanged += trackSourcePropertyChanged;
     }
 }
Ejemplo n.º 2
0
 public VideoItemViewModel()
 {
     PlusSignModel       = new PlusSignViewModel();
     SearchedResultModel = new SearchedResultViewModel()
     {
         AllowDrag = false
     };
     ControlViewModel = new VideoControlModel();
     ControlViewModel.PropertyChanged += ControlViewModel_PropertyChanged;
     PlusSignModel.PlusCommand         = new DelegateCommand(_ => gotoSearch());
     PropertyChanged += onPropertyChanged;
     IsInEditStatus   = true;
 }
Ejemplo n.º 3
0
 void updatePropertyChanged(VideoControlModel model, bool isLoad)
 {
     if (model != null)
     {
         if (isLoad)
         {
             addTrackEvent(model);
             model.RealTimeControl.PropertyChanged += RealTimeControl_PropertyChanged;
             model.PropertyChanged += ViewModel_PropertyChanged;
             VideoIdChanged        += onVideoId;
         }
         else
         {
             model.RealTimeControl.TrackSource.PropertyChanged -= trackSourcePropertyChanged;
             model.RealTimeControl.TrackSource.TrackRectEvent  -= onTrackRect;
             model.RealTimeControl.PropertyChanged             -= RealTimeControl_PropertyChanged;
             model.PropertyChanged -= ViewModel_PropertyChanged;
             VideoIdChanged        -= onVideoId;
         }
     }
 }