private void AcceptImagePoints(object sender, RoutedEventArgs e) { if (_isPointsSelected) { } else { _camImageFirst.AddPoint(_curCam1Point); _camImageSec.AddPoint(_curCam2Point); Points3D.Add(new Camera3DPoint() { Cam1Point = _curCam1Point, Cam2Point = _curCam2Point }); _butAcceptPoint.IsEnabled = false; // Compute 3D point } _curCam1Point = new Point(-1, -1); _curCam2Point = new Point(-1, -1); _curCamPoint = new Camera3DPoint(); }
// Selection and temp point should follow ones on CamersImage // and change corresponding camera3dpoint in real time // Undoing from this level private void OnSelectedPointChangedSecond(object sender, Point point) { if (point.X < 0) { _camImageFirst.SelectedPoint = point; _butRemovePoint.IsEnabled = false; _butAcceptPoint.IsEnabled = true; _isPointsSelected = false; return; } foreach (var point3d in Points3D) { if (point.Equals(point3d.Cam2Point)) { _camImageFirst.SelectedPoint = point3d.Cam1Point; _butRemovePoint.IsEnabled = true; _curCamPoint = point3d; _isPointsSelected = true; return; } } CheckIfValidPointsChoosen(); }