Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
NLua
Commits
9f06073c
Commit
9f06073c
authored
Nov 18, 2013
by
Vinicius Jarina
Browse files
Fix #59 Samples\form.lua crashes (
http://screencast.com/t/rI07N45s
)
parent
8b4f74fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Samples/form.lua
View file @
9f06073c
-- kevinh - the following lines are part of our standard init
-- require("compat-5.1")
luanet
.
load_assembly
(
"System.Windows.Forms"
)
luanet
.
load_assembly
(
"System.Drawing"
)
import
(
"System.Windows.Forms"
)
import
(
"System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
)
import
(
"System.Drawing"
)
Form
=
luanet
.
import_type
(
"System.Windows.Forms.Form"
)
Button
=
luanet
.
import_type
(
"System.Windows.Forms.Button"
)
Point
=
luanet
.
import_type
(
"System.Drawing.Point"
)
form1
=
Form
()
button1
=
Button
()
...
...
@@ -19,7 +17,7 @@ function handleClick(sender,data)
sender
.
Text
=
"OK"
end
button1
.
MouseUp
:
Remove
(
handler
)
print
(
sender
:
ToString
())
MessageBox
.
Show
(
sender
:
ToString
())
end
button1
.
Text
=
"OK"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment