FormatString Currency
This commit is contained in:
parent
ffa65a9c07
commit
642e65c95b
@ -329,13 +329,11 @@ Public Class ClassControlCreator
|
|||||||
|
|
||||||
' If there is a format string defined, set it for display only.
|
' If there is a format string defined, set it for display only.
|
||||||
' Editing will be without format string, according to current user-culture.
|
' Editing will be without format string, according to current user-culture.
|
||||||
If oFormatString <> String.Empty Then
|
If oFormatString <> String.Empty And oReadOnly = False Then
|
||||||
oControl.Properties.DisplayFormat.FormatType = FormatType.Custom
|
oControl.Properties.DisplayFormat.FormatType = FormatType.Custom
|
||||||
oControl.Properties.DisplayFormat.FormatString = ClassFormat.GetFormatString(oFormatString)
|
oControl.Properties.DisplayFormat.FormatString = ClassFormat.GetFormatString(oFormatString)
|
||||||
End If
|
ElseIf oReadOnly Then
|
||||||
|
' For read only controls, don't show the raw value when a user clicks into it
|
||||||
' For read only controls, don't show the raw value when a user clicks into it
|
|
||||||
If oReadOnly Then
|
|
||||||
oControl.Properties.EditFormat.FormatType = FormatType.Custom
|
oControl.Properties.EditFormat.FormatType = FormatType.Custom
|
||||||
oControl.Properties.EditFormat.FormatString = ClassFormat.GetFormatString(oFormatString)
|
oControl.Properties.EditFormat.FormatString = ClassFormat.GetFormatString(oFormatString)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -187,7 +187,8 @@ Public Class ClassPMWindream
|
|||||||
Case WMObjectVariableValueTypeFloat
|
Case WMObjectVariableValueTypeFloat
|
||||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFloat")
|
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFloat")
|
||||||
Try
|
Try
|
||||||
convertValue = CDbl(value)
|
value = Replace(value, ".", ",")
|
||||||
|
convertValue = Convert.ToDouble(value)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
frmValidator.idxerr_message = "Could't convert value '" & value & "' to double!"
|
frmValidator.idxerr_message = "Could't convert value '" & value & "' to double!"
|
||||||
@ -295,10 +296,11 @@ Public Class ClassPMWindream
|
|||||||
'ReDim ArrName(0)
|
'ReDim ArrName(0)
|
||||||
'ArrName(0) = "Tournr"
|
'ArrName(0) = "Tournr"
|
||||||
'oDocument.SetValues(ArrName, ArrValues)
|
'oDocument.SetValues(ArrName, ArrValues)
|
||||||
If convertValue = "String.Empty" Or convertValue = vbEmpty Then
|
'If convertValue = String.Empty Or convertValue = vbEmpty Then
|
||||||
LOGGER.Debug("Now Indexing simpleAttribute with vbEmpty ...")
|
' LOGGER.Debug("Now Indexing simpleAttribute with vbEmpty ...")
|
||||||
oDocument.SetVariableValue(aName, String.Empty)
|
' oDocument.SetVariableValue(aName, String.Empty)
|
||||||
ElseIf _int = True Then
|
'Else
|
||||||
|
If _int = True Then
|
||||||
oDocument.SetVariableValue(aName, CInt(convertValue))
|
oDocument.SetVariableValue(aName, CInt(convertValue))
|
||||||
ElseIf _date = True Then
|
ElseIf _date = True Then
|
||||||
oDocument.SetVariableValue(aName, CDate(convertValue))
|
oDocument.SetVariableValue(aName, CDate(convertValue))
|
||||||
|
|||||||
@ -72,7 +72,7 @@ Public Class frmValidator
|
|||||||
Private Property Move2Folder As String
|
Private Property Move2Folder As String
|
||||||
'Private Property DataASorDB As ClassDataASorDB
|
'Private Property DataASorDB As ClassDataASorDB
|
||||||
Private Property allgFunk As New ClassAllgemeineFunktionen
|
Private Property allgFunk As New ClassAllgemeineFunktionen
|
||||||
|
Private CountAction As Int16 = 0
|
||||||
Public Shared Property WMDocPathWindows As String
|
Public Shared Property WMDocPathWindows As String
|
||||||
Private Property DocPathWindows As String
|
Private Property DocPathWindows As String
|
||||||
'Anzahl der Validierungsdokumente
|
'Anzahl der Validierungsdokumente
|
||||||
@ -1228,9 +1228,10 @@ Public Class frmValidator
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
|
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
|
||||||
|
CountAction += 1
|
||||||
Dim oTextbox As BaseEdit = sender
|
Dim oTextbox As BaseEdit = sender
|
||||||
Dim oMeta As ClassControlCreator.ControlMetadata = oTextbox.Tag
|
Dim oMeta As ClassControlCreator.ControlMetadata = oTextbox.Tag
|
||||||
|
Console.WriteLine($"[{CountAction}] OnFocus {oMeta.Name}")
|
||||||
If oMeta.ReadOnly = False Then
|
If oMeta.ReadOnly = False Then
|
||||||
oTextbox.BackColor = Color.LightSteelBlue
|
oTextbox.BackColor = Color.LightSteelBlue
|
||||||
oTextbox.ForeColor = GraphicsEx.GetContrastedColor(Color.LightSteelBlue)
|
oTextbox.ForeColor = GraphicsEx.GetContrastedColor(Color.LightSteelBlue)
|
||||||
@ -1239,9 +1240,11 @@ Public Class frmValidator
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs)
|
Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs)
|
||||||
|
CountAction += 1
|
||||||
Dim oTextbox As BaseEdit = sender
|
Dim oTextbox As BaseEdit = sender
|
||||||
Dim oMeta As ClassControlCreator.ControlMetadata = oTextbox.Tag
|
Dim oMeta As ClassControlCreator.ControlMetadata = oTextbox.Tag
|
||||||
|
Console.WriteLine($"[{CountAction}] LostFocus {oMeta.Name}")
|
||||||
|
Console.WriteLine(oTextbox.Properties.DisplayFormat.FormatString)
|
||||||
If oMeta.ReadOnly = False Then
|
If oMeta.ReadOnly = False Then
|
||||||
oTextbox.BackColor = oMeta.BackColor
|
oTextbox.BackColor = oMeta.BackColor
|
||||||
oTextbox.ForeColor = GraphicsEx.GetContrastedColor(oMeta.BackColor)
|
oTextbox.ForeColor = GraphicsEx.GetContrastedColor(oMeta.BackColor)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user