Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b625352ae4 | |||
| 388fc51a37 | |||
| 8808ebdb2b | |||
| 717519bb2c | |||
| a69e9536b4 | |||
| bde93faa1a | |||
| e38104d02c | |||
| 1aa26ca644 | |||
| 6da345d8c5 |
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34309.116
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.Interface", "..\Ngp\Supervisor.Plugin.Interface\Supervisor.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.Interface", "..\Effector\Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.FiveLakes", "Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.FiveLakes", "Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34309.116
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor", "..\Ngp\Supervisor\Supervisor.vbproj", "{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Main", "..\Effector.Main\Effector.Main\Effector.Main.vbproj", "{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.Interface", "..\Ngp\Supervisor.Plugin.Interface\Supervisor.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.Interface", "..\Effector.Main\Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.FiveLakes", "Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.FiveLakes", "Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
+6
-1
@@ -12,11 +12,13 @@
|
||||
'----------------------------------------------------------------------------
|
||||
Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "Supervisor.Plugin.FiveLakes.ini"
|
||||
Public Const INI_FILE_NAME As String = "Effector.Plugin.FiveLakes.ini"
|
||||
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_BACKUPDIR As String = "BackupDir"
|
||||
Public Const K_RESOURCESDIR As String = "ResourcesDir"
|
||||
Public Const K_DDFDIR As String = "DDFDir"
|
||||
Public Const K_GENDDFDIR As String = "GenDDFDir"
|
||||
|
||||
Public Const S_CSV As String = "CSV"
|
||||
Public Const K_DDFNAME As String = "DDFName"
|
||||
@@ -24,12 +26,15 @@ Module ConstIni
|
||||
Public Const K_HEIGHT As String = "Height"
|
||||
Public Const K_WIDTH As String = "Width"
|
||||
Public Const K_THICKNESS As String = "Thickness"
|
||||
Public Const K_DELIMITER As String = "Delimiter"
|
||||
|
||||
Public Const S_DEBUG As String = "Debug"
|
||||
Public Const K_VARIABLELIST As String = "VariableList"
|
||||
Public Const K_VARIABLEONDRAW As String = "VariableOnDraw"
|
||||
Public Const K_MACHINECOMMANDS As String = "MachineCommands"
|
||||
Public Const K_DOORCIRCLIST As String = "DoorCircList"
|
||||
Public Const K_DOORPRESENCE As String = "DoorPresence"
|
||||
Public Const K_DOORINDEX As String = "DoorIndex"
|
||||
|
||||
Public Const S_NC As String = "NC"
|
||||
Public Const K_NC_SIMULATE As String = "NcSimulate"
|
||||
+9
-3
@@ -43,7 +43,8 @@
|
||||
ItemsSource="{Binding DoorList}"
|
||||
SelectedItem="{Binding SelDoor}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserSortColumns="False">
|
||||
CanUserSortColumns="False"
|
||||
SelectionMode="Single">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header=""
|
||||
Binding="{Binding nId}"
|
||||
@@ -54,9 +55,9 @@
|
||||
<DataGridTextColumn Header="DDF"
|
||||
Binding="{Binding sDDFName}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Quantity"
|
||||
<!--<DataGridTextColumn Header="Quantity"
|
||||
Binding="{Binding nQuantity}"
|
||||
Width="Auto"/>
|
||||
Width="Auto"/>-->
|
||||
<DataGridTextColumn Header="State"
|
||||
Binding="{Binding nState}"
|
||||
Width="Auto"/>
|
||||
@@ -94,5 +95,10 @@
|
||||
Binding="{Binding sUnloadTime}"
|
||||
Width="Auto"/>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
+112
-31
@@ -79,9 +79,9 @@ Public Class DoorListPageVM
|
||||
GetPluginPrivateProfileString(S_GENERAL, "CAMExePath", "", sCamExePath)
|
||||
Dim sMainLuaPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "MainLUA", "", sMainLuaPath)
|
||||
Dim sDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & sDDFName
|
||||
Dim sGenDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, K_GENDDFDIR, "", sGenDDFDirPath)
|
||||
Dim sDDFFilePath As String = sGenDDFDirPath & "\" & sDDFName
|
||||
Return Map.refSupervisorFunction.PlgExecProcess(sCamExePath, sMainLuaPath, sDDFFilePath)
|
||||
End Function
|
||||
|
||||
@@ -91,9 +91,9 @@ Public Class DoorListPageVM
|
||||
GetPluginPrivateProfileString(S_GENERAL, "CAMExePath", "", sCamExePath)
|
||||
Dim sMainLuaPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "MainLUA", "", sMainLuaPath)
|
||||
Dim sDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & sDDFName
|
||||
Dim sGenDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, K_GENDDFDIR, "", sGenDDFDirPath)
|
||||
Dim sDDFFilePath As String = sGenDDFDirPath & "\" & sDDFName
|
||||
Return Map.refSupervisorFunction.PlgExecProcessAsync(sCamExePath, sMainLuaPath, sDDFFilePath)
|
||||
End Function
|
||||
|
||||
@@ -161,6 +161,31 @@ Public Class DoorListPageVM
|
||||
Dim CurrRequestDoor As Door = m_DoorList.FirstOrDefault(Function(x) x.nId = ArgumentsResult.ProcessArgs.nId)
|
||||
If Not IsNothing(CurrRequestDoor) Then
|
||||
CurrRequestDoor.SetState(If(ArgumentsResult.nResult = 0, Door.DoorStates.VERIFIED, Door.DoorStates.VERIFICATION_FAILED))
|
||||
' elimino file generati
|
||||
Dim sGenDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, K_GENDDFDIR, "", sGenDDFDirPath)
|
||||
Dim sDoorFileName As String = CurrRequestDoor.sDDFName & "_" & CurrRequestDoor.nId
|
||||
Try
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".tok")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.tok")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".cnc")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_a.cnc")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_b.cnc")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.cnc")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2_a.cnc")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".html")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.html")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".log")
|
||||
File.Delete(sGenDDFDirPath & "\" & CurrRequestDoor.sDDFName & ".nge")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".nge")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".sest")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.sest")
|
||||
File.Delete(sGenDDFDirPath & "\" & CurrRequestDoor.sDDFName & ".txt")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".txt")
|
||||
File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.txt")
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End If
|
||||
WriteBackup()
|
||||
ArgumentsResult = m_ExecProcessManager.ArgumentsResultDequeue
|
||||
@@ -173,12 +198,21 @@ Public Class DoorListPageVM
|
||||
Friend Function GetNextDoor() As Door
|
||||
Dim NextDoor As Door = m_DoorList.FirstOrDefault(Function(x) x.nState = Door.DoorStates.READY_FOR_PRODUCTION)
|
||||
If Not IsNothing(NextDoor) Then
|
||||
Map.refSupervisorFunction.PlgOutLog("GetNextDoor: door " & NextDoor.nId & " set at ON_LOAD_STATION")
|
||||
NextDoor.SetState(Door.DoorStates.ON_LOAD_STATION)
|
||||
WriteBackup()
|
||||
End If
|
||||
Return NextDoor
|
||||
End Function
|
||||
|
||||
Public Sub ResetProductionQueue()
|
||||
For Each Door In m_DoorList
|
||||
If Door.nState = Door.DoorStates.READY_FOR_PRODUCTION Then
|
||||
Door.SetState(Door.DoorStates.VERIFIED, False)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -207,7 +241,9 @@ Public Class DoorListPageVM
|
||||
Dim sCSVPath As String = OpenFileDialog.FileName
|
||||
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(sCSVPath)
|
||||
MyReader.TextFieldType = FileIO.FieldType.Delimited
|
||||
MyReader.SetDelimiters(";")
|
||||
Dim sDelimiter As String = ""
|
||||
GetPluginPrivateProfileString(S_CSV, K_DELIMITER, ";", sDelimiter)
|
||||
MyReader.SetDelimiters(sDelimiter)
|
||||
' leggo intestazione
|
||||
Dim Headers As String() = MyReader.ReadFields()
|
||||
Dim sDDFName As String = ""
|
||||
@@ -298,16 +334,23 @@ Public Class DoorListPageVM
|
||||
If IsNothing(m_ExecProcessManager) Then
|
||||
bStartExecProcessManager = True
|
||||
m_ExecProcessManager = New ExecProcessManager(sCamExePath, """" & sMainLuaPath & """")
|
||||
'm_ExecProcessManager.SetPostProcess(AddressOf ExecProcessManager_PostProcess)
|
||||
AddHandler m_ExecProcessManager.m_AllArgsProcessed, AddressOf ExecProcessManager_AllArgsProcessed
|
||||
m_ExecProcessManager.SetMaxCamInstances(3)
|
||||
End If
|
||||
Dim sDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
GetPluginPrivateProfileString(S_GENERAL, K_DDFDIR, "", sDDFDirPath)
|
||||
Dim sGenDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, K_GENDDFDIR, "", sGenDDFDirPath)
|
||||
For Each Door In m_DoorList
|
||||
If Door.nState = Door.DoorStates.LOADED_FROM_CSV Then
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & Door.sDDFName
|
||||
m_ExecProcessManager.ArgumentsEnqueue(New ProcessArgs(Door.nId, sDDFFilePath))
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & Door.sDDFName & ".ddf"
|
||||
Dim sGenDDFFilePath As String = sGenDDFDirPath & "\" & Door.sDDFName & "_" & Door.nId & ".ddf"
|
||||
Try
|
||||
File.Copy(sDDFFilePath, sGenDDFFilePath, True)
|
||||
Catch ex As Exception
|
||||
Map.refSupervisorFunction.PlgOutLog("Error: Copy file from " & sDDFFilePath & " to " & sGenDDFFilePath & " failed!")
|
||||
End Try
|
||||
m_ExecProcessManager.ArgumentsEnqueue(New ProcessArgs(Door.nId, sGenDDFFilePath))
|
||||
End If
|
||||
Next
|
||||
If bStartExecProcessManager OrElse m_ExecProcessManager.ExecutionThreadStatus = ExecProcessManager.ExecutionThreadStatuses.STOPPED Then
|
||||
@@ -469,16 +512,19 @@ Public Class DoorListPageVM
|
||||
End Property
|
||||
|
||||
Public Sub Produce()
|
||||
If IsNothing(SelDoor) OrElse SelDoor.nState = Door.DoorStates.SKIPPED OrElse
|
||||
SelDoor.nState = Door.DoorStates.VERIFICATION_FAILED OrElse
|
||||
SelDoor.nState >= Door.DoorStates.READY_FOR_PRODUCTION Then Return
|
||||
ProduceDoor(m_SelDoor)
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
Public Sub ProduceDoor(DoorToProduce As Door, Optional bWriteBackup As Boolean = True)
|
||||
If IsNothing(DoorToProduce) OrElse DoorToProduce.nState = Door.DoorStates.SKIPPED OrElse
|
||||
DoorToProduce.nState = Door.DoorStates.VERIFICATION_FAILED OrElse
|
||||
DoorToProduce.nState >= Door.DoorStates.READY_FOR_PRODUCTION Then Return
|
||||
' la sposto dopo l'ultima da produrre
|
||||
Dim nNewIndex As Integer = m_DoorList.IndexOf(m_DoorList.FirstOrDefault(Function(x) x.nState < Door.DoorStates.READY_FOR_PRODUCTION))
|
||||
Dim nOldIndex As Integer = m_DoorList.IndexOf(SelDoor)
|
||||
Dim SelectedDoor As Door = m_SelDoor
|
||||
Dim nOldIndex As Integer = m_DoorList.IndexOf(DoorToProduce)
|
||||
m_DoorList.Move(nOldIndex, nNewIndex)
|
||||
SelectedDoor.SetState(Door.DoorStates.READY_FOR_PRODUCTION)
|
||||
WriteBackup()
|
||||
DoorToProduce.SetState(Door.DoorStates.READY_FOR_PRODUCTION, bWriteBackup)
|
||||
End Sub
|
||||
|
||||
#End Region ' Produce
|
||||
@@ -495,7 +541,11 @@ Public Class DoorListPageVM
|
||||
End Property
|
||||
|
||||
Public Sub ProduceAll()
|
||||
If IsNothing(SelDoor) Then Return
|
||||
If m_DoorList.Count = 0 Then Return
|
||||
For nDoorIndex = 0 To m_DoorList.Count - 1
|
||||
Dim CurrDoor As Door = m_DoorList(nDoorIndex)
|
||||
ProduceDoor(CurrDoor, False)
|
||||
Next
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
@@ -506,18 +556,14 @@ Public Class DoorListPageVM
|
||||
Public ReadOnly Property ResetProductionQueue_Command As ICommand
|
||||
Get
|
||||
If m_cmdResetProductionQueue Is Nothing Then
|
||||
m_cmdResetProductionQueue = New Command(AddressOf ResetProductionQueue)
|
||||
m_cmdResetProductionQueue = New Command(AddressOf ResetProductionQueueCmd)
|
||||
End If
|
||||
Return m_cmdResetProductionQueue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ResetProductionQueue()
|
||||
For Each Door In m_DoorList
|
||||
If Door.nState = Door.DoorStates.READY_FOR_PRODUCTION Then
|
||||
Door.SetState(Door.DoorStates.VERIFIED)
|
||||
End If
|
||||
Next
|
||||
Public Sub ResetProductionQueueCmd()
|
||||
ResetProductionQueue()
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
@@ -551,7 +597,7 @@ Public Class DoorListPageVM
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
For Each Door In m_DoorList
|
||||
If Door.nState = Door.DoorStates.LOADED_FROM_CSV Or Door.nState = Door.DoorStates.VERIFICATION_FAILED Then
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & Door.sDDFName
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & Door.sDDFName & ".ddf"
|
||||
m_ExecProcessManager.ArgumentsEnqueue(New ProcessArgs(Door.nId, sDDFFilePath))
|
||||
End If
|
||||
Next
|
||||
@@ -582,8 +628,8 @@ Public Class Door
|
||||
MACHINE_1_START = 33
|
||||
MACHINE_1_END = 34
|
||||
MACHINE_2_START = 35
|
||||
MACHINE_2_END = 35
|
||||
PRODUCED = 36
|
||||
MACHINE_2_END = 36
|
||||
PRODUCED = 37
|
||||
SCRAP = 40
|
||||
End Enum
|
||||
|
||||
@@ -668,9 +714,13 @@ Public Class Door
|
||||
Return m_nState
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetState(value As DoorStates, Optional bUpdate As Boolean = True)
|
||||
Friend Sub SetState(value As DoorStates, Optional bWriteBackup As Boolean = True, Optional bUpdate As Boolean = True)
|
||||
m_nState = value
|
||||
If bUpdate Then NotifyPropertyChanged(NameOf(nState))
|
||||
If bWriteBackup Then Map.refDoorListPageVM.WriteBackup()
|
||||
If bUpdate Then
|
||||
NotifyPropertyChanged(NameOf(nState))
|
||||
NotifyPropertyChanged(NameOf(Background))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "Statistics"
|
||||
@@ -684,6 +734,8 @@ Public Class Door
|
||||
Friend Sub SetProdState(value As DoorProdStates)
|
||||
m_nProdState = value
|
||||
Select Case value
|
||||
Case DoorProdStates.SENT_1
|
||||
SetState(DoorStates.ON_LOAD_STATION)
|
||||
Case DoorProdStates.START_MACHINING_1
|
||||
SetState(DoorStates.MACHINE_1_START)
|
||||
Case DoorProdStates.MACHINED_1
|
||||
@@ -796,6 +848,35 @@ Public Class Door
|
||||
|
||||
#End Region ' Statistics
|
||||
|
||||
Public ReadOnly Property Background As SolidColorBrush
|
||||
Get
|
||||
Select Case m_nState
|
||||
Case DoorStates.LOADED_FROM_CSV
|
||||
Return Brushes.White
|
||||
Case DoorStates.VERIFICATION_FAILED
|
||||
Return Brushes.Red
|
||||
Case DoorStates.SKIPPED
|
||||
Return Brushes.Orange
|
||||
Case DoorStates.READY_FOR_PRODUCTION
|
||||
Return Brushes.LightSkyBlue
|
||||
Case DoorStates.ON_LOAD_STATION
|
||||
Return Brushes.SkyBlue
|
||||
Case DoorStates.MACHINE_1_START
|
||||
Return Brushes.DodgerBlue
|
||||
Case DoorStates.MACHINE_1_END
|
||||
Return Brushes.Yellow
|
||||
Case DoorStates.MACHINE_2_START
|
||||
Return Brushes.DodgerBlue
|
||||
Case DoorStates.MACHINE_2_END, DoorStates.PRODUCED
|
||||
Return Brushes.LightGray
|
||||
Case DoorStates.SCRAP
|
||||
Return Brushes.MediumPurple
|
||||
Case Else
|
||||
Return Brushes.White
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, nCSVLine As Integer, sDDFName As String, sCSVName As String, nQuantity As Integer, dWidth As Double, dHeight As Double, dThickness As Double, HeaderList As String(), ValueList As String())
|
||||
m_nId = nId
|
||||
m_nCSVLine = nCSVLine
|
||||
+7
-10
@@ -4,8 +4,8 @@
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||
<RootNamespace>Supervisor.Plugin.FiveLakes</RootNamespace>
|
||||
<AssemblyName>Supervisor.Plugin.FiveLakes</AssemblyName>
|
||||
<RootNamespace>Effector.Plugin.FiveLakes</RootNamespace>
|
||||
<AssemblyName>Effector.Plugin.FiveLakes</AssemblyName>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<MyType>Custom</MyType>
|
||||
@@ -21,7 +21,7 @@
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Supervisor.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<DocumentationFile>Effector.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@@ -32,7 +32,7 @@
|
||||
<IncrementalBuild>false</IncrementalBuild>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>Supervisor.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<DocumentationFile>Effector.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
@@ -48,8 +48,8 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtWPFLib48">
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib48.dll</HintPath>
|
||||
<Reference Include="Effector.Plugin.Interface">
|
||||
<HintPath>..\..\Effector.Main\Effector.Plugin.Interface\bin\Debug\Effector.Plugin.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="KeraLua, Version=1.4.1.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\KeraLua.1.4.1\lib\net46\KeraLua.dll</HintPath>
|
||||
@@ -57,9 +57,6 @@
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Supervisor.Plugin.Interface">
|
||||
<HintPath>..\..\Ngp\Supervisor.Plugin.Interface\bin\Debug\Supervisor.Plugin.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -203,7 +200,7 @@
|
||||
<PreBuildEvent>powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Supervisor\Plugin\Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.dll
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Effector\Plugin\Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes.dll
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets" Condition="Exists('..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets')" />
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<Grid x:Class="FiveLakesUI"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
DataContext="{StaticResource FiveLakesUIVM}">
|
||||
<TabControl SelectedIndex="{Binding SelPage}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
<Export(GetType(IPluginControl))>
|
||||
<ExportMetadata("Name", "Project")>
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
Public Class FiveLakesUIVM
|
||||
Inherits VMBase
|
||||
@@ -48,7 +48,7 @@ Public Class FiveLakesUIVM
|
||||
If GetPrivateProfileString(S_DATA, K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & DAT_FILE_NAME) = 0 Then
|
||||
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
End If
|
||||
m_sDataRoot &= "\" & "Plugin\Supervisor.Plugin.FiveLakes"
|
||||
m_sDataRoot &= "\" & "Plugin\Effector.Plugin.FiveLakes"
|
||||
' Impostazione direttorio di configurazione
|
||||
m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
|
||||
' Impostazione path Ini file
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
Imports KeraLua
|
||||
|
||||
<Export(GetType(IPluginLuaManager))>
|
||||
+22
-3
@@ -10,6 +10,7 @@ Public Module Lua_General
|
||||
Friend func_PlgCheckExecProcessAsync As LuaFunction = AddressOf Lua_PlgCheckExecProcessAsync
|
||||
Friend func_PlgGetNextDoor As LuaFunction = AddressOf Lua_PlgGetNextDoor
|
||||
Friend func_PlgOpenRestartWnd As LuaFunction = AddressOf Lua_PlgOpenRestartWnd
|
||||
Friend func_PlgMachineReset As LuaFunction = AddressOf Lua_PlgMachineReset
|
||||
|
||||
Private Function Lua_PlgGetNumberFromIni(ByVal p As IntPtr) As Integer
|
||||
Dim state = Lua.FromIntPtr(p)
|
||||
@@ -107,7 +108,8 @@ Public Module Lua_General
|
||||
If Not IsNothing(NextDoor) Then
|
||||
' restituisco il risultato
|
||||
LuaSetParam(state, NextDoor.nId)
|
||||
LuaSetParam(state, NextDoor.sDDFName)
|
||||
' Dim sGenDDFName As String = Path.GetFileNameWithoutExtension(NextDoor.sDDFName) & "_" & NextDoor.nId & ".ddf"
|
||||
LuaSetParam(state, NextDoor.sDDFName & "_" & NextDoor.nId)
|
||||
Return 2
|
||||
End If
|
||||
Return 0
|
||||
@@ -115,9 +117,25 @@ Public Module Lua_General
|
||||
|
||||
Private Function Lua_PlgOpenRestartWnd(ByVal p As IntPtr) As Integer
|
||||
Dim state = Lua.FromIntPtr(p)
|
||||
Dim nMachineIndex As Integer = 1
|
||||
LuaGetParam(state, 1, nMachineIndex)
|
||||
LuaClearStack(state)
|
||||
Dim RestartWnd As New RestartWndV(Application.Current.MainWindow, New RestartWndVM())
|
||||
RestartWnd.ShowDialog()
|
||||
Dim RestartWnd As New RestartWndV(Application.Current.MainWindow, New RestartWndVM(nMachineIndex))
|
||||
Dim bRes As Boolean = RestartWnd.ShowDialog()
|
||||
If Not IsNothing(bRes) Then
|
||||
' restituisco il risultato
|
||||
LuaSetParam(state, bRes)
|
||||
Return 1
|
||||
End If
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
Private Function Lua_PlgMachineReset(ByVal p As IntPtr) As Integer
|
||||
Dim state = Lua.FromIntPtr(p)
|
||||
Dim nMachineIndex As Integer = 1
|
||||
LuaGetParam(state, 1, nMachineIndex)
|
||||
LuaClearStack(state)
|
||||
Map.refDoorListPageVM.ResetProductionQueue()
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
@@ -131,6 +149,7 @@ Public Module Lua_General
|
||||
state.Register("PlgCheckExecProcessAsync", func_PlgCheckExecProcessAsync)
|
||||
state.Register("PlgGetNextDoor", func_PlgGetNextDoor)
|
||||
state.Register("PlgOpenRestartWnd", func_PlgOpenRestartWnd)
|
||||
state.Register("PlgMachineReset", func_PlgMachineReset)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
+239
-334
@@ -1,7 +1,7 @@
|
||||
<Grid x:Class="MachinePageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
@@ -14,6 +14,7 @@
|
||||
<local:StringToBooleanConverter x:Key="StringToBooleanConverter"/>
|
||||
<local:StringToBackgroundConverter x:Key="StringToBackgroundConverter"/>
|
||||
<local:DoorToVisibilityConverter x:Key="DoorToVisibilityConverter"/>
|
||||
<local:StringToStyleConverter x:Key="StringToStyleConverter"/>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -87,7 +88,8 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Bottoni di debug-->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid Grid.Column="1"
|
||||
Visibility="{Binding MachineCommands_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3.8*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -767,42 +769,42 @@
|
||||
<Border Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[0].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[0].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[0].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="3"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[1].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[1].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[1].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="5"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[2].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[2].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[2].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="7"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[3].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[3].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[3].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="9"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[4].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Visibility="{Binding VariableList[24].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{Binding VariableList[24].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[4].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="11"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[25].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[25].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[5].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
|
||||
@@ -810,25 +812,90 @@
|
||||
<Border Grid.Column="13"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[26].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[26].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[6].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="15"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[27].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[27].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[7].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="17"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[28].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[28].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[8].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<!--Intestazione descrizione porte-->
|
||||
<Grid Grid.Row="4">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Text="Circular Index"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="State"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
Text="DDF Name"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="4"
|
||||
Text="CSV Name"/>-->
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
Text="DoorCode"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="6"
|
||||
Text="DoorDescription"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="7"
|
||||
Text="M1 CN Path"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="8"
|
||||
Text="M2 CN Path"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="9"
|
||||
Text="Load Time"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="10"
|
||||
Text="Machining 1 Start"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="11"
|
||||
Text="Machining 1 End"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="12"
|
||||
Text="Machining 2 Start"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="13"
|
||||
Text="Machining 2 End"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="14"
|
||||
Text="UnloadTime"/>
|
||||
</Grid>
|
||||
<!--Descrizione porte-->
|
||||
<ItemsControl Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
@@ -840,11 +907,8 @@
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Visibility="{Binding Converter={StaticResource DoorToVisibilityConverter}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid HorizontalAlignment="Center"
|
||||
Visibility="{Binding Converter={StaticResource DoorToVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -862,93 +926,48 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding nId}"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Text="Circular Index"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding nCircIndex}"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="State"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="{Binding nState}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
Text="DDF Name"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
Text="{Binding sDDFName}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
Text="CSV Name"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
Text="{Binding sCSVName}"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
Text="DoorCode"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sCSVName}"/>-->
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Text="{Binding sDoorCode}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="6"
|
||||
Text="DoorDescription"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="6"
|
||||
Text="{Binding sDoorDescription}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="7"
|
||||
Text="M1 CN Path"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="7"
|
||||
Text="{Binding sM1CNPath}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="8"
|
||||
Text="M2 CN Path"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="8"
|
||||
Text="{Binding sM2CNPath}"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="9"
|
||||
Text="Load Time"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="9"
|
||||
Text="{Binding sLoadTime}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="10"
|
||||
Text="Machining 1 Start"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="10"
|
||||
Text="{Binding sMachining1Start}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="11"
|
||||
Text="Machining 1 End"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="11"
|
||||
Text="{Binding sMachining1End}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="12"
|
||||
Text="Machining 2 Start"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="12"
|
||||
Text="{Binding sMachining2Start}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="13"
|
||||
Text="Machining 2 End"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="13"
|
||||
Text="{Binding sMachining2End}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="14"
|
||||
Text="UnloadTime"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="14"
|
||||
Text="{Binding sUnloadTime}"/>
|
||||
@@ -957,277 +976,163 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
<!--Bottoni macchina vecchi-->
|
||||
<!--<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Presenza porta M1S0"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,2,980,0"
|
||||
Width="30"/>
|
||||
<Button Content="1"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,2,980,1"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M1S1"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1360/1,980->1,1,1361/1,981"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M1S2"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1361/1,981->1,1,1362/1,982"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M1S3"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1362/1,982->1,1,1363/1,983"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M1S4/M2S0"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1363/1,983->1,1,1364;2,1,1360/1,984;2,980"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Presenza porta M2S0"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,2,980,0"
|
||||
Width="30"/>
|
||||
<Button Content="1"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,2,980,1"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M2S1"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1364;2,1,1360/1,984;2,980->2,1,1361/2,981"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M2S2"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="2,1,1361/2,981->2,1,1362/2,982"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M2S3"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="2,1,1362/2,982->2,1,1363/2,983"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M2S4"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="2,1,1363/2,983->2,1,1364/2,984"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="State M1"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,0"
|
||||
Width="30"/>
|
||||
<Button Content="1"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,1"
|
||||
Width="30"/>
|
||||
<Button Content="2"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,2"
|
||||
Width="30"/>
|
||||
<Button Content="3"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,3"
|
||||
Width="30"/>
|
||||
<Button Content="4"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,4"
|
||||
Width="30"/>
|
||||
<Button Content="5"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,5"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="State M2"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,0"
|
||||
Width="30"/>
|
||||
<Button Content="1"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,1"
|
||||
Width="30"/>
|
||||
<Button Content="2"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,2"
|
||||
Width="30"/>
|
||||
<Button Content="3"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,3"
|
||||
Width="30"/>
|
||||
<Button Content="4"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,4"
|
||||
Width="30"/>
|
||||
<Button Content="5"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,5"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
</Grid>-->
|
||||
<!--Lista circolare porte-->
|
||||
<Grid Grid.Row="2"
|
||||
Visibility="{Binding DoorCircList_Visibility}">
|
||||
<ItemsControl ItemsSource="{Binding LuaDoorList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="10"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding nId}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Text="Circular Index"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding nCircIndex}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="State"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="{Binding nState}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
Text="DDF Name"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
Text="{Binding sDDFName}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="4"
|
||||
Text="CSV Name"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
Text="{Binding sCSVName}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
Text="DoorCode"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Text="{Binding sDoorCode}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="6"
|
||||
Text="DoorDescription"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="6"
|
||||
Text="{Binding sDoorDescription}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="7"
|
||||
Text="M1 CN Path"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="7"
|
||||
Text="{Binding sM1CNPath}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="8"
|
||||
Text="M2 CN Path"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="8"
|
||||
Text="{Binding sM2CNPath}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="9"
|
||||
Text="Load Time"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="9"
|
||||
Text="{Binding sLoadTime}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="10"
|
||||
Text="Machining 1 Start"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="10"
|
||||
Text="{Binding sMachining1Start}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="11"
|
||||
Text="Machining 1 End"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="11"
|
||||
Text="{Binding sMachining1End}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="12"
|
||||
Text="Machining 2 Start"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="12"
|
||||
Text="{Binding sMachining2Start}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="13"
|
||||
Text="Machining 2 End"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="13"
|
||||
Text="{Binding sMachining2End}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="14"
|
||||
Text="UnloadTime"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="14"
|
||||
Text="{Binding sUnloadTime}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Text="Circular Index"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="State"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
Text="Position"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="4"
|
||||
Text="DDF Name"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
Text="CSV Name"/>-->
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="6"
|
||||
Text="DoorCode"/>-->
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="7"
|
||||
Text="DoorDescription"/>-->
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="8"
|
||||
Text="M1 CN Path"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="9"
|
||||
Text="M2 CN Path"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="10"
|
||||
Text="Load Time"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="11"
|
||||
Text="Machining 1 Start"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="12"
|
||||
Text="Machining 1 End"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="13"
|
||||
Text="Machining 2 Start"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="14"
|
||||
Text="Machining 2 End"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="15"
|
||||
Text="UnloadTime"/>
|
||||
</Grid>
|
||||
<ItemsControl Grid.Column="1"
|
||||
ItemsSource="{Binding LuaDoorList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="10"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding nId}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding nCircIndex}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="{Binding nState}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
Text="{Binding nDoorPosition}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
Text="{Binding sDDFName}"/>
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Text="{Binding sCSVName}"/>-->
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="6"
|
||||
Text="{Binding sDoorCode}"/>-->
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="7"
|
||||
Text="{Binding sDoorDescription}"/>-->
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="8"
|
||||
Text="{Binding sM1CNPath}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="9"
|
||||
Text="{Binding sM2CNPath}"/>-->
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="10"
|
||||
Text="{Binding sLoadTime}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="11"
|
||||
Text="{Binding sMachining1Start}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="12"
|
||||
Text="{Binding sMachining1End}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="13"
|
||||
Text="{Binding sMachining2Start}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="14"
|
||||
Text="{Binding sMachining2End}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="15"
|
||||
Text="{Binding sUnloadTime}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
+43
-10
@@ -4,8 +4,8 @@ Imports System.Globalization
|
||||
Imports System.Reflection
|
||||
Imports System.Windows.Threading
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports Supervisor.Plugin.FiveLakes.Variable
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.FiveLakes.Variable
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
Public Class MachinePageVM
|
||||
Inherits VMBase
|
||||
@@ -207,7 +207,7 @@ Public Class MachinePageVM
|
||||
End Select
|
||||
Next
|
||||
' se in simulazione
|
||||
If Map.refSupervisorFunction.PlgGetPrivateProfileInt(S_NC, K_NC_SIMULATE, 0) Then
|
||||
If Map.refSupervisorFunction.PlgGetPrivateProfileInt(S_NC, K_NC_SIMULATE, 0) > 0 Then
|
||||
' aggiorno stato porta in macchina da 1 a 2 se in stazione di lavorazione
|
||||
For nMachineIndex = 1 To 2
|
||||
Dim nMachineId As Integer = nMachineIndex
|
||||
@@ -254,6 +254,8 @@ Public Class MachinePageVM
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nCircIndex", nCircIndex)
|
||||
Dim nDoorState As Integer = -1
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nState", nDoorState)
|
||||
Dim nDoorPosition As Integer = -1
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nDoorPosition", nDoorPosition)
|
||||
Dim sDoorCode As String = ""
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".sDoorCode", sDoorCode)
|
||||
Dim sDoorDescription As String = ""
|
||||
@@ -278,7 +280,7 @@ Public Class MachinePageVM
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nMachining2End", lMachining2End)
|
||||
Dim lUnloadTime As Long = 0
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nUnloadTime", lUnloadTime)
|
||||
m_LuaDoorList.Add(New LuaDoor(nId, nCircIndex, nDoorState, sDoorCode, sDoorDescription, sDDFName, sCSVName, sM1CNPath, sM2CNPath, lLoadTime, lMachining1Start, lMachining1End, lMachining2Start, lMachining2End, lUnloadTime))
|
||||
m_LuaDoorList.Add(New LuaDoor(nId, nCircIndex, nDoorState, nDoorPosition, sDoorCode, sDoorDescription, sDDFName, sCSVName, sM1CNPath, sM2CNPath, lLoadTime, lMachining1Start, lMachining1End, lMachining2Start, lMachining2End, lUnloadTime))
|
||||
If nId > 0 Then
|
||||
' aggiorno dati in lista porte
|
||||
Dim Door As Door = Map.refDoorListPageVM.DoorList.FirstOrDefault(Function(x) x.nId = nId)
|
||||
@@ -297,7 +299,7 @@ Public Class MachinePageVM
|
||||
Dim Var As Variable = m_VariableList(nVarIndex)
|
||||
If nVarIndex >= 5 AndAlso nVarIndex <= 9 Then
|
||||
Dim nId As Integer = -1
|
||||
If Var.nValue > 0 Then
|
||||
If Var.nValue > 0 AndAlso Var.nValue <= 10 Then
|
||||
m_DoorOnMachineArray(nVarIndex - 5) = m_LuaDoorList(Var.nValue - 1)
|
||||
Else
|
||||
m_DoorOnMachineArray(nVarIndex - 5) = Nothing
|
||||
@@ -305,7 +307,7 @@ Public Class MachinePageVM
|
||||
End If
|
||||
If nVarIndex >= 30 AndAlso nVarIndex <= 33 Then
|
||||
Dim nId As Integer = -1
|
||||
If Var.nValue > 0 Then
|
||||
If Var.nValue > 0 AndAlso Var.nValue <= 10 Then
|
||||
m_DoorOnMachineArray(nVarIndex - 25) = m_LuaDoorList(Var.nValue - 1)
|
||||
Else
|
||||
m_DoorOnMachineArray(nVarIndex - 25) = Nothing
|
||||
@@ -416,10 +418,10 @@ Public Class MachinePageVM
|
||||
If (MachineStateVar.nValue <> 2 AndAlso MachineStateVar.nValue <> 4) OrElse
|
||||
Sent1Var.nValue <> 0 OrElse Sent2Var.nValue <> 0 Then Return
|
||||
End If
|
||||
' verifco se variabile tavolo di lavoro, che la macchina abbia finito di lavorare
|
||||
' verifco se variabile tavolo di lavoro, che la macchina abbia finito di lavorare o che sia a inizializzazione perche' ripartenza
|
||||
If nVerifyFromVarAddress = 1362 Then
|
||||
Dim MachineStateVar As Variable = VariableList.FirstOrDefault(Function(x) x.nMachine = nVerifyFromMachineIndex AndAlso x.sName = "@STATE")
|
||||
If MachineStateVar.nValue <> 3 AndAlso MachineStateVar.nValue <> 5 Then Return
|
||||
If MachineStateVar.nValue <> 1 AndAlso MachineStateVar.nValue <> 3 AndAlso MachineStateVar.nValue <> 5 Then Return
|
||||
End If
|
||||
' verifico che stazione di destinazione non sia gia' occupata
|
||||
Dim sToAndPresenceVariables As String() = sVariableToMoveArgs(1).Split("/"c)
|
||||
@@ -603,7 +605,7 @@ Public Class MachinePageVM
|
||||
Case 0
|
||||
Return
|
||||
Case 1
|
||||
If nStartStop = 1 AndAlso StartDoorPresence.dValue = 1 AndAlso Sent1.nValue = 1 Then
|
||||
If nStartStop = 1 AndAlso (StartDoorPresence.dValue = 1 OrElse EndDoorPresence.dValue = 2) AndAlso Sent1.nValue = 1 Then
|
||||
nState = 2
|
||||
Map.refSupervisorFunction.ComWriteShortVar(Sent1.sIndex, 0, nMachineIndex)
|
||||
Else Return
|
||||
@@ -768,6 +770,13 @@ Public Class LuaDoor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nDoorPosition As Integer = 0
|
||||
Public ReadOnly Property nDoorPosition As Integer
|
||||
Get
|
||||
Return m_nDoorPosition
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sDoorCode As String = ""
|
||||
Public ReadOnly Property sDoorCode As String
|
||||
Get
|
||||
@@ -852,11 +861,12 @@ Public Class LuaDoor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, nCircIndex As Integer, nState As Integer, sDoorCode As String, sDoorDescription As String, sDDFName As String, sCSVName As String,
|
||||
Sub New(nId As Integer, nCircIndex As Integer, nState As Integer, nDoorPosition As Integer, sDoorCode As String, sDoorDescription As String, sDDFName As String, sCSVName As String,
|
||||
sM1CNPath As String, sM2CNPath As String, lLoadTime As Long, lMachining1Start As Long, lMachining1End As Long, lMachining2Start As Long, lMachining2End As Long, lUnloadTime As Long)
|
||||
m_nId = nId
|
||||
m_nCircIndex = nCircIndex
|
||||
m_nState = nState
|
||||
m_nDoorPosition = nDoorPosition
|
||||
m_sDoorCode = sDoorCode
|
||||
m_sDoorDescription = sDoorDescription
|
||||
m_sDDFName = sDDFName
|
||||
@@ -1024,3 +1034,26 @@ Public Class DoorToVisibilityConverter
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class StringToStyleConverter
|
||||
Implements IValueConverter
|
||||
|
||||
Dim DoorStyle As Style = Application.Current.TryFindResource("Door")
|
||||
Dim CutOutScrapStyle As Style = Application.Current.TryFindResource("CutOutScrap")
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||
If Not TypeOf value Is String OrElse String.IsNullOrWhiteSpace(value) Then Return "Door"
|
||||
Dim sValue As String = value
|
||||
Dim sLowerValue As String = sValue.ToLower()
|
||||
If sLowerValue = "true" Then Return "Door"
|
||||
If sLowerValue = "false" Then Return "Door"
|
||||
Dim nValue As Integer
|
||||
If Not Integer.TryParse(sValue, nValue) Then Return "Door"
|
||||
Return If(nValue = 4, CutOutScrapStyle, DoorStyle)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
<Export(GetType(IPluginControl))>
|
||||
<ExportMetadata("Name", "MainMenu")>
|
||||
+2
-2
@@ -11,10 +11,10 @@ Imports System.Windows
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("Supervisor.Plugin.FiveLakes")>
|
||||
<Assembly: AssemblyTitle("Effector.Plugin.FiveLakes")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Windows User")>
|
||||
<Assembly: AssemblyProduct("Supervisor.Plugin.FiveLakes")>
|
||||
<Assembly: AssemblyProduct("Effector.Plugin.FiveLakes")>
|
||||
<Assembly: AssemblyCopyright("Copyright @ Windows User 2024")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
+2
-2
@@ -64,9 +64,9 @@ Namespace My
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.Supervisor.Plugin.FiveLakes.My.MySettings
|
||||
Friend ReadOnly Property Settings() As Global.Effector.Plugin.FiveLakes.My.MySettings
|
||||
Get
|
||||
Return Global.Supervisor.Plugin.FiveLakes.My.MySettings.Default
|
||||
Return Global.Effector.Plugin.FiveLakes.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
+7
-2
@@ -20,7 +20,7 @@
|
||||
Text="ResultQueue: "/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding ResultQueueCount}"/>
|
||||
Text="{Binding ResultQueue}"/>
|
||||
</Grid>
|
||||
<!--<DataGrid ItemsSource="{Binding ThreadList}"
|
||||
AutoGenerateColumns="False">
|
||||
@@ -47,6 +47,11 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<ProgressBar Value="{Binding dProgress_Value, Mode=OneWay}"
|
||||
Minimum="0"
|
||||
Maximum="{Binding dProgress_Maximum}"
|
||||
Height="20"
|
||||
Width="250"/>
|
||||
|
||||
</StackPanel>
|
||||
</Window>
|
||||
+18
@@ -4,6 +4,8 @@ Imports System.Collections.ObjectModel
|
||||
Public Class ProcessManagerVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_nTaskQuantity As Integer = 3
|
||||
|
||||
Private m_UpdateDataTimer As New DispatcherTimer
|
||||
|
||||
Private m_ExecProcessManager As ExecProcessManager
|
||||
@@ -35,8 +37,23 @@ Public Class ProcessManagerVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dProgress_Value As Double
|
||||
Public ReadOnly Property dProgress_Value As Double
|
||||
Get
|
||||
Return (m_dProgress_Maximum - m_nTaskQuantity - m_ExecProcessManager.ArgumentsQueueCount) '/ m_dProgress_Maximum * 100
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dProgress_Maximum As Double
|
||||
Public ReadOnly Property dProgress_Maximum As Double
|
||||
Get
|
||||
Return m_dProgress_Maximum
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(ExecProcessManager As ExecProcessManager)
|
||||
m_ExecProcessManager = ExecProcessManager
|
||||
m_dProgress_Maximum = m_ExecProcessManager.ArgumentsQueueCount + m_nTaskQuantity
|
||||
m_UpdateDataTimer.Interval = New TimeSpan(0, 0, 1)
|
||||
AddHandler m_UpdateDataTimer.Tick, AddressOf UpdateDataTimer_Tick
|
||||
m_UpdateDataTimer.Start()
|
||||
@@ -46,6 +63,7 @@ Public Class ProcessManagerVM
|
||||
NotifyPropertyChanged(NameOf(ArgumentsQueue))
|
||||
NotifyPropertyChanged(NameOf(ResultQueue))
|
||||
NotifyPropertyChanged(NameOf(ThreadList))
|
||||
NotifyPropertyChanged(NameOf(dProgress_Value))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+21
-11
@@ -3,13 +3,15 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
Title="{Binding sTitle}">
|
||||
<Window.Resources>
|
||||
<local:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>
|
||||
<local:DoorToVisibilityConverter x:Key="DoorToVisibilityConverter"/>
|
||||
<local:StateToVisibilityConverter x:Key="StateToVisibilityConverter"/>
|
||||
<local:VariableNameToVisibilityConverter x:Key="VariableNameToVisibilityConverter"/>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -45,35 +47,35 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[0].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_00}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[0].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="3"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[1].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_01}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[1].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="5"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[2].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_02}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[2].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="7"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[3].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_03}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[3].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="9"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[4].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_04}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[4].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
@@ -114,7 +116,7 @@
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<TextBox Grid.Column="1"
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding nId}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
@@ -265,8 +267,16 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>-->
|
||||
<Button Grid.Row="1"
|
||||
Content="Ok"
|
||||
Command="{Binding Ok_Command}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"/>
|
||||
<Button Grid.Column="1"
|
||||
Content="Empty Line"
|
||||
Command="{Binding Empty_Command}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
+104
-7
@@ -1,15 +1,28 @@
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class RestartWndVM
|
||||
Inherits VMBase
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_sTitle As String = ""
|
||||
Public ReadOnly Property sTitle As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nMachineIndex As Integer = 1
|
||||
Public ReadOnly Property nMachineIndex As Integer
|
||||
Get
|
||||
Return m_nMachineIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_RestartDoorList As ObservableCollection(Of RestartDoor)
|
||||
Public ReadOnly Property RestartDoorList As ObservableCollection(Of RestartDoor)
|
||||
@@ -45,9 +58,23 @@ Public Class RestartWndVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdEmpty As ICommand
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
Sub New(nMachineIndex As Integer)
|
||||
m_nMachineIndex = nMachineIndex
|
||||
m_sTitle = "Machine " & m_nMachineIndex
|
||||
If Map.refSupervisorFunction.PlgGetPrivateProfileInt(S_NC, K_NC_SIMULATE, 0) > 0 Then
|
||||
For nIndex = 0 To 4
|
||||
Dim dValue As Double = GetPluginPrivateProfileDouble(S_DEBUG, K_DOORPRESENCE & "M" & m_nMachineIndex & "P" & nIndex, 0)
|
||||
WriteVariableValueToName(nMachineIndex, "@WP_PR_0" & nIndex.ToString(), dValue)
|
||||
Dim nValue As Integer = GetPluginPrivateProfileDouble(S_DEBUG, K_DOORINDEX & "M" & m_nMachineIndex & "P" & nIndex, 0)
|
||||
WriteVariableValueToName(nMachineIndex, "@DOORN_S" & nIndex.ToString(), nValue)
|
||||
Next
|
||||
End If
|
||||
Dim sBackupFilePath As String = ""
|
||||
GetPluginPrivateProfileString("General", "BackupDir", "", sBackupFilePath)
|
||||
sBackupFilePath &= "\LuaBackup.json"
|
||||
@@ -66,9 +93,12 @@ Public Class RestartWndVM
|
||||
|
||||
' leggo presenze porta
|
||||
For nPositionIndex As Integer = 4 To 0 Step -1
|
||||
If GetVariableFromName(1, "@WP_PR_0" & nPositionIndex.ToString()).dValue <> 0 Then
|
||||
Dim dWPValue As Double = 0
|
||||
GetVariableValueFromName(nMachineIndex, "@WP_PR_0" & nPositionIndex.ToString(), dWPValue)
|
||||
If dWPValue <> 0 Then
|
||||
' verifico indice
|
||||
Dim nCircindex As Integer = GetVariableFromName(1, "@DOORN_S" & nPositionIndex.ToString()).nValue
|
||||
Dim nCircindex As Integer = 0
|
||||
GetVariableValueFromName(nMachineIndex, "@DOORN_S" & nPositionIndex.ToString(), nCircindex)
|
||||
If nCircindex <> 0 Then
|
||||
m_DoorOnMachineArray(nPositionIndex) = New RestartDoor(JsonLuaDoorList(nCircindex - 1))
|
||||
End If
|
||||
@@ -109,9 +139,38 @@ Public Class RestartWndVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Function GetVariableFromName(nMachIndex As Integer, sName As String) As Variable
|
||||
Return Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
Public Shared Function GetVariableValueFromName(nMachIndex As Integer, sName As String, ByRef nValue As Integer) As Boolean
|
||||
Dim Variable As Variable = Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
If IsNothing(Variable) Then Return False
|
||||
Dim nIndex As Integer = 0
|
||||
If Not Integer.TryParse(Variable.sIndex, nIndex) Then Return False
|
||||
Return Map.refSupervisorFunction.ComReadShortVar(nIndex, nValue, nMachIndex)
|
||||
End Function
|
||||
|
||||
Public Shared Function GetVariableValueFromName(nMachIndex As Integer, sName As String, ByRef dValue As Double) As Boolean
|
||||
Dim Variable As Variable = Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
If IsNothing(Variable) Then Return False
|
||||
Dim nIndex As Integer = 0
|
||||
If Not Integer.TryParse(Variable.sIndex, nIndex) Then Return False
|
||||
Return Map.refSupervisorFunction.ComReadDoubleVar(nIndex, dValue, nMachIndex)
|
||||
End Function
|
||||
|
||||
Public Shared Function WriteVariableValueToName(nMachIndex As Integer, sName As String, nValue As Integer) As Boolean
|
||||
Dim Variable As Variable = Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
If IsNothing(Variable) Then Return False
|
||||
Dim nIndex As Integer = 0
|
||||
If Not Integer.TryParse(Variable.sIndex, nIndex) Then Return False
|
||||
Return Map.refSupervisorFunction.ComWriteShortVar(nIndex, nValue, nMachIndex)
|
||||
End Function
|
||||
|
||||
Public Shared Function WriteVariableValueToName(nMachIndex As Integer, sName As String, dValue As Double) As Boolean
|
||||
Dim Variable As Variable = Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
If IsNothing(Variable) Then Return False
|
||||
Dim nIndex As Integer = 0
|
||||
If Not Integer.TryParse(Variable.sIndex, nIndex) Then Return False
|
||||
Return Map.refSupervisorFunction.ComWriteDoubleVar(nIndex, dValue, nMachIndex)
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -133,6 +192,25 @@ Public Class RestartWndVM
|
||||
|
||||
#End Region ' Ok
|
||||
|
||||
#Region "Empty"
|
||||
|
||||
Public ReadOnly Property Empty_Command As ICommand
|
||||
Get
|
||||
If m_cmdEmpty Is Nothing Then
|
||||
m_cmdEmpty = New Command(AddressOf Empty)
|
||||
End If
|
||||
Return m_cmdEmpty
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Empty()
|
||||
Map.refDoorListPageVM.ResetProductionQueue()
|
||||
Map.refDoorListPageVM.WriteBackup()
|
||||
RaiseEvent m_CloseWindow(False)
|
||||
End Sub
|
||||
|
||||
#End Region ' Empty
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -151,6 +229,25 @@ Public Class StateToVisibilityConverter
|
||||
|
||||
End Class
|
||||
|
||||
Public Class VariableNameToVisibilityConverter
|
||||
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 Integer Then Return Visibility.Collapsed
|
||||
If IsNothing(parameter) OrElse Not TypeOf parameter Is String OrElse String.IsNullOrWhiteSpace(parameter) Then Return Visibility.Collapsed
|
||||
Dim nMachineIndex As Integer = 0
|
||||
If Not Integer.TryParse(value, nMachineIndex) Then Return Visibility.Collapsed
|
||||
Dim dWPValue As Double = 0
|
||||
RestartWndVM.GetVariableValueFromName(nMachineIndex, "@" & parameter, dWPValue)
|
||||
Return If(dWPValue = 1 OrElse dWPValue = 2 OrElse dWPValue = 3, Visibility.Visible, Visibility.Collapsed)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class RestartDoor
|
||||
Inherits VMBase
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
+6
-1
@@ -1,7 +1,7 @@
|
||||
<ResourceDictionary x:Class="Dictionary"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
>
|
||||
|
||||
@@ -76,6 +76,11 @@
|
||||
<Setter Property="BorderThickness" Value="5"/>
|
||||
<Setter Property="Background" Value="SandyBrown"/>
|
||||
</Style>
|
||||
<Style x:Key="CutOutScrap" TargetType="Border">
|
||||
<Setter Property="Margin" Value="35,10,10,10"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Background" Value="SandyBrown"/>
|
||||
</Style>
|
||||
<Style x:Key="Advancement_Button" TargetType="Button">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports System.Globalization
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
<Export(GetType(IPluginControl))>
|
||||
<ExportMetadata("Name", "Dictionary")>
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports MS.Internal
|
||||
Imports Supervisor.Plugin.FiveLakes.ThreadData
|
||||
Imports Effector.Plugin.FiveLakes.ThreadData
|
||||
Imports System.Windows.Threading
|
||||
|
||||
Public Class ExecProcessManager
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
Imports System.Globalization
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Converters
|
||||
Imports Supervisor.Plugin.FiveLakes.Door
|
||||
Imports Effector.Plugin.FiveLakes.Door
|
||||
|
||||
Public Class JsonDoor
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
Module Map
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
Copy-Item -Path c:\EgtProg\Effector\Effector*.exe $ProjectDir\..\Exe
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,155 +0,0 @@
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||
<RootNamespace>Supervisor.Plugin.FiveLakes</RootNamespace>
|
||||
<AssemblyName>Supervisor.Plugin.FiveLakes</AssemblyName>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<MyType>Custom</MyType>
|
||||
<Deterministic>true</Deterministic>
|
||||
<ProjectGuid>{7C77F537-8235-40AB-B24A-4E71CFB96D2C}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Supervisor.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>false</IncrementalBuild>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>Supervisor.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtWPFLib48">
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib48.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Supervisor.Plugin.Interface">
|
||||
<HintPath>..\..\Supervisor\Supervisor.Plugin.Interface\bin\Debug\Supervisor.Plugin.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows" />
|
||||
<Import Include="System.Windows.Controls" />
|
||||
<Import Include="System.Windows.Data" />
|
||||
<Import Include="System.Windows.Documents" />
|
||||
<Import Include="System.Windows.Input" />
|
||||
<Import Include="System.Windows.Shapes" />
|
||||
<Import Include="System.Windows.Media" />
|
||||
<Import Include="System.Windows.Media.Imaging" />
|
||||
<Import Include="System.Windows.Navigation" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DoorList\DoorListV.xaml.vb">
|
||||
<DependentUpon>DoorListV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DoorList\DoorListVM.vb" />
|
||||
<Compile Include="FiveLakesUI.xaml.vb">
|
||||
<DependentUpon>FiveLakesUI.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FiveLakesUIVM.vb" />
|
||||
<Compile Include="MainMenu\MainMenuV.xaml.vb">
|
||||
<DependentUpon>MainMenuV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainMenu\MainMenuVM.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Command.vb" />
|
||||
<Compile Include="Utility\Dictionary.xaml.vb" />
|
||||
<Compile Include="Utility\VMBase.vb" />
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="DoorList\DoorListV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="FiveLakesUI.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MainMenu\MainMenuV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Utility\Dictionary.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Supervisor\Plugin\Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.dll
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,3 +0,0 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
Copy-Item -Path c:\EgtProg\Supervisor\Supervisor*.exe $ProjectDir\..\Exe
|
||||
Reference in New Issue
Block a user