Tables("数据").current("HTML_题目") = EditorHelper.BodyHTML
'******获取截图新文件*********
Dim proc As new Process
proc.File = ApplicationPath & "capture.exe"
proc.WaitForClose = True
proc.Start
If ClipBoard.GetImage IsNot Nothing Then
ClipBoard.GetImage.save("d:\test.jpg")
'*****判断ftbqtemp临时目录是否存在
If FileSys.DirectoryExists(ProjectPath & "\FTbqtemp") = False Then '如果目录不存在
FileSys.CreateDirectory(ProjectPath & "\FTbqtemp") '则创建
End If
'**********复制并重命名文件*********
Dim wjm As String = "WYT" & CStr(Tables("数据").current.DataRow("_Identify"))
wjm = wjm & CStr(FileSys.GetFiles(ProjectPath & "/FTbqtemp").Count + 1)
Dim ifo As new FileInfo("d:\test.jpg")
Dim wj = wjm & ifo.Extension
Dim xdlj As String = "../FTbqtemp/" & wjm & ifo.Extension
wjm = ProjectPath & "FTbqtemp/" & wjm & ifo.Extension
FileSys.CopyFile("d:\test.jpg",wjm,True)
'********调用HTML编辑器***********
Dim wbs1 As Object = e.Form.Controls("WebBrowser1").basecontrol
wbs1.Url = new System.Uri(ProjectPath & "kindeditor\e.HTML", System.UriKind.Absolute)
EditorHelper = new ObjectForScriptingHelper
wbs1.ObjectForScripting = EditorHelper
'修改HTML题目
With Tables("数据")
.Current("HTML_题目") = .Current("HTML_题目") & "<img alt="""" src=""" & xdlj & """ /><p>"
EditorHelper.RequestContent( .current("HTML_题目"))
Dim ls = .Current.DataRow.lines("题目图片")
ls.add(wj)
.Current.DataRow.lines("题目图片") = ls
End With
End If
Dim wbs As Object = e.Form.Controls("WebBrowser1").basecontrol
wbs.Url = new System.Uri(ProjectPath & "kindeditor\e.HTML", System.UriKind.Absolute)
EditorHelper = new ObjectForScriptingHelper
wbs.ObjectForScripting = EditorHelper
''修改HTML题目
With Tables("数据")
EditorHelper.RequestContent( .current("HTML_题目"))
End With