Merge commit 'cdf740cba7080760f7c88a112dd619bc8a9deb9c' into feature/DevExpress-RawPartList

This commit is contained in:
Demetrio Cassarino
2026-06-26 08:19:14 +02:00
38 changed files with 653 additions and 211 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ Imports System.Windows
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("Aedifica.Core")>
<Assembly: AssemblyCopyright("Copyright © 2020-2026 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
@@ -38,5 +38,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.6.2")>
<Assembly: AssemblyFileVersion("3.1.6.2")>
<Assembly: AssemblyVersion("3.1.6.4")>
<Assembly: AssemblyFileVersion("3.1.6.4")>
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.6.2")]
[assembly: AssemblyFileVersion("3.1.6.2")]
[assembly: AssemblyVersion("3.1.6.4")]
[assembly: AssemblyFileVersion("3.1.6.4")]
@@ -18,7 +18,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<StackPanel Style="{StaticResource MachinePanel_StackPanel}">
<ComboBox ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLDataWnd_ComboBox}">
@@ -68,50 +68,42 @@
<TextBlock Text="{Binding PROJNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sPROJNUM, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sPROJNAME, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJPART_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJPART, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sPROJPART, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJGUID_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJGUID, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sPROJGUID, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding LISTNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sLISTNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sLISTNAME, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding CUSTOMER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCUSTOMER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sCUSTOMER, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding ARCHITECT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sARCHITECT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sARCHITECT, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EDITOR_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEDITOR, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sEDITOR, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding DELIVDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
@@ -122,26 +114,22 @@
<TextBlock Text="{Binding EXPDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPDATE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sEXPDATE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPTIME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPTIME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sEXPTIME, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPRELEASE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPRELEASE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sEXPRELEASE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding LANGUAGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sLANGUAGE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sLANGUAGE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding RANGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
@@ -166,26 +154,22 @@
<TextBlock Text="{Binding COMPUTERNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCOMPUTERNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sCOMPUTERNAME, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding USER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sUSER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sUSER, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding SRCFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sSRCFILE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sSRCFILE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPFILE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sEXPFILE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding RECESS_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
@@ -200,8 +184,7 @@
<TextBlock Text="{Binding USERATTRIBUTE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sUSERATTRIBUTE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
Text="{Binding CurrBTLStructure.sUSERATTRIBUTE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
</UniformGrid>
@@ -20,6 +20,7 @@
If Not IsNothing(Map.refBTLDataWndVM.SelStrategySetup) AndAlso Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content)
Map.refBTLDataWndVM.SelStrategySetup = SelStrategy.Content
End If
@@ -33,6 +33,7 @@ Public Class BTLDataWndVM
If m_SelStrategySetup <> value Then
Map.refStrategyManagerVM.SelStrategySetup.sName = value
Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
ReadCustomGeneralParameters(value)
End If
m_SelStrategySetup = value
@@ -80,6 +81,13 @@ Public Class BTLDataWndVM
NotifyPropertyChanged(NameOf(ErrText))
End Sub
Private m_CurrBTLStructure As BTLStructureVM
Public ReadOnly Property CurrBTLStructure As BTLStructureVM
Get
Return m_CurrBTLStructure
End Get
End Property
#Region "Parametri generici"
Public m_sPROJNUM As String
@@ -565,8 +573,9 @@ Public Class BTLDataWndVM
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True)
End Sub
Sub New()
Sub New(BTLStructure As BTLStructureVM)
Map.SetRefBTLDataWndVM(Me)
m_CurrBTLStructure = BTLStructure
SetIsBTLDataWnd(True)
' leggo parametri Btl
ReadBtlParams()
@@ -962,7 +962,6 @@ Public Class BTLStructureVM
' tolgo pezzo selezionato
SelBTLPart.SelBTLFeatureVM = Nothing
End If
' mostro tutti i pezzi
' creo lista id presenti
Dim BTLPartIdList As List(Of Integer) = (From Part In BTLPartVMList
Select Part.nPartId).ToList()
@@ -1239,13 +1238,76 @@ Public Class BTLStructureVM
End If
End Sub
Public Sub RemovePart(BTLPartToDelete As BTLPartVM, bSelPrevious As Boolean)
' verifico se ci sono già copie in grezzi
Dim nDuploCount As Integer = 0
If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then
' avviso che il pezzo non è cancellabile perchè in produzione
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning)
Return
End If
' verifico se rimuovere sezione dalla lista
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToDelete AndAlso x.Section = BTLPartToDelete.Section) Then
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToDelete.Section)
Map.refProjectVM.BTLStructureVM.SelSection = SectionXMaterial.Empty
End If
' Eseguo cancellazione
EgtBeamSetPart(BTLPartToDelete.nPartId)
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then RemoveScenePart(BTLPartToDelete)
' seleziono elemento precedente
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete)
Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete)
Map.refProjectVM.BTLStructureVM.SelBTLParts.Remove(BTLPartToDelete)
If EgtBeamErasePart() Then
If bSelPrevious Then
If FilteredIndex = 0 Then
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(1))
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
End If
ElseIf FilteredIndex = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 1 Then
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 2))
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
End If
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(FilteredIndex - 1))
End If
End If
' rimuovo dalla lista pezzi
Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
End If
End Sub
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
' Rimuovo pezzo dalla scena
Dim IdAsseBase As Integer = 0
Dim DeletePartId As Integer = 0
If Not Map.refProdManagerVM.ListProjAsseBase.TryGetValue(BTLPartToDelete.nPROJ, IdAsseBase) Then
Return
End If
' Setto il nuovo contesto
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
If Map.refSceneShowBuldingVM.MapInfo.TryGetValue(BTLPartToDelete.nPartId, DeletePartId) Then
EgtErase(DeletePartId)
Map.refSceneShowBuldingVM.MapInfo.Remove(BTLPartToDelete.nPartId)
End If
EgtBeamShowBuilding(IdAsseBase, True)
EgtZoom(ZM.ALL)
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
End Sub
#End Region ' Methods
#Region "COMMANDS"
#Region "DeletePart_Command"
Public ReadOnly Property DeletePart_Command As ICommand
Public ReadOnly Property DeletePart_Command() As ICommand
Get
If m_cmdDeletePart Is Nothing Then
m_cmdDeletePart = New Command(AddressOf DeletePart)
@@ -1255,7 +1317,17 @@ Public Class BTLStructureVM
End Property
Public Sub DeletePart()
Map.refBTLPartManagerVM.RemovePartCmd()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1
RemovePart(CurrSelBTLParts(RemoveIndex), RemoveIndex = 0)
Next
End If
Else
Return
End If
End Sub
#End Region ' DeletePart_Command
@@ -1272,7 +1344,7 @@ Public Class BTLStructureVM
End Property
Friend Sub Data(nProjId As Integer)
Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM())
Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM(Map.refProjectVM.BTLStructureVM))
BTLDataWnd.ShowDialog()
End Sub
@@ -979,6 +979,7 @@ Public Class CALCPanelVM
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
End If
Map.refProjectVM.BTLStructureVM.LoadFilters()
Map.refMyStatusBarVM.RefreshMachName()
End Sub
@@ -1,7 +1,6 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.IO.Compression
Imports System.Reflection
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
@@ -25,22 +24,9 @@ Public Class ConfigurationPageVM
Set(value As Integer)
m_SelConfigSubPage = value
If m_SelConfigSubPage = ConfigSubPages.GENERAL Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(True)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(False)
ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(False)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(False)
ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetPDFEditor_Visibility(True)
SetGeneral_Visibility(False)
SetStrategyManager_Visibility(False)
End If
End Set
@@ -198,17 +184,6 @@ Public Class ConfigurationPageVM
End Set
End Property
Private m_bGeneral_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property General_Visibility As Visibility
Get
Return m_bGeneral_Visibility
End Get
End Property
Friend Sub SetGeneral_Visibility(value As Boolean)
m_bGeneral_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(General_Visibility))
End Sub
Private m_bStrategyManager_Visibility As Visibility = Visibility.Visible
Public ReadOnly Property StrategyManager_Visibility As Visibility
Get
@@ -24,7 +24,6 @@
Style="{StaticResource ConfigurationProgram_TextBlock}"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
@@ -1237,7 +1237,13 @@
<Resource Include="Resources\EgtDialog\Tiles.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\VerifyAllR.png" />
<Resource Include="Resources\NewPage\reset.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\VerifyAllRotation.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\arrow.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\EditIntestazione.png" />
@@ -365,6 +365,28 @@ Public MustInherit Class ProjectParameters
End Set
End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sValue As String
Public Property sValue As String
Get
@@ -421,6 +443,8 @@ Public MustInherit Class ProjectParameters
If IsNothing(JsonProjectParameters) Then Return
m_sName = JsonProjectParameters.sName
m_sNameNge = JsonProjectParameters.sNameNge
m_idDescriptionShortMsg = JsonProjectParameters.idDescriptionShortMsg
m_idDescriptionLongMsg = JsonProjectParameters.idDescriptionLongMsg
End Sub
#End Region ' Constructor
@@ -64,6 +64,28 @@ Public Class JsonGeneralParameters
End Set
End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sValue As String
Public Property sValue As String
Get
@@ -113,13 +135,15 @@ Public Class JsonGeneralParameters
#Region "CONSTRUCTOR"
<JsonConstructor>
Sub New(nGroup As String, sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, sType As String, sMinUserLevel As String)
Sub New(nGroup As String, sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionLongMsg As Integer, idDescriptionShortMsg As Integer, sType As String, sMinUserLevel As String)
m_nGroup = nGroup
m_sName = sName
m_sNameNge = sNameNge
m_sValue = sValue
m_sDescriptionShort = sDescriptionShort
m_sDescriptionLong = sDescriptionLong
m_idDescriptionShortMsg = idDescriptionShortMsg
m_idDescriptionLongMsg = idDescriptionLongMsg
m_sType = sType
m_sMinUserLevel = sMinUserLevel
End Sub
@@ -142,6 +166,8 @@ Public Class JsonGeneralParameters
m_nGroup = ProjectParameters.nGroup
m_sDescriptionShort = ProjectParameters.sDescriptionShort
m_sDescriptionLong = ProjectParameters.sDescriptionLong
m_idDescriptionShortMsg = ProjectParameters.idDescriptionShortMsg
m_idDescriptionLongMsg = ProjectParameters.idDescriptionLongMsg
m_sMinUserLevel = ProjectParameters.sMinUserLevel
End Sub
@@ -192,8 +218,16 @@ Public Class JsonGeneralParameters
ProjectParameters.nGroup = m_nGroup
ProjectParameters.sName = m_sName
ProjectParameters.sNameNge = m_sNameNge
ProjectParameters.sDescriptionShort = m_sDescriptionShort
ProjectParameters.sDescriptionLong = m_sDescriptionLong
If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
ProjectParameters.sDescriptionShort = m_sDescriptionShort
Else
ProjectParameters.sDescriptionShort = EgtMsg(m_idDescriptionShortMsg)
End If
If m_idDescriptionLongMsg < 0 OrElse EgtMsg(m_idDescriptionLongMsg).StartsWith("Msg") Then
ProjectParameters.sDescriptionLong = m_sDescriptionLong
Else
ProjectParameters.sDescriptionLong = EgtMsg(m_idDescriptionLongMsg)
End If
ProjectParameters.sMinUserLevel = m_sMinUserLevel
Return ProjectParameters
End Function
@@ -64,6 +64,28 @@ Public Class JsonProjectParameters
End Set
End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sValue As String
Public Property sValue As String
Get
@@ -113,7 +135,7 @@ Public Class JsonProjectParameters
#Region "CONSTRUCTOR"
<JsonConstructor>
Sub New(mGroup As String, sName As String, sNameNge As String, sValue As String, sType As String, sDescriptionShort As String, sDescriptionLong As String, sMinUserLevel As String)
Sub New(mGroup As String, sName As String, sNameNge As String, sValue As String, sType As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionShortMsg As Integer, idDescriptionLongMsg As Integer, sMinUserLevel As String)
m_nGroup = nGroup
m_sName = sName
m_sNameNge = sNameNge
@@ -121,6 +143,8 @@ Public Class JsonProjectParameters
m_sType = sType
m_sDescriptionShort = sDescriptionShort
m_sDescriptionLong = sDescriptionLong
m_idDescriptionShortMsg = idDescriptionShortMsg
m_idDescriptionLongMsg = idDescriptionLongMsg
m_sMinUserLevel = sMinUserLevel
End Sub
@@ -141,6 +165,8 @@ Public Class JsonProjectParameters
End Select
m_sDescriptionShort = ProjectParameters.sDescriptionShort
m_sDescriptionLong = ProjectParameters.sDescriptionLong
m_idDescriptionShortMsg = ProjectParameters.idDescriptionShortMsg
m_idDescriptionLongMsg = ProjectParameters.idDescriptionLongMsg
m_sMinUserLevel = ProjectParameters.sMinUserLevel
End Sub
@@ -191,6 +217,16 @@ Public Class JsonProjectParameters
ProjectParameters.nGroup = nGroup
ProjectParameters.sName = m_sName
ProjectParameters.sNameNge = m_sNameNge
If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
ProjectParameters.sDescriptionShort = m_sDescriptionShort
Else
ProjectParameters.sDescriptionShort = EgtMsg(m_idDescriptionShortMsg)
End If
If m_idDescriptionLongMsg < 0 OrElse EgtMsg(m_idDescriptionLongMsg).StartsWith("Msg") Then
ProjectParameters.sDescriptionLong = m_sDescriptionLong
Else
ProjectParameters.sDescriptionLong = EgtMsg(m_idDescriptionLongMsg)
End If
ProjectParameters.sDescriptionShort = m_sDescriptionShort
ProjectParameters.sDescriptionLong = m_sDescriptionLong
ProjectParameters.sMinUserLevel = m_sMinUserLevel
@@ -14,7 +14,8 @@
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
PreviewKeyDown="Root_PreviewKeyDown">
<UserControl.Resources>
<OPTIMIZER:DataGridCellBorderThicknessConverter x:Key="DataGridCellBorderThicknessConverter"/>
<OPTIMIZER:ProjIdToBtlFileName x:Key="ProjIdToBtlFileName"/>
@@ -286,40 +287,56 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.ColumnSpan="2"
Text="&#11119;"
Visibility="{Binding CALC_ROT_Visibility}"
Style="{StaticResource CALC_ROTFeature_TextBlock}"/>
<TextBlock Grid.Column="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
Style="{StaticResource CALC_ERR_Letter_TextBlock}"/>
</Grid>
<TextBlock Grid.Column="2"
Visibility="{Binding bStrategy_Visibility}"
Style="{StaticResource bStrategy_TextBlock}"/>
</Grid>
<CheckBox Grid.Column="2"
IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLPartList_CheckBox}"/>
<TextBlock Grid.Column="3"
Text="{Binding sFeature_Name}"
Style="{StaticResource Prod_TextBlock}"/>
<Button Grid.Column="4"
Command="{Binding EditFeature_Command}"
Click="SelectButton_Click"
Style="{StaticResource EditFeature_Button}">
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="1"
Grid.Column="1"
Style="{StaticResource BTLPartList_StackPanel}">
<TextBlock Text="STATUS:"
Style="{StaticResource Status_TextBlock}"/>
<TextBlock Grid.Column="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
Style="{StaticResource CALC_ERR_Letter_TextBlock}"/>
</Grid>
<TextBlock Grid.Column="2"
Visibility="{Binding bStrategy_Visibility}"
Style="{StaticResource bStrategy_TextBlock}"/>
</Grid>
<CheckBox Grid.Column="2"
IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLPartList_CheckBox}"/>
<TextBlock Grid.Column="3"
Text="["
Style="{StaticResource Prod_TextBlock}"/>
<TextBlock Grid.Column="4"
Text="{Binding nSelGRP}"
Style="{StaticResource Prod_TextBlock}"/>
<TextBlock Grid.Column="5"
Text="-"
Style="{StaticResource Prod_TextBlock}"/>
<TextBlock Grid.Column="6"
Text="{Binding nPRC, StringFormat={}{0:000}}"
Style="{StaticResource Prod_TextBlock}"/>
<TextBlock Grid.Column="7"
Text="] "
Style="{StaticResource Prod_TextBlock}"/>
<TextBlock Grid.Column="8"
Text="{Binding sName}"
Style="{StaticResource Name_TextBlock}"/>
<Button Grid.Column="9"
Command="{Binding EditFeature_Command}"
Click="SelectButton_Click"
Style="{StaticResource EditFeature_Button}">
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="1"
Grid.Column="1"
Style="{StaticResource BTLPartList_StackPanel}">
<TextBlock Text="STATUS:"
Style="{StaticResource Status_TextBlock}"/>
<TextBlock Text="{Binding Tag.SelBTLPart.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
Visibility="{Binding Tag.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
@@ -282,8 +282,9 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
Style="{StaticResource CALC_ROTRawPartList_TextBlock}"/>
<TextBlock Text="&#11119;"
Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
Style="{StaticResource CALC_ROTRawPartList_TextBlock}"/>
<TextBlock Grid.Row="1"
Text="{Binding RowData.Row.CALC_ERR_Letter}"
Foreground="{Binding RowData.Row.CALC_ERR_Foreground}"
@@ -145,6 +145,12 @@ Public Class LeftPanelVM
End Get
End Property
Public ReadOnly Property VerifyAllFlipRot_ToolTip As String
Get
Return EgtMsg(62000)
End Get
End Property
Public ReadOnly Property FilterAll_ToolTip As String
Get
Return EgtMsg(62570)
@@ -204,7 +204,7 @@ Public Class MyMachGroupPanelVM
End Function
Public Overrides Sub AddMachGroup()
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(CurrentMachine.sMachineName, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(Map.refMachinePanelVM.SelectedMachine.Name, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' e lo seleziono
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
End Sub
@@ -945,7 +945,7 @@ Public Class MyMachGroupVM
Friend Sub Verify()
If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetIsRowEnabled(False)
Map.refMachGroupPanelVM.SelectedMachGroup.SetIsRowEnabled(False)
Map.refCALCPanelVM.Verify(ProjectType.PROD, CalcIntegration.CmdTypes.CHECKGEN)
Return
End Sub
+6 -2
View File
@@ -40,8 +40,12 @@ Public Class MainMenuVM
End Get
Set(value As Boolean)
If value Then
SelPage = Pages.OPTIMIZERPAGE
SetConfigurationImagePath(CONFIGURATION_IMAGE)
Dim bModify As Boolean = True
If Map.refStrategyManagerVM.bIsModifyStrategy Then bModify = Map.refStrategyManagerVM.SaveCustomConfigJson()
If bModify Then
SelPage = Pages.OPTIMIZERPAGE
SetConfigurationImagePath(CONFIGURATION_IMAGE)
End If
End If
End Set
End Property
@@ -305,6 +305,37 @@ Public Class MainWindowM
End While
' Leggo file messaggi
Dim sMsgFilePath As String = sMsgDir & "\" & sMsgName
' leggo messaggi automatismo
Dim sAutoMsgFilePath As String = ""
Dim sPluginName As String = ""
If GetMainPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sAutoMsgFilePath) > 0 AndAlso Not String.IsNullOrWhiteSpace(sAutoMsgFilePath) Then
' recupero nome del file messaggi dell'automatismo
sAutoMsgFilePath &= "\Messages\" & sMsgName
If File.Exists(sAutoMsgFilePath) Then
Dim OrigMsgFile As List(Of String) = File.ReadAllLines(sMsgFilePath).ToList()
' elimino eventuali righe vuote o commento di fine
While String.IsNullOrWhiteSpace(OrigMsgFile.Last()) OrElse OrigMsgFile.Last().StartsWith("//")
OrigMsgFile.RemoveAt(OrigMsgFile.Count - 1)
End While
Dim AutoMsgFile As List(Of String) = File.ReadAllLines(sAutoMsgFilePath).ToList()
' elimino eventuale riga di inizio file
If AutoMsgFile.Count > 2 AndAlso AutoMsgFile(0).StartsWith("//") AndAlso AutoMsgFile(1).StartsWith("0") Then
AutoMsgFile.RemoveAt(0)
AutoMsgFile.RemoveAt(0)
End If
OrigMsgFile.AddRange(AutoMsgFile)
Dim sNewMsgFilePath As String = sMsgDir & "\Complete" & sMsgName
Dim bNewMsgFile As Boolean = False
Try
File.WriteAllLines(sNewMsgFilePath, OrigMsgFile)
bNewMsgFile = True
Catch ex As Exception
End Try
If bNewMsgFile Then
sMsgFilePath = sNewMsgFilePath
End If
End If
End If
If Not EgtLoadMessages(sMsgFilePath) Then
EgtOutLog("Error in EgtLoadMessages")
End If
@@ -51,6 +51,11 @@ Public Class MainWindowV
e.Cancel = True
Return
End If
If Map.refProjectVM.bCalcRunning Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(63047), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
e.Cancel = True
Return
End If
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True
Return
@@ -67,5 +67,5 @@ Imports System.Windows
' Revision
'
<Assembly: AssemblyVersion("3.1.6.2")>
<Assembly: AssemblyFileVersion("3.1.6.2")>
<Assembly: AssemblyVersion("3.1.6.4")>
<Assembly: AssemblyFileVersion("3.1.6.4")>
@@ -5,6 +5,7 @@
If Not IsNothing(Map.refProjectVM.SelStrategySetup) AndAlso Map.refProjectVM.SelStrategySetup.Equals(SelStrategy.Content) Then
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
Map.refProjectVM.CustomGeneralParameters(SelStrategy.Content)
Map.refProjectVM.SelStrategySetup = SelStrategy.Content
End If
@@ -25,62 +25,52 @@
<TextBlock Text="{Binding NAM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sNAM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sNAM, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding COUNT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCNT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sCNT, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding ORDERNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.nORDERNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.nORDERNUM, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PLANINGLEN_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.dPLANINGLEN, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.dPLANINGLEN, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding STARTOFFSET_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.dSTARTOFFSET, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.dSTARTOFFSET, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding ENDOFFSET_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.dENDOFFSET, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.dENDOFFSET, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding DESIGN_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sDESIGN, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sDESIGN, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding GROUP_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sGROUP, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sGROUP, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding STOREY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sSTOREY, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sSTOREY, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding ANNOT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sANNOT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sANNOT, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding MATERIAL_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
@@ -113,8 +103,7 @@
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1"
Text="{Binding Tag.nCOLA, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.nCOLA, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
</Grid>
</GroupBox>
@@ -125,38 +114,32 @@
<TextBlock Text="{Binding TIMBERGRADE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sTIMBERGRADE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sTIMBERGRADE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding QUALITYGRADE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sQUALITYGRADE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sQUALITYGRADE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PACKAGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPACKAGE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sPACKAGE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding ASSEMBLYNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sASSEMBLYNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sASSEMBLYNUM, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding ELEMENTNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sELEMENTNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sELEMENTNUM, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding MODULENUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sMODULENUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sMODULENUM, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
@@ -191,14 +174,12 @@
<TextBlock Text="{Binding LAYER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.nLAYER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.nLAYER, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding COMMENT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCOMMENT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sCOMMENT, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
</UniformGrid>
@@ -274,8 +255,7 @@
<TextBlock Text="{Binding GRAINDIRECTION_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.GrainDirection, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.GrainDirection, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Grid.Row="1"
Text="{Binding GRAINDIRALIGN_MSG}"
@@ -316,8 +296,7 @@
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1"
Text="{Binding Tag.CamberParams, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.CamberParams, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
</Grid>
</GroupBox>
@@ -349,8 +328,7 @@
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1"
Text="{Binding Tag.PartOffsetParams, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.PartOffsetParams, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
</Grid>
</GroupBox>
@@ -382,8 +360,7 @@
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1"
Text="{Binding Tag.sMATERIALTYPESPEC, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.sMATERIALTYPESPEC, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
</Grid>
</GroupBox>
@@ -454,24 +431,21 @@
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1"
Text="{Binding Tag.TransfOrig, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.TransfOrig, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Grid.Row="2"
Text="{Binding TRANSFVERSX_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="2"
Grid.Column="1"
Text="{Binding Tag.TransfVersX, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.TransfVersX, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Grid.Row="3"
Text="{Binding TRANSFVERSY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="3"
Grid.Column="1"
Text="{Binding Tag.TransfVersY, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
Text="{Binding CurrPart.TransfVersY, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/>
</Grid>
</GroupBox>
@@ -850,12 +850,13 @@ Public Class ProdManagerVM
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
GeneralParametersWndVM.SaveProjectParameters()
m_BTLDataWnd = New BTLDataWndVM()
' leggo struttura BTL per liste
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
m_BTLDataWnd = New BTLDataWndVM(Map.refProjectVM.BTLStructureVM)
m_BTLDataWnd.Read(nType)
m_BTLDataWnd.SaveInfoBTL(nType)
' leggo struttura BTL per liste
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
CopyBuilding()
Dim sProjFileName As String = sProjDir & "\" & nProjId.ToString("0000") & ".nge"
Dim bFirstPart As Boolean = EgtGetFirstPart() <> GDB_ID.NULL
@@ -1120,7 +1121,7 @@ Public Class ProdManagerVM
' imposto progetto corrente
Dim OldProd As ProdFileVM = ProjectManagerVM.CurrProd
ProjectManagerVM.CurrProd = TempCurrProd
m_BTLDataWnd = New BTLDataWndVM()
m_BTLDataWnd = New BTLDataWndVM(Map.refProjectVM.BTLStructureVM)
DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
' recupero indice di modifica progetto quando caricato
Dim CommIndex As Integer = -1
@@ -320,6 +320,7 @@ Public Class ProjectVM
If Not IsNothing(value) Then
Map.refStrategyManagerVM.SelStrategySetup.sName = value
Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
CustomGeneralParameters(value)
End If
m_SelStrategySetup = value
@@ -329,6 +330,7 @@ Public Class ProjectVM
Friend Sub SetSelStrategy(value As String)
m_SelStrategySetup = value
Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
Map.refSceneHostVM.SaveProject()
NotifyPropertyChanged(NameOf(SelStrategySetup))
End Sub
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -199,7 +199,7 @@ Public Class PDFEditorVM
SetWebAddress("")
End Sub
#End Region ' CreatePreviewVis
#End Region ' ClosePreview
#End Region ' Commands
@@ -1,9 +1,9 @@
Imports EgtWPFLib5
Imports EgtUILib
Imports Newtonsoft.Json
Imports System.Collections.ObjectModel
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core.ConstBeam
Imports EgtUILib
Imports EgtWPFLib5
Imports Newtonsoft.Json
'----------- Classe che fa riferimento alle Feature del file Json -----------
Public Class JsonAvailableStrategyFeature
@@ -339,6 +339,28 @@ Public Class JsonDefaultStrategyParameter
End Set
End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sType As String
Public Property sType As String
Get
@@ -410,12 +432,14 @@ Public Class JsonDefaultStrategyParameter
#Region "CONSTRUCTOR"
<JsonConstructor>
Sub New(sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, sType As String, sSource As String, sSubType As String, sMessageId As String, sMinUserLevel As Integer)
Sub New(sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionShortMsg As Integer, idDescriptionLongMsg As Integer, sType As String, sSource As String, sSubType As String, sMessageId As String, sMinUserLevel As Integer)
m_sName = sName
m_sNameNge = sNameNge
m_sValue = sValue
m_sDescriptionShort = sDescriptionShort
m_sDescriptionLong = sDescriptionLong
m_idDescriptionShortMsg = idDescriptionShortMsg
m_idDescriptionLongMsg = idDescriptionLongMsg
m_sType = sType
m_sSource = sSource
m_sSubType = sSubType
@@ -442,6 +466,8 @@ Public Class JsonDefaultStrategyParameter
m_sSubType = StrategyParameter.sSubType
m_sDescriptionShort = StrategyParameter.sDescriptionShort
m_sDescriptionLong = StrategyParameter.sDescriptionLong
m_idDescriptionShortMsg = StrategyParameter.idDescriptionShortMsg
m_idDescriptionLongMsg = StrategyParameter.idDescriptionLongMsg
m_sMessageId = StrategyParameter.sMessageId
m_sMinUserLevel = StrategyParameter.sMinUserLevel
End Sub
@@ -491,8 +517,18 @@ Public Class JsonDefaultStrategyParameter
StrategyParameter.sName = m_sName
StrategyParameter.sNameNge = m_sNameNge
StrategyParameter.sSubType = m_sSubType
StrategyParameter.sDescriptionShort = m_sDescriptionShort
StrategyParameter.sDescriptionLong = m_sDescriptionLong
If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
StrategyParameter.sDescriptionShort = m_sDescriptionShort
Else
StrategyParameter.sDescriptionShort = EgtMsg(m_idDescriptionShortMsg)
End If
If m_idDescriptionLongMsg < 0 OrElse EgtMsg(m_idDescriptionLongMsg).StartsWith("Msg") Then
StrategyParameter.sDescriptionLong = m_sDescriptionLong
Else
StrategyParameter.sDescriptionLong = EgtMsg(m_idDescriptionLongMsg)
End If
StrategyParameter.idDescriptionShortMsg = m_idDescriptionShortMsg
StrategyParameter.idDescriptionLongMsg = m_idDescriptionLongMsg
StrategyParameter.sMessageId = m_sMessageId
StrategyParameter.sMinUserLevel = m_sMinUserLevel
Return StrategyParameter
@@ -537,6 +573,28 @@ Public Class JsonDefaultComboParameter
End Set
End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sMessageId As String
Public Property sMessageId As String
Get
@@ -551,10 +609,12 @@ Public Class JsonDefaultComboParameter
#Region "CONSTRUCTOR"
<JsonConstructor>
Sub New(sValue As String, sDescriptionShort As String, sDescriptionLong As String, sMessageId As String)
Sub New(sValue As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionShortMsg As Integer, idDescriptionLongMsg As Integer, sMessageId As String)
m_sValue = sValue
m_sDescriptionShort = sDescriptionShort
m_sDescriptionLong = sDescriptionLong
m_idDescriptionShortMsg = idDescriptionShortMsg
m_idDescriptionLongMsg = idDescriptionLongMsg
m_sMessageId = sMessageId
End Sub
@@ -562,6 +622,8 @@ Public Class JsonDefaultComboParameter
m_sValue = ComboParameter.sValue
m_sDescriptionShort = ComboParameter.sDescriptionShort
m_sDescriptionLong = ComboParameter.sDescriptionLong
m_idDescriptionShortMsg = ComboParameter.idDescriptionShortMsg
m_idDescriptionLongMsg = ComboParameter.idDescriptionLongMsg
m_sMessageId = ComboParameter.sMessageId
End Sub
@@ -97,8 +97,8 @@
</CheckBox>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type OPTIMIZER:Topology}">
<TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Text="{Binding sName}"
Style="{StaticResource TreeView_TextBlock}"/>
</DataTemplate>
</TreeView.Resources>
<TreeView.ItemContainerStyle>
@@ -122,7 +122,7 @@
<RowDefinition Height="0.93*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<GroupBox x:Name="GR"
Style="{StaticResource ProjectParameters_GroupBox}">
<GroupBox.Header>
@@ -142,10 +142,23 @@
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<!--<ColumnDefinition Width="1*"/>-->
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding SelTreeItem.sName}"
Style="{StaticResource TreeItemName_TextBlock}"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button Command="{Binding UpdateFeatureCommand}"
Visibility="{Binding Update_Visibility}"
Style="{StaticResource Update_Button}">
<Image Source="{StaticResource Update_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<TextBlock Grid.Column="1"
Text="{Binding SelTreeItem.sName}"
Style="{StaticResource TreeItemName_TextBlock}"/>
</Grid>
<Image Grid.Row="1"
Source="{Binding SelTreeItem.sImage}"
Style="{StaticResource StrategyManager_Image}"/>
@@ -66,8 +66,9 @@ Public Class StrategyManagerVM
End If
End If
m_SelStrategySetup.Read()
End If
SetSaveImage(MODIFY_IMAGE)
OrderStrategyList(m_SelStrategySetup.StrategyFeatureList)
End If
SetSaveImage(MODIFY_IMAGE)
NotifyPropertyChanged(NameOf(SelStrategySetup))
End Set
End Property
@@ -77,6 +78,7 @@ Public Class StrategyManagerVM
' Scrivo file defaultconfig nell'ini
EgtUILib.WritePrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, m_SelStrategySetup.sName, Map.refMainWindowVM.MainWindowM.sDefaultConfig)
m_SelStrategySetup.Read()
OrderStrategyList(m_SelStrategySetup.StrategyFeatureList)
End If
NotifyPropertyChanged(NameOf(SelStrategySetup))
End Sub
@@ -104,6 +106,8 @@ Public Class StrategyManagerVM
TmpImage = ImageRoot & Item.sImage
Item.sImage = TmpImage
End If
' Gestisco visibilita' pulsante Update Feature
SetUpdate_Visibility(If(Item.sName <> "Feature", True, False))
m_SelTreeItem = Item
NotifyPropertyChanged(NameOf(SelTreeItem))
End Sub
@@ -207,6 +211,17 @@ Public Class StrategyManagerVM
NotifyPropertyChanged(NameOf(DefaultConfig_IsChecked))
End Sub
Private m_bUpdate_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property Update_Visibility As Visibility
Get
Return m_bUpdate_Visibility
End Get
End Property
Friend Sub SetUpdate_Visibility(value As Boolean)
m_bUpdate_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(Update_Visibility))
End Sub
#Region "Messages"
Public ReadOnly Property SaveToolTip As String
@@ -252,6 +267,7 @@ Public Class StrategyManagerVM
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
Private m_cmdConfigurationParametersCommand As ICommand
Private m_cmdUpdateFeatureCommand As ICommand
#End Region ' Field & Properties
@@ -270,15 +286,26 @@ Public Class StrategyManagerVM
''' <summary>
''' Funzione che salva il file customconfig se sono presenti modifiche
''' </summary>
Friend Sub SaveCustomConfigJson()
''' </summary>
Friend Function SaveCustomConfigJson() As Boolean
' Controlla se il file JSON è stato modificato
If Not m_bIsModifyStrategy Then Return
' Chiede conferma per il salvataggio
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62580), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
m_SelStrategySetup.Write(Map.refGeneralParametersStrategyVM.GeneralParametersList, False)
End If
End Sub
If Not m_bIsModifyStrategy Then Return False
' Chiedo conferma per il salvataggio
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62580), EgtMsg(15003), MessageBoxButton.YesNoCancel, MessageBoxImage.Information)
Case MessageBoxResult.Yes
If IsNothing(Map.refGeneralParametersStrategyVM) Then
Dim GeneralParametersVM As New GeneralParametersStrategyVM()
Map.refGeneralParametersStrategyVM.GeneralParametersList = GeneralParametersVM.GeneralParametersList
End If
m_SelStrategySetup.Write(Map.refGeneralParametersStrategyVM.GeneralParametersList, False)
SetbIsModifyStrategy(False)
Case MessageBoxResult.No
Update()
Case MessageBoxResult.Cancel
Return False
End Select
Return True
End Function
Friend Sub Update()
m_StrategySetupList.Clear()
@@ -331,6 +358,18 @@ Public Class StrategyManagerVM
End If
End Sub
Friend Sub OrderStrategyList(StrategyFeatureList As ObservableCollection(Of StrategyFeature))
For Each StrategySetupItem As StrategyFeature In StrategyFeatureList
For Each StrategyFeatureItem As Topology In StrategySetupItem.TopologyList
Dim OrderStrategyList As List(Of Strategy) = StrategyFeatureItem.StrategyList.OrderBy(Function(s) s.nIndexInList).ToList()
StrategyFeatureItem.StrategyList.Clear()
For Each OrderStrategyItem As Strategy In OrderStrategyList
StrategyFeatureItem.StrategyList.Add(OrderStrategyItem)
Next
Next
Next
End Sub
#End Region ' Methods
#Region "COMMANDS"
@@ -493,11 +532,17 @@ Public Class StrategyManagerVM
Dim IndexActiveStrategy As Integer = m_SelTreeItem.StrategyList.IndexOf(m_SelTreeItem.SelActiveStrategy)
' Recupero indice elemento selezionato in lista
Dim NewIndexActiveStrategy As Integer = IndexActiveStrategy - 1
' Setto indice per capire che la strategia è stata spostata in StrategyList
m_SelTreeItem.SelActiveStrategy.nIndexInList = NewIndexActiveStrategy
' Se l'indice è maggiore di 0
If IndexActiveStrategy > 0 Then
' Muovo l'elemento selezionato sopra di 1
m_SelTreeItem.StrategyList.Move(IndexActiveStrategy, NewIndexActiveStrategy)
End If
' Riallinea tutti gli indici
For Index As Integer = 0 To m_SelTreeItem.StrategyList.Count - 1
m_SelTreeItem.StrategyList(Index).nIndexInList = Index
Next
' Setto a true booleano per modifica
SetbIsModifyStrategy(True)
' Aggiorno la lista
@@ -526,11 +571,17 @@ Public Class StrategyManagerVM
Dim IndexActiveStrategy As Integer = m_SelTreeItem.StrategyList.IndexOf(m_SelTreeItem.SelActiveStrategy)
' Recupero indice elemento selezionato in lista
Dim NewIndexActiveStrategy As Integer = IndexActiveStrategy + 1
' Setto indice per capire che la strategia è stata spostata in StrategyList
m_SelTreeItem.SelActiveStrategy.nIndexInList = NewIndexActiveStrategy
' Se l'indice è maggiore di 0
If IndexActiveStrategy >= 0 Then
' Muovo l'elemento selezionato sopra di 1
m_SelTreeItem.StrategyList.Move(IndexActiveStrategy, NewIndexActiveStrategy)
End If
' Riallinea tutti gli indici
For Index As Integer = 0 To m_SelTreeItem.StrategyList.Count - 1
m_SelTreeItem.StrategyList(Index).nIndexInList = Index
Next
' Setto a true booleano per modifica
SetbIsModifyStrategy(True)
' Aggiorno la lista
@@ -599,6 +650,68 @@ Public Class StrategyManagerVM
#End Region ' ConfigurationParametersCommand
#Region "UpdateFeatureCommand"
Public ReadOnly Property UpdateFeatureCommand As ICommand
Get
If m_cmdUpdateFeatureCommand Is Nothing Then
m_cmdUpdateFeatureCommand = New Command(AddressOf UpdateFeature)
End If
Return m_cmdUpdateFeatureCommand
End Get
End Property
Public Sub UpdateFeature()
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62591) & " " & m_SelTreeItem.SelParamStrategy.sStrategyName & " " & EgtMsg(62592) & " " & m_SelTreeItem.sName & " ?", EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information)
Case MessageBoxResult.Yes
For Each StrategyFeatureItem As StrategyFeature In m_SelStrategySetup.StrategyFeatureList
For Each TopologyItem As Topology In StrategyFeatureItem.TopologyList
If TopologyItem.sName = m_SelTreeItem.sName Then
For Each StrategyItem As Strategy In TopologyItem.StrategyList
Dim Strategy As Strategy = m_SelTreeItem.StrategyList.FirstOrDefault(Function(s) s.sStrategyId = StrategyItem.sStrategyId AndAlso s.sStrategyName = StrategyItem.sStrategyName)
If IsNothing(Strategy) Then Continue For
For Each ParamItem As StrategyParameter In StrategyItem.ParameterList
Dim StrategyParam As StrategyParameter = Strategy.ParameterList.FirstOrDefault(Function(p) p.sName = ParamItem.sName)
If IsNothing(StrategyParam) Then Continue For
Select Case ParamItem.GetType()
Case GetType(BooleanStrategyParameter)
Dim bValue As Boolean = DirectCast(StrategyParam, BooleanStrategyParameter).bValue
DirectCast(ParamItem, BooleanStrategyParameter).SetValue(bValue)
Case GetType(DoubleStrategyParameter)
Dim sValue As String = DirectCast(StrategyParam, DoubleStrategyParameter).sValue
DirectCast(ParamItem, DoubleStrategyParameter).SetValue(sValue)
Case GetType(ComboStrategyParameter)
Dim selValue As ComboParameter = Nothing
If IsNothing(DirectCast(StrategyParam, ComboStrategyParameter).SelValue) Then
selValue = DirectCast(ParamItem, ComboStrategyParameter).SelValue
Else
selValue = DirectCast(StrategyParam, ComboStrategyParameter).SelValue
End If
DirectCast(ParamItem, ComboStrategyParameter).SetSelValue(selValue.sValue)
Case GetType(StringStrategyParameter)
Dim sValue As String = DirectCast(StrategyParam, StringStrategyParameter).sValue
DirectCast(ParamItem, StringStrategyParameter).SetValue(sValue)
Case GetType(ListStrategyParameter)
For Each ToolParamItem In DirectCast(StrategyParam, ListStrategyParameter).ListValue
Dim NewToolParamItem As ToolParameter = DirectCast(ParamItem, ListStrategyParameter).ListValue.FirstOrDefault(Function(x) x.sName = ToolParamItem.sName)
NewToolParamItem.bIsActive = ToolParamItem.bIsActive
Next
DirectCast(ParamItem, ListStrategyParameter).SelValue = DirectCast(ParamItem, ListStrategyParameter).ListValue.FirstOrDefault(Function(x) x.bIsActive)
DirectCast(ParamItem, ListStrategyParameter).ActiveToolList_View.Refresh()
DirectCast(ParamItem, ListStrategyParameter).AvailableToolList_View.Refresh()
End Select
Next
Next
End If
Next
Next
Case MessageBoxResult.No
Return
End Select
End Sub
#End Region ' UpdateFeatureCommand
#End Region ' Commands
End Class
@@ -990,10 +1103,7 @@ Public Class Topology
m_sName = JsonTopology.sName
m_sImage = JsonTopology.sImage
m_StrategyList = New ObservableCollection(Of Strategy)(JsonTopology.StrategyList.Select(Function(jsonStrategy) New Strategy(jsonStrategy)))
m_AvailableStrategyList_View = New ListCollectionView(StrategyList)
m_AvailableStrategyList_View.Filter = AddressOf AvailableStrategyFilter
m_ActiveStrategyList_View = New ListCollectionView(StrategyList)
m_ActiveStrategyList_View.Filter = AddressOf ActiveStrategyFilter
CreateStrategyViews()
NotifyPropertyChanged(NameOf(StrategyList))
End Sub
@@ -1012,13 +1122,16 @@ Public Class Topology
Friend Sub CreateStrategyViews()
m_AvailableStrategyList_View = New ListCollectionView(StrategyList)
m_AvailableStrategyList_View.Filter = AddressOf AvailableStrategyFilter
m_AvailableStrategyList_View.SortDescriptions.Add(New SortDescription("nIndexInList", ListSortDirection.Ascending))
m_ActiveStrategyList_View = New ListCollectionView(StrategyList)
m_ActiveStrategyList_View.Filter = AddressOf ActiveStrategyFilter
m_ActiveStrategyList_View.SortDescriptions.Add(New SortDescription("nIndexInList", ListSortDirection.Ascending))
End Sub
Friend Function Serialize() As JsonTopology
Dim JsonTopology As New JsonTopology(m_sName)
For Each Strategy In m_StrategyList
Dim mOrderStrategyList As IOrderedEnumerable(Of Strategy) = m_StrategyList.OrderBy(Function(s) s.nIndexInList)
For Each Strategy As Strategy In mOrderStrategyList
JsonTopology.StrategyList.Add(Strategy.Serialize())
Next
Return JsonTopology
@@ -1262,6 +1375,28 @@ Public MustInherit Class StrategyParameter
End Set
End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sMessageId As String
Public Property sMessageId As String
Get
@@ -1300,6 +1435,8 @@ Public MustInherit Class StrategyParameter
m_sSubType = JsonGenericParameter.sSubType
m_sDescriptionShort = JsonGenericParameter.sDescriptionShort
m_sDescriptionLong = JsonGenericParameter.sDescriptionLong
m_idDescriptionShortMsg = JsonGenericParameter.idDescriptionShortMsg
m_idDescriptionLongMsg = JsonGenericParameter.idDescriptionLongMsg
m_sMessageId = JsonGenericParameter.sMessageId
m_sMinUserLevel = JsonGenericParameter.sMinUserLevel
End Sub
@@ -2022,6 +2159,28 @@ Public Class ComboParameter
End Set
End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sMessageId As String
Public Property sMessageId As String
Get
@@ -2046,6 +2205,8 @@ Public Class ComboParameter
m_sValue = JsonChoiceParameter.sValue
m_sDescriptionShort = JsonChoiceParameter.sDescriptionShort
m_sDescriptionLong = JsonChoiceParameter.sDescriptionLong
m_idDescriptionShortMsg = JsonChoiceParameter.idDescriptionShortMsg
m_idDescriptionLongMsg = JsonChoiceParameter.idDescriptionLongMsg
m_sMessageId = JsonChoiceParameter.sMessageId
End If
End Sub
@@ -4,7 +4,7 @@
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
Height="{Binding ActualHeight, ElementName=StrategyFeature_TreeView}"
Style="{StaticResource Strategy_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
@@ -71,6 +71,14 @@
</ListBox>
</Border>
<Button Grid.Column="3"
Command="{Binding UpdateFeatureCommand}"
Visibility="{Binding Update_Visibility}"
Style="{StaticResource Update_Button}">
<Image Source="{StaticResource Update_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<StackPanel Grid.Column="3"
Style="{StaticResource Strategy_StackPanel}">
<Button Command="{Binding MoveUpSelectedStrategyCommand}"
@@ -1,7 +1,5 @@
Imports System.IO
Imports System.Net.Mail
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports System.Text
Imports EgtBEAMWALL.Core
Imports EgtUILib
+22 -4
View File
@@ -77,7 +77,7 @@
<BitmapImage x:Key="Remove_Image" UriSource="/Resources/NewPage/Remove.png"/>
<BitmapImage x:Key="HeaderSimulate_Image" UriSource="/Resources/NewPage/SimulateIntestazione.png"/>
<BitmapImage x:Key="Simulate_Image" UriSource="/Resources/CALCPanel/Simulate.png"/>
<BitmapImage x:Key="ResetCalc_Image" UriSource="/Resources/CALCPanel/ResetCalc.png"/>
<BitmapImage x:Key="ResetCalc_Image" UriSource="/Resources/NewPage/reset.png"/>
<BitmapImage x:Key="ChooseMachine_Image" UriSource="/Resources/CALCPanel/ChooseMachine.png"/>
<BitmapImage x:Key="Save_Image" UriSource="/Resources/ProjectManager/Save.png"/>
<BitmapImage x:Key="CopyFeature_Image" UriSource="/Resources/LeftPanel/CopyFeature.png"/>
@@ -107,7 +107,7 @@
<BitmapImage x:Key="MoveUp_Image" UriSource="/Resources/NewPage/MoveUp.png"/>
<BitmapImage x:Key="MoveDown_Image" UriSource="/Resources/NewPage/MoveDown.png"/>
<BitmapImage x:Key="VerifyAll_Image" UriSource="/Resources/CALCPanel/VerifyAll.png"/>
<BitmapImage x:Key="VerifyAllR_Image" UriSource="/Resources/NewPage/VerifyAllR.png"/>
<BitmapImage x:Key="VerifyAllR_Image" UriSource="/Resources/NewPage/VerifyAllRotation.png"/>
<BitmapImage x:Key="AllFilter_Image" UriSource="/Resources/LeftPanel/All_Filter.png"/>
<BitmapImage x:Key="Inversion_Image" UriSource="/Resources/NewPage/Inversion.png"/>
<BitmapImage x:Key="Send_Image" UriSource="/Resources/MainMenu/Send.png"/>
@@ -152,7 +152,8 @@
<BitmapImage x:Key="Restore_Image" UriSource="/Resources/EgtDialog/Restore.png"/>
<BitmapImage x:Key="AboutBox_Image" UriSource="/Resources/AboutBox/EgalwareLogo.png"/>
<BitmapImage x:Key="Clock_Image" UriSource="/Resources/NewPage/clock.png"/>
<BitmapImage x:Key="Update_Image" UriSource="/Resources/NewPage/arrow.png"/>
<!--#endregion Image-->
<!-- ______________________________________________________________________________________________________________________________________________ -->
@@ -401,6 +402,18 @@
<Setter Property="Margin" Value="0,10,0,0"/>
</Style>
<Style x:Key="TreeView_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource DialogWindow_TextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=TreeViewItem}}" Value="True">
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=TreeViewItem}}" Value="False">
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!--#endregion DialogWindow-->
<!--#region ProjectParameters-->
@@ -748,6 +761,11 @@
<Setter Property="FontSize" Value="20"/>
</Style>
<Style x:Key="Update_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Strategy_Button}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
</Style>
<Style x:Key="SaveStrategy_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
@@ -2709,7 +2727,7 @@
<Style x:Key="StrategyManager_Image" TargetType="{x:Type Image}">
<Setter Property="Stretch" Value="Uniform"/>
<Setter Property="Margin" Value="5,0,0,0"/>
<Setter Property="Margin" Value="5"/>
</Style>
<Style x:Key="StrategyProduction_Image" TargetType="{x:Type Image}">
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.6.2")>
<Assembly: AssemblyFileVersion("3.1.6.2")>
<Assembly: AssemblyVersion("3.1.6.4")>
<Assembly: AssemblyFileVersion("3.1.6.4")>