LicenceManager 2.1e4 :

- TextBox Note si estende/restringe automaticamente in base al numero di righe scritte al suo interno. Valido per New e Update di Licence e Key.
This commit is contained in:
Renzo Lanza
2019-05-09 11:16:16 +00:00
parent 373a5f4268
commit a3f38fbb99
9 changed files with 86 additions and 11 deletions
+4 -3
View File
@@ -14,7 +14,7 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
@@ -119,10 +119,11 @@
Grid.Row="6"
Style="{StaticResource ParametersTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
<EgtWPFLib5:EgtTextBox Name="textBoxNote"
Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Grid.Column="1"
Grid.Row="6"
Style="{StaticResource ParameterTextBox}"/>
Style="{StaticResource ParameterTextBox}" TextWrapping="Wrap" AcceptsReturn="True" HorizontalContentAlignment="Left"/>
<TextBlock Text="{Binding SerialeMsg}"
Grid.Column="0"
+17
View File
@@ -7,4 +7,21 @@
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) Then
textBoxNote.Height = textBoxNote.Height - (originalTextBoxHeight * (numberOfLines - textBoxNote.LineCount))
numberOfLines = textBoxNote.LineCount
End If
End Sub
End Class
+2 -2
View File
@@ -59,5 +59,5 @@ Imports System.Windows
' usando l'asterisco '*' come illustrato di seguito:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.1.5.3")>
<Assembly: AssemblyFileVersion("2.1.5.3")>
<Assembly: AssemblyVersion("2.1.5.4")>
<Assembly: AssemblyFileVersion("2.1.5.4")>
+3 -2
View File
@@ -158,10 +158,11 @@
Grid.Row="4"
Style="{StaticResource ParametersTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
<EgtWPFLib5:EgtTextBox Name="textBoxNote"
Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Grid.Column="3"
Grid.Row="4"
Style="{StaticResource ParameterTextBox}"/>
Style="{StaticResource ParameterTextBox}" TextWrapping="Wrap" AcceptsReturn="True" HorizontalContentAlignment="Left"/>
<GroupBox Header="{Binding Option1Msg}"
Grid.Row="5" Grid.ColumnSpan="4">
+17
View File
@@ -1,3 +1,20 @@
Public Class NewLicencePageV
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) Then
textBoxNote.Height = textBoxNote.Height - (originalTextBoxHeight * (numberOfLines - textBoxNote.LineCount))
numberOfLines = textBoxNote.LineCount
End If
End Sub
End Class
+3 -2
View File
@@ -72,10 +72,11 @@
Grid.Row="3"
Style="{StaticResource ParametersTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
<EgtWPFLib5:EgtTextBox Name="textBoxNote"
Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Grid.Column="1"
Grid.Row="3"
Style="{StaticResource ParameterTextBox}"/>
Style="{StaticResource ParameterTextBox}" TextWrapping="Wrap" AcceptsReturn="True" HorizontalContentAlignment="Left"/>
<TextBlock Text="{Binding SerialeMsg}"
Grid.Column="0"
+19
View File
@@ -1,3 +1,22 @@
Class UpdateKeyPageV
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 (textBoxNote.LineCount > 0) Then
If (numberOfLines < textBoxNote.LineCount) Then
textBoxNote.Height = originalTextBoxHeight * textBoxNote.LineCount
numberOfLines = textBoxNote.LineCount
End If
If (numberOfLines > textBoxNote.LineCount) Then
textBoxNote.Height = textBoxNote.Height - (originalTextBoxHeight * (numberOfLines - textBoxNote.LineCount))
numberOfLines = textBoxNote.LineCount
End If
End If
End Sub
End Class
+2 -2
View File
@@ -126,10 +126,10 @@
Grid.Row="3"
Style="{StaticResource ParametersTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
<EgtWPFLib5:EgtTextBox Name="textBoxNote" Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Grid.Column="3"
Grid.Row="3"
Style="{StaticResource ParameterTextBox}"/>
Style="{StaticResource ParameterTextBox}" TextWrapping="Wrap" AcceptsReturn="True" HorizontalContentAlignment="Left"/>
<GroupBox Header="{Binding Option1Msg}"
Grid.Row="4" Grid.ColumnSpan="4">
@@ -1,3 +1,22 @@
Class UpdateLicencePageV
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 (textBoxNote.LineCount > 0) Then
If (numberOfLines < textBoxNote.LineCount) Then
textBoxNote.Height = originalTextBoxHeight * textBoxNote.LineCount
numberOfLines = textBoxNote.LineCount
End If
If (numberOfLines > textBoxNote.LineCount) Then
textBoxNote.Height = textBoxNote.Height - (originalTextBoxHeight * (numberOfLines - textBoxNote.LineCount))
numberOfLines = textBoxNote.LineCount
End If
End If
End Sub
End Class