diff --git a/ISEN-Repair Inventory Manager/Main.vb b/ISEN-Repair Inventory Manager/Main.vb index 1a48376..3302a78 100644 --- a/ISEN-Repair Inventory Manager/Main.vb +++ b/ISEN-Repair Inventory Manager/Main.vb @@ -422,4 +422,13 @@ Public Class Main ListAllInv() log.Info("DB importé avec succès") End Sub + + Private Sub QuitterToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles QuitterToolStripMenuItem.Click + If MsgBox("Souhaitez-vous faire une backup de la DB ?", 292, "Backup") = 7 Then End + + If Not My.Computer.FileSystem.DirectoryExists(localAppData & "backups") Then My.Computer.FileSystem.CreateDirectory(localAppData & "backups") + File.Copy(dbLocFile, localAppData & "backups\" & DateTime.Now.ToString("yyyy-MM-dd_HH.mm") & ".sqlite") + log.Info("Backup de la DB") + End + End Sub End Class diff --git a/ISEN-Repair Inventory Manager/My Project/AssemblyInfo.vb b/ISEN-Repair Inventory Manager/My Project/AssemblyInfo.vb index b73f933..fe903aa 100644 --- a/ISEN-Repair Inventory Manager/My Project/AssemblyInfo.vb +++ b/ISEN-Repair Inventory Manager/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' en utilisant '*', comme indiqué ci-dessous : ' - - + +