Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Animation/F-Sharp/animation.fs
Normal file
15
Task/Animation/F-Sharp/animation.fs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
open System.Windows
|
||||
|
||||
let str = "Hello world! "
|
||||
let mutable i = 0
|
||||
let mutable d = 1
|
||||
|
||||
[<System.STAThread>]
|
||||
do
|
||||
let button = Controls.Button()
|
||||
button.Click.Add(fun _ -> d <- str.Length - d)
|
||||
let update _ =
|
||||
i <- (i + d) % str.Length
|
||||
button.Content <- str.[i..] + str.[..i-1]
|
||||
Media.CompositionTarget.Rendering.Add update
|
||||
(Application()).Run(Window(Content=button)) |> ignore
|
||||
Loading…
Add table
Add a link
Reference in a new issue