예제 #1
0
파일: VM.cs 프로젝트: lvovandrey/VGAME_New
 public VM(VideoPlayerVM videoPlayerVM, TimeLineVM timeLineVM, MainWindow _mainWindow) : this(_mainWindow)
 {
     _videoPlayerVM = videoPlayerVM;
     _timeLineVM    = timeLineVM;
     //  mainWindow.TimeLine1.DataContext = _timeLineVM;
     mainWindow.DataContext = this;
 }
예제 #2
0
 public SceneVM(Scene _scene, VideoPlayerVM _videoPlayerVM, LevelVM _levelVM)
 {
     this.scene    = _scene;
     videoPlayerVM = _videoPlayerVM;
     TrackTime     = true;
     levelVM       = _levelVM;
 }
예제 #3
0
 public LevelSetVM(LevelSet levelSet) // В этом конструкторе заполняем тестовыми данными свойства ойства...
 {
     _LevelSet        = levelSet;
     _VideoInfoVM     = new VideoInfoVM(_LevelSet);
     sceneSetVMs      = new ObservableCollection <SceneSetVM>();
     VideoPlayerVM    = new VideoPlayerVM(this);
     PropertyChanged += LevelSetVM_PropertyChanged;
 }
예제 #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; }
        }