Aggiornata versione 1.5.3.0
This commit is contained in:
Binary file not shown.
38
Terminalino/Form1.Designer.vb
generated
38
Terminalino/Form1.Designer.vb
generated
@@ -50,6 +50,8 @@ Partial Public Class Form1
|
||||
Me.lbl_L = New System.Windows.Forms.Label
|
||||
Me.lblMerceDaRic = New System.Windows.Forms.Label
|
||||
Me.lblMediaSett = New System.Windows.Forms.Label
|
||||
Me.lblArrotondamento = New System.Windows.Forms.Label
|
||||
Me.lblArrotondamentoQta = New System.Windows.Forms.Label
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.Panel2.SuspendLayout()
|
||||
Me.Panel3.SuspendLayout()
|
||||
@@ -68,10 +70,10 @@ Partial Public Class Form1
|
||||
'
|
||||
'txtQta
|
||||
'
|
||||
Me.txtQta.Font = New System.Drawing.Font("Tahoma", 20.0!, System.Drawing.FontStyle.Regular)
|
||||
Me.txtQta.Location = New System.Drawing.Point(123, 203)
|
||||
Me.txtQta.Font = New System.Drawing.Font("Tahoma", 16.0!, System.Drawing.FontStyle.Regular)
|
||||
Me.txtQta.Location = New System.Drawing.Point(123, 200)
|
||||
Me.txtQta.Name = "txtQta"
|
||||
Me.txtQta.Size = New System.Drawing.Size(98, 39)
|
||||
Me.txtQta.Size = New System.Drawing.Size(98, 32)
|
||||
Me.txtQta.TabIndex = 4
|
||||
'
|
||||
'txtBarcode
|
||||
@@ -85,7 +87,7 @@ Partial Public Class Form1
|
||||
'lbUMShow
|
||||
'
|
||||
Me.lbUMShow.Font = New System.Drawing.Font("Tahoma", 11.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lbUMShow.Location = New System.Drawing.Point(6, 212)
|
||||
Me.lbUMShow.Location = New System.Drawing.Point(6, 209)
|
||||
Me.lbUMShow.Name = "lbUMShow"
|
||||
Me.lbUMShow.Size = New System.Drawing.Size(111, 20)
|
||||
Me.lbUMShow.Text = "Quantità:"
|
||||
@@ -94,7 +96,7 @@ Partial Public Class Form1
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Font = New System.Drawing.Font("Tahoma", 11.0!, System.Drawing.FontStyle.Regular)
|
||||
Me.Label1.Location = New System.Drawing.Point(7, 245)
|
||||
Me.Label1.Location = New System.Drawing.Point(7, 230)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(172, 20)
|
||||
Me.Label1.Text = "Quantità per confezione:"
|
||||
@@ -102,7 +104,7 @@ Partial Public Class Form1
|
||||
'lbQtaCnf
|
||||
'
|
||||
Me.lbQtaCnf.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lbQtaCnf.Location = New System.Drawing.Point(181, 245)
|
||||
Me.lbQtaCnf.Location = New System.Drawing.Point(181, 230)
|
||||
Me.lbQtaCnf.Name = "lbQtaCnf"
|
||||
Me.lbQtaCnf.Size = New System.Drawing.Size(52, 17)
|
||||
Me.lbQtaCnf.Text = "-"
|
||||
@@ -176,10 +178,10 @@ Partial Public Class Form1
|
||||
'
|
||||
'txtColli
|
||||
'
|
||||
Me.txtColli.Font = New System.Drawing.Font("Tahoma", 20.0!, System.Drawing.FontStyle.Regular)
|
||||
Me.txtColli.Font = New System.Drawing.Font("Tahoma", 16.0!, System.Drawing.FontStyle.Regular)
|
||||
Me.txtColli.Location = New System.Drawing.Point(123, 165)
|
||||
Me.txtColli.Name = "txtColli"
|
||||
Me.txtColli.Size = New System.Drawing.Size(98, 39)
|
||||
Me.txtColli.Size = New System.Drawing.Size(98, 32)
|
||||
Me.txtColli.TabIndex = 31
|
||||
'
|
||||
'PictureBox1
|
||||
@@ -312,6 +314,22 @@ Partial Public Class Form1
|
||||
Me.lblMediaSett.Size = New System.Drawing.Size(209, 30)
|
||||
Me.lblMediaSett.TextAlign = System.Drawing.ContentAlignment.TopCenter
|
||||
'
|
||||
'lblArrotondamento
|
||||
'
|
||||
Me.lblArrotondamento.Location = New System.Drawing.Point(7, 248)
|
||||
Me.lblArrotondamento.Name = "lblArrotondamento"
|
||||
Me.lblArrotondamento.Size = New System.Drawing.Size(172, 20)
|
||||
Me.lblArrotondamento.Text = "Verrà arrotondato a: "
|
||||
Me.lblArrotondamento.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'lblArrotondamentoQta
|
||||
'
|
||||
Me.lblArrotondamentoQta.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblArrotondamentoQta.Location = New System.Drawing.Point(181, 248)
|
||||
Me.lblArrotondamentoQta.Name = "lblArrotondamentoQta"
|
||||
Me.lblArrotondamentoQta.Size = New System.Drawing.Size(52, 17)
|
||||
Me.lblArrotondamentoQta.Text = "0.00"
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
|
||||
@@ -335,6 +353,8 @@ Partial Public Class Form1
|
||||
Me.Controls.Add(Me.lbUntMisOrig)
|
||||
Me.Controls.Add(Me.lbQtaCnf)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.lblArrotondamento)
|
||||
Me.Controls.Add(Me.lblArrotondamentoQta)
|
||||
Me.Controls.Add(Me.lbUMShow)
|
||||
Me.Controls.Add(Me.txtBarcode)
|
||||
Me.Controls.Add(Me.txtQta)
|
||||
@@ -385,5 +405,7 @@ Partial Public Class Form1
|
||||
Friend WithEvents lbl_L As System.Windows.Forms.Label
|
||||
Friend WithEvents lblMerceDaRic As System.Windows.Forms.Label
|
||||
Friend WithEvents lblMediaSett As System.Windows.Forms.Label
|
||||
Friend WithEvents lblArrotondamento As System.Windows.Forms.Label
|
||||
Friend WithEvents lblArrotondamentoQta As System.Windows.Forms.Label
|
||||
|
||||
End Class
|
||||
|
||||
@@ -45,10 +45,7 @@ Public Class Form1
|
||||
Else
|
||||
If G_freeRead = "N" Then
|
||||
|
||||
|
||||
'Ficca qui
|
||||
Dim nodes = docRD.SelectNodes(nodo)
|
||||
'MsgBox("Trovati: " + a.Count.ToString())
|
||||
|
||||
If (nodes IsNot Nothing And nodes.Count > 1) Then
|
||||
|
||||
@@ -66,8 +63,6 @@ Public Class Form1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If IsNothing(Node) Then ' RICERCA (+ EV. SALVATAGGIO) CON NODENAME DIFFERENTE PER MANTENERE LA COMPATIBILITA
|
||||
|
||||
Dim nodeNameTmp As String
|
||||
@@ -144,9 +139,34 @@ Public Class Form1
|
||||
Label1.Visible = True
|
||||
lbQtaCnf.Visible = True
|
||||
|
||||
|
||||
|
||||
Dim flagQtaMultAttr = Node.Attributes.ItemOf("FLAG_QTA_MULTIPLA")
|
||||
Dim qtaMinOrdAttr = Node.Attributes.ItemOf("QTA_MIN_ORD")
|
||||
|
||||
Dim qtaMinOrd As Double = 0
|
||||
If (qtaMinOrdAttr IsNot Nothing) Then
|
||||
qtaMinOrd = Convert.ToDouble(qtaMinOrdAttr.InnerText)
|
||||
End If
|
||||
|
||||
If flagQtaMultAttr IsNot Nothing And "S".Equals(flagQtaMultAttr.InnerText) And qtaMinOrd > 0 Then
|
||||
|
||||
lblArrotondamento.Visible = True
|
||||
lblArrotondamentoQta.Visible = True
|
||||
|
||||
lblArrotondamentoQta.Text = String.Format("{0:0.##}", qtaMinOrd)
|
||||
|
||||
AddHandler txtQta.TextChanged, Function() (UpdateQtaArrotondamento(qtaMinOrd))
|
||||
|
||||
Else
|
||||
lblArrotondamento.Visible = False
|
||||
lblArrotondamentoQta.Visible = False
|
||||
End If
|
||||
|
||||
If IsNothing(NodeWR) Then ' ARTICOLO CONOSCIUTO MAI INSERITO '
|
||||
txtQta.Text = ""
|
||||
lblPresent.Text = "0"
|
||||
|
||||
Else ' ARTICOLO CONOSCIUTO GIA INSERITO '
|
||||
|
||||
Dim qta_prec, colli_prec As Double
|
||||
@@ -167,8 +187,11 @@ Public Class Form1
|
||||
lblPresent.Text = "1"
|
||||
selectallOnQtaDefault()
|
||||
'txtColli.SelectAll()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If _blockIns Or (G_incrementMode = "N" And G_freeRead = "N") Then
|
||||
focusOnQtaDefault() ' SI FERMA IN INSERIMENTO QTA
|
||||
Else ' INCREMENTO QTA AUTOMATICA
|
||||
@@ -272,6 +295,64 @@ Public Class Form1
|
||||
Dim span As TimeSpan = date2.Subtract(date1)
|
||||
'MessageBox.Show(span.Seconds.ToString + " sec")
|
||||
End Sub
|
||||
|
||||
Private Function UpdateQtaArrotondamento(ByRef multiplier As Double) As Boolean
|
||||
Dim minValue As Double = 0
|
||||
Dim maxValue As Double = multiplier
|
||||
|
||||
Dim counter = 1
|
||||
|
||||
Dim isValid As Boolean
|
||||
|
||||
Dim sourceText = txtQta.Text.Trim()
|
||||
Dim err As Boolean = False
|
||||
|
||||
Try
|
||||
Convert.ToDouble(sourceText)
|
||||
Catch ex As Exception
|
||||
err = True
|
||||
lblArrotondamentoQta.Text = "N/A"
|
||||
End Try
|
||||
|
||||
If Not err Then
|
||||
|
||||
If (sourceText.Length > 0) Then
|
||||
Dim value = Convert.ToDouble(sourceText)
|
||||
|
||||
Do
|
||||
isValid = minValue < value And maxValue > value Or (minValue = value Or maxValue = value)
|
||||
|
||||
If (Not isValid) Then
|
||||
counter = counter + 1
|
||||
minValue = (counter - 1) * multiplier
|
||||
maxValue = counter * multiplier
|
||||
End If
|
||||
|
||||
Loop While Not isValid
|
||||
|
||||
Dim newValue As Double
|
||||
|
||||
If (minValue = value) Then
|
||||
newValue = minValue
|
||||
ElseIf maxValue = value Then
|
||||
newValue = maxValue
|
||||
ElseIf value - minValue < maxValue - value Then
|
||||
newValue = minValue
|
||||
ElseIf value - minValue > maxValue - value Then
|
||||
newValue = maxValue
|
||||
ElseIf (value - minValue) = (maxValue - value) Then
|
||||
newValue = minValue
|
||||
End If
|
||||
|
||||
lblArrotondamentoQta.Text = String.Format("{0:0.##}", newValue)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Sub focusOnQtaDefault()
|
||||
If G_um = "COLLI" Then txtColli.Focus() Else txtQta.Focus()
|
||||
End Sub
|
||||
@@ -714,6 +795,12 @@ Public Class Form1
|
||||
txtQta.Text = ""
|
||||
txtQta.Focus()
|
||||
Else
|
||||
|
||||
If lblArrotondamento.Visible And lblArrotondamentoQta.Visible Then
|
||||
txtQta.Text = lblArrotondamentoQta.Text
|
||||
End If
|
||||
|
||||
|
||||
If lblPresent.Text = "1" Then
|
||||
If CDbl(txtQta.Text) = 0 Then
|
||||
InsertQtaArt("0", "")
|
||||
|
||||
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.5.2.0")>
|
||||
<Assembly: AssemblyVersion("1.5.3.0")>
|
||||
|
||||
'Below attribute is to suppress FxCop warning "CA2232 : Microsoft.Usage : Add STAThreadAttribute to assembly"
|
||||
' as Device app does not support STA thread.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Terminalino/obj/Release/ResolveAssemblyReference.cache
Normal file
BIN
Terminalino/obj/Release/ResolveAssemblyReference.cache
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user