jj 09.06 2
This commit is contained in:
@@ -983,13 +983,22 @@ Public Class ClassControlBuilder
|
|||||||
Private Sub Textbox_Currency_Handler(sender As Object, e As EventArgs)
|
Private Sub Textbox_Currency_Handler(sender As Object, e As EventArgs)
|
||||||
Dim control As TextBox = DirectCast(sender, TextBox)
|
Dim control As TextBox = DirectCast(sender, TextBox)
|
||||||
Dim value As Decimal
|
Dim value As Decimal
|
||||||
If Decimal.TryParse(control.Text.Trim(), value) Then
|
Dim currencyRegex = New System.Text.RegularExpressions.Regex("[0-9,\.]*")
|
||||||
'control.Text = value.ToString("c")
|
Dim match = currencyRegex.Match(control.Text)
|
||||||
'control.SelectionStart = control.SelectionStart + 1
|
|
||||||
control.Text = FormatCurrency(control.Text)
|
If Not match.Success Then
|
||||||
'value = FormatNumber(value, -1, TriState.UseDefault, TriState.UseDefault, TriState.True)
|
hier currency prüfen
|
||||||
'control.Text = value.ToString("n")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'If Decimal.TryParse(control.Text.Trim(), value) Then
|
||||||
|
' 'control.Text = value.ToString("c")
|
||||||
|
' 'control.SelectionStart = control.SelectionStart + 1
|
||||||
|
' 'control.Text = FormatCurrency(control.Text)
|
||||||
|
' 'value = FormatNumber(value, -1, TriState.UseDefault, TriState.UseDefault, TriState.True)
|
||||||
|
' 'control.Text = value.ToString("n")
|
||||||
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub TextBox_Decimal_Handler(sender As Object, e As EventArgs)
|
Private Sub TextBox_Decimal_Handler(sender As Object, e As EventArgs)
|
||||||
|
|||||||
Reference in New Issue
Block a user