home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form new_src_form
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Sources Editor"
- ClientHeight = 5475
- ClientLeft = 1230
- ClientTop = 1020
- ClientWidth = 7395
- Height = 5880
- Left = 1170
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5475
- ScaleWidth = 7395
- Top = 675
- Width = 7515
- Begin SSPanel Panel3D2
- Align = 1 'Align Top
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- Caption = "Source Selected for Editing"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 2490
- Left = 0
- Outline = -1 'True
- TabIndex = 5
- Top = 2445
- Width = 7395
- Begin SSPanel Panel3D13
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 435
- Left = 1050
- Outline = -1 'True
- TabIndex = 25
- Top = 690
- Width = 855
- Begin TextBox s_add_prefix
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Terminal"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Left = 60
- TabIndex = 6
- Top = 60
- Width = 735
- End
- End
- Begin SSPanel Panel3D14
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Source Group"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 435
- Left = 90
- Outline = -1 'True
- TabIndex = 24
- Top = 270
- Width = 975
- End
- Begin SSPanel Panel3D15
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 435
- Left = 1050
- Outline = -1 'True
- TabIndex = 22
- Top = 270
- Width = 6225
- Begin ComboBox source_groups
- Height = 300
- Left = 60
- TabIndex = 23
- Text = "source_groups"
- Top = 60
- Width = 6075
- End
- End
- Begin SSPanel Panel3D11
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Panel3D11"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 435
- Left = 1050
- Outline = -1 'True
- TabIndex = 18
- Top = 1920
- Width = 6225
- Begin TextBox s_add_database
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Terminal"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Left = 60
- TabIndex = 19
- Top = 60
- Width = 6105
- End
- End
- Begin SSPanel Panel3D10
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Panel3D10"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 405
- Left = 1050
- Outline = -1 'True
- TabIndex = 16
- Top = 1530
- Width = 6225
- Begin TextBox s_add_server
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Terminal"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 300
- Left = 60
- TabIndex = 17
- Top = 60
- Width = 6105
- End
- End
- Begin SSPanel Panel3D8
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 435
- Left = 1050
- Outline = -1 'True
- TabIndex = 13
- Top = 1110
- Width = 855
- Begin TextBox s_add_port
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Terminal"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Left = 60
- TabIndex = 14
- Top = 60
- Width = 735
- End
- End
- Begin SSPanel Panel3D7
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Panel3D7"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 435
- Left = 1890
- Outline = -1 'True
- TabIndex = 11
- Top = 690
- Width = 5385
- Begin TextBox s_add_title
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Terminal"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 315
- Left = 30
- TabIndex = 12
- Top = 60
- Width = 5295
- End
- End
- Begin SSPanel Panel3D6
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Database Name"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 435
- Left = 90
- Outline = -1 'True
- TabIndex = 10
- Top = 1920
- Width = 975
- End
- Begin SSPanel Panel3D5
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Server"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 405
- Left = 90
- Outline = -1 'True
- TabIndex = 9
- Top = 1530
- Width = 975
- Begin SSPanel Panel3D9
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Panel3D9"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 195
- Left = 1020
- Outline = -1 'True
- TabIndex = 15
- Top = 60
- Width = 5955
- End
- End
- Begin SSPanel Panel3D4
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Port"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 435
- Left = 90
- Outline = -1 'True
- TabIndex = 8
- Top = 1110
- Width = 975
- End
- Begin SSPanel Panel3D3
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Source Name"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 435
- Left = 90
- Outline = -1 'True
- TabIndex = 7
- Top = 690
- Width = 975
- End
- End
- Begin SSPanel Panel3D1
- Align = 1 'Align Top
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- Caption = "Available Sources"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 2445
- Left = 0
- Outline = -1 'True
- TabIndex = 4
- Top = 0
- Width = 7395
- Begin SSPanel Panel3D12
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 2085
- Left = 120
- Outline = -1 'True
- TabIndex = 20
- Top = 240
- Width = 7155
- Begin ListBox edit_source_list
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Terminal"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 2010
- Left = 30
- TabIndex = 21
- Top = 30
- Width = 7065
- End
- End
- End
- Begin CommandButton edit_done
- Caption = "Done"
- Height = 375
- Left = 5130
- TabIndex = 3
- Top = 5010
- Width = 975
- End
- Begin CommandButton del_source
- Caption = "Delete"
- Height = 375
- Left = 3810
- TabIndex = 2
- Top = 5010
- Width = 975
- End
- Begin CommandButton change_source
- Caption = "Change"
- Height = 375
- Left = 2460
- TabIndex = 1
- Top = 5010
- Width = 975
- End
- Begin CommandButton add_source
- Caption = "Add"
- Height = 375
- Left = 1200
- TabIndex = 0
- Top = 5010
- Width = 975
- End
- Sub add_source_Click ()
- Dim pfx As String * 4
- If Trim$(source_groups.Text) = "" Or Trim$(s_add_port) = "" Or Trim$(s_add_server) = "" Or Trim$(s_add_database) = "" Then
- MsgBox ("A source field entry is missing, please enter it")
- Exit Sub
- End If
- src = edit_source_list.ListCount
- s_port(src) = Val(s_add_port.Text)
- s_service(src) = s_add_server.Text
- s_database(src) = s_add_database.Text
- pfx = Trim$(s_add_prefix.Text)
- s_add_prefix.Text = pfx
- sources_form.s_source_list.AddItem pfx + " " + s_add_title.Text
- edit_source_list.AddItem pfx + " " + s_add_title.Text
- sources_have_changed = True
- End Sub
- Sub change_source_Click ()
- Dim pfx As String * 4
- If Trim$(source_groups.Text) = "" Or Trim$(s_add_port) = "" Or Trim$(s_add_server) = "" Or Trim$(s_add_database) = "" Then
- MsgBox ("A source field entry is missing, please enter it")
- Exit Sub
- End If
- src = edit_source_list.ListIndex
- If src = -1 Then
- Exit Sub
- End If
- pfx = Trim$(s_add_prefix.Text)
- If edit_source_list.List(src) <> pfx + " " + s_add_title.Text Then
- MsgBox "Sorry, the source title may not be changed, use Delete/Add", MB_INFO
- Exit Sub
- End If
- s_port(src) = Val(s_add_port.Text)
- s_service(src) = s_add_server.Text
- s_database(src) = s_add_database.Text
- sources_have_changed = True
- End Sub
- Sub del_source_Click ()
- If edit_source_list.ListIndex = -1 Then
- MsgBox "Please select a source to delete", MB_INFO
- Exit Sub
- End If
- If MsgBox(" Are you sure?", MB_WARN Or 1) = 1 Then
- For x = edit_source_list.ListIndex To edit_source_list.ListCount
- s_port(x) = s_port(x + 1)
- s_service(x) = s_service(x + 1)
- s_database(x) = s_database(x + 1)
- Next x
-
- sources_form.s_source_list.RemoveItem edit_source_list.ListIndex
- edit_source_list.RemoveItem edit_source_list.ListIndex
- End If
- sources_have_changed = True
- End Sub
- Sub edit_done_Click ()
- new_src_form.Hide
- End Sub
- Sub edit_source_list_Click ()
- src = edit_source_list.ListIndex
- s_add_prefix.Text = Left$(edit_source_list.Text, 4)
- s_add_title.Text = Right$(edit_source_list.Text, Len(edit_source_list.Text) - 5)
- port$ = Str$(s_port(src))
- s_add_port.Text = Right$(port$, Len(port$) - 1)
- s_add_server.Text = s_service(src)
- s_add_database.Text = s_database(src)
- End Sub
- Sub Form_Load ()
- load_group_list new_src_form, READWRITE
- For x = 0 To sources_form.s_source_list.ListCount - 1
- edit_source_list.AddItem sources_form.s_source_list.List(x)
- Next x
- End Sub
- Sub source_groups_Click ()
- switch_source_group
- End Sub
- Sub source_groups_KeyPress (keyascii As Integer)
- If keyascii = 13 Then
- switch_source_group
- keyascii = 0
- End If
- End Sub
- Sub source_groups_LostFocus ()
- switch_source_group
- End Sub
- Sub switch_source_group ()
- If source_groups.Text = "" Then
- MsgBox ("Please enter a NEW or EXISTING source group name")
- Exit Sub
- End If
- If source_groups.Text <> current_group Then
- save_source_group
- current_group = UCase$(source_groups.Text)
- sources_are_loaded = False
- load_source_group
- src = sources_form.s_source_list.ListCount - 1
- edit_source_list.Clear
- For x = 0 To src
- edit_source_list.AddItem sources_form.s_source_list.List(x)
- Next x
- End If
- End Sub
-