@@ -27,6 +27,7 @@ | ||
27 | 27 | Me.Button2 = New System.Windows.Forms.Button() |
28 | 28 | Me.Button3 = New System.Windows.Forms.Button() |
29 | 29 | Me.Button4 = New System.Windows.Forms.Button() |
30 | + Me.Button6 = New System.Windows.Forms.Button() | |
30 | 31 | Me.SuspendLayout() |
31 | 32 | ' |
32 | 33 | 'Button5 |
@@ -74,11 +75,21 @@ | ||
74 | 75 | Me.Button4.Text = "NCX Dep 2" |
75 | 76 | Me.Button4.UseVisualStyleBackColor = True |
76 | 77 | ' |
78 | + 'Button6 | |
79 | + ' | |
80 | + Me.Button6.Location = New System.Drawing.Point(378, 350) | |
81 | + Me.Button6.Name = "Button6" | |
82 | + Me.Button6.Size = New System.Drawing.Size(173, 69) | |
83 | + Me.Button6.TabIndex = 21 | |
84 | + Me.Button6.Text = "El His Mon" | |
85 | + Me.Button6.UseVisualStyleBackColor = True | |
86 | + ' | |
77 | 87 | 'AutoEpub8 |
78 | 88 | ' |
79 | 89 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) |
80 | 90 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font |
81 | 91 | Me.ClientSize = New System.Drawing.Size(800, 450) |
92 | + Me.Controls.Add(Me.Button6) | |
82 | 93 | Me.Controls.Add(Me.Button4) |
83 | 94 | Me.Controls.Add(Me.Button3) |
84 | 95 | Me.Controls.Add(Me.Button2) |
@@ -95,4 +106,5 @@ | ||
95 | 106 | Friend WithEvents Button2 As Button |
96 | 107 | Friend WithEvents Button3 As Button |
97 | 108 | Friend WithEvents Button4 As Button |
109 | + Friend WithEvents Button6 As Button | |
98 | 110 | End Class |
@@ -192,6 +192,30 @@ | ||
192 | 192 | |
193 | 193 | End Sub |
194 | 194 | |
195 | + Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click | |
195 | 196 | |
197 | + | |
198 | + Dim sChapter As String = cTools.sFileReader("C:/Users/DTC_PC07/Downloads/Jhis/OEBPS/text00012.html", cEpub6.encUTF8) | |
199 | + | |
200 | + Dim apHtml As HtmlAgilityPack.HtmlDocument = New HtmlAgilityPack.HtmlDocument() | |
201 | + apHtml.LoadHtml(sChapter) | |
202 | + | |
203 | + Dim listHdr = apHtml.DocumentNode.Descendants.Where(Function(x) x.Name = "img") | |
204 | + | |
205 | + For Each ukke As HtmlAgilityPack.HtmlNode In listHdr | |
206 | + | |
207 | + | |
208 | + Dim kke = ukke.OuterHtml | |
209 | + Dim kk21 = ukke.InnerHtml | |
210 | + | |
211 | + | |
212 | + | |
213 | + Next | |
214 | + | |
215 | + | |
216 | + | |
217 | + | |
218 | + | |
219 | + End Sub | |
196 | 220 | End Class |
197 | 221 |
@@ -56,7 +56,7 @@ | ||
56 | 56 | mSection.Scr = ncxSection.content.src |
57 | 57 | Dim sPath As String = Path.Combine(bookPath, mSection.Scr).Split("#").ToList(0) |
58 | 58 | Dim sTemp As String = sFileEditRead(sPath, emEpub6.emDep.Dep0) |
59 | - Dim listText As List(Of String) = cTools.listText_P(sTemp, listMobiRight) | |
59 | + Dim listText As List(Of String) = GetListText(sTemp) | |
60 | 60 | mSection.listText = listText |
61 | 61 | mEpub.Add(mSection) |
62 | 62 | Continue For |
@@ -82,7 +82,7 @@ | ||
82 | 82 | mVolume.Scr = ncxVolume.content.src |
83 | 83 | Dim sPath As String = Path.Combine(bookPath, mVolume.Scr).Split("#").ToList(0) |
84 | 84 | Dim sTemp As String = sFileEditRead(sPath, emEpub6.emDep.Dep0) |
85 | - Dim listText As List(Of String) = cTools.listText_P(sTemp, listMobiRight) | |
85 | + Dim listText As List(Of String) = GetListText(sTemp) | |
86 | 86 | mVolume.listText = listText |
87 | 87 | mSection.listVolume.Add(mVolume) |
88 | 88 | Continue For |
@@ -106,7 +106,7 @@ | ||
106 | 106 | Dim sPath As String = Path.Combine(bookPath, mChapter.Scr).Split("#").ToList(0) |
107 | 107 | |
108 | 108 | Dim sChapter As String = sFileEditRead(sPath, emEpub6.emDep.Dep3) |
109 | - Dim listText As List(Of String) = cTools.listText_P(sChapter, listMobiRight) | |
109 | + Dim listText As List(Of String) = GetListText(sChapter) | |
110 | 110 | |
111 | 111 | mChapter.listText = listText |
112 | 112 |
@@ -394,6 +394,24 @@ | ||
394 | 394 | End Sub |
395 | 395 | |
396 | 396 | |
397 | + Private Function GetListText(ByVal sHtml) As List(Of String) | |
397 | 398 | |
399 | + GetListText = New List(Of String) | |
400 | + Dim apHtml As HtmlAgilityPack.HtmlDocument = New HtmlAgilityPack.HtmlDocument() | |
401 | + apHtml.LoadHtml(sHtml) | |
402 | + Dim listHtmlNode = apHtml.DocumentNode.Descendants.Where(Function(x) x.Name = "p" OrElse x.Name = "h3" OrElse x.Name = "img") | |
403 | + For Each uHtmlNode As HtmlAgilityPack.HtmlNode In listHtmlNode | |
404 | + Dim sTarget As String = uHtmlNode.InnerHtml | |
405 | + If listMobiRight.Any(Function(x) sTarget.Contains(x)) Then | |
406 | + sTarget = sTarget + emEpub6.spDl_Right | |
407 | + End If | |
408 | + GetListText.Add(sTarget) | |
398 | 409 | |
410 | + Next | |
411 | + | |
412 | + End Function | |
413 | + | |
414 | + | |
415 | + | |
416 | + | |
399 | 417 | End Class |