Esempio n. 1
0
 void addTrackEvent(VideoControlModel model)
 {
     if (model.RealTimeControl.TrackSource.TrackRectEvent == null)
     {
         model.RealTimeControl.TrackSource.TrackRectEvent  += onTrackRect;
         model.RealTimeControl.TrackSource.PropertyChanged += trackSourcePropertyChanged;
     }
 }
Esempio 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;
 }
Esempio 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;
         }
     }
 }