Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #load "LWCs.fsx"
- #load "IumButton.fsx"
- open System.Windows.Forms
- open System.Drawing
- open LWCs
- open IumButton
- let f = new Form(Text="Editor PI",TopMost=true, Size=Size(980,600))
- f.Show()
- type NavBut=
- | Load = 0
- | Save = 1
- type NavBut2 =
- | Up = 0
- | Down = 1
- | Left = 2
- | Right = 3
- | RotateL = 4
- | RotateR = 5
- | ZoomUp = 6
- | ZoomDown = 7
- let mutable erase = false
- type MyImage() as this =
- inherit LWC()
- let mutable tasto = new NavBut()
- let mutable disegna = true
- let transformP (m:Drawing2D.Matrix) (p:PointF) =
- let a = [| PointF(single p.X, single p.Y) |]
- m.TransformPoints(a)
- a.[0]
- member this.Tasto
- with get() = tasto
- and set(v) = tasto <- v
- member this.Disegna
- with get() = disegna
- and set(v) = disegna <- v
- override this.OnMouseDown e =
- printfn "erase : %A" disegna
- if(erase) then
- disegna <- false
- //qui ci sara il selezionamento
- base.OnMouseDown(e)
- type mysimulator() as this =
- inherit LWContainer()
- let buttonsv = [
- new IumButton(Text="Load", Location=Pointf(0.f,single(f.ClientSize.Height)-64.f));
- new IumButton(Text="Save", Location=Pointf(64.f,single(f.ClientSize.Height)-64.f));
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement