Effector.Plugin.StoneCut 3.1.5.7:
- primo rilascio dopo prove su macchina
@@ -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
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
|
||||||
|
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.Plugin.Interface", "..\Effector\Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||||
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.StoneCut", "Effector.Plugin.StoneCut\Effector.Plugin.StoneCut.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
|
||||||
|
{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
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
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\Effector.Main.vbproj", "{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}"
|
||||||
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.Interface", "..\Effector.Main\Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||||
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.StoneCut", "Effector.Plugin.StoneCut\Effector.Plugin.StoneCut.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{7D14D864-2BDC-4785-80F4-320164C2D5E4} = {7D14D864-2BDC-4785-80F4-320164C2D5E4}
|
||||||
|
EndProjectSection
|
||||||
|
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|x86
|
||||||
|
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|Any CPU.Build.0 = Debug|x86
|
||||||
|
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{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
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' EgalTech 2015-2017
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' File : ConstGen.vb Data : 08.05.24 Versione : 2.6e1
|
||||||
|
' Contenuto : Modulo costanti generali.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'
|
||||||
|
' Modifiche : 08.05.24 ES Creazione modulo.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Public Module ConstGen
|
||||||
|
|
||||||
|
' File con direttorio radice dei dati
|
||||||
|
Public Const DAT_FILE_NAME As String = "DataRoot.Ini"
|
||||||
|
Public Const S_DATA As String = "Data"
|
||||||
|
Public Const K_DATAROOT As String = "DataRoot"
|
||||||
|
|
||||||
|
'' File con dati di licenza
|
||||||
|
'Public Const LIC_FILE_NAME As String = "EgtBEAMWALL.lic"
|
||||||
|
'Public Const S_LICENCE As String = "Licence"
|
||||||
|
'Public Const K_LOCKID As String = "LockId"
|
||||||
|
'Public Const K_KEY As String = "Key"
|
||||||
|
|
||||||
|
|
||||||
|
' Abilitazioni licenza
|
||||||
|
Public Enum KEY_OPT As UInteger
|
||||||
|
SUPERVISOR = 1
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' Sottodirettorio di configurazione
|
||||||
|
Public Const CONF_DIR As String = "Config"
|
||||||
|
' Sottodirettorio delle risorse
|
||||||
|
Public Const RES_DIR As String = "Resources"
|
||||||
|
' Sottodirettorio script
|
||||||
|
Public Const SCRIPT_DIR As String = "Script"
|
||||||
|
' Sottodirettorio temporaneo
|
||||||
|
Public Const TEMP_DIR As String = "Temp"
|
||||||
|
'' Sottodirettorio per Cam automatico
|
||||||
|
'Public Const PROJS_DIR As String = "Projs"
|
||||||
|
'' Sottodirettorio per Csv automatico
|
||||||
|
'Public Const PRODS_DIR As String = "Prods"
|
||||||
|
'' Sottodirettorio per Macro
|
||||||
|
'Public Const MACRO_DIR As String = "Macro"
|
||||||
|
'' Sottodirettorio per Magazzino
|
||||||
|
'Public Const WAREHOUSE_DIR As String = "Warehouse"
|
||||||
|
'' Sottodirettorio per lavorazioni travi
|
||||||
|
'Public Const BEAM_DIR As String = "Beam"
|
||||||
|
'' Sottodirettorio per lavorazioni pareti
|
||||||
|
'Public Const WALL_DIR As String = "Wall"
|
||||||
|
'' Sottodirettorio di default per il salvataggio con nome
|
||||||
|
'Public Const SAVE_DFL_NAMEDIR As String = "MyProjects"
|
||||||
|
'' Sottodirettorio di default per le macchine
|
||||||
|
'Public Const MACHINES_DFL_DIR As String = "Machines"
|
||||||
|
'' Sottodirettorio di default per toolmakers
|
||||||
|
'Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers"
|
||||||
|
'' Nome file Lua con le funzioni di attrezzaggio
|
||||||
|
'Public Const SETUP_LUA As String = "SetUp.lua"
|
||||||
|
'' Nome eseguibile per stampa
|
||||||
|
'Public Const ZEBRAPRINTER_EXE As String = "ZebraPrinterUtilitiesD32.exe"
|
||||||
|
'' Sottodirettorio di default per macro
|
||||||
|
'Public Const MACRO_DFL_DIR As String = "Macro"
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' 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.Plugin.StoneCut.ini"
|
||||||
|
|
||||||
|
Public Const S_GENERAL As String = "General"
|
||||||
|
Public Const K_CAMEXEPATH As String = "CAMExePath"
|
||||||
|
Public Const K_DOORCREATOREXEPATH As String = "DoorCreatorExePath"
|
||||||
|
Public Const K_BACKUPDIR As String = "BackupDir"
|
||||||
|
Public Const K_RESOURCESDIR As String = "ResourcesDir"
|
||||||
|
Public Const K_DDFDIR As String = "DDFDir"
|
||||||
|
Public Const K_DDTDIR As String = "DDTDir"
|
||||||
|
Public Const K_GENDDFDIR As String = "GenDDFDir"
|
||||||
|
Public Const K_CSV As String = "CSV"
|
||||||
|
Public Const K_ISCSVOUTPUTENABLED As String = "IsCSVOutputEnabled"
|
||||||
|
Public Const K_CSVOUTPUTPATH As String = "CSVOutputPath"
|
||||||
|
Public Const K_LASTCSVDIR As String = "LastCsvDir"
|
||||||
|
|
||||||
|
Public Const S_CSV As String = "CSV"
|
||||||
|
Public Const K_DDFNAME As String = "DDFName"
|
||||||
|
Public Const K_QUANTITY As String = "Quantity"
|
||||||
|
Public Const K_HEIGHT As String = "Height"
|
||||||
|
Public Const K_WIDTH As String = "Width"
|
||||||
|
Public Const K_THICKNESS As String = "Thickness"
|
||||||
|
Public Const K_SWING As String = "Swing"
|
||||||
|
Public Const K_PHASE As String = "Phase"
|
||||||
|
Public Const K_STATE As String = "State"
|
||||||
|
Public Const K_PROGRAMSENT As String = "ProgramSent"
|
||||||
|
Public Const K_PROGRAMSTART As String = "ProgramStart"
|
||||||
|
Public Const K_PROGRAMEND As String = "ProgramEnd"
|
||||||
|
Public Const K_MANUALADDEDDOORNAME As String = "ManualAddedDoorName"
|
||||||
|
Public Const K_DELIMITER As String = "Delimiter"
|
||||||
|
|
||||||
|
Public Const S_DEBUG As String = "Debug"
|
||||||
|
Public Const K_VARIABLELIST As String = "VariableList"
|
||||||
|
Public Const K_VARIABLEONDRAW As String = "VariableOnDraw"
|
||||||
|
Public Const K_MACHINECOMMANDS As String = "MachineCommands"
|
||||||
|
Public Const K_DOORCIRCLIST As String = "DoorCircList"
|
||||||
|
Public Const K_DOORPRESENCE As String = "DoorPresence"
|
||||||
|
Public Const K_DOORINDEX As String = "DoorIndex"
|
||||||
|
|
||||||
|
Public Const S_NC As String = "NC"
|
||||||
|
Public Const K_NC_SIMULATE As String = "NcSimulate"
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,272 @@
|
|||||||
|
<Grid x:Class="DoorListPageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:Effector.Plugin.StoneCut">
|
||||||
|
<Grid.Resources>
|
||||||
|
<local:StateToSelColorConverter x:Key="StateToSelColorConverter"/>
|
||||||
|
<local:DDTListToBooleanConverter x:Key="DDTListToBooleanConverter"/>
|
||||||
|
</Grid.Resources>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="3"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border BorderThickness="0"
|
||||||
|
Padding="3"
|
||||||
|
BorderBrush="Transparent"
|
||||||
|
Background="{StaticResource Omag_DarkGray}">
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}">
|
||||||
|
<Button ToolTip="Mette in coda di produzione tutte le porte"
|
||||||
|
Command="{Binding ProduceAll_Command}"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/ProduceAll.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>
|
||||||
|
<Button ToolTip="Riporta tutte le porte pronte per essere lavorate allo stato Verificate state"
|
||||||
|
Command="{Binding ResetProductionQueue_Command}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/ResetProduction.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>
|
||||||
|
<Button ToolTip="Cancella tutte le porte presenti in lista"
|
||||||
|
Command="{Binding DeleteAll_Command}"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/DeleteAll.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>
|
||||||
|
<!--<Button ToolTip="Mette in coda di produzione la porta selezionata"
|
||||||
|
Command="{Binding Produce_Command}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/Produce.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<Button ToolTip="Sposta su"
|
||||||
|
Command="{Binding MoveUp_Command}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/MoveUp.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>
|
||||||
|
<Button ToolTip="Sposta giù"
|
||||||
|
Command="{Binding MoveDown_Command}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/MoveDown.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<Button ToolTip="Mark the selected door as not to be produced"
|
||||||
|
Command="{Binding NotProduceDoor_Command}"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/NotProduce.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<Button ToolTip="Aggiunge una porta alla lista"
|
||||||
|
Command="{Binding AddDoor_Command}"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/Add.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<Button ToolTip="Copia la porta selezionata"
|
||||||
|
Command="{Binding CopyDoor_Command}"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/Copy.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<Button ToolTip="Copia Multipla della porta selezionata"
|
||||||
|
Command="{Binding MultipleCopyDoor_Command}"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/MultipleCopy.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<Button ToolTip="Cancella porta selezionata"
|
||||||
|
Command="{Binding Delete_Command}"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/Delete.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<Button ToolTip="Verifica tutte le porte in stato Non Verificata"
|
||||||
|
Command="{Binding Verify_Command}"
|
||||||
|
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||||
|
Style="{StaticResource Button.DoorList}">
|
||||||
|
<Image Source="../Resources/DoorListPage/Verify.png"
|
||||||
|
Style="{StaticResource Button.Image.DoorList}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<TextBlock Text="{Binding sExecPercentage}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="10,0,5,0"
|
||||||
|
Visibility="{Binding ExecPercentage_Visibility, Mode=OneWay}"/>
|
||||||
|
<ProgressBar Minimum="0"
|
||||||
|
Maximum="100"
|
||||||
|
Value="{Binding dExecPercentage, Mode=OneWay}"
|
||||||
|
Height="15"
|
||||||
|
Width="100"
|
||||||
|
Margin="5,0,0,0"
|
||||||
|
Visibility="{Binding ExecPercentage_Visibility}"/>-->
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<FrameworkElement x:Name="dummyElement" Visibility="Collapsed"/>
|
||||||
|
<DataGrid Grid.Row="2"
|
||||||
|
ItemsSource="{Binding DoorList}"
|
||||||
|
SelectedItem="{Binding SelDoor}"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
CanUserDeleteRows="False"
|
||||||
|
CanUserResizeRows="False"
|
||||||
|
SelectionMode="Single"
|
||||||
|
SelectionUnit="FullRow"
|
||||||
|
CanUserSortColumns="False"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
|
BeginningEdit="DoorList_BeginningEdit"
|
||||||
|
HorizontalGridLinesBrush="Transparent"
|
||||||
|
VerticalGridLinesBrush="Transparent"
|
||||||
|
ColumnHeaderHeight="32"
|
||||||
|
HeadersVisibility="Column"
|
||||||
|
FontSize="12"
|
||||||
|
FontFamily="/Resources/Fonts/#Roboto"
|
||||||
|
FontWeight="Regular"
|
||||||
|
RowHeight="32"
|
||||||
|
BorderThickness="0"
|
||||||
|
Background="{StaticResource Omag_LightGray}">
|
||||||
|
<DataGrid.ColumnHeaderStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource Omag_DarkGray}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="FontSize" Value="15"/>
|
||||||
|
<Setter Property="Padding" Value="10,0,10,0"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.ColumnHeaderStyle>
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="ID"
|
||||||
|
Binding="{Binding nId}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn.DoorList}"
|
||||||
|
EditingElementStyle="{StaticResource TextBox.DataGridTextColumn.DoorList}"/>
|
||||||
|
<DataGridTextColumn Header="File Name"
|
||||||
|
Binding="{Binding sFileNameWithoutExtension}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn.DoorList}"
|
||||||
|
EditingElementStyle="{StaticResource TextBox.DataGridTextColumn.DoorList}"/>
|
||||||
|
<DataGridTemplateColumn Width="Auto">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button Command="{Binding DataContext.Produce_Command, RelativeSource={RelativeSource AncestorType={x:Type local:DoorListPageV}}}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/Produce.png"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTextColumn Header="# Table"
|
||||||
|
Binding="{Binding nTable}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn.DoorList}"
|
||||||
|
EditingElementStyle="{StaticResource TextBox.DataGridTextColumn.DoorList}"/>
|
||||||
|
<DataGridTextColumn Header="File Dimension"
|
||||||
|
Binding="{Binding sFileDimension}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn.DoorList}"
|
||||||
|
EditingElementStyle="{StaticResource TextBox.DataGridTextColumn.DoorList}"/>
|
||||||
|
<DataGridTextColumn Header="State"
|
||||||
|
Binding="{Binding nState}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn.DoorList}"
|
||||||
|
EditingElementStyle="{StaticResource TextBox.DataGridTextColumn.DoorList}"/>
|
||||||
|
<DataGridTextColumn Header="Machining Start"
|
||||||
|
Binding="{Binding sMachiningStart}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn.DoorList}"
|
||||||
|
EditingElementStyle="{StaticResource TextBox.DataGridTextColumn.DoorList}"/>
|
||||||
|
<DataGridTextColumn Header="Machining End"
|
||||||
|
Binding="{Binding sMachiningEnd}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn.DoorList}"
|
||||||
|
EditingElementStyle="{StaticResource TextBox.DataGridTextColumn.DoorList}"/>
|
||||||
|
<DataGridTextColumn Header="Machining Time"
|
||||||
|
Binding="{Binding sMachiningTime}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn.DoorList}"
|
||||||
|
EditingElementStyle="{StaticResource TextBox.DataGridTextColumn.DoorList}"/>
|
||||||
|
<DataGridTemplateColumn Width="Auto">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button Command="{Binding DataContext.MoveUp_Command, RelativeSource={RelativeSource AncestorType={x:Type local:DoorListPageV}}}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/MoveUp.png"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn Width="Auto">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button Command="{Binding DataContext.MoveDown_Command, RelativeSource={RelativeSource AncestorType={x:Type local:DoorListPageV}}}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/MoveDown.png"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn Width="Auto">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button Command="{Binding NotProduce_Command}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/NotProduce.png"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn Width="Auto">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button Command="{Binding DataContext.Copy_Command, RelativeSource={RelativeSource AncestorType={x:Type local:DoorListPageV}}}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/Copy.png"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn Width="Auto">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button Command="{Binding DataContext.Delete_Command, RelativeSource={RelativeSource AncestorType={x:Type local:DoorListPageV}}}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Style="{StaticResource Table_Button}">
|
||||||
|
<Image Source="../Resources/DoorListPage/Delete.png"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
<!--<DataGrid.InputBindings>
|
||||||
|
<KeyBinding Key="Delete" Command="{Binding Tag.SelectedMachGroup.DeleteMachGroup_Command,
|
||||||
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||||
|
</DataGrid.InputBindings>-->
|
||||||
|
<DataGrid.RowStyle>
|
||||||
|
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||||
|
<Setter Property="Background" Value="{Binding Background}"/>
|
||||||
|
<Setter Property="Foreground" Value="{Binding Foreground}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{Binding nState, Converter={StaticResource StateToSelColorConverter}}"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.RowStyle>
|
||||||
|
</DataGrid>
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
Public Class DoorListPageV
|
||||||
|
|
||||||
|
' funzione che impedisce di editare le righe che sono gia' in produzione
|
||||||
|
Private Sub DoorList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
||||||
|
'If IsNothing(e.Row) Then Return
|
||||||
|
'Dim RowVM As Door = DirectCast(e.Row.DataContext, Door)
|
||||||
|
'' se in produzione impedisco modifica dei parametri
|
||||||
|
'If RowVM.nState >= Door.PartProgramStates.READY_FOR_PRODUCTION Then
|
||||||
|
' e.Cancel = True
|
||||||
|
'End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,921 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
Imports System.Windows.Threading
|
||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
Imports System.Security.Cryptography
|
||||||
|
Imports Newtonsoft.Json.Linq
|
||||||
|
Imports Effector.Plugin.StoneCut.Door
|
||||||
|
Imports System.Globalization
|
||||||
|
Imports System.Diagnostics
|
||||||
|
Imports Effector.Plugin.Lib
|
||||||
|
|
||||||
|
Public Class DoorListPageVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_BackupTimer As New DispatcherTimer
|
||||||
|
Private m_WriteCSVTimer As New DispatcherTimer
|
||||||
|
Private m_RefreshGraphicsTimer As New DispatcherTimer
|
||||||
|
Private m_ExecProcessManager As ExecProcessManager
|
||||||
|
|
||||||
|
Private m_ReadPartProgramFolderTimer As New DispatcherTimer
|
||||||
|
Private m_sPartProgramFolderPath As String
|
||||||
|
|
||||||
|
Private m_DoorList As New ObservableCollection(Of Door)
|
||||||
|
|
||||||
|
Private m_bResetList As Boolean = False
|
||||||
|
Public ReadOnly Property bResetList As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bResetList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub ResetResetList()
|
||||||
|
m_bResetList = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public ReadOnly Property DoorList As ObservableCollection(Of Door)
|
||||||
|
Get
|
||||||
|
Return m_DoorList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private m_SelDoor As Door
|
||||||
|
Public Property SelDoor As Door
|
||||||
|
Get
|
||||||
|
Return m_SelDoor
|
||||||
|
End Get
|
||||||
|
Set(value As Door)
|
||||||
|
m_SelDoor = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_DDTList As New ObservableCollection(Of String)
|
||||||
|
Public ReadOnly Property DDTList As ObservableCollection(Of String)
|
||||||
|
Get
|
||||||
|
Return m_DDTList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ManualAddedDoorName As String = "Manual"
|
||||||
|
Public ReadOnly Property ManualAddedDoorName As String
|
||||||
|
Get
|
||||||
|
Return m_ManualAddedDoorName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bExecButton_IsEnabled As Boolean = True
|
||||||
|
Public ReadOnly Property bExecButton_IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bExecButton_IsEnabled
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private Sub SetExecButtonIsEnabled(bValue As Boolean)
|
||||||
|
m_bExecButton_IsEnabled = bValue
|
||||||
|
NotifyPropertyChanged(NameOf(bExecButton_IsEnabled))
|
||||||
|
End Sub
|
||||||
|
Private m_nModifyIndex As Integer = 0
|
||||||
|
Private m_nBackupindex As Integer = 0
|
||||||
|
Private m_bWritingBackup As Boolean = False
|
||||||
|
|
||||||
|
Private m_sCSVOutDirPath As String = ""
|
||||||
|
|
||||||
|
Private m_nExecIncrement As Integer = 0
|
||||||
|
Private m_nExecutedArgsCount As Integer = 0
|
||||||
|
Public ReadOnly Property dExecPercentage As Double
|
||||||
|
Get
|
||||||
|
If m_bCreatingDdfs Then
|
||||||
|
Return 5 / m_nTotCreatingDdf * m_nCurrCreatingDdf
|
||||||
|
End If
|
||||||
|
If IsNothing(m_ExecProcessManager) Then Return 0
|
||||||
|
Dim dExecIncrement As Double = If(m_ExecProcessManager.nArgsInQueue = 0, 0, Math.Min(28, m_nExecIncrement) / 34)
|
||||||
|
Return (m_ExecProcessManager.nExecutedArgsCounter + dExecIncrement) / (m_ExecProcessManager.nExecutedArgsCounter + m_ExecProcessManager.nArgsInQueue) * 100
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sExecPercentage As String
|
||||||
|
Get
|
||||||
|
Return DoubleToString(dExecPercentage, 1) & "%"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ExecPercentage_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If((Not IsNothing(m_ExecProcessManager) AndAlso m_ExecProcessManager.ExecutionThreadStatus = ExecProcessManager.ExecutionThreadStatuses.RUNNING) OrElse m_bCreatingDdfs, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bCreatingDdfs As Boolean
|
||||||
|
Private m_nTotCreatingDdf As Integer
|
||||||
|
Private m_nCurrCreatingDdf As Integer
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdProduce As ICommand
|
||||||
|
Private m_cmdProduceAll As ICommand
|
||||||
|
Private m_cmdResetProductionQueue As ICommand
|
||||||
|
Private m_cmdMoveUp As ICommand
|
||||||
|
Private m_cmdMoveDown As ICommand
|
||||||
|
Private m_cmdNotProduce As ICommand
|
||||||
|
Private m_cmdCopy As ICommand
|
||||||
|
' Private m_cmdMultipleCopy As ICommand
|
||||||
|
Private m_cmdDelete As ICommand
|
||||||
|
Private m_cmdDeleteAll As ICommand
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' imposto riferimento in Map
|
||||||
|
Map.SetRefDoorListPageVM(Me)
|
||||||
|
' leggo backup
|
||||||
|
Dim sBackupDirPath As String = ""
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, "BackupDir", "", sBackupDirPath)
|
||||||
|
Dim sBackupFilePath As String = sBackupDirPath & "\Backup.json"
|
||||||
|
Read(sBackupFilePath)
|
||||||
|
m_BackupTimer.Interval = New TimeSpan(0, 0, 1)
|
||||||
|
AddHandler m_BackupTimer.Tick, AddressOf BackupTimer_Tick
|
||||||
|
m_WriteCSVTimer.Interval = New TimeSpan(0, 1, 0)
|
||||||
|
AddHandler m_WriteCSVTimer.Tick, AddressOf WriteCSVTimer_Tick
|
||||||
|
m_RefreshGraphicsTimer.Interval = New TimeSpan(0, 0, 1)
|
||||||
|
AddHandler m_RefreshGraphicsTimer.Tick, AddressOf RefreshGraphicsTimer_Tick
|
||||||
|
m_BackupTimer.Start()
|
||||||
|
' verifico path salvataggio CSV
|
||||||
|
Dim bStartWriteCSV As Boolean = False
|
||||||
|
If GetPluginPrivateProfileInt(S_GENERAL, K_ISCSVOUTPUTENABLED, 0) = 1 Then
|
||||||
|
bStartWriteCSV = True
|
||||||
|
If GetPluginPrivateProfileString(S_GENERAL, K_CSVOUTPUTPATH, "", m_sCSVOutDirPath) = 0 Then
|
||||||
|
bStartWriteCSV = False
|
||||||
|
MessageBox.Show("Path di salvataggio CSV non impostata! Impossibile creare file CSV!", "Errore!", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
End If
|
||||||
|
If bStartWriteCSV AndAlso Not Directory.Exists(m_sCSVOutDirPath) Then
|
||||||
|
bStartWriteCSV = False
|
||||||
|
MessageBox.Show("Path di salvataggio CSV impostata non esiste! Impossibile creare file CSV!", "Errore!", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
End If
|
||||||
|
If bStartWriteCSV Then
|
||||||
|
m_WriteCSVTimer.Start()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
m_RefreshGraphicsTimer.Start()
|
||||||
|
|
||||||
|
' leggo path cartella dei partprogram
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, "PartProgramFolder", "", m_sPartProgramFolderPath)
|
||||||
|
If Not Directory.Exists(m_sPartProgramFolderPath) Then
|
||||||
|
MessageBox.Show("Folder not found! Folder path not configured correctly")
|
||||||
|
End If
|
||||||
|
' avvio timer di copia file
|
||||||
|
AddHandler m_ReadPartProgramFolderTimer.Tick, AddressOf ReadPartProgramFolderTimer_Tick
|
||||||
|
m_ReadPartProgramFolderTimer.Interval = TimeSpan.FromSeconds(1)
|
||||||
|
m_ReadPartProgramFolderTimer.Start()
|
||||||
|
End Sub
|
||||||
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Sub ReadPartProgramFolderTimer_Tick(sender As Object, e As EventArgs)
|
||||||
|
Dim FileList() As String = Directory.GetFiles(m_sPartProgramFolderPath)
|
||||||
|
If FileList.Count = 0 Then Return
|
||||||
|
' copio file e li metto in lista
|
||||||
|
Dim sPartProgramDirPath As String = ""
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, "PartProgramDir", "", sPartProgramDirPath)
|
||||||
|
For nFileIndex = 0 To FileList.Count - 1
|
||||||
|
Dim bFileMove As Boolean = False
|
||||||
|
|
||||||
|
Dim sNewFilePath As String = sPartProgramDirPath & "\" & Path.GetFileName(FileList(nFileIndex))
|
||||||
|
Try
|
||||||
|
File.Move(FileList(nFileIndex), sNewFilePath)
|
||||||
|
bFileMove = True
|
||||||
|
Catch ex As Exception
|
||||||
|
MessageBox.Show("Impossible loading file " & FileList(0))
|
||||||
|
End Try
|
||||||
|
If bFileMove Then
|
||||||
|
Dim CurrFileInfo As New FileInfo(sNewFilePath)
|
||||||
|
Dim CurrFileLength As Double = CDbl(CurrFileInfo.Length)
|
||||||
|
Dim CurrFileLines = File.ReadLines(sNewFilePath).Take(10).ToList()
|
||||||
|
Dim nId As Integer = 0
|
||||||
|
Dim nTable As Integer = 0
|
||||||
|
For nLineIndex = 0 To CurrFileLines.Count - 1
|
||||||
|
Dim IdMatch As Match = Regex.Match(CurrFileLines(nLineIndex), ".*\(ID=(\d+)\)")
|
||||||
|
If Not IsNothing(IdMatch) AndAlso Not String.IsNullOrWhiteSpace(IdMatch.Value) Then
|
||||||
|
Integer.TryParse(IdMatch.Groups(1).Value, nId)
|
||||||
|
End If
|
||||||
|
Dim TableMatch As Match = Regex.Match(CurrFileLines(nLineIndex), ".*\(TABLE=(\d+)\)")
|
||||||
|
If Not IsNothing(TableMatch) AndAlso Not String.IsNullOrWhiteSpace(TableMatch.Value) Then
|
||||||
|
Integer.TryParse(TableMatch.Groups(1).Value, nTable)
|
||||||
|
End If
|
||||||
|
If nId <> 0 AndAlso nTable <> 0 Then Exit For
|
||||||
|
Next
|
||||||
|
m_DoorList.Add(New Door(nId, Path.GetFileName(FileList(nFileIndex)), nTable, CurrFileLength))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
WriteBackup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Read(FilePath As String)
|
||||||
|
If Not File.Exists(FilePath) Then Return
|
||||||
|
Dim sReadedFile As String = File.ReadAllText(FilePath)
|
||||||
|
Dim JsonDoorList As List(Of JsonDoor) = JsonConvert.DeserializeObject(Of List(Of JsonDoor))(sReadedFile)
|
||||||
|
JsonDoorList = JsonDoorList.OrderBy(Of Integer)(Function(x) x.nListIndex).ToList()
|
||||||
|
|
||||||
|
Dim TempDoorList As ObservableCollection(Of Door) = New ObservableCollection(Of Door)((From JsonDoor In JsonDoorList
|
||||||
|
Select New Door(JsonDoor)).ToList())
|
||||||
|
'For Each CurrDoor In TempDoorList
|
||||||
|
' If CurrDoor.nState >= Door.PartProgramStates.READY_FOR_PRODUCTION AndAlso CurrDoor.nState < Door.PartProgramStates.MACHINE_1_END Then
|
||||||
|
' CurrDoor.SetState(Door.PartProgramStates.VERIFIED, False)
|
||||||
|
' End If
|
||||||
|
'Next
|
||||||
|
'WriteBackup()
|
||||||
|
m_DoorList = TempDoorList
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Write(FilePath As String)
|
||||||
|
Dim JsonDoorList As New List(Of JsonDoor)
|
||||||
|
For nDoorIndex As Integer = 0 To m_DoorList.Count - 1
|
||||||
|
JsonDoorList.Add(New JsonDoor(nDoorIndex, m_DoorList(nDoorIndex)))
|
||||||
|
Next
|
||||||
|
Dim JsonFromWindow As String = JsonConvert.SerializeObject(JsonDoorList, Formatting.Indented)
|
||||||
|
If File.Exists(FilePath) Then
|
||||||
|
Dim sBackupFilePath As String = Path.ChangeExtension(FilePath, ".bck")
|
||||||
|
If File.Exists(sBackupFilePath) Then
|
||||||
|
Try
|
||||||
|
File.Delete(sBackupFilePath)
|
||||||
|
Catch ex As Exception
|
||||||
|
Map.refSupervisorFunction.PlgOutLog("Error! Impossible deleting backup file!")
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
File.Move(FilePath, sBackupFilePath)
|
||||||
|
Catch ex As Exception
|
||||||
|
Map.refSupervisorFunction.PlgOutLog("Error! Impossible renaming backup file!")
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
File.WriteAllText(FilePath, JsonFromWindow)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub WriteBackupCmd()
|
||||||
|
If m_bWritingBackup Then Return
|
||||||
|
m_bWritingBackup = True
|
||||||
|
m_nBackupindex = m_nModifyIndex
|
||||||
|
Dim sBackupDirPath As String = ""
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, K_BACKUPDIR, "", sBackupDirPath)
|
||||||
|
Dim sBackupFilePath As String = sBackupDirPath & "\Backup.json"
|
||||||
|
Write(sBackupFilePath)
|
||||||
|
m_bWritingBackup = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub WriteBackup()
|
||||||
|
m_nModifyIndex += 1
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BackupTimer_Tick(sender As Object, e As EventArgs)
|
||||||
|
If m_nBackupindex < m_nModifyIndex Then
|
||||||
|
WriteBackupCmd()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub WriteCSVTimer_Tick(sender As Object, e As EventArgs)
|
||||||
|
'SaveCSV()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RefreshGraphicsTimer_Tick(sender As Object, e As EventArgs)
|
||||||
|
'If IsNothing(m_ExecProcessManager) Then Return
|
||||||
|
'' ciclo su coda risultati
|
||||||
|
'Dim ArgumentsResult As ProcessArgsResult = m_ExecProcessManager.ArgumentsResultDequeue
|
||||||
|
'While Not IsNothing(ArgumentsResult)
|
||||||
|
' ' aggiorno risultato sulla porta
|
||||||
|
' Dim CurrRequestDoor As Door = m_DoorList.FirstOrDefault(Function(x) x.nId = ArgumentsResult.ProcessArgs.nId)
|
||||||
|
' If Not IsNothing(CurrRequestDoor) Then
|
||||||
|
' CurrRequestDoor.SetState(If(ArgumentsResult.nResult = 0, Door.PartProgramStates.VERIFIED, Door.PartProgramStates.VERIFICATION_FAILED))
|
||||||
|
' ' elimino file generati
|
||||||
|
' Dim sGenDDFDirPath As String = ""
|
||||||
|
' GetPluginPrivateProfileString(S_GENERAL, K_GENDDFDIR, "", sGenDDFDirPath)
|
||||||
|
' Dim sDoorFileName As String = Path.GetFileNameWithoutExtension(CurrRequestDoor.sFileName) & "_" & CurrRequestDoor.nId
|
||||||
|
' Try
|
||||||
|
' File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".tok")
|
||||||
|
' 'File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.tok")
|
||||||
|
' File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".cnc")
|
||||||
|
' 'File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_a.cnc")
|
||||||
|
' 'File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_b.cnc")
|
||||||
|
' File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.cnc")
|
||||||
|
' 'File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2_a.cnc")
|
||||||
|
' File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".html")
|
||||||
|
' 'File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.html")
|
||||||
|
' 'If ArgumentsResult.nResult = 0 Then
|
||||||
|
' File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".log")
|
||||||
|
' 'End If
|
||||||
|
' ''File.Delete(sGenDDFDirPath & "\" & CurrRequestDoor.sDDFName & ".nge")
|
||||||
|
' File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".nge")
|
||||||
|
' 'File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".sest")
|
||||||
|
' 'File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.sest")
|
||||||
|
' 'Dim SestFiles() As String = System.IO.Directory.GetFiles(sGenDDFDirPath & "\", sDoorFileName & "*.sest")
|
||||||
|
' 'For Each FilePath In SestFiles
|
||||||
|
' ' File.Delete(FilePath)
|
||||||
|
' 'Next
|
||||||
|
' ''File.Delete(sGenDDFDirPath & "\" & CurrRequestDoor.sDDFName & ".txt")
|
||||||
|
' File.Delete(sGenDDFDirPath & "\" & sDoorFileName & ".txt")
|
||||||
|
' 'File.Delete(sGenDDFDirPath & "\" & sDoorFileName & "_2.txt")
|
||||||
|
' Catch ex As Exception
|
||||||
|
|
||||||
|
' End Try
|
||||||
|
' End If
|
||||||
|
' ' verifico se ci sono altre porte dello stesso tipo da aggiornare
|
||||||
|
' If m_AssociationList.ContainsKey(CurrRequestDoor.nId) Then
|
||||||
|
' Dim SameDoorList As List(Of Integer) = m_AssociationList(CurrRequestDoor.nId)
|
||||||
|
' For Each CurrDoorId In SameDoorList
|
||||||
|
' Dim CurrDoor As Door = m_DoorList.FirstOrDefault(Function(x) x.nId = CurrDoorId)
|
||||||
|
' If Not IsNothing(CurrDoor) Then
|
||||||
|
' If CopyGenDdfFile(CurrRequestDoor, CurrDoor) Then
|
||||||
|
' CurrDoor.SetState(If(ArgumentsResult.nResult = 0, Door.PartProgramStates.VERIFIED, Door.PartProgramStates.VERIFICATION_FAILED))
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
' WriteBackup()
|
||||||
|
' ArgumentsResult = m_ExecProcessManager.ArgumentsResultDequeue
|
||||||
|
'End While
|
||||||
|
'' aggiorno grafica
|
||||||
|
'If m_nExecutedArgsCount <> m_ExecProcessManager.nExecutedArgsCounter Then
|
||||||
|
' m_nExecutedArgsCount = m_ExecProcessManager.nExecutedArgsCounter
|
||||||
|
' m_nExecIncrement = 0
|
||||||
|
'ElseIf m_ExecProcessManager.nCalculatingProcesses > 0 Then
|
||||||
|
' m_nExecIncrement += 1
|
||||||
|
'End If
|
||||||
|
'If Not bExecButton_IsEnabled AndAlso m_ExecProcessManager.ExecutionThreadStatus = ExecProcessManager.ExecutionThreadStatuses.RUNNING Then
|
||||||
|
' NotifyPropertyChanged(NameOf(dExecPercentage))
|
||||||
|
' NotifyPropertyChanged(NameOf(sExecPercentage))
|
||||||
|
'End If
|
||||||
|
'If Not bExecButton_IsEnabled AndAlso m_ExecProcessManager.ExecutionThreadStatus = ExecProcessManager.ExecutionThreadStatuses.STOPPED Then
|
||||||
|
' SetExecButtonIsEnabled(True)
|
||||||
|
'End If
|
||||||
|
'NotifyPropertyChanged(NameOf(ExecPercentage_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function GetNextDoor() As Door
|
||||||
|
Dim NextDoor As Door = m_DoorList.FirstOrDefault(Function(x) x.nState = Door.PartProgramStates.READY_FOR_PRODUCTION)
|
||||||
|
If Not IsNothing(NextDoor) Then
|
||||||
|
Map.refSupervisorFunction.PlgOutLog("GetNextDoor: door " & NextDoor.nId & " sent to NC")
|
||||||
|
NextDoor.SetState(Door.PartProgramStates.SENT_TO_NC)
|
||||||
|
WriteBackup()
|
||||||
|
End If
|
||||||
|
Return NextDoor
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function NewDoorId() As Integer
|
||||||
|
Dim nId As Integer = 1
|
||||||
|
If m_DoorList.Count > 0 Then
|
||||||
|
Dim nMaxId As Integer = m_DoorList.Max(Of Integer)(Function(x) x.nId)
|
||||||
|
nId = nMaxId + 1
|
||||||
|
End If
|
||||||
|
Return nId
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Sub ResetStateAfterReset()
|
||||||
|
'For Each Door In m_DoorList
|
||||||
|
' If Door.nState > Door.PartProgramStates.VERIFIED AndAlso Door.nState < Door.PartProgramStates.MACHINE_1_END Then
|
||||||
|
' Door.SetState(Door.PartProgramStates.VERIFIED, False)
|
||||||
|
' End If
|
||||||
|
'Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Copy"
|
||||||
|
|
||||||
|
Public ReadOnly Property Copy_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCopy Is Nothing Then
|
||||||
|
m_cmdCopy = New Command(AddressOf CopyCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdCopy
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub CopyCmd(CurrDoor As Door)
|
||||||
|
If IsNothing(CurrDoor) Then Return
|
||||||
|
Dim nId As Integer = NewDoorId()
|
||||||
|
Dim CopyDoor As Door = CurrDoor.Copy(nId)
|
||||||
|
If Not IsNothing(CopyDoor) Then
|
||||||
|
m_DoorList.Add(CurrDoor.Copy(nId))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#End Region ' CopyDoor
|
||||||
|
|
||||||
|
#Region "MoveUp"
|
||||||
|
|
||||||
|
Public ReadOnly Property MoveUp_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdMoveUp Is Nothing Then
|
||||||
|
m_cmdMoveUp = New Command(AddressOf MoveUp)
|
||||||
|
End If
|
||||||
|
Return m_cmdMoveUp
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub MoveUp(CurrDoor As Object)
|
||||||
|
If IsNothing(CurrDoor) Then Return
|
||||||
|
Dim nOldIndex As Integer = m_DoorList.IndexOf(CurrDoor)
|
||||||
|
If nOldIndex = 0 Then Return
|
||||||
|
If m_DoorList(nOldIndex - 1).nState >= Door.PartProgramStates.READY_FOR_PRODUCTION Then Return
|
||||||
|
m_DoorList.Move(nOldIndex, nOldIndex - 1)
|
||||||
|
WriteBackup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' MoveUp
|
||||||
|
|
||||||
|
#Region "MoveDown"
|
||||||
|
|
||||||
|
Public ReadOnly Property MoveDown_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdMoveDown Is Nothing Then
|
||||||
|
m_cmdMoveDown = New Command(AddressOf MoveDown)
|
||||||
|
End If
|
||||||
|
Return m_cmdMoveDown
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub MoveDown(CurrDoor As Door)
|
||||||
|
If IsNothing(CurrDoor) OrElse CurrDoor.nState >= Door.PartProgramStates.READY_FOR_PRODUCTION Then Return
|
||||||
|
Dim nOldIndex As Integer = m_DoorList.IndexOf(CurrDoor)
|
||||||
|
If nOldIndex = m_DoorList.Count - 1 Then Return
|
||||||
|
m_DoorList.Move(nOldIndex, nOldIndex + 1)
|
||||||
|
WriteBackup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' MoveDown
|
||||||
|
|
||||||
|
#Region "Delete"
|
||||||
|
|
||||||
|
Public ReadOnly Property Delete_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDelete Is Nothing Then
|
||||||
|
m_cmdDelete = New Command(AddressOf Delete)
|
||||||
|
End If
|
||||||
|
Return m_cmdDelete
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Delete(CurrDoor As Door)
|
||||||
|
If m_DoorList.Count = 0 OrElse IsNothing(CurrDoor) Then Return
|
||||||
|
Dim bReset As Boolean = True
|
||||||
|
'If Not LuaGetGlobVar("bReset", bReset) OrElse Not bReset Then
|
||||||
|
' If (SelDoor.nState >= Door.PartProgramStates.READY_FOR_PRODUCTION AndAlso SelDoor.nState < Door.PartProgramStates.MACHINE_1_END) Then Return
|
||||||
|
'End If
|
||||||
|
If MessageBox.Show("Sei sicuro di voler cancellare la porta selezionata?", "Avviso", MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.Yes Then
|
||||||
|
' cancello file
|
||||||
|
Dim sPartProgramDirPath As String = ""
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, "PartProgramDir", "", sPartProgramDirPath)
|
||||||
|
Try
|
||||||
|
File.Delete(sPartProgramDirPath & "\" & CurrDoor.sFileName)
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
m_DoorList.Remove(SelDoor)
|
||||||
|
WriteBackup()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Delete
|
||||||
|
|
||||||
|
#Region "DeleteAll"
|
||||||
|
|
||||||
|
Public ReadOnly Property DeleteAll_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDeleteAll Is Nothing Then
|
||||||
|
m_cmdDeleteAll = New Command(AddressOf DeleteAll)
|
||||||
|
End If
|
||||||
|
Return m_cmdDeleteAll
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub DeleteAll()
|
||||||
|
If m_DoorList.Count = 0 Then Return
|
||||||
|
Dim bReset As Boolean = True
|
||||||
|
'If Not LuaGetGlobVar("bReset", bReset) OrElse Not bReset Then
|
||||||
|
' MessageBox.Show("Impossibile cancellare tutte le porte!" & Environment.NewLine & "La macchina deve essere in stato Reset per poter cancellare tutte le porte!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
|
' Return
|
||||||
|
'End If
|
||||||
|
'' verifico che tutte le porte siano in stato prodotto o da non produrre
|
||||||
|
'Dim bAllProduced As Boolean = True
|
||||||
|
'For Each CsvDoor In m_DoorList
|
||||||
|
' If CsvDoor.nState <> PartProgramStates.MACHINE_1_END AndAlso CsvDoor.nState <> PartProgramStates.PRODUCED AndAlso CsvDoor.nState <> PartProgramStates.NOTPRODUCE AndAlso CsvDoor.nState <> PartProgramStates.VERIFICATION_FAILED AndAlso CsvDoor.nState <> PartProgramStates.VERIFIED Then
|
||||||
|
' bAllProduced = False
|
||||||
|
' End If
|
||||||
|
'Next
|
||||||
|
'If Not bAllProduced Then
|
||||||
|
' MessageBox.Show("Impossibile cancellare tutte le porte!" & Environment.NewLine & "Per cancellare tutte le porte, devono essere tutte non in lavorazione!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
|
' Return
|
||||||
|
'End If
|
||||||
|
If MessageBox.Show("Sei sicuro di voler cancellare tutte le porte?", "Info", MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
|
||||||
|
For PartProgramIndex = m_DoorList.Count - 1 To 0 Step -1
|
||||||
|
' cancello file
|
||||||
|
Dim sPartProgramDirPath As String = ""
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, "PartProgramDir", "", sPartProgramDirPath)
|
||||||
|
Try
|
||||||
|
File.Delete(sPartProgramDirPath & "\" & m_DoorList(PartProgramIndex).sFileName)
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
m_DoorList.RemoveAt(PartProgramIndex)
|
||||||
|
Next
|
||||||
|
WriteBackup()
|
||||||
|
'' cancello backup lua per ripartire pulito
|
||||||
|
'Try
|
||||||
|
' Dim sBackupDirPath As String = ""
|
||||||
|
' GetPluginPrivateProfileString(S_GENERAL, K_BACKUPDIR, "", sBackupDirPath)
|
||||||
|
' Dim sLuaBackupFilePath As String = sBackupDirPath & "\LuaBackup.json"
|
||||||
|
' File.Delete(sLuaBackupFilePath)
|
||||||
|
'Catch ex As Exception
|
||||||
|
' Map.refSupervisorFunction.PlgOutLog("Fallita cancellazione del file LuaBackup!")
|
||||||
|
'End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' DeleteAll
|
||||||
|
|
||||||
|
#Region "Produce"
|
||||||
|
|
||||||
|
Public ReadOnly Property Produce_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdProduce Is Nothing Then
|
||||||
|
m_cmdProduce = New Command(AddressOf Produce)
|
||||||
|
End If
|
||||||
|
Return m_cmdProduce
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Produce(CurrDoor As Door)
|
||||||
|
ProduceDoor(CurrDoor)
|
||||||
|
WriteBackup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub ProduceDoor(DoorToProduce As Door, Optional bWriteBackup As Boolean = True)
|
||||||
|
If IsNothing(DoorToProduce) Then Return
|
||||||
|
' la sposto dopo l'ultima da produrre
|
||||||
|
Dim nNewIndex As Integer = m_DoorList.IndexOf(m_DoorList.FirstOrDefault(Function(x) x.nState < Door.PartProgramStates.READY_FOR_PRODUCTION))
|
||||||
|
Dim nOldIndex As Integer = m_DoorList.IndexOf(DoorToProduce)
|
||||||
|
m_DoorList.Move(nOldIndex, nNewIndex)
|
||||||
|
DoorToProduce.SetState(Door.PartProgramStates.READY_FOR_PRODUCTION, bWriteBackup)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Produce
|
||||||
|
|
||||||
|
#Region "ProduceAll"
|
||||||
|
|
||||||
|
Public ReadOnly Property ProduceAll_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdProduceAll Is Nothing Then
|
||||||
|
m_cmdProduceAll = New Command(AddressOf ProduceAll)
|
||||||
|
End If
|
||||||
|
Return m_cmdProduceAll
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub ProduceAll()
|
||||||
|
If m_DoorList.Count = 0 Then Return
|
||||||
|
For nDoorIndex = 0 To m_DoorList.Count - 1
|
||||||
|
Dim CurrDoor As Door = m_DoorList(nDoorIndex)
|
||||||
|
If CurrDoor.nState <> Door.PartProgramStates.MACHINE_START AndAlso CurrDoor.nState <> Door.PartProgramStates.PRODUCED Then
|
||||||
|
ProduceDoor(CurrDoor, False)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
WriteBackup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ProduceAll
|
||||||
|
|
||||||
|
#Region "ResetProductionQueue"
|
||||||
|
|
||||||
|
Public ReadOnly Property ResetProductionQueue_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdResetProductionQueue Is Nothing Then
|
||||||
|
m_cmdResetProductionQueue = New Command(AddressOf ResetProductionQueueCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdResetProductionQueue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub ResetProductionQueueCmd()
|
||||||
|
ResetProductionQueue()
|
||||||
|
WriteBackup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub ResetProductionQueue()
|
||||||
|
For Each Door In m_DoorList
|
||||||
|
If Door.nState = Door.PartProgramStates.READY_FOR_PRODUCTION OrElse Door.nState = Door.PartProgramStates.SENT_TO_NC Then
|
||||||
|
Door.SetState(Door.PartProgramStates.NULL)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
m_bResetList = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ResetProductionQueue
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class Door
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum SWINGTYPE As Integer
|
||||||
|
UNDEFINED = 0
|
||||||
|
RIGHT = 1
|
||||||
|
LEFT = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private Shared m_refWriteBackup As Action
|
||||||
|
|
||||||
|
Public Enum PartProgramStates As Integer
|
||||||
|
NULL = 0
|
||||||
|
READY_FOR_PRODUCTION = 1
|
||||||
|
SENT_TO_NC = 2
|
||||||
|
MACHINE_START = 3
|
||||||
|
PRODUCED = 4
|
||||||
|
NOTPRODUCE = 10
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sFileName As String
|
||||||
|
Public Property sFileName As String
|
||||||
|
Get
|
||||||
|
Return m_sFileName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sFileName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property sFileNameWithoutExtension As String
|
||||||
|
Get
|
||||||
|
Return If(String.IsNullOrWhiteSpace(m_sFileName), "", Path.GetFileNameWithoutExtension(m_sFileName))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nTable As Integer
|
||||||
|
Public ReadOnly Property nTable As Integer
|
||||||
|
Get
|
||||||
|
Return m_nTable
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dFileDimension As Double
|
||||||
|
Public ReadOnly Property dFileDimension As Double
|
||||||
|
Get
|
||||||
|
Return m_dFileDimension
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property sFileDimension As String
|
||||||
|
Get
|
||||||
|
Return DoubleToString(m_dFileDimension / 1000, 2) & "Kb"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nState As PartProgramStates = PartProgramStates.NULL
|
||||||
|
Public ReadOnly Property nState As PartProgramStates
|
||||||
|
Get
|
||||||
|
Return m_nState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetState(value As PartProgramStates, Optional bWriteBackup As Boolean = True, Optional bUpdate As Boolean = True)
|
||||||
|
m_nState = value
|
||||||
|
If bWriteBackup Then Map.refDoorListPageVM.WriteBackup()
|
||||||
|
If bUpdate Then
|
||||||
|
NotifyPropertyChanged(NameOf(nState))
|
||||||
|
NotifyPropertyChanged(NameOf(Background))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "Statistics"
|
||||||
|
|
||||||
|
Private m_dtMachiningStart As DateTime = DateTime.MinValue
|
||||||
|
Friend ReadOnly Property dtMachiningStart As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtMachiningStart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property sMachiningStart As String
|
||||||
|
Get
|
||||||
|
Return ConvertDateTimeToString(m_dtMachiningStart)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetMachiningStart(dtMachiningStart As DateTime)
|
||||||
|
m_dtMachiningStart = dtMachiningStart
|
||||||
|
NotifyPropertyChanged(NameOf(sMachiningStart))
|
||||||
|
End Sub
|
||||||
|
'Friend Sub SetMachiningStart(Machining1Start As Long)
|
||||||
|
' m_dtMachiningStart = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(Machining1Start).ToLocalTime()
|
||||||
|
' NotifyPropertyChanged(NameOf(sMachiningStart))
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
Private m_dtMachiningEnd As DateTime = DateTime.MinValue
|
||||||
|
Friend ReadOnly Property dtMachiningEnd As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtMachiningEnd
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property sMachiningEnd As String
|
||||||
|
Get
|
||||||
|
Return ConvertDateTimeToString(m_dtMachiningEnd)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetMachiningEnd(dtMachiningEnd As DateTime)
|
||||||
|
m_dtMachiningEnd = dtMachiningEnd
|
||||||
|
NotifyPropertyChanged(NameOf(sMachiningEnd))
|
||||||
|
NotifyPropertyChanged(NameOf(sMachiningTime))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public ReadOnly Property sMachiningTime As String
|
||||||
|
Get
|
||||||
|
If m_dtMachiningStart = DateTime.MinValue OrElse m_dtMachiningEnd = DateTime.MinValue Then Return String.Format("{0:c}", TimeSpan.Zero)
|
||||||
|
Return String.Format("{0:c}", (m_dtMachiningEnd - m_dtMachiningStart))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Statistics
|
||||||
|
|
||||||
|
Public ReadOnly Property Background As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Select Case m_nState
|
||||||
|
Case PartProgramStates.NULL
|
||||||
|
Return Application.Current.FindResource("Omag_LightGray")
|
||||||
|
Case PartProgramStates.READY_FOR_PRODUCTION
|
||||||
|
Return Dictionary.Effector_LightBlue_Status
|
||||||
|
Case PartProgramStates.NOTPRODUCE
|
||||||
|
Return Dictionary.Effector_Yellow_Status
|
||||||
|
Case PartProgramStates.MACHINE_START
|
||||||
|
Return Dictionary.Effector_Blue_Status
|
||||||
|
Case PartProgramStates.PRODUCED
|
||||||
|
Return Dictionary.Effector_Gray_Status
|
||||||
|
Case Else
|
||||||
|
Return Brushes.LightGray
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Foreground As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Select Case m_nState
|
||||||
|
Case PartProgramStates.NULL
|
||||||
|
Return Brushes.White
|
||||||
|
Case PartProgramStates.NOTPRODUCE
|
||||||
|
Return Dictionary.Effector_Yellow_Status
|
||||||
|
Case PartProgramStates.MACHINE_START
|
||||||
|
Return Dictionary.Effector_Blue_Status
|
||||||
|
Case PartProgramStates.PRODUCED
|
||||||
|
Return Dictionary.Effector_Gray_Status
|
||||||
|
Case Else
|
||||||
|
Return Brushes.White
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdMoveUp As ICommand
|
||||||
|
Private m_cmdMoveDown As ICommand
|
||||||
|
Private m_cmdNotProduce As ICommand
|
||||||
|
Private m_cmdCopyDoor As ICommand
|
||||||
|
'Private m_cmdMultipleCopyDoor As ICommand
|
||||||
|
Private m_cmdDelete As ICommand
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sFileName As String, nTable As Integer, dFileDimension As Double)
|
||||||
|
m_nId = nId
|
||||||
|
m_sFileName = sFileName
|
||||||
|
m_nTable = nTable
|
||||||
|
m_dFileDimension = dFileDimension
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(JsonDoor As JsonDoor)
|
||||||
|
m_nId = JsonDoor.nId
|
||||||
|
m_sFileName = JsonDoor.sFileName
|
||||||
|
m_nTable = JsonDoor.nTable
|
||||||
|
m_dFileDimension = JsonDoor.dFileDimension
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Function Copy(nId As Integer) As Door
|
||||||
|
Dim sPartProgramDirPath As String = ""
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, "PartProgramDir", "", sPartProgramDirPath)
|
||||||
|
Dim nCopyIndex As Integer = 1
|
||||||
|
Dim sFileExtension As String = Path.GetExtension(m_sFileName)
|
||||||
|
Dim sFileName As String = Path.GetFileNameWithoutExtension(m_sFileName)
|
||||||
|
While File.Exists(sPartProgramDirPath & "\" & sFileName & "_" & nCopyIndex & sFileExtension)
|
||||||
|
nCopyIndex += 1
|
||||||
|
End While
|
||||||
|
Dim bFileCopy As Boolean = False
|
||||||
|
Try
|
||||||
|
File.Copy(sPartProgramDirPath & "\" & m_sFileName, sPartProgramDirPath & "\" & sFileName & "_" & nCopyIndex & sFileExtension)
|
||||||
|
bFileCopy = True
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
If bFileCopy Then
|
||||||
|
Return New Door(nId, sFileName & "_" & nCopyIndex & sFileExtension, m_nTable, m_dFileDimension)
|
||||||
|
Else Return Nothing
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "NotProduce"
|
||||||
|
|
||||||
|
Public ReadOnly Property NotProduce_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdNotProduce Is Nothing Then
|
||||||
|
m_cmdNotProduce = New Command(AddressOf NotProduce)
|
||||||
|
End If
|
||||||
|
Return m_cmdNotProduce
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub NotProduce()
|
||||||
|
SetState(If(nState = Door.PartProgramStates.NULL, Door.PartProgramStates.NOTPRODUCE, Door.PartProgramStates.NULL))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' NotProduceDoor
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class CustomerParameter
|
||||||
|
|
||||||
|
Private m_sHeader As String
|
||||||
|
Public ReadOnly Property sHeader As String
|
||||||
|
Get
|
||||||
|
Return m_sHeader
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sValue As String
|
||||||
|
Public ReadOnly Property sValue As String
|
||||||
|
Get
|
||||||
|
Return m_sValue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetValue(value As String)
|
||||||
|
m_sValue = value
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(sHeader As String, sValue As String)
|
||||||
|
m_sHeader = sHeader
|
||||||
|
m_sValue = sValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class StateToSelColorConverter
|
||||||
|
Implements IValueConverter
|
||||||
|
|
||||||
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||||
|
If Not TypeOf value Is PartProgramStates Then Return Brushes.Aqua
|
||||||
|
'Select Case value
|
||||||
|
' Case PartProgramStates.LOADED_FROM_CSV
|
||||||
|
' Return Dictionary.Effector_White_SelStatus
|
||||||
|
' Case PartProgramStates.VERIFIED
|
||||||
|
' Return Dictionary.Effector_Green_SelStatus
|
||||||
|
' Case PartProgramStates.VERIFICATION_FAILED
|
||||||
|
' Return Dictionary.Effector_Red_SelStatus
|
||||||
|
' Case PartProgramStates.SKIPPED, PartProgramStates.NOTPRODUCE
|
||||||
|
' Return Dictionary.Effector_Yellow_SelStatus
|
||||||
|
' Case PartProgramStates.READY_FOR_PRODUCTION, PartProgramStates.ON_LOAD_STATION
|
||||||
|
' Return Dictionary.Effector_LightBlue_SelStatus
|
||||||
|
' Case PartProgramStates.MACHINE_1_START
|
||||||
|
' Return Dictionary.Effector_Blue_SelStatus
|
||||||
|
' Case PartProgramStates.MACHINE_1_END, PartProgramStates.PRODUCED
|
||||||
|
' Return Dictionary.Effector_Gray_SelStatus
|
||||||
|
' Case Else
|
||||||
|
' Return Dictionary.Effector_White_SelStatus
|
||||||
|
'End Select
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||||
|
Throw New NotImplementedException()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class DDTListToBooleanConverter
|
||||||
|
Implements IValueConverter
|
||||||
|
|
||||||
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||||
|
If Not TypeOf value Is ObservableCollection(Of String) Then Return False
|
||||||
|
Return DirectCast(value, ObservableCollection(Of String)).Count = 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||||
|
Throw New NotImplementedException()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
<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.StoneCut</RootNamespace>
|
||||||
|
<AssemblyName>Effector.Plugin.StoneCut</AssemblyName>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<MyType>Custom</MyType>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<ProjectGuid>{7C77F537-8235-40AB-B24A-4E71CFB96D2C}</ProjectGuid>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</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.StoneCut.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.StoneCut.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="Effector.Plugin.Interface">
|
||||||
|
<HintPath>..\..\Effector.Main\Effector.Plugin.Interface\bin\Debug\Effector.Plugin.Interface.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="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="Constants\ConstGen.vb" />
|
||||||
|
<Compile Include="Constants\ConstIni.vb" />
|
||||||
|
<Compile Include="DoorListPage\DoorListPageV.xaml.vb">
|
||||||
|
<DependentUpon>DoorListPageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DoorListPage\DoorListPageVM.vb" />
|
||||||
|
<Compile Include="FiveLakesUI.xaml.vb">
|
||||||
|
<DependentUpon>FiveLakesUI.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FiveLakesUIVM.vb" />
|
||||||
|
<Compile Include="LUA\LuaManager.vb" />
|
||||||
|
<Compile Include="LUA\Lua_Aux.vb" />
|
||||||
|
<Compile Include="LUA\Lua_General.vb" />
|
||||||
|
<Compile Include="MachinePage\MachinePageV.xaml.vb">
|
||||||
|
<DependentUpon>MachinePageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MachinePage\MachinePageVM.vb" />
|
||||||
|
<Compile Include="MainMenu\MainMenuV.xaml.vb">
|
||||||
|
<DependentUpon>MainMenuV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainMenu\MainMenuVM.vb" />
|
||||||
|
<Compile Include="RestartWnd\RestartWndV.xaml.vb">
|
||||||
|
<DependentUpon>RestartWndV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RestartWnd\RestartWndVM.vb" />
|
||||||
|
<Compile Include="StatisticsPage\StatisticsPageV.xaml.vb">
|
||||||
|
<DependentUpon>StatisticsPageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="StatisticsPage\StatisticsPageVM.vb" />
|
||||||
|
<Compile Include="Utility\Dictionary.xaml.vb">
|
||||||
|
<DependentUpon>Dictionary.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\AssemblyInfo.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Utility\JsonUtility.vb" />
|
||||||
|
<Compile Include="Utility\Map.vb" />
|
||||||
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||||
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<None Include="My Project\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<Resource Include="Resources\Fonts\Roboto-Light.ttf" />
|
||||||
|
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Include="DoorListPage\DoorListPageV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="FiveLakesUI.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="MachinePage\MachinePageV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="MainMenu\MainMenuV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="RestartWnd\RestartWndV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="StatisticsPage\StatisticsPageV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Utility\Dictionary.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\DoorListPage\Add.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\Copy.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\Delete.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\DeleteCsv.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\MoveDown.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\MoveUp.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\MultipleCopy.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\NotProduce.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\OpenCsv.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\OpenProduction.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\Produce.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\ProduceAll.old.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\ProduceAll.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\ResetProduction.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\SaveCsv.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\SkipDoor.png" />
|
||||||
|
<Resource Include="Resources\DoorListPage\Verify.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\DoorListPage\DeleteAll.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)</PreBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Effector\Plugin\Effector.Plugin.StoneCut\Effector.Plugin.StoneCut.dll
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets" Condition="Exists('..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets')" />
|
||||||
|
<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'))" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<Grid x:Class="FiveLakesUI"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:Effector.Plugin.StoneCut"
|
||||||
|
DataContext="{StaticResource FiveLakesUIVM}">
|
||||||
|
<local:DoorListPageV DataContext="{StaticResource DoorListVM}"/>
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
Imports System.ComponentModel.Composition
|
||||||
|
Imports Effector.Plugin.Interface
|
||||||
|
|
||||||
|
<Export(GetType(IPluginControl))>
|
||||||
|
<ExportMetadata("Name", "Project")>
|
||||||
|
Public Class FiveLakesUI
|
||||||
|
Implements IPluginControl
|
||||||
|
|
||||||
|
|
||||||
|
Private m_FiveLakesUIVM As FiveLakesUIVM
|
||||||
|
|
||||||
|
<ImportingConstructor>
|
||||||
|
Sub New(Host As IHost)
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
'' Add any initialization after the InitializeComponent() call.
|
||||||
|
m_FiveLakesUIVM = Me.DataContext
|
||||||
|
'Me.DataContext = m_FiveLakesUIVM
|
||||||
|
AddHandler Me.Loaded, AddressOf FiveLakesUIV_Loaded
|
||||||
|
Map.SetRefSupervisorFunction(Host)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Private Sub Button1_Click(sender As Object, e As RoutedEventArgs) Handles Button1.Click
|
||||||
|
' 'TextBlockTest.Text = Host.PluginTestInfo
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
Private Sub FiveLakesUIV_Loaded(sender As Object, e As RoutedEventArgs)
|
||||||
|
m_FiveLakesUIVM.SetTextTest("Prova 1!!")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
Imports System.ComponentModel.Composition
|
||||||
|
Imports Effector.Plugin.Interface
|
||||||
|
Imports Effector.Plugin.Lib
|
||||||
|
|
||||||
|
Public Class FiveLakesUIVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum Pages As Integer
|
||||||
|
DOOR_LIST = 0
|
||||||
|
MACHINE_STATUS = 1
|
||||||
|
STATISTICS = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_sDataRoot As String
|
||||||
|
Private m_sConfigDir As String
|
||||||
|
Private m_sIniFile As String
|
||||||
|
Private m_sResourcesRoot As String
|
||||||
|
|
||||||
|
Private m_SelPage As Pages
|
||||||
|
Public Property SelPage As Integer
|
||||||
|
Get
|
||||||
|
Return m_SelPage
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_SelPage = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelPage(nPage As Pages)
|
||||||
|
m_SelPage = nPage
|
||||||
|
NotifyPropertyChanged(NameOf(SelPage))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_TextTest As String
|
||||||
|
Public ReadOnly Property TextTest As String
|
||||||
|
Get
|
||||||
|
Return m_TextTest
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetTextTest(sValue As String)
|
||||||
|
m_TextTest = sValue
|
||||||
|
NotifyPropertyChanged(NameOf(TextTest))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.BeginInit(Me)
|
||||||
|
' Impostazione path radice per i dati
|
||||||
|
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||||
|
If GetPrivateProfileString(S_DATA, K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & DAT_FILE_NAME) = 0 Then
|
||||||
|
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||||
|
End If
|
||||||
|
m_sDataRoot &= "\" & "Plugin\Effector.Plugin.StoneCut"
|
||||||
|
' Impostazione direttorio di configurazione
|
||||||
|
m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
|
||||||
|
' Impostazione path Ini file
|
||||||
|
PluginIniFile.SetIniFile(m_sConfigDir & "\" & INI_FILE_NAME)
|
||||||
|
' Impostazione path resources dir
|
||||||
|
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
Imports System.ComponentModel.Composition
|
||||||
|
Imports Effector.Plugin.Interface
|
||||||
|
Imports KeraLua
|
||||||
|
|
||||||
|
<Export(GetType(IPluginLuaManager))>
|
||||||
|
<ExportMetadata("Name", "LuaManager")>
|
||||||
|
Public Class LuaManager
|
||||||
|
Implements IPluginLuaManager
|
||||||
|
|
||||||
|
Private state As Lua
|
||||||
|
|
||||||
|
Public Function PlgInit(state As Object) As Boolean Implements IPluginLuaManager.PlgInit
|
||||||
|
SetState(state)
|
||||||
|
Return LuaInstallGeneral(state)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,686 @@
|
|||||||
|
Imports KeraLua
|
||||||
|
|
||||||
|
Public Module Lua_Aux
|
||||||
|
|
||||||
|
Private m_State As Lua
|
||||||
|
Friend Sub SetState(state As Lua)
|
||||||
|
m_State = state
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
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 lValue As Long)
|
||||||
|
If Not LuaGetParam(state, nIndex, lValue) 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 lValue As Long) As Boolean
|
||||||
|
If Not state.IsNumber(nIndex) Then Return False
|
||||||
|
lValue = state.ToInteger(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 lValue As Long) As Boolean
|
||||||
|
Try
|
||||||
|
state.PushInteger(lValue)
|
||||||
|
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 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 lValue As Long) As Boolean
|
||||||
|
If Not state.IsTable(nIndex) Then Return False
|
||||||
|
state.GetField(nIndex, sVarName)
|
||||||
|
Dim bResult As Boolean = LuaGetParam(state, -1, lValue)
|
||||||
|
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 = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
state.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
state.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
state.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, bValue)
|
||||||
|
state.Pop(sParams.Count - 1)
|
||||||
|
Return bResult
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Friend Function LuaGetGlobVar(ByRef sName As String, ByRef bValue As Boolean) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
m_State.GetGlobal(sName)
|
||||||
|
Dim bResult As Boolean = LuaGetParam(m_State, -1, bValue)
|
||||||
|
m_State.Pop(1)
|
||||||
|
Return bResult
|
||||||
|
Else
|
||||||
|
Dim sTableName As String = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
m_State.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
m_State.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(m_State, -1, sVarName, bValue)
|
||||||
|
m_State.Pop(sParams.Count - 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 = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
state.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
state.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
state.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, nValue)
|
||||||
|
state.Pop(sParams.Count - 1)
|
||||||
|
Return bResult
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Friend Function LuaGetGlobVar(ByRef sName As String, ByRef nValue As Integer) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
m_State.GetGlobal(sName)
|
||||||
|
Dim bResult As Boolean = LuaGetParam(m_State, -1, nValue)
|
||||||
|
m_State.Pop(1)
|
||||||
|
Return bResult
|
||||||
|
Else
|
||||||
|
Dim sTableName As String = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
m_State.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
m_State.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(m_State, -1, sVarName, nValue)
|
||||||
|
m_State.Pop(sParams.Count - 1)
|
||||||
|
Return bResult
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function LuaGetGlobVar(state As Lua, ByRef sName As String, ByRef lValue As Long) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
state.GetGlobal(sName)
|
||||||
|
Dim bResult As Boolean = LuaGetParam(state, -1, lValue)
|
||||||
|
state.Pop(1)
|
||||||
|
Return bResult
|
||||||
|
Else
|
||||||
|
Dim sTableName As String = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
state.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
state.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
state.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, lValue)
|
||||||
|
state.Pop(sParams.Count - 1)
|
||||||
|
Return bResult
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Friend Function LuaGetGlobVar(ByRef sName As String, ByRef lValue As Long) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
m_State.GetGlobal(sName)
|
||||||
|
Dim bResult As Boolean = LuaGetParam(m_State, -1, lValue)
|
||||||
|
m_State.Pop(1)
|
||||||
|
Return bResult
|
||||||
|
Else
|
||||||
|
Dim sTableName As String = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
m_State.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
m_State.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(m_State, -1, sVarName, lValue)
|
||||||
|
m_State.Pop(sParams.Count - 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 = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
state.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
state.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
state.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, dValue)
|
||||||
|
state.Pop(sParams.Count - 1)
|
||||||
|
Return bResult
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Friend Function LuaGetGlobVar(ByRef sName As String, ByRef dValue As Double) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
m_State.GetGlobal(sName)
|
||||||
|
Dim bResult As Boolean = LuaGetParam(m_State, -1, dValue)
|
||||||
|
m_State.Pop(1)
|
||||||
|
Return bResult
|
||||||
|
Else
|
||||||
|
Dim sTableName As String = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
m_State.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
m_State.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(m_State, -1, sVarName, dValue)
|
||||||
|
m_State.Pop(sParams.Count - 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 = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
state.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
state.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
state.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(state, -1, sVarName, sValue)
|
||||||
|
state.Pop(sParams.Count - 1)
|
||||||
|
Return bResult
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Friend Function LuaGetGlobVar(ByRef sName As String, ByRef sValue As String) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
m_State.GetGlobal(sName)
|
||||||
|
Dim bResult As Boolean = LuaGetParam(m_State, -1, sValue)
|
||||||
|
m_State.Pop(1)
|
||||||
|
Return bResult
|
||||||
|
Else
|
||||||
|
Dim sTableName As String = ""
|
||||||
|
Dim sParams() As String = sName.Split("."c)
|
||||||
|
sTableName = sParams(0)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
For nParamIndex As Integer = 1 To sParams.Count - 2
|
||||||
|
Dim nTableIndex As Integer = -1
|
||||||
|
If Integer.TryParse(sParams(nParamIndex), nTableIndex) Then
|
||||||
|
m_State.RawGetInteger(-1, nTableIndex)
|
||||||
|
Else
|
||||||
|
m_State.GetField(-1, sParams(nParamIndex))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim sVarName As String = sParams(sParams.Count - 1)
|
||||||
|
Dim bResult As Boolean = LuaGetTabFieldParam(m_State, -1, sVarName, sValue)
|
||||||
|
m_State.Pop(sParams.Count - 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(ByRef sName As String, ByRef bValue As Boolean) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
If Not LuaSetParam(m_State, bValue) Then Return False
|
||||||
|
m_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)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
Dim bResult As Boolean = LuaSetTabFieldParam(m_State, -1, sVarName, bValue)
|
||||||
|
m_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(ByRef sName As String, ByRef nValue As Integer) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
If Not LuaSetParam(m_State, nValue) Then Return False
|
||||||
|
m_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)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
Dim bResult As Boolean = LuaSetTabFieldParam(m_State, -1, sVarName, nValue)
|
||||||
|
m_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(ByRef sName As String, ByRef dValue As Double) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
If Not LuaSetParam(m_State, dValue) Then Return False
|
||||||
|
m_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)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
Dim bResult As Boolean = LuaSetTabFieldParam(m_State, -1, sVarName, dValue)
|
||||||
|
m_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 LuaSetGlobVar(ByRef sName As String, ByRef sValue As String) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
If Not LuaSetParam(m_State, sValue) Then Return False
|
||||||
|
m_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)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
Dim bResult As Boolean = LuaSetTabFieldParam(m_State, -1, sVarName, sValue)
|
||||||
|
m_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 LuaResetGlobVar(ByRef sName As String) As Boolean
|
||||||
|
' se variabile standard
|
||||||
|
If Not sName.Contains("."c) Then
|
||||||
|
If Not LuaSetParam(m_State) Then Return False
|
||||||
|
m_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)
|
||||||
|
m_State.GetGlobal(sTableName)
|
||||||
|
Dim bResult As Boolean = LuaSetTabFieldParam(m_State, -1, sVarName)
|
||||||
|
m_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
|
||||||
|
Friend Function LuaCreateGlobTable(ByRef sName As String) As Boolean
|
||||||
|
Try
|
||||||
|
m_State.NewTable()
|
||||||
|
m_State.SetGlobal(sName)
|
||||||
|
Catch ex As Exception
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,214 @@
|
|||||||
|
Imports System.IO
|
||||||
|
Imports KeraLua
|
||||||
|
Imports Effector.Plugin.Lib
|
||||||
|
|
||||||
|
Public Module Lua_General
|
||||||
|
|
||||||
|
Friend func_PlgGetNumberFromIni As LuaFunction = AddressOf Lua_PlgGetNumberFromIni
|
||||||
|
Friend func_PlgGetStringFromIni As LuaFunction = AddressOf Lua_PlgGetStringFromIni
|
||||||
|
Friend func_PlgWriteStringToIni As LuaFunction = AddressOf Lua_PlgWriteStringToIni
|
||||||
|
'Friend func_PlgExecProcess As LuaFunction = AddressOf Lua_PlgExecProcess
|
||||||
|
'Friend func_PlgExecProcessAsync As LuaFunction = AddressOf Lua_PlgExecProcessAsync
|
||||||
|
'Friend func_PlgCheckExecProcessAsync As LuaFunction = AddressOf Lua_PlgCheckExecProcessAsync
|
||||||
|
Friend func_PlgSetChangeState As LuaFunction = AddressOf Lua_PlgSetChangeState
|
||||||
|
Friend func_PlgGetNextDoor As LuaFunction = AddressOf Lua_PlgGetNextDoor
|
||||||
|
'Friend func_PlgOpenRestartWnd As LuaFunction = AddressOf Lua_PlgOpenRestartWnd
|
||||||
|
Friend func_PlgMessageWnd As LuaFunction = AddressOf Lua_PlgMessageWnd
|
||||||
|
Friend func_PlgListReset As LuaFunction = AddressOf Lua_PlgListReset
|
||||||
|
Friend func_PlgMachineReset As LuaFunction = AddressOf Lua_PlgMachineReset
|
||||||
|
|
||||||
|
Private Function Lua_PlgGetNumberFromIni(ByVal p As IntPtr) As Integer
|
||||||
|
Dim state = Lua.FromIntPtr(p)
|
||||||
|
' 4 parametri: sSec, sKey, dDef
|
||||||
|
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 = GetPluginPrivateProfileDouble(sSec, sKey, dDef)
|
||||||
|
' restituisco il risultato
|
||||||
|
LuaSetParam(state, dResult)
|
||||||
|
Return 1
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function Lua_PlgGetStringFromIni(ByVal p As IntPtr) As Integer
|
||||||
|
Dim state = Lua.FromIntPtr(p)
|
||||||
|
' 4 parametri: sSec, sKey, sDef
|
||||||
|
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 = ""
|
||||||
|
GetPluginPrivateProfileString(sSec, sKey, sDef, sResult)
|
||||||
|
' restituisco il risultato
|
||||||
|
LuaSetParam(state, sResult)
|
||||||
|
Return 1
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function Lua_PlgWriteStringToIni(ByVal p As IntPtr) As Integer
|
||||||
|
Dim state = Lua.FromIntPtr(p)
|
||||||
|
' 4 parametri: sSec, sKey, sVal
|
||||||
|
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 = WritePluginPrivateProfileString(sSec, sKey, sVal)
|
||||||
|
' restituisco il risultato
|
||||||
|
LuaSetParam(state, bResult)
|
||||||
|
Return 1
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Private Function Lua_PlgExecProcess(ByVal p As IntPtr) As Integer
|
||||||
|
' Dim state = Lua.FromIntPtr(p)
|
||||||
|
' Dim sDDFName As String = ""
|
||||||
|
' LuaCheckParam(state, 1, sDDFName)
|
||||||
|
' LuaClearStack(state)
|
||||||
|
' If Map.refDoorListPageVM.ExecCAMProcess(sDDFName) Then
|
||||||
|
' state.PushBoolean(True)
|
||||||
|
' Return 1
|
||||||
|
' Else
|
||||||
|
' Return 0
|
||||||
|
' End If
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
'Private Function Lua_PlgExecProcessAsync(ByVal p As IntPtr) As Integer
|
||||||
|
' Dim state = Lua.FromIntPtr(p)
|
||||||
|
' Dim sDDFName As String = ""
|
||||||
|
' LuaCheckParam(state, 1, sDDFName)
|
||||||
|
' LuaClearStack(state)
|
||||||
|
' If Map.refDoorListPageVM.ExecCAMProcessAsync(sDDFName) Then
|
||||||
|
' state.PushBoolean(True)
|
||||||
|
' Return 1
|
||||||
|
' Else
|
||||||
|
' Return 0
|
||||||
|
' End If
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
'Private Function Lua_PlgCheckExecProcessAsync(ByVal p As IntPtr) As Integer
|
||||||
|
' Dim state = Lua.FromIntPtr(p)
|
||||||
|
' LuaClearStack(state)
|
||||||
|
' Dim bHasExited As Boolean = False
|
||||||
|
' Dim nExitCode As Integer = -1
|
||||||
|
' If Map.refSupervisorFunction.PlgCheckExecProcessAsync(bHasExited, nExitCode) Then
|
||||||
|
' state.PushBoolean(bHasExited)
|
||||||
|
' state.PushInteger(nExitCode)
|
||||||
|
' Return 2
|
||||||
|
' Else
|
||||||
|
' Return 0
|
||||||
|
' End If
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
Private Function Lua_PlgGetNextDoor(ByVal p As IntPtr) As Integer
|
||||||
|
Dim state = Lua.FromIntPtr(p)
|
||||||
|
LuaClearStack(state)
|
||||||
|
Dim NextDoor As Door = Map.refDoorListPageVM.GetNextDoor()
|
||||||
|
If Not IsNothing(NextDoor) Then
|
||||||
|
Dim sPartProgramDirPath As String = ""
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, "PartProgramDir", "", sPartProgramDirPath)
|
||||||
|
' restituisco il risultato
|
||||||
|
LuaSetParam(state, NextDoor.nId)
|
||||||
|
LuaSetParam(state, sPartProgramDirPath & "\" & NextDoor.sFileName)
|
||||||
|
Return 2
|
||||||
|
End If
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Private Function Lua_PlgOpenRestartWnd(ByVal p As IntPtr) As Integer
|
||||||
|
' Dim state = Lua.FromIntPtr(p)
|
||||||
|
' LuaClearStack(state)
|
||||||
|
' Dim RestartWnd As New RestartWndV(Application.Current.MainWindow, New RestartWndVM())
|
||||||
|
' RestartWnd.ShowDialog()
|
||||||
|
' Return 0
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
Private Function Lua_PlgMessageWnd(ByVal p As IntPtr) As Integer
|
||||||
|
Dim state = Lua.FromIntPtr(p)
|
||||||
|
Dim sMsg As String = ""
|
||||||
|
LuaCheckParam(state, 1, sMsg)
|
||||||
|
LuaClearStack(state)
|
||||||
|
MessageBox.Show(sMsg, "", MessageBoxButton.OK)
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function Lua_PlgMachineReset(ByVal p As IntPtr) As Integer
|
||||||
|
Dim state = Lua.FromIntPtr(p)
|
||||||
|
Dim nMachineIndex As Integer = 1
|
||||||
|
LuaGetParam(state, 1, nMachineIndex)
|
||||||
|
LuaClearStack(state)
|
||||||
|
Map.refDoorListPageVM.ResetProductionQueue()
|
||||||
|
'Map.refDoorListPageVM.ResetStateAfterReset()
|
||||||
|
Map.refDoorListPageVM.WriteBackup()
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function Lua_PlgListReset(ByVal p As IntPtr) As Integer
|
||||||
|
Dim state = Lua.FromIntPtr(p)
|
||||||
|
LuaClearStack(state)
|
||||||
|
If Map.refDoorListPageVM.bResetList Then
|
||||||
|
Map.refDoorListPageVM.ResetResetList()
|
||||||
|
state.PushBoolean(True)
|
||||||
|
Return 1
|
||||||
|
Else
|
||||||
|
Return 0
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Private Function Lua_PlgSetChangeState(ByVal p As IntPtr) As Integer
|
||||||
|
Dim state = Lua.FromIntPtr(p)
|
||||||
|
Dim nState As Integer = 0
|
||||||
|
LuaGetParam(state, 1, nState)
|
||||||
|
LuaClearStack(state)
|
||||||
|
If nState = 1 Then
|
||||||
|
Dim CurrDoor As Door = Map.refDoorListPageVM.DoorList.FirstOrDefault(Function(x) x.nState = Door.PartProgramStates.SENT_TO_NC)
|
||||||
|
If Not IsNothing(CurrDoor) Then
|
||||||
|
Dim Now As DateTime = DateTime.Now
|
||||||
|
' verifico se fine precedente impostata
|
||||||
|
Dim nIndex As Integer = Map.refDoorListPageVM.DoorList.IndexOf(CurrDoor)
|
||||||
|
If nIndex > 0 Then
|
||||||
|
Dim PrevDoor As Door = Map.refDoorListPageVM.DoorList(nIndex - 1)
|
||||||
|
If Not IsNothing(PrevDoor) AndAlso PrevDoor.nState = Door.PartProgramStates.MACHINE_START Then
|
||||||
|
PrevDoor.SetState(Door.PartProgramStates.PRODUCED)
|
||||||
|
PrevDoor.SetMachiningEnd(Now - TimeSpan.FromSeconds(1))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
CurrDoor.SetState(Door.PartProgramStates.MACHINE_START)
|
||||||
|
CurrDoor.SetMachiningStart(Now)
|
||||||
|
End If
|
||||||
|
ElseIf nState = 2 Then
|
||||||
|
Dim CurrDoor As Door = Map.refDoorListPageVM.DoorList.FirstOrDefault(Function(x) x.nState = Door.PartProgramStates.MACHINE_START)
|
||||||
|
If Not IsNothing(CurrDoor) Then
|
||||||
|
CurrDoor.SetState(Door.PartProgramStates.PRODUCED)
|
||||||
|
CurrDoor.SetMachiningEnd(DateTime.Now())
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Map.refDoorListPageVM.WriteBackup()
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function LuaInstallGeneral(state As Lua) As Boolean
|
||||||
|
If IsNothing(state) Then Return False
|
||||||
|
state.Register("PlgGetNumberFromIni", func_PlgGetNumberFromIni)
|
||||||
|
state.Register("PlgGetStringFromIni", func_PlgGetStringFromIni)
|
||||||
|
state.Register("PlgWriteStringToIni", func_PlgWriteStringToIni)
|
||||||
|
'state.Register("PlgExecProcess", func_PlgExecProcess)
|
||||||
|
'state.Register("PlgExecProcessAsync", func_PlgExecProcessAsync)
|
||||||
|
'state.Register("PlgCheckExecProcessAsync", func_PlgCheckExecProcessAsync)
|
||||||
|
state.Register("PlgGetNextDoor", func_PlgGetNextDoor)
|
||||||
|
'state.Register("PlgOpenRestartWnd", func_PlgOpenRestartWnd)
|
||||||
|
state.Register("PlgMessageWnd", func_PlgMessageWnd)
|
||||||
|
state.Register("PlgSetChangeState", func_PlgSetChangeState)
|
||||||
|
state.Register("PlgListReset", func_PlgListReset)
|
||||||
|
state.Register("PlgMachineReset", func_PlgMachineReset)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,656 @@
|
|||||||
|
<Grid x:Class="MachinePageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:Effector.Plugin.StoneCut"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="950" d:DesignWidth="1600">
|
||||||
|
<Grid.Resources>
|
||||||
|
<local:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>
|
||||||
|
<local:StringToMachineStateConverter x:Key="StringToMachineStateConverter"/>
|
||||||
|
<local:StringToDDFCalcStateConverter x:Key="StringToDDFCalcStateConverter"/>
|
||||||
|
<local:StringToNewDoorStateConverter x:Key="StringToNewDoorStateConverter"/>
|
||||||
|
<local:StringToBooleanConverter x:Key="StringToBooleanConverter"/>
|
||||||
|
<local:StringToBackgroundConverter x:Key="StringToBackgroundConverter"/>
|
||||||
|
<local:DoorToVisibilityConverter x:Key="DoorToVisibilityConverter"/>
|
||||||
|
<local:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||||
|
</Grid.Resources>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<!--Lista variabili-->
|
||||||
|
<ItemsControl ItemsSource="{Binding VariableList}"
|
||||||
|
Visibility="{Binding VariableList_Visibility}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="150"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding sName}"/>
|
||||||
|
<TextBlock Text=" ("/>
|
||||||
|
<TextBlock Text="{Binding sIndex}"/>
|
||||||
|
<TextBlock Text=")"/>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Text="{Binding sValue}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
<Grid Grid.Column="1">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="20"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="DDF Calc State"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="{Binding nDDfCalcState, Converter={StaticResource StringToDDFCalcStateConverter}}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="New Door State"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding nNewDoorState, Converter={StaticResource StringToNewDoorStateConverter}}"/>
|
||||||
|
<TextBlock Grid.ColumnSpan="2"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="Errore nella generazione programma!
Verificare nel file di log!
Chiudere il programma e riaprirlo dopo aver risolto!"
|
||||||
|
Visibility="{Binding bErrorReset, Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<Grid.Resources>
|
||||||
|
</Grid.Resources>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<!--Gestore macchina-->
|
||||||
|
<Grid Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding MachineCommands_Visibility}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="3.5*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid Grid.Column="1">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding VariableList[5].sValue, Converter={StaticResource StringToMachineStateConverter}}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
Content="Initialize"
|
||||||
|
Command="{Binding WriteVariable_Command}"
|
||||||
|
CommandParameter="1,1,1352,1"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<StackPanel Grid.Row="2"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Center">
|
||||||
|
<Button Content="Start
Machining"
|
||||||
|
Command="{Binding ManageMachining_Command}"
|
||||||
|
CommandParameter="1,1"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Content="End
Machining"
|
||||||
|
Command="{Binding ManageMachining_Command}"
|
||||||
|
CommandParameter="1,2"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Grid Grid.Row="3"
|
||||||
|
HorizontalAlignment="Center">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="Sent 1"/>
|
||||||
|
<CheckBox Grid.Column="1"
|
||||||
|
Grid.Row="0"
|
||||||
|
IsChecked="{Binding VariableList[3].sValue, Converter={StaticResource StringToBooleanConverter}}"
|
||||||
|
Style="{StaticResource MachDrawVar_CheckBox}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="Sent 2"/>
|
||||||
|
<CheckBox Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
IsChecked="{Binding VariableList[4].sValue, Converter={StaticResource StringToBooleanConverter}}"
|
||||||
|
Style="{StaticResource MachDrawVar_CheckBox}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<!--Bottoni avanzamento-->
|
||||||
|
<!--<Grid Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Visibility="{Binding MachineCommands_Visibility}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="3.8*"/>
|
||||||
|
<ColumnDefinition Width="18.7*"/>
|
||||||
|
<ColumnDefinition Width="3.8*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Content="Load Door
On M1S0"
|
||||||
|
Command="{Binding WriteVariable_Command}"
|
||||||
|
CommandParameter="1,3,901.0,1;1,2,980,1"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Content="Unload Door
From M2S4"
|
||||||
|
Command="{Binding WriteVariable_Command}"
|
||||||
|
CommandParameter="2,2,984,0;2,1,1364,0"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2.8*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1.7*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2.8*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Content="Go To
M1S1"
|
||||||
|
Command="{Binding MoveVariable_Command}"
|
||||||
|
CommandParameter="1,1,1360/1,2,980;1,3,901.0->1,1,1361/1,2,981"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Content="Go To
M1S2"
|
||||||
|
Command="{Binding MoveVariable_Command}"
|
||||||
|
CommandParameter="1,1,1361/1,2,981->1,1,1362/1,2,982"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Grid.Column="4"
|
||||||
|
Content="Go To
M1S3"
|
||||||
|
Command="{Binding MoveVariable_Command}"
|
||||||
|
CommandParameter="1,1,1362/1,2,982->1,1,1363/1,2,983"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Grid.Column="5"
|
||||||
|
Content="Go To
M1S4"
|
||||||
|
Command="{Binding MoveVariable_Command}"
|
||||||
|
CommandParameter="1,1,1363/1,2,983->1,1,1364;2,1,1360/1,2,984;2,2,980"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Grid.Column="7"
|
||||||
|
Content="Go To
M2S1"
|
||||||
|
Command="{Binding MoveVariable_Command}"
|
||||||
|
CommandParameter="2,1,1360;1,1,1364/1,2,984;2,2,980->2,1,1361/2,2,981"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Grid.Column="8"
|
||||||
|
Content="Go To
M2S2"
|
||||||
|
Command="{Binding MoveVariable_Command}"
|
||||||
|
CommandParameter="2,1,1361/2,2,981->2,1,1362/2,2,982"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Grid.Column="10"
|
||||||
|
Content="Go To
M2S3"
|
||||||
|
Command="{Binding MoveVariable_Command}"
|
||||||
|
CommandParameter="2,1,1362/2,2,982->2,1,1363/2,2,983"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
<Button Grid.Column="11"
|
||||||
|
Content="Go To
M2S4"
|
||||||
|
Command="{Binding MoveVariable_Command}"
|
||||||
|
CommandParameter="2,1,1363/2,2,983->2,1,1364/2,2,984"
|
||||||
|
Style="{StaticResource Advancement_Button}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>-->
|
||||||
|
<!--Immagine macchina-->
|
||||||
|
<Grid Grid.Column="1"
|
||||||
|
Grid.Row="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.4*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="0.14*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Grid.Column="1"
|
||||||
|
Source="{Binding sMachineImagePath}"
|
||||||
|
Stretch="Uniform"/>
|
||||||
|
</Grid>
|
||||||
|
<!--Intestazioni-->
|
||||||
|
<Grid Grid.Row="3"
|
||||||
|
Visibility="{Binding VariableOnDraw_Visibility}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.7*"/>
|
||||||
|
<RowDefinition Height="0.3*"/>
|
||||||
|
<RowDefinition Height="0.7*"/>
|
||||||
|
<RowDefinition Height="0.6*"/>
|
||||||
|
<RowDefinition Height="0.3*"/>
|
||||||
|
<RowDefinition Height="0.6*"/>
|
||||||
|
<RowDefinition Height="0.7*"/>
|
||||||
|
<RowDefinition Height="0.3*"/>
|
||||||
|
<RowDefinition Height="0.7*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Row="1"
|
||||||
|
Text="Sensors"/>
|
||||||
|
<TextBlock Grid.Row="4"
|
||||||
|
Text="Door Index"/>
|
||||||
|
<TextBlock Grid.Row="7"
|
||||||
|
Text="Door Presence"/>
|
||||||
|
</Grid>
|
||||||
|
<!--TextBox variabili-->
|
||||||
|
<!--<Grid Grid.Column="1"
|
||||||
|
Grid.Row="3">-->
|
||||||
|
<Grid Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
Visibility="{Binding VariableOnDraw_Visibility}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1.7*"/>
|
||||||
|
<RowDefinition Height="1.5*"/>
|
||||||
|
<RowDefinition Height="1.7*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Style="{StaticResource Table}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding VariableList[6].sValue}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="{Binding VariableList[0].sValue}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
<Border Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Style="{StaticResource Table}"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding VariableList[7].sValue}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="{Binding VariableList[1].sValue}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
<Border Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
Style="{StaticResource Table}"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding VariableList[8].sValue}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="{Binding VariableList[2].sValue}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
<!--Sensori-->
|
||||||
|
<Grid Grid.Column="1"
|
||||||
|
Grid.Row="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="0.1*"/>
|
||||||
|
<ColumnDefinition Width="0.2*"/>
|
||||||
|
<ColumnDefinition Width="0.1*"/>
|
||||||
|
<ColumnDefinition Width="0.2*"/>
|
||||||
|
<ColumnDefinition Width="0.1*"/>
|
||||||
|
<ColumnDefinition Width="0.2*"/>
|
||||||
|
<ColumnDefinition Width="0.1*"/>
|
||||||
|
<ColumnDefinition Width="0.2*"/>
|
||||||
|
<ColumnDefinition Width="0.1*"/>
|
||||||
|
<ColumnDefinition Width="0.2*"/>
|
||||||
|
<ColumnDefinition Width="0.4*"/>
|
||||||
|
<ColumnDefinition Width="0.1*"/>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1.7*"/>
|
||||||
|
<RowDefinition Height="1.5*"/>
|
||||||
|
<RowDefinition Height="1.7*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Ellipse Grid.Column="1"
|
||||||
|
Fill="{Binding VariableList[6].sValue, Converter={StaticResource StringToBackgroundConverter}}"
|
||||||
|
Style="{StaticResource Sensor}"/>
|
||||||
|
<Ellipse Grid.Column="3"
|
||||||
|
Fill="{Binding VariableList[7].sValue, Converter={StaticResource StringToBackgroundConverter}}"
|
||||||
|
Style="{StaticResource Sensor}"/>
|
||||||
|
<Ellipse Grid.Column="5"
|
||||||
|
Fill="{Binding VariableList[8].sValue, Converter={StaticResource StringToBackgroundConverter}}"
|
||||||
|
Style="{StaticResource Sensor}"/>
|
||||||
|
<Ellipse Grid.Column="7"
|
||||||
|
Fill="{Binding VariableList[9].sValue, Converter={StaticResource StringToBackgroundConverter}}"
|
||||||
|
Style="{StaticResource Sensor}"/>
|
||||||
|
<Ellipse Grid.Column="9"
|
||||||
|
Fill="{Binding VariableList[10].sValue, Converter={StaticResource StringToBackgroundConverter}}"
|
||||||
|
Style="{StaticResource Sensor}"/>
|
||||||
|
<Ellipse Grid.Column="12"
|
||||||
|
Fill="{Binding VariableList[11].sValue, Converter={StaticResource StringToBackgroundConverter}}"
|
||||||
|
Style="{StaticResource Sensor}"/>
|
||||||
|
</Grid>
|
||||||
|
<!--Porte-->
|
||||||
|
<Grid Grid.Column="1"
|
||||||
|
Grid.Row="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.7*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="0.3*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="0.3*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="0.7*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1.9*"/>
|
||||||
|
<RowDefinition Height="1.1*"/>
|
||||||
|
<RowDefinition Height="1.9*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding VariableList[0].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||||
|
Style="{StaticResource Door}">
|
||||||
|
<TextBlock Text="{Binding DoorOnMachineArray[0].nId}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="3"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding VariableList[1].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||||
|
Style="{StaticResource Door}">
|
||||||
|
<TextBlock Text="{Binding DoorOnMachineArray[1].nId}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="5"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding VariableList[2].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||||
|
Style="{StaticResource Door}">
|
||||||
|
<TextBlock Text="{Binding DoorOnMachineArray[2].nId}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<!--Descrizione porte-->
|
||||||
|
<ItemsControl Grid.Column="1"
|
||||||
|
Grid.Row="4"
|
||||||
|
ItemsSource="{Binding DoorOnMachineArray}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Columns="3"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid Visibility="{Binding Converter={StaticResource DoorToVisibilityConverter}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="Id"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="{Binding nId}"/>
|
||||||
|
<!--<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="Circular Index"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding nCircIndex}"/>-->
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="State"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="{Binding nState}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="DDF Name"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="{Binding sDDFName}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="CSV Name"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="{Binding sCSVName}"/>
|
||||||
|
<!--<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="5"
|
||||||
|
Text="DoorCode"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="5"
|
||||||
|
Text="{Binding sDoorCode}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="6"
|
||||||
|
Text="DoorDescription"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="6"
|
||||||
|
Text="{Binding sDoorDescription}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="7"
|
||||||
|
Text="M1 CN Path"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="7"
|
||||||
|
Text="{Binding sM1CNPath}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="8"
|
||||||
|
Text="M2 CN Path"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="8"
|
||||||
|
Text="{Binding sM2CNPath}"/>-->
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="9"
|
||||||
|
Text="Load Time"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="9"
|
||||||
|
Text="{Binding sLoadTime}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="10"
|
||||||
|
Text="Machining 1 Start"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="10"
|
||||||
|
Text="{Binding sMachining1Start}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="11"
|
||||||
|
Text="Machining 1 End"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="11"
|
||||||
|
Text="{Binding sMachining1End}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="12"
|
||||||
|
Text="Machining 2 Start"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="12"
|
||||||
|
Text="{Binding sMachining2Start}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="13"
|
||||||
|
Text="Machining 2 End"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="13"
|
||||||
|
Text="{Binding sMachining2End}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="14"
|
||||||
|
Text="UnloadTime"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="14"
|
||||||
|
Text="{Binding sUnloadTime}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</Grid>
|
||||||
|
<!--Lista circolare porte-->
|
||||||
|
<Grid Grid.Row="2"
|
||||||
|
Visibility="{Binding DoorCircList_Visibility}">
|
||||||
|
<ItemsControl ItemsSource="{Binding LuaDoorList}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Columns="10"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="Id"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="{Binding nId}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="Circular Index"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding nCircIndex}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="State"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="{Binding nState}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="DDF Name"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="{Binding sDDFName}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="CSV Name"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="{Binding sCSVName}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="5"
|
||||||
|
Text="DoorCode"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="5"
|
||||||
|
Text="{Binding sDoorCode}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="6"
|
||||||
|
Text="DoorDescription"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="6"
|
||||||
|
Text="{Binding sDoorDescription}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="7"
|
||||||
|
Text="M1 CN Path"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="7"
|
||||||
|
Text="{Binding sM1CNPath}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="8"
|
||||||
|
Text="M2 CN Path"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="8"
|
||||||
|
Text="{Binding sM2CNPath}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="9"
|
||||||
|
Text="Load Time"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="9"
|
||||||
|
Text="{Binding sLoadTime}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="10"
|
||||||
|
Text="Machining 1 Start"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="10"
|
||||||
|
Text="{Binding sMachining1Start}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="11"
|
||||||
|
Text="Machining 1 End"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="11"
|
||||||
|
Text="{Binding sMachining1End}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="12"
|
||||||
|
Text="Machining 2 Start"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="12"
|
||||||
|
Text="{Binding sMachining2Start}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="13"
|
||||||
|
Text="Machining 2 End"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="13"
|
||||||
|
Text="{Binding sMachining2End}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="14"
|
||||||
|
Text="UnloadTime"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="14"
|
||||||
|
Text="{Binding sUnloadTime}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class MachinePageV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<Grid x:Class="MainMenuV"
|
||||||
|
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"
|
||||||
|
DataContext="{StaticResource MainMenuVM}"
|
||||||
|
WindowChrome.IsHitTestVisibleInChrome="True">
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
Imports System.ComponentModel.Composition
|
||||||
|
Imports Effector.Plugin.Interface
|
||||||
|
|
||||||
|
<Export(GetType(IPluginControl))>
|
||||||
|
<ExportMetadata("Name", "MainMenu")>
|
||||||
|
Public Class MainMenuV
|
||||||
|
Implements IPluginControl
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
Imports Effector.Plugin.Lib
|
||||||
|
|
||||||
|
Public Class MainMenuVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdPage As ICommand
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Page"
|
||||||
|
|
||||||
|
Public ReadOnly Property Page_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdPage Is Nothing Then
|
||||||
|
m_cmdPage = New Command(AddressOf Page)
|
||||||
|
End If
|
||||||
|
Return m_cmdPage
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Page(nPage As Integer)
|
||||||
|
Map.refFiveLakesUIVM.SetSelPage(nPage)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Page
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<Window x:Class="MultipleCopyWndV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
SizeToContent="WidthAndHeight"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
ShowInTaskbar="False">
|
||||||
|
<Grid Margin="5">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Margin="0,0,0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="Numero di copie"
|
||||||
|
Margin="0,0,2.5,0"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Text="{Binding sCopyNumber}"
|
||||||
|
Width="40"
|
||||||
|
Margin="2.5,0,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Content="Ok"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
Margin="0,0,2.5,0"/>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Content="Annulla"
|
||||||
|
Command="{Binding Cancel_Command}"
|
||||||
|
Margin="2.5,0,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
Public Class MultipleCopyWndV
|
||||||
|
|
||||||
|
Private WithEvents m_MultipleCopyWndVM As MultipleCopyWndVM
|
||||||
|
|
||||||
|
Sub New(Owner As Window, MultipleCopyWndVM As MultipleCopyWndVM)
|
||||||
|
'MyBase.New(Owner)
|
||||||
|
Me.Owner = Owner
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = MultipleCopyWndVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_MultipleCopyWndVM = MultipleCopyWndVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MultipleCopyWndVM.m_CloseWindow
|
||||||
|
Me.DialogResult = bDialogResult
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
Public Class MultipleCopyWndVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
|
Private m_nCopyNumber As Integer
|
||||||
|
Public ReadOnly Property nCopyNumber As Integer
|
||||||
|
Get
|
||||||
|
Return m_nCopyNumber
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Property sCopyNumber As String
|
||||||
|
Get
|
||||||
|
Return m_nCopyNumber.ToString()
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If Not Integer.TryParse(value, m_nCopyNumber) Then
|
||||||
|
MessageBox.Show("Valore non impostabile come quantita' di porte!", "Errore!", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
NotifyPropertyChanged(sCopyNumber)
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
Private m_cmdCancel As ICommand
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Ok"
|
||||||
|
|
||||||
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf Ok)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Ok()
|
||||||
|
If m_nCopyNumber > 0 Then RaiseEvent m_CloseWindow(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Ok
|
||||||
|
|
||||||
|
#Region "Cancel"
|
||||||
|
|
||||||
|
Public ReadOnly Property Cancel_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCancel Is Nothing Then
|
||||||
|
m_cmdCancel = New Command(AddressOf Cancel)
|
||||||
|
End If
|
||||||
|
Return m_cmdCancel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Cancel()
|
||||||
|
RaiseEvent m_CloseWindow(False)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Cancel
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -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.StoneCut")>
|
||||||
|
<Assembly: AssemblyDescription("")>
|
||||||
|
<Assembly: AssemblyCompany("Windows User")>
|
||||||
|
<Assembly: AssemblyProduct("Effector.Plugin.StoneCut")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright © 2020-2026 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("b4747d9a-5420-4702-8e86-59fa0fb1ad51")>
|
||||||
|
|
||||||
|
' 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.1")>
|
||||||
|
<Assembly: AssemblyFileVersion("3.1.5.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.StoneCut.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.Effector.Plugin.StoneCut.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>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<Window x:Class="ProcessManagerV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
Height="200"
|
||||||
|
Width="300">
|
||||||
|
<StackPanel>
|
||||||
|
<Grid HorizontalAlignment="Center">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="30"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="Arguments Queue Count: "/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Text="{Binding ArgumentsQueue}"/>
|
||||||
|
<TextBlock Grid.Row="1"
|
||||||
|
Text="ResultQueue: "/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding ResultQueueCount}"/>
|
||||||
|
</Grid>
|
||||||
|
<!--<DataGrid ItemsSource="{Binding ThreadList}"
|
||||||
|
AutoGenerateColumns="False">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="Process Status"
|
||||||
|
Binding="{Binding ProcessStatus}"/>
|
||||||
|
<DataGridTextColumn Header="Curr Request Id"
|
||||||
|
Binding="{Binding CurrRequest.nId}"/>
|
||||||
|
<DataGridTextColumn Header="Curr Request Args"
|
||||||
|
Binding="{Binding CurrRequest.sArgs}"/>
|
||||||
|
<DataGridTextColumn Header="Process Result"
|
||||||
|
Binding="{Binding nProcResult}"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>-->
|
||||||
|
<ItemsControl ItemsSource="{Binding ThreadList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding ProcessStatus}"/>
|
||||||
|
<TextBlock Text="{Binding CurrRequest.nId}"/>
|
||||||
|
<TextBlock Text="{Binding CurrRequest.sArgs}"/>
|
||||||
|
<TextBlock Text="{Binding nProcResult}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
Public Class ProcessManagerV
|
||||||
|
|
||||||
|
Private WithEvents m_ProcessManagerVM As ProcessManagerVM
|
||||||
|
|
||||||
|
Sub New(Owner As Window, ProcessManagerVM As ProcessManagerVM)
|
||||||
|
'MyBase.New(Owner)
|
||||||
|
Me.Owner = Owner
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = ProcessManagerVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_ProcessManagerVM = ProcessManagerVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ProcessManagerVM.m_CloseWindow
|
||||||
|
' Me.DialogResult = bDialogResult
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
Imports System.Windows.Threading
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
|
||||||
|
Public Class ProcessManagerVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_UpdateDataTimer As New DispatcherTimer
|
||||||
|
|
||||||
|
Private m_ExecProcessManager As ExecProcessManager
|
||||||
|
Public ReadOnly Property ExecProcessManager As ExecProcessManager
|
||||||
|
Get
|
||||||
|
Return m_ExecProcessManager
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ArgumentsQueue As String
|
||||||
|
Get
|
||||||
|
Return m_ExecProcessManager.ArgumentsQueueCount.ToString()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ResultQueue As String
|
||||||
|
Get
|
||||||
|
Return m_ExecProcessManager.ArgumentsResultQueueCount.ToString()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ThreadList As ObservableCollection(Of ThreadData)
|
||||||
|
Get
|
||||||
|
If Not IsNothing(m_ExecProcessManager.ThreadDataList) Then
|
||||||
|
Return New ObservableCollection(Of ThreadData)(m_ExecProcessManager.ThreadDataList.ToList())
|
||||||
|
Else
|
||||||
|
Return New ObservableCollection(Of ThreadData)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(ExecProcessManager As ExecProcessManager)
|
||||||
|
m_ExecProcessManager = ExecProcessManager
|
||||||
|
m_UpdateDataTimer.Interval = New TimeSpan(0, 0, 1)
|
||||||
|
AddHandler m_UpdateDataTimer.Tick, AddressOf UpdateDataTimer_Tick
|
||||||
|
m_UpdateDataTimer.Start()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateDataTimer_Tick(sender As Object, e As EventArgs)
|
||||||
|
NotifyPropertyChanged(NameOf(ArgumentsQueue))
|
||||||
|
NotifyPropertyChanged(NameOf(ResultQueue))
|
||||||
|
NotifyPropertyChanged(NameOf(ThreadList))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 542 B |
|
After Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 773 B |
|
After Width: | Height: | Size: 358 B |
|
After Width: | Height: | Size: 328 B |
|
After Width: | Height: | Size: 547 B |
|
After Width: | Height: | Size: 730 B |
|
After Width: | Height: | Size: 626 B |
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 767 B |
|
After Width: | Height: | Size: 390 B |
|
After Width: | Height: | Size: 175 B |
|
After Width: | Height: | Size: 685 B |
|
After Width: | Height: | Size: 237 B |
|
After Width: | Height: | Size: 668 B |
@@ -0,0 +1,272 @@
|
|||||||
|
<Window x:Class="RestartWndV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:Effector.Plugin.StoneCut"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Window.Resources>
|
||||||
|
<local:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>
|
||||||
|
<local:DoorToVisibilityConverter x:Key="DoorToVisibilityConverter"/>
|
||||||
|
<local:StateToVisibilityConverter x:Key="StateToVisibilityConverter"/>
|
||||||
|
</Window.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Image Source="{Binding sMachineImagePath}"
|
||||||
|
Stretch="Uniform"/>
|
||||||
|
<!--Porte-->
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.7*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="0.3*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="0.3*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="0.3*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="0.3*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="0.7*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="2.15*"/>
|
||||||
|
<RowDefinition Height="0.6*"/>
|
||||||
|
<RowDefinition Height="2.15*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding VariableList[0].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||||
|
Style="{StaticResource Door}">
|
||||||
|
<TextBlock Text="{Binding DoorOnMachineArray[0].nId}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="3"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding VariableList[1].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||||
|
Style="{StaticResource Door}">
|
||||||
|
<TextBlock Text="{Binding DoorOnMachineArray[1].nId}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="5"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding VariableList[2].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||||
|
Style="{StaticResource Door}">
|
||||||
|
<TextBlock Text="{Binding DoorOnMachineArray[2].nId}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="7"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding VariableList[3].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||||
|
Style="{StaticResource Door}">
|
||||||
|
<TextBlock Text="{Binding DoorOnMachineArray[3].nId}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="9"
|
||||||
|
Grid.Row="1"
|
||||||
|
Visibility="{Binding VariableList[4].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||||
|
Style="{StaticResource Door}">
|
||||||
|
<TextBlock Text="{Binding DoorOnMachineArray[4].nId}"
|
||||||
|
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<!--Descrizione porte-->
|
||||||
|
<ItemsControl Grid.Row="1"
|
||||||
|
ItemsSource="{Binding DoorOnMachineArray}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Columns="5"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid Visibility="{Binding Converter={StaticResource DoorToVisibilityConverter}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="Id"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="{Binding nId}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="Circular Index"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding nCircIndex}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="State"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="{Binding nState}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="DDF Name"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="{Binding sDDFName}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="CSV Name"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="{Binding sCSVName}"/>
|
||||||
|
<!--<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="5"
|
||||||
|
Text="DoorCode"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="5"
|
||||||
|
Text="{Binding sDoorCode}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="6"
|
||||||
|
Text="DoorDescription"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="6"
|
||||||
|
Text="{Binding sDoorDescription}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="7"
|
||||||
|
Text="M1 CN Path"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="7"
|
||||||
|
Text="{Binding sM1CNPath}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="8"
|
||||||
|
Text="M2 CN Path"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="8"
|
||||||
|
Text="{Binding sM2CNPath}"/>-->
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="9"
|
||||||
|
Text="Load Time"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="9"
|
||||||
|
Text="{Binding sLoadTime}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="10"
|
||||||
|
Text="Machining 1 Start"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="10"
|
||||||
|
Text="{Binding sMachining1Start}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="11"
|
||||||
|
Text="Machining 1 End"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="11"
|
||||||
|
Text="{Binding sMachining1End}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="12"
|
||||||
|
Text="Machining 2 Start"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="12"
|
||||||
|
Text="{Binding sMachining2Start}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="13"
|
||||||
|
Text="Machining 2 End"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="13"
|
||||||
|
Text="{Binding sMachining2End}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="14"
|
||||||
|
Text="UnloadTime"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="14"
|
||||||
|
Text="{Binding sUnloadTime}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</Grid>
|
||||||
|
<!--<ItemsControl ItemsSource="{Binding RestartDoorList}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Rows="1"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid Visibility="{Binding nState, Converter={StaticResource StateToVisibilityConverter}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="Id"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="0"
|
||||||
|
Text="{Binding nId}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="Circular Index"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding nCircIndex}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="State"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="{Binding nState}"/>
|
||||||
|
<ComboBox Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
ItemsSource="{Binding DoorStateList}"
|
||||||
|
SelectedItem="{Binding SelDoorState}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="DDF Name"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="{Binding sDDFName}"/>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="CSV Name"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="{Binding sCSVName}"/>
|
||||||
|
<TextBlock Text="Id"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>-->
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
Content="Ok"
|
||||||
|
Command="{Binding Ok_Command}"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
Public Class RestartWndV
|
||||||
|
|
||||||
|
Private WithEvents m_RestartWndVM As RestartWndVM
|
||||||
|
|
||||||
|
Sub New(Owner As Window, RestartWndVM As RestartWndVM)
|
||||||
|
'MyBase.New(Owner)
|
||||||
|
Me.Owner = Owner
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = RestartWndVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_RestartWndVM = RestartWndVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_RestartWndVM.m_CloseWindow
|
||||||
|
Me.DialogResult = bDialogResult
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,339 @@
|
|||||||
|
Imports Effector.Plugin.Lib
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.Globalization
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class RestartWndVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
|
||||||
|
Private m_RestartDoorList As ObservableCollection(Of RestartDoor)
|
||||||
|
Public ReadOnly Property RestartDoorList As ObservableCollection(Of RestartDoor)
|
||||||
|
Get
|
||||||
|
Return m_RestartDoorList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sMachineImagePath As String
|
||||||
|
Public ReadOnly Property sMachineImagePath As String
|
||||||
|
Get
|
||||||
|
Return m_sMachineImagePath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'Private m_DoorOnMachineArray(4) As RestartDoor
|
||||||
|
'Public ReadOnly Property DoorOnMachineArray As RestartDoor()
|
||||||
|
' Get
|
||||||
|
' Return m_DoorOnMachineArray
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
Private m_DoorOnMachineArray As New ObservableCollection(Of RestartDoor)
|
||||||
|
Public ReadOnly Property DoorOnMachineArray As ObservableCollection(Of RestartDoor)
|
||||||
|
Get
|
||||||
|
Return m_DoorOnMachineArray
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property VariableList As ObservableCollection(Of Variable)
|
||||||
|
Get
|
||||||
|
Return Map.refMachinePageVM.VariableList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
Dim sBackupFilePath As String = ""
|
||||||
|
GetPluginPrivateProfileString("General", "BackupDir", "", sBackupFilePath)
|
||||||
|
sBackupFilePath &= "\LuaBackup.json"
|
||||||
|
|
||||||
|
Dim JsonLuaDoorList As List(Of JsonLuaDoor)
|
||||||
|
If File.Exists(sBackupFilePath) Then
|
||||||
|
Dim sReadedFile As String = File.ReadAllText(sBackupFilePath)
|
||||||
|
JsonLuaDoorList = JsonConvert.DeserializeObject(Of List(Of JsonLuaDoor))(sReadedFile)
|
||||||
|
JsonLuaDoorList = JsonLuaDoorList.OrderBy(Of Integer)(Function(x) x.nCircIndex).ToList()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' creo posti in lista descrizioni
|
||||||
|
For nIndex As Integer = 0 To 4
|
||||||
|
m_DoorOnMachineArray.Add(Nothing)
|
||||||
|
Next
|
||||||
|
|
||||||
|
' leggo presenze porta
|
||||||
|
For nPositionIndex As Integer = 4 To 0 Step -1
|
||||||
|
If GetVariableFromName(1, "@WP_PR_0" & nPositionIndex.ToString()).dValue <> 0 Then
|
||||||
|
' verifico indice
|
||||||
|
Dim nCircindex As Integer = GetVariableFromName(1, "@DOORN_S" & nPositionIndex.ToString()).nValue
|
||||||
|
If nCircindex <> 0 Then
|
||||||
|
m_DoorOnMachineArray(nPositionIndex) = New RestartDoor(JsonLuaDoorList(nCircindex - 1))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
NotifyPropertyChanged(NameOf(DoorOnMachineArray))
|
||||||
|
|
||||||
|
|
||||||
|
'If File.Exists(sBackupFilePath) Then
|
||||||
|
' Dim sReadedFile As String = File.ReadAllText(sBackupFilePath)
|
||||||
|
|
||||||
|
' Dim JsonLuaDoorList As List(Of JsonLuaDoor) = JsonConvert.DeserializeObject(Of List(Of JsonLuaDoor))(sReadedFile)
|
||||||
|
' JsonLuaDoorList = JsonLuaDoorList.OrderBy(Of Integer)(Function(x) x.nCircIndex).ToList()
|
||||||
|
|
||||||
|
' m_RestartDoorList = New ObservableCollection(Of RestartDoor)((From JsonLuaDoor In Map.refDoorListPageVM.DoorList
|
||||||
|
' Select New RestartDoor(JsonLuaDoor)).ToList())
|
||||||
|
' For JsonLuaDoorIndex = 0 To JsonLuaDoorList.Count - 1
|
||||||
|
' Dim JsonLuaDoor As JsonLuaDoor = JsonLuaDoorList(JsonLuaDoorIndex)
|
||||||
|
' Dim RestartDoor As RestartDoor = m_RestartDoorList.FirstOrDefault(Function(x) x.nId = JsonLuaDoor.nId)
|
||||||
|
' If Not IsNothing(RestartDoor) Then
|
||||||
|
' RestartDoor.Update(JsonLuaDoor)
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
' Next
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' se macchina 1
|
||||||
|
Dim sResourcesDirPath As String = ""
|
||||||
|
GetPluginPrivateProfileString(S_GENERAL, K_RESOURCESDIR, "", sResourcesDirPath)
|
||||||
|
m_sMachineImagePath = sResourcesDirPath & "\Multiax-C1223Ripartenza.png"
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Function GetVariableFromName(nMachIndex As Integer, sName As String) As Variable
|
||||||
|
Return Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||||
|
End Function
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Ok"
|
||||||
|
|
||||||
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf Ok)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Ok()
|
||||||
|
RaiseEvent m_CloseWindow(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Ok
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class StateToVisibilityConverter
|
||||||
|
Implements IValueConverter
|
||||||
|
|
||||||
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||||
|
If IsNothing(value) OrElse Not TypeOf value Is Integer Then Return Visibility.Collapsed
|
||||||
|
Return If(value > 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||||
|
Throw New NotImplementedException()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class RestartDoor
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_nId As Integer = -1
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nCircIndex As Integer = -1
|
||||||
|
Public ReadOnly Property nCircIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_nCircIndex
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nState As Integer = 0
|
||||||
|
Public ReadOnly Property nState As Integer
|
||||||
|
Get
|
||||||
|
Return m_nState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_DoorStateList As New List(Of IdNameStruct)({New IdNameStruct(0, "Not On Machine"),
|
||||||
|
New IdNameStruct(1, "Imported"),
|
||||||
|
New IdNameStruct(2, "On Load"),
|
||||||
|
New IdNameStruct(3, "On Machine 1"),
|
||||||
|
New IdNameStruct(4, "On Medium Station"),
|
||||||
|
New IdNameStruct(6, "On Machine 2"),
|
||||||
|
New IdNameStruct(7, "On Unload"),
|
||||||
|
New IdNameStruct(8, "Produced"),
|
||||||
|
New IdNameStruct(100, "Scrap")})
|
||||||
|
Public ReadOnly Property DoorStateList As List(Of IdNameStruct)
|
||||||
|
Get
|
||||||
|
Return m_DoorStateList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SelDoorState As IdNameStruct
|
||||||
|
Get
|
||||||
|
Return m_DoorStateList.FirstOrDefault(Function(x) x.Id = m_nState)
|
||||||
|
End Get
|
||||||
|
Set(value As IdNameStruct)
|
||||||
|
m_nState = value.Id
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sDoorCode As String = ""
|
||||||
|
Public ReadOnly Property sDoorCode As String
|
||||||
|
Get
|
||||||
|
Return m_sDoorCode
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sDoorDescription As String = ""
|
||||||
|
Public ReadOnly Property sDoorDescription As String
|
||||||
|
Get
|
||||||
|
Return m_sDoorDescription
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sDDFName As String = ""
|
||||||
|
Public ReadOnly Property sDDFName As String
|
||||||
|
Get
|
||||||
|
Return m_sDDFName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sCSVName As String = ""
|
||||||
|
Public ReadOnly Property sCSVName As String
|
||||||
|
Get
|
||||||
|
Return m_sCSVName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sM1CNPath As String = ""
|
||||||
|
Public ReadOnly Property sM1CNPath As String
|
||||||
|
Get
|
||||||
|
Return m_sM1CNPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sM2CNPath As String = ""
|
||||||
|
Public ReadOnly Property sM2CNPath As String
|
||||||
|
Get
|
||||||
|
Return m_sM2CNPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtLoadTime As DateTime
|
||||||
|
Public ReadOnly Property sLoadTime As String
|
||||||
|
Get
|
||||||
|
Return m_dtLoadTime.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachining1Start As DateTime
|
||||||
|
Public ReadOnly Property sMachining1Start As String
|
||||||
|
Get
|
||||||
|
Return m_dtMachining1Start.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachining1End As DateTime
|
||||||
|
Public ReadOnly Property sMachining1End As String
|
||||||
|
Get
|
||||||
|
Return m_dtMachining1End.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachining2Start As DateTime
|
||||||
|
Public ReadOnly Property sMachining2Start As String
|
||||||
|
Get
|
||||||
|
Return m_dtMachining2Start.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachining2End As DateTime
|
||||||
|
Public ReadOnly Property sMachining2End As String
|
||||||
|
Get
|
||||||
|
Return m_dtMachining2End.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtUnloadTime As DateTime
|
||||||
|
Public ReadOnly Property sUnloadTime As String
|
||||||
|
Get
|
||||||
|
Return m_dtUnloadTime.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(Id As Integer, IndiceCirc As Integer, Stato As Integer, CodicePorta As String, DescrizionePorta As String, NomeDDF As String, NomeCSV As String,
|
||||||
|
CN_macchina_1 As String, CN_macchina_2 As String, tempo_carico As Long, tempo_inizio_lav_1 As Long, tempo_fine_lav_1 As Long, tempo_inizio_lav_2 As Long,
|
||||||
|
tempo_fine_lav_2 As Long, tempo_scarico As Long)
|
||||||
|
m_nId = Id
|
||||||
|
m_nCircIndex = IndiceCirc
|
||||||
|
m_nState = Stato
|
||||||
|
m_sDoorCode = CodicePorta
|
||||||
|
m_sDoorDescription = DescrizionePorta
|
||||||
|
m_sDDFName = NomeDDF
|
||||||
|
m_sCSVName = NomeCSV
|
||||||
|
m_sM1CNPath = CN_macchina_1
|
||||||
|
m_sM2CNPath = CN_macchina_2
|
||||||
|
m_dtLoadTime = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(tempo_carico).ToLocalTime()
|
||||||
|
m_dtMachining1Start = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(tempo_inizio_lav_1).ToLocalTime()
|
||||||
|
m_dtMachining1End = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(tempo_fine_lav_1).ToLocalTime()
|
||||||
|
m_dtMachining2Start = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(tempo_inizio_lav_2).ToLocalTime()
|
||||||
|
m_dtMachining2End = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(tempo_fine_lav_2).ToLocalTime()
|
||||||
|
m_dtUnloadTime = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(tempo_scarico).ToLocalTime()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(Door As Door)
|
||||||
|
m_nId = Door.nId
|
||||||
|
m_nCircIndex = 0
|
||||||
|
m_nState = 0
|
||||||
|
'm_sDDFName = Door.sFileName
|
||||||
|
'm_sCSVName = Door.sCSVName
|
||||||
|
m_sM1CNPath = ""
|
||||||
|
m_sM2CNPath = ""
|
||||||
|
m_dtLoadTime = DateTime.MinValue
|
||||||
|
m_dtMachining1Start = DateTime.MinValue
|
||||||
|
m_dtMachining1End = DateTime.MinValue
|
||||||
|
m_dtMachining2Start = DateTime.MinValue
|
||||||
|
m_dtMachining2End = DateTime.MinValue
|
||||||
|
m_dtUnloadTime = DateTime.MinValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub New(JsonLuaDoor As JsonLuaDoor)
|
||||||
|
m_nId = JsonLuaDoor.nId
|
||||||
|
m_nCircIndex = JsonLuaDoor.nCircIndex
|
||||||
|
m_nState = JsonLuaDoor.nState
|
||||||
|
m_sDDFName = JsonLuaDoor.sDDFName
|
||||||
|
m_sCSVName = JsonLuaDoor.sCSVName
|
||||||
|
m_sM1CNPath = JsonLuaDoor.sM1CNPath
|
||||||
|
m_sM2CNPath = JsonLuaDoor.sM2CNPath
|
||||||
|
m_dtLoadTime = JsonLuaDoor.dtLoadTime
|
||||||
|
m_dtMachining1Start = JsonLuaDoor.dtMachining1Start
|
||||||
|
m_dtMachining1End = JsonLuaDoor.dtMachining1End
|
||||||
|
m_dtMachining2Start = JsonLuaDoor.dtMachining2Start
|
||||||
|
m_dtMachining2End = JsonLuaDoor.dtMachining2End
|
||||||
|
m_dtUnloadTime = JsonLuaDoor.dtUnloadTime
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<UserControl x:Class="StatisticsPageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:Effector.Plugin.StoneCut"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class StatisticsPageV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class StatisticsPageVM
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' A command whose sole purpose is to
|
||||||
|
''' relay its functionality to other
|
||||||
|
''' objects by invoking delegates. The
|
||||||
|
''' default return value for the CanExecute
|
||||||
|
''' method is 'true'.
|
||||||
|
''' </summary>
|
||||||
|
Public Class Command
|
||||||
|
Implements ICommand
|
||||||
|
|
||||||
|
#Region "Fields"
|
||||||
|
|
||||||
|
Private ReadOnly _execute As Action(Of Object)
|
||||||
|
Private ReadOnly _canExecute As Predicate(Of Object)
|
||||||
|
|
||||||
|
#End Region ' Fields
|
||||||
|
|
||||||
|
#Region "Constructors"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Creates a new command that can always execute.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="execute">The execution logic.</param>
|
||||||
|
Public Sub New(ByVal execute As Action(Of Object))
|
||||||
|
Me.New(execute, Nothing)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Creates a new command.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="execute">The execution logic.</param>
|
||||||
|
''' <param name="canExecute">The execution status logic.</param>
|
||||||
|
Public Sub New(ByVal execute As Action(Of Object), ByVal canExecute As Predicate(Of Object))
|
||||||
|
If execute Is Nothing Then
|
||||||
|
Throw New ArgumentNullException("execute")
|
||||||
|
End If
|
||||||
|
|
||||||
|
_execute = execute
|
||||||
|
_canExecute = canExecute
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructors
|
||||||
|
|
||||||
|
#Region "ICommand Members"
|
||||||
|
|
||||||
|
<DebuggerStepThrough> _
|
||||||
|
Public Function CanExecute(ByVal parameter As Object) As Boolean Implements ICommand.CanExecute
|
||||||
|
Return If(_canExecute Is Nothing, True, _canExecute(parameter))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Custom Event CanExecuteChanged As EventHandler Implements ICommand.CanExecuteChanged
|
||||||
|
AddHandler(ByVal value As EventHandler)
|
||||||
|
AddHandler CommandManager.RequerySuggested, value
|
||||||
|
End AddHandler
|
||||||
|
RemoveHandler(ByVal value As EventHandler)
|
||||||
|
RemoveHandler CommandManager.RequerySuggested, value
|
||||||
|
End RemoveHandler
|
||||||
|
RaiseEvent(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||||
|
End RaiseEvent
|
||||||
|
End Event
|
||||||
|
|
||||||
|
Public Sub Execute(ByVal parameter As Object) Implements ICommand.Execute
|
||||||
|
_execute(parameter)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ICommand Members
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,317 @@
|
|||||||
|
<ResourceDictionary x:Class="Dictionary"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:Effector.Plugin.StoneCut"
|
||||||
|
xmlns:sys="clr-namespace:System;assembly=mscorlib">
|
||||||
|
|
||||||
|
<!--<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="pack://application:,,,/Effector.Plugin.Lib;component/Themes/Generic.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Assign a Key to every Panel ViewModel to use
|
||||||
|
it in xaml file(ProjectView.xaml).
|
||||||
|
-->
|
||||||
|
<local:FiveLakesUIVM x:Key="FiveLakesUIVM"/>
|
||||||
|
<local:MainMenuVM x:Key="MainMenuVM"/>
|
||||||
|
<local:DoorListPageVM x:Key="DoorListVM"/>
|
||||||
|
<local:MachinePageVM x:Key="MachinePageVM"/>
|
||||||
|
<local:StatisticsPageVM x:Key="StatisticsPageVM"/>
|
||||||
|
|
||||||
|
<!--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}" />
|
||||||
|
|
||||||
|
|
||||||
|
<!--#1C1D22-->
|
||||||
|
<Color x:Key="Omag_Black_Color" R="28" G="29" B="34" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Omag_Black" Color="{StaticResource Omag_Black_Color}" />
|
||||||
|
<!--#484D55-->
|
||||||
|
<Color x:Key="Omag_DarkGray_Color" R="72" G="77" B="85" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Omag_DarkGray" Color="{StaticResource Omag_DarkGray_Color}" />
|
||||||
|
<!--#636974-->
|
||||||
|
<Color x:Key="Omag_LightGray_Color" R="99" G="105" B="116" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Omag_LightGray" Color="{StaticResource Omag_LightGray_Color}" />
|
||||||
|
|
||||||
|
<Style x:Key="Table_Button" TargetType="{x:Type Button}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource Omag_Black}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--#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 default dei controlli-->
|
||||||
|
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
|
||||||
|
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
|
||||||
|
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
|
||||||
|
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
|
||||||
|
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
|
||||||
|
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
|
||||||
|
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
|
||||||
|
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
|
||||||
|
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
|
||||||
|
|
||||||
|
<Style x:Key="FocusVisual">
|
||||||
|
<Setter Property="Control.Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate>
|
||||||
|
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
|
<!--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="TitleBarHeight">30</GridLength>
|
||||||
|
<Thickness x:Key="WindowBorder_Thickness">2</Thickness>
|
||||||
|
<sys:Double x:Key="WindowBorder_Height">2</sys:Double>
|
||||||
|
|
||||||
|
<!--Button-->
|
||||||
|
|
||||||
|
<!--<Style TargetType="{x:Type Button}">
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||||
|
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="1"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||||
|
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsDefaulted" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||||
|
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>-->
|
||||||
|
|
||||||
|
<!--<Style x:Key="DoorList_Button" TargetType="{x:Type Button}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Padding" Value="10,0,10,0"/>
|
||||||
|
</Style>-->
|
||||||
|
|
||||||
|
<!--ToggleButton-->
|
||||||
|
|
||||||
|
<Style TargetType="{x:Type ToggleButton}">
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||||
|
<Setter Property="Background" Value="{StaticResource Effector_Blue}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="1"/>
|
||||||
|
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
|
||||||
|
<Setter Property="FontWeight" Value="Medium"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
|
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||||
|
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Button.IsDefaulted" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Effector_DarkBlue}"/>
|
||||||
|
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="White"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||||
|
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="MainMenu_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
|
<Setter Property="Padding" Value="25,0,25,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--Border-->
|
||||||
|
|
||||||
|
<Style x:Key="Parameter_MachinePage_Border" TargetType="{x:Type GroupBox}">
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="BorderBrush" Value="DarkGray"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Custom SelectedItem colors for DataGrid -->
|
||||||
|
|
||||||
|
<!--<Style x:Key="RowDataGrid_CustomHighLight" TargetType="{x:Type DataGridRow}">
|
||||||
|
<Setter Property="BorderBrush" Value="LightGray" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter Property="BorderThickness" Value="2,2,2,2" />
|
||||||
|
--><!--<Setter Property="BorderBrush" Value="Cyan" />--><!--
|
||||||
|
<Setter Property="Padding" Value="0,0,0,0" />
|
||||||
|
<Setter Property="Margin" Value="-2,0,-2,0" />
|
||||||
|
<Setter Property="Foreground" Value="Blue" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
<Style.Resources>
|
||||||
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
|
||||||
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
|
||||||
|
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />
|
||||||
|
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Black" />
|
||||||
|
</Style.Resources>
|
||||||
|
</Style>-->
|
||||||
|
|
||||||
|
<!--Styles for DataGrid columns-->
|
||||||
|
|
||||||
|
<Style x:Key="DataGridTextColumn_TextBlock" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="DataGridTextColumn_TextBox" TargetType="{x:Type TextBox}">
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="DataGridTemplateColumn_ComboBox" TargetType="{x:Type ComboBox}">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--Style for page tabcontrol-->
|
||||||
|
|
||||||
|
<Style x:Key="MainPage_Tabcontrol" TargetType="{x:Type TabControl}">
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--Stili per disegno macchina con porte-->
|
||||||
|
|
||||||
|
<Style x:Key="Table" TargetType="Border">
|
||||||
|
<Setter Property="BorderBrush" Value="Gray"/>
|
||||||
|
<Setter Property="BorderThickness" Value="2"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="Door" TargetType="Border">
|
||||||
|
<Setter Property="BorderBrush" Value="SaddleBrown"/>
|
||||||
|
<Setter Property="BorderThickness" Value="5"/>
|
||||||
|
<Setter Property="Background" Value="SandyBrown"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="Advancement_Button" TargetType="Button">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="Sensor" TargetType="Ellipse">
|
||||||
|
<Setter Property="Height" Value="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="MachDrawVar_TextBlock" TargetType="TextBlock">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="MachDrawVar_CheckBox" TargetType="CheckBox">
|
||||||
|
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBlock.DataGridTextColumn.DoorList" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBox.DataGridTextColumn.DoorList" TargetType="{x:Type TextBox}">
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,232 @@
|
|||||||
|
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_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_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_DarkBlue As SolidColorBrush = Application.Current.FindResource("Effector_DarkBlue")
|
||||||
|
Public Shared ReadOnly Property Effector_DarkBlue As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_DarkBlue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_LightBlue_Status As SolidColorBrush = Application.Current.FindResource("Effector_LightBlue_Status")
|
||||||
|
Public Shared ReadOnly Property Effector_LightBlue_Status As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_LightBlue_Status
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Blue_Status As SolidColorBrush = Application.Current.FindResource("Effector_Blue_Status")
|
||||||
|
Public Shared ReadOnly Property Effector_Blue_Status As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Blue_Status
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Red_Status As SolidColorBrush = Application.Current.FindResource("Effector_Red_Status")
|
||||||
|
Public Shared ReadOnly Property Effector_Red_Status As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Red_Status
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Green_Status As SolidColorBrush = Application.Current.FindResource("Effector_Green_Status")
|
||||||
|
Public Shared ReadOnly Property Effector_Green_Status As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Green_Status
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Gray_Status As SolidColorBrush = Application.Current.FindResource("Effector_Gray_Status")
|
||||||
|
Public Shared ReadOnly Property Effector_Gray_Status As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Gray_Status
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Yellow_Status As SolidColorBrush = Application.Current.FindResource("Effector_Yellow_Status")
|
||||||
|
Public Shared ReadOnly Property Effector_Yellow_Status As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Yellow_Status
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_LightBlue_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_LightBlue_SelStatus")
|
||||||
|
Public Shared ReadOnly Property Effector_LightBlue_SelStatus As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_LightBlue_SelStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Blue_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Blue_SelStatus")
|
||||||
|
Public Shared ReadOnly Property Effector_Blue_SelStatus As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Blue_SelStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Red_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Red_SelStatus")
|
||||||
|
Public Shared ReadOnly Property Effector_Red_SelStatus As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Red_SelStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Green_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Green_SelStatus")
|
||||||
|
Public Shared ReadOnly Property Effector_Green_SelStatus As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Green_SelStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Gray_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Gray_SelStatus")
|
||||||
|
Public Shared ReadOnly Property Effector_Gray_SelStatus As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Gray_SelStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_Yellow_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Yellow_SelStatus")
|
||||||
|
Public Shared ReadOnly Property Effector_Yellow_SelStatus As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_Yellow_SelStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Effector_White_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_White_SelStatus")
|
||||||
|
Public Shared ReadOnly Property Effector_White_SelStatus As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Effector_White_SelStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Private Shared m_Omag_Black As SolidColorBrush = Application.Current.FindResource("Omag_Black")
|
||||||
|
'Public Shared ReadOnly Property Omag_Black As SolidColorBrush
|
||||||
|
' Get
|
||||||
|
' Return m_Omag_Black
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Private Shared m_Omag_DarkGray As SolidColorBrush = Application.Current.FindResource("Omag_DarkGray")
|
||||||
|
'Public Shared ReadOnly Property Omag_DarkGray As SolidColorBrush
|
||||||
|
' Get
|
||||||
|
' Return m_Omag_DarkGray
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Private Shared m_Omag_LightGray As SolidColorBrush = Application.Current.FindResource("Omag_LightGray")
|
||||||
|
'Public Shared ReadOnly Property Omag_LightGray As SolidColorBrush
|
||||||
|
' Get
|
||||||
|
' Return m_Omag_LightGray
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Private Shared m_Effector_Orange As SolidColorBrush = Application.Current.FindResource("Effector_Orange")
|
||||||
|
'Public Shared ReadOnly Property Effector_Orange As SolidColorBrush
|
||||||
|
' Get
|
||||||
|
' Return m_Effector_Orange
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Private Shared m_Icarus_LightBlue As SolidColorBrush = Application.Current.FindResource("Effector_LightBlue_Color")
|
||||||
|
'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_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
|
||||||
@@ -0,0 +1,711 @@
|
|||||||
|
Imports System.IO
|
||||||
|
Imports System.Threading
|
||||||
|
Imports MS.Internal
|
||||||
|
Imports Effector.Plugin.StoneCut.ThreadData
|
||||||
|
Imports System.Windows.Threading
|
||||||
|
|
||||||
|
Public Class ExecProcessManager
|
||||||
|
|
||||||
|
Public Event m_AllArgsProcessed()
|
||||||
|
|
||||||
|
Public Enum ExecutionThreadStatuses As Integer
|
||||||
|
RUNNING = 1
|
||||||
|
STOPPED = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private Enum ProcessManagerStates
|
||||||
|
NULL = 0
|
||||||
|
OPEN = 1
|
||||||
|
CLOSE = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_ProcessManagerTimer As New DispatcherTimer
|
||||||
|
Private m_ProcessManagerState As ProcessManagerStates
|
||||||
|
Private m_ProcessManagerV As ProcessManagerV
|
||||||
|
Public ReadOnly Property ProcessManagerV As ProcessManagerV
|
||||||
|
Get
|
||||||
|
Return m_ProcessManagerV
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' riferimento al thread principale
|
||||||
|
Private m_ExecutionThread As Thread
|
||||||
|
Private m_ExecutionThreadStatus As ExecutionThreadStatuses = ExecutionThreadStatuses.STOPPED
|
||||||
|
Public ReadOnly Property ExecutionThreadStatus As ExecutionThreadStatuses
|
||||||
|
Get
|
||||||
|
Return m_ExecutionThreadStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
' array dei thread
|
||||||
|
Private m_ThreadList As Thread()
|
||||||
|
' array dei dati dei thread
|
||||||
|
Private m_ThreadDataList As ThreadData()
|
||||||
|
Friend ReadOnly Property ThreadDataList As ThreadData()
|
||||||
|
Get
|
||||||
|
Return m_ThreadDataList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
' variabile che ferma i processi
|
||||||
|
Private m_bStopProcess As Boolean = False
|
||||||
|
' variabile che conferma chiusura dei processi
|
||||||
|
Private m_bExecutionThreadStoped As Boolean = False
|
||||||
|
' numero massimo di istanze del cam
|
||||||
|
Private m_MaxCamInstances As Integer = 1
|
||||||
|
' nome dell'eseguibile da lanciare
|
||||||
|
Private m_sProcessFileName As String = ""
|
||||||
|
' stringa di argomenti dell'eseguibile da lanciare
|
||||||
|
Private m_sProcessArguments As String = ""
|
||||||
|
' coda delle cose da eseguire
|
||||||
|
Private ArgumentsQueueLock As New Object
|
||||||
|
Private m_ArgumentsQueue As New Queue(Of ProcessArgs)
|
||||||
|
Public ReadOnly Property ArgumentsQueue As Queue(Of ProcessArgs)
|
||||||
|
Get
|
||||||
|
Return m_ArgumentsQueue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
' coda dei risultati
|
||||||
|
Private ArgumentsResultQueueLock As New Object
|
||||||
|
Private m_ArgumentsResultQueue As New Queue(Of ProcessArgsResult)
|
||||||
|
Public ReadOnly Property ArgumentsResultQueue As Queue(Of ProcessArgsResult)
|
||||||
|
Get
|
||||||
|
Return m_ArgumentsResultQueue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' funzione che richiede prossimo elemento da processare
|
||||||
|
Private m_delGetNextProcessArgs As Func(Of ProcessArgs)
|
||||||
|
Public Sub SetGetNextProcessArgs(GetNextProcessArgs As Func(Of ProcessArgs))
|
||||||
|
m_delGetNextProcessArgs = GetNextProcessArgs
|
||||||
|
End Sub
|
||||||
|
' funzione di pre processing dell'elemento
|
||||||
|
Private m_delPreProcess As Func(Of ProcessArgs, ProcessArgs)
|
||||||
|
Public Sub SetPreProcess(PreProcess As Func(Of ProcessArgs, ProcessArgs))
|
||||||
|
m_delPreProcess = PreProcess
|
||||||
|
End Sub
|
||||||
|
' funzione di post processing dell'elemento
|
||||||
|
Private m_delPostProcess As Action(Of ProcessArgsResult)
|
||||||
|
Public Sub SetPostProcess(PostProcess As Action(Of ProcessArgsResult))
|
||||||
|
m_delPostProcess = PostProcess
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(sProcessFileName As String, sProcessArguments As String)
|
||||||
|
m_sProcessFileName = sProcessFileName
|
||||||
|
m_sProcessArguments = sProcessArguments
|
||||||
|
m_ProcessManagerTimer.Interval = New TimeSpan(0, 0, 1)
|
||||||
|
AddHandler m_ProcessManagerTimer.Tick, AddressOf ProcessManagerTimer_Tick
|
||||||
|
m_ProcessManagerTimer.Start()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ProcessManagerTimer_Tick(sender As Object, e As EventArgs)
|
||||||
|
Select Case m_ProcessManagerState
|
||||||
|
Case ProcessManagerStates.OPEN
|
||||||
|
' creo finestra statistiche processi
|
||||||
|
m_ProcessManagerV = New ProcessManagerV(Application.Current.MainWindow, New ProcessManagerVM(Me))
|
||||||
|
ProcessManagerV.Show()
|
||||||
|
m_ProcessManagerState = ProcessManagerStates.NULL
|
||||||
|
Case ProcessManagerStates.CLOSE
|
||||||
|
' chiudo finestra statistiche processi
|
||||||
|
If Not IsNothing(m_ProcessManagerV) Then
|
||||||
|
ProcessManagerV.Close()
|
||||||
|
m_ProcessManagerV = Nothing
|
||||||
|
End If
|
||||||
|
m_ProcessManagerState = ProcessManagerStates.NULL
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function ArgumentsEnqueue(ProcessArgs As ProcessArgs) As Boolean
|
||||||
|
If ProcessArgs.nId <= 0 OrElse String.IsNullOrWhiteSpace(ProcessArgs.sArgs) Then Return False
|
||||||
|
SyncLock ArgumentsQueueLock
|
||||||
|
m_ArgumentsQueue.Enqueue(ProcessArgs)
|
||||||
|
End SyncLock
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ArgumentsDequeue() As ProcessArgs
|
||||||
|
Dim DequeueProcessArgs As ProcessArgs = Nothing
|
||||||
|
SyncLock ArgumentsQueueLock
|
||||||
|
If m_ArgumentsQueue.Count > 0 Then
|
||||||
|
DequeueProcessArgs = m_ArgumentsQueue.Dequeue()
|
||||||
|
End If
|
||||||
|
End SyncLock
|
||||||
|
Return DequeueProcessArgs
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ArgumentsQueueCount() As Integer
|
||||||
|
Dim nCount As Integer = 0
|
||||||
|
SyncLock ArgumentsQueueLock
|
||||||
|
nCount = m_ArgumentsQueue.Count
|
||||||
|
End SyncLock
|
||||||
|
Return nCount
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ArgumentsResultEnqueue(ProcessArgsResult As ProcessArgsResult) As Boolean
|
||||||
|
SyncLock ArgumentsResultQueueLock
|
||||||
|
m_ArgumentsResultQueue.Enqueue(ProcessArgsResult)
|
||||||
|
End SyncLock
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ArgumentsResultDequeue() As ProcessArgsResult
|
||||||
|
Dim DequeueProcessArgsResult As ProcessArgsResult = Nothing
|
||||||
|
SyncLock ArgumentsResultQueueLock
|
||||||
|
If m_ArgumentsResultQueue.Count > 0 Then
|
||||||
|
DequeueProcessArgsResult = m_ArgumentsResultQueue.Dequeue()
|
||||||
|
End If
|
||||||
|
End SyncLock
|
||||||
|
Return DequeueProcessArgsResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ArgumentsResultQueueCount() As Integer
|
||||||
|
Dim nCount As Integer = 0
|
||||||
|
SyncLock ArgumentsResultQueueLock
|
||||||
|
nCount = m_ArgumentsResultQueue.Count
|
||||||
|
End SyncLock
|
||||||
|
Return nCount
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub SetMaxCamInstances(nValue As Integer)
|
||||||
|
' Numero di core logici da utilizzare (minimo tra presenti sul PC e imposti da INI)
|
||||||
|
Dim nMaxThread As Integer = Math.Min(Environment.ProcessorCount, nValue)
|
||||||
|
m_MaxCamInstances = nMaxThread
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che avvia thread principale
|
||||||
|
Public Sub StartExecutionThread()
|
||||||
|
If m_ExecutionThreadStatus = ExecutionThreadStatuses.RUNNING Then Return
|
||||||
|
m_bStopProcess = False
|
||||||
|
m_bExecutionThreadStoped = False
|
||||||
|
m_ExecutionThread = New Thread(Sub()
|
||||||
|
ExecutionProcess()
|
||||||
|
End Sub)
|
||||||
|
|
||||||
|
m_ExecutionThread.SetApartmentState(ApartmentState.STA)
|
||||||
|
' avvio thread di gestione della macchina che avvia la connessione
|
||||||
|
m_ExecutionThread.Start()
|
||||||
|
|
||||||
|
m_ExecutionThreadStatus = ExecutionThreadStatuses.RUNNING
|
||||||
|
' lancio apertura finestra statistiche processi
|
||||||
|
m_ProcessManagerState = ProcessManagerStates.OPEN
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub StopExecutionThread()
|
||||||
|
If m_ExecutionThreadStatus = ExecutionThreadStatuses.STOPPED Then Return
|
||||||
|
m_bStopProcess = True
|
||||||
|
While Not m_bExecutionThreadStoped
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
If Not IsNothing(m_ExecutionThread) Then
|
||||||
|
m_ExecutionThread.Abort()
|
||||||
|
While Not m_ExecutionThread.ThreadState = ThreadState.Aborted
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
m_ExecutionThread = Nothing
|
||||||
|
End If
|
||||||
|
m_ThreadList = Nothing
|
||||||
|
m_ExecutionThreadStatus = ExecutionThreadStatuses.STOPPED
|
||||||
|
' lancio chiusura finestra statistiche processi
|
||||||
|
m_ProcessManagerState = ProcessManagerStates.CLOSE
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione di esecuzione del thread principale che gestice i processi
|
||||||
|
Private Sub ExecutionProcess()
|
||||||
|
Dim bStopMainProcess As Boolean = False
|
||||||
|
Dim nStartingProc As Integer = 0
|
||||||
|
While Not bStopMainProcess
|
||||||
|
bStopMainProcess = m_bStopProcess
|
||||||
|
' se processo fermato, fermo i thread
|
||||||
|
If bStopMainProcess Then
|
||||||
|
If Not IsNothing(m_ThreadList) AndAlso m_ThreadList.Count > 0 AndAlso Not IsNothing(m_ThreadList(0)) Then
|
||||||
|
' li fermo
|
||||||
|
m_bStopProcess = True
|
||||||
|
' verifico siano terminati
|
||||||
|
Dim bOneNotEnded As Boolean = True
|
||||||
|
While bOneNotEnded
|
||||||
|
bOneNotEnded = False
|
||||||
|
For Each Thread In m_ThreadList
|
||||||
|
If Not IsNothing(Thread) Then
|
||||||
|
If Thread.IsAlive Then
|
||||||
|
bOneNotEnded = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End While
|
||||||
|
' pulisco la lista
|
||||||
|
For ThreadIndex = 0 To m_ThreadList.Count - 1
|
||||||
|
m_ThreadList(ThreadIndex) = Nothing
|
||||||
|
Next
|
||||||
|
m_bStopProcess = False
|
||||||
|
End If
|
||||||
|
m_bExecutionThreadStoped = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' se lista processi nulla o vuota, li faccio partire
|
||||||
|
If (IsNothing(m_ThreadList) OrElse m_ThreadList.Count = 0) Then
|
||||||
|
m_ThreadList = New Thread(m_MaxCamInstances - 1) {}
|
||||||
|
m_ThreadDataList = New ThreadData(m_MaxCamInstances - 1) {}
|
||||||
|
For nThreadIndex = 0 To m_MaxCamInstances - 1
|
||||||
|
Dim ThreadId As Integer = nThreadIndex
|
||||||
|
m_ThreadList(nThreadIndex) = New Thread(Sub()
|
||||||
|
ThreadFunction(ThreadId)
|
||||||
|
End Sub)
|
||||||
|
m_ThreadList(nThreadIndex).SetApartmentState(ApartmentState.STA)
|
||||||
|
' avvio thread di gestione della macchina che avvia la connessione
|
||||||
|
m_ThreadList(nThreadIndex).Start()
|
||||||
|
Thread.Sleep(100)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
' se qualche processo in stop, lo faccio ripartire
|
||||||
|
For ThreadIndex = 0 To m_ThreadList.Count - 1
|
||||||
|
If ThreadIndex < m_ThreadList.Count Then
|
||||||
|
Dim Thread = m_ThreadList(ThreadIndex)
|
||||||
|
If Not IsNothing(Thread) Then
|
||||||
|
If Thread.ThreadState = ThreadState.Stopped OrElse
|
||||||
|
Thread.ThreadState = ThreadState.Aborted OrElse
|
||||||
|
Thread.ThreadState = ThreadState.Suspended OrElse
|
||||||
|
(Not m_ThreadDataList(ThreadIndex).ProcessStatus = ProcessStatuses.TOBESTARTED AndAlso
|
||||||
|
(IsNothing(m_ThreadDataList(ThreadIndex).Process) OrElse
|
||||||
|
(Not IsNothing(m_ThreadDataList(ThreadIndex).Process) AndAlso m_ThreadDataList(ThreadIndex).Process.HasExited))) Then
|
||||||
|
' inserire un ritardo di rilancio?
|
||||||
|
' lo chiudo e rilancio
|
||||||
|
'Thread.Sleep(500)
|
||||||
|
Thread.Abort()
|
||||||
|
Thread.Sleep(100)
|
||||||
|
While Not Thread.ThreadState = ThreadState.Aborted
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End While
|
||||||
|
Thread = Nothing
|
||||||
|
Dim ThreadId As Integer = ThreadIndex
|
||||||
|
m_ThreadList(ThreadIndex) = New Thread(Sub()
|
||||||
|
ThreadFunction(ThreadId)
|
||||||
|
End Sub)
|
||||||
|
m_ThreadList(ThreadIndex).SetApartmentState(ApartmentState.STA)
|
||||||
|
' avvio thread di gestione della macchina che avvia la connessione
|
||||||
|
m_ThreadList(ThreadIndex).Start()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim ThreadId As Integer = ThreadIndex
|
||||||
|
If ThreadIndex < m_ThreadList.Count Then
|
||||||
|
m_ThreadList(ThreadIndex) = New Thread(Sub()
|
||||||
|
ThreadFunction(ThreadId)
|
||||||
|
End Sub)
|
||||||
|
m_ThreadList(ThreadIndex).SetApartmentState(ApartmentState.STA)
|
||||||
|
' avvio thread di gestione della macchina che avvia la connessione
|
||||||
|
m_ThreadList(ThreadIndex).Start()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' verifico se coda vuota e tutti i processi hanno finito
|
||||||
|
Dim nQueueArgs As Integer = 0
|
||||||
|
SyncLock ArgumentsQueueLock
|
||||||
|
nQueueArgs = m_ArgumentsQueue.Count
|
||||||
|
End SyncLock
|
||||||
|
If nQueueArgs = 0 Then
|
||||||
|
Dim bProcessWaiting As Boolean = False
|
||||||
|
For Each ThreadData In m_ThreadDataList
|
||||||
|
If ThreadData.ProcessStatus = ProcessStatuses.WAITINGANSWER OrElse ThreadData.ProcessStatus = ProcessStatuses.ANSWERRECEIVED Then
|
||||||
|
bProcessWaiting = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not bProcessWaiting Then
|
||||||
|
' creo thread per lanciare evento asincrono di fine calcolo
|
||||||
|
Dim AllArgsProcessedThread = New Thread(Sub()
|
||||||
|
RaiseEvent m_AllArgsProcessed()
|
||||||
|
End Sub)
|
||||||
|
AllArgsProcessedThread.SetApartmentState(ApartmentState.STA)
|
||||||
|
AllArgsProcessedThread.Start()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Thread.Sleep(1000)
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione di esecuzione del singolo processo che comunica con il programma
|
||||||
|
Private Sub ThreadFunction(ThreadIndex As Integer)
|
||||||
|
Dim MyThreadData As New ThreadData
|
||||||
|
m_ThreadDataList(ThreadIndex) = MyThreadData
|
||||||
|
'Dim CurrThreadStat As New ThreadStat(ThreadIndex, DateTime.Now)
|
||||||
|
'HistoryThreadDataList.Add(CurrThreadStat)
|
||||||
|
'MyThreadData.SetThreadStat(CurrThreadStat)
|
||||||
|
'Dim sDrive As String = "c" ' If(ThreadIndex Mod 2 = 0, "A", "B")
|
||||||
|
'Dim sCurrDdfDir As String = sDrive & ":\EgtData\WebDoor\Ddf"
|
||||||
|
'Dim stopWatch As New Stopwatch()
|
||||||
|
'Dim lExeTime As Long = 0
|
||||||
|
'Dim lOtherTime As Long = 0
|
||||||
|
|
||||||
|
' avvio processo
|
||||||
|
Dim Proc As Process = New Process()
|
||||||
|
Proc.StartInfo.FileName = m_sProcessFileName
|
||||||
|
Proc.StartInfo.RedirectStandardInput = True
|
||||||
|
Proc.StartInfo.RedirectStandardOutput = True
|
||||||
|
Proc.StartInfo.Arguments = ThreadIndex.ToString() & " " & m_sProcessArguments
|
||||||
|
Proc.StartInfo.UseShellExecute = False
|
||||||
|
Proc.StartInfo.CreateNoWindow = True
|
||||||
|
AddHandler Proc.OutputDataReceived, AddressOf Thread_OutputDataReceived
|
||||||
|
|
||||||
|
If Proc.Start() Then
|
||||||
|
'Dim CurrPocStat As New ProcStat(DateTime.Now)
|
||||||
|
'CurrThreadStat.ProcExecutionList.Add(CurrPocStat)
|
||||||
|
Proc.BeginOutputReadLine()
|
||||||
|
MyThreadData.SetProcess(Proc)
|
||||||
|
MyThreadData.SetProcessStatus(ProcessStatuses.NULL)
|
||||||
|
|
||||||
|
'Dim nProc0Wait As Integer = 0
|
||||||
|
' ciclo per leggere coda ed eseguire
|
||||||
|
While Not m_bStopProcess AndAlso Not Proc.HasExited
|
||||||
|
Select Case MyThreadData.ProcessStatus
|
||||||
|
Case ThreadData.ProcessStatuses.NULL
|
||||||
|
'MyThreadData.SetThreadOperation(ThreadOperations.WaitingData)
|
||||||
|
' se c'e' qualcosa da processare
|
||||||
|
'Dim nNumTaskToProcess As Integer = 0
|
||||||
|
'If ThreadIndex = 0 Then
|
||||||
|
' nNumTaskToProcess = currWDC.numTask2proc
|
||||||
|
' If nNumTaskToProcess > 0 Then
|
||||||
|
' If Not m_bCheckOrder Then m_bCheckOrder = True
|
||||||
|
' Else
|
||||||
|
' If m_bCheckOrder Then m_bCheckOrder = False
|
||||||
|
' Thread.Sleep(100)
|
||||||
|
' End If
|
||||||
|
'ElseIf m_bCheckOrder Then
|
||||||
|
' nNumTaskToProcess = currWDC.numTask2proc
|
||||||
|
' If nNumTaskToProcess = 0 Then
|
||||||
|
' m_bCheckOrder = False
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
Dim NextProcessArgs As ProcessArgs = Nothing
|
||||||
|
If Not IsNothing(m_delGetNextProcessArgs) Then
|
||||||
|
NextProcessArgs = m_delGetNextProcessArgs()
|
||||||
|
Else
|
||||||
|
NextProcessArgs = ArgumentsDequeue()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not IsNothing(NextProcessArgs) AndAlso NextProcessArgs.nId > 0 AndAlso Not String.IsNullOrWhiteSpace(NextProcessArgs.sArgs) Then
|
||||||
|
If Not IsNothing(m_delPreProcess) Then
|
||||||
|
NextProcessArgs = m_delPreProcess(NextProcessArgs)
|
||||||
|
End If
|
||||||
|
MyThreadData.SetCurrRequest(NextProcessArgs)
|
||||||
|
Proc.StandardInput.WriteLine(ThreadIndex & "," & NextProcessArgs.sArgs)
|
||||||
|
MyThreadData.SetProcessStatus(ThreadData.ProcessStatuses.WAITINGANSWER)
|
||||||
|
End If
|
||||||
|
'If m_bCheckOrder Then
|
||||||
|
' Dim LastRequest As Dictionary(Of String, CalcReqtDTO) = currWDC.queueList(1)
|
||||||
|
' If LastRequest.Count > 0 Then
|
||||||
|
' MyThreadData.SetThreadOperation(ThreadOperations.FoundRequest)
|
||||||
|
|
||||||
|
' Dim ConvItem As KeyValuePair(Of String, String)
|
||||||
|
' ConvItem = New KeyValuePair(Of String, String)(LastRequest.First().Key, LastRequest.First().Value.DDF)
|
||||||
|
' MyThreadData.SetCurrRequest(ConvItem)
|
||||||
|
|
||||||
|
' ' vecchia versione
|
||||||
|
' 'MyThreadData.SetCurrRequest(LastRequest.First())
|
||||||
|
|
||||||
|
' Dim Item As KeyValuePair(Of String, String) = MyThreadData.CurrRequest
|
||||||
|
' Dim bOk As Boolean = Not IsNothing(Item)
|
||||||
|
' If bOk Then
|
||||||
|
|
||||||
|
' ' avvio cronometro
|
||||||
|
' 'stopWatch.Reset()
|
||||||
|
' stopWatch.Restart()
|
||||||
|
' ' svuoto vecchio set file della porta richiesta
|
||||||
|
' Dim fileList As String() = Directory.GetFiles(sCurrDdfDir, Item.Key + ".*")
|
||||||
|
' ' elimino vecchi
|
||||||
|
' If Not IsNothing(fileList) Then
|
||||||
|
' For Each sFile In fileList
|
||||||
|
' Try
|
||||||
|
' File.Delete(sFile)
|
||||||
|
' Catch ex As Exception
|
||||||
|
' End Try
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' ' scrivo ddf
|
||||||
|
' MyThreadData.SetThreadOperation(ThreadOperations.WritingDdf)
|
||||||
|
' MyThreadData.SetDdfPath(sCurrDdfDir & "\" & Item.Key & ".ddf")
|
||||||
|
' Dim sDdfPath As String = MyThreadData.sDdfPath
|
||||||
|
' Try
|
||||||
|
' File.WriteAllText(sDdfPath, Item.Value)
|
||||||
|
' Catch ex As Exception
|
||||||
|
' bOk = False
|
||||||
|
' End Try
|
||||||
|
|
||||||
|
' If bOk Then
|
||||||
|
' MyThreadData.SetThreadOperation(ThreadOperations.ProcessingDdf)
|
||||||
|
|
||||||
|
' Proc.StandardInput.WriteLine(ThreadIndex & "," & sDdfPath)
|
||||||
|
|
||||||
|
' MyThreadData.SetWaitProcAnswer(ThreadData.ProcComm.WaitingAnswer)
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
' Thread.Sleep(100)
|
||||||
|
' End If
|
||||||
|
'Else
|
||||||
|
' Thread.Sleep(100)
|
||||||
|
'End If
|
||||||
|
Case ThreadData.ProcessStatuses.WAITINGANSWER
|
||||||
|
Thread.Sleep(10)
|
||||||
|
Case ThreadData.ProcessStatuses.ANSWERRECEIVED
|
||||||
|
Dim NewProcessArgsResult As New ProcessArgsResult(MyThreadData.CurrRequest, MyThreadData.nProcResult)
|
||||||
|
If Not IsNothing(m_delPostProcess) Then
|
||||||
|
m_delPostProcess(NewProcessArgsResult)
|
||||||
|
End If
|
||||||
|
ArgumentsResultEnqueue(NewProcessArgsResult)
|
||||||
|
'Dim Item As ProcessArgs = MyThreadData.CurrRequest
|
||||||
|
'Dim sDdfPath As String = MyThreadData.sDdfPath
|
||||||
|
'Dim bOk As Boolean = True
|
||||||
|
'' salvo exe time...
|
||||||
|
'stopWatch.Stop()
|
||||||
|
'lExeTime = stopWatch.ElapsedMilliseconds
|
||||||
|
'stopWatch.Restart()
|
||||||
|
'Dim procResults As New List(Of CalcResultDTO)
|
||||||
|
'Dim currRes As New CalcResultDTO
|
||||||
|
'Dim fContent As String = ""
|
||||||
|
'MyThreadData.SetThreadOperation(ThreadOperations.ReadingSvg)
|
||||||
|
'' verifico esistenza file svg e lo carico
|
||||||
|
'bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "svg"), fContent)
|
||||||
|
'' !!! ToDo: inserire TIPO di richiesta secondo quanto ricevuto....
|
||||||
|
'' invio risposta
|
||||||
|
'currRes.Validated = MyThreadData.nProcResult = 0 AndAlso bOk
|
||||||
|
'currRes.DoorIdVers = Item.Key
|
||||||
|
'' per ora cablato a svg, prendere da MimeType richiesta...
|
||||||
|
'currRes.MimeType = "svg"
|
||||||
|
|
||||||
|
'' se NON fosse validato --> messo il messaggio...
|
||||||
|
'If (currRes.Validated) Then
|
||||||
|
' currRes.RawContent = fContent
|
||||||
|
'Else
|
||||||
|
' bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "txt"), fContent)
|
||||||
|
' currRes.ErrorMsg = fContent
|
||||||
|
'End If
|
||||||
|
'MyThreadData.SetThreadOperation(ThreadOperations.SendResult)
|
||||||
|
|
||||||
|
'procResults.Add(currRes)
|
||||||
|
'Dim respPut As String = currWDC.SendProcResults(procResults)
|
||||||
|
|
||||||
|
'stopWatch.Stop()
|
||||||
|
'lOtherTime = stopWatch.ElapsedMilliseconds
|
||||||
|
'CurrPocStat.IncrementDoneRequest()
|
||||||
|
'' aggiorno thread display...
|
||||||
|
'UpdateThreadList(Item.Key, lExeTime, lOtherTime)
|
||||||
|
'' cambio nomi file generati in old
|
||||||
|
'Dim OldSvg As String = Path.ChangeExtension(sDdfPath, "svg")
|
||||||
|
'Dim NewSvg As String = Path.GetDirectoryName(sDdfPath) & "\" & Path.GetFileNameWithoutExtension(sDdfPath) & "_old.svg"
|
||||||
|
'Try
|
||||||
|
' File.Delete(NewSvg)
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Delete(Path.ChangeExtension(NewSvg, "txt"))
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Delete(Path.ChangeExtension(NewSvg, "log"))
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Delete(Path.ChangeExtension(NewSvg, "nge"))
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Delete(Path.ChangeExtension(NewSvg, "ddf"))
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Move(OldSvg, NewSvg)
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Move(Path.ChangeExtension(OldSvg, "txt"), Path.ChangeExtension(NewSvg, "txt"))
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Move(Path.ChangeExtension(OldSvg, "log"), Path.ChangeExtension(NewSvg, "log"))
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Move(Path.ChangeExtension(OldSvg, "nge"), Path.ChangeExtension(NewSvg, "nge"))
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
'Try
|
||||||
|
' File.Move(Path.ChangeExtension(OldSvg, "ddf"), Path.ChangeExtension(NewSvg, "ddf"))
|
||||||
|
'Catch ex As Exception
|
||||||
|
'End Try
|
||||||
|
MyThreadData.SetProcessStatus(ThreadData.ProcessStatuses.NULL)
|
||||||
|
End Select
|
||||||
|
|
||||||
|
End While
|
||||||
|
' CurrPocStat.SetStopProc(DateTime.Now)
|
||||||
|
If m_bStopProcess Then
|
||||||
|
Proc.StandardInput.WriteLine("quit")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' CurrThreadStat.SetStopThread(DateTime.Now)
|
||||||
|
MyThreadData.SetProcess(Nothing)
|
||||||
|
' MyThreadData.SetThreadOperation(ThreadOperations.Closed)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Thread_OutputDataReceived(sender As Object, e As DataReceivedEventArgs)
|
||||||
|
Dim sResult As String = e.Data
|
||||||
|
If Not String.IsNullOrWhiteSpace(sResult) AndAlso sResult.StartsWith("#42315#,") Then
|
||||||
|
Dim Results() As String = sResult.Split(","c)
|
||||||
|
If Results.Count >= 2 Then
|
||||||
|
Dim nIndex As Integer = -1
|
||||||
|
Dim nResult As Integer = -1
|
||||||
|
Dim dResult As Integer = -1
|
||||||
|
If Integer.TryParse(Results(1), nIndex) AndAlso nIndex >= 0 Then
|
||||||
|
If Integer.TryParse(Results(2), nResult) AndAlso nResult >= 0 Then
|
||||||
|
m_ThreadDataList(nIndex).SetProcResult(nResult)
|
||||||
|
ElseIf StringToDouble(Results(2), dResult) AndAlso dResult >= 0 Then
|
||||||
|
nResult = Math.Floor(dResult)
|
||||||
|
m_ThreadDataList(nIndex).SetProcResult(nResult)
|
||||||
|
End If
|
||||||
|
m_ThreadDataList(nIndex).SetProcessStatus(ThreadData.ProcessStatuses.ANSWERRECEIVED)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class ThreadData
|
||||||
|
|
||||||
|
'Enum ThreadOperations As Integer
|
||||||
|
' WaitingData = 1
|
||||||
|
' FoundRequest = 2
|
||||||
|
' WritingDdf = 3
|
||||||
|
' ProcessingDdf = 4
|
||||||
|
' ReadingSvg = 5
|
||||||
|
' SendResult = 6
|
||||||
|
' Closed = 10
|
||||||
|
'End Enum
|
||||||
|
|
||||||
|
Public Enum ProcessStatuses As Integer
|
||||||
|
NULL = 0
|
||||||
|
WAITINGANSWER = 1
|
||||||
|
ANSWERRECEIVED = 2
|
||||||
|
TOBESTARTED = 10
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_ProcessStatus As ProcessStatuses = ProcessStatuses.TOBESTARTED
|
||||||
|
Public ReadOnly Property ProcessStatus As ProcessStatuses
|
||||||
|
Get
|
||||||
|
Return m_ProcessStatus
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetProcessStatus(value As ProcessStatuses)
|
||||||
|
m_ProcessStatus = value
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_CurrRequest As ProcessArgs
|
||||||
|
Public ReadOnly Property CurrRequest As ProcessArgs
|
||||||
|
Get
|
||||||
|
Return m_CurrRequest
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetCurrRequest(value As ProcessArgs)
|
||||||
|
m_CurrRequest = value
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Private m_sDdfPath As String
|
||||||
|
'Public ReadOnly Property sDdfPath As String
|
||||||
|
' Get
|
||||||
|
' Return m_sDdfPath
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
'Friend Sub SetDdfPath(value As String)
|
||||||
|
' m_sDdfPath = value
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
Private m_nProcResult As Integer
|
||||||
|
Public ReadOnly Property nProcResult As Integer
|
||||||
|
Get
|
||||||
|
Return m_nProcResult
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetProcResult(value As Integer)
|
||||||
|
m_nProcResult = value
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Private m_ThreadOperation As ThreadOperations
|
||||||
|
'Public ReadOnly Property ThreadOperation As ThreadOperations
|
||||||
|
' Get
|
||||||
|
' Return m_ThreadOperation
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
'Friend Sub SetThreadOperation(value As ThreadOperations)
|
||||||
|
' m_ThreadOperation = value
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
Private m_Process As Process
|
||||||
|
Public ReadOnly Property Process As Process
|
||||||
|
Get
|
||||||
|
Return m_Process
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetProcess(value As Process)
|
||||||
|
m_Process = value
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Private m_ThreadStat As ThreadStat
|
||||||
|
'Public ReadOnly Property ThreadStat As ThreadStat
|
||||||
|
' Get
|
||||||
|
' Return m_ThreadStat
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
'Friend Sub SetThreadStat(value As ThreadStat)
|
||||||
|
' m_ThreadStat = value
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class ProcessArgs
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sArgs As String
|
||||||
|
Public ReadOnly Property sArgs As String
|
||||||
|
Get
|
||||||
|
Return m_sArgs
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sArgs As String)
|
||||||
|
m_nId = nId
|
||||||
|
m_sArgs = sArgs
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class ProcessArgsResult
|
||||||
|
|
||||||
|
Private m_ProcessArgs As ProcessArgs
|
||||||
|
Public ReadOnly Property ProcessArgs As ProcessArgs
|
||||||
|
Get
|
||||||
|
Return m_ProcessArgs
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nResult As Integer
|
||||||
|
Public ReadOnly Property nResult As Integer
|
||||||
|
Get
|
||||||
|
Return m_nResult
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Sub SetResult(nResult As Integer)
|
||||||
|
m_nResult = nResult
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(ProcessArgs As ProcessArgs, nResult As Integer)
|
||||||
|
m_ProcessArgs = ProcessArgs
|
||||||
|
m_nResult = nResult
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
Imports System.Globalization
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Public Module GenInterface
|
||||||
|
|
||||||
|
'-------------------------------- IniFile : Get --------------------------------------------------
|
||||||
|
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode)>
|
||||||
|
Public Function GetPrivateProfileInt(
|
||||||
|
lpAppName As String,
|
||||||
|
lpKeyName As String,
|
||||||
|
nDefault As Integer,
|
||||||
|
lpFileName As String) As Integer
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetPrivateProfileDouble(
|
||||||
|
lpAppName As String,
|
||||||
|
lpKeyName As String,
|
||||||
|
dDefault As Double,
|
||||||
|
lpFileName As String) As Double
|
||||||
|
Dim sValue As String = String.Empty
|
||||||
|
GetPrivateProfileString(lpAppName, lpKeyName, dDefault.ToString(), sValue, lpFileName)
|
||||||
|
Dim nPos As Integer = sValue.IndexOf(";")
|
||||||
|
If nPos >= 0 Then
|
||||||
|
sValue = sValue.Remove(nPos)
|
||||||
|
End If
|
||||||
|
Dim dValue As Double
|
||||||
|
If Not Double.TryParse(sValue, NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, dValue) Then
|
||||||
|
dValue = dDefault
|
||||||
|
End If
|
||||||
|
Return dValue
|
||||||
|
End Function
|
||||||
|
|
||||||
|
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode)>
|
||||||
|
Private Function GetPrivateProfileString(
|
||||||
|
lpAppName As String,
|
||||||
|
lpKeyName As String,
|
||||||
|
lpDefault As String,
|
||||||
|
lpReturnedString As StringBuilder,
|
||||||
|
nSize As Integer,
|
||||||
|
lpFileName As String) As Integer
|
||||||
|
End Function
|
||||||
|
Public Function GetPrivateProfileString(
|
||||||
|
lpAppName As String,
|
||||||
|
lpKeyName As String,
|
||||||
|
lpDefault As String,
|
||||||
|
ByRef lpString As String,
|
||||||
|
lpFileName As String) As Integer
|
||||||
|
Dim sb As New StringBuilder(1024)
|
||||||
|
Dim nRet As Integer = GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, sb, sb.Capacity, lpFileName)
|
||||||
|
lpString = sb.ToString
|
||||||
|
Return nRet
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'-------------------------------- IniFile : Write ------------------------------------------------
|
||||||
|
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode)>
|
||||||
|
Public Function WritePrivateProfileString(
|
||||||
|
lpAppName As String,
|
||||||
|
lpKeyName As String,
|
||||||
|
lpString As String,
|
||||||
|
lpFileName As String) As Boolean
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'-------------------------------- Windows --------------------------------------------------------
|
||||||
|
Public Enum SW As Integer
|
||||||
|
HIDE = 0
|
||||||
|
SHOWMAXIMIZED = 3
|
||||||
|
RESTORE = 9
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
<DllImport("user32.dll")>
|
||||||
|
Public Function ShowWindow(hWnd As IntPtr, nCmdShow As Integer) As Boolean
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
|
||||||
|
Public Structure IdNameStruct
|
||||||
|
|
||||||
|
Private m_Id As Integer
|
||||||
|
Public Property Id As Integer
|
||||||
|
Get
|
||||||
|
Return m_Id
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_Id = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Name As String
|
||||||
|
Public Property Name As String
|
||||||
|
Get
|
||||||
|
Return m_Name
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Name = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(Id As Integer, Name As String)
|
||||||
|
m_Id = Id
|
||||||
|
m_Name = Name
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Function ToString() As String
|
||||||
|
Return Name
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IndFromId(Id As Integer, List As ObservableCollection(Of IdNameStruct)) As Integer
|
||||||
|
For i = 0 To List.Count - 1
|
||||||
|
If List(i).Id = Id Then Return i
|
||||||
|
Next
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
Public Shared Function IndFromId(Id As Integer, List As List(Of IdNameStruct)) As Integer
|
||||||
|
For i = 0 To List.Count - 1
|
||||||
|
If List(i).Id = Id Then Return i
|
||||||
|
Next
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IdFromInd(Ind As Integer, List As ObservableCollection(Of IdNameStruct)) As Integer
|
||||||
|
Return List(Ind).Id
|
||||||
|
End Function
|
||||||
|
Public Shared Function IdFromInd(Ind As Integer, List As List(Of IdNameStruct)) As Integer
|
||||||
|
Return List(Ind).Id
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IndFromId(Id As Integer, List As ObservableCollection(Of Object)) As Integer
|
||||||
|
For i = 0 To List.Count - 1
|
||||||
|
If TypeOf (List(i)) Is IdNameStruct AndAlso DirectCast(List(i), IdNameStruct).Id = Id Then
|
||||||
|
Return i
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
Public Shared Function IndFromId(Id As Integer, List As List(Of Object)) As Integer
|
||||||
|
For i = 0 To List.Count - 1
|
||||||
|
If TypeOf (List(i)) Is IdNameStruct AndAlso DirectCast(List(i), IdNameStruct).Id = Id Then
|
||||||
|
Return i
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IdFromInd(Ind As Integer, List As ObservableCollection(Of Object)) As Integer
|
||||||
|
If TypeOf (List(Ind)) Is IdNameStruct Then
|
||||||
|
Return DirectCast(List(Ind), IdNameStruct).Id
|
||||||
|
End If
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
Public Shared Function IdFromInd(Ind As Integer, List As List(Of Object)) As Integer
|
||||||
|
If TypeOf (List(Ind)) Is IdNameStruct Then
|
||||||
|
Return DirectCast(List(Ind), IdNameStruct).Id
|
||||||
|
End If
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IdFromName(Name As String, List As ObservableCollection(Of Object)) As Integer
|
||||||
|
For i = 0 To List.Count - 1
|
||||||
|
If DirectCast(List(i), IdNameStruct).Name = Name Then Return DirectCast(List(i), IdNameStruct).Id
|
||||||
|
Next
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
Public Shared Function IdFromName(Name As String, List As List(Of Object)) As Integer
|
||||||
|
For i = 0 To List.Count - 1
|
||||||
|
If DirectCast(List(i), IdNameStruct).Name = Name Then Return DirectCast(List(i), IdNameStruct).Id
|
||||||
|
Next
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Structure
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' EgalTech 2017-2017
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' File : IniFile.vb Data : 08.05.24 Versione : 2.6e1
|
||||||
|
' Contenuto : Modulo IniFile per gestione lettura/scrittura da file INI.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'
|
||||||
|
' Modifiche : 08.05.24 ES Creazione modulo.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
|
||||||
|
Public Module IniFile
|
||||||
|
|
||||||
|
Private m_sPath As String
|
||||||
|
Public ReadOnly Property sPath As String
|
||||||
|
Get
|
||||||
|
Return m_sPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetIniFile(sPath)
|
||||||
|
m_sPath = sPath
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function GetPluginPrivateProfileInt(IpAppName As String, IpKeyName As String, nDefault As Integer) As Integer
|
||||||
|
Return GetPrivateProfileInt(IpAppName, IpKeyName, nDefault, m_sPath)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetPluginPrivateProfileDouble(IpAppName As String, IpKeyName As String, dDefault As Double) As Double
|
||||||
|
Return GetPrivateProfileDouble(IpAppName, IpKeyName, dDefault, m_sPath)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetPluginPrivateProfileString(IpAppName As String, IpKeyName As String, IpDefault As String, ByRef IpString As String) As Integer
|
||||||
|
Return GetPrivateProfileString(IpAppName, IpKeyName, IpDefault, IpString, m_sPath)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Public Function GetPrivateProfileLanguage(lpAppName As String, lpKeyName As String, lpFileName As String) As Language
|
||||||
|
' Dim sVal As String = String.Empty
|
||||||
|
' GetPrivateProfileString(lpAppName, lpKeyName, "", sVal, lpFileName)
|
||||||
|
' Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||||
|
' If sItems.Count() = 2 Then
|
||||||
|
' Return New Language(sItems(0), sItems(1))
|
||||||
|
' End If
|
||||||
|
' Return Nothing
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
'Public Function GetMainPrivateProfileLanguage(lpAppName As String, lpKeyName As String) As Language
|
||||||
|
' Dim sVal As String = String.Empty
|
||||||
|
' GetMainPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||||
|
' Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||||
|
' If sItems.Count() = 2 Then
|
||||||
|
' Return New Language(sItems(0), sItems(1))
|
||||||
|
' End If
|
||||||
|
' Return Nothing
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
Public Function WritePluginPrivateProfileString(IpAppName As String, IpKeyName As String, ByRef IpString As String) As Boolean
|
||||||
|
Return WritePrivateProfileString(IpAppName, IpKeyName, IpString, m_sPath)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,308 @@
|
|||||||
|
Imports System.Globalization
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
Imports Newtonsoft.Json.Converters
|
||||||
|
Imports Effector.Plugin.StoneCut.Door
|
||||||
|
Imports Effector.Plugin.Lib
|
||||||
|
|
||||||
|
Public Class JsonDoor
|
||||||
|
|
||||||
|
Private m_nListIndex As Integer
|
||||||
|
Public ReadOnly Property nListIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_nListIndex
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nTable As Integer
|
||||||
|
Public ReadOnly Property nTable As Integer
|
||||||
|
Get
|
||||||
|
Return m_nTable
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sFileName As String
|
||||||
|
Public Property sFileName As String
|
||||||
|
Get
|
||||||
|
Return m_sFileName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sFileName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dFileDimension As Double
|
||||||
|
Public Property dFileDimension As Double
|
||||||
|
Get
|
||||||
|
Return m_dFileDimension
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_dFileDimension = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nState As PartProgramStates = PartProgramStates.NULL
|
||||||
|
<JsonProperty>
|
||||||
|
<JsonConverter(GetType(StringEnumConverter))>
|
||||||
|
Public ReadOnly Property nState As PartProgramStates
|
||||||
|
Get
|
||||||
|
Return m_nState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Statistics"
|
||||||
|
|
||||||
|
Private m_dtMachiningStart As DateTime = DateTime.MinValue
|
||||||
|
Public ReadOnly Property dtMachiningStart As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtMachiningStart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachiningEnd As DateTime = DateTime.MinValue
|
||||||
|
Public ReadOnly Property dtMachiningEnd As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtMachiningEnd
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Statistics
|
||||||
|
|
||||||
|
<JsonConstructor>
|
||||||
|
Sub New(nId As Integer, sFileName As String, nTable As Integer, dFileDimension As Double)
|
||||||
|
m_nId = nId
|
||||||
|
m_sFileName = sFileName
|
||||||
|
m_nTable = nTable
|
||||||
|
m_dFileDimension = dFileDimension
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(nListIndex As Integer, Door As Door)
|
||||||
|
m_nListIndex = nListIndex
|
||||||
|
m_nId = Door.nId
|
||||||
|
m_sFileName = Door.sFileName
|
||||||
|
m_nTable = Door.nTable
|
||||||
|
m_dFileDimension = Door.dFileDimension
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class JsonLuaDoor
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_nId As Integer = -1
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nCircIndex As Integer = -1
|
||||||
|
Public ReadOnly Property nCircIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_nCircIndex
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nState As Integer = 0
|
||||||
|
Public ReadOnly Property nState As Integer
|
||||||
|
Get
|
||||||
|
Return m_nState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_DoorStateList As New List(Of IdNameStruct)({New IdNameStruct(0, "Not On Machine"),
|
||||||
|
New IdNameStruct(1, "Imported"),
|
||||||
|
New IdNameStruct(2, "On Load"),
|
||||||
|
New IdNameStruct(3, "On Machine 1"),
|
||||||
|
New IdNameStruct(4, "On Medium Station"),
|
||||||
|
New IdNameStruct(6, "On Machine 2"),
|
||||||
|
New IdNameStruct(7, "On Unload"),
|
||||||
|
New IdNameStruct(8, "Produced"),
|
||||||
|
New IdNameStruct(100, "Scrap")})
|
||||||
|
Public ReadOnly Property DoorStateList As List(Of IdNameStruct)
|
||||||
|
Get
|
||||||
|
Return m_DoorStateList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelDoorState As IdNameStruct
|
||||||
|
Public Property SelDoorState As IdNameStruct
|
||||||
|
Get
|
||||||
|
Return m_SelDoorState
|
||||||
|
End Get
|
||||||
|
Set(value As IdNameStruct)
|
||||||
|
m_SelDoorState = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sDoorCode As String = ""
|
||||||
|
Public ReadOnly Property sDoorCode As String
|
||||||
|
Get
|
||||||
|
Return m_sDoorCode
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sDoorDescription As String = ""
|
||||||
|
Public ReadOnly Property sDoorDescription As String
|
||||||
|
Get
|
||||||
|
Return m_sDoorDescription
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sDDFName As String = ""
|
||||||
|
Public ReadOnly Property sDDFName As String
|
||||||
|
Get
|
||||||
|
Return m_sDDFName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sCSVName As String = ""
|
||||||
|
Public ReadOnly Property sCSVName As String
|
||||||
|
Get
|
||||||
|
Return m_sCSVName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sM1CNPath As String = ""
|
||||||
|
Public ReadOnly Property sM1CNPath As String
|
||||||
|
Get
|
||||||
|
Return m_sM1CNPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sM2CNPath As String = ""
|
||||||
|
Public ReadOnly Property sM2CNPath As String
|
||||||
|
Get
|
||||||
|
Return m_sM2CNPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtLoadTime As DateTime
|
||||||
|
Public ReadOnly Property sLoadTime As String
|
||||||
|
Get
|
||||||
|
Return m_dtLoadTime.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property dtLoadTime As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtLoadTime
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachining1Start As DateTime
|
||||||
|
Public ReadOnly Property sMachining1Start As String
|
||||||
|
Get
|
||||||
|
Return m_dtMachining1Start.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property dtMachining1Start As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtMachining1Start
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachining1End As DateTime
|
||||||
|
Public ReadOnly Property sMachining1End As String
|
||||||
|
Get
|
||||||
|
Return m_dtMachining1End.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property dtMachining1End As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtMachining1End
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachining2Start As DateTime
|
||||||
|
Public ReadOnly Property sMachining2Start As String
|
||||||
|
Get
|
||||||
|
Return m_dtMachining2Start.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property dtMachining2Start As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtMachining2Start
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtMachining2End As DateTime
|
||||||
|
Public ReadOnly Property sMachining2End As String
|
||||||
|
Get
|
||||||
|
Return m_dtMachining2End.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property dtMachining2End As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtMachining2End
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dtUnloadTime As DateTime
|
||||||
|
Public ReadOnly Property sUnloadTime As String
|
||||||
|
Get
|
||||||
|
Return m_dtUnloadTime.ToString("yy/MM/dd HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property dtUnloadTime As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtUnloadTime
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<JsonConstructor>
|
||||||
|
Sub New(nId As Integer, nCircIndex As Integer, nState As Integer, sDoorCode As String, sDoorDescription As String, sDDFName As String, sCSVName As String,
|
||||||
|
sM1CNPath As String, sM2CNPath As String, nLoadTime As Long, nMachining1Start As Long, nMachining1End As Long, nMachining2Start As Long,
|
||||||
|
nMachining2End As Long, nUnloadTime As Long)
|
||||||
|
m_nId = nId
|
||||||
|
m_nCircIndex = nCircIndex
|
||||||
|
m_nState = nState
|
||||||
|
m_sDoorCode = sDoorCode
|
||||||
|
m_sDoorDescription = sDoorDescription
|
||||||
|
m_sDDFName = sDDFName
|
||||||
|
m_sCSVName = sCSVName
|
||||||
|
m_sM1CNPath = sM1CNPath
|
||||||
|
m_sM2CNPath = sM2CNPath
|
||||||
|
m_dtLoadTime = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(nLoadTime).ToLocalTime()
|
||||||
|
m_dtMachining1Start = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(nMachining1Start).ToLocalTime()
|
||||||
|
m_dtMachining1End = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(nMachining1End).ToLocalTime()
|
||||||
|
m_dtMachining2Start = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(nMachining2Start).ToLocalTime()
|
||||||
|
m_dtMachining2End = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(nMachining2End).ToLocalTime()
|
||||||
|
m_dtUnloadTime = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(nUnloadTime).ToLocalTime()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(Door As Door)
|
||||||
|
m_nId = Door.nId
|
||||||
|
m_nCircIndex = 0
|
||||||
|
m_nState = 0
|
||||||
|
m_sDDFName = Door.sFileName
|
||||||
|
'm_sCSVName = Door.sCSVName
|
||||||
|
m_sM1CNPath = ""
|
||||||
|
m_sM2CNPath = ""
|
||||||
|
m_dtLoadTime = DateTime.MinValue
|
||||||
|
m_dtMachining1Start = DateTime.MinValue
|
||||||
|
m_dtMachining1End = DateTime.MinValue
|
||||||
|
m_dtMachining2Start = DateTime.MinValue
|
||||||
|
m_dtMachining2End = DateTime.MinValue
|
||||||
|
m_dtUnloadTime = DateTime.MinValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub Update(JsonLuaDoor As JsonLuaDoor)
|
||||||
|
m_nCircIndex = JsonLuaDoor.m_nCircIndex
|
||||||
|
m_nState = JsonLuaDoor.m_nState
|
||||||
|
m_sM1CNPath = JsonLuaDoor.m_sM1CNPath
|
||||||
|
m_sM2CNPath = JsonLuaDoor.m_sM2CNPath
|
||||||
|
m_dtLoadTime = JsonLuaDoor.m_dtLoadTime
|
||||||
|
m_dtMachining1Start = JsonLuaDoor.m_dtMachining1Start
|
||||||
|
m_dtMachining1End = JsonLuaDoor.m_dtMachining1End
|
||||||
|
m_dtMachining2Start = JsonLuaDoor.m_dtMachining2Start
|
||||||
|
m_dtMachining2End = JsonLuaDoor.m_dtMachining2End
|
||||||
|
m_dtUnloadTime = JsonLuaDoor.m_dtUnloadTime
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,473 @@
|
|||||||
|
Imports Effector.Plugin.Interface
|
||||||
|
|
||||||
|
Module Map
|
||||||
|
|
||||||
|
Private m_refFiveLakesUIVM As FiveLakesUIVM
|
||||||
|
Private m_refDoorListPageVM As DoorListPageVM
|
||||||
|
Private m_refMachinePageVM As MachinePageVM
|
||||||
|
Private m_refSupervisorFunction As IHost
|
||||||
|
|
||||||
|
'Private m_refMyStatusBarVM As MyStatusBarVM
|
||||||
|
'Private m_refProjManagerVM As ProjManagerVM
|
||||||
|
'Private m_refProjectVM As ProjectVM
|
||||||
|
'Private m_refSecondaryWindowVM As SecondaryWindowVM
|
||||||
|
'Private m_refSecondaryWindowV As SecondaryWindowV
|
||||||
|
'Private m_refMachinePanelVM As MachinePanelVM
|
||||||
|
'Private m_refLeftPanelVM As LeftPanelVM
|
||||||
|
'Private m_refRightPanelVM As RightPanelVM
|
||||||
|
'Private m_refDispositionPanelVM As DispositionPanelVM
|
||||||
|
'Private m_refStartMachPanelVM As StartMachPanelVM
|
||||||
|
'Private m_refRibPanelVM As RibPanelVM
|
||||||
|
'Private m_refControllerInputPanelVM As ControllerInputPanelVM
|
||||||
|
'Private m_refInstrumentPanelVM As InstrumentPanelVM
|
||||||
|
'Private m_refTopPanelVM As TopPanelVM
|
||||||
|
'Private m_refSliceManagerVM As SliceManagerVM
|
||||||
|
'Private m_refTFSEditorVM As TFSEditorVM
|
||||||
|
'Private m_refCurrMachiningPanelVM As CurrMachiningPanelVM
|
||||||
|
'Private m_refMachiningDbVM As MachiningDbVM
|
||||||
|
'Private m_refMaterialDbVM As MaterialDbVM
|
||||||
|
'Private m_refSliderManagerVM As SliderManagerVM
|
||||||
|
'Private m_refRibParamPanelVM As RibParamPanelVM
|
||||||
|
'Private m_refSimulationPanelVM As SimulationPanelVM
|
||||||
|
'Private m_refReferencePanelVM As ReferencePanelVM
|
||||||
|
'Private m_refViewLayerManagerVM As ViewLayerManagerVM
|
||||||
|
'Private m_refShellNumberPanelVM As ShellNumberPanelVM
|
||||||
|
'Private m_refShellNumberParamPanelVM As ShellNumberParamPanelVM
|
||||||
|
'Private m_refFilledSolidPanelVM As FilledSolidPanelVM
|
||||||
|
'Private m_refFilledSolidParamPanelVM As FilledSolidParamPanelVM
|
||||||
|
'Private m_refSplashScreen As SplashScreen
|
||||||
|
'Private m_refManagePartPanelVM As ManagePartPanelVM
|
||||||
|
'Private m_refMachineViewPanelVM As MachineViewPanelVM
|
||||||
|
'Private m_refImportLoadingWndVM As ImportLoadingWndVM
|
||||||
|
|
||||||
|
#Region "Get"
|
||||||
|
|
||||||
|
Public ReadOnly Property refFiveLakesUIVM As FiveLakesUIVM
|
||||||
|
Get
|
||||||
|
Return m_refFiveLakesUIVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property refDoorListPageVM As DoorListPageVM
|
||||||
|
Get
|
||||||
|
Return m_refDoorListPageVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property refMachinePageVM As MachinePageVM
|
||||||
|
Get
|
||||||
|
Return m_refMachinePageVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property refSupervisorFunction As IHost
|
||||||
|
Get
|
||||||
|
Return m_refSupervisorFunction
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refMyStatusBarVM As MyStatusBarVM
|
||||||
|
' Get
|
||||||
|
' Return LibMap.refStatusBarVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refProjManagerVM As ProjManagerVM
|
||||||
|
' Get
|
||||||
|
' Return m_refProjManagerVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refProjectVM As ProjectVM
|
||||||
|
' Get
|
||||||
|
' Return m_refProjectVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refSceneHostVM As MySceneHostVM
|
||||||
|
' Get
|
||||||
|
' Return LibMap.refSceneHostVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refSecondaryWindowVM As SecondaryWindowVM
|
||||||
|
' Get
|
||||||
|
' Return m_refSecondaryWindowVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
'Public ReadOnly Property refSecondaryWindowV As SecondaryWindowV
|
||||||
|
' Get
|
||||||
|
' Return m_refSecondaryWindowV
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refShowPanelVM As ShowPanelVM
|
||||||
|
' Get
|
||||||
|
' Return LibMap.refShowPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refMachinePanelVM As MachinePanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refMachinePanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refLeftPanelVM As LeftPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refLeftPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refRightPanelVM As RightPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refRightPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refDispositionPanelVM As DispositionPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refDispositionPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refStartMachPanelVM As StartMachPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refStartMachPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refRibPanelVM As RibPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refRibPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refControllerInputPanelVM As ControllerInputPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refControllerInputPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refInstrumentPanelVM As MyInstrumentPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refInstrumentPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refTopPanelVM As TopPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refTopPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refSliceManagerVM As SliceManagerVM
|
||||||
|
' Get
|
||||||
|
' Return m_refSliceManagerVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refTFSEditorVM As TFSEditorVM
|
||||||
|
' Get
|
||||||
|
' Return m_refTFSEditorVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refCurrMachiningPanelVM As CurrMachiningPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refCurrMachiningPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refMachiningDbVM As MachiningDbVM
|
||||||
|
' Get
|
||||||
|
' Return m_refMachiningDbVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refMaterialDbVM As MaterialDbVM
|
||||||
|
' Get
|
||||||
|
' Return m_refMaterialDbVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refSliderManagerVM As SliderManagerVM
|
||||||
|
' Get
|
||||||
|
' Return m_refSliderManagerVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refRibParamPanelVM As RibParamPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refRibParamPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refSimulationPanelVM As SimulationPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refSimulationPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refReferencePanelVM As ReferencePanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refReferencePanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refViewLayerManagerVM As ViewLayerManagerVM
|
||||||
|
' Get
|
||||||
|
' Return m_refViewLayerManagerVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refShellNumberPanelVM As ShellNumberPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refShellNumberPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refShellNumberParamPanelVM As ShellNumberParamPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refShellNumberParamPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refFilledSolidPanelVM As FilledSolidPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refFilledSolidPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refFilledSolidParamPanelVM As FilledSolidParamPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refFilledSolidParamPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refSplashScreen As SplashScreen
|
||||||
|
' Get
|
||||||
|
' Return m_refSplashScreen
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refManagePartPanelVM As ManagePartPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refManagePartPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refMachineViewPanelVM As MachineViewPanelVM
|
||||||
|
' Get
|
||||||
|
' Return m_refMachineViewPanelVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Public ReadOnly Property refImportLoadingWndVM As ImportLoadingWndVM
|
||||||
|
' Get
|
||||||
|
' Return m_refImportLoadingWndVM
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
#End Region ' Get
|
||||||
|
|
||||||
|
#Region "Set"
|
||||||
|
|
||||||
|
Friend Function SetRefSupervisorFunction(IHost As IHost) As Boolean
|
||||||
|
m_refSupervisorFunction = IHost
|
||||||
|
Return Not IsNothing(m_refSupervisorFunction)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function SetRefDoorListPageVM(DoorListPageVM As DoorListPageVM) As Boolean
|
||||||
|
m_refDoorListPageVM = DoorListPageVM
|
||||||
|
Return Not IsNothing(m_refDoorListPageVM)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function SetRefMachinePageVM(MachinePageVM As MachinePageVM) As Boolean
|
||||||
|
m_refMachinePageVM = MachinePageVM
|
||||||
|
Return Not IsNothing(m_refMachinePageVM)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefProjManagerVM(ProjManagerVM As ProjManagerVM) As Boolean
|
||||||
|
' m_refProjManagerVM = ProjManagerVM
|
||||||
|
' Return Not IsNothing(m_refProjManagerVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
|
||||||
|
' m_refProjectVM = ProjectVM
|
||||||
|
' Return Not IsNothing(m_refProjectVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
|
||||||
|
' LibMap.SetRefSceneHostVM(SceneHostVM)
|
||||||
|
' Return Not IsNothing(LibMap.refSceneHostVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefSecondaryWindowVM(SecondaryWindowVM As SecondaryWindowVM) As Boolean
|
||||||
|
' m_refSecondaryWindowVM = SecondaryWindowVM
|
||||||
|
' Return Not IsNothing(m_refSecondaryWindowVM)
|
||||||
|
' End Function
|
||||||
|
' Friend Function SetRefSecondaryWindowV(SecondaryWindowV As SecondaryWindowV) As Boolean
|
||||||
|
' m_refSecondaryWindowV = SecondaryWindowV
|
||||||
|
' Return Not IsNothing(m_refSecondaryWindowV)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
|
||||||
|
' m_refMachinePanelVM = MachinePanelVM
|
||||||
|
' Return Not IsNothing(m_refMachinePanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefLeftPanelVM(LeftPanelVM As LeftPanelVM) As Boolean
|
||||||
|
' m_refLeftPanelVM = LeftPanelVM
|
||||||
|
' Return Not IsNothing(m_refLeftPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefRightPanelVM(RightPanelVM As RightPanelVM) As Boolean
|
||||||
|
' m_refRightPanelVM = RightPanelVM
|
||||||
|
' Return Not IsNothing(m_refRightPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefDispositionPanelVM(DispositionPanelVM As DispositionPanelVM) As Boolean
|
||||||
|
' m_refDispositionPanelVM = DispositionPanelVM
|
||||||
|
' Return Not IsNothing(m_refDispositionPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefStartMachPanelVM(StartMachPanelVM As StartMachPanelVM) As Boolean
|
||||||
|
' m_refStartMachPanelVM = StartMachPanelVM
|
||||||
|
' Return Not IsNothing(m_refStartMachPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefRibPanelVM(RibPanelVM As RibPanelVM) As Boolean
|
||||||
|
' m_refRibPanelVM = RibPanelVM
|
||||||
|
' Return Not IsNothing(m_refRibPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefControllerInputPanelVM(ControllerInputPanelVM As ControllerInputPanelVM) As Boolean
|
||||||
|
' m_refControllerInputPanelVM = ControllerInputPanelVM
|
||||||
|
' Return Not IsNothing(m_refControllerInputPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefInstrumentPanelVM(InstrumentPanelVM As InstrumentPanelVM) As Boolean
|
||||||
|
' m_refInstrumentPanelVM = InstrumentPanelVM
|
||||||
|
' Return Not IsNothing(m_refInstrumentPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefTopPanelVM(TopPanelVM As TopPanelVM) As Boolean
|
||||||
|
' m_refTopPanelVM = TopPanelVM
|
||||||
|
' Return Not IsNothing(m_refTopPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefSliceManagerVM(SliceManagerVM As SliceManagerVM) As Boolean
|
||||||
|
' m_refSliceManagerVM = SliceManagerVM
|
||||||
|
' Return Not IsNothing(m_refSliceManagerVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefTFSEditorVM(TFSEditorVM As TFSEditorVM) As Boolean
|
||||||
|
' m_refTFSEditorVM = TFSEditorVM
|
||||||
|
' Return Not IsNothing(m_refTFSEditorVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefCurrMachiningPanelVM(CurrMachiningPanelVM As CurrMachiningPanelVM) As Boolean
|
||||||
|
' m_refCurrMachiningPanelVM = CurrMachiningPanelVM
|
||||||
|
' Return Not IsNothing(m_refCurrMachiningPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefMachiningDbVM(MachiningDbVM As MachiningDbVM) As Boolean
|
||||||
|
' m_refMachiningDbVM = MachiningDbVM
|
||||||
|
' Return Not IsNothing(m_refMachiningDbVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefMaterialDbVM(MaterialDbVM As MaterialDbVM) As Boolean
|
||||||
|
' m_refMaterialDbVM = MaterialDbVM
|
||||||
|
' Return Not IsNothing(m_refMaterialDbVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefSliderManagerVM(SliderManagerVM As SliderManagerVM) As Boolean
|
||||||
|
' m_refSliderManagerVM = SliderManagerVM
|
||||||
|
' Return Not IsNothing(m_refSliderManagerVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefRibParamPanelVM(RibParamPanelVM As RibParamPanelVM) As Boolean
|
||||||
|
' m_refRibParamPanelVM = RibParamPanelVM
|
||||||
|
' Return Not IsNothing(m_refRibParamPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefSimulationPanelVM(SimulationPanelVM As SimulationPanelVM) As Boolean
|
||||||
|
' m_refSimulationPanelVM = SimulationPanelVM
|
||||||
|
' Return Not IsNothing(m_refSimulationPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefReferencePanelVM(ReferencePanelVM As ReferencePanelVM) As Boolean
|
||||||
|
' m_refReferencePanelVM = ReferencePanelVM
|
||||||
|
' Return Not IsNothing(m_refReferencePanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefViewLayerManagerVM(ViewLayerManagerVM As ViewLayerManagerVM) As Boolean
|
||||||
|
' m_refViewLayerManagerVM = ViewLayerManagerVM
|
||||||
|
' Return Not IsNothing(m_refViewLayerManagerVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefShellNumberPanelVM(ShellNumberPanelVM As ShellNumberPanelVM) As Boolean
|
||||||
|
' m_refShellNumberPanelVM = ShellNumberPanelVM
|
||||||
|
' Return Not IsNothing(m_refShellNumberPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefShellNumberParamPanelVM(ShellNumberParamPanelVM As ShellNumberParamPanelVM) As Boolean
|
||||||
|
' m_refShellNumberParamPanelVM = ShellNumberParamPanelVM
|
||||||
|
' Return Not IsNothing(m_refShellNumberParamPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefFilledSolidPanelVM(FilledSolidPanelVM As FilledSolidPanelVM) As Boolean
|
||||||
|
' m_refFilledSolidPanelVM = FilledSolidPanelVM
|
||||||
|
' Return Not IsNothing(m_refFilledSolidPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefFilledSolidParamPanelVM(FilledSolidParamPanelVM As FilledSolidParamPanelVM) As Boolean
|
||||||
|
' m_refFilledSolidParamPanelVM = FilledSolidParamPanelVM
|
||||||
|
' Return Not IsNothing(m_refFilledSolidParamPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefSplashScreen(SplashScreen As SplashScreen) As Boolean
|
||||||
|
' m_refSplashScreen = SplashScreen
|
||||||
|
' Return Not IsNothing(m_refSplashScreen)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefManagePartPanelVM(ManagePartPanelVM As ManagePartPanelVM) As Boolean
|
||||||
|
' m_refManagePartPanelVM = ManagePartPanelVM
|
||||||
|
' Return Not IsNothing(m_refManagePartPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefMachineViewPanelVM(MachineViewPanelVM As MachineViewPanelVM) As Boolean
|
||||||
|
' m_refMachineViewPanelVM = MachineViewPanelVM
|
||||||
|
' Return Not IsNothing(m_refMachineViewPanelVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Friend Function SetRefImportLoadingWndVM(ImportLoadingWndVM As ImportLoadingWndVM) As Boolean
|
||||||
|
' m_refImportLoadingWndVM = ImportLoadingWndVM
|
||||||
|
' Return Not IsNothing(m_refImportLoadingWndVM)
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
#End Region ' Set
|
||||||
|
|
||||||
|
#Region "Init"
|
||||||
|
|
||||||
|
Friend Function BeginInit(FiveLakesUIVM As FiveLakesUIVM) As Boolean
|
||||||
|
m_refFiveLakesUIVM = FiveLakesUIVM
|
||||||
|
Return Not IsNothing(m_refFiveLakesUIVM)
|
||||||
|
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_refFiveLakesUIVM)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' Init
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
Imports System.Globalization
|
||||||
|
|
||||||
|
Public Module StringConversion
|
||||||
|
|
||||||
|
Public Function DoubleToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
|
||||||
|
Dim sFormat As String = "F" + Math.Abs(nNumDec).ToString()
|
||||||
|
Dim sVal As String = dVal.ToString(sFormat, CultureInfo.InvariantCulture)
|
||||||
|
If nNumDec > 0 Then
|
||||||
|
Return sVal.TrimEnd("0".ToCharArray()).TrimEnd(".".ToCharArray)
|
||||||
|
Else
|
||||||
|
Return sVal
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function StringToDouble(ByVal sVal As String, ByRef dVal As Double) As Boolean
|
||||||
|
' Return EgtLuaEvalNumExpr(sVal, dVal)
|
||||||
|
Return Double.TryParse(sVal, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, dVal)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Public Function StringToDoubleAdv(ByVal sVal As String, ByRef dVal As Double, Optional bEval As Boolean = False) As Boolean
|
||||||
|
' If bEval Then
|
||||||
|
' Return EgtLuaEvalNumExpr(sVal, dVal)
|
||||||
|
' Else
|
||||||
|
' Return Double.TryParse(sVal, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, dVal)
|
||||||
|
' End If
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
Public Function StringToInt(sVal As String, ByRef nVal As Integer) As Boolean
|
||||||
|
Dim dVal As Double = 0
|
||||||
|
If Not StringToDouble(sVal, dVal) Then Return False
|
||||||
|
nVal = CInt(Math.Round(dVal))
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Public Function LenToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
|
||||||
|
' Return DoubleToString(EgtToUiUnits(dVal), nNumDec)
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
'Public Function StringToLen(ByVal sVal As String, ByRef dVal As Double) As Boolean
|
||||||
|
' If EgtLuaEvalNumExpr(sVal, dVal) Then
|
||||||
|
' dVal = EgtFromUiUnits(dVal)
|
||||||
|
' Return True
|
||||||
|
' Else
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
'Public Function StringToLenAdv(ByVal sVal As String, ByRef dVal As Double, Optional bEval As Boolean = False) As Boolean
|
||||||
|
' If bEval Then
|
||||||
|
' If EgtLuaEvalNumExpr(sVal, dVal) Then
|
||||||
|
' dVal = EgtFromUiUnits(dVal)
|
||||||
|
' Return True
|
||||||
|
' Else
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
' If Double.TryParse(sVal, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, dVal) Then
|
||||||
|
' dVal = EgtFromUiUnits(dVal)
|
||||||
|
' Return True
|
||||||
|
' Else
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
Imports System.ComponentModel
|
||||||
|
|
||||||
|
Public Class VMBase
|
||||||
|
Implements INotifyPropertyChanged
|
||||||
|
|
||||||
|
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
|
||||||
|
|
||||||
|
Public Sub NotifyPropertyChanged(propName As String)
|
||||||
|
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="KeraLua" version="1.4.1" targetFramework="net472" />
|
||||||
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||||
|
</packages>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
param([string]$ProjectDir, [string]$ProjectPath);
|
||||||
|
|
||||||
|
Copy-Item -Path c:\EgtProg\Effector\Effector*.exe $ProjectDir\..\Exe
|
||||||