OmagCut :
- Migliorata visualizzazione nomi componenti.
This commit is contained in:
@@ -71,9 +71,6 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="MachViewModeBtn" Grid.Column="2"
|
||||
Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo1" Grid.Column="0" />
|
||||
<Label Name="LabelCompo1" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -45,7 +46,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo2" Grid.Column="0" />
|
||||
<Label Name="LabelCompo2" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -56,7 +58,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo3" Grid.Column="0" />
|
||||
<Label Name="LabelCompo3" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -67,7 +70,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo4" Grid.Column="0" />
|
||||
<Label Name="LabelCompo4" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -78,7 +82,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo5" Grid.Column="0" />
|
||||
<Label Name="LabelCompo5" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -89,7 +94,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo6" Grid.Column="0" />
|
||||
<Label Name="LabelCompo6" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -100,7 +106,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo7" Grid.Column="0" />
|
||||
<Label Name="LabelCompo7" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -111,7 +118,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo8" Grid.Column="0" />
|
||||
<Label Name="LabelCompo8" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -122,7 +130,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo9" Grid.Column="0" />
|
||||
<Label Name="LabelCompo9" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ Public Class MainComponentPageUC
|
||||
If sCompoName.Length > 15 Then
|
||||
sCompoName = sCompoName.Substring(0, 15)
|
||||
End If
|
||||
GetLabel(index).Content = sCompoName
|
||||
GetLabel(index).Text = sCompoName
|
||||
'Se ci sono sia testo che immagine imposto un margine di 10
|
||||
CustomThickness.Right = 10
|
||||
GetImage(index).Margin = CustomThickness
|
||||
@@ -69,7 +69,7 @@ Public Class MainComponentPageUC
|
||||
If sCompoName.Length > 20 Then
|
||||
sCompoName = sCompoName.Substring(0, 20)
|
||||
End If
|
||||
GetLabel(index).Content = sCompoName
|
||||
GetLabel(index).Text = sCompoName
|
||||
End If
|
||||
Else
|
||||
'Se non c'è testo azzero la distanza tra testo e immagine
|
||||
@@ -108,7 +108,7 @@ Public Class MainComponentPageUC
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetLabel(ByVal nInd As Integer) As Label
|
||||
Private Function GetLabel(ByVal nInd As Integer) As TextBlock
|
||||
Select Case nInd
|
||||
Case 1
|
||||
Return LabelCompo1
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" />
|
||||
</DataTemplate>
|
||||
|
||||
<!-- *************************************************************************** -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TextBlock-->
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo1" Grid.Column="0" />
|
||||
<Label Name="LabelCompo1" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -44,8 +45,10 @@
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Name="ImageCompo2" Grid.Column="0" />
|
||||
<Label Name="LabelCompo2" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -56,7 +59,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo3" Grid.Column="0" />
|
||||
<Label Name="LabelCompo3" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -67,7 +71,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo4" Grid.Column="0" />
|
||||
<Label Name="LabelCompo4" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -78,7 +83,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo5" Grid.Column="0" />
|
||||
<Label Name="LabelCompo5" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -89,7 +95,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo6" Grid.Column="0" />
|
||||
<Label Name="LabelCompo6" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -100,7 +107,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo7" Grid.Column="0" />
|
||||
<Label Name="LabelCompo7" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -111,7 +119,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo8" Grid.Column="0" />
|
||||
<Label Name="LabelCompo8" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -122,7 +131,8 @@
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo9" Grid.Column="0" />
|
||||
<Label Name="LabelCompo9" Grid.Column="1" FontSize="22" VerticalAlignment="Center" />
|
||||
<TextBlock Name="LabelCompo9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ Public Class SecondaryComponentPageUC
|
||||
If sCompoImage.Length <> 0 Then
|
||||
Try
|
||||
sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
||||
GetImage(index).Height = 70
|
||||
GetImage(index).Width = 70
|
||||
GetImage(index).Height = 65
|
||||
GetImage(index).Width = 65
|
||||
GetImage(index).Source = sCompoImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & sCompoImage)
|
||||
@@ -62,16 +62,16 @@ Public Class SecondaryComponentPageUC
|
||||
If sCompoName.Length > 15 Then
|
||||
sCompoName = sCompoName.Substring(0, 15)
|
||||
End If
|
||||
GetLabel(index).Content = sCompoName
|
||||
GetLabel(index).Text = sCompoName
|
||||
'Se ci sono sia testo che immagine imposto un margine di 10
|
||||
CustomThickness.Right = 10
|
||||
GetImage(index).Margin = CustomThickness
|
||||
Else
|
||||
'se l'immagine non c'è e il testo è maggiore di 20 lo taglio
|
||||
If sCompoName.Length > 20 Then
|
||||
sCompoName = sCompoName.Substring(0, 20)
|
||||
If sCompoName.Length > 22 Then
|
||||
sCompoName = sCompoName.Substring(0, 22)
|
||||
End If
|
||||
GetLabel(index).Content = sCompoName
|
||||
GetLabel(index).Text = sCompoName
|
||||
End If
|
||||
Else
|
||||
'Se non c'è testo azzero la distanza tra testo e immagine
|
||||
@@ -106,28 +106,28 @@ Public Class SecondaryComponentPageUC
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetLabel(ByVal nInd As Integer) As Label
|
||||
Select Case nInd
|
||||
Case 1
|
||||
Return LabelCompo1
|
||||
Case 2
|
||||
Return LabelCompo2
|
||||
Case 3
|
||||
Return LabelCompo3
|
||||
Case 4
|
||||
Return LabelCompo4
|
||||
Case 5
|
||||
Return LabelCompo5
|
||||
Case 6
|
||||
Return LabelCompo6
|
||||
Case 7
|
||||
Return LabelCompo7
|
||||
Case 8
|
||||
Return LabelCompo8
|
||||
Case Else
|
||||
Return LabelCompo9
|
||||
End Select
|
||||
End Function
|
||||
Private Function GetLabel(ByVal nInd As Integer) As TextBlock
|
||||
Select Case nInd
|
||||
Case 1
|
||||
Return LabelCompo1
|
||||
Case 2
|
||||
Return LabelCompo2
|
||||
Case 3
|
||||
Return LabelCompo3
|
||||
Case 4
|
||||
Return LabelCompo4
|
||||
Case 5
|
||||
Return LabelCompo5
|
||||
Case 6
|
||||
Return LabelCompo6
|
||||
Case 7
|
||||
Return LabelCompo7
|
||||
Case 8
|
||||
Return LabelCompo8
|
||||
Case Else
|
||||
Return LabelCompo9
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetImage(ByVal nInd As Integer) As Image
|
||||
Select Case nInd
|
||||
@@ -177,12 +177,12 @@ Public Class SecondaryComponentPageUC
|
||||
|
||||
Private Sub ClearButton(nCount As Integer)
|
||||
For index As Integer = 1 To nCount + 1
|
||||
GetLabel(index).Content = String.Empty
|
||||
GetLabel(index).Text = String.Empty
|
||||
GetImage(index).Source = Nothing
|
||||
GetButton(index).Visibility = Windows.Visibility.Visible
|
||||
Next
|
||||
For index As Integer = nCount + 1 To 9
|
||||
GetLabel(index).Content = String.Empty
|
||||
GetLabel(index).Text = String.Empty
|
||||
GetImage(index).Source = Nothing
|
||||
GetButton(index).Visibility = Windows.Visibility.Hidden
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user