private void Placed(object sender) { var isPlaced = ((SurfaceCheckBox)sender).IsChecked == true; if (isPlaced) { _Touch = new SimulatedTouch { Id = _DeviceIdSequence++, IsTag = IsTag, TagValue = TagValue, Center = Position, Axis = new Microsoft.Surface.Presentation.Input.EllipseData(Size.Width, Size.Height, Orientation) }; _TrackedBlob = _TrackingCanvas.ForTestingPurposes_StartTracking(_Touch); } else { _TrackingCanvas.ForTestingPurposes_StopTracking(_TrackedBlob); _Touch = null; _TrackedBlob = null; } }
internal void ForTestingPurposes_StopTracking(ITrackedBlob trackedBlob) { var blob = (TrackedBlob)trackedBlob; blob.DontDisplay(); _Blobs.Remove(blob); UpdateLog(); UpdateVisuals(); }