Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/RipristinoSiemens

This commit is contained in:
Emmanuele Sassi
2026-05-05 11:21:09 +02:00
17 changed files with 117 additions and 134 deletions
@@ -13,6 +13,7 @@ Public Class BTLFeatureVM
End Get
End Property
Protected m_BTLPartM As BTLPartM
Protected m_PartM As PartM
Public ReadOnly Property nFeatureId As Integer
Get
@@ -220,6 +221,12 @@ Public Class BTLFeatureVM
NotifyPropertyChanged(NameOf(bStrategy_Visibility))
End Sub
Public ReadOnly Property IsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#Region "CONSTRUCTOR"
Sub New()
@@ -483,6 +483,12 @@ Public MustInherit Class PartVM
End Get
End Property
Public ReadOnly Property ButtonIsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#End Region ' Supervisor
' definizione comandi
+2 -2
View File
@@ -38,5 +38,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.4.6")>
<Assembly: AssemblyFileVersion("3.1.4.6")>
<Assembly: AssemblyVersion("3.1.4.7")>
<Assembly: AssemblyFileVersion("3.1.4.7")>
@@ -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.4.6")]
[assembly: AssemblyFileVersion("3.1.4.6")]
[assembly: AssemblyVersion("3.1.4.7")]
[assembly: AssemblyFileVersion("3.1.4.7")]
@@ -716,7 +716,6 @@ Public Class BTLDataWndVM
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim sDefaultConfigFile As String = String.Empty
Dim sTmpStrategySetup As String = String.Empty
Dim sInfo As String = String.Empty
' Controllo se presente file default config
If IsNothing(m_SelStrategySetup) Then
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
@@ -736,59 +735,13 @@ Public Class BTLDataWndVM
If Not IsNothing(m_SelStrategySetup) Then EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
End If
End If
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, BooleanGenericParameter).bIsBooleanModify)
Case GetType(DoubleGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, DoubleGenericParameter).bIsDoubleModify)
Case GetType(ComboGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ComboGenericParameter).bIsComboBoxModify)
Case GetType(StringGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, StringGenericParameter).bIsStringModify)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ListGenericParameter).bIsListModify)
End Select
Next
SetInfoGeneralParameters()
End Sub
Private Sub SaveInfo()
EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
Dim sInfo As String = String.Empty
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, BooleanGenericParameter).bIsBooleanModify)
Case GetType(DoubleGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, DoubleGenericParameter).bIsDoubleModify)
Case GetType(ComboGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ComboGenericParameter).bIsComboBoxModify)
Case GetType(StringGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, StringGenericParameter).bIsStringModify)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ListGenericParameter).bIsListModify)
End Select
Next
SetInfoGeneralParameters()
End Sub
Private Sub ReadGeneralConfiguration(sStrategyConfigurationFilePath As String)
@@ -843,6 +796,35 @@ Public Class BTLDataWndVM
Next
End Sub
Private Sub SetInfoGeneralParameters()
Dim sInfo As String = String.Empty
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, BooleanGenericParameter).bIsBooleanModify)
Case GetType(DoubleGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, DoubleGenericParameter).bIsDoubleModify)
Case GetType(ComboGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ComboGenericParameter).bIsComboBoxModify)
Case GetType(StringGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, StringGenericParameter).bIsStringModify)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ListGenericParameter).bIsListModify)
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -319,6 +319,7 @@ Public Class BTLFeatureVM
m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
m_BTLPartM = BTLPartM
m_PartM = Nothing
CreatePBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
@@ -328,9 +329,10 @@ Public Class BTLFeatureVM
m_MenuList.Add(New MenuItemVm(Me))
End Sub
Sub New(BTLFeatureM As BTLFeatureM)
Sub New(BTLFeatureM As BTLFeatureM, PartM As PartM)
m_BTLFeatureM = BTLFeatureM
m_BTLPartM = Nothing
m_PartM = PartM
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
@@ -17,6 +17,11 @@
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
Style="{StaticResource Optimizer_DataGrid}">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
</Style>
</DataGrid.RowStyle>
<DataGrid.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
@@ -27,6 +32,7 @@
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -196,7 +196,7 @@
<DataTemplate>
<Button ToolTip="{Binding Verify_ToolTip}"
Command="{Binding Verify_Command}"
IsEnabled="{Binding Verify_IsEnabled}"
IsEnabled="{Binding ButtonIsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="{StaticResource Verify_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
@@ -215,7 +215,6 @@
<DataTemplate>
<Button ToolTip="{Binding Simulate_ToolTip}"
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="{StaticResource Simulate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
@@ -235,7 +234,7 @@
<DataTemplate>
<Button Command="{Binding ProduceRawPart_Command}"
ToolTip="{Binding ProduceRawPart_ToolTip}"
IsEnabled="{Binding RawPartManagerIsEnabled}"
IsEnabled="{Binding ButtonIsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="{StaticResource ProduceRawPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
@@ -255,6 +254,7 @@
<DataTemplate>
<Button Click="Button_Click"
ToolTip="{Binding Settings_Command_ToolTip}"
IsEnabled="{Binding ButtonIsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="{StaticResource Setting_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
@@ -391,6 +391,7 @@
<TextBlock Text="{Binding sROT}"
Style="{StaticResource ROT_TextBlock}"/>
<Button Grid.Column="1"
IsEnabled="{Binding ButtonIsEnabled}"
Command="{Binding ForwardRotation_Command}"
Style="{StaticResource Rotation_Button}">
<Image Source="{StaticResource Rotate_Image}"
@@ -411,6 +412,7 @@
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding bFLIP, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding ButtonIsEnabled}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
@@ -513,6 +515,7 @@
<DataTemplate>
<Button Command="{Binding MoveUpPart_Command}"
ToolTip="{Binding MoveUpPart_ToolTip}"
IsEnabled="{Binding ButtonIsEnabled}"
Style="{StaticResource Move_Button}">
<Image Source="{StaticResource MoveUp_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
@@ -531,6 +534,7 @@
<DataTemplate>
<Button Command="{Binding MoveDownPart_Command}"
ToolTip="{Binding MoveDownPart_ToolTip}"
IsEnabled="{Binding ButtonIsEnabled}"
Style="{StaticResource Move_Button}">
<Image Source="{StaticResource MoveDown_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
@@ -549,6 +553,7 @@
<DataTemplate>
<Button Command="{Binding RemovePart_Command}"
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding ButtonIsEnabled}"
Style="{StaticResource Move_Button}">
<Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
@@ -312,6 +312,12 @@ Public Class MyMachGroupVM
NotifyPropertyChanged(NameOf(IsRowEnabled))
End Sub
Public ReadOnly Property ButtonIsEnabled As Boolean
Get
Return nProduction_State < ItemState.Assigned
End Get
End Property
#Region "Messages"
Public ReadOnly Property Verify_ToolTip As String
@@ -721,6 +727,7 @@ Public Class MyMachGroupVM
nProduction_State = MachGroupModel.State
dtStartTime = MachGroupModel.DtStart
dtEndTime = MachGroupModel.DtEnd
NotifyPropertyChanged(NameOf(ButtonIsEnabled))
End If
End Sub
@@ -1077,6 +1084,11 @@ Public Class MyMachGroupVM
DbControllers.m_PartController.UpdateStatus(ProjectManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Assigned)
Part.nProduction_State = ItemState.Assigned
Part.NotifyPropertyChanged(NameOf(Part.Background))
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.ButtonIsEnabled))
Part.NotifyPropertyChanged(NameOf(Part.ButtonIsEnabled))
For Each Feature As BTLFeatureVM In Part.FeatureVMList
Feature.NotifyPropertyChanged(NameOf(Feature.IsEnabled))
Next
' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr
' blocco modifica del pezzo
@@ -513,6 +513,10 @@ Public Class PartVM
Dim PartModel As PartModel = DbControllers.m_PartController.FindByPartId(ProjectManagerVM.CurrProd.nProdId, nPartId)
If Not IsNothing(PartModel) Then
PartM.SetProductionState(PartModel.State)
For Each Feature As BTLFeatureVM In m_FeatureVMList
Feature.NotifyPropertyChanged(NameOf(Feature.IsEnabled))
Next
NotifyPropertyChanged(NameOf(ButtonIsEnabled))
PartM.dtStartTime = PartModel.DtStart
PartM.dtEndTime = PartModel.DtEnd
' verifico se bloccare o sbloccare duplo
@@ -620,7 +624,7 @@ Public Class PartVM
Protected Overrides Sub CreateBTLFeatureVMList()
Dim all As List(Of BTLFeatureVM) = (From BTLFeatureM In m_PartM.GetBTLFeatures()
Select New BTLFeatureVM(BTLFeatureM)).ToList()
Select New BTLFeatureVM(BTLFeatureM, m_PartM)).ToList()
For Each BTLFeatureVM As BTLFeatureVM In all
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
+5 -36
View File
@@ -536,11 +536,13 @@ Public Class MainMenuVM
Else
Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe"
Try
Process.Start(sSupervisorPath)
Process.Start(sSupervisorPath, "1 " & CurrProd.nProdId)
Catch ex As Exception
EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath)
End Try
End If
' mando richiesta di apertura progetto in supervisore
DbControllers.m_StatusMapController.UpdateAction(DbControllers.m_SupervisorId, CurrProd.nProdId, CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ChangeProdInSupervisorRequest, "")
End Sub
#End Region ' Supervisor
@@ -557,7 +559,7 @@ Public Class MainMenuVM
End Property
Public Sub SendFeedback(ByVal param As Object)
If SelPage = Pages.OPTIMIZERPAGE AndAlso IsNothing(ProjectManagerVM.CurrProd) Then
If IsNothing(ProjectManagerVM.CurrProd) Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61891), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
@@ -574,7 +576,7 @@ Public Class MainMenuVM
EgtGetKeyInfo(sKey)
' Esporto il progetto
Dim ProjFileMList As List(Of ProjFileM)
If SelPage = Pages.OPTIMIZERPAGE And Not IsNothing(ProjectManagerVM.CurrProd) Then
If IsNothing(ProjectManagerVM.CurrProd) Then
ProjFileMList = DbControllers.m_ProjController.GetByProdAsc(ProjectManagerVM.CurrProd.nProdId)
Map.refProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
End If
@@ -644,39 +646,6 @@ Public Class MainMenuVM
SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip")
End If
SendFeedbackWindow.ShowDialog()
'Dim mailmessage As New System.Net.Mail.MailMessage With {
' .Subject = "Aedifica Feedback - " & sKey,
' .IsBodyHtml = True,
' .Body = ""
'}
'mailmessage.To.Add(New System.Net.Mail.MailAddress(sAddressArray(0)))
'For index As Integer = 1 To sAddressArray.Length() - 1
' mailmessage.CC.Add(sAddressArray(index))
'Next
'If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then
' mailmessage.Attachments.Add(New System.Net.Mail.Attachment(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"))
'End If
'Dim client As New SmtpClient()
'Dim filename As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\mymessage.eml"
'If Not IsNothing(filename) Then
' Configuration.SaveEml(mailmessage, filename)
' Dim flags = BindingFlags.Instance Or BindingFlags.NonPublic
' Dim method As MethodInfo = GetType(SmtpClient).GetMethod("SendInternal", flags)
' If method Is Nothing Then
' method = GetType(SmtpClient).GetMethod("SendMail", flags)
' End If
' If method Is Nothing Then
' Throw New Exception("Metodo interno SendInternal/SendMail non trovato. Versione .NET non compatibile.")
' End If
' method.Invoke(client, New Object() {mailmessage, filename})
' Process.Start(New ProcessStartInfo(filename) With {.UseShellExecute = True})
' 'Process.Start(filename)
'Else
' MessageBox.Show("Errore creazione file .eml")
'End If
Catch ex As Exception
EgtOutLog("Feedback exception: " & ex.ToString)
bEx = True
@@ -67,5 +67,5 @@ Imports System.Windows
' Revision
'
<Assembly: AssemblyVersion("3.1.4.6")>
<Assembly: AssemblyFileVersion("3.1.4.6")>
<Assembly: AssemblyVersion("3.1.4.7")>
<Assembly: AssemblyFileVersion("3.1.4.7")>
@@ -2159,4 +2159,4 @@ Public Class ProdManagerVM
#End Region ' Commands
End Class
End Class
+20 -32
View File
@@ -655,22 +655,7 @@ Public Class ProjectVM
If bSaveGeneralParameters Then
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sStrategyBTLSetup, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sStrategyBTLSetup = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sTmpStrategySetup = m_StrategySetupList.FirstOrDefault(Function(x) x = sStrategyBTLSetup)
SetSelStrategy(sTmpStrategySetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
End If
SetStrategySetup(sStrategyBTLSetup, AISetupDirPath, sTmpStrategySetup)
End If
Else
SetSelStrategy(sStrategyBTLPartSetup)
@@ -843,22 +828,7 @@ Public Class ProjectVM
nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
EgtGetInfo(nBTLInfoLayerId, AI_SETUP, sStrategyBTLSetup)
If IsNothing(sStrategyBTLSetup) Then
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sStrategyBTLSetup, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sStrategyBTLSetup = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sTmpStrategySetup = m_StrategySetupList.FirstOrDefault(Function(x) x = sStrategyBTLSetup)
SetSelStrategy(sTmpStrategySetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
End If
SetStrategySetup(sStrategyBTLSetup, AISetupDirPath, sTmpStrategySetup)
Else
SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
@@ -964,6 +934,24 @@ Public Class ProjectVM
SetGeneralParametersIsEnable(bValue)
End Sub
Private Sub SetStrategySetup(sStrategyBTLSetup As String, AISetupDirPath As String, sTmpStrategySetup As String)
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sStrategyBTLSetup, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sStrategyBTLSetup = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sTmpStrategySetup = m_StrategySetupList.FirstOrDefault(Function(x) x = sStrategyBTLSetup)
SetSelStrategy(sTmpStrategySetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
End If
End Sub
#End Region ' Methods
#Region "COMMAND"
@@ -216,6 +216,11 @@ Public Class RawPartManagerVM
DbControllers.m_PartController.UpdateStatus(ProjectManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Assigned)
Part.nProduction_State = ItemState.Assigned
Part.NotifyPropertyChanged(NameOf(Part.Background))
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.ButtonIsEnabled))
Part.NotifyPropertyChanged(NameOf(Part.ButtonIsEnabled))
For Each Feature As BTLFeatureVM In Part.FeatureVMList
Feature.NotifyPropertyChanged(NameOf(Feature.IsEnabled))
Next
' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr
' blocco modifica del pezzo
@@ -277,8 +282,6 @@ Public Class RawPartManagerVM
Public Sub ProduceAllRawPart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
' se attiva opzione e non ancora calcolato
If GetMainPrivateProfileInt(S_GENERAL, K_FASTPRODUCE, 0) = 1 And Map.refMachGroupPanelVM.MachGroupVMList.Any(Function(x As MyMachGroupVM) x.nProduction_State = ItemState.ND AndAlso x.nGlobalState = CalcStates.NOTCALCULATED) Then
Map.refCALCPanelVM.SetFromProduce(CALCPanelVM.ProduceType.PRODUCEALL)
@@ -78,7 +78,6 @@ Public Class StrategyManagerVM
EgtUILib.WritePrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, m_SelStrategySetup.sName, Map.refMainWindowVM.MainWindowM.sDefaultConfig)
m_SelStrategySetup.Read()
End If
SetSaveImage(MODIFY_IMAGE)
NotifyPropertyChanged(NameOf(SelStrategySetup))
End Sub
@@ -67,7 +67,7 @@ Public Class MainWindowVM
Public Sub UpdateTitle()
m_Title = ""
If Not IsNothing(Map.refSupervisorManagerVM.CurrProd) Then
m_Title = Map.refSupervisorManagerVM.CurrProd.nProdId.ToString("0000") & " - EgtBEAMWALL"
m_Title = Map.refSupervisorManagerVM.CurrProd.nProdId.ToString("0000") & " - " & Map.refSupervisorManagerVM.CurrProd.sName & " - AEdifica"
End If
NotifyPropertyChanged(NameOf(Title))
End Sub