diff --git a/Supervisor.Plugin.FiveLakes/DoorListPage/DoorListPageVM.vb b/Supervisor.Plugin.FiveLakes/DoorListPage/DoorListPageVM.vb index 5676fc5..830aac0 100644 --- a/Supervisor.Plugin.FiveLakes/DoorListPage/DoorListPageVM.vb +++ b/Supervisor.Plugin.FiveLakes/DoorListPage/DoorListPageVM.vb @@ -56,6 +56,7 @@ Public Class DoorListPageVM #Region "CONSTRUCTOR" Sub New() + ' imposto riferimento in Map Map.SetRefDoorListPageVM(Me) Dim sBackupDirPath As String = "" GetPluginPrivateProfileString(S_GENERAL, "BackupDir", "", sBackupDirPath) diff --git a/Supervisor.Plugin.FiveLakes/MachinePage/MachinePageV.xaml b/Supervisor.Plugin.FiveLakes/MachinePage/MachinePageV.xaml index 362b5aa..f9feb16 100644 --- a/Supervisor.Plugin.FiveLakes/MachinePage/MachinePageV.xaml +++ b/Supervisor.Plugin.FiveLakes/MachinePage/MachinePageV.xaml @@ -74,32 +74,6 @@ - - - - - - @@ -236,7 +210,7 @@ - @@ -263,7 +237,7 @@ - @@ -290,7 +264,7 @@ - diff --git a/Supervisor.Plugin.FiveLakes/MachinePage/MachinePageVM.vb b/Supervisor.Plugin.FiveLakes/MachinePage/MachinePageVM.vb index 30882f4..86901d3 100644 --- a/Supervisor.Plugin.FiveLakes/MachinePage/MachinePageVM.vb +++ b/Supervisor.Plugin.FiveLakes/MachinePage/MachinePageVM.vb @@ -55,8 +55,15 @@ Public Class MachinePageVM NotifyPropertyChanged(NameOf(nNewDoorState)) End Sub - Private m_DoorOnMachineArray(8) As LuaDoor - Public ReadOnly Property DoorOnMachineArray As LuaDoor() + 'Private m_DoorOnMachineArray(8) As LuaDoor + 'Public ReadOnly Property DoorOnMachineArray As LuaDoor() + ' Get + ' Return m_DoorOnMachineArray + ' End Get + 'End Property + + Private m_DoorOnMachineArray As New ObservableCollection(Of LuaDoor) + Public ReadOnly Property DoorOnMachineArray As ObservableCollection(Of LuaDoor) Get Return m_DoorOnMachineArray End Get @@ -99,6 +106,8 @@ Public Class MachinePageVM Private m_cmdManageMachining As ICommand Sub New() + ' imposto riferimento in Map + Map.SetRefMachinePageVM(Me) m_VariableList = New ObservableCollection(Of Variable)({New Variable(Variable.VariableTypes.DOUBLE, "@WP_PR_00", "980", 1), New Variable(Variable.VariableTypes.DOUBLE, "@WP_PR_01", "981", 1), New Variable(Variable.VariableTypes.DOUBLE, "@WP_PR_02", "982", 1), @@ -154,6 +163,10 @@ Public Class MachinePageVM Dim sResourcesDirPath As String = "" GetPluginPrivateProfileString(S_GENERAL, K_RESOURCESDIR, "", sResourcesDirPath) m_sMachineImagePath = sResourcesDirPath & "\FiveLakesMachine.png" + ' creo posti in lista descrizioni + For nIndex As Integer = 0 To 8 + m_DoorOnMachineArray.Add(Nothing) + Next End Sub Friend Sub VarTimer_Tick() @@ -280,7 +293,6 @@ Public Class MachinePageVM End If End If Next - For nVarIndex As Integer = 0 To m_VariableList.Count - 1 Dim Var As Variable = m_VariableList(nVarIndex) If nVarIndex >= 5 AndAlso nVarIndex <= 9 Then @@ -300,6 +312,25 @@ Public Class MachinePageVM End If End If Next + 'For nVarIndex As Integer = 0 To m_VariableList.Count - 1 + ' Dim Var As Variable = m_VariableList(nVarIndex) + ' If nVarIndex >= 5 AndAlso nVarIndex <= 9 Then + ' Dim nId As Integer = -1 + ' If Var.nValue > 0 Then + ' m_DoorOnMachineArray(nVarIndex - 5) = m_LuaDoorList(Var.nValue - 1) + ' Else + ' m_DoorOnMachineArray(nVarIndex - 5) = Nothing + ' End If + ' End If + ' If nVarIndex >= 30 AndAlso nVarIndex <= 33 Then + ' Dim nId As Integer = -1 + ' If Var.nValue > 0 Then + ' m_DoorOnMachineArray(nVarIndex - 25) = m_LuaDoorList(Var.nValue - 1) + ' Else + ' m_DoorOnMachineArray(nVarIndex - 25) = Nothing + ' End If + ' End If + 'Next NotifyPropertyChanged(NameOf(DoorOnMachineArray)) End Sub @@ -984,7 +1015,7 @@ Public Class DoorToVisibilityConverter Implements IValueConverter Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert - If IsNothing(value) OrElse Not TypeOf value Is LuaDoor Then Return Visibility.Collapsed + If IsNothing(value) OrElse (Not TypeOf value Is LuaDoor AndAlso Not TypeOf value Is RestartDoor) Then Return Visibility.Hidden Return Visibility.Visible End Function diff --git a/Supervisor.Plugin.FiveLakes/RestartWnd/RestartWndV.xaml b/Supervisor.Plugin.FiveLakes/RestartWnd/RestartWndV.xaml index 617746f..8a70353 100644 --- a/Supervisor.Plugin.FiveLakes/RestartWnd/RestartWndV.xaml +++ b/Supervisor.Plugin.FiveLakes/RestartWnd/RestartWndV.xaml @@ -7,6 +7,8 @@ mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> + + @@ -14,7 +16,197 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +