- spostamento + modifica nome

This commit is contained in:
Emmanuele Sassi
2024-10-03 16:29:54 +02:00
parent 27f2ba0aae
commit f47809379d
45 changed files with 653 additions and 654 deletions
@@ -1,7 +1,7 @@
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Supervisor">
xmlns:local="clr-namespace:Effector.Main">
<Application.Resources>
<ResourceDictionary Source="Utility/Dictionary.xaml"/>
@@ -1,56 +1,56 @@
Imports NGP_COMM_DLL
Public Class MachineManager
'
'
' !!!! TO DO : use a list of n machines, not just 2 !!!!
Private m_MachineList(20) As NC.NC_generic
Friend ReadOnly Property MachineList As NC.NC_generic()
Get
Return m_MachineList
End Get
End Property
Sub New()
End Sub
Sub Init()
If GetMainPrivateProfileInt(S_NC, K_NC_SIMULATE, 0) = 1 Then
Dim nMachineIndex As Integer = 0
Dim sMachine As String = ""
While GetMainPrivateProfileString(S_NC, K_MACHINE & (nMachineIndex + 1).ToString(), "", sMachine) > 0
Dim NewSimulatedMachine As New NC.Simulated
NewSimulatedMachine.Connect("")
m_MachineList(nMachineIndex) = NewSimulatedMachine
nMachineIndex += 1
End While
Else
Dim nMachineIndex As Integer = 1
Dim sMachine As String = ""
While GetMainPrivateProfileString(S_NC, K_MACHINE & nMachineIndex.ToString(), "", sMachine) > 0
Dim sMachineSplit() As String = sMachine.Split(","c)
Dim nType As Integer = 0
If sMachineSplit.Count >= 1 AndAlso Not String.IsNullOrWhiteSpace(sMachineSplit(0)) AndAlso Integer.TryParse(sMachineSplit(0), nType) Then
Select Case nType
Case 1 ' OsaiOpen
If sMachineSplit.Count >= 2 AndAlso Not String.IsNullOrWhiteSpace(sMachineSplit(1)) Then
Dim NewOsaiOpen As New NC.OsaiOpen
NewOsaiOpen.Connect(sMachineSplit(1))
m_MachineList(nMachineIndex - 1) = NewOsaiOpen
End If
End Select
End If
nMachineIndex += 1
End While
End If
End Sub
Sub Close()
For Each Machine In m_MachineList
If Not IsNothing(Machine) Then
Machine.Disconnect()
End If
Next
End Sub
End Class
Imports NGP_COMM_DLL
Public Class MachineManager
'
'
' !!!! TO DO : use a list of n machines, not just 2 !!!!
Private m_MachineList(20) As NC.NC_generic
Friend ReadOnly Property MachineList As NC.NC_generic()
Get
Return m_MachineList
End Get
End Property
Sub New()
End Sub
Sub Init()
If GetMainPrivateProfileInt(S_NC, K_NC_SIMULATE, 0) = 1 Then
Dim nMachineIndex As Integer = 0
Dim sMachine As String = ""
While GetMainPrivateProfileString(S_NC, K_MACHINE & (nMachineIndex + 1).ToString(), "", sMachine) > 0
Dim NewSimulatedMachine As New NC.Simulated
NewSimulatedMachine.Connect("")
m_MachineList(nMachineIndex) = NewSimulatedMachine
nMachineIndex += 1
End While
Else
Dim nMachineIndex As Integer = 1
Dim sMachine As String = ""
While GetMainPrivateProfileString(S_NC, K_MACHINE & nMachineIndex.ToString(), "", sMachine) > 0
Dim sMachineSplit() As String = sMachine.Split(","c)
Dim nType As Integer = 0
If sMachineSplit.Count >= 1 AndAlso Not String.IsNullOrWhiteSpace(sMachineSplit(0)) AndAlso Integer.TryParse(sMachineSplit(0), nType) Then
Select Case nType
Case 1 ' OsaiOpen
If sMachineSplit.Count >= 2 AndAlso Not String.IsNullOrWhiteSpace(sMachineSplit(1)) Then
Dim NewOsaiOpen As New NC.OsaiOpen
NewOsaiOpen.Connect(sMachineSplit(1))
m_MachineList(nMachineIndex - 1) = NewOsaiOpen
End If
End Select
End If
nMachineIndex += 1
End While
End If
End Sub
Sub Close()
For Each Machine In m_MachineList
If Not IsNothing(Machine) Then
Machine.Disconnect()
End If
Next
End Sub
End Class
@@ -19,7 +19,7 @@ Public Module ConstGen
Public Const K_DATAROOT As String = "DataRoot"
' File con dati di licenza
Public Const LIC_FILE_NAME As String = "EgtBEAMWALL.lic"
Public Const LIC_FILE_NAME As String = "Effector.lic"
Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key"
@@ -36,7 +36,7 @@ Public Module ConstGen
End Enum
' File di log generale
Public Const GENLOG_FILE_NAME As String = "Supervisor#.txt"
Public Const GENLOG_FILE_NAME As String = "Effector#.txt"
' Sottodirettorio di configurazione
Public Const CONF_DIR As String = "Config"
@@ -12,7 +12,7 @@
'----------------------------------------------------------------------------
Module ConstIni
Public Const INI_FILE_NAME As String = "Supervisor.ini"
Public Const INI_FILE_NAME As String = "Effector.ini"
Public Const S_GENERAL As String = "General"
'Public Const K_DEBUG As String = "Debug"
@@ -6,8 +6,8 @@
<ProjectGuid>{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}</ProjectGuid>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
<OutputType>WinExe</OutputType>
<RootNamespace>Supervisor</RootNamespace>
<AssemblyName>Supervisor</AssemblyName>
<RootNamespace>Effector.Main</RootNamespace>
<AssemblyName>Effector.Main</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@@ -47,7 +47,7 @@
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x86\Debug\</OutputPath>
<DocumentationFile>Supervisor.xml</DocumentationFile>
<DocumentationFile>Effector.Main.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
@@ -56,7 +56,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x86\Release\</OutputPath>
<DocumentationFile>Supervisor.xml</DocumentationFile>
<DocumentationFile>Effector.Main.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>pdbonly</DebugType>
@@ -68,7 +68,7 @@
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Debug\</OutputPath>
<DocumentationFile>Supervisor.xml</DocumentationFile>
<DocumentationFile>Effector.Main.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
@@ -77,7 +77,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Release\</OutputPath>
<DocumentationFile>Supervisor.xml</DocumentationFile>
<DocumentationFile>Effector.Main.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>pdbonly</DebugType>
@@ -245,9 +245,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Supervisor.Plugin.Interface\Supervisor.Plugin.Interface.vbproj">
<ProjectReference Include="..\Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj">
<Project>{7D14D864-2BDC-4785-80F4-320164C2D5E4}</Project>
<Name>Supervisor.Plugin.Interface</Name>
<Name>Effector.Plugin.Interface</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@@ -278,10 +278,10 @@
<Error Condition="!Exists('..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets'))" />
</Target>
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Supervisor\SupervisorR32.exe
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Supervisor\SupervisorD32.exe
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Supervisor\SupervisorR64.exe
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Supervisor\SupervisorD64.exe</PostBuildEvent>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Effector\EffectorR32.exe
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Effector\EffectorD32.exe
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Effector\EffectorR64.exe
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Effector\EffectorD64.exe</PostBuildEvent>
</PropertyGroup>
<Import Project="..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" />
</Project>
@@ -2,7 +2,7 @@
Imports System.Diagnostics
Imports System.IO
Imports KeraLua
Imports Supervisor.Plugin.Interface
Imports Effector.Plugin.Interface
Public Module LuaManager
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,6 @@
Imports System.ComponentModel.Composition
Imports System.ComponentModel.Composition.Hosting
Imports Supervisor.Plugin.Interface
Imports Effector.Plugin.Interface
Public Class MEFLoader
@@ -1,5 +1,5 @@
Imports System.ComponentModel.Composition
Imports Supervisor.Plugin.Interface
Imports Effector.Plugin.Interface
Public Class SupervisorFunctions
Implements IHost
@@ -214,7 +214,7 @@ Public Class MainWindowM
Private Sub ManageInstance()
Dim bCreated As Boolean
Try
m_objMutex = New Mutex(False, "Global\Supervisor", bCreated)
m_objMutex = New Mutex(False, "Global\Effector", bCreated)
Catch
bCreated = False
End Try
@@ -240,7 +240,7 @@ Public Class MainWindowM
' porto in primo piano la prima istanza
Dim bFound As Boolean = False
' processi del programma a 32 bit
Dim localProc As Process() = Process.GetProcessesByName("SupervisorR32")
Dim localProc As Process() = Process.GetProcessesByName("EffectorR32")
For Each p As Process In localProc
If p.Id <> Process.GetCurrentProcess().Id Then
bFound = True
@@ -250,7 +250,7 @@ Public Class MainWindowM
Next
' se non trovati processi a 32 bit provo a 64 bit
If Not bFound Then
localProc = Process.GetProcessesByName("SupervisorR64")
localProc = Process.GetProcessesByName("EffectorR64")
For Each p As Process In localProc
If p.Id <> Process.GetCurrentProcess().Id Then
bFound = True
@@ -1,7 +1,7 @@
<Window x:Class="MainWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Supervisor"
xmlns:local="clr-namespace:Effector.Main"
Title="MainWindow"
Style="{StaticResource MainWindow}">
<Grid>
@@ -1,6 +1,6 @@
Imports System.IO
Imports System.Windows.Threading
Imports Supervisor.Plugin.Interface
Imports Effector.Plugin.Interface
Public Class MainWindowVM
@@ -11,10 +11,10 @@ Imports System.Windows
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("Supervisor")>
<Assembly: AssemblyTitle("Effector")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("Supervisor")>
<Assembly: AssemblyProduct("Effector")>
<Assembly: AssemblyCopyright("Copyright © 2024 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -63,10 +63,10 @@ Namespace My
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.Supervisor.My.MySettings
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>
Friend ReadOnly Property Settings() As Global.Effector.Main.My.MySettings
Get
Return Global.Supervisor.My.MySettings.Default
Return Global.Effector.Main.My.MySettings.Default
End Get
End Property
End Module

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@@ -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")>
@@ -13,7 +13,6 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Public Module IniFile
@@ -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.Interface</RootNamespace>
<AssemblyName>Supervisor.Plugin.Interface</AssemblyName>
<RootNamespace>Effector.Plugin.Interface</RootNamespace>
<AssemblyName>Effector.Plugin.Interface</AssemblyName>
<OutputType>Library</OutputType>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
@@ -19,7 +19,7 @@
<DefineTrace>true</DefineTrace>
<IncrementalBuild>true</IncrementalBuild>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>Supervisor.Plugin.Interface.xml</DocumentationFile>
<DocumentationFile>Effector.Plugin.Interface.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -30,7 +30,7 @@
<IncrementalBuild>false</IncrementalBuild>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>Supervisor.Plugin.Interface.xml</DocumentationFile>
<DocumentationFile>Effector.Plugin.Interface.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
</PropertyGroup>
<PropertyGroup>
@@ -109,11 +109,11 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Supervisor\Supervisor.Plugin.InterfaceR32.dll
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Supervisor\Supervisor.Plugin.InterfaceD32.dll
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Supervisor\Supervisor.Plugin.InterfaceR64.dll
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Supervisor\Supervisor.Plugin.InterfaceD64.dll
copy $(TargetPath) c:\EgtData\Supervisor\Plugin\Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.dll
copy $(TargetPath) c:\EgtProg\Supervisor\Supervisor.Plugin.Interface.dll</PostBuildEvent>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Effector\Effector.Plugin.InterfaceR32.dll
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Effector\Effector.Plugin.InterfaceD32.dll
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Effector\Effector.Plugin.InterfaceR64.dll
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Effector\Effector.Plugin.InterfaceD64.dll
copy $(TargetPath) c:\EgtData\Effector\Plugin\Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes.dll
copy $(TargetPath) c:\EgtProg\Effector\Effector.Plugin.Interface.dll</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -11,10 +11,10 @@ Imports System.Windows
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("Supervisor.Plugin.Interface")>
<Assembly: AssemblyTitle("Effector.Plugin.Interface")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Windows User")>
<Assembly: AssemblyProduct("Supervisor.Plugin.Interface")>
<Assembly: AssemblyProduct("Effector.Plugin.Interface")>
<Assembly: AssemblyCopyright("Copyright @ Windows User 2024")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -64,9 +64,9 @@ Namespace My
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.Supervisor.Plugin.Interface.My.MySettings
Friend ReadOnly Property Settings() As Global.Effector.Plugin.Interface.My.MySettings
Get
Return Global.Supervisor.Plugin.Interface.My.MySettings.Default
Return Global.Effector.Plugin.Interface.My.MySettings.Default
End Get
End Property
End Module
+3 -3
View File
@@ -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", "Supervisor\Supervisor.vbproj", "{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}"
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Main", "Effector.Main\Effector.Main.vbproj", "{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.Interface", "Supervisor.Plugin.Interface\Supervisor.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.Interface", "Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.FiveLakes", "..\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\Effector.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution