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 }); }
public override void SetViewModel(IViewModel viewModel) { cameraSynchronizationVM = (CameraSynchronizationVM)viewModel; if (viewModel != null) { videoPlayerVM = cameraSynchronizationVM.VideoPlayer; projectVM = cameraSynchronizationVM.Project; InitPeriods(); } }
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 }; }