Exemplo n.º 1
0
 public VM(VideoPlayerVM videoPlayerVM, TimeLineVM timeLineVM, MainWindow _mainWindow) : this(_mainWindow)
 {
     _videoPlayerVM = videoPlayerVM;
     _timeLineVM    = timeLineVM;
     //  mainWindow.TimeLine1.DataContext = _timeLineVM;
     mainWindow.DataContext = this;
 }
Exemplo n.º 2
0
 public SceneVM(Scene _scene, VideoPlayerVM _videoPlayerVM, LevelVM _levelVM)
 {
     this.scene    = _scene;
     videoPlayerVM = _videoPlayerVM;
     TrackTime     = true;
     levelVM       = _levelVM;
 }
Exemplo n.º 3
0
 public LevelSetVM(LevelSet levelSet) // В этом конструкторе заполняем тестовыми данными свойства ойства...
 {
     _LevelSet        = levelSet;
     _VideoInfoVM     = new VideoInfoVM(_LevelSet);
     sceneSetVMs      = new ObservableCollection <SceneSetVM>();
     VideoPlayerVM    = new VideoPlayerVM(this);
     PropertyChanged += LevelSetVM_PropertyChanged;
 }
Exemplo n.º 4
0
        public LevelVM(Level level, VideoPlayerVM videoPlayerVM, TimeLineVM timeLineVM)
        {
            _Level               = level;
            _VideoInfoVM         = new VideoInfoVM(_Level.VideoInfo, level); //ВОт как надо - надо опираться на единую модель и не создавать новые представления в геттерах!!!
            _videoPlayerVM       = videoPlayerVM;
            _timeLineVM          = timeLineVM;
            SegregateTime        = TimeSpan.FromSeconds(100);
            SegregateCount       = 5;
            OverlapSegregateTime = TimeSpan.Zero;
            SceneListBox         = ((MainWindow)Application.Current.MainWindow).SceneListBox;

            //пробрасываем событие изменения коллекции сцен
            try { _Level.Scenes.CollectionChanged -= SceneVMs_CollectionChanged; }
            finally { _Level.Scenes.CollectionChanged += SceneVMs_CollectionChanged; }
        }