ATEZ Integration MIC, TC, MODAL
This commit is contained in:
@@ -114,14 +114,25 @@ Public Class UPDATERfrm
|
||||
|
||||
' If Not cut_file(File).Contains("AVISOUPDATER") And Not cut_file(File).Contains("NOT_DEL_") Then
|
||||
|
||||
'----------------------------------------
|
||||
'If CopyIncremental Then
|
||||
' cProgrammeUpdate.copyProgramLIST(F, AppDomain.CurrentDomain.BaseDirectory, {"AVISOUPDATER", "NOT_DEL_", "Standort.txt"})
|
||||
'Else
|
||||
' delFiles()
|
||||
' FileCopier()
|
||||
'End If
|
||||
'----------------------------------------
|
||||
|
||||
If CopyIncremental Then
|
||||
cProgrammeUpdate.copyProgramLIST(F, AppDomain.CurrentDomain.BaseDirectory, {"AVISOUPDATER", "NOT_DEL_", "Standort.txt"})
|
||||
|
||||
cProgrammeUpdate.copyProgramLIST(F, AppDomain.CurrentDomain.BaseDirectory, {"AVISOUPDATER", "NOT_DEL_", "Standort.txt"}, AddressOf UpdateProgress)
|
||||
|
||||
Else
|
||||
|
||||
delFiles()
|
||||
FileCopier()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "AVISO.exe") Then
|
||||
@@ -146,6 +157,37 @@ Public Class UPDATERfrm
|
||||
Environment.Exit(0)
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateProgress(percent As Integer, status As String)
|
||||
|
||||
If Me.InvokeRequired Then
|
||||
|
||||
Me.Invoke(
|
||||
New Action(Of Integer, String)(AddressOf UpdateProgress),
|
||||
percent,
|
||||
status
|
||||
)
|
||||
|
||||
Return
|
||||
|
||||
End If
|
||||
|
||||
|
||||
percent = Math.Max(0, Math.Min(100, percent))
|
||||
|
||||
ProgressBar.Minimum = 0
|
||||
ProgressBar.Maximum = 100
|
||||
ProgressBar.Value = percent
|
||||
|
||||
m_Label.Text = percent.ToString() & "%"
|
||||
|
||||
If status <> "" Then
|
||||
RichTextBox.AppendText(status & Environment.NewLine)
|
||||
RichTextBox.SelectionStart = RichTextBox.TextLength
|
||||
RichTextBox.ScrollToCaret()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Function getFByIP() As String
|
||||
Dim default_F = ""
|
||||
getFByIP = ""
|
||||
@@ -490,6 +532,33 @@ Public Class UPDATERfrm
|
||||
Return bAns
|
||||
End Function
|
||||
|
||||
Private Sub SetProgress(value As Integer, Optional status As String = "")
|
||||
If Me.InvokeRequired Then
|
||||
Me.Invoke(New Action(Of Integer, String)(AddressOf SetProgress), value, status)
|
||||
Return
|
||||
End If
|
||||
|
||||
value = Math.Max(0, Math.Min(100, value))
|
||||
|
||||
ProgressBar.Minimum = 0
|
||||
ProgressBar.Maximum = 100
|
||||
ProgressBar.Value = value
|
||||
|
||||
m_Label.Text = value.ToString() & "%"
|
||||
|
||||
If status <> "" Then
|
||||
writeLine(RichTextBox, "[" & value.ToString() & "%] " & status)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub SetStatus(text As String)
|
||||
If Me.InvokeRequired Then
|
||||
Me.Invoke(New Action(Of String)(AddressOf SetStatus), text)
|
||||
Return
|
||||
End If
|
||||
|
||||
writeLine(RichTextBox, text)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user