2014-12-12 20:58:52 +01:00
|
|
|
' Gambas class file
|
|
|
|
|
|
|
|
Public myThing As CThing
|
|
|
|
|
|
|
|
Public Sub btnCreateThing_Click()
|
|
|
|
|
|
|
|
myThing = New CThing
|
|
|
|
|
|
|
|
With mything
|
2019-05-20 08:26:41 +02:00
|
|
|
.Name = ("Dummy-Thing")
|
2014-12-12 20:58:52 +01:00
|
|
|
.X = 11
|
|
|
|
.Y = 22
|
|
|
|
.ID = 33
|
|
|
|
End With
|
|
|
|
|
|
|
|
txtCheckResult.Visible = True
|
|
|
|
|
|
|
|
End
|
|
|
|
|
|
|
|
Public Sub btnCheckThing_Click()
|
|
|
|
|
|
|
|
If myThing Then
|
|
|
|
|
|
|
|
With mything
|
|
|
|
txtCheckResult.Text = Subst("&1, X= &2, Y= &3, ID= &4", .Name, .X, .Y, .ID)
|
|
|
|
End With
|
|
|
|
|
|
|
|
Else
|
|
|
|
Message.Warning(("You need to create the Thing first!"))
|
|
|
|
Endif
|
|
|
|
|
|
|
|
End
|
|
|
|
|
|
|
|
Public Sub btnDestroy_Click()
|
|
|
|
|
|
|
|
If Not mything Then
|
|
|
|
Message.Warning(("You need to create the Thing first!"))
|
|
|
|
Return
|
|
|
|
Endif
|
|
|
|
|
|
|
|
myThing = Null
|
|
|
|
txtCheckResult.Visible = False
|
|
|
|
|
|
|
|
End
|