VERSION 5.00
Begin VB.Form Form4 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "设置"
   ClientHeight    =   4470
   ClientLeft      =   45
   ClientTop       =   375
   ClientWidth     =   10815
   BeginProperty Font 
      Name            =   "微软雅黑"
      Size            =   10.5
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Form4.frx":0000
   LinkTopic       =   "Form4"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4470
   ScaleWidth      =   10815
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame3 
      Caption         =   "影片站点"
      Height          =   975
      Left            =   120
      TabIndex        =   12
      Top             =   2760
      Width           =   10575
      Begin VB.TextBox Text4 
         Height          =   420
         Left            =   1920
         TabIndex        =   13
         Top             =   360
         Width           =   8415
      End
      Begin VB.Label Label3 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "站点链接："
         Height          =   300
         Left            =   660
         TabIndex        =   14
         Top             =   360
         Width           =   1050
      End
   End
   Begin VB.TextBox Text3 
      Height          =   495
      Left            =   600
      TabIndex        =   11
      Text            =   "Text3"
      Top             =   2880
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.Frame Frame2 
      Caption         =   "服务器更新"
      Height          =   1455
      Left            =   120
      TabIndex        =   6
      Top             =   1200
      Width           =   10575
      Begin VB.CommandButton Command4 
         Caption         =   "测试"
         Height          =   375
         Left            =   9120
         TabIndex        =   10
         Top             =   840
         Width           =   1335
      End
      Begin VB.TextBox Text2 
         Height          =   420
         Left            =   1920
         TabIndex        =   8
         Top             =   840
         Width           =   7095
      End
      Begin VB.CheckBox Check1 
         Caption         =   "生成内容后自动更新到站点"
         Height          =   375
         Left            =   120
         TabIndex        =   7
         Top             =   360
         Width           =   2895
      End
      Begin VB.Label Label2 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "站点路径："
         Height          =   300
         Left            =   660
         TabIndex        =   9
         Top             =   840
         Width           =   1050
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "取消"
      Height          =   495
      Left            =   8760
      TabIndex        =   4
      Top             =   3840
      Width           =   1935
   End
   Begin VB.CommandButton Command2 
      Caption         =   "确定"
      Height          =   495
      Left            =   6840
      TabIndex        =   3
      Top             =   3840
      Width           =   1935
   End
   Begin VB.Frame Frame1 
      Caption         =   "影片文件路径"
      Height          =   975
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   10575
      Begin VB.CommandButton Command1 
         Caption         =   "测试"
         Height          =   375
         Left            =   9120
         TabIndex        =   5
         Top             =   360
         Width           =   1335
      End
      Begin VB.TextBox Text1 
         Height          =   420
         Left            =   1920
         TabIndex        =   2
         Top             =   360
         Width           =   7095
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "影片文件路径："
         Height          =   300
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   1470
      End
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim objFSO_f As New Scripting.FileSystemObject
If Text1.text <> "" Then
If objFSO_f.FolderExists(Text1.text) = False Then
MsgBox "连接失败!", vbCritical + vbOKOnly, "提示"
Else
MsgBox "连接成功!", vbInformation + vbOKOnly, "提示"
End If
Else
MsgBox "请填写影片文件路径!", vbCritical + vbOKOnly, "提示"
End If
End Sub

Private Sub Command2_Click()
iniPath$ = App.Path & "\Setting\" & "Setting.ini"
If Check1.Value = 0 Then
entry = "False": r = WritePrivateProfileString("Setting", "WebUpdate", entry, iniPath)
Else
entry = "True": r = WritePrivateProfileString("Setting", "WebUpdate", entry, iniPath)
End If

entry = Text1.text: r = WritePrivateProfileString("Setting", "MovieFile", entry, iniPath)
entry = Text2.text: r = WritePrivateProfileString("Setting", "WebFile", entry, iniPath)
entry = Text4.text: r = WritePrivateProfileString("Setting", "WebLink", entry, iniPath)
Unload Me
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Command4_Click()
Dim objFSO_f As New Scripting.FileSystemObject
If Text2.text <> "" Then
If objFSO_f.FolderExists(Text2.text) = False Then
MsgBox "连接失败!", vbCritical + vbOKOnly, "提示"
Else
MsgBox "连接成功!", vbInformation + vbOKOnly, "提示"
End If
Else
MsgBox "请填写站点路径!", vbCritical + vbOKOnly, "提示"
End If
End Sub

Private Sub Form_Load()
Me.KeyPreview = True
If Dir(App.Path & "\Setting\" & "Setting.ini") <> "" Then
iniPath$ = App.Path & "\Setting\" & "Setting.ini"
Text1.text = GetFromINI("Setting", "MovieFile", iniPath)
Text2.text = GetFromINI("Setting", "WebFile", iniPath)
Text3.text = GetFromINI("Setting", "WebUpdate", iniPath)

If Text3.text = "True" Then
Check1.Value = 1
End If
Text4.text = GetFromINI("Setting", "WebLink", iniPath)
End If
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
Unload Me
End If
End Sub
