46 lines
1.7 KiB
VB.net
46 lines
1.7 KiB
VB.net
Imports System.ComponentModel
|
||
Imports System.IO
|
||
Public Class Form176
|
||
Dim dl As Integer = 1
|
||
Private Sub Form176_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||
Dim lines1a() As String = File.ReadAllLines(théme)
|
||
|
||
If lines1a(0) = 2 Then
|
||
Me.BackColor = Color.FromArgb(64, 64, 64)
|
||
ElseIf lines1a(0) = 3 Then
|
||
Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
||
Else
|
||
|
||
End If
|
||
BackgroundWorker1.RunWorkerAsync()
|
||
End Sub
|
||
|
||
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
|
||
For Each fichier As String In IO.Directory.GetFiles(repertoireavis)
|
||
Dim info As New IO.FileInfo(fichier)
|
||
File.Delete(fichier)
|
||
Next
|
||
|
||
For Each fichier1 As String In IO.Directory.GetDirectories(repertoireavis)
|
||
Dim info As New IO.FileInfo(fichier1)
|
||
Directory.Delete(fichier1, recursive:=True)
|
||
Next
|
||
Compression.ZipFile.ExtractToDirectory(importconfig, repertoireavis)
|
||
dl = 0
|
||
End Sub
|
||
|
||
Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
|
||
MsgBox("Importation terminer, un redémarrage est nécessaire", MsgBoxStyle.Information)
|
||
Process.Start("rememarage.exe")
|
||
End
|
||
End Sub
|
||
|
||
Private Sub Form176_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||
If dl = 1 Then
|
||
e.Cancel = True
|
||
MsgBox("L’importation est en cours merci de patientez", MsgBoxStyle.Exclamation)
|
||
Else
|
||
|
||
End If
|
||
End Sub
|
||
End Class |