41 Commits

Author SHA1 Message Date
Emmanuele Sassi a125b87cef Effector.Main 3.1.5.3:
- spostata sezione lettura lingua e messaggi prima di inizializzazione programma per avere messaggi di problemi chiavi o licenza tradotti
2026-05-13 15:53:14 +02:00
Emmanuele Sassi d9f472892a Effector.Main 3.1.5.2:
- aggiunta lettura file di messaggi del plugin
2026-05-11 15:18:15 +02:00
Emmanuele Sassi f67bddeed6 Effector.Main 3.1.5.1:
- reintrodotto modulo EgtInterface perche' senza da DoorArreda non funzionava (da verificare)
2026-05-11 12:36:07 +02:00
Emmanuele Sassi 7bfa134828 - aggiunta gestione comunicazione Fanuc e relative librerie 2026-05-11 12:17:51 +02:00
Emmanuele Sassi 5005fd3e73 - aggiunto log errore macchina su invio programma e scritture
- aggiornate versioni
2025-08-06 11:08:09 +02:00
Emmanuele Sassi d08eabc163 Merge branch 'develop' of https://gitlab.steamware.net/egalware-supervisor/effector.main into develop 2025-07-08 16:26:19 +02:00
Emmanuele Sassi 94c4c1f6a4 - gestite lingue e messaggi
- spostato EgtInterface in libreria
2025-07-08 16:26:14 +02:00
Dario Sassi dc51159ca1 Aggiornata versione a 2.7f1 2025-06-12 20:34:31 +02:00
Emmanuele Sassi c6a77355a4 - modifiche per uso libreria 2025-06-12 09:26:47 +02:00
Emmanuele Sassi e657e53f7a - introdotto uso window da EgwWPFBaseLib 2025-02-26 14:47:28 +01:00
Emmanuele Sassi 8e36167ef4 Merge branch 'develop' of https://gitlab.steamware.net/egalware-supervisor/effector.main into develop 2025-02-17 19:00:07 +01:00
Emmanuele Sassi e2df14e44d - migliorata finestra MainWindow
- migliorato splashscreen
- eliminate classi spostate in Lib
2025-02-17 18:52:19 +01:00
Dario Sassi b2f4f87c54 Effector.Main :
- aggiunte interfacce per nuove funzioni (Messaggi, R/W INI, Log) di EgtBasis.
2025-01-25 12:51:22 +01:00
Emmanuele Sassi d099ffe17e - miglioramenti grafici
- aggiunto font
2024-12-16 12:21:53 +01:00
Emmanuele Sassi 2c4d43387d - aggiunto log su fallimento lettura variabili da macchina 2024-11-19 16:14:39 +01:00
Emmanuele Sassi d36077c04f Merge branch 'develop' of https://gitlab.steamware.net/egalware-supervisor/effector.main into develop 2024-11-08 13:14:12 +01:00
Emmanuele Sassi 71a280e41d - aggiunto splashscreen
- aggiunta gestione chiave di protezione con limite macchine utilizzabili
- impostata cartella dati da programma per script lua
2024-11-08 13:14:07 +01:00
Samuele Locatelli cdafc7c8d6 Fix riferimento packages 2024-10-05 11:11:47 +02:00
Emmanuele Sassi f47809379d - spostamento + modifica nome 2024-10-03 16:29:54 +02:00
Emmanuele Sassi 27f2ba0aae - aggiunta icona in taskbar 2024-09-18 11:31:40 +02:00
Emmanuele Sassi 66fd112ef7 - inizio modifica per mostrare messaggi da finitestatemachine 2024-09-18 11:04:47 +02:00
Emmanuele Sassi fc95ec8882 - aggiunta icona programma
- aggiunte a lua funzioni che accedono direttamente ad ini programma e funzione file exists
2024-09-12 09:54:17 +02:00
Emmanuele Sassi 8259a0d7d2 - spostato gestore macchine a stati dopo plugin
- rimosso parametro inutile da lettura ini supervisore da plugin
2024-09-11 10:07:13 +02:00
Emmanuele Sassi cb34b20d74 - aggiunte funzioni per lua sleep, DeleteFile, FileLength e CopyFileToNc
- nuova dll di comunicazione
2024-09-09 14:20:57 +02:00
Emmanuele Sassi f23608580f - corretto indice di creazione macchine per comunicazione
- gestito posizionamento e dimensione finestra
- aggiunta funzione SplitStrign per lua
- aggiunta barra sopra in MainWindow
- gestita finestra con riposizionamento, dimensioni, ecc
- gestita esecuzione asincrona
- aggiunta verifica esecuzione macchina stati
2024-09-03 11:27:59 +02:00
Emmanuele Sassi 84f191782b - corretto indici lista macchine
- eliminate chiamate di test da gestore macchine a stati
- anticipata caricamento comunicazione macchine rispetto alle macchine a stati
- allungato counter di esecuzione processi lanciati
- aggiunto dictionary
- iniziata gestione finestra custom
2024-08-23 19:08:06 +02:00
Emmanuele Sassi cf6e28662f Merge remote-tracking branch 'origin/develop' into develop 2024-08-22 15:45:59 +02:00
Carlo d0a6e11a0c - inserita EntExecProcess 2024-08-22 11:18:07 +02:00
Emmanuele Sassi 23a00eff4d Merge remote-tracking branch 'origin/develop' into develop 2024-08-19 17:16:41 +02:00
Carlo da19606163 - aggiunte definizioni funzioni lua comunicazione mancanti 2024-08-19 16:59:38 +02:00
Emmanuele Sassi 0056ac7801 - aggiunta lettura nome plugin da file ini 2024-08-19 15:40:33 +02:00
Emmanuele Sassi ffb77868db - aggiunta gestione LuaManager per plugin 2024-08-09 17:03:53 +02:00
Emmanuele Sassi fad64bb5b4 - implementata lista macchine configurabili
- aggiunte funzioni lua
- corretta esportazione funzioni per plugin
- aggiunta funzione che lancia eseguibile per cam
2024-08-09 11:42:31 +02:00
Emmanuele Sassi 4dcc1744e8 - cambiato riferimento dll comunicazione 2024-07-31 19:32:14 +02:00
Emmanuele Sassi 8ddca3d5a2 Merge branch 'develop' of https://gitlab.steamware.net/egalware-supervisor/ngp into develop 2024-07-31 18:44:20 +02:00
Emmanuele Sassi 0b655aeb09 - gestita abilitazione redis
- aggiunto Dictionary plugin
2024-07-31 18:39:49 +02:00
Carlo 38e9d55c14 scrittura codice 2 2024-07-31 16:52:52 +02:00
Emmanuele Sassi aff5e53493 - correzione sln 2024-07-24 09:54:11 +02:00
Emmanuele Sassi 706c959527 - aggiunta gestione redis non funzionante 2024-07-23 17:41:37 +02:00
Emmanuele Sassi 9add240f1d - commit iniziale 2024-07-23 15:56:02 +02:00
Emmanuele Sassi a920109e4d - aggiunto gitignore 2024-07-23 15:55:30 +02:00
56 changed files with 4604 additions and 0 deletions
+330
View File
@@ -0,0 +1,330 @@
# ---> VisualStudio
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# ---> C Sharp
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
.ionide/symbolCache.db
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="OPENcontrol" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://192.168.0.2:8080" binding="basicHttpBinding"
bindingConfiguration="OPENcontrol" contract="OpenControl.OPENcontrolPortType"
name="OPENcontrol" />
</client>
</system.serviceModel>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+15
View File
@@ -0,0 +1,15 @@
<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:Effector.Main">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Effector.Plugin.Lib;component/Themes/Generic.xaml"/>
<ResourceDictionary Source="Utility/Dictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
+22
View File
@@ -0,0 +1,22 @@
Class Application
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Protected Overrides Sub OnStartup(e As StartupEventArgs)
MyBase.OnStartup(e)
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
If e.Args.Count = 0 Then
' creo finestra SplashScreen
Dim SplashScreen As New SplashScreen
Me.MainWindow = SplashScreen
Me.MainWindow.Show()
Map.SetRefSplashScreen(SplashScreen)
End If
' Creo la View principale
Me.MainWindow = New MainWindowV
' Mostro la View principale
Me.MainWindow.Show()
End Sub
End Class
+69
View File
@@ -0,0 +1,69 @@
Imports Effector.Plugin.Lib
Imports NGP_COMM_DLL
Public Class MachineManager
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 = 1
Dim sMachine As String = ""
While GetMainPrivateProfileString(S_NC, K_MACHINE & nMachineIndex.ToString(), "", sMachine) > 0
If Map.refMainWindowVM.MainWindowM.GetKeyOption1(nMachineIndex) Then
Dim NewSimulatedMachine As New NC.Simulated
NewSimulatedMachine.Connect("")
m_MachineList(nMachineIndex - 1) = NewSimulatedMachine
Else
EgtOutLog("Attempt to load machines beyond the limit imposed by the key!")
End If
nMachineIndex += 1
End While
Else
Dim nMachineIndex As Integer = 1
Dim sMachine As String = ""
While GetMainPrivateProfileString(S_NC, K_MACHINE & nMachineIndex.ToString(), "", sMachine) > 0
If Map.refMainWindowVM.MainWindowM.GetKeyOption1(nMachineIndex) Then
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
Case 2 ' Fanuc
If sMachineSplit.Count >= 2 AndAlso Not String.IsNullOrWhiteSpace(sMachineSplit(1)) Then
Dim NewFanuc As New NC.Fanuc
NewFanuc.Connect(sMachineSplit(1))
m_MachineList(nMachineIndex - 1) = NewFanuc
End If
End Select
End If
Else
EgtOutLog("Attempt to load machines beyond the limit imposed by the key!")
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
+76
View File
@@ -0,0 +1,76 @@
'----------------------------------------------------------------------------
' 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 = "Effector.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
'WALL = 2
'NESTING_AUTO = 4
'SUPERVISOR = 8
'NETWORK = 16
'ANY_DB = 32
End Enum
' File di log generale
Public Const GENLOG_FILE_NAME As String = "Effector#.txt"
' 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 dei messaggi
Public Const MSG_DIR As String = "Messages"
'' 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
+42
View File
@@ -0,0 +1,42 @@
'----------------------------------------------------------------------------
' 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 = "Effector.ini"
Public Const S_GENERAL As String = "General"
'Public Const K_DEBUG As String = "Debug"
Public Const K_LICENCE As String = "Licence"
Public Const K_MESSAGES As String = "Messages"
'Public Const K_USERLEVEL As String = "UserLevel"
'Public Const K_MAXINST As String = "MaxInstances"
Public Const K_INSTANCES As String = "Instances"
Public Const K_PREPROC As String = "PreProc"
Public Const K_POSTPROC As String = "PostProc"
Public Const K_MACHINESTATE As String = "MachineState"
Public Const K_INITLUA As String = "InitLua"
Public Const K_PLUGINNAME As String = "PluginName"
Public Const K_WINPLACE = "WinPlace"
Public Const S_LANGUAGES As String = "Languages"
Public Const S_REDIS As String = "Redis"
Public Const K_ENABLED As String = "Enabled"
Public Const K_DBINDEX As String = "DbIndex"
Public Const S_NC As String = "NC"
Public Const K_NC_SIMULATE As String = "NcSimulate"
Public Const K_MACHINE As String = "Machine"
End Module
+307
View File
@@ -0,0 +1,307 @@
<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>
<ProjectGuid>{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}</ProjectGuid>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
<OutputType>WinExe</OutputType>
<RootNamespace>Effector.Main</RootNamespace>
<AssemblyName>Effector.Main</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x86\Debug\</OutputPath>
<DocumentationFile>Effector.Main.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x86\Release\</OutputPath>
<DocumentationFile>Effector.Main.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Debug\</OutputPath>
<DocumentationFile>Effector.Main.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Release\</OutputPath>
<DocumentationFile>Effector.Main.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\Effector.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="Effector.Plugin.Lib">
<HintPath>..\..\Effector.Plugin.Lib\Effector.Plugin.Lib\bin\Debug\Effector.Plugin.Lib.dll</HintPath>
</Reference>
<Reference Include="EgwWPFBaseLib">
<HintPath>..\..\..\EgwWPFBaseLib\EgwWPFBaseLib\bin\Debug\EgwWPFBaseLib.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>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="NGP_COMM_DLL">
<HintPath>..\ExtLib\NGP_COMM_DLL.dll</HintPath>
</Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.8\lib\net472\Pipelines.Sockets.Unofficial.dll</HintPath>
</Reference>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.7.33\lib\net472\StackExchange.Redis.dll</HintPath>
</Reference>
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Pipelines, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.6.0.0\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Channels, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.6.0.0\lib\net461\System.Threading.Channels.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<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>
<ApplicationDefinition Include="Application.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Comms\MachineManager.vb" />
<Compile Include="Constants\ConstGen.vb" />
<Compile Include="Constants\ConstIni.vb" />
<Compile Include="FiniteStateMachineManager\FiniteStateMachineManager.vb" />
<Compile Include="LUA\Lua_Aux.vb" />
<Compile Include="MainWindow\MainWindowM.vb" />
<Compile Include="LUA\LuaManager.vb" />
<Compile Include="MEFPlugin\MefPlugin.vb" />
<Compile Include="MEFPlugin\SupervisorFunctions.vb" />
<Compile Include="SplashScreen\SplashScreen.xaml.vb">
<DependentUpon>SplashScreen.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Dictionary.xaml.vb">
<DependentUpon>Dictionary.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\EgtInterface.vb" />
<Compile Include="Utility\ExecProcessManager.vb" />
<Compile Include="LUA\Lua_General.vb" />
<Compile Include="Utility\FiniteStateMachine.vb" />
<Compile Include="Utility\Map.vb" />
<Compile Include="Utility\RedisManager.vb" />
<Page Include="MainWindow\MainWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="Application.xaml.vb">
<DependentUpon>Application.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow\MainWindowV.xaml.vb">
<DependentUpon>MainWindowV.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="SplashScreen\SplashScreen.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Utility\Dictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</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="MainWindow\MainWindowVM.vb" />
<Compile Include="My Project\AssemblyInfo.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="My Project\MyExtensions\MyWpfExtension.vb">
<VBMyExtensionTemplateID>Microsoft.VisualBasic.WPF.MyExtension</VBMyExtensionTemplateID>
<VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion>
</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>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
<Resource Include="Resources\Fonts\AdventPro-Light.ttf" />
<Resource Include="Resources\Fonts\AdventPro-Regular.ttf" />
<Resource Include="Resources\Fonts\Roboto-Light.ttf" />
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj">
<Project>{7D14D864-2BDC-4785-80F4-320164C2D5E4}</Project>
<Name>Effector.Plugin.Interface</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 e x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Icon.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Effector.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SplashScreen.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Import Project="..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets" Condition="Exists('..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets'))" />
<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\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>
@@ -0,0 +1,108 @@
Imports System.IO
Imports System.Windows.Threading
Imports Effector.Plugin.Lib
Public Class FiniteStateMachineManager
Private m_FiniteStateMachineTimer As New DispatcherTimer
Private m_FiniteStateMachineList As New List(Of FiniteStateMachine)
Friend ReadOnly Property FiniteStateMachineList As List(Of FiniteStateMachine)
Get
Return m_FiniteStateMachineList
End Get
End Property
Private m_PreProcPath As String = ""
Private m_PostProcPath As String = ""
Sub New()
LuaManager.SetGlobVar("EFFECTOR.DATADIR", Map.refMainWindowVM.MainWindowM.sDataRoot)
' leggo file inizializzazione variabili lua
Dim sLuaInitPath As String = ""
If GetMainPrivateProfileString(S_GENERAL, K_INITLUA, "", sLuaInitPath) > 0 Then
LuaManager.ExecFile(Map.refMainWindowVM.MainWindowM.sScriptDir & "\" & sLuaInitPath)
End If
'' leggo configurazioni
'Dim sPreProcName As String = ""
'If GetMainPrivateProfileString(S_GENERAL, K_PREPROC, "", sPreProcName) > 0 AndAlso
' Not String.IsNullOrWhiteSpace(sPreProcName) Then
' m_PreProcPath = Map.refMainWindowVM.MainWindowM.sScriptDir & "\" & sPreProcName
' If File.Exists(m_PreProcPath) Then
' ' lancio esecuzione file preprocessore
' LuaManager.SetGlobVar("PREPROC.ERROR", 0)
' LuaManager.SetGlobVar("PREPROC.ERROR_MSG", "")
' LuaManager.ExecFile(m_PreProcPath)
' Dim nError As Integer = 0
' If Not LuaManager.GetGlobVar("PREPROC.ERROR", nError) Then
' nError = 1
' End If
' If nError > 0 Then
' Dim sErrorMsg As String = ""
' If LuaManager.GetGlobVar("PREPROC.ERROR_MSG", sErrorMsg) Then
' EgtOutLog("Error in PreProc! #" & nError & ":" & sErrorMsg)
' End If
' End If
' End If
'End If
'Dim sPostProcName As String = ""
'If GetMainPrivateProfileString(S_GENERAL, K_POSTPROC, "", sPostProcName) > 0 AndAlso
' Not String.IsNullOrWhiteSpace(m_PostProcPath) Then
' m_PostProcPath = Map.refMainWindowVM.MainWindowM.sScriptDir & "\" & sPostProcName
' If File.Exists(m_PostProcPath) Then
' LuaManager.ExecFile(m_PostProcPath)
' End If
'End If
Dim nIndex As Integer = 1
Dim sMachineState As String = ""
While GetMainPrivateProfileString(S_GENERAL, K_MACHINESTATE & nIndex.ToString(), "", sMachineState) > 0
m_FiniteStateMachineList.Add(New FiniteStateMachine(sMachineState))
nIndex += 1
End While
' avvio timer macchine a stati
m_FiniteStateMachineTimer.Interval = New TimeSpan(500)
AddHandler m_FiniteStateMachineTimer.Tick, AddressOf FiniteStateMachineTimer_Tick
m_FiniteStateMachineTimer.Start()
End Sub
'Private m_bFiniteStateMachineExecuting As Boolean = False
Private Sub FiniteStateMachineTimer_Tick(sender As Object, e As EventArgs)
'If m_bFiniteStateMachineExecuting Then Return
'm_bFiniteStateMachineExecuting = True
' lancio esecuzione macchine a stati
For nMachineIndex = 0 To m_FiniteStateMachineList.Count - 1
If m_FiniteStateMachineList(nMachineIndex).bLuaExecuted Then
LuaManager.ExecLuaFunction("MACHINE" & (nMachineIndex + 1).ToString() & "_Tick", -1, Nothing)
End If
Next
'' lancio esecuzione preprocessore
'LuaManager.SetGlobVar("PREPROC.ERROR", 0)
'LuaManager.SetGlobVar("PREPROC.ERROR_MSG", "")
'LuaManager.ExecLuaFunction("PREPROC_Tick", -1, Nothing)
'Dim nError As Integer = 0
'If Not LuaManager.GetGlobVar("PREPROC.ERROR", nError) Then
' nError = 1
'End If
'If nError > 0 Then
' Dim sErrorMsg As String = ""
' If LuaManager.GetGlobVar("PREPROC.ERROR_MSG", sErrorMsg) Then
' EgtOutLog("Error in PreProc! #" & nError & ":" & sErrorMsg)
' End If
'End If
' lancio esecuzione postprocessore
'LuaManager.ExecLuaFunction("Tick", -1, Nothing)
'm_bFiniteStateMachineExecuting = False
End Sub
Friend Sub ResetFiniteStateMachineTimer()
If Not IsNothing(m_FiniteStateMachineTimer) AndAlso m_FiniteStateMachineTimer.IsEnabled Then
m_FiniteStateMachineTimer.Stop()
RemoveHandler m_FiniteStateMachineTimer.Tick, AddressOf FiniteStateMachineTimer_Tick
m_FiniteStateMachineTimer = Nothing
End If
End Sub
End Class
+152
View File
@@ -0,0 +1,152 @@
Imports System
Imports System.Diagnostics
Imports System.IO
Imports KeraLua
Imports Effector.Plugin.Interface
Public Module LuaManager
Private m_state As Lua
Friend ReadOnly Property state As Lua
Get
Return m_state
End Get
End Property
Friend Function SetGlobVar(sName As String, bValue As Boolean) As Boolean
Return Lua_Aux.LuaSetGlobVar(m_state, sName, bValue)
End Function
Friend Function SetGlobVar(sName As String, nValue As Integer) As Boolean
Return Lua_Aux.LuaSetGlobVar(m_state, sName, nValue)
End Function
Friend Function SetGlobVar(sName As String, dValue As Double) As Boolean
Return Lua_Aux.LuaSetGlobVar(m_state, sName, dValue)
End Function
Friend Function SetGlobVar(sName As String, sValue As String) As Boolean
Return Lua_Aux.LuaSetGlobVar(m_state, sName, sValue)
End Function
Friend Function GetGlobVar(sName As String, ByRef bValue As Boolean) As Boolean
Return Lua_Aux.LuaGetGlobVar(m_state, sName, bValue)
End Function
Friend Function GetGlobVar(sName As String, ByRef nValue As Integer) As Boolean
Return Lua_Aux.LuaGetGlobVar(m_state, sName, nValue)
End Function
Friend Function GetGlobVar(sName As String, ByRef dValue As Double) As Boolean
Return Lua_Aux.LuaGetGlobVar(m_state, sName, dValue)
End Function
Friend Function GetGlobVar(sName As String, ByRef sValue As String) As Boolean
Return Lua_Aux.LuaGetGlobVar(m_state, sName, sValue)
End Function
Friend Function CreateGlobTable(sName As String) As Boolean
Return Lua_Aux.LuaCreateGlobTable(m_state, sName)
End Function
Public Function ExecFile(ByVal sPath As String) As Boolean
' verifico ambiente lua
If IsNothing(m_state) Then Return False
' eseguo la linea
Dim result As LuaStatus = m_state.LoadFile(sPath)
Dim sError As String = String.Empty
If result <> LuaStatus.OK Then
sError = m_state.ToString(1)
EgtOutLog("Fail loading file: " & sPath & "ERROR:" & sError)
End If
result = m_state.PCall(0, -1, 0)
If result <> LuaStatus.OK Then
sError = m_state.ToString(1)
m_state.Pop(1)
EgtOutLog("Fail calling file: " & sPath & " ERROR: " & If(String.IsNullOrWhiteSpace(sError), "Unknown", sError))
End If
Return result = LuaStatus.OK
End Function
Public Function ExecLuaFunction(ByVal sName As String, nReturns As Integer, Params() As Object) As Boolean
' recupero la funzione
If Not sName.Contains("."c) Then
' e' direttamente la funzione
m_state.GetGlobal(sName)
Else
' e' in una table
Dim sTableName As String = "", sFunctionName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sFunctionName = sParams(1)
m_state.GetGlobal(sTableName)
If Not m_state.IsTable(-1) Then Return False
m_state.GetField(-1, sFunctionName)
' porto la funzione uno slot sotto e diminuisco lo stack di uno (per essere come caso sopra)
m_state.Copy(-1, -2)
m_state.Pop(1)
End If
Dim nParamCount = 0
If Not IsNothing(Params) Then
' numero di parametri
nParamCount = Params.Count()
' inserisco i parametri sullo stack
For Each Param In Params
Select Case Param.GetType()
Case GetType(Boolean)
m_state.PushBoolean(CBool(Param))
Case GetType(Integer)
m_state.PushInteger(CInt(Param))
Case GetType(Double)
m_state.PushNumber(CDbl(Param))
Case GetType(String)
m_state.PushString(CStr(Param))
End Select
Next
End If
' eseguo la chiamata
Dim result As LuaStatus = m_state.PCall(nParamCount, -1, 0)
' senza errori
If result = LuaStatus.OK Then
Return True
Else
' recupero il messaggio di errore
Dim sError As String = m_state.ToString(-1)
m_state.Pop(1)
EgtOutLog("Fail calling function: " & sName & " ERROR: " & sError)
Return False
End If
End Function
Public Function Init() As Boolean
' se già aperto, lo fermo per riavviarlo
If Not IsNothing(m_state) Then
m_state.Close()
m_state = Nothing
End If
' inizializzo Lua
m_state = New Lua()
If IsNothing(m_state) Then
EgtOutLog("Error in Lua interpreter starting (LuaManager.Init)")
Return False
End If
' carico le librerie standard
m_state.OpenLibs()
If Not LuaInstallGeneral(m_state) Then
Return False
End If
Return True
End Function
Public Function Close() As Boolean
' verifico ambiente lua
If IsNothing(m_state) Then Return False
' termino Lua
m_state.Close()
m_state = Nothing
Return True
End Function
End Module
+377
View File
@@ -0,0 +1,377 @@
Imports KeraLua
Public Module Lua_Aux
Friend Function LuaClearStack(state As Lua)
Dim nIndex As Integer = state.GetTop()
If nIndex > 0 Then
state.Pop(nIndex)
End If
Return True
End Function
Friend Function LuaCheckParam(state As Lua, nIndex As Integer, ByRef bValue As Boolean)
If Not LuaGetParam(state, nIndex, bValue) Then
Return state.Error(" Invalid Parameter # " & nIndex)
End If
Return True
End Function
Friend Function LuaCheckParam(state As Lua, nIndex As Integer, ByRef nValue As Integer)
If Not LuaGetParam(state, nIndex, nValue) Then
Return state.Error(" Invalid Parameter # " & nIndex)
End If
Return True
End Function
Friend Function LuaCheckParam(state As Lua, nIndex As Integer, ByRef dValue As Double)
If Not LuaGetParam(state, nIndex, dValue) Then
Return state.Error(" Invalid Parameter # " & nIndex)
End If
Return True
End Function
Friend Function LuaCheckParam(state As Lua, nIndex As Integer, ByRef sValue As String)
If Not LuaGetParam(state, nIndex, sValue) Then
Return state.Error(" Invalid Parameter # " & nIndex)
End If
Return True
End Function
Friend Function LuaGetParam(state As Lua, nIndex As Integer, ByRef bValue As Boolean) As Boolean
If Not state.IsBoolean(nIndex) Then Return False
bValue = state.ToBoolean(nIndex)
Return True
End Function
Friend Function LuaGetParam(state As Lua, nIndex As Integer, ByRef nValue As Integer) As Boolean
If Not state.IsNumber(nIndex) Then Return False
nValue = Math.Round(state.ToNumber(nIndex))
Return True
End Function
Friend Function LuaGetParam(state As Lua, nIndex As Integer, ByRef dValue As Double) As Boolean
If Not state.IsNumber(nIndex) Then Return False
dValue = state.ToNumber(nIndex)
Return True
End Function
Friend Function LuaGetParam(state As Lua, nIndex As Integer, ByRef sValue As String) As Boolean
If Not state.IsString(nIndex) Then Return False
sValue = state.ToString(nIndex)
Return True
End Function
Friend Function LuaSetParam(state As Lua) As Boolean
Try
state.PushNil()
Catch ex As Exception
Return False
End Try
Return True
End Function
Friend Function LuaSetParam(state As Lua, ByRef bValue As Boolean) As Boolean
Try
state.PushBoolean(bValue)
Catch ex As Exception
Return False
End Try
Return True
End Function
Friend Function LuaSetParam(state As Lua, ByRef nValue As Integer) As Boolean
Try
state.PushInteger(nValue)
Catch ex As Exception
Return False
End Try
Return True
End Function
Friend Function LuaSetParam(state As Lua, ByRef dValue As Double) As Boolean
Try
state.PushNumber(dValue)
Catch ex As Exception
Return False
End Try
Return True
End Function
Friend Function LuaSetParam(state As Lua, ByRef sValue As String) As Boolean
Try
state.PushString(sValue)
Catch ex As Exception
Return False
End Try
Return True
End Function
Friend Function LuaSetParam(state As Lua, ByRef sValue() As String) As Boolean
Try
Dim nSize As Integer = sValue.Count()
state.CreateTable(nSize, 0)
For nIndex = 0 To nSize - 1
state.PushString(sValue(nIndex))
state.RawSetInteger(-2, nIndex)
Next
Catch ex As Exception
Return False
End Try
Return True
End Function
Friend Function LuaGetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String, ByRef bValue As Boolean) As Boolean
If Not state.IsTable(nIndex) Then Return False
state.GetField(nIndex, sVarName)
Dim bResult As Boolean = LuaGetParam(state, -1, bValue)
state.Pop(1)
Return bResult
End Function
Friend Function LuaGetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String, ByRef nValue As Integer) As Boolean
If Not state.IsTable(nIndex) Then Return False
state.GetField(nIndex, sVarName)
Dim bResult As Boolean = LuaGetParam(state, -1, nValue)
state.Pop(1)
Return bResult
End Function
Friend Function LuaGetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String, ByRef dValue As Double) As Boolean
If Not state.IsTable(nIndex) Then Return False
state.GetField(nIndex, sVarName)
Dim bResult As Boolean = LuaGetParam(state, -1, dValue)
state.Pop(1)
Return bResult
End Function
Friend Function LuaGetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String, ByRef sValue As String) As Boolean
If Not state.IsTable(nIndex) Then Return False
state.GetField(nIndex, sVarName)
Dim bResult As Boolean = LuaGetParam(state, -1, sValue)
state.Pop(1)
Return bResult
End Function
Friend Function LuaGetGlobVar(state As Lua, ByRef sName As String, ByRef bValue As Boolean) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
state.GetGlobal(sName)
Dim bResult As Boolean = LuaGetParam(state, -1, bValue)
state.Pop(1)
Return bResult
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, bValue)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaGetGlobVar(state As Lua, ByRef sName As String, ByRef nValue As Integer) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
state.GetGlobal(sName)
Dim bResult As Boolean = LuaGetParam(state, -1, nValue)
state.Pop(1)
Return bResult
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, nValue)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaGetGlobVar(state As Lua, ByRef sName As String, ByRef dValue As Double) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
state.GetGlobal(sName)
Dim bResult As Boolean = LuaGetParam(state, -1, dValue)
state.Pop(1)
Return bResult
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, dValue)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaGetGlobVar(state As Lua, ByRef sName As String, ByRef sValue As String) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
state.GetGlobal(sName)
Dim bResult As Boolean = LuaGetParam(state, -1, sValue)
state.Pop(1)
Return bResult
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, sValue)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaSetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String) As Boolean
If Not state.IsTable(nIndex) Then Return False
If Not LuaSetParam(state) Then Return False
Dim nPos As Integer = (If(nIndex > 0, nIndex, nIndex - 1))
state.SetField(nPos, sVarName)
Return True
End Function
Friend Function LuaSetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String, ByRef bValue As Boolean) As Boolean
If Not state.IsTable(nIndex) Then Return False
If Not LuaSetParam(state, bValue) Then Return False
Dim nPos As Integer = (If(nIndex > 0, nIndex, nIndex - 1))
state.SetField(nPos, sVarName)
Return True
End Function
Friend Function LuaSetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String, ByRef nValue As Integer) As Boolean
If Not state.IsTable(nIndex) Then Return False
If Not LuaSetParam(state, nValue) Then Return False
Dim nPos As Integer = (If(nIndex > 0, nIndex, nIndex - 1))
state.SetField(nPos, sVarName)
Return True
End Function
Friend Function LuaSetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String, ByRef dValue As Double) As Boolean
If Not state.IsTable(nIndex) Then Return False
If Not LuaSetParam(state, dValue) Then Return False
Dim nPos As Integer = (If(nIndex > 0, nIndex, nIndex - 1))
state.SetField(nPos, sVarName)
Return True
End Function
Friend Function LuaSetTabFieldParam(state As Lua, nIndex As Integer, sVarName As String, ByRef sValue As String) As Boolean
If Not state.IsTable(nIndex) Then Return False
If Not LuaSetParam(state, sValue) Then Return False
Dim nPos As Integer = (If(nIndex > 0, nIndex, nIndex - 1))
state.SetField(nPos, sVarName)
Return True
End Function
Friend Function LuaSetGlobVar(state As Lua, ByRef sName As String, ByRef bValue As Boolean) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
If Not LuaSetParam(state, bValue) Then Return False
state.SetGlobal(sName)
Return True
' altrimenti campo di tabella
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaSetTabFieldParam(state, -1, sVarName, bValue)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaSetGlobVar(state As Lua, ByRef sName As String, ByRef nValue As Integer) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
If Not LuaSetParam(state, nValue) Then Return False
state.SetGlobal(sName)
Return True
' altrimenti campo di tabella
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaSetTabFieldParam(state, -1, sVarName, nValue)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaSetGlobVar(state As Lua, ByRef sName As String, ByRef dValue As Double) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
If Not LuaSetParam(state, dValue) Then Return False
state.SetGlobal(sName)
Return True
' altrimenti campo di tabella
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaSetTabFieldParam(state, -1, sVarName, dValue)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaSetGlobVar(state As Lua, ByRef sName As String, ByRef sValue As String) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
If Not LuaSetParam(state, sValue) Then Return False
state.SetGlobal(sName)
Return True
' altrimenti campo di tabella
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaSetTabFieldParam(state, -1, sVarName, sValue)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaResetGlobVar(state As Lua, ByRef sName As String) As Boolean
' se variabile standard
If Not sName.Contains("."c) Then
If Not LuaSetParam(state) Then Return False
state.SetGlobal(sName)
Return True
' altrimenti campo di tabella
Else
Dim sTableName As String = "", sVarName As String = ""
Dim sParams() As String = sName.Split("."c)
sTableName = sParams(0)
sVarName = sParams(1)
state.GetGlobal(sTableName)
Dim bResult As Boolean = LuaSetTabFieldParam(state, -1, sVarName)
state.Pop(1)
Return bResult
End If
End Function
Friend Function LuaCreateGlobTable(state As Lua, ByRef sName As String) As Boolean
Try
state.NewTable()
state.SetGlobal(sName)
Catch ex As Exception
Return False
End Try
Return True
End Function
End Module
+558
View File
@@ -0,0 +1,558 @@
Imports System.IO
Imports KeraLua
Imports StackExchange.Redis
Imports Effector.Plugin.Lib
Public Module Lua_General
' Lock per scrittura file di log
Private m_Lock_OutLog As New Object
Private m_sLogPath As String
Friend Sub SetLogPath(sPath As String)
m_sLogPath = sPath
End Sub
' da eliminare quando arriva funzione di libreria!!
Public Function EgtOutLog(sLogMsg As String) As Boolean
SyncLock (m_Lock_OutLog)
Using LogStreamWriter As StreamWriter = File.AppendText(m_sLogPath)
LogStreamWriter.WriteLine(DateTime.Now.ToLongTimeString() & " " & sLogMsg)
End Using
End SyncLock
Return True
End Function
Friend func_EntIs64bit As LuaFunction = AddressOf Lua_EntIs64bit
Friend func_EntOutLog As LuaFunction = AddressOf Lua_EntOutLog
Friend func_EntExistsDirectory As LuaFunction = AddressOf Lua_EntExistsDirectory
Friend func_EntFileExists As LuaFunction = AddressOf Lua_EntFileExists
Friend func_EntCopyFile As LuaFunction = AddressOf Lua_EntCopyFile
Friend func_EntGetIniFile As LuaFunction = AddressOf Lua_EntGetIniFile
Friend func_EntGetDataDir As LuaFunction = AddressOf Lua_EntGetDataDir
Friend func_EntGetNumberFromIni As LuaFunction = AddressOf Lua_EntGetNumberFromIni
Friend func_EntGetStringFromIni As LuaFunction = AddressOf Lua_EntGetStringFromIni
Friend func_EntWriteStringToIni As LuaFunction = AddressOf Lua_EntWriteStringToIni
Friend func_EntGetMainNumberFromIni As LuaFunction = AddressOf Lua_EntGetMainNumberFromIni
Friend func_EntGetMainStringFromIni As LuaFunction = AddressOf Lua_EntGetMainStringFromIni
Friend func_EntWriteMainStringToIni As LuaFunction = AddressOf Lua_EntWriteMainStringToIni
Friend func_EntSplitString As LuaFunction = AddressOf Lua_EntSplitString
Friend func_EntSleep As LuaFunction = AddressOf Lua_EntSleep
Friend func_EntDeleteFile As LuaFunction = AddressOf Lua_EntDeleteFile
Friend func_EntFileLength As LuaFunction = AddressOf Lua_EntFileLength
Friend func_EntExecProcess As LuaFunction = AddressOf Lua_EntExecProcess
Friend func_EntStateMachineOutText As LuaFunction = AddressOf Lua_EntStateMachineOutText
Friend func_RdsStringGet As LuaFunction = AddressOf Lua_RdsStringGet
Friend func_RdsStringSetAsync As LuaFunction = AddressOf Lua_RdsStringSetAsync
Friend func_RdsPublishAsync As LuaFunction = AddressOf Lua_RdsPublishAsync
Friend func_ComReadShortVar As LuaFunction = AddressOf Lua_ComReadShortVar
Friend func_ComWriteShortVar As LuaFunction = AddressOf Lua_ComWriteShortVar
Friend func_ComReadDoubleVar As LuaFunction = AddressOf Lua_ComReadDoubleVar
Friend func_ComWriteDoubleVar As LuaFunction = AddressOf Lua_ComWriteDoubleVar
Friend func_ComReadBitVar As LuaFunction = AddressOf Lua_ComReadBitVar
Friend func_ComWriteBitVar As LuaFunction = AddressOf Lua_ComWriteBitVar
Friend func_ComCopyFileToNc As LuaFunction = AddressOf Lua_ComCopyFileToNc
Private Function Lua_EntIs64bit(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
state.PushBoolean(Not IntPtr.Size = 4)
Return 1
End Function
Private Function Lua_EntOutLog(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 1 o 2 parametri : stringa da emettere [, DebugLevel = 0]
Dim sLogMsg As String = ""
Dim nDebugLevel As Integer = 0
LuaCheckParam(state, 1, sLogMsg)
LuaGetParam(state, 2, nDebugLevel)
LuaClearStack(state)
' accodo il messaggio nel file di log
EgtOutLog(sLogMsg)
' non c'è risultato
Return 0
End Function
Private Function Lua_EntExistsDirectory(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 1 parametro : sDir
Dim sDirectory As String = ""
LuaCheckParam(state, 1, sDirectory)
LuaClearStack(state)
Dim bResult As Boolean
Try
' verifico esistenza direttorio
bResult = Directory.Exists(sDirectory)
Catch ex As Exception
bResult = False
EgtOutLog("Lua_EntExistsDirectory on " & sDirectory & " failed! " & ex.Message)
End Try
' restituisco il risultato
LuaSetParam(state, bResult)
Return 1
End Function
Private Function Lua_EntFileExists(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 1 parametro : sDir
Dim sFilePath As String = ""
LuaCheckParam(state, 1, sFilePath)
LuaClearStack(state)
Dim bResult As Boolean
Try
' verifico esistenza direttorio
bResult = File.Exists(sFilePath)
Catch ex As Exception
bResult = False
EgtOutLog("Lua_EntExistsDirectory on " & sFilePath & " failed! " & ex.Message)
End Try
' restituisco il risultato
LuaSetParam(state, bResult)
Return 1
End Function
Private Function Lua_EntCopyFile(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 2 parametri : sFile, sNewFile
Dim sSourcePath As String = ""
Dim sDestinationPath As String = ""
LuaCheckParam(state, 1, sSourcePath)
LuaCheckParam(state, 2, sDestinationPath)
LuaClearStack(state)
Dim bResult As Boolean = False
Try
' copio il file
File.Copy(sSourcePath, sDestinationPath, True)
bResult = True
Catch ex As Exception
bResult = False
EgtOutLog("Lua_EntCopyFile from " & sSourcePath & " to " & sDestinationPath & " failed! " & ex.Message)
End Try
' restituisco il risultato
LuaSetParam(state, bResult)
Return 1
End Function
Private Function Lua_EntDeleteFile(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 2 parametri : sFile, sNewFile
Dim sSourcePath As String = ""
LuaCheckParam(state, 1, sSourcePath)
LuaClearStack(state)
Dim bResult As Boolean
Try
' copio il file
File.Delete(sSourcePath)
bResult = True
Catch ex As Exception
bResult = False
EgtOutLog("Lua_EntDeleteFile" & sSourcePath & " failed! " & ex.Message)
End Try
' restituisco il risultato
LuaSetParam(state, bResult)
Return 1
End Function
Private Function Lua_EntGetIniFile(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' restituisco il risultato
LuaSetParam(state, IniFile.sPath)
Return 1
End Function
Private Function Lua_EntGetDataDir(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' restituisco il risultato
LuaSetParam(state, Map.refMainWindowVM.MainWindowM.sDataRoot)
Return 1
End Function
Private Function Lua_EntGetNumberFromIni(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, dDef, sIniFile
Dim sSec As String = ""
Dim sKey As String = ""
Dim dDef As Integer = 0
Dim sIniFile As String = ""
LuaCheckParam(state, 1, sSec)
LuaCheckParam(state, 2, sKey)
LuaCheckParam(state, 3, dDef)
LuaCheckParam(state, 4, sIniFile)
LuaClearStack(state)
Dim dResult As Double = GetPrivateProfileDouble(sSec, sKey, dDef, sIniFile)
' restituisco il risultato
LuaSetParam(state, dResult)
Return 1
End Function
Private Function Lua_EntGetStringFromIni(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, sDef, sIniFile
Dim sSec As String = ""
Dim sKey As String = ""
Dim sDef As String = 0
Dim sIniFile As String = ""
LuaCheckParam(state, 1, sSec)
LuaCheckParam(state, 2, sKey)
LuaCheckParam(state, 3, sDef)
LuaCheckParam(state, 4, sIniFile)
LuaClearStack(state)
Dim sResult As String = ""
GetPrivateProfileString(sSec, sKey, sDef, sResult, sIniFile)
' restituisco il risultato
LuaSetParam(state, sResult)
Return 1
End Function
Private Function Lua_EntWriteStringToIni(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, sVal, sIniFile
Dim sSec As String = ""
Dim sKey As String = ""
Dim sVal As Integer = 0
Dim sIniFile As String = ""
LuaCheckParam(state, 1, sSec)
LuaCheckParam(state, 2, sKey)
LuaCheckParam(state, 3, sVal)
LuaCheckParam(state, 4, sIniFile)
LuaClearStack(state)
Dim bResult As Boolean = WritePrivateProfileString(sSec, sKey, sVal, sIniFile)
' restituisco il risultato
LuaSetParam(state, bResult)
Return 1
End Function
Private Function Lua_EntGetMainNumberFromIni(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, dDef, sIniFile
Dim sSec As String = ""
Dim sKey As String = ""
Dim dDef As Integer = 0
LuaCheckParam(state, 1, sSec)
LuaCheckParam(state, 2, sKey)
LuaCheckParam(state, 3, dDef)
LuaClearStack(state)
Dim dResult As Double = GetMainPrivateProfileDouble(sSec, sKey, dDef)
' restituisco il risultato
LuaSetParam(state, dResult)
Return 1
End Function
Private Function Lua_EntGetMainStringFromIni(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, sDef, sIniFile
Dim sSec As String = ""
Dim sKey As String = ""
Dim sDef As String = 0
LuaCheckParam(state, 1, sSec)
LuaCheckParam(state, 2, sKey)
LuaCheckParam(state, 3, sDef)
LuaClearStack(state)
Dim sResult As String = ""
GetMainPrivateProfileString(sSec, sKey, sDef, sResult)
' restituisco il risultato
LuaSetParam(state, sResult)
Return 1
End Function
Private Function Lua_EntWriteMainStringToIni(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, sVal, sIniFile
Dim sSec As String = ""
Dim sKey As String = ""
Dim sVal As Integer = 0
LuaCheckParam(state, 1, sSec)
LuaCheckParam(state, 2, sKey)
LuaCheckParam(state, 3, sVal)
LuaClearStack(state)
Dim bResult As Boolean = WriteMainPrivateProfileString(sSec, sKey, sVal)
' restituisco il risultato
LuaSetParam(state, bResult)
Return 1
End Function
Private Function Lua_EntSplitString(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, sVal, sIniFile
Dim sVal As String = ""
Dim sSeparator As Char = ","c
LuaCheckParam(state, 1, sVal)
LuaGetParam(state, 2, sSeparator)
LuaClearStack(state)
Dim sSplitString() As String = sVal.Split(sSeparator)
' restituisco il risultato
LuaSetParam(state, sSplitString)
Return 1
End Function
Private Function Lua_EntSleep(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, sVal, sIniFile
Dim nSleepTime As Integer = 0
LuaCheckParam(state, 1, nSleepTime)
LuaClearStack(state)
Threading.Thread.Sleep(nSleepTime)
Return 0
End Function
Private Function Lua_EntFileLength(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
' 4 parametri: sSec, sKey, sVal, sIniFile
Dim sFilePath As String = 0
LuaCheckParam(state, 1, sFilePath)
LuaClearStack(state)
If String.IsNullOrWhiteSpace(sFilePath) Then Return 0
Dim FileInfo As New FileInfo(sFilePath)
If IsNothing(FileInfo) Then Return 0
LuaSetParam(state, FileInfo.Length)
Return 1
End Function
Private Function Lua_RdsStringGet(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
If IsNothing(Map.refMainWindowVM.RedisManager) OrElse IsNothing(Map.refMainWindowVM.RedisManager.Subscriber) Then
EgtOutLog("Error! Trying to get string from a non existent redis!")
LuaSetParam(state)
Return 1
End If
' 1 parametro: sKey
Dim sKey As String = ""
LuaCheckParam(state, 1, sKey)
LuaClearStack(state)
Dim Result As RedisValue
Result = Map.refMainWindowVM.RedisManager.RedisDb.StringGet(sKey)
' restituisco il risultato
LuaSetParam(state, Result)
Return 1
End Function
Private Function Lua_RdsStringSetAsync(ByVal p As IntPtr) As Integer
If IsNothing(Map.refMainWindowVM.RedisManager) OrElse IsNothing(Map.refMainWindowVM.RedisManager.Subscriber) Then
EgtOutLog("Error! Trying to set string on a non existent redis!")
Return 0
End If
Dim state = Lua.FromIntPtr(p)
' 2 parametri: sKey, sVal
Dim sKey As String = ""
Dim sVal As String = 0
LuaCheckParam(state, 1, sKey)
LuaCheckParam(state, 2, sVal)
LuaClearStack(state)
Map.refMainWindowVM.RedisManager.RedisDb.StringSetAsync(sKey, sVal)
Return 0
End Function
Private Function Lua_RdsPublishAsync(ByVal p As IntPtr) As Integer
If IsNothing(Map.refMainWindowVM.RedisManager) OrElse IsNothing(Map.refMainWindowVM.RedisManager.Subscriber) Then
EgtOutLog("Error! Trying to publish on a non existent redis!")
Return 0
End If
Dim state = Lua.FromIntPtr(p)
' 2 parametri: sKey, sVal
Dim sChannel As String = ""
Dim sMessage As String = 0
LuaCheckParam(state, 1, sChannel)
LuaCheckParam(state, 2, sMessage)
LuaClearStack(state)
Map.refMainWindowVM.RedisManager.Subscriber.PublishAsync(sChannel, sMessage)
Return 0
End Function
Private Function Lua_ComReadShortVar(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim nVarAddr As Integer = 0
Dim nMachine As Integer = 0
LuaCheckParam(state, 1, nVarAddr)
LuaCheckParam(state, 2, nMachine)
LuaClearStack(state)
Dim Machine As NGP_COMM_DLL.NC.NC_generic = Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)
Dim nResult As Short = 0
If Machine.ReadShortVar(nVarAddr, nResult) Then
state.PushInteger(nResult)
Return 1
Else
EgtOutLog("Error reading variable " & nVarAddr & " on machine " & nMachine & ": " & Machine.ErrMsg)
Return 0
End If
End Function
Private Function Lua_ComReadBitVar(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim nVarAddr As Integer = 0
Dim nBit As Integer = 0
Dim nMachine As Integer = 0
LuaCheckParam(state, 1, nVarAddr)
LuaCheckParam(state, 2, nBit)
LuaCheckParam(state, 3, nMachine)
LuaClearStack(state)
Dim Machine As NGP_COMM_DLL.NC.NC_generic = Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)
Dim bResult As Boolean = 0
If Machine.ReadBitVar(nVarAddr, nBit, bResult) Then
state.PushBoolean(bResult)
Return 1
Else
EgtOutLog("Error reading variable " & nVarAddr & " on machine " & nMachine & ": " & Machine.ErrMsg)
Return 0
End If
End Function
Private Function Lua_ComReadDoubleVar(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim nVarAddr As Integer = 0
Dim nMachine As Integer = 0
LuaCheckParam(state, 1, nVarAddr)
LuaCheckParam(state, 2, nMachine)
LuaClearStack(state)
Dim Machine As NGP_COMM_DLL.NC.NC_generic = Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)
Dim dResult As Double = 0
If Machine.ReadDoubleVar(nVarAddr, dResult) Then
state.PushNumber(dResult)
Return 1
Else
EgtOutLog("Error reading variable " & nVarAddr & " on machine " & nMachine & ": " & Machine.ErrMsg)
Return 0
End If
End Function
Private Function Lua_ComWriteShortVar(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim nVarAddr As Integer = 0
Dim nValue As Integer = 0
Dim nMachine As Integer = 0
LuaCheckParam(state, 1, nVarAddr)
LuaCheckParam(state, 2, nValue)
LuaCheckParam(state, 3, nMachine)
LuaClearStack(state)
Dim Machine As NGP_COMM_DLL.NC.NC_generic = Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)
If Machine.WriteShortVar(nVarAddr, nValue) Then
state.PushBoolean(True)
Return 1
Else
EgtOutLog("Error writing " & nValue & " on variable " & nVarAddr & " on machine " & nMachine & ": " & Machine.ErrMsg)
Return 0
End If
End Function
Private Function Lua_ComWriteBitVar(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim nVarAddr As Integer = 0
Dim nBit As Integer = 0
Dim bValue As Boolean = 0
Dim nMachine As Integer = 0
LuaCheckParam(state, 1, nVarAddr)
LuaCheckParam(state, 2, nBit)
LuaCheckParam(state, 3, bValue)
LuaCheckParam(state, 4, nMachine)
LuaClearStack(state)
Dim Machine As NGP_COMM_DLL.NC.NC_generic = Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)
If Machine.WriteBitVar(nVarAddr, nBit, bValue) Then
state.PushBoolean(True)
Return 1
Else
EgtOutLog("Error writing " & bValue & " on variable " & nVarAddr & " on machine " & nMachine & ": " & Machine.ErrMsg)
Return 0
End If
End Function
Private Function Lua_ComWriteDoubleVar(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim nVarAddr As Integer = 0
Dim dValue As Double = 0
Dim nMachine As Integer = 0
LuaCheckParam(state, 1, nVarAddr)
LuaCheckParam(state, 2, dValue)
LuaCheckParam(state, 3, nMachine)
LuaClearStack(state)
Dim Machine As NGP_COMM_DLL.NC.NC_generic = Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)
If Machine.WriteDoubleVar(nVarAddr, dValue) Then
state.PushBoolean(True)
Return 1
Else
EgtOutLog("Error writing " & dValue & " on variable " & nVarAddr & " on machine " & nMachine & ": " & Machine.ErrMsg)
Return 0
End If
End Function
Private Function Lua_ComCopyFileToNc(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim sSourcePath As String = ""
Dim sDestPath As String = ""
Dim nMachine As Integer = 0
LuaCheckParam(state, 1, sSourcePath)
LuaCheckParam(state, 2, sDestPath)
LuaCheckParam(state, 3, nMachine)
LuaClearStack(state)
Dim Machine As NGP_COMM_DLL.NC.NC_generic = Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)
If Machine.CopyFileToNc(sSourcePath, sDestPath) Then
state.PushBoolean(True)
Return 1
Else
EgtOutLog("Copy file " & sSourcePath & " to " & sDestPath & " failed! Error: " & Machine.ErrMsg)
Return 0
End If
End Function
Private Function Lua_EntExecProcess(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim sFileName As String = ""
Dim sMainLuaPath As String = ""
Dim sArguments As String = ""
LuaCheckParam(state, 1, sFileName)
LuaCheckParam(state, 2, sMainLuaPath)
LuaCheckParam(state, 3, sArguments)
LuaClearStack(state)
If ExecProcessManager.ExecProcess(sFileName, sMainLuaPath, sArguments) Then
state.PushBoolean(True)
Return 1
Else
Return 0
End If
End Function
Private Function Lua_EntStateMachineOutText(ByVal p As IntPtr) As Integer
Dim state = Lua.FromIntPtr(p)
Dim sMessage As String = ""
Dim nStateMachine As Integer = 0
LuaCheckParam(state, 1, sMessage)
LuaCheckParam(state, 2, nStateMachine)
LuaClearStack(state)
Dim StateMachine As FiniteStateMachine = Map.refMainWindowVM.FiniteStateMachineManager.FiniteStateMachineList(nStateMachine - 1)
StateMachine.SetMessageText(sMessage)
Return 0
End Function
Friend Function LuaInstallGeneral(state As Lua) As Boolean
If IsNothing(state) Then Return False
state.Register("EntIs64bit", func_EntIs64bit)
state.Register("EntOutLog", func_EntOutLog)
state.Register("EntExistsDirectory", func_EntExistsDirectory)
state.Register("EntFileExists", func_EntFileExists)
state.Register("EntCopyFile", func_EntCopyFile)
state.Register("EntGetIniFile", func_EntGetIniFile)
state.Register("EntGetDataDir", func_EntGetDataDir)
state.Register("EntGetNumberFromIni", func_EntGetNumberFromIni)
state.Register("EntGetStringFromIni", func_EntGetStringFromIni)
state.Register("EntWriteStringToIni", func_EntWriteStringToIni)
state.Register("EntGetMainNumberFromIni", func_EntGetMainNumberFromIni)
state.Register("EntGetMainStringFromIni", func_EntGetMainStringFromIni)
state.Register("EntWriteMainStringToIni", func_EntWriteMainStringToIni)
state.Register("EntSplitString", func_EntSplitString)
state.Register("EntSleep", func_EntSleep)
state.Register("EntFileLength", func_EntFileLength)
state.Register("EntDeleteFile", func_EntDeleteFile)
state.Register("EntExecProcess", func_EntExecProcess)
state.Register("EntStateMachineOutText", func_EntStateMachineOutText)
state.Register("RdsStringGet", func_RdsStringGet)
state.Register("RdsStringSetAsync", func_RdsStringSetAsync)
state.Register("RdsPublishAsync", func_RdsPublishAsync)
state.Register("ComReadShortVar", func_ComReadShortVar)
state.Register("ComWriteShortVar", func_ComWriteShortVar)
state.Register("ComReadDoubleVar", func_ComReadDoubleVar)
state.Register("ComWriteDoubleVar", func_ComWriteDoubleVar)
state.Register("ComReadBitVar", func_ComReadBitVar)
state.Register("ComWriteBitVar", func_ComWriteBitVar)
state.Register("ComCopyFileToNc", func_ComCopyFileToNc)
Return True
End Function
End Module
+82
View File
@@ -0,0 +1,82 @@
Imports System.ComponentModel.Composition
Imports System.ComponentModel.Composition.Hosting
Imports Effector.Plugin.Interface
Public Class MEFLoader
Private importers As Dictionary(Of String, List(Of Object)) = New Dictionary(Of String, List(Of Object))()
Public Overridable Function LoadByTag(Of T)(ByVal path As String, ByVal tag As String) As ICollection(Of T)
Dim importer = GetImporter(Of T)(path)
Return importer.LoadByMEF(path, tag)
End Function
Protected Function GetImporter(Of T)(ByVal path As String) As MEFImporter(Of T)
Dim importerList = GetImporterList(path)
Dim importer = importerList.OfType(Of MEFImporter(Of T))().FirstOrDefault()
If importer Is Nothing Then
importer = New MEFImporter(Of T)(path)
importerList.Add(importer)
End If
Return importer
End Function
Protected Function GetImporterList(ByVal path As String) As List(Of Object)
If importers.ContainsKey(path) = False Then importers.Add(path, New List(Of Object)())
Return importers(path)
End Function
Public Overridable Function LoadByType(Of T)(ByVal path As String) As ICollection(Of T)
Return LoadByTag(Of T)(path, String.Empty)
End Function
End Class
Public Interface IMetadata
ReadOnly Property Name As String
End Interface
Public Class MEFImporter(Of T)
<ImportMany(AllowRecomposition:=True)>
Public Property [imports] As IEnumerable(Of Lazy(Of T, IMetadata))
<Export>
Public Property SupervisorFunctions As IHost
Private Sub New()
End Sub
Public Sub New(ByVal path As String)
Me.New()
directoryCatalog = New DirectoryCatalog(path)
End Sub
Protected directoryCatalog As DirectoryCatalog = Nothing
Protected Sub DoImport(ByVal path As String)
Dim catalog = New AggregateCatalog()
catalog.Catalogs.Add(directoryCatalog)
'catalog.Catalogs.Add(New AssemblyCatalog(System.Reflection.Assembly.GetCallingAssembly()))
catalog.Catalogs.Add(New AssemblyCatalog(System.Reflection.Assembly.GetExecutingAssembly()))
Dim container As CompositionContainer = New CompositionContainer(catalog)
Me.SupervisorFunctions = New SupervisorFunctions
container.ComposeParts(Me)
End Sub
Public Function LoadByMEF(ByVal path As String, ByVal name As String) As ICollection(Of T)
Dim res = New List(Of T)()
DoImport(path)
For Each [module] As Lazy(Of T, IMetadata) In [imports]
If [module].Metadata.Name = name OrElse String.IsNullOrEmpty(name) Then
res.Add([module].Value)
End If
Next
Return res
End Function
End Class
@@ -0,0 +1,97 @@
Imports System.ComponentModel.Composition
Imports Effector.Plugin.Lib
Imports Effector.Plugin.Interface
Public Class SupervisorFunctions
Implements IHost
Public ReadOnly Property PluginTestInfo As Integer Implements IHost.PluginTestInfo
Get
Return Map.refMainWindowVM.m_PluginTestInfo
End Get
End Property
Public Function PlgOutLog(sLogMsg As String) As Boolean Implements IHost.PlgOutLog
Return EgtOutLog(sLogMsg)
End Function
Public Function PlgGetPrivateProfileInt(lpAppName As String, lpKeyName As String, nDefault As Integer) As Integer Implements IHost.PlgGetPrivateProfileInt
Return GetMainPrivateProfileInt(lpAppName, lpKeyName, nDefault)
End Function
Public Function PlgGetPrivateProfileDouble(lpAppName As String, lpKeyName As String, dDefault As Double) As Double Implements IHost.PlgGetPrivateProfileDouble
Return GetMainPrivateProfileDouble(lpAppName, lpKeyName, dDefault)
End Function
Public Function PlgGetPrivateProfileString(lpAppName As String, lpKeyName As String, lpDefault As String, ByRef lpString As String) As Integer Implements IHost.PlgGetPrivateProfileString
Return GetMainPrivateProfileString(lpAppName, lpKeyName, lpDefault, lpString)
End Function
Public Function PlgWritePrivateProfileString(lpAppName As String, lpKeyName As String, lpString As String) As Boolean Implements IHost.PlgWritePrivateProfileString
Return WriteMainPrivateProfileString(lpAppName, lpKeyName, lpString)
End Function
Public Function PlgExecProcess(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean Implements IHost.PlgExecProcess
Return ExecProcessManager.ExecProcess(sFileName, sMainLuaPath, sArguments)
End Function
Public Function PlgExecProcessAsync(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean Implements IHost.PlgExecProcessAsync
Return ExecProcessManager.ExecProcessAsync(sFileName, sMainLuaPath, sArguments)
End Function
Public Function PlgCheckExecProcessAsync(ByRef bHasExited As Boolean, ByRef nExitCode As Integer) As Boolean Implements IHost.PlgCheckExecProcessAsync
Return ExecProcessManager.CheckExecProcessAsync(bHasExited, nExitCode)
End Function
Public Function ComReadShortVar(nVarAddr As Integer, ByRef nResult As Short, nMachine As Integer) As Boolean Implements IHost.ComReadShortVar
If Map.refMainWindowVM.MachineManager.MachineList.Count >= nMachine AndAlso Not IsNothing(Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)) Then
Return Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).ReadShortVar(nVarAddr, nResult)
Else
EgtOutLog("Error reading variable " & nVarAddr & " on machine " & nMachine & ": " & Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).ErrMsg)
Return False
End If
End Function
Public Function ComReadBitVar(nVarAddr As Integer, nBit As Integer, ByRef bResult As Boolean, nMachine As Integer) As Boolean Implements IHost.ComReadBitVar
If Map.refMainWindowVM.MachineManager.MachineList.Count >= nMachine AndAlso Not IsNothing(Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)) Then
Return Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).ReadBitVar(nVarAddr, nBit, bResult)
Else
EgtOutLog("Error reading variable " & nVarAddr & " on machine " & nMachine & ": " & Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).ErrMsg)
Return False
End If
End Function
Public Function ComReadDoubleVar(nVarAddr As Integer, ByRef dResult As Double, nMachine As Integer) As Boolean Implements IHost.ComReadDoubleVar
If Map.refMainWindowVM.MachineManager.MachineList.Count >= nMachine AndAlso Not IsNothing(Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)) Then
Return Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).ReadDoubleVar(nVarAddr, dResult)
Else
EgtOutLog("Error reading variable " & nVarAddr & " on machine " & nMachine & ": " & Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).ErrMsg)
Return False
End If
End Function
Public Function ComWriteShortVar(nVarAddr As Integer, nValue As Integer, nMachine As Integer) As Boolean Implements IHost.ComWriteShortVar
If Map.refMainWindowVM.MachineManager.MachineList.Count >= nMachine AndAlso Not IsNothing(Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)) Then
Return Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).WriteShortVar(nVarAddr, nValue)
Else
Return False
End If
End Function
Public Function ComWriteBitVar(nVarAddr As Integer, nBit As Integer, bValue As Boolean, nMachine As Integer) As Boolean Implements IHost.ComWriteBitVar
If Map.refMainWindowVM.MachineManager.MachineList.Count >= nMachine AndAlso Not IsNothing(Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)) Then
Return Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).WriteBitVar(nVarAddr, nBit, bValue)
Else
Return False
End If
End Function
Public Function ComWriteDoubleVar(nVarAddr As Integer, dValue As Double, nMachine As Integer) As Boolean Implements IHost.ComWriteDoubleVar
If Map.refMainWindowVM.MachineManager.MachineList.Count >= nMachine AndAlso Not IsNothing(Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1)) Then
Return Map.refMainWindowVM.MachineManager.MachineList(nMachine - 1).WriteDoubleVar(nVarAddr, dValue)
Else
Return False
End If
End Function
End Class
+341
View File
@@ -0,0 +1,341 @@
Imports System.Threading
Imports System.Math
Imports System.IO
Imports Effector.Plugin.Lib
Public Class MainWindowM
#Region "FIELDS"
' massimo numero di istanze del programma ammesse
Const MAX_INST As Integer = 1
Private m_objMutex As Mutex
Private m_sDataRoot As String = String.Empty
Friend ReadOnly Property sDataRoot As String
Get
Return m_sDataRoot
End Get
End Property
Private m_sDataDir As String = String.Empty
Friend ReadOnly Property sDataDir As String
Get
Return m_sDataDir
End Get
End Property
Private m_sConfigDir As String = String.Empty
Public ReadOnly Property sConfigDir As String
Get
Return m_sConfigDir
End Get
End Property
Private m_sScriptDir As String = String.Empty
Public ReadOnly Property sScriptDir As String
Get
Return m_sScriptDir
End Get
End Property
Private m_nDebug As Integer = 0
Public ReadOnly Property DebugLevel As Integer
Get
Return m_nDebug
End Get
End Property
Private m_bFirstInstance As Boolean = False
Friend ReadOnly Property bFirstInstance As Boolean
Get
Return m_bFirstInstance
End Get
End Property
Private m_nInstance As Integer = 0
Friend ReadOnly Property nInstance As Integer
Get
Return m_nInstance
End Get
End Property
Private m_nUserLevel As Integer = 1
Friend ReadOnly Property nUserLevel As Integer
Get
Return m_nUserLevel
End Get
End Property
Private m_nKeyLevel As Integer = 0
Friend ReadOnly Property nKeyLevel As Integer
Get
Return m_nKeyLevel
End Get
End Property
Private m_nKeyOpt1 As UInteger = 0
Friend ReadOnly Property nKeyOpt1 As Integer
Get
Return m_nKeyOpt1
End Get
End Property
Private m_nKeyOpt2 As UInteger = 0
Friend ReadOnly Property nKeyOpt2 As Integer
Get
Return m_nKeyOpt2
End Get
End Property
Friend ReadOnly Property sVersion As String
Get
Return My.Application.Info.Version.Major.ToString() & "." &
My.Application.Info.Version.Minor.ToString() &
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString()
End Get
End Property
Private m_sTempDir As String
Friend ReadOnly Property sTempDir As String
Get
Return m_sTempDir
End Get
End Property
Private m_sResourcesRoot As String
Friend ReadOnly Property sResourcesRoot As String
Get
Return m_sResourcesRoot
End Get
End Property
Private m_sLogFile As String
Friend ReadOnly Property sLogFile As String
Get
Return m_sLogFile
End Get
End Property
#End Region ' FIELDS
#Region "CONSTRUCTOR"
Sub New()
InitializeEgtEnvironment()
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Private Sub InitializeEgtEnvironment()
' 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
' Impostazione direttorio di configurazione
m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
' Impostazione direttorio per file script
m_sScriptDir = m_sDataRoot & "\" & SCRIPT_DIR
' Impostazione direttorio per file temporanei
m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
' Impostazione path Ini file
IniFile.SetIniFile(m_sConfigDir & "\" & INI_FILE_NAME)
' Impostazione path resources dir
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
' Verifico indice di istanza
ManageInstance()
' inizializzo log
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
Lua_General.SetLogPath(m_sLogFile)
If File.Exists(m_sLogFile) Then
Try
File.Copy(m_sLogFile, m_sLogFile & ".bak", True)
File.Delete(m_sLogFile)
Catch ex As Exception
EgtOutLog("Old log delete failed!" & ex.Message)
End Try
End If
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
My.Application.Info.Title.ToString() & " ver. " &
My.Application.Info.Version.Major.ToString() &
"." & My.Application.Info.Version.Minor.ToString() &
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString()
EgtOutLog(sLogMsg)
' Leggo lingua corrente
Dim sLanguage As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_MESSAGES, "", sLanguage)
' Recupero nome file dei messaggi della lingua corrente
Dim sMsgName As String = "Eng.txt"
Dim nIndex As Integer = 1
Dim ReadLanguage As Language = GetMainPrivateProfileLanguage(S_LANGUAGES, nIndex)
While Not IsNothing(ReadLanguage)
If String.Compare(ReadLanguage.Name, sLanguage, True) = 0 Then
sMsgName = ReadLanguage.FilePath
Exit While
End If
nIndex += 1
ReadLanguage = GetMainPrivateProfileLanguage(S_LANGUAGES, nIndex)
End While
' recupero file messaggi
Dim sMsgFilePath As String = m_sDataRoot & "\" & MSG_DIR & "\" & sMsgName
' verifico se c'e' un plugin
Dim sPluginName As String = ""
If GetMainPrivateProfileString(S_GENERAL, K_PLUGINNAME, "", sPluginName) > 0 AndAlso Not String.IsNullOrWhiteSpace(sPluginName) Then
' recupero nome del file messaggi del plugin
Dim sPlugInMsgFilePath As String = m_sDataRoot & "\Plugin\" & sPluginName & "\Messages\" & sMsgName
If File.Exists(sPlugInMsgFilePath) Then
Dim OrigMsgFile As List(Of String) = File.ReadAllLines(sMsgFilePath).ToList()
' elimino eventuali righe vuote o commento di fine
While String.IsNullOrWhiteSpace(OrigMsgFile.Last()) OrElse OrigMsgFile.Last().StartsWith("//")
OrigMsgFile.RemoveAt(OrigMsgFile.Count - 1)
End While
Dim PluginMsgFile As List(Of String) = File.ReadAllLines(sPlugInMsgFilePath).ToList()
' elimino eventuale riga di inizio file
If PluginMsgFile.Count > 1 AndAlso PluginMsgFile(1).StartsWith("//") AndAlso PluginMsgFile(0).StartsWith("//") Then
PluginMsgFile.RemoveAt(0)
End If
OrigMsgFile.AddRange(PluginMsgFile)
Dim sNewMsgFilePath As String = m_sDataRoot & "\Plugin\" & sPluginName & "\Messages\Complete" & sMsgName
Dim bNewMsgFile As Boolean = False
Try
File.WriteAllLines(sNewMsgFilePath, OrigMsgFile)
bNewMsgFile = True
Catch ex As Exception
End Try
If bNewMsgFile Then
sMsgFilePath = sNewMsgFilePath
End If
End If
End If
' Leggo file messaggi
If Not EgtLoadMessages(sMsgFilePath) Then
EgtOutLog("Error in EgtLoadMessages")
End If
' Gestione della chiave di protezione
Dim sLicFileName As String = ""
GetMainPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
Dim sLicFile As String = sConfigDir & "\" & sLicFileName
Dim sKey As String = ""
GenInterface.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(7375, 2706, 1, m_nKeyLevel) And
EgtGetKeyOptions(7375, 2706, 1, m_nKeyOpt1, m_nKeyOpt2)
If Not bKey Then
EgtOutLog("Key or Licence Problem (" & (-nKeyLevel).ToString() & ")")
MessageBox.Show(String.Format(EgtMsg(201), (-nKeyLevel).ToString()), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog("Exit")
End
End If
'EgtInit(m_nDebug, m_sLogFile, sLogMsg)
'EgtSetTempDir(m_sTempDir)
'EgtSetIniFile(IniFile.m_sIniFile)
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
'Dim sMsgDir As String = String.Empty
'If GetMainPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
' sMsgDir = m_sConfigDir
'End If
'' Inizializzo OptionModule
''OptionModule.InitOptionModule()
' Leggo e imposto livello utilizzatore
' m_nUserLevel = Math.Min(m_nKeyLevel, GetMainPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Info su opzioni chiave
'EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
' inizializzo ambiente Lua
LuaManager.Init()
End Sub
Private Sub ManageInstance()
Dim bCreated As Boolean
Try
m_objMutex = New Mutex(False, "Global\Effector", bCreated)
Catch
bCreated = False
End Try
m_bFirstInstance = bCreated
If bCreated Then
' Prima istanza
m_nInstance = 1
' Aggiorno stato istanze attive
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, m_nInstance.ToString())
Else
' Leggo il massimo numero di istanze ammesse
Dim nMaxInst As Integer = GetMaxInstances()
' Cerco il primo indice di istanza libero
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
m_nInstance = 1
Dim nMask As Integer = 1
While (nTmp And nMask) <> 0 And m_nInstance <= MAX_INST
m_nInstance += 1
nMask *= 2
End While
' Se l'indice supera il massimo
If m_nInstance > nMaxInst Then
' porto in primo piano la prima istanza
Dim bFound As Boolean = False
' processi del programma a 32 bit
Dim localProc As Process() = Process.GetProcessesByName("EffectorR32")
For Each p As Process In localProc
If p.Id <> Process.GetCurrentProcess().Id Then
bFound = True
ShowWindow(p.MainWindowHandle, 1)
Exit For
End If
Next
' se non trovati processi a 32 bit provo a 64 bit
If Not bFound Then
localProc = Process.GetProcessesByName("EffectorR64")
For Each p As Process In localProc
If p.Id <> Process.GetCurrentProcess().Id Then
bFound = True
ShowWindow(p.MainWindowHandle, SW.RESTORE)
Exit For
End If
Next
End If
' esco dal programma
End
End If
' Aggiorno stato istanze attive
nTmp += (1 << (m_nInstance - 1))
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
End If
End Sub
Friend Function GetKeyOption1(nKeyOpt1 As Integer) As Boolean
Return (m_nKeyOpt1 >= nKeyOpt1)
End Function
Friend Function GetKeyOption2(nKeyOpt2 As Integer) As Boolean
Return (m_nKeyOpt2 = nKeyOpt2)
End Function
Friend Function GetMaxInstances() As Integer
' Leggo il massimo numero di istanze ammesse
' Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXINST, 1)
Return 1 ' Max(1, Min(nMaxInst, MAX_INST))
End Function
Friend Sub Close()
'' Terminazione generale di EgtInterface
'EgtExit()
' Aggiorno istanze usate
m_objMutex.WaitOne(1000)
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (m_nInstance - 1))
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
End Sub
#End Region ' METHODS
End Class
+18
View File
@@ -0,0 +1,18 @@
<Lib:EffectorWindow 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:Effector.Main"
xmlns:Lib="clr-namespace:Effector.Plugin.Lib;assembly=Effector.Plugin.Lib"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
TitleBarHeight="40"
Title="{Binding sTitle}"
TitlePanel="{Binding ContentMenu}">
<Window.OpacityMask>
<SolidColorBrush Color="White" Opacity="{Binding Window_Opacity}"/>
</Window.OpacityMask>
<ContentControl Grid.Row="1"
Content="{Binding ContentPanel}"
BorderThickness="0"/>
</Lib:EffectorWindow>
@@ -0,0 +1,54 @@
Imports System.IO
Imports System.Runtime.CompilerServices
Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Windows.Interop
Imports System.Xml
Imports System.Xml.Serialization
Imports Effector.Plugin.Lib
Class MainWindowV
Private m_MainWindowVM As MainWindowVM
#Region "CONSTRUCTOR"
Sub New()
m_MainWindowVM = New MainWindowVM
' Funzione che interpreta l'xaml
InitializeComponent()
' Assegno al DataContext il VM appena creato
Me.DataContext = m_MainWindowVM
'AddHandler Me.ContentRendered, AddressOf MainWindowV_ContentRendered
' imposto posizione finestra
Me.SetPlacementAppName(S_GENERAL)
Me.SetPlacementKeyName(K_WINPLACE)
Me.SetPlacementFileName(IniFile.sPath)
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
#End Region ' METHODS
#Region "EVENTS"
Protected Overrides Sub OnContentRendered(e As EventArgs)
MyBase.OnContentRendered(e)
m_MainWindowVM.ContentRendered()
End Sub
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs)
m_MainWindowVM.ContentRendered()
End Sub
Public Overrides Sub OnCloseButtonClick(ByVal sender As Object, ByVal e As RoutedEventArgs)
If m_MainWindowVM.OnClose() Then
EgtOutLog("Exit")
Me.Close()
End If
End Sub
#End Region ' EVENTS
End Class
+179
View File
@@ -0,0 +1,179 @@
Imports System.Windows.Threading
Imports Effector.Plugin.Lib
Imports Effector.Plugin.Interface
Public Class MainWindowVM
Inherits VMBase
Friend m_PluginTestInfo As Integer = 764
' Riferimento al Model della MainWindow
Private m_MainWindowM As MainWindowM
Friend ReadOnly Property MainWindowM As MainWindowM
Get
Return m_MainWindowM
End Get
End Property
' Riferimento al gestore delle macchine a stati
Private m_FiniteStateMachineManager As FiniteStateMachineManager
Friend ReadOnly Property FiniteStateMachineManager As FiniteStateMachineManager
Get
Return m_FiniteStateMachineManager
End Get
End Property
' Riferimento al gestore del della comunicazione macchine
Private m_MachineManager As MachineManager
Friend ReadOnly Property MachineManager As MachineManager
Get
Return m_MachineManager
End Get
End Property
' Riferimento al gestore del server Redis
Private m_RedisManager As RedisManager
Friend ReadOnly Property RedisManager As RedisManager
Get
Return m_RedisManager
End Get
End Property
Private m_ContentPanel As Panel
Public ReadOnly Property ContentPanel As Panel
Get
Return m_ContentPanel
End Get
End Property
Private m_ContentMenu As Panel
Public ReadOnly Property ContentMenu As Panel
Get
Return m_ContentMenu
End Get
End Property
Private m_SplashScreen_Timer As New DispatcherTimer
Private m_WaitAfterRender As Integer = 0
Private m_Window_Opacity As Double = 0.2
Public ReadOnly Property Window_Opacity As Double
Get
Return m_Window_Opacity
End Get
End Property
' Titolo
Public ReadOnly Property sTitle As String
Get
Return EgtMsg(1)
End Get
End Property
Sub New()
' Avvio l'inizializzazione della mappa passandogli il riferimento al MainWindowVM
Map.BeginInit(Me)
' imposto e avvio contatore SplashScreen
m_SplashScreen_Timer.Interval = New TimeSpan(0, 0, 0, 0, 500)
AddHandler m_SplashScreen_Timer.Tick, AddressOf SplashScreenTimer_Tick
If Not IsNothing(Map.refSplashScreen) Then
m_SplashScreen_Timer.Start()
End If
' Creo Model della MainWindow
m_MainWindowM = New MainWindowM
' creo gestore della comunicazione
m_MachineManager = New MachineManager
m_MachineManager.Init()
' recupero nome del plugin
Dim sPluginName As String = ""
If GetMainPrivateProfileString(S_GENERAL, K_PLUGINNAME, "", sPluginName) > 0 AndAlso Not String.IsNullOrWhiteSpace(sPluginName) Then
' aggiungo Dictionary del plugin
Dim PluginDictionary As IPluginControl = GetDictionary(Of IPluginControl)(sPluginName)
Application.Current.Resources.MergedDictionaries.Add(PluginDictionary)
'' aggiungo MainMenu dal plugin
Dim PluginMainMenu As IPluginControl = GetControlByName(Of IPluginControl)(sPluginName, "MainMenu")
m_ContentMenu = PluginMainMenu
'' aggiungo manager delle funzioni Lua del Plugin
Dim PluginLuaManager As IPluginLuaManager = Map.refMainWindowVM.GetLuaManager(Of IPluginLuaManager)(sPluginName)
PluginLuaManager.PlgInit(LuaManager.state)
' aggiungo Project dal plugin
Dim ProjectPlugin As IPluginControl = GetControlByName(Of IPluginControl)(sPluginName, "Project")
m_ContentPanel = ProjectPlugin
End If
' creo variabile globale Effector per dati programma
LuaManager.CreateGlobTable("EFFECTOR")
LuaManager.SetGlobVar("EFFECTOR.INIPATH", Map.refMainWindowVM.MainWindowM.sConfigDir & "\" & INI_FILE_NAME)
' creo gestore delle macchine a stati
m_FiniteStateMachineManager = New FiniteStateMachineManager
If GetMainPrivateProfileInt(S_REDIS, K_ENABLED, 0) = 1 Then
m_RedisManager = New RedisManager
End If
End Sub
Friend Sub ContentRendered()
' segno su contatore splashscreen render finito
m_WaitAfterRender = 1
End Sub
Friend Function OnClose() As Boolean
If Not IsNothing(FiniteStateMachineManager) Then FiniteStateMachineManager.ResetFiniteStateMachineTimer()
LuaManager.Close()
' chiudo comunicazione macchine
m_MachineManager.Close()
' Termino il Model
m_MainWindowM.Close()
Return True
End Function
Private Sub SplashScreenTimer_Tick()
If m_WaitAfterRender > 1 Then
m_Window_Opacity = 1
NotifyPropertyChanged(NameOf(Window_Opacity))
' chiudo SplashScreen
Map.refSplashScreen.Close()
Map.SetRefSplashScreen(Nothing)
m_SplashScreen_Timer.Stop()
ElseIf m_WaitAfterRender > 0 Then
m_WaitAfterRender += 1
End If
End Sub
#Region "Plugin"
Private m_Loader As MEFLoader = New MEFLoader()
Private Function GetPathByName(sPluginFileName As String) As String
Return MainWindowM.sDataRoot & "\Plugin\" & sPluginFileName
End Function
Friend Function GetControlByName(Of T)(sPluginFileName As String, sPluginTagName As String) As Panel
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(sPluginFileName), sPluginTagName).FirstOrDefault()
Dim PluginPanel As Panel = Nothing
If PlugInControl.GetType().BaseType.FullName = GetType(Panel).FullName OrElse PlugInControl.GetType().BaseType.FullName = GetType(Grid).FullName Then
PluginPanel = TryCast(PlugInControl, Panel)
End If
Return PluginPanel
End Function
Friend Function GetDictionary(Of T)(sPluginFileName As String) As ResourceDictionary
Dim DictionaryControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(sPluginFileName), "Dictionary").FirstOrDefault()
Dim Dictionary As ResourceDictionary = Nothing
Dictionary = TryCast(DictionaryControl, ResourceDictionary)
Return DictionaryControl
End Function
Friend Function GetLuaManager(Of T)(sPluginFileName As String) As IPluginLuaManager
Dim LuaManager As Object = m_Loader.LoadByTag(Of T)(GetPathByName(sPluginFileName), "LuaManager").FirstOrDefault()
Return LuaManager
End Function
#End Region ' Plugin
End Class
+59
View File
@@ -0,0 +1,59 @@
Imports System
Imports System.Globalization
Imports System.Reflection
Imports System.Resources
Imports System.Runtime.InteropServices
Imports System.Windows
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("Effector")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("Effector")>
<Assembly: AssemblyCopyright("Copyright © 2024-2025 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
'In order to begin building localizable applications, set
'<UICulture>CultureYouAreCodingWith</UICulture> in your .vbproj file
'inside a <PropertyGroup>. For example, if you are using US english
'in your source files, set the <UICulture> to "en-US". Then uncomment the
'NeutralResourceLanguage attribute below. Update the "en-US" in the line
'below to match the UICulture setting in the project file.
'<Assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)>
'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
'1st parameter: where theme specific resource dictionaries are located
'(used if a resource is not found in the page,
' or application resource dictionaries)
'2nd parameter: where the generic resource dictionary is located
'(used if a resource is not found in the page,
'app, and any theme specific resource dictionaries)
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("565ef276-1f57-4d10-a1b4-9f13c6fd79b9")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.5.3")>
<Assembly: AssemblyFileVersion("3.1.5.3")>
@@ -0,0 +1,121 @@
#If _MyType <> "Empty" Then
Namespace My
''' <summary>
''' Module used to define the properties that are available in the My Namespace for WPF
''' </summary>
''' <remarks></remarks>
<Global.Microsoft.VisualBasic.HideModuleName()> _
Module MyWpfExtension
Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.Computer)
Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.User)
Private s_Windows As New ThreadSafeObjectProvider(Of MyWindows)
Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.Log)
''' <summary>
''' Returns the application object for the running application
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property Application() As Application
Get
Return CType(Global.System.Windows.Application.Current, Application)
End Get
End Property
''' <summary>
''' Returns information about the host computer.
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.Computer
Get
Return s_Computer.GetInstance()
End Get
End Property
''' <summary>
''' Returns information for the current user. If you wish to run the application with the current
''' Windows user credentials, call My.User.InitializeWithWindowsUser().
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.User
Get
Return s_User.GetInstance()
End Get
End Property
''' <summary>
''' Returns the application log. The listeners can be configured by the application's configuration file.
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.Log
Get
Return s_Log.GetInstance()
End Get
End Property
''' <summary>
''' Returns the collection of Windows defined in the project.
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property Windows() As MyWindows
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Return s_Windows.GetInstance()
End Get
End Property
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
<Global.Microsoft.VisualBasic.MyGroupCollection("System.Windows.Window", "Create__Instance__", "Dispose__Instance__", "My.MyWpfExtenstionModule.Windows")> _
Friend NotInheritable Class MyWindows
<Global.System.Diagnostics.DebuggerHidden()> _
Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Window})(ByVal Instance As T) As T
If Instance Is Nothing Then
If s_WindowBeingCreated IsNot Nothing Then
If s_WindowBeingCreated.ContainsKey(GetType(T)) = True Then
Throw New Global.System.InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.")
End If
Else
s_WindowBeingCreated = New Global.System.Collections.Hashtable()
End If
s_WindowBeingCreated.Add(GetType(T), Nothing)
Return New T()
s_WindowBeingCreated.Remove(GetType(T))
Else
Return Instance
End If
End Function
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
<Global.System.Diagnostics.DebuggerHidden()> _
Private Sub Dispose__Instance__(Of T As Global.System.Windows.Window)(ByRef instance As T)
instance = Nothing
End Sub
<Global.System.Diagnostics.DebuggerHidden()> _
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
Public Sub New()
MyBase.New()
End Sub
<Global.System.ThreadStatic()> Private Shared s_WindowBeingCreated As Global.System.Collections.Hashtable
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(o)
End Function
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> _
Friend Overloads Function [GetType]() As Global.System.Type
Return GetType(MyWindows)
End Function
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
End Class
End Module
End Namespace
Partial Class Application
Inherits Global.System.Windows.Application
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Return New Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo(Global.System.Reflection.Assembly.GetExecutingAssembly())
End Get
End Property
End Class
#End If
+62
View File
@@ -0,0 +1,62 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:$clrversion$
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$safeprojectname$.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set(ByVal value As Global.System.Globalization.CultureInfo)
resourceCulture = value
End Set
End Property
End Module
End Namespace
+117
View File
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+73
View File
@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>
Friend ReadOnly Property Settings() As Global.Effector.Main.My.MySettings
Get
Return Global.Effector.Main.My.MySettings.Default
End Get
End Property
End Module
End Namespace
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 KiB

@@ -0,0 +1,40 @@
<Window x:Class="SplashScreen"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
AllowsTransparency="True"
Background="White"
Topmost="False"
ShowInTaskbar="False"
Height="600"
Width="1000">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="7.20*"/>
<ColumnDefinition Width="1.68*"/>
<ColumnDefinition Width="0.91*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1.4*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Image Grid.ColumnSpan="3"
Grid.RowSpan="3"
Source="/Resources/SplashScreen.png"
Stretch="UniformToFill"/>
<TextBlock x:Name="VersionTxBl"
Grid.Column="1"
Grid.Row="1"
FontSize="14"
FontFamily="./Resources/Fonts/#Advent Pro"
HorizontalAlignment="Center"/>
<!--<TextBlock Text="2022-2023"
FontSize="6"
FontFamily="/Resources/Fonts/#Roboto"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="0,0,254,60"/>-->
</Grid>
</Window>
@@ -0,0 +1,10 @@
Public Class SplashScreen
Private Sub SplashScreen_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
VersionTxBl.Text = "Version " & My.Application.Info.Version.Major.ToString() &
"." & My.Application.Info.Version.Minor.ToString() &
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString()
End Sub
End Class
+129
View File
@@ -0,0 +1,129 @@
<ResourceDictionary x:Class="Dictionary"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Effector.Main"
xmlns:Lib="clr-namespace:Effector.Plugin.Lib;assembly=Effector.Plugin.Lib">
<!--
Assign a Key to every Panel ViewModel to use
it in xaml file(ProjectView.xaml).
-->
<!--<local:FiveLakesUIVM x:Key="FiveLakesUIVM"/>
<local:DoorListPageVM x:Key="DoorListVM"/>
<local:MachinePageVM x:Key="MachinePageVM"/>-->
<!--Colori predefiniti-->
<!--#e8eef5--><!--
<Color x:Key="Effector_LightBlue_Color" R="232" G="238" B="245" A="255"/>
<SolidColorBrush x:Key="Effector_LightBlue" Color="{StaticResource Effector_LightBlue_Color}" />
--><!--#afc5d6--><!--
<Color x:Key="Effector_Blue_Color" R="175" G="197" B="214" A="255"/>
<SolidColorBrush x:Key="Effector_Blue" Color="{StaticResource Effector_Blue_Color}" />
--><!--#749fc4--><!--
<Color x:Key="Effector_DarkBlue_Color" R="116" G="159" B="196" A="255"/>
<SolidColorBrush x:Key="Effector_DarkBlue" Color="{StaticResource Effector_DarkBlue_Color}" />
--><!--#92bde3--><!--
<Color x:Key="Effector_LightBlue_Status_Color" R="146" G="189" B="227" A="255"/>
<SolidColorBrush x:Key="Effector_LightBlue_Status" Color="{StaticResource Effector_LightBlue_Status_Color}" />
--><!--#5682a6--><!--
<Color x:Key="Effector_Blue_Status_Color" R="86" G="130" B="166" A="255"/>
<SolidColorBrush x:Key="Effector_Blue_Status" Color="{StaticResource Effector_Blue_Status_Color}" />
--><!--#cd5c5c--><!--
<Color x:Key="Effector_Red_Status_Color" R="205" G="92" B="92" A="255"/>
<SolidColorBrush x:Key="Effector_Red_Status" Color="{StaticResource Effector_Red_Status_Color}" />
--><!--#b1cbaa--><!--
<Color x:Key="Effector_Green_Status_Color" R="177" G="203" B="170" A="255"/>
<SolidColorBrush x:Key="Effector_Green_Status" Color="{StaticResource Effector_Green_Status_Color}" />
--><!--#9c9c9c--><!--
<Color x:Key="Effector_Gray_Status_Color" R="156" G="156" B="156" A="255"/>
<SolidColorBrush x:Key="Effector_Gray_Status" Color="{StaticResource Effector_Gray_Status_Color}" />
--><!--#ffd932--><!--
<Color x:Key="Effector_Yellow_Status_Color" R="255" G="217" B="50" A="255"/>
<SolidColorBrush x:Key="Effector_Yellow_Status" Color="{StaticResource Effector_Yellow_Status_Color}" />
--><!--#6398c7--><!--
<Color x:Key="Effector_LightBlue_SelStatus_Color" R="99" G="152" B="199" A="255"/>
<SolidColorBrush x:Key="Effector_LightBlue_SelStatus" Color="{StaticResource Effector_LightBlue_SelStatus_Color}" />
--><!--#4b677e--><!--
<Color x:Key="Effector_Blue_SelStatus_Color" R="75" G="103" B="126" A="255"/>
<SolidColorBrush x:Key="Effector_Blue_SelStatus" Color="{StaticResource Effector_Blue_SelStatus_Color}" />
--><!--#a94444--><!--
<Color x:Key="Effector_Red_SelStatus_Color" R="169" G="68" B="68" A="255"/>
<SolidColorBrush x:Key="Effector_Red_SelStatus" Color="{StaticResource Effector_Red_SelStatus_Color}" />
--><!--#89aa81--><!--
<Color x:Key="Effector_Green_SelStatus_Color" R="137" G="170" B="129" A="255"/>
<SolidColorBrush x:Key="Effector_Green_SelStatus" Color="{StaticResource Effector_Green_SelStatus_Color}" />
--><!--#7d7d7d--><!--
<Color x:Key="Effector_Gray_SelStatus_Color" R="125" G="125" B="125" A="255"/>
<SolidColorBrush x:Key="Effector_Gray_SelStatus" Color="{StaticResource Effector_Gray_SelStatus_Color}" />
--><!--#dcb718--><!--
<Color x:Key="Effector_Yellow_SelStatus_Color" R="220" G="183" B="24" A="255"/>
<SolidColorBrush x:Key="Effector_Yellow_SelStatus" Color="{StaticResource Effector_Yellow_SelStatus_Color}" />
--><!--#e5ebf1--><!--
<Color x:Key="Effector_White_SelStatus_Color" R="229" G="235" B="241" A="255"/>
<SolidColorBrush x:Key="Effector_White_SelStatus" Color="{StaticResource Effector_Yellow_SelStatus_Color}" />-->
<!--#BC373E-->
<!--
<Color x:Key="Effector_Orange_Color" R="188" G="55" B="62" A="255"/>
<SolidColorBrush x:Key="Effector_Orange" Color="{StaticResource Effector_Orange_Color}" />
-->
<!--#A74C77-->
<!--
<Color x:Key="Effector_Purple_Color" R="167" G="76" B="119" A="255"/>
<SolidColorBrush x:Key="Effector_Purple" Color="{StaticResource Effector_Purple_Color}" />-->
<!--Colori per EgtWPFLib5-->
<!--<SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/>-->
<!--Risorsa che toglie le animazioni dai menù popup per evitare che i menù mru di scelta dei file rimangano aperti se il file è grosso -->
<!--o viene eseguito un lua che non aggiorna l'interfaccia-->
<PopupAnimation x:Key="{x:Static SystemParameters.MenuPopupAnimationKey}">None</PopupAnimation>
<!--convertert per visibilita' stringa di testo con misure in StatusBar-->
<!--
<PrintApp:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>-->
<!--<GridLength x:Key="TitleBar_Height">45</GridLength>
<sys:Double x:Key="Icon_Width">45</sys:Double>
<sys:Double x:Key="Icon_Height">45</sys:Double>
<Thickness x:Key="WindowBorder_Thickness">2</Thickness>
<sys:Double x:Key="WindowBorder_Height">2</sys:Double>-->
<!--<Style x:Key="TitleBar_Button" TargetType="Button">
<Setter Property="Foreground" Value="White" />
<Setter Property="Padding" Value="0" />
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border"
Background="Transparent"
BorderThickness="0"
SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter"
Margin="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Focusable="False"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="{DynamicResource MouseOverOverlayBackgroundBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="border" Property="Background" Value="{DynamicResource PressedOverlayBackgroundBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>-->
</ResourceDictionary>
+150
View File
@@ -0,0 +1,150 @@
Imports System.ComponentModel.Composition
Imports System.Globalization
Imports Effector.Plugin.Interface
<Export(GetType(IPluginControl))>
<ExportMetadata("Name", "Dictionary")>
Public Class Dictionary
Inherits ResourceDictionary
Implements IPluginControl
Public Shared ReadOnly MySceneHostVM As String = "MySceneHostVM"
#Region "Colors"
'Private Shared m_Effector_LightBlue As SolidColorBrush = Application.Current.FindResource("Effector_LightBlue")
'Public Shared ReadOnly Property Effector_LightBlue As SolidColorBrush
' Get
' Return m_Effector_LightBlue
' End Get
'End Property
'Private Shared m_Effector_Blue As SolidColorBrush = Application.Current.FindResource("Effector_Blue")
'Public Shared ReadOnly Property Effector_Blue As SolidColorBrush
' Get
' Return m_Effector_Blue
' End Get
'End Property
'Private Shared m_Effector_Red As SolidColorBrush = Application.Current.FindResource("Effector_Red")
'Public Shared ReadOnly Property Effector_Red As SolidColorBrush
' Get
' Return m_Effector_Red
' End Get
'End Property
'Private Shared m_Effector_Green As SolidColorBrush = Application.Current.FindResource("Effector_Green")
'Public Shared ReadOnly Property Effector_Green As SolidColorBrush
' Get
' Return m_Effector_Green
' End Get
'End Property
'Private Shared m_Effector_Gray As SolidColorBrush = Application.Current.FindResource("Effector_Gray")
'Public Shared ReadOnly Property Effector_Gray As SolidColorBrush
' Get
' Return m_Effector_Gray
' End Get
'End Property
'Private Shared m_Effector_Yellow As SolidColorBrush = Application.Current.FindResource("Effector_Yellow")
'Public Shared ReadOnly Property Effector_Yellow As SolidColorBrush
' Get
' Return m_Effector_Yellow
' End Get
'End Property
'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
'<SolidColorBrush x : Key="Icarus_Gray" Color="#92908d" />
'<SolidColorBrush x : Key="Icarus_LightBlue" Color="#3c89c9" />
'<SolidColorBrush x : Key="Icarus_Blue" Color="#2e5a81" />
'<SolidColorBrush x : Key="Icarus_Green" Color="#40826d" />
'<SolidColorBrush x : Key="Icarus_Orange" Color="#C37636" />
'<SolidColorBrush x : Key="Icarus_Purple" Color="#990066" />
#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
+80
View File
@@ -0,0 +1,80 @@
Imports System.Runtime.InteropServices
Imports System.Security
Public Module EgtInterface
#If DEBUG Then
Const EgtIntDll32 As String = "EgtBasisD32.dll"
#Else
Const EgtIntDll32 As String = "EgtBasisR32.dll"
#End If
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtSetKey"), SuppressUnmanagedCodeSecurity()>
Public Function EgtSetKey(sKey As String) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetKeyLevel"), SuppressUnmanagedCodeSecurity()>
Public Function EgtGetKeyLevel(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nKLev As Integer) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetKeyOptions"), SuppressUnmanagedCodeSecurity()>
Public Function EgtGetKeyOptions(nProd As Integer, nVer As Integer, nLev As Integer,
ByRef nOpt1 As UInteger, ByRef nOpt2 As UInteger) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetKeyLeftDays"), SuppressUnmanagedCodeSecurity()>
Public Function EgtGetKeyLeftDays(ByRef nLeftDays As Integer) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetKeyAssLeftDays"), SuppressUnmanagedCodeSecurity()>
Public Function EgtGetKeyAssLeftDays(ByRef nAssLeftDays As Integer) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetKeyOptLeftDays"), SuppressUnmanagedCodeSecurity()>
Public Function EgtGetKeyOptLeftDays(ByRef nOptLeftDays As Integer) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtFreeMemory"), SuppressUnmanagedCodeSecurity()>
Public Function EgtFreeMemory(sB As IntPtr) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtLoadMessages"), SuppressUnmanagedCodeSecurity()>
Public Function EgtLoadMessages(sMsgFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetMsg"), SuppressUnmanagedCodeSecurity()>
Private Function EgtGetMsg_32(nId As Integer) As IntPtr
End Function
Public Function EgtMsg(nId As Integer) As String
Return Marshal.PtrToStringUni(EgtGetMsg_32(nId))
' Non è necessario liberare la memoria nativa perchè usa un buffer statico
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtInitLogger"), SuppressUnmanagedCodeSecurity()>
Public Function EgtInitLogger(nDebug As Integer, sLogFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtOutLog"), SuppressUnmanagedCodeSecurity()>
Private Function EgtOutLog(sMsg As String, nDebugLevel As Integer) As Boolean
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetStringUtf8FromIni"), SuppressUnmanagedCodeSecurity()>
Private Function EgtGetStringUtf8FromIni_32(sSec As String, sKey As String, sDef As String, ByRef sVal As IntPtr, sIniFile As String) As Boolean
End Function
Public Function EgtGetStringUtf8FromIni(sSec As String, sKey As String, sDef As String, ByRef sVal As String, sIniFile As String) As Boolean
Dim psVal As IntPtr
Dim bOk As Boolean = EgtGetStringUtf8FromIni_32(sSec, sKey, sDef, psVal, sIniFile)
If bOk Then
sVal = Marshal.PtrToStringUni(psVal)
EgtFreeMemory(psVal)
Else
sVal = String.Empty
End If
Return bOk
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtWriteStringUtf8ToIni"), SuppressUnmanagedCodeSecurity()>
Public Function EgtWriteStringUtf8toIni(sSec As String, sKey As String, sVal As String, sIniFile As String) As Boolean
End Function
End Module
@@ -0,0 +1,58 @@
Module ExecProcessManager
Private m_ExecProcess As Process
Friend Function ExecProcess(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean
' lancio esecuzione programma
Dim bResult As Boolean = True
Dim Proc As New Process()
Proc.StartInfo.FileName = sFileName
Proc.StartInfo.RedirectStandardInput = False
Proc.StartInfo.RedirectStandardOutput = False
Proc.StartInfo.Arguments = 1.ToString() & " """ & sMainLuaPath & """ """ & sArguments & """"
Proc.StartInfo.UseShellExecute = False
Proc.StartInfo.CreateNoWindow = True
Dim ExecCounter = 0
If Proc.Start Then
While Not Proc.HasExited
If ExecCounter >= 300 Then
bResult = False
Proc.Kill()
Exit While
End If
Threading.Thread.Sleep(100)
ExecCounter += 1
End While
End If
Return bResult
End Function
Friend Function ExecProcessAsync(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean
If Not IsNothing(m_ExecProcess) Then
If Not m_ExecProcess.HasExited Then
m_ExecProcess.Kill()
End If
End If
' lancio esecuzione programma
Dim bResult As Boolean = True
m_ExecProcess = New Process()
m_ExecProcess.StartInfo.FileName = sFileName
m_ExecProcess.StartInfo.RedirectStandardInput = False
m_ExecProcess.StartInfo.RedirectStandardOutput = False
m_ExecProcess.StartInfo.Arguments = 1.ToString() & " """ & sMainLuaPath & """ """ & sArguments & """"
m_ExecProcess.StartInfo.UseShellExecute = False
m_ExecProcess.StartInfo.CreateNoWindow = True
Return m_ExecProcess.Start()
End Function
Friend Function CheckExecProcessAsync(ByRef bHasExited As Boolean, ByRef nExitCode As Integer) As Boolean
If IsNothing(m_ExecProcess) Then Return False
bHasExited = m_ExecProcess.HasExited
If bHasExited Then
nExitCode = m_ExecProcess.ExitCode
End If
Threading.Thread.Sleep(100)
Return True
End Function
End Module
@@ -0,0 +1,35 @@
Public Class FiniteStateMachine
Private m_bLuaExecuted As Boolean
Public ReadOnly Property bLuaExecuted As Boolean
Get
Return m_bLuaExecuted
End Get
End Property
Private m_State As Integer
Private m_sLuaPath As String
Friend ReadOnly Property sLuaPath As String
Get
Return m_sLuaPath
End Get
End Property
Private m_sMessageText As String = ""
Friend ReadOnly Property sMessageText As String
Get
Return m_sMessageText
End Get
End Property
Friend Sub SetMessageText(sText As String)
m_sMessageText = sText
End Sub
Sub New(sLuaPath As String)
m_sLuaPath = sLuaPath
m_bLuaExecuted = LuaManager.ExecFile(Map.refMainWindowVM.MainWindowM.sScriptDir & "\" & sLuaPath)
EgtOutLog(m_sLuaPath & " execution " & If(m_bLuaExecuted, "ok", "failed"))
End Sub
End Class
+110
View File
@@ -0,0 +1,110 @@
Module Map
Private m_refMainWindowVM As MainWindowVM
Private m_refSplashScreen As SplashScreen
'Private m_refProjectVM As ProjectVM
'Private m_refSecondaryWindowVM As SecondaryWindowVM
'Private m_refSecondaryWindowV As SecondaryWindowV
#Region "Get"
Public ReadOnly Property refMainWindowVM As MainWindowVM
Get
Return m_refMainWindowVM
End Get
End Property
Public ReadOnly Property refSplashScreen As SplashScreen
Get
Return m_refSplashScreen
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 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
#End Region ' Get
#Region "Set"
Friend Function SetRefSplashScreen(SplashScreen As SplashScreen) As Boolean
m_refSplashScreen = SplashScreen
Return Not IsNothing(m_refSplashScreen)
End Function
'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 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
#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)
End Function
#End Region ' Init
End Module
+57
View File
@@ -0,0 +1,57 @@
Imports StackExchange
Imports StackExchange.Redis
Imports Effector.Plugin.Lib
Class RedisManager
' connessione al server Redis
Private m_RedisConnection As ConnectionMultiplexer
Public ReadOnly Property RedisConnection As ConnectionMultiplexer
Get
Return m_RedisConnection
End Get
End Property
' indice del Db Redis
Private m_nRedisDbIndex As Integer = 0
Public ReadOnly Property nRedisDbIndex As Integer
Get
Return m_nRedisDbIndex
End Get
End Property
' Database Redis
Private m_RedisDb As IDatabase
Public ReadOnly Property RedisDb As IDatabase
Get
Return m_RedisDb
End Get
End Property
' gestore sottoscrizioni
Private m_Subscriber As ISubscriber
Public ReadOnly Property Subscriber As ISubscriber
Get
Return m_Subscriber
End Get
End Property
Sub New()
Try
' inizializzo connessione al server Redis
m_RedisConnection = ConnectionMultiplexer.Connect("localhost")
m_nRedisDbIndex = GetMainPrivateProfileInt(S_REDIS, K_DBINDEX, 0)
m_RedisDb = m_RedisConnection.GetDatabase(m_nRedisDbIndex)
' inizializzo sottoscrizioni
m_Subscriber = m_RedisConnection.GetSubscriber()
m_Subscriber.Subscribe("Messages", AddressOf SubscribeHandler)
Catch ex As Exception
EgtOutLog("Redis connection error!! " & Environment.NewLine & ex.Message)
End Try
End Sub
Private Sub SubscribeHandler(RedisChannel As RedisChannel, RedisValue As RedisValue)
EgtOutLog("Ricevuto valore " & RedisValue.ToString() & " dal canale " & RedisChannel.ToString())
End Sub
End Class
+80
View File
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config.
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
--><!--<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>--><!--
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KeraLua" version="1.4.1" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net472" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" targetFramework="net472" />
<package id="Pipelines.Sockets.Unofficial" version="2.2.8" targetFramework="net472" />
<package id="StackExchange.Redis" version="2.7.33" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net472" />
<package id="System.IO.Pipelines" version="6.0.0" targetFramework="net472" />
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
<package id="System.Threading.Channels" version="6.0.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
</packages>
@@ -0,0 +1,116 @@
<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>Effector.Plugin.Interface</RootNamespace>
<AssemblyName>Effector.Plugin.Interface</AssemblyName>
<OutputType>Library</OutputType>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
<Deterministic>true</Deterministic>
<ProjectGuid>{7D14D864-2BDC-4785-80F4-320164C2D5E4}</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>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' ">
<DebugType>pdbonly</DebugType>
<DebugSymbols>false</DebugSymbols>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<IncrementalBuild>false</IncrementalBuild>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>Effector.Plugin.Interface.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="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="IHost.vb" />
<Compile Include="IPluginControl.vb" />
<Compile Include="IPluginLuaManager.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>
<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>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Effector\Plugin\Effector.Plugin.DoorArreda\Effector.Plugin.Interface.dll
copy $(TargetPath) c:\EgtData\Effector\Plugin\Effector.Plugin.FiveLakes\Effector.Plugin.Interface.dll
copy $(TargetPath) c:\EgtProg\Effector\Effector.Plugin.Interface.dll</PostBuildEvent>
</PropertyGroup>
</Project>
+23
View File
@@ -0,0 +1,23 @@
Imports System.ComponentModel.Composition
<InheritedExport>
Public Interface IHost
ReadOnly Property PluginTestInfo As Integer
' ReadOnly Property FiniteStateMachineList As List(Of FiniteStateMachine)
Function PlgOutLog(sLogMsg As String) As Boolean
Function PlgGetPrivateProfileInt(lpAppName As String, lpKeyName As String, nDefault As Integer) As Integer
Function PlgGetPrivateProfileDouble(lpAppName As String, lpKeyName As String, dDefault As Double) As Double
Function PlgGetPrivateProfileString(lpAppName As String, lpKeyName As String, lpDefault As String, ByRef lpString As String) As Integer
Function PlgWritePrivateProfileString(lpAppName As String, lpKeyName As String, lpString As String) As Boolean
Function PlgExecProcess(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean
Function PlgExecProcessAsync(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean
Function PlgCheckExecProcessAsync(ByRef bHasExited As Boolean, ByRef nExitCode As Integer) As Boolean
Function ComReadShortVar(nVarAddr As Integer, ByRef nResult As Short, nMachine As Integer) As Boolean
Function ComReadBitVar(nVarAddr As Integer, nBit As Integer, ByRef bResult As Boolean, nMachine As Integer) As Boolean
Function ComReadDoubleVar(nVarAddr As Integer, ByRef dResult As Double, nMachine As Integer) As Boolean
Function ComWriteShortVar(nVarAddr As Integer, nValue As Integer, nMachine As Integer) As Boolean
Function ComWriteBitVar(nVarAddr As Integer, nBit As Integer, bValue As Boolean, nMachine As Integer) As Boolean
Function ComWriteDoubleVar(nVarAddr As Integer, dValue As Double, nMachine As Integer) As Boolean
End Interface
@@ -0,0 +1,8 @@
Public Interface IPluginControl
'Function PlgGetPrivateProfileInt(lpAppName As String, lpKeyName As String, nDefault As Integer, lpFileName As String) As Integer
'Function PlgGetPrivateProfileDouble(lpAppName As String, lpKeyName As String, dDefault As Double, lpFileName As String) As Double
'Function PlgGetPrivateProfileString(lpAppName As String, lpKeyName As String, lpDefault As String, lpReturnedString As StringBuilder, nSize As Integer, lpFileName As String) As Integer
'Function PlgWritePrivateProfileString(lpAppName As String, lpKeyName As String, lpString As String, lpFileName As String) As Boolean
End Interface
@@ -0,0 +1,8 @@
Public Interface IPluginLuaManager
Function PlgInit(state As Object) As Boolean
'Function PlgGetPrivateProfileDouble(lpAppName As String, lpKeyName As String, dDefault As Double, lpFileName As String) As Double
'Function PlgGetPrivateProfileString(lpAppName As String, lpKeyName As String, lpDefault As String, lpReturnedString As StringBuilder, nSize As Integer, lpFileName As String) As Integer
'Function PlgWritePrivateProfileString(lpAppName As String, lpKeyName As String, lpString As String, lpFileName As String) As Boolean
End Interface
@@ -0,0 +1,59 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports System.Globalization
Imports System.Resources
Imports System.Windows
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("Effector.Plugin.Interface")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("Effector.Plugin.Interface")>
<Assembly: AssemblyCopyright("Copyright @ 2024-2025 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
'In order to begin building localizable applications, set
'<UICulture>CultureYouAreCodingWith</UICulture> in your .vbproj file
'inside a <PropertyGroup>. For example, if you are using US english
'in your source files, set the <UICulture> to "en-US". Then uncomment the
'NeutralResourceLanguage attribute below. Update the "en-US" in the line
'below to match the UICulture setting in the project file.
'<Assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)>
'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
'1st parameter: where theme specific resource dictionaries are located
'(used if a resource is not found in the page,
' or application resource dictionaries)
'2nd parameter: where the generic resource dictionary is located
'(used if a resource is not found in the page,
'app, and any theme specific resource dictionaries)
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("c2324e1b-e8d0-4e39-adb6-273a15914498")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.8.1")>
<Assembly: AssemblyFileVersion("2.7.8.1")>
@@ -0,0 +1,62 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:$clrversion$
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$safeprojectname$.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set(ByVal value As Global.System.Globalization.CultureInfo)
resourceCulture = value
End Set
End Property
End Module
End Namespace
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.Effector.Plugin.Interface.My.MySettings
Get
Return Global.Effector.Plugin.Interface.My.MySettings.Default
End Get
End Property
End Module
End Namespace
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
+65
View File
@@ -0,0 +1,65 @@
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}") = "Effector.Main", "Effector.Main\Effector.Main.vbproj", "{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}"
EndProject
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}") = "Effector.Plugin.FiveLakes", "..\Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
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|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
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|x86.Build.0 = Debug|x86
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Release|Any CPU.ActiveCfg = Release|x64
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Release|Any CPU.Build.0 = Release|x64
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Release|x64.ActiveCfg = Release|x64
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Release|x64.Build.0 = Release|x64
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Release|x86.ActiveCfg = Release|x86
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Release|x86.Build.0 = Release|x86
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Debug|x64.ActiveCfg = Debug|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Debug|x64.Build.0 = Debug|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Debug|x86.ActiveCfg = Debug|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Debug|x86.Build.0 = Debug|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Release|Any CPU.Build.0 = Release|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Release|x64.ActiveCfg = Release|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Release|x64.Build.0 = Release|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Release|x86.ActiveCfg = Release|Any CPU
{7D14D864-2BDC-4785-80F4-320164C2D5E4}.Release|x86.Build.0 = Release|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Debug|x64.ActiveCfg = Debug|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Debug|x64.Build.0 = Debug|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Debug|x86.ActiveCfg = Debug|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Debug|x86.Build.0 = Debug|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|Any CPU.Build.0 = Release|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|x64.ActiveCfg = Release|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|x64.Build.0 = Release|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|x86.ActiveCfg = Release|Any CPU
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F9D87F62-BDA1-4B0C-BE15-C43A682829E8}
EndGlobalSection
EndGlobal
Binary file not shown.
Binary file not shown.
Binary file not shown.