Compare commits

..

3 Commits

Author SHA1 Message Date
Demetrio Cassarino d4b55f730a - Aggiornamento di tutte le messagebox a egtmessagebox 2023-05-26 10:21:46 +02:00
Emmanuele Sassi d74bc0f4d2 - ottimizzazione costruttori in EgtMessageBoxVM 2023-05-25 15:54:32 +02:00
Emmanuele Sassi c17e80af2b - Aggiunta EgtMessageBox 2023-05-25 14:57:31 +02:00
42 changed files with 664 additions and 976 deletions
@@ -66,7 +66,8 @@ Public Class ChooseMachineWndVM
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
Else Else
' se non seleziono nessuna macchina lo segnalo con un MessageBox ' se non seleziono nessuna macchina lo segnalo con un MessageBox
MessageBox.Show("No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error) ' MessageBox.Show("No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
End Sub End Sub
-23
View File
@@ -108,7 +108,6 @@
Public Const MAC_PREFLOWDELAY = "PreFlowDelay" Public Const MAC_PREFLOWDELAY = "PreFlowDelay"
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay" Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
Public Const MAC_SCREWBACK = "ScrewBack" Public Const MAC_SCREWBACK = "ScrewBack"
Public Const MAC_SLICINGHEIGHT = "SlicingHeight"
Public Const MAC_RIBSTYPE = "RibsType" Public Const MAC_RIBSTYPE = "RibsType"
Public Const MAC_RIBSOVERLAP = "RibsOverlap" Public Const MAC_RIBSOVERLAP = "RibsOverlap"
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount" Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
@@ -130,35 +129,13 @@
Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir" Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir"
Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap" Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap"
Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill" Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill"
Public Const MAC_AUXSOLIDSINFILLLINK = "AuxSolidsInfillLink"
Public Const MAC_AUXSOLIDSSTRANDCOUNT = "AuxSolidsStrandCount"
Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder" Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder"
Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType" Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType"
Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam" Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam"
Public Const MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE = "AuxSolidsStartPointOffsetOnSlice" Public Const MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE = "AuxSolidsStartPointOffsetOnSlice"
Public Const MAC_AUXSOLIDSOFFSETLEADPOINT = "AuxSolidsOffsetLeadPoint"
Public Const MAC_AUXSOLIDSDENSITY = "AuxSolidsDensity"
Public Const MAC_AUXSOLIDSGRIDOVERLAP = "AuxSolidsGridOverlap"
Public Const MAC_AUXSOLIDSDIRECTION = "AuxSolidsDirection"
Public Const MAC_AUXSOLIDSOFFSETX = "AuxSolidsOffsetX"
Public Const MAC_AUXSOLIDSOFFSETY = "AuxSolidsOffsetY"
Public Const MAC_AUXSOLIDSCOASTINGLEN = "AuxSolidsCoastingLen" Public Const MAC_AUXSOLIDSCOASTINGLEN = "AuxSolidsCoastingLen"
Public Const MAC_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen" Public Const MAC_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen"
Public Const MAC_AUXSOLIDSWIPEDIR = "AuxSolidsWipeDir" Public Const MAC_AUXSOLIDSWIPEDIR = "AuxSolidsWipeDir"
Public Const MAC_FLOORTYPE = "FloorType"
Public Const MAC_CEILCOUNT = "CeilCount"
Public Const MAC_CEILTYPE = "CeilType"
Public Const MAC_INFILLTYPE = "InfillType"
Public Const MAC_INFILLLINK = "InfillLink"
Public Const MAC_INFILLDENSITY = "InfillDensity"
Public Const MAC_INFILLOVERLAP = "InfillOverlap"
Public Const MAC_INFILLGRIDOVERLAP = "InfillGridOverlap"
Public Const MAC_INFILLDIRECTION = "InfillDirection"
Public Const MAC_INFILLOFFSETX = "InfillOffsetX"
Public Const MAC_INFILLOFFSETY = "InfillOffsetY"
Public Const MAC_INFILLCOASTING = "InfillCoasting"
Public Const MAC_INFILLWIPE = "InfillWipe"
Public Const MAC_INFILLWIPEDIR = "InfillWipeDir"
Public Const MAC_DYNAMICMODE = "DynamicMode" Public Const MAC_DYNAMICMODE = "DynamicMode"
Public Const MAC_PRINTORDER = "PrintOrder" Public Const MAC_PRINTORDER = "PrintOrder"
Public Const MAC_CONSTANT = "Constant" Public Const MAC_CONSTANT = "Constant"
-1
View File
@@ -21,7 +21,6 @@ Public Module ConstGen
' File con dati di licenza ' File con dati di licenza
Public Const LIC_FILE_NAME As String = "Icarus.lic" Public Const LIC_FILE_NAME As String = "Icarus.lic"
Public Const S_LICENCE As String = "Licence" Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key" Public Const K_KEY As String = "Key"
Public Const K_NESTKEY As String = "NestKey" Public Const K_NESTKEY As String = "NestKey"
-1
View File
@@ -26,7 +26,6 @@ Public Module ConstIni
'Public Const K_MESSAGES As String = "Messages" 'Public Const K_MESSAGES As String = "Messages"
'Public Const K_WINPLACE As String = "WinPlace" 'Public Const K_WINPLACE As String = "WinPlace"
'Public Const K_LASTPROJ As String = "LastProj" 'Public Const K_LASTPROJ As String = "LastProj"
Public Const K_NETKEY As String = "NetKey"
Public Const K_LASTNGEDIR As String = "LastNgeDir" Public Const K_LASTNGEDIR As String = "LastNgeDir"
Public Const K_LASTIMPDIR As String = "LastImpDir" Public Const K_LASTIMPDIR As String = "LastImpDir"
'Public Const K_SUPPORT As String = "Support" 'Public Const K_SUPPORT As String = "Support"
-1
View File
@@ -10,7 +10,6 @@
Public Const K_SLICINGTYPE As String = "SlicingType" Public Const K_SLICINGTYPE As String = "SlicingType"
Public Const K_SPEED_MIN As String = "SpeedMin" Public Const K_SPEED_MIN As String = "SpeedMin"
Public Const K_SPEED_MAX As String = "SpeedMax" Public Const K_SPEED_MAX As String = "SpeedMax"
Public Const K_MAX_HEIGHT As String = "HMax"
Public Const S_MINMAX As String = "MinMax" Public Const S_MINMAX As String = "MinMax"
+9 -193
View File
@@ -111,7 +111,6 @@ Public Class CurrMachining
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, False))
For Each Cathegory In m_CathegoryList For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList For Each MachiningParam In Cathegory.MachiningParamList
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
@@ -129,7 +128,6 @@ Public Class CurrMachining
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, True))
For Each Cathegory In m_CathegoryList For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList For Each MachiningParam In Cathegory.MachiningParamList
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
@@ -211,6 +209,7 @@ Public Class CurrMachiningCathegory
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me),
@@ -220,8 +219,7 @@ Public Class CurrMachiningCathegory
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb, Me), New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me)})
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.LINK Case Cathegories.LINK
m_sName = "Shell" m_sName = "Shell"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me), m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
@@ -263,40 +261,15 @@ Public Class CurrMachiningCathegory
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)}) New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.AUX_SOLID Case Cathegories.AUX_SOLID
m_sName = "Filled Solid" m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me), m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb, Me)}) New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.INFILL
m_sName = "Infill"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.FLOORTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.CEILCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.CEILTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.INFILLTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.INFILLLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDENSITY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETX, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLCOASTING, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
End Select End Select
' verifico dipendenze tra parametri ' verifico dipendenze tra parametri
Select Case m_Type Select Case m_Type
@@ -315,19 +288,6 @@ Public Class CurrMachiningCathegory
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param) Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam() MachiningParam.ManageDependencyParam()
Next Next
For Each Param In {MachiningParam.Params.AUXSOLIDSSTRANDCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.INFILL
For Each Param In {MachiningParam.Params.FLOORCOUNT, MachiningParam.Params.CEILCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
For Each Param In {MachiningParam.Params.INFILLTYPE}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select End Select
End Sub End Sub
@@ -368,7 +328,6 @@ Public Class CurrNumericMachiningParam
End If End If
NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(sValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb)) NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
ManageDependencyParam()
End Set End Set
End Property End Property
@@ -467,9 +426,6 @@ Public Class CurrNumericMachiningParam
Case Params.SCREWBACK Case Params.SCREWBACK
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
m_bIsLen = True m_bIsLen = True
Case Params.SLICINGHEIGHT
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGHEIGHT, m_dValue)
m_bIsLen = True
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
m_bIsLen = False m_bIsLen = False
@@ -509,30 +465,9 @@ Public Class CurrNumericMachiningParam
Case Params.AUXSOLIDSLINKPARAM Case Params.AUXSOLIDSLINKPARAM
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
m_bIsLen = True m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
m_bIsLen = False
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
m_bIsLen = True m_bIsLen = True
Case Params.AUXSOLIDSOFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSDENSITY
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSGRIDOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSDIRECTION
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETX
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETY
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
m_bIsLen = True m_bIsLen = True
@@ -545,43 +480,13 @@ Public Class CurrNumericMachiningParam
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
m_bIsLen = False m_bIsLen = False
Case Params.CEILCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILCOUNT, m_dValue)
m_bIsLen = False
Case Params.INFILLDENSITY
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDENSITY, m_dValue)
m_bIsLen = False
Case Params.INFILLOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOVERLAP, m_dValue)
m_bIsLen = False
Case Params.INFILLGRIDOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLGRIDOVERLAP, m_dValue)
m_bIsLen = False
Case Params.INFILLDIRECTION
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDIRECTION, m_dValue)
m_bIsLen = False
Case Params.INFILLOFFSETX
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETX, m_dValue)
m_bIsLen = True
Case Params.INFILLOFFSETY
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETY, m_dValue)
m_bIsLen = True
Case Params.INFILLCOASTING
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLCOASTING, m_dValue)
m_bIsLen = True
Case Params.INFILLWIPE
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPE, m_dValue)
m_bIsLen = True
Case Params.INFILLWIPEDIR
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPEDIR, m_dValue)
m_bIsLen = False
End Select End Select
m_dOrigValue = m_dValue m_dOrigValue = m_dValue
If nIndex > 0 Then If nIndex > 0 Then
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex) Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
Select Case Type Select Case Type
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE, Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT Params.FLOORCOUNT, Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.LINKPARAM, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST, Case Params.LINKPARAM, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC, Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
@@ -594,14 +499,8 @@ Public Class CurrNumericMachiningParam
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
Params.AUXSOLIDSOFFSETLEADPOINT, Params.AUXSOLIDSDENSITY, Params.AUXSOLIDSGRIDOVERLAP, Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR
Params.AUXSOLIDSDIRECTION, Params.AUXSOLIDSOFFSETX, Params.AUXSOLIDSOFFSETY,
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR, Params.AUXSOLIDSSTRANDCOUNT
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.FLOORCOUNT, Params.CEILCOUNT, Params.INFILLDENSITY, Params.INFILLOVERLAP,
Params.INFILLGRIDOVERLAP, Params.INFILLDIRECTION, Params.INFILLOFFSETX,
Params.INFILLOFFSETY, Params.INFILLCOASTING, Params.INFILLWIPE, Params.INFILLWIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select End Select
If bForceFromDb OrElse Not bReadFromPart Then If bForceFromDb OrElse Not bReadFromPart Then
m_dValue = m_DbParam.dOrigValue m_dValue = m_DbParam.dOrigValue
@@ -674,8 +573,6 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue) EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue)
Case Params.SCREWBACK Case Params.SCREWBACK
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue) EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
Case Params.SLICINGHEIGHT
EgtSetInfo(nPartId, MAC_SLICINGHEIGHT, sWriteValue)
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue) EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
@@ -698,26 +595,12 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue) EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue)
Case Params.SHELLNBRWIPEDIR Case Params.SHELLNBRWIPEDIR
EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue) EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue)
Case Params.AUXSOLIDSSTRANDCOUNT
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
Case Params.AUXSOLIDSLINKPARAM Case Params.AUXSOLIDSLINKPARAM
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue)
Case Params.AUXSOLIDSOFFSETLEADPOINT
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
Case Params.AUXSOLIDSDENSITY
EgtSetInfo(nPartId, MAC_AUXSOLIDSDENSITY, sWriteValue)
Case Params.AUXSOLIDSGRIDOVERLAP
EgtSetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
Case Params.AUXSOLIDSDIRECTION
EgtSetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
Case Params.AUXSOLIDSOFFSETX
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
Case Params.AUXSOLIDSOFFSETY
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
Case Params.AUXSOLIDSWIPELEN Case Params.AUXSOLIDSWIPELEN
@@ -726,26 +609,6 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue) EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
Case Params.CEILCOUNT
EgtSetInfo(nPartId, MAC_CEILCOUNT, sWriteValue)
Case Params.INFILLDENSITY
EgtSetInfo(nPartId, MAC_INFILLDENSITY, sWriteValue)
Case Params.INFILLOVERLAP
EgtSetInfo(nPartId, MAC_INFILLOVERLAP, sWriteValue)
Case Params.INFILLGRIDOVERLAP
EgtSetInfo(nPartId, MAC_INFILLGRIDOVERLAP, sWriteValue)
Case Params.INFILLDIRECTION
EgtSetInfo(nPartId, MAC_INFILLDIRECTION, sWriteValue)
Case Params.INFILLOFFSETX
EgtSetInfo(nPartId, MAC_INFILLOFFSETX, sWriteValue)
Case Params.INFILLOFFSETY
EgtSetInfo(nPartId, MAC_INFILLOFFSETY, sWriteValue)
Case Params.INFILLCOASTING
EgtSetInfo(nPartId, MAC_INFILLCOASTING, sWriteValue)
Case Params.INFILLWIPE
EgtSetInfo(nPartId, MAC_INFILLWIPE, sWriteValue)
Case Params.INFILLWIPEDIR
EgtSetInfo(nPartId, MAC_INFILLWIPEDIR, sWriteValue)
End Select End Select
End Sub End Sub
@@ -948,14 +811,9 @@ Public Class CurrComboMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"), New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"), New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 0 Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
@@ -978,28 +836,6 @@ Public Class CurrComboMachiningParam
Dim nSelValue As Integer = 0 Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, nSelValue) bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.FLOORTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_FLOORTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.CEILTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.INFILLTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
End Select End Select
m_OrigSelValue = m_SelValue m_OrigSelValue = m_SelValue
If nIndex > 0 Then If nIndex > 0 Then
@@ -1013,8 +849,6 @@ Public Class CurrComboMachiningParam
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.FLOORTYPE, Params.CEILTYPE, Params.INFILLTYPE
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select End Select
If bForceFromDb OrElse Not bReadFromPart Then If bForceFromDb OrElse Not bReadFromPart Then
m_SelValue = m_DbParam.OrigSelValue m_SelValue = m_DbParam.OrigSelValue
@@ -1053,12 +887,6 @@ Public Class CurrComboMachiningParam
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id) EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
Case Params.DYNAMIC_MODE Case Params.DYNAMIC_MODE
EgtSetInfo(nPartId, MAC_DYNAMICMODE, m_SelValue.Id) EgtSetInfo(nPartId, MAC_DYNAMICMODE, m_SelValue.Id)
Case Params.FLOORTYPE
EgtSetInfo(nPartId, MAC_FLOORTYPE, m_SelValue.Id)
Case Params.CEILTYPE
EgtSetInfo(nPartId, MAC_CEILTYPE, m_SelValue.Id)
Case Params.INFILLTYPE
EgtSetInfo(nPartId, MAC_INFILLTYPE, m_SelValue.Id)
End Select End Select
End Sub End Sub
@@ -1148,10 +976,6 @@ Public Class CurrCheckMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, m_bValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, m_bValue)
Case Params.AUXSOLIDSINFILLLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
Case Params.INFILLLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLLINK, m_bValue)
End Select End Select
m_bOrigValue = m_bValue m_bOrigValue = m_bValue
If nIndex > 0 Then If nIndex > 0 Then
@@ -1161,10 +985,6 @@ Public Class CurrCheckMachiningParam
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.AUXSOLIDSINFILLLINK
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.INFILLLINK
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select End Select
If bForceFromDb OrElse Not bReadFromPart Then If bForceFromDb OrElse Not bReadFromPart Then
m_bValue = m_DbParam.bOrigValue m_bValue = m_DbParam.bOrigValue
@@ -1191,10 +1011,6 @@ Public Class CurrCheckMachiningParam
EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0)) EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
EgtSetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0)) EgtSetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0))
Case Params.AUXSOLIDSINFILLLINK
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
Case Params.INFILLLINK
EgtSetInfo(nPartId, MAC_INFILLLINK, If(m_bValue, 1, 0))
End Select End Select
End Sub End Sub
@@ -54,16 +54,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1" <EgtWPFLib5:EgtTextBox2 Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}" Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,2.5,0" Margin="2.5,0,2.5,0"
@@ -86,16 +79,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ValueList}" ItemsSource="{Binding ValueList}"
SelectedItem="{Binding SelValue}" SelectedItem="{Binding SelValue}"
@@ -121,16 +107,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<CheckBox Grid.Column="1" <CheckBox Grid.Column="1"
IsChecked="{Binding bValue}" IsChecked="{Binding bValue}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
+55
View File
@@ -0,0 +1,55 @@
<EgtWPFLib5:EgtMainWindow x:Class="EgtMessageBoxV"
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"
Title="{Binding sTitle}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Style="{StaticResource Dialog_Window}">
<Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="20,20,20,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Margin="0,0,0,0"/>
<TextBlock Grid.Column="1"
Text="{Binding sMessage}"
Margin="5,0,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding ButtonList}"
HorizontalAlignment="Center">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button IsDefault="{Binding bIsDefault}"
Content="{Binding sMessage}"
Command="{Binding Command_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--<UniformGrid Grid.Column="1"
Grid.Row="1"
Rows="1">
<Button IsCancel="True"
Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</UniformGrid>-->
</Grid>
</EgtWPFLib5:EgtMainWindow>
+107
View File
@@ -0,0 +1,107 @@
Public Class EgtMessageBoxV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
Private Shadows DialogResult As MessageBoxResult
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = EgtMessageBoxVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtMessageBoxVM = EgtMessageBoxVM
End Sub
#End Region
#Region "METHODS"
''' <summary>
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
#End Region ' METHODS
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
#End Region
End Class
+234
View File
@@ -0,0 +1,234 @@
Imports EgtUILib
Imports EgtWPFLib5
Public Class EgtMessageBoxVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(DialogResult As MessageBoxResult)
Private m_sTitle As String = ""
Public ReadOnly Property sTitle As String
Get
Return m_sTitle
End Get
End Property
Private m_sMessage As String = ""
Public ReadOnly Property sMessage As String
Get
Return m_sMessage
End Get
End Property
Private m_Button As MessageBoxButton
Private m_Icon As MessageBoxImage
Public ReadOnly Property sIconSource As String
Get
Select Case m_Icon
Case MessageBoxImage.Hand
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Question
Return "\Resources\EgtMessageBox\Question.png"
Case MessageBoxImage.Exclamation
Return "\Resources\EgtMessageBox\Warning.png"
Case MessageBoxImage.Asterisk
Return "\Resources\EgtMessageBox\Information.png"
Case MessageBoxImage.Stop
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Error
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Warning
Return "\Resources\EgtMessageBox\Warning.png"
Case MessageBoxImage.Information
Return "\Resources\EgtMessageBox\Information.png"
Case Else ' MessageBoxImage.None
Return ""
End Select
End Get
End Property
Private m_ButtonList As New List(Of EgtMsgBoxButton)
Public Property ButtonList As List(Of EgtMsgBoxButton)
Get
Return m_ButtonList
End Get
Set(value As List(Of EgtMsgBoxButton))
m_ButtonList = value
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(sMessageBoxText As String)
EgtMsgBoxButton.SetOwner(Me)
m_sMessage = sMessageBoxText
m_Button = MessageBoxButton.OK
m_Icon = MessageBoxImage.None
NotifyPropertyChanged(NameOf(ButtonList))
NotifyPropertyChanged(NameOf(sIconSource))
End Sub
Sub New(sMessageBoxText As String, sCaption As String)
MyClass.New(sMessageBoxText)
m_sTitle = sCaption
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton)
MyClass.New(sMessageBoxText, sCaption)
m_Button = Button
Select Case m_Button
Case MessageBoxButton.OK
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
Case MessageBoxButton.OKCancel
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
Case MessageBoxButton.YesNoCancel
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
Case MessageBoxButton.YesNo
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
End Select
NotifyPropertyChanged(NameOf(ButtonList))
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage)
MyClass.New(sMessageBoxText, sCaption, Button)
m_Icon = Icon
NotifyPropertyChanged(NameOf(sIconSource))
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult)
MyClass.New(sMessageBoxText, sCaption, Button, Icon)
Dim DefaultBtn As EgtMsgBoxButton = m_ButtonList.FirstOrDefault(Function(x) (x.Type = EgtMsgBoxButton.Types.OK AndAlso DefaultResult = MessageBoxResult.OK) OrElse
(x.Type = EgtMsgBoxButton.Types.CANCEL AndAlso DefaultResult = MessageBoxResult.Cancel) OrElse
(x.Type = EgtMsgBoxButton.Types.YES AndAlso DefaultResult = MessageBoxResult.Yes) OrElse
(x.Type = EgtMsgBoxButton.Types.NO AndAlso DefaultResult = MessageBoxResult.No))
If Not IsNothing(DefaultBtn) Then
DefaultBtn.SetIsDefault(True)
End If
NotifyPropertyChanged(NameOf(ButtonList))
End Sub
#End Region ' CONTRUCTORS
#Region "METHODS"
Friend Sub CloseWindow(DialogResult As MessageBoxResult)
RaiseEvent m_CloseWindow(DialogResult)
End Sub
#End Region ' METHODS
End Class
Public Class EgtMsgBoxButton
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Public Enum Types As Integer
OK = 1
CANCEL = 2
YES = 3
NO = 4
End Enum
Private Shared Owner As EgtMessageBoxVM
Private m_Type As Types
Public ReadOnly Property Type As Types
Get
Return m_Type
End Get
End Property
Private m_sMessage As String
Public ReadOnly Property sMessage As String
Get
Return m_sMessage
End Get
End Property
Private m_bIsDefault As Boolean = False
Public ReadOnly Property bIsDefault As Boolean
Get
Return m_bIsDefault
End Get
End Property
Friend Sub SetIsDefault(bValue As Boolean)
m_bIsDefault = bValue
End Sub
' Definizione comandi
Private m_cmdCommand As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Type As Types)
m_Type = Type
Select Case m_Type
Case Types.OK
m_sMessage = EgtMsg(35001)
Case Types.CANCEL
m_sMessage = EgtMsg(35002)
Case Types.YES
m_sMessage = EgtMsg(35003)
Case Types.NO
m_sMessage = EgtMsg(35004)
End Select
End Sub
Sub New(Type As Types, bIsDefault As Boolean)
MyClass.New(Type)
m_bIsDefault = bIsDefault
End Sub
#End Region ' CONTRUCTORS
#Region "METHODS"
Friend Shared Sub SetOwner(value As EgtMessageBoxVM)
Owner = value
End Sub
#End Region ' METHODS
#Region "COMMANDS"
#Region "Command"
Public ReadOnly Property Command_Command As ICommand
Get
If m_cmdCommand Is Nothing Then
m_cmdCommand = New Command(AddressOf Command)
End If
Return m_cmdCommand
End Get
End Property
Public Sub Command()
Select Case m_Type
Case Types.OK
Owner.CloseWindow(MessageBoxResult.OK)
Case Types.CANCEL
Owner.CloseWindow(MessageBoxResult.Cancel)
Case Types.YES
Owner.CloseWindow(MessageBoxResult.Yes)
Case Types.NO
Owner.CloseWindow(MessageBoxResult.No)
End Select
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
@@ -735,7 +735,6 @@ Public Class FilledSolidPanelVM
If NewGeomType = GDB_TY.CRV_COMPO Then If NewGeomType = GDB_TY.CRV_COMPO Then
If Not EgtCurveIsClosed(nNewEntityId) Then If Not EgtCurveIsClosed(nNewEntityId) Then
EgtCloseCurveCompo(nNewEntityId) EgtCloseCurveCompo(nNewEntityId)
m_bEscOnLine2P = True
End If End If
EgtSetName(nNewEntityId, RIB_CURVE) EgtSetName(nNewEntityId, RIB_CURVE)
' resetto colore entita' ' resetto colore entita'
@@ -764,6 +763,9 @@ Public Class FilledSolidPanelVM
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True m_bIsCreatingExtrusion = True
Map.refControllerInputPanelVM.IsChecked = True Map.refControllerInputPanelVM.IsChecked = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else Else
' cancello layer ' cancello layer
EgtErase(nNewExtrusionLayerId) EgtErase(nNewExtrusionLayerId)
@@ -84,32 +84,6 @@
Style="{StaticResource ToolBar_SmallButton}"/> Style="{StaticResource ToolBar_SmallButton}"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<CheckBox Grid.Column="1"
IsChecked="{Binding bValue}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="2.5,0,0,0"/>
<Button Grid.Column="2"
Content="R"
Command="{Binding ResetParam_Command}"
IsEnabled="{Binding bIsModifiedFromPart}"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"
Margin="2.5,0,0,0"
Style="{StaticResource ToolBar_SmallButton}"/>
</Grid>
</DataTemplate>
</ItemsControl.Resources> </ItemsControl.Resources>
</ItemsControl> </ItemsControl>
</ScrollViewer> </ScrollViewer>
@@ -42,20 +42,12 @@ Public Class FilledSolidParamPanelVM
m_Type = Cathegories.AUX_SOLID m_Type = Cathegories.AUX_SOLID
m_sName = "Filled Solid" m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId, Me), m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidcheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nFilledSolidId, nPartId, Me), New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId, Me), New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me), New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId, Me), New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId, Me), New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId, Me), New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me), New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)}) New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)})
@@ -198,10 +190,6 @@ Public Class FilledSolidNumericMachiningParam
MyBase.New(Type, Cathegory) MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False Dim bReadFromPart As Boolean = False
Select Case Type Select Case Type
Case Params.AUXSOLIDSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue) bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue) EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue)
@@ -214,30 +202,6 @@ Public Class FilledSolidNumericMachiningParam
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue) bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue) EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue)
m_bIsLen = True m_bIsLen = True
Case Params.AUXSOLIDSOFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSDENSITY
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSGRIDOVERLAP
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSDIRECTION
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETX
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETY
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue) bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue) EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue)
@@ -266,12 +230,6 @@ Public Class FilledSolidNumericMachiningParam
sWriteValue = DoubleToString(m_dValue, 2) sWriteValue = DoubleToString(m_dValue, 2)
End If End If
Select Case Type Select Case Type
Case Params.AUXSOLIDSSTRANDCOUNT
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT)
End If
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
If bIsModifiedFromPart Then If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue) EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
@@ -290,42 +248,6 @@ Public Class FilledSolidNumericMachiningParam
Else Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE) EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE)
End If End If
Case Params.AUXSOLIDSOFFSETLEADPOINT
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT)
End If
Case Params.AUXSOLIDSDENSITY
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY)
End If
Case Params.AUXSOLIDSGRIDOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP)
End If
Case Params.AUXSOLIDSDIRECTION
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION)
End If
Case Params.AUXSOLIDSOFFSETX
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX)
End If
Case Params.AUXSOLIDSOFFSETY
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY)
End If
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
If bIsModifiedFromPart Then If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue) EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
@@ -417,14 +339,9 @@ Public Class FilledSolidComboMachiningParam
Dim bReadFromPart As Boolean = False Dim bReadFromPart As Boolean = False
Select Case Type Select Case Type
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"), New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"), New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 1 Dim nSelValue As Integer = 1
bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue) bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue)
If bReadFromRib Then If bReadFromRib Then
@@ -462,7 +379,7 @@ Public Class FilledSolidComboMachiningParam
Else Else
Select Case Type Select Case Type
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL_TYPE.NONE) m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL.NONE)
m_SelValue = m_OrigSelValue m_SelValue = m_OrigSelValue
Case Params.AUXSOLIDSSTRANDORDER Case Params.AUXSOLIDSSTRANDORDER
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN) m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN)
@@ -530,95 +447,4 @@ Public Class FilledSolidComboMachiningParam
#End Region ' COMMANDS #End Region ' COMMANDS
End Class
Public Class FilledSolidCheckMachiningParam
Inherits CheckMachiningParam
Public Overrides Property bValue As Boolean
Get
Return m_bValue
End Get
Set(value As Boolean)
m_bValue = value
NotifyPropertyChanged(NameOf(bValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
End Set
End Property
Protected m_bPartValue As Boolean
Public ReadOnly Property bPartValue As Boolean
Get
Return m_bPartValue
End Get
End Property
Public ReadOnly Property bIsModifiedFromPart As Boolean
Get
Return m_bValue <> m_bPartValue
End Get
End Property
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nAuxSolidId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.AUXSOLIDSINFILLLINK
bReadFromPart = EgtGetInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bPartValue)
End Select
m_bOrigValue = m_bValue
If Not bReadFromPart Then
m_bValue = m_bPartValue
m_bOrigValue = m_bPartValue
End If
End Sub
Friend Sub WriteParamInRib(nAuxSolidId As Integer)
Select Case Type
Case Params.AUXSOLIDSINFILLLINK
If bIsModifiedFromPart Then
EgtSetInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
Else
EgtRemoveInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK)
End If
End Select
End Sub
Friend Overrides Sub SaveParam()
m_bOrigValue = m_bValue
End Sub
Friend Overrides Sub ResetParam()
m_bValue = m_bOrigValue
NotifyPropertyChanged(NameOf(bValue))
End Sub
#Region "COMMANDS"
#Region "ResetParam"
Public ReadOnly Property ResetParam_Command As ICommand
Get
If m_cmdResetParam Is Nothing Then
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
End If
Return m_cmdResetParam
End Get
End Property
Public Sub ResetParamCmd()
m_bValue = m_bPartValue
NotifyPropertyChanged(NameOf(bValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
End Sub
#End Region ' ResetParam
#End Region ' COMMANDS
End Class End Class
+14
View File
@@ -150,6 +150,10 @@
<DependentUpon>DispositionPanelV.xaml</DependentUpon> <DependentUpon>DispositionPanelV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="DispositionPanel\DispositionPanelVM.vb" /> <Compile Include="DispositionPanel\DispositionPanelVM.vb" />
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="EgtMessageBox\EgtMessageBoxVM.vb" />
<Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb"> <Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb">
<DependentUpon>FilledSolidPanelV.xaml</DependentUpon> <DependentUpon>FilledSolidPanelV.xaml</DependentUpon>
</Compile> </Compile>
@@ -362,6 +366,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="FilledSolidPanel\FilledSolidPanelV.xaml"> <Page Include="FilledSolidPanel\FilledSolidPanelV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -604,6 +612,7 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None> </None>
<None Include="packages.config" /> <None Include="packages.config" />
<Resource Include="Resources\EgtMessageBox\Error.png" />
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" /> <Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
<Resource Include="Resources\Fonts\Roboto-Light.ttf" /> <Resource Include="Resources\Fonts\Roboto-Light.ttf" />
</ItemGroup> </ItemGroup>
@@ -855,6 +864,11 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\RibParamPanel\CopyFrom.png" /> <Resource Include="Resources\RibParamPanel\CopyFrom.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Information.png" />
<Resource Include="Resources\EgtMessageBox\Question.png" />
<Resource Include="Resources\EgtMessageBox\Warning.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
@@ -157,7 +157,8 @@ Public Class ImportExportMachiningPanelVM
nIndex += 1 nIndex += 1
End While End While
If bIsOriginal AndAlso bIsCustom Then If bIsOriginal AndAlso bIsCustom Then
MessageBox.Show("Corrupted file! Impossible to import it!") 'MessageBox.Show("Corrupted file! Impossible to import it!")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Corrupted file! Impossible to import it!")
ElseIf bIsOriginal Then ElseIf bIsOriginal Then
LoadOriginalMaterial() LoadOriginalMaterial()
End If End If
@@ -301,9 +302,12 @@ Public Class ImportExportMachiningPanelVM
sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine
End If End If
Next Next
MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine & 'MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine &
sDuplicatedMaterialList & Environment.NewLine & ' sDuplicatedMaterialList & Environment.NewLine &
"Please modify the names of these machining and then retry to import the materials.") ' "Please modify the names of these machining and then retry to import the materials.")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible to import the package because materials named:" & Environment.NewLine &
sDuplicatedMaterialList & Environment.NewLine &
"Please modify the names of these machining and then retry to import the materials.")
Return Return
End If End If
' aggiorno/aggiungo materiali ' aggiorno/aggiungo materiali
@@ -353,9 +357,12 @@ Public Class ImportExportMachiningPanelVM
For Index = 0 To ImportedMaterialList.Count - 1 For Index = 0 To ImportedMaterialList.Count - 1
sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine
Next Next
MessageBox.Show("List of the materials:" & Environment.NewLine & 'MessageBox.Show("List of the materials:" & Environment.NewLine &
sMaterialList & Environment.NewLine & ' sMaterialList & Environment.NewLine &
"Import successfully completed.") ' "Import successfully completed.")
EgtMessageBoxV.Show(Application.Current.MainWindow, "List of the materials:" & Environment.NewLine &
sMaterialList & Environment.NewLine &
"Import successfully completed.")
Return Return
End Sub End Sub
@@ -471,7 +478,7 @@ Public Class ImportExportMachiningPanelVM
End Select End Select
Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG
' chiedo il nome con cui salvare il file ' chiedo il nome con cui salvare il file
Dim sExtension As String ="" Dim sExtension As String = ""
If m_WindowType = WindowTypeEnum.MATERIAL Then If m_WindowType = WindowTypeEnum.MATERIAL Then
If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then
sExtension = OriginalMaterialDataExtension sExtension = OriginalMaterialDataExtension
@@ -580,7 +587,8 @@ Public Class ImpExpMachiningItem
If m_AlreadyExist Then If m_AlreadyExist Then
Select Case m_WindowType Select Case m_WindowType
Case WindowTypeEnum.MATERIAL Case WindowTypeEnum.MATERIAL
Select Case System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
'System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_ChangeName = False m_ChangeName = False
m_Active = True m_Active = True
@@ -594,7 +602,8 @@ Public Class ImpExpMachiningItem
End While End While
End If End If
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "") m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK) 'System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
NotifyPropertyChanged(NameOf(sName)) NotifyPropertyChanged(NameOf(sName))
m_ChangeName = True m_ChangeName = True
m_Active = True m_Active = True
@@ -602,7 +611,8 @@ Public Class ImpExpMachiningItem
m_Active = False m_Active = False
End Select End Select
Case WindowTypeEnum.MACHINING Case WindowTypeEnum.MACHINING
Select Case System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
'System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_ChangeName = False m_ChangeName = False
m_Active = True m_Active = True
@@ -616,7 +626,8 @@ Public Class ImpExpMachiningItem
End While End While
End If End If
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "") m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK) 'System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
NotifyPropertyChanged(NameOf(sName)) NotifyPropertyChanged(NameOf(sName))
m_ChangeName = True m_ChangeName = True
m_Active = True m_Active = True
@@ -96,8 +96,9 @@ Public Class MyInstrumentPanelVM
EgtDraw() EgtDraw()
' Ripristino stato segnalazione modifica ' Ripristino stato segnalazione modifica
DisableMgr.ReEnable() DisableMgr.ReEnable()
MessageBox.Show(sResult) 'MessageBox.Show(sResult)
Else EgtMessageBoxV.Show(Application.Current.MainWindow, sResult)
Else
' Disabilito segnalazione modificato ' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
' cancello tutti i gruppi con i chunk ' cancello tutti i gruppi con i chunk
+2 -1
View File
@@ -48,7 +48,8 @@ Public Class MachSaveInDbWndVM
Public Sub Ok() Public Sub Ok()
If Map.refTopPanelVM.MachiningList.Any(Function(x As MachiningIndex) x.sName = m_sName) Then If Map.refTopPanelVM.MachiningList.Any(Function(x As MachiningIndex) x.sName = m_sName) Then
MessageBox.Show("Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show("Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
Return Return
End If End If
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
+34 -351
View File
@@ -45,6 +45,12 @@ Public Class Machining
SUPPORT = 4 SUPPORT = 4
End Enum End Enum
Public Enum MPAR_INFILL As Integer
NONE = 1
OFFSET = 2
ZIGZAG = 3
End Enum
Public Enum MPAR_DYNAMIC_MODE As Integer Public Enum MPAR_DYNAMIC_MODE As Integer
STANDARD = 1 STANDARD = 1
FAST = 2 FAST = 2
@@ -61,17 +67,6 @@ Public Class Machining
RIB_SUPPORT = 8 RIB_SUPPORT = 8
End Enum End Enum
Public Enum MPAR_INFILL_TYPE As Integer
NONE = 0
OFFSET = 16
ZIGZAG = 17
LINES = 32
GRID = 33
ZIGZAG_GRID = 34
HONEYCOMB = 35
HONEYCOMB_GRID = 36
End Enum
Protected m_CathegoryList As New ObservableCollection(Of MachiningCathegory) Protected m_CathegoryList As New ObservableCollection(Of MachiningCathegory)
Public ReadOnly Property CathegoryList As ObservableCollection(Of MachiningCathegory) Public ReadOnly Property CathegoryList As ObservableCollection(Of MachiningCathegory)
Get Get
@@ -152,7 +147,6 @@ Public Class Machining
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.RIBS, nIndex)) m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.RIBS, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nIndex)) m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nIndex)) m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.INFILL, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, nIndex)) m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, nIndex))
For Each Cathegory In m_CathegoryList For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList For Each MachiningParam In Cathegory.MachiningParamList
@@ -279,8 +273,7 @@ Public Class MachiningCathegory
RIBS = 8 RIBS = 8
SHELL_NUMBER = 9 SHELL_NUMBER = 9
AUX_SOLID = 10 AUX_SOLID = 10
INFILL = 11 MATERIALS = 11
MATERIALS = 12
End Enum End Enum
Protected m_Type As Cathegories Protected m_Type As Cathegories
@@ -333,6 +326,7 @@ Public Class MachiningCathegory
New NumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.STRANDORDER, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.STRANDORDER, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.DIRECTION, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.DIRECTION, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.G0FEED, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.G0FEED, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.G0FEEDZ, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.G0FEEDZ, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LINKZUP, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.LINKZUP, nIndex, Me),
@@ -342,8 +336,7 @@ Public Class MachiningCathegory
New OrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nIndex, Me), New OrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.SCREWBACK, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.SCREWBACK, nIndex, Me)})
New NumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nIndex, Me)})
Case Cathegories.LINK Case Cathegories.LINK
m_sName = "Shell" m_sName = "Shell"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nIndex, Me), m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nIndex, Me),
@@ -385,40 +378,15 @@ Public Class MachiningCathegory
New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nIndex, Me)}) New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nIndex, Me)})
Case Cathegories.AUX_SOLID Case Cathegories.AUX_SOLID
m_sName = "Filled Solid" m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nIndex, Me), m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nIndex, Me)}) New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nIndex, Me)})
Case Cathegories.INFILL
m_sName = "Infill"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.FLOORTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.CEILCOUNT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.CEILTYPE, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.INFILLTYPE, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.INFILLLINK, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLDENSITY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLGRIDOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLDIRECTION, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLOFFSETX, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLOFFSETY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLCOASTING, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLWIPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLWIPEDIR, nIndex, Me)})
Case Cathegories.MATERIALS Case Cathegories.MATERIALS
m_sName = "Materials" m_sName = "Materials"
Dim sMaterials As String = "" Dim sMaterials As String = ""
@@ -446,19 +414,6 @@ Public Class MachiningCathegory
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param) Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam() MachiningParam.ManageDependencyParam()
Next Next
For Each Param In {MachiningParam.Params.AUXSOLIDSSTRANDCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.INFILL
For Each Param In {MachiningParam.Params.FLOORCOUNT, MachiningParam.Params.CEILCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
For Each Param In {MachiningParam.Params.INFILLTYPE}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select End Select
End Sub End Sub
@@ -499,6 +454,7 @@ Public MustInherit Class MachiningParam
STARTPOINTOFFSETONSLICE = 8 STARTPOINTOFFSETONSLICE = 8
STRANDORDER = 9 STRANDORDER = 9
DIRECTION = 10 DIRECTION = 10
FLOORCOUNT = 11
G0FEED = 12 G0FEED = 12
LINKZUP = 13 LINKZUP = 13
G0FEEDZ = 14 G0FEEDZ = 14
@@ -509,7 +465,6 @@ Public MustInherit Class MachiningParam
PREFLOWDELAY = 19 PREFLOWDELAY = 19
POSTFLOWDELAY = 20 POSTFLOWDELAY = 20
SCREWBACK = 21 SCREWBACK = 21
SLICINGHEIGHT = 22
LINKTYPE = 51 LINKTYPE = 51
LINKPARAM = 52 LINKPARAM = 52
LEADIN = 53 LEADIN = 53
@@ -549,33 +504,10 @@ Public MustInherit Class MachiningParam
AUXSOLIDSLINKTYPE = 204 AUXSOLIDSLINKTYPE = 204
AUXSOLIDSLINKPARAM = 205 AUXSOLIDSLINKPARAM = 205
AUXSOLIDSSTARTPOINTOFFSETONSLICE = 206 AUXSOLIDSSTARTPOINTOFFSETONSLICE = 206
AUXSOLIDSOFFSETLEADPOINT = 207 AUXSOLIDSCOASTINGLEN = 207
AUXSOLIDSDENSITY = 208 AUXSOLIDSWIPELEN = 208
AUXSOLIDSGRIDOVERLAP = 209 AUXSOLIDSWIPEDIR = 209
AUXSOLIDSDIRECTION = 210 MATERIALS = 250
AUXSOLIDSOFFSETX = 211
AUXSOLIDSOFFSETY = 212
AUXSOLIDSCOASTINGLEN = 213
AUXSOLIDSWIPELEN = 214
AUXSOLIDSWIPEDIR = 215
AUXSOLIDSSTRANDCOUNT = 216
AUXSOLIDSINFILLLINK = 217
FLOORCOUNT = 250
FLOORTYPE = 251
CEILCOUNT = 252
CEILTYPE = 253
INFILLTYPE = 254
INFILLLINK = 255
INFILLDENSITY = 256
INFILLOVERLAP = 257
INFILLGRIDOVERLAP = 258
INFILLDIRECTION = 259
INFILLOFFSETX = 260
INFILLOFFSETY = 261
INFILLCOASTING = 262
INFILLWIPE = 263
INFILLWIPEDIR = 264
MATERIALS = 500
End Enum End Enum
Protected m_Type As Params Protected m_Type As Params
@@ -601,29 +533,12 @@ Public MustInherit Class MachiningParam
End Get End Get
End Property End Property
Public ReadOnly Property bIsBeta As Boolean
Get
Select Case m_Type
Case Params.FLOORCOUNT, Params.FLOORTYPE, Params.CEILCOUNT, Params.CEILTYPE, Params.INFILLTYPE
Return True
Case Else
Return False
End Select
End Get
End Property
Public ReadOnly Property IsBeta_Visibility As Visibility
Get
Return If(bIsBeta, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Sub New(Type As Params, Cathegory As MachiningCathegory) Sub New(Type As Params, Cathegory As MachiningCathegory)
m_Type = Type m_Type = Type
m_Cathegory = Cathegory m_Cathegory = Cathegory
Select Case m_Type Select Case m_Type
Case Params.SLICINGTYPE Case Params.SLICINGTYPE
m_sName = "Slicing Direction" m_sName = "Slicing direction"
Case Params.STRANDH Case Params.STRANDH
m_sName = "Strand Height" m_sName = "Strand Height"
Case Params.STRANDW Case Params.STRANDW
@@ -680,8 +595,6 @@ Public MustInherit Class MachiningParam
m_sName = "Post Flow Delay" m_sName = "Post Flow Delay"
Case Params.SCREWBACK Case Params.SCREWBACK
m_sName = "Screw Back" m_sName = "Screw Back"
Case Params.SLICINGHEIGHT
m_sName = "Slicing Height"
Case Params.RIBSTYPE Case Params.RIBSTYPE
m_sName = "Type" m_sName = "Type"
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
@@ -724,10 +637,6 @@ Public MustInherit Class MachiningParam
m_sName = "Overlap [%]" m_sName = "Overlap [%]"
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_sName = "Infill" m_sName = "Infill"
Case Params.AUXSOLIDSINFILLLINK
m_sName = "Infill Link"
Case Params.AUXSOLIDSSTRANDCOUNT
m_sName = "Strand Count"
Case Params.AUXSOLIDSSTRANDORDER Case Params.AUXSOLIDSSTRANDORDER
m_sName = "Strand Order" m_sName = "Strand Order"
Case Params.AUXSOLIDSLINKTYPE Case Params.AUXSOLIDSLINKTYPE
@@ -736,18 +645,6 @@ Public MustInherit Class MachiningParam
m_sName = "Link Parameter" m_sName = "Link Parameter"
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
m_sName = "Start Point Offset On Slice" m_sName = "Start Point Offset On Slice"
Case Params.AUXSOLIDSOFFSETLEADPOINT
m_sName = "Offset Lead Point"
Case Params.AUXSOLIDSDENSITY
m_sName = "Density [%]"
Case Params.AUXSOLIDSGRIDOVERLAP
m_sName = "Grid Overlap [%]"
Case Params.AUXSOLIDSDIRECTION
m_sName = "Direction"
Case Params.AUXSOLIDSOFFSETX
m_sName = "Offset X"
Case Params.AUXSOLIDSOFFSETY
m_sName = "Offset Y"
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
m_sName = "Coasting Length" m_sName = "Coasting Length"
Case Params.AUXSOLIDSWIPELEN Case Params.AUXSOLIDSWIPELEN
@@ -761,39 +658,11 @@ Public MustInherit Class MachiningParam
Case Params.STRANDOVERLAP Case Params.STRANDOVERLAP
m_sName = "Strand Overlap [%]" m_sName = "Strand Overlap [%]"
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
m_sName = "Flow Rate [%]" m_sName = "Flow rate [%]"
Case Params.DYNAMIC_MODE Case Params.DYNAMIC_MODE
m_sName = "Dynamic Mode" m_sName = "Dynamic Mode"
Case Params.PRINT_ORDER Case Params.PRINT_ORDER
m_sName = "Print Order" m_sName = "Print Order"
Case Params.FLOORTYPE
m_sName = "Floor Type"
Case Params.CEILCOUNT
m_sName = "Ceil Count"
Case Params.CEILTYPE
m_sName = "Ceil Type"
Case Params.INFILLTYPE
m_sName = "Infill Type"
Case Params.INFILLLINK
m_sName = "Link"
Case Params.INFILLDENSITY
m_sName = "Density [%]"
Case Params.INFILLOVERLAP
m_sName = "Overlap [%]"
Case Params.INFILLGRIDOVERLAP
m_sName = "Grid Overlap [%]"
Case Params.INFILLDIRECTION
m_sName = "Direction"
Case Params.INFILLOFFSETX
m_sName = "Offset X"
Case Params.INFILLOFFSETY
m_sName = "Offset Y"
Case Params.INFILLCOASTING
m_sName = "Coasting"
Case Params.INFILLWIPE
m_sName = "Wipe"
Case Params.INFILLWIPEDIR
m_sName = "Wipe Direction"
End Select End Select
End Sub End Sub
@@ -845,7 +714,6 @@ Public Class NumericMachiningParam
m_dValue = dTempValue m_dValue = dTempValue
End If End If
NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(sValue))
ManageDependencyParam()
End Set End Set
End Property End Property
@@ -891,11 +759,6 @@ Public Class NumericMachiningParam
m_bIsActiveMinMax = True m_bIsActiveMinMax = True
End If End If
End If End If
If Type = Params.SLICINGHEIGHT Then
m_dMinValue = 0
m_dMaxValue = CurrentMachine.dSlicingMaxHeight
m_bIsActiveMinMax = True
End If
' leggo parametri da Db ' leggo parametri da Db
If nIndex = 0 Then If nIndex = 0 Then
m_dValue = 0 m_dValue = 0
@@ -977,9 +840,6 @@ Public Class NumericMachiningParam
Case Params.SCREWBACK Case Params.SCREWBACK
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 45) m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 45)
m_bIsLen = False m_bIsLen = False
Case Params.SLICINGHEIGHT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SLICINGHEIGHT, CurrentMachine.dSlicingMaxHeight)
m_bIsLen = False
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0)
m_bIsLen = False m_bIsLen = False
@@ -1013,9 +873,6 @@ Public Class NumericMachiningParam
Case Params.SHELLNBRWIPEDIR Case Params.SHELLNBRWIPEDIR
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRWIPEDIR, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRWIPEDIR, 0)
m_bIsLen = False m_bIsLen = False
Case Params.AUXSOLIDSSTRANDCOUNT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDCOUNT, 0)
m_bIsLen = False
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOVERLAP, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOVERLAP, 0)
m_bIsLen = False m_bIsLen = False
@@ -1025,24 +882,6 @@ Public Class NumericMachiningParam
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, 0)
m_bIsLen = True m_bIsLen = True
Case Params.AUXSOLIDSOFFSETLEADPOINT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOFFSETLEADPOINT, 0)
m_bIsLen = True
Case Params.AUXSOLIDSDENSITY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSDENSITY, 0)
m_bIsLen = False
Case Params.AUXSOLIDSGRIDOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSGRIDOVERLAP, 0)
m_bIsLen = True
Case Params.AUXSOLIDSDIRECTION
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSDIRECTION, 0)
m_bIsLen = False
Case Params.AUXSOLIDSOFFSETX
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOFFSETX, 0)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOFFSETY, 0)
m_bIsLen = True
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSCOASTINGLEN, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSCOASTINGLEN, 0)
m_bIsLen = True m_bIsLen = True
@@ -1055,65 +894,11 @@ Public Class NumericMachiningParam
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
m_dValue = ReadMachiningParamDouble(nIndex, MAC_CONSTANT, 100) m_dValue = ReadMachiningParamDouble(nIndex, MAC_CONSTANT, 100)
m_bIsLen = False m_bIsLen = False
Case Params.CEILCOUNT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_CEILCOUNT, 0)
m_bIsLen = False
Case Params.INFILLDENSITY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLDENSITY, 0)
m_bIsLen = False
Case Params.INFILLOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLOVERLAP, 0)
m_bIsLen = False
Case Params.INFILLGRIDOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLGRIDOVERLAP, 0)
m_bIsLen = False
Case Params.INFILLDIRECTION
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLDIRECTION, 0)
m_bIsLen = False
Case Params.INFILLOFFSETX
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLOFFSETX, 0)
m_bIsLen = True
Case Params.INFILLOFFSETY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLOFFSETY, 0)
m_bIsLen = True
Case Params.INFILLCOASTING
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLCOASTING, 0)
m_bIsLen = True
Case Params.INFILLWIPE
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLWIPE, 0)
m_bIsLen = True
Case Params.INFILLWIPEDIR
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLWIPEDIR, 0)
m_bIsLen = False
End Select End Select
End If End If
m_dOrigValue = m_dValue m_dOrigValue = m_dValue
End Sub End Sub
Friend Sub ManageDependencyParam()
' gestisco dis/attivazione parametri dipendenti
Select Case m_Type
Case Params.FLOORCOUNT
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.FLOORTYPE)
ComboMachiningParam.SetIsActive(m_dValue <> 0)
Case Params.CEILCOUNT
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.CEILTYPE)
ComboMachiningParam.SetIsActive(m_dValue <> 0)
Case Params.AUXSOLIDSSTRANDCOUNT
Dim AuxSolidsInfillParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSINFILL)
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDORDER)
ComboMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKTYPE)
ComboMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
Dim NumericMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKPARAM)
NumericMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE)
NumericMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSOFFSETLEADPOINT)
NumericMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
End Select
End Sub
Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "") Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
Dim sWriteValue As String = "" Dim sWriteValue As String = ""
If m_bIsLen Then If m_bIsLen Then
@@ -1172,8 +957,6 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_POSTFLOWDELAY, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_POSTFLOWDELAY, sWriteValue, sFilePath)
Case Params.SCREWBACK Case Params.SCREWBACK
WriteMachiningParam(nIndex, MAC_SCREWBACK, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_SCREWBACK, sWriteValue, sFilePath)
Case Params.SLICINGHEIGHT
WriteMachiningParam(nIndex, MAC_SLICINGHEIGHT, sWriteValue, sFilePath)
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
WriteMachiningParam(nIndex, MAC_RIBSOVERLAP, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_RIBSOVERLAP, sWriteValue, sFilePath)
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
@@ -1196,26 +979,12 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_SHELLNBRWIPE, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_SHELLNBRWIPE, sWriteValue, sFilePath)
Case Params.SHELLNBRWIPEDIR Case Params.SHELLNBRWIPEDIR
WriteMachiningParam(nIndex, MAC_SHELLNBRWIPEDIR, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_SHELLNBRWIPEDIR, sWriteValue, sFilePath)
Case Params.AUXSOLIDSSTRANDCOUNT
WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOVERLAP, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSOVERLAP, sWriteValue, sFilePath)
Case Params.AUXSOLIDSLINKPARAM Case Params.AUXSOLIDSLINKPARAM
WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKPARAM, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKPARAM, sWriteValue, sFilePath)
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOFFSETLEADPOINT
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue, sFilePath)
Case Params.AUXSOLIDSDENSITY
WriteMachiningParam(nIndex, MAC_AUXSOLIDSDENSITY, sWriteValue, sFilePath)
Case Params.AUXSOLIDSGRIDOVERLAP
WriteMachiningParam(nIndex, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue, sFilePath)
Case Params.AUXSOLIDSDIRECTION
WriteMachiningParam(nIndex, MAC_AUXSOLIDSDIRECTION, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOFFSETX
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOFFSETX, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOFFSETY
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOFFSETY, sWriteValue, sFilePath)
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
WriteMachiningParam(nIndex, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue, sFilePath)
Case Params.AUXSOLIDSWIPELEN Case Params.AUXSOLIDSWIPELEN
@@ -1224,26 +993,6 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPEDIR, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPEDIR, sWriteValue, sFilePath)
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
WriteMachiningParam(nIndex, MAC_CONSTANT, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_CONSTANT, sWriteValue, sFilePath)
Case Params.CEILCOUNT
WriteMachiningParam(nIndex, MAC_CEILCOUNT, sWriteValue, sFilePath)
Case Params.INFILLDENSITY
WriteMachiningParam(nIndex, MAC_INFILLDENSITY, sWriteValue, sFilePath)
Case Params.INFILLOVERLAP
WriteMachiningParam(nIndex, MAC_INFILLOVERLAP, sWriteValue, sFilePath)
Case Params.INFILLGRIDOVERLAP
WriteMachiningParam(nIndex, MAC_INFILLGRIDOVERLAP, sWriteValue, sFilePath)
Case Params.INFILLDIRECTION
WriteMachiningParam(nIndex, MAC_INFILLDIRECTION, sWriteValue, sFilePath)
Case Params.INFILLOFFSETX
WriteMachiningParam(nIndex, MAC_INFILLOFFSETX, sWriteValue, sFilePath)
Case Params.INFILLOFFSETY
WriteMachiningParam(nIndex, MAC_INFILLOFFSETY, sWriteValue, sFilePath)
Case Params.INFILLCOASTING
WriteMachiningParam(nIndex, MAC_INFILLCOASTING, sWriteValue, sFilePath)
Case Params.INFILLWIPE
WriteMachiningParam(nIndex, MAC_INFILLWIPE, sWriteValue, sFilePath)
Case Params.INFILLWIPEDIR
WriteMachiningParam(nIndex, MAC_INFILLWIPEDIR, sWriteValue, sFilePath)
End Select End Select
End Sub End Sub
@@ -1388,71 +1137,50 @@ Public Class ComboMachiningParam
Case Params.STRANDORDER Case Params.STRANDORDER
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"),
New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")}) New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_STRANDORDER, Machining.MPAR_STRANDORDERS.OUTTOIN)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_STRANDORDER, 0))
Case Params.DIRECTION Case Params.DIRECTION
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DIRECTIONS.CCW, "Counterclockwise"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DIRECTIONS.CCW, "Counterclockwise"),
New IdNameStruct(Machining.MPAR_DIRECTIONS.CW, "Clockwise")}) New IdNameStruct(Machining.MPAR_DIRECTIONS.CW, "Clockwise")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DIRECTION, Machining.MPAR_DIRECTIONS.CCW)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DIRECTION, 0))
Case Params.LINKTYPE Case Params.LINKTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"),
New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"), New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"),
New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")}) New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LINKTYPE, Machining.MPAR_LEADINOUT.NONE)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LINKTYPE, 0))
Case Params.LEADIN Case Params.LEADIN
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"),
New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"), New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"),
New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")}) New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADIN, Machining.MPAR_LEADINOUT.NONE)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADIN, 0))
Case Params.LEADOUT Case Params.LEADOUT
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"),
New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"), New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"),
New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")}) New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADOUT, Machining.MPAR_LEADINOUT.NONE)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADOUT, 0))
Case Params.RIBSTYPE Case Params.RIBSTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"),
New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"), New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"),
New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded"), New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded"),
New IdNameStruct(Machining.MPAR_RIBSTYPE.SUPPORT, "Support")}) New IdNameStruct(Machining.MPAR_RIBSTYPE.SUPPORT, "Support")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_RIBSTYPE, Machining.MPAR_RIBSTYPE.INTERNAL)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_RIBSTYPE, 1))
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"), New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"), New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"), m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSINFILL, 0))
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSINFILL, Machining.MPAR_INFILL_TYPE.NONE))
Case Params.AUXSOLIDSSTRANDORDER Case Params.AUXSOLIDSSTRANDORDER
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"),
New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")}) New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDORDER, Machining.MPAR_STRANDORDERS.OUTTOIN)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDORDER, 0))
Case Params.AUXSOLIDSLINKTYPE Case Params.AUXSOLIDSLINKTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"),
New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"), New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"),
New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")}) New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSLINKTYPE, Machining.MPAR_LINKTYPES.NONE)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSLINKTYPE, 0))
Case Params.DYNAMIC_MODE Case Params.DYNAMIC_MODE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.STANDARD, "Standard"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.STANDARD, "Standard"),
New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.FAST, "Fast")}) New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.FAST, "Fast")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DYNAMICMODE, Machining.MPAR_DYNAMIC_MODE.STANDARD)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DYNAMICMODE, 1))
Case Params.FLOORTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_FLOORTYPE, Machining.MPAR_INFILL_TYPE.OFFSET))
Case Params.CEILTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_CEILTYPE, Machining.MPAR_INFILL_TYPE.OFFSET))
Case Params.INFILLTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_INFILLTYPE, Machining.MPAR_INFILL_TYPE.NONE))
End Select End Select
End If End If
m_OrigSelValue = m_SelValue m_OrigSelValue = m_SelValue
@@ -1478,43 +1206,12 @@ Public Class ComboMachiningParam
Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.RIBSLIMITUNBOUNDEDWITHSOLID) Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.RIBSLIMITUNBOUNDEDWITHSOLID)
CheckMachiningParam.SetIsActive(m_SelValue.Id = MPAR_RIBSTYPE.UNBOUNDED) CheckMachiningParam.SetIsActive(m_SelValue.Id = MPAR_RIBSTYPE.UNBOUNDED)
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
Dim AuxSolidsStrandCountParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDCOUNT)
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDORDER) Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDORDER)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0) ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKTYPE) ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKTYPE)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0) ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKPARAM) Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKPARAM)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0) NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSOFFSETLEADPOINT)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSDENSITY)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSGRIDOVERLAP)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.LINES AndAlso
m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.GRID)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSDIRECTION)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSOFFSETX)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSOFFSETY)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSINFILLLINK)
CheckMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
Case Params.INFILLTYPE
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLDENSITY)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLGRIDOVERLAP)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.LINES AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.GRID)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLDIRECTION)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLOFFSETX)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLOFFSETY)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLLINK)
CheckMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
End Select End Select
End Sub End Sub
@@ -1542,12 +1239,6 @@ Public Class ComboMachiningParam
WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id, sFilePath)
Case Params.DYNAMIC_MODE Case Params.DYNAMIC_MODE
WriteMachiningParam(nIndex, MAC_DYNAMICMODE, m_SelValue.Id, sFilePath) WriteMachiningParam(nIndex, MAC_DYNAMICMODE, m_SelValue.Id, sFilePath)
Case Params.FLOORTYPE
WriteMachiningParam(nIndex, MAC_FLOORTYPE, m_SelValue.Id, sFilePath)
Case Params.CEILTYPE
WriteMachiningParam(nIndex, MAC_CEILTYPE, m_SelValue.Id, sFilePath)
Case Params.INFILLTYPE
WriteMachiningParam(nIndex, MAC_INFILLTYPE, m_SelValue.Id, sFilePath)
End Select End Select
End Sub End Sub
@@ -1626,10 +1317,6 @@ Public Class CheckMachiningParam
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTINVERT, 0) m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTINVERT, 0)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, 0) m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, 0)
Case Params.AUXSOLIDSINFILLLINK
m_bValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSINFILLLINK, 0)
Case Params.INFILLLINK
m_bValue = ReadMachiningParamDouble(nIndex, MAC_INFILLLINK, 0)
End Select End Select
End If End If
m_bOrigValue = m_bValue m_bOrigValue = m_bValue
@@ -1653,10 +1340,6 @@ Public Class CheckMachiningParam
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0), sFilePath) WriteMachiningParam(nIndex, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0), sFilePath)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
WriteMachiningParam(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0), sFilePath) WriteMachiningParam(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0), sFilePath)
Case Params.AUXSOLIDSINFILLLINK
WriteMachiningParam(nIndex, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0), sFilePath)
Case Params.INFILLLINK
WriteMachiningParam(nIndex, MAC_INFILLLINK, If(m_bValue, 1, 0), sFilePath)
End Select End Select
End Sub End Sub
+9 -30
View File
@@ -140,16 +140,9 @@
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1" <EgtWPFLib5:EgtTextBox2 Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}" Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,0,0" Margin="2.5,0,0,0"
@@ -163,16 +156,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ValueList}" ItemsSource="{Binding ValueList}"
SelectedItem="{Binding SelValue}" SelectedItem="{Binding SelValue}"
@@ -189,16 +175,9 @@
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<CheckBox Grid.Column="1" <CheckBox Grid.Column="1"
IsChecked="{Binding bValue}" IsChecked="{Binding bValue}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
+6 -3
View File
@@ -26,7 +26,8 @@ Public Class MachiningDbVM
' verifico se modificato ' verifico se modificato
If m_SelMachining.bIsModified Then If m_SelMachining.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
'MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMachining.Save() m_SelMachining.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -198,7 +199,8 @@ Public Class MachiningDbVM
Public Sub Ok() Public Sub Ok()
If Not IsNothing(m_SelMachining) AndAlso m_SelMachining.bIsModified Then If Not IsNothing(m_SelMachining) AndAlso m_SelMachining.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
'MessageBox.Show("Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMachining.Save() m_SelMachining.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -309,7 +311,8 @@ Public Class MachiningDbVM
Public Sub Delete() Public Sub Delete()
If IsNothing(m_SelMachining) Then Return If IsNothing(m_SelMachining) Then Return
' chiedo conferma ' chiedo conferma
Select Case MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
'MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_MachiningList.Remove(m_SelMachining) m_MachiningList.Remove(m_SelMachining)
SetIsModified(True) SetIsModified(True)
+14 -10
View File
@@ -75,6 +75,13 @@ Public Class MainWindowM
End Get End Get
End Property End Property
Private m_bAutoNestOption As Boolean = False
Friend ReadOnly Property AutoNestOption As Boolean
Get
Return m_bAutoNestOption
End Get
End Property
Friend ReadOnly Property sVersion As String Friend ReadOnly Property sVersion As String
Get Get
Return My.Application.Info.Version.Major.ToString() & "." & Return My.Application.Info.Version.Major.ToString() & "." &
@@ -182,17 +189,14 @@ Public Class MainWindowM
Dim sKey As String = String.Empty Dim sKey As String = String.Empty
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile) EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey) EgtSetKey(sKey)
' Impostazioni per chiave di rete Dim sNestKey As String = ""
Dim bNetKey As Boolean = ( GetMainPrivateProfileInt( S_GENERAL, K_NETKEY, 0) = 1) EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNetHwKey( bNetKey) 'EgtSetNestKey(sNestKey)
Dim sLockId As String = "" ' Verifico abilitazione nesting automatico
EgtUILib.GetPrivateProfileString( S_LICENCE, K_LOCKID, "", sLockId, sLicFile) m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
If Not String.IsNullOrEmpty( sLockId) Then
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2507, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(5583, 2505, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2507, 1, m_nKeyOptions) EgtGetKeyOptions(5583, 2505, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
+2 -1
View File
@@ -226,7 +226,8 @@ Public Class MainWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object) Public Sub CloseApplication(ByVal param As Object)
If Map.refSliceManagerVM.bCalculating Then If Map.refSliceManagerVM.bCalculating Then
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
CloseApplication() CloseApplication()
+2 -1
View File
@@ -286,7 +286,8 @@ Public Class ManagePartPanelVM
Next Next
Next Next
If sErr.Count > 0 Then If sErr.Count > 0 Then
MessageBox.Show(String.Concat(sErr), "Error") 'MessageBox.Show(String.Concat(sErr), "Error")
EgtMessageBoxV.Show(Application.Current.MainWindow, String.Concat(sErr), "Error")
Return Return
Else Else
' Creo pezzi e layer necessari ' Creo pezzi e layer necessari
+4 -2
View File
@@ -629,7 +629,8 @@ Public Class GeomEntity_MenuItem
Map.refManagePartPanelVM.SetIsEnabled(True) Map.refManagePartPanelVM.SetIsEnabled(True)
Return Return
ElseIf m_Type = ManagePart_Layer.LayerType.DELETE Then ElseIf m_Type = ManagePart_Layer.LayerType.DELETE Then
If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
EgtErase(m_OrigEntity.nId) EgtErase(m_OrigEntity.nId)
' se l'entita' e' gia' in lista pezzi ' se l'entita' e' gia' in lista pezzi
If Not IsNothing(m_OrigEntity.OrigLayer) Then If Not IsNothing(m_OrigEntity.OrigLayer) Then
@@ -1037,7 +1038,8 @@ Public Class ManagerLayer_MenuItem
Case Else ' PartMenuCmd.IMPORTPRINT Case Else ' PartMenuCmd.IMPORTPRINT
Dim bDeleteOldPrint As Boolean = False Dim bDeleteOldPrint As Boolean = False
If m_OrigLayer.EntityList.Count > 0 Then If m_OrigLayer.EntityList.Count > 0 Then
If MessageBox.Show("Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then 'If MessageBox.Show("Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
Return Return
Else Else
bDeleteOldPrint = True bDeleteOldPrint = True
+2 -1
View File
@@ -769,7 +769,8 @@ Public Class StringMaterialParam
End Property End Property
Public Sub Original() Public Sub Original()
If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
m_sGUID = ORIG_MATERIAL m_sGUID = ORIG_MATERIAL
m_sValue = ORIG_MATERIAL m_sValue = ORIG_MATERIAL
NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(sValue))
+10 -5
View File
@@ -24,7 +24,8 @@ Public Class MaterialDbVM
' verifico se modificato ' verifico se modificato
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) 'Select Case MessageBox.Show("Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMaterial.Save() m_SelMaterial.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -236,7 +237,8 @@ Public Class MaterialDbVM
Public Sub Ok() Public Sub Ok()
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) 'Select Case MessageBox.Show("Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMaterial.Save() m_SelMaterial.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -365,17 +367,20 @@ Public Class MaterialDbVM
' se materiale originale, esco ' se materiale originale, esco
If SelMaterialIsOriginal() Then If SelMaterialIsOriginal() Then
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then 'If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
Return Return
End If End If
sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?" sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?"
Else Else
MessageBox.Show("Original material impossible to delete!") 'MessageBox.Show("Original material impossible to delete!")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Original material impossible to delete!")
Return Return
End If End If
End If End If
' chiedo conferma ' chiedo conferma
Select Case MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
'MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_MaterialList.Remove(m_SelMaterial) m_MaterialList.Remove(m_SelMaterial)
SetIsModified(True) SetIsModified(True)
+2 -2
View File
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.7.1")> <Assembly: AssemblyVersion("2.5.5.1")>
<Assembly: AssemblyFileVersion("2.5.7.1")> <Assembly: AssemblyFileVersion("2.5.5.1")>
+31 -26
View File
@@ -563,17 +563,17 @@ Public Class OptionWindowVM
End Property End Property
Public ReadOnly Property ThickLineMsg As String Public ReadOnly Property ThickLineMsg As String
Get Get
Return EgtMsg( 6536) ' Linee spesse Return EgtMsg(6536) ' Linee spesse
End Get End Get
End Property End Property
Public ReadOnly Property SmoothTriMeshMsg As String Public ReadOnly Property SmoothTriMeshMsg As String
Get Get
Return EgtMsg( 6518) ' Superfici smussate Return EgtMsg(6518) ' Superfici smussate
End Get End Get
End Property End Property
Public ReadOnly Property UpdateLicenceMsg As String Public ReadOnly Property UpdateLicenceMsg As String
Get Get
Return EgtMsg( 6553) ' Aggiorna licenza Return EgtMsg(6553) ' Aggiorna licenza
End Get End Get
End Property End Property
@@ -953,31 +953,32 @@ Public Class OptionWindowVM
Dim sMachDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, sMachName) Dim sMachDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, sMachName)
' Preparo direttorio temporaneo ' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, "Temp") Dim sTempDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, "Temp")
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If End If
My.Computer.FileSystem.CreateDirectory( sTempDir) My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo ' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sMachZip) Using zip As New Ionic.Zip.ZipFile(sMachZip)
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite) zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using End Using
' Se non è una macchina segnalo il problema ed esco ' Se non è una macchina segnalo il problema ed esco
If Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".ini")) Or If Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".ini")) Or
Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".mlde")) Then Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
' Il file {0} non contiene una macchina - Avviso ' Il file {0} non contiene una macchina - Avviso
Dim sOut As String = String.Format(EgtMsg(6529), sMachZip) Dim sOut As String = String.Format(EgtMsg(6529), sMachZip)
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco ' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return Return
End If End If
' Imposto data e ora correnti al file mlde della macchina ' Imposto data e ora correnti al file mlde della macchina
Try Try
File.SetLastWriteTime( Path.Combine( sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now) File.SetLastWriteTime(Path.Combine(sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
Catch ex As Exception Catch ex As Exception
End Try End Try
' Verifico esistenza di una macchina con lo stesso nome ' Verifico esistenza di una macchina con lo stesso nome
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir) Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists(sMachDir)
Dim bUpdate As Boolean = True Dim bUpdate As Boolean = True
If bOldExists Then If bOldExists Then
Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName)) Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName))
@@ -994,23 +995,24 @@ Public Class OptionWindowVM
End Select End Select
' Faccio una copia di backup della macchina corrente ' Faccio una copia di backup della macchina corrente
Dim sBackupDir As String = sMachDir & ".old" Dim sBackupDir As String = sMachDir & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If End If
Try Try
My.Computer.FileSystem.MoveDirectory( sMachDir, sBackupDir, True) My.Computer.FileSystem.MoveDirectory(sMachDir, sBackupDir, True)
Catch ex As Exception Catch ex As Exception
' Ripristino lo stato originale ed esco ' Ripristino lo stato originale ed esco
My.Computer.FileSystem.MoveDirectory( sBackupDir, sMachDir, True) My.Computer.FileSystem.MoveDirectory(sBackupDir, sMachDir, True)
' L'aggiornamento della macchina "{0}" non è riuscito. ' L'aggiornamento della macchina "{0}" non è riuscito.
Dim sKo As String = String.Format(EgtMsg(6535), sMachName) Dim sKo As String = String.Format(EgtMsg(6535), sMachName)
EgtOutLog( sKo) EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK) 'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
Return Return
End Try End Try
End If End If
' Installo la macchina ' Installo la macchina
My.Computer.FileSystem.MoveDirectory( Path.Combine( sTempDir, sMachName), sMachDir, True) My.Computer.FileSystem.MoveDirectory(Path.Combine(sTempDir, sMachName), sMachDir, True)
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi ' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
If bOldExists And bUpdate Then If bOldExists And bUpdate Then
Dim sBackupDir As String = sMachDir & ".old" Dim sBackupDir As String = sMachDir & ".old"
@@ -1047,10 +1049,11 @@ Public Class OptionWindowVM
End If End If
'La macchina "{0}" è stata aggiornata con successo. 'La macchina "{0}" è stata aggiornata con successo.
Dim sOk As String = String.Format(EgtMsg(6530), sMachName) Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
EgtOutLog( sOk) EgtOutLog(sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK) 'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
' Rimuovo il direttorio temporaneo ' Rimuovo il direttorio temporaneo
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
' Aggiorno la lista delle macchina ' Aggiorno la lista delle macchina
MyMachine.InsertMachine(sMachDir, Map.refMachinePanelVM.MachineList) MyMachine.InsertMachine(sMachDir, Map.refMachinePanelVM.MachineList)
End Sub End Sub
@@ -1096,7 +1099,7 @@ Public Class OptionWindowVM
' aggiungo i file della Macchina ' aggiungo i file della Macchina
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
If Directory.Exists(sMachineDir) Then If Directory.Exists(sMachineDir) Then
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True) zip.AddSelectedFiles("name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
End If End If
' salvo lo zip ' salvo lo zip
zip.Save() zip.Save()
@@ -1106,12 +1109,14 @@ Public Class OptionWindowVM
' L'esportazione della macchina "{0}" non è riuscita. ' L'esportazione della macchina "{0}" non è riuscita.
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName) Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
EgtOutLog(sKo) EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK) 'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
End Try End Try
'La macchina "{0}" è stata esportata con successo. 'La macchina "{0}" è stata esportata con successo.
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName) Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
EgtOutLog(sOk) EgtOutLog(sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK) 'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
End Sub End Sub
#End Region ' ExportMachine #End Region ' ExportMachine
+12 -5
View File
@@ -149,6 +149,9 @@ Public Class ProjManagerVM
''' Execute the Save. This method is invoked by the SaveCommand. ''' Execute the Save. This method is invoked by the SaveCommand.
''' </summary> ''' </summary>
Public Sub NewProjectCmd() Public Sub NewProjectCmd()
' 'MessageBox.Show("Testo di prova EgtMessageBox", "Titolo di prova")
' Dim x = EgtMessageBoxV.Show(Application.Current.MainWindow, "Testo di prova EgtMessageBox", "Titolo di prova", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning, MessageBoxResult.Yes)
NewProject(True) NewProject(True)
End Sub End Sub
@@ -370,7 +373,8 @@ Public Class ProjManagerVM
GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress) GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress)
' se vuoto do messaggio di errore ed esco ' se vuoto do messaggio di errore ed esco
If String.IsNullOrWhiteSpace(sSupportAddress) Then If String.IsNullOrWhiteSpace(sSupportAddress) Then
MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
' Recupero numero chiave ' Recupero numero chiave
@@ -381,14 +385,16 @@ Public Class ProjManagerVM
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
' se nome file vuoto o con estensione non valida, chiedo se si vuole salvare ' se nome file vuoto o con estensione non valida, chiedo se si vuole salvare
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refSceneHostVM.SaveProject() Map.refSceneHostVM.SaveProject()
End If End If
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
' se modificato, chiedo se si vuole salvare ' se modificato, chiedo se si vuole salvare
Else Else
If EgtGetModified() Then If EgtGetModified() Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refSceneHostVM.SaveProject() Map.refSceneHostVM.SaveProject()
End If End If
End If End If
@@ -475,7 +481,8 @@ Public Class ProjManagerVM
bEx = True bEx = True
End Try End Try
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information) 'MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
Else Else
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5) Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5)
End If End If
Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

+2 -1
View File
@@ -51,7 +51,8 @@ Public Class CopyFromWndVM
Public Sub Ok() Public Sub Ok()
If IsNothing(m_SelRib) Then If IsNothing(m_SelRib) Then
MessageBox.Show("Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show("Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
Return Return
End If End If
' copio i parametri nella rib corrente ' copio i parametri nella rib corrente
+28 -16
View File
@@ -85,21 +85,23 @@ Public Class MySceneHostVM
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore" ' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3) Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1) Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
' Altrimenti manca la licenza ' Altrimenti manca la licenza
Else Else
EgtOutLog("Problems with Licence") EgtOutLog("Problems with Licence")
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore" ' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6) Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1) Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then 'If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' Apro dialogo per richiesta file licenza ' Apro dialogo per richiesta file licenza
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With { Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".lic", .DefaultExt = ".lic",
.Filter = "Licences (.lic)|*.lic", .Filter = "Licences (.lic)|*.lic",
.CheckFileExists = True, .CheckFileExists = True,
.ValidateNames = True .ValidateNames = True
} }
If LicDlg.ShowDialog() = True Then If LicDlg.ShowDialog() = True Then
' Recupero il direttorio del file ' Recupero il direttorio del file
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName) Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
@@ -497,7 +499,8 @@ Public Class MySceneHostVM
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
' verifico che ci sia una sola entita' ' verifico che ci sia una sola entita'
If EgtGetGroupObjs(nNewLayerId) <> 1 Then If EgtGetGroupObjs(nNewLayerId) <> 1 Then
MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Else Else
' elimino eventuale entita' vecchia ' elimino eventuale entita' vecchia
If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId) If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId)
@@ -1021,7 +1024,8 @@ Public Class MySceneHostVM
EgtErase(EgtGetFirstPart()) EgtErase(EgtGetFirstPart())
CurrentMachine.CreateMachineTable() CurrentMachine.CreateMachineTable()
If Not bOk Then If Not bOk Then
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error 'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Map.refTopPanelVM.PartList.Clear() Map.refTopPanelVM.PartList.Clear()
@@ -1050,7 +1054,8 @@ Public Class MySceneHostVM
Else Else
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
End If End If
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
' leggo materiale e macchina ' leggo materiale e macchina
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE) Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
@@ -1062,7 +1067,8 @@ Public Class MySceneHostVM
' imposto la macchina ' imposto la macchina
Map.refMachinePanelVM.SelectedMachine = ProjectMachine Map.refMachinePanelVM.SelectedMachine = ProjectMachine
Else Else
MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Map.refProjManagerVM.NewProject(False) Map.refProjManagerVM.NewProject(False)
Return Return
End If End If
@@ -1085,7 +1091,9 @@ Public Class MySceneHostVM
Else Else
Dim sMaterialName As String = "" Dim sMaterialName As String = ""
EgtGetInfo(nTabPartId, KEY_MATERIAL_NAME, sMaterialName) EgtGetInfo(nTabPartId, KEY_MATERIAL_NAME, sMaterialName)
MessageBox.Show("Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine & 'MessageBox.Show("Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
' "Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
"Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) "Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
End If End If
End If End If
@@ -1169,7 +1177,8 @@ Public Class MySceneHostVM
Else Else
Map.refProjManagerVM.MruFiles.Remove(sFile) Map.refProjManagerVM.MruFiles.Remove(sFile)
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
End Sub End Sub
@@ -1177,7 +1186,8 @@ Public Class MySceneHostVM
' Segnalo eventuale errore ' Segnalo eventuale errore
If Not bOk Then If Not bOk Then
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Map.refProjManagerVM.MruImportFiles.Add(sFile) Map.refProjManagerVM.MruImportFiles.Add(sFile)
EgtSetInfo(EgtGetLastPart(), FILE_PATH, sFile) EgtSetInfo(EgtGetLastPart(), FILE_PATH, sFile)
@@ -1195,7 +1205,8 @@ Public Class MySceneHostVM
' Abilito progress e bottone stop ' Abilito progress e bottone stop
Map.refMyStatusBarVM.StartLoading("", True) Map.refMyStatusBarVM.StartLoading("", True)
Else Else
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error 'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
End If End If
End Sub End Sub
@@ -1208,7 +1219,8 @@ Public Class MySceneHostVM
' Segnalo eventuale errore ' Segnalo eventuale errore
If Not bOk Then If Not bOk Then
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
ElseIf Path.GetExtension(sFile) <> ".cnc" Then ElseIf Path.GetExtension(sFile) <> ".cnc" Then
' creo oggetto pezzo in lista ' creo oggetto pezzo in lista
'Map.refProjectVM. 'Map.refProjectVM.
+2 -1
View File
@@ -183,7 +183,8 @@ Public Class SecondaryWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object) Public Sub CloseApplication(ByVal param As Object)
If Map.refSliceManagerVM.bCalculating Then If Map.refSliceManagerVM.bCalculating Then
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
Map.refMainWindowVM.CloseApplication() Map.refMainWindowVM.CloseApplication()
@@ -740,7 +740,6 @@ Public Class ShellNumberPanelVM
If NewGeomType = GDB_TY.CRV_COMPO Then If NewGeomType = GDB_TY.CRV_COMPO Then
If Not EgtCurveIsClosed(nNewEntityId) Then If Not EgtCurveIsClosed(nNewEntityId) Then
EgtCloseCurveCompo(nNewEntityId) EgtCloseCurveCompo(nNewEntityId)
m_bEscOnLine2P = True
End If End If
EgtSetName(nNewEntityId, RIB_CURVE) EgtSetName(nNewEntityId, RIB_CURVE)
' resetto colore entita' ' resetto colore entita'
@@ -769,6 +768,9 @@ Public Class ShellNumberPanelVM
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True m_bIsCreatingExtrusion = True
Map.refControllerInputPanelVM.IsChecked = True Map.refControllerInputPanelVM.IsChecked = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else Else
' cancello layer ' cancello layer
EgtErase(nNewExtrusionLayerId) EgtErase(nNewExtrusionLayerId)
+6 -3
View File
@@ -71,11 +71,14 @@ Public Class MySimulation
Case MCH_SIM.OUTSTROKE Case MCH_SIM.OUTSTROKE
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
EgtGetOutstrokeInfo(sInfo) EgtGetOutstrokeInfo(sInfo)
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ... 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
Case MCH_SIM.DIR_ERR Case MCH_SIM.DIR_ERR
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
Case Else Case Else
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
End Select End Select
End If End If
' Aggiorno stato visualizzazione macchina (dipende anche da utensile) ' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
+6 -4
View File
@@ -88,10 +88,12 @@ Public Class SimulationPanelVM
If Not EgtSimInit() OrElse Not EgtSimStart() Then If Not EgtSimInit() OrElse Not EgtSimStart() Then
If EgtGetLastMachMgrErrorId() <> 0 Then If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString() Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) Else
End If 'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If End If
' Imposto stato corrente ' Imposto stato corrente
MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP) MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP)
+20 -10
View File
@@ -322,7 +322,8 @@ Public Class SliceManagerVM
End If End If
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
MessageBox.Show("Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
' mostro barre di caricamento ' mostro barre di caricamento
@@ -396,7 +397,8 @@ Public Class SliceManagerVM
Map.refTopPanelVM.SelPart.RefreshPrintLayers() Map.refTopPanelVM.SelPart.RefreshPrintLayers()
' in caso di errore, segnalazione ' in caso di errore, segnalazione
If Not bOk Then If Not bOk Then
MessageBox.Show("Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
If bOk And m_bGenerate Then If bOk And m_bGenerate Then
' verifico esistenza e correttezza machgroup ' verifico esistenza e correttezza machgroup
@@ -424,7 +426,8 @@ Public Class SliceManagerVM
Else Else
sOut &= sMsg sOut &= sMsg
End If End If
MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
End If End If
' aggiorno tempo e massa ' aggiorno tempo e massa
@@ -481,7 +484,8 @@ Public Class SliceManagerVM
EgtLuaCreateGlobTable("MACH") EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sInitMachScriptPath) Then If Not EgtLuaExecFile(sInitMachScriptPath) Then
EgtOutLog("Error executing Machining init script " & sInitMachScriptPath) EgtOutLog("Error executing Machining init script " & sInitMachScriptPath)
MessageBox.Show(EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
Dim nErr As Integer = 999 Dim nErr As Integer = 999
@@ -500,7 +504,8 @@ Public Class SliceManagerVM
EgtLuaCreateGlobTable("MACH") EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sExitMachScriptPath) Then If Not EgtLuaExecFile(sExitMachScriptPath) Then
EgtOutLog("Error executing Machining exit script " & sExitMachScriptPath) EgtOutLog("Error executing Machining exit script " & sExitMachScriptPath)
MessageBox.Show(EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
Dim nErr As Integer = 999 Dim nErr As Integer = 999
@@ -536,23 +541,27 @@ Public Class SliceManagerVM
If m_bCalculating Then Return If m_bCalculating Then Return
m_bCalculating = True m_bCalculating = True
If IsNothing(Map.refTopPanelVM.SelPart) Then If IsNothing(Map.refTopPanelVM.SelPart) Then
MessageBox.Show("No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
If IsNothing(Map.refTopPanelVM.SelMaterial) Then If IsNothing(Map.refTopPanelVM.SelMaterial) Then
MessageBox.Show("No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
If IsNothing(Map.refTopPanelVM.SelMachining) OrElse IsNothing(Map.refTopPanelVM.CurrMachining) OrElse Map.refTopPanelVM.CurrMachining.dCurrStrandH <= 0 Then If IsNothing(Map.refTopPanelVM.SelMachining) OrElse IsNothing(Map.refTopPanelVM.CurrMachining) OrElse Map.refTopPanelVM.CurrMachining.dCurrStrandH <= 0 Then
MessageBox.Show("No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
If Not String.IsNullOrWhiteSpace(CurrentMachine.sMachDataIniFile) AndAlso Not CurrentMachine.b3ExtrusionArea.EnclosesXY(b3Print) Then If Not String.IsNullOrWhiteSpace(CurrentMachine.sMachDataIniFile) AndAlso Not CurrentMachine.b3ExtrusionArea.EnclosesXY(b3Print) Then
MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
@@ -714,7 +723,8 @@ Public Class SliceManagerVM
Process.Start("Notepad.exe", sIsoFilePath) Process.Start("Notepad.exe", sIsoFilePath)
' altrimenti lo segnalo ' altrimenti lo segnalo
Else Else
MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")") 'MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
End If End If
End If End If
NotifyPropertyChanged(NameOf(Time_Visibility)) NotifyPropertyChanged(NameOf(Time_Visibility))
+2 -21
View File
@@ -274,27 +274,7 @@ Public Class TopPanelVM
WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, value.sGUID.ToString()) WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, value.sGUID.ToString())
' imposto selezionata come corrente ' imposto selezionata come corrente
If Not IsNothing(m_SelPart) AndAlso (IsNothing(m_SelMachining) OrElse value.sGUID <> m_SelMachining.sGUID) Then If Not IsNothing(m_SelPart) AndAlso (IsNothing(m_SelMachining) OrElse value.sGUID <> m_SelMachining.sGUID) Then
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
Dim OldSlicingTypeValue As Machining.MPAR_SLICINGTYPE = Nothing
Dim NewSlicingTypeValue As Machining.MPAR_SLICINGTYPE = Nothing
If Not IsNothing(GeneralCathegory) Then
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
If Not IsNothing(SlicingTypeParam) Then
OldSlicingTypeValue = SlicingTypeParam.SelValue.Id
End If
End If
Map.refCurrMachiningPanelVM.SetCurrMachining(New CurrMachining(m_SelPart.nPartId, value.nIndex)) Map.refCurrMachiningPanelVM.SetCurrMachining(New CurrMachining(m_SelPart.nPartId, value.nIndex))
GeneralCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
If Not IsNothing(GeneralCathegory) Then
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
If Not IsNothing(SlicingTypeParam) Then
NewSlicingTypeValue = SlicingTypeParam.SelValue.Id
End If
End If
If IsNothing(OldSlicingTypeValue) OrElse IsNothing(NewSlicingTypeValue) OrElse OldSlicingTypeValue <> NewSlicingTypeValue Then
' aggiorno area di estrusione
CurrentMachine.UpdateExtrusionArea()
End If
End If End If
End If End If
m_SelMachining = value m_SelMachining = value
@@ -772,7 +752,8 @@ Public Class TopPanelVM
Public Sub Machining() Public Sub Machining()
If IsNothing(m_SelPart) OrElse IsNothing(CurrMachining) Then Return If IsNothing(m_SelPart) OrElse IsNothing(CurrMachining) Then Return
If IsNothing(m_SelMachining) Then If IsNothing(m_SelMachining) Then
MessageBox.Show("Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation) 'MessageBox.Show("Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return Return
End If End If
SelPage = Pages.CURRMACHINING SelPage = Pages.CURRMACHINING
-10
View File
@@ -79,14 +79,6 @@ Public Module CurrentMachine
End Get End Get
End Property End Property
' altezza massima di estrusione impostata in file ini macchina
Private m_dSlicingMaxHeight As Double
Public ReadOnly Property dSlicingMaxHeight As Double
Get
Return m_dSlicingMaxHeight
End Get
End Property
#Region "Init" #Region "Init"
Sub InitCurrentMachine(sMachinesRootDir As String, sMachineName As String) Sub InitCurrentMachine(sMachinesRootDir As String, sMachineName As String)
@@ -105,8 +97,6 @@ Public Module CurrentMachine
m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini" m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini"
' impostazione cartella materiali ' impostazione cartella materiali
m_sMaterialFilePath = sMachinesRootDir & "\" & sMachineName & "\Materials\Materials.ini" m_sMaterialFilePath = sMachinesRootDir & "\" & sMachineName & "\Materials\Materials.ini"
' leggo altezza massima estrusione impostata su macchina
m_dSlicingMaxHeight = GetPrivateProfileDouble(S_MACH_PRINTING3D, K_MAX_HEIGHT, 900, m_sMachIniFile)
' Disabilito segnalazione modificato ' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
' recupero box macchina ' recupero box macchina