- Primo rilascio su git

This commit is contained in:
Emmanuele Sassi
2022-06-10 15:53:41 +02:00
parent 77b6e876ba
commit dc89bd7383
233 changed files with 9531 additions and 0 deletions
+330
View File
@@ -0,0 +1,330 @@
# ---> VisualStudio
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# ---> C Sharp
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
.ionide/symbolCache.db
+25
View File
@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32002.261
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "3dPrintApp", "3dPrintApp/3dPrintApp.vbproj", "{BCDE0368-2C69-4948-8723-D0FE71417986}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x64.ActiveCfg = Debug|x64
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x64.Build.0 = Debug|x64
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x64.ActiveCfg = Release|x64
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {81E51533-B864-460A-ABD4-ADD1566CCDE0}
EndGlobalSection
EndGlobal
+25
View File
@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32002.261
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "3dPrintApp", "3dPrintApp.vbproj", "{BCDE0368-2C69-4948-8723-D0FE71417986}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x64.ActiveCfg = Debug|x64
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x64.Build.0 = Debug|x64
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x64.ActiveCfg = Release|x64
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {81E51533-B864-460A-ABD4-ADD1566CCDE0}
EndGlobalSection
EndGlobal
+336
View File
@@ -0,0 +1,336 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BCDE0368-2C69-4948-8723-D0FE71417986}</ProjectGuid>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
<OutputType>WinExe</OutputType>
<RootNamespace>_3dPrintApp</RootNamespace>
<AssemblyName>3dPrintApp</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Debug\</OutputPath>
<DocumentationFile>3dPrintApp.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Release\</OutputPath>
<DocumentationFile>3dPrintApp.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="EgtUILib">
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
</Reference>
<Reference Include="EgtWPFLib5">
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
</Reference>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System.Net.Http" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="Application.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Constants\ConstBeam.vb" />
<Compile Include="Constants\ConstColumns.vb" />
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
<Compile Include="Constants\ConstDims.vb" />
<Compile Include="Constants\ConstGen.vb" />
<Compile Include="Constants\ConstIni.vb" />
<Compile Include="Constants\ConstMachComm.vb" />
<Compile Include="Constants\ConstMachIni.vb" />
<Compile Include="Constants\ConstMsg.vb" />
<Compile Include="CurrLayerSlider\CurrLayerSliderV.xaml.vb">
<DependentUpon>CurrLayerSliderV.xaml</DependentUpon>
</Compile>
<Compile Include="CurrLayerSlider\CurrLayerSliderVM.vb" />
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="InstrumentPanel\MyInstrumentPanelVM.vb" />
<Compile Include="LeftPanel\LeftPanelV.xaml.vb">
<DependentUpon>LeftPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="LeftPanel\LeftPanelVM.vb" />
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
<DependentUpon>MachinePanelV.xaml</DependentUpon>
</Compile>
<Compile Include="MachinePanel\MachinePanelVM.vb" />
<Compile Include="Project\ProjectV.xaml.vb">
<DependentUpon>ProjectV.xaml</DependentUpon>
</Compile>
<Compile Include="Project\ProjectVM.vb" />
<Compile Include="ProjManager\ProjManagerV.xaml.vb">
<DependentUpon>ProjManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="ProjManager\ProjManagerVM.vb" />
<Compile Include="SceneHost\MySceneHostVM.vb" />
<Compile Include="SceneHost\SceneHostV.xaml.vb">
<DependentUpon>SceneHostV.xaml</DependentUpon>
</Compile>
<Compile Include="SecondaryWindow\SecondaryWindowV.xaml.vb">
<DependentUpon>SecondaryWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="SecondaryWindow\SecondaryWindowVM.vb" />
<Compile Include="ShowPanel\ShowPanelV.xaml.vb">
<DependentUpon>ShowPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-3dPrinting\Printing3DPanelV.xaml.vb">
<DependentUpon>Printing3DPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-3dPrinting\Printing3DPanelVM.vb" />
<Compile Include="Special-3dPrinting\Printing3DUtility.vb" />
<Compile Include="StatusBar\MyStatusBarVM.vb" />
<Compile Include="StatusBar\StatusBarV.xaml.vb">
<DependentUpon>StatusBarV.xaml</DependentUpon>
</Compile>
<Compile Include="TopPanel\TopPanelV.xaml.vb">
<DependentUpon>TopPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="TopPanel\TopPanelVM.vb" />
<Compile Include="Utility\CurrentMachine.vb" />
<Compile Include="Utility\Dictionary.xaml.vb">
<DependentUpon>Dictionary.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\DisableModifiedMgr.vb" />
<Compile Include="Utility\Map.vb" />
<Compile Include="Utility\MyMachine.vb" />
<Compile Include="ViewModel\MaterialVM.vb" />
<Compile Include="ViewModel\Print3dLayerVM.vb" />
<Compile Include="ViewModel\Print3dPartVM.vb" />
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
<DependentUpon>ViewPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ViewPanel\ViewPanelVM.vb" />
<Page Include="CurrLayerSlider\CurrLayerSliderV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="InstrumentPanel\InstrumentPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="LeftPanel\LeftPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MachinePanel\MachinePanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="Application.xaml.vb">
<DependentUpon>Application.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.vb">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="MainWindow\MainWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Project\ProjectV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ProjManager\ProjManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SceneHost\SceneHostV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SecondaryWindow\SecondaryWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ShowPanel\ShowPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-3dPrinting\Printing3DPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="StatusBar\StatusBarV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="TopPanel\TopPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Utility\Dictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ViewPanel\ViewPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Import Include="System.Threading.Tasks" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows" />
<Import Include="System.Windows.Controls" />
<Import Include="System.Windows.Data" />
<Import Include="System.Windows.Documents" />
<Import Include="System.Windows.Input" />
<Import Include="System.Windows.Shapes" />
<Import Include="System.Windows.Media" />
<Import Include="System.Windows.Media.Imaging" />
<Import Include="System.Windows.Navigation" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindow\MainWindowM.vb" />
<Compile Include="MainWindow\MainWindowV.xaml.vb">
<DependentUpon>MainWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow\MainWindowVM.vb" />
<Compile Include="My Project\AssemblyInfo.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="My Project\MyExtensions\MyWpfExtension.vb">
<VBMyExtensionTemplateID>Microsoft.VisualBasic.WPF.MyExtension</VBMyExtensionTemplateID>
<VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
</EmbeddedResource>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtBEAMWALL.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ProjectManager\ExportProject.png" />
<Resource Include="Resources\ProjectManager\GoToProd.png" />
<Resource Include="Resources\ProjectManager\GoToProj.png" />
<Resource Include="Resources\ProjectManager\ImportBTL.png" />
<Resource Include="Resources\ProjectManager\ImportProject.png" />
<Resource Include="Resources\ProjectManager\New.png" />
<Resource Include="Resources\ProjectManager\Open.png" />
<Resource Include="Resources\ProjectManager\Options.png" />
<Resource Include="Resources\ProjectManager\Save.png" />
<Resource Include="Resources\ProjectManager\SaveAs.png" />
<Resource Include="Resources\ProjectManager\UpdateBTL.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ProjectManager\Import.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ProjectManager\Send.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ViewPanel\LookFromBACK.png" />
<Resource Include="Resources\ViewPanel\LookFromBOTTOM.png" />
<Resource Include="Resources\ViewPanel\LookFromFRONT.png" />
<Resource Include="Resources\ViewPanel\LookFromISO_NE.png" />
<Resource Include="Resources\ViewPanel\LookFromISO_NW.png" />
<Resource Include="Resources\ViewPanel\LookFromISO_SE.png" />
<Resource Include="Resources\ViewPanel\LookFromISO_SW.png" />
<Resource Include="Resources\ViewPanel\LookFromLEFT.png" />
<Resource Include="Resources\ViewPanel\LookFromRIGHT.png" />
<Resource Include="Resources\ViewPanel\LookFromTOP.png" />
<Resource Include="Resources\ViewPanel\ZoomAll.png" />
<Resource Include="Resources\ViewPanel\ZoomIn.png" />
<Resource Include="Resources\ViewPanel\ZoomOut.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ShowPanel\CurveDir.png" />
<Resource Include="Resources\ShowPanel\RenderingHL.png" />
<Resource Include="Resources\ShowPanel\RenderingSH.png" />
<Resource Include="Resources\ShowPanel\RenderingWF.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\InstrumentPanel\Analyze.png" />
<Resource Include="Resources\InstrumentPanel\ChangeParam.png" />
<Resource Include="Resources\InstrumentPanel\GetDist.png" />
<Resource Include="Resources\InstrumentPanel\Statistics.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\3dPrintApp\3dPrintAppR64.exe
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\3dPrintApp\3dPrintAppD64.exe</PostBuildEvent>
</PropertyGroup>
</Project>
+52
View File
@@ -0,0 +1,52 @@
<Window x:Class="AboutBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<Border BorderThickness="2" BorderBrush="LightBlue">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="2.5*"/>
<RowDefinition Height="0.35*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.35*"/>
</Grid.RowDefinitions>
<Grid Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1" Background="White">
<Image Source="/Resources/AboutBoxImage.png" Stretch="Uniform"/>
</Border>
</Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" />
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="12" />
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Margin="100,0"/>
</Grid>
</Border>
</Window>
@@ -0,0 +1,37 @@
Imports EgtUILib
Public Class AboutBoxV
Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Me.Owner = Application.Current.MainWindow
DescriptionLbl.Text = My.Application.Info.Description.ToString()
VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() &
"." & My.Application.Info.Version.Minor.ToString() &
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString()
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
Dim sInfo As String = String.Empty
Dim sKey As String = String.Empty
EgtGetKeyInfo(sKey)
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
Dim sLeftDays As String = ""
Dim nLeftDays As Integer
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" (" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() & ")" & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
Dim sCPU As String = String.Empty
EgtGetCpuInfo( sCPU)
sInfo &= sCPU & Environment.NewLine
Dim sScene As String = String.Empty
EgtGetSceneInfo(sScene)
sInfo &= sScene
InfoLbl.Text = sInfo
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
End Sub
End Class
+275
View File
@@ -0,0 +1,275 @@
' Follow steps 1a or 1b and then 2 to use this custom control in a XAML file.
'
' Step 1a) Using this custom control in a XAML file that exists in the current project.
' Add this XmlNamespace attribute to the root element of the markup file where it is
' to be used:
'
' xmlns:MyNamespace="clr-namespace:_3dPrintApp"
'
'
' Step 1b) Using this custom control in a XAML file that exists in a different project.
' Add this XmlNamespace attribute to the root element of the markup file where it is
' to be used:
'
' xmlns:MyNamespace="clr-namespace:_3dPrintApp;assembly=_3dPrintApp"
'
' You will also need to add a project reference from the project where the XAML file lives
' to this project and Rebuild to avoid compilation errors:
'
' Right click on the target project in the Solution Explorer and
' "Add Reference"->"Projects"->[Browse to and select this project]
'
'
' Step 2)
' Go ahead and use your control in the XAML file. Note that Intellisense in the
' XML editor does not currently work on custom controls and its child elements.
'
' <MyNamespace:AirspacePopup/>
'
Imports System.Windows.Controls.Primitives
Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Runtime.InteropServices
Imports System.Windows
Imports System.Windows.Input
Imports System.Windows.Interop
Public Class AirspacePopup
Inherits Popup
Public Shared ReadOnly IsTopmostProperty As DependencyProperty = DependencyProperty.Register("IsTopmost", GetType(Boolean), GetType(AirspacePopup), New FrameworkPropertyMetadata(False, AddressOf OnIsTopmostChanged))
Public Shared ReadOnly FollowPlacementTargetProperty As DependencyProperty = DependencyProperty.RegisterAttached("FollowPlacementTarget", GetType(Boolean), GetType(AirspacePopup), New UIPropertyMetadata(False))
Public Shared ReadOnly AllowOutsideScreenPlacementProperty As DependencyProperty = DependencyProperty.RegisterAttached("AllowOutsideScreenPlacement", GetType(Boolean), GetType(AirspacePopup), New UIPropertyMetadata(False))
Public Shared ReadOnly ParentWindowProperty As DependencyProperty = DependencyProperty.RegisterAttached("ParentWindow", GetType(Window), GetType(AirspacePopup), New UIPropertyMetadata(Nothing, AddressOf ParentWindowPropertyChanged))
Private Shared Sub OnIsTopmostChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
Dim airspacePopup As AirspacePopup = TryCast(source, AirspacePopup)
airspacePopup.SetTopmostState(airspacePopup.IsTopmost)
End Sub
Private Shared Sub ParentWindowPropertyChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
Dim airspacePopup As AirspacePopup = TryCast(source, AirspacePopup)
airspacePopup.ParentWindowChanged()
End Sub
Private m_appliedTopMost As Boolean?
Private m_alreadyLoaded As Boolean
Private m_parentWindow As Window
Shared Sub New()
'This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class.
'This style is defined in themes\generic.xaml
DefaultStyleKeyProperty.OverrideMetadata(GetType(AirspacePopup), New FrameworkPropertyMetadata(GetType(AirspacePopup)))
End Sub
Public Sub New()
AddHandler Loaded, AddressOf OnPopupLoaded
AddHandler Unloaded, AddressOf OnPopupUnloaded
Dim descriptor As DependencyPropertyDescriptor = DependencyPropertyDescriptor.FromProperty(PlacementTargetProperty, GetType(AirspacePopup))
descriptor.AddValueChanged(Me, AddressOf PlacementTargetChanged)
End Sub
Public Property IsTopmost As Boolean
Get
Return CBool(GetValue(IsTopmostProperty))
End Get
Set(ByVal value As Boolean)
SetValue(IsTopmostProperty, value)
End Set
End Property
Public Property FollowPlacementTarget As Boolean
Get
Return CBool(GetValue(FollowPlacementTargetProperty))
End Get
Set(ByVal value As Boolean)
SetValue(FollowPlacementTargetProperty, value)
End Set
End Property
Public Property AllowOutsideScreenPlacement As Boolean
Get
Return CBool(GetValue(AllowOutsideScreenPlacementProperty))
End Get
Set(ByVal value As Boolean)
SetValue(AllowOutsideScreenPlacementProperty, value)
End Set
End Property
Public Property ParentWindow As Window
Get
Return CType(GetValue(ParentWindowProperty), Window)
End Get
Set(ByVal value As Window)
SetValue(ParentWindowProperty, value)
End Set
End Property
Private Sub ParentWindowChanged()
If ParentWindow IsNot Nothing Then
AddHandler ParentWindow.LocationChanged, Function(sender, e2)
UpdatePopupPosition()
End Function
AddHandler ParentWindow.SizeChanged, Function(sender, e2)
UpdatePopupPosition()
End Function
End If
End Sub
Private Sub PlacementTargetChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim placementTarget As FrameworkElement = TryCast(Me.PlacementTarget, FrameworkElement)
If placementTarget IsNot Nothing Then
AddHandler placementTarget.SizeChanged, Function(sender2, e2)
UpdatePopupPosition()
End Function
End If
End Sub
Private Sub UpdatePopupPosition()
Dim placementTarget As FrameworkElement = TryCast(Me.PlacementTarget, FrameworkElement)
Dim child As FrameworkElement = TryCast(Me.Child, FrameworkElement)
If PresentationSource.FromVisual(placementTarget) IsNot Nothing AndAlso AllowOutsideScreenPlacement = True Then
Dim leftOffset As Double = CutLeft(placementTarget)
Dim topOffset As Double = CutTop(placementTarget)
Dim rightOffset As Double = CutRight(placementTarget)
Dim bottomOffset As Double = CutBottom(placementTarget)
Debug.WriteLine(bottomOffset)
Me.Width = Math.Max(0, Math.Min(leftOffset, rightOffset) + placementTarget.ActualWidth)
Me.Height = Math.Max(0, Math.Min(topOffset, bottomOffset) + placementTarget.ActualHeight)
If child IsNot Nothing Then
child.Margin = New Thickness(leftOffset, topOffset, rightOffset, bottomOffset)
End If
End If
If FollowPlacementTarget = True Then
Me.HorizontalOffset += 0.01
Me.HorizontalOffset -= 0.01
End If
End Sub
Private Function CutLeft(ByVal placementTarget As FrameworkElement) As Double
Dim point As Point = placementTarget.PointToScreen(New Point(0, placementTarget.ActualWidth))
Return Math.Min(0, point.X)
End Function
Private Function CutTop(ByVal placementTarget As FrameworkElement) As Double
Dim point As Point = placementTarget.PointToScreen(New Point(placementTarget.ActualHeight, 0))
Return Math.Min(0, point.Y)
End Function
Private Function CutRight(ByVal placementTarget As FrameworkElement) As Double
Dim point As Point = placementTarget.PointToScreen(New Point(0, placementTarget.ActualWidth))
point.X += placementTarget.ActualWidth
Return Math.Min(0, SystemParameters.VirtualScreenWidth - (Math.Max(SystemParameters.VirtualScreenWidth, point.X)))
End Function
Private Function CutBottom(ByVal placementTarget As FrameworkElement) As Double
Dim point As Point = placementTarget.PointToScreen(New Point(placementTarget.ActualHeight, 0))
point.Y += placementTarget.ActualHeight
Return Math.Min(0, SystemParameters.VirtualScreenHeight - (Math.Max(SystemParameters.VirtualScreenHeight, point.Y)))
End Function
Private Sub OnPopupLoaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
If m_alreadyLoaded Then Return
m_alreadyLoaded = True
If Child IsNot Nothing Then
Child.[AddHandler](PreviewMouseLeftButtonDownEvent, New MouseButtonEventHandler(AddressOf OnChildPreviewMouseLeftButtonDown), True)
End If
m_parentWindow = Window.GetWindow(Me)
If m_parentWindow Is Nothing Then Return
AddHandler m_parentWindow.Activated, AddressOf OnParentWindowActivated
AddHandler m_parentWindow.Deactivated, AddressOf OnParentWindowDeactivated
End Sub
Private Sub OnPopupUnloaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
If m_parentWindow Is Nothing Then Return
RemoveHandler m_parentWindow.Activated, AddressOf OnParentWindowActivated
RemoveHandler m_parentWindow.Deactivated, AddressOf OnParentWindowDeactivated
End Sub
Private Sub OnParentWindowActivated(ByVal sender As Object, ByVal e As EventArgs)
SetTopmostState(True)
End Sub
Private Sub OnParentWindowDeactivated(ByVal sender As Object, ByVal e As EventArgs)
If IsTopmost = False Then
SetTopmostState(IsTopmost)
End If
End Sub
Private Sub OnChildPreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
SetTopmostState(True)
If Not m_parentWindow.IsActive AndAlso IsTopmost = False Then
m_parentWindow.Activate()
End If
End Sub
Protected Overrides Sub OnOpened(ByVal e As EventArgs)
SetTopmostState(IsTopmost)
MyBase.OnOpened(e)
End Sub
Private Sub SetTopmostState(ByVal isTop As Boolean)
If m_appliedTopMost.HasValue AndAlso m_appliedTopMost = isTop Then
Return
End If
If Child Is Nothing Then Return
Dim hwndSource = TryCast((PresentationSource.FromVisual(Child)), HwndSource)
If hwndSource Is Nothing Then Return
Dim hwnd = hwndSource.Handle
Dim rect As RECT
If Not GetWindowRect(hwnd, rect) Then Return
Debug.WriteLine("setting z-order " & isTop)
If isTop Then
SetWindowPos(hwnd, HWND_TOPMOST, rect.Left, rect.Top, CInt(Width), CInt(Height), TOPMOST_FLAGS)
Else
SetWindowPos(hwnd, HWND_BOTTOM, rect.Left, rect.Top, CInt(Width), CInt(Height), TOPMOST_FLAGS)
SetWindowPos(hwnd, HWND_TOP, rect.Left, rect.Top, CInt(Width), CInt(Height), TOPMOST_FLAGS)
SetWindowPos(hwnd, HWND_NOTOPMOST, rect.Left, rect.Top, CInt(Width), CInt(Height), TOPMOST_FLAGS)
End If
m_appliedTopMost = isTop
End Sub
<StructLayout(LayoutKind.Sequential)>
Public Structure RECT
Public Left As Integer
Public Top As Integer
Public Right As Integer
Public Bottom As Integer
End Structure
<DllImport("user32.dll")>
Private Shared Function GetWindowRect(ByVal hWnd As IntPtr, <Out> ByRef lpRect As RECT) As Boolean
End Function
<DllImport("user32.dll")>
Private Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal hWndInsertAfter As IntPtr, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal uFlags As UInteger) As Boolean
End Function
Shared ReadOnly HWND_TOPMOST As IntPtr = New IntPtr(-1)
Shared ReadOnly HWND_NOTOPMOST As IntPtr = New IntPtr(-2)
Shared ReadOnly HWND_TOP As IntPtr = New IntPtr(0)
Shared ReadOnly HWND_BOTTOM As IntPtr = New IntPtr(1)
Private Const SWP_NOSIZE As UInt32 = &H1
Const SWP_NOMOVE As UInt32 = &H2
Const SWP_NOZORDER As UInt32 = &H4
Const SWP_NOREDRAW As UInt32 = &H8
Const SWP_NOACTIVATE As UInt32 = &H10
Const SWP_FRAMECHANGED As UInt32 = &H20
Const SWP_SHOWWINDOW As UInt32 = &H40
Const SWP_HIDEWINDOW As UInt32 = &H80
Const SWP_NOCOPYBITS As UInt32 = &H100
Const SWP_NOOWNERZORDER As UInt32 = &H200
Const SWP_NOSENDCHANGING As UInt32 = &H400
Const TOPMOST_FLAGS As UInt32 = SWP_NOACTIVATE Or SWP_NOOWNERZORDER Or SWP_NOSIZE Or SWP_NOMOVE Or SWP_NOREDRAW Or SWP_NOSENDCHANGING
End Class
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
+9
View File
@@ -0,0 +1,9 @@
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary Source="Utility/Dictionary.xaml"/>
</Application.Resources>
</Application>
+19
View File
@@ -0,0 +1,19 @@
Class Application
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Protected Overrides Sub OnStartup(e As StartupEventArgs)
MyBase.OnStartup(e)
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
' Creo la View principale
Me.MainWindow = New MainWindowV
' Mostro la View principale
Me.MainWindow.Show()
' inizializzo finestra interfaccia
Dim m_SceneHostWnd = New SecondaryWindowV(Application.Current.MainWindow)
m_SceneHostWnd.Owner = Me.MainWindow
m_SceneHostWnd.Show()
End Sub
End Class
+302
View File
@@ -0,0 +1,302 @@
Public Module ConstBeam
Public Enum BTLParamType As Integer
DOUBLE_ = 1
STRING_ = 2
COMBO = 3
LENGTH = 4
CHECKBOX = 5
End Enum
Public Enum BTLPartParam As Integer
NULL = 0
PDN = 1
NAM = 2
GRP = 3
End Enum
Public Enum GRPType As Integer
L = 0
T = 1
End Enum
Enum MachineType As Integer
NULL = 0
BEAM = 1
WALL = 2
BOTH = 3
End Enum
Enum CalcStates As Integer
NOTCALCULATED = -1
OK = 0
INFO = 1
WARNING = 2
ERROR_ = 3
End Enum
Public Enum Range As Integer
STANDARD = 1
EXTENDED = 2
End Enum
Public Enum PartOffset_RefSideFixClamp As Integer
INACTIVE = 0
REFSIDE1 = 1
REFSIDE2 = 2
REFSIDE3 = 3
REFSIDE4 = 4
End Enum
Public Enum ProcessingQuality As Integer
AUTOMATIC = 1
VISIBLE = 2
FAST = 3
End Enum
Public Enum Recess As Integer
AUTOMATIC = 1
MANUAL = 2
End Enum
Public Enum StoreyType As Integer
CEILING = 1
ROOF = 2
WALL = 3
End Enum
Public Enum AlignmentLocation As Integer
INACTIV = 0
BR = 1
TR = 2
BA = 3
TA = 4
HC = 5
VC = 6
AC = 7
End Enum
Public Enum AlignmentEndtype As Integer
R = 1
A = 2
D = 3
End Enum
Public Enum MaterialType As Integer
INACTIV = 0
BA = 1
CL = 2
MT = 3
ME_ = 4
GB = 5
GF = 6
IN_ = 7
SH = 8
FB = 9
PB = 10
PL = 11
End Enum
Public Enum MoveDirections As Integer
UP = -1
DOWN = 1
End Enum
Public Const BTLFEATURES_FILE_NAME As String = "BTLFeatures.ini"
'Public Const S_GENERAL As String = "General"
'Public Const K_DEBUG As String = "Debug"
' Tipo di progetto
Public Enum ProjectType As Integer
PROJ = 1
PROD = 2
End Enum
' Tipo di progetto (Beam o Wall)
Public Enum BWType As Integer
NULL = 0
BEAM = 1
WALL = 2
End Enum
Public Const PROJ As String = "PROJ"
Public Const FILENAMESEPARATOR As Char = "^"c
Public Const BTLINFO As String = "BtlInfo"
' layer per assemblato
Public Const ASSEBASE As String = "AsseBase"
' info parametri assemblato
Public Const BTL_ASSEBASE_N As String = "N"
' info parametri BTL
Public Const BTL_PRT_PROJ As String = "PROJ"
Public Const BTL_PRT_PDN As String = "PDN"
Public Const BTL_PRT_DO As String = "DO"
Public Const BTL_PRT_NAM As String = "NAM"
Public Const BTL_PRT_L As String = "L"
Public Const BTL_PRT_W As String = "W"
Public Const BTL_PRT_H As String = "H"
Public Const BTL_PRT_CNT As String = "CNT"
Public Const BTL_PRT_ADDED As String = "ADDED"
Public Const BTL_PRT_DONE As String = "DONE"
Public Const BTL_PRT_ROTATED As String = "ROTATED"
Public Const BTL_PRT_INVERTED As String = "INVERTED"
Public Const BTL_PRT_MATERIAL As String = "MATERIAL"
Public Const BTL_PRT_VOLUME As String = "VOLUME"
' parametri pezzo
Public Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
Public Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
Public Const BTL_PRT_ORDERNUM = "ORDERNUMBER"
Public Const BTL_PRT_DESIGNATION = "DESIGNATION"
Public Const BTL_PRT_ANNOTATION = "ANNOTATION"
Public Const BTL_PRT_STOREY = "STOREY"
Public Const BTL_PRT_GROUP = "GROUP"
Public Const BTL_PRT_PACKAGE = "PACKAGE"
Public Const BTL_PRT_TIMBERGRADE = "TIMBERGRADE"
Public Const BTL_PRT_QUALITYGRADE = "QUALITYGRADE"
Public Const BTL_PRT_COLOUR = "COLOUR"
Public Const BTL_PRT_PLANINGLENGTH = "PLANINGLENGTH"
Public Const BTL_PRT_STARTOFFSET = "STARTOFFSET"
Public Const BTL_PRT_ENDOFFSET = "ENDOFFSET"
Public Const BTL_PRT_UID = "UID"
Public Const BTL_PRT_TRANSFORMATION = "TRANSFORMATION"
Public Const BTL_PRT_CAMBER = "CAMBER"
Public Const BTL_PRT_PARTOFFSET = "PARTOFFSET"
Public Const BTL_PRT_PROCESSINGQUALITY = "PROCESSINGQUALITY"
Public Const BTL_PRT_RECESS = "RECESS"
Public Const BTL_PRT_STOREYTYPE = "STOREYTYPE"
Public Const BTL_PRT_ELEMENTNUM = "ELEMENTNUMBER"
Public Const BTL_PRT_LAYER = "LAYER"
Public Const BTL_PRT_MODULENUM = "MODULENUMBER"
'Friend Const BTL_PRT_USERATTRIBUTE = "USERATTRIBUTE"
Public Const BTL_PRT_COMMENT = "COMMENT"
Public Const BTL_PRT_GRAINDIR = "GRAINDIRECTION"
Public Const BTL_PRT_REFSIDE = "REFERENCESIDE"
Public Const BTL_PRT_ALIGNMENT = "ALIGNMENT"
Public Const BTL_PRT_MATERIALTYPE = "MATERIALTYPE"
' parametri generici
Public Const BTL_GEN_PROJNUM = "PROJECTNUMBER"
Public Const BTL_GEN_PROJNAME = "PROJECTNAME"
Public Const BTL_GEN_PROJPART = "PROJECTPART"
Public Const BTL_GEN_PROJGUID = "PROJECTGUID"
Public Const BTL_GEN_PROJTYPE = "PROJECTTYPE"
Public Const BTL_GEN_LISTNAME = "LISTNAME"
Public Const BTL_GEN_CUSTOMER = "CUSTOMER"
Public Const BTL_GEN_ARCHITECT = "ARCHITECT"
Public Const BTL_GEN_EDITOR = "EDITOR"
Public Const BTL_GEN_DELIVDATE = "DELIVERYDATE"
Public Const BTL_GEN_EXPDATE = "EXPORTDATE"
Public Const BTL_GEN_EXPTIME = "EXPORTTIME"
Public Const BTL_GEN_EXPRELEASE = "EXPORTRELEASE"
Public Const BTL_GEN_LANGUAGE = "LANGUAGE"
Public Const BTL_GEN_RANGE = "RANGE"
Public Const BTL_GEN_COMPUTERNAME = "COMPUTERNAME"
Public Const BTL_GEN_USER = "USER"
Public Const BTL_GEN_SRCFILE = "SOURCEFILE"
Public Const BTL_GEN_EXPFILE = "EXPORTFILE"
Public Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
Public Const PROCESSINGS As String = "Processings"
Public Const OUTLINE As String = "Outline"
Public Const BTL_FTR_GRP As String = "GRP"
Public Const BTL_FTR_PRC As String = "PRC"
Public Const BTL_FTR_DO As String = "DO"
Public Const BTL_FTR_SIDE As String = "SIDE"
Public Const BTL_FTR_NAME As String = "NAME"
Public Const BTL_FTR_DES As String = "DES"
Public Const BTL_FTR_PRID As String = "PRID"
Public Const BTL_FTR_FRAME As String = "FRAME"
Public Const BTL_FTR_MAINID As String = "MAINID"
Public Const BTL_FTR_ADJID As String = "ADJID"
Public Const BTL_FTR_AUXID As String = "AUXID"
' parametri machgroup grezzi
Public Const MGR_RPT_ID As String = "ID"
Public Const MGR_RPT_L As String = "L"
Public Const MGR_RPT_W As String = "W"
Public Const MGR_RPT_H As String = "H"
Public Const MGR_RPT_WASTE As String = "WASTE"
Public Const MGR_RPT_USAGE As String = "USAGE"
Public Const MGR_RPT_STARTCUT As String = "STARTCUT"
Public Const MGR_RPT_MATERIAL As String = "MATERIAL"
Public Const MGR_PRT_PDN As String = "PDN"
Public Const MGR_PRT_L As String = "L"
Public Const MGR_PRT_W As String = "W"
Public Const MGR_PRT_H As String = "H"
Public Const MGR_PRT_DES As String = "DES"
Public Const MGR_PRT_STARTCUT As String = "STARTCUT"
Public Const MGR_PRT_MATERIAL As String = "MATERIAL"
Public Const MGR_PRT_DO As String = "DO"
Public Const MGR_PRT_ROT As String = "ROT"
Public Const MGR_PRT_FLIP As String = "FLIP"
Public Const MGR_PRT_POSX As String = "POSX"
Public Const MGR_PRT_POSY As String = "POSY"
Public Const MGR_FTR_GRP As String = "GRP"
Public Const MGR_FTR_PRC As String = "PRC"
Public Const MGR_FTR_DO As String = "DO"
Public Const MGR_FTR_SIDE As String = "SIDE"
Public Const MGR_FTR_NAME As String = "NAME"
Public Const MGR_FTR_DES As String = "DES"
Public Const MGR_FTR_PRID As String = "PRID"
Public Const MGR_FTR_FRAME As String = "FRAME"
' parametri creazione barre
Public Const MGR_RPT_BARLEN As String = "BARLEN"
Public Const MGR_RPT_BARHEIGHT As String = "BARHEIGHT"
Public Const MGR_RPT_BARWIDTH As String = "BARWIDTH"
Public Const MGR_RPT_PANELLEN As String = "PANELLEN"
Public Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH"
Public Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
Public Const MGR_RPT_PART As String = "PART"
' parametri P per comunicazione con la macchina
Public Const MGR_RPT_PRODID As String = "PRODID"
Public Const MGR_RPT_PATTID As String = "PATTID"
' parametri errori integration
Public Const ITG_CUTID As String = "CUTID"
Public Const ITG_TASKID As String = "TASKID"
Public Const ITG_PROJ_ERR As String = "PROJ_ERR"
Public Const ITG_PROJ_MSG As String = "PROJ_MSG"
Public Const ITG_PROJ_ROT As String = "PROJ_ROT"
Public Const ITG_PROJ_FALL As String = "PROJ_FALL"
Public Const ITG_PROJ_TIME As String = "PROJ_TIME"
' parametri errori integration
Public Const ITG_PROD_ERR As String = "PROD_ERR"
Public Const ITG_PROD_MSG As String = "PROD_MSG"
Public Const ITG_PROD_ROT As String = "PROD_ROT"
Public Const ITG_PROD_FALL As String = "PROD_FALL"
Public Const ITG_PROD_TIME As String = "PROD_TIME"
' parametri blocco rot e flip
Public Const LOCK_ROT As String = "MANUALROT"
Public Const LOCK_FLIP As String = "MANUALFLIP"
' parametri errori integration
Public Const DUPLO_TODELETE As String = "DUPLO_TODELETE"
' parametri warehouse
Public Const WRH_BEAM As String = "BEAM"
Public Const WRH_WALL As String = "WALL"
Public Const WRH_CURRENT As String = "Current"
Public Const WRH_STARTOFFSET As String = "StartOffset"
Public Const WRH_OFFSET As String = "Offset"
Public Const WRH_RANGE As String = "Range"
Public Const WRH_QUANTITY As String = "Quantity"
Public Const WRH_L As String = "L"
Public Const WRH_KERF As String = "Kerf"
Public Const WRH_S As String = "S"
' parametri import/export
Public Const EXP_PROJ As String = "EXPORTPROJ"
Public Const EXP_PROD As String = "EXPORTPROD"
Public Const BTLFILENAME As String = "BTLFILENAME"
Public Const EXP_PART As String = "ImportExport"
Public Const EXP_MACHINE As String = "Machine"
End Module
+16
View File
@@ -0,0 +1,16 @@
Public Module ConstColumns
Public Const COL_DO As String = "colDO"
Public Const COL_VALUE As String = "colVALUE"
Public Const COL_CUSTOM As String = "colCUSTOM"
Public Const COL_STARTCUT As String = "colSTARTCUT"
Public Const COL_W As String = "colW"
Public Const COL_L As String = "colL"
Public Const COL_ROT As String = "colROT"
Public Const COL_FLIP As String = "colFLIP"
Public Const COL_POSX As String = "colPOSX"
Public Const COL_POSY As String = "colPOSY"
Public Const COL_OFFSET As String = "colOFFSET"
Public Const COL_REDO As String = "colREDO"
End Module
@@ -0,0 +1,34 @@
Public Module ConstDataGridColumnsIni
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.ini"
Public Const S_FEATURELIST As String = "DG_FeatureList"
Public Const S_OPENPROJFILEDLG_PROJ As String = "DG_OpenProjectFileDialog_PROJ"
Public Const S_OPENPROJFILEDLG_PROD As String = "DG_OpenProjectFileDialog_PROD"
Public Const S_RAWPARTLIST_BEAM As String = "DG_RawPartList_BEAM"
Public Const S_RAWPARTLIST_WALL As String = "DG_RawPartList_WALL"
Public Const S_PARTINRAWPARTLIST_BEAM As String = "DG_PartInRawPartList_BEAM"
Public Const S_PARTINRAWPARTLIST_WALL As String = "DG_PartInRawPartList_WALL"
Public Const S_PARAMETERLIST_P As String = "DG_ParameterList_P"
Public Const S_PARAMETERLIST_Q As String = "DG_ParameterList_Q"
Public Const S_DUPLOPARAMETERLIST_Q As String = "DG_DuploParameterList_Q"
Public Const S_RAWPARTLIST_SUPERVISOR As String = "DG_RawPartList_SUPERVISOR"
Public Const S_PARTINRAWPARTLIST_SUPERVISOR As String = "DG_PartInRawPartList_SUPERVISOR"
Public Const S_FEATUREINPARTINRAWPARTLIST_SUPERVISOR As String = "DG_FeatureInPartInRawPartList_SUPERVISOR"
Public Const S_PARTLIST As String = "DG_PartList"
Public Const S_FEATUREINPARTINRAWPARTLIST As String = "DG_FeatureInPartInRawPartList"
Public Const S_STATISTICS As String = "DG_Statistics"
Public Const S_OPTIMIZERSTATISTICS As String = "DG_OptimizerStatistics"
Public Const S_RAWPARTSTATISTICS As String = "DG_RawPartStatistics"
Public Const S_BEAMMACHININGS As String = "DG_BeamMachinings"
Public Const S_SPARAMLIST_BEAM As String = "DG_SParamList_BEAM"
Public Const S_SPARAMLIST_WALL As String = "DG_SParamList_WALL"
Public Const S_SECTXMATLIST_BEAM As String = "DG_SectXMatList_BEAM"
Public Const S_SECTXMATLIST_WALL As String = "DG_SectXMatList_WALL"
Public Const S_VARIABLESLIST As String = "DG_VariablesList"
Public Const S_MDICOMMANDS As String = "DG_MDICommands"
Public Const S_UPDATEBTLPARTLIST As String = "DG_UpdateBTLPartList"
Public Const K_LOCKTABLE As String = "LockTable"
End Module
+13
View File
@@ -0,0 +1,13 @@
Public Class ConstDims
Public Const DIMENSIONS_FILE_NAME As String = "Dimensions.ini"
Public Const PROJECT_VIEW As String = "Project_View"
Public Const PROJECT_OPTIMIZER As String = "Project_Optimizer"
Public Const LEFTPANEL_VIEW As String = "LeftPanel_View"
Public Const LEFTPANEL_OPTIMIZER As String = "LeftPanel_Optimizer"
Public Const TOPPANEL_OPTIMIZER As String = "TopPanel_Optimizer"
Public Const LEFTPANEL_SUPERVISOR As String = "LeftPanel_Supervisor"
Public Const PROJECT_SUPERVISOR As String = "Project_Supervisor"
End Class
+74
View File
@@ -0,0 +1,74 @@
'----------------------------------------------------------------------------
' EgalTech 2015-2017
'----------------------------------------------------------------------------
' File : ConstGen.vb Data : 10.04.17 Versione : 1.8d1
' Contenuto : Modulo costanti generali.
'
'
'
' Modifiche : 10.04.17 DS 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 = "3dPrintApp.lic"
Public Const S_LICENCE As String = "Licence"
Public Const K_KEY As String = "Key"
Public Const K_NESTKEY As String = "NestKey"
' Pagine del programma
Public Enum Pages As Integer
VIEW = 0
MACHINING = 1
SUPERVISOR = 2
CONFIG = 3
INPUTS = 4
OUTPUTS = 5
End Enum
' Abilitazioni licenza
Friend Enum KEY_OPT As UInteger
BASE = 1 ' Prodotto EgtCAM5
DOORS = 2
GUNSTOCK = 4
DOORCREATOR = 8 ' Prodotto DOORCreator
VIRTUALMILLING = 16
JAMBS = 32
BEAM = 64
CAD2D = 128
STEELDORS = 256
WALL = 512
_3DPRINT = 1024
End Enum
' File di log generale
Public Const GENLOG_FILE_NAME As String = "3dPrintApp#.txt"
' Sottodirettorio di configurazione
Public Const CONF_DIR As String = "Config"
' Sottodirettorio delle risorse
Public Const RES_DIR As String = "Resources"
' Sottodirettorio temporaneo
Public Const TEMP_DIR As String = "Temp"
' Sottodirettorio lavorazioni
Public Const MACHININGS_DIR As String = "Machinings"
' Sottodirettorio materiali
Public Const MATERIALS_DIR As String = "Materials"
' Sottodirettorio per lavorazioni travi
Public Const _3DPRINTING_DIR As String = "3dPrintApp"
' 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"
End Module
+105
View File
@@ -0,0 +1,105 @@
'----------------------------------------------------------------------------
' EgalTech 2015-2015
'----------------------------------------------------------------------------
' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3
' Contenuto : Modulo costanti sezione e chiavi per file Ini.
'
'
'
' Modifiche : 12.02.15 DS Creazione modulo.
'
'
'----------------------------------------------------------------------------
Public Module ConstIni
Public Const INI_FILE_NAME As String = "3dPrintApp.ini"
'Public Const S_GENERAL As String = "General"
'Public Const K_DEBUG As String = "Debug"
'Public Const K_LICENCE As String = "Licence"
'Public Const K_USERLEVEL As String = "UserLevel"
'Public Const K_MAXINST As String = "MaxInstances"
Public Const K_MAXCAMINST As String = "MaxCamInstances"
Public Const K_VIEWOPTIM_INSTANCES As String = "ViewOptimInstances"
Public Const K_SUPERVISOR_INSTANCES As String = "SupervisorInstances"
'Public Const K_COMMANDLOG As String = "CommandLog"
'Public Const K_MESSAGESDIR As String = "MessagesDir"
'Public Const K_MESSAGES As String = "Messages"
'Public Const K_WINPLACE As String = "WinPlace"
'Public Const K_LASTPROJ As String = "LastProj"
Public Const K_LASTNGEDIR As String = "LastNgeDir"
'Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
Public Const K_LASTIMPDIR As String = "LastImpDir"
Public Const K_LASTNGEXPDIR As String = "LastNgexpDir"
Public Const K_LASTUPDATEDIR As String = "LastUpdateDir"
Public Const K_PROJSINDEX As String = "ProjsIndex"
Public Const K_PRODSINDEX As String = "ProdsIndex"
'Public Const K_SUPPORT As String = "Support"
Public Const K_WAREHOUSE As String = "Warehouse"
Public Const K_DBADDRESS As String = "DbAddress"
Public Const K_DBMASTERKEY As String = "DbMasterKey"
Public Const K_UPDATEBTL As String = "UpdateBtl"
Public Const K_DATADIR As String = "DataDir"
'Public Const S_LANGUAGES As String = "Languages"
'Public Const K_LANGUAGE As String = "Language"
'Public Const S_LUA As String = "Lua"
'Public Const K_LIBSDIR As String = "LibsDir"
'Public Const K_BASELIB As String = "BaseLib"
'Public Const S_GEOMDB As String = "GeomDB"
'Public Const K_DEFAULTFONT As String = "DefaultFont"
'Public Const K_NFEFONTDIR As String = "NfeFontDir"
'Public Const K_DEFAULTCOLOR As String = "DefaultColor"
'Public Const K_SAVETYPE As String = "SaveType"
'Public Const S_OPENGL As String = "OpenGL"
'Public Const K_DOUBLEBUFFER As String = "DoubleBuffer"
'Public Const K_COLORBITS As String = "ColorBits"
'Public Const K_DEPTHBITS As String = "DepthBits"
'Public Const K_DRIVER As String = "Driver"
'Public Const S_SCENE As String = "Scene"
'Public Const K_BACKTOP As String = "BackTop"
'Public Const K_BACKBOTTOM As String = "BackBottom"
'Public Const K_SHOWGFRAME As String = "ShowGFrame"
'Public Const K_MARK As String = "Mark"
'Public Const K_SELSURF As String = "SelSurf"
'Public Const K_SHOWMODE As String = "ShowMode"
Public Const K_SHOWBUILDING As String = "ShowBuilding"
'Public Const K_CURVEDIR As String = "CurveDir"
'Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
Public Const K_LINEWIDTH As String = "LineWidth"
'Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
'Public Const K_ZOOMWIN As String = "ZoomWin"
'Public Const K_DISTLINE As String = "DistLine"
'Public Const K_MMUNITS As String = "MmUnits"
Public Const K_CUSTOMCOLORS As String = "CustomColors"
'Public Const S_GRID As String = "Grid"
'Public Const K_SHOWGRID As String = "ShowGrid"
'Public Const K_SHOWFRAME As String = "ShowFrame"
'Public Const K_SNAPSTEP As String = "SnapStep"
'Public Const K_SNAPSTEPINCH As String = "SnapStepInch"
'Public Const K_MINLINESSTEP As String = "MinLineSStep"
'Public Const K_MAJLINESSTEP As String = "MajLineSStep"
'Public Const K_EXTSSTEP As String = "ExtSStep"
'Public Const K_MINLNCOLOR As String = "MinLnColor"
'Public Const K_MAJLNCOLOR As String = "MajLnColor"
Public Const S_IMPORT As String = "Import"
Public Const K_CNCFLAG As String = "CncFlag"
'Public Const S_SIMUL As String = "Simul"
'Public Const K_SLIDERX As String = "SliderX"
'Public Const K_SLIDERVAL As String = "SliderVal"
Public Const S_PRINTING3D As String = "3dPrinting"
Public Const K_3PRNBASEDIR As String = "BaseDir"
Public Const K_CURRMATERIAL As String = "CurrMaterial"
Public Const S_MRUFILES As String = "MruFiles"
End Module
+60
View File
@@ -0,0 +1,60 @@
Public Module ConstMachComm
Public Enum ResultTypes As Integer
NULL = 0
EXECUTED = 1
RESULT = 2
End Enum
Public Enum CommandTypes As Integer
ERROR_ = 1
CONNECT = 2
DISCONNECT = 3
START = 4
SOFTSTART = 5
STOP_ = 6
RESET = 7
STEP_ = 8
SETPOINT = 9
SENDPROG = 10
REMOVEPROG = 11
REMOVEALLPROG = 12
READ_TPA = 13
WRITE = 14
DELETEALARMS = 15
SETOPMODE = 16
READ_NUMFLEXIUM = 17
STOPREAD_NUMFLEXIUM = 18
MDI = 19
SETCHANNEL = 20
End Enum
Public Enum LogCommandTypes As Integer
NULL = 0
ERROR_ = 1
CONNECT = 2
DISCONNECT = 3
START = 4
SOFTSTART = 5
STOP_ = 6
RESET = 7
STEP_ = 8
SETPOINT = 9
SENDPROG = 10
REMOVEPROG = 11
REMOVEALLPROG = 12
READ = 13
WRITE = 14
DELETEALARMS = 15
SETOP = 16
ALARM = 17
NEWOP = 18
End Enum
Public Enum CommandStates As Integer
NULL = 0
ERROR_ = 1
OK = 2
End Enum
End Module
+27
View File
@@ -0,0 +1,27 @@
Public Module ConstMachIni
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
Public Const GETWALLDATA_FILE_NAME As String = "GetWallData.lua"
Public Const GETTS3DATA_FILE_NAME As String = "GetTs3Data.lua"
Public Const K_NCTYPE As String = "NCType"
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
Public Const S_CHANNELS As String = "Channels"
' Variables della macchina corrente
Public Const S_MAINVARIABLES As String = "MainVariables"
Public Const S_VARIABLES As String = "Variables"
Public Const S_INPUTVARIABLES As String = "InputVariables"
Public Const S_OUTPUTVARIABLES As String = "OutputVariables"
Public Const S_MDI As String = "MDI"
Public Const K_BEAM As String = "Beam"
Public Const K_WALL As String = "Wall"
Public Const K_SCRIPT As String = "Scripts"
Public Const K_SETUP As String = "Setup"
Public Const K_FLOW As String = "Flow"
Public Const TS3DATA_FILE As String = "Ts3Data.lua"
End Module
+54
View File
@@ -0,0 +1,54 @@
Public Module ConstMsg
Public Const MSG_SETUPERRORS As Integer = 5000 + 1470
Public Const MSG_MISSINGKEYWD As Integer = 10100
Public Const MSG_NUMERICKEYBOARDWD As Integer = 10200
Public Const MSG_MESSAGEBOX As Integer = 15000
Public Const MSG_EGTSAVEFILEDIALOG As Integer = 30000
Public Const MSG_OMAGCUT As Integer = 90000
Public Const MSG_GENERAL As Integer = MSG_OMAGCUT
Public Const MSG_WORKINPROGRESSPAGEUC As Integer = MSG_OMAGCUT + 100
Public Const MSG_DIRECTCUTPAGEUC As Integer = MSG_OMAGCUT + 200
Public Const MSG_MANUALAXESMOVEPAGEUC As Integer = MSG_OMAGCUT + 220
Public Const MSG_CADCUTPAGEUC As Integer = MSG_OMAGCUT + 300
Public Const MSG_NESTPAGEUC As Integer = MSG_OMAGCUT + 330
Public Const MSG_SPLITPAGEUC As Integer = MSG_OMAGCUT + 340
Public Const MSG_MOVERAWPAGEUC As Integer = MSG_OMAGCUT + 360
Public Const MSG_DRAWPAGEUC As Integer = MSG_OMAGCUT + 380
Public Const MSG_COMPONENTPAGEUC As Integer = MSG_OMAGCUT + 400
Public Const MSG_IMPORTPAGEUC As Integer = MSG_OMAGCUT + 450
Public Const MSG_OPENPAGEUC As Integer = MSG_OMAGCUT + 490
Public Const MSG_RAWPARTPAGEUC As Integer = MSG_OMAGCUT + 500
Public Const MSG_CHOOSEMACHININGPAGEUC As Integer = MSG_OMAGCUT + 535
Public Const MSG_SIMULATIONPAGEUC As Integer = MSG_OMAGCUT + 550
Public Const MSG_FRAMECUTPAGEUC As Integer = MSG_OMAGCUT + 600
Public Const MSG_MACHINEPAGEUC As Integer = MSG_OMAGCUT + 700
Public Const MSG_TOOLSDBPAGEUC As Integer = MSG_OMAGCUT + 720
Public Const MSG_MACHININGSDBPAGEUC As Integer = MSG_OMAGCUT + 760
Public Const MSG_COMBOBOXPARAM As Integer = MSG_OMAGCUT + 800
Public Const MSG_ALARMSPAGEUC As Integer = MSG_OMAGCUT + 900
Public Const MSG_MACHINECNPAGEUC As Integer = MSG_OMAGCUT + 950
Public Const MSG_OPTIONSPAGEUC As Integer = MSG_OMAGCUT + 980
Public Const MSG_EGTMSGBOX As Integer = MSG_OMAGCUT + 1100
Public Const MSG_CSVPAGEUC As Integer = MSG_OMAGCUT + 1200
Public Const MSG_OMAGOFFICE As Integer = 91400
Public Const MSG_OPTIONPANEL As Integer = MSG_OMAGOFFICE
Public Const MSG_MYMACHININGDBWINDOW As Integer = MSG_OMAGOFFICE + 50
Public Const MSG_TOPCMDBAR As Integer = MSG_OMAGOFFICE + 100
Public Const MSG_RAWPARTTAB As Integer = MSG_OMAGOFFICE + 150
Public Const MSG_VEINMATCHING As Integer = MSG_OMAGOFFICE + 200
Public Const MSG_GENERIC As Integer = MSG_OMAGOFFICE + 250
Public Const MSG_EGTWPFLIB5 As Integer = 30000
Public Const MSG_TOPCOMMANDBAR As Integer = MSG_EGTWPFLIB5 + 500
Public Const MSG_GRIDVIEWPANEL As Integer = MSG_EGTWPFLIB5 + 800
Public Const MSG_TOOLDB As Integer = MSG_EGTWPFLIB5 + 1000
Public Const MSG_TOOLDBERRORS As Integer = MSG_EGTWPFLIB5 + 1100
Public Const MSG_MACHININGDB As Integer = MSG_EGTWPFLIB5 + 1200
Public Const MSG_MACHININGDBERRORS As Integer = MSG_EGTWPFLIB5 + 1400
Public Const MSG_SIMULATION As Integer = MSG_EGTWPFLIB5 + 1600
End Module
@@ -0,0 +1,10 @@
<UserControl x:Class="CurrLayerSliderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Slider Value="{Binding nValue}"
Minimum="0"
Maximum="100"
Width="400"/>
</UserControl>
@@ -0,0 +1,3 @@
Public Class CurrLayerSliderV
End Class
@@ -0,0 +1,16 @@
Imports EgtWPFLib5
Public Class CurrLayerSliderVM
Inherits VMBase
Private m_nValue As Integer = 0
Public Property nValue As Integer
Get
Return m_nValue
End Get
Set(value As Integer)
m_nValue = value
End Set
End Property
End Class
@@ -0,0 +1,14 @@
<EgtFloating:EgtFloatingPanel x:Class="InstrumentPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<ToggleButton ToolTip="{Binding GetDistToolTip}"
Style="{StaticResource ToolBar_ToggleButton}"
IsChecked="{Binding GetDistIsChecked}">
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform"/>
</ToggleButton>
</EgtFloating:EgtFloatingPanel>
@@ -0,0 +1,3 @@
Public Class InstrumentPanelV
End Class
@@ -0,0 +1,47 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Public Class MyInstrumentPanelVM
Inherits InstrumentPanelVM
Private m_InstrumentPanel_IsEnabled As Boolean = True
Public Property InstrumentPanel_IsEnabled As Boolean
Get
Return m_InstrumentPanel_IsEnabled
End Get
Set(value As Boolean)
m_InstrumentPanel_IsEnabled = value
End Set
End Property
#Region "CONSTRUCTORS"
Sub New()
' imposto riferimento in Map
Map.SetRefInstrumentPanelVM(Me)
End Sub
#End Region ' CONSTRUCTORS
#Region "METHODS"
Public Overrides Function OnPostGetDistIsChecked() As Boolean
Map.refSceneHostVM.MainScene.SetStatusNull()
Return True
End Function
Friend Sub SetGetDistance_IsChecked(bIsChecked As Boolean)
GetDistIsChecked = bIsChecked
End Sub
Friend Sub SetInstrumentPanelIsEnabled(bIsEnabled As Boolean)
m_InstrumentPanel_IsEnabled = bIsEnabled
NotifyPropertyChanged(NameOf(InstrumentPanel_IsEnabled))
End Sub
#End Region ' METHODS
End Class
+42
View File
@@ -0,0 +1,42 @@
<StackPanel x:Class="LeftPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PrintApp="clr-namespace:_3dPrintApp"
Margin="5">
<StackPanel.Resources>
<PrintApp:CenterToolTipConverter x:Key="CenterToolTipConverter"/>
</StackPanel.Resources>
<ToggleButton x:Name="RotateBtn"
Content="Move"
VerticalAlignment="Center">
</ToggleButton>
<Popup IsOpen="{Binding IsChecked, ElementName=RotateBtn}"
Grid.Column="1"
PlacementTarget="{Binding ElementName=RotateBtn}"
Style="{StaticResource LeftPanel_Popup}">
<!--<Popup.VerticalOffset>
<MultiBinding Converter="{StaticResource CenterToolTipConverter}">
<Binding RelativeSource="{RelativeSource Self}" Path="PlacementTarget.ActualHeight"/>
<Binding RelativeSource="{RelativeSource Self}" Path="Child.ActualHeight"/>
</MultiBinding>
</Popup.VerticalOffset>-->
<Border x:Name="PopupBrd" Style="{StaticResource LeftPanelPopup_Border}">
<UniformGrid Columns="2" Rows="3">
<TextBlock Text="X"/>
<TextBox Text="2493.6"
Margin="1"/>
<TextBlock Text="Y"/>
<TextBox Text="1345.6"
Margin="1"/>
<TextBlock Text="Z"/>
<TextBox Text="0"
Margin="1"/>
</UniformGrid>
</Border>
</Popup>
<Button Content="Rotate">
</Button>
</StackPanel>
+3
View File
@@ -0,0 +1,3 @@
Public Class LeftPanelV
End Class
+25
View File
@@ -0,0 +1,25 @@
Imports System.Globalization
Public Class LeftPanelVM
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 placementTargetHeight As Double = CDbl(values(0))
Dim toolTipHeight As Double = CDbl(values(1))
Return (placementTargetHeight / 2.0) - (toolTipHeight / 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,49 @@
<Grid x:Class="MachinePanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsEnabled="{Binding MachPanel_IsEnabled}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Margin="0,0,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!--<TextBlock Grid.Row="0" Grid.Column="0" Text="Macchina corrente" VerticalAlignment="Center" Margin="0,0,5,0"/>-->
<!--Combobox per selezionare la macchina corrente-->
<ComboBox ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Height="22" Width="150"
Grid.Row="0" Grid.Column="1"/>
</Grid>
<!--<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
Style="{StaticResource ToolBar_TextButton}" Content="{Binding ToolDBMsg}"/>
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
Style="{StaticResource ToolBar_TextButton}" Content="{Binding MachiningDbMsg}"/>
--><!--<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}"
Style="{StaticResource ToolBar_TextButton}" Content="{Binding SetUpMsg}"
Background="{Binding SetUp_Background}"/>--><!--
<Button ToolTip="{Binding BeamTable_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding BeamTable_Command}"
Visibility="{Binding BeamTable_Visibility}">
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding WallTable_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding WallTable_Command}"
Visibility="{Binding WallTable_Visibility}">
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
</Button>
--><!--<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}">
<Image Source="/Resources/ProjectManager/Options.png" Height="22" />
</Button>--><!--
</StackPanel>-->
</Grid>
@@ -0,0 +1,3 @@
Public Class MachinePanelV
End Class
+168
View File
@@ -0,0 +1,168 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Public Class MachinePanelVM
Inherits EgtWPFLib5.MachinePanelVM
#Region "FIELDS & PROPERTIES"
' Radice del direttorio delle macchine
Private m_sMachinesRoot As String
' Macchina correntemente selezionata e quindi attiva
Private m_SelectedMachine As Machine = Nothing
Public Overrides Property SelectedMachine As Machine
Get
Return m_SelectedMachine
End Get
Set(value As Machine)
If value IsNot m_SelectedMachine Then
' imposto macchina in DbGeometrico
If EgtSetCurrMachine(value.Name) Then
m_SelectedMachine = value
End If
' Salvo impostazione macchina corrente
SaveCurrentMachine()
NotifyPropertyChanged(NameOf(SelectedMachine))
' inizializzo la macchina selezionata come macchina corrente
InitCurrentMachine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, value.Name)
' aggiorno nome macchina in statusbar
Map.refMyStatusBarVM.RefreshMachName()
End If
End Set
End Property
Private m_MachPanel_IsEnabled As Boolean = True
Public Property MachPanel_IsEnabled As Boolean
Get
Return m_MachPanel_IsEnabled
End Get
Set(value As Boolean)
m_MachPanel_IsEnabled = value
NotifyPropertyChanged("MachPanel_IsEnabled")
End Set
End Property
Private m_BeamTable_Visibility As Visibility
Public ReadOnly Property BeamTable_Visibility As Visibility
Get
Return m_BeamTable_Visibility
End Get
End Property
Private m_WallTable_Visibility As Visibility
Public ReadOnly Property WallTable_Visibility As Visibility
Get
Return m_WallTable_Visibility
End Get
End Property
#Region "Messages"
Public ReadOnly Property ToolDBMsg As String
Get
Return EgtMsg(MSG_MACHINEPAGEUC + 6)
End Get
End Property
Public ReadOnly Property MachiningDbMsg As String
Get
Return EgtMsg(MSG_MACHINEPAGEUC + 7)
End Get
End Property
Public ReadOnly Property SetUpMsg As String
Get
Return EgtMsg(MSG_ALARMSPAGEUC + 33)
End Get
End Property
#End Region ' Messages
#Region "ToolTip"
Public ReadOnly Property ToolDBToolTip As String
Get
Return EgtMsg(5003)
End Get
End Property
Public ReadOnly Property MachiningDbToolTip As String
Get
Return EgtMsg(5004)
End Get
End Property
Public ReadOnly Property SetUpToolTip As String
Get
Return EgtMsg(31501)
End Get
End Property
#End Region ' ToolTip
' Definizione comandi
Private m_cmdBeamTable As ICommand
Private m_cmdWallTable As ICommand
#End Region 'FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefMachinePanelVM(Me)
' recupero cartella radice delle macchine
m_sMachinesRoot = Map.refMainWindowVM.MainWindowM.sMachinesRoot
' Carica macchine da cartella delle macchine
MyMachine.MachineListInit(m_sMachinesRoot, MachineList)
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Friend Sub LoadCurrentMachine()
If MachineList.Count = 0 Then Return
Dim CurrMachine As Machine = Nothing
Dim CurrMachineName As String = String.Empty
GetMainPrivateProfileString(S_MACH, K_CURRMACH, String.Empty, CurrMachineName)
Dim bFound As Boolean = False
If Not String.IsNullOrEmpty(CurrMachineName) Then
For Each Mach In MachineList
If Mach.Name = CurrMachineName Then
bFound = True
CurrMachine = Mach
Exit For
End If
Next
End If
If Not bFound And MachineList.Count > 0 Then
CurrMachine = MachineList(0)
End If
If Not IsNothing(CurrMachine) Then
If EgtSetCurrMachine(CurrMachine.Name) Then
SelectedMachine = CurrMachine
End If
End If
End Sub
Friend Sub SaveCurrentMachine()
If IsNothing(m_SelectedMachine) Then Return
WriteMainPrivateProfileString(S_MACH, K_CURRMACH, SelectedMachine.Name)
End Sub
Friend Sub UpdateCurrentMachine()
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim sMachName As String = String.Empty
If EgtGetCurrMachineName(sMachName) Then
For Each Mach In MachineList
If Mach.Name = sMachName Then
SelectedMachine = Mach
Exit For
End If
Next
End If
End Sub
#End Region
End Class
+12
View File
@@ -0,0 +1,12 @@
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:_3dPrintApp"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
</Grid>
</Window>
+3
View File
@@ -0,0 +1,3 @@
Class MainWindow
End Class
+347
View File
@@ -0,0 +1,347 @@
Imports System.Threading
Imports System.Math
Imports EgtUILib
Imports EgtWPFLib5
Public Class MainWindowM
#Region "FIELDS"
' massimo numero di istanze del programma ammesse
Const MAX_INST As Integer = 32
Private m_sDataRoot As String = String.Empty
Friend ReadOnly Property sDataRoot As String
Get
Return m_sDataRoot
End Get
End Property
Private m_sDataDir As String = String.Empty
Friend ReadOnly Property sDataDir As String
Get
Return m_sDataDir
End Get
End Property
Private m_sConfigDir As String = String.Empty
Public ReadOnly Property sConfigDir As String
Get
Return m_sConfigDir
End Get
End Property
Private m_nDebug As Integer = 0
Private m_objMutex As Mutex
Private m_bFirstInstance As Boolean = False
Friend ReadOnly Property bFirstInstance As Boolean
Get
Return m_bFirstInstance
End Get
End Property
Private m_nInstance As Integer = 0
Friend ReadOnly Property nInstance As Integer
Get
Return m_nInstance
End Get
End Property
Private m_nUserLevel As Integer = 1
Friend ReadOnly Property nUserLevel As Integer
Get
Return m_nUserLevel
End Get
End Property
Private m_nKeyLevel As Integer = 0
Friend ReadOnly Property nKeyLevel As Integer
Get
Return m_nKeyLevel
End Get
End Property
Private m_nKeyOptions As UInteger = 0
Friend ReadOnly Property nKeyOptions As Integer
Get
Return m_nKeyOptions
End Get
End Property
Private m_bAutoNestOption As Boolean = False
Friend ReadOnly Property AutoNestOption As Boolean
Get
Return m_bAutoNestOption
End Get
End Property
Friend ReadOnly Property sVersion As String
Get
Return My.Application.Info.Version.Major.ToString() & "." &
My.Application.Info.Version.Minor.ToString() &
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString()
End Get
End Property
Private m_s3dPrintingDir As String
Friend ReadOnly Property s3dPrintingDir As String
Get
Return m_s3dPrintingDir
End Get
End Property
Private m_sMachiningsDir As String
Friend ReadOnly Property sMachiningsDir As String
Get
Return m_sMachiningsDir
End Get
End Property
Private m_sMaterialsDir As String
Friend ReadOnly Property sMaterialsDir As String
Get
Return m_sMaterialsDir
End Get
End Property
Private m_sTempDir As String
Friend ReadOnly Property sTempDir As String
Get
Return m_sTempDir
End Get
End Property
Private m_sMachinesRoot As String
Friend ReadOnly Property sMachinesRoot As String
Get
Return m_sMachinesRoot
End Get
End Property
Private m_sToolMakersDir As String
Friend ReadOnly Property sToolMakersDir As String
Get
Return m_sToolMakersDir
End Get
End Property
Private m_sResourcesRoot As String
Friend ReadOnly Property sResourcesRoot As String
Get
Return m_sResourcesRoot
End Get
End Property
Private m_sLogFile As String
Friend ReadOnly Property sLogFile As String
Get
Return m_sLogFile
End Get
End Property
#End Region ' FIELDS
#Region "CONSTRUCTOR"
Sub New()
InitializeEgtEnvironment()
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Private Sub InitializeEgtEnvironment()
'' Abilito drag and drop
'Me.AllowDrop = True
' Impostazione path radice per i dati
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
If EgtUILib.GetPrivateProfileString(S_DATA, K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & DAT_FILE_NAME) = 0 Then
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
End If
' Impostazione direttorio di configurazione
m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
' Impostazione direttorio per file temporanei
m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
' Impostazione path Ini file
IniFile.m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME
' Impostazione path resources dir
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
' Impostazione path machinings e materials dir
m_sMachiningsDir = m_sDataRoot & "\" & MACHININGS_DIR
m_sMaterialsDir = m_sDataRoot & "\" & MATERIALS_DIR
' Impostazione direttorio per le macchine
If GetMainPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then
m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR
End If
' Impostazione direttorio per toolmakers
If GetMainPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", m_sToolMakersDir) = 0 Then
m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKERS_DFL_DIR
End If
' Impostazione direttorio 3dPrinting
If GetMainPrivateProfileString(S_PRINTING3D, K_3PRNBASEDIR, "", m_s3dPrintingDir) = 0 Then
m_s3dPrintingDir = m_sDataRoot & "\" & _3DPRINTING_DIR
End If
' Verifico indice di istanza
ManageInstance()
' Imposto tipo di chiave
EgtSetLockType(KEY_TYPE.HW)
' Leggo e imposto chiave di protezione
Dim sLicFileName As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
Dim sKey As String = String.Empty
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
Dim sNestKey As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
'EgtSetNestKey(sNestKey)
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2405, 1, m_nKeyLevel) And
EgtGetKeyOptions(3279, 2405, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
My.Application.Info.Title.ToString() & " ver. " &
My.Application.Info.Version.Major.ToString() &
"." & My.Application.Info.Version.Minor.ToString() &
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString()
EgtInit(m_nDebug, m_sLogFile, sLogMsg)
EgtSetTempDir(m_sTempDir)
EgtSetIniFile(IniFile.m_sIniFile)
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
Dim sMsgDir As String = String.Empty
If GetMainPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
sMsgDir = m_sConfigDir
End If
' Leggo lingua corrente
Dim sLanguage As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_MESSAGES, "", sLanguage)
' Recupero nome file dei messaggi della lingua corrente
Dim sMsgName As String = "EgalTechIta.txt"
Dim nIndex As Integer = 1
While True
Dim ReadLanguage As Language = GetMainPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex)
If IsNothing(ReadLanguage) Then Exit While
If String.Compare(ReadLanguage.Name, sLanguage, True) = 0 Then
sMsgName = ReadLanguage.FilePath
Exit While
End If
nIndex += 1
End While
' Leggo file messaggi
Dim sMsgFilePath As String = sMsgDir & "\" & sMsgName
If Not EgtLoadMessages(sMsgFilePath) Then
EgtOutLog("Error in EgtLoadMessages")
End If
' Leggo e imposto unità di misura per interfaccia utente
EgtSetUiUnits(GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
' Leggo e imposto livello utilizzatore
m_nUserLevel = Math.Min(m_nKeyLevel, GetMainPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto dir font Nfe e font default
Dim sNfeDir As String = String.Empty
GetMainPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
Dim sDefFont As String = String.Empty
GetMainPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", sDefFont)
EgtSetFont(sNfeDir, sDefFont)
' imposto dir di default per libreria Lua e lancio libreria di base
Dim sLuaLibsDir As String = String.Empty
GetMainPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
EgtSetLuaLibs(sLuaLibsDir)
Dim sLuaBaseLib As String = String.Empty
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
EgtLuaRequire(sLuaBaseLib)
' Info su opzioni chiave
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
End Sub
Private Sub ManageInstance()
Dim bCreated As Boolean
Try
m_objMutex = New Mutex(False, "Global\3dPrintApp", bCreated)
Catch
bCreated = False
End Try
m_bFirstInstance = bCreated
If bCreated Then
' Prima istanza
m_nInstance = 1
' Aggiorno stato istanze attive
WriteMainPrivateProfileString(S_GENERAL, K_VIEWOPTIM_INSTANCES, m_nInstance.ToString())
Else
' Leggo il massimo numero di istanze ammesse
Dim nMaxInst As Integer = GetMaxInstances()
' Cerco il primo indice di istanza libero
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_VIEWOPTIM_INSTANCES, 0)
m_nInstance = 1
Dim nMask As Integer = 1
While (nTmp And nMask) <> 0 And m_nInstance <= MAX_INST
m_nInstance += 1
nMask *= 2
End While
' Se l'indice supera il massimo
If m_nInstance > nMaxInst Then
' porto in primo piano la prima istanza
Dim bFound As Boolean = False
' processi del programma a 32 bit
Dim localProc As Process() = Process.GetProcessesByName("3dPrintAppR32")
For Each p As Process In localProc
If p.Id <> Process.GetCurrentProcess().Id Then
bFound = True
ShowWindow(p.MainWindowHandle, 1)
Exit For
End If
Next
' se non trovati processi a 32 bit provo a 64 bit
If Not bFound Then
localProc = Process.GetProcessesByName("3dPrintAppR64")
For Each p As Process In localProc
If p.Id <> Process.GetCurrentProcess().Id Then
bFound = True
ShowWindow(p.MainWindowHandle, SW.RESTORE)
Exit For
End If
Next
End If
' esco dal programma
End
End If
' Aggiorno stato istanze attive
nTmp += (1 << (m_nInstance - 1))
WriteMainPrivateProfileString(S_GENERAL, K_VIEWOPTIM_INSTANCES, nTmp.ToString())
End If
End Sub
Friend Function GetKeyOption(nKeyOpt As KEY_OPT) As Boolean
Return ((m_nKeyOptions And nKeyOpt) <> 0)
End Function
Friend Function GetMaxInstances() As Integer
' Leggo il massimo numero di istanze ammesse
Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXINST, 1)
Return 1 ' Max(1, Min(nMaxInst, MAX_INST))
End Function
Friend Function GetMaxCamInstances() As Integer
' Leggo il massimo numero di istanze ammesse
Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXCAMINST, 1)
Return Max(1, Min(nMaxInst, MAX_INST))
End Function
Friend Sub Close()
' Terminazione generale di EgtInterface
EgtExit()
' Aggiorno istanze usate
m_objMutex.WaitOne(1000)
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_VIEWOPTIM_INSTANCES, 0)
nTmp -= (1 << (m_nInstance - 1))
WriteMainPrivateProfileString(S_GENERAL, K_VIEWOPTIM_INSTANCES, nTmp.ToString())
m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
End Sub
#End Region ' METHODS
End Class
+33
View File
@@ -0,0 +1,33 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:PrintApp="clr-namespace:_3dPrintApp"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="{Binding Title}" Icon="/Resources/EgtBEAMWALL.ico"
MinHeight="600" MinWidth="800"
AboutBoxCommand="{Binding AboutBoxCommand}" WindowStyle="None" ResizeMode="NoResize"
AllowDrop="True" Drop="MainWindowV_Drop"
ShowInTaskbar="True"
Topmost="False"
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<!--<EgtWPFLib5:EgtCustomWindow.TitlePanel>
<PrintApp:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/>
</EgtWPFLib5:EgtCustomWindow.TitlePanel>-->
<Grid>
<PrintApp:SceneHostV/>
</Grid>
<!--Pannello principale --><!--
<DockPanel>
--><!--StatusBar --><!--
<PrintApp:StatusBarV DataContext="{StaticResource StatusBarVM}"
DockPanel.Dock="Bottom"/>
<PrintApp:ProjectV DataContext="{StaticResource ProjectVM}"/>
</DockPanel>-->
</EgtWPFLib5:EgtCustomWindow>
+63
View File
@@ -0,0 +1,63 @@
Imports EgtWPFLib5
Imports EgtUILib
Imports System.Windows.Interop
Class MainWindowV
Private m_MainWindowVM As MainWindowVM
Private m_SceneHostWnd As SecondaryWindowV
#Region "CONSTRUCTOR"
Sub New()
m_MainWindowVM = New MainWindowVM
' Funzione che interpreta l'xaml
InitializeComponent()
Me.DataContext = m_MainWindowVM
' creo finestra della scena
AddHandler Me.Loaded, AddressOf MainWindowV_Loaded
AddHandler Me.Closing, AddressOf MainWindowV_Closing
AddHandler Me.KeyDown, AddressOf MainWindowV_KeyDown
End Sub
#End Region ' CONSTRUCTOR
#Region "EVENTS"
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs)
' Carico e imposto posizione finestra
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
' Recupero e imposto handle finestra principale
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
EgtSetMainWindowHandle(hMainWnd)
End Sub
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True
Return
End If
' Salvo posizione finestra (se non minimizzata)
If WindowState <> WindowState.Minimized Then
WinPosFromWindowToIni(Me, S_GENERAL, K_WINPLACE)
End If
End Sub
Private Sub MainWindowV_KeyDown(sender As Object, e As KeyEventArgs)
'm_MainWindowVM.KeyDown(e.Key)
End Sub
Private Sub MainWindowV_Drop(sender As Object, e As DragEventArgs)
' Se drag di file
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
' Attivo il programma
Me.Activate()
' Recupero l'array di stringhe con i nomi del file
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
End If
End Sub
#End Region ' EVENTS
End Class
+280
View File
@@ -0,0 +1,280 @@
Imports EgtUILib
Imports EgtWPFLib5
Imports System.IO
Imports System.Threading
Imports System.Windows.Threading
Public Class MainWindowVM
Inherits VMBase
Private m_SupervisorCommThread As Thread
Private m_Supervisor_Timer As New DispatcherTimer
' Riferimento al Model della MainWindow
Private m_MainWindowM As MainWindowM
Friend ReadOnly Property MainWindowM As MainWindowM
Get
Return m_MainWindowM
End Get
End Property
' Variabile che indica che il programma è stato avviato correttamente (sia la mappa che l'ambiente Egt)
Private m_bInitStatus As Boolean
Friend ReadOnly Property bInitStatus As Boolean
Get
Return m_bInitStatus
End Get
End Property
' Titolo
Private m_Title As String = ""
Public ReadOnly Property Title As String
Get
Return m_Title
End Get
End Property
' proprietà che seleziona la giusta pagina del TabControl
Public Property nSelTabPage As Integer
Get
' Return If(IsNothing(Map.refMainMenuVM.SelPage) OrElse Map.refMainMenuVM.SelPage = -1 OrElse Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.MACHINING, 0, 1)
End Get
Set(value As Integer)
End Set
End Property
Private m_MachinePanelVM As MachinePanelVM
Public ReadOnly Property MachinePanelVM As MachinePanelVM
Get
Return m_MachinePanelVM
End Get
End Property
'Friend m_SupervisorStop As Boolean = False
'Private BlockedWnd As BlockedWndV
' definizione comandi
Private m_cmdAboutBox As ICommand
Private m_cmdCloseApplication As ICommand
#Region "CONSTRUCTOR"
Sub New()
' Avvio l'inizializzazione della mappa passandogli il riferimento al MainWindowVM
Map.BeginInit(Me)
' Creo Model della MainWindow
m_MainWindowM = New MainWindowM
' inizializzo machine panel
m_MachinePanelVM = New MachinePanelVM
' inizializzo contatore per blocco da supervisore
m_Supervisor_Timer.Interval = TimeSpan.FromMilliseconds(500)
' AddHandler m_Supervisor_Timer.Tick, AddressOf SupervisorTimer_Tick
m_Supervisor_Timer.Start()
End Sub
#End Region ' CONSTRUCTOR
'#Region "METHODS"
' Friend Sub SetTitle(sTitle As String)
' m_Title = sTitle
' NotifyPropertyChanged(NameOf(Title))
' End Sub
' Public Sub UpdateTitle()
' m_Title = ""
' Select Case Map.refMainMenuVM.SelPage
' Case Pages.VIEW
' If Not IsNothing(Map.refProjManagerVM.CurrProj) Then
' If Map.refProjManagerVM.CurrProj.bIsNew Then m_Title = "New - "
' m_Title &= Map.refProjManagerVM.CurrProj.nProjId.ToString("0000") & " - " & Map.refProjManagerVM.CurrProj.sBTLFileName
' End If
' Case Pages.MACHINING
' If Not IsNothing(Map.refProdManagerVM.CurrProd) Then
' If Map.refProdManagerVM.CurrProd.bIsNew Then m_Title = "New - "
' m_Title &= Map.refProdManagerVM.CurrProd.nProdId.ToString("0000") & " - " & Map.refProdManagerVM.CurrProd.sBTLFileName
' End If
' Case Pages.CONFIG
' m_Title = "Configuration Page"
' End Select
' m_Title &= " - EgtBEAMWALL"
' NotifyPropertyChanged(NameOf(Title))
' End Sub
' Friend Sub ContentRendered()
' DbControllers.Init()
' '' chiamata a caso su Db per inizializzarlo
' DbControllers.m_ProjController.FindByProjDbId(0)
' ' Verifico che l'inizializzazione di tutte le parti del programma sia andata a buon fine
' If Map.EndInit() Then
' m_bInitStatus = True
' ' altrimenti chiudo il programma
' Else
' m_bInitStatus = False
' End If
' ' Aggiorno visualizzazione unità di misura
' 'Map.refStatusBarVM.SetMeasureUnit(If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH))
' ' imposto MainWindow per finestra di Loading
' LoadingWndHelper.SetMainWindow(Application.Current.MainWindow)
' ' leggo riga di comando
' Dim nCommandType As Integer = 0
' Dim nPage As Pages = Pages.VIEW
' Dim nProdId As Integer = 0
' If ProcessCommandLine(nCommandType, nPage, nProdId) Then
' Select Case nCommandType
' Case 1
' Map.refProdManagerVM.SetCurrProd(nProdId)
' Case 2
' ' pagina gia' impostata nella variabile
' End Select
' Else
' ' setto il primo file dalla lista degli MRU come progetto corrente da aprire
' Dim sLastProjectPath As String = String.Empty
' GetMainPrivateProfileString(S_MRUPROJFILES, K_FILE & "1", String.Empty, sLastProjectPath)
' If Not String.IsNullOrWhiteSpace(sLastProjectPath) AndAlso File.Exists(sLastProjectPath) Then
' ' ricavo l'Id e il progetto associato per l'apertura di quest'ultimo
' Dim PjId As Integer = 0
' Dim sPjId As String = Path.GetFileNameWithoutExtension(sLastProjectPath)
' Integer.TryParse(sPjId, PjId)
' Map.refProjManagerVM.SetCurrProj(PjId)
' End If
' End If
' ' seleziono pagina da aprire
' Map.refMainMenuVM.SelPage = nPage
' ' inizializzo thread di aggiornamento e comunicazione con DB
' ' creo thread gestione macchina
' m_SupervisorCommThread = New Thread(Sub()
' SupervisorCommThread.SupervisorCommThreadFunction()
' End Sub)
' m_SupervisorCommThread.SetApartmentState(ApartmentState.STA)
' ' avvio thread di gestione della macchina che avvia la connessione
' m_SupervisorCommThread.Start()
' End Sub
' Friend Function ProcessCommandLine(ByRef nCommandType As Integer, ByRef nPage As Pages, ByRef nProdId As Integer) As Boolean
' ' Se non ci sono veri parametri su linea di comando, esco (il primo è sempre il nome del programma)
' If Environment.GetCommandLineArgs.Count() <= 1 Then Return False
' ' Recupero primo parametro che dovrebbe essere il tipo di modalita' riga di comando
' Dim sFile As String = Environment.GetCommandLineArgs(1)
' If String.IsNullOrWhiteSpace(sFile) OrElse Not Integer.TryParse(sFile, nCommandType) OrElse nCommandType <= 0 Then Return False
' Select Case nCommandType
' Case 1 ' apri progetto in ottimizzatore
' ' recupero secondo parametro
' Dim sProdId As String = Environment.GetCommandLineArgs(2)
' If Not Integer.TryParse(sProdId, nProdId) OrElse nProdId <= 0 Then Return False
' nPage = Pages.MACHINING
' Return True
' Case 2 ' apri pagina specifica senza progetto specifico
' ' recupero secondo parametro
' Dim sPage As String = Environment.GetCommandLineArgs(2)
' If Not Integer.TryParse(sPage, nPage) OrElse (nPage <> Pages.VIEW AndAlso nPage <> Pages.MACHINING) Then Return False
' Return True
' End Select
' Return False
' End Function
' Friend Sub KeyDown(PressedKey As Key)
' ' Con ESC esco dall'azione corrente
' If PressedKey = Key.Escape Then
' ' se in modifica L250
' If Map.refFreeContourManagerVM.bIsActive Then
' ' se in modifica testo angolo di inclinazione
' If Map.refFreeContourManagerVM.bIsModifyingTextAngle Then
' Map.refFreeContourManagerVM.CloseIsModifyingTextAngle(False)
' End If
' ' reset Azione corrente
' Map.refSceneHostVM.MainController.ResetStatus()
' Map.refFreeContourInputVM.ResetInputBox()
' End If
' ' se misura attiva, la disattivo
' If Map.refInstrumentPanelVM.GetDistIsChecked Then
' Map.refInstrumentPanelVM.SetGetDistance_IsChecked(False)
' End If
' ' se Reset Macchina è aperto
' If (nSelTabPage = Pages.VIEW Or nSelTabPage = Pages.MACHINING) AndAlso Map.refCALCPanelVM.ChooseMachine_Visibility = Visibility.Visible Then
' Map.refCALCPanelVM.CloseResetMachine()
' End If
' ' pulisco output
' Map.refMyStatusBarVM.ClearOutputMessage()
' End If
' End Sub
' Friend m_ManagingSupervisorStop As Boolean = False
' Private Sub SupervisorTimer_Tick()
' If SupervisorCommThread.bViewerOptimizerBlocked And Not m_ManagingSupervisorStop Then
' m_ManagingSupervisorStop = True
' BlockedWnd = New BlockedWndV(Application.Current.MainWindow, New BlockedWndVM)
' BlockedWnd.ShowDialog()
' ElseIf Not SupervisorCommThread.bViewerOptimizerBlocked And m_ManagingSupervisorStop Then
' m_ManagingSupervisorStop = False
' BlockedWnd.Close()
' End If
' End Sub
'#End Region ' METHODS
'#Region "COMMANDS"
'#Region "AboutBoxCommand"
' ' Returns a command that manage the MainWindow_Unloaded command
' Public ReadOnly Property AboutBoxCommand() As ICommand
' Get
' If m_cmdAboutBox Is Nothing Then
' m_cmdAboutBox = New Command(AddressOf AboutBox)
' End If
' Return m_cmdAboutBox
' End Get
' End Property
' ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
' Public Sub AboutBox(ByVal param As Object)
' Dim AboutBoxWindow As New AboutBoxV
' AboutBoxWindow.Owner = Application.Current.MainWindow
' AboutBoxWindow.ShowDialog()
' End Sub
'#End Region ' AboutBoxCommand
'#Region "CloseApplicationCommand"
' ' Returns a command that manage the MainWindow_Unloaded command
' Public ReadOnly Property CloseApplicationCommand() As ICommand
' Get
' If m_cmdCloseApplication Is Nothing Then
' m_cmdCloseApplication = New Command(AddressOf CloseApplication)
' End If
' Return m_cmdCloseApplication
' End Get
' End Property
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Friend Sub CloseApplication()
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
Return
End If
' Gestisco eventuale file corrente modificato
Dim bOk As Boolean = True
'bOk = ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ)
' se salvataggio annullato, rimango
If Not bOk Then Return
Dim bAllowClose As Boolean = Map.refSceneHostVM.MainController.ManageModified()
' Salvo impostazione macchina corrente
'Map.refMachinePanelVM.SaveCurrentMachine()
' Se non confermata chiusura, esco
If Not bAllowClose Then Return
' salvo modo di visualizzazione
WriteMainPrivateProfileString(S_SCENE, K_SHOWMODE, EgtGetShowMode().ToString)
' Termino il Model
m_MainWindowM.Close()
' Termino il programma
Application.Current.Shutdown()
End Sub
'#End Region ' CloseApplicationCommand
'#End Region ' COMMANDS
End Class
+59
View File
@@ -0,0 +1,59 @@
Imports System
Imports System.Globalization
Imports System.Reflection
Imports System.Resources
Imports System.Runtime.InteropServices
Imports System.Windows
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("_3dPrintApp")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("_3dPrintApp")>
<Assembly: AssemblyCopyright("Copyright © 2022")>
<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("23aace7b-fb51-4d2f-9552-2c0345f82c2b")>
' 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("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
@@ -0,0 +1,121 @@
#If _MyType <> "Empty" Then
Namespace My
''' <summary>
''' Module used to define the properties that are available in the My Namespace for WPF
''' </summary>
''' <remarks></remarks>
<Global.Microsoft.VisualBasic.HideModuleName()> _
Module MyWpfExtension
Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.Computer)
Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.User)
Private s_Windows As New ThreadSafeObjectProvider(Of MyWindows)
Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.Log)
''' <summary>
''' Returns the application object for the running application
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property Application() As Application
Get
Return CType(Global.System.Windows.Application.Current, Application)
End Get
End Property
''' <summary>
''' Returns information about the host computer.
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.Computer
Get
Return s_Computer.GetInstance()
End Get
End Property
''' <summary>
''' Returns information for the current user. If you wish to run the application with the current
''' Windows user credentials, call My.User.InitializeWithWindowsUser().
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.User
Get
Return s_User.GetInstance()
End Get
End Property
''' <summary>
''' Returns the application log. The listeners can be configured by the application's configuration file.
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.Log
Get
Return s_Log.GetInstance()
End Get
End Property
''' <summary>
''' Returns the collection of Windows defined in the project.
''' </summary>
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend ReadOnly Property Windows() As MyWindows
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Return s_Windows.GetInstance()
End Get
End Property
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
<Global.Microsoft.VisualBasic.MyGroupCollection("System.Windows.Window", "Create__Instance__", "Dispose__Instance__", "My.MyWpfExtenstionModule.Windows")> _
Friend NotInheritable Class MyWindows
<Global.System.Diagnostics.DebuggerHidden()> _
Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Window})(ByVal Instance As T) As T
If Instance Is Nothing Then
If s_WindowBeingCreated IsNot Nothing Then
If s_WindowBeingCreated.ContainsKey(GetType(T)) = True Then
Throw New Global.System.InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.")
End If
Else
s_WindowBeingCreated = New Global.System.Collections.Hashtable()
End If
s_WindowBeingCreated.Add(GetType(T), Nothing)
Return New T()
s_WindowBeingCreated.Remove(GetType(T))
Else
Return Instance
End If
End Function
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
<Global.System.Diagnostics.DebuggerHidden()> _
Private Sub Dispose__Instance__(Of T As Global.System.Windows.Window)(ByRef instance As T)
instance = Nothing
End Sub
<Global.System.Diagnostics.DebuggerHidden()> _
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
Public Sub New()
MyBase.New()
End Sub
<Global.System.ThreadStatic()> Private Shared s_WindowBeingCreated As Global.System.Collections.Hashtable
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(o)
End Function
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> _
Friend Overloads Function [GetType]() As Global.System.Type
Return GetType(MyWindows)
End Function
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
End Class
End Module
End Namespace
Partial Class Application
Inherits Global.System.Windows.Application
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Return New Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo(Global.System.Reflection.Assembly.GetExecutingAssembly())
End Get
End Property
End Class
#End If
+62
View File
@@ -0,0 +1,62 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:$clrversion$
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$safeprojectname$.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set(ByVal value As Global.System.Globalization.CultureInfo)
resourceCulture = value
End Set
End Property
End Module
End Namespace
+117
View File
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+73
View File
@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global._3dPrintApp.My.MySettings
Get
Return Global._3dPrintApp.My.MySettings.Default
End Get
End Property
End Module
End Namespace
+7
View File
@@ -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>
+67
View File
@@ -0,0 +1,67 @@
<StackPanel x:Class="ProjManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Orientation="Horizontal"
IsEnabled="{Binding ProjManager_IsEnabled}">
<!--Barra superiore dei comandi-->
<Button Command="{Binding New_Command}"
ToolTip="{Binding NewToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/New.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding OpenCommand}"
ToolTip="{Binding OpenToolTip}"
ContextMenuService.Placement="Bottom"
Tag="{Binding}"
Style="{StaticResource ToolBar_Button}">
<Button.ContextMenu>
<ContextMenu ItemsSource="{Binding MruFileNames}">
<ContextMenu.Resources>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Command"
Value="{Binding PlacementTarget.Tag.OpenMruFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}" />
<Setter Property="CommandParameter" Value="{Binding}" />
</Style>
</ContextMenu.Resources>
</ContextMenu>
</Button.ContextMenu>
<Image Source="/Resources/ProjectManager/Open.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding SaveAsCommand}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/SaveAs.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ImportCommand}"
ToolTip="{Binding ImportToolTip}"
Style="{StaticResource ToolBar_Button}"
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/ProjectManager/Import.png" Stretch="Uniform"/>
</Button>
<!--<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/ProjectManager/Export.png" Stretch="Uniform"/>
</Button>-->
<Button Command="{Binding OptionsCommand}"
Width="30"
ToolTip="{Binding OptionsToolTip}"
Style="{StaticResource ToolBar_Button}"
IsEnabled="{Binding SaveIsEnabled}">
<Image Source="/Resources/ProjectManager/Options.png" Height="22" />
</Button>
<Button Command="{Binding SendFeedbackCommand}"
Width="30"
ToolTip="{Binding SendFeedbackToolTip}"
Style="{StaticResource ToolBar_Button}"
IsEnabled="{Binding SaveIsEnabled}">
<Image Source="/Resources/ProjectManager/Send.png" Height="22" />
</Button>
</StackPanel>
@@ -0,0 +1,3 @@
Public Class ProjManagerV
End Class
+438
View File
@@ -0,0 +1,438 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtWPFLib5
Imports EgtUILib
Public Class ProjManagerVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private m_ProjManager_IsEnabled As Boolean = True
Public ReadOnly Property ProjManager_IsEnabled As Boolean
Get
Return m_ProjManager_IsEnabled
End Get
End Property
Private m_MruFiles As New MruList
Public ReadOnly Property MruFiles As MruList
Get
Return m_MruFiles
End Get
End Property
Public ReadOnly Property MruFileNames As ObservableCollection(Of String)
Get
For Each FileName In m_MruFiles.FileNames.ToList()
If Not File.Exists(FileName) Then
m_MruFiles.Remove(FileName)
End If
Next
Return m_MruFiles.FileNames
End Get
End Property
' Definizione comandi
Private m_cmdNew As ICommand
Private m_cmdOpen As ICommand
Private m_cmdOpenMruFile As ICommand
Private m_cmdSave As ICommand
Private m_cmdSaveAs As ICommand
Private m_cmdImport As ICommand
Private m_cmdOptions As ICommand
Private m_cmdSendFeedback As ICommand
#Region "ToolTip"
'Proprietà ToolTip
Public ReadOnly Property NewToolTip As String
Get
Return EgtMsg(MSG_TOPCOMMANDBAR + 1)
End Get
End Property
Public ReadOnly Property OpenToolTip As String
Get
Return EgtMsg(MSG_TOPCOMMANDBAR + 2)
End Get
End Property
Public ReadOnly Property SaveToolTip As String
Get
Return EgtMsg(MSG_TOPCOMMANDBAR + 3)
End Get
End Property
Public ReadOnly Property SaveAsToolTip As String
Get
Return EgtMsg(MSG_TOPCOMMANDBAR + 4)
End Get
End Property
Public ReadOnly Property InsertToolTip As String
Get
Return EgtMsg(MSG_TOPCOMMANDBAR + 5)
End Get
End Property
Public ReadOnly Property ImportBTL_ToolTip As String
Get
Return EgtMsg(61840)
End Get
End Property
Public ReadOnly Property UpdateBTL_ToolTip As String
Get
Return EgtMsg(61834)
End Get
End Property
Public ReadOnly Property ExportProject_ToolTip As String
Get
Return EgtMsg(61838)
End Get
End Property
Public ReadOnly Property ImportProject_ToolTip As String
Get
Return EgtMsg(61839)
End Get
End Property
Public ReadOnly Property GoToProd_ToolTip As String
Get
Return EgtMsg(61835)
End Get
End Property
#End Region ' ToolTip
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefProjManagerVM(Me)
' Impostazioni MruLists
m_MruFiles.Init(S_MRUFILES, 8)
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
#End Region ' METHODS
#Region "COMMANDS"
#Region "New"
''' <summary>
''' Returns a command that do Save.
''' </summary>
Public ReadOnly Property New_Command As ICommand
Get
If m_cmdNew Is Nothing Then
m_cmdNew = New Command(AddressOf NewProject)
End If
Return m_cmdNew
End Get
End Property
''' <summary>
''' Execute the Save. This method is invoked by the SaveCommand.
''' </summary>
Public Sub NewProject()
Map.refSceneHostVM.MainController.NewProject(True)
NotifyPropertyChanged(NameOf(MruFileNames))
End Sub
#End Region ' New
#Region "OpenCommand"
''' <summary>
''' Returns a command that do Open.
''' </summary>
Public ReadOnly Property OpenCommand As ICommand
Get
If m_cmdOpen Is Nothing Then
m_cmdOpen = New Command(AddressOf Open)
End If
Return m_cmdOpen
End Get
End Property
''' <summary>
''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary>
Friend Sub Open()
OpenProject(Nothing)
End Sub
Friend Sub OpenProject(sFilePath As String)
If String.IsNullOrEmpty(sFilePath) Then
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTNGEDIR, "", sDir)
Map.refSceneHostVM.MainController.OpenProject(sDir)
Else
Map.refSceneHostVM.MainController.OpenProject(sFilePath, False)
End If
End Sub
#End Region ' OpenCommand
#Region "OpenMruFileCommand"
''' <summary>
''' Returns a command that do Open.
''' </summary>
Public ReadOnly Property OpenMruFileCommand As ICommand
Get
If m_cmdOpenMruFile Is Nothing Then
m_cmdOpenMruFile = New Command(AddressOf OpenMruFile)
End If
Return m_cmdOpenMruFile
End Get
End Property
''' <summary>
''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary>
Public Sub OpenMruFile(ByVal param As Object)
OpenProject(DirectCast(param, String).Replace("__", "_"))
End Sub
#End Region ' OpenMruFileCommand
#Region "SaveCommand"
''' <summary>
''' Returns a command that do Save.
''' </summary>
Public ReadOnly Property SaveCommand As ICommand
Get
If m_cmdSave Is Nothing Then
m_cmdSave = New Command(AddressOf SaveCmd)
End If
Return m_cmdSave
End Get
End Property
Public Sub SaveCmd()
Save(True)
End Sub
''' <summary>
''' Execute the Save. This method is invoked by the SaveCommand.
''' </summary>
Public Sub Save(Optional bShowLoading As Boolean = False)
Map.refSceneHostVM.SaveProject()
End Sub
#End Region ' SaveCommand
#Region "SaveAsCommand"
''' <summary>
''' Returns a command that do SaveAs.
''' </summary>
Public ReadOnly Property SaveAsCommand As ICommand
Get
If m_cmdSaveAs Is Nothing Then
m_cmdSaveAs = New Command(AddressOf SaveAs)
End If
Return m_cmdSaveAs
End Get
End Property
''' <summary>
''' Execute the SaveAs. This method is invoked by the SaveAsCommand.
''' </summary>
Public Sub SaveAs(ByVal param As Object)
Map.refSceneHostVM.SaveAsProject()
End Sub
#End Region ' SaveAsCommand
#Region "Import"
''' <summary>
''' Returns a command that do Import.
''' </summary>
Public ReadOnly Property ImportCommand As ICommand
Get
If m_cmdImport Is Nothing Then
m_cmdImport = New Command(AddressOf Import)
End If
Return m_cmdImport
End Get
End Property
''' <summary>
''' Execute the Import. This method is invoked by the ImportCommand.
''' </summary>
Public Sub Import(ByVal param As Object)
Map.refSceneHostVM.InsertProject()
End Sub
#End Region ' Import
#Region "Options"
''' <summary>
''' Returns a command that do Export.
''' </summary>
Public ReadOnly Property OptionsCommand As ICommand
Get
If m_cmdOptions Is Nothing Then
m_cmdOptions = New Command(AddressOf Options)
End If
Return m_cmdOptions
End Get
End Property
''' <summary>
''' Execute the Export. This method is invoked by the ExportCommand.
''' </summary>
Public Sub Options(ByVal param As Object)
'Dim OptionsWindow As New OptionWindowV
'OptionsWindow.DataContext = New OptionWindowVM
'OptionsWindow.Owner = Application.Current.MainWindow
'OptionsWindow.ShowDialog()
End Sub
#End Region ' Options
#Region "SendFeedback"
''' <summary>
''' Returns a command that do SendFeedback.
''' </summary>
Public ReadOnly Property SendFeedbackCommand As ICommand
Get
If m_cmdSendFeedback Is Nothing Then
m_cmdSendFeedback = New Command(AddressOf SendFeedback)
End If
Return m_cmdSendFeedback
End Get
End Property
''' <summary>
''' Execute the SendFeedback. This method is invoked by the SendFeedbackCommand.
''' </summary>
Public Sub SendFeedback(ByVal param As Object)
' Recupero indirizzo a cui spedire la mail
Dim sSupportAddress As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress)
' se vuoto do messaggio di errore ed esco
If String.IsNullOrWhiteSpace(sSupportAddress) Then
MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' Recupero numero chiave
Dim sKey As String = String.Empty
EgtGetKeyInfo(sKey)
' Recupero file del progetto corrente
Dim sCurrProject As String = String.Empty
EgtGetCurrFilePath(sCurrProject)
' se nome file vuoto, chiedo se si vuole salvare
If String.IsNullOrWhiteSpace(sCurrProject) Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refSceneHostVM.SaveProject()
End If
EgtGetCurrFilePath(sCurrProject)
' se modificato, chiedo se si vuole salvare
Else
If EgtGetModified() Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refSceneHostVM.SaveProject()
End If
End If
End If
' Verifico se il progetto corrente è una porta
Dim nPartId As Integer = EgtGetFirstPart()
If nPartId = GDB_ID.NULL Then
nPartId = EgtGetFirstPartInRawPart(EgtGetFirstRawPart())
End If
Dim sPartName As String = String.Empty
EgtGetName(nPartId, sPartName)
Dim bPrjIsDoor As Boolean = (String.Compare(sPartName, "DOOR") = 0)
' Recupero macchine dei gruppi di lavoro del progetto
Dim Machines As New List(Of String)
Dim nMchGrpId As Integer = EgtGetFirstMachGroup()
While nMchGrpId <> GDB_ID.NULL
Dim sMachineName As String = String.Empty
EgtGetMachGroupMachineName(nMchGrpId, sMachineName)
If Not String.IsNullOrWhiteSpace(sMachineName) Then
Machines.Add(sMachineName)
End If
nMchGrpId = EgtGetNextMachGroup(nMchGrpId)
End While
' Recupero altri file con lo stesso nome del progetto
Dim OtherFiles As New List(Of String)
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
For FileIndex = 0 To TempFiles.Count - 1
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
OtherFiles.Add(TempFiles(FileIndex))
End If
Next
End If
End If
' Creo zip file da allegare
Dim sZipToCreate As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"
If File.Exists(sZipToCreate) Then
File.Delete(sZipToCreate)
End If
Try
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
' aggiungo file macchine
For Each sMachineName As String In Machines
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName
If Directory.Exists(sMachineDir) Then
zip.AddItem(sMachineDir, sMachineName)
End If
Next
' aggiungo progetto corrente
If File.Exists(sCurrProject) Then
zip.AddItem(sCurrProject, "")
End If
' aggiungo file log
If File.Exists(Map.refMainWindowVM.MainWindowM.sLogFile) Then
zip.AddItem(Map.refMainWindowVM.MainWindowM.sLogFile, "")
End If
' aggiungo file ausiliari
For Each sOther As String In OtherFiles
zip.AddItem(sOther, "")
Next
' salvo lo zip
zip.Save()
End Using
Catch ex1 As Exception
EgtOutLog("Exception in zip: " & ex1.ToString())
End Try
' preparo la mail per il supporto
Dim bEx As Boolean = False
Try
Dim sAddressArray As String() = sSupportAddress.Split(CType(",", Char()))
Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("EgtCAM5 Feedback - " & sKey)
SendFeedbackWindow.Recipients.Add(sAddressArray(0))
For index As Integer = 1 To sAddressArray.Length() - 1
SendFeedbackWindow.Recipients.Add(sAddressArray(index), EgtWPFLib5.MapiMailMessage.RecipientType.CC)
Next
If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then
SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip")
End If
SendFeedbackWindow.ShowDialog()
Catch ex As Exception
EgtOutLog("Feedback exception: " & ex.ToString)
bEx = True
End Try
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
Else
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5)
End If
End Sub
#End Region ' SendFeedback
#End Region ' Commands
End Class
+185
View File
@@ -0,0 +1,185 @@
<EgtFloating:EgtFloatingManager x:Class="ProjectV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:PrintApp="clr-namespace:_3dPrintApp">
<!--<EgtFloating:EgtFloatingTray x:Name="PROJECTTOPTRAY" DockPanel.Dock="Top">
-->
<!--<EgtBEAMWALL:ProjManagerV DataContext="{StaticResource ProjManagerVM}"
Visibility="{Binding DataContext.ProjManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>-->
<!--
</EgtFloating:EgtFloatingTray>-->
<!--<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding GridDims[0].GridLen, Mode=TwoWay}"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="{Binding GridDims[1].GridLen, Mode=TwoWay}"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="{Binding GridDims[2].GridLen, Mode=TwoWay}"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="{Binding GridDims[3].GridLen, Mode=TwoWay}"/>
</Grid.RowDefinitions>-->
<!--<EgtBEAMWALL:LeftPanelV Grid.Column="0"
Grid.RowSpan="4"
DataContext="{StaticResource LeftPanelVM}"
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.LeftPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<GridSplitter Grid.Column="1"
Grid.RowSpan="4"
Width="3"
HorizontalAlignment="Center"
VerticalAlignment="Stretch"/>-->
<EgtFloating:EgtFloatingTray x:Name="SCENETOPTRAY"
DockPanel.Dock="Top"
Background="Transparent">
<WrapPanel Orientation="Horizontal" Width="{Binding ActualWidth, ElementName=TOPTRAY}">
<PrintApp:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
<!--<EgtBEAMWALL:ShowBeamPanelV DataContext="{StaticResource ShowBeamPanelVM}"
Visibility="{Binding DataContext.ShowBeamPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>-->
<PrintApp:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
<PrintApp:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
<!--<EgtBEAMWALL:CalcPanelV DataContext="{StaticResource CALCPanelVM}"/>
<EgtBEAMWALL:FreeContourManagerV DataContext="{StaticResource FreeContourManagerVM}"
Visibility="{Binding DataContext.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>-->
<PrintApp:CurrLayerSliderV DataContext="{StaticResource CurrLayerSliderVM}"
VerticalAlignment="Center"/>
<PrintApp:Printing3DPanelV DataContext="{StaticResource Printing3DPanelVM}"/>
</WrapPanel>
</EgtFloating:EgtFloatingTray>
<Grid DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<PrintApp:TopPanelV Grid.Column="1"
DataContext="{Binding DataContext,
RelativeSource={RelativeSource AncestorType={x:Type PrintApp:ProjectV}}}"/>
</Grid>
<Grid DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--StatusBar -->
<PrintApp:StatusBarV DataContext="{StaticResource StatusBarVM}"/>
<PrintApp:MachinePanelV Grid.Column="1"
DataContext="{StaticResource MachinePanelVM}"/>
</Grid>
<DockPanel DockPanel.Dock="Bottom"
LastChildFill="False">
<Grid DockPanel.Dock="Right"
Height="100"
Width="200"
Background="LightGreen"/>
<Grid DockPanel.Dock="Bottom"
Height="20"
Width="400"
Background="Blue"/>
</DockPanel>
<Grid DockPanel.Dock="Left">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<PrintApp:LeftPanelV Grid.Row="1"/>
</Grid>
<!--<Grid Grid.Column="2" Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition MinHeight="5"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>-->
<!--<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid>
-->
<!--<Border Background="Red"
BorderBrush="Blue"
BorderThickness="7"
Height="300"
Width="30"
Panel.ZIndex="1"/>-->
<!--<PrintApp:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>-->
<!--
</Grid>-->
<!--<EgtWPFLib5:AirspacePopup PlacementTarget="{Binding ElementName=SceneHost}"
FollowPlacementTarget="True"
AllowOutsideScreenPlacement="True"
ParentWindow="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
IsOpen="True"
AllowsTransparency="True"
Placement="Center"
IsTopmost="True"
Width="{Binding ElementName=googleBrowser, Path=ActualWidth}"
Height="{Binding ElementName=googleBrowser, Path=ActualHeight}">
<Grid>
<Border Background="Red"
BorderBrush="Blue"
BorderThickness="7"
Height="300"
Width="30"
Panel.ZIndex="1"/>
</Grid>
</EgtWPFLib5:AirspacePopup>-->
<!-- Grid che occupa lo spazio della scena -->
<Grid Background="Transparent"/>
<!--<PrintApp:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>-->
<!--<EgtFloating:EgtFloatingTray x:Name="SCENETOPTRAY"
Grid.Column="2"
Grid.Row="0">
<WrapPanel Orientation="Horizontal" Width="{Binding ActualWidth, ElementName=TOPTRAY}">
<PrintApp:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
</WrapPanel>
</EgtFloating:EgtFloatingTray>-->
<!--</Grid>-->
<!--<EgtBEAMWALL:PartManagerV Grid.Row="1"
DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.PartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>-->
<!--</Grid>-->
<!--<GridSplitter Grid.Column="2"
Grid.Row="2"
Height="3"
HorizontalAlignment="Stretch"/>
<Grid Grid.Column="2"
Grid.Row="3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition MinHeight="5"/>
</Grid.RowDefinitions>
<EgtBEAMWALL:PartManagerV Grid.Row="0"
DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.PartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<Grid Grid.Column="2" Grid.Row="1">
<EgtBEAMWALL:TopPanelV
DataContext="{StaticResource TopPanelVM}"
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.TopPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Height="Auto"/>
<EgtBEAMWALL:BottomPanelV
DataContext="{StaticResource BottomPanelVM}"
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.BottomPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Height="Auto"/>
</Grid>
</Grid>
</Grid>-->
</EgtFloating:EgtFloatingManager>
+3
View File
@@ -0,0 +1,3 @@
Public Class ProjectV
End Class
+478
View File
@@ -0,0 +1,478 @@
Imports System.Windows.Threading
Imports EgtWPFLib5
Imports EgtUILib
Imports System.Collections.ObjectModel
Imports System.IO
Public Class ProjectVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private m_MaterialList As New List(Of String)
Public ReadOnly Property MaterialList As List(Of String)
Get
Return m_MaterialList
End Get
End Property
Private m_SelMaterial As String
Public Property SelMaterial As String
Get
Return m_SelMaterial
End Get
Set(value As String)
m_SelMaterial = value
WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMATERIAL, value)
End Set
End Property
Private m_PartList As New ObservableCollection(Of Print3dPartVM)
Public ReadOnly Property PartList As ObservableCollection(Of Print3dPartVM)
Get
Return m_PartList
End Get
End Property
Private m_SelPart As Print3dPartVM
Public Property SelPart As Print3dPartVM
Get
Return m_SelPart
End Get
Set(value As Print3dPartVM)
m_SelPart = value
' Eseguo la selezione
EgtDeselectAll()
EgtSelectPartObjs(m_SelPart.nPartId)
EgtDraw()
End Set
End Property
Private m_MachiningLib As New List(Of String)
Public ReadOnly Property MachiningLib As List(Of String)
Get
Return m_MachiningLib
End Get
End Property
'Private m_Calc_Timer As New DispatcherTimer
'Private Property m_GridDims As New ObservableCollection(Of GridDimension)
'Public Property GridDims As ObservableCollection(Of GridDimension)
' Get
' Return m_GridDims
' End Get
' Set
' m_GridDims = Value
' NotifyPropertyChanged(NameOf(GridDims))
' End Set
'End Property
'Private m_BTLStructureVM As BTLStructureVM
'Public Property BTLStructureVM As BTLStructureVM
' Get
' Return m_BTLStructureVM
' End Get
' Set(value As BTLStructureVM)
' m_BTLStructureVM = value
' NotifyPropertyChanged(NameOf(BTLStructureVM))
' End Set
'End Property
'Private m_MachGroupPanelVM As MyMachGroupPanelVM
'Public Property MachGroupPanelVM As MyMachGroupPanelVM
' Get
' Return m_MachGroupPanelVM
' End Get
' Set(value As MyMachGroupPanelVM)
' m_MachGroupPanelVM = value
' NotifyPropertyChanged(NameOf(MachGroupPanelVM))
' End Set
'End Property
'Private m_bCalcRunning As Boolean = False
'Public ReadOnly Property bCalcRunning As Boolean
' Get
' Return m_bCalcRunning
' End Get
'End Property
'Private m_bLockUX As Boolean = False
'Private m_LeftPanel_Visibility As Boolean = True
'Public Property LeftPanel_Visibility As Visibility
' Get
' Return If(m_LeftPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_LeftPanel_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetLeftPanel_Visibility(IsVisible As Boolean)
' m_LeftPanel_Visibility = IsVisible
'End Sub
'Private m_TopPanel_Visibility As Boolean = False
'Public Property TopPanel_Visibility As Visibility
' Get
' Return If(m_TopPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_TopPanel_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetTopPanel_Visibility(IsVisible As Boolean)
' m_TopPanel_Visibility = IsVisible
'End Sub
'Private m_BottomPanel_Visibility As Boolean = True
'Public Property BottomPanel_Visibility As Visibility
' Get
' Return If(m_BottomPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_BottomPanel_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetBottomPanel_Visibility(IsVisible As Boolean)
' m_BottomPanel_Visibility = IsVisible
'End Sub
'Private m_PartManager_Visibility As Boolean = True
'Public ReadOnly Property PartManager_Visibility As Visibility
' Get
' Return If(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelBTLPartsCnt = 1, Visibility.Visible, Visibility.Collapsed)
' End Get
'End Property
'Private m_FeatureManager_Visibility As Boolean = True
'Public Property FeatureManager_Visibility As Visibility
' Get
' Return If(m_FeatureManager_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_FeatureManager_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetFeatureManager_Visibility(IsVisible As Boolean)
' m_FeatureManager_Visibility = IsVisible
'End Sub
'Private m_ShowBeamPanel_Visibility As Boolean = True
'Public Property ShowBeamPanel_Visibility As Visibility
' Get
' Return If(m_ShowBeamPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_ShowBeamPanel_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetShowBeamPanel_Visibility(IsVisible As Boolean)
' m_ShowBeamPanel_Visibility = IsVisible
'End Sub
'Private m_ProjManager_Visibility As Boolean = True
'Public Property ProjManager_Visibility As Visibility
' Get
' Return If(m_ProjManager_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_ProjManager_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetProjManager_Visibility(IsVisible As Boolean)
' m_ProjManager_Visibility = IsVisible
'End Sub
'Private m_ProdManager_Visibility As Boolean = True
'Public Property ProdManager_Visibility As Visibility
' Get
' Return If(m_ProdManager_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_ProdManager_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetProdManager_Visibility(IsVisible As Boolean)
' m_ProdManager_Visibility = IsVisible
'End Sub
'Private m_OptimizePanel_Visibility As Boolean = True
'Public Property OptimizePanel_Visibility As Visibility
' Get
' Return If(m_OptimizePanel_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_OptimizePanel_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetOptimizePanel_Visibility(IsVisible As Boolean)
' m_OptimizePanel_Visibility = IsVisible
' NotifyPropertyChanged(NameOf(OptimizePanel_Visibility))
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.CalcRotFlip_Visibility))
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.Optimize_Visibility))
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.OriginType_Visibility))
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.ViewPage_Visibility))
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.MachiningPage_Visibility))
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.NestingOption_Visibility))
'End Sub
'Friend Sub NotifyCalcPanel_Visibility()
' Map.refCALCPanelVM.NotifyPropertyChanged(NameOf(Map.refCALCPanelVM.ViewPage_Visibility))
'End Sub
'Private m_FreeContourManager_Visibility As Boolean = False
'Public Property FreeContourManager_Visibility As Visibility
' Get
' Return If(m_FreeContourManager_Visibility, Visibility.Visible, Visibility.Collapsed)
' End Get
' Set(value As Visibility)
' m_FreeContourManager_Visibility = (value = Visibility.Visible)
' End Set
'End Property
'Friend Sub SetFreeContourManager_Visibility(IsVisible As Boolean)
' m_FreeContourManager_Visibility = IsVisible
' NotifyPropertyChanged("FreeContourManager_Visibility")
'End Sub
'Friend Sub NotifyAllPanelVisibility()
' NotifyPropertyChanged("LeftPanel_Visibility")
' NotifyPropertyChanged("TopPanel_Visibility")
' NotifyPropertyChanged("BottomPanel_Visibility")
' NotifyPropertyChanged("PartManager_Visibility")
' NotifyPropertyChanged("FeatureManager_Visibility")
' NotifyPropertyChanged("ShowBeamPanel_Visibility")
' NotifyPropertyChanged("ProjManager_Visibility")
' NotifyPropertyChanged("ProdManager_Visibility")
' NotifyCalcPanel_Visibility()
'End Sub
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefProjectVM(Me)
' imposto timer per aggiornamenti Calc
'm_Calc_Timer.Interval = TimeSpan.FromMilliseconds(500)
'AddHandler m_Calc_Timer.Tick, AddressOf Calc_Timer_Tick
'' imposto dimensioni colonne/righe della Grid
'DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_VIEW, GridDims)
' carico lista materiali
InitMaterialList()
' carico lista parametri di stampa
InitMachiningsList()
End Sub
#End Region ' CONSTRUCTOR
'#Region "METHODS"
Friend Sub AddNewPart(sFile As String)
' rinomino pezzo e layer
Dim nPartId As Integer = EgtGetLastPart()
EgtSetName(nPartId, "PART")
Dim nLayerId As Integer = EgtGetFirstInGroup(nPartId)
EgtSetName(nLayerId, "OriginalSolid")
' posiziono il pezzo al centro
Dim b3Part As New BBox3d
EgtGetBBoxGlob(nPartId, GDB_BB.EXACT, b3Part)
Dim dPosX As Double = (CurrentMachine.b3Tab.DimX() / 2) - (b3Part.DimX() / 2)
Dim dPosY As Double = (CurrentMachine.b3Tab.DimY() / 2) - (b3Part.DimY() / 2)
' Posiziono il pezzo e aggiorno il suo box
Dim vtMove As Vector3d = New Point3d(dPosX, dPosY, 0) - b3Part.Min()
EgtMove(nPartId, vtMove)
b3Part.Move(vtMove)
' Creo il frame del pezzo
Dim frPart = New Frame3d(b3Part.Center() - 0.5 * b3Part.DimZ() * Vector3d.Z_AX(), Frame3d.TYPE.TOP)
Dim nFrameId = EgtCreateGeoFrame(nPartId, frPart, GDB_RT.GLOB)
If nFrameId <> GDB_ID.NULL Then
EgtSetName(nFrameId, "FramePart")
EgtSetMode(nFrameId, GDB_MD.LOCKED)
End If
EgtAddMachGroup("3dPrint")
EgtSetTable("Tab")
Dim nRawId As Integer = EgtAddRawPart(b3Part.Min, b3Part.DimX, b3Part.DimY, b3Part.DimZ, New Color3d(128, 128, 128, 30))
EgtAddPartToRawPart(nPartId, b3Part.Min, nRawId)
EgtMoveToCornerRawPart(nRawId, New Point3d(dPosX, dPosY, 0), MCH_CR.BL)
EgtResetCurrMachGroup()
' creo lo start point
Dim ptStart As Point3d = b3Part.Center() - 0.6 * b3Part.DimY() * Vector3d.Y_AX() - 0.5 * b3Part.DimZ() * Vector3d.Z_AX()
Dim nPtStartId As Integer = EgtCreateGeoPoint(nPartId, ptStart, GDB_RT.GLOB)
If nPtStartId <> GDB_ID.NULL Then
EgtSetName(nPtStartId, "StartPoint")
EgtSetColor(nPtStartId, New Color3d(255, 0, 0))
End If
' aggiungo a lista pezzi e seleziono
Dim NewPart As New Print3dPartVM(nPartId, sFile)
PartList.Add(NewPart)
SelPart = NewPart
NotifyPropertyChanged(NameOf(SelPart))
End Sub
Friend Sub SelPartFromId(nPartId As Integer)
Dim PartToSel As Print3dPartVM = m_PartList.First(Function(x) x.nPartId = nPartId)
If Not IsNothing(PartToSel) Then
SelPart = PartToSel
NotifyPropertyChanged(NameOf(SelPart))
End If
End Sub
Friend Sub InitMaterialList()
Dim MaterialFiles As String() = Directory.GetFiles(Map.refMainWindowVM.MainWindowM.sMaterialsDir)
For Each Material In MaterialFiles
If String.Compare(Path.GetExtension(Material), "csv", True) Then
MaterialList.Add(Path.GetFileNameWithoutExtension(Material))
End If
Next
Dim sCurrMaterial As String = ""
GetMainPrivateProfileString(S_PRINTING3D, K_CURRMATERIAL, "", sCurrMaterial)
If MaterialList.Contains(sCurrMaterial) Then
m_SelMaterial = sCurrMaterial
End If
End Sub
Friend Sub InitMachiningsList()
Dim MachiningFiles As String() = Directory.GetFiles(Map.refMainWindowVM.MainWindowM.sMachiningsDir)
For Each Machining In MachiningFiles
If String.Compare(Path.GetExtension(Machining), "ini", True) Then
m_MachiningLib.Add(Path.GetFileNameWithoutExtension(Machining))
End If
Next
End Sub
' Friend Sub SetCalcRunning(value As Boolean)
' If value Then m_Calc_Timer.Start()
' m_bCalcRunning = value
' End Sub
' Friend Sub ManageIsEnabled(bIsEnabled As Boolean)
' Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bIsEnabled)
' Map.refCALCPanelVM.SetCalcPanelIsEnabled(bIsEnabled)
' Map.refMainMenuVM.SetMainMenuIsEnabled(bIsEnabled)
' Map.refPartManagerVM.SetPartManagerIsEnabled(bIsEnabled)
' Map.refLeftPanelVM.SetLeftPanelIsEnabled(bIsEnabled)
' Map.refProjManagerVM.SetProjManagerIsEnabled(bIsEnabled)
' Map.refProdManagerVM.SetProdManagerIsEnabled(bIsEnabled)
' Map.refTopPanelVM.SetTopPanelIsEnabled(bIsEnabled)
' Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(bIsEnabled)
' Map.refFeatureManagerVM.SetFeatureManagerIsEnabled(bIsEnabled)
' End Sub
' 'Private Sub Calc_Timer_Tick()
' ' If m_bCalcRunning <> m_bLockUX Then
' ' ' se calcolo iniziato
' ' If m_bCalcRunning Then
' ' ManageIsEnabled(False)
' ' ' aggiungere gestione colonne editabili delle tabelle
' ' If Not IsNothing(Map.refPartListVM.colPart_Do) Then
' ' Map.refPartListVM.colPart_Do.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
' ' Map.refFeatureListVM.colFeature_Do.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refPParameterListVM.colPParam_Value) Then
' ' Map.refPParameterListVM.colPParam_Value.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refQParameterListVM.colQParam_Value) Then
' ' Map.refQParameterListVM.colQParam_Value.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refQParameterListVM.colQParam_Custom) Then
' ' Map.refQParameterListVM.colQParam_Custom.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refRawPartListVM.colRawPart_StartCut) Then
' ' Map.refRawPartListVM.colRawPart_StartCut.IsReadOnly = True
' ' End If
' ' If m_BTLStructureVM.nPROJTYPE <> BWType.BEAM AndAlso Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
' ' Map.refRawPartListVM.colRawPart_W.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refRawPartListVM.colRawPart_L) Then
' ' Map.refRawPartListVM.colRawPart_L.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_Offset) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_Offset.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_Rot) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_Rot.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_Flip) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_Flip.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_PosX) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_PosX.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_PosY) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_PosY.IsReadOnly = True
' ' End If
' ' If Not IsNothing(Map.refFeatureInPartInRawPartListVM.colFeatureInPartInRawPart_Do) Then
' ' Map.refFeatureInPartInRawPartListVM.colFeatureInPartInRawPart_Do.IsReadOnly = True
' ' End If
' ' m_bLockUX = True
' ' ' se calcolo finito
' ' Else
' ' ManageIsEnabled(True)
' ' ' aggiungere gestione colonne editabili delle tabelle
' ' If Not IsNothing(Map.refPartListVM.colPart_Do) Then
' ' Map.refPartListVM.colPart_Do.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
' ' Map.refFeatureListVM.colFeature_Do.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refPParameterListVM.colPParam_Value) Then
' ' Map.refPParameterListVM.colPParam_Value.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refQParameterListVM.colQParam_Value) Then
' ' Map.refQParameterListVM.colQParam_Value.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refQParameterListVM.colQParam_Custom) Then
' ' Map.refQParameterListVM.colQParam_Custom.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refRawPartListVM.colRawPart_StartCut) Then
' ' Map.refRawPartListVM.colRawPart_StartCut.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refRawPartListVM.colRawPart_W) Then
' ' Map.refRawPartListVM.colRawPart_W.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refRawPartListVM.colRawPart_L) Then
' ' Map.refRawPartListVM.colRawPart_L.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_Offset) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_Offset.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_Rot) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_Rot.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_Flip) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_Flip.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_PosX) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_PosX.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refPartInRawPartListVM.colPartInRawPart_PosY) Then
' ' Map.refPartInRawPartListVM.colPartInRawPart_PosY.IsReadOnly = False
' ' End If
' ' If Not IsNothing(Map.refFeatureInPartInRawPartListVM.colFeatureInPartInRawPart_Do) Then
' ' Map.refFeatureInPartInRawPartListVM.colFeatureInPartInRawPart_Do.IsReadOnly = False
' ' End If
' ' ' fermo il timer
' ' If Not m_bCalcRunning Then
' ' m_Calc_Timer.Stop()
' ' m_bLockUX = False
' ' End If
' ' End If
' ' End If
' 'End Sub
'#End Region ' METHODS
End Class
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Some files were not shown because too many files have changed in this diff Show More