Index: TAOR-rework-bugfixing/TAOR rework/formulieren/Specials/FormSifonLade.vb
===================================================================
diff -u -r1642 -r1643
--- TAOR-rework-bugfixing/TAOR rework/formulieren/Specials/FormSifonLade.vb (.../FormSifonLade.vb) (revision 1642)
+++ TAOR-rework-bugfixing/TAOR rework/formulieren/Specials/FormSifonLade.vb (.../FormSifonLade.vb) (revision 1643)
@@ -22,9 +22,11 @@
BreedteUitsparingComboBox.DataSource = Configs.sifonLadeBreedteUitsparing
DiepteUitsparingComboBox.DataSource = Configs.dieptes
+ 'Velden op disabled zetten.
+ UpdateEnableStatusVelden(False)
+
'Zorgen dat events van de controls niet meer genegeerd worden.
_updatingInformatie = False
-
Catch ex As Exception
MessageBox.Show(ex.Message, "Er is een fout opgetreden...", MessageBoxButtons.OK, MessageBoxIcon.Error)
Application.Exit()
@@ -105,6 +107,9 @@
'Onderdelen en barcodes tonen in data grid view.
ToonOnderdelenEnBarcodes()
+
+ 'Velden op enabled zetten.
+ UpdateEnableStatusVelden(True)
Else
'Geen resultaten gevonden.
'Melding tonen.
@@ -113,6 +118,9 @@
'Tekst in input selecteren.
LadeCodeTextBox.SelectAll()
LadeCodeTextBox.Focus()
+
+ 'Velden op disabled zetten.
+ UpdateEnableStatusVelden(False)
End If
Catch ex As Exception
'Tekst in input selecteren.
@@ -157,15 +165,18 @@
checkbox.BackColor = DefaultBackColor
End If
+ 'Enable status van velden updaten. Er wordt toch naar de status van deze checkbox gekeken.
+ UpdateEnableStatusVelden(True)
+
'Informatie updaten
VerwerkGewijzigdeInformatie()
End Sub
'NumericUpDowns
Private Sub NumericUpDown_ValueChanged(sender As System.Object, e As System.EventArgs) Handles PositieUitsparingNumericUpDown.ValueChanged,
- BreedteUitsparingDubbelOverschrijfNumericUpDown.ValueChanged,
- DiepteUitsparingDubbelOverschrijfNumericUpDown.ValueChanged,
- BreedteMiddenstukNumericUpDown.ValueChanged
+ BreedteUitsparingDubbelOverschrijfNumericUpDown.ValueChanged,
+ DiepteUitsparingDubbelOverschrijfNumericUpDown.ValueChanged,
+ BreedteMiddenstukNumericUpDown.ValueChanged
VerwerkGewijzigdeInformatie()
End Sub
@@ -274,15 +285,19 @@
'Breedte uitsparing dubbele lade.
If BreedteUitsparingDubbelComboBox.Items.Count > 0 Then
BreedteUitsparingDubbelComboBox.SelectedIndex = 0
+ BreedteUitsparingDubbelOverschrijfNumericUpDown.Value = BreedteUitsparingComboBox.SelectedValue
+ Else
+ 'Geen items in de combobox, standaard waarde wordt geselecteerd.
+ BreedteUitsparingDubbelOverschrijfNumericUpDown.Value = BreedteUitsparingDubbelOverschrijfNumericUpDown.Minimum
End If
- BreedteUitsparingDubbelOverschrijfNumericUpDown.Value = BreedteUitsparingDubbelOverschrijfNumericUpDown.Minimum
- BreedteUitsparingDubbelResetButton.Enabled = False
'Diepte uitsparing dubbele lade.
If DiepteUitsparingDubbelComboBox.Items.Count > 0 Then
DiepteUitsparingDubbelComboBox.SelectedIndex = 0
+ DiepteUitsparingDubbelOverschrijfNumericUpDown.Value = DiepteUitsparingDubbelComboBox.SelectedValue
+ Else
+ 'Geen items in de combobox, standaard waarde wordt geselecteerd.
+ DiepteUitsparingDubbelOverschrijfNumericUpDown.Value = DiepteUitsparingDubbelOverschrijfNumericUpDown.Minimum
End If
- DiepteUitsparingDubbelOverschrijfNumericUpDown.Value = DiepteUitsparingDubbelOverschrijfNumericUpDown.Minimum
- DiepteUitsparingDubbelResetButton.Enabled = False
'Breedte middenstuk dubbele lade.
BreedteMiddenstukNumericUpDown.Value = BreedteMiddenstukNumericUpDown.Minimum
End If
@@ -291,9 +306,124 @@
_updatingInformatie = False
End Sub
- 'todo functie voor enable state van velden te updaten
+ '''
+ ''' Enable state van velden updaten.
+ '''
+ ''' True is enabled, false is disabled
+ Private Sub UpdateEnableStatusVelden(status As Boolean)
+ 'Velden van de normale sifonlade.
+ BreedteUitsparingComboBox.Enabled = status
+ DiepteUitsparingComboBox.Enabled = status
+ PositieUitsparingNumericUpDown.Enabled = status
+ DubbelCheckBox.Enabled = status
+ 'De status van de velden van de dubbele sifonlade updaten. De checkbox moet aangeduid zijn en de status op true, voor die controls te enablen.
+ UpdateEnableStatusDubbeleLadeVelden(DubbelCheckBox.Checked And status)
+ End Sub
+
+#Region "Dubbele lade uitsparing controls"
+
+ 'NumericUpDowns
+ Private Sub DubbelLadeNumericUpDown_ValueChanged(sender As System.Object, e As System.EventArgs) Handles BreedteUitsparingDubbelOverschrijfNumericUpDown.ValueChanged,
+ DiepteUitsparingDubbelOverschrijfNumericUpDown.ValueChanged
+
+ 'Enable state updaten.
+ UpdateEnableStatusDubbeleLadeVelden()
+ End Sub
+
+ Private Sub BreedteUitsparingDubbelResetButton_Click(sender As Object, e As EventArgs) Handles BreedteUitsparingDubbelResetButton.Click
+ 'Breedte uitsparing dubbele lade resetten.
+ If BreedteUitsparingDubbelComboBox.Items.Count > 0 Then
+ BreedteUitsparingDubbelComboBox.SelectedIndex = 0
+ BreedteUitsparingDubbelOverschrijfNumericUpDown.Value = BreedteUitsparingComboBox.SelectedValue
+ Else
+ 'Geen items in de combobox, standaard waarde wordt geselecteerd.
+ BreedteUitsparingDubbelOverschrijfNumericUpDown.Value = BreedteUitsparingDubbelOverschrijfNumericUpDown.Minimum
+ End If
+
+ 'Enable state updaten.
+ UpdateEnableStatusDubbeleLadeVelden()
+ End Sub
+
+ Private Sub DiepteUitsparingDubbelResetButton_Click(sender As Object, e As EventArgs) Handles DiepteUitsparingDubbelResetButton.Click
+ 'Diepte uitsparing dubbele lade resetten.
+ If DiepteUitsparingDubbelComboBox.Items.Count > 0 Then
+ DiepteUitsparingDubbelComboBox.SelectedIndex = 0
+ DiepteUitsparingDubbelOverschrijfNumericUpDown.Value = DiepteUitsparingDubbelComboBox.SelectedValue
+ Else
+ 'Geen items in de combobox, standaard waarde wordt geselecteerd.
+ DiepteUitsparingDubbelOverschrijfNumericUpDown.Value = DiepteUitsparingDubbelOverschrijfNumericUpDown.Minimum
+ End If
+
+ 'Enable state updaten.
+ UpdateEnableStatusDubbeleLadeVelden()
+ End Sub
+#End Region
+
+ '''
+ ''' Enable state van velden voor de dubbele sifonlade updaten.
+ '''
+ ''' True is enabled, false is disabled. Standaard true.
+ Private Sub UpdateEnableStatusDubbeleLadeVelden(Optional status As Boolean = True)
+ 'Status controleren.
+ If Not status Then
+ 'Velden disablen.
+ 'Breedte uitsparing.
+ BreedteUitsparingDubbelComboBox.Enabled = False
+ BreedteUitsparingDubbelOverschrijfNumericUpDown.Enabled = False
+ BreedteUitsparingDubbelResetButton.Enabled = False
+ 'Diepte uitsparing.
+ DiepteUitsparingDubbelComboBox.Enabled = False
+ DiepteUitsparingDubbelOverschrijfNumericUpDown.Enabled = False
+ DiepteUitsparingDubbelResetButton.Enabled = False
+ 'Breedte middenstuk.
+ BreedteMiddenstukNumericUpDown.Enabled = False
+ 'Functie afbreken.
+ Return
+ End If
+
+ 'Breedte uitsparing.
+ 'Numeric updown enablen.
+ BreedteUitsparingDubbelOverschrijfNumericUpDown.Enabled = True
+ 'Controleren of de de combobox niet leeg is EN de waarde gelijk is aan de waarde van de combobox (de default waarde).
+ If BreedteUitsparingDubbelComboBox.Items.Count > 0 AndAlso BreedteUitsparingDubbelComboBox.SelectedValue = BreedteUitsparingDubbelOverschrijfNumericUpDown.Value Then
+ 'Staat op default waarde
+ 'Combobox enablen, want waarde is dezelfde.
+ BreedteUitsparingDubbelComboBox.Enabled = True
+ 'Reset knop disablen.
+ BreedteUitsparingDubbelResetButton.Enabled = False
+ Else
+ 'Waarde wordt overschreven
+ 'Combobox disablen, want waarde wordt overschreven.
+ BreedteUitsparingDubbelComboBox.Enabled = False
+ 'Reset knop enablen.
+ BreedteUitsparingDubbelResetButton.Enabled = True
+ End If
+
+ 'Diepte uitsparing.
+ 'Numeric updown enablen.
+ DiepteUitsparingDubbelOverschrijfNumericUpDown.Enabled = True
+ 'Controleren of de de combobox niet leeg is EN de waarde gelijk is aan de waarde van de combobox (de default waarde).
+ If DiepteUitsparingDubbelComboBox.Items.Count > 0 AndAlso DiepteUitsparingDubbelComboBox.SelectedValue = DiepteUitsparingDubbelOverschrijfNumericUpDown.Value Then
+ 'Staat op default waarde
+ 'Combobox enablen, want waarde is dezelfde.
+ DiepteUitsparingDubbelComboBox.Enabled = True
+ 'Reset knop disablen.
+ DiepteUitsparingDubbelResetButton.Enabled = False
+ Else
+ 'Waarde wordt overschreven
+ 'Combobox disablen, want waarde wordt overschreven.
+ DiepteUitsparingDubbelComboBox.Enabled = False
+ 'Reset knop enablen.
+ DiepteUitsparingDubbelResetButton.Enabled = True
+ End If
+
+ 'Breedte middenstuk dubbele lade.
+ BreedteMiddenstukNumericUpDown.Enabled = True
+ End Sub
+
Private Sub BtnVerwerk_Click(sender As System.Object, e As System.EventArgs) Handles VerwerkButton.Click
+ 'todo verwerken van laden.
Try
'vragen aan de gebruiker of het bestand verplaatst moet worden
If Domeincontroller.getInstance.heeftNogExtraSpecialLaden Then
Index: TAOR-rework-bugfixing/TAOR rework/formulieren/Specials/FormSifonLade.Designer.vb
===================================================================
diff -u -r1642 -r1643
--- TAOR-rework-bugfixing/TAOR rework/formulieren/Specials/FormSifonLade.Designer.vb (.../FormSifonLade.Designer.vb) (revision 1642)
+++ TAOR-rework-bugfixing/TAOR rework/formulieren/Specials/FormSifonLade.Designer.vb (.../FormSifonLade.Designer.vb) (revision 1643)
@@ -60,7 +60,7 @@
Me.Label11 = New System.Windows.Forms.Label()
Me.BreedteUitsparingDubbelComboBox = New System.Windows.Forms.ComboBox()
Me.DiepteUitsparingDubbelComboBox = New System.Windows.Forms.ComboBox()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox()
+ Me.DubbeleLadeGroupBox = New System.Windows.Forms.GroupBox()
Me.DiepteUitsparingDubbelOverschrijfNumericUpDown = New System.Windows.Forms.NumericUpDown()
Me.BreedteUitsparingDubbelOverschrijfNumericUpDown = New System.Windows.Forms.NumericUpDown()
Me.BreedteMiddenstukNumericUpDown = New System.Windows.Forms.NumericUpDown()
@@ -72,7 +72,7 @@
Me.BreedteUitsparingDubbelResetButton = New System.Windows.Forms.Button()
CType(Me.OnderdelenOplijstingDataGridView,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.PositieUitsparingNumericUpDown,System.ComponentModel.ISupportInitialize).BeginInit
- Me.GroupBox1.SuspendLayout
+ Me.DubbeleLadeGroupBox.SuspendLayout
CType(Me.DiepteUitsparingDubbelOverschrijfNumericUpDown,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.BreedteUitsparingDubbelOverschrijfNumericUpDown,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.BreedteMiddenstukNumericUpDown,System.ComponentModel.ISupportInitialize).BeginInit
@@ -477,35 +477,34 @@
Me.DiepteUitsparingDubbelComboBox.Size = New System.Drawing.Size(250, 69)
Me.DiepteUitsparingDubbelComboBox.TabIndex = 63
'
- 'GroupBox1
+ 'DubbeleLadeGroupBox
'
- Me.GroupBox1.Controls.Add(Me.DiepteUitsparingDubbelOverschrijfNumericUpDown)
- Me.GroupBox1.Controls.Add(Me.BreedteUitsparingDubbelOverschrijfNumericUpDown)
- Me.GroupBox1.Controls.Add(Me.BreedteMiddenstukNumericUpDown)
- Me.GroupBox1.Controls.Add(Me.Label14)
- Me.GroupBox1.Controls.Add(Me.DiepteUitsparingDubbelResetButton)
- Me.GroupBox1.Controls.Add(Me.DubbelCheckBox)
- Me.GroupBox1.Controls.Add(Me.Label13)
- Me.GroupBox1.Controls.Add(Me.Label12)
- Me.GroupBox1.Controls.Add(Me.BreedteUitsparingDubbelResetButton)
- Me.GroupBox1.Controls.Add(Me.DiepteUitsparingDubbelComboBox)
- Me.GroupBox1.Controls.Add(Me.Label6)
- Me.GroupBox1.Controls.Add(Me.BreedteUitsparingDubbelComboBox)
- Me.GroupBox1.Controls.Add(Me.Label11)
- Me.GroupBox1.Controls.Add(Me.Label7)
- Me.GroupBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 20!)
- Me.GroupBox1.Location = New System.Drawing.Point(507, 451)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(692, 342)
- Me.GroupBox1.TabIndex = 65
- Me.GroupBox1.TabStop = false
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.DiepteUitsparingDubbelOverschrijfNumericUpDown)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.BreedteUitsparingDubbelOverschrijfNumericUpDown)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.BreedteMiddenstukNumericUpDown)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.Label14)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.DiepteUitsparingDubbelResetButton)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.DubbelCheckBox)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.Label13)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.Label12)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.BreedteUitsparingDubbelResetButton)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.DiepteUitsparingDubbelComboBox)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.Label6)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.BreedteUitsparingDubbelComboBox)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.Label11)
+ Me.DubbeleLadeGroupBox.Controls.Add(Me.Label7)
+ Me.DubbeleLadeGroupBox.Font = New System.Drawing.Font("Microsoft Sans Serif", 20!)
+ Me.DubbeleLadeGroupBox.Location = New System.Drawing.Point(507, 451)
+ Me.DubbeleLadeGroupBox.Name = "DubbeleLadeGroupBox"
+ Me.DubbeleLadeGroupBox.Size = New System.Drawing.Size(692, 342)
+ Me.DubbeleLadeGroupBox.TabIndex = 65
+ Me.DubbeleLadeGroupBox.TabStop = false
'
'DiepteUitsparingDubbelOverschrijfNumericUpDown
'
Me.DiepteUitsparingDubbelOverschrijfNumericUpDown.Enabled = false
Me.DiepteUitsparingDubbelOverschrijfNumericUpDown.Font = New System.Drawing.Font("Microsoft Sans Serif", 39.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
Me.DiepteUitsparingDubbelOverschrijfNumericUpDown.ForeColor = System.Drawing.SystemColors.ControlText
- Me.DiepteUitsparingDubbelOverschrijfNumericUpDown.Increment = New Decimal(New Integer() {1, 0, 0, 65536})
Me.DiepteUitsparingDubbelOverschrijfNumericUpDown.Location = New System.Drawing.Point(341, 186)
Me.DiepteUitsparingDubbelOverschrijfNumericUpDown.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
Me.DiepteUitsparingDubbelOverschrijfNumericUpDown.Name = "DiepteUitsparingDubbelOverschrijfNumericUpDown"
@@ -517,7 +516,6 @@
Me.BreedteUitsparingDubbelOverschrijfNumericUpDown.Enabled = false
Me.BreedteUitsparingDubbelOverschrijfNumericUpDown.Font = New System.Drawing.Font("Microsoft Sans Serif", 39.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
Me.BreedteUitsparingDubbelOverschrijfNumericUpDown.ForeColor = System.Drawing.SystemColors.ControlText
- Me.BreedteUitsparingDubbelOverschrijfNumericUpDown.Increment = New Decimal(New Integer() {1, 0, 0, 65536})
Me.BreedteUitsparingDubbelOverschrijfNumericUpDown.Location = New System.Drawing.Point(341, 113)
Me.BreedteUitsparingDubbelOverschrijfNumericUpDown.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
Me.BreedteUitsparingDubbelOverschrijfNumericUpDown.Name = "BreedteUitsparingDubbelOverschrijfNumericUpDown"
@@ -558,7 +556,6 @@
'DubbelCheckBox
'
Me.DubbelCheckBox.AutoSize = true
- Me.DubbelCheckBox.Enabled = false
Me.DubbelCheckBox.Font = New System.Drawing.Font("Microsoft Sans Serif", 20!)
Me.DubbelCheckBox.Location = New System.Drawing.Point(6, 0)
Me.DubbelCheckBox.Name = "DubbelCheckBox"
@@ -599,7 +596,7 @@
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1904, 1042)
- Me.Controls.Add(Me.GroupBox1)
+ Me.Controls.Add(Me.DubbeleLadeGroupBox)
Me.Controls.Add(Me.VerwerkingLabel)
Me.Controls.Add(Me.DiepteUitsparingComboBox)
Me.Controls.Add(Me.BreedteUitsparingComboBox)
@@ -633,8 +630,8 @@
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
CType(Me.OnderdelenOplijstingDataGridView,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.PositieUitsparingNumericUpDown,System.ComponentModel.ISupportInitialize).EndInit
- Me.GroupBox1.ResumeLayout(false)
- Me.GroupBox1.PerformLayout
+ Me.DubbeleLadeGroupBox.ResumeLayout(false)
+ Me.DubbeleLadeGroupBox.PerformLayout
CType(Me.DiepteUitsparingDubbelOverschrijfNumericUpDown,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.BreedteUitsparingDubbelOverschrijfNumericUpDown,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.BreedteMiddenstukNumericUpDown,System.ComponentModel.ISupportInitialize).EndInit
@@ -676,7 +673,7 @@
Friend WithEvents Label11 As Label
Friend WithEvents BreedteUitsparingDubbelComboBox As ComboBox
Friend WithEvents DiepteUitsparingDubbelComboBox As ComboBox
- Friend WithEvents GroupBox1 As GroupBox
+ Friend WithEvents DubbeleLadeGroupBox As GroupBox
Friend WithEvents Label12 As Label
Friend WithEvents BreedteUitsparingDubbelResetButton As Button
Friend WithEvents Label13 As Label