VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "Loliloader"
ClientHeight = 6315
ClientLeft = 1560
ClientTop = 1890
ClientWidth = 10335
BeginProperty Font
Name = "Tahoma"
Size = 9
Charset = 204
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
HasDC = 0 'False
KeyPreview = -1 'True
LinkTopic = "frmMain"
MaxButton = 0 'False
ScaleHeight = 6315
ScaleWidth = 10335
Begin VB.TextBox txtLog
BeginProperty Font
Name = "Courier New"
Size = 9
Charset = 204
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2715
Left = 3480
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 1
Top = 3480
Width = 6735
End
Begin VB.ListBox lstDownloads
Height = 2970
IntegralHeight = 0 'False
Left = 3480
TabIndex = 0
Top = 120
Width = 6735
End
Begin VB.Label lblStatus
BorderStyle = 1 'Fixed Single
Caption = " ... "
Height = 315
Left = 3480
TabIndex = 2
Top = 3120
Width = 6735
End
Begin VB.Image imgLolicon
BorderStyle = 1 'Fixed Single
Height = 6060
Left = 120
Stretch = -1 'True
Top = 120
Width = 3300
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'====================================================================
Private Sub Form_Load()
asCenterFormEx Me.hWnd
If Not asIsInIDE() Then asSetWindowResIconAll Me.hWnd, "A_MAIN"
LoadQueue
End Sub
Private Sub Form_Unload(Cancel As Integer)
SaveQueue
End Sub
'====================================================================
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = VK_F1 And Shift = vbShiftMask Then ajpMain.ShowAboutBox Me, App
If KeyCode = VK_ESCAPE And Shift = 0 Then Unload Me
End Sub
'====================================================================
Private Sub LoadQueue()
Dim List As BStr
Dim Lines() As BStr
Dim TMP As Long
On Error Resume Next
If Not asIsFileExist(ListFileName) Then Exit Sub
List = ajpFSO.GetFile(ListFileName, True)
If Err.Number <> 0 Then
ajpMain.ErrorDisplay Err, , , "Не удалось загрузить файл очереди."
Exit Sub
End If
If asTrimEx(List) = "" Then Exit Sub
Lines = Split(List, CRLF)
For TMP = LBound(Lines) To UBound(Lines)
Lines(TMP) = asTrimEx(Lines(TMP))
If Lines(TMP) <> "" Then Me.lstDownloads.AddItem Lines(TMP)
Next TMP
If Me.lstDownloads.ListCount > 0 Then Me.lstDownloads.ListIndex = 0
End Sub
Private Sub SaveQueue()
Dim List As BStr
Dim TMP As Long
For TMP = 0 To Me.lstDownloads.ListCount - 1
List = List & Me.lstDownloads.List(TMP) & CRLF
Next TMP
On Error Resume Next
ajpFSO.PutFile ListFileName, List, True
If Err.Number <> 0 Then
ajpMain.ErrorDisplay Err, , , "Не удалось сохранить файл очереди."
End If
End Sub
Метки: тест, vb6, loliloader


