home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / EXTRAS / WINWAIS / VB / SOURCES.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-09-10  |  9.7 KB  |  299 lines

  1. VERSION 2.00
  2. Begin Form sources_form 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "WAIS Sources"
  6.    ClientHeight    =   5925
  7.    ClientLeft      =   960
  8.    ClientTop       =   735
  9.    ClientWidth     =   7845
  10.    Height          =   6330
  11.    Left            =   900
  12.    LinkMode        =   1  'Source
  13.    LinkTopic       =   "Form2"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   5925
  17.    ScaleWidth      =   7845
  18.    Top             =   390
  19.    Width           =   7965
  20.    Begin SSPanel Panel3D2 
  21.       Align           =   1  'Align Top
  22.       Alignment       =   6  'Center - TOP
  23.       BackColor       =   &H00C0C0C0&
  24.       Caption         =   "Sources Available for Searching"
  25.       Font3D          =   0  'None
  26.       ForeColor       =   &H00000000&
  27.       Height          =   2940
  28.       Left            =   0
  29.       Outline         =   -1  'True
  30.       TabIndex        =   2
  31.       Top             =   2475
  32.       Width           =   7845
  33.       Begin CommandButton add_all 
  34.          Caption         =   "Add All"
  35.          Height          =   375
  36.          Left            =   6600
  37.          TabIndex        =   11
  38.          Top             =   1440
  39.          Width           =   1125
  40.       End
  41.       Begin SSPanel Panel3D15 
  42.          Alignment       =   6  'Center - TOP
  43.          BackColor       =   &H00C0C0C0&
  44.          BevelOuter      =   1  'Inset
  45.          Caption         =   "Panel3D7"
  46.          Font3D          =   1  'Raised w/light shading
  47.          ForeColor       =   &H00000000&
  48.          Height          =   405
  49.          Left            =   1410
  50.          Outline         =   -1  'True
  51.          TabIndex        =   8
  52.          Top             =   240
  53.          Width           =   5145
  54.          Begin ComboBox source_groups 
  55.             Height          =   300
  56.             Left            =   30
  57.             Style           =   2  'Dropdown List
  58.             TabIndex        =   9
  59.             Top             =   60
  60.             Width           =   5085
  61.          End
  62.       End
  63.       Begin SSPanel Panel3D14 
  64.          BackColor       =   &H00C0C0C0&
  65.          BevelOuter      =   1  'Inset
  66.          Caption         =   "Source Group"
  67.          Font3D          =   0  'None
  68.          ForeColor       =   &H00000000&
  69.          Height          =   405
  70.          Left            =   150
  71.          Outline         =   -1  'True
  72.          TabIndex        =   7
  73.          Top             =   240
  74.          Width           =   1275
  75.       End
  76.       Begin SSPanel Panel3D4 
  77.          Alignment       =   6  'Center - TOP
  78.          BackColor       =   &H00C0C0C0&
  79.          BevelOuter      =   1  'Inset
  80.          Caption         =   "Panel3D4"
  81.          Font3D          =   1  'Raised w/light shading
  82.          ForeColor       =   &H00000000&
  83.          Height          =   2085
  84.          Left            =   150
  85.          Outline         =   -1  'True
  86.          TabIndex        =   5
  87.          Top             =   690
  88.          Width           =   6405
  89.          Begin ListBox s_source_list 
  90.             BackColor       =   &H00FFFFFF&
  91.             DragIcon        =   SOURCES.FRX:0000
  92.             FontBold        =   0   'False
  93.             FontItalic      =   0   'False
  94.             FontName        =   "Terminal"
  95.             FontSize        =   9
  96.             FontStrikethru  =   0   'False
  97.             FontUnderline   =   0   'False
  98.             Height          =   2010
  99.             Left            =   30
  100.             TabIndex        =   6
  101.             Tag             =   "S_SRC"
  102.             Top             =   30
  103.             Width           =   6345
  104.          End
  105.       End
  106.    End
  107.    Begin SSPanel Panel3D1 
  108.       Align           =   1  'Align Top
  109.       Alignment       =   6  'Center - TOP
  110.       BackColor       =   &H00C0C0C0&
  111.       Caption         =   "Sources Included In Current Searches"
  112.       Font3D          =   0  'None
  113.       ForeColor       =   &H00000000&
  114.       Height          =   2475
  115.       Left            =   0
  116.       Outline         =   -1  'True
  117.       TabIndex        =   1
  118.       Top             =   0
  119.       Width           =   7845
  120.       Begin CommandButton remove_all 
  121.          Caption         =   "Remove All"
  122.          Height          =   375
  123.          Left            =   6600
  124.          TabIndex        =   10
  125.          Top             =   1050
  126.          Width           =   1125
  127.       End
  128.       Begin SSPanel Panel3D3 
  129.          Alignment       =   6  'Center - TOP
  130.          BackColor       =   &H00C0C0C0&
  131.          BevelOuter      =   1  'Inset
  132.          Caption         =   "Panel3D3"
  133.          Font3D          =   1  'Raised w/light shading
  134.          ForeColor       =   &H00000000&
  135.          Height          =   2085
  136.          Left            =   150
  137.          Outline         =   -1  'True
  138.          TabIndex        =   3
  139.          Top             =   270
  140.          Width           =   6375
  141.          Begin ListBox source_list 
  142.             BackColor       =   &H00FFFFFF&
  143.             DragIcon        =   SOURCES.FRX:0302
  144.             FontBold        =   0   'False
  145.             FontItalic      =   0   'False
  146.             FontName        =   "Terminal"
  147.             FontSize        =   9
  148.             FontStrikethru  =   0   'False
  149.             FontUnderline   =   0   'False
  150.             Height          =   2010
  151.             Left            =   30
  152.             TabIndex        =   4
  153.             Tag             =   "SRC"
  154.             Top             =   30
  155.             Width           =   6315
  156.          End
  157.       End
  158.    End
  159.    Begin CommandButton add_done 
  160.       Caption         =   "Done"
  161.       Height          =   375
  162.       Left            =   3390
  163.       TabIndex        =   0
  164.       Top             =   5490
  165.       Width           =   1095
  166.    End
  167. Sub add_all_Click ()
  168.     If s_source_list.ListCount = 0 Then
  169.       Exit Sub
  170.     End If
  171.     sv = s_source_listindex
  172.     For x = 0 To s_source_list.ListCount - 1
  173.       s_source_list.ListIndex = x
  174.       s_source_list_dblclick
  175.     Next x
  176.     s_source_list.ListIndex = sv
  177. End Sub
  178. Sub add_done_Click ()
  179.     sources_form.Hide
  180. End Sub
  181. Sub Form_Activate ()
  182.     load_group_list sources_form, READONLY
  183.     load_source_group
  184. End Sub
  185. Sub Form_DragDrop (source As Control, x As Single, Y As Single)
  186.     If source.Tag = "SRC" Then
  187.         source_list_dblclick
  188.     End If
  189. End Sub
  190. Sub Form_Paint ()
  191.     mousepointer = DEFAULT
  192. End Sub
  193. Sub Form_Unload (cancel As Integer)
  194.     sources_form.Hide
  195.     cancel = 1
  196. End Sub
  197. Sub remove_all_Click ()
  198.     source_list.Clear
  199. End Sub
  200. Sub s_source_list_dblclick ()
  201.     Dim x As Integer
  202.     Dim src As Integer
  203.     Dim ssrc As Integer
  204.     If s_source_list.ListIndex > -1 Then
  205.       src = sources_form.source_list.ListCount
  206.       ssrc = s_source_list.ListIndex
  207.       For x = 0 To src - 1
  208.         If src_port(x) = s_port(ssrc) And src_service(x) = s_service(ssrc) And src_database(x) = s_database(ssrc) Then
  209.           Exit Sub
  210.         End If
  211.       Next x
  212.       src_port(src) = s_port(ssrc)
  213.       src_service(src) = s_service(ssrc)
  214.       src_database(src) = s_database(ssrc)
  215.       sources_form.source_list.AddItem s_source_list.Text
  216.     End If
  217. End Sub
  218. Sub s_source_list_DragDrop (source As Control, x As Single, Y As Single)
  219.     If source.Tag = "SRC" Then
  220.         source_list_dblclick
  221.     End If
  222. End Sub
  223. Sub s_source_list_KeyPress (keyascii As Integer)
  224.     If keyascii = 13 Then
  225.         s_source_list_dblclick
  226.         keyascii = 0
  227.     End If
  228. End Sub
  229. Sub s_source_list_MouseDown (Button As Integer, Shift As Integer, x As Single, Y As Single)
  230.     If s_source_list.ListIndex > -1 Then
  231.         s_source_list.Drag 1
  232.     Else
  233.         s_source_list.Drag 0
  234.     End If
  235. End Sub
  236. Sub s_source_list_MouseUp (Button As Integer, Shift As Integer, x As Single, Y As Single)
  237.     s_source_list.Drag 0
  238. End Sub
  239. Sub source_groups_Click ()
  240.     switch_source_group
  241. End Sub
  242. Sub source_groups_KeyPress (keyascii As Integer)
  243.   If keyascii = 13 Then
  244.     switch_source_group
  245.     keyascii = 0
  246.   End If
  247. End Sub
  248. Sub source_groups_LostFocus ()
  249.     switch_source_group
  250. End Sub
  251. Sub source_list_dblclick ()
  252.     Dim x As Integer
  253.     If sources_form.source_list.ListIndex > -1 Then
  254.         
  255.         For x = sources_form.source_list.ListIndex To sources_form.source_list.ListCount
  256.             src_port(x) = src_port(x + 1)
  257.             src_service(x) = src_service(x + 1)
  258.             src_database(x) = src_database(x + 1)
  259.         Next x
  260.         
  261.         sources_form.source_list.RemoveItem sources_form.source_list.ListIndex
  262.     Else
  263.         MsgBox "You haven't selected a source to delete", MB_INFO
  264.     End If
  265. End Sub
  266. Sub source_list_DragDrop (source As Control, x As Single, Y As Single)
  267.     If source.Tag = "S_SRC" Then
  268.         s_source_list_dblclick
  269.     End If
  270. End Sub
  271. Sub source_list_KeyPress (keyascii As Integer)
  272.     If keyascii = 13 Then
  273.         source_list_dblclick
  274.         keyascii = 0
  275.     End If
  276. End Sub
  277. Sub source_list_MouseDown (Button As Integer, Shift As Integer, x As Single, Y As Single)
  278.     If source_list.ListIndex > -1 Then
  279.         source_list.Drag 1
  280.     Else
  281.         source_list.Drag 0
  282.     End If
  283. End Sub
  284. Sub source_list_MouseUp (Button As Integer, Shift As Integer, x As Single, Y As Single)
  285.     source_list.Drag 0
  286. End Sub
  287. Sub switch_source_group ()
  288.     If source_groups.Text = "" Then
  289.       MsgBox ("Please enter a NEW or EXISTING source group name")
  290.       Exit Sub
  291.     End If
  292.     If source_groups.Text <> current_group Then
  293.       save_source_group
  294.       current_group = UCase$(source_groups.Text)
  295.       sources_are_loaded = False
  296.       load_source_group
  297.     End If
  298. End Sub
  299.