コード例 #1
0
 public CameraClientRemoteControl(CameraClientViewModel model, ClientController camera)
 {
     _model  = model;
     _camera = camera;
     _camera.RecordingStarted   += _camera_RecordingStarted;
     _camera.RecordingCompleted += _camera_RecordingCompleted;
     _heartbeat        = new HeartbeatTimer(() => Task.FromResult(0));
     _ping             = new PingUtility(50123);
     _ping.HandlePing += ReportCamera;
     _listener         = new CommandListener();
     _listener.RegisterHandler <RecordCommand, RecordCommand>(RemoteRecord);
     _listener.RegisterHandler <EnableHeartbeatCommand, EnableHeartbeatCommand>(EnableHeartbeat);
     _listener.RegisterHandler <UpdateResolutionCommand, RemoteResolutionModel>(UpdateResolution);
 }
コード例 #2
0
ファイル: MainPage.cs プロジェクト: CatalystCode/BulletTime
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     model = ((CameraClientViewModel)DataContext);
     model.Initialize();
     model.SelectedResolution.Changed += SelectedResolution_Changed;
 }