- match result
- { let! sensorResolution = parseDouble win.txtSensorResolution.Text "The sensor resolution is not valid"
- let! zoom = parseDouble win.txtZoom.Text "The zoom is not valid"
- let wPixel = 1.<px> * sqrt (sensorResolution * 1e6 / ratio)
- return! Success (float <| resolution wPixel w zoom) } with
- | Success res -> win.txtImageResolution.Text <- (int (res / 1000.) * 1000).ToString()
+ match
+ (result {
+ let! sensorResolution = parseDouble win.txtSensorResolution.Text "The sensor resolution is not valid"
+ let! zoom = parseDouble win.txtZoom.Text "The zoom is not valid"
+ let wPixel = 1.<px> * sqrt (sensorResolution * 1e6 / ratio)
+ return! Success (float <| resolution wPixel w zoom)
+ }) with
+ | Success res -> win.txtImageResolution.Text <- int (res / 1000.) * 1000 |> string