Browse Source

add listAllColours function to lib and rename applyGrid to async.

master
Craig Oates 6 years ago
parent
commit
d098f12691
  1. 16
      DeathSocket/GridPainter.fs

16
DeathSocket/GridPainter.fs

@ -6,12 +6,22 @@ namespace DeathSocket
open Validation
open ImageServices
open System.Drawing
open System.Reflection
let applyGrid spec =
let applyGridAsync spec =
async {
try
validateFilePath |> ignore
drawGrid spec |> ignore
with
| :? FileNotFoundException as ex -> printfn "File could not be found at %s" ex.Message
}
| :? FileNotFoundException as ex ->
printfn "File could not be found at %s" ex.Message
}
let ListAllColours =
let properties =
typeof<Brushes>.GetProperties
(BindingFlags.Public ||| BindingFlags.Static)
seq { for prop in properties -> prop }
|> Seq.toList
Loading…
Cancel
Save