Compare commits

...

5 Commits

Author SHA1 Message Date
Demetrio Cassarino 9c267aacf7 -modifica grafica treeview cvs 2024-10-29 11:57:05 +01:00
Nicola Pievani 87037b6c6a Migliorata gestione selezione OnOff da lista lavorazioni 2024-10-28 12:09:15 +01:00
Nicola Pievani 74c479d17d Gestione attivazione comando modifica 2024-10-28 11:23:53 +01:00
Nicola Pievani ead6bcec6d Gestione deselezione tagli in pagina split 2024-10-09 16:33:45 +02:00
Nicola Pievani a1ad658f27 Correzione DoubleClick OnOff scena 2024-10-09 15:54:47 +02:00
5 changed files with 75 additions and 50 deletions
+18 -8
View File
@@ -27,7 +27,7 @@
</Grid.ColumnDefinitions>
<!--Griglia per oscurare i bottoni della pagina sottostante-->
<Grid Background="{DynamicResource OmagCut_Gray}">
<Grid Background="{DynamicResource OmagCut_Gray}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
@@ -49,7 +49,7 @@
<Label Name="CsvPathTxBl" Grid.Row="1" Background="White" FontSize="16" VerticalAlignment="Center" Padding="2,5,0,5"/>
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{StaticResource OmagCut_TreeViewGradientGray}">
<TreeView.Resources>
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
<!--renderlo apribile con un solo click -->
@@ -62,7 +62,7 @@
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" Foreground="Black" />
</Grid>
@@ -123,7 +123,10 @@
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding bIsActive}" Value="False">
<Setter Property="Foreground" Value="{StaticResource OmagCut_LightGray}"/>
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
</DataTrigger>
<DataTrigger Binding="{Binding bIsActive}" Value="True">
<Setter Property="Foreground" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
@@ -131,18 +134,25 @@
</HierarchicalDataTemplate>
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
<DataTemplate DataType="{x:Type self:PartCustomItem}">
<Grid Width="246" Margin="0,5,0,5" HorizontalAlignment="Right">
<Grid Width="234.8" Margin="0,5,0,5" HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
<TextBlock Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
<TextBlock x:Name="TbName" Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
<TextBlock x:Name="TbText1" Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
<TextBlock x:Name="TbText2" Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding bIsActive}" Value="False">
<Setter TargetName="TbName" Property="TextDecorations" Value="Strikethrough" />
<Setter TargetName="TbText1" Property="TextDecorations" Value="Strikethrough" />
<Setter TargetName="TbText2" Property="TextDecorations" Value="Strikethrough" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</TreeView.Resources>
+2 -1
View File
@@ -932,6 +932,7 @@ Public Class MoveRawPartPage
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
RefreshVisibility()
EgtZoom(ZM.ALL, True)
End Sub
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
@@ -1367,7 +1368,7 @@ Public Class MoveRawPartPage
Return
End If
' ------- VISUALIZZAZIONE -------
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
If m_SplitPage.m_bShow Then
' verifico se la fase successiva è uno scarico frontale
If NextOperationIsUnloading(m_nCurrDisposition) Then
+51 -37
View File
@@ -457,21 +457,7 @@ Public Class SplitPageUC
#End Region ' Bridge
Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene_DoubleClick
If MachiningLsBx.SelectedItems.Count = 1 Then
OnMyMouseDownScene(sender, e)
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
Dim nI As Integer = x.Ind
If m_MachiningList(nI).m_bEnabled Then
m_MachiningList(nI).m_bEnabled = False
x.bIsActive = False
Else
m_MachiningList(nI).m_bEnabled = True
x.bIsActive = True
End If
ColorMachining(m_MachiningList(nI))
ColorNumberArrow(nI)
EgtDraw()
End If
OnOffCut()
End Sub
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
@@ -585,6 +571,11 @@ Public Class SplitPageUC
m_nDragInd = -1
m_nDragType = 0
m_nSelected = GDB_ID.NULL
If Not IsNothing(MachiningLsBx.SelectedItem) Then
MarkMachining(MachiningLsBx.SelectedItem.Ind, False)
EgtDraw()
End If
MachiningLsBx.SelectedIndex = -1
End If
End Sub
@@ -714,6 +705,11 @@ Public Class SplitPageUC
End Sub
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
' se non attiva la modifica allora esco
If m_bShow Then
MachiningLsBx.SelectedIndex = -1
Return
End If
If MachiningLsBx.SelectedItems.Count = 0 Then Return
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
' creo lista ordinata dei selezionati
@@ -755,21 +751,10 @@ Public Class SplitPageUC
End Sub
Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick
' se disabilitata la modifica allora esco
If m_bShow Then Return
If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return
If MachiningLsBx.SelectedItems.Count = 1 Then
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
Dim nI As Integer = x.Ind
If m_MachiningList(nI).m_bEnabled Then
m_MachiningList(nI).m_bEnabled = False
x.bIsActive = False
Else
m_MachiningList(nI).m_bEnabled = True
x.bIsActive = True
End If
ColorMachining(m_MachiningList(nI))
ColorNumberArrow(nI)
EgtDraw()
End If
OnOffCut()
End Sub
Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click
@@ -1890,7 +1875,7 @@ Public Class SplitPageUC
End Sub
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
' ------- VISUALIZZAZIONE -------
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
If m_bShow Then
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
' recupero l'operazione successiva
@@ -1973,22 +1958,22 @@ Public Class SplitPageUC
NumberDirectionMachining(nI)
Next
' -------------------- Recupero le lavorazioni indicate come attive --------------------
' -------------------- Recupero le lavorazioni indicate come attive -- INIZIO --------------------
Dim ActiveMachLst As New List(Of Integer)
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
ActiveMachLst.Add(ItemSplitMach.Ind)
If ItemSplitMach.bIsActive Then ActiveMachLst.Add(ItemSplitMach.Ind)
Next
' -------------------- Recupero le lavorazioni indicate come attive --------------------
' -------------------- Recupero le lavorazioni indicate come attive -- FINE --------------------
' Preparo la lista degli Item
ShowMachiningList()
' -------------------- Riattivo le lavorazioni precedenti --------------------
' -------------------- Riattivo le lavorazioni precedenti -- INIZIO --------------------
For Each Item As SplitMach In m_MachiningList
' spengo tutte le lavorazioni disponibili
EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True)
Next
' riattivo solo quelle indicate come attive
For nIndex As Integer = 0 To ActiveMachLst.Count - 1
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then
@@ -2001,7 +1986,7 @@ Public Class SplitPageUC
End If
Next
Next
' -------------------- Riattivo le lavorazioni precedenti --------------------
' -------------------- Riattivo le lavorazioni precedenti -- FINE --------------------
' Aggiorno visualizzazione
EgtDraw()
@@ -2199,6 +2184,35 @@ Public Class SplitPageUC
End Sub
Private Sub OnOffCut()
If MachiningLsBx.SelectedItems.Count = 1 Then
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
Dim nI As Integer = x.Ind
If m_MachiningList(nI).m_bEnabled Then
m_MachiningList(nI).m_bEnabled = False
x.bIsActive = False
Else
m_MachiningList(nI).m_bEnabled = True
x.bIsActive = True
End If
ColorMachining(m_MachiningList(nI))
ColorNumberArrow(nI)
EgtDraw()
' Imposto flag di modifica
m_bModified = True
' recupero l'elenco degli elementi selezionati
Dim ItemList As New List(Of NameIdLsBxItem)
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
ItemList.Add(Item)
Next
VerifyHomogenousMachining(ItemList)
' Abilitazione bottone Next
EnableButtons()
Else
End If
End Sub
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
+2 -2
View File
@@ -343,8 +343,8 @@ Class MainWindow
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2609, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2609, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2610, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2610, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.9.1")>
<Assembly: AssemblyFileVersion("2.6.9.1")>
<Assembly: AssemblyVersion("2.6.10.1")>
<Assembly: AssemblyFileVersion("2.6.10.1")>