diff --git a/EgtBEAMWALL.Core/BTL ViewModel/BTLFeatureVM.vb b/EgtBEAMWALL.Core/BTL ViewModel/BTLFeatureVM.vb
index 5f6b6a3c..5b521e39 100644
--- a/EgtBEAMWALL.Core/BTL ViewModel/BTLFeatureVM.vb
+++ b/EgtBEAMWALL.Core/BTL ViewModel/BTLFeatureVM.vb
@@ -195,6 +195,17 @@ Public Class BTLFeatureVM
End Get
End Property
+ ' variabile che indica se rifare il pezzo
+ Private m_bRedo As Boolean = True
+ Public Property bRedo As Boolean
+ Get
+ Return m_bRedo
+ End Get
+ Set(value As Boolean)
+ m_bRedo = value
+ End Set
+ End Property
+
#Region "CONSTRUCTOR"
'Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
diff --git a/EgtBEAMWALL.Core/Constants/ConstBeam.vb b/EgtBEAMWALL.Core/Constants/ConstBeam.vb
index 3de27051..ff502ac2 100644
--- a/EgtBEAMWALL.Core/Constants/ConstBeam.vb
+++ b/EgtBEAMWALL.Core/Constants/ConstBeam.vb
@@ -245,6 +245,10 @@
Friend Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
Friend Const MGR_RPT_PART As String = "PART"
+ ' parametri P per comunicazione con la macchina
+ Public Const MGR_RPT_PRODID As String = "PRODID"
+ Public Const MGR_RPT_PATTID As String = "PATTID"
+
' parametri errori integration
Friend Const ITG_CUTID As String = "CUTID"
Friend Const ITG_TASKID As String = "TASKID"
diff --git a/EgtBEAMWALL.Core/Enum.vb b/EgtBEAMWALL.Core/Enum.vb
index f52db19a..8a1ff3cc 100644
--- a/EgtBEAMWALL.Core/Enum.vb
+++ b/EgtBEAMWALL.Core/Enum.vb
@@ -13,13 +13,12 @@ Public Enum EventType
End Enum
Public Enum ItemState As Integer
-
- ND = -1
- Assigned = 0
- Confirmed = 1
- WIP = 2
- Produced = 3
- Scrapped = 4
+ ND = -1
+ Assigned = 0
+ Confirmed = 1
+ WIP = 2
+ Produced = 3
+ Scrapped = 4
End Enum
Public Enum LogSupportLevel
@@ -35,9 +34,10 @@ Public Enum LogSupportTarget
End Enum
Public Enum StatusMapItemType
- ND = -1
- Prod = 0
- MachGroup = 1
+ ND = -1
+ Prod = 0
+ MachGroup = 1
+ Part = 2
End Enum
Public Enum StatusMapOpType
diff --git a/EgtBEAMWALL.Core/MachGroupPanel/MyMachGroupPanelVM.vb b/EgtBEAMWALL.Core/MachGroupPanel/MyMachGroupPanelVM.vb
index 01a9af13..91a857e9 100644
--- a/EgtBEAMWALL.Core/MachGroupPanel/MyMachGroupPanelVM.vb
+++ b/EgtBEAMWALL.Core/MachGroupPanel/MyMachGroupPanelVM.vb
@@ -143,6 +143,14 @@ Public MustInherit Class MyMachGroupPanelVM
NotifyPropertyChanged(NameOf(sTotTime))
End Sub
+ Public Shared Sub DuploRemoveProjCalc(nPartDuploId As Integer)
+ EgtSetInfo(nPartDuploId, ITG_PROJ_ERR, "")
+ EgtSetInfo(nPartDuploId, ITG_PROJ_MSG, "")
+ EgtSetInfo(nPartDuploId, ITG_PROJ_ROT, "")
+ EgtSetInfo(nPartDuploId, ITG_PROJ_FALL, "")
+ EgtSetInfo(nPartDuploId, ITG_PROJ_TIME, "")
+ End Sub
+
#End Region ' METHODS
#Region "EVENTS"
diff --git a/EgtBEAMWALL.Core/MachGroupPanel/MyMachGroupVM.vb b/EgtBEAMWALL.Core/MachGroupPanel/MyMachGroupVM.vb
index 466b75a9..c52a471b 100644
--- a/EgtBEAMWALL.Core/MachGroupPanel/MyMachGroupVM.vb
+++ b/EgtBEAMWALL.Core/MachGroupPanel/MyMachGroupVM.vb
@@ -279,8 +279,10 @@ Public MustInherit Class MyMachGroupVM
m_SupervisorId = SupervisorId
End Sub
Public Sub ResetSupervisorId()
+ nProduction_State = ItemState.ND
m_SupervisorId = ""
NotifyPropertyChanged(NameOf(IsReadOnly))
+ NotifyPropertyChanged(NameOf(Background))
End Sub
Private m_cc As StateChangeEventArgs
@@ -293,10 +295,13 @@ Public MustInherit Class MyMachGroupVM
#Region "Supervisor"
- Public ReadOnly Property nProduction_State As ItemState
+ Public Property nProduction_State As ItemState
Get
Return MyMachGroupM.nProductionState
End Get
+ Set(value As ItemState)
+ MyMachGroupM.SetProductionState(value)
+ End Set
End Property
Public ReadOnly Property Production_Background As SolidColorBrush
@@ -374,11 +379,11 @@ Public MustInherit Class MyMachGroupVM
End Get
End Property
- Public ReadOnly Property Produce_IsEnabled As Boolean
+ Public Overridable ReadOnly Property Produce_IsEnabled As Boolean
Get
Select Case nProduction_State
Case ItemState.Assigned, ItemState.Confirmed
- Return True
+ Return Not m_bToBeProduced
Case Else
Return False
End Select
@@ -507,6 +512,7 @@ Public MustInherit Class MyMachGroupVM
Public Sub SentToSupervisor()
MyMachGroupM.SetProductionState(ItemState.Assigned)
+ NotifyPropertyChanged(NameOf(Background))
End Sub
Public Overridable Function CnFilePath() As String
diff --git a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb
index d685fdf9..7d1dbf63 100644
--- a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb
+++ b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb
@@ -190,11 +190,11 @@ Public MustInherit Class PartVM
End Get
End Property
- Public Property nProduction_State As CalcStates
+ Public Property nProduction_State As ItemState
Get
Return m_PartM.nProductionState
End Get
- Set(value As CalcStates)
+ Set(value As ItemState)
m_PartM.SetProductionState(value)
End Set
End Property
@@ -342,6 +342,20 @@ Public MustInherit Class PartVM
End Set
End Property
+ ' variabile che indica se rifare il pezzo
+ Private m_bRedo As Boolean = True
+ Public Property bRedo As Boolean
+ Get
+ Return m_bRedo
+ End Get
+ Set(value As Boolean)
+ For Each Feature In FeatureVMList
+ Feature.bRedo = value
+ Next
+ m_bRedo = value
+ End Set
+ End Property
+
' definizione comandi
Private m_cmdDeletePart As ICommand
diff --git a/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs b/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs
index 4c6eeeb9..fcdaedbd 100644
--- a/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs
+++ b/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs
@@ -423,7 +423,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
ResetController();
done = true;
// aggiorno info sullo status
- StatusMapController.man.UpdateAction("", ProdId, MachGroupId, Core.StatusMapItemType.MachGroup, Core.StatusMapOpType.MachGroupMod, "");
+ StatusMapController.man.UpdateAction("", ProdId, MachGroupId, Core.StatusMapItemType.MachGroup, Core.StatusMapOpType.PartEnd, "");
}
catch (Exception exc)
{
@@ -494,7 +494,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
ResetController();
done = true;
// aggiorno info sullo status
- StatusMapController.man.UpdateAction("", ProdId, MachGroupId, Core.StatusMapItemType.MachGroup, Core.StatusMapOpType.MachGroupMod, "");
+ StatusMapController.man.UpdateAction("", ProdId, MachGroupId, Core.StatusMapItemType.MachGroup, Core.StatusMapOpType.PartStart, "");
}
catch (Exception exc)
{
@@ -594,6 +594,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
{
currRecord.State = Core.ItemState.ND;
currRecord.SupervisorId = "";
+ currRecord.ProdIndex = 0;
}
// Commit changes
dbCtx.SaveChanges();
diff --git a/EgtBEAMWALL.DataLayer/Controllers/PartController .cs b/EgtBEAMWALL.DataLayer/Controllers/PartController .cs
index d8d0f5ac..8e2aa37d 100644
--- a/EgtBEAMWALL.DataLayer/Controllers/PartController .cs
+++ b/EgtBEAMWALL.DataLayer/Controllers/PartController .cs
@@ -295,7 +295,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
ResetController();
done = true;
// aggiorno info sullo status
- StatusMapController.man.UpdateAction("", updItem.MachGroup.Prod.ProdId, updItem.MachGroup.MachGroupId, Core.StatusMapItemType.MachGroup, Core.StatusMapOpType.MachGroupMod, "");
+ StatusMapController.man.UpdateAction("", updItem.MachGroup.Prod.ProdId, updItem.PartId, Core.StatusMapItemType.Part, Core.StatusMapOpType.MachGroupMod, "");
}
catch
{ }
@@ -324,7 +324,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
ResetController();
done = true;
// aggiorno info sullo status
- StatusMapController.man.UpdateAction("", ProdId, MachGroupId, Core.StatusMapItemType.MachGroup, Core.StatusMapOpType.PartEnd, "");
+ StatusMapController.man.UpdateAction("", ProdId, PartId, Core.StatusMapItemType.Part, Core.StatusMapOpType.PartEnd, "");
}
catch (Exception exc)
{
@@ -356,7 +356,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
ResetController();
done = true;
// aggiorno info sullo status
- StatusMapController.man.UpdateAction("", ProdId, MachGroupId, Core.StatusMapItemType.MachGroup, Core.StatusMapOpType.PartStart, "");
+ StatusMapController.man.UpdateAction("", ProdId, PartId, Core.StatusMapItemType.Part, Core.StatusMapOpType.PartStart, "");
}
catch (Exception exc)
{
@@ -388,7 +388,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
ResetController();
done = true;
// aggiorno info sullo status
- StatusMapController.man.UpdateAction("", ProdId, MachGroupId, Core.StatusMapItemType.MachGroup, Core.StatusMapOpType.MachGroupMod, "");
+ StatusMapController.man.UpdateAction("", ProdId, PartId, Core.StatusMapItemType.Part, Core.StatusMapOpType.MachGroupMod, "");
}
catch (Exception exc)
{
diff --git a/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj b/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj
index 7256804e..8efb34b2 100644
--- a/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj
+++ b/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj
@@ -277,10 +277,6 @@
ProjectV.xaml
-
- RestartWndV.xaml
-
- SceneHostV.xaml
@@ -302,6 +298,7 @@
Dictionary.xaml
+
@@ -370,10 +367,6 @@
DesignerXamlIntelliSenseFileGenerator
-
- Designer
- MSBuild:Compile
- MSBuild:CompileDesigner
diff --git a/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListV.xaml b/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListV.xaml
index 16f84b8b..ae1f7389 100644
--- a/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListV.xaml
+++ b/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListV.xaml
@@ -1,8 +1,7 @@
+ xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Supervisor">
+
-
-
diff --git a/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj b/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj
index f9eb6455..3eceb3e9 100644
--- a/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj
+++ b/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj
@@ -225,6 +225,7 @@
EgtDataGrid.xaml
+
@@ -316,7 +317,6 @@
Dictionary.xaml
-
@@ -744,6 +744,11 @@
+
+
+
+
+ IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe
diff --git a/EgtBEAMWALL.ViewerOptimizer/LeftPanel/LeftPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/LeftPanel/LeftPanelVM.vb
index 803eb32b..af20c6eb 100644
--- a/EgtBEAMWALL.ViewerOptimizer/LeftPanel/LeftPanelVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/LeftPanel/LeftPanelVM.vb
@@ -194,7 +194,7 @@ Public Class LeftPanelVM
'aggiorno lista pezzi
BeamMachGroup.m_BeamMachGroupM.RefreshPartList()
BeamMachGroup.m_BeamMachGroupM.RefreshGroupData()
- ' aggiorno dati ultilizzo barra
+ ' aggiorno dati utilizzo barra
BeamMachGroup.UpdateUsage()
EgtSetView(VT.ISO_SW, False)
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
diff --git a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/BeamMachGroupVM.vb b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/BeamMachGroupVM.vb
index 46a379a5..74831e85 100644
--- a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/BeamMachGroupVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/BeamMachGroupVM.vb
@@ -211,6 +211,7 @@ Public Class BeamMachGroupVM
EgtGetMachGroupName(nCurrMachGroup, sCurrMachGroupName)
' scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
EgtSetInfo(nCurrMachGroup, MGR_RPT_PRODID, Map.refProdManagerVM.CurrProd.nProdId)
+ EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, sMATERIAL)
EgtSetInfo(nCurrMachGroup, MGR_RPT_PATTID, nCurrMachGroup)
' scrivo dati costruzione grezzo in gruppo di lavorazione
EgtSetInfo(nCurrMachGroup, MGR_RPT_BARLEN, dL)
diff --git a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb
index 9f8bbfbc..2f78b351 100644
--- a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb
@@ -176,14 +176,6 @@ Public Class MyMachGroupPanelVM
Return EgtSetInfo(nSouId, DUPLO_TODELETE, "")
End Function
- Friend Shared Sub DuploRemoveProjCalc(nPartDuploId As Integer)
- EgtSetInfo(nPartDuploId, ITG_PROJ_ERR, "")
- EgtSetInfo(nPartDuploId, ITG_PROJ_MSG, "")
- EgtSetInfo(nPartDuploId, ITG_PROJ_ROT, "")
- EgtSetInfo(nPartDuploId, ITG_PROJ_FALL, "")
- EgtSetInfo(nPartDuploId, ITG_PROJ_TIME, "")
- End Sub
-
Public Overrides Sub AddMachGroup()
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(CurrentMachine.sMachineName, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' e lo seleziono
diff --git a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb
index 4f3b87e8..74803be9 100644
--- a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb
@@ -2,6 +2,7 @@
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Core.ConstBeam
+Imports EgtBEAMWALL.DataLayer.DatabaseModels
Imports EgtUILib
Imports EgtWPFLib5
@@ -244,8 +245,20 @@ Public Class MainMenuVM
' se si rigenero BTLStructure
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
End If
+ ' recupero indice di modifica progetto
+ Dim CommIndex As Integer = -1
+ Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd()
+ For Each ActiveSession In ActiveSessionList
+ If ActiveSession.ItemId = Map.refProdManagerVM.CurrProd.nProdId Then
+ CommIndex = ActiveSession.Index
+ End If
+ Next
' carico lista dei MachGroup
Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
+ ' fisso indice sessione di comunicazione
+ If CommIndex > -1 Then
+ Map.refProdManagerVM.CurrProd.SetModificationIndex(CommIndex)
+ End If
Map.refProjManagerVM.CurrProj.SetReloadProject(True)
End If
'DbControllers.m_ProdController.ResetController()
diff --git a/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/09_verifica.png b/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/09_verifica.png
new file mode 100644
index 00000000..d87aff3e
Binary files /dev/null and b/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/09_verifica.png differ
diff --git a/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/12_verifica tutto.png b/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/12_verifica tutto.png
new file mode 100644
index 00000000..540cac05
Binary files /dev/null and b/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/12_verifica tutto.png differ
diff --git a/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/15_simula.png b/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/15_simula.png
new file mode 100644
index 00000000..d1d969bf
Binary files /dev/null and b/EgtBEAMWALL.ViewerOptimizer/Resources/CALCPanel/15_simula.png differ
diff --git a/EgtBEAMWALL.ViewerOptimizer/SceneHost/MySceneHostVM.vb b/EgtBEAMWALL.ViewerOptimizer/SceneHost/MySceneHostVM.vb
index bfeb13c7..e3218968 100644
--- a/EgtBEAMWALL.ViewerOptimizer/SceneHost/MySceneHostVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/SceneHost/MySceneHostVM.vb
@@ -3,6 +3,7 @@ Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
+Imports EgtBEAMWALL.DataLayer.DatabaseModels
Public Class MySceneHostVM
Inherits EgtWPFLib5.SceneHostVM
@@ -489,10 +490,23 @@ Public Class MySceneHostVM
' leggo struttura BTL
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjId))
If Map.refMainMenuVM.SelPage = Pages.MACHINING Then
+ ' recupero indice di modifica progetto
+ Dim CommIndex As Integer = -1
+ Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd()
+ For Each ActiveSession In ActiveSessionList
+ If ActiveSession.ItemId = Map.refProdManagerVM.CurrProd.nProdId Then
+ CommIndex = ActiveSession.Index
+ End If
+ Next
+ ' carico gruppi di lavorazione
Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
+ ' fisso indice sessione di comunicazione
+ If CommIndex > -1 Then
+ Map.refProdManagerVM.CurrProd.SetModificationIndex(CommIndex)
+ End If
Else
- ' mostro tutti i pezzi
- Map.refShowBeamPanelVM.ShowAll()
+ ' mostro tutti i pezzi
+ Map.refShowBeamPanelVM.ShowAll()
End If
WriteMainPrivateProfileString(S_GENERAL, K_LASTPROJ, sFile)
' in base al tipo progetto aggiungo il file in apertura alla lista degli MRU
@@ -801,7 +815,7 @@ Public Class MySceneHostVM
EgtGetName(nLayerId, sLayerName)
If sLayerName = ASSEBASE Then
Dim nSou As Integer
- if EgtGetInfo( nPartId, GDB_SI_COPY, nSou) Then nPartId = nSou
+ If EgtGetInfo(nPartId, GDB_SI_COPY, nSou) Then nPartId = nSou
bFound = True
End If
Else
diff --git a/EgtBEAMWALL.ViewerOptimizer/SupervisorCommThread/SupervisorComm.vb b/EgtBEAMWALL.ViewerOptimizer/SupervisorCommThread/SupervisorComm.vb
index a34f7ecd..8ec9ffa4 100644
--- a/EgtBEAMWALL.ViewerOptimizer/SupervisorCommThread/SupervisorComm.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/SupervisorCommThread/SupervisorComm.vb
@@ -44,7 +44,8 @@ Public Class SupervisorComm
End Select
Next
-
+ ' aggiorno indice del proj
+ Map.refProjManagerVM.CurrProj.SetModificationIndex(nModificationIndex)
End If
' se arriva richiesta da supervisore di blocco e salvataggio
@@ -75,17 +76,23 @@ Public Class SupervisorComm
Dim MachGroupList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetFrom(Map.refProdManagerVM.CurrProd.nModificationIndex + 1)
Dim bReloadFile As Boolean = False
For Each MachGroupModification In MachGroupList
- Select Case MachGroupModification.Operation
- Case Core.StatusMapOpType.PartStart
-
-
- Case Core.StatusMapOpType.PartEnd
-
-
- Case Core.StatusMapOpType.MachGroupRemovedFromSupervisor
- Dim Machgroup As MyMachGroupVM = Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = MachGroupModification.ItemId)
- Machgroup.ResetSupervisorId()
- End Select
+ If MachGroupModification.ItemType = StatusMapItemType.MachGroup Then
+ Select Case MachGroupModification.Operation
+ Case Core.StatusMapOpType.PartStart
+ Dim Machgroup As MyMachGroupVM = Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = MachGroupModification.ItemId)
+ Machgroup.dtStartTime = MachGroupModification.DtEvent
+ Machgroup.nProduction_State = ItemState.WIP
+ Machgroup.NotifyPropertyChanged(NameOf(Machgroup.Background))
+ Case Core.StatusMapOpType.PartEnd
+ Dim Machgroup As MyMachGroupVM = Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = MachGroupModification.ItemId)
+ Machgroup.dtEndTime = MachGroupModification.DtEvent
+ Machgroup.nProduction_State = ItemState.Produced
+ Machgroup.NotifyPropertyChanged(NameOf(Machgroup.Background))
+ Case Core.StatusMapOpType.MachGroupRemovedFromSupervisor
+ Dim Machgroup As MyMachGroupVM = Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = MachGroupModification.ItemId)
+ Machgroup.ResetSupervisorId()
+ End Select
+ End If
Next
' se arriva richiesta da supervisore di blocco e salvataggio
@@ -95,7 +102,8 @@ Public Class SupervisorComm
' blocco interfaccia fino a notifica di sblocco
-
+ ' aggiorno indice del prod
+ Map.refProdManagerVM.CurrProd.SetModificationIndex(nModificationIndex)
End If
End If
' se c'e' un progetto aperto o in caricamento
diff --git a/EgtBEAMWALL.ViewerOptimizer/TopPanel/TopPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/TopPanel/TopPanelVM.vb
index 661f0c17..f452c952 100644
--- a/EgtBEAMWALL.ViewerOptimizer/TopPanel/TopPanelVM.vb
+++ b/EgtBEAMWALL.ViewerOptimizer/TopPanel/TopPanelVM.vb
@@ -155,6 +155,8 @@ Public Class TopPanelVM
Private Sub Produce(MachGroup As MyMachGroupVM)
If IsNothing(MachGroup) Then Return
+ ' se barra gia' assegnata a supervisore, esco
+ If MachGroup.nProduction_State >= ItemState.Assigned Then Return
If MachGroup.nGlobalState = CalcStates.OK Or MachGroup.nGlobalState = CalcStates.INFO Then
' se ci sono modifiche, salvo il pogetto
If EgtGetModified() Then
@@ -220,6 +222,8 @@ Public Class TopPanelVM
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return
+ ' se barra gia' assegnata a supervisore, esco
+ If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
If SelMachGroup.nGlobalState <> CalcStates.NOTCALCULATED Then
SelMachGroup.ResetCalcMachGroup()
End If
@@ -279,6 +283,8 @@ Public Class TopPanelVM
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelMachGroup As MyMachGroupVM = refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return
+ ' se barra gia' assegnata a supervisore, esco
+ If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
SelMachGroup.DeleteMachGroup()
End Sub
@@ -305,6 +311,8 @@ Public Class TopPanelVM
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return
+ ' se barra gia' assegnata a supervisore, esco
+ If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
Dim SelPart As PartVM = SelMachGroup.SelPart
If IsNothing(SelPart) Then Return
SelPart.DeletePart()
@@ -334,6 +342,8 @@ Public Class TopPanelVM
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return
+ ' se barra gia' assegnata a supervisore, esco
+ If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
Dim SelPart As PartVM = SelMachGroup.SelPart
If IsNothing(SelPart) Then Return
If SelMachGroup.nMachineType = MachineType.BEAM Then
@@ -369,6 +379,8 @@ Public Class TopPanelVM
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return
+ ' se barra gia' assegnata a supervisore, esco
+ If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
Dim SelPart As PartVM = SelMachGroup.SelPart
If IsNothing(SelPart) Then Return
If SelMachGroup.nMachineType = MachineType.BEAM Then
@@ -404,6 +416,8 @@ Public Class TopPanelVM
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return
+ ' se barra gia' assegnata a supervisore, esco
+ If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
Dim SelPart As PartVM = SelMachGroup.SelPart
If IsNothing(SelPart) Then Return
If SelMachGroup.nMachineType = MachineType.BEAM Then