public CameraClientRemoteControl(CameraClientViewModel model, ClientController camera)
 {
     _model = model;
     _camera = camera;
     _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);
 }
Exemplo n.º 2
0
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     model = ((CameraClientViewModel)this.DataContext);
     model.Initialize();
     model.SelectedResolution.Changed += SelectedResolution_Changed;
 }