26df70338a
- Correzione sulla TextBox Note, che riaprendo una seconda volta (e successive) la pagina NewKey o NewLicence scompariva, perché LineCount=0. Ora rimane presente.
28 lines
1.1 KiB
VB.net
28 lines
1.1 KiB
VB.net
Public Class KeyPageV
|
|
Private Sub StateComboBox_Loaded(sender As Object, e As RoutedEventArgs) Handles StateComboBox.Loaded
|
|
StateComboBox.SelectedIndex = -1
|
|
End Sub
|
|
|
|
Private Sub IsDongleComboBox_Loaded(sender As Object, e As RoutedEventArgs) Handles IsDongleComboBox.Loaded
|
|
IsDongleComboBox.SelectedIndex = -1
|
|
End Sub
|
|
|
|
Dim numberOfLines As Integer = 1
|
|
Dim originalTextBoxHeight As Double = 22
|
|
|
|
Private Sub textBoxNote_TextChanged(sender As Object, e As TextChangedEventArgs) Handles textBoxNote.TextChanged
|
|
If (numberOfLines = 1) Then
|
|
textBoxNote.Height = originalTextBoxHeight
|
|
End If
|
|
If (numberOfLines < textBoxNote.LineCount) Then
|
|
textBoxNote.Height = originalTextBoxHeight * textBoxNote.LineCount
|
|
numberOfLines = textBoxNote.LineCount
|
|
End If
|
|
If (numberOfLines > textBoxNote.LineCount) And Not textBoxNote.LineCount = 0 Then
|
|
textBoxNote.Height = textBoxNote.Height - (originalTextBoxHeight * (numberOfLines - textBoxNote.LineCount))
|
|
numberOfLines = textBoxNote.LineCount
|
|
End If
|
|
End Sub
|
|
|
|
End Class
|