2024y .
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Public Class frm_batch
|
||||
|
||||
Public heatpumpcalc As Boolean = False
|
||||
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles btPath.Click
|
||||
Dim fd As New FolderBrowserDialog()
|
||||
If fd.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
@@ -26,7 +27,7 @@
|
||||
Return
|
||||
End If
|
||||
|
||||
|
||||
heatpumpcalc = False
|
||||
DialogResult = Windows.Forms.DialogResult.OK
|
||||
|
||||
|
||||
@@ -35,4 +36,27 @@
|
||||
Private Sub frm_Macro_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click_1(sender As System.Object, e As System.EventArgs) Handles Button1.Click
|
||||
'//calc
|
||||
Dim di As New System.IO.DirectoryInfo(tbPath.Text)
|
||||
If di.Exists = False Then
|
||||
MsgBox("no folder")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim files1() As System.IO.FileInfo
|
||||
Dim files2() As System.IO.FileInfo
|
||||
|
||||
files1 = di.GetFiles("*.tpl", IO.SearchOption.TopDirectoryOnly)
|
||||
files2 = di.GetFiles("*.tplx", IO.SearchOption.TopDirectoryOnly)
|
||||
|
||||
If files1.Length < 1 AndAlso files2.Length < 1 Then
|
||||
MsgBox("no file")
|
||||
Return
|
||||
End If
|
||||
|
||||
heatpumpcalc = True
|
||||
DialogResult = Windows.Forms.DialogResult.OK
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user