<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="" %> サーバー自動巡回・自動収集・抽出・保存・閲覧可能な画像閲覧アルバムソフトウェア〜Rydia〜ソースコード サーバー自動巡回・自動収集・抽出・保存・閲覧可能な画像閲覧アルバムソフトウェア
Rydia〜ソースコード(開発日数: 1 day)
(Copyright (C) Hee Cheong Lee All Rights Reserved.)

Imports System.IO
Imports System.Drawing
Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows フォーム デザイナで生成されたコード "

Public Sub New()
MyBase.New()

' この呼び出しは Windows フォーム デザイナで必要です。
InitializeComponent()

' InitializeComponent() 呼び出しの後に初期化を追加します。

End Sub

' Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' Windows フォーム デザイナで必要です。
Private components As System.ComponentModel.IContainer

' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。
'Windows フォーム デザイナを使って変更してください。
' コード エディタを使って変更しないでください。
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents FolderBrowserDialog1 As System.Windows.Forms.FolderBrowserDialog
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem7 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem8 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
Friend WithEvents MenuItem10 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem11 As System.Windows.Forms.MenuItem
Friend WithEvents Button5 As System.Windows.Forms.Button
Friend WithEvents MenuItem12 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem15 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem16 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem17 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem18 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem19 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem20 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem21 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem22 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem23 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem24 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem25 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem26 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem27 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem30 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem31 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem32 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem33 As System.Windows.Forms.MenuItem
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents MenuItem34 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem35 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem36 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem37 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem38 As System.Windows.Forms.MenuItem
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents ContextMenu2 As System.Windows.Forms.ContextMenu
Friend WithEvents MenuItem39 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem40 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem41 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem42 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem43 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem28 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem44 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem45 As System.Windows.Forms.MenuItem
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents ListBox2 As System.Windows.Forms.ListBox
Friend WithEvents ListBox3 As System.Windows.Forms.ListBox
Friend WithEvents ListBox4 As System.Windows.Forms.ListBox
Friend WithEvents MenuItem29 As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem15 = New System.Windows.Forms.MenuItem
Me.MenuItem16 = New System.Windows.Forms.MenuItem
Me.MenuItem17 = New System.Windows.Forms.MenuItem
Me.MenuItem18 = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
Me.MenuItem40 = New System.Windows.Forms.MenuItem
Me.MenuItem7 = New System.Windows.Forms.MenuItem
Me.MenuItem8 = New System.Windows.Forms.MenuItem
Me.MenuItem9 = New System.Windows.Forms.MenuItem
Me.MenuItem4 = New System.Windows.Forms.MenuItem
Me.MenuItem12 = New System.Windows.Forms.MenuItem
Me.MenuItem13 = New System.Windows.Forms.MenuItem
Me.MenuItem34 = New System.Windows.Forms.MenuItem
Me.MenuItem30 = New System.Windows.Forms.MenuItem
Me.MenuItem27 = New System.Windows.Forms.MenuItem
Me.MenuItem41 = New System.Windows.Forms.MenuItem
Me.MenuItem42 = New System.Windows.Forms.MenuItem
Me.MenuItem43 = New System.Windows.Forms.MenuItem
Me.MenuItem28 = New System.Windows.Forms.MenuItem
Me.MenuItem44 = New System.Windows.Forms.MenuItem
Me.MenuItem45 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.Label1 = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog
Me.ListView1 = New System.Windows.Forms.ListView
Me.ContextMenu1 = New System.Windows.Forms.ContextMenu
Me.MenuItem10 = New System.Windows.Forms.MenuItem
Me.MenuItem11 = New System.Windows.Forms.MenuItem
Me.MenuItem29 = New System.Windows.Forms.MenuItem
Me.MenuItem26 = New System.Windows.Forms.MenuItem
Me.MenuItem37 = New System.Windows.Forms.MenuItem
Me.MenuItem36 = New System.Windows.Forms.MenuItem
Me.MenuItem38 = New System.Windows.Forms.MenuItem
Me.MenuItem19 = New System.Windows.Forms.MenuItem
Me.MenuItem20 = New System.Windows.Forms.MenuItem
Me.MenuItem21 = New System.Windows.Forms.MenuItem
Me.MenuItem23 = New System.Windows.Forms.MenuItem
Me.MenuItem22 = New System.Windows.Forms.MenuItem
Me.MenuItem24 = New System.Windows.Forms.MenuItem
Me.MenuItem25 = New System.Windows.Forms.MenuItem
Me.MenuItem31 = New System.Windows.Forms.MenuItem
Me.MenuItem32 = New System.Windows.Forms.MenuItem
Me.MenuItem33 = New System.Windows.Forms.MenuItem
Me.MenuItem35 = New System.Windows.Forms.MenuItem
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.Label2 = New System.Windows.Forms.Label
Me.Button5 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.ContextMenu2 = New System.Windows.Forms.ContextMenu
Me.MenuItem39 = New System.Windows.Forms.MenuItem
Me.ListBox1 = New System.Windows.Forms.ListBox
Me.ListBox2 = New System.Windows.Forms.ListBox
Me.ListBox3 = New System.Windows.Forms.ListBox
Me.ListBox4 = New System.Windows.Forms.ListBox
Me.SuspendLayout()
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem7, Me.MenuItem4, Me.MenuItem12, Me.MenuItem27, Me.MenuItem28, Me.MenuItem2})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem15, Me.MenuItem3, Me.MenuItem40})
Me.MenuItem1.Text = "ファイル"
'
'MenuItem15
'
Me.MenuItem15.Index = 0
Me.MenuItem15.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem16, Me.MenuItem17, Me.MenuItem18})
Me.MenuItem15.Text = "読み込み"
'
'MenuItem16
'
Me.MenuItem16.Index = 0
Me.MenuItem16.Text = "ルートフォルダから読み込み"
'
'MenuItem17
'
Me.MenuItem17.Index = 1
Me.MenuItem17.Text = "保存先フォルダから読み込み"
'
'MenuItem18
'
Me.MenuItem18.Index = 2
Me.MenuItem18.Text = "ダウンロード保存先フォルダから読み込み"
'
'MenuItem3
'
Me.MenuItem3.Index = 1
Me.MenuItem3.Text = "終了"
'
'MenuItem40
'
Me.MenuItem40.Index = 2
Me.MenuItem40.Text = "Debug"
'
'MenuItem7
'
Me.MenuItem7.Index = 1
Me.MenuItem7.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem8, Me.MenuItem9})
Me.MenuItem7.Text = "画像を保存"
'
'MenuItem8
'
Me.MenuItem8.Index = 0
Me.MenuItem8.Text = "保存フォルダ設定"
'
'MenuItem9
'
Me.MenuItem9.Index = 1
Me.MenuItem9.Text = "全ての画像保存処理の開始"
'
'MenuItem4
'
Me.MenuItem4.Index = 2
Me.MenuItem4.Text = "指定した条件で画像ファイルを抽出"
'
'MenuItem12
'
Me.MenuItem12.Index = 3
Me.MenuItem12.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem13, Me.MenuItem34, Me.MenuItem30})
Me.MenuItem12.Text = "設定"
'
'MenuItem13
'
Me.MenuItem13.Index = 0
Me.MenuItem13.Text = "画像ファイル拡張子設定"
'
'MenuItem34
'
Me.MenuItem34.Index = 1
Me.MenuItem34.Text = "ダウンロード設定"
'
'MenuItem30
'
Me.MenuItem30.Index = 2
Me.MenuItem30.Text = "画像ファイル保存フォルダ設定"
'
'MenuItem27
'
Me.MenuItem27.Index = 4
Me.MenuItem27.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem41, Me.MenuItem42, Me.MenuItem43})
Me.MenuItem27.Text = "読み込み"
'
'MenuItem41
'
Me.MenuItem41.Index = 0
Me.MenuItem41.Text = "ルートフォルダから読み込み"
'
'MenuItem42
'
Me.MenuItem42.Index = 1
Me.MenuItem42.Text = "保存先フォルダから読み込み"
'
'MenuItem43
'
Me.MenuItem43.Index = 2
Me.MenuItem43.Text = "ダウンロード保存先フォルダから読み込み"
'
'MenuItem28
'
Me.MenuItem28.Index = 5
Me.MenuItem28.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem44, Me.MenuItem45})
Me.MenuItem28.Text = "画像を自動収集"
'
'MenuItem44
'
Me.MenuItem44.Index = 0
Me.MenuItem44.Text = "Webから画像を自動収集"
'
'MenuItem45
'
Me.MenuItem45.Index = 1
Me.MenuItem45.Text = "ハードディスクから画像を自動収集"
'
'MenuItem2
'
Me.MenuItem2.Index = 6
Me.MenuItem2.Text = "Hee Cheong Lee Official Websiteへ"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(8, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(256, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "フォルダorURL設定"
'
'TextBox1
'
Me.TextBox1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.TextBox1.Location = New System.Drawing.Point(8, 24)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.ReadOnly = True
Me.TextBox1.Size = New System.Drawing.Size(792, 19)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(8, 48)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(88, 24)
Me.Button1.TabIndex = 2
Me.Button1.Text = "選択"
'
'ListView1
'
Me.ListView1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.ListView1.ContextMenu = Me.ContextMenu1
Me.ListView1.HoverSelection = True
Me.ListView1.LargeImageList = Me.ImageList1
Me.ListView1.Location = New System.Drawing.Point(8, 80)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(792, 416)
Me.ListView1.TabIndex = 3
'
'ContextMenu1
'
Me.ContextMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem10, Me.MenuItem11, Me.MenuItem29, Me.MenuItem26, Me.MenuItem37, Me.MenuItem36, Me.MenuItem38, Me.MenuItem19, Me.MenuItem20, Me.MenuItem21, Me.MenuItem23, Me.MenuItem22, Me.MenuItem24, Me.MenuItem25, Me.MenuItem31, Me.MenuItem35})
'
'MenuItem10
'
Me.MenuItem10.Index = 0
Me.MenuItem10.Text = "この画像を閲覧"
'
'MenuItem11
'
Me.MenuItem11.Index = 1
Me.MenuItem11.Text = "この画像を保存"
'
'MenuItem29
'
Me.MenuItem29.Index = 2
Me.MenuItem29.Text = "この画像が存在するフォルダをエクスプローラで開く"
'
'MenuItem26
'
Me.MenuItem26.Enabled = False
Me.MenuItem26.Index = 3
Me.MenuItem26.Text = "--------------------------------"
'
'MenuItem37
'
Me.MenuItem37.Index = 4
Me.MenuItem37.Text = "保存先フォルダを開く"
'
'MenuItem36
'
Me.MenuItem36.Index = 5
Me.MenuItem36.Text = "ダウンロード保存先フォルダを開く"
'
'MenuItem38
'
Me.MenuItem38.Enabled = False
Me.MenuItem38.Index = 6
Me.MenuItem38.Text = "--------------------------------"
'
'MenuItem19
'
Me.MenuItem19.Index = 7
Me.MenuItem19.Text = "ルートフォルダから読み込み"
'
'MenuItem20
'
Me.MenuItem20.Index = 8
Me.MenuItem20.Text = "保存先フォルダから読み込み"
'
'MenuItem21
'
Me.MenuItem21.Index = 9
Me.MenuItem21.Text = "ダウンロード保存先フォルダから読み込み"
'
'MenuItem23
'
Me.MenuItem23.Enabled = False
Me.MenuItem23.Index = 10
Me.MenuItem23.Text = "--------------------------------"
'
'MenuItem22
'
Me.MenuItem22.Index = 11
Me.MenuItem22.Text = "画像抽出設定"
'
'MenuItem24
'
Me.MenuItem24.Index = 12
Me.MenuItem24.Text = "画像抽出の開始"
'
'MenuItem25
'
Me.MenuItem25.Enabled = False
Me.MenuItem25.Index = 13
Me.MenuItem25.Text = "--------------------------------"
'
'MenuItem31
'
Me.MenuItem31.Index = 14
Me.MenuItem31.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem32, Me.MenuItem33})
Me.MenuItem31.Text = "画像ファイル消去"
'
'MenuItem32
'
Me.MenuItem32.Index = 0
Me.MenuItem32.Text = "画像保存フォルダ中の画像ファイルを全消去"
'
'MenuItem33
'
Me.MenuItem33.Index = 1
Me.MenuItem33.Text = "ダウンロード保存フォルダ中の画像ファイルを全消去"
'
'MenuItem35
'
Me.MenuItem35.Enabled = False
Me.MenuItem35.Index = 15
Me.MenuItem35.Text = "--------------------------------"
'
'ImageList1
'
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(280, 8)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(224, 16)
Me.Label2.TabIndex = 5
Me.Label2.Text = "画像ファイル数:"
'
'Button5
'
Me.Button5.Location = New System.Drawing.Point(112, 48)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(96, 24)
Me.Button5.TabIndex = 9
Me.Button5.Text = "戻る"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(224, 48)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(96, 24)
Me.Button2.TabIndex = 11
Me.Button2.Text = "処理の中止"
'
'PictureBox1
'
Me.PictureBox1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.PictureBox1.ContextMenu = Me.ContextMenu2
Me.PictureBox1.Location = New System.Drawing.Point(16, 88)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(776, 400)
Me.PictureBox1.TabIndex = 13
Me.PictureBox1.TabStop = False
Me.PictureBox1.Visible = False
'
'ContextMenu2
'
Me.ContextMenu2.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem39})
'
'MenuItem39
'
Me.MenuItem39.Index = 0
Me.MenuItem39.Text = "画像リストに戻る"
'
'ListBox1
'
Me.ListBox1.ItemHeight = 12
Me.ListBox1.Location = New System.Drawing.Point(520, 8)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(48, 4)
Me.ListBox1.TabIndex = 14
Me.ListBox1.Visible = False
'
'ListBox2
'
Me.ListBox2.ItemHeight = 12
Me.ListBox2.Location = New System.Drawing.Point(584, 8)
Me.ListBox2.Name = "ListBox2"
Me.ListBox2.Size = New System.Drawing.Size(56, 4)
Me.ListBox2.TabIndex = 15
Me.ListBox2.Visible = False
'
'ListBox3
'
Me.ListBox3.ItemHeight = 12
Me.ListBox3.Location = New System.Drawing.Point(656, 8)
Me.ListBox3.Name = "ListBox3"
Me.ListBox3.Size = New System.Drawing.Size(56, 4)
Me.ListBox3.TabIndex = 16
Me.ListBox3.Visible = False
'
'ListBox4
'
Me.ListBox4.ItemHeight = 12
Me.ListBox4.Location = New System.Drawing.Point(728, 8)
Me.ListBox4.Name = "ListBox4"
Me.ListBox4.Size = New System.Drawing.Size(56, 4)
Me.ListBox4.TabIndex = 17
Me.ListBox4.Visible = False
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.ClientSize = New System.Drawing.Size(808, 513)
Me.Controls.Add(Me.ListBox4)
Me.Controls.Add(Me.ListBox3)
Me.Controls.Add(Me.ListBox2)
Me.Controls.Add(Me.ListBox1)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button5)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.ListView1)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Label1)
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim x
Dim y
Dim z

Form = Me
Me.Text = SoftwareName

If System.IO.Directory.Exists(GetAppPath() & "\Save") = False Then
System.IO.Directory.CreateDirectory(GetAppPath() & "\Save")
End If

If System.IO.Directory.Exists(GetAppPath() & "\Download") = False Then
System.IO.Directory.CreateDirectory(GetAppPath() & "\Download")
End If

Dim CX As ClassXML
If System.IO.File.Exists(Fname) = False Then
Try
CX = New ClassXML
CX.InputFile = Fname
CX.OutputFile = Fname
CX.InitialDocumentElement = SoftwareName
CX.GenerateInitialFile()
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "RootDirectory", System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop))
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "SaveRoot", GetAppPath() & "\Save")
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "DownloadRoot", GetAppPath() & "\Download")
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "DownloadLevel", "0")
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "ExtractSettings", String.Empty)
CX.FindAllParentsElementAndAddNewChildElement("ExtractSettings", "Date", "Nothing")
CX.FindAllParentsElementAndAddNewChildElement("ExtractSettings", "Height", "Nothing")
CX.FindAllParentsElementAndAddNewChildElement("ExtractSettings", "Width", "Nothing")
CX.FindAllParentsElementAndAddNewChildElement("ExtractSettings", "Size", "Nothing")
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "Extensions", String.Empty)
CX.FindParentsElementAndAddNewChildElement("Extensions", "ExtensionValue", "jpg")
CX.FindParentsElementAndAddNewChildElement("Extensions", "ExtensionValue", "gif")
CX.FindParentsElementAndAddNewChildElement("Extensions", "ExtensionValue", "bmp")
Catch ex As Exception
MOK("エラーが発生しました。プログラムを終了します。")
End
End Try
Else
If System.IO.File.Exists(VCF) = False Then
Try
Kill(Fname)
Catch ex As Exception
MOK("エラーが発生しました。プログラムを終了します。")
End
End Try
Try
CX = New ClassXML
CX.InputFile = Fname
CX.OutputFile = Fname
CX.InitialDocumentElement = SoftwareName
CX.GenerateInitialFile()
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "RootDirectory", System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop))
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "SaveRoot", GetAppPath() & "\Save")
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "DownloadRoot", GetAppPath() & "\Download")
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "DownloadLevel", "0")
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "ExtractSettings", String.Empty)
CX.FindAllParentsElementAndAddNewChildElement("ExtractSettings", "Date", "Nothing")
CX.FindAllParentsElementAndAddNewChildElement("ExtractSettings", "Height", "Nothing")
CX.FindAllParentsElementAndAddNewChildElement("ExtractSettings", "Width", "Nothing")
CX.FindAllParentsElementAndAddNewChildElement("ExtractSettings", "Size", "Nothing")
CX.FindParentsElementAndAddNewChildElement(SoftwareName, "Extensions", String.Empty)
CX.FindParentsElementAndAddNewChildElement("Extensions", "ExtensionValue", "jpg")
CX.FindParentsElementAndAddNewChildElement("Extensions", "ExtensionValue", "gif")
CX.FindParentsElementAndAddNewChildElement("Extensions", "ExtensionValue", "bmp")
FPrint(VCF, "2.00")
Catch ex As Exception
MOK("エラーが発生しました。プログラムを終了します。")
End
End Try
End If
End If

ListView1.HoverSelection = True
ListView1.Activation = ItemActivation.OneClick

AddHandler ListView1.ItemActivate, _
AddressOf ListView1_ItemActivate

CX = New ClassXML
CX.InputFile = Fname
CX.OutputFile = Fname

Me.TextBox1.Text = CX.GetXMLValue("RootDirectory")
Me.ListViewMode()

TreadCheckSpideringProcess = New Threading.Thread(AddressOf CheckSpideringProcess)
TreadCheckSpideringProcess.Start()

ThreadAddImageToListView = New Threading.Thread(AddressOf AddImageToListView)
ThreadAddImageToListView.Start()

End Sub

Public Shared Function GetSubDirectory(ByVal lb As TreeView, ByVal d As System.IO.DirectoryInfo) As TreeView

Dim fCount As Long = 0
Dim dis As System.IO.DirectoryInfo() = d.GetDirectories()
Dim di As System.IO.DirectoryInfo

For Each di In dis
lb.Nodes.Add(di.FullName)
Next di

Return lb

End Function


Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
End
End Sub

Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
FSHPP()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.FolderBrowserDialog1.SelectedPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Dim x As New ClassXML
If Me.FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
Me.TextBox1.Text = Me.FolderBrowserDialog1.SelectedPath.ToString
x.InputFile = Fname
x.OutputFile = Fname
x.SetXMLValue("RootDirectory", Me.FolderBrowserDialog1.SelectedPath.ToString)
ThreadAddImageToListView = New Threading.Thread(AddressOf AddImageToListView)
ThreadAddImageToListView.Start()
End If
End Sub

Private Function ThumbnailConverter(ByVal image As Image, ByVal w As Integer, ByVal h As Integer) As Image

Dim canvas As New Bitmap(w, h)

Dim g As Graphics = Graphics.FromImage(canvas)

Dim fw As Double = CDbl(w) / CDbl(image.Width)
Dim fh As Double = CDbl(h) / CDbl(image.Height)
Dim scale As Double = Math.Min(fw, fh)

Dim w2 As Integer = CInt(image.Width * scale)
Dim h2 As Integer = CInt(image.Height * scale)

g.DrawImage(image, (w - w2) \ 2, (h - h2) \ 2, w2, h2)
g.Dispose()

Return canvas

End Function

Sub AddImageToListView()

ThreadEndFlag = False

Dim xa As New ClassRegularExpression
If Me.TextBox1.Text = String.Empty Or xa.ConfirmURL(Me.TextBox1.Text) = True Then
Exit Sub
End If
Application.DoEvents()
Try
Me.ListViewMode()
Me.ListView1.Items.Clear()
Me.ImageList1.Images.Clear()

Dim SaveDir As String = GetXMLValue(Fname, "RootDirectory")
Dim imageDir As String = SaveDir
Dim ImageFiles As String

Me.TextBox1.Text = imageDir

ImageList1.ImageSize = New Size(ImageWidth, ImageHeight)
ListView1.LargeImageList = ImageList1

Dim i As Integer
Dim j As Integer = 0

Dim x As New ClassXML
Dim y As New ListBox
Dim z As Integer

x.InputFile = Fname
y = x.SelectNodeAndGetAllOfItsChildElementsInnerTextAndPutItIntoListbox("Extensions")

Dim FI As FileInfo
Dim BM As Bitmap
Dim original As Image
Dim thumbnail As Image
For z = 0 To y.Items.Count - 1
For Each ImageFiles In System.IO.Directory.GetFiles(imageDir, "*." & y.Items.Item(z))
If ThreadEndFlag = True Then
Exit Sub
End If
Try
BM = BM.FromFile(ImageFiles)
original = BM
thumbnail = ThumbnailConverter(original, ImageWidth, ImageHeight)
ImageList1.Images.Add(thumbnail)
ListView1.Items.Add(ImageFiles, j)
j = j + 1
Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count
Catch ex As Exception

End Try
Next
Next

Catch ex As Exception

End Try

Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count

ThreadEndFlag = True

Try
ThreadAddImageToListView.Abort()
Catch ex As Exception

End Try

End Sub

Sub AddImageToListViewFromSaveRoot()

ThreadEndFlag = False

Application.DoEvents()
Try
Me.ListViewMode()
Me.ListView1.Items.Clear()
Me.ImageList1.Images.Clear()
Dim SaveDir As String = GetXMLValue(Fname, "SaveRoot")
Dim imageDir As String = SaveDir
Dim ImageFiles As String

Me.TextBox1.Text = imageDir

ImageList1.ImageSize = New Size(ImageWidth, ImageHeight)
ListView1.LargeImageList = ImageList1

Dim i As Integer
Dim j As Integer = 0

Dim x As New ClassXML
Dim y As New ListBox
Dim z As Integer

x.InputFile = Fname
y = x.SelectNodeAndGetAllOfItsChildElementsInnerTextAndPutItIntoListbox("Extensions")

Dim FI As FileInfo
Dim BM As Bitmap
Dim original As Image
Dim thumbnail As Image
For z = 0 To y.Items.Count - 1
For Each ImageFiles In System.IO.Directory.GetFiles(imageDir, "*." & y.Items.Item(z))
If ThreadEndFlag = True Then
Exit Sub
End If
Try
BM = BM.FromFile(ImageFiles)
original = BM
thumbnail = ThumbnailConverter(original, ImageWidth, ImageHeight)
ImageList1.Images.Add(thumbnail)
ListView1.Items.Add(ImageFiles, j)
j = j + 1
Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count
Catch ex As Exception

End Try
Next
Next

Catch ex As Exception

End Try

Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count

ThreadEndFlag = True

Try
ThreadAddImageToListViewFromSaveRoot.Abort()
Catch ex As Exception

End Try

End Sub

Sub AddImageToListViewFromDownloadRoot()

ThreadEndFlag = False

Application.DoEvents()

Me.ListViewMode()
Me.ListView1.Items.Clear()
Me.ImageList1.Images.Clear()
Dim SaveDir As String = GetXMLValue(Fname, "DownloadRoot")
Dim imageDir As String = SaveDir
Dim ImageFiles As String

Me.TextBox1.Text = imageDir

ImageList1.ImageSize = New Size(ImageWidth, ImageHeight)
ListView1.LargeImageList = ImageList1

Dim i As Integer
Dim j As Integer = 0

Dim x As New ClassXML
Dim y As New ListBox
Dim z As Integer

x.InputFile = Fname
y = x.SelectNodeAndGetAllOfItsChildElementsInnerTextAndPutItIntoListbox("Extensions")

Dim FI As FileInfo
Dim BM As Bitmap
Dim original As Image
Dim thumbnail As Image
For z = 0 To y.Items.Count - 1
For Each ImageFiles In System.IO.Directory.GetFiles(imageDir, "*." & y.Items.Item(z))
If ThreadEndFlag = True Then
Exit Sub
End If
Try
BM = BM.FromFile(ImageFiles)
original = BM
thumbnail = ThumbnailConverter(original, ImageWidth, ImageHeight)
ImageList1.Images.Add(thumbnail)
ListView1.Items.Add(ImageFiles, j)
j = j + 1
Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count
Catch ex As Exception

End Try
Next
Next

Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count

ThreadEndFlag = True

Try
ThreadAddImageToListViewFromDownloadRoot.Abort()
Catch ex As Exception

End Try

End Sub

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick

Dim x As Bitmap
Dim y As Image

x = Bitmap.FromFile(Me.ListView1.FocusedItem.Text)
y = x
Me.PictureBox1.Image = y
Me.PictureMode()

End Sub

Private Sub ListView1_ItemActivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.ItemActivate

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.TextBox1.Text = System.Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)
End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

End Sub

Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
Dim x As New Form2
x.ShowDialog()
End Sub

Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem8.Click
Dim x As New Form3
x.ShowDialog()
End Sub

Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
End
End Sub

Public Sub ExtractImages()

If System.IO.Directory.Exists(Me.TextBox1.Text) = False Then
MessageBox.Show("指定されたフォルダの存在が確認できませんでした。", "注意", MessageBoxButtons.OK)
Exit Sub
End If

ThreadEndFlag = False

Dim intx As Integer
Dim inty As Integer
Dim LV1() As String

ReDim LV1(Me.ListView1.Items.Count)
For intx = 0 To Me.ListView1.Items.Count - 1
LV1(intx) = Me.ListView1.Items.Item(intx).SubItems.Item(0).Text
Next

inty = Me.ListView1.Items.Count

Me.ListView1.Items.Clear()

Dim x As String
Dim y As ListBox
Dim z As Integer
Dim CountValue As Decimal

y = New ListBox

Dim CXML As ClassXML
CXML = New ClassXML
CXML.InputFile = Fname

Dim CFI As ClassFileInformation
CFI = New ClassFileInformation

y = CXML.SelectNodeAndGetAllOfItsChildElementsInnerTextAndPutItIntoListbox("Extensions")

Me.ImageList1.Images.Clear()

ImageList1.ImageSize = New Size(ImageWidth, ImageHeight)
ListView1.LargeImageList = ImageList1

Dim bx As Boolean = True

Dim FlagDate As Short = 0
Dim FlagSize As Short = 0
Dim FlagWidth As Short = 0
Dim FlagHeight As Short = 0

If CXML.GetXMLValue("Date") <> "Nothing" Then
FlagDate = 1
End If
If CXML.GetXMLValue("Size") <> "Nothing" Then
FlagSize = 1
End If
If CXML.GetXMLValue("Width") <> "Nothing" Then
FlagWidth = 1
End If
If CXML.GetXMLValue("Height") <> "Nothing" Then
FlagHeight = 1
End If

Dim OriginalImage As Image
Dim ThumbnailImage As Image

CountValue = 0
'For z = 0 To y.Items.Count - 1
'For Each x In System.IO.Directory.GetFiles(Me.TextBox1.Text, "*." & y.Items.Item(z))
For intx = 0 To inty - 1
If ThreadEndFlag = True Then
Exit Sub
End If
Application.DoEvents()
Try
x = LV1(intx)
DW(x)
bx = True
If FlagDate = 1 And bx = True Then
If CFI.JudgeWhetherFilesLastWrittenDayStringAreBetweenTwoDayString(x, Split(CXML.GetXMLValue("Date"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Date"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagSize = 1 And bx = True Then
If CFI.JudgeWhetherJudgingFileSizeIsBetweenTwoSize(x, Split(CXML.GetXMLValue("Size"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Size"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagWidth = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileWidthIsBetweenTwoWidth(x, Split(CXML.GetXMLValue("Width"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Width"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagHeight = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileHeightIsBetweenTwoHeight(x, Split(CXML.GetXMLValue("Height"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Height"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If bx = True Then
OriginalImage = Bitmap.FromFile(x)
ThumbnailImage = ThumbnailConverter(OriginalImage, ImageWidth, ImageHeight)
ImageList1.Images.Add(ThumbnailImage)
ListView1.Items.Add(x, CountValue)
CountValue = CountValue + 1
Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count
End If
Catch ex As Exception
DW(ex.Message)
End Try
Next
'Next

ThreadEndFlag = True

Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count

MessageBox.Show("処理が終了しました。" & vbNewLine & Me.ListView1.Items.Count & "個の画像ファイルが検索にヒットしました。", "処理の終了", MessageBoxButtons.OK)

Try
ThreadExtractImages.Abort()
Catch ex As Exception

End Try

End Sub

Function WhetherBetweenTwoDate(ByVal Objective As String, ByVal Date1 As String, ByVal Date2 As String) As Boolean

WhetherBetweenTwoDate = False

Dim x
Dim y
Dim z

x = Split(Objective, "-")
y = Split(Date1, "-")
z = Split(Date2, "-")

End Function

Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs)

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
ThreadAddImageToListView = New Threading.Thread(AddressOf AddImageToListView)
ThreadAddImageToListView.Start()
End Sub

Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click

Dim x As ListViewItem
Dim y As ListView
Dim SaveDir As String = GetXMLValue(Fname, "SaveRoot")
Dim z As String
Dim PI As Integer

If MessageBox.Show("保存先として設定されたフォルダに全ての画像ファイルを保存します。よろしいですか?", "確認", MessageBoxButtons.YesNo) = DialogResult.Yes Then
If Me.ListView1.Items.Count = 0 Then
MessageBox.Show("アルバムに画像がありません。", "確認", MessageBoxButtons.OK)
Exit Sub
End If
If System.IO.Directory.Exists(SaveDir) = True Then
ChDir(SaveDir)
Else
MessageBox.Show("保存先フォルダが存在しません。", "確認", MessageBoxButtons.OK)
Exit Sub
End If
y = Me.ListView1
For Each x In y.Items
Try
z = System.IO.Path.GetFileName(x.Text)
If System.IO.File.Exists(z) = True Then
PI = 2
While System.IO.File.Exists(z) = True
z = Split(z, ".").GetValue(0) & PI & "." & Split(z, ".").GetValue(1)
PI = PI + 1
End While
FileCopy(x.Text, z)
Else
FileCopy(x.Text, z)
End If
Catch ex As Exception

End Try
Next

MessageBox.Show("保存処理は終了しました。", "確認", MessageBoxButtons.OK)

End If

End Sub

Private Sub MenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem10.Click

Dim x As Bitmap
Dim y As Image

Try
x = Bitmap.FromFile(Me.ListView1.FocusedItem.Text)
y = x
Me.PictureBox1.Image = y
Me.PictureMode()
Catch ex As Exception

End Try


End Sub

Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click
Dim x As String
Dim y As String
Dim z As ListView = Me.ListView1
Dim SaveDir As String = GetXMLValue(Fname, "SaveRoot")
Dim PI As Integer
x = z.FocusedItem.Text
y = System.IO.Path.GetFileName(x)
If System.IO.Directory.Exists(SaveDir) = True Then
ChDir(SaveDir)
Else
MessageBox.Show("保存先フォルダが存在しません。", "確認", MessageBoxButtons.OK)
Exit Sub
End If

Try
If System.IO.File.Exists(y) = True Then
PI = 2
While System.IO.File.Exists(y) = True
y = Split(y, ".").GetValue(0) & PI & "." & Split(y, ".").GetValue(1)
PI = PI + 1
End While
FileCopy(x, y)
Else
FileCopy(x, y)
End If
Catch ex As Exception

End Try

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim SaveDir As String = GetXMLValue(Fname, "SaveRoot")
ThreadAddImageToListViewFromSaveRoot = New Threading.Thread(AddressOf AddImageToListViewFromSaveRoot)
ThreadAddImageToListViewFromSaveRoot.Start()
End Sub

Private Sub MenuItem16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem16.Click
ThreadAddImageToListView = New Threading.Thread(AddressOf AddImageToListView)
ThreadAddImageToListView.Start()
End Sub

Private Sub MenuItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem17.Click
Dim SaveDir As String = GetXMLValue(Fname, "SaveRoot")
ThreadAddImageToListViewFromSaveRoot = New Threading.Thread(AddressOf AddImageToListViewFromSaveRoot)
ThreadAddImageToListViewFromSaveRoot.Start()
End Sub

Private Sub MenuItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem13.Click
Dim x As New Form4
x.ShowDialog()
End Sub

Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem18.Click
ThreadAddImageToListViewFromDownloadRoot = New Threading.Thread(AddressOf AddImageToListViewFromDownloadRoot)
ThreadAddImageToListViewFromDownloadRoot.Start()
End Sub

Private Sub MenuItem19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem19.Click
ThreadAddImageToListView = New Threading.Thread(AddressOf AddImageToListView)
ThreadAddImageToListView.Start()
End Sub

Private Sub MenuItem20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem20.Click
ThreadAddImageToListViewFromSaveRoot = New Threading.Thread(AddressOf AddImageToListViewFromSaveRoot)
ThreadAddImageToListViewFromSaveRoot.Start()
End Sub

Private Sub MenuItem21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem21.Click
ThreadAddImageToListViewFromDownloadRoot = New Threading.Thread(AddressOf AddImageToListViewFromDownloadRoot)
ThreadAddImageToListViewFromDownloadRoot.Start()
End Sub

Private Sub MenuItem22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem22.Click
Dim x As New Form2
x.ShowDialog()
End Sub

Private Sub MenuItem24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem24.Click

If MessageBox.Show("指定した条件で画像ファイルを抽出します。よろしいですか?", "確認", MessageBoxButtons.YesNo) = DialogResult.No Then
Exit Sub
End If

If System.IO.Directory.Exists(GetXMLValue(Fname, "RootDirectory")) = False Then
MessageBox.Show("指定されたフォルダの存在が確認できませんでした。", "注意", MessageBoxButtons.OK)
Exit Sub
End If

Me.ListView1.Items.Clear()

Dim x As String
Dim CountValue As Decimal

Dim CXML As ClassXML
CXML = New ClassXML
CXML.InputFile = Fname

Dim CFI As ClassFileInformation
CFI = New ClassFileInformation

Me.ImageList1.Images.Clear()
ImageList1.ImageSize = New Size(ImageWidth, ImageHeight)
ListView1.LargeImageList = ImageList1

Dim bx As Boolean = True

Dim FlagDate As Short = 0
Dim FlagSize As Short = 0
Dim FlagWidth As Short = 0
Dim FlagHeight As Short = 0

If CXML.GetXMLValue("Date") <> "Nothing" Then
FlagDate = 1
End If
If CXML.GetXMLValue("Size") <> "Nothing" Then
FlagSize = 1
End If
If CXML.GetXMLValue("Width") <> "Nothing" Then
FlagWidth = 1
End If
If CXML.GetXMLValue("Height") <> "Nothing" Then
FlagHeight = 1
End If

CountValue = 0
For Each x In System.IO.Directory.GetFiles(GetXMLValue(Fname, "RootDirectory"), "*.jpg")
Try
bx = True
If FlagDate = 1 And bx = True Then
If CFI.JudgeWhetherFilesLastWrittenDayStringAreBetweenTwoDayString(x, Split(CXML.GetXMLValue("Date"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Date"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagSize = 1 And bx = True Then
If CFI.JudgeWhetherJudgingFileSizeIsBetweenTwoSize(x, Split(CXML.GetXMLValue("Size"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Size"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagWidth = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileWidthIsBetweenTwoWidth(x, Split(CXML.GetXMLValue("Width"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Width"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagHeight = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileHeightIsBetweenTwoHeight(x, Split(CXML.GetXMLValue("Height"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Height"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If bx = True Then
Dim original As Image = Bitmap.FromFile(x)
Dim thumbnail As Image = ThumbnailConverter(original, ImageWidth, ImageHeight)
ImageList1.Images.Add(thumbnail)
ListView1.Items.Add(x, CountValue)
original.Dispose()
thumbnail.Dispose()
CountValue = CountValue + 1
End If
Catch ex As Exception
DW(ex.message)
End Try

Next

For Each x In System.IO.Directory.GetFiles(GetXMLValue(Fname, "RootDirectory"), "*.jpeg")
Try
bx = True
If FlagDate = 1 And bx = True Then
If CFI.JudgeWhetherFilesLastWrittenDayStringAreBetweenTwoDayString(x, Split(CXML.GetXMLValue("Date"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Date"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagSize = 1 And bx = True Then
If CFI.JudgeWhetherJudgingFileSizeIsBetweenTwoSize(x, Split(CXML.GetXMLValue("Size"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Size"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagWidth = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileWidthIsBetweenTwoWidth(x, Split(CXML.GetXMLValue("Width"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Width"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagHeight = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileHeightIsBetweenTwoHeight(x, Split(CXML.GetXMLValue("Height"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Height"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If bx = True Then
Dim original As Image = Bitmap.FromFile(x)
Dim thumbnail As Image = ThumbnailConverter(original, ImageWidth, ImageHeight)
ImageList1.Images.Add(thumbnail)
ListView1.Items.Add(x, CountValue)
original.Dispose()
thumbnail.Dispose()
CountValue = CountValue + 1
End If
Catch ex As Exception
DW(ex.message)
End Try

Next

For Each x In System.IO.Directory.GetFiles(GetXMLValue(Fname, "RootDirectory"), "*.gif")
Try
bx = True
If FlagDate = 1 And bx = True Then
If CFI.JudgeWhetherFilesLastWrittenDayStringAreBetweenTwoDayString(x, Split(CXML.GetXMLValue("Date"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Date"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagSize = 1 And bx = True Then
If CFI.JudgeWhetherJudgingFileSizeIsBetweenTwoSize(x, Split(CXML.GetXMLValue("Size"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Size"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagWidth = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileWidthIsBetweenTwoWidth(x, Split(CXML.GetXMLValue("Width"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Width"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagHeight = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileHeightIsBetweenTwoHeight(x, Split(CXML.GetXMLValue("Height"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Height"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If bx = True Then
Dim original As Image = Bitmap.FromFile(x)
Dim thumbnail As Image = ThumbnailConverter(original, ImageWidth, ImageHeight)
ImageList1.Images.Add(thumbnail)
ListView1.Items.Add(x, CountValue)
original.Dispose()
thumbnail.Dispose()
CountValue = CountValue + 1
End If
Catch ex As Exception
DW(ex.Message)
End Try
Next

For Each x In System.IO.Directory.GetFiles(GetXMLValue(Fname, "RootDirectory"), "*.bmp")
Try
bx = True
If FlagDate = 1 And bx = True Then
If CFI.JudgeWhetherFilesLastWrittenDayStringAreBetweenTwoDayString(x, Split(CXML.GetXMLValue("Date"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Date"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagSize = 1 And bx = True Then
If CFI.JudgeWhetherJudgingFileSizeIsBetweenTwoSize(x, Split(CXML.GetXMLValue("Size"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Size"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagWidth = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileWidthIsBetweenTwoWidth(x, Split(CXML.GetXMLValue("Width"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Width"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If FlagHeight = 1 And bx = True Then
If CFI.JudgeWhetherJudgingImageFileHeightIsBetweenTwoHeight(x, Split(CXML.GetXMLValue("Height"), "\*\").GetValue(0), Split(CXML.GetXMLValue("Height"), "\*\").GetValue(1)) = True Then
bx = True
Else
bx = False
End If
End If
If bx = True Then
Dim original As Image = Bitmap.FromFile(x)
Dim thumbnail As Image = ThumbnailConverter(original, ImageWidth, ImageHeight)
ImageList1.Images.Add(thumbnail)
ListView1.Items.Add(x, CountValue)
original.Dispose()
thumbnail.Dispose()
CountValue = CountValue + 1
End If
Catch ex As Exception
DW(ex.Message)
End Try
Next

Me.Label2.Text = "画像ファイル数:" & Me.ListView1.Items.Count
MessageBox.Show("処理が終了しました。" & vbNewLine & Me.ListView1.Items.Count & "個の画像ファイルが検索にヒットしました。", "処理の終了", MessageBoxButtons.OK)

End Sub

Private Sub MenuItem27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem27.Click

End Sub

Private Sub MenuItem28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub MenuItem29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Sub CheckDownloadedImageAndRefreshListView()

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Me.ListViewMode()
End Sub

Private Sub MenuItem30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem30.Click
Dim x As New Form3
x.ShowDialog()
End Sub

Private Sub MenuItem32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem32.Click
If MYesNo("消去してもよろしいですか?") = True Then
Dim x As New ClassDirectory
If x.DeleteAllFiles(GetXMLValue(Fname, "SaveRoot")) = True Then
MOK("消去しました。")
Else
MOK("処理中にエラーが発生しました。")
End If
End If
End Sub

Private Sub MenuItem33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem33.Click
If MYesNo("消去してもよろしいですか?") = True Then
Dim x As New ClassDirectory
If x.DeleteAllFiles(GetXMLValue(Fname, "DownloadRoot")) = True Then
MOK("消去しました。")
Else
MOK("処理中にエラーが発生しました。")
End If
End If
End Sub

Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ThreadEndFlag = True
End Sub

Dim DownloadingDirectoryIndicaterInListViewCount As Decimal
Dim TreadDownloadingDirectoryIndicaterInListView As Threading.Thread

Sub DownloadingDirectoryIndicaterInListView()

Me.ListView1.Items.Clear()
Me.ImageList1.Images.Clear()

Dim DI As DirectoryInfo
Dim DP As String = GetXMLValue(Fname, "DownloadRoot")
Dim x As String


Dim Image As Image
Dim Image2 As Image
Dim C1 As New ClassListView
Dim BP As Bitmap
Dim ST As String = "処理中(お待ちください)"
Dim Count As Decimal

Application.DoEvents()
Me.TextBox1.Text = ST
Count = 0
Do
If ENDFLAG = True Then
Exit Do
End If
For Each x In System.IO.Directory.GetFiles(DP, "*.*")
Try
If C1.ConfirmEqualValue(Me.ListView1, x) = False Then
BP = Bitmap.FromFile(x)
Image2 = BP
Image = ThumbnailConverter(Image2, ImageWidth, ImageHeight)
Me.ImageList1.Images.Add(Image)
Me.ListView1.Items.Add(x, Count)
Count = Count + 1
End If
Catch ex As Exception
DW(ex.Message & "DownloadingDirectoryIndicaterInListView")
End Try
Next
TreadDownloadingDirectoryIndicaterInListView.Sleep(1000)
Me.TextBox1.Text = ST & ":" & Count
Loop

Me.AddImageToListViewFromDownloadRoot()

End Sub

Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub MenuItem39_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem39.Click
Me.ListViewMode()
End Sub

Private Function ListViewMode()

Me.ListView1.Visible = True
Me.PictureBox1.Visible = False
Me.Button5.Enabled = False

End Function

Private Function PictureMode()

Me.ListView1.Visible = False
Me.PictureBox1.Visible = True
Me.Button5.Enabled = True

End Function

Private Function ProcessingMode()
Me.MenuItem1.Enabled = False
Me.MenuItem7.Enabled = False
Me.MenuItem12.Enabled = False
Me.MenuItem2.Enabled = False
Me.MenuItem4.Enabled = False
Me.MenuItem27.Enabled = False
Me.MenuItem28.Enabled = False
Me.Button1.Enabled = False
Me.Button2.Enabled = True
End Function

Private Function NotProcessingMode()
Me.MenuItem1.Enabled = True
Me.MenuItem7.Enabled = True
Me.MenuItem12.Enabled = True
Me.MenuItem2.Enabled = True
Me.MenuItem4.Enabled = True
Me.MenuItem27.Enabled = True
Me.MenuItem28.Enabled = True
Me.Button1.Enabled = True
Me.Button2.Enabled = False
End Function

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

End Sub

Private Sub PictureBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.DoubleClick
Me.ListViewMode()
End Sub

Sub CheckSpideringProcess()

Dim x As New ClassRegularExpression

Do

Try
If ThreadEndFlag = False Then
Me.ProcessingMode()
Else
Me.NotProcessingMode()
End If
Catch ex As Exception

End Try

TreadCheckSpideringProcess.Sleep(1000)

Loop

End Sub

Private Sub MenuItem34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem34.Click
Dim x As New Form6
x.ShowDialog()
End Sub

Private Sub MenuItem40_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem40.Click

End Sub

Private Sub MenuItem41_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem41.Click
ThreadAddImageToListView = New Threading.Thread(AddressOf AddImageToListView)
ThreadAddImageToListView.Start()
End Sub

Private Sub MenuItem42_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem42.Click
ThreadAddImageToListViewFromSaveRoot = New Threading.Thread(AddressOf AddImageToListViewFromSaveRoot)
ThreadAddImageToListViewFromSaveRoot.Start()
End Sub

Private Sub MenuItem43_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem43.Click
ThreadAddImageToListViewFromDownloadRoot = New Threading.Thread(AddressOf AddImageToListViewFromDownloadRoot)
ThreadAddImageToListViewFromDownloadRoot.Start()
End Sub

Private Sub MenuItem28_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem28.Click

End Sub

Private Sub MenuItem29_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub MenuItem44_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem44.Click
Dim x As New Form7
x.ShowDialog()
End Sub

Private Sub MenuItem45_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem45.Click
Dim x As New Form8
x.ShowDialog()
End Sub

Private Sub MenuItem29_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem29.Click

Dim x As String

Try
x = Me.ListView1.FocusedItem.Text
x = System.IO.Path.GetDirectoryName(x)
Process.Start("explorer.exe", x)
Catch ex As Exception

End Try

End Sub


Private Sub MenuItem37_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem37.Click

Dim x As String

Try
Process.Start("explorer.exe", GetXMLValue(Fname, "SaveRoot"))
Catch ex As Exception

End Try

End Sub

Private Sub MenuItem36_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem36.Click

Dim x As String

Try
Process.Start("explorer.exe", GetXMLValue(Fname, "DownloadRoot"))
Catch ex As Exception

End Try

End Sub

Private Sub Form1_MaximumSizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.MaximumSizeChanged
'Me.TextBox1.Size = New System.Drawing.Size(1250, 19)
End Sub
End Class

Public Class Form2
Inherits System.Windows.Forms.Form

#Region " Windows フォーム デザイナで生成されたコード "

Public Sub New()
MyBase.New()

' この呼び出しは Windows フォーム デザイナで必要です。
InitializeComponent()

' InitializeComponent() 呼び出しの後に初期化を追加します。

End Sub

' Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' Windows フォーム デザイナで必要です。
Private components As System.ComponentModel.IContainer

' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。
'Windows フォーム デザイナを使って変更してください。
' コード エディタを使って変更しないでください。
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox4 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox5 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox6 As System.Windows.Forms.ComboBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton3 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton4 As System.Windows.Forms.RadioButton
Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
Friend WithEvents RadioButton5 As System.Windows.Forms.RadioButton
Friend WithEvents RadioButton6 As System.Windows.Forms.RadioButton
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents RadioButton7 As System.Windows.Forms.RadioButton
Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
Friend WithEvents RadioButton8 As System.Windows.Forms.RadioButton
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ComboBox1 = New System.Windows.Forms.ComboBox
Me.ComboBox2 = New System.Windows.Forms.ComboBox
Me.ComboBox3 = New System.Windows.Forms.ComboBox
Me.ComboBox4 = New System.Windows.Forms.ComboBox
Me.ComboBox5 = New System.Windows.Forms.ComboBox
Me.ComboBox6 = New System.Windows.Forms.ComboBox
Me.Label2 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.RadioButton3 = New System.Windows.Forms.RadioButton
Me.RadioButton4 = New System.Windows.Forms.RadioButton
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.TextBox5 = New System.Windows.Forms.TextBox
Me.TextBox6 = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.RadioButton2 = New System.Windows.Forms.RadioButton
Me.RadioButton1 = New System.Windows.Forms.RadioButton
Me.GroupBox3 = New System.Windows.Forms.GroupBox
Me.RadioButton5 = New System.Windows.Forms.RadioButton
Me.RadioButton6 = New System.Windows.Forms.RadioButton
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.Label7 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.RadioButton7 = New System.Windows.Forms.RadioButton
Me.GroupBox4 = New System.Windows.Forms.GroupBox
Me.RadioButton8 = New System.Windows.Forms.RadioButton
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.GroupBox3.SuspendLayout()
Me.GroupBox4.SuspendLayout()
Me.SuspendLayout()
'
'ComboBox1
'
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox1.Location = New System.Drawing.Point(48, 24)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(140, 20)
Me.ComboBox1.TabIndex = 1
'
'ComboBox2
'
Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox2.Location = New System.Drawing.Point(192, 24)
Me.ComboBox2.Name = "ComboBox2"
Me.ComboBox2.Size = New System.Drawing.Size(140, 20)
Me.ComboBox2.TabIndex = 2
'
'ComboBox3
'
Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox3.Location = New System.Drawing.Point(336, 24)
Me.ComboBox3.Name = "ComboBox3"
Me.ComboBox3.Size = New System.Drawing.Size(140, 20)
Me.ComboBox3.TabIndex = 3
'
'ComboBox4
'
Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox4.Location = New System.Drawing.Point(504, 24)
Me.ComboBox4.Name = "ComboBox4"
Me.ComboBox4.Size = New System.Drawing.Size(140, 20)
Me.ComboBox4.TabIndex = 6
'
'ComboBox5
'
Me.ComboBox5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox5.Location = New System.Drawing.Point(648, 24)
Me.ComboBox5.Name = "ComboBox5"
Me.ComboBox5.Size = New System.Drawing.Size(140, 20)
Me.ComboBox5.TabIndex = 5
'
'ComboBox6
'
Me.ComboBox6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox6.Location = New System.Drawing.Point(792, 24)
Me.ComboBox6.Name = "ComboBox6"
Me.ComboBox6.Size = New System.Drawing.Size(140, 20)
Me.ComboBox6.TabIndex = 4
'
'Label2
'
Me.Label2.Font = New System.Drawing.Font("MS UI Gothic", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
Me.Label2.Location = New System.Drawing.Point(480, 24)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(24, 16)
Me.Label2.TabIndex = 7
Me.Label2.Text = "〜"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.RadioButton3)
Me.GroupBox1.Controls.Add(Me.RadioButton4)
Me.GroupBox1.Controls.Add(Me.TextBox2)
Me.GroupBox1.Controls.Add(Me.TextBox1)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Location = New System.Drawing.Point(8, 152)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(472, 112)
Me.GroupBox1.TabIndex = 8
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "縦(単位:ピクセル)"
'
'RadioButton3
'
Me.RadioButton3.Checked = True
Me.RadioButton3.Location = New System.Drawing.Point(24, 72)
Me.RadioButton3.Name = "RadioButton3"
Me.RadioButton3.Size = New System.Drawing.Size(432, 16)
Me.RadioButton3.TabIndex = 13
Me.RadioButton3.TabStop = True
Me.RadioButton3.Text = "指定しない"
'
'RadioButton4
'
Me.RadioButton4.Location = New System.Drawing.Point(24, 40)
Me.RadioButton4.Name = "RadioButton4"
Me.RadioButton4.Size = New System.Drawing.Size(16, 16)
Me.RadioButton4.TabIndex = 12
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(272, 40)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(184, 19)
Me.TextBox2.TabIndex = 11
Me.TextBox2.Text = ""
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(48, 40)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(184, 19)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(48, 24)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(192, 16)
Me.Label3.TabIndex = 0
Me.Label3.Text = "縦"
'
'Label4
'
Me.Label4.Font = New System.Drawing.Font("MS UI Gothic", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
Me.Label4.Location = New System.Drawing.Point(240, 40)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(24, 16)
Me.Label4.TabIndex = 9
Me.Label4.Text = "〜"
'
'TextBox5
'
Me.TextBox5.Location = New System.Drawing.Point(272, 40)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(184, 19)
Me.TextBox5.TabIndex = 17
Me.TextBox5.Text = ""
'
'TextBox6
'
Me.TextBox6.Location = New System.Drawing.Point(48, 40)
Me.TextBox6.Name = "TextBox6"
Me.TextBox6.Size = New System.Drawing.Size(184, 19)
Me.TextBox6.TabIndex = 15
Me.TextBox6.Text = ""
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(48, 24)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(192, 16)
Me.Label5.TabIndex = 14
Me.Label5.Text = "横"
'
'Label8
'
Me.Label8.Font = New System.Drawing.Font("MS UI Gothic", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
Me.Label8.Location = New System.Drawing.Point(240, 40)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(24, 16)
Me.Label8.TabIndex = 16
Me.Label8.Text = "〜"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.RadioButton2)
Me.GroupBox2.Controls.Add(Me.RadioButton1)
Me.GroupBox2.Controls.Add(Me.ComboBox6)
Me.GroupBox2.Controls.Add(Me.Label2)
Me.GroupBox2.Controls.Add(Me.ComboBox5)
Me.GroupBox2.Controls.Add(Me.ComboBox2)
Me.GroupBox2.Controls.Add(Me.ComboBox4)
Me.GroupBox2.Controls.Add(Me.ComboBox1)
Me.GroupBox2.Controls.Add(Me.ComboBox3)
Me.GroupBox2.Location = New System.Drawing.Point(8, 16)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(944, 104)
Me.GroupBox2.TabIndex = 9
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "日付"
'
'RadioButton2
'
Me.RadioButton2.Checked = True
Me.RadioButton2.Location = New System.Drawing.Point(24, 56)
Me.RadioButton2.Name = "RadioButton2"
Me.RadioButton2.Size = New System.Drawing.Size(456, 16)
Me.RadioButton2.TabIndex = 9
Me.RadioButton2.TabStop = True
Me.RadioButton2.Text = "指定しない"
'
'RadioButton1
'
Me.RadioButton1.Location = New System.Drawing.Point(24, 24)
Me.RadioButton1.Name = "RadioButton1"
Me.RadioButton1.Size = New System.Drawing.Size(16, 16)
Me.RadioButton1.TabIndex = 8
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.RadioButton5)
Me.GroupBox3.Controls.Add(Me.RadioButton6)
Me.GroupBox3.Controls.Add(Me.TextBox3)
Me.GroupBox3.Controls.Add(Me.TextBox4)
Me.GroupBox3.Controls.Add(Me.Label7)
Me.GroupBox3.Location = New System.Drawing.Point(8, 296)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(944, 104)
Me.GroupBox3.TabIndex = 10
Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "サイズ(キロバイト)"
'
'RadioButton5
'
Me.RadioButton5.Checked = True
Me.RadioButton5.Location = New System.Drawing.Point(24, 56)
Me.RadioButton5.Name = "RadioButton5"
Me.RadioButton5.Size = New System.Drawing.Size(440, 16)
Me.RadioButton5.TabIndex = 13
Me.RadioButton5.TabStop = True
Me.RadioButton5.Text = "指定しない"
'
'RadioButton6
'
Me.RadioButton6.Location = New System.Drawing.Point(24, 24)
Me.RadioButton6.Name = "RadioButton6"
Me.RadioButton6.Size = New System.Drawing.Size(16, 16)
Me.RadioButton6.TabIndex = 12
'
'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(272, 24)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(192, 19)
Me.TextBox3.TabIndex = 11
Me.TextBox3.Text = ""
'
'TextBox4
'
Me.TextBox4.Location = New System.Drawing.Point(48, 24)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(192, 19)
Me.TextBox4.TabIndex = 1
Me.TextBox4.Text = ""
'
'Label7
'
Me.Label7.Font = New System.Drawing.Font("MS UI Gothic", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
Me.Label7.Location = New System.Drawing.Point(248, 24)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(24, 16)
Me.Label7.TabIndex = 9
Me.Label7.Text = "〜"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(8, 424)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(944, 32)
Me.Button1.TabIndex = 11
Me.Button1.Text = "上記の設定で画像抽出処理の開始"
'
'RadioButton7
'
Me.RadioButton7.Checked = True
Me.RadioButton7.Location = New System.Drawing.Point(24, 72)
Me.RadioButton7.Name = "RadioButton7"
Me.RadioButton7.Size = New System.Drawing.Size(440, 16)
Me.RadioButton7.TabIndex = 18
Me.RadioButton7.TabStop = True
Me.RadioButton7.Text = "指定しない"
'
'GroupBox4
'
Me.GroupBox4.Controls.Add(Me.RadioButton8)
Me.GroupBox4.Controls.Add(Me.Label8)
Me.GroupBox4.Controls.Add(Me.TextBox5)
Me.GroupBox4.Controls.Add(Me.TextBox6)
Me.GroupBox4.Controls.Add(Me.RadioButton7)
Me.GroupBox4.Controls.Add(Me.Label5)
Me.GroupBox4.Location = New System.Drawing.Point(480, 152)
Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(472, 112)
Me.GroupBox4.TabIndex = 19
Me.GroupBox4.TabStop = False
Me.GroupBox4.Text = "横(単位:ピクセル)"
'
'RadioButton8
'
Me.RadioButton8.Location = New System.Drawing.Point(24, 40)
Me.RadioButton8.Name = "RadioButton8"
Me.RadioButton8.Size = New System.Drawing.Size(16, 16)
Me.RadioButton8.TabIndex = 19
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.ClientSize = New System.Drawing.Size(960, 501)
Me.ControlBox = False
Me.Controls.Add(Me.GroupBox4)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form2"
Me.Text = "Form2"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox3.ResumeLayout(False)
Me.GroupBox4.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

LoadingFlag = True

Me.Text = "画像抽出設定"
Dim x
Dim y
Dim z

Dim DC As Integer

x = DateString
DW(x)
x = Split(x, "-").GetValue(0)

For y = 0 To x
z = y & "年"
ComboBox1.Items.Add(z)
ComboBox4.Items.Add(z)
Next
ComboBox1.SelectedItem = x & "年"
ComboBox4.SelectedItem = x & "年"

For y = 1 To 12
z = y & "月"
ComboBox2.Items.Add(z)
ComboBox5.Items.Add(z)
Next

ComboBox2.SelectedItem = Split(DateString, "-").GetValue(1) & "月"
ComboBox5.SelectedItem = Split(DateString, "-").GetValue(1) & "月"

If Split(x, "-").GetValue(0) \ 4 = 0 Then
DC = 29
GoTo ST1
End If

Select Case Split(DateString, "-").GetValue(1)
Case Is = 1
DC = 31
Case Is = 2
DC = 28
Case Is = 3
DC = 31
Case Is = 4
DC = 30
Case Is = 5
DC = 31
Case Is = 6
DC = 30
Case Is = 7
DC = 31
Case Is = 8
DC = 31
Case Is = 9
DC = 30
Case Is = 10
DC = 31
Case Is = 11
DC = 30
Case Is = 12
DC = 31
End Select

ST1:

For y = 1 To DC
z = y & "日"
ComboBox3.Items.Add(z)
ComboBox6.Items.Add(z)
Next
ComboBox3.SelectedItem = Split(DateString, "-").GetValue(2) & "日"
ComboBox6.SelectedItem = Split(DateString, "-").GetValue(2) & "日"

LoadSetting()

LoadingFlag = False

End Sub

Private Sub SaveSetting()

Dim x As String
Dim y As String
Dim z As String = "[0-9]+"

If Me.RadioButton3.Checked = False Then
If Me.TextBox1.Text = String.Empty Or Me.TextBox2.Text = String.Empty Then
MessageBox.Show("縦の範囲を指定してください。", "確認", MessageBoxButtons.OK)
Exit Sub
End If
End If
If Me.RadioButton5.Checked = False Then
If Me.TextBox4.Text = String.Empty Or Me.TextBox3.Text = String.Empty Then
MessageBox.Show("サイズの範囲を指定してください。", "確認", MessageBoxButtons.OK)
Exit Sub
End If
End If

Try
If Me.RadioButton2.Checked = True Then
SetXMLValue(Fname, "Date", "Nothing")
Else
x = ReturnRegex(Me.ComboBox1.SelectedItem, z) & "-" & ReturnRegex(Me.ComboBox2.SelectedItem, z) & "-" & ReturnRegex(Me.ComboBox3.SelectedItem, z)
y = ReturnRegex(Me.ComboBox4.SelectedItem, z) & "-" & ReturnRegex(Me.ComboBox5.SelectedItem, z) & "-" & ReturnRegex(Me.ComboBox6.SelectedItem, z)
SetXMLValue(Fname, "Date", x & "\*\" & y)
End If

If Me.RadioButton3.Checked = True Then
SetXMLValue(Fname, "Height", "Nothing")
Else
If Me.TextBox1.Text = String.Empty Or Me.TextBox2.Text = String.Empty Then
MessageBox.Show("縦の範囲を指定してください。", "確認", MessageBoxButtons.OK)
Exit Sub
End If
x = ReturnRegex(Me.TextBox1.Text, z) & "\*\" & ReturnRegex(Me.TextBox2.Text, z)
SetXMLValue(Fname, "Height", x)
End If

If Me.RadioButton5.Checked = True Then
SetXMLValue(Fname, "Size", "Nothing")
Else
If Me.TextBox4.Text = String.Empty Or Me.TextBox3.Text = String.Empty Then
MessageBox.Show("サイズの範囲を指定してください。", "確認", MessageBoxButtons.OK)
Exit Sub
End If
x = ReturnRegex(Me.TextBox4.Text, z) & "\*\" & ReturnRegex(Me.TextBox3.Text, z)
SetXMLValue(Fname, "Size", x)
End If

If Me.RadioButton7.Checked = True Then
SetXMLValue(Fname, "Width", "Nothing")
Else
If Me.TextBox6.Text = String.Empty Or Me.TextBox5.Text = String.Empty Then
MessageBox.Show("横の範囲を指定してください。", "確認", MessageBoxButtons.OK)
Exit Sub
End If
x = ReturnRegex(Me.TextBox6.Text, z) & "\*\" & ReturnRegex(Me.TextBox5.Text, z)
SetXMLValue(Fname, "Width", x)
End If
Catch ex As Exception
MessageBox.Show("処理中にエラーが発生しました。", "", MessageBoxButtons.OK)
End Try

Me.Close()

End Sub

Private Function LoadSetting()

LoadingFlag = True

Dim x As String
Dim y As String
Dim z() As String

Try
If GetXMLValue(Fname, "Date") = "Nothing" Then
Me.RadioButton2.Checked = True
Me.ComboBox1.Enabled = False
Me.ComboBox2.Enabled = False
Me.ComboBox3.Enabled = False
Me.ComboBox4.Enabled = False
Me.ComboBox5.Enabled = False
Me.ComboBox6.Enabled = False
Else
x = Split(GetXMLValue(Fname, "Date"), "\*\").GetValue(0)
y = Split(GetXMLValue(Fname, "Date"), "\*\").GetValue(1)
z = Split(x, "-")
Me.ComboBox1.SelectedItem = z(0) & "年"
Me.ComboBox2.SelectedItem = z(1) & "月"
Me.ComboBox3.SelectedItem = z(2) & "日"
z = Split(y, "-")
Me.ComboBox4.SelectedItem = z(0) & "年"
Me.ComboBox5.SelectedItem = z(1) & "月"
Me.ComboBox6.SelectedItem = z(2) & "日"
Me.RadioButton1.Checked = True
End If

If GetXMLValue(Fname, "Height") = "Nothing" Then
Me.RadioButton3.Checked = True
Me.TextBox1.Enabled = False
Me.TextBox2.Enabled = False
Else
z = Split(GetXMLValue(Fname, "Height"), "\*\")
Me.TextBox1.Text = z(0)
Me.TextBox2.Text = z(1)
Me.RadioButton4.Checked = True
End If

If GetXMLValue(Fname, "Width") = "Nothing" Then
Me.RadioButton7.Checked = True
Me.TextBox6.Enabled = False
Me.TextBox5.Enabled = False
Else
z = Split(GetXMLValue(Fname, "Width"), "\*\")
Me.TextBox6.Text = z(0)
Me.TextBox5.Text = z(1)
Me.RadioButton8.Checked = True
End If
ST1:
If GetXMLValue(Fname, "Size") = "Nothing" Then
Me.RadioButton5.Checked = True
Me.TextBox4.Enabled = False
Me.TextBox3.Enabled = False
Else
z = Split(GetXMLValue(Fname, "Size"), "\*\")
Me.TextBox4.Text = z(0)
Me.TextBox3.Text = z(1)
Me.RadioButton6.Checked = True
End If
Catch ex As Exception
MessageBox.Show("処理中にエラーが発生しました。", "", MessageBoxButtons.OK)
End Try

LoadingFlag = False

End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

SaveSetting()

If MYesNo("指定した条件で画像ファイルを抽出します。よろしいですか?") = True Then

ThreadExtractImages = New Threading.Thread(AddressOf Form.ExtractImages)
ThreadEndFlag = False
ThreadExtractImages.Start()
ThreadEndFlag = True
Me.Close()

Else

Me.Close()

End If

End Sub

Private Function CheckLengthAndWidthTextBoxEmptyOrNot() As Boolean
CheckLengthAndWidthTextBoxEmptyOrNot = True
If Me.TextBox1.Text = String.Empty Or Me.TextBox2.Text = String.Empty Or Me.TextBox5.Text = String.Empty Or Me.TextBox6.Text = String.Empty Then
CheckLengthAndWidthTextBoxEmptyOrNot = False
End If
End Function

Private Function CheckSizeTextBoxEmptyOrNot() As Boolean
CheckSizeTextBoxEmptyOrNot = True
If Me.TextBox3.Text = String.Empty Or Me.TextBox4.Text = String.Empty Then
CheckSizeTextBoxEmptyOrNot = False
End If
End Function

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If LoadingFlag = False Then
If Me.RadioButton1.Checked = False Then
Me.ComboBox1.Enabled = False
Me.ComboBox2.Enabled = False
Me.ComboBox3.Enabled = False
Me.ComboBox4.Enabled = False
Me.ComboBox5.Enabled = False
Me.ComboBox6.Enabled = False
Else
Me.ComboBox1.Enabled = True
Me.ComboBox2.Enabled = True
Me.ComboBox3.Enabled = True
Me.ComboBox4.Enabled = True
Me.ComboBox5.Enabled = True
Me.ComboBox6.Enabled = True
End If
End If
End Sub

Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
If LoadingFlag = False Then
If Me.RadioButton4.Checked = False Then
Me.TextBox1.Enabled = False
Me.TextBox2.Enabled = False
Else
Me.TextBox1.Enabled = True
Me.TextBox2.Enabled = True
End If
End If
End Sub

Private Sub RadioButton8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton8.CheckedChanged
If LoadingFlag = False Then
If Me.RadioButton8.Checked = False Then
Me.TextBox6.Enabled = False
Me.TextBox5.Enabled = False
Else
Me.TextBox6.Enabled = True
Me.TextBox5.Enabled = True
End If
End If
End Sub

Private Sub RadioButton6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton6.CheckedChanged
If LoadingFlag = False Then
If Me.RadioButton6.Checked = False Then
Me.TextBox4.Enabled = False
Me.TextBox3.Enabled = False
Else
Me.TextBox4.Enabled = True
Me.TextBox3.Enabled = True
End If
End If
End Sub
End Class

Public Class Form3
Inherits System.Windows.Forms.Form

#Region " Windows フォーム デザイナで生成されたコード "

Public Sub New()
MyBase.New()

' この呼び出しは Windows フォーム デザイナで必要です。
InitializeComponent()

' InitializeComponent() 呼び出しの後に初期化を追加します。

End Sub

' Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' Windows フォーム デザイナで必要です。
Private components As System.ComponentModel.IContainer

' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。
'Windows フォーム デザイナを使って変更してください。
' コード エディタを使って変更しないでください。
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents FolderBrowserDialog1 As System.Windows.Forms.FolderBrowserDialog
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.Button3 = New System.Windows.Forms.Button
Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog
Me.Button4 = New System.Windows.Forms.Button
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(336, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "保存先フォルダ設定"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 32)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.ReadOnly = True
Me.TextBox1.Size = New System.Drawing.Size(632, 19)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(96, 184)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(192, 32)
Me.Button1.TabIndex = 2
Me.Button1.Text = "OK"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(352, 184)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(192, 32)
Me.Button2.TabIndex = 3
Me.Button2.Text = "Cancel"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(16, 56)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(104, 24)
Me.Button3.TabIndex = 4
Me.Button3.Text = "選択"
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(16, 136)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(104, 24)
Me.Button4.TabIndex = 7
Me.Button4.Text = "選択"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(16, 112)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.ReadOnly = True
Me.TextBox2.Size = New System.Drawing.Size(632, 19)
Me.TextBox2.TabIndex = 6
Me.TextBox2.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 96)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(336, 16)
Me.Label2.TabIndex = 5
Me.Label2.Text = "ダウンロード保存先フォルダ設定"
'
'Form3
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.ClientSize = New System.Drawing.Size(664, 269)
Me.ControlBox = False
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Label1)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form3"
Me.Text = "保存フォルダ設定"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.Text = "保存フォルダ設定"

Try
Me.TextBox1.Text = GetXMLValue(Fname, "SaveRoot")
Catch ex As Exception

End Try

Try
Me.TextBox2.Text = GetXMLValue(Fname, "DownloadRoot")
Catch ex As Exception

End Try

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
If System.IO.Directory.Exists(Me.TextBox1.Text) = False Then
MessageBox.Show("指定されたフォルダの存在が確認できません。", "注意", MessageBoxButtons.OK)
Exit Sub
End If
If System.IO.Directory.Exists(Me.TextBox2.Text) = False Then
MessageBox.Show("指定されたフォルダの存在が確認できません。", "注意", MessageBoxButtons.OK)
Exit Sub
End If
SetXMLValue(Fname, "SaveRoot", Me.TextBox1.Text)
SetXMLValue(Fname, "DownloadRoot", Me.TextBox2.Text)
Me.Close()
Catch ex As Exception
Me.Close()
End Try
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.FolderBrowserDialog1.SelectedPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
If Me.FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
Me.TextBox1.Text = Me.FolderBrowserDialog1.SelectedPath.ToString
End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.FolderBrowserDialog1.SelectedPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
If Me.FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
Me.TextBox2.Text = Me.FolderBrowserDialog1.SelectedPath.ToString
End If
End Sub
End Class

Public Class Form4
Inherits System.Windows.Forms.Form

#Region " Windows フォーム デザイナで生成されたコード "

Public Sub New()
MyBase.New()

' この呼び出しは Windows フォーム デザイナで必要です。
InitializeComponent()

' InitializeComponent() 呼び出しの後に初期化を追加します。

End Sub

' Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' Windows フォーム デザイナで必要です。
Private components As System.ComponentModel.IContainer

' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。
'Windows フォーム デザイナを使って変更してください。
' コード エディタを使って変更しないでください。
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Button6 As System.Windows.Forms.Button
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label3 = New System.Windows.Forms.Label
Me.Button6 = New System.Windows.Forms.Button
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.ListBox1 = New System.Windows.Forms.ListBox
Me.Label1 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.ContextMenu1 = New System.Windows.Forms.ContextMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.SuspendLayout()
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(16, 16)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(104, 16)
Me.Label3.TabIndex = 17
Me.Label3.Text = "拡張子"
'
'Button6
'
Me.Button6.Location = New System.Drawing.Point(120, 48)
Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(56, 24)
Me.Button6.TabIndex = 16
Me.Button6.Text = "追加"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(120, 32)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(112, 19)
Me.TextBox2.TabIndex = 15
Me.TextBox2.Text = ""
'
'ListBox1
'
Me.ListBox1.ContextMenu = Me.ContextMenu1
Me.ListBox1.ItemHeight = 12
Me.ListBox1.Location = New System.Drawing.Point(16, 32)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(104, 160)
Me.ListBox1.TabIndex = 14
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(120, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(96, 16)
Me.Label1.TabIndex = 18
Me.Label1.Text = "新規拡張子"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(120, 168)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(56, 24)
Me.Button1.TabIndex = 19
Me.Button1.Text = "OK"
'
'ContextMenu1
'
Me.ContextMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.Text = "削除"
'
'Form4
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.ClientSize = New System.Drawing.Size(248, 229)
Me.ControlBox = False
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Button6)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.ListBox1)
Me.MaximizeBox = False
Me.Name = "Form4"
Me.Text = "拡張子設定"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New ClassXML
Dim y As ListBox
Dim z As Integer
y = New ListBox
x.InputFile = Fname
y = x.SelectNodeAndGetAllOfItsChildElementsInnerTextAndPutItIntoListbox("Extensions")
Me.ListBox1.Items.AddRange(y.Items)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As New ClassXML
x.InputFile = Fname
x.OutputFile = x.InputFile
x.SetListboxAllItemsToXMLNode(Me.ListBox1, "Extensions", "ExtensionValue")
Me.Close()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim x As New ClassListBox
Dim y As String
If InStr(Me.TextBox2.Text, ".") > 0 Then
y = Split(Me.TextBox2.Text, ".").GetValue(1)
Else
y = Me.TextBox2.Text
End If
If x.ConfirmEqualValue(Me.ListBox1, y) = False Then
Me.ListBox1.Items.Add(y)
End If
End Sub

Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
Me.ListBox1.Items.RemoveAt(Me.ListBox1.SelectedIndex)
End Sub
End Class

Public Class Form5
Inherits System.Windows.Forms.Form

#Region " Windows フォーム デザイナで生成されたコード "

Public Sub New()
MyBase.New()

' この呼び出しは Windows フォーム デザイナで必要です。
InitializeComponent()

' InitializeComponent() 呼び出しの後に初期化を追加します。

End Sub

' Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' Windows フォーム デザイナで必要です。
Private components As System.ComponentModel.IContainer

' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。
'Windows フォーム デザイナを使って変更してください。
' コード エディタを使って変更しないでください。
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ListBox1 = New System.Windows.Forms.ListBox
Me.SuspendLayout()
'
'ListBox1
'
Me.ListBox1.ItemHeight = 12
Me.ListBox1.Location = New System.Drawing.Point(8, 8)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(624, 400)
Me.ListBox1.TabIndex = 0
'
'Form5
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.ClientSize = New System.Drawing.Size(640, 413)
Me.Controls.Add(Me.ListBox1)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form5"
Me.Text = "Form5"
Me.ResumeLayout(False)

End Sub

#End Region

Dim Thread As Threading.Thread
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Sub LLVIEW()
Dim x As New ClassURLBlaster

End Sub

End Class

Public Class Form6
Inherits System.Windows.Forms.Form

#Region " Windows フォーム デザイナで生成されたコード "

Public Sub New()
MyBase.New()

' この呼び出しは Windows フォーム デザイナで必要です。
InitializeComponent()

' InitializeComponent() 呼び出しの後に初期化を追加します。

End Sub

' Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' Windows フォーム デザイナで必要です。
Private components As System.ComponentModel.IContainer

' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。
'Windows フォーム デザイナを使って変更してください。
' コード エディタを使って変更しないでください。
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents FolderBrowserDialog1 As System.Windows.Forms.FolderBrowserDialog
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Button4 = New System.Windows.Forms.Button
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.Button2 = New System.Windows.Forms.Button
Me.Button1 = New System.Windows.Forms.Button
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog
Me.SuspendLayout()
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(16, 104)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(104, 24)
Me.Button4.TabIndex = 15
Me.Button4.Text = "選択"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(16, 80)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.ReadOnly = True
Me.TextBox2.Size = New System.Drawing.Size(632, 19)
Me.TextBox2.TabIndex = 14
Me.TextBox2.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 64)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(384, 16)
Me.Label2.TabIndex = 13
Me.Label2.Text = "ダウンロード保存先フォルダ設定"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(352, 152)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(192, 32)
Me.Button2.TabIndex = 11
Me.Button2.Text = "Cancel"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(96, 152)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(192, 32)
Me.Button1.TabIndex = 10
Me.Button1.Text = "OK"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 32)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(632, 19)
Me.TextBox1.TabIndex = 9
Me.TextBox1.Text = ""
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(392, 16)
Me.Label1.TabIndex = 8
Me.Label1.Text = "画像ファイル探索レベル(値が「0」の場合終点まで無限に探索します。)"
'
'Form6
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.ClientSize = New System.Drawing.Size(664, 229)
Me.ControlBox = False
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Label1)
Me.Name = "Form6"
Me.Text = "ダウンロード設定"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try

If System.IO.Directory.Exists(Me.TextBox2.Text) = False Then
MessageBox.Show("指定されたフォルダの存在が確認できません。", "注意", MessageBoxButtons.OK)
Exit Sub
End If
SetXMLValue(Fname, "DownloadLevel", Me.TextBox1.Text)
SetXMLValue(Fname, "DownloadRoot", Me.TextBox2.Text)
Me.Close()
Catch ex As Exception
Me.Close()
End Try
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub

Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.Text = "ダウンロード設定"

Try
Me.TextBox1.Text = GetXMLValue(Fname, "DownloadLevel")
Me.TextBox2.Text = GetXMLValue(Fname, "DownloadRoot")
Catch ex As Exception

End Try

End Sub

End Class

Public Class Form7
Inherits System.Windows.Forms.Form

#Region " Windows フォーム デザイナで生成されたコード "

Public Sub New()
MyBase.New()

' この呼び出しは Windows フォーム デザイナで必要です。
InitializeComponent()

' InitializeComponent() 呼び出しの後に初期化を追加します。

End Sub

' Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' Windows フォーム デザイナで必要です。
Private components As System.ComponentModel.IContainer

' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。
'Windows フォーム デザイナを使って変更してください。
' コード エディタを使って変更しないでください。
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(216, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "収集開始URL"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 32)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(656, 19)
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 72)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(576, 16)
Me.Label2.TabIndex = 2
Me.Label2.Text = "画像ファイル探索レベル(値が「0」の場合終点まで無限に探索します。)"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(16, 88)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(360, 19)
Me.TextBox2.TabIndex = 3
Me.TextBox2.Text = ""
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(136, 152)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(128, 32)
Me.Button1.TabIndex = 4
Me.Button1.Text = "OK"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(400, 152)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(128, 32)
Me.Button2.TabIndex = 5
Me.Button2.Text = "Cancel"
'
'Form7
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.ClientSize = New System.Drawing.Size(688, 253)
Me.ControlBox = False
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Label1)
Me.Name = "Form7"
Me.Text = "Form7"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form7_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Text = "Webから画像を自動収集"
Try
Me.TextBox2.Text = GetXMLValue(Fname, "DownloadLevel")
Catch ex As Exception

End Try
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Try
Dim x As New ClassXML
Dim y As ListBox
Dim z As Integer
Dim xa As New ClassRegularExpression
y = New ListBox
x.InputFile = Fname
y = x.SelectNodeAndGetAllOfItsChildElementsInnerTextAndPutItIntoListbox("Extensions")
If xa.ConfirmURL(Me.TextBox1.Text) = True Then
SetXMLValue(Fname, "DownloadLevel", Me.TextBox2.Text)
If MYesNo("指定された設定でWeb探索を開始します。よろしいですか?") = True Then
ThreadEndFlag = False
Dim clv As New ClassLinkerVolt
clv.VoltLevel = Me.TextBox2.Text
clv.PublicDisplayingLabel = Form.Label2
clv.StartURL = Me.TextBox1.Text
clv.ImageCollectorDownloadingFileExtensionList = y
clv.CollectorList = Form.ListBox1
clv.SearchURLList = Form.ListBox2
clv.ExcludeURLList = Form.ListBox3
clv.ExcludeItemList = Form.ListBox4
clv.PublicDisplayingImageList = Form.ImageList1
clv.PublicDisplayingListView = Form.ListView1
clv.DownloadDirectory = GetXMLValue(Fname, "DownloadRoot")
'Form.TextBox1.Text = clv.DownloadDirectory
ThreadImageCollectorThreadFromWeb = New Threading.Thread(AddressOf clv.ImageCollectorThreadFromWeb)
clv.LinkerVoltThreadImageCollectorThreadFromWeb = ThreadImageCollectorThreadFromWeb
ThreadImageCollectorThreadFromWeb.Start()
Me.Close()
Else
Exit Sub
End If
Else
MOK("URLが不正もしくは入力されていません。")
Exit Sub
End If
Catch ex As Exception

End Try

End Sub

End Class

Public Class Form8
Inherits System.Windows.Forms.Form

#Region " Windows フォーム デザイナで生成されたコード "

Public Sub New()
MyBase.New()

' この呼び出しは Windows フォーム デザイナで必要です。
InitializeComponent()

' InitializeComponent() 呼び出しの後に初期化を追加します。

End Sub

' Form は、コンポーネント一覧に後処理を実行するために dispose をオーバーライドします。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

' Windows フォーム デザイナで必要です。
Private components As System.ComponentModel.IContainer

' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。
'Windows フォーム デザイナを使って変更してください。
' コード エディタを使って変更しないでください。
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents FolderBrowserDialog1 As System.Windows.Forms.FolderBrowserDialog
Friend WithEvents Button3 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Button2 = New System.Windows.Forms.Button
Me.Button1 = New System.Windows.Forms.Button
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog
Me.Button3 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(400, 176)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(128, 32)
Me.Button2.TabIndex = 11
Me.Button2.Text = "Cancel"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(136, 176)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(128, 32)
Me.Button1.TabIndex = 10
Me.Button1.Text = "OK"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(16, 112)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(360, 19)
Me.TextBox2.TabIndex = 9
Me.TextBox2.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 96)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(576, 16)
Me.Label2.TabIndex = 8
Me.Label2.Text = "画像ファイル探索レベル(値が「0」の場合終点まで無限に探索します。)"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 32)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(656, 19)
Me.TextBox1.TabIndex = 7
Me.TextBox1.Text = ""
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(216, 16)
Me.Label1.TabIndex = 6
Me.Label1.Text = "探索開始フォルダ"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(16, 56)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(120, 24)
Me.Button3.TabIndex = 12
Me.Button3.Text = "選択"
'
'Form8
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.ClientSize = New System.Drawing.Size(688, 277)
Me.ControlBox = False
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Label1)
Me.Name = "Form8"
Me.Text = "Form8"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form8_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Text = "ハードディスクから画像を探索収集"
Try
Me.TextBox2.Text = GetXMLValue(Fname, "DownloadLevel")
Catch ex As Exception

End Try
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Try
Dim x As New ClassXML
Dim y As ListBox
Dim z As Integer
Dim xa As New ClassRegularExpression
y = New ListBox
x.InputFile = Fname
y = x.SelectNodeAndGetAllOfItsChildElementsInnerTextAndPutItIntoListbox("Extensions")
If System.IO.Directory.Exists(Me.TextBox1.Text) = True Then
SetXMLValue(Fname, "DownloadLevel", Me.TextBox2.Text)
If MYesNo("指定された設定でハードディスク探索を開始します。よろしいですか?") = True Then
ThreadEndFlag = False
Dim clv As New ClassLinkerVolt
clv.VoltLevel = Me.TextBox2.Text
clv.PublicDisplayingLabel = Form.Label2
clv.StartURL = Me.TextBox1.Text
clv.ImageCollectorDownloadingFileExtensionList = y
clv.CollectorList = Form.ListBox1
clv.SearchURLList = Form.ListBox2
clv.ExcludeURLList = Form.ListBox3
clv.ExcludeItemList = Form.ListBox4
clv.PublicDisplayingImageList = Form.ImageList1
clv.PublicDisplayingListView = Form.ListView1
clv.DownloadDirectory = GetXMLValue(Fname, "DownloadRoot")
'Form.TextBox1.Text = Me.TextBox1.Text
ThreadImageCollectorThreadFromHardDisk = New Threading.Thread(AddressOf clv.ImageCollectorThreadFromHardDisk)
clv.LinkerVoltThreadImageCollectorThreadFromHardDisk = ThreadImageCollectorThreadFromHardDisk
ThreadImageCollectorThreadFromHardDisk.Start()
Me.Close()
Else
Exit Sub
End If
Else
MOK("フォルダが不正もしくは入力されていません。")
Exit Sub
End If
Catch ex As Exception

End Try

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.FolderBrowserDialog1.RootFolder = Environment.SpecialFolder.Desktop
If Me.FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
Me.TextBox1.Text = Me.FolderBrowserDialog1.SelectedPath
End If
End Sub

End Class

Rydia〜紹介ページへ戻る

(Copyright (C) Hee Cheong Lee All Rights Reserved.)