EgtDOORProbe 1.9i4 :
- primo rilascio.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,14 @@
|
||||
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()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,52 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2015-2017
|
||||
'----------------------------------------------------------------------------
|
||||
' File : ConstGen.vb Data : 10.04.17 Versione : 1.8d1
|
||||
' Contenuto : Modulo costanti generali.
|
||||
'
|
||||
'
|
||||
'
|
||||
' Modifiche : 10.04.17 DS Creazione modulo.
|
||||
'
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
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 = "EgtDOORProbe.lic"
|
||||
Public Const S_LICENCE As String = "Licence"
|
||||
Public Const K_KEY As String = "Key"
|
||||
|
||||
' Abilitazioni licenza
|
||||
Friend Enum KEY_OPT As UInteger
|
||||
CUT_BASE = 1 ' Prodotto OmagCUT
|
||||
MAN_MANIP = 2
|
||||
AUTO_MANIP = 4
|
||||
MAN_PHOTO = 8
|
||||
AUTO_PHOTO = 16
|
||||
AUTO_NESTING = 32
|
||||
ENABLE_MILL = 64
|
||||
PROCUCTION_LINE = 128
|
||||
OFFICE_BASE = 256 ' Prodotto OmagOFFICE
|
||||
VM_MULTI = 512
|
||||
UNDER_CUT = 1024
|
||||
CSV_SIMPLE = 2048
|
||||
PHOTO_BASE = 4096 ' Prodotto OmagPHOTO
|
||||
TRF_IMPORT = 8192
|
||||
End Enum
|
||||
|
||||
' File di log generale
|
||||
Public Const GENLOG_FILE_NAME As String = "EgtDOORProbeLog#.txt"
|
||||
|
||||
' Sottodirettorio di configurazione
|
||||
Public Const CONF_DIR As String = "Config"
|
||||
' Sottodirettorio temporaneo
|
||||
Public Const TEMP_DIR As String = "Temp"
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,50 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' 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.
|
||||
'
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "EgtDOORProbe.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_COMMANDLOG As String = "CommandLog"
|
||||
'Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
'Public Const K_MESSAGES As String = "Messages"
|
||||
Public Const K_EGTCAM5PATH As String = "EgtCAM5Path"
|
||||
Public Const K_CNCFILEPATH As String = "CncFilePath"
|
||||
Public Const K_DATAFILEPATH As String = "DataFilePath"
|
||||
Public Const K_CHECKFILENAME As String = "CheckFileName"
|
||||
Public Const K_DATAFILENAME As String = "DataFileName"
|
||||
Public Const K_PARTPROGRAMFILENAME As String = "PartProgramFileName"
|
||||
Public Const K_PROBINGTIMEOUT As String = "ProbingTimeout"
|
||||
Public Const K_WINPLACE As String = "WinPlace"
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
|
||||
'Public Const S_LANGUAGES As String = "Languages"
|
||||
'Public Const K_LANGUAGE As String = "Language"
|
||||
|
||||
Public Const S_DOORS As String = "Doors"
|
||||
Public Const K_DDFENABLE As String = "DdfEnable"
|
||||
Public Const K_BASEDIR As String = "BaseDir"
|
||||
Public Const K_DDFEXEC As String = "DdfExec"
|
||||
Public Const K_DDFFUNCTION As String = "DdfFun"
|
||||
Public Const K_DDFDIR As String = "DdfDir"
|
||||
Public Const K_DDFDEFAULTDIR As String = "DdfDefaultDir"
|
||||
Public Const K_DDFMACHEXEC As String = "DdfMachExec"
|
||||
Public Const K_TABLESDIR As String = "TablesDir"
|
||||
Public Const K_CURRMTABLE As String = "CurrMTable"
|
||||
Public Const K_MTABLEWINPLACE As String = "MTableWinPlace"
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,52 @@
|
||||
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_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_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,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.40629.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EgtDOORProbe", "EgtDOORProbe.vbproj", "{F1514999-464B-4EB2-A5BA-EF50F31286A0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F1514999-464B-4EB2-A5BA-EF50F31286A0}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{F1514999-464B-4EB2-A5BA-EF50F31286A0}.Debug|x86.Build.0 = Debug|x86
|
||||
{F1514999-464B-4EB2-A5BA-EF50F31286A0}.Release|x86.ActiveCfg = Release|x86
|
||||
{F1514999-464B-4EB2-A5BA-EF50F31286A0}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{F1514999-464B-4EB2-A5BA-EF50F31286A0}</ProjectGuid>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>EgtDOORProbe</RootNamespace>
|
||||
<AssemblyName>EgtDOORProbe</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<MyType>Custom</MyType>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DocumentationFile>EgtDOORProbe.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DocumentationFile>EgtDOORProbe.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\EgtDOORProbe.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib, Version=1.9.9.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="Application.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="ProbingPanel\ProbingPanelV.xaml.vb">
|
||||
<DependentUpon>ProbingPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProbingPanel\ProbingPanelVM.vb" />
|
||||
<Compile Include="StatusBar\StatusBarV.xaml.vb">
|
||||
<DependentUpon>StatusBarV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Map.vb" />
|
||||
<Page Include="MainWindow\MainWindowV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="Application.xaml.vb">
|
||||
<DependentUpon>Application.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Constants\ConstGen.vb" />
|
||||
<Compile Include="Constants\ConstIni.vb" />
|
||||
<Compile Include="MainWindow\MainWindowM.vb" />
|
||||
<Compile Include="MainWindow\MainWindowV.xaml.vb">
|
||||
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="ProbingPanel\ProbingPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="StatusBar\StatusBarV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Utility\Dictionary.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows" />
|
||||
<Import Include="System.Windows.Controls" />
|
||||
<Import Include="System.Windows.Data" />
|
||||
<Import Include="System.Windows.Documents" />
|
||||
<Import Include="System.Windows.Input" />
|
||||
<Import Include="System.Windows.Shapes" />
|
||||
<Import Include="System.Windows.Media" />
|
||||
<Import Include="System.Windows.Media.Imaging" />
|
||||
<Import Include="System.Windows.Navigation" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainWindow\MainWindowVM.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\MyExtensions\MyWpfExtension.vb">
|
||||
<VBMyExtensionTemplateID>Microsoft.VisualBasic.WPF.MyExtension</VBMyExtensionTemplateID>
|
||||
<VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtDOORProbe.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 4.5</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtDOORProbe\EgtDOORProbeR32.exe
|
||||
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtDOORProbe\EgtDOORProbeD32.exe
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,205 @@
|
||||
Imports System.Threading
|
||||
Imports System.Math
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MainWindowM
|
||||
|
||||
#Region "FIELDS"
|
||||
|
||||
Private m_sDataRoot As String = String.Empty
|
||||
Friend ReadOnly Property sDataRoot As String
|
||||
Get
|
||||
Return m_sDataRoot
|
||||
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
|
||||
|
||||
Friend ReadOnly Property sVersion As String
|
||||
Get
|
||||
Return My.Application.Info.Version.Major.ToString() & "." &
|
||||
My.Application.Info.Version.Minor.ToString() &
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sTempDir As String
|
||||
Friend ReadOnly Property sTempDir As String
|
||||
Get
|
||||
Return m_sTempDir
|
||||
End Get
|
||||
End Property
|
||||
Private m_sMachinesRoot As String
|
||||
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()
|
||||
' Verifico sia l'unica istanza
|
||||
ManageSingleIstance()
|
||||
' 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
|
||||
' 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)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 19, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 19, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||
'' 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 livello utilizzatore
|
||||
m_nUserLevel = Math.Min(m_nKeyLevel, GetMainPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||
' Info su opzioni chiave
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString())
|
||||
End Sub
|
||||
|
||||
Private Sub ManageSingleIstance()
|
||||
Dim bCreated As Boolean
|
||||
Try
|
||||
m_objMutex = New Mutex(False, "Global\EgtDOORProbe", bCreated)
|
||||
Catch
|
||||
bCreated = False
|
||||
End Try
|
||||
If Not bCreated 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("EgtDOORProbeR32")
|
||||
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("EgtDOORProbeR64")
|
||||
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
|
||||
End Sub
|
||||
|
||||
Friend Function GetKeyOption(nKeyOpt As KEY_OPT) As Boolean
|
||||
Return ((m_nKeyOptions And nKeyOpt) <> 0)
|
||||
End Function
|
||||
|
||||
Friend Sub Close()
|
||||
' Terminazione generale di EgtInterface
|
||||
EgtExit()
|
||||
' Rilascio mutex
|
||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,24 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtDOORProbe="clr-namespace:EgtDOORProbe"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
DataContext="{StaticResource MainWindowVM}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
Title="{Binding Title}" Icon="/Resources/EgtDOORProbe.ico"
|
||||
WindowStyle="None" ResizeMode="NoResize" IsResizable="False"
|
||||
SizeToContent="Height" Width="350">
|
||||
|
||||
<!--Pannello principale -->
|
||||
<DockPanel>
|
||||
|
||||
<!--StatusBar -->
|
||||
<EgtDOORProbe:StatusBarV DataContext="{StaticResource StatusBarVM}"
|
||||
DockPanel.Dock="Bottom"/>
|
||||
|
||||
<!--Contenuto interfaccia -->
|
||||
<EgtDOORProbe:ProbingPanelV DataContext="{StaticResource ProbingPanelVM}"/>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,38 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Class MainWindowV
|
||||
|
||||
Private m_MainWindowVM As MainWindowVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Funzione che interpreta l'xaml
|
||||
InitializeComponent()
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_MainWindowVM = DirectCast(Me.DataContext, MainWindowVM)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Carico e imposto posizione finestra
|
||||
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||
m_MainWindowVM.ContentRendered()
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindowV_Unloaded(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||
' Salvo posizione finestra (se non minimizzata)
|
||||
If WindowState <> WindowState.Minimized Then
|
||||
WinPosFromWindowToIni(Me, S_GENERAL, K_WINPLACE)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,82 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MainWindowVM
|
||||
Inherits VMBase
|
||||
|
||||
' 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 Property Title As String
|
||||
Get
|
||||
Return m_Title
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Title = value
|
||||
NotifyPropertyChanged("Title")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#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
|
||||
' imposto titolo finestra
|
||||
m_Title = "EgtDOORProbe"
|
||||
NotifyPropertyChanged("Title")
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub SetTitle(sTitle As String)
|
||||
m_Title = sTitle
|
||||
NotifyPropertyChanged("Title")
|
||||
End Sub
|
||||
|
||||
Friend Sub ContentRendered()
|
||||
' 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
|
||||
' Se istanza oltre la prima, chiedo cosa aprire
|
||||
If Not m_MainWindowM.bFirstInstance Then
|
||||
' OmagOFFICEMap.refTopCommandBarVM.Open()
|
||||
' ' altrimenti verifico se richiesto ultimo progetto
|
||||
'ElseIf GetMainPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0) = 1 Then
|
||||
' Dim sLastProjectPath As String = String.Empty
|
||||
' GetMainPrivateProfileString(S_GENERAL, K_LASTPROJ, String.Empty, sLastProjectPath)
|
||||
' If Not String.IsNullOrWhiteSpace(sLastProjectPath) AndAlso File.Exists(sLastProjectPath) Then
|
||||
' OmagOFFICEMap.refTopCommandBarVM.OpenProject(sLastProjectPath)
|
||||
' Else
|
||||
' OmagOFFICEMap.refTopCommandBarVM.NewCmd()
|
||||
' End If
|
||||
' altrimenti nuovo progetto
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,64 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Globalization
|
||||
Imports System.Resources
|
||||
Imports System.Windows
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
#If DEBUG Then
|
||||
<Assembly: AssemblyTitle("EgtDOORProbe Debug 32 bit")>
|
||||
<Assembly: AssemblyDescription("EgtDOORProbeD32.exe")>
|
||||
#Else
|
||||
<Assembly: AssemblyTitle("EgtDOORProbe Release 32 bit")>
|
||||
<Assembly: AssemblyDescription("EgtDOORProbeR32.exe")>
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtDOORProbe")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2018-2018 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
'In order to begin building localizable applications, set
|
||||
'<UICulture>CultureYouAreCodingWith</UICulture> in your .vbproj file
|
||||
'inside a <PropertyGroup>. For example, if you are using US english
|
||||
'in your source files, set the <UICulture> to "en-US". Then uncomment the
|
||||
'NeutralResourceLanguage attribute below. Update the "en-US" in the line
|
||||
'below to match the UICulture setting in the project file.
|
||||
|
||||
'<Assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)>
|
||||
|
||||
|
||||
'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
|
||||
'1st parameter: where theme specific resource dictionaries are located
|
||||
'(used if a resource is not found in the page,
|
||||
' or application resource dictionaries)
|
||||
|
||||
'2nd parameter: where the generic resource dictionary is located
|
||||
'(used if a resource is not found in the page,
|
||||
'app, and any theme specific resource dictionaries)
|
||||
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
|
||||
|
||||
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("7aae8abd-2ea2-4478-9193-4d3aa4f3b52b")>
|
||||
|
||||
' 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.9.9.4")>
|
||||
<Assembly: AssemblyFileVersion("1.9.9.4")>
|
||||
@@ -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
|
||||
Generated
+63
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <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
|
||||
|
||||
Imports System
|
||||
|
||||
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("EgtDOORProbe.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
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Generated
+71
@@ -0,0 +1,71 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <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
|
||||
|
||||
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.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
|
||||
|
||||
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.EgtDOORProbe.MySettings
|
||||
Get
|
||||
Return Global.EgtDOORProbe.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,63 @@
|
||||
<StackPanel x:Class="ProbingPanelV"
|
||||
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"
|
||||
Margin="5,5,5,0">
|
||||
|
||||
<Button Content="Open DDF"
|
||||
Command="{Binding OpenDDF_Command}"
|
||||
IsEnabled="{Binding OpenDDF_IsEnabled}"
|
||||
Style="{StaticResource Main_TextButton}"
|
||||
Margin="0,0,0,5"/>
|
||||
<TextBlock Text="{Binding DDFPath}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="300"
|
||||
Height="30"
|
||||
Margin="0,0,0,5"/>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="Property:"/>
|
||||
<TextBlock Text="{Binding DoorType}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="Width:"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Width}"
|
||||
IsReadOnly="True"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="Height:"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Height}"
|
||||
IsReadOnly="True"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="Thickness:"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Thickness}"
|
||||
IsReadOnly="True"/>
|
||||
</UniformGrid>
|
||||
<Button Content="Generate"
|
||||
Command="{Binding Generate_Command}"
|
||||
IsEnabled="{Binding Generate_IsEnabled}"
|
||||
Style="{StaticResource Main_TextButton}"
|
||||
Margin="0,0,0,5"/>
|
||||
<TextBlock Text="{Binding Status}"
|
||||
Width="300"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
FontSize="22"
|
||||
Height="90"
|
||||
Margin="0,0,0,5"/>
|
||||
<ProgressBar Value="{Binding Progress_Value}"
|
||||
Height="40"
|
||||
Width="330"
|
||||
IsEnabled="{Binding Timer_IsEnabled}"
|
||||
Margin="0,0,0,5"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
IsEnabled="{Binding Timer_IsEnabled}"
|
||||
Style="{StaticResource Main_TextButton}"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
</StackPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ProbingPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,611 @@
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtWPFLib5
|
||||
Imports System.IO
|
||||
|
||||
Public Class ProbingPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Public Enum Properties As Integer
|
||||
NULL = 0
|
||||
SKINNED = 1
|
||||
EXTRUDED = 2
|
||||
NOTHING_ = 3
|
||||
End Enum
|
||||
|
||||
' Path di EgtCAM5
|
||||
Private m_EgtCAM5Path As String
|
||||
Private m_CncFilePath As String
|
||||
Private m_DataFilePath As String
|
||||
Private m_CheckFileName As String
|
||||
Private m_DataFileName As String
|
||||
Private m_PartProgFileName As String
|
||||
|
||||
' Timer d'attesa
|
||||
Private m_Timer As New DispatcherTimer
|
||||
|
||||
Private m_DDFPath As String
|
||||
Public ReadOnly Property DDFPath As String
|
||||
Get
|
||||
Return m_DDFPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DoorProperty As Properties
|
||||
Public ReadOnly Property DoorProperty As Properties
|
||||
Get
|
||||
Return m_DoorProperty
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DoorType As String
|
||||
Get
|
||||
Select Case m_DoorProperty
|
||||
Case Properties.SKINNED
|
||||
Return "Skinned"
|
||||
Case Properties.EXTRUDED
|
||||
Return "Extruded"
|
||||
Case Properties.NOTHING_
|
||||
Return "Nothing"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Width As String
|
||||
Public Property Width As String
|
||||
Get
|
||||
Return m_Width
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Width = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Height As String
|
||||
Public Property Height As String
|
||||
Get
|
||||
Return m_Height
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Height = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Thickness As String
|
||||
Public Property Thickness As String
|
||||
Get
|
||||
Return m_Thickness
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Thickness = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Status As String
|
||||
Public Property Status As String
|
||||
Get
|
||||
Return m_Status
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Status = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Progress_Value As Double
|
||||
Get
|
||||
Return m_Timer_Time / m_Timer_TimeOut * 100
|
||||
End Get
|
||||
Set(value As Double)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_OpenDDF_IsEnabled As Boolean
|
||||
Public Property OpenDDF_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_OpenDDF_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_OpenDDF_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Generate_IsEnabled As Boolean
|
||||
Public Property Generate_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_Generate_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_Generate_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Timer_IsEnabled As Boolean = False
|
||||
Public Property Timer_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_Timer_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_Timer_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Tempo per cui il timer resta in attesa, espresso in secondi
|
||||
Private m_Timer_TimeOut As Integer
|
||||
Private m_Timer_Time As Integer
|
||||
|
||||
' definizione comandi
|
||||
Private m_cmdOpenDDF As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
Private m_cmdGenerate As ICommand
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Leggo path EgtCAM5
|
||||
Dim sTemp As String = ""
|
||||
GetMainPrivateProfileString(S_GENERAL, K_EGTCAM5PATH, "", sTemp)
|
||||
' verifico che esista il file d'esecuzione
|
||||
If File.Exists(sTemp) Then
|
||||
m_EgtCAM5Path = sTemp
|
||||
Else
|
||||
MessageBox.Show("Can't find EgtCAM5 in the configured path." & Environment.NewLine &
|
||||
"Try to check in the Config.ini file." & Environment.NewLine &
|
||||
"The program will close", "Error!", MessageBoxButton.OK)
|
||||
End
|
||||
End If
|
||||
' Leggo path CNC File
|
||||
GetMainPrivateProfileString(S_GENERAL, K_CNCFILEPATH, "", sTemp)
|
||||
' verifico che esista il file d'esecuzione
|
||||
If Directory.Exists(sTemp) Then
|
||||
m_CncFilePath = sTemp
|
||||
Else
|
||||
MessageBox.Show("Can't find CNC file path." & Environment.NewLine &
|
||||
"Try to check in the Config.ini file." & Environment.NewLine &
|
||||
"The program will close", "Error!", MessageBoxButton.OK)
|
||||
End
|
||||
End If
|
||||
' Leggo path Data File
|
||||
GetMainPrivateProfileString(S_GENERAL, K_DATAFILEPATH, "", sTemp)
|
||||
' verifico che esista il file d'esecuzione
|
||||
If Directory.Exists(sTemp) Then
|
||||
m_DataFilePath = sTemp
|
||||
Else
|
||||
MessageBox.Show("Can't find Data path." & Environment.NewLine &
|
||||
"Try to check in the Config.ini file." & Environment.NewLine &
|
||||
"The program will close", "Error!", MessageBoxButton.OK)
|
||||
End
|
||||
End If
|
||||
' Leggo nome Part Program File
|
||||
GetMainPrivateProfileString(S_GENERAL, K_PARTPROGRAMFILENAME, "", sTemp)
|
||||
' verifico che non sia vuoto
|
||||
If Not String.IsNullOrWhiteSpace(sTemp) Then
|
||||
m_PartProgFileName = sTemp
|
||||
Else
|
||||
m_PartProgFileName = "Door.cnc"
|
||||
End If
|
||||
' Leggo nome Data File
|
||||
GetMainPrivateProfileString(S_GENERAL, K_DATAFILENAME, "", sTemp)
|
||||
' verifico che non sia vuoto
|
||||
If Not String.IsNullOrWhiteSpace(sTemp) Then
|
||||
m_DataFileName = sTemp
|
||||
Else
|
||||
m_DataFileName = "Data.dat"
|
||||
End If
|
||||
' Leggo nome Check File
|
||||
GetMainPrivateProfileString(S_GENERAL, K_CHECKFILENAME, "", sTemp)
|
||||
' verifico che non sia vuoto
|
||||
If Not String.IsNullOrWhiteSpace(sTemp) Then
|
||||
m_CheckFileName = sTemp
|
||||
Else
|
||||
m_CheckFileName = "PCHK.txt"
|
||||
End If
|
||||
' settaggi timer
|
||||
AddHandler m_Timer.Tick, AddressOf WaitingTimer_Tick
|
||||
m_Timer.Interval = TimeSpan.FromMilliseconds(1000)
|
||||
' Leggo timeout
|
||||
Dim nTemp As Integer = 0
|
||||
GetMainPrivateProfileString(S_GENERAL, K_PROBINGTIMEOUT, "60", sTemp)
|
||||
If Not String.IsNullOrWhiteSpace(sTemp) And Integer.TryParse(sTemp, nTemp) Then
|
||||
m_Timer_TimeOut = nTemp
|
||||
Else
|
||||
m_Timer_TimeOut = 60
|
||||
End If
|
||||
' Attivo bottone apertura DDF
|
||||
EnableDDFButton(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub SetStatus(sValue As String)
|
||||
m_Status = sValue
|
||||
NotifyPropertyChanged("Status")
|
||||
End Sub
|
||||
|
||||
Private Sub ResetStatus()
|
||||
m_Status = ""
|
||||
NotifyPropertyChanged("Status")
|
||||
End Sub
|
||||
|
||||
Private Sub WaitingTimer_Tick(sender As Object, e As System.EventArgs)
|
||||
' incremento il contatore
|
||||
m_Timer_Time += 1
|
||||
NotifyPropertyChanged("Progress_Value")
|
||||
' se trova il file di fine tastatura
|
||||
Dim EndProbeFilePath As String = m_DataFilePath & m_CheckFileName
|
||||
If File.Exists(EndProbeFilePath) Then
|
||||
' fermo il timer
|
||||
m_Timer.Stop()
|
||||
m_Timer_Time = 0
|
||||
m_Timer_IsEnabled = False
|
||||
NotifyPropertyChanged("Progress_Value")
|
||||
NotifyPropertyChanged("Timer_IsEnabled")
|
||||
SetStatus("Probe completed")
|
||||
' lancio calcolo porta da file tastatura
|
||||
GenAfterProbe()
|
||||
EnableDDFButton(True)
|
||||
End If
|
||||
' verifico che non sia finito il tempo di attesa
|
||||
If m_Timer_Time >= m_Timer_TimeOut Then
|
||||
m_Timer.Stop()
|
||||
m_Timer_Time = 0
|
||||
m_Timer_IsEnabled = False
|
||||
NotifyPropertyChanged("Progress_Value")
|
||||
NotifyPropertyChanged("Timer_IsEnabled")
|
||||
SetStatus("Error in probing, can't find the probe file")
|
||||
EnableDDFButton(True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GenAfterProbe()
|
||||
' verifico se esiste il file dati del probe
|
||||
Dim DataFile As String = m_DataFilePath & m_DataFileName
|
||||
If Not File.Exists(DataFile) Then
|
||||
SetStatus("Can't find the Probe Data File")
|
||||
Return
|
||||
End If
|
||||
SetStatus("Start recalculating door from probe dimensions")
|
||||
' copio file probe data in cartella ddf
|
||||
Try
|
||||
File.Copy(DataFile, Path.GetDirectoryName(m_DDFPath) & "\" & "Data.dat")
|
||||
Catch ex As Exception
|
||||
SetStatus("Error in copying the Probe Data File to the PC")
|
||||
Return
|
||||
End Try
|
||||
' cancello file probe data sul CN
|
||||
Try
|
||||
File.Delete(DataFile)
|
||||
Catch ex As Exception
|
||||
SetStatus("Error in deleting the Probe Data File on the CNC" &
|
||||
Environment.NewLine & "Please, delete it manually")
|
||||
System.Threading.Thread.Sleep(2000)
|
||||
End Try
|
||||
' cancello file txt e cnc del ddf
|
||||
Try
|
||||
File.Delete(Path.ChangeExtension(m_DDFPath, ".txt"))
|
||||
File.Delete(Path.ChangeExtension(m_DDFPath, ".cnc"))
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
' Lancio il programma in cieco per generazione porta ricalcolata
|
||||
Dim GenFilePath As String = Path.ChangeExtension(m_DDFPath, ".cnc")
|
||||
SetStatus("Generating the Part Program")
|
||||
Try
|
||||
Dim CommandLine As String = """" & m_DDFPath & """ " & "4"
|
||||
Process.Start(m_EgtCAM5Path, CommandLine)
|
||||
Dim bTxtOk As Boolean = False
|
||||
For I = 0 To 150
|
||||
' aspetto che venga generato il txt del ddf
|
||||
If Not bTxtOk AndAlso File.Exists(Path.ChangeExtension(m_DDFPath, ".txt")) Then
|
||||
bTxtOk = True
|
||||
' pausa necessaria, altrimenti copia un file vuoto!
|
||||
System.Threading.Thread.Sleep(1000)
|
||||
End If
|
||||
If bTxtOk AndAlso File.Exists(GenFilePath) Then
|
||||
SetStatus("Part program correctly generated")
|
||||
Exit Try
|
||||
End If
|
||||
' Aspetto e costringo ad aggiornare UI
|
||||
System.Threading.Thread.Sleep(100)
|
||||
UpdateUI()
|
||||
Next
|
||||
SetStatus("Error in Part Program generation!")
|
||||
Return
|
||||
Catch ex As Exception
|
||||
SetStatus("Error in Part Program generation!")
|
||||
Return
|
||||
End Try
|
||||
SetStatus("Copying the Part Program to the CNC")
|
||||
' copio il programma sul CN
|
||||
Try
|
||||
Dim NcFilePath As String = m_CncFilePath & "\" &
|
||||
m_PartProgFileName &
|
||||
".cnc"
|
||||
File.Delete(NcFilePath)
|
||||
File.Copy(Path.ChangeExtension(m_DDFPath, ".cnc"), NcFilePath)
|
||||
SetStatus("Part program copied to the CNC, activate it and start the machine")
|
||||
Catch ex As Exception
|
||||
SetStatus("Error in copying the Part Program to the CNC")
|
||||
Return
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "OpenDDF"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property OpenDDF_Command() As ICommand
|
||||
Get
|
||||
If m_cmdOpenDDF Is Nothing Then
|
||||
m_cmdOpenDDF = New Command(AddressOf OpenDDF)
|
||||
End If
|
||||
Return m_cmdOpenDDF
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub OpenDDF(ByVal param As Object)
|
||||
' verifico che non sia in corso una tastatura
|
||||
If m_Timer.IsEnabled Then Return
|
||||
Dim Path_IsValid As Boolean = False
|
||||
' Direttorio corrente per file DDF
|
||||
Dim sDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_DOORS, K_DDFDIR, "", sDir)
|
||||
' apro finestra di scelta file
|
||||
Dim OpenFileDialogWnd As New Microsoft.Win32.OpenFileDialog With {
|
||||
.Title = "Open DDF",
|
||||
.Filter = "DDF File(*.ddf)|*.ddf",
|
||||
.FilterIndex = 1,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialogWnd.ShowDialog Then Return
|
||||
' segno path ottenuta
|
||||
Dim TempPath As String = OpenFileDialogWnd.FileName
|
||||
' verifico di aver ricevuto una path valida
|
||||
If File.Exists(TempPath) And Path.GetExtension(TempPath) = ".ddf" Then
|
||||
m_DDFPath = TempPath
|
||||
Path_IsValid = True
|
||||
' segno path in ini file
|
||||
WriteMainPrivateProfileString(S_DOORS, K_DDFDIR, System.IO.Path.GetDirectoryName(TempPath))
|
||||
Else
|
||||
m_DDFPath = String.Empty
|
||||
Path_IsValid = False
|
||||
End If
|
||||
' se path valida
|
||||
If Path_IsValid Then
|
||||
' provo a leggere il file
|
||||
Dim FileContent As String() = File.ReadAllLines(m_DDFPath)
|
||||
If FileContent.Length = 0 Then
|
||||
Map.refStatusBarVM.SetOutputMessage("Impossible to read this DDF file", MSG_TYPE.ERROR_)
|
||||
Return
|
||||
End If
|
||||
' scansiono il contenuto del file
|
||||
Dim bPropertiesFounded As Boolean = False
|
||||
Dim bSizeFounded As Boolean = False
|
||||
Dim bWidthFounded As Boolean = False
|
||||
Dim bHeightFounded As Boolean = False
|
||||
Dim bThicknessFounded As Boolean = False
|
||||
For LineIndex As Integer = 0 To FileContent.Count - 1
|
||||
Dim sFileLine As String = FileContent(LineIndex)
|
||||
' se riga vuota, salto alla prossima
|
||||
If String.IsNullOrWhiteSpace(sFileLine) Then Continue For
|
||||
' se riga di commento, salto alla prossima
|
||||
If sFileLine(0) = "#" Then Continue For
|
||||
' elimino commento all'interno della riga
|
||||
If sFileLine.Contains("#") Then
|
||||
Strings.Left(sFileLine, InStr(sFileLine, "#"))
|
||||
End If
|
||||
' cerco la proprietà
|
||||
If sFileLine.Contains("properties:") Then
|
||||
If sFileLine.Contains("skinned") Then
|
||||
m_DoorProperty = Properties.SKINNED
|
||||
ElseIf sFileLine.Contains("extruded") Then
|
||||
m_DoorProperty = Properties.EXTRUDED
|
||||
Else
|
||||
m_DoorProperty = Properties.NOTHING_
|
||||
End If
|
||||
bPropertiesFounded = True
|
||||
End If
|
||||
' cerco dimensioni porta
|
||||
If Not bSizeFounded And sFileLine.Contains("size:") Then
|
||||
bSizeFounded = True
|
||||
Continue For
|
||||
End If
|
||||
If Not bThicknessFounded And bHeightFounded Then
|
||||
bThicknessFounded = CheckDoorDimension(sFileLine, "thickness:", m_Thickness)
|
||||
End If
|
||||
If Not bHeightFounded And bWidthFounded Then
|
||||
bHeightFounded = CheckDoorDimension(sFileLine, "height:", m_Height)
|
||||
End If
|
||||
If Not bWidthFounded And bSizeFounded Then
|
||||
bWidthFounded = CheckDoorDimension(sFileLine, "width:", m_Width)
|
||||
End If
|
||||
Next
|
||||
' se non ho trovato dimensioni, errore e disattivo interfaccia
|
||||
If Not bSizeFounded Or Not bThicknessFounded Then
|
||||
Map.refStatusBarVM.SetOutputMessage("Impossible to read this DDF file", MSG_TYPE.ERROR_)
|
||||
m_Generate_IsEnabled = False
|
||||
Return
|
||||
Else
|
||||
Map.refStatusBarVM.SetOutputMessage("DDF correctly opened", 5, MSG_TYPE.INFO)
|
||||
m_Generate_IsEnabled = True
|
||||
End If
|
||||
' se non ho trovato opzioni, setto a NULL
|
||||
If Not bPropertiesFounded Then m_DoorProperty = Properties.NOTHING_
|
||||
Else
|
||||
Map.refStatusBarVM.SetOutputMessage("Impossible to read this DDF file", MSG_TYPE.ERROR_)
|
||||
' disabilito interfaccia
|
||||
m_Generate_IsEnabled = False
|
||||
End If
|
||||
' resetto stato
|
||||
ResetStatus()
|
||||
' aggiorno valori interfaccia
|
||||
NotifyPropertyChanged("Generate_IsEnabled")
|
||||
NotifyPropertyChanged("DDFPath")
|
||||
NotifyPropertyChanged("DoorType")
|
||||
NotifyPropertyChanged("Width")
|
||||
NotifyPropertyChanged("Height")
|
||||
NotifyPropertyChanged("Thickness")
|
||||
End Sub
|
||||
|
||||
Private Function CheckDoorDimension(sFileLine As String, sKey As String, ByRef sDimension As String) As Boolean
|
||||
If sFileLine.Contains(sKey) Then
|
||||
CleanValueString(sFileLine, sKey, sDimension)
|
||||
Return True
|
||||
Else
|
||||
Map.refStatusBarVM.SetOutputMessage("Impossible to read this DDF file", MSG_TYPE.ERROR_)
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub CleanValueString(sFileLine As String, sKey As String, ByRef sResult As String)
|
||||
Dim sTemp As String = sFileLine
|
||||
sTemp = sTemp.Replace(sKey, "")
|
||||
sTemp = sTemp.Trim()
|
||||
sResult = sTemp
|
||||
End Sub
|
||||
|
||||
#End Region ' OpenDDF
|
||||
|
||||
#Region "Generate"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property Generate_Command() As ICommand
|
||||
Get
|
||||
If m_cmdGenerate Is Nothing Then
|
||||
m_cmdGenerate = New Command(AddressOf Generate)
|
||||
End If
|
||||
Return m_cmdGenerate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub Generate(ByVal param As Object)
|
||||
' se nessuna proprietà impostata do errore ed esco
|
||||
If m_DoorProperty = Properties.NULL Then
|
||||
Map.refStatusBarVM.SetOutputMessage("Error, proprerty not readed!", MSG_TYPE.ERROR_)
|
||||
Return
|
||||
End If
|
||||
' disabilito bottone apri DDF
|
||||
EnableDDFButton(False)
|
||||
' cancello file txt e cnc del ddf
|
||||
Try
|
||||
File.Delete(Path.ChangeExtension(m_DDFPath, ".txt"))
|
||||
File.Delete(Path.ChangeExtension(m_DDFPath, ".cnc"))
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
' Inizio generazione primo PartProgram per entrambe le modalità
|
||||
Dim bIsSkinned As Boolean = m_DoorProperty = Properties.SKINNED
|
||||
Dim sProgramMsg As String = If(bIsSkinned, "Probing Part Program", "Part Program")
|
||||
Dim GenFileExtension As String = If(bIsSkinned, ".prb", ".cnc")
|
||||
Dim GenFilePath As String = Path.ChangeExtension(m_DDFPath, GenFileExtension)
|
||||
SetStatus("Generating the " & sProgramMsg)
|
||||
' Lancio il programma in cieco per generazione normale
|
||||
Try
|
||||
Dim CommandLine As String = """" & m_DDFPath & """ " & If(bIsSkinned, "3", "2")
|
||||
Process.Start(m_EgtCAM5Path, CommandLine)
|
||||
Dim bTxtOk As Boolean = False
|
||||
For I = 0 To 150
|
||||
' aspetto che venga generato il txt del ddf
|
||||
If Not bTxtOk AndAlso File.Exists(Path.ChangeExtension(m_DDFPath, ".txt")) Then
|
||||
bTxtOk = True
|
||||
' pausa necessaria, altrimenti copia un file vuoto!
|
||||
System.Threading.Thread.Sleep(1000)
|
||||
End If
|
||||
If bTxtOk AndAlso File.Exists(GenFilePath) Then
|
||||
SetStatus(sProgramMsg & " correctly generated")
|
||||
Exit Try
|
||||
End If
|
||||
' Aspetto e costringo ad aggiornare UI
|
||||
System.Threading.Thread.Sleep(100)
|
||||
UpdateUI()
|
||||
Next
|
||||
SetStatus("Error in " & sProgramMsg & " generation!")
|
||||
EnableDDFButton(True)
|
||||
Return
|
||||
Catch ex As Exception
|
||||
SetStatus("Error in " & sProgramMsg & " generation!")
|
||||
EnableDDFButton(True)
|
||||
Return
|
||||
End Try
|
||||
SetStatus("Copying the " & sProgramMsg & " to the CNC")
|
||||
' copio il programma sul CN
|
||||
Try
|
||||
Dim NcFilePath As String = m_CncFilePath & "\" &
|
||||
m_PartProgFileName &
|
||||
GenFileExtension
|
||||
File.Delete(NcFilePath)
|
||||
File.Copy(Path.ChangeExtension(m_DDFPath, GenFileExtension), NcFilePath)
|
||||
SetStatus(sProgramMsg & " copied to the CNC, activate it and start the machine")
|
||||
Catch ex As Exception
|
||||
SetStatus("Error in copying the " & sProgramMsg & " to the CNC")
|
||||
EnableDDFButton(True)
|
||||
Return
|
||||
End Try
|
||||
' se skinned
|
||||
If m_DoorProperty = Properties.SKINNED Then
|
||||
' cancello file di fine tastatura precedente
|
||||
Dim EndProbeFilePath As String = m_DataFilePath & m_CheckFileName
|
||||
Try
|
||||
File.Delete(EndProbeFilePath)
|
||||
Catch ex As Exception
|
||||
SetStatus("Error in deleting the probe end file on the CNC" &
|
||||
Environment.NewLine & "Please, delete it manually")
|
||||
End Try
|
||||
' avvio timer d'attesa
|
||||
m_Timer.Start()
|
||||
m_Timer_Time = 0
|
||||
m_Timer_IsEnabled = True
|
||||
NotifyPropertyChanged("Progress_Value")
|
||||
NotifyPropertyChanged("Timer_IsEnabled")
|
||||
Else
|
||||
EnableDDFButton(True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub EnableDDFButton(value As Boolean)
|
||||
' abilito bottone apri DDF
|
||||
m_OpenDDF_IsEnabled = value
|
||||
NotifyPropertyChanged("OpenDDF_IsEnabled")
|
||||
End Sub
|
||||
|
||||
#End Region ' Generate
|
||||
|
||||
#Region "Cancel"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property Cancel_Command() As ICommand
|
||||
Get
|
||||
If m_cmdCancel Is Nothing Then
|
||||
m_cmdCancel = New Command(AddressOf Cancel)
|
||||
End If
|
||||
Return m_cmdCancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub Cancel(ByVal param As Object)
|
||||
' se timer non attivo esco
|
||||
If Not m_Timer.IsEnabled Then Return
|
||||
' ferma il timer di attesa
|
||||
m_Timer.Stop()
|
||||
m_Timer_Time = 0
|
||||
m_Timer_IsEnabled = False
|
||||
NotifyPropertyChanged("Progress_Value")
|
||||
NotifyPropertyChanged("Timer_IsEnabled")
|
||||
SetStatus("Probing waiting cycle manually interrupted")
|
||||
' abilito bottone apri DDF
|
||||
m_OpenDDF_IsEnabled = True
|
||||
NotifyPropertyChanged("OpenDDF_IsEnabled")
|
||||
End Sub
|
||||
|
||||
#End Region ' Cancel
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
@@ -0,0 +1,22 @@
|
||||
<StatusBar x:Class="StatusBarV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{StaticResource Egt_Blue1}">
|
||||
|
||||
<StatusBar.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
</ItemsPanelTemplate>
|
||||
</StatusBar.ItemsPanel>
|
||||
|
||||
<!--Stringa di output messaggi-->
|
||||
<StatusBarItem Grid.Column="0">
|
||||
<TextBlock Text="{Binding OutputMessage}"
|
||||
Foreground="{Binding OutputMessage_Foreground}"/>
|
||||
</StatusBarItem>
|
||||
|
||||
</StatusBar>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class StatusBarV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,513 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtDOORProbe="clr-namespace:EgtDOORProbe"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||
|
||||
<!--
|
||||
Assign a Key to every Panel ViewModel to use
|
||||
it in xaml file(ProjectView.xaml).
|
||||
-->
|
||||
<EgtDOORProbe:MainWindowVM x:Key="MainWindowVM"/>
|
||||
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
|
||||
<EgtDOORProbe:ProbingPanelVM x:Key="ProbingPanelVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="Egt_Blue1" Color="#FF4D84C4" />
|
||||
<SolidColorBrush x:Key="Egt_Blue2" Color="#FF7096CE" />
|
||||
<SolidColorBrush x:Key="Egt_Blue3" Color="#FF90ABD9" />
|
||||
<SolidColorBrush x:Key="Egt_Blue4" Color="#FFB2C3E4" />
|
||||
<SolidColorBrush x:Key="Egt_White" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="Egt_Gray" Color="#FF585858" />
|
||||
<SolidColorBrush x:Key="Egt_LightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="Egt_UltralightGray" Color="#FFF2F2F2" />
|
||||
<SolidColorBrush x:Key="Egt_Green" Color="#FF00FF00" />
|
||||
|
||||
|
||||
<!--<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
||||
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
||||
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
||||
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
||||
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
||||
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
||||
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />-->
|
||||
|
||||
<!--Colori per EgtWPFLib5-->
|
||||
<SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/>
|
||||
<!--Colori per TabHeader-->
|
||||
<LinearGradientBrush x:Key="TabItem.Static.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="#F0F0F0" Offset="0.0"/>
|
||||
<GradientStop Color="#E5E5E5" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!--Risorsa che toglie le animazioni dai menù popup per evitare che i menù mru di scelta dei file rimangano aperti se il file è grosso -->
|
||||
<!--o viene eseguito un lua che non aggiorna l'interfaccia-->
|
||||
<PopupAnimation x:Key="{x:Static SystemParameters.MenuPopupAnimationKey}">None</PopupAnimation>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- FocusVisual standard-->
|
||||
<Style x:Key="FocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- Button Style -->
|
||||
|
||||
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Margin" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||
<Setter Property="OpacityMask" Value="#54707070"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="WrapButton_DataTemplate">
|
||||
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
|
||||
</DataTemplate>
|
||||
|
||||
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="80"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Setter Property="Height" Value="45"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="Main_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="200"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- ToggleButton Style -->
|
||||
|
||||
<Style TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Margin" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Button.IsDefaulted" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||
<Setter Property="OpacityMask" Value="#54707070"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="70"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- TextBlock -->
|
||||
|
||||
<Style x:Key="ToolsTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="Margin" Value="10,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MachiningsTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="Margin" Value="10,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MachiningsToolTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="Margin" Value="10,5,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ValidationErrorTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="FontStyle" Value="Italic"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="Foreground" Value="Red"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="0,1"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- TextBox -->
|
||||
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
|
||||
<Setter Property="Height" Value="22"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
||||
<Setter Property="ExplicitUpdateSource" Value="EnterKeyPress"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolsTextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
|
||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MachiningsTextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
|
||||
<Setter Property="Margin" Value="0,0,0,10"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MachiningsToolTextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
|
||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- MachGroup -->
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Background" Color="#F0F0F0"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Border" Color="#F0F0F0"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Glyph" Color="#FFFFFF"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Glyph" Color="#000000"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Glyph" Color="#BFBFBF"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Glyph" Color="#606060"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Background" Color="#DADADA"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Border" Color="#DADADA"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Background" Color="#606060"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Border" Color="#606060"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Background" Color="#F0F0F0"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Border" Color="#F0F0F0"/>
|
||||
<Style x:Key="CustomScrollBarButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border x:Name="border" CornerRadius="3" BorderBrush="{StaticResource ScrollBar.Static.Border}" BorderThickness="1" Background="{StaticResource ScrollBar.Static.Background}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/>
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.Disabled.Border}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- Border -->
|
||||
|
||||
<Style x:Key="DefaultBorder" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderBrush" Value="#D5DFE5"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="Padding" Value="3"/>
|
||||
<Setter Property="Margin" Value="1"/>
|
||||
</Style>
|
||||
|
||||
<!--<Style x:Key="Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="Padding" Value="3"/>
|
||||
</Style>-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- EgtCustomWindow -->
|
||||
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
<Setter Property="TitleBarHeight" Value="32"/>
|
||||
<Setter Property="TitleBarBrush" Value="{StaticResource Egt_Blue1}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Egt_Blue1}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- EgtFloatingPanel -->
|
||||
|
||||
<!--<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="IsFloating" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="IsToolBar" Value="False"/>
|
||||
<Setter Property="TitleBarOrientation" Value="Vertical"/>
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="IsFloating" Value="False"/>
|
||||
</Style>-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- CsvTreeViewItem DA CAMBIARE!! -->
|
||||
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Checked.Fill" Color="#FF595959"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Checked.Stroke" Color="#FF262626"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Stroke" Color="#FF1BBBFA"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Fill" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Checked.Stroke" Color="#FF262626"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Checked.Fill" Color="#FF595959"/>
|
||||
<PathGeometry x:Key="TreeArrow" Figures="M0,0 L0,6 L6,0 z"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Fill" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Stroke" Color="#FF989898"/>
|
||||
<Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Width" Value="16"/>
|
||||
<Setter Property="Height" Value="16"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border Background="Transparent" Height="16" Padding="5,5,5,5" Width="16">
|
||||
<Path x:Name="ExpandPath" Data="{StaticResource TreeArrow}" Fill="{StaticResource TreeViewItem.TreeArrow.Static.Fill}" Stroke="{StaticResource TreeViewItem.TreeArrow.Static.Stroke}">
|
||||
<Path.RenderTransform>
|
||||
<RotateTransform Angle="135" CenterY="3" CenterX="3"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="RenderTransform" TargetName="ExpandPath">
|
||||
<Setter.Value>
|
||||
<RotateTransform Angle="180" CenterY="3" CenterX="3"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.Static.Checked.Fill}"/>
|
||||
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.Static.Checked.Stroke}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Stroke}"/>
|
||||
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Fill}"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsMouseOver" Value="True"/>
|
||||
<Condition Property="IsChecked" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Checked.Stroke}"/>
|
||||
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Checked.Fill}"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CsvPartItemStyle" TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="ExpanderBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||
</Border>
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="false">
|
||||
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
|
||||
<Setter Property="Background" TargetName="ExpanderBorder" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" TargetName="ExpanderBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" TargetName="ExpanderBorder" Value="1,1,0,1"/>
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||
</Trigger>
|
||||
<!--<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</MultiTrigger>-->
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- ComboBox -->
|
||||
|
||||
<Style x:Key="MachiningsComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
|
||||
<Setter Property="Margin" Value="0,0,0,10"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MachiningsToolComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
|
||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- CheckBox -->
|
||||
|
||||
<Style x:Key="OptionCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="10,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,59 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module Map
|
||||
|
||||
Private m_refMainWindowVM As MainWindowVM
|
||||
Private m_refProbingPanelVM As ProbingPanelVM
|
||||
|
||||
#Region "Get"
|
||||
|
||||
Public ReadOnly Property refMainWindowVM As MainWindowVM
|
||||
Get
|
||||
Return m_refMainWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refStatusBarVM As StatusBarVM
|
||||
Get
|
||||
Return LibMap.refStatusBarVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refProbingPanelVM As ProbingPanelVM
|
||||
Get
|
||||
Return m_refProbingPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
|
||||
Friend Function SetRefStatusBarVM(StatusBarVM As StatusBarVM) As Boolean
|
||||
LibMap.SetRefStatusBarVM(StatusBarVM)
|
||||
Return Not IsNothing(LibMap.refStatusBarVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefProbingPanelVM(ProbingPanelVM As ProbingPanelVM) As Boolean
|
||||
m_refProbingPanelVM = ProbingPanelVM
|
||||
Return Not IsNothing(m_refProbingPanelVM)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
#Region "Init"
|
||||
|
||||
Friend Function BeginInit(MainWindowVM As MainWindowVM) As Boolean
|
||||
m_refMainWindowVM = MainWindowVM
|
||||
Return Not IsNothing(m_refMainWindowVM)
|
||||
End Function
|
||||
|
||||
Friend Function EndInit() As Boolean
|
||||
' Verifico se tutti i pezzi necessari sono stati caricati
|
||||
Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(LibMap.refStatusBarVM) AndAlso
|
||||
Not IsNothing(m_refProbingPanelVM) AndAlso LibMap.EndInit()
|
||||
End Function
|
||||
|
||||
#End Region ' Init
|
||||
|
||||
End Module
|
||||
Reference in New Issue
Block a user