diff --git a/Exe/SupervisorD32.exe b/Exe/SupervisorD32.exe
index 624e72d..81de873 100644
Binary files a/Exe/SupervisorD32.exe and b/Exe/SupervisorD32.exe differ
diff --git a/Supervisor.Plugin.FiveLakes.sln b/Supervisor.Plugin.FiveLakes.sln
index 2832ec8..658d2df 100644
--- a/Supervisor.Plugin.FiveLakes.sln
+++ b/Supervisor.Plugin.FiveLakes.sln
@@ -19,8 +19,8 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|Any CPU.ActiveCfg = Debug|x64
- {38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|Any CPU.Build.0 = Debug|x64
+ {38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|Any CPU.Build.0 = Debug|x86
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|x64.ActiveCfg = Debug|x64
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|x64.Build.0 = Debug|x64
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|x86.ActiveCfg = Debug|x86
diff --git a/Supervisor.Plugin.FiveLakes/Constants/ConstGen.vb b/Supervisor.Plugin.FiveLakes/Constants/ConstGen.vb
new file mode 100644
index 0000000..7cc6083
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Constants/ConstGen.vb
@@ -0,0 +1,66 @@
+'----------------------------------------------------------------------------
+' EgalTech 2015-2017
+'----------------------------------------------------------------------------
+' File : ConstGen.vb Data : 08.05.24 Versione : 2.6e1
+' Contenuto : Modulo costanti generali.
+'
+'
+'
+' Modifiche : 08.05.24 ES Creazione modulo.
+'
+'
+'----------------------------------------------------------------------------
+
+Public Module ConstGen
+
+ ' File con direttorio radice dei dati
+ Public Const DAT_FILE_NAME As String = "DataRoot.Ini"
+ Public Const S_DATA As String = "Data"
+ Public Const K_DATAROOT As String = "DataRoot"
+
+ '' File con dati di licenza
+ 'Public Const LIC_FILE_NAME As String = "EgtBEAMWALL.lic"
+ 'Public Const S_LICENCE As String = "Licence"
+ 'Public Const K_LOCKID As String = "LockId"
+ 'Public Const K_KEY As String = "Key"
+
+
+ ' Abilitazioni licenza
+ Public Enum KEY_OPT As UInteger
+ SUPERVISOR = 1
+ End Enum
+
+ ' Sottodirettorio di configurazione
+ Public Const CONF_DIR As String = "Config"
+ ' Sottodirettorio delle risorse
+ Public Const RES_DIR As String = "Resources"
+ ' Sottodirettorio script
+ Public Const SCRIPT_DIR As String = "Script"
+ ' Sottodirettorio temporaneo
+ Public Const TEMP_DIR As String = "Temp"
+ '' Sottodirettorio per Cam automatico
+ 'Public Const PROJS_DIR As String = "Projs"
+ '' Sottodirettorio per Csv automatico
+ 'Public Const PRODS_DIR As String = "Prods"
+ '' Sottodirettorio per Macro
+ 'Public Const MACRO_DIR As String = "Macro"
+ '' Sottodirettorio per Magazzino
+ 'Public Const WAREHOUSE_DIR As String = "Warehouse"
+ '' Sottodirettorio per lavorazioni travi
+ 'Public Const BEAM_DIR As String = "Beam"
+ '' Sottodirettorio per lavorazioni pareti
+ 'Public Const WALL_DIR As String = "Wall"
+ '' Sottodirettorio di default per il salvataggio con nome
+ 'Public Const SAVE_DFL_NAMEDIR As String = "MyProjects"
+ '' Sottodirettorio di default per le macchine
+ 'Public Const MACHINES_DFL_DIR As String = "Machines"
+ '' Sottodirettorio di default per toolmakers
+ 'Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers"
+ '' Nome file Lua con le funzioni di attrezzaggio
+ 'Public Const SETUP_LUA As String = "SetUp.lua"
+ '' Nome eseguibile per stampa
+ 'Public Const ZEBRAPRINTER_EXE As String = "ZebraPrinterUtilitiesD32.exe"
+ '' Sottodirettorio di default per macro
+ 'Public Const MACRO_DFL_DIR As String = "Macro"
+
+End Module
diff --git a/Supervisor.Plugin.FiveLakes/Constants/ConstIni.vb b/Supervisor.Plugin.FiveLakes/Constants/ConstIni.vb
new file mode 100644
index 0000000..79ab7d5
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Constants/ConstIni.vb
@@ -0,0 +1,26 @@
+'----------------------------------------------------------------------------
+' EgalTech 2015-2024
+'----------------------------------------------------------------------------
+' File : ConstIni.vb Data : 08.05.24 Versione : 2.6e1
+' Contenuto : Modulo costanti sezione e chiavi per file Ini.
+'
+'
+'
+' Modifiche : 08.05.24 ES Creazione modulo.
+'
+'
+'----------------------------------------------------------------------------
+Module ConstIni
+
+ Public Const INI_FILE_NAME As String = "Supervisor.Plugin.FiveLakes.ini"
+
+ Public Const S_GENERAL As String = "General"
+
+ Public Const S_CSV As String = "CSV"
+ Public Const K_DDFNAME As String = "DDFName"
+ Public Const K_QUANTITY As String = "Quantity"
+ Public Const K_HEIGHT As String = "Height"
+ Public Const K_WIDTH As String = "Width"
+ Public Const K_THICKNESS As String = "Thickness"
+
+End Module
diff --git a/Supervisor.Plugin.FiveLakes/DoorList/DoorListV.xaml b/Supervisor.Plugin.FiveLakes/DoorList/DoorListV.xaml
new file mode 100644
index 0000000..d252951
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/DoorList/DoorListV.xaml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Supervisor.Plugin.FiveLakes/DoorList/DoorListV.xaml.vb b/Supervisor.Plugin.FiveLakes/DoorList/DoorListV.xaml.vb
new file mode 100644
index 0000000..0350263
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/DoorList/DoorListV.xaml.vb
@@ -0,0 +1,3 @@
+Public Class DoorListV
+
+End Class
diff --git a/Supervisor.Plugin.FiveLakes/DoorList/DoorListVM.vb b/Supervisor.Plugin.FiveLakes/DoorList/DoorListVM.vb
new file mode 100644
index 0000000..0e975f3
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/DoorList/DoorListVM.vb
@@ -0,0 +1,365 @@
+Imports System.Collections.ObjectModel
+Imports System.IO
+
+Public Class DoorListVM
+
+ Private m_DoorList As New ObservableCollection(Of Door)
+ Public ReadOnly Property DoorList As ObservableCollection(Of Door)
+ Get
+ Return m_DoorList
+ End Get
+ End Property
+ Private m_SelDoor As Door
+ Public Property SelDoor As Door
+ Get
+ Return m_SelDoor
+ End Get
+ Set(value As Door)
+ m_SelDoor = value
+ End Set
+ End Property
+
+ ' Definizione comandi
+ Private m_cmdOpenCSV As ICommand
+ Private m_cmdSkipDoor As ICommand
+ Private m_cmdMoveUp As ICommand
+ Private m_cmdMoveDown As ICommand
+ Private m_cmdProduce As ICommand
+ Private m_cmdProduceAll As ICommand
+
+#Region "COMMANDS"
+
+#Region "OpenCSV"
+
+ Public ReadOnly Property OpenCSV_Command As ICommand
+ Get
+ If m_cmdOpenCSV Is Nothing Then
+ m_cmdOpenCSV = New Command(AddressOf OpenCSV)
+ End If
+ Return m_cmdOpenCSV
+ End Get
+ End Property
+
+ Public Sub OpenCSV()
+ Dim sDir As String = String.Empty
+ 'GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
+ Dim OpenFileDialog As New Microsoft.Win32.OpenFileDialog() With {
+ .DefaultExt = ".csv",
+ .Filter = "CSV (*.csv)|*.csv",
+ .InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
+ .CheckFileExists = True,
+ .ValidateNames = True}
+ If OpenFileDialog.ShowDialog() Then
+ Dim sCSVPath As String = OpenFileDialog.FileName
+ Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(sCSVPath)
+ MyReader.TextFieldType = FileIO.FieldType.Delimited
+ MyReader.SetDelimiters(";")
+ ' leggo intestazione
+ Dim Headers As String() = MyReader.ReadFields()
+ Dim sDDFName As String = ""
+ Dim sQuantityName As String = ""
+ Dim sHeightName As String = ""
+ Dim sWidthName As String = ""
+ Dim sThicknessName As String = ""
+ GetMainPrivateProfileString(S_CSV, K_DDFNAME, K_DDFNAME, sDDFName)
+ GetMainPrivateProfileString(S_CSV, K_QUANTITY, "", sQuantityName)
+ GetMainPrivateProfileString(S_CSV, K_HEIGHT, "", sHeightName)
+ GetMainPrivateProfileString(S_CSV, K_WIDTH, "", sWidthName)
+ GetMainPrivateProfileString(S_CSV, K_THICKNESS, "", sThicknessName)
+ Dim nDDFNameIndex As Integer = Array.IndexOf(Headers, sDDFName)
+ Dim nQuantityNameIndex As Integer = Array.IndexOf(Headers, sQuantityName)
+ Dim nHeightNameIndex As Integer = Array.IndexOf(Headers, sHeightName)
+ Dim nWidthNameIndex As Integer = Array.IndexOf(Headers, sWidthName)
+ Dim nThicknessNameIndex As Integer = Array.IndexOf(Headers, sThicknessName)
+ If nDDFNameIndex = -1 Then
+ Dim sMessage As String = "Error! DDFName column not found! Csv file will not be read!"
+ ' egtoutlog(sMessage)
+ MessageBox.Show(sMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
+ Return
+ End If
+ Dim Values As String()
+ Dim nLineIndex As Integer = 1
+ Dim sLineErrorList As String = ""
+ While Not MyReader.EndOfData
+ Try
+ Values = MyReader.ReadFields()
+ Dim nQuantity As Integer = 1
+ If nQuantityNameIndex >= 0 AndAlso nQuantityNameIndex < Values.Count Then
+ If Not Integer.TryParse(Values(nQuantityNameIndex), nQuantity) OrElse nQuantity < 1 Then
+ nQuantity = 1
+ Dim sLine As String = ""
+ For nValueIndex = 0 To Values.Count - 1
+ sLine &= Values(nValueIndex) & If(nValueIndex < Values.Count, ";", "")
+ Next
+ sLineErrorList &= "Quantity not readable in line " & sLine & ". This line will be skipped"
+ Continue While
+ End If
+ End If
+ Dim dWidth As Double = 0
+ If nWidthNameIndex >= 0 AndAlso nWidthNameIndex < Values.Count Then
+ If Not StringToDouble(Values(nWidthNameIndex), dWidth) OrElse dWidth < 0 Then
+ dWidth = 0
+ End If
+ End If
+ Dim dHeight As Double = 0
+ If nHeightNameIndex >= 0 AndAlso nHeightNameIndex < Values.Count Then
+ If Not StringToDouble(Values(nHeightNameIndex), dHeight) OrElse dHeight < 0 Then
+ dHeight = 0
+ End If
+ End If
+ Dim dThickness As Double = 0
+ If nThicknessNameIndex >= 0 AndAlso nThicknessNameIndex < Values.Count Then
+ If Not StringToDouble(Values(nThicknessNameIndex), dThickness) OrElse dThickness < 0 Then
+ dThickness = 0
+ End If
+ End If
+ Dim NewDoor As New Door(nLineIndex, Values(nDDFNameIndex), Path.GetFileName(sCSVPath),
+ nQuantity, dWidth, dHeight, dThickness, Headers, Values)
+ m_DoorList.Add(NewDoor)
+ nLineIndex += 1
+ Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
+ Dim sMessage As String = "Line " & ex.Message & "is not valid and will be skipped."
+ ' egtoutlog(sMessage)
+ sLineErrorList &= Environment.NewLine & ex.Message
+ End Try
+ End While
+ If Not String.IsNullOrWhiteSpace(sLineErrorList) Then
+ MessageBox.Show("The following lines are not valid and have been skipped:" & sLineErrorList, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
+ End If
+ End Using
+ End If
+ End Sub
+
+#End Region ' OpenCSV
+
+#Region "SkipDoor"
+
+ Public ReadOnly Property SkipDoor_Command As ICommand
+ Get
+ If m_cmdSkipDoor Is Nothing Then
+ m_cmdSkipDoor = New Command(AddressOf SkipDoor)
+ End If
+ Return m_cmdSkipDoor
+ End Get
+ End Property
+
+ Public Sub SkipDoor()
+ If IsNothing(SelDoor) OrElse SelDoor.nState <> Door.DoorStates.VERIFIED Then Return
+ SelDoor.SetState(Door.DoorStates.SKIPPED)
+ End Sub
+
+#End Region ' SkipDoor
+
+#Region "MoveUp"
+
+ Public ReadOnly Property MoveUp_Command As ICommand
+ Get
+ If m_cmdMoveUp Is Nothing Then
+ m_cmdMoveUp = New Command(AddressOf MoveUp)
+ End If
+ Return m_cmdMoveUp
+ End Get
+ End Property
+
+ Public Sub MoveUp()
+ If IsNothing(SelDoor) Then Return
+ Dim nOldIndex As Integer = m_DoorList.IndexOf(SelDoor)
+ If nOldIndex = 0 Then Return
+ If m_DoorList(nOldIndex - 1).nState >= Door.DoorStates.SENT_TO_PRODUCTION Then Return
+ m_DoorList.Move(nOldIndex, nOldIndex - 1)
+ End Sub
+
+#End Region ' MoveUp
+
+#Region "MoveDown"
+
+ Public ReadOnly Property MoveDown_Command As ICommand
+ Get
+ If m_cmdMoveDown Is Nothing Then
+ m_cmdMoveDown = New Command(AddressOf MoveDown)
+ End If
+ Return m_cmdMoveDown
+ End Get
+ End Property
+
+ Public Sub MoveDown()
+ If IsNothing(SelDoor) OrElse SelDoor.nState >= Door.DoorStates.SENT_TO_PRODUCTION Then Return
+ Dim nOldIndex As Integer = m_DoorList.IndexOf(SelDoor)
+ If nOldIndex = m_DoorList.Count - 1 Then Return
+ m_DoorList.Move(nOldIndex, nOldIndex + 1)
+ End Sub
+
+#End Region ' MoveDown
+
+#Region "Produce"
+
+ Public ReadOnly Property Produce_Command As ICommand
+ Get
+ If m_cmdProduce Is Nothing Then
+ m_cmdProduce = New Command(AddressOf Produce)
+ End If
+ Return m_cmdProduce
+ End Get
+ 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.SENT_TO_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.SENT_TO_PRODUCTION))
+ Dim nOldIndex As Integer = m_DoorList.IndexOf(SelDoor)
+
+ m_DoorList.Move(nOldIndex, nNewIndex)
+ SelDoor.SetState(Door.DoorStates.SENT_TO_PRODUCTION)
+ End Sub
+
+#End Region ' Produce
+
+#Region "ProduceAll"
+
+ Public ReadOnly Property ProduceAll_Command As ICommand
+ Get
+ If m_cmdProduceAll Is Nothing Then
+ m_cmdProduceAll = New Command(AddressOf ProduceAll)
+ End If
+ Return m_cmdProduceAll
+ End Get
+ End Property
+
+ Public Sub ProduceAll()
+ If IsNothing(SelDoor) Then Return
+ End Sub
+
+#End Region ' ProduceAll
+
+#End Region ' COMMANDS
+
+End Class
+
+Public Class Door
+ Inherits VMBase
+
+ Public Enum DoorStates As Integer
+ NULL = 0
+ LOADED_FROM_CSV = 1
+ VERIFIED = 10
+ VERIFICATION_FAILED = 11
+ SKIPPED = 20
+ SENT_TO_PRODUCTION = 30
+ IN_PRODUCTION = 31
+ PRODUCED = 32
+ SCRAP = 40
+ End Enum
+
+ Private m_nId As Integer
+ Public ReadOnly Property nId As Integer
+ Get
+ Return m_nId
+ End Get
+ End Property
+
+ Private m_nCSVLine As Integer
+ Public ReadOnly Property nCSVLine As Integer
+ Get
+ Return m_nCSVLine
+ End Get
+ End Property
+
+ Private m_sDDFName As String
+ Public ReadOnly Property sDDFName As String
+ Get
+ Return m_sDDFName
+ End Get
+ End Property
+
+ Private m_nQuantity As Integer
+ Public ReadOnly Property nQuantity As Integer
+ Get
+ Return m_nQuantity
+ End Get
+ End Property
+
+ Private m_dWidth As Double
+ Public ReadOnly Property dWidth As Double
+ Get
+ Return m_dWidth
+ End Get
+ End Property
+
+ Private m_dHeight As Double
+ Public ReadOnly Property dHeight As Double
+ Get
+ Return m_dHeight
+ End Get
+ End Property
+
+ Private m_dThickness As Double
+ Public ReadOnly Property dThickness As Double
+ Get
+ Return m_dThickness
+ End Get
+ End Property
+
+ Private m_sCSVName As String
+ Public ReadOnly Property sCSVName As String
+ Get
+ Return m_sCSVName
+ End Get
+ End Property
+
+ Private m_CustomerParameters As New List(Of CustomerParameter)
+ Public ReadOnly Property CustomerParameters As List(Of CustomerParameter)
+ Get
+ Return m_CustomerParameters
+ End Get
+ End Property
+
+ Private m_nState As DoorStates = DoorStates.LOADED_FROM_CSV
+ Public ReadOnly Property nState As DoorStates
+ Get
+ Return m_nState
+ End Get
+ End Property
+ Friend Sub SetState(value As DoorStates)
+ m_nState = value
+ NotifyPropertyChanged(NameOf(nState))
+ End Sub
+
+ Sub New(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_nCSVLine = nCSVLine
+ m_sDDFName = sDDFName
+ m_sCSVName = sCSVName
+ m_nQuantity = nQuantity
+ m_dHeight = dHeight
+ m_dWidth = dWidth
+ m_dThickness = dThickness
+ For nParamIndex = 0 To Math.Max(HeaderList.Count, ValueList.Count) - 1
+ m_CustomerParameters.Add(New CustomerParameter(If(HeaderList.Count > nParamIndex, HeaderList(nParamIndex), ""), If(ValueList.Count > nParamIndex, ValueList(nParamIndex), "")))
+ Next
+ End Sub
+
+End Class
+
+Public Class CustomerParameter
+
+ Private m_sHeader As String
+ Public ReadOnly Property sHeader As String
+ Get
+ Return m_sHeader
+ End Get
+ End Property
+
+ Private m_sValue As String
+ Public ReadOnly Property sValue As String
+ Get
+ Return m_sValue
+ End Get
+ End Property
+
+ Sub New(sHeader As String, sValue As String)
+ m_sHeader = sHeader
+ m_sValue = sValue
+ End Sub
+
+End Class
\ No newline at end of file
diff --git a/Supervisor.Plugin.FiveLakes/FiveLakesUI.xaml b/Supervisor.Plugin.FiveLakes/FiveLakesUI.xaml
index 25b5475..e346d6f 100644
--- a/Supervisor.Plugin.FiveLakes/FiveLakesUI.xaml
+++ b/Supervisor.Plugin.FiveLakes/FiveLakesUI.xaml
@@ -1,17 +1,18 @@
-
+
+
+
+
+
+
diff --git a/Supervisor.Plugin.FiveLakes/FiveLakesUI.xaml.vb b/Supervisor.Plugin.FiveLakes/FiveLakesUI.xaml.vb
index c338abf..cd676d2 100644
--- a/Supervisor.Plugin.FiveLakes/FiveLakesUI.xaml.vb
+++ b/Supervisor.Plugin.FiveLakes/FiveLakesUI.xaml.vb
@@ -3,7 +3,7 @@ Imports System.Text
Imports Supervisor.Plugin.Interface
-
+
Public Class FiveLakesUI
Implements IPluginControl
@@ -24,9 +24,9 @@ Public Class FiveLakesUI
AddHandler Me.Loaded, AddressOf FiveLakesUIV_Loaded
End Sub
- Private Sub Button1_Click(sender As Object, e As RoutedEventArgs) Handles Button1.Click
- 'TextBlockTest.Text = Host.PluginTestInfo
- End Sub
+ 'Private Sub Button1_Click(sender As Object, e As RoutedEventArgs) Handles Button1.Click
+ ' 'TextBlockTest.Text = Host.PluginTestInfo
+ 'End Sub
Private Sub FiveLakesUIV_Loaded(sender As Object, e As RoutedEventArgs)
m_FiveLakesUIVM.SetTextTest("Prova 1!!")
diff --git a/Supervisor.Plugin.FiveLakes/FiveLakesUIVM.vb b/Supervisor.Plugin.FiveLakes/FiveLakesUIVM.vb
index dc3f9db..c2440e8 100644
--- a/Supervisor.Plugin.FiveLakes/FiveLakesUIVM.vb
+++ b/Supervisor.Plugin.FiveLakes/FiveLakesUIVM.vb
@@ -1,6 +1,11 @@
Public Class FiveLakesUIVM
Inherits VMBase
+ Private m_sDataRoot As String
+ Private m_sConfigDir As String
+ Private m_sIniFile As String
+ Private m_sResourcesRoot As String
+
Private m_TextTest As String
Public ReadOnly Property TextTest As String
Get
@@ -12,5 +17,19 @@
NotifyPropertyChanged(NameOf(TextTest))
End Sub
+ Sub New()
+ ' Impostazione path radice per i dati
+ m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
+ 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"
+ ' Impostazione direttorio di configurazione
+ m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
+ ' Impostazione path Ini file
+ IniFile.SetIniFile(m_sConfigDir & "\" & INI_FILE_NAME)
+ ' Impostazione path resources dir
+ m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
+ End Sub
End Class
diff --git a/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuV.xaml b/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuV.xaml
new file mode 100644
index 0000000..59bde0d
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuV.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuV.xaml.vb b/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuV.xaml.vb
new file mode 100644
index 0000000..4a7f609
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuV.xaml.vb
@@ -0,0 +1,10 @@
+Imports System.ComponentModel.Composition
+Imports Supervisor.Plugin.Interface
+
+
+
+Public Class MainMenuV
+ Implements IPluginControl
+
+
+End Class
diff --git a/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuVM.vb b/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuVM.vb
new file mode 100644
index 0000000..b468f09
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/MainMenu/MainMenuVM.vb
@@ -0,0 +1,29 @@
+Public Class MainMenuVM
+
+ ' Definizione comandi
+ Private m_cmdDoorList As ICommand
+ Private m_cmdMachineStatus As ICommand
+ Private m_cmdStatistics As ICommand
+
+#Region "COMMANDS"
+
+#Region "DoorList"
+
+ Public ReadOnly Property DoorList_Command As ICommand
+ Get
+ If m_cmdDoorList Is Nothing Then
+ m_cmdDoorList = New Command(AddressOf DoorList)
+ End If
+ Return m_cmdDoorList
+ End Get
+ End Property
+
+ Public Sub DoorList()
+
+ End Sub
+
+#End Region ' DoorList
+
+#End Region ' COMMANDS
+
+End Class
diff --git a/Supervisor.Plugin.FiveLakes/Supervisor.Plugin.FiveLakes - Copy.vbproj b/Supervisor.Plugin.FiveLakes/Supervisor.Plugin.FiveLakes - Copy.vbproj
new file mode 100644
index 0000000..9ac1e71
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Supervisor.Plugin.FiveLakes - Copy.vbproj
@@ -0,0 +1,155 @@
+
+
+
+ Debug
+ AnyCPU
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
+ Supervisor.Plugin.FiveLakes
+ Supervisor.Plugin.FiveLakes
+ Library
+ v4.7.2
+ Custom
+ true
+ {7C77F537-8235-40AB-B24A-4E71CFB96D2C}
+
+
+ true
+ full
+ true
+ true
+ true
+ bin\Debug\
+ Supervisor.Plugin.FiveLakes.xml
+ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314
+
+
+ pdbonly
+ false
+ false
+ true
+ false
+ true
+ bin\Release\
+ Supervisor.Plugin.FiveLakes.xml
+ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314
+
+
+ On
+
+
+ Binary
+
+
+ Off
+
+
+ On
+
+
+
+ ..\..\..\EgtProg\DllD32\EgtWPFLib48.dll
+
+
+ ..\..\Supervisor\Supervisor.Plugin.Interface\bin\Debug\Supervisor.Plugin.Interface.dll
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DoorListV.xaml
+
+
+
+ FiveLakesUI.xaml
+
+
+
+ MainMenuV.xaml
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+ VbMyResourcesResXFileCodeGenerator
+ Resources.Designer.vb
+ My.Resources
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.vb
+
+
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+
+ powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)
+
+
+ copy $(TargetPath) c:\EgtData\Supervisor\Plugin\Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.dll
+
+
+
\ No newline at end of file
diff --git a/Supervisor.Plugin.FiveLakes/Supervisor.Plugin.FiveLakes.vbproj b/Supervisor.Plugin.FiveLakes/Supervisor.Plugin.FiveLakes.vbproj
index 9507157..4e4d834 100644
--- a/Supervisor.Plugin.FiveLakes/Supervisor.Plugin.FiveLakes.vbproj
+++ b/Supervisor.Plugin.FiveLakes/Supervisor.Plugin.FiveLakes.vbproj
@@ -46,6 +46,9 @@
On
+
+ ..\..\..\EgtProg\DllD32\EgtWPFLib48.dll
+ ..\..\Supervisor\Supervisor.Plugin.Interface\bin\Debug\Supervisor.Plugin.Interface.dll
@@ -84,10 +87,23 @@
+
+
+
+ DoorListV.xaml
+
+ FiveLakesUI.xaml
+
+ MainMenuV.xaml
+
+
+
+ Dictionary.xaml
+ Code
@@ -101,6 +117,10 @@
Settings.settingsTrue
+
+
+
+ VbMyResourcesResXFileCodeGenerator
@@ -113,13 +133,30 @@
+
+ Designer
+ MSBuild:Compile
+ DesignerMSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+ powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)
+
+ copy $(TargetPath) c:\EgtData\Supervisor\Plugin\Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.dll
+
+
\ No newline at end of file
diff --git a/Supervisor.Plugin.FiveLakes/Utility/Command.vb b/Supervisor.Plugin.FiveLakes/Utility/Command.vb
new file mode 100644
index 0000000..f9e3baf
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Utility/Command.vb
@@ -0,0 +1,69 @@
+
+'''
+''' A command whose sole purpose is to
+''' relay its functionality to other
+''' objects by invoking delegates. The
+''' default return value for the CanExecute
+''' method is 'true'.
+'''
+Public Class Command
+ Implements ICommand
+
+#Region "Fields"
+
+ Private ReadOnly _execute As Action(Of Object)
+ Private ReadOnly _canExecute As Predicate(Of Object)
+
+#End Region ' Fields
+
+#Region "Constructors"
+
+ '''
+ ''' Creates a new command that can always execute.
+ '''
+ ''' The execution logic.
+ Public Sub New(ByVal execute As Action(Of Object))
+ Me.New(execute, Nothing)
+ End Sub
+
+ '''
+ ''' Creates a new command.
+ '''
+ ''' The execution logic.
+ ''' The execution status logic.
+ Public Sub New(ByVal execute As Action(Of Object), ByVal canExecute As Predicate(Of Object))
+ If execute Is Nothing Then
+ Throw New ArgumentNullException("execute")
+ End If
+
+ _execute = execute
+ _canExecute = canExecute
+ End Sub
+
+#End Region ' Constructors
+
+#Region "ICommand Members"
+
+ _
+ Public Function CanExecute(ByVal parameter As Object) As Boolean Implements ICommand.CanExecute
+ Return If(_canExecute Is Nothing, True, _canExecute(parameter))
+ End Function
+
+ Public Custom Event CanExecuteChanged As EventHandler Implements ICommand.CanExecuteChanged
+ AddHandler(ByVal value As EventHandler)
+ AddHandler CommandManager.RequerySuggested, value
+ End AddHandler
+ RemoveHandler(ByVal value As EventHandler)
+ RemoveHandler CommandManager.RequerySuggested, value
+ End RemoveHandler
+ RaiseEvent(ByVal sender As System.Object, ByVal e As System.EventArgs)
+ End RaiseEvent
+ End Event
+
+ Public Sub Execute(ByVal parameter As Object) Implements ICommand.Execute
+ _execute(parameter)
+ End Sub
+
+#End Region ' ICommand Members
+
+End Class
\ No newline at end of file
diff --git a/Supervisor.Plugin.FiveLakes/Utility/Dictionary.xaml b/Supervisor.Plugin.FiveLakes/Utility/Dictionary.xaml
new file mode 100644
index 0000000..460d80f
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Utility/Dictionary.xaml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+ 30
+ 2
+ 2
+
+
diff --git a/Supervisor.Plugin.FiveLakes/Utility/Dictionary.xaml.vb b/Supervisor.Plugin.FiveLakes/Utility/Dictionary.xaml.vb
new file mode 100644
index 0000000..e5471f0
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Utility/Dictionary.xaml.vb
@@ -0,0 +1,108 @@
+Imports System.ComponentModel.Composition
+Imports System.Globalization
+Imports Supervisor.Plugin.Interface
+
+
+
+Public Class Dictionary
+ Inherits ResourceDictionary
+ Implements IPluginControl
+
+ Public Shared ReadOnly MySceneHostVM As String = "MySceneHostVM"
+
+#Region "Colors"
+
+ 'Private m_Omag_Red As SolidColorBrush = Brushes.Red
+ 'Public ReadOnly Property Omag_Red As SolidColorBrush
+ ' Get
+ ' Return m_Omag_Red
+ ' End Get
+ 'End Property
+
+ 'Private Shared m_Button_Static_Background As SolidColorBrush = New BrushConverter().ConvertFrom("#FFDDDDDD")
+ 'Public Shared ReadOnly Property Button_Static_Background As SolidColorBrush
+ ' Get
+ ' Return m_Button_Static_Background
+ ' End Get
+ 'End Property
+
+ 'Private Shared m_TabControl_Header_Background As LinearGradientBrush = Application.Current.FindResource("TabItem.Static.Background")
+ 'Public Shared ReadOnly Property TabControl_Header_Background As LinearGradientBrush
+ ' Get
+ ' Return m_TabControl_Header_Background
+ ' End Get
+ 'End Property
+
+
+ 'Private Shared m_Icarus_Gray As SolidColorBrush = Application.Current.FindResource("Icarus_Gray")
+ 'Public Shared ReadOnly Property Icarus_Gray As SolidColorBrush
+ ' Get
+ ' Return m_Icarus_Gray
+ ' End Get
+ 'End Property
+
+ 'Private Shared m_Icarus_LightBlue As SolidColorBrush = Application.Current.FindResource("Icarus_LightBlue")
+ 'Public Shared ReadOnly Property Icarus_LightBlue As SolidColorBrush
+ ' Get
+ ' Return m_Icarus_LightBlue
+ ' End Get
+ 'End Property
+
+ 'Private Shared m_Icarus_Blue As SolidColorBrush = Application.Current.FindResource("Icarus_Blue")
+ 'Public Shared ReadOnly Property Icarus_Blue As SolidColorBrush
+ ' Get
+ ' Return m_Icarus_Blue
+ ' End Get
+ 'End Property
+
+ 'Private Shared m_Icarus_Green As SolidColorBrush = Application.Current.FindResource("Icarus_Green")
+ 'Public Shared ReadOnly Property Icarus_Green As SolidColorBrush
+ ' Get
+ ' Return m_Icarus_Green
+ ' End Get
+ 'End Property
+
+ 'Private Shared m_Icarus_Orange As SolidColorBrush = Application.Current.FindResource("Icarus_Orange")
+ 'Public Shared ReadOnly Property Icarus_Orange As SolidColorBrush
+ ' Get
+ ' Return m_Icarus_Orange
+ ' End Get
+ 'End Property
+
+ 'Private Shared m_Icarus_Purple As SolidColorBrush = Application.Current.FindResource("Icarus_Purple")
+ 'Public Shared ReadOnly Property Icarus_Purple As SolidColorBrush
+ ' Get
+ ' Return m_Icarus_Purple
+ ' End Get
+ 'End Property
+
+ '
+ '
+ '
+ '
+ '
+ '
+
+#End Region ' Colors
+
+End Class
+
+Public Class CenterToolTipConverter
+ Implements IMultiValueConverter
+
+ Public Function Convert(ByVal values As Object(), ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
+ For Each value In values
+ If TypeOf (value) IsNot Double Then
+ Return Double.NaN
+ End If
+ Next
+ Dim dPlacementTarget As Double = CDbl(values(0))
+ Dim dToolTip As Double = CDbl(values(1))
+ Return (dPlacementTarget / 2.0) - (dToolTip / 2.0)
+ End Function
+
+ Public Function ConvertBack(ByVal value As Object, ByVal targetTypes As Type(), ByVal parameter As Object, ByVal culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
+ Throw New NotSupportedException()
+ End Function
+
+End Class
diff --git a/Supervisor.Plugin.FiveLakes/Utility/GenInterface.vb b/Supervisor.Plugin.FiveLakes/Utility/GenInterface.vb
new file mode 100644
index 0000000..f7bf24d
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Utility/GenInterface.vb
@@ -0,0 +1,76 @@
+Imports System.Globalization
+Imports System.Runtime.InteropServices
+Imports System.Text
+
+Public Module GenInterface
+
+ '-------------------------------- IniFile : Get --------------------------------------------------
+
+ Public Function GetPrivateProfileInt(
+ lpAppName As String,
+ lpKeyName As String,
+ nDefault As Integer,
+ lpFileName As String) As Integer
+ End Function
+
+ Public Function GetPrivateProfileDouble(
+ lpAppName As String,
+ lpKeyName As String,
+ dDefault As Double,
+ lpFileName As String) As Double
+ Dim sValue As String = String.Empty
+ GetPrivateProfileString(lpAppName, lpKeyName, dDefault.ToString(), sValue, lpFileName)
+ Dim nPos As Integer = sValue.IndexOf(";")
+ If nPos >= 0 Then
+ sValue = sValue.Remove(nPos)
+ End If
+ Dim dValue As Double
+ If Not Double.TryParse(sValue, NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, dValue) Then
+ dValue = dDefault
+ End If
+ Return dValue
+ End Function
+
+
+ Private Function GetPrivateProfileString(
+ lpAppName As String,
+ lpKeyName As String,
+ lpDefault As String,
+ lpReturnedString As StringBuilder,
+ nSize As Integer,
+ lpFileName As String) As Integer
+ End Function
+ Public Function GetPrivateProfileString(
+ lpAppName As String,
+ lpKeyName As String,
+ lpDefault As String,
+ ByRef lpString As String,
+ lpFileName As String) As Integer
+ Dim sb As New StringBuilder(1024)
+ Dim nRet As Integer = GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, sb, sb.Capacity, lpFileName)
+ lpString = sb.ToString
+ Return nRet
+ End Function
+
+ '-------------------------------- IniFile : Write ------------------------------------------------
+
+ Public Function WritePrivateProfileString(
+ lpAppName As String,
+ lpKeyName As String,
+ lpString As String,
+ lpFileName As String) As Boolean
+ End Function
+
+ '-------------------------------- Windows --------------------------------------------------------
+ Public Enum SW As Integer
+ HIDE = 0
+ SHOWMAXIMIZED = 3
+ RESTORE = 9
+ End Enum
+
+
+ Public Function ShowWindow(hWnd As IntPtr, nCmdShow As Integer) As Boolean
+ End Function
+
+
+End Module
diff --git a/Supervisor.Plugin.FiveLakes/Utility/IniFile.vb b/Supervisor.Plugin.FiveLakes/Utility/IniFile.vb
new file mode 100644
index 0000000..af88ace
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Utility/IniFile.vb
@@ -0,0 +1,65 @@
+'----------------------------------------------------------------------------
+' EgalTech 2017-2017
+'----------------------------------------------------------------------------
+' File : IniFile.vb Data : 08.05.24 Versione : 2.6e1
+' Contenuto : Modulo IniFile per gestione lettura/scrittura da file INI.
+'
+'
+'
+' Modifiche : 08.05.24 ES Creazione modulo.
+'
+'
+'----------------------------------------------------------------------------
+
+
+Imports System.Collections.ObjectModel
+
+Public Module IniFile
+
+ Private m_sPath As String
+ Public ReadOnly Property sPath As String
+ Get
+ Return m_sPath
+ End Get
+ End Property
+ Friend Sub SetIniFile(sPath)
+ m_sPath = sPath
+ End Sub
+
+ Public Function GetMainPrivateProfileInt(IpAppName As String, IpKeyName As String, nDefault As Integer) As Integer
+ Return GetPrivateProfileInt(IpAppName, IpKeyName, nDefault, m_sPath)
+ End Function
+
+ Public Function GetMainPrivateProfileDouble(IpAppName As String, IpKeyName As String, dDefault As Double) As Double
+ Return GetPrivateProfileDouble(IpAppName, IpKeyName, dDefault, m_sPath)
+ End Function
+
+ Public Function GetMainPrivateProfileString(IpAppName As String, IpKeyName As String, IpDefault As String, ByRef IpString As String) As Integer
+ Return GetPrivateProfileString(IpAppName, IpKeyName, IpDefault, IpString, m_sPath)
+ End Function
+
+ 'Public Function GetPrivateProfileLanguage(lpAppName As String, lpKeyName As String, lpFileName As String) As Language
+ ' Dim sVal As String = String.Empty
+ ' GetPrivateProfileString(lpAppName, lpKeyName, "", sVal, lpFileName)
+ ' Dim sItems() As String = sVal.Split(",".ToCharArray)
+ ' If sItems.Count() = 2 Then
+ ' Return New Language(sItems(0), sItems(1))
+ ' End If
+ ' Return Nothing
+ 'End Function
+
+ 'Public Function GetMainPrivateProfileLanguage(lpAppName As String, lpKeyName As String) As Language
+ ' Dim sVal As String = String.Empty
+ ' GetMainPrivateProfileString(lpAppName, lpKeyName, "", sVal)
+ ' Dim sItems() As String = sVal.Split(",".ToCharArray)
+ ' If sItems.Count() = 2 Then
+ ' Return New Language(sItems(0), sItems(1))
+ ' End If
+ ' Return Nothing
+ 'End Function
+
+ Public Function WriteMainPrivateProfileString(IpAppName As String, IpKeyName As String, ByRef IpString As String) As Boolean
+ Return WritePrivateProfileString(IpAppName, IpKeyName, IpString, m_sPath)
+ End Function
+
+End Module
diff --git a/Supervisor.Plugin.FiveLakes/Utility/Map.vb b/Supervisor.Plugin.FiveLakes/Utility/Map.vb
new file mode 100644
index 0000000..f00f69c
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Utility/Map.vb
@@ -0,0 +1,443 @@
+Imports EgtWPFLib5
+
+Module Map
+
+ Private m_refMainWindowVM As MainWindowVM
+ Private m_refMyStatusBarVM As MyStatusBarVM
+ Private m_refProjManagerVM As ProjManagerVM
+ Private m_refProjectVM As ProjectVM
+ Private m_refSecondaryWindowVM As SecondaryWindowVM
+ Private m_refSecondaryWindowV As SecondaryWindowV
+ Private m_refMachinePanelVM As MachinePanelVM
+ Private m_refLeftPanelVM As LeftPanelVM
+ Private m_refRightPanelVM As RightPanelVM
+ Private m_refDispositionPanelVM As DispositionPanelVM
+ Private m_refStartMachPanelVM As StartMachPanelVM
+ Private m_refRibPanelVM As RibPanelVM
+ Private m_refControllerInputPanelVM As ControllerInputPanelVM
+ Private m_refInstrumentPanelVM As InstrumentPanelVM
+ Private m_refTopPanelVM As TopPanelVM
+ Private m_refSliceManagerVM As SliceManagerVM
+ Private m_refTFSEditorVM As TFSEditorVM
+ Private m_refCurrMachiningPanelVM As CurrMachiningPanelVM
+ Private m_refMachiningDbVM As MachiningDbVM
+ Private m_refMaterialDbVM As MaterialDbVM
+ Private m_refSliderManagerVM As SliderManagerVM
+ Private m_refRibParamPanelVM As RibParamPanelVM
+ Private m_refSimulationPanelVM As SimulationPanelVM
+ Private m_refReferencePanelVM As ReferencePanelVM
+ Private m_refViewLayerManagerVM As ViewLayerManagerVM
+ Private m_refShellNumberPanelVM As ShellNumberPanelVM
+ Private m_refShellNumberParamPanelVM As ShellNumberParamPanelVM
+ Private m_refFilledSolidPanelVM As FilledSolidPanelVM
+ Private m_refFilledSolidParamPanelVM As FilledSolidParamPanelVM
+ Private m_refSplashScreen As SplashScreen
+ Private m_refManagePartPanelVM As ManagePartPanelVM
+ Private m_refMachineViewPanelVM As MachineViewPanelVM
+ Private m_refImportLoadingWndVM As ImportLoadingWndVM
+
+#Region "Get"
+
+ Public ReadOnly Property refMainWindowVM As MainWindowVM
+ Get
+ Return m_refMainWindowVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refMyStatusBarVM As MyStatusBarVM
+ Get
+ Return LibMap.refStatusBarVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refProjManagerVM As ProjManagerVM
+ Get
+ Return m_refProjManagerVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refProjectVM As ProjectVM
+ Get
+ Return m_refProjectVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refSceneHostVM As MySceneHostVM
+ Get
+ Return LibMap.refSceneHostVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refSecondaryWindowVM As SecondaryWindowVM
+ Get
+ Return m_refSecondaryWindowVM
+ End Get
+ End Property
+ Public ReadOnly Property refSecondaryWindowV As SecondaryWindowV
+ Get
+ Return m_refSecondaryWindowV
+ End Get
+ End Property
+
+ Public ReadOnly Property refShowPanelVM As ShowPanelVM
+ Get
+ Return LibMap.refShowPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refMachinePanelVM As MachinePanelVM
+ Get
+ Return m_refMachinePanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refLeftPanelVM As LeftPanelVM
+ Get
+ Return m_refLeftPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refRightPanelVM As RightPanelVM
+ Get
+ Return m_refRightPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refDispositionPanelVM As DispositionPanelVM
+ Get
+ Return m_refDispositionPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refStartMachPanelVM As StartMachPanelVM
+ Get
+ Return m_refStartMachPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refRibPanelVM As RibPanelVM
+ Get
+ Return m_refRibPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refControllerInputPanelVM As ControllerInputPanelVM
+ Get
+ Return m_refControllerInputPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refInstrumentPanelVM As MyInstrumentPanelVM
+ Get
+ Return m_refInstrumentPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refTopPanelVM As TopPanelVM
+ Get
+ Return m_refTopPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refSliceManagerVM As SliceManagerVM
+ Get
+ Return m_refSliceManagerVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refTFSEditorVM As TFSEditorVM
+ Get
+ Return m_refTFSEditorVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refCurrMachiningPanelVM As CurrMachiningPanelVM
+ Get
+ Return m_refCurrMachiningPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refMachiningDbVM As MachiningDbVM
+ Get
+ Return m_refMachiningDbVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refMaterialDbVM As MaterialDbVM
+ Get
+ Return m_refMaterialDbVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refSliderManagerVM As SliderManagerVM
+ Get
+ Return m_refSliderManagerVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refRibParamPanelVM As RibParamPanelVM
+ Get
+ Return m_refRibParamPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refSimulationPanelVM As SimulationPanelVM
+ Get
+ Return m_refSimulationPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refReferencePanelVM As ReferencePanelVM
+ Get
+ Return m_refReferencePanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refViewLayerManagerVM As ViewLayerManagerVM
+ Get
+ Return m_refViewLayerManagerVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refShellNumberPanelVM As ShellNumberPanelVM
+ Get
+ Return m_refShellNumberPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refShellNumberParamPanelVM As ShellNumberParamPanelVM
+ Get
+ Return m_refShellNumberParamPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refFilledSolidPanelVM As FilledSolidPanelVM
+ Get
+ Return m_refFilledSolidPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refFilledSolidParamPanelVM As FilledSolidParamPanelVM
+ Get
+ Return m_refFilledSolidParamPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refSplashScreen As SplashScreen
+ Get
+ Return m_refSplashScreen
+ End Get
+ End Property
+
+ Public ReadOnly Property refManagePartPanelVM As ManagePartPanelVM
+ Get
+ Return m_refManagePartPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refMachineViewPanelVM As MachineViewPanelVM
+ Get
+ Return m_refMachineViewPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refImportLoadingWndVM As ImportLoadingWndVM
+ Get
+ Return m_refImportLoadingWndVM
+ End Get
+ End Property
+
+#End Region ' Get
+
+#Region "Set"
+
+ Friend Function SetRefMyStatusBarVM(MyStatusBarVM As MyStatusBarVM) As Boolean
+ LibMap.SetRefStatusBarVM(MyStatusBarVM)
+ Return Not IsNothing(LibMap.refStatusBarVM)
+ End Function
+
+ Friend Function SetRefProjManagerVM(ProjManagerVM As ProjManagerVM) As Boolean
+ m_refProjManagerVM = ProjManagerVM
+ Return Not IsNothing(m_refProjManagerVM)
+ End Function
+
+ Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
+ m_refProjectVM = ProjectVM
+ Return Not IsNothing(m_refProjectVM)
+ End Function
+
+ Friend Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
+ LibMap.SetRefSceneHostVM(SceneHostVM)
+ Return Not IsNothing(LibMap.refSceneHostVM)
+ End Function
+
+ Friend Function SetRefSecondaryWindowVM(SecondaryWindowVM As SecondaryWindowVM) As Boolean
+ m_refSecondaryWindowVM = SecondaryWindowVM
+ Return Not IsNothing(m_refSecondaryWindowVM)
+ End Function
+ Friend Function SetRefSecondaryWindowV(SecondaryWindowV As SecondaryWindowV) As Boolean
+ m_refSecondaryWindowV = SecondaryWindowV
+ Return Not IsNothing(m_refSecondaryWindowV)
+ End Function
+
+ Friend Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
+ m_refMachinePanelVM = MachinePanelVM
+ Return Not IsNothing(m_refMachinePanelVM)
+ End Function
+
+ Friend Function SetRefLeftPanelVM(LeftPanelVM As LeftPanelVM) As Boolean
+ m_refLeftPanelVM = LeftPanelVM
+ Return Not IsNothing(m_refLeftPanelVM)
+ End Function
+
+ Friend Function SetRefRightPanelVM(RightPanelVM As RightPanelVM) As Boolean
+ m_refRightPanelVM = RightPanelVM
+ Return Not IsNothing(m_refRightPanelVM)
+ End Function
+
+ Friend Function SetRefDispositionPanelVM(DispositionPanelVM As DispositionPanelVM) As Boolean
+ m_refDispositionPanelVM = DispositionPanelVM
+ Return Not IsNothing(m_refDispositionPanelVM)
+ End Function
+
+ Friend Function SetRefStartMachPanelVM(StartMachPanelVM As StartMachPanelVM) As Boolean
+ m_refStartMachPanelVM = StartMachPanelVM
+ Return Not IsNothing(m_refStartMachPanelVM)
+ End Function
+
+ Friend Function SetRefRibPanelVM(RibPanelVM As RibPanelVM) As Boolean
+ m_refRibPanelVM = RibPanelVM
+ Return Not IsNothing(m_refRibPanelVM)
+ End Function
+
+ Friend Function SetRefControllerInputPanelVM(ControllerInputPanelVM As ControllerInputPanelVM) As Boolean
+ m_refControllerInputPanelVM = ControllerInputPanelVM
+ Return Not IsNothing(m_refControllerInputPanelVM)
+ End Function
+
+ Friend Function SetRefInstrumentPanelVM(InstrumentPanelVM As InstrumentPanelVM) As Boolean
+ m_refInstrumentPanelVM = InstrumentPanelVM
+ Return Not IsNothing(m_refInstrumentPanelVM)
+ End Function
+
+ Friend Function SetRefTopPanelVM(TopPanelVM As TopPanelVM) As Boolean
+ m_refTopPanelVM = TopPanelVM
+ Return Not IsNothing(m_refTopPanelVM)
+ End Function
+
+ Friend Function SetRefSliceManagerVM(SliceManagerVM As SliceManagerVM) As Boolean
+ m_refSliceManagerVM = SliceManagerVM
+ Return Not IsNothing(m_refSliceManagerVM)
+ End Function
+
+ Friend Function SetRefTFSEditorVM(TFSEditorVM As TFSEditorVM) As Boolean
+ m_refTFSEditorVM = TFSEditorVM
+ Return Not IsNothing(m_refTFSEditorVM)
+ End Function
+
+ Friend Function SetRefCurrMachiningPanelVM(CurrMachiningPanelVM As CurrMachiningPanelVM) As Boolean
+ m_refCurrMachiningPanelVM = CurrMachiningPanelVM
+ Return Not IsNothing(m_refCurrMachiningPanelVM)
+ End Function
+
+ Friend Function SetRefMachiningDbVM(MachiningDbVM As MachiningDbVM) As Boolean
+ m_refMachiningDbVM = MachiningDbVM
+ Return Not IsNothing(m_refMachiningDbVM)
+ End Function
+
+ Friend Function SetRefMaterialDbVM(MaterialDbVM As MaterialDbVM) As Boolean
+ m_refMaterialDbVM = MaterialDbVM
+ Return Not IsNothing(m_refMaterialDbVM)
+ End Function
+
+ Friend Function SetRefSliderManagerVM(SliderManagerVM As SliderManagerVM) As Boolean
+ m_refSliderManagerVM = SliderManagerVM
+ Return Not IsNothing(m_refSliderManagerVM)
+ End Function
+
+ Friend Function SetRefRibParamPanelVM(RibParamPanelVM As RibParamPanelVM) As Boolean
+ m_refRibParamPanelVM = RibParamPanelVM
+ Return Not IsNothing(m_refRibParamPanelVM)
+ End Function
+
+ Friend Function SetRefSimulationPanelVM(SimulationPanelVM As SimulationPanelVM) As Boolean
+ m_refSimulationPanelVM = SimulationPanelVM
+ Return Not IsNothing(m_refSimulationPanelVM)
+ End Function
+
+ Friend Function SetRefReferencePanelVM(ReferencePanelVM As ReferencePanelVM) As Boolean
+ m_refReferencePanelVM = ReferencePanelVM
+ Return Not IsNothing(m_refReferencePanelVM)
+ End Function
+
+ Friend Function SetRefViewLayerManagerVM(ViewLayerManagerVM As ViewLayerManagerVM) As Boolean
+ m_refViewLayerManagerVM = ViewLayerManagerVM
+ Return Not IsNothing(m_refViewLayerManagerVM)
+ End Function
+
+ Friend Function SetRefShellNumberPanelVM(ShellNumberPanelVM As ShellNumberPanelVM) As Boolean
+ m_refShellNumberPanelVM = ShellNumberPanelVM
+ Return Not IsNothing(m_refShellNumberPanelVM)
+ End Function
+
+ Friend Function SetRefShellNumberParamPanelVM(ShellNumberParamPanelVM As ShellNumberParamPanelVM) As Boolean
+ m_refShellNumberParamPanelVM = ShellNumberParamPanelVM
+ Return Not IsNothing(m_refShellNumberParamPanelVM)
+ End Function
+
+ Friend Function SetRefFilledSolidPanelVM(FilledSolidPanelVM As FilledSolidPanelVM) As Boolean
+ m_refFilledSolidPanelVM = FilledSolidPanelVM
+ Return Not IsNothing(m_refFilledSolidPanelVM)
+ End Function
+
+ Friend Function SetRefFilledSolidParamPanelVM(FilledSolidParamPanelVM As FilledSolidParamPanelVM) As Boolean
+ m_refFilledSolidParamPanelVM = FilledSolidParamPanelVM
+ Return Not IsNothing(m_refFilledSolidParamPanelVM)
+ End Function
+
+ Friend Function SetRefSplashScreen(SplashScreen As SplashScreen) As Boolean
+ m_refSplashScreen = SplashScreen
+ Return Not IsNothing(m_refSplashScreen)
+ End Function
+
+ Friend Function SetRefManagePartPanelVM(ManagePartPanelVM As ManagePartPanelVM) As Boolean
+ m_refManagePartPanelVM = ManagePartPanelVM
+ Return Not IsNothing(m_refManagePartPanelVM)
+ End Function
+
+ Friend Function SetRefMachineViewPanelVM(MachineViewPanelVM As MachineViewPanelVM) As Boolean
+ m_refMachineViewPanelVM = MachineViewPanelVM
+ Return Not IsNothing(m_refMachineViewPanelVM)
+ End Function
+
+ Friend Function SetRefImportLoadingWndVM(ImportLoadingWndVM As ImportLoadingWndVM) As Boolean
+ m_refImportLoadingWndVM = ImportLoadingWndVM
+ Return Not IsNothing(m_refImportLoadingWndVM)
+ End Function
+
+#End Region ' Set
+
+#Region "Init"
+
+ Friend Function BeginInit(MainWindowVM As MainWindowVM) As Boolean
+ m_refMainWindowVM = MainWindowVM
+ Return Not IsNothing(m_refMainWindowVM)
+ End Function
+ Friend Function EndInit() As Boolean
+ ' Verifico se tutti i pezzi necessari sono stati caricati
+ 'Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(m_refProjectVM) AndAlso
+ ' Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refProjectManagerVM) AndAlso
+ ' Not IsNothing(LibMap.refSceneHostVM) AndAlso Not IsNothing(LibMap.refShowPanelVM) AndAlso
+ ' Not IsNothing(m_refVeinMatchPanelVM) AndAlso
+ ' Not IsNothing(m_refOptionPanelVM) AndAlso Not IsNothing(m_refRawPartTabVM) AndAlso
+ ' Not IsNothing(m_refNestingTabVM) AndAlso Not IsNothing(m_refSimulTabVM) AndAlso
+ ' Not IsNothing(m_refMachiningTabVM) AndAlso
+ ' LibMap.EndInit()
+ Return Not IsNothing(m_refMainWindowVM) AndAlso
+ Not IsNothing(LibMap.refStatusBarVM) AndAlso
+ LibMap.EndInit()
+ End Function
+
+#End Region ' Init
+
+End Module
diff --git a/Supervisor.Plugin.FiveLakes/Utility/StringConversion.vb b/Supervisor.Plugin.FiveLakes/Utility/StringConversion.vb
new file mode 100644
index 0000000..0a07106
--- /dev/null
+++ b/Supervisor.Plugin.FiveLakes/Utility/StringConversion.vb
@@ -0,0 +1,66 @@
+Imports System.Globalization
+
+Public Module StringConversion
+
+ Public Function DoubleToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
+ Dim sFormat As String = "F" + Math.Abs(nNumDec).ToString()
+ Dim sVal As String = dVal.ToString(sFormat, CultureInfo.InvariantCulture)
+ If nNumDec > 0 Then
+ Return sVal.TrimEnd("0".ToCharArray()).TrimEnd(".".ToCharArray)
+ Else
+ Return sVal
+ End If
+ End Function
+
+ Public Function StringToDouble(ByVal sVal As String, ByRef dVal As Double) As Boolean
+ ' Return EgtLuaEvalNumExpr(sVal, dVal)
+ Return Double.TryParse(sVal, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, dVal)
+ End Function
+
+ 'Public Function StringToDoubleAdv(ByVal sVal As String, ByRef dVal As Double, Optional bEval As Boolean = False) As Boolean
+ ' If bEval Then
+ ' Return EgtLuaEvalNumExpr(sVal, dVal)
+ ' Else
+ ' Return Double.TryParse(sVal, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, dVal)
+ ' End If
+ 'End Function
+
+ Public Function StringToInt(sVal As String, ByRef nVal As Integer) As Boolean
+ Dim dVal As Double = 0
+ If Not StringToDouble(sVal, dVal) Then Return False
+ nVal = CInt(Math.Round(dVal))
+ Return True
+ End Function
+
+ 'Public Function LenToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
+ ' Return DoubleToString(EgtToUiUnits(dVal), nNumDec)
+ 'End Function
+
+ 'Public Function StringToLen(ByVal sVal As String, ByRef dVal As Double) As Boolean
+ ' If EgtLuaEvalNumExpr(sVal, dVal) Then
+ ' dVal = EgtFromUiUnits(dVal)
+ ' Return True
+ ' Else
+ ' Return False
+ ' End If
+ 'End Function
+
+ 'Public Function StringToLenAdv(ByVal sVal As String, ByRef dVal As Double, Optional bEval As Boolean = False) As Boolean
+ ' If bEval Then
+ ' If EgtLuaEvalNumExpr(sVal, dVal) Then
+ ' dVal = EgtFromUiUnits(dVal)
+ ' Return True
+ ' Else
+ ' Return False
+ ' End If
+ ' Else
+ ' If Double.TryParse(sVal, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, dVal) Then
+ ' dVal = EgtFromUiUnits(dVal)
+ ' Return True
+ ' Else
+ ' Return False
+ ' End If
+ ' End If
+ 'End Function
+
+End Module