EgtDOORProbe 2.1g1 :
- Modificato per far funzionare tastature su porte senza proprietà.
This commit is contained in:
@@ -29,6 +29,7 @@ Module ConstIni
|
||||
Public Const K_DATAFILENAME As String = "DataFileName"
|
||||
Public Const K_PARTPROGRAMFILENAME As String = "PartProgramFileName"
|
||||
Public Const K_PROBINGTIMEOUT As String = "ProbingTimeout"
|
||||
Public Const K_PROBINGMODE As String = "ProbingMode"
|
||||
Public Const K_WINPLACE As String = "WinPlace"
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtDOORProbe")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2018-2018 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2018-2019 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -60,5 +60,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.9.5")>
|
||||
<Assembly: AssemblyFileVersion("1.9.9.5")>
|
||||
<Assembly: AssemblyVersion("2.1.7.1")>
|
||||
<Assembly: AssemblyFileVersion("2.1.7.1")>
|
||||
|
||||
@@ -16,7 +16,16 @@
|
||||
Margin="0,0,0,5"/>
|
||||
<UniformGrid Columns="2"
|
||||
Width="200"
|
||||
Margin="0,0,0,5">
|
||||
Margin="0,0,0,5"
|
||||
Visibility="{Binding DoorMeasuring_Visibility}">
|
||||
<TextBlock Text="Door measuring:"/>
|
||||
<CheckBox IsChecked="{Binding DoorMeasuring}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2"
|
||||
Width="200"
|
||||
Margin="0,0,0,5"
|
||||
Visibility="{Binding DoorProperty_Visibility}">
|
||||
<TextBlock Text="Property:"/>
|
||||
<TextBlock Text="{Binding DoorType}"/>
|
||||
</UniformGrid>
|
||||
|
||||
@@ -5,6 +5,11 @@ Imports System.IO
|
||||
Public Class ProbingPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Public Enum ProbingModes As Integer
|
||||
STANDARD = 0
|
||||
PROPERTIES = 1
|
||||
End Enum
|
||||
|
||||
Public Enum Properties As Integer
|
||||
NULL = 0
|
||||
SKINNED = 1
|
||||
@@ -52,6 +57,30 @@ Public Class ProbingPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DoorProperty_Visibility As Visibility
|
||||
Public ReadOnly Property DoorProperty_Visibility As Visibility
|
||||
Get
|
||||
Return m_DoorProperty_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DoorMeasuring As Boolean
|
||||
Public Property DoorMeasuring As Boolean
|
||||
Get
|
||||
Return m_DoorMeasuring
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_DoorMeasuring = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_DoorMeasuring_Visibility As Visibility
|
||||
Public ReadOnly Property DoorMeasuring_Visibility As Visibility
|
||||
Get
|
||||
Return m_DoorMeasuring_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Width As String
|
||||
Public Property Width As String
|
||||
Get
|
||||
@@ -134,6 +163,9 @@ Public Class ProbingPanelVM
|
||||
Private m_Timer_TimeOut As Integer
|
||||
Private m_Timer_Time As Integer
|
||||
|
||||
' Modalità di tastatura
|
||||
Private m_ProbingMode As ProbingModes = ProbingModes.PROPERTIES
|
||||
|
||||
' definizione comandi
|
||||
Private m_cmdOpenDDF As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
@@ -211,6 +243,17 @@ Public Class ProbingPanelVM
|
||||
Else
|
||||
m_Timer_TimeOut = 60
|
||||
End If
|
||||
' Leggo modalità di tastatura
|
||||
m_ProbingMode = GetMainPrivateProfileInt(S_GENERAL, K_PROBINGMODE, 1)
|
||||
If m_ProbingMode = ProbingModes.PROPERTIES Then
|
||||
m_DoorProperty_Visibility = Visibility.Visible
|
||||
m_DoorMeasuring_Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_DoorProperty_Visibility = Visibility.Collapsed
|
||||
m_DoorMeasuring_Visibility = Visibility.Visible
|
||||
End If
|
||||
NotifyPropertyChanged("DoorProperty_Visibility")
|
||||
NotifyPropertyChanged("DoorMeasuring_Visibility")
|
||||
' Attivo bottone apertura DDF
|
||||
EnableDDFButton(True)
|
||||
End Sub
|
||||
@@ -488,8 +531,8 @@ Public Class ProbingPanelVM
|
||||
|
||||
' 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
|
||||
' se modalità proprietà e nessuna proprietà impostata do errore ed esco
|
||||
If m_ProbingMode = ProbingModes.PROPERTIES And m_DoorProperty = Properties.NULL Then
|
||||
Map.refStatusBarVM.SetOutputMessage("Error, proprerty not readed!", MSG_TYPE.ERROR_)
|
||||
Return
|
||||
End If
|
||||
@@ -502,15 +545,21 @@ Public Class ProbingPanelVM
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
' Verifico se generazione normale o con misurazione
|
||||
Dim bIsMeasureProbing As Boolean = False
|
||||
If m_ProbingMode = ProbingModes.PROPERTIES Then
|
||||
bIsMeasureProbing = m_DoorProperty = Properties.SKINNED
|
||||
Else
|
||||
bIsMeasureProbing = m_DoorMeasuring
|
||||
End If
|
||||
' 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 sProgramMsg As String = If(bIsMeasureProbing, "Probing Part Program", "Part Program")
|
||||
Dim GenFileExtension As String = If(bIsMeasureProbing, ".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")
|
||||
Dim CommandLine As String = """" & m_DDFPath & """ " & If(bIsMeasureProbing, "3", "2")
|
||||
Process.Start(m_EgtCAM5Path, CommandLine)
|
||||
Dim bTxtOk As Boolean = False
|
||||
For I = 0 To 150
|
||||
@@ -553,7 +602,7 @@ Public Class ProbingPanelVM
|
||||
Return
|
||||
End Try
|
||||
' se skinned
|
||||
If m_DoorProperty = Properties.SKINNED Then
|
||||
If bIsMeasureProbing Then
|
||||
' cancello file di fine tastatura precedente
|
||||
Dim EndProbeFilePath As String = m_DataFilePath & m_CheckFileName
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user