Compare commits

..

19 Commits

Author SHA1 Message Date
RenzoL 687933571d - Aggiunti i campi Raggio Epicicli e Distanza Epicicli al MachiningParameterExpander, visibili per Pocketing nel caso di Macchina Stone e utensile Polishing 2022-02-09 09:41:43 +01:00
DarioS 5b01e4ebfe EgtCAM5 2.4b1 :
- ricompilazione con cambio versione.
2022-02-03 21:45:32 +01:00
DarioS 211eb17c49 EgtCAM5 2.4a4 :
- quando si sposta una lavorazione da una fase all'altra si aggiorna la fase corrente.
2022-01-26 08:55:32 +01:00
Emmanuele Sassi 4d898e6423 - Ripristinata generazione cnc per ddf con flag opportuno
- Aggiornata versione
2022-01-20 20:02:35 +01:00
RenzoL bc97e3599f Merge branch 'RenzoL' 2022-01-20 14:39:54 +01:00
RenzoL 8eae142985 - VM della Tabella delle lavorazioni delle travi spostato in EgtWPFLib5 2022-01-20 14:38:10 +01:00
DarioS 921996c39c EgtCAM5 2.4a2 :
- aggiunta gestione file OBJ (Alias-Wavefront).
2022-01-14 18:57:26 +01:00
DarioS 747a34d443 EgtCAM5 2.4a1 :
- ricompilazione per cambio versione.
2022-01-04 08:20:06 +01:00
DarioS e338d3d9ea EgtCAM5 2.3l2 :
- ricompilazione per cambio versione.
2021-12-21 05:36:17 +01:00
DarioS 12c65ff40c EgtCAM5 2.3l1 :
- ricompilazione per cambio versione.
2021-12-08 16:47:23 +01:00
DarioS 672686978d EgtCAM5 2.3k5:
- ricompilazione per cambio versione.
2021-11-22 22:58:43 +01:00
RenzoL dca32c5dcc Merge branch 'develop' 2021-11-17 12:14:53 +01:00
DarioS bc7b5d1da3 EgtCAM5 2.3k4 :
- ricompilazione per cambio versione.
2021-11-15 09:56:24 +01:00
DarioS 908d0bf187 EgtCAM5 2.3k3 :
- ricompilazione per cambio versione.
2021-11-08 19:00:45 +01:00
DarioS fee8a11358 EgtCAM5 2.3k2 :
- ricompilazione per cambio versione.
2021-11-04 10:02:53 +01:00
DarioS 8cbb54a541 EgtCAM5 2.3k1 :
- ricompilazione con cambio versione.
2021-11-03 13:26:30 +01:00
DarioS fdf1661f78 EgtCAM5 2.3j7 :
- ricompilazione per cambio versione.
2021-11-02 08:24:51 +01:00
NicolaP 63a7ea25ba Merge branch 'develop' 2021-10-27 19:34:33 +02:00
Emmanuele Sassi 00b02e3a6b Merge branch 'develop' 2021-10-25 19:21:57 +02:00
15 changed files with 58 additions and 632 deletions
@@ -1,4 +1,6 @@
Public Class BeamMachiningsWindowV
Imports EgtWPFLib5
Public Class BeamMachiningsWindowV
Private WithEvents m_BeamMachiningsWindowVM As BeamMachiningsWindowVM
@@ -1,543 +0,0 @@
Imports System.IO
Imports System.Collections.ObjectModel
Imports EgtUILib
Public Class BeamMachiningsWindowVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private Const MACH_CUT As String = "Cut"
Private Const MACH_DRILL As String = "Drill"
Private Const MACH_MILLING As String = "Milling"
Private Const MACH_POCKETING As String = "Pocketing"
Private Const MACH_SAWING As String = "Sawing"
Private Const MACH_SURFACING As String = "Surfacing"
Private Const ONCONST As String = "On"
Private Const NAME As String = "Name"
Private Const TYPE As String = "Type"
Private Const DATETIME As String = "%DATE_TIME%"
Private Const TABLENAME As String = "%TABLE_NAME%"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_MachiningList As New ObservableCollection(Of String)({MACH_CUT, MACH_DRILL, MACH_MILLING, MACH_POCKETING, MACH_SAWING})
Public ReadOnly Property MachiningList As ObservableCollection(Of String)
Get
Return m_MachiningList
End Get
End Property
Private m_SelMachining As String
Public Property SelMachining As String
Get
Return m_SelMachining
End Get
Set(value As String)
' verifico se pagina precedente modificata
Dim TableModified As Boolean = False
For Each Line In m_TableRowList
If Line.IsModified Then
TableModified = True
Exit For
End If
Next
' se modificata, chiedo se salvare
If TableModified Then
' Salvare le modifiche apportate? - Salva
Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Save()
Case MessageBoxResult.No
' non devo fare nulla
End Select
End If
m_SelMachining = value
LoadMachiningList()
LoadTypeList()
ReadTableFile()
NotifyPropertyChanged("SelMachining")
End Set
End Property
Private Sub SetSelMachining(value As String)
m_SelMachining = value
LoadMachiningList()
LoadTypeList()
ReadTableFile()
NotifyPropertyChanged("SelMachining")
End Sub
Private m_TableRowList As ObservableCollection(Of GridLine)
Public Property TableRowList As ObservableCollection(Of GridLine)
Get
Return m_TableRowList
End Get
Set(value As ObservableCollection(Of GridLine))
m_TableRowList = value
End Set
End Property
Private m_SelRowIndex As Integer = -1
Public Property SelRowIndex As Integer
Get
Return m_SelRowIndex
End Get
Set(value As Integer)
m_SelRowIndex = value
End Set
End Property
Private m_sTitle As String
Private m_BaseDir As String
Private m_MachTypeFilePath As String
Private m_TableTemplateFilePath As String
Private m_IsBeam As Boolean = True
#Region "Messages"
Public ReadOnly Property Title As String
Get
Return m_sTitle
End Get
End Property
Public ReadOnly Property OnHdr As String
Get
Return EgtMsg( 9001) 'On
End Get
End Property
Public ReadOnly Property NameHdr As String
Get
Return EgtMsg( 9002) 'Nome
End Get
End Property
Public ReadOnly Property TypeHdr As String
Get
Return EgtMsg( 9003) 'Tipo
End Get
End Property
Public ReadOnly Property AddRowMsg As String
Get
Return EgtMsg( 9004) 'Aggiungi
End Get
End Property
Public ReadOnly Property DeleteRowMsg As String
Get
Return EgtMsg( 9005) 'Elimina
End Get
End Property
Public ReadOnly Property SaveMsg As String
Get
Return EgtMsg( 9006) 'Salva
End Get
End Property
#End Region ' Messages
' Definizione comandi
Private m_cmdMoveRowUp As ICommand
Private m_cmdMoveRowDown As ICommand
Private m_cmdAddRow As ICommand
Private m_cmdDeleteRow As ICommand
Private m_cmdSave As ICommand
Private m_cmdClose As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New( sTitle As String, sBaseDir As String, sMachTypePath As String, sTabTemplPath As String, Optional bIsBeam As Boolean = True)
' Titolo del dialogo
m_sTitle = sTitle
' Imposto direttorio base e nomi dei file
m_BaseDir = sBaseDir
m_MachTypeFilePath = sMachTypePath
m_TableTemplateFilePath = sTabTemplPath
' Imposto se per travi o pareti
m_IsBeam = bIsBeam
' Se previste, aggiungo lavorazioni di superfici
Dim sDummy As String = ""
If EgtUILib.GetPrivateProfileString( MACH_SURFACING, "1", "", sDummy, m_MachTypeFilePath) > 0 Then
m_MachiningList.Add(MACH_SURFACING)
End If
' Seleziono la prima lavorazione
If m_MachiningList.Count > 0 Then
SetSelMachining( m_MachiningList(0))
End If
NotifyPropertyChanged( "MachiningList")
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Private Function LoadMachiningList() As Boolean
Dim MachiningList As New List(Of String)
Select Case SelMachining
Case MACH_CUT
If m_IsBeam Then
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.SAWBLADE)
Else
LoadMachiningListByType(MachiningList, MCH_MY.SAWING, 0)
End If
Case MACH_DRILL
LoadMachiningListByType(MachiningList, MCH_MY.DRILLING, 0)
LoadMachiningListByType(MachiningList, MCH_MY.POCKETING, 0, False)
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.MILL, False)
Case MACH_MILLING
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.MILL)
Case MACH_POCKETING
LoadMachiningListByType(MachiningList, MCH_MY.POCKETING, 0)
Case MACH_SAWING
LoadMachiningListByType(MachiningList, MCH_MY.MORTISING, 0)
Case MACH_SURFACING
LoadMachiningListByType(MachiningList, MCH_MY.SURFROUGHING, 0)
LoadMachiningListByType(MachiningList, MCH_MY.SURFFINISHING, 0, False)
End Select
GridLine.SetNamesList(New ObservableCollection(Of String)(MachiningList))
Return True
End Function
Private Function LoadTypeList() As Boolean
Dim TypeList As New List(Of String)
Dim Index As Integer = 1
Dim Type As String = ""
While EgtUILib.GetPrivateProfileString( SelMachining, Index.ToString, "", Type, m_MachTypeFilePath) > 0
TypeList.Add(Type)
Index += 1
End While
GridLine.SetTypeList( New ObservableCollection(Of String)( TypeList))
Return True
End Function
Private Function ReadTableFile() As Boolean
' svuoto la lista
m_TableRowList = New ObservableCollection(Of GridLine)
Dim FilePath As String = m_BaseDir & "\" & SelMachining & "Data.lua"
If Not File.Exists(FilePath) Then Return False
Dim FileContent As String() = File.ReadAllLines(FilePath)
Dim FoundTableName As Boolean = False
For LineIndex As Integer = 0 To FileContent.Count - 1
If FileContent(LineIndex).Contains(SelMachining & "Data") Then
FoundTableName = True
End If
Dim Open As Integer = CountCharacter(FileContent(LineIndex), "{"c)
Dim Close As Integer = CountCharacter(FileContent(LineIndex), "}"c)
If Close > Open Then
If FoundTableName Then
FoundTableName = False
End If
End If
If FoundTableName Then
Dim sOn As String = SearchKey(FileContent(LineIndex), ONCONST)
Dim sName As String = SearchKey(FileContent(LineIndex), NAME)
Dim sType As String = SearchKey(FileContent(LineIndex), TYPE)
If Not String.IsNullOrWhiteSpace(sOn) AndAlso Not String.IsNullOrWhiteSpace(sName) AndAlso Not String.IsNullOrWhiteSpace(sType) Then
If String.Compare(sOn, "true", True) = 0 Then
TableRowList.Add(New GridLine(True, sName, sType))
ElseIf String.Compare(sOn, "false", True) = 0 Then
TableRowList.Add(New GridLine(False, sName, sType))
Else
Continue For
End If
End If
End If
Next
NotifyPropertyChanged("TableRowList")
Return True
End Function
Private Function WriteTableFile() As Boolean
' inizio routine di scrittura
Dim FileContent As String() = File.ReadAllLines(m_TableTemplateFilePath)
Dim NewTableFileContent As New List(Of String)
Dim bBeamTable As Boolean = False
For LineIndex As Integer = 0 To FileContent.Count - 1
Dim sCurrLine As String = FileContent(LineIndex)
sCurrLine = sCurrLine.Replace(DATETIME, System.DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"))
sCurrLine = sCurrLine.Replace(TABLENAME, SelMachining & "Data")
If sCurrLine.Contains(SelMachining & "Data") AndAlso sCurrLine.Contains("=") Then
bBeamTable = True
NewTableFileContent.Add(sCurrLine)
PrintActiveMachiningList(NewTableFileContent)
End If
If Not bBeamTable Then
NewTableFileContent.Add(sCurrLine)
Else
bBeamTable = False
End If
Next
Dim FilePath As String = m_BaseDir & "\" & SelMachining & "Data.lua"
File.WriteAllLines(FilePath, NewTableFileContent, Text.Encoding.UTF8)
Return True
End Function
Private Sub PrintActiveMachiningList(NewTableFileContent As List(Of String))
For Index As Integer = 0 To m_TableRowList.Count - 1
If String.IsNullOrEmpty(m_TableRowList(Index).Name) Then Continue For
Dim CurrentLine As String = " { On = " & If(m_TableRowList(Index).OnPar, "true", "false") & ", Name = '" & m_TableRowList(Index).Name & "', Type = '" & m_TableRowList(Index).Type & "'}"
If Index < m_TableRowList.Count - 1 Then
CurrentLine &= ","
End If
NewTableFileContent.Add(CurrentLine)
Next
End Sub
#End Region ' METHODS
#Region "COMMANDS"
#Region "MoveRowUp"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property MoveRowUp_Command As ICommand
Get
If m_cmdMoveRowUp Is Nothing Then
m_cmdMoveRowUp = New Command(AddressOf MoveRowUp)
End If
Return m_cmdMoveRowUp
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub MoveRowUp()
If SelRowIndex > 0 Then
m_TableRowList.Move(SelRowIndex, SelRowIndex - 1)
End If
End Sub
#End Region ' MoveRowUp
#Region "MoveRowDown"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property MoveRowDown_Command As ICommand
Get
If m_cmdMoveRowDown Is Nothing Then
m_cmdMoveRowDown = New Command(AddressOf MoveRowDown)
End If
Return m_cmdMoveRowDown
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub MoveRowDown()
If SelRowIndex < m_TableRowList.Count - 1 Then
m_TableRowList.Move(SelRowIndex, SelRowIndex + 1)
End If
End Sub
#End Region ' MoveRowDown
#Region "AddRow"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property AddRow_Command As ICommand
Get
If m_cmdAddRow Is Nothing Then
m_cmdAddRow = New Command(AddressOf AddRow)
End If
Return m_cmdAddRow
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub AddRow()
m_TableRowList.Insert(SelRowIndex + 1, New GridLine(False, "", ""))
End Sub
#End Region ' AddRow
#Region "DeleteRow"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property DeleteRow_Command As ICommand
Get
If m_cmdDeleteRow Is Nothing Then
m_cmdDeleteRow = New Command(AddressOf DeleteRow)
End If
Return m_cmdDeleteRow
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub DeleteRow()
m_TableRowList.RemoveAt(SelRowIndex)
End Sub
#End Region ' DeleteRow
#Region "Save"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property Save_Command As ICommand
Get
If m_cmdSave Is Nothing Then
m_cmdSave = New Command(AddressOf Save)
End If
Return m_cmdSave
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Save()
' scrivo il file
WriteTableFile()
' resetto le modifiche
For Each Line In m_TableRowList
Line.ResetIsModified()
Next
End Sub
#End Region ' Save
#Region "Close"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property Close_Command As ICommand
Get
If m_cmdClose Is Nothing Then
m_cmdClose = New Command(AddressOf Close)
End If
Return m_cmdClose
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Close()
' verifico se pagina precedente modificata
Dim TableModified As Boolean = False
For Each Line In m_TableRowList
If Line.IsModified Then
TableModified = True
Exit For
End If
Next
' se modificata, chiedo se salvare
If TableModified Then
' Salvare le modifiche apportate? - Salva
Select Case MessageBox.Show( EgtMsg( 9007), EgtMsg( 9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Save()
Case MessageBoxResult.No
' non devo fare nulla
End Select
End If
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Close
#End Region ' COMMANDS
End Class
Public Class GridLine
Inherits VMBase
Friend ReadOnly Property IsModified As Boolean
Get
Return m_IsOnModified Or m_IsNameModified Or m_IsTypeModified
End Get
End Property
Friend Sub ResetIsModified()
m_IsOnModified = False
m_IsNameModified = False
m_IsTypeModified = False
End Sub
Private m_IsOnModified As Boolean = False
Private m_On As Boolean
Public Property OnPar As Boolean
Get
Return m_On
End Get
Set(value As Boolean)
m_On = value
m_IsOnModified = True
End Set
End Property
Private Shared m_NamesList As ObservableCollection(Of String)
Public ReadOnly Property NamesList As ObservableCollection(Of String)
Get
Return m_NamesList
End Get
End Property
Friend Shared Sub SetNamesList(NamesList As ObservableCollection(Of String))
m_NamesList = NamesList
End Sub
Private m_IsNameModified As Boolean = False
Private m_Name As String
Public Property Name As String
Get
Return m_Name
End Get
Set(value As String)
m_Name = value
m_IsNameModified = True
End Set
End Property
Private Shared m_TypeList As ObservableCollection(Of String)
Public ReadOnly Property TypeList As ObservableCollection(Of String)
Get
Return m_TypeList
End Get
End Property
Friend Shared Sub SetTypeList(TypeList As ObservableCollection(Of String))
m_TypeList = TypeList
End Sub
Private m_IsTypeModified As Boolean = False
Private m_Type As String
Public Property Type As String
Get
Return m_Type
End Get
Set(value As String)
m_Type = value
m_IsTypeModified = True
End Set
End Property
Sub New(bOnPar As Boolean, sName As String, sType As String)
m_On = bOnPar
m_Name = sName
m_Type = sType
End Sub
End Class
-1
View File
@@ -150,7 +150,6 @@
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb">
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowVM.vb" />
<Compile Include="CurrSetUp\CurrSetUpV.xaml.vb">
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
</Compile>
+3 -3
View File
@@ -354,8 +354,8 @@ Public Class MainWindowVM
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNestKey( sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2310, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2310, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2402, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2402, 1, IniFile.m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
@@ -448,7 +448,7 @@ Public Class MainWindowVM
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
IniFile.m_nInstance = 1
Dim nMask As Integer = 1
While (nTmp And nMask) <> 0 And IniFile.m_nInstance < MAX_INST
While (nTmp And nMask) <> 0 And IniFile.m_nInstance <= MAX_INST
IniFile.m_nInstance += 1
nMask *= 2
End While
+4 -4
View File
@@ -28,9 +28,9 @@ Imports System.Windows
<Assembly: AssemblyDescription("EgtCAM5 32 bit")>
#End If
#End If
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtCAM5")>
<Assembly: AssemblyCopyright("Copyright © 2016-2021 by EgalTech s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2016-2022 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.10.6")>
<Assembly: AssemblyFileVersion("2.3.10.6")>
<Assembly: AssemblyVersion("2.4.2.1")>
<Assembly: AssemblyFileVersion("2.4.2.1")>
@@ -168,6 +168,18 @@ Public Class MachiningParameterExpanderVM
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
Return StoneSawFinishParamExpanderV
Case MCH_OY.POCKETING
If MatType = MaterialType.STONE Or MatType = MaterialType.STONE5 Then
' se macchina di tipo STONE ricavo il tipo di utensile
Dim sMachiningToolName = String.Empty
EgtMdbSetCurrMachining(sName)
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sMachiningToolName)
EgtTdbSetCurrTool(sMachiningToolName)
Dim dValue As Double = 0
Dim nToolType As Integer
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nToolType)
' se utensile di tipo POLISHING rendo visibili i campi sugli epicicli
If nToolType = MCH_TY.MILL_POLISHING Then m_CurrOperation.Epicycles_Visibility = Visibility.Visible
End If
PocketParamExpanderV.DataContext = m_CurrOperation
Return PocketParamExpanderV
Case MCH_OY.MORTISING
@@ -146,6 +146,20 @@
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding EpicyclesRadTxBl}"
ParamTxBx="{Binding Path=EpicyclesRad,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"
Visibility="{Binding Epicycles_Visibility}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding EpicyclesDistTxBl}"
ParamTxBx="{Binding Path=EpicyclesDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"
Visibility="{Binding Epicycles_Visibility}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
@@ -488,6 +488,7 @@ Public Class OperationsListExpanderVM
OnPropertyChanged( "MoveDown_IsEnabled")
Map.refProjectVM.EmitTitle()
Else
Dim nCurrPhase As Integer = EgtGetOperationPhase(LastSelectedId)
For index As Integer = 0 To indexes.Count - 1
Dim nOpeId As Integer = OperationList( indexes( index) - 1).Id
If EgtGetOperationType( nOpeId) <> MCH_OY.DISP Then
@@ -500,6 +501,8 @@ Public Class OperationsListExpanderVM
EgtSetCurrMachining( PreviousId)
EgtApplyMachining( False)
End If
Dim nNewPhase As Integer = EgtGetOperationPhase(LastSelectedId)
If nNewPhase <> nCurrPhase Then EgtSetCurrPhase( nNewPhase)
EgtDraw()
OnPropertyChanged( NameOf(MoveUp_IsEnabled))
OnPropertyChanged( NameOf(MoveDown_IsEnabled))
+2 -2
View File
@@ -499,7 +499,7 @@ Public Class ProjectVM
Select Case nFileType
Case FT.NGE, FT.NFE
Return m_Controller.OpenProject(sFile, False)
Case FT.DXF, FT.STL, FT._3MF, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
Case FT.DXF, FT.STL, FT._3MF, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
Return m_Controller.ImportProject(sFile, False)
Case FT.TSC, FT.LUA
Return m_Controller.Exec(sFile, False)
@@ -511,7 +511,7 @@ Public Class ProjectVM
Dim nErr As Integer = 0
' Formato descrizione porte
If Path.GetExtension(sFile).ToLower() = ".ddf" Then
nErr = ExecDoors(m_ProjectScene, sFile)
nErr = ExecDoors(m_ProjectScene, sFile, bNcGen, bBatch, nProbing)
'CreateDoors(sFile, bNcGen, bBatch, nProbing)
Map.refProjectVM.EmitTitle()
Return True
+7 -6
View File
@@ -1,6 +1,7 @@
Imports System.IO
Imports System.Globalization
Imports EgtUILib
Imports EgtWPFLib5
Module Beam
@@ -22,7 +23,7 @@ Module Beam
' Recupero lo script da eseguire
Dim sExecPath As String = ""
Dim sExecName As String = ""
GetPrivateProfileString(S_BEAM, If( bBtl, K_BEAMBTLEXEC, K_BEAMBWEEXEC), "", sExecName)
GetPrivateProfileString(S_BEAM, If(bBtl, K_BEAMBTLEXEC, K_BEAMBWEEXEC), "", sExecName)
sExecPath = (IniFile.m_sBeamDirPath & "\" & sExecName).TrimEnd({"\"c})
If Not My.Computer.FileSystem.FileExists(sExecPath) Then
EgtOutLog("Not found BeamExec script " & sExecPath)
@@ -67,15 +68,15 @@ Module Beam
' verifico se ci sono i file ini
Dim sMachTypePath As String = sBaseDir & "\MachiningTypes.ini"
Dim sTabTemplPath As String = sBaseDir & "\BeamTableTemplate.ini"
If File.Exists( sMachTypePath) AndAlso File.Exists( sTabTemplPath) Then
If File.Exists(sMachTypePath) AndAlso File.Exists(sTabTemplPath) Then
' apro finestra di gestione lavorazioni travi
Dim sTitle = EgtMsg( 9000) 'Tabelle delle lavorazioni delle travi
Dim BeamMchsWinVM As New BeamMachiningsWindowVM( sTitle, sBaseDir, sMachTypePath, sTabTemplPath)
Dim BeamMchsWinV As New BeamMachiningsWindowV( Application.Current.MainWindow, BeamMchsWinVM)
Dim sTitle = EgtMsg(9000) 'Tabelle delle lavorazioni delle travi
Dim BeamMchsWinVM As New BeamMachiningsWindowVM(sTitle, sBaseDir, sMachTypePath, sTabTemplPath)
Dim BeamMchsWinV As New BeamMachiningsWindowV(Application.Current.MainWindow, BeamMchsWinVM)
BeamMchsWinV.ShowDialog()
Else
' Impossibile aprire l'Editor delle lavorazioni delle travi.<br/>Mancano i file di configurazione. - Errore
MessageBox.Show( EgtMsg( 9009), EgtMsg( 9008), MessageBoxButton.OK, MessageBoxImage.Stop)
MessageBox.Show(EgtMsg(9009), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
End If
Return True
End Function
+7 -6
View File
@@ -1,6 +1,7 @@
Imports System.IO
Imports System.Globalization
Imports EgtUILib
Imports EgtWPFLib5
Module Wall
@@ -22,7 +23,7 @@ Module Wall
' Recupero lo script da eseguire
Dim sExecPath As String = ""
Dim sExecName As String = ""
GetPrivateProfileString(S_WALL, If( bBtl, K_WALLBTLEXEC, K_WALLBWEEXEC), "", sExecName)
GetPrivateProfileString(S_WALL, If(bBtl, K_WALLBTLEXEC, K_WALLBWEEXEC), "", sExecName)
sExecPath = (IniFile.m_sWallDirPath & "\" & sExecName).TrimEnd({"\"c})
If Not My.Computer.FileSystem.FileExists(sExecPath) Then
EgtOutLog("Not found WallExec script " & sExecPath)
@@ -67,15 +68,15 @@ Module Wall
' verifico se ci sono i file ini
Dim sMachTypePath As String = sBaseDir & "\MachiningTypes.ini"
Dim sTabTemplPath As String = sBaseDir & "\WallTableTemplate.ini"
If File.Exists( sMachTypePath) AndAlso File.Exists( sTabTemplPath) Then
If File.Exists(sMachTypePath) AndAlso File.Exists(sTabTemplPath) Then
' apro finestra di gestione lavorazioni pareti
Dim sTitle = EgtMsg( 9010) 'Tabelle delle lavorazioni delle pareti
Dim WallMchsWinVM As New BeamMachiningsWindowVM( sTitle, sBaseDir, sMachTypePath, sTabTemplPath, False)
Dim WallMchsWinV As New BeamMachiningsWindowV( Application.Current.MainWindow, WallMchsWinVM)
Dim sTitle = EgtMsg(9010) 'Tabelle delle lavorazioni delle pareti
Dim WallMchsWinVM As New BeamMachiningsWindowVM(sTitle, sBaseDir, sMachTypePath, sTabTemplPath, False)
Dim WallMchsWinV As New BeamMachiningsWindowV(Application.Current.MainWindow, WallMchsWinVM)
WallMchsWinV.ShowDialog()
Else
' Impossibile aprire l'Editor delle lavorazioni delle pareti.<br/>Mancano i file di configurazione. - Errore
MessageBox.Show( EgtMsg( 9011), EgtMsg( 9008), MessageBoxButton.OK, MessageBoxImage.Stop)
MessageBox.Show(EgtMsg(9011), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
End If
Return True
End Function
+2 -2
View File
@@ -17,7 +17,7 @@ Imports EgtUILib
Public Module Doors
Function ExecDoors(ByRef scene As Scene, sFilePath As String) As Integer
Function ExecDoors(ByRef scene As Scene, sFilePath As String, Optional bNcGen As Boolean = False, Optional bBatch As Boolean = False, Optional nProbing As Integer = 0) As Integer
' Scelta file DDF
Dim sFile As String
' Se sFilePath non vuoto apro questo file
@@ -44,7 +44,7 @@ Public Module Doors
' Cursore attesa
scene.Cursor = System.Windows.Forms.Cursors.WaitCursor
' Creazione porta
Dim nErr As Integer = CreateDoors(sFile, False, False, 0)
Dim nErr As Integer = CreateDoors(sFile, bNcGen, bBatch, nProbing)
' Scrivo il nome del file aperto in una variabile globale per averlo in caso di errore
IniFile.m_DDFFilePath = sFile
EgtResetCurrPartLayer()
-14
View File
@@ -193,20 +193,6 @@ Public Class MTableListBoxItem
Return ReadDoorsTable(Me)
End Function
Private Function SearchKey(sLine As String, sKey As String) As String
Dim x = Regex.Match(sLine, "[,|{|\s]" & sKey & "\s*=\s*['|\""]?(.*?)\s*?[,|}|'|\""]").Groups(1).Value
Return Regex.Match(sLine, "[,|{|\s]" & sKey & "\s*=\s*['|\""]?(.*?)\s*?[,|}|'|\""]").Groups(1).Value
End Function
Public Function CountCharacter(ByVal sLine As String, ByVal cValue As Char) As Integer
Dim nCount As Integer = 0
Dim cArray() As Char = sLine.ToCharArray
For Index As Integer = 0 To cArray.Count - 1
If cArray(Index) = cValue Then nCount += 1
Next
Return nCount
End Function
Public Function IsModified() As Boolean
Dim CurrIsModified As Boolean = False
' verifico se ci sono stati cambiamenti nell'ordine delle lavorazioni
+1 -13
View File
@@ -2,6 +2,7 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Module TableUtility
@@ -278,19 +279,6 @@ Module TableUtility
End If
End Sub
Friend Function SearchKey(sLine As String, sKey As String) As String
Return Regex.Match(sLine, "[,|{|\s]" & sKey & "\s*=\s*['|\""]?(.*?)\s*?[,|}|'|\""]").Groups(1).Value
End Function
Public Function CountCharacter(ByVal sLine As String, ByVal cValue As Char) As Integer
Dim nCount As Integer = 0
Dim cArray() As Char = sLine.ToCharArray
For Index As Integer = 0 To cArray.Count - 1
If cArray(Index) = cValue Then nCount += 1
Next
Return nCount
End Function
Friend Sub WriteDoorTable(SelectedTable As MTableListBoxItem, sTableNamePath As String)
' controllo e correggo indici gruppi
CheckGroupIndex(SelectedTable)
-37
View File
@@ -82,43 +82,6 @@ Public Module MachineModel
Return ActiveMachiningsFamiliesList.ToArray
End Function
Friend Sub LoadMachiningListByType(MachiningList As List(Of String), nType As MCH_MY)
MachiningList.Clear()
Dim MachiningName As String = String.Empty
EgtMdbGetFirstMachining(nType, MachiningName)
While Not String.IsNullOrWhiteSpace(MachiningName)
MachiningList.Add(MachiningName)
EgtMdbGetNextMachining(nType, MachiningName)
End While
End Sub
Friend Sub LoadMachiningListByType(MachiningList As List(Of String), nMachiningType As MCH_MY, nToolType As MCH_TF, Optional bClearList As Boolean = True)
If bClearList Then MachiningList.Clear()
Dim MachiningName As String = String.Empty
EgtMdbGetFirstMachining(nMachiningType, MachiningName)
While Not String.IsNullOrWhiteSpace(MachiningName)
' se il tipo di utensile è nullo, prendo tutte le lavorazioni
If IsNothing(nToolType) OrElse nToolType = 0 Then
MachiningList.Add(MachiningName)
Else
' recupero l'utensile utilizzato
EgtMdbSetCurrMachining(MachiningName)
Dim sCurrTool As String = String.Empty
Dim sTUUID As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTUUID)
EgtTdbGetToolFromUUID(sTUUID, sCurrTool)
EgtTdbSetCurrTool(sCurrTool)
Dim ToolType As Integer = MCH_TY.NONE
EgtTdbGetCurrToolParam(MCH_TP.TYPE, ToolType)
' se il tipo di utensile coincide, aggiungo la lavorazione
If (ToolType And nToolType) <> 0 Then
MachiningList.Add(MachiningName)
End If
End If
EgtMdbGetNextMachining(nMachiningType, MachiningName)
End While
End Sub
' Funzione che imposta la macchina corrente se la trova, altrimenti chiede se ricaricarla o annullare
Friend Function EgtTrySettingCurrMachine(sMachineName As String) As Boolean
If EgtSetCurrMachine(sMachineName) Then