VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "内网影片站点生成"
   ClientHeight    =   10455
   ClientLeft      =   45
   ClientTop       =   675
   ClientWidth     =   18510
   BeginProperty Font 
      Name            =   "微软雅黑"
      Size            =   10.5
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   10455
   ScaleWidth      =   18510
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text15 
      Height          =   1575
      Left            =   600
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   34
      Text            =   "Form1.frx":628A
      Top             =   6000
      Visible         =   0   'False
      Width           =   3495
   End
   Begin VB.TextBox Text14 
      Height          =   2295
      Left            =   720
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   33
      Text            =   "Form1.frx":64C8
      Top             =   720
      Visible         =   0   'False
      Width           =   3495
   End
   Begin VB.TextBox Text10 
      Height          =   1575
      Left            =   15000
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   27
      Top             =   4800
      Visible         =   0   'False
      Width           =   3135
   End
   Begin VB.Frame Frame2 
      Caption         =   "消息"
      Height          =   10215
      Left            =   17520
      TabIndex        =   21
      Top             =   9600
      Visible         =   0   'False
      Width           =   18255
      Begin VB.CommandButton Command9 
         Caption         =   "打开影片站点链接"
         Height          =   495
         Left            =   120
         TabIndex        =   28
         Top             =   9600
         Width           =   2655
      End
      Begin VB.CommandButton Command7 
         Caption         =   "关闭"
         Height          =   495
         Left            =   15240
         TabIndex        =   23
         Top             =   9600
         Width           =   2775
      End
      Begin MSComctlLib.ListView ListView3 
         Height          =   9135
         Left            =   120
         TabIndex        =   22
         Top             =   360
         Width           =   17895
         _ExtentX        =   31565
         _ExtentY        =   16113
         LabelWrap       =   -1  'True
         HideSelection   =   -1  'True
         _Version        =   393217
         Icons           =   "ImageList1"
         SmallIcons      =   "ImageList1"
         ColHdrIcons     =   "ImageList1"
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         NumItems        =   0
      End
   End
   Begin VB.CommandButton Command6 
      Caption         =   "更新本集内容"
      Height          =   495
      Left            =   13180
      TabIndex        =   20
      Top             =   9840
      Width           =   2655
   End
   Begin VB.TextBox Text3 
      Height          =   420
      Left            =   6120
      TabIndex        =   14
      Text            =   "Text3"
      Top             =   9960
      Visible         =   0   'False
      Width           =   4095
   End
   Begin VB.CommandButton Command4 
      Caption         =   "生成整站内容"
      Height          =   495
      Left            =   15840
      TabIndex        =   9
      Top             =   9840
      Width           =   2535
   End
   Begin VB.Frame Frame1 
      Caption         =   "内容"
      Height          =   9615
      Left            =   4560
      TabIndex        =   3
      Top             =   120
      Width           =   13815
      Begin VB.TextBox Text13 
         Height          =   1575
         Left            =   0
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   32
         Text            =   "Form1.frx":6772
         Top             =   6240
         Visible         =   0   'False
         Width           =   3495
      End
      Begin VB.TextBox Text12 
         Height          =   2055
         Left            =   -240
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   31
         Text            =   "Form1.frx":6A3D
         Top             =   2400
         Visible         =   0   'False
         Width           =   3735
      End
      Begin VB.CommandButton Command11 
         Caption         =   "查找封面 - 站点2"
         Height          =   495
         Left            =   240
         TabIndex        =   30
         Top             =   5310
         Width           =   2775
      End
      Begin VB.CommandButton Command10 
         Caption         =   "查找封面 - 站点1"
         Height          =   495
         Left            =   240
         TabIndex        =   29
         Top             =   4810
         Width           =   2775
      End
      Begin VB.TextBox Text11 
         Height          =   2295
         Left            =   10440
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   26
         Top             =   2400
         Visible         =   0   'False
         Width           =   3135
      End
      Begin VB.TextBox Text9 
         Height          =   1575
         Left            =   10440
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   25
         Top             =   6240
         Visible         =   0   'False
         Width           =   3135
      End
      Begin VB.TextBox Text8 
         Height          =   1575
         Left            =   7200
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   19
         Text            =   "Form1.frx":6C67
         Top             =   6240
         Visible         =   0   'False
         Width           =   3135
      End
      Begin VB.TextBox Text7 
         Height          =   1575
         Left            =   7200
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   18
         Text            =   "Form1.frx":6D0D
         Top             =   4680
         Visible         =   0   'False
         Width           =   3135
      End
      Begin VB.TextBox Text6 
         Height          =   2295
         Left            =   7200
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   17
         Text            =   "Form1.frx":6D5D
         Top             =   2400
         Visible         =   0   'False
         Width           =   3135
      End
      Begin VB.TextBox Text5 
         Height          =   1575
         Left            =   3600
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   16
         Text            =   "Form1.frx":78D8
         Top             =   6240
         Visible         =   0   'False
         Width           =   3495
      End
      Begin VB.TextBox Text4 
         Height          =   1575
         Left            =   3600
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   15
         Text            =   "Form1.frx":7B16
         Top             =   4680
         Visible         =   0   'False
         Width           =   3495
      End
      Begin VB.TextBox Text2 
         Height          =   2295
         Left            =   3600
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   13
         Text            =   "Form1.frx":7B35
         Top             =   2400
         Visible         =   0   'False
         Width           =   3495
      End
      Begin VB.FileListBox File1 
         Height          =   3090
         Left            =   6360
         TabIndex        =   11
         Top             =   1440
         Visible         =   0   'False
         Width           =   3255
      End
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   840
         Top             =   6480
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   30
         ImageHeight     =   28
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   7
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Form1.frx":7DDF
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Form1.frx":B074
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Form1.frx":E138
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Form1.frx":1121B
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Form1.frx":1425A
               Key             =   ""
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Form1.frx":17146
               Key             =   ""
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Form1.frx":1A18D
               Key             =   ""
            EndProperty
         EndProperty
      End
      Begin MSComDlg.CommonDialog CommonDialog1 
         Left            =   480
         Top             =   6480
         _ExtentX        =   847
         _ExtentY        =   847
         _Version        =   393216
      End
      Begin VB.CommandButton Command5 
         Caption         =   "选取封面"
         Height          =   495
         Left            =   240
         TabIndex        =   10
         Top             =   4320
         Width           =   2775
      End
      Begin MSComctlLib.ListView ListView2 
         Height          =   8655
         Left            =   3240
         TabIndex        =   8
         Top             =   840
         Width           =   10455
         _ExtentX        =   18441
         _ExtentY        =   15266
         LabelWrap       =   -1  'True
         HideSelection   =   -1  'True
         _Version        =   393217
         Icons           =   "ImageList1"
         SmallIcons      =   "ImageList1"
         ColHdrIcons     =   "ImageList1"
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         NumItems        =   0
      End
      Begin VB.CommandButton Command3 
         Caption         =   "选择"
         Height          =   375
         Left            =   12720
         TabIndex        =   7
         Top             =   360
         Width           =   975
      End
      Begin VB.TextBox Text1 
         Height          =   420
         Left            =   4080
         Locked          =   -1  'True
         TabIndex        =   6
         Top             =   360
         Width           =   8415
      End
      Begin VB.PictureBox Picture1 
         Height          =   3810
         Left            =   240
         Picture         =   "Form1.frx":1D0ED
         ScaleHeight     =   3750
         ScaleWidth      =   2775
         TabIndex        =   4
         Top             =   360
         Width           =   2835
      End
      Begin VB.PictureBox Picture2 
         AutoSize        =   -1  'True
         Height          =   3810
         Left            =   3720
         Picture         =   "Form1.frx":23A36
         ScaleHeight     =   3750
         ScaleWidth      =   2775
         TabIndex        =   12
         Top             =   5520
         Visible         =   0   'False
         Width           =   2835
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "文件："
         Height          =   300
         Left            =   3240
         TabIndex        =   5
         Top             =   360
         Width           =   630
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "删除"
      Height          =   495
      Left            =   2295
      TabIndex        =   2
      Top             =   9840
      Width           =   2160
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添加"
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Top             =   9840
      Width           =   2160
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   9615
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   4335
      _ExtentX        =   7646
      _ExtentY        =   16960
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      _Version        =   393217
      Icons           =   "ImageList1"
      SmallIcons      =   "ImageList1"
      ColHdrIcons     =   "ImageList1"
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin VB.CommandButton Command8 
      Caption         =   "打开影片站点链接"
      Height          =   495
      Left            =   4560
      TabIndex        =   24
      Top             =   9840
      Width           =   2655
   End
   Begin VB.Menu M 
      Caption         =   "菜单"
      Begin VB.Menu M1 
         Caption         =   "设置"
      End
      Begin VB.Menu M2 
         Caption         =   "编辑页面源码"
      End
      Begin VB.Menu M3 
         Caption         =   "打开影片文件夹"
      End
      Begin VB.Menu M4 
         Caption         =   "打开站点文件夹"
      End
      Begin VB.Menu M5 
         Caption         =   "清空缓存文件"
      End
      Begin VB.Menu M6 
         Caption         =   "清空日志"
      End
   End
   Begin VB.Menu MB 
      Caption         =   "菜单2"
      Visible         =   0   'False
      Begin VB.Menu MB5 
         Caption         =   "新建"
      End
      Begin VB.Menu MB6 
         Caption         =   "删除"
      End
      Begin VB.Menu MB3 
         Caption         =   "移动到第一项"
      End
      Begin VB.Menu MB1 
         Caption         =   "上移"
      End
      Begin VB.Menu MB2 
         Caption         =   "下移"
      End
      Begin VB.Menu MB4 
         Caption         =   "移动到最后项"
      End
      Begin VB.Menu MB7 
         Caption         =   "打开文件路径"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Type BrowseInfo
    hWndOwner As Long
    pIDLRoot As Long
    pszDisplayName As Long
    lpszTitle As Long
   ulFlags As Long
    lpfnCallback As Long
    lParam As Long
    iImage As Long
End Type
Const BIF_RETURNONLYFSDIRS = 1
Const BIF_NEWDIALOGSTYLE = &H40
Const BIF_EDITBOX = &H10
Const BIF_USENEWUI = BIF_NEWDIALOGSTYLE Or BIF_EDITBOX
Const MAX_PATH = 260
Private Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long
Dim Linecontent As Long

Public Function BrowseForFolder(Optional sTitle As String = "请选择文件夹") As String
    Dim iNull As Integer, lpIDList As Long, lResult As Long
    Dim sPath As String, udtBI As BrowseInfo
    With udtBI
        .hWndOwner = 0 ' Me.hWnd
        .lpszTitle = lstrcat(sTitle, "")
        .ulFlags = BIF_RETURNONLYFSDIRS Or BIF_USENEWUI
    End With
    lpIDList = SHBrowseForFolder(udtBI)
    If lpIDList Then
       sPath = String$(MAX_PATH, 0)
        SHGetPathFromIDList lpIDList, sPath
        CoTaskMemFree lpIDList
       iNull = InStr(sPath, vbNullChar)
        If iNull Then
          sPath = left$(sPath, iNull - 1)
        End If
    End If
    BrowseForFolder = sPath
End Function

Private Sub Command1_Click()
Form2.Show 1
End Sub

Private Sub Command10_Click()
If ListView1.ListItems.Count > 0 Then
    If ListView1.SelectedItem.Index > 0 Then
    If Frame1.Caption <> "内容" Then
        Form5.Show 1
    Else
    MsgBox "请先选择要操作的项目!", vbCritical + vbOKOnly, "提示"
    End If
    End If
End If
End Sub

Private Sub Command11_Click()
If ListView1.ListItems.Count > 0 Then
    If ListView1.SelectedItem.Index > 0 Then
    If Frame1.Caption <> "内容" Then
        Form6.Show 1
    Else
    MsgBox "请先选择要操作的项目!", vbCritical + vbOKOnly, "提示"
    End If
    End If
End If
End Sub

Private Sub Command2_Click()
If ListView1.ListItems.Count > 0 Then
    If ListView1.SelectedItem.Index > 0 Then
        If MsgBox("要删除选中的项目吗?" & vbCrLf & ListView1.SelectedItem.text, vbQuestion + vbYesNo, "提示") = vbYes Then
            If Dir(App.Path & "\Web\Data\" & ListView1.SelectedItem.text & ".html") <> "" Then
            Kill App.Path & "\Web\Data\" & ListView1.SelectedItem.text & ".html"
            End If
            If Dir(App.Path & "\Web\Image\" & ListView1.SelectedItem.text & ".jpg") <> "" Then
            Kill App.Path & "\Web\Image\" & ListView1.SelectedItem.text & ".jpg"
            End If
            Frame1.Caption = "内容"
            Picture1.Picture = Picture2.Picture
            ListView2.ListItems.Clear
            ListView1.ListItems.Remove ListView1.SelectedItem.Index
            Call Baocun
            MsgBox "删除成功!", vbInformation + vbOKOnly, "提示"
        End If
    End If
End If
End Sub

Private Sub Command3_Click()
If ListView1.ListItems.Count > 0 Then
    If ListView1.SelectedItem.Index > 0 Then
    If Frame1.Caption <> "内容" Then
        Form3.Show 1
    Else
    MsgBox "请先选择要操作的项目!", vbCritical + vbOKOnly, "提示"
    End If
    End If
End If
End Sub

Private Sub Command4_Click()
Dim objFSO_f As New Scripting.FileSystemObject
Dim Nr, NrD, CTitle, CNumber As String
Dim MNr, DefaultMovie, ButtonList, FunctionList, SerialNumber, MovieName, MovieName2 As String
Dim MovieFile, MovieFile2 As String
Dim Cs As Long
Nr = ""
Cs = 0
Call UpdateStyle
If Dir(App.Path & "\Setting\" & "Setting.ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & "Setting.ini"
Text3.text = GetFromINI("Setting", "MovieFile", iniPath)
End If
MovieFile2 = Text3.text

If ListView1.ListItems.Count > 0 Then
Frame2.Visible = True
Frame2.top = 120
Frame2.left = 120
Command7.Enabled = False
ListView3.ListItems.Clear
ListView3.ListItems.Add , , "读取页面格式文件...", 6, 6 '-------------------------处理消息
ListView3.ListItems.Add , , "清空缓存数据...", 4, 4 '-------------------------处理消息
If Dir(App.Path & "\Web\index.html") <> "" Then
Kill App.Path & "\Web\index.html"
End If
File1.Path = App.Path & "\Web\Data"
File1.Refresh
For j = 0 To File1.ListCount - 1
Kill App.Path & "\Web\Data\" & File1.List(j)
Next

For i = 1 To ListView1.ListItems.Count
DefaultMovie = ""
ButtonList = ""
FunctionList = ""
SerialNumber = ""
MovieName = ""
MovieName2 = ""
ListView3.ListItems.Add , , "读取" & ListView1.ListItems(i).text & "文件路径...", 4, 4 '-------------------------处理消息
If Dir(App.Path & "\Setting\" & ListView1.ListItems(i).text & ".ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & ListView1.ListItems(i).text & ".ini"
Text3.text = GetFromINI("Setting", "File", iniPath)
End If
MovieFile = Text3.text
MovieFile = Replace(MovieFile, MovieFile2, "")
MovieFile = Replace(MovieFile, "\", "/")
ListView3.ListItems.Add , , "文件路径:" & MovieFile & "...", 6, 6 '-------------------------处理消息


ListView3.ListItems.Add , , "处理封面图片...", 4, 4 '-------------------------处理消息
NrD = ""
CTitle = ListView1.ListItems(i).text
If Dir(App.Path & "\Web\Image\" & ListView1.ListItems(i).text & ".jpg") = "" Then
SavePicture Picture2.Picture, App.Path & "\Web\Image\" & ListView1.ListItems(i).text & ".jpg"
End If


If Dir(App.Path & "\Setting\" & ListView1.ListItems(i).text & ".ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & ListView1.ListItems(i).text & ".ini"
Text3.text = GetFromINI("Setting", "File", iniPath)
End If

ListView3.ListItems.Add , , "处理剧集数据...", 4, 4 '-------------------------处理消息
If Text3.text <> "" Then
    If Dir(Text3.text, vbDirectory) <> "" Then
        File1.Path = Text3.text
        File1.Refresh
        If File1.ListCount > 0 Then
        DefaultMovie = File1.List(0)
        End If
        ListView3.ListItems.Add , , "正在生成" & File1.List(i) & "...", 5, 5 '-------------------------处理消息
        For j = 0 To File1.ListCount - 1
        MovieName = Replace(Text8.text, "[[MovieFile]]", MovieFile)
        MovieName = Replace(MovieName, "[[MovieName]]", File1.List(j))
        MovieName = Replace(MovieName, "[[Title]]", CTitle)
        MovieName = Replace(MovieName, "[[MovieName2]]", Mid(File1.List(j), 1, InStrRev(File1.List(j), ".") - 1))
        MovieName = Replace(MovieName, "[[SerialNumber]]", j + 1)
            If FunctionList = "" Then
                FunctionList = MovieName
            Else
                FunctionList = FunctionList & vbCrLf & MovieName
            End If
            
        MovieName = Replace(Text10.text, "[[SerialNumber]]", j + 1)
        MovieName = Replace(MovieName, "[[MovieName2]]", Mid(File1.List(j), 1, InStrRev(File1.List(j), ".") - 1))
            If ButtonList = "" Then
                ButtonList = MovieName
            Else
                ButtonList = ButtonList & vbCrLf & MovieName
            End If
        Next
        CNumber = File1.ListCount
    End If
End If


NrD = Replace(Text2.text, "[[Title]]", CTitle)
NrD = Replace(NrD, "[[Number]]", CNumber)
Cs = Cs + 1
If Cs = Linecontent Then
NrD = NrD & vbCrLf & Text4.text
Cs = 0
End If

ListView3.ListItems.Add , , "主页内容处理...", 4, 4 '-------------------------处理消息
If Nr = "" Then
Nr = NrD
Else
Nr = Nr & vbCrLf & NrD
End If

MNr = Replace(Text11.text, "[[Title]]", CTitle)
MNr = Replace(MNr, "[[MovieFile]]", MovieFile)
MNr = Replace(MNr, "[[DefaultMovie]]", DefaultMovie)
MNr = Replace(MNr, "[[ButtonList]]", ButtonList)
MNr = Replace(MNr, "[[FunctionList]]", FunctionList)

ListView3.ListItems.Add , , "影片" & CTitle & "播放页面内容生成...", 4, 4 '-------------------------处理消息
Open App.Path & "\Web\Data\" & CTitle & ".html" For Output As #1
Print #1, MNr
Close #1


Next
Nr = Replace(Text5.text, "[[Text]]", Nr)
ListView3.ListItems.Add , , "主页面内容生成...", 4, 4 '-------------------------处理消息
Open App.Path & "\Web\index.html" For Output As #1
Print #1, Nr
Close #1


'自动更新主站内容
If Dir(App.Path & "\Setting\" & "Setting.ini") <> "" Then
ListView3.ListItems.Add , , "更新站点内容...", 4, 4 '-------------------------处理消息
    iniPath$ = App.Path & "\Setting\" & "Setting.ini"
    Text3.text = GetFromINI("Setting", "WebUpdate", iniPath)
    If Text3.text = "True" Then
        Text3.text = GetFromINI("Setting", "WebFile", iniPath)
        If objFSO_f.FolderExists(Text3.text) = False Then
        ListView3.ListItems.Add , , "站点路径连接失败...无法更新", 3, 3 '-------------------------处理消息
        Else
        ListView3.ListItems.Add , , "站点连接成功...开始更新", 6, 6 '-------------------------处理消息
        If Dir(Text3.text & "\index.html") <> "" Then
        Kill Text3.text & "\index.html"
        End If
        FileCopy App.Path & "\Web\index.html", Text3.text & "\index.html"
        ListView3.ListItems.Add , , "主页更新完成", 4, 4 '-------------------------处理消息
        If objFSO_f.FolderExists(Text3.text & "\Data") = False Then
        MkDir (Text3.text & "\Data")
        End If
        If objFSO_f.FolderExists(Text3.text & "\Image") = False Then
        MkDir (Text3.text & "\Image")
        End If
        ListView3.ListItems.Add , , "清空播放页内容", 4, 4 '-------------------------处理消息
        File1.Path = Text3.text & "\Data"
        File1.Refresh
        For i = 0 To File1.ListCount - 1
        Kill Text3.text & "\Data" & "\" & File1.List(i)
        Next
        ListView3.ListItems.Add , , "清空封面图片内容", 4, 4 '-------------------------处理消息
        File1.Path = Text3.text & "\Image"
        File1.Refresh
        For i = 0 To File1.ListCount - 1
        Kill Text3.text & "\Image" & "\" & File1.List(i)
        Next
        ListView3.ListItems.Add , , "播放页内容更新", 4, 4 '-------------------------处理消息
        File1.Path = App.Path & "\Web\Data"
        File1.Refresh
        For i = 0 To File1.ListCount - 1
        FileCopy App.Path & "\Web\Data\" & File1.List(i), Text3.text & "\Data\" & File1.List(i)
        Next
        ListView3.ListItems.Add , , "封面内容更新", 4, 4 '-------------------------处理消息
        File1.Path = App.Path & "\Web\Image"
        File1.Refresh
        For i = 0 To File1.ListCount - 1
        FileCopy App.Path & "\Web\Image\" & File1.List(i), Text3.text & "\Image\" & File1.List(i)
        Next
        ListView3.ListItems.Add , , "站点内容更新完成", 2, 2 '-------------------------处理消息
        End If
    End If
End If

ListView3.ListItems.Add , , "生成网站成功...", 2, 2 '-------------------------处理消息
ListView3.ListItems(ListView3.ListItems.Count).Selected = True
ListView3.SelectedItem.EnsureVisible
Nr = ""
For i = 1 To ListView3.ListItems.Count
If Nr = "" Then
Nr = ListView3.ListItems(i).text
Else
Nr = Nr & vbCrLf & ListView3.ListItems(i).text
End If
Next
Open App.Path & "\Log\" & Format(Date, "yyyymmdd") & Format(Now, "HHMMss") & ".log" For Output As #1
Print #1, Nr
Close #1
MsgBox "生成网站成功!", vbInformation + vbOKOnly, "提示"
Command7.Enabled = True

Else
MsgBox "没有内容!", vbCritical + vbOKOnly, "提示"
End If

End Sub

Private Sub Command5_Click()
Dim Nr As String
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
    
If ListView1.ListItems.Count > 0 Then
    If ListView1.SelectedItem.Index > 0 Then
    If Frame1.Caption <> "内容" Then
    CommonDialog1.Filter = "图片文件(*.jpg)|*.jpg"
    CommonDialog1.ShowOpen
    Nr = CommonDialog1.fileName
    If Nr <> "" Then
    Picture1.Picture = LoadPicture(CommonDialog1.fileName)
    If Dir(App.Path & "\Web\Image\" & ListView1.SelectedItem.text & ".jpg") <> "" Then
    Kill App.Path & "\Web\Image\" & ListView1.SelectedItem.text & ".jpg"
    End If
    FileCopy CommonDialog1.fileName, App.Path & "\Web\Image\" & ListView1.SelectedItem.text & ".jpg"
    End If
    Else
    MsgBox "请先选择要操作的项目!", vbCritical + vbOKOnly, "提示"
    End If
    End If
End If
ErrHandler:
    Exit Sub
End Sub

Private Sub Command6_Click()
'更新本集内容
Dim objFSO_f As New Scripting.FileSystemObject
Dim Nr, NrD, CTitle, CNumber As String
Dim MNr, DefaultMovie, ButtonList, FunctionList, SerialNumber, MovieName, MovieName2 As String
Dim MovieFile, MovieFile2 As String
Dim Cs As Long
Nr = ""
Cs = 0
Call UpdateStyle
If Dir(App.Path & "\Setting\" & "Setting.ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & "Setting.ini"
Text3.text = GetFromINI("Setting", "MovieFile", iniPath)
End If
MovieFile2 = Text3.text


If ListView1.ListItems.Count > 0 Then
If ListView1.SelectedItem.Index > 0 Then
ListView3.ListItems.Add , , "读取页面格式文件...", 6, 6 '-------------------------处理消息
ListView3.ListItems.Add , , "清理缓存数据...", 4, 4 '-------------------------处理消息
If Dir(App.Path & "\Web\Data\" & ListView1.SelectedItem.text & ".html") <> "" Then
Kill App.Path & "\Web\Data\" & ListView1.SelectedItem.text & ".html"
End If


For i = 1 To ListView1.ListItems.Count
DefaultMovie = ""
ButtonList = ""
FunctionList = ""
SerialNumber = ""
MovieName = ""
MovieName2 = ""
ListView3.ListItems.Add , , "读取" & ListView1.ListItems(i).text & "文件路径...", 4, 4 '-------------------------处理消息
If Dir(App.Path & "\Setting\" & ListView1.ListItems(i).text & ".ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & ListView1.ListItems(i).text & ".ini"
Text3.text = GetFromINI("Setting", "File", iniPath)
End If
MovieFile = Text3.text
MovieFile = Replace(MovieFile, MovieFile2, "")
MovieFile = Replace(MovieFile, "\", "/")

ListView3.ListItems.Add , , "文件路径:" & MovieFile & "...", 6, 6 '-------------------------处理消息


ListView3.ListItems.Add , , "处理封面图片...", 4, 4 '-------------------------处理消息

NrD = ""
CTitle = ListView1.ListItems(i).text
If Dir(App.Path & "\Web\Image\" & ListView1.ListItems(i).text & ".jpg") = "" Then
SavePicture Picture2.Picture, App.Path & "\Web\Image\" & ListView1.ListItems(i).text & ".jpg"
End If

If Dir(App.Path & "\Setting\" & ListView1.ListItems(i).text & ".ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & ListView1.ListItems(i).text & ".ini"
Text3.text = GetFromINI("Setting", "File", iniPath)
End If

ListView3.ListItems.Add , , "处理剧集数据...", 4, 4 '-------------------------处理消息
If Text3.text <> "" Then
    If Dir(Text3.text, vbDirectory) <> "" Then
        File1.Path = Text3.text
        File1.Refresh
        If File1.ListCount > 0 Then
        DefaultMovie = File1.List(0)
        End If
        For j = 0 To File1.ListCount - 1
        MovieName = Replace(Text8.text, "[[MovieFile]]", MovieFile)
        MovieName = Replace(MovieName, "[[MovieName]]", File1.List(j))
        MovieName = Replace(MovieName, "[[Title]]", CTitle)
        MovieName = Replace(MovieName, "[[MovieName2]]", Mid(File1.List(j), 1, InStrRev(File1.List(j), ".") - 1))
        MovieName = Replace(MovieName, "[[SerialNumber]]", j + 1)
            If FunctionList = "" Then
                FunctionList = MovieName
            Else
                FunctionList = FunctionList & vbCrLf & MovieName
            End If
            
        MovieName = Replace(Text10.text, "[[SerialNumber]]", j + 1)
        MovieName = Replace(MovieName, "[[MovieName2]]", Mid(File1.List(j), 1, InStrRev(File1.List(j), ".") - 1))
            If ButtonList = "" Then
                ButtonList = MovieName
            Else
                ButtonList = ButtonList & vbCrLf & MovieName
            End If
        Next
        CNumber = File1.ListCount
    End If
End If

NrD = Replace(Text2.text, "[[Title]]", CTitle)
NrD = Replace(NrD, "[[Number]]", CNumber)
Cs = Cs + 1
If Cs = Linecontent Then
NrD = NrD & vbCrLf & Text4.text
Cs = 0
End If

If Nr = "" Then
Nr = NrD
Else
Nr = Nr & vbCrLf & NrD
End If

MNr = Replace(Text11.text, "[[Title]]", CTitle)
MNr = Replace(MNr, "[[MovieFile]]", MovieFile)
MNr = Replace(MNr, "[[DefaultMovie]]", DefaultMovie)
MNr = Replace(MNr, "[[ButtonList]]", ButtonList)
MNr = Replace(MNr, "[[FunctionList]]", FunctionList)
ListView3.ListItems.Add , , "影片" & CTitle & "播放页面内容生成...", 4, 4 '-------------------------处理消息
Open App.Path & "\Web\Data\" & CTitle & ".html" For Output As #1
Print #1, MNr
Close #1

Next
'自动更新主站内容
If Dir(App.Path & "\Setting\" & "Setting.ini") <> "" Then
ListView3.ListItems.Add , , "更新站点内容...", 4, 4 '-------------------------处理消息
    iniPath$ = App.Path & "\Setting\" & "Setting.ini"
    Text3.text = GetFromINI("Setting", "WebUpdate", iniPath)
    If Text3.text = "True" Then
        Text3.text = GetFromINI("Setting", "WebFile", iniPath)
        If objFSO_f.FolderExists(Text3.text) = False Then
        ListView3.ListItems.Add , , "站点路径连接失败...无法更新", 3, 3 '-------------------------处理消息
        Else
        ListView3.ListItems.Add , , "站点连接成功...开始更新", 6, 6 '-------------------------处理消息



        If objFSO_f.FolderExists(Text3.text & "\Data") = False Then
        MkDir (Text3.text & "\Web\Data")
        End If
        If objFSO_f.FolderExists(Text3.text & "\Image") = False Then
        MkDir (Text3.text & "\Image")
        End If
        
        If Dir(Text3.text & "\Data" & "\" & CTitle & ".html") <> "" Then
        Kill Text3.text & "\Data" & "\" & CTitle & ".html"
        End If
        If Dir(Text3.text & "\Image" & "\" & CTitle & ".jpg") <> "" Then
        Kill Text3.text & "\Image" & "\" & CTitle & ".jpg"
        End If
        
        ListView3.ListItems.Add , , "播放页内容更新", 4, 4 '-------------------------处理消息
        FileCopy App.Path & "\Web\Data\" & CTitle & ".html", Text3.text & "\Data\" & CTitle & ".html"
        ListView3.ListItems.Add , , "封面内容更新", 4, 4 '-------------------------处理消息
        FileCopy App.Path & "\Web\Image\" & CTitle & ".jpg", Text3.text & "\Image\" & CTitle & ".jpg"

        ListView3.ListItems.Add , , "站点 - " & CTitle & "页面更新完成", 2, 2  '-------------------------处理消息
        End If
    End If
End If
ListView3.ListItems.Add , , "更新本集内容成功!", 2, 2 '-------------------------处理消息
ListView3.ListItems(ListView3.ListItems.Count).Selected = True
ListView3.SelectedItem.EnsureVisible
Nr = ""
For i = 1 To ListView3.ListItems.Count
If Nr = "" Then
Nr = ListView3.ListItems(i).text
Else
Nr = Nr & vbCrLf & ListView3.ListItems(i).text
End If
Next
Open App.Path & "\Log\" & Format(Date, "yyyymmdd") & Format(Now, "HHMMss") & ".log" For Output As #1
Print #1, Nr
Close #1

MsgBox "更新本集内容成功!", vbInformation + vbOKOnly, "提示"
Else
MsgBox "没有内容!", vbCritical + vbOKOnly, "提示"
End If
End If
End Sub

Private Sub Command7_Click()
Frame2.Visible = False
End Sub

Private Sub Command8_Click()
Dim lngReturn As Long
If Dir(App.Path & "\Setting\" & "Setting.ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & "Setting.ini"
Text3.text = GetFromINI("Setting", "WebLink", iniPath)
End If
lngReturn = ShellExecute(Me.hwnd, "open", Text3.text, "", "", 0) '"https://www.993dy.com/"
End Sub

Private Sub Command9_Click()
Command7_Click
Command8_Click
End Sub

Private Sub Form_Load()
If Dir(App.Path & "\SkinH_VB6.dll") <> "" Then SkinH_Attach
If Dir(App.Path & "\Web", vbDirectory) = "" Then
MkDir App.Path & "\Web"
End If
If Dir(App.Path & "\Web\Data", vbDirectory) = "" Then
MkDir App.Path & "\Web\Data"
End If
If Dir(App.Path & "\Web\Image", vbDirectory) = "" Then
MkDir App.Path & "\Web\Image"
End If
If Dir(App.Path & "\Setting", vbDirectory) = "" Then
MkDir App.Path & "\Setting"
End If
If Dir(App.Path & "\Data", vbDirectory) = "" Then
MkDir App.Path & "\Data"
End If
If Dir(App.Path & "\Log", vbDirectory) = "" Then
MkDir App.Path & "\Log"
End If
If Dir(App.Path & "\Style", vbDirectory) = "" Then
MkDir App.Path & "\Style"
End If
With ListView1
    .ColumnHeaders.Clear
    .View = lvwReport
    .LabelEdit = 1
    .HideColumnHeaders = False
    .FullRowSelect = True
    .GridLines = True
    .ListItems.Clear
    .ColumnHeaders.Add 1, , "项目", ListView1.Width - 335
End With
With ListView2
    .ColumnHeaders.Clear
    .View = lvwReport
    .LabelEdit = 1
    .HideColumnHeaders = False
    .FullRowSelect = True
    .GridLines = True
    .ListItems.Clear
    .ColumnHeaders.Add 1, , "项目", ListView2.Width - 335
End With
With ListView3
    .ColumnHeaders.Clear
    .View = lvwReport
    .LabelEdit = 1
    .HideColumnHeaders = True
    .FullRowSelect = True
    .GridLines = True
    .ListItems.Clear
    .ColumnHeaders.Add 1, , "项目", ListView3.Width - 335
End With
ListView1.ListItems.Clear
If Dir(App.Path & "\Setting\" & "List.ini") <> "" Then
Open App.Path & "\Setting\" & "List.ini" For Input As #1
Do While Not EOF(1)
Line Input #1, Temp
If Temp <> "" Then
    ListView1.ListItems.Add , , Temp, 7, 7
End If
Loop
Close #1
End If
Call UpdateStyle

End Sub

Sub Baocun()
Dim Nr As String
Dim Tb As Long
Nr = ""
If ListView1.ListItems.Count > 0 Then
For i = 1 To ListView1.ListItems.Count
If Nr = "" Then
Nr = ListView1.ListItems(i).text
Else
Nr = Nr & vbCrLf & ListView1.ListItems(i).text
End If
Next
End If
Open App.Path & "\Setting\" & "List.ini" For Output As #1
Print #1, Nr
Close #1
End Sub

Private Sub ListView1_Click()
On Error Resume Next
Text1.text = ""
ListView2.ListItems.Clear
Picture1.Picture = Picture2.Picture
If ListView1.ListItems.Count > 0 Then
    If ListView1.SelectedItem.Index > 0 Then
    
    
Frame1.Caption = ListView1.SelectedItem.text
If Dir(App.Path & "\Web\Image\" & ListView1.SelectedItem.text & ".jpg") <> "" Then
Picture1.Picture = LoadPicture(App.Path & "\Web\Image\" & ListView1.SelectedItem.text & ".jpg")
End If

If Dir(App.Path & "\Setting\" & ListView1.SelectedItem.text & ".ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & ListView1.SelectedItem.text & ".ini"
Text1.text = GetFromINI("Setting", "File", iniPath)
End If

If Text1.text <> "" Then
    If Dir(Text1.text, vbDirectory) <> "" Then
        File1.Path = Text1.text
        File1.Refresh
        ListView2.ListItems.Clear
        For i = 0 To File1.ListCount - 1
            ListView2.ListItems.Add , , File1.List(i), 1, 1
        Next
    End If
End If

End If
End If

End Sub

Private Sub ListView1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
    If ListView1.ListItems.Count > 0 Then
        If ListView1.SelectedItem.Index > 0 Then
            If ListView1.ListItems.Count > 1 Then
            MB2.Visible = True
            MB1.Visible = True
            MB3.Visible = True
            MB4.Visible = True
            MB5.Visible = True
            MB6.Visible = True
            MB7.Visible = True
            Select Case ListView1.SelectedItem.Index
            Case 1
            MB2.Visible = True
            MB1.Visible = False
            MB3.Visible = False
            Case ListView1.ListItems.Count
            MB1.Visible = True
            MB2.Visible = False
            MB4.Visible = False
            End Select
            PopupMenu MB
            End If
        End If
    Else
        MB1.Visible = False
        MB2.Visible = False
        MB3.Visible = False
        MB4.Visible = False
        MB5.Visible = True
        MB6.Visible = False
        MB7.Visible = False
        PopupMenu MB
    End If
End If
End Sub

Private Sub M1_Click()
Form4.Show 1
End Sub

Private Sub M2_Click()
If Dir(App.Path & "\Style", vbDirectory) <> "" Then
Shell "explorer " & App.Path & "\Style", vbNormalFocus
Else
MsgBox "Style文件夹不存在!", vbCritical + vbOKOnly, "提示"
End If
End Sub

Private Sub M3_Click()
Dim objFSO_f As New Scripting.FileSystemObject
If Dir(App.Path & "\Setting\" & "Setting.ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & "Setting.ini"
Text3.text = GetFromINI("Setting", "MovieFile", iniPath)
    If objFSO_f.FolderExists(Text3.text) = True Then
    Shell "explorer " & Text3.text, vbNormalFocus
    Else
    MsgBox Text3.text & vbCrLf & "文件夹不存在!", vbCritical + vbOKOnly, "提示"
    End If
End If
End Sub

Private Sub M4_Click()
Dim objFSO_f As New Scripting.FileSystemObject
If Dir(App.Path & "\Setting\" & "Setting.ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & "Setting.ini"
Text3.text = GetFromINI("Setting", "WebFile", iniPath)
    If objFSO_f.FolderExists(Text3.text) = True Then
    Shell "explorer " & Text3.text, vbNormalFocus
    Else
    MsgBox Text3.text & vbCrLf & "文件夹不存在!", vbCritical + vbOKOnly, "提示"
    End If
End If
End Sub

Private Sub M5_Click()
If MsgBox("要清空缓存文件吗?", vbQuestion + vbYesNo, "提示") = vbYes Then
If Dir(App.Path & "\Temp", vbDirectory) <> "" Then
File1.Path = App.Path & "\Temp\"
File1.Refresh
For i = 0 To File1.ListCount - 1
Kill App.Path & "\Temp\" & File1.List(i)
Next
MsgBox "清空缓存完毕!", vbInformation + vbOKOnly, "提示"
End If
End If
End Sub

Private Sub M6_Click()
If MsgBox("要清空日志吗?", vbQuestion + vbYesNo, "提示") = vbYes Then
If Dir(App.Path & "\Log", vbDirectory) <> "" Then
File1.Path = App.Path & "\Log\"
File1.Refresh
For i = 0 To File1.ListCount - 1
Kill App.Path & "\Log\" & File1.List(i)
Next
MsgBox "清空日志完毕!", vbInformation + vbOKOnly, "提示"
End If
End If
End Sub

Private Sub MB1_Click()
Dim Nr As String
If ListView1.SelectedItem.Index > 1 Then
Nr = ListView1.ListItems(ListView1.SelectedItem.Index - 1).text
ListView1.ListItems(ListView1.SelectedItem.Index - 1).text = ListView1.SelectedItem.text
ListView1.SelectedItem.text = Nr
End If
Call Baocun
End Sub

Private Sub MB2_Click()
Dim Nr As String
If ListView1.SelectedItem.Index < ListView1.ListItems.Count Then
Nr = ListView1.ListItems(ListView1.SelectedItem.Index + 1).text
ListView1.ListItems(ListView1.SelectedItem.Index + 1).text = ListView1.SelectedItem.text
ListView1.SelectedItem.text = Nr
End If
Call Baocun
End Sub

Sub UpdateStyle()
'主页设计更新
Dim Nr As String
Linecontent = 3

If Dir(App.Path & "\Style\Style.ini") <> "" Then
Nr = Text15.text
iniPath$ = App.Path & "\Style\Style.ini"
Text3.text = GetFromINI("Setting", "Bodybgcolor", iniPath): Nr = Replace(Nr, "[[Bodybgcolor]]", Text3.text)
Text3.text = GetFromINI("Setting", "Moviebgcolor", iniPath): Nr = Replace(Nr, "[[Moviebgcolor]]", Text3.text)
Text3.text = GetFromINI("Setting", "Linecontent", iniPath): Linecontent = CLng(Text3.text)
Text5.text = Nr

Nr = Text14.text
Text3.text = GetFromINI("Setting", "Coverwidth", iniPath): Nr = Replace(Nr, "[[Coverwidth]]", Text3.text)
Nr = Replace(Nr, "[[divwidth]]", CLng(Text3.text) + 35)
Text3.text = GetFromINI("Setting", "Coverheight", iniPath): Nr = Replace(Nr, "[[Coverheight]]", Text3.text)
Nr = Replace(Nr, "[[divheight]]", CLng(Text3.text) + 80)
Text3.text = GetFromINI("Setting", "Coverframecolor", iniPath): Nr = Replace(Nr, "[[Coverframecolor]]", Text3.text)
Text3.text = GetFromINI("Setting", "Coverfontsize", iniPath): Nr = Replace(Nr, "[[Coverfontsize]]", Text3.text)
Text3.text = GetFromINI("Setting", "Coverfontcolor", iniPath): Nr = Replace(Nr, "[[Coverfontcolor]]", Text3.text)
Text3.text = GetFromINI("Setting", "Numberfontsize", iniPath): Nr = Replace(Nr, "[[Numberfontsize]]", Text3.text)
Text3.text = GetFromINI("Setting", "Numberfontcolor", iniPath): Nr = Replace(Nr, "[[Numberfontcolor]]", Text3.text)
Text2.text = Nr
Else
MsgBox "布局设计文件不存在"
Text2.text = Text12.text
Text5.text = Text13.text
End If


If Dir(App.Path & "\Style\PageStyle.html") = "" Then
Open App.Path & "\Style\PageStyle.html" For Output As #1
Print #1, Text6.text
Close #1
Else
Open App.Path & "\Style\PageStyle.html" For Input As #1
Text11.text = StrConv(InputB$(LOF(1), 1), vbUnicode)
Close #1
End If

If Dir(App.Path & "\Style\ButtonStyle.html") = "" Then
Open App.Path & "\Style\ButtonStyle.html" For Output As #1
Print #1, Text7.text
Close #1
Else
Open App.Path & "\Style\ButtonStyle.html" For Input As #1
Text10.text = StrConv(InputB$(LOF(1), 1), vbUnicode)
Close #1
End If

If Dir(App.Path & "\Style\FunctionStyle.html") = "" Then
Open App.Path & "\Style\FunctionStyle.html" For Output As #1
Print #1, Text8.text
Close #1
Else
Open App.Path & "\Style\FunctionStyle.html" For Input As #1
Text9.text = StrConv(InputB$(LOF(1), 1), vbUnicode)
Close #1
End If
End Sub

Private Sub MB3_Click()
Dim Xh As Long
If ListView1.SelectedItem.Index > 1 Then
Xh = ListView1.SelectedItem.Index
ListView1.ListItems.Add 1, , ListView1.ListItems(Xh).text, 7, 7
ListView1.ListItems.Remove Xh + 1
ListView1.ListItems(1).Selected = True
ListView1.SelectedItem.EnsureVisible
End If
Call Baocun
End Sub

Private Sub MB4_Click()
Dim Xh As Long
If ListView1.SelectedItem.Index < ListView1.ListItems.Count Then
Xh = ListView1.SelectedItem.Index
ListView1.ListItems.Add , , ListView1.SelectedItem.text, 7, 7
ListView1.ListItems.Remove Xh
ListView1.ListItems(ListView1.ListItems.Count).Selected = True
ListView1.SelectedItem.EnsureVisible
End If
Call Baocun
End Sub

Private Sub MB5_Click()
Command1_Click
End Sub

Private Sub MB6_Click()
Command2_Click
End Sub

Private Sub MB7_Click()
If Dir(App.Path & "\Setting\" & ListView1.SelectedItem.text & ".ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & ListView1.SelectedItem.text & ".ini"
Text3.text = GetFromINI("Setting", "File", iniPath)
If Dir(Text3.text, vbDirectory) <> "" Then
Shell "explorer " & Text3.text, vbNormalFocus
Else
MsgBox Text3.text & vbCrLf & "文件夹不存在!", vbCritical + vbOKOnly, "提示"
End If
End If
End Sub

Sub dianji()
ListView1_Click
Unload Form2
End Sub
