- let highlightRBCFrame (frame : Views.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 highlightRBCFrame (rbcFrame : RBCFrame) (strokeThickness : float) =
+ if highlight then
+ rbcFrame.border.StrokeThickness <- 2. * strokeThickness
+ if not rbc.infected && not rbc.setManually && not displayHealthy then rbcFrame.Opacity <- 1.
+ else
+ rbcFrame.border.StrokeThickness <- strokeThickness
+ if not rbc.infected && not rbc.setManually && not displayHealthy then rbcFrame.Opacity <- 0.
+
+ for rbcFrame in win.stackRBC.Children |> Seq.cast<RBCFrame> do
+ if (rbcFrame.Tag :?> RBC) = rbc then
+ highlightRBCFrame rbcFrame 1.
+
+ let strokeThicknessCanvas = frameStrokeThickness ()
+
+ for rbcFrame in win.canvasCurrentImage.Children |> Seq.cast<RBCFrame> do
+ if (rbcFrame.Tag :?> RBC) = rbc then
+ highlightRBCFrame rbcFrame strokeThicknessCanvas