Fix some incoherence in main GUI, add GUI for adding computer

This commit is contained in:
JackCarterSmith 2017-05-29 15:55:57 +02:00
parent 319766dfb1
commit 169b73563a
11 changed files with 465 additions and 129 deletions

View File

@ -22,8 +22,78 @@ Partial Class AddMachine
'Ne la modifiez pas à l'aide de l'éditeur de code. 'Ne la modifiez pas à l'aide de l'éditeur de code.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() 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.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 End Sub
Friend WithEvents Label1 As Label
Friend WithEvents MaskedTextBox1 As MaskedTextBox
Friend WithEvents CancelButton As Button
Friend WithEvents NextButton As Button
End Class End Class

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,3 +1,9 @@
Public Class AddMachine 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 End Class

View File

@ -0,0 +1,37 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class AddMachine_2
Inherits System.Windows.Forms.Form
'Form remplace la méthode Dispose pour nettoyer la liste des composants.
<System.Diagnostics.DebuggerNonUserCode()> _
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.
<System.Diagnostics.DebuggerStepThrough()> _
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

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -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

View File

@ -32,7 +32,7 @@
<DefineDebug>false</DefineDebug> <DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace> <DefineTrace>true</DefineTrace>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>..\..\..\Mes Builds\ISEN-Repair Inventory Manager\</OutputPath>
<DocumentationFile>ISEN-Repair Inventory Manager.xml</DocumentationFile> <DocumentationFile>ISEN-Repair Inventory Manager.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
@ -51,6 +51,12 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>InvManLogo.ico</ApplicationIcon> <ApplicationIcon>InvManLogo.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>JCS.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
@ -92,6 +98,12 @@
<Compile Include="AddMachine.vb"> <Compile Include="AddMachine.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="AddMachine_2.Designer.vb">
<DependentUpon>AddMachine_2.vb</DependentUpon>
</Compile>
<Compile Include="AddMachine_2.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main.vb"> <Compile Include="Main.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -125,6 +137,12 @@
<EmbeddedResource Include="About.resx"> <EmbeddedResource Include="About.resx">
<DependentUpon>About.vb</DependentUpon> <DependentUpon>About.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="AddMachine.resx">
<DependentUpon>AddMachine.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AddMachine_2.resx">
<DependentUpon>AddMachine_2.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Main.resx"> <EmbeddedResource Include="Main.resx">
<DependentUpon>Main.vb</DependentUpon> <DependentUpon>Main.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -139,6 +157,7 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="JCS.pfx" />
<None Include="My Project\Application.myapp"> <None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator> <Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput> <LastGenOutput>Application.Designer.vb</LastGenOutput>

View File

@ -1,9 +1,9 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Main Partial Class Main
Inherits System.Windows.Forms.Form Inherits System.Windows.Forms.Form
'Form remplace la méthode Dispose pour nettoyer la liste des composants. 'Form remplace la méthode Dispose pour nettoyer la liste des composants.
<System.Diagnostics.DebuggerNonUserCode()> _ <System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean) Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try Try
If disposing AndAlso components IsNot Nothing Then 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 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
'Elle peut être modifiée à l'aide du 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. 'Ne la modifiez pas à l'aide de l'éditeur de code.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Main)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Main))
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip() Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
@ -28,9 +28,6 @@ Partial Class Main
Me.AjouterUnPCToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.AjouterUnPCToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
Me.QuitterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() 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.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
Me.StatusLabel = New System.Windows.Forms.ToolStripStatusLabel() Me.StatusLabel = New System.Windows.Forms.ToolStripStatusLabel()
@ -40,7 +37,6 @@ Partial Class Main
Me.SendOutButton = New System.Windows.Forms.Button() Me.SendOutButton = New System.Windows.Forms.Button()
Me.TrashButton = New System.Windows.Forms.Button() Me.TrashButton = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label()
Me.IDBox = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = 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.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.Label6 = New System.Windows.Forms.Label() Me.Label6 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Mem = New System.Windows.Forms.TextBox()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.GroupBox3 = New System.Windows.Forms.GroupBox() Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.OSChoice = New System.Windows.Forms.TextBox() Me.OS = New System.Windows.Forms.TextBox()
Me.TextBox3 = New System.Windows.Forms.TextBox() Me.Arch = New System.Windows.Forms.TextBox()
Me.EditButton = New System.Windows.Forms.Button() Me.EditButton = New System.Windows.Forms.Button()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() Me.IDBox = New System.Windows.Forms.MaskedTextBox()
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
Me.MenuStrip1.SuspendLayout() Me.MenuStrip1.SuspendLayout()
Me.StatusStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout()
Me.GroupBox1.SuspendLayout() Me.GroupBox1.SuspendLayout()
@ -80,7 +74,7 @@ Partial Class Main
' '
'MenuStrip1 '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.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1" Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(875, 24) Me.MenuStrip1.Size = New System.Drawing.Size(875, 24)
@ -97,39 +91,20 @@ Partial Class Main
'AjouterUnPCToolStripMenuItem 'AjouterUnPCToolStripMenuItem
' '
Me.AjouterUnPCToolStripMenuItem.Name = "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" Me.AjouterUnPCToolStripMenuItem.Text = "Ajouter un PC"
' '
'ToolStripSeparator1 'ToolStripSeparator1
' '
Me.ToolStripSeparator1.Name = "ToolStripSeparator1" Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
Me.ToolStripSeparator1.Size = New System.Drawing.Size(145, 6) Me.ToolStripSeparator1.Size = New System.Drawing.Size(149, 6)
' '
'QuitterToolStripMenuItem 'QuitterToolStripMenuItem
' '
Me.QuitterToolStripMenuItem.Name = "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" 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 'ToolStripMenuItem1
' '
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1" Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
@ -208,15 +183,6 @@ Partial Class Main
Me.Label1.TabIndex = 0 Me.Label1.TabIndex = 0
Me.Label1.Text = "ID :" 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 'Label2
' '
Me.Label2.AutoSize = True Me.Label2.AutoSize = True
@ -308,6 +274,7 @@ Partial Class Main
' '
'GroupBox2 'GroupBox2
' '
Me.GroupBox2.Controls.Add(Me.IDBox)
Me.GroupBox2.Controls.Add(Me.TextBox4) Me.GroupBox2.Controls.Add(Me.TextBox4)
Me.GroupBox2.Controls.Add(Me.Label8) Me.GroupBox2.Controls.Add(Me.Label8)
Me.GroupBox2.Controls.Add(Me.TypeComBox) Me.GroupBox2.Controls.Add(Me.TypeComBox)
@ -321,7 +288,6 @@ Partial Class Main
Me.GroupBox2.Controls.Add(Me.Label4) Me.GroupBox2.Controls.Add(Me.Label4)
Me.GroupBox2.Controls.Add(Me.Label3) Me.GroupBox2.Controls.Add(Me.Label3)
Me.GroupBox2.Controls.Add(Me.Label2) Me.GroupBox2.Controls.Add(Me.Label2)
Me.GroupBox2.Controls.Add(Me.IDBox)
Me.GroupBox2.Controls.Add(Me.Label1) Me.GroupBox2.Controls.Add(Me.Label1)
Me.GroupBox2.Location = New System.Drawing.Point(355, 28) Me.GroupBox2.Location = New System.Drawing.Point(355, 28)
Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Name = "GroupBox2"
@ -440,36 +406,26 @@ Partial Class Main
'Label7 'Label7
' '
Me.Label7.AutoSize = True 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.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(37, 13) Me.Label7.Size = New System.Drawing.Size(37, 13)
Me.Label7.TabIndex = 9 Me.Label7.TabIndex = 9
Me.Label7.Text = "RAM :" Me.Label7.Text = "RAM :"
' '
'TextBox1 'Mem
' '
Me.TextBox1.Location = New System.Drawing.Point(445, 18) Me.Mem.Location = New System.Drawing.Point(291, 17)
Me.TextBox1.Name = "TextBox1" Me.Mem.Name = "Mem"
Me.TextBox1.ReadOnly = True Me.Mem.ReadOnly = True
Me.TextBox1.Size = New System.Drawing.Size(57, 20) Me.Mem.Size = New System.Drawing.Size(57, 20)
Me.TextBox1.TabIndex = 10 Me.Mem.TabIndex = 10
Me.TextBox1.TabStop = False Me.Mem.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
' '
'GroupBox3 'GroupBox3
' '
Me.GroupBox3.Controls.Add(Me.OSChoice) Me.GroupBox3.Controls.Add(Me.OS)
Me.GroupBox3.Controls.Add(Me.TextBox3) Me.GroupBox3.Controls.Add(Me.Arch)
Me.GroupBox3.Controls.Add(Me.TextBox2) Me.GroupBox3.Controls.Add(Me.Mem)
Me.GroupBox3.Controls.Add(Me.TextBox1)
Me.GroupBox3.Controls.Add(Me.Label7) Me.GroupBox3.Controls.Add(Me.Label7)
Me.GroupBox3.Controls.Add(Me.Label6) Me.GroupBox3.Controls.Add(Me.Label6)
Me.GroupBox3.Controls.Add(Me.ProgressBar1) Me.GroupBox3.Controls.Add(Me.ProgressBar1)
@ -485,21 +441,21 @@ Partial Class Main
Me.GroupBox3.TabStop = False Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "Avancement" Me.GroupBox3.Text = "Avancement"
' '
'OSChoice 'OS
' '
Me.OSChoice.Location = New System.Drawing.Point(57, 41) Me.OS.Location = New System.Drawing.Point(57, 41)
Me.OSChoice.Name = "OSChoice" Me.OS.Name = "OS"
Me.OSChoice.ReadOnly = True Me.OS.ReadOnly = True
Me.OSChoice.Size = New System.Drawing.Size(59, 20) Me.OS.Size = New System.Drawing.Size(59, 20)
Me.OSChoice.TabIndex = 13 Me.OS.TabIndex = 13
' '
'TextBox3 'Arch
' '
Me.TextBox3.Location = New System.Drawing.Point(342, 19) Me.Arch.Location = New System.Drawing.Point(188, 18)
Me.TextBox3.Name = "TextBox3" Me.Arch.Name = "Arch"
Me.TextBox3.ReadOnly = True Me.Arch.ReadOnly = True
Me.TextBox3.Size = New System.Drawing.Size(54, 20) Me.Arch.Size = New System.Drawing.Size(54, 20)
Me.TextBox3.TabIndex = 12 Me.Arch.TabIndex = 12
' '
'EditButton 'EditButton
' '
@ -511,16 +467,14 @@ Partial Class Main
Me.EditButton.Text = "Modifier" Me.EditButton.Text = "Modifier"
Me.EditButton.UseVisualStyleBackColor = True Me.EditButton.UseVisualStyleBackColor = True
' '
'OpenFileDialog1 'IDBox
' '
Me.OpenFileDialog1.FileName = "db.sqlite" Me.IDBox.Location = New System.Drawing.Point(37, 16)
Me.OpenFileDialog1.Title = "Ouvrir un fichier" Me.IDBox.Mask = "9999999999"
' Me.IDBox.Name = "IDBox"
'SaveFileDialog1 Me.IDBox.Size = New System.Drawing.Size(79, 20)
' Me.IDBox.TabIndex = 17
Me.SaveFileDialog1.CheckFileExists = True Me.IDBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.SaveFileDialog1.FileName = "db.sqlite"
Me.SaveFileDialog1.Title = "Enregistrer un fichier"
' '
'Main 'Main
' '
@ -537,6 +491,7 @@ Partial Class Main
Me.Controls.Add(Me.MenuStrip1) Me.Controls.Add(Me.MenuStrip1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MainMenuStrip = Me.MenuStrip1 Me.MainMenuStrip = Me.MenuStrip1
Me.MaximizeBox = False
Me.Name = "Main" Me.Name = "Main"
Me.Text = "ISEN-Repair Inventory Manager" Me.Text = "ISEN-Repair Inventory Manager"
Me.MenuStrip1.ResumeLayout(False) Me.MenuStrip1.ResumeLayout(False)
@ -562,14 +517,10 @@ Partial Class Main
Friend WithEvents GroupBox1 As GroupBox Friend WithEvents GroupBox1 As GroupBox
Friend WithEvents InvSearchBar As TextBox Friend WithEvents InvSearchBar As TextBox
Friend WithEvents InvList As ListBox 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 SendOutButton As Button
Friend WithEvents TrashButton As Button Friend WithEvents TrashButton As Button
Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem
Friend WithEvents Label1 As Label Friend WithEvents Label1 As Label
Friend WithEvents IDBox As TextBox
Friend WithEvents Label2 As Label Friend WithEvents Label2 As Label
Friend WithEvents Label3 As Label Friend WithEvents Label3 As Label
Friend WithEvents Label4 As Label Friend WithEvents Label4 As Label
@ -588,18 +539,16 @@ Partial Class Main
Friend WithEvents ProgressBar1 As ProgressBar Friend WithEvents ProgressBar1 As ProgressBar
Friend WithEvents Label6 As Label Friend WithEvents Label6 As Label
Friend WithEvents Label7 As Label Friend WithEvents Label7 As Label
Friend WithEvents TextBox1 As TextBox Friend WithEvents Mem As TextBox
Friend WithEvents TextBox2 As TextBox
Friend WithEvents GroupBox3 As GroupBox Friend WithEvents GroupBox3 As GroupBox
Friend WithEvents TypeComBox As TextBox Friend WithEvents TypeComBox As TextBox
Friend WithEvents EtatBox As TextBox Friend WithEvents EtatBox As TextBox
Friend WithEvents OSChoice As TextBox Friend WithEvents OS As TextBox
Friend WithEvents TextBox3 As TextBox Friend WithEvents Arch As TextBox
Friend WithEvents TextBox4 As TextBox Friend WithEvents TextBox4 As TextBox
Friend WithEvents Label8 As Label Friend WithEvents Label8 As Label
Friend WithEvents EditButton As Button Friend WithEvents EditButton As Button
Friend WithEvents AjouterUnPCToolStripMenuItem As ToolStripMenuItem Friend WithEvents AjouterUnPCToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ToolStripSeparator1 As ToolStripSeparator Friend WithEvents ToolStripSeparator1 As ToolStripSeparator
Friend WithEvents OpenFileDialog1 As OpenFileDialog Friend WithEvents IDBox As MaskedTextBox
Friend WithEvents SaveFileDialog1 As SaveFileDialog
End Class End Class

View File

@ -123,12 +123,6 @@
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value> <value>132, 17</value>
</metadata> </metadata>
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>249, 17</value>
</metadata>
<metadata name="SaveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>391, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@ -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 And ActivateCheck.Checked Then SoftCheck.Enabled = True Else SoftCheck.Enabled = False
If HWCheck.Checked And OSCheck.Checked And DrvCheck.Checked Then If HWCheck.Checked And OSCheck.Checked And DrvCheck.Checked Then
ActivateCheck.Enabled = True ActivateCheck.Enabled = True
OSChoice.Enabled = True OS.Enabled = True
Else Else
ActivateCheck.Enabled = False ActivateCheck.Enabled = False
OSChoice.Enabled = False OS.Enabled = False
End If End If
If HWCheck.Checked And OSCheck.Checked Then DrvCheck.Enabled = True Else DrvCheck.Enabled = False 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 If HWCheck.Checked Then OSCheck.Enabled = True Else OSCheck.Enabled = False
@ -20,8 +20,8 @@ Public Class Main
Private Sub ListAllInv() Private Sub ListAllInv()
StatusLabel.Text = "Récupération des données depuis la base SQLite..." StatusLabel.Text = "Récupération des données depuis la base SQLite..."
Dim connectStr As String = "Data Source=Northwind.sqlite" Dim connectStr As String = "Data Source=db.sqlite"
Dim SQLiteCommand As String = "SELECT..." Dim SQLiteCommand As String = "SELECT name FROM computers_desc;"
Dim dt As DataTable = Nothing Dim dt As DataTable = Nothing
Dim ds As New DataSet Dim ds As New DataSet
@ -40,6 +40,8 @@ Public Class Main
InvList.DisplayMember = "ID" InvList.DisplayMember = "ID"
InvList.DataSource = dt InvList.DataSource = dt
StatusLabel.Text = "Récupération avec succés de la base SQLite."
Catch ex As Exception Catch ex As Exception
MsgBox(ex.Message) MsgBox(ex.Message)
End Try End Try
@ -54,7 +56,7 @@ Public Class Main
End Sub End Sub
Public Sub DisplayInvList(entriesId As String) 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 SQLiteCommand As String = "SELECT * FROM Inventory WHERE EntriesID=" & entriesId
Dim dt As DataTable = Nothing Dim dt As DataTable = Nothing
Dim ds As New DataSet Dim ds As New DataSet
@ -94,23 +96,15 @@ Public Class Main
aboutForm = Nothing aboutForm = Nothing
End Sub 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 = "" If idSelected Then IDBox.Text = ""
End Sub 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 End Class

View File

@ -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
);