From 169b73563a024a20ca26d00e58954605b1a9b2b8 Mon Sep 17 00:00:00 2001 From: JackCarterSmith Date: Mon, 29 May 2017 15:55:57 +0200 Subject: [PATCH] Fix some incoherence in main GUI, add GUI for adding computer --- .../AddMachine.Designer.vb | 74 ++++++++- ISEN-Repair Inventory Manager/AddMachine.resx | 120 +++++++++++++++ ISEN-Repair Inventory Manager/AddMachine.vb | 6 + .../AddMachine_2.Designer.vb | 37 +++++ .../AddMachine_2.resx | 120 +++++++++++++++ ISEN-Repair Inventory Manager/AddMachine_2.vb | 5 + .../ISEN-Repair Inventory Manager.vbproj | 21 ++- .../Main.Designer.vb | 145 ++++++------------ ISEN-Repair Inventory Manager/Main.resx | 6 - ISEN-Repair Inventory Manager/Main.vb | 38 ++--- SQLite-db_create tables.txt | 22 +++ 11 files changed, 465 insertions(+), 129 deletions(-) create mode 100644 ISEN-Repair Inventory Manager/AddMachine.resx create mode 100644 ISEN-Repair Inventory Manager/AddMachine_2.Designer.vb create mode 100644 ISEN-Repair Inventory Manager/AddMachine_2.resx create mode 100644 ISEN-Repair Inventory Manager/AddMachine_2.vb create mode 100644 SQLite-db_create tables.txt diff --git a/ISEN-Repair Inventory Manager/AddMachine.Designer.vb b/ISEN-Repair Inventory Manager/AddMachine.Designer.vb index b80ba1d..b99b1ff 100644 --- a/ISEN-Repair Inventory Manager/AddMachine.Designer.vb +++ b/ISEN-Repair Inventory Manager/AddMachine.Designer.vb @@ -22,8 +22,78 @@ Partial Class AddMachine 'Ne la modifiez pas à l'aide de l'éditeur de code. _ Private Sub InitializeComponent() - components = New System.ComponentModel.Container + Me.Label1 = New System.Windows.Forms.Label() + Me.MaskedTextBox1 = New System.Windows.Forms.MaskedTextBox() + Me.CancelButton = New System.Windows.Forms.Button() + Me.NextButton = New System.Windows.Forms.Button() + Me.SuspendLayout() + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label1.Location = New System.Drawing.Point(17, 9) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(331, 62) + Me.Label1.TabIndex = 100 + Me.Label1.Text = "Scanner un ID" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ou entrez le manuellement" + Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + ' + 'MaskedTextBox1 + ' + Me.MaskedTextBox1.AllowDrop = True + Me.MaskedTextBox1.AsciiOnly = True + Me.MaskedTextBox1.BeepOnError = True + Me.MaskedTextBox1.Location = New System.Drawing.Point(134, 92) + Me.MaskedTextBox1.Mask = "9999999999" + Me.MaskedTextBox1.Name = "MaskedTextBox1" + Me.MaskedTextBox1.Size = New System.Drawing.Size(100, 20) + Me.MaskedTextBox1.TabIndex = 0 + Me.MaskedTextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center + ' + 'CancelButton + ' + Me.CancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel + Me.CancelButton.Location = New System.Drawing.Point(146, 132) + Me.CancelButton.Name = "CancelButton" + Me.CancelButton.Size = New System.Drawing.Size(75, 23) + Me.CancelButton.TabIndex = 2 + Me.CancelButton.Text = "Annuler" + Me.CancelButton.UseVisualStyleBackColor = True + ' + 'NextButton + ' + Me.NextButton.Location = New System.Drawing.Point(273, 132) + Me.NextButton.Name = "NextButton" + Me.NextButton.Size = New System.Drawing.Size(75, 23) + Me.NextButton.TabIndex = 1 + Me.NextButton.Text = "Suivant" + Me.NextButton.UseVisualStyleBackColor = True + ' + 'AddMachine + ' + Me.AcceptButton = Me.NextButton + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Text = "AddMachine" + Me.CancelButton = Me.CancelButton + Me.CausesValidation = False + Me.ClientSize = New System.Drawing.Size(360, 167) + Me.Controls.Add(Me.NextButton) + Me.Controls.Add(Me.CancelButton) + Me.Controls.Add(Me.MaskedTextBox1) + Me.Controls.Add(Me.Label1) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "AddMachine" + Me.ShowIcon = False + Me.Text = "Ajouter un ordinateur" + Me.ResumeLayout(False) + Me.PerformLayout() + End Sub + + Friend WithEvents Label1 As Label + Friend WithEvents MaskedTextBox1 As MaskedTextBox + Friend WithEvents CancelButton As Button + Friend WithEvents NextButton As Button End Class diff --git a/ISEN-Repair Inventory Manager/AddMachine.resx b/ISEN-Repair Inventory Manager/AddMachine.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ISEN-Repair Inventory Manager/AddMachine.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ISEN-Repair Inventory Manager/AddMachine.vb b/ISEN-Repair Inventory Manager/AddMachine.vb index 3d6dd9a..b29d9a6 100644 --- a/ISEN-Repair Inventory Manager/AddMachine.vb +++ b/ISEN-Repair Inventory Manager/AddMachine.vb @@ -1,3 +1,9 @@ Public Class AddMachine + Private Sub AddMachine_Load(sender As Object, e As EventArgs) Handles MyBase.Load + End Sub + + Private Sub CancelButton_Click(sender As Object, e As EventArgs) Handles CancelButton.Click + Me.Close() + End Sub End Class \ No newline at end of file diff --git a/ISEN-Repair Inventory Manager/AddMachine_2.Designer.vb b/ISEN-Repair Inventory Manager/AddMachine_2.Designer.vb new file mode 100644 index 0000000..0dbab03 --- /dev/null +++ b/ISEN-Repair Inventory Manager/AddMachine_2.Designer.vb @@ -0,0 +1,37 @@ + _ +Partial Class AddMachine_2 + Inherits System.Windows.Forms.Form + + 'Form remplace la méthode Dispose pour nettoyer la liste des composants. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Requise par le Concepteur Windows Form + Private components As System.ComponentModel.IContainer + + 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form + 'Elle peut être modifiée à l'aide du Concepteur Windows Form. + 'Ne la modifiez pas à l'aide de l'éditeur de code. + _ + Private Sub InitializeComponent() + Me.SuspendLayout() + ' + 'AddMachine_2 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(284, 261) + Me.Name = "AddMachine_2" + Me.Text = "AddMachine_2" + Me.ResumeLayout(False) + + End Sub +End Class diff --git a/ISEN-Repair Inventory Manager/AddMachine_2.resx b/ISEN-Repair Inventory Manager/AddMachine_2.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ISEN-Repair Inventory Manager/AddMachine_2.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ISEN-Repair Inventory Manager/AddMachine_2.vb b/ISEN-Repair Inventory Manager/AddMachine_2.vb new file mode 100644 index 0000000..5e59eee --- /dev/null +++ b/ISEN-Repair Inventory Manager/AddMachine_2.vb @@ -0,0 +1,5 @@ +Public Class AddMachine_2 + Private Sub AddMachine_2_Load(sender As Object, e As EventArgs) Handles MyBase.Load + + End Sub +End Class \ No newline at end of file diff --git a/ISEN-Repair Inventory Manager/ISEN-Repair Inventory Manager.vbproj b/ISEN-Repair Inventory Manager/ISEN-Repair Inventory Manager.vbproj index 4413374..8b85b67 100644 --- a/ISEN-Repair Inventory Manager/ISEN-Repair Inventory Manager.vbproj +++ b/ISEN-Repair Inventory Manager/ISEN-Repair Inventory Manager.vbproj @@ -32,7 +32,7 @@ false true true - bin\Release\ + ..\..\..\Mes Builds\ISEN-Repair Inventory Manager\ ISEN-Repair Inventory Manager.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 @@ -51,6 +51,12 @@ InvManLogo.ico + + true + + + JCS.pfx + @@ -92,6 +98,12 @@ Form + + AddMachine_2.vb + + + Form + Form @@ -125,6 +137,12 @@ About.vb + + AddMachine.vb + + + AddMachine_2.vb + Main.vb @@ -139,6 +157,7 @@ + MyApplicationCodeGenerator Application.Designer.vb diff --git a/ISEN-Repair Inventory Manager/Main.Designer.vb b/ISEN-Repair Inventory Manager/Main.Designer.vb index 7377f81..a59812b 100644 --- a/ISEN-Repair Inventory Manager/Main.Designer.vb +++ b/ISEN-Repair Inventory Manager/Main.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class Main Inherits System.Windows.Forms.Form 'Form remplace la méthode Dispose pour nettoyer la liste des composants. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,7 +20,7 @@ Partial Class Main 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form 'Elle peut être modifiée à l'aide du Concepteur Windows Form. 'Ne la modifiez pas à l'aide de l'éditeur de code. - _ + Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Main)) Me.MenuStrip1 = New System.Windows.Forms.MenuStrip() @@ -28,9 +28,6 @@ Partial Class Main Me.AjouterUnPCToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.QuitterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.BackUpToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ImporterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.ExporterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.StatusLabel = New System.Windows.Forms.ToolStripStatusLabel() @@ -40,7 +37,6 @@ Partial Class Main Me.SendOutButton = New System.Windows.Forms.Button() Me.TrashButton = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() - Me.IDBox = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() @@ -63,14 +59,12 @@ Partial Class Main Me.ProgressBar1 = New System.Windows.Forms.ProgressBar() Me.Label6 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() - Me.TextBox1 = New System.Windows.Forms.TextBox() - Me.TextBox2 = New System.Windows.Forms.TextBox() + Me.Mem = New System.Windows.Forms.TextBox() Me.GroupBox3 = New System.Windows.Forms.GroupBox() - Me.OSChoice = New System.Windows.Forms.TextBox() - Me.TextBox3 = New System.Windows.Forms.TextBox() + Me.OS = New System.Windows.Forms.TextBox() + Me.Arch = New System.Windows.Forms.TextBox() Me.EditButton = New System.Windows.Forms.Button() - Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() - Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog() + Me.IDBox = New System.Windows.Forms.MaskedTextBox() Me.MenuStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout() Me.GroupBox1.SuspendLayout() @@ -80,7 +74,7 @@ Partial Class Main ' 'MenuStrip1 ' - Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FichierToolStripMenuItem, Me.BackUpToolStripMenuItem, Me.ToolStripMenuItem1}) + Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FichierToolStripMenuItem, Me.ToolStripMenuItem1}) Me.MenuStrip1.Location = New System.Drawing.Point(0, 0) Me.MenuStrip1.Name = "MenuStrip1" Me.MenuStrip1.Size = New System.Drawing.Size(875, 24) @@ -97,39 +91,20 @@ Partial Class Main 'AjouterUnPCToolStripMenuItem ' Me.AjouterUnPCToolStripMenuItem.Name = "AjouterUnPCToolStripMenuItem" - Me.AjouterUnPCToolStripMenuItem.Size = New System.Drawing.Size(148, 22) + Me.AjouterUnPCToolStripMenuItem.Size = New System.Drawing.Size(152, 22) Me.AjouterUnPCToolStripMenuItem.Text = "Ajouter un PC" ' 'ToolStripSeparator1 ' Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(145, 6) + Me.ToolStripSeparator1.Size = New System.Drawing.Size(149, 6) ' 'QuitterToolStripMenuItem ' Me.QuitterToolStripMenuItem.Name = "QuitterToolStripMenuItem" - Me.QuitterToolStripMenuItem.Size = New System.Drawing.Size(148, 22) + Me.QuitterToolStripMenuItem.Size = New System.Drawing.Size(152, 22) Me.QuitterToolStripMenuItem.Text = "Quitter" ' - 'BackUpToolStripMenuItem - ' - Me.BackUpToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ImporterToolStripMenuItem, Me.ExporterToolStripMenuItem}) - Me.BackUpToolStripMenuItem.Name = "BackUpToolStripMenuItem" - Me.BackUpToolStripMenuItem.Size = New System.Drawing.Size(59, 20) - Me.BackUpToolStripMenuItem.Text = "BackUp" - ' - 'ImporterToolStripMenuItem - ' - Me.ImporterToolStripMenuItem.Name = "ImporterToolStripMenuItem" - Me.ImporterToolStripMenuItem.Size = New System.Drawing.Size(152, 22) - Me.ImporterToolStripMenuItem.Text = "Importer" - ' - 'ExporterToolStripMenuItem - ' - Me.ExporterToolStripMenuItem.Name = "ExporterToolStripMenuItem" - Me.ExporterToolStripMenuItem.Size = New System.Drawing.Size(152, 22) - Me.ExporterToolStripMenuItem.Text = "Exporter" - ' 'ToolStripMenuItem1 ' Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1" @@ -208,15 +183,6 @@ Partial Class Main Me.Label1.TabIndex = 0 Me.Label1.Text = "ID :" ' - 'IDBox - ' - Me.IDBox.Location = New System.Drawing.Point(27, 16) - Me.IDBox.MaxLength = 10 - Me.IDBox.Name = "IDBox" - Me.IDBox.Size = New System.Drawing.Size(89, 20) - Me.IDBox.TabIndex = 0 - Me.IDBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center - ' 'Label2 ' Me.Label2.AutoSize = True @@ -308,6 +274,7 @@ Partial Class Main ' 'GroupBox2 ' + Me.GroupBox2.Controls.Add(Me.IDBox) Me.GroupBox2.Controls.Add(Me.TextBox4) Me.GroupBox2.Controls.Add(Me.Label8) Me.GroupBox2.Controls.Add(Me.TypeComBox) @@ -321,7 +288,6 @@ Partial Class Main Me.GroupBox2.Controls.Add(Me.Label4) Me.GroupBox2.Controls.Add(Me.Label3) Me.GroupBox2.Controls.Add(Me.Label2) - Me.GroupBox2.Controls.Add(Me.IDBox) Me.GroupBox2.Controls.Add(Me.Label1) Me.GroupBox2.Location = New System.Drawing.Point(355, 28) Me.GroupBox2.Name = "GroupBox2" @@ -440,36 +406,26 @@ Partial Class Main 'Label7 ' Me.Label7.AutoSize = True - Me.Label7.Location = New System.Drawing.Point(402, 22) + Me.Label7.Location = New System.Drawing.Point(248, 21) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(37, 13) Me.Label7.TabIndex = 9 Me.Label7.Text = "RAM :" ' - 'TextBox1 + 'Mem ' - Me.TextBox1.Location = New System.Drawing.Point(445, 18) - Me.TextBox1.Name = "TextBox1" - Me.TextBox1.ReadOnly = True - Me.TextBox1.Size = New System.Drawing.Size(57, 20) - Me.TextBox1.TabIndex = 10 - Me.TextBox1.TabStop = False - ' - 'TextBox2 - ' - Me.TextBox2.Location = New System.Drawing.Point(188, 18) - Me.TextBox2.Name = "TextBox2" - Me.TextBox2.ReadOnly = True - Me.TextBox2.Size = New System.Drawing.Size(148, 20) - Me.TextBox2.TabIndex = 11 - Me.TextBox2.TabStop = False + Me.Mem.Location = New System.Drawing.Point(291, 17) + Me.Mem.Name = "Mem" + Me.Mem.ReadOnly = True + Me.Mem.Size = New System.Drawing.Size(57, 20) + Me.Mem.TabIndex = 10 + Me.Mem.TabStop = False ' 'GroupBox3 ' - Me.GroupBox3.Controls.Add(Me.OSChoice) - Me.GroupBox3.Controls.Add(Me.TextBox3) - Me.GroupBox3.Controls.Add(Me.TextBox2) - Me.GroupBox3.Controls.Add(Me.TextBox1) + Me.GroupBox3.Controls.Add(Me.OS) + Me.GroupBox3.Controls.Add(Me.Arch) + Me.GroupBox3.Controls.Add(Me.Mem) Me.GroupBox3.Controls.Add(Me.Label7) Me.GroupBox3.Controls.Add(Me.Label6) Me.GroupBox3.Controls.Add(Me.ProgressBar1) @@ -485,21 +441,21 @@ Partial Class Main Me.GroupBox3.TabStop = False Me.GroupBox3.Text = "Avancement" ' - 'OSChoice + 'OS ' - Me.OSChoice.Location = New System.Drawing.Point(57, 41) - Me.OSChoice.Name = "OSChoice" - Me.OSChoice.ReadOnly = True - Me.OSChoice.Size = New System.Drawing.Size(59, 20) - Me.OSChoice.TabIndex = 13 + Me.OS.Location = New System.Drawing.Point(57, 41) + Me.OS.Name = "OS" + Me.OS.ReadOnly = True + Me.OS.Size = New System.Drawing.Size(59, 20) + Me.OS.TabIndex = 13 ' - 'TextBox3 + 'Arch ' - Me.TextBox3.Location = New System.Drawing.Point(342, 19) - Me.TextBox3.Name = "TextBox3" - Me.TextBox3.ReadOnly = True - Me.TextBox3.Size = New System.Drawing.Size(54, 20) - Me.TextBox3.TabIndex = 12 + Me.Arch.Location = New System.Drawing.Point(188, 18) + Me.Arch.Name = "Arch" + Me.Arch.ReadOnly = True + Me.Arch.Size = New System.Drawing.Size(54, 20) + Me.Arch.TabIndex = 12 ' 'EditButton ' @@ -511,16 +467,14 @@ Partial Class Main Me.EditButton.Text = "Modifier" Me.EditButton.UseVisualStyleBackColor = True ' - 'OpenFileDialog1 + 'IDBox ' - Me.OpenFileDialog1.FileName = "db.sqlite" - Me.OpenFileDialog1.Title = "Ouvrir un fichier" - ' - 'SaveFileDialog1 - ' - Me.SaveFileDialog1.CheckFileExists = True - Me.SaveFileDialog1.FileName = "db.sqlite" - Me.SaveFileDialog1.Title = "Enregistrer un fichier" + Me.IDBox.Location = New System.Drawing.Point(37, 16) + Me.IDBox.Mask = "9999999999" + Me.IDBox.Name = "IDBox" + Me.IDBox.Size = New System.Drawing.Size(79, 20) + Me.IDBox.TabIndex = 17 + Me.IDBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center ' 'Main ' @@ -537,6 +491,7 @@ Partial Class Main Me.Controls.Add(Me.MenuStrip1) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.MainMenuStrip = Me.MenuStrip1 + Me.MaximizeBox = False Me.Name = "Main" Me.Text = "ISEN-Repair Inventory Manager" Me.MenuStrip1.ResumeLayout(False) @@ -562,14 +517,10 @@ Partial Class Main Friend WithEvents GroupBox1 As GroupBox Friend WithEvents InvSearchBar As TextBox Friend WithEvents InvList As ListBox - Friend WithEvents BackUpToolStripMenuItem As ToolStripMenuItem - Friend WithEvents ImporterToolStripMenuItem As ToolStripMenuItem - Friend WithEvents ExporterToolStripMenuItem As ToolStripMenuItem Friend WithEvents SendOutButton As Button Friend WithEvents TrashButton As Button Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem Friend WithEvents Label1 As Label - Friend WithEvents IDBox As TextBox Friend WithEvents Label2 As Label Friend WithEvents Label3 As Label Friend WithEvents Label4 As Label @@ -588,18 +539,16 @@ Partial Class Main Friend WithEvents ProgressBar1 As ProgressBar Friend WithEvents Label6 As Label Friend WithEvents Label7 As Label - Friend WithEvents TextBox1 As TextBox - Friend WithEvents TextBox2 As TextBox + Friend WithEvents Mem As TextBox Friend WithEvents GroupBox3 As GroupBox Friend WithEvents TypeComBox As TextBox Friend WithEvents EtatBox As TextBox - Friend WithEvents OSChoice As TextBox - Friend WithEvents TextBox3 As TextBox + Friend WithEvents OS As TextBox + Friend WithEvents Arch As TextBox Friend WithEvents TextBox4 As TextBox Friend WithEvents Label8 As Label Friend WithEvents EditButton As Button Friend WithEvents AjouterUnPCToolStripMenuItem As ToolStripMenuItem Friend WithEvents ToolStripSeparator1 As ToolStripSeparator - Friend WithEvents OpenFileDialog1 As OpenFileDialog - Friend WithEvents SaveFileDialog1 As SaveFileDialog + Friend WithEvents IDBox As MaskedTextBox End Class diff --git a/ISEN-Repair Inventory Manager/Main.resx b/ISEN-Repair Inventory Manager/Main.resx index 461c285..e1f925b 100644 --- a/ISEN-Repair Inventory Manager/Main.resx +++ b/ISEN-Repair Inventory Manager/Main.resx @@ -123,12 +123,6 @@ 132, 17 - - 249, 17 - - - 391, 17 - diff --git a/ISEN-Repair Inventory Manager/Main.vb b/ISEN-Repair Inventory Manager/Main.vb index 8cddada..8c0993f 100644 --- a/ISEN-Repair Inventory Manager/Main.vb +++ b/ISEN-Repair Inventory Manager/Main.vb @@ -9,10 +9,10 @@ Public Class Main If HWCheck.Checked And OSCheck.Checked And DrvCheck.Checked And ActivateCheck.Checked Then SoftCheck.Enabled = True Else SoftCheck.Enabled = False If HWCheck.Checked And OSCheck.Checked And DrvCheck.Checked Then ActivateCheck.Enabled = True - OSChoice.Enabled = True + OS.Enabled = True Else ActivateCheck.Enabled = False - OSChoice.Enabled = False + OS.Enabled = False End If If HWCheck.Checked And OSCheck.Checked Then DrvCheck.Enabled = True Else DrvCheck.Enabled = False If HWCheck.Checked Then OSCheck.Enabled = True Else OSCheck.Enabled = False @@ -20,8 +20,8 @@ Public Class Main Private Sub ListAllInv() StatusLabel.Text = "Récupération des données depuis la base SQLite..." - Dim connectStr As String = "Data Source=Northwind.sqlite" - Dim SQLiteCommand As String = "SELECT..." + Dim connectStr As String = "Data Source=db.sqlite" + Dim SQLiteCommand As String = "SELECT name FROM computers_desc;" Dim dt As DataTable = Nothing Dim ds As New DataSet @@ -40,6 +40,8 @@ Public Class Main InvList.DisplayMember = "ID" InvList.DataSource = dt + StatusLabel.Text = "Récupération avec succés de la base SQLite." + Catch ex As Exception MsgBox(ex.Message) End Try @@ -54,7 +56,7 @@ Public Class Main End Sub Public Sub DisplayInvList(entriesId As String) - Dim connectStr As String = "Data Source=Northwind.sqlite" + Dim connectStr As String = "Data Source=db.sqlite" Dim SQLiteCommand As String = "SELECT * FROM Inventory WHERE EntriesID=" & entriesId Dim dt As DataTable = Nothing Dim ds As New DataSet @@ -94,23 +96,15 @@ Public Class Main aboutForm = Nothing End Sub - Private Sub IDBox_Click(sender As Object, e As EventArgs) Handles IDBox.Click + Private Sub AjouterUnPCToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AjouterUnPCToolStripMenuItem.Click + Me.Hide() + Dim addMachineForm As AddMachine + addMachineForm = New AddMachine() + addMachineForm.Show() + addMachineForm = Nothing + End Sub + + Private Sub IDBox_Click(sender As Object, e As EventArgs) If idSelected Then IDBox.Text = "" End Sub - - Private Sub ImporterToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ImporterToolStripMenuItem.Click - OpenFileDialog1.ShowDialog() - End Sub - - Private Sub ExporterToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExporterToolStripMenuItem.Click - SaveFileDialog1.ShowDialog() - End Sub - - Private Sub OpenFileDialog1_FileOk(sender As Object, e As CancelEventArgs) Handles OpenFileDialog1.FileOk - - End Sub - - Private Sub SaveFileDialog1_FileOk(sender As Object, e As CancelEventArgs) Handles SaveFileDialog1.FileOk - - End Sub End Class diff --git a/SQLite-db_create tables.txt b/SQLite-db_create tables.txt new file mode 100644 index 0000000..81410a1 --- /dev/null +++ b/SQLite-db_create tables.txt @@ -0,0 +1,22 @@ +CREATE TABLE `computers_desc` ( + `id` TEXT NOT NULL DEFAULT 0000000000 UNIQUE, + `name` TEXT NOT NULL DEFAULT 'ComputerOfDoom', + `etat` INTEGER NOT NULL DEFAULT 0, + `serial` NUMERIC NOT NULL DEFAULT 0, + `comms` TEXT, + `gived` INTEGER NOT NULL DEFAULT 0, + `giveTo` TEXT, + `getBy` NUMERIC NOT NULL DEFAULT 'ISEN' +); + +CREATE TABLE `computers_progress` ( + `id` TEXT NOT NULL DEFAULT 0000000000 UNIQUE, + `hardware_complete` NUMERIC NOT NULL DEFAULT 0, + `os_complete` NUMERIC NOT NULL DEFAULT 0, + `drivers_complete` NUMERIC NOT NULL DEFAULT 0, + `activate_complete` NUMERIC NOT NULL DEFAULT 0, + `soft_complete` NUMERIC NOT NULL DEFAULT 0, + `arch` INTEGER NOT NULL DEFAULT 1, + `ram` TEXT NOT NULL DEFAULT '1G', + `os` INTEGER NOT NULL DEFAULT 1 +); \ No newline at end of file