home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / jpi / propedit.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-01-12  |  4.0 KB  |  163 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   8235
  5.    ClientLeft      =   5295
  6.    ClientTop       =   1965
  7.    ClientWidth     =   6585
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   8235
  10.    ScaleWidth      =   6585
  11.    Begin VB.CommandButton Command3 
  12.       Caption         =   "Delete"
  13.       Height          =   255
  14.       Left            =   120
  15.       TabIndex        =   5
  16.       Top             =   3720
  17.       Width           =   855
  18.    End
  19.    Begin VB.ListBox List1 
  20.       Height          =   2790
  21.       Left            =   120
  22.       TabIndex        =   4
  23.       Top             =   840
  24.       Width           =   2295
  25.    End
  26.    Begin VB.CommandButton Command2 
  27.       Caption         =   "Add"
  28.       Height          =   255
  29.       Left            =   2520
  30.       TabIndex        =   3
  31.       Top             =   480
  32.       Width           =   855
  33.    End
  34.    Begin VB.TextBox Text2 
  35.       Height          =   285
  36.       Left            =   120
  37.       TabIndex        =   2
  38.       Text            =   "Attribute"
  39.       Top             =   480
  40.       Width           =   2295
  41.    End
  42.    Begin VB.CommandButton Command1 
  43.       Caption         =   "Add"
  44.       Height          =   255
  45.       Left            =   2520
  46.       TabIndex        =   1
  47.       Top             =   120
  48.       Width           =   855
  49.    End
  50.    Begin VB.TextBox Text1 
  51.       Height          =   285
  52.       Left            =   120
  53.       TabIndex        =   0
  54.       Text            =   "Ability"
  55.       Top             =   120
  56.       Width           =   2295
  57.    End
  58. Attribute VB_Name = "Form1"
  59. Attribute VB_GlobalNameSpace = False
  60. Attribute VB_Creatable = False
  61. Attribute VB_PredeclaredId = True
  62. Attribute VB_Exposed = False
  63. Private Sub Command1_Click()
  64. Open "Units.Dat" For Input As #1
  65. Open "TmpUnits.Dat" For Output As #2
  66.     Line Input #1, a$
  67.     If Left$(a$, 6) <> "ATTRIB" Then
  68.       Print #2, a$
  69.     Else
  70.       Exit Do
  71.     End If
  72.   Loop
  73.   Print #2, "ABILITY_" & UCase$(Text1.Text)
  74.   Print #2, a$
  75.     Line Input #1, a$
  76.     If a$ <> "[OBJECTDEFEND]" Then
  77.       Print #2, a$
  78.     Else
  79.       Print #2, a$
  80.       Exit Do
  81.     End If
  82.   Loop
  83.   Line Input #1, a$
  84.   Print #2, a$
  85.   If a$ = "[ENDOFFILE]" Then
  86.     Exit Do
  87.   End If
  88. Close
  89. End Sub
  90. Private Sub Command2_Click()
  91. Open "Units.Dat" For Input As #1
  92. Open "TmpUnits.Dat" For Output As #2
  93.     Line Input #1, a$
  94.     If a$ <> "[OBJECTDEFEND]" Then
  95.       Print #2, a$
  96.     Else
  97.       Exit Do
  98.     End If
  99.   Loop
  100.   Print #2, "ATTRIBUTE_" & UCase$(Text2.Text)
  101.   Print #2, a$
  102.   Line Input #1, a$
  103.   Print #2, a$
  104.   If a$ = "[ENDOFFILE]" Then
  105.     Exit Do
  106.   End If
  107. Close
  108. End Sub
  109. Private Sub Command3_Click()
  110. Open "ObjectFormat.Dat" For Input As #1
  111. Open "TmpFormat.Dat" For Output As #2
  112.   Line Input #1, a$
  113.   If a$ = "[ENDOFFILE]" Then Exit Do
  114.   If a$ = "[OBJTAGDEF]" Then
  115.     Line Input #1, a$
  116.     If a$ <> List1.List(List1.ListIndex) Then
  117.       Print #2, "[OBJTAGDEF]"
  118.       Print #2, a$
  119.       Do
  120.         Line Input #1, a$
  121.         If a$ <> "[ENDOBJDEF]" Then
  122.           Print #2, a$
  123.         Else
  124.           Print #2, a$
  125.           Exit Do
  126.         End If
  127.       Loop
  128.     Else
  129.       Do
  130.         Line Input #1, a$
  131.         If a$ = "[ENDOBJDEF]" Then
  132.           Exit Do
  133.         End If
  134.       Loop
  135.     End If
  136.   Else
  137.     Print #2, a$
  138.   End If
  139. Print #2, "[ENDOFFILE]"
  140. Close
  141. Open "Units.Dat" For Input As #1
  142. Open "TmpUnits.Dat" For Output As #2
  143.     Line Input #1, a$
  144.     If a$ = "[ENDOFFILE]" Then Exit Do
  145.     If Left$(a$, Len(List1.List(List1.ListIndex))) <> List1.List(List1.ListIndex) Then
  146.       Print #2, a$
  147.     End If
  148.   Loop
  149.   Print #2, "[ENDOFFILE]"
  150. Close
  151. End Sub
  152. Private Sub Form_Load()
  153. Open "ObjectFormat.Dat" For Input As #1
  154.   Line Input #1, a$
  155.   If a$ = "[OBJTAGDEF]" Then
  156.     Line Input #1, a$
  157.     List1.AddItem a$
  158.   ElseIf a$ = "[ENDOFFILE]" Then
  159.     Exit Do
  160.   End If
  161. Close
  162. End Sub
  163.