- let highlightRBCFrame (frame : RBCFrame) (highlight : bool) =
- let rbc = frame.Tag :?> RBC
- if highlight then
- frame.border.StrokeThickness <- 3. * frame.border.StrokeThickness
- if not rbc.infected && not rbc.setManually && not displayHealthy then frame.Opacity <- 1.
- else
- frame.border.StrokeThickness <- frame.border.StrokeThickness / 3.
- if not rbc.infected && not rbc.setManually && not displayHealthy then frame.Opacity <- 0.
+ let highlightRBC (rbc : RBC) (highlight : bool) =
+ // let rbc = frame.Tag :?> RBC
+ // Find the two frames in previews and current image.
+
+ for rbcFrame in (win.stackRBC.Children |> Seq.cast<RBCFrame>).Concat(win.canvasCurrentImage.Children |> Seq.cast<RBCFrame>) do
+ if (rbcFrame.Tag :?> RBC) = rbc then
+ if highlight then
+ rbcFrame.border.StrokeThickness <- 3. * rbcFrame.border.StrokeThickness
+ if not rbc.infected && not rbc.setManually && not displayHealthy then rbcFrame.Opacity <- 1.
+ else
+ rbcFrame.border.StrokeThickness <- rbcFrame.border.StrokeThickness / 3.
+ if not rbc.infected && not rbc.setManually && not displayHealthy then rbcFrame.Opacity <- 0.