diff --git a/EgtBEAMWALL.Core/EgtDataGrid/DataGridColumnsIniFile.vb b/EgtBEAMWALL.Core/EgtDataGrid/DataGridColumnsIniFile.vb index 3ee4b5b6..0a71bddb 100644 --- a/EgtBEAMWALL.Core/EgtDataGrid/DataGridColumnsIniFile.vb +++ b/EgtBEAMWALL.Core/EgtDataGrid/DataGridColumnsIniFile.vb @@ -33,8 +33,6 @@ Public Module DataGridColumnsIniFile Dim bCanUserEditVisible As Boolean = sColumnParams(8).Equals("1") If bVisible Then ocColumns.Add(New EgtDataGridColumn(ParentDGName, sName, bReorder, bResize, bSort, bIsReadOnly, New DataGridLength(Width, WidthType), bVisible, bCanUserEditVisible)) - Else - Exit While End If End If colIndex += 1 @@ -46,4 +44,38 @@ Public Module DataGridColumnsIniFile Return WritePrivateProfileString(ParentDataGridName, DisplayIndex, sColumnParams, m_sDataGridColumnsIniFile) End Function + ' funzione per ottenere dal file INI le colonne da caricare nelle EgtDataGrid del programma + Public Function GetPrivateProfileColumn(ParentDGName As String, ByRef Column As EgtDataGridColumn) As Boolean + Dim colIndex As Integer = 0 + Dim str = String.Empty + While EgtUILib.GetPrivateProfileString(ParentDGName, colIndex, String.Empty, str, m_sDataGridColumnsIniFile) > 0 + Dim sColumnParams() As String = str.Split(","c) + ' verifico numero minimo di parametri + If sColumnParams.Count >= 9 Then + If Column.Name = sColumnParams(0) Then + ' cancello spazi + For index = 0 To sColumnParams.Count - 1 + sColumnParams(index) = sColumnParams(index).Trim() + Next + ' creo colonna + Dim sName = sColumnParams(0) + Dim bReorder As Boolean = sColumnParams(1).Equals("1") + Dim bResize As Boolean = sColumnParams(2).Equals("1") + Dim bSort As Boolean = sColumnParams(3).Equals("1") + Dim bIsReadOnly As Boolean = sColumnParams(4).Equals("1") + Dim Width As Double + Dim WidthType As DataGridLengthUnitType + StringToDouble(sColumnParams(5), Width) + Integer.TryParse(sColumnParams(6), WidthType) + Dim bVisible As Boolean = sColumnParams(7).Equals("1") + Dim bCanUserEditVisible As Boolean = sColumnParams(8).Equals("1") + Column = New EgtDataGridColumn(ParentDGName, sName, bReorder, bResize, bSort, bIsReadOnly, New DataGridLength(Width, WidthType), bVisible, bCanUserEditVisible) + Exit While + End If + End If + colIndex += 1 + End While + Return Not IsNothing(Column) + End Function + End Module \ No newline at end of file diff --git a/EgtBEAMWALL.Core/Enum.vb b/EgtBEAMWALL.Core/Enum.vb index 8a1ff3cc..f8839a84 100644 --- a/EgtBEAMWALL.Core/Enum.vb +++ b/EgtBEAMWALL.Core/Enum.vb @@ -38,6 +38,7 @@ Public Enum StatusMapItemType Prod = 0 MachGroup = 1 Part = 2 + Comm = 3 End Enum Public Enum StatusMapOpType diff --git a/EgtBEAMWALL.Core/Integration/CalcIntegration.vb b/EgtBEAMWALL.Core/Integration/CalcIntegration.vb index d52c9b75..5db735ba 100644 --- a/EgtBEAMWALL.Core/Integration/CalcIntegration.vb +++ b/EgtBEAMWALL.Core/Integration/CalcIntegration.vb @@ -173,8 +173,12 @@ Public Module CalcIntegration End If If bDone Then - ' se non sono in simulazione + ' se sono in simulazione If bIsSimulation Then + ' aggiorno progetto + Dim sOriPath As String = Path.ChangeExtension(vBar(0).sBarPath, ".ori.bwe") + If File.Exists(vBar(0).sBarPath) Then File.Copy(vBar(0).sBarPath, sOriPath, True) + ' messaggio di completamento simulazione callback(0, "Simulation closing", bCancel) Else ' Dialog con Progress Bar diff --git a/EgtBEAMWALL.Core/MachGroup Model/MyMachGroupM.vb b/EgtBEAMWALL.Core/MachGroup Model/MyMachGroupM.vb index daef3981..e36aaf61 100644 --- a/EgtBEAMWALL.Core/MachGroup Model/MyMachGroupM.vb +++ b/EgtBEAMWALL.Core/MachGroup Model/MyMachGroupM.vb @@ -220,7 +220,7 @@ Public MustInherit Class MyMachGroupM End Set End Property - Protected m_nProductionState As ItemState = 0 + Protected m_nProductionState As ItemState = ItemState.ND Public ReadOnly Property nProductionState As ItemState Get Return m_nProductionState diff --git a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb index 7d1dbf63..bb2752b4 100644 --- a/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb +++ b/EgtBEAMWALL.Core/MachGroupPanel/PartVM.vb @@ -205,6 +205,8 @@ Public MustInherit Class PartVM Return Brushes.LightGray ElseIf dtStartTime <> DateTime.MinValue Then ' barra iniziata Return Brushes.Green + ElseIf nProduction_State = ItemState.Scrapped Then + Return Brushes.Red Else ' barra in coda Return Brushes.White End If diff --git a/EgtBEAMWALL.DataLayer/Controllers/StatusMapController.cs b/EgtBEAMWALL.DataLayer/Controllers/StatusMapController.cs index 948a86d9..76ec3358 100644 --- a/EgtBEAMWALL.DataLayer/Controllers/StatusMapController.cs +++ b/EgtBEAMWALL.DataLayer/Controllers/StatusMapController.cs @@ -218,14 +218,14 @@ namespace EgtBEAMWALL.DataLayer.Controllers prodData = dbCtx .StatusMapList .Where(x => x.ItemType == Core.StatusMapItemType.Prod && x.ItemId == ProdId) - .SingleOrDefault(); + .FirstOrDefault(); } else { prodData = dbCtx .StatusMapList .Where(x => x.ItemType == Core.StatusMapItemType.Prod && x.Session == Session) - .SingleOrDefault(); + .FirstOrDefault(); } // se ho trovato if (prodData != null) diff --git a/EgtBEAMWALL.Supervisor/BTLParam/BTLFeatureVM.vb b/EgtBEAMWALL.Supervisor/BTLParam/BTLFeatureVM.vb index ea2af965..ce4807d1 100644 --- a/EgtBEAMWALL.Supervisor/BTLParam/BTLFeatureVM.vb +++ b/EgtBEAMWALL.Supervisor/BTLParam/BTLFeatureVM.vb @@ -27,8 +27,6 @@ Public Class BTLFeatureVM If EgtBeamEnableProcess(nFeatureId, value) Then m_BTLFeatureM.bDO = value EgtDraw() - NotifyPropertyChanged("Calc_Background") - NotifyPropertyChanged("bDO") End If End Set End Property diff --git a/EgtBEAMWALL.Supervisor/Constants/ConstBeam.vb b/EgtBEAMWALL.Supervisor/Constants/ConstBeam.vb index 03b52970..140b0a07 100644 --- a/EgtBEAMWALL.Supervisor/Constants/ConstBeam.vb +++ b/EgtBEAMWALL.Supervisor/Constants/ConstBeam.vb @@ -202,6 +202,7 @@ Friend Const MGR_PRT_DES As String = "DES" Friend Const MGR_PRT_STARTCUT As String = "STARTCUT" Friend Const MGR_PRT_MATERIAL As String = "MATERIAL" + Friend Const MGR_PRT_DO As String = "DO" Friend Const MGR_FTR_GRP As String = "GRP" Friend Const MGR_FTR_PRC As String = "PRC" diff --git a/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj b/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj index 5e6cba8d..f5bb460b 100644 --- a/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj +++ b/EgtBEAMWALL.Supervisor/EgtBEAMWALL.Supervisor.vbproj @@ -308,6 +308,10 @@ ViewPanelV.xaml + + WaitingWndV.xaml + + MSBuild:Compile @@ -393,6 +397,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + diff --git a/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListV.xaml b/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListV.xaml index a5c14bdf..858df0d8 100644 --- a/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListV.xaml +++ b/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListV.xaml @@ -2,8 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Supervisor" - xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" - Visibility="{Binding FeatureList_Visibility}"> + xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"> - + diff --git a/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListVM.vb b/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListVM.vb index 6dc0c5ff..2f8129ea 100644 --- a/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListVM.vb +++ b/EgtBEAMWALL.Supervisor/LeftPanel/FeatureInPartInRawPartListVM.vb @@ -7,6 +7,8 @@ Public Class FeatureInPartInRawPartListVM #Region "FIELDS & PROPERTIES" + Private m_colRedo As New EgtDataGridColumn("colREDO") + Private m_FeatureInPartInRawPartColumns As New ObservableCollection(Of EgtDataGridColumn) Public Property FeatureInPartInRawPartColumns As ObservableCollection(Of EgtDataGridColumn) Get @@ -49,12 +51,23 @@ Public Class FeatureInPartInRawPartListVM Map.SetRefFeatureInPartInRawPartListVM(Me) ' carico le colonne della datagrid Core.GetPrivateProfileColumns(S_FEATUREINPARTINRAWPARTLIST_SUPERVISOR, FeatureInPartInRawPartColumns) + ' carico colonna Redo + Core.GetPrivateProfileColumn(S_FEATUREINPARTINRAWPARTLIST_SUPERVISOR, m_colRedo) + m_colRedo.ColumnVisibility = Visibility.Visible End Sub #End Region ' CONSTRUCTOR #Region "METHODS" + Public Sub AddColRedo() + FeatureInPartInRawPartColumns.Insert(0, m_colRedo) + End Sub + + Public Sub RemoveColRedo() + FeatureInPartInRawPartColumns.Remove(m_colRedo) + End Sub + Sub SetFeatureListVisibility(bVisible As Boolean) m_FeatureList_Visibility = If(bVisible, Visibility.Visible, Visibility.Collapsed) NotifyPropertyChanged(NameOf(FeatureList_Visibility)) diff --git a/EgtBEAMWALL.Supervisor/LeftPanel/LeftPanelV.xaml b/EgtBEAMWALL.Supervisor/LeftPanel/LeftPanelV.xaml index 13fe2c44..e6bd0250 100644 --- a/EgtBEAMWALL.Supervisor/LeftPanel/LeftPanelV.xaml +++ b/EgtBEAMWALL.Supervisor/LeftPanel/LeftPanelV.xaml @@ -33,12 +33,12 @@ - + Style="{StaticResource LeftPanel_SmallButton}"/>