Ejemplo n.º 1
0
        public void SetUp()
        {
            videoPlayerVM             = new VideoPlayerVM();
            videoPlayerControllerMock = new Mock <IVideoPlayerController> ();
            videoPlayerVM.Player      = videoPlayerControllerMock.Object;
            Project project = Utils.CreateProject(false);
            var     period  = new Period();

            period.Nodes.Add(new TimeNode {
                Start = new Time(0),
                Stop  = new Time(3000)
            });
            project.Periods.Add(period);
            projectVM = new DummyProjectVM {
                Model = project
            };
            camSyncVM = new CameraSynchronizationVM {
                VideoPlayer = videoPlayerVM, Project = projectVM
            };
            camSyncController = new CameraSynchronizationController();
            videoPlayerControllerMock.ResetCalls();
            stateControllerMock.ResetCalls();

            KeyContext context = new KeyContext();

            foreach (KeyAction action in camSyncController.GetDefaultKeyActions())
            {
                context.AddAction(action);
            }
            App.Current.KeyContextManager.NewKeyContexts(new List <KeyContext> {
                context
            });
        }
Ejemplo n.º 2
0
 public override void SetViewModel(IViewModel viewModel)
 {
     cameraSynchronizationVM = (CameraSynchronizationVM)viewModel;
     if (viewModel != null)
     {
         videoPlayerVM = cameraSynchronizationVM.VideoPlayer;
         projectVM     = cameraSynchronizationVM.Project;
         InitPeriods();
     }
 }
Ejemplo n.º 3
0
        public void SetUp()
        {
            var     videoPlayerVM = new VideoPlayerVM();
            Project project       = Utils.CreateProject(false);

            project.Periods.Clear();
            var period = new Period();

            period.Nodes.Add(new TimeNode {
                Start = new Time(0),
                Stop  = new Time(3000)
            });
            project.Periods.Add(period);
            var projectVM = new DummyProjectVM {
                Model = project
            };

            viewModel = new CameraSynchronizationVM {
                VideoPlayer = videoPlayerVM, Project = projectVM
            };
        }