forked from aceofspades19/Runesword-II-OS.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFactoid.vb
59 lines (50 loc) · 2.08 KB
/
Factoid.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Option Strict Off
Option Explicit On
Friend Class Factoid
' Unique index for this Factoid
Private myIndex As Short
' Text of this Factoid
Private myText As String
Public Property Index() As Short
Get
Index = myIndex
End Get
Set(ByVal Value As Short)
myIndex = Value
End Set
End Property
Public Property Text() As String
Get
Text = Trim(myText)
End Get
Set(ByVal Value As String)
myText = Trim(Value)
End Set
End Property
Public Sub Copy(ByRef FromFactoid As Factoid)
myText = FromFactoid.Text
End Sub
Public Sub ReadFromFile(ByRef FromFile As Short)
Dim c, Cnt As Integer
' Read Item Text, Index
'UPGRADE_WARNING: Get was upgraded to FileGet and has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
FileGet(FromFile, Cnt)
myText = ""
For c = 1 To Cnt
myText = myText & " "
Next c
'UPGRADE_WARNING: Get was upgraded to FileGet and has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
FileGet(FromFile, myText)
'UPGRADE_WARNING: Get was upgraded to FileGet and has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
FileGet(FromFile, myIndex)
End Sub
Public Sub SaveToFile(ByRef ToFile As Short)
' Save Item Text, Index
'UPGRADE_WARNING: Put was upgraded to FilePut and has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
FilePut(ToFile, Len(myText))
'UPGRADE_WARNING: Put was upgraded to FilePut and has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
FilePut(ToFile, myText)
'UPGRADE_WARNING: Put was upgraded to FilePut and has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
FilePut(ToFile, myIndex)
End Sub
End Class