Compare commits

..

40 Commits

Author SHA1 Message Date
Demetrio Cassarino 32cf9493f8 Modifica Tab basic color e color theme 2023-10-12 14:44:11 +02:00
Demetrio Cassarino e640b5c546 Aggiunta nido d'ape colori e color theme
Rimozione hsl
2023-10-09 17:09:30 +02:00
Demetrio Cassarino 48d8773371 Merge remote-tracking branch 'origin/main' into feature/ColorPicker 2023-10-05 09:27:48 +02:00
Dario Sassi 93b573f1f0 Icarus 2.5j1 :
- ricompilazione con cambio versione.
2023-10-02 16:15:23 +02:00
Dario Sassi e19c3bf83d Merge remote-tracking branch 'origin/feature/DifferentTypeWidth' 2023-10-02 16:00:09 +02:00
Dario Sassi 63fa6ba9b8 Icarus 2.5h2 :
- ricompilazione con cambio versione.
2023-10-02 10:26:00 +02:00
Emmanuele Sassi 91582b4ab9 - aggiunti parametri larghezza strand per tutti i tipi di strand
- corretto errore di modifica alpha colore dopo creazione degli strand
- eliminata la colonna FMin
2023-09-25 16:20:45 +02:00
Dario Sassi 4604ae3558 Icarus :
- migliorata gestione di progetto modificato.
2023-08-30 12:14:26 +02:00
Dario Sassi 624eb0566f Icarus 2.5h1 :
- modifiche per visualizzare meglio l'area di valido posizionamento dei pezzi.
2023-08-28 19:50:01 +02:00
Emmanuele Sassi c32bfd55d0 - aggiunta indicazione parametri beta
- aggiunto parametro SlicingHeight
- corretti alcuni testi parametri
2023-08-24 19:04:44 +02:00
Demetrio Cassarino 958dd8d029 Merge branch 'temp' into feature/ColorPicker 2023-07-21 17:28:57 +02:00
Demetrio Cassarino 43f8c020c6 Merge branch 'feature/ColorPicker' of https://gitlab.steamware.net/egalware/icarus into feature/ColorPicker 2023-07-21 17:27:28 +02:00
Demetrio Cassarino 6dcaf822a6 Creazione finestra di dialogo e aggiornamento rettangoli colore del ColorPicker 2023-07-21 16:40:53 +02:00
Emmanuele Sassi db65ef9e15 - correzione errore di aggiornamento area di stampa su cambio tipo 2023-07-10 13:24:26 +02:00
Emmanuele Sassi d2a6a27200 Icarus 2.5g1 :
- ricompilazione con cambio versione
- aggiunta gestione parametri per link degli infill e strand count sui filled solids
2023-07-07 18:39:25 +02:00
Emmanuele Sassi d2463769ec - modifiche parziali per migliorare selezione colore 2023-07-07 17:02:07 +02:00
Emmanuele Sassi 6bad0e177f Merge branch 'feature/InfillParams' 2023-06-16 19:18:11 +02:00
Demetrio Cassarino 9a17bd37b7 Aggiornamento gradazione rettangolo colore 2023-06-16 18:31:23 +02:00
Emmanuele Sassi 667b8fde7c - introduzione parametri per infill
- modifica dei parametri auxSolid con gestione infill
- correzione creazione shellnumber e filled solid con esc su creazione percorso
2023-06-15 12:28:31 +02:00
Demetrio Cassarino fddc66b820 -Aggiornamento di tutti i colorpicker a egtcolorpicker 2023-06-12 15:26:20 +02:00
Emmanuele Sassi 48d0063167 Merge remote-tracking branch 'ICARUS/main' into feature/InfillParams 2023-06-12 12:51:52 +02:00
DarioS 13d89a3857 Icarus 2.5f1 :
- modificate costanti per Infill
- aggiunta gestione chiave di rete
- eliminata gestione codici protezione per nesting
- aggiornato codice di protezione mensile.
2023-06-12 09:20:59 +02:00
DarioS df7bb978b8 Icarus 2.5e2 :
- ricompilazione con cambio versione.
2023-05-26 10:47:28 +02:00
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
DarioS 088be26abf Icarus 2.5e1 :
- ricompilazione con cambio versione
- miglioria indicazione unità di misura di tempo (min:s).
2023-05-03 11:54:59 +02:00
DarioS 2e81f09a85 Icarus :
- modifica per far funzionara la ProgressBar anche con il calcolo dei solidi.
2023-04-24 15:35:11 +02:00
DarioS 21692af684 Icarus 2.5d4 :
- al parametro ScrewBack viene assegnato valore di default 45 (per progetti vecchi o nuove lavorazioni di libreria).
2023-04-20 16:16:10 +02:00
DarioS 6c36f856e6 Icarus 2.5d3 :
- ricompilazione con cambio versione.
2023-04-18 19:36:16 +02:00
Emmanuele Sassi 33b90967c6 - disattivato pannello Instrument quando modifiche in corso
- gestita visibilita' contemporanea di InputPanele MessagePanel
2023-04-18 17:21:03 +02:00
Emmanuele Sassi 47ea4e3646 - correzioni creazione solidi
- migliorata dis/attivazione interfaccia durante creazione solidi
2023-04-18 09:01:20 +02:00
Emmanuele Sassi cc41ca8d82 - correzione disabilitazione parametri LeadOut in CurrMachining
- cambiata gestione della modalita' di modifica selezionata
- corezione impostazione pagina modifica dopo apertura progetto
- verifica che non ci siano operazioni di modifica in corso prima di far partire slice
- correzione errore su chiusura percorso disegnato
- disabilitata interfaccia quando comando in corso in modifica
2023-04-17 20:00:50 +02:00
DarioS 554b1a662e Icarus :
- correzione per caricamento file icrs con drag.
2023-04-11 15:24:16 +02:00
DarioS 10a0745449 Merge remote-tracking branch 'origin/FlowDocument' 2023-04-11 13:38:26 +02:00
DarioS 1a0eb0cb31 Icarus :
- lettura MinMax ora da Ini macchina.
2023-04-11 13:27:10 +02:00
DarioS 33176f40fa Icarus 2.5d2 :
- ricompilazione con cambio versione.
2023-04-11 11:19:41 +02:00
Emmanuele Sassi bbb6d16483 Merge branch 'FlowDocument' 2023-04-11 09:40:29 +02:00
Emmanuele Sassi 57baab72d5 Merge branch 'FlowDocument' 2023-04-08 12:30:03 +02:00
Emmanuele Sassi 91d8e8aa1f Merge branch 'develop' 2023-04-07 15:54:38 +02:00
78 changed files with 5408 additions and 1091 deletions
@@ -66,7 +66,8 @@ Public Class ChooseMachineWndVM
RaiseEvent m_CloseWindow(True)
Else
' 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 Sub
+28
View File
@@ -3,6 +3,7 @@
Public Const TABLE = "Table"
Public Const TABLE_OUTLINE = "TableOutline"
Public Const EXTRUSION_AREA = "ExtrusionArea"
Public Const EXTRUSION_RECT = "ExtrusionRect"
Public Const PART = "Part"
Public Const PRINT_SOLID = "PrintSolid"
Public Const LAY_MACH_START = "MachStart"
@@ -89,6 +90,7 @@
Public Const MAC_LINKTYPE = "LinkType"
Public Const MAC_LINKPARAM = "LinkParam"
Public Const MAC_LINKZUP = "LinkZup"
Public Const MAC_INNERSHELLWIDTH = "InnerStrandW"
Public Const MAC_OFFSETLEADPOINT = "OffsetLeadPoint"
Public Const MAC_LEADIN = "LeadIn"
Public Const MAC_LEADINTANGDIST = "LeadInTangDist"
@@ -108,6 +110,8 @@
Public Const MAC_PREFLOWDELAY = "PreFlowDelay"
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
Public Const MAC_SCREWBACK = "ScrewBack"
Public Const MAC_SLICINGHEIGHT = "SlicingHeight"
Public Const MAC_RIBSSTRANDWIDTH = "RibsStrandW"
Public Const MAC_RIBSTYPE = "RibsType"
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
@@ -127,15 +131,39 @@
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe"
Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir"
Public Const MAC_AUXSOLIDSSTRANDWIDTH = "AuxSolidsStrandW"
Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap"
Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill"
Public Const MAC_AUXSOLIDSINFILLLINK = "AuxSolidsInfillLink"
Public Const MAC_AUXSOLIDSSTRANDCOUNT = "AuxSolidsStrandCount"
Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder"
Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType"
Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam"
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_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen"
Public Const MAC_AUXSOLIDSWIPEDIR = "AuxSolidsWipeDir"
Public Const MAC_INFILLSTRANDWIDTH = "InfillStrandW"
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_PRINTORDER = "PrintOrder"
Public Const MAC_CONSTANT = "Constant"
+1
View File
@@ -21,6 +21,7 @@ Public Module ConstGen
' File con dati di licenza
Public Const LIC_FILE_NAME As String = "Icarus.lic"
Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key"
Public Const K_NESTKEY As String = "NestKey"
+1 -2
View File
@@ -26,6 +26,7 @@ Public Module ConstIni
'Public Const K_MESSAGES As String = "Messages"
'Public Const K_WINPLACE As String = "WinPlace"
'Public Const K_LASTPROJ As String = "LastProj"
Public Const K_NETKEY As String = "NetKey"
Public Const K_LASTNGEDIR As String = "LastNgeDir"
Public Const K_LASTIMPDIR As String = "LastImpDir"
'Public Const K_SUPPORT As String = "Support"
@@ -122,8 +123,6 @@ Public Module ConstIni
Public Const K_CLR_MACHSTART As String = "MachStart"
Public Const K_CLR_OTHERS As String = "Others"
Public Const S_MINMAX As String = "MinMax"
Public Const S_MRUFILES As String = "MruFiles"
Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
+3 -25
View File
@@ -1,31 +1,6 @@
Public Module ConstMachIni
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
Public Const GETWALLDATA_FILE_NAME As String = "GetWallData.lua"
Public Const GETTS3DATA_FILE_NAME As String = "GetTs3Data.lua"
Public Const K_NCTYPE As String = "NCType"
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
Public Const S_CHANNELS As String = "Channels"
Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const S_EXTENSION As String = "Extension"
' Variables della macchina corrente
Public Const S_MAINVARIABLES As String = "MainVariables"
Public Const S_VARIABLES As String = "Variables"
Public Const S_INPUTVARIABLES As String = "InputVariables"
Public Const S_OUTPUTVARIABLES As String = "OutputVariables"
Public Const S_MDI As String = "MDI"
Public Const K_BEAM As String = "Beam"
Public Const K_WALL As String = "Wall"
Public Const K_SCRIPT As String = "Scripts"
Public Const K_SETUP As String = "Setup"
Public Const K_FLOW As String = "Flow"
Public Const TS3DATA_FILE As String = "Ts3Data.lua"
Public Const S_MACHINING As String = "Machining"
Public Const K_MACH_INITSCRIPT As String = "InitScript"
@@ -35,5 +10,8 @@
Public Const K_SLICINGTYPE As String = "SlicingType"
Public Const K_SPEED_MIN As String = "SpeedMin"
Public Const K_SPEED_MAX As String = "SpeedMax"
Public Const K_MAX_HEIGHT As String = "HMax"
Public Const S_MINMAX As String = "MinMax"
End Module
+242 -17
View File
@@ -111,6 +111,7 @@ Public Class CurrMachining
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.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 MachiningParam In Cathegory.MachiningParamList
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
@@ -128,6 +129,7 @@ Public Class CurrMachining
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.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 MachiningParam In Cathegory.MachiningParamList
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
@@ -209,7 +211,6 @@ Public Class CurrMachiningCathegory
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, 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.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me),
@@ -219,15 +220,17 @@ Public Class CurrMachiningCathegory
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, 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.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
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 CurrNumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb, Me),
@@ -238,7 +241,8 @@ Public Class CurrMachiningCathegory
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.RIBS
m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
@@ -261,20 +265,47 @@ Public Class CurrMachiningCathegory
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.AUX_SOLID
m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, 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.AUXSOLIDSLINKTYPE, 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.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.AUXSOLIDSWIPELEN, 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.INFILLSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
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
' verifico dipendenze tra parametri
Select Case m_Type
Case Cathegories.LINK
For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN}
For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN, MachiningParam.Params.LEADOUT}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
@@ -288,6 +319,19 @@ Public Class CurrMachiningCathegory
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
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 Sub
@@ -320,14 +364,32 @@ Public Class CurrNumericMachiningParam
StringToDouble(value, dTempValue)
End If
If m_bIsActiveMinMax Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
m_dValue = dTempValue
If m_MinMaxType = MinMaxTypes.ABSOLUT Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
m_dValue = dTempValue
End If
ElseIf m_MinMaxType = MinMaxTypes.PERCENTAGE Then
Dim LinkedParam As MachiningParam = Nothing
' cerco il parametro a cui e' collegato
For Each CurrCathegory In Map.refMachiningDbVM.SelMachining.CathegoryList
LinkedParam = CurrCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = m_MinMaxLinkedParam)
If Not IsNothing(LinkedParam) Then Exit For
Next
If Not IsNothing(LinkedParam) AndAlso TypeOf LinkedParam Is NumericMachiningParam Then
Dim NumericLinkedParam As NumericMachiningParam = DirectCast(LinkedParam, NumericMachiningParam)
If dTempValue >= NumericLinkedParam.dValue * m_dMinValue / 100 AndAlso dTempValue <= NumericLinkedParam.dValue * m_dMaxValue / 100 Then
m_dValue = dTempValue
End If
Else
m_dValue = dTempValue
End If
End If
Else
m_dValue = dTempValue
End If
NotifyPropertyChanged(NameOf(sValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
ManageDependencyParam()
End Set
End Property
@@ -375,6 +437,9 @@ Public Class CurrNumericMachiningParam
Case Params.LINKZUP
bReadFromPart = EgtGetInfo(nPartId, MAC_LINKZUP, m_dValue)
m_bIsLen = True
Case Params.INNERSHELLWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_INNERSHELLWIDTH, m_dValue)
m_bIsLen = True
Case Params.OFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSETLEADPOINT, m_dValue)
m_bIsLen = True
@@ -426,6 +491,12 @@ Public Class CurrNumericMachiningParam
Case Params.SCREWBACK
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
m_bIsLen = True
Case Params.SLICINGHEIGHT
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGHEIGHT, m_dValue)
m_bIsLen = True
Case Params.RIBSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dValue)
m_bIsLen = True
Case Params.RIBSOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
m_bIsLen = False
@@ -459,15 +530,39 @@ Public Class CurrNumericMachiningParam
Case Params.SHELLNBRWIPEDIR
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPEDIR, m_dValue)
m_bIsLen = False
Case Params.AUXSOLIDSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dValue)
m_bIsLen = False
Case Params.AUXSOLIDSLINKPARAM
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
m_bIsLen = False
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
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
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
m_bIsLen = True
@@ -480,27 +575,66 @@ Public Class CurrNumericMachiningParam
Case Params.FLOWRATE_PC
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
m_bIsLen = False
Case Params.CEILCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILCOUNT, m_dValue)
m_bIsLen = False
Case Params.INFILLSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLSTRANDWIDTH, m_dValue)
m_bIsLen = True
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
m_dOrigValue = m_dValue
If nIndex > 0 Then
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
Select Case Type
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
Params.FLOORCOUNT, Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT
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.INNERSHELLWIDTH, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
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)
Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR
Case Params.AUXSOLIDSSTRANDWIDTH, Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
Params.AUXSOLIDSOFFSETLEADPOINT, Params.AUXSOLIDSDENSITY, Params.AUXSOLIDSGRIDOVERLAP,
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)
Case Params.INFILLSTRANDWIDTH, 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
If bForceFromDb OrElse Not bReadFromPart Then
m_dValue = m_DbParam.dOrigValue
@@ -539,6 +673,8 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_LINKPARAM, sWriteValue)
Case Params.LINKZUP
EgtSetInfo(nPartId, MAC_LINKZUP, sWriteValue)
Case Params.INNERSHELLWIDTH
EgtSetInfo(nPartId, MAC_INNERSHELLWIDTH, sWriteValue)
Case Params.OFFSETLEADPOINT
EgtSetInfo(nPartId, MAC_OFFSETLEADPOINT, sWriteValue)
Case Params.LEADINTANGDIST
@@ -573,6 +709,10 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue)
Case Params.SCREWBACK
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
Case Params.SLICINGHEIGHT
EgtSetInfo(nPartId, MAC_SLICINGHEIGHT, sWriteValue)
Case Params.RIBSSTRANDWIDTH
EgtSetInfo(nPartId, MAC_RIBSSTRANDWIDTH, sWriteValue)
Case Params.RIBSOVERLAP
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
Case Params.RIBSSTRANDCOUNT
@@ -595,12 +735,28 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue)
Case Params.SHELLNBRWIPEDIR
EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue)
Case Params.AUXSOLIDSSTRANDWIDTH
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue)
Case Params.AUXSOLIDSSTRANDCOUNT
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
Case Params.AUXSOLIDSOVERLAP
EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
Case Params.AUXSOLIDSLINKPARAM
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
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
EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
Case Params.AUXSOLIDSWIPELEN
@@ -609,6 +765,28 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
Case Params.FLOWRATE_PC
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
Case Params.INFILLSTRANDWIDTH
EgtSetInfo(nPartId, MAC_INFILLSTRANDWIDTH, 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 Sub
@@ -811,9 +989,14 @@ Public Class CurrComboMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.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
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
@@ -836,6 +1019,28 @@ Public Class CurrComboMachiningParam
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, 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
m_OrigSelValue = m_SelValue
If nIndex > 0 Then
@@ -849,6 +1054,8 @@ Public Class CurrComboMachiningParam
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
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
If bForceFromDb OrElse Not bReadFromPart Then
m_SelValue = m_DbParam.OrigSelValue
@@ -887,6 +1094,12 @@ Public Class CurrComboMachiningParam
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
Case Params.DYNAMIC_MODE
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 Sub
@@ -976,6 +1189,10 @@ Public Class CurrCheckMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
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
m_bOrigValue = m_bValue
If nIndex > 0 Then
@@ -985,6 +1202,10 @@ Public Class CurrCheckMachiningParam
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
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
If bForceFromDb OrElse Not bReadFromPart Then
m_bValue = m_DbParam.bOrigValue
@@ -1011,6 +1232,10 @@ Public Class CurrCheckMachiningParam
EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
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 Sub
@@ -54,9 +54,16 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
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"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,2.5,0"
@@ -79,9 +86,16 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
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"
ItemsSource="{Binding ValueList}"
SelectedItem="{Binding SelValue}"
@@ -107,9 +121,16 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
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"
IsChecked="{Binding bValue}"
HorizontalAlignment="Center"
+265
View File
@@ -0,0 +1,265 @@
<EgtWPFLib5:EgtMainWindow x:Class="EgtColorPickerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtHexagon="clr-namespace:Icarus"
Title="{Binding sTitle}"
WindowStartupLocation="CenterOwner"
Width="750" Height="450"
Style="{StaticResource Dialog_Window}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TabControl>
<TabItem Header="{Binding BasicColor_Msg}">
<Grid HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColors}"
SelectedItem="{Binding SelColor}"
HorizontalAlignment="Center"
BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20"
Height="20"
Margin="2"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding Fill}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</TabItem>
<TabItem Header="{Binding ColorPicker_Msg}">
<TabItem.Resources>
<Style TargetType="{x:Type EgtHexagon:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
<Setter Property="BorderThickness" Value="1.5"/>
<Setter Property="BorderBrush" Value="White"/>
</Style>
</TabItem.Resources>
<EgtHexagon:EgtHexList ItemsSource="{Binding HexList}"
SelectedItem="{Binding sHexSelColor}"
Orientation="Vertical"
Margin="2.5"
RowCount="13"
ColumnCount="13"
Height="300"
Width="350"
Style="{StaticResource EgtHexList}">
<EgtHexagon:EgtHexList.ItemTemplate>
<DataTemplate/>
</EgtHexagon:EgtHexList.ItemTemplate>
<EgtHexagon:EgtHexList.ItemContainerStyle>
<Style TargetType="EgtHexagon:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
<Setter Property="Background" Value="{Binding Background}"/>
</Style>
</EgtHexagon:EgtHexList.ItemContainerStyle>
</EgtHexagon:EgtHexList>
</TabItem>
<TabItem Header="{Binding ColorPickerTheme_Msg}">
<Grid HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColorsTheme}"
SelectedItem="{Binding SelColorTheme}"
BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20"
Height="20"
Margin="2"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding Fill}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Column="1"
Margin="5,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding CustomColor_Msg}"
Margin="5,18,5,10"
Style="{StaticResource DialogWindow_TextBlock}"/>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding CustomColors}"
SelectedItem="{Binding SelCustomColor}"
HorizontalAlignment="Center"
BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20"
Height="20"
Margin="2"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding Fill}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
<Grid Grid.Row="2"
Margin="0,20,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Margin="0,10,5,0"
HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Width="100"
Height="70"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding CurrColor}"/>
<Button x:Name="SaveColor"
Grid.Row="1"
Margin="0,10,0,0"
Content="{Binding AddCColor_Msg}"
Command="{Binding SaveColor_Command}"
Style="{StaticResource LeftPanel_TextButton}"/>
</Grid>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Red_Msg}"
Margin="0,10,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
HorizontalAlignment="Right"
Margin="0,10,5,0"
IsReadOnly="False"
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="1"
Text="{Binding Green_Msg}"
Margin="5,5,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="1"
HorizontalAlignment="Right"
Margin="5,5,5,0"
IsReadOnly="False"
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="2"
Text="{Binding Blu_Msg}"
Margin="5,5,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="2"
HorizontalAlignment="Right"
Margin="5,5,5,0"
IsReadOnly="False"
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="3"
Text="{Binding Hexadecimal_Msg}"
Margin="5,5,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="3"
HorizontalAlignment="Right"
Margin="5,5,5,0"
Text="{Binding Hexadecimal}"
Style="{StaticResource ColorPicker_TextBox}"/>
</Grid>
</Grid>
</Grid>
</Grid>
<UniformGrid Grid.Row="2"
Rows="1"
Margin="10,10,10,0">
<Button IsDefault="True"
Content="OK"
Command="{Binding Ok_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtMainWindow>
@@ -0,0 +1,67 @@
Imports System.Windows.Forms
Public Class EgtColorPickerV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
Private Shadows DialogResult As DialogResult
Public Property CustomColors As Integer()
Get
Return m_EgtColorPickerVM.GetCustomColors()
End Get
Set(value As Integer())
m_EgtColorPickerVM.SetCustomColors(value)
End Set
End Property
Public Property Color As System.Drawing.Color
Get
Return System.Drawing.Color.FromArgb(255, m_EgtColorPickerVM.Red, m_EgtColorPickerVM.Green, m_EgtColorPickerVM.Blue)
End Get
Set(value As System.Drawing.Color)
m_EgtColorPickerVM.Red = value.R
m_EgtColorPickerVM.Green = value.G
m_EgtColorPickerVM.Blue = value.B
End Set
End Property
#End Region ' Fields & Properties
#Region "CONTRUCTORS"
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
MyBase.New(Owner)
InitializeComponent()
Me.DataContext = EtgColorPickerVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtColorPickerVM = EtgColorPickerVM
End Sub
#End Region ' Constructors
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
#End Region ' Events
#Region "METHODS"
''' <summary>
''' Apre una finestra EgtColorPicker
''' </summary>
''' <returns></returns>
Public Overloads Function ShowDialog() As DialogResult
MyBase.ShowDialog()
Return Me.DialogResult
End Function
#End Region ' Methods
End Class
File diff suppressed because it is too large Load Diff
+373
View File
@@ -0,0 +1,373 @@
Imports System.Globalization
Public Class EgtHexagon
Inherits Panel
#Region "ORIENTATION"
Public Shared ReadOnly OrientationProperty As DependencyProperty = DependencyProperty.RegisterAttached("Orientation",
GetType(Orientation),
GetType(EgtHexagon),
New FrameworkPropertyMetadata(Orientation.Horizontal, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange Or FrameworkPropertyMetadataOptions.[Inherits]))
Public Shared Sub SetOrientation(element As DependencyObject, value As Orientation)
element.SetValue(OrientationProperty, value)
End Sub
Public Shared Function GetOrientation(element As DependencyObject) As Orientation
Return CType(element.GetValue(OrientationProperty), Orientation)
End Function
Public Property Orientation As Orientation
Get
Return CType(GetValue(OrientationProperty), Orientation)
End Get
Set(value As Orientation)
SetValue(OrientationProperty, value)
End Set
End Property
#End Region ' Orientation
#Region "ROW"
Public Shared ReadOnly RowCountProperty As DependencyProperty = DependencyProperty.Register("RowCount", GetType(Integer),
GetType(EgtHexagon),
New FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange), AddressOf ValidateCountCallback)
Public Property RowCount As Integer
Get
Return CInt(GetValue(RowCountProperty))
End Get
Set(value As Integer)
SetValue(RowCountProperty, value)
End Set
End Property
#End Region ' Row
#Region "COLUMN"
Public Shared ReadOnly ColumnCountProperty As DependencyProperty = DependencyProperty.Register("ColumnCount",
GetType(Integer),
GetType(EgtHexagon),
New FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure Or FrameworkPropertyMetadataOptions.AffectsArrange), AddressOf ValidateCountCallback)
Public Property ColumnCount As Integer
Get
Return CInt(GetValue(ColumnCountProperty))
End Get
Set(value As Integer)
SetValue(ColumnCountProperty, value)
End Set
End Property
#End Region 'Column
#Region "VALIDATE"
Private Shared Function ValidateCountCallback(value As Object) As Boolean
If TypeOf value Is Integer Then
Dim count As Integer = CInt(value)
Return count > 0
End If
Return False
End Function
Private Function GetRow(e As UIElement) As Integer
Dim row As Integer = CInt(e.GetValue(Grid.RowProperty))
If row >= RowCount Then row = RowCount - 1
Return row
End Function
Private Function GetColumn(e As UIElement) As Integer
Dim column As Integer = CInt(e.GetValue(Grid.ColumnProperty))
If column >= ColumnCount Then column = ColumnCount - 1
Return column
End Function
Protected Overrides Function MeasureOverride(ByVal availableSize As Size) As Size
Dim w As Double = availableSize.Width
Dim h As Double = availableSize.Height
If Double.IsInfinity(w) OrElse Double.IsInfinity(h) Then
h = 0
w = 0
For Each e As UIElement In InternalChildren
e.Measure(availableSize)
Dim s = e.DesiredSize
If s.Height > h Then h = s.Height
If s.Width > w Then w = s.Width
Next
If Orientation = Orientation.Horizontal Then Return New Size(w * (ColumnCount * 3 + 1) / 4, h * (RowCount * 2 + 1) / 2)
Return New Size(w * (ColumnCount * 2 + 1) / 2, h * (RowCount * 3 + 1) / 4)
End If
Return availableSize
End Function
#End Region ' Validate
#Region "HASSHIFT"
Private Sub HasShift(first As Boolean, last As Boolean)
If Orientation = Orientation.Horizontal Then
HasRowShift(first, last)
Else
HasColumnShift(first, last)
End If
End Sub
Private Sub HasRowShift(firstRow As Boolean, lastRow As Boolean)
lastRow = True
firstRow = lastRow
Dim elements As UIElementCollection = MyBase.InternalChildren
Dim i As Integer = 0
While i < elements.Count AndAlso (firstRow OrElse lastRow)
Dim e = elements(i)
If e.Visibility = Visibility.Collapsed Then Continue While
Dim row As Integer = GetRow(e)
Dim column As Integer = GetColumn(e)
Dim modify As Integer = column Mod 2
If row = 0 AndAlso modify = 0 Then firstRow = False
If row = RowCount - 1 AndAlso modify = 1 Then lastRow = False
i += 1
End While
End Sub
Private Sub HasColumnShift(firstColumn As Boolean, lastColumn As Boolean)
lastColumn = True
firstColumn = lastColumn
Dim elements As UIElementCollection = MyBase.InternalChildren
Dim i As Integer = 0
While i < elements.Count AndAlso (firstColumn OrElse lastColumn)
Dim e = elements(i)
If e.Visibility = Visibility.Collapsed Then Continue While
Dim row As Integer = GetRow(e)
Dim column As Integer = GetColumn(e)
Dim modify As Integer = row Mod 2
If column = 0 AndAlso modify = 0 Then firstColumn = False
If column = ColumnCount - 1 AndAlso modify = 1 Then lastColumn = False
i += 1
End While
End Sub
#End Region ' HasShift
#Region "GETHEXSIZE"
Private Function GetHexSize(gridSize As Size) As Size
Dim minH As Double = 0
Dim minW As Double = 0
For Each e As UIElement In InternalChildren
Dim f = TryCast(e, FrameworkElement)
If f IsNot Nothing Then
If f.MinHeight > minH Then minH = f.MinHeight
If f.MinWidth > minW Then minW = f.MinWidth
End If
Next
Dim first, last As Boolean
HasShift(first, last)
Dim possibleSize = GetPossibleSize(gridSize)
Dim possibleW As Double = possibleSize.Width
Dim possibleH As Double = possibleSize.Height
Dim w = Math.Max(minW, possibleW)
Dim h = Math.Max(minH, possibleH)
Return New Size(w, h)
End Function
Private Function GetPossibleSize(gridSize As Size) As Size
Dim first, last As Boolean
HasShift(first, last)
If Orientation = Orientation.Horizontal Then Return GetPossibleSizeHorizontal(gridSize, first, last)
Return GetPossibleSizeVertical(gridSize, first, last)
End Function
Private Function GetPossibleSizeVertical(gridSize As Size, first As Boolean, last As Boolean) As Size
Dim columns As Integer = ((If(first, 0, 1)) + 2 * ColumnCount - (If(last, 1, 0)))
Dim w As Double = 2 * (gridSize.Width / columns)
Dim rows As Integer = 1 + 3 * RowCount
Dim h As Double = 4 * (gridSize.Height / rows)
Return New Size(w, h)
End Function
Private Function GetPossibleSizeHorizontal(gridSize As Size, first As Boolean, last As Boolean) As Size
Dim columns As Integer = 1 + 3 * ColumnCount
Dim w As Double = 4 * (gridSize.Width / columns)
Dim rows As Integer = (If(first, 0, 1)) + 2 * RowCount - (If(last, 1, 0))
Dim h As Double = 2 * (gridSize.Height / rows)
Return New Size(w, h)
End Function
#End Region ' GetHexSize
#Region "ARRANGE"
Protected Overrides Function ArrangeOverride(finalSize As Size) As Size
Dim first, last As Boolean
HasShift(first, last)
Dim hexSize As Size = GetHexSize(finalSize)
Dim columnWidth, rowHeight As Double
If Orientation = Orientation.Horizontal Then
rowHeight = 0.5 * hexSize.Height
columnWidth = 0.25 * hexSize.Width
Else
rowHeight = 0.25 * hexSize.Height
columnWidth = 0.5 * hexSize.Width
End If
Dim elements As UIElementCollection = MyBase.InternalChildren
For i As Integer = 0 To elements.Count - 1
If elements(i).Visibility = Visibility.Collapsed Then Continue For
ArrangeElement(elements(i), hexSize, columnWidth, rowHeight, first)
Next
Return finalSize
End Function
Private Sub ArrangeElement(e As UIElement, hexSize As Size, columnWidth As Double, rowHeight As Double, shift As Boolean)
Dim row As Integer = GetRow(e)
Dim column As Integer = GetColumn(e)
Dim x As Double
Dim y As Double
If Orientation = Orientation.Horizontal Then
x = 3 * columnWidth * column
y = rowHeight * (2 * row + (If(column Mod 2 = 1, 1, 0)) + (If(shift, -1, 0)))
Else
x = columnWidth * (2 * column + (If(row Mod 2 = 1, 1, 0)) + (If(shift, -1, 0)))
y = 3 * rowHeight * row
End If
e.Arrange(New Rect(x, y, hexSize.Width, hexSize.Height))
End Sub
#End Region ' Arrange
End Class
Public Class EgtHexList
Inherits ListBox
Shared Sub New()
DefaultStyleKeyProperty.OverrideMetadata(GetType(EgtHexList),
New FrameworkPropertyMetadata(GetType(EgtHexList)))
End Sub
Public Shared ReadOnly OrientationProperty As DependencyProperty = EgtHexagon.OrientationProperty.AddOwner(GetType(EgtHexList))
Public Shared ReadOnly RowCountProperty As DependencyProperty = EgtHexagon.RowCountProperty.AddOwner(GetType(EgtHexList))
Public Shared ReadOnly ColumnCountProperty As DependencyProperty = EgtHexagon.ColumnCountProperty.AddOwner(GetType(EgtHexList))
Public Property Orientation As Orientation
Get
Return CType(GetValue(OrientationProperty), Orientation)
End Get
Set(value As Orientation)
SetValue(OrientationProperty, value)
End Set
End Property
Public Property RowCount As Integer
Get
Return CInt(GetValue(RowCountProperty))
End Get
Set(value As Integer)
SetValue(RowCountProperty, value)
End Set
End Property
Public Property ColumnCount As Integer
Get
Return CInt(GetValue(ColumnCountProperty))
End Get
Set(value As Integer)
SetValue(ColumnCountProperty, value)
End Set
End Property
Protected Overrides Function IsItemItsOwnContainerOverride(item As Object) As Boolean
Return (TypeOf item Is EgtHexItem)
End Function
Protected Overrides Function GetContainerForItemOverride() As DependencyObject
Return New EgtHexItem()
End Function
End Class
Public Class EgtHexItem
Inherits ListBoxItem
Shared Sub New()
DefaultStyleKeyProperty.OverrideMetadata(GetType(EgtHexItem),
New FrameworkPropertyMetadata(GetType(EgtHexItem)))
End Sub
Public Shared ReadOnly OrientationProperty As DependencyProperty = EgtHexagon.OrientationProperty.AddOwner(GetType(EgtHexItem))
Public Property Orientation As Orientation
Get
Return CType(GetValue(OrientationProperty), Orientation)
End Get
Set(value As Orientation)
SetValue(OrientationProperty, value)
End Set
End Property
End Class
Public Class HexClipConverter
Implements IMultiValueConverter
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
Dim width As Double = CDbl(values(0))
Dim height As Double = CDbl(values(1))
Dim orientation As Orientation = CType(values(2), Orientation)
If width <= 0 OrElse height <= 0 Then Return Nothing
Dim pathGeometry As New PathGeometry With {
.Figures = New PathFigureCollection()
}
Dim pathFigure As New PathFigure()
If orientation = Orientation.Horizontal Then
pathFigure.StartPoint = New Point(0, height * 0.5)
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.25, 0)})
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.75, 0)})
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.5)})
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.75, height)})
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.25, height)})
Else
pathFigure.StartPoint = New Point(width * 0.5, 0)
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.25)})
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width, height * 0.75)})
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(width * 0.5, height)})
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(0, height * 0.75)})
pathFigure.Segments.Add(New LineSegment() With {.Point = New Point(0, height * 0.25)})
End If
pathGeometry.Figures.Add(pathFigure)
Return pathGeometry
End Function
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
@@ -0,0 +1,450 @@
<EgtWPFLib5:EgtMainWindow x:Class="EgtManageFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:local="clr-namespace:Icarus"
Title="{Binding sTitle}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Style="{StaticResource Dialog_Window}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding GoBack_Command}"
HorizontalAlignment="Right"
Margin="2.5,0,0,0"
Style="{StaticResource RightPanel_Button}">
<Image Source="\Resources\EgtDialog\Restore.png"
Style="{StaticResource Button_Image}"/>
</Button>
<TextBlock Grid.Column="1"
Margin="5"
Text="{Binding sUrl_Msg, Mode=TwoWay}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ComboBox Grid.Column="2"
HorizontalAlignment="Right"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding VisualizationList}"
SelectedItem="{Binding SelVisualization}"
Width="200"
Margin="2.5,0,2.5,5"
Style="{StaticResource RightPanel_ComboBox}">
</ComboBox>
</Grid>
<Grid Grid.Row="1"
Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TreeView x:Name="FileTree"
ItemsSource="{Binding RootList}"
Height="300"
Width="200"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type local:EgtFolder}"
ItemsSource="{Binding FolderList}">
<TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type local:EgtItem}">
<TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</DataTemplate>
</TreeView.Resources>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
<TabControl Grid.Column="1"
BorderBrush="White"
BorderThickness="0"
Background="White"
SelectedIndex="{Binding nSelectView}">
<TabItem Visibility="{Binding ListBox_Visibility}">
<Grid Grid.Column="1"
Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Name_Msg}"
Visibility="{Binding UVision_Visibility}"
Margin="5,5,5,5"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ListBox x:Name="FileList"
Grid.Row="1"
Width="350"
Height="250"
Margin="5,5,5,5"
BorderBrush="White"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
SelectedItem="{Binding SelTreeItem.ItemSelected}">
<ListBox.Resources>
<DataTemplate x:Key="ScheduleTemplate"
DataType="{x:Type local:EgtDirectory}" >
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="BoxingTemplate"
DataType="{x:Type local:EgtDirectory}">
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Height="65"
Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1"
Rows="3"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding sTypeItem}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding sDimension}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>
</DataTemplate>
<DataTemplate x:Key="ContentTemplateView"
DataType="{x:Type local:EgtDirectory}">
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Height="60"
Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1"
Rows="2"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sTypeItem}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
<UniformGrid Grid.Column="2"
Rows="2"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding dLastModifyDate}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sDimension}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>
</DataTemplate>
</ListBox.Resources>
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type local:EgtDirectory}">
<ContentControl Content="{Binding}">
<ContentControl.Style>
<Style TargetType="{x:Type ContentControl}">
<Style.Triggers>
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="0">
<Setter Property="ContentTemplate" Value="{StaticResource ScheduleTemplate}" />
</DataTrigger>
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="1">
<Setter Property="ContentTemplate" Value="{StaticResource BoxingTemplate}" />
</DataTrigger>
<DataTrigger Binding="{Binding DataContext.nTaskStatus, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="2">
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
</DataTemplate>
</ListBox.ItemTemplate>
<!--<ListBox.ItemTemplate>
<DataTemplate >
<TextBlock Text="{Binding Name}"
Style="{StaticResource DialogWindow_TextBlock}"/>-->
<!--<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="/Resources/ProjectManager/New.png"
Height="65"
Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1"
Rows="3"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
Text="{Binding Name}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding TypeItem}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding Dimension}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>-->
<!--<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="/Resources/ProjectManager/New.png"
Height="60"
Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1"
Rows="2"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding Name}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding TypeItem}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
<UniformGrid Grid.Column="2"
Rows="2"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding LastModifyDate}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding Dimension}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>-->
<!--</DataTemplate>
</ListBox.ItemTemplate>-->
</ListBox>
<UniformGrid Visibility="{Binding UVision_Visibility}"
Grid.Column="1"
Columns="3"
HorizontalAlignment="Stretch">
<TextBlock Margin="5,5,5,5"
Text="{Binding LastModify_Msg}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Margin="5,5,5,5"
Text="{Binding Type_Msg}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Margin="5,5,5,5"
Text="{Binding Dimension_Msg}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
<UniformGrid Visibility="{Binding UVision_Visibility}"
Grid.Column="1"
Grid.Row="1"
Columns="3"
HorizontalAlignment="Stretch">
<TextBlock Grid.Column="1"
Grid.Row="1"
Margin="5,5,5,5"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Text="{Binding SelectedItem.dLastModifyDate, ElementName=FileList}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Grid.Column="2"
Grid.Row="1"
Margin="5,5,5,5"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Text="{Binding SelectedItem.sTypeItem, ElementName=FileList}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Grid.Column="3"
Grid.Row="1"
Margin="5,5,5,5"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Text="{Binding SelectedItem.sDimension, ElementName=FileList}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>
</TabItem>
<TabItem Visibility="{Binding DataGrid_Visibility}">
<DataGrid AutoGenerateColumns="False"
Height="300"
Margin="5,5,5,10"
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
SelectedItem="{Binding SelTreeItem.ItemSelected}">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding sName}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding dLastModifyDate}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sTypeItem}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sDimension}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Right"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow"
BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
</Style>
</DataGrid.RowStyle>
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
</Style>
</DataGrid.CellStyle>
</DataGrid>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Row="2"
Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Margin="5,5,5,5"
Text="{Binding FileName_Msg}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<!--<ComboBox Grid.Column="1"
IsSynchronizedWithCurrentItem="True"
IsEditable="True"
ItemsSource="{Binding ListItemView}"
SelectedItem="{Binding SelListItemView}"
Width="400"
Margin="2.5,0,2.5,5"
Style="{StaticResource RightPanel_ComboBox}">
</ComboBox>-->
<TextBox Grid.Column="1"
Margin="2.5,2.5,2.5,5"
Width="350"
Height="30"
TextAlignment="Left"
Text="{Binding sSaveFileName}"
Style="{StaticResource ParameterList_TextBox}"/>
<ComboBox Grid.Column="2"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding ListFilter}"
SelectedItem="{Binding SelExstension}"
DisplayMemberPath="sNameExstension"
HorizontalAlignment="Right"
Width="200"
Margin="2.5,0,2.5,5"
Style="{StaticResource RightPanel_ComboBox}">
</ComboBox>
<UniformGrid Grid.Row="1"
Grid.Column="2"
Rows="1"
Margin="2.5,0,2.5,5">
<Button IsDefault="True"
Content="OK"
Command="{Binding Ok_Command}"
Margin="15,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
HorizontalAlignment="Right"
Margin="2.5,0,0,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
</Grid>
</EgtWPFLib5:EgtMainWindow>
@@ -0,0 +1,88 @@
Imports System.Windows.Forms
Public Class EgtManageFileDialogV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
Private Shadows DialogResult As DialogResult
Public Overloads Property Title As String
Get
Return m_EgtManageFileDialogVM.sTitle
End Get
Set(value As String)
m_EgtManageFileDialogVM.sTitle = value
End Set
End Property
Public Property Filter As String
Get
Return m_EgtManageFileDialogVM.sFilter
End Get
Set(value As String)
m_EgtManageFileDialogVM.sFilter = value
End Set
End Property
Public Property InitialDirectory As String
Get
Return m_EgtManageFileDialogVM.sInitialDirectory
End Get
Set(value As String)
m_EgtManageFileDialogVM.sInitialDirectory = value
End Set
End Property
Public Property FileName As String
Get
Return m_EgtManageFileDialogVM.sFileName
End Get
Set(value As String)
m_EgtManageFileDialogVM.sFileName = value
End Set
End Property
Public Property FilterIndex As Integer
Get
Return m_EgtManageFileDialogVM.nFilterIndex
End Get
Set(value As Integer)
m_EgtManageFileDialogVM.nFilterIndex = value
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Owner As Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
MyBase.New(Owner)
InitializeComponent()
Me.DataContext = EgtManageFileDialogVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtManageFileDialogVM = EgtManageFileDialogVM
End Sub
#End Region
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
#End Region
#Region "METHODS"
Public Overloads Function ShowDialog() As DialogResult
MyBase.ShowDialog()
Return Me.DialogResult
End Function
#End Region ' METHODS
End Class
@@ -0,0 +1,893 @@
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Imports System.IO
Imports System.Windows.Forms
Imports EgtWPFLib5
Imports EgtUILib
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
Public Class EgtManageFileDialogVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Public Enum VisualizationContainerType As Integer
LISTBOX = 0
DATAGRID = 1
End Enum
Public Enum VisualizationType As Integer
SCHEDULETEMPLATE = 0
DETAILSTEMPLATE = 1
BOXINGTEMPLATE = 2
CONTENTTEMPLATE = 3
End Enum
Private m_sTitle As String
Public Property sTitle As String
Get
Return m_sTitle
End Get
Set(value As String)
m_sTitle = value
End Set
End Property
Private m_sFilter As String
Public Property sFilter As String
Get
Return m_sFilter
End Get
Set(value As String)
m_sFilter = value
If Not IsNothing(sFilter) Then
Dim FilterListSplit As String() = sFilter.Split("|"c)
For i As Integer = 0 To FilterListSplit.Count - 1
If i Mod 2 = 0 Then
Dim strExstension As New EgtExstension() With {.sNameExstension = FilterListSplit(i) & FilterListSplit(i + 1), .sExstension = FilterListSplit(i + 1)}
m_ListFilter.Add(strExstension)
End If
Next
End If
End Set
End Property
Private m_sInitialDirectory As String
Public Property sInitialDirectory As String
Get
Return m_sInitialDirectory
End Get
Set(value As String)
m_sInitialDirectory = value
m_sSaveFileName = "New.icrs"
m_sUrl_Msg = m_sInitialDirectory
Dim DirectoryStart As String() = m_sInitialDirectory.Split("\"c)
For i As Integer = 0 To m_RootList.Count - 1
If m_RootList(i).sName.Trim("\") = DirectoryStart(0) Then
m_RootList(i).IsExpanded = True
Dim CurrItem As EgtFolder = TryCast(m_RootList(i), EgtFolder)
If Not IsNothing(CurrItem) Then
For j As Integer = 0 To CurrItem.FolderList.Count - 1
If CurrItem.FolderList(j).sName = DirectoryStart(1) Then
CurrItem.FolderList(j).IsExpanded = True
Dim ItemFolder As EgtFolder = TryCast(CurrItem.FolderList(j), EgtFolder)
If Not IsNothing(ItemFolder) Then
For y As Integer = 0 To ItemFolder.FolderList.Count - 1
If ItemFolder.FolderList(y).sName = DirectoryStart(2) Then
ItemFolder.FolderList(y).IsExpanded = True
ItemFolder.FolderList(y).IsSelected = True
End If
Next
End If
End If
Next
End If
End If
Next
End Set
End Property
Private m_sFileName As String
Public Property sFileName As String
Get
Return m_sFileName
End Get
Set(value As String)
m_sFileName = value
m_sSaveFileName = m_sFileName
End Set
End Property
Public Shared m_sUrl_Msg As String
Public Property sUrl_Msg As String
Get
Return m_sUrl_Msg
End Get
Set(value As String)
m_sUrl_Msg = value
End Set
End Property
'Private m_sSelListItemView As String
'Public Property SelListItemView As String
' Get
' Return m_sSelListItemView
' End Get
' Set(value As String)
' m_sSelListItemView = value
' End Set
'End Property
Private m_sSaveFileName As String
Public Property sSaveFileName As String
Get
Return m_sSaveFileName
End Get
Set(value As String)
m_sSaveFileName = value
End Set
End Property
Private m_nTaskStatus As Integer
Public Property nTaskStatus As String
Get
Return m_nTaskStatus
End Get
Set(value As String)
m_nTaskStatus = value
NotifyPropertyChanged(NameOf(nTaskStatus))
End Set
End Property
Private m_nFilterIndex As Integer
Public Property nFilterIndex As Integer
Get
Return m_nFilterIndex
End Get
Set(value As Integer)
m_nFilterIndex = value
End Set
End Property
Private m_nSelectView As Integer
Public Property nSelectView As Integer
Get
Return m_nSelectView
End Get
Set(value As Integer)
m_nSelectView = value
End Set
End Property
Private m_ListFilter As ObservableCollection(Of EgtExstension)
Public Property ListFilter As ObservableCollection(Of EgtExstension)
Get
Return m_ListFilter
End Get
Set(value As ObservableCollection(Of EgtExstension))
m_ListFilter = value
End Set
End Property
'Public Shared m_ListItemView As ObservableCollection(Of String)
'Public Property ListItemView As ObservableCollection(Of String)
' Get
' Return m_ListItemView
' End Get
' Set(value As ObservableCollection(Of String))
' m_ListItemView = value
' End Set
'End Property
Private m_RootList As New ObservableCollection(Of EgtDirectory)
Public Property RootList As ObservableCollection(Of EgtDirectory)
Get
Return m_RootList
End Get
Set(value As ObservableCollection(Of EgtDirectory))
m_RootList = value
End Set
End Property
Private m_VisualizationList As ObservableCollection(Of IdNameStruct)
Public Property VisualizationList As ObservableCollection(Of IdNameStruct)
Get
Return m_VisualizationList
End Get
Set(value As ObservableCollection(Of IdNameStruct))
m_VisualizationList = value
End Set
End Property
Private m_SelVisualization As IdNameStruct
Public Property SelVisualization As IdNameStruct
Get
Return m_SelVisualization
End Get
Set(value As IdNameStruct)
m_SelVisualization = value
Select Case m_SelVisualization.Id
Case VisualizationType.SCHEDULETEMPLATE
m_nSelectView = VisualizationContainerType.LISTBOX
nTaskStatus = 0
m_UVision_Visibility = Visibility.Visible
m_ListBox_Visibility = Visibility.Visible
m_DataGrid_Visibility = Visibility.Collapsed
Case VisualizationType.DETAILSTEMPLATE
m_nSelectView = VisualizationContainerType.DATAGRID
m_UVision_Visibility = Visibility.Collapsed
m_ListBox_Visibility = Visibility.Collapsed
m_DataGrid_Visibility = Visibility.Visible
Case VisualizationType.BOXINGTEMPLATE
m_nSelectView = VisualizationContainerType.LISTBOX
nTaskStatus = 1
m_UVision_Visibility = Visibility.Collapsed
m_ListBox_Visibility = Visibility.Visible
m_DataGrid_Visibility = Visibility.Collapsed
Case VisualizationType.CONTENTTEMPLATE
m_nSelectView = VisualizationContainerType.LISTBOX
nTaskStatus = 2
m_UVision_Visibility = Visibility.Collapsed
m_ListBox_Visibility = Visibility.Visible
m_DataGrid_Visibility = Visibility.Collapsed
End Select
NotifyPropertyChanged(NameOf(nSelectView))
NotifyPropertyChanged(NameOf(UVision_Visibility))
NotifyPropertyChanged(NameOf(DataGrid_Visibility))
NotifyPropertyChanged(NameOf(ListBox_Visibility))
End Set
End Property
Private m_DataGrid_Visibility As Visibility
Public Property DataGrid_Visibility As Visibility
Get
Return m_DataGrid_Visibility
End Get
Set(value As Visibility)
m_DataGrid_Visibility = value
End Set
End Property
Private m_ListBox_Visibility As Visibility
Public Property ListBox_Visibility As Visibility
Get
Return m_ListBox_Visibility
End Get
Set(value As Visibility)
m_ListBox_Visibility = value
End Set
End Property
Private m_UVision_Visibility As Visibility
Public Property UVision_Visibility As Visibility
Get
Return m_UVision_Visibility
End Get
Set(value As Visibility)
m_UVision_Visibility = value
End Set
End Property
Public Shared m_SelExstension As EgtExstension
Public Property SelExstension As EgtExstension
Get
Return m_SelExstension
End Get
Set(value As EgtExstension)
m_SelExstension = value
Dim CurrItem As EgtFolder = TryCast(m_SelTreeItem, EgtFolder)
If Not IsNothing(CurrItem) Then
CollectionViewSource.GetDefaultView(CurrItem.FolderList).Refresh()
End If
End Set
End Property
Public Shared m_SelTreeItem As EgtDirectory
Public Property SelTreeItem As EgtDirectory
Get
Return m_SelTreeItem
End Get
Set(value As EgtDirectory)
m_SelTreeItem = value
NotifyPropertyChanged(NameOf(SelTreeItem))
End Set
End Property
Friend Sub UpdateSelRoot(Item As EgtDirectory)
m_SelTreeItem = Item
NotifyPropertyChanged(NameOf(SelTreeItem))
End Sub
'Comandi
Private m_cmdCancel As ICommand
Private m_cmdOk As ICommand
Private m_cmdGoBack As ICommand
Friend Event m_CloseWindow(bDialogResult As MessageBoxResult)
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New()
m_RootList.Clear()
EgtDirectory.refUpdateSelRoot = AddressOf UpdateSelRoot
Dim drives As DriveInfo() = DriveInfo.GetDrives().Where(Function(d) d.IsReady).ToArray()
m_ListFilter = New ObservableCollection(Of EgtExstension)
For i As Integer = 0 To drives.Count() - 1
Dim directory As New EgtFolder(drives(i).RootDirectory, Nothing)
'AddHandler directory.PropertyChanged, AddressOf Directory_PropertyChanged
m_RootList.Add(directory)
Next
SetVisualizzationList()
m_SelVisualization.Id = VisualizationType.SCHEDULETEMPLATE
m_nSelectView = VisualizationContainerType.LISTBOX
nTaskStatus = 0
m_UVision_Visibility = Visibility.Visible
m_ListBox_Visibility = Visibility.Visible
m_DataGrid_Visibility = Visibility.Collapsed
NotifyPropertyChanged(NameOf(RootList))
NotifyPropertyChanged(NameOf(ListFilter))
NotifyPropertyChanged(NameOf(VisualizationList))
End Sub
#End Region ' CONTRUCTORS
#Region "Messages"
Public ReadOnly Property Name_Msg As String
Get
Return EgtMsg(15060)
End Get
End Property
Public ReadOnly Property LastModify_Msg As String
Get
Return EgtMsg(15061)
End Get
End Property
Public ReadOnly Property Type_Msg As String
Get
Return EgtMsg(15062)
End Get
End Property
Public ReadOnly Property Dimension_Msg As String
Get
Return EgtMsg(15063)
End Get
End Property
Public Shared ReadOnly Property Folder_Msg As String
Get
Return EgtMsg(15064)
End Get
End Property
Public Shared ReadOnly Property FileName_Msg As String
Get
Return EgtMsg(15065)
End Get
End Property
Public Shared ReadOnly Property Schedule_Msg As String
Get
Return EgtMsg(15067)
End Get
End Property
Public Shared ReadOnly Property Details_Msg As String
Get
Return EgtMsg(15068)
End Get
End Property
Public Shared ReadOnly Property Boxing_Msg As String
Get
Return EgtMsg(15069)
End Get
End Property
Public Shared ReadOnly Property Content_Msg As String
Get
Return EgtMsg(15070)
End Get
End Property
Public Shared ReadOnly Property DataFolder_Msg As String
Get
Return EgtMsg(15071)
End Get
End Property
#End Region
#Region "METHODS"
''' <summary>
''' Inizializza la ComboBox per la scelta dei template
''' </summary>
Private Sub SetVisualizzationList()
m_VisualizationList = New ObservableCollection(Of IdNameStruct)
Dim ItemVisualization As New IdNameStruct With {
.Id = 0,
.Name = Schedule_Msg
}
m_VisualizationList.Add(ItemVisualization)
ItemVisualization.Id = 1
ItemVisualization.Name = Details_Msg
m_VisualizationList.Add(ItemVisualization)
ItemVisualization.Id = 2
ItemVisualization.Name = Boxing_Msg
m_VisualizationList.Add(ItemVisualization)
ItemVisualization.Id = 3
ItemVisualization.Name = Content_Msg
m_VisualizationList.Add(ItemVisualization)
End Sub
Private Sub Directory_PropertyChanged(sender As Object, e As PropertyChangedEventArgs)
If e.PropertyName = "IsSelected" Then
'UpdateSelRoot()
End If
End Sub
#End Region
#Region "COMMANDS"
#Region "Command Ok"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
Dim CurrItem As EgtItem = TryCast(EgtFolder.m_ItemSelected, EgtItem)
If Not IsNothing(CurrItem) Then
m_sFileName = m_SelTreeItem.InfoDir.FullName & "\" & CurrItem.sName
Else
m_sFileName = m_SelTreeItem.InfoDir.FullName & "\" & m_sSaveFileName
End If
RaiseEvent m_CloseWindow(DialogResult.OK)
End Sub
#End Region 'Command Ok
#Region "Command GoBack"
Public ReadOnly Property GoBack_Command As ICommand
Get
If m_cmdGoBack Is Nothing Then
m_cmdGoBack = New Command(AddressOf GoBack)
End If
Return m_cmdGoBack
End Get
End Property
Public Sub GoBack()
m_SelTreeItem = EgtFolder.m_ParentFolder
m_SelTreeItem.IsSelected = True
m_sUrl_Msg = ""
m_sUrl_Msg = m_SelTreeItem.InfoDir.FullName
EgtDirectory.m_sIconSource = "\Resources\EgtDialog\Folder.png"
NotifyPropertyChanged(NameOf(sUrl_Msg))
End Sub
#End Region 'Command GoBack
#Region "Command Cancel"
Public ReadOnly Property Cancel_Command As ICommand
Get
If m_cmdCancel Is Nothing Then
m_cmdCancel = New Command(AddressOf Cancel)
End If
Return m_cmdCancel
End Get
End Property
Public Sub Cancel()
RaiseEvent m_CloseWindow(DialogResult.Cancel)
End Sub
#End Region 'Command Cancel
#End Region ' COMMANDS
End Class
Public Class EgtExstension
Inherits VMBase
Public m_sNameExstension As String
Public Property sNameExstension As String
Get
Return m_sNameExstension
End Get
Set(value As String)
m_sNameExstension = value
NotifyPropertyChanged(NameOf(sNameExstension))
End Set
End Property
Public m_sExstension As String
Public Property sExstension As String
Get
Return m_sExstension
End Get
Set(value As String)
m_sExstension = value
NotifyPropertyChanged(NameOf(sExstension))
End Set
End Property
End Class
Public Class EgtDirectory
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Shared refUpdateSelRoot As Action(Of EgtDirectory)
Private m_bIsSelected As Boolean
Public Overridable Property IsSelected As Boolean
Get
Return m_bIsSelected
End Get
Set(value As Boolean)
m_bIsSelected = value
refUpdateSelRoot(Me)
End Set
End Property
Private m_bIsExpanded As Boolean
Public Overridable Property IsExpanded As Boolean
Get
Return m_bIsExpanded
End Get
Set(value As Boolean)
m_bIsExpanded = value
End Set
End Property
Protected m_InfoDir As DirectoryInfo
Public Property InfoDir As DirectoryInfo
Get
Return m_InfoDir
End Get
Set(value As DirectoryInfo)
m_InfoDir = value
End Set
End Property
Public ReadOnly Property sName As String
Get
Try
Return If(Not IsNothing(m_InfoDir), m_InfoDir.Name, "")
Catch ex As Exception
Return ""
End Try
End Get
End Property
Public Shared m_sIconSource As String
Public Property sIconSource As String
Get
Return m_sIconSource
End Get
Set(value As String)
m_sIconSource = value
End Set
End Property
Public ReadOnly Property sTypeItem As String
Get
Try
Return If(Not IsNothing(m_InfoDir), m_InfoDir.Extension, "")
Catch ex As Exception
Return ""
End Try
End Get
End Property
Public ReadOnly Property dLastModifyDate As Date
Get
Try
Return If(Not IsNothing(m_InfoDir), m_InfoDir.LastAccessTime.ToString("dd/MM/yyyy HH:mm:ss"), Date.UtcNow.ToString("dd/MM/yyyy HH:mm:ss"))
Catch ex As Exception
Return Date.UtcNow.ToString("dd/MM/yyyy HH:mm:ss")
End Try
End Get
End Property
Public ReadOnly Property sDimension As Integer
Get
Try
Return If(Not IsNothing(m_InfoDir), m_InfoDir.EnumerateDirectories().Count, 0)
Catch ex As Exception
Return 0
End Try
End Get
End Property
#End Region ' FIELDS & PROPERTIES
End Class
Public Class EgtFolder
Inherits EgtDirectory
#Region "FIELDS & PROPERTIES"
Public Shared m_ItemList_View As CollectionView = Nothing
Private m_FolderList As New ObservableCollection(Of EgtDirectory)
Public Property FolderList As ObservableCollection(Of EgtDirectory)
Get
Return m_FolderList
End Get
Set(value As ObservableCollection(Of EgtDirectory))
m_FolderList = value
End Set
End Property
Public Shared m_ItemSelected As EgtDirectory
Public Property ItemSelected As EgtDirectory
Get
Return m_ItemSelected
End Get
Set(value As EgtDirectory)
m_ItemSelected = value
End Set
End Property
Private m_sName As String
Public Overloads Property sName As String
Get
Return m_sName
End Get
Set(value As String)
m_sName = value
End Set
End Property
Private m_sTypeItem As String
Public Overloads Property sTypeItem As String
Get
Return m_sTypeItem
End Get
Set(value As String)
m_sTypeItem = value
End Set
End Property
Private m_dLastModifyDate As Date
Public Overloads Property dLastModifyDate As String
Get
Return m_dLastModifyDate
End Get
Set(value As String)
m_dLastModifyDate = value
End Set
End Property
Public Shared m_ParentFolder As EgtFolder
Public Property ParentFolder As EgtFolder
Get
Return m_ParentFolder
End Get
Set(value As EgtFolder)
m_ParentFolder = value
End Set
End Property
Private m_bIsExpanded As Boolean
Public Overrides Property IsExpanded As Boolean
Get
Return m_bIsExpanded
End Get
Set(value As Boolean)
m_bIsExpanded = value
NotifyPropertyChanged(NameOf(IsExpanded))
Dim DirectoryList() As DirectoryInfo
Dim FileList() As FileInfo
Try
DirectoryList = m_InfoDir.GetDirectories().Where(Function(file) (file.Attributes And FileAttributes.Hidden And file.Name <> EgtManageFileDialogVM.DataFolder_Msg) = 0).ToArray()
FileList = m_InfoDir.GetFiles().Where(Function(file) (file.Attributes And FileAttributes.Hidden) = 0).ToArray()
Catch ex As Exception
DirectoryList = Nothing
FileList = Nothing
End Try
m_FolderList.Clear()
If Not IsNothing(DirectoryList) Then
For Each subDir As DirectoryInfo In DirectoryList
Dim directory As New EgtFolder(subDir, Me)
m_FolderList.Add(directory)
Next
End If
If Not IsNothing(FileList) Then
For Each files As FileInfo In FileList
Dim file As New EgtItem(files)
m_FolderList.Add(file)
Next
End If
End Set
End Property
Private m_bIsSelected As Boolean
Public Overrides Property IsSelected As Boolean
Get
Return m_bIsSelected
End Get
Set(value As Boolean)
m_bIsSelected = value
refUpdateSelRoot(Me)
Dim DirectoryList() As DirectoryInfo
Dim FileList() As FileInfo
Try
DirectoryList = m_InfoDir.GetDirectories().Where(Function(file) (file.Attributes And FileAttributes.Hidden And file.Name <> EgtManageFileDialogVM.DataFolder_Msg) = 0).ToArray()
FileList = m_InfoDir.GetFiles().Where(Function(file) (file.Attributes And FileAttributes.Hidden) = 0).ToArray()
Catch ex As Exception
DirectoryList = Nothing
FileList = Nothing
End Try
m_FolderList.Clear()
If Not IsNothing(DirectoryList) Then
For Each subDir As DirectoryInfo In DirectoryList
Dim directory As New EgtFolder(subDir, Me)
m_FolderList.Add(directory)
Next
End If
If Not IsNothing(FileList) Then
For Each files As FileInfo In FileList
Dim file As New EgtItem(files)
m_FolderList.Add(file)
Next
End If
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(InfoDir As DirectoryInfo, Folder As EgtFolder)
m_InfoDir = InfoDir
m_sName = InfoDir.Name
m_dLastModifyDate = InfoDir.LastWriteTime.ToString("dd/MM/yyyy HH:mm:ss")
If InfoDir.Extension <> "" Then
m_sTypeItem = "File " & InfoDir.Extension.ToUpper()
m_sIconSource = "\Resources\EgtDialog\New.png"
Else
m_sTypeItem = EgtManageFileDialogVM.Folder_Msg
m_sIconSource = "\Resources\EgtDialog\Folder.png"
End If
m_FolderList.Add(New EgtDirectory())
EgtManageFileDialogVM.m_SelExstension = New EgtExstension()
m_ParentFolder = Folder
m_ItemSelected = New EgtDirectory()
m_ItemList_View = CollectionViewSource.GetDefaultView(m_FolderList)
m_ItemList_View.Filter = AddressOf ItemFilter
NotifyPropertyChanged(NameOf(sName))
NotifyPropertyChanged(NameOf(dLastModifyDate))
NotifyPropertyChanged(NameOf(sTypeItem))
NotifyPropertyChanged(NameOf(sIconSource))
NotifyPropertyChanged(NameOf(FolderList))
End Sub
#End Region ' CONTRUCTORS
#Region "METHODS"
Private Function ItemFilter(Item As Object) As Boolean
Dim CurrItem As EgtItem = TryCast(Item, EgtItem)
If Not IsNothing(CurrItem) AndAlso Not IsNothing(EgtManageFileDialogVM.m_SelExstension.m_sExstension) Then
'Return CurrItem.TypeItem = EgtOpenDialogVM.m_SelExstension.s_Exstension.TrimStart("*")
If CurrItem.sTypeItem.Substring(5).ToLower() = EgtManageFileDialogVM.m_SelExstension.m_sExstension.TrimStart("*") Then
'EgtManageFileDialogVM.m_ListItemView.Add(m_InfoDir.FullName & "\" & CurrItem.sName)
Return True
Else
Return False
End If
End If
Return True
End Function
#End Region
End Class
Public Class EgtItem
Inherits EgtDirectory
#Region "FIELDS & PROPERTIES"
Private m_sName As String
Public Overloads Property sName As String
Get
Return m_sName
End Get
Set(value As String)
m_sName = value
End Set
End Property
Private m_sTypeItem As String
Public Overloads Property sTypeItem As String
Get
Return m_sTypeItem
End Get
Set(value As String)
m_sTypeItem = value
End Set
End Property
Private m_sDimension As String
Public Overloads Property sDimension As String
Get
Return m_sDimension
End Get
Set(value As String)
m_sDimension = value
End Set
End Property
Private m_dLastModifyDate As Date
Public Overloads Property dLastModifyDate As String
Get
Return m_dLastModifyDate
End Get
Set(value As String)
m_dLastModifyDate = value
End Set
End Property
Private m_bIsSelected As Boolean
Public Overrides Property IsSelected As Boolean
Get
Return m_bIsSelected
End Get
Set(value As Boolean)
m_bIsSelected = value
'm_sIconSource = "\Resources\EgtDialog\New.png"
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(InfoDir As FileInfo)
m_sName = InfoDir.Name
m_sDimension = String.Format("{0:#,##0.00}", InfoDir.Length / 1024) & " Kb"
m_dLastModifyDate = InfoDir.LastWriteTime.ToString("dd/MM/yyyy HH:mm:ss")
If InfoDir.Extension <> "" Then
m_sTypeItem = "File " & InfoDir.Extension.ToUpper()
m_sIconSource = "\Resources\EgtDialog\New.png"
Else
m_sTypeItem = ""
End If
NotifyPropertyChanged(NameOf(sName))
NotifyPropertyChanged(NameOf(sDimension))
NotifyPropertyChanged(NameOf(dLastModifyDate))
NotifyPropertyChanged(NameOf(sTypeItem))
NotifyPropertyChanged(NameOf(sIconSource))
End Sub
#End Region ' CONTRUCTORS
End Class
+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
+60 -3
View File
@@ -35,6 +35,10 @@ Public Class FilledSolidPanelVM
Return m_SelFilledSolid
End Get
Set(value As FilledSolidEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelFilledSolid))
Return
End If
m_SelFilledSolid = value
EgtDeselectAll()
If Not IsNothing(value) Then
@@ -349,6 +353,8 @@ Public Class FilledSolidPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM)
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If
@@ -358,6 +364,8 @@ Public Class FilledSolidPanelVM
m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub
Public ReadOnly Property Compo_Visibility As Visibility
@@ -366,11 +374,17 @@ Public Class FilledSolidPanelVM
End Get
End Property
Private m_FilledSolidList_IsEnabled As Boolean = False
Public ReadOnly Property FilledSolidList_IsEnabled As Boolean
Get
Return Not m_bMachParam_IsChecked
Return If(m_FilledSolidList.Count > 0, m_FilledSolidList_IsEnabled, False)
End Get
End Property
Friend Sub SetFilledSolidListIsEnabled(bValue As Boolean)
m_FilledSolidList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d
@@ -388,6 +402,8 @@ Public Class FilledSolidPanelVM
End Get
End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String
@@ -571,6 +587,8 @@ Public Class FilledSolidPanelVM
SelFilledSolid = m_FilledSolidList(0)
NotifyPropertyChanged(NameOf(SelFilledSolid))
End If
' attivo lista filled solid
SetFilledSolidListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
@@ -606,8 +624,13 @@ Public Class FilledSolidPanelVM
EgtSelectObj(m_SelFilledSolid.nCurveId)
Case FilledSolidSelectionTypes.EXTRUSION
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelFilledSolid.nCurveId)
Case FilledSolidSelectionTypes.BOTH
@@ -615,6 +638,8 @@ Public Class FilledSolidPanelVM
EgtSelectObj(m_SelFilledSolid.nExtrusionId)
End Select
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True
End Function
@@ -624,6 +649,7 @@ Public Class FilledSolidPanelVM
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione
@@ -663,6 +689,10 @@ Public Class FilledSolidPanelVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -705,6 +735,7 @@ Public Class FilledSolidPanelVM
If NewGeomType = GDB_TY.CRV_COMPO Then
If Not EgtCurveIsClosed(nNewEntityId) Then
EgtCloseCurveCompo(nNewEntityId)
m_bEscOnLine2P = True
End If
EgtSetName(nNewEntityId, RIB_CURVE)
' resetto colore entita'
@@ -757,6 +788,13 @@ Public Class FilledSolidPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If
End Sub
@@ -792,6 +830,18 @@ Public Class FilledSolidPanelVM
Return nFilledSolidIndex + 1
End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetFilledSolidListIsEnabled(bValue)
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -815,7 +865,9 @@ Public Class FilledSolidPanelVM
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertFilledSolid()
ManageInterface(True)
End Sub
#End Region ' Import
@@ -839,6 +891,7 @@ Public Class FilledSolidPanelVM
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
@@ -887,6 +940,7 @@ Public Class FilledSolidPanelVM
End If
NotifyPropertyChanged(NameOf(SelFilledSolid))
End If
SetFilledSolidListIsEnabled(True)
End Sub
#End Region ' Delete
@@ -1171,6 +1225,7 @@ Public Class FilledSolidPanelVM
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1195,6 +1250,7 @@ Public Class FilledSolidPanelVM
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1311,6 +1367,7 @@ Public Class FilledSolidPanelVM
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -84,6 +84,32 @@
Style="{StaticResource ToolBar_SmallButton}"/>
</Grid>
</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>
</ScrollViewer>
@@ -42,12 +42,21 @@ Public Class FilledSolidParamPanelVM
m_Type = Cathegories.AUX_SOLID
m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId, Me),
New FilledSolidCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, 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.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)})
@@ -190,6 +199,14 @@ Public Class FilledSolidNumericMachiningParam
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.AUXSOLIDSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dPartValue)
m_bIsLen = False
Case Params.AUXSOLIDSOVERLAP
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue)
@@ -202,6 +219,30 @@ Public Class FilledSolidNumericMachiningParam
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue)
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
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue)
@@ -230,6 +271,18 @@ Public Class FilledSolidNumericMachiningParam
sWriteValue = DoubleToString(m_dValue, 2)
End If
Select Case Type
Case Params.AUXSOLIDSSTRANDWIDTH
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH)
End If
Case Params.AUXSOLIDSSTRANDCOUNT
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT)
End If
Case Params.AUXSOLIDSOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
@@ -248,6 +301,42 @@ Public Class FilledSolidNumericMachiningParam
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE)
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
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
@@ -339,9 +428,14 @@ Public Class FilledSolidComboMachiningParam
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.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
bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue)
If bReadFromRib Then
@@ -379,7 +473,7 @@ Public Class FilledSolidComboMachiningParam
Else
Select Case Type
Case Params.AUXSOLIDSINFILL
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL.NONE)
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL_TYPE.NONE)
m_SelValue = m_OrigSelValue
Case Params.AUXSOLIDSSTRANDORDER
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN)
@@ -447,4 +541,95 @@ Public Class FilledSolidComboMachiningParam
#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
-118
View File
@@ -1,118 +0,0 @@
<Grid x:Class="HelpPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PrintApp="clr-namespace:Icarus"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Icarus"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid.Resources>
<SolidColorBrush x:Key="HighlightBorder_Color" Color="Red"/>
<Thickness x:Key="HighlightBorder_Thickness">5</Thickness>
<CornerRadius x:Key="HighlightBorder_CornerRadius">2</CornerRadius>
<Thickness x:Key="HighlightBorder_Margin">-2</Thickness>
<Style x:Key="Highlight_HelpBorder" TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="{StaticResource HighlightBorder_Color}"/>
<Setter Property="BorderThickness" Value="{StaticResource HighlightBorder_Thickness}"/>
<Setter Property="CornerRadius" Value="{StaticResource HighlightBorder_CornerRadius}"/>
<Setter Property="Margin" Value="{StaticResource HighlightBorder_Margin}"/>
</Style>
<Style x:Key="Popup_HelpBorder" TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="{StaticResource Icarus_Gray}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="Background" Value="White"/>
</Style>
<Style TargetType="{x:Type Popup}">
<Setter Property="AllowsTransparency" Value="True"/>
<Setter Property="StaysOpen" Value="True"/>
<Setter Property="Placement" Value="Bottom"/>
</Style>
</Grid.Resources>
<Border BorderThickness="{StaticResource WindowBorder_Thickness}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="{StaticResource TitleBarHeight}"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource TopBar_HelpButton}">
<Border Visibility="{Binding Icon_Visibility}"
Style="{StaticResource Highlight_HelpBorder}">
</Border>
</Grid>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="1"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="2"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="3"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="4"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="5"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="6"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="7"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="8"
Style="{StaticResource TopBar_HelpButton}"/>
<Border Grid.ColumnSpan="9"
Visibility="{Binding ProjectManager_Visibility}"
Style="{StaticResource Highlight_HelpBorder}">
</Border>
</Grid>
<Grid Grid.Column="2" Width="70"/>
<Grid Grid.Column="3"/>
<Grid Grid.Column="4">
<UniformGrid Rows="1">
<Grid Style="{StaticResource TopBar_HelpButton}"/>
<Grid Style="{StaticResource TopBar_HelpButton}"/>
<Grid Style="{StaticResource TopBar_HelpButton}"/>
</UniformGrid>
</Grid>
<Border Grid.Row="1"
Grid.ColumnSpan="5"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="-2,7,0,0"
Visibility="{Binding Icon_Visibility}"
Style="{StaticResource Popup_HelpBorder}">
<PrintApp:Icon_Tooltip/>
</Border>
<Border Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="5"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="-2,7,0,0"
Visibility="{Binding ProjectManager_Visibility}"
Style="{StaticResource Popup_HelpBorder}">
<PrintApp:ProjectManager_Tooltip/>
</Border>
</Grid>
</Border>
</Grid>
-3
View File
@@ -1,3 +0,0 @@
Public Class HelpPanelV
End Class
-81
View File
@@ -1,81 +0,0 @@
Imports EgtWPFLib5
Public Class HelpPanelVM
Inherits VMBase
Public Enum HelpPages As Integer
NULL = 0
ICON = 1
PROJECTMANAGER = 2
End Enum
Private m_CurrHelpPage As HelpPages
Public ReadOnly Property CurrHelpPage As HelpPages
Get
Return m_CurrHelpPage
End Get
End Property
Private m_Icon_Visibility As Boolean = False
Public ReadOnly Property Icon_Visibility As Visibility
Get
Return If(m_Icon_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Public Property Icon_IsOpen As Boolean
Get
Return m_Icon_Visibility
End Get
Set(value As Boolean)
m_Icon_Visibility = value
End Set
End Property
Friend Sub SetIconVisibility(bValue As Boolean)
m_Icon_Visibility = bValue
NotifyPropertyChanged(NameOf(Icon_Visibility))
NotifyPropertyChanged(NameOf(Icon_IsOpen))
End Sub
Private m_ProjectManager_Visibility As Boolean = False
Public ReadOnly Property ProjectManager_Visibility As Visibility
Get
Return If(m_ProjectManager_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Public Property ProjectManager_IsOpen As Boolean
Get
Return m_ProjectManager_Visibility
End Get
Set(value As Boolean)
m_ProjectManager_Visibility = value
End Set
End Property
Friend Sub SetProjectManagerVisibility(bValue As Boolean)
m_ProjectManager_Visibility = bValue
NotifyPropertyChanged(NameOf(ProjectManager_Visibility))
NotifyPropertyChanged(NameOf(ProjectManager_IsOpen))
End Sub
Sub New()
Map.SetRefHelpPanelVM(Me)
End Sub
Friend Sub SelHelpPage(SelHelpPage As HelpPages)
Select Case m_CurrHelpPage
Case HelpPages.ICON
SetIconVisibility(False)
Case HelpPages.PROJECTMANAGER
SetProjectManagerVisibility(False)
End Select
m_CurrHelpPage = SelHelpPage
Select Case m_CurrHelpPage
Case HelpPages.NULL
SetProjectManagerVisibility(False)
Case HelpPages.ICON
SetIconVisibility(True)
Case HelpPages.PROJECTMANAGER
SetProjectManagerVisibility(True)
End Select
End Sub
End Class
-12
View File
@@ -1,12 +0,0 @@
<RichTextBox x:Class="Icon_Tooltip"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
BorderThickness="0"
Width="200"
Margin="5">
<FlowDocument>
<Paragraph FontSize="20">Icon</Paragraph>
<Paragraph FontSize="14">The software logo icon.
If clicked opens the AboutBox.</Paragraph>
</FlowDocument>
</RichTextBox>
-3
View File
@@ -1,3 +0,0 @@
Public Class Icon_Tooltip
End Class
@@ -1,29 +0,0 @@
<RichTextBox x:Class="ProjectManager_Tooltip"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
BorderThickness="0"
Width="300"
Margin="10">
<FlowDocument>
<Paragraph FontSize="20">Project Manager</Paragraph>
<Paragraph FontSize="14">This space permit to manage the project.
The commands available are :</Paragraph>
<List>
<ListItem>
<Paragraph>New</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Open</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Save</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Save As</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Import</Paragraph>
</ListItem>
</List>
</FlowDocument>
</RichTextBox>
@@ -1,3 +0,0 @@
Public Class ProjectManager_Tooltip
End Class
-71
View File
@@ -1,71 +0,0 @@
<EgtWPFLib5:EgtMainWindow x:Class="HelpWndV"
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 Title_Msg}"
Icon="/Resources/Icarus.ico"
Height="600"
Width="800"
CloseCommand="{Binding Close_Command, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource Help_Window}">
<RichTextBox IsReadOnly="True"
IsDocumentEnabled="True">
<!--<FlowDocumentReader ViewingMode="Page"
IsTwoPageViewEnabled="False"
IsScrollViewEnabled="False">-->
<FlowDocument>
<Paragraph FontSize="50"
FontWeight="Bold"
TextAlignment="Center">
Icarus Manual
</Paragraph>
<List FontSize="14">
<ListItem>
<Paragraph>
<Hyperlink Command="{Binding SoftwareStructure_Command}">
Software Structure
</Hyperlink>
</Paragraph>
<List FontSize="14">
<ListItem>
<Paragraph>
<Hyperlink Command="{Binding Icon_Command}">
Icon
</Hyperlink>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<Hyperlink Command="{Binding ProjectManagerBar_Command}">
Project Manager Bar
</Hyperlink>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>View Bar</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Status Bar</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Top Panel</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Slice Manager</Paragraph>
</ListItem>
</List>
</ListItem>
<ListItem>
<Paragraph>ListItem 2</Paragraph>
</ListItem>
<ListItem>
<Paragraph>ListItem 3</Paragraph>
</ListItem>
</List>
</FlowDocument>
</RichTextBox>
<!--</FlowDocumentReader>-->
</EgtWPFLib5:EgtMainWindow>
-18
View File
@@ -1,18 +0,0 @@
Public Class HelpWndV
Private WithEvents m_HelpWndVM As HelpWndVM
Sub New(Owner As Window, HelpWndVM As HelpWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = HelpWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_HelpWndVM = HelpWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_HelpWndVM.m_CloseWindow
Me.Close()
End Sub
End Class
-108
View File
@@ -1,108 +0,0 @@
Imports System.Collections.ObjectModel
Imports System.Drawing
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.ToolTip
Imports EgtWPFLib5
Public Class HelpWndVM
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(bDialogResult As Boolean)
#Region "Messages"
Public ReadOnly Property Title_Msg As String
Get
Return "Help"
End Get
End Property
#End Region ' Messages
' Definizione comandi
Private m_cmdSoftwareStructure As ICommand
Private m_cmdIcon As ICommand
Private m_cmdProjectManagerBar As ICommand
Private m_cmdClose As ICommand
#End Region ' FIELDS & PROPERTIES
Sub New()
Map.SetRefHelpWndVM(Me)
End Sub
#Region "COMMANDS"
#Region "SoftwareStructure"
Public ReadOnly Property SoftwareStructure_Command As ICommand
Get
If m_cmdSoftwareStructure Is Nothing Then
m_cmdSoftwareStructure = New Command(AddressOf SoftwareStructure)
End If
Return m_cmdSoftwareStructure
End Get
End Property
Public Sub SoftwareStructure()
End Sub
#End Region ' SoftwareStructure
#Region "Icon"
Public ReadOnly Property Icon_Command As ICommand
Get
If m_cmdIcon Is Nothing Then
m_cmdIcon = New Command(AddressOf Icon)
End If
Return m_cmdIcon
End Get
End Property
Public Sub Icon()
Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.ICON)
End Sub
#End Region ' Icon
#Region "ProjectManagerBar"
Public ReadOnly Property ProjectManagerBar_Command As ICommand
Get
If m_cmdProjectManagerBar Is Nothing Then
m_cmdProjectManagerBar = New Command(AddressOf ProjectManagerBar)
End If
Return m_cmdProjectManagerBar
End Get
End Property
Public Sub ProjectManagerBar()
Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.PROJECTMANAGER)
End Sub
#End Region ' ProjectManagerBar
#Region "Close"
Public ReadOnly Property Close_Command As ICommand
Get
If m_cmdClose Is Nothing Then
m_cmdClose = New Command(AddressOf Close)
End If
Return m_cmdClose
End Get
End Property
Public Sub Close()
Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.NULL)
Map.SetRefHelpWndVM(Nothing)
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Close
#End Region ' COMMANDS
End Class
+40 -30
View File
@@ -150,6 +150,19 @@
<DependentUpon>DispositionPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="DispositionPanel\DispositionPanelVM.vb" />
<Compile Include="EgtColorPicker\EgtHexagon.vb" />
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="EgtMessageBox\EgtMessageBoxVM.vb" />
<Compile Include="EgtColorPicker\EgtColorPickerV.xaml.vb">
<DependentUpon>EgtColorPickerV.xaml</DependentUpon>
</Compile>
<Compile Include="EgtColorPicker\EgtColorPickerVM.vb" />
<Compile Include="EgtManageFileDialog\EgtManageFileDialogV.xaml.vb">
<DependentUpon>EgtManageFileDialogV.xaml</DependentUpon>
</Compile>
<Compile Include="EgtManageFileDialog\EgtManageFileDialogVM.vb" />
<Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb">
<DependentUpon>FilledSolidPanelV.xaml</DependentUpon>
</Compile>
@@ -158,20 +171,6 @@
<DependentUpon>FilledSolidParamPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="FilledSolidParamPanel\FilledSolidParamPanelVM.vb" />
<Compile Include="HelpPanel\HelpPanelV.xaml.vb">
<DependentUpon>HelpPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="HelpPanel\HelpPanelVM.vb" />
<Compile Include="HelpPanel\Icon_Tooltip.xaml.vb">
<DependentUpon>Icon_Tooltip.xaml</DependentUpon>
</Compile>
<Compile Include="HelpPanel\ProjectManager_Tooltip.xaml.vb">
<DependentUpon>ProjectManager_Tooltip.xaml</DependentUpon>
</Compile>
<Compile Include="HelpWnd\HelpWndV.xaml.vb">
<DependentUpon>HelpWndV.xaml</DependentUpon>
</Compile>
<Compile Include="HelpWnd\HelpWndVM.vb" />
<Compile Include="ImportExportMachiningPanel\ImportExportMachiningPanelV.xaml.vb">
<DependentUpon>ImportExportMachiningPanelV.xaml</DependentUpon>
</Compile>
@@ -376,6 +375,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EgtColorPicker\EgtColorPickerV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EgtManageFileDialog\EgtManageFileDialogV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="FilledSolidPanel\FilledSolidPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -384,22 +395,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="HelpPanel\HelpPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="HelpPanel\Icon_Tooltip.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="HelpPanel\ProjectManager_Tooltip.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="HelpWnd\HelpWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ImportExportMachiningPanel\ImportExportMachiningPanelV.xaml">
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
@@ -634,6 +629,7 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
<Resource Include="Resources\EgtMessageBox\Error.png" />
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
<Resource Include="Resources\Fonts\Roboto-Light.ttf" />
</ItemGroup>
@@ -885,6 +881,20 @@
<ItemGroup>
<Resource Include="Resources\RibParamPanel\CopyFrom.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Information.png" />
<Resource Include="Resources\EgtMessageBox\Question.png" />
<Resource Include="Resources\EgtMessageBox\Warning.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtDialog\Restore.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtDialog\New.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtDialog\Folder.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
@@ -157,7 +157,8 @@ Public Class ImportExportMachiningPanelVM
nIndex += 1
End While
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
LoadOriginalMaterial()
End If
@@ -301,9 +302,12 @@ Public Class ImportExportMachiningPanelVM
sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine
End If
Next
MessageBox.Show("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.")
'MessageBox.Show("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.")
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
End If
' aggiorno/aggiungo materiali
@@ -353,9 +357,12 @@ Public Class ImportExportMachiningPanelVM
For Index = 0 To ImportedMaterialList.Count - 1
sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine
Next
MessageBox.Show("List of the materials:" & Environment.NewLine &
sMaterialList & Environment.NewLine &
"Import successfully completed.")
'MessageBox.Show("List of the materials:" & Environment.NewLine &
' sMaterialList & Environment.NewLine &
' "Import successfully completed.")
EgtMessageBoxV.Show(Application.Current.MainWindow, "List of the materials:" & Environment.NewLine &
sMaterialList & Environment.NewLine &
"Import successfully completed.")
Return
End Sub
@@ -471,7 +478,7 @@ Public Class ImportExportMachiningPanelVM
End Select
Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG
' chiedo il nome con cui salvare il file
Dim sExtension As String =""
Dim sExtension As String = ""
If m_WindowType = WindowTypeEnum.MATERIAL Then
If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then
sExtension = OriginalMaterialDataExtension
@@ -580,7 +587,8 @@ Public Class ImpExpMachiningItem
If m_AlreadyExist Then
Select Case m_WindowType
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
m_ChangeName = False
m_Active = True
@@ -594,7 +602,8 @@ Public Class ImpExpMachiningItem
End While
End If
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))
m_ChangeName = True
m_Active = True
@@ -602,7 +611,8 @@ Public Class ImpExpMachiningItem
m_Active = False
End Select
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
m_ChangeName = False
m_Active = True
@@ -616,7 +626,8 @@ Public Class ImpExpMachiningItem
End While
End If
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))
m_ChangeName = True
m_Active = True
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Icarus"
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Orientation="Horizontal">
<local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}"
@@ -96,8 +96,9 @@ Public Class MyInstrumentPanelVM
EgtDraw()
' Ripristino stato segnalazione modifica
DisableMgr.ReEnable()
MessageBox.Show(sResult)
Else
'MessageBox.Show(sResult)
EgtMessageBoxV.Show(Application.Current.MainWindow, sResult)
Else
' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr
' cancello tutti i gruppi con i chunk
+2 -1
View File
@@ -48,7 +48,8 @@ Public Class MachSaveInDbWndVM
Public Sub Ok()
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
End If
RaiseEvent m_CloseWindow(True)
+442 -43
View File
@@ -45,12 +45,6 @@ Public Class Machining
SUPPORT = 4
End Enum
Public Enum MPAR_INFILL As Integer
NONE = 1
OFFSET = 2
ZIGZAG = 3
End Enum
Public Enum MPAR_DYNAMIC_MODE As Integer
STANDARD = 1
FAST = 2
@@ -67,6 +61,17 @@ Public Class Machining
RIB_SUPPORT = 8
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)
Public ReadOnly Property CathegoryList As ObservableCollection(Of MachiningCathegory)
Get
@@ -147,6 +152,7 @@ Public Class Machining
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.AUX_SOLID, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.INFILL, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, nIndex))
For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList
@@ -273,7 +279,8 @@ Public Class MachiningCathegory
RIBS = 8
SHELL_NUMBER = 9
AUX_SOLID = 10
MATERIALS = 11
INFILL = 11
MATERIALS = 12
End Enum
Protected m_Type As Cathegories
@@ -326,7 +333,6 @@ Public Class MachiningCathegory
New NumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.STRANDORDER, 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.G0FEEDZ, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LINKZUP, nIndex, Me),
@@ -336,10 +342,12 @@ Public Class MachiningCathegory
New OrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, 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
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.INNERSHELLWIDTH, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LINKPARAM, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.LEADIN, nIndex, Me),
@@ -355,7 +363,8 @@ Public Class MachiningCathegory
'New NumericMachiningParam(MachiningParam.Params.WIPEDIR, nIndex, Me)})
Case Cathegories.RIBS
m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex, Me),
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex, Me),
@@ -378,15 +387,42 @@ Public Class MachiningCathegory
New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nIndex, Me)})
Case Cathegories.AUX_SOLID
m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nIndex, Me),
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, 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.AUXSOLIDSWIPELEN, 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.INFILLSTRANDWIDTH, nIndex, Me),
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
m_sName = "Materials"
Dim sMaterials As String = ""
@@ -414,6 +450,19 @@ Public Class MachiningCathegory
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
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 Sub
@@ -443,6 +492,11 @@ End Class
Public MustInherit Class MachiningParam
Inherits VMBase
Public Enum MinMaxTypes As Integer
ABSOLUT = 1
PERCENTAGE = 2
End Enum
Public Enum Params As Integer
SLICINGTYPE = 1
SPIRALVASE = 2
@@ -454,7 +508,6 @@ Public MustInherit Class MachiningParam
STARTPOINTOFFSETONSLICE = 8
STRANDORDER = 9
DIRECTION = 10
FLOORCOUNT = 11
G0FEED = 12
LINKZUP = 13
G0FEEDZ = 14
@@ -465,6 +518,7 @@ Public MustInherit Class MachiningParam
PREFLOWDELAY = 19
POSTFLOWDELAY = 20
SCREWBACK = 21
SLICINGHEIGHT = 22
LINKTYPE = 51
LINKPARAM = 52
LEADIN = 53
@@ -478,6 +532,7 @@ Public MustInherit Class MachiningParam
COASTINGFEED_PC = 61
WIPELEN = 62
WIPEFEED_PC = 63
INNERSHELLWIDTH = 64
'WIPEDIR = 64
RIBSTYPE = 101
RIBSOVERLAP = 102
@@ -494,6 +549,7 @@ Public MustInherit Class MachiningParam
RIBSLEADOUTWIPE = 113
RIBSLEADOUTWIPEDIR = 114
RIBSLIMITUNBOUNDEDWITHSOLID = 115
RIBSSTRANDWIDTH = 116
SHELLNBRDIFFERENCE = 151
SHELLNBRCOASTING = 152
SHELLNBRWIPE = 153
@@ -504,10 +560,35 @@ Public MustInherit Class MachiningParam
AUXSOLIDSLINKTYPE = 204
AUXSOLIDSLINKPARAM = 205
AUXSOLIDSSTARTPOINTOFFSETONSLICE = 206
AUXSOLIDSCOASTINGLEN = 207
AUXSOLIDSWIPELEN = 208
AUXSOLIDSWIPEDIR = 209
MATERIALS = 250
AUXSOLIDSOFFSETLEADPOINT = 207
AUXSOLIDSDENSITY = 208
AUXSOLIDSGRIDOVERLAP = 209
AUXSOLIDSDIRECTION = 210
AUXSOLIDSOFFSETX = 211
AUXSOLIDSOFFSETY = 212
AUXSOLIDSCOASTINGLEN = 213
AUXSOLIDSWIPELEN = 214
AUXSOLIDSWIPEDIR = 215
AUXSOLIDSSTRANDCOUNT = 216
AUXSOLIDSINFILLLINK = 217
AUXSOLIDSSTRANDWIDTH = 218
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
INFILLSTRANDWIDTH = 265
Materials = 500
End Enum
Protected m_Type As Params
@@ -533,12 +614,29 @@ Public MustInherit Class MachiningParam
End Get
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)
m_Type = Type
m_Cathegory = Cathegory
Select Case m_Type
Case Params.SLICINGTYPE
m_sName = "Slicing direction"
m_sName = "Slicing Direction"
Case Params.STRANDH
m_sName = "Strand Height"
Case Params.STRANDW
@@ -559,6 +657,8 @@ Public MustInherit Class MachiningParam
m_sName = "Link Param"
Case Params.LINKZUP
m_sName = "Link Z Up"
Case Params.INNERSHELLWIDTH
m_sName = "Custom Inner Shell Width"
Case Params.OFFSETLEADPOINT
m_sName = "Offset Lead Point"
Case Params.LEADIN
@@ -595,6 +695,10 @@ Public MustInherit Class MachiningParam
m_sName = "Post Flow Delay"
Case Params.SCREWBACK
m_sName = "Screw Back"
Case Params.SLICINGHEIGHT
m_sName = "Slicing Height"
Case Params.RIBSSTRANDWIDTH
m_sName = "Custom Strand Width"
Case Params.RIBSTYPE
m_sName = "Type"
Case Params.RIBSOVERLAP
@@ -633,10 +737,16 @@ Public MustInherit Class MachiningParam
m_sName = "Wipe"
Case Params.SHELLNBRWIPEDIR
m_sName = "Wipe Direction [deg]"
Case Params.AUXSOLIDSSTRANDWIDTH
m_sName = "Custom Strand Width"
Case Params.AUXSOLIDSOVERLAP
m_sName = "Overlap [%]"
Case Params.AUXSOLIDSINFILL
m_sName = "Infill"
Case Params.AUXSOLIDSINFILLLINK
m_sName = "Infill Link"
Case Params.AUXSOLIDSSTRANDCOUNT
m_sName = "Strand Count"
Case Params.AUXSOLIDSSTRANDORDER
m_sName = "Strand Order"
Case Params.AUXSOLIDSLINKTYPE
@@ -645,6 +755,18 @@ Public MustInherit Class MachiningParam
m_sName = "Link Parameter"
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
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
m_sName = "Coasting Length"
Case Params.AUXSOLIDSWIPELEN
@@ -658,11 +780,41 @@ Public MustInherit Class MachiningParam
Case Params.STRANDOVERLAP
m_sName = "Strand Overlap [%]"
Case Params.FLOWRATE_PC
m_sName = "Flow rate [%]"
m_sName = "Flow Rate [%]"
Case Params.DYNAMIC_MODE
m_sName = "Dynamic Mode"
Case Params.PRINT_ORDER
m_sName = "Print Order"
Case Params.INFILLSTRANDWIDTH
m_sName = "Custom Strand Width"
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 Sub
@@ -686,6 +838,8 @@ Public Class NumericMachiningParam
Protected m_bIsLen As Boolean = False
Protected m_bIsActiveMinMax As Boolean = False
Protected m_MinMaxLinkedParam As Params = 0
Protected m_MinMaxType As MinMaxTypes = 0
Protected m_dMinValue As Double
Protected m_dMaxValue As Double
@@ -707,13 +861,31 @@ Public Class NumericMachiningParam
StringToDouble(value, dTempValue)
End If
If m_bIsActiveMinMax Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
m_dValue = dTempValue
If m_MinMaxType = MinMaxTypes.ABSOLUT Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
m_dValue = dTempValue
End If
ElseIf m_MinMaxType = MinMaxTypes.PERCENTAGE Then
Dim LinkedParam As MachiningParam = Nothing
' cerco il parametro a cui e' collegato
For Each CurrCathegory In Map.refMachiningDbVM.SelMachining.CathegoryList
LinkedParam = CurrCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = m_MinMaxLinkedParam)
If Not IsNothing(LinkedParam) Then Exit For
Next
If Not IsNothing(LinkedParam) AndAlso TypeOf LinkedParam Is NumericMachiningParam Then
Dim NumericLinkedParam As NumericMachiningParam = DirectCast(LinkedParam, NumericMachiningParam)
If dTempValue >= NumericLinkedParam.dValue * m_dMinValue / 100 AndAlso dTempValue <= NumericLinkedParam.dValue * m_dMaxValue / 100 Then
m_dValue = dTempValue
End If
Else
m_dValue = dTempValue
End If
End If
Else
m_dValue = dTempValue
End If
NotifyPropertyChanged(NameOf(sValue))
ManageDependencyParam()
End Set
End Property
@@ -749,16 +921,43 @@ Public Class NumericMachiningParam
MyBase.New(Type, Cathegory)
' leggo ed imposto eventuali min e max
Dim sMinMax As String = ""
If GetMainPrivateProfileString(S_MINMAX, Type, "", sMinMax) > 0 Then
If GetPrivateProfileString(S_MINMAX, Type, "", sMinMax, CurrentMachine.sMachIniFile) > 0 Then
Dim sMinMaxValues() As String = sMinMax.Split(","c)
Dim dMin As Double = 0
Dim dMax As Double = 0
If StringToDouble(sMinMaxValues(0), dMin) AndAlso StringToDouble(sMinMaxValues(1), dMax) Then
m_dMinValue = dMin
m_dMaxValue = dMax
m_bIsActiveMinMax = True
If sMinMaxValues.Count() = 2 Then
If StringToDouble(sMinMaxValues(0), dMin) AndAlso StringToDouble(sMinMaxValues(1), dMax) Then
m_MinMaxType = MinMaxTypes.ABSOLUT
m_dMinValue = dMin
m_dMaxValue = dMax
m_bIsActiveMinMax = True
End If
ElseIf sMinMaxValues.Count() > 2 Then
Dim nMinMaxType As Integer = 0
If StringToDouble(sMinMaxValues(0), nMinMaxType) AndAlso nMinMaxType = 1 Then
If StringToDouble(sMinMaxValues(0), dMin) AndAlso StringToDouble(sMinMaxValues(1), dMax) Then
m_MinMaxType = nMinMaxType
m_dMinValue = dMin
m_dMaxValue = dMax
m_bIsActiveMinMax = True
End If
ElseIf StringToDouble(sMinMaxValues(0), nMinMaxType) AndAlso nMinMaxType = 2 Then
Dim nMinMaxLinkedParam As Integer = 0
If sMinMaxValues.Count() >= 4 AndAlso Integer.TryParse(sMinMaxValues(1), nMinMaxLinkedParam) AndAlso StringToDouble(sMinMaxValues(2), dMin) AndAlso StringToDouble(sMinMaxValues(3), dMax) Then
m_MinMaxLinkedParam = nMinMaxLinkedParam
m_MinMaxType = nMinMaxType
m_dMinValue = dMin
m_dMaxValue = dMax
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
If nIndex = 0 Then
m_dValue = 0
@@ -789,6 +988,9 @@ Public Class NumericMachiningParam
Case Params.LINKZUP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_LINKZUP, 0)
m_bIsLen = True
Case Params.INNERSHELLWIDTH
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INNERSHELLWIDTH, 0)
m_bIsLen = True
Case Params.OFFSETLEADPOINT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_OFFSETLEADPOINT, 0)
m_bIsLen = True
@@ -838,8 +1040,14 @@ Public Class NumericMachiningParam
m_dValue = ReadMachiningParamDouble(nIndex, MAC_POSTFLOWDELAY, 0)
m_bIsLen = False
Case Params.SCREWBACK
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 0)
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 45)
m_bIsLen = False
Case Params.SLICINGHEIGHT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SLICINGHEIGHT, CurrentMachine.dSlicingMaxHeight)
m_bIsLen = False
Case Params.RIBSSTRANDWIDTH
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDWIDTH, 0)
m_bIsLen = True
Case Params.RIBSOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0)
m_bIsLen = False
@@ -873,6 +1081,12 @@ Public Class NumericMachiningParam
Case Params.SHELLNBRWIPEDIR
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRWIPEDIR, 0)
m_bIsLen = False
Case Params.AUXSOLIDSSTRANDWIDTH
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDWIDTH, 0)
m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDCOUNT, 0)
m_bIsLen = False
Case Params.AUXSOLIDSOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOVERLAP, 0)
m_bIsLen = False
@@ -882,6 +1096,24 @@ Public Class NumericMachiningParam
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, 0)
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
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSCOASTINGLEN, 0)
m_bIsLen = True
@@ -894,11 +1126,68 @@ Public Class NumericMachiningParam
Case Params.FLOWRATE_PC
m_dValue = ReadMachiningParamDouble(nIndex, MAC_CONSTANT, 100)
m_bIsLen = False
Case Params.INFILLSTRANDWIDTH
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLSTRANDWIDTH, 0)
m_bIsLen = True
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 If
m_dOrigValue = m_dValue
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 = "")
Dim sWriteValue As String = ""
If m_bIsLen Then
@@ -923,6 +1212,8 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_LINKPARAM, sWriteValue, sFilePath)
Case Params.LINKZUP
WriteMachiningParam(nIndex, MAC_LINKZUP, sWriteValue, sFilePath)
Case Params.INNERSHELLWIDTH
WriteMachiningParam(nIndex, MAC_INNERSHELLWIDTH, sWriteValue, sFilePath)
Case Params.OFFSETLEADPOINT
WriteMachiningParam(nIndex, MAC_OFFSETLEADPOINT, sWriteValue, sFilePath)
Case Params.LEADINTANGDIST
@@ -957,6 +1248,10 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_POSTFLOWDELAY, sWriteValue, sFilePath)
Case Params.SCREWBACK
WriteMachiningParam(nIndex, MAC_SCREWBACK, sWriteValue, sFilePath)
Case Params.SLICINGHEIGHT
WriteMachiningParam(nIndex, MAC_SLICINGHEIGHT, sWriteValue, sFilePath)
Case Params.RIBSSTRANDWIDTH
WriteMachiningParam(nIndex, MAC_RIBSSTRANDWIDTH, sWriteValue, sFilePath)
Case Params.RIBSOVERLAP
WriteMachiningParam(nIndex, MAC_RIBSOVERLAP, sWriteValue, sFilePath)
Case Params.RIBSSTRANDCOUNT
@@ -979,12 +1274,28 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_SHELLNBRWIPE, sWriteValue, sFilePath)
Case Params.SHELLNBRWIPEDIR
WriteMachiningParam(nIndex, MAC_SHELLNBRWIPEDIR, sWriteValue, sFilePath)
Case Params.AUXSOLIDSSTRANDWIDTH
WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue, sFilePath)
Case Params.AUXSOLIDSSTRANDCOUNT
WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOVERLAP
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOVERLAP, sWriteValue, sFilePath)
Case Params.AUXSOLIDSLINKPARAM
WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKPARAM, sWriteValue, sFilePath)
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
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
WriteMachiningParam(nIndex, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue, sFilePath)
Case Params.AUXSOLIDSWIPELEN
@@ -993,6 +1304,28 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPEDIR, sWriteValue, sFilePath)
Case Params.FLOWRATE_PC
WriteMachiningParam(nIndex, MAC_CONSTANT, sWriteValue, sFilePath)
Case Params.INFILLSTRANDWIDTH
WriteMachiningParam(nIndex, MAC_INFILLSTRANDWIDTH, 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 Sub
@@ -1137,50 +1470,71 @@ Public Class ComboMachiningParam
Case Params.STRANDORDER
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")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_STRANDORDER, 0))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_STRANDORDER, Machining.MPAR_STRANDORDERS.OUTTOIN))
Case Params.DIRECTION
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DIRECTIONS.CCW, "Counterclockwise"),
New IdNameStruct(Machining.MPAR_DIRECTIONS.CW, "Clockwise")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DIRECTION, 0))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DIRECTION, Machining.MPAR_DIRECTIONS.CCW))
Case Params.LINKTYPE
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.BIARC, "Biarc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LINKTYPE, 0))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LINKTYPE, Machining.MPAR_LEADINOUT.NONE))
Case Params.LEADIN
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.ARC, "Arc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADIN, 0))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADIN, Machining.MPAR_LEADINOUT.NONE))
Case Params.LEADOUT
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.ARC, "Arc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADOUT, 0))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADOUT, Machining.MPAR_LEADINOUT.NONE))
Case Params.RIBSTYPE
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.UNBOUNDED, "Unbounded"),
New IdNameStruct(Machining.MPAR_RIBSTYPE.SUPPORT, "Support")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_RIBSTYPE, 1))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_RIBSTYPE, Machining.MPAR_RIBSTYPE.INTERNAL))
Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSINFILL, 0))
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.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")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSINFILL, Machining.MPAR_INFILL_TYPE.NONE))
Case Params.AUXSOLIDSSTRANDORDER
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")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDORDER, 0))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDORDER, Machining.MPAR_STRANDORDERS.OUTTOIN))
Case Params.AUXSOLIDSLINKTYPE
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.BIARC, "Biarc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSLINKTYPE, 0))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSLINKTYPE, Machining.MPAR_LINKTYPES.NONE))
Case Params.DYNAMIC_MODE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.STANDARD, "Standard"),
New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.FAST, "Fast")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DYNAMICMODE, 1))
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DYNAMICMODE, Machining.MPAR_DYNAMIC_MODE.STANDARD))
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 If
m_OrigSelValue = m_SelValue
@@ -1206,12 +1560,43 @@ Public Class ComboMachiningParam
Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.RIBSLIMITUNBOUNDEDWITHSOLID)
CheckMachiningParam.SetIsActive(m_SelValue.Id = MPAR_RIBSTYPE.UNBOUNDED)
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)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0)
ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKTYPE)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0)
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKPARAM)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0)
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 Sub
@@ -1239,6 +1624,12 @@ Public Class ComboMachiningParam
WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id, sFilePath)
Case Params.DYNAMIC_MODE
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 Sub
@@ -1317,6 +1708,10 @@ Public Class CheckMachiningParam
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTINVERT, 0)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
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 If
m_bOrigValue = m_bValue
@@ -1340,6 +1735,10 @@ Public Class CheckMachiningParam
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0), sFilePath)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
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 Sub
+30 -9
View File
@@ -140,9 +140,16 @@
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
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"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,0,0"
@@ -156,9 +163,16 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
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"
ItemsSource="{Binding ValueList}"
SelectedItem="{Binding SelValue}"
@@ -175,9 +189,16 @@
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
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"
IsChecked="{Binding bValue}"
HorizontalAlignment="Center"
+6 -3
View File
@@ -26,7 +26,8 @@ Public Class MachiningDbVM
' verifico se modificato
If m_SelMachining.bIsModified Then
' 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
m_SelMachining.Save()
Case MessageBoxResult.No
@@ -198,7 +199,8 @@ Public Class MachiningDbVM
Public Sub Ok()
If Not IsNothing(m_SelMachining) AndAlso m_SelMachining.bIsModified Then
' 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
m_SelMachining.Save()
Case MessageBoxResult.No
@@ -309,7 +311,8 @@ Public Class MachiningDbVM
Public Sub Delete()
If IsNothing(m_SelMachining) Then Return
' 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
m_MachiningList.Remove(m_SelMachining)
SetIsModified(True)
+10 -14
View File
@@ -75,13 +75,6 @@ Public Class MainWindowM
End Get
End Property
Private m_bAutoNestOption As Boolean = False
Friend ReadOnly Property AutoNestOption As Boolean
Get
Return m_bAutoNestOption
End Get
End Property
Friend ReadOnly Property sVersion As String
Get
Return My.Application.Info.Version.Major.ToString() & "." &
@@ -189,14 +182,17 @@ Public Class MainWindowM
Dim sKey As String = String.Empty
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
Dim sNestKey As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
'EgtSetNestKey(sNestKey)
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Impostazioni per chiave di rete
Dim bNetKey As Boolean = ( GetMainPrivateProfileInt( S_GENERAL, K_NETKEY, 0) = 1)
EgtSetNetHwKey( bNetKey)
Dim sLockId As String = ""
EgtUILib.GetPrivateProfileString( S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
If Not String.IsNullOrEmpty( sLockId) Then
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2504, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2504, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2510, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2510, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
+5 -4
View File
@@ -116,7 +116,7 @@ Public Class MainWindowVM
End If
' annullo trasparenza attivata durante edit rib
If Not IsNothing(Map.refRibPanelVM.SelRib) Then
EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
'EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
End If
ElseIf Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.SHELLNUMBER Then
' cancello eventuali layer di modifica
@@ -132,7 +132,7 @@ Public Class MainWindowVM
End If
' annullo trasparenza attivata durante edit rib
If Not IsNothing(Map.refShellNumberPanelVM.SelShellNumber) Then
EgtSetAlpha(Map.refShellNumberPanelVM.SelShellNumber.nExtrusionId, 100)
'EgtSetAlpha(Map.refShellNumberPanelVM.SelShellNumber.nExtrusionId, 100)
End If
End If
End If
@@ -148,7 +148,7 @@ Public Class MainWindowVM
End Sub
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
If Map.refSliceManagerVM.bCalculating Then
If Map.refSliceManagerVM.bCalculating OrElse Map.refSliceManagerVM.bCalcSolid Then
Map.refSliceManagerVM.ProcessEvents(nProg, nPause)
End If
If Not IsNothing(Map.refImportLoadingWndVM) Then
@@ -226,7 +226,8 @@ Public Class MainWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object)
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
End If
CloseApplication()
+2 -1
View File
@@ -286,7 +286,8 @@ Public Class ManagePartPanelVM
Next
Next
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
Else
' Creo pezzi e layer necessari
+4 -2
View File
@@ -629,7 +629,8 @@ Public Class GeomEntity_MenuItem
Map.refManagePartPanelVM.SetIsEnabled(True)
Return
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)
' se l'entita' e' gia' in lista pezzi
If Not IsNothing(m_OrigEntity.OrigLayer) Then
@@ -1037,7 +1038,8 @@ Public Class ManagerLayer_MenuItem
Case Else ' PartMenuCmd.IMPORTPRINT
Dim bDeleteOldPrint As Boolean = False
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
Else
bDeleteOldPrint = True
+2 -1
View File
@@ -769,7 +769,8 @@ Public Class StringMaterialParam
End Property
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_sValue = ORIG_MATERIAL
NotifyPropertyChanged(NameOf(sValue))
+10 -5
View File
@@ -24,7 +24,8 @@ Public Class MaterialDbVM
' verifico se modificato
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
' 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
m_SelMaterial.Save()
Case MessageBoxResult.No
@@ -236,7 +237,8 @@ Public Class MaterialDbVM
Public Sub Ok()
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
' 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
m_SelMaterial.Save()
Case MessageBoxResult.No
@@ -365,17 +367,20 @@ Public Class MaterialDbVM
' se materiale originale, esco
If SelMaterialIsOriginal() 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
End If
sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?"
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
End If
End If
' 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
m_MaterialList.Remove(m_SelMaterial)
SetIsModified(True)
+2 -2
View File
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.4.1")>
<Assembly: AssemblyFileVersion("2.5.4.1")>
<Assembly: AssemblyVersion("2.5.10.1")>
<Assembly: AssemblyFileVersion("2.5.10.1")>
+50 -36
View File
@@ -563,17 +563,17 @@ Public Class OptionWindowVM
End Property
Public ReadOnly Property ThickLineMsg As String
Get
Return EgtMsg( 6536) ' Linee spesse
Return EgtMsg(6536) ' Linee spesse
End Get
End Property
Public ReadOnly Property SmoothTriMeshMsg As String
Get
Return EgtMsg( 6518) ' Superfici smussate
Return EgtMsg(6518) ' Superfici smussate
End Get
End Property
Public ReadOnly Property UpdateLicenceMsg As String
Get
Return EgtMsg( 6553) ' Aggiorna licenza
Return EgtMsg(6553) ' Aggiorna licenza
End Get
End Property
@@ -759,15 +759,19 @@ Public Class OptionWindowVM
End If
Next
' Creo dialogo colori
Dim ColorDlg As New System.Windows.Forms.ColorDialog
ColorDlg.FullOpen = True
ColorDlg.CustomColors = nCustomColors.ToArray()
ColorDlg.Color = Col.ToColor()
'Dim ColorDlg As New System.Windows.Forms.ColorDialog
'ColorDlg.FullOpen = True
'ColorDlg.CustomColors = nCustomColors.ToArray()
'ColorDlg.Color = Col.ToColor()
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
.CustomColors = nCustomColors.ToArray(),
.Color = Col.ToColor()
}
' Visualizzo dialogo
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
' Recupero colore scelto
'Recupero colore scelto
NewCol.FromColor(ColorDlg.Color)
' Salvo eventuali modifiche ai colori custom
''Salvo eventuali modifiche ai colori custom
sCustomColors = ""
For Each Color In ColorDlg.CustomColors
sCustomColors &= Color.ToString() & ","
@@ -953,31 +957,32 @@ Public Class OptionWindowVM
Dim sMachDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, sMachName)
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, "Temp")
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory( sTempDir)
My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sMachZip)
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Se non è una macchina segnalo il problema ed esco
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
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
' Il file {0} non contiene una macchina - Avviso
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
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Imposto data e ora correnti al file mlde della macchina
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
End Try
' 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
If bOldExists Then
Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName))
@@ -994,23 +999,24 @@ Public Class OptionWindowVM
End Select
' Faccio una copia di backup della macchina corrente
Dim sBackupDir As String = sMachDir & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
My.Computer.FileSystem.MoveDirectory( sMachDir, sBackupDir, True)
My.Computer.FileSystem.MoveDirectory(sMachDir, sBackupDir, True)
Catch ex As Exception
' 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.
Dim sKo As String = String.Format(EgtMsg(6535), sMachName)
EgtOutLog( sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtOutLog(sKo)
'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
Return
End Try
End If
' 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
If bOldExists And bUpdate Then
Dim sBackupDir As String = sMachDir & ".old"
@@ -1047,10 +1053,11 @@ Public Class OptionWindowVM
End If
'La macchina "{0}" è stata aggiornata con successo.
Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
EgtOutLog( sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
EgtOutLog(sOk)
'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
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
' Aggiorno la lista delle macchina
MyMachine.InsertMachine(sMachDir, Map.refMachinePanelVM.MachineList)
End Sub
@@ -1096,7 +1103,7 @@ Public Class OptionWindowVM
' aggiungo i file della Macchina
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
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
' salvo lo zip
zip.Save()
@@ -1106,12 +1113,14 @@ Public Class OptionWindowVM
' L'esportazione della macchina "{0}" non è riuscita.
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
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
'La macchina "{0}" è stata esportata con successo.
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
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 Region ' ExportMachine
@@ -1218,10 +1227,15 @@ Public Class LayerColor
End If
Next
' Creo dialogo colori
Dim ColorDlg As New System.Windows.Forms.ColorDialog
ColorDlg.FullOpen = True
ColorDlg.CustomColors = nCustomColors.ToArray()
ColorDlg.Color = Col.ToColor()
'Dim ColorDlg As New System.Windows.Forms.ColorDialog
'ColorDlg.FullOpen = True
'ColorDlg.CustomColors = nCustomColors.ToArray()
'ColorDlg.Color = Col.ToColor()
' Visualizzo dialogo
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
.CustomColors = nCustomColors.ToArray(),
.Color = Col.ToColor()
}
' Visualizzo dialogo
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
' Recupero colore scelto
-7
View File
@@ -86,12 +86,5 @@
<Image Source="/Resources/ProjectManager/Send.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Help_Command}"
ToolTip="{Binding Help_ToolTip}"
Margin="2.5,0,0,0"
Style="{StaticResource ProjManager_Button}">
<Image Source="/Resources/ProjectManager/Send.png"
Style="{StaticResource Button_Image}"/>
</Button>
</StackPanel>
+30 -30
View File
@@ -63,7 +63,6 @@ Public Class ProjManagerVM
Private m_cmdExport As ICommand
Private m_cmdOptions As ICommand
Private m_cmdSendFeedback As ICommand
Private m_cmdHelp As ICommand
#Region "ToolTip"
@@ -151,6 +150,27 @@ Public Class ProjManagerVM
''' </summary>
Public Sub NewProjectCmd()
NewProject(True)
'Dim x As New OpenFileDialog()
'x.ShowDialog()
Dim sDir As String = "C:\EgtData\Test3dPrinting"
Dim od As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = "Open",
.Filter = "Icarus project(*.icrs)|*.icrs" &
"|New geometry EgalTech(*.nge)|*.nge",
.FileName = "New.icrs",
.FilterIndex = 1,
.InitialDirectory = sDir}
od.ShowDialog()
Dim sFilePath As String = od.FileName
'Dim save As New EgtSaveDialogV(Application.Current.MainWindow, New EgtSaveDialogVM()) With {
' .Title = "Save",
' .Filter = "Icarus project(*.icrs)|*.icrs",
' .FileName = "New.icrs",
' .InitialDirectory = sDir}
'save.ShowDialog()
'Dim sFilePath As String = save.FileName
End Sub
Friend Sub NewProject(bDialog As Boolean)
@@ -198,7 +218,7 @@ Public Class ProjManagerVM
End Sub
Friend Function OpenProject(sFilePath As String) As Boolean
Map.refSceneHostVM.OpenProject(sFilePath)
Return Map.refSceneHostVM.OpenProject(sFilePath)
End Function
#End Region ' OpenCommand
@@ -371,7 +391,8 @@ Public Class ProjManagerVM
GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress)
' se vuoto do messaggio di errore ed esco
If String.IsNullOrWhiteSpace(sSupportAddress) Then
MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
'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
End If
' Recupero numero chiave
@@ -382,14 +403,16 @@ Public Class ProjManagerVM
EgtGetCurrFilePath(sCurrProject)
' 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 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()
End If
EgtGetCurrFilePath(sCurrProject)
' se modificato, chiedo se si vuole salvare
Else
If EgtGetModified() Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
'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()
End If
End If
@@ -476,7 +499,8 @@ Public Class ProjManagerVM
bEx = True
End Try
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
'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
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5)
End If
@@ -484,30 +508,6 @@ Public Class ProjManagerVM
#End Region ' SendFeedback
#Region "Help"
''' <summary>
''' Returns a command that do SendFeedback.
''' </summary>
Public ReadOnly Property Help_Command As ICommand
Get
If m_cmdHelp Is Nothing Then
m_cmdHelp = New Command(AddressOf Help)
End If
Return m_cmdHelp
End Get
End Property
''' <summary>
''' Execute the SendFeedback. This method is invoked by the SendFeedbackCommand.
''' </summary>
Public Sub Help(ByVal param As Object)
Dim HelpWnd As New HelpWndV(Application.Current.MainWindow, New HelpWndVM())
HelpWnd.Show()
End Sub
#End Region ' Help
#End Region ' Commands
End Class
+20 -3
View File
@@ -2,7 +2,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PrintApp="clr-namespace:Icarus">
<DockPanel.Resources>
<PrintApp:VisibilityToRowConverter x:Key="VisibilityToRowConverter"/>
</DockPanel.Resources>
<Grid DockPanel.Dock="Top">
<PrintApp:TopPanelV Grid.Column="1"
DataContext="{StaticResource TopPanelVM }"/>
@@ -27,12 +29,27 @@
DataContext="{StaticResource SliderManagerVM}"
HorizontalAlignment="Stretch"/>
<!--StatusBar -->
<PrintApp:ControllerInputPanelV Grid.Row="1"
<Grid Grid.RowSpan="2"
Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="67"/>
</Grid.RowDefinitions>
<PrintApp:MessagePanelV Grid.Row="{Binding DataContext.Message_Visibility, ElementName=ControllerInputPanelV, Converter={StaticResource VisibilityToRowConverter}}"
Grid.ColumnSpan="2"
DataContext="{StaticResource StatusBarVM}"/>
<PrintApp:ControllerInputPanelV x:Name="ControllerInputPanelV" Grid.Row="2"
Grid.ColumnSpan="2"
DataContext="{StaticResource ControllerInputPanelVM}"/>
</Grid>
<!--<PrintApp:ControllerInputPanelV Grid.Row="1"
Grid.ColumnSpan="2"
DataContext="{StaticResource ControllerInputPanelVM}"/>
<PrintApp:MessagePanelV Grid.Row="1"
Grid.ColumnSpan="2"
DataContext="{StaticResource StatusBarVM}"/>
DataContext="{StaticResource StatusBarVM}"/>-->
<PrintApp:ShowPanelV Grid.Column="2"
Grid.Row="1"
DataContext="{StaticResource ShowPanelVM}"/>
+13
View File
@@ -3,6 +3,7 @@ Imports EgtWPFLib5
Imports EgtUILib
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.Globalization
Public Class ProjectVM
Inherits VMBase
@@ -28,3 +29,15 @@ Public Class ProjectVM
End Class
Public Class VisibilityToRowConverter
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
If IsNothing(value) Then Return 2
Return If(value = Visibility.Visible, 1, 2)
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New System.NotImplementedException()
End Function
End Class
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

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

+66 -9
View File
@@ -42,6 +42,10 @@ Public Class RibPanelVM
Return m_SelRib
End Get
Set(value As RibEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refRibPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelRib))
Return
End If
m_SelRib = value
EgtDeselectAll()
If Not IsNothing(value) Then
@@ -374,6 +378,8 @@ Public Class RibPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.RIBPARAM)
NotifyPropertyChanged(NameOf(RibList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If
@@ -383,6 +389,8 @@ Public Class RibPanelVM
m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(RibList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub
Public ReadOnly Property Compo_Visibility As Visibility
@@ -391,11 +399,17 @@ Public Class RibPanelVM
End Get
End Property
Private m_RibList_IsEnabled As Boolean = False
Public ReadOnly Property RibList_IsEnabled As Boolean
Get
Return Not m_bMachParam_IsChecked
Return If(m_RibList.Count > 0, m_RibList_IsEnabled, False)
End Get
End Property
Friend Sub SetRibListIsEnabled(bValue As Boolean)
m_RibList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(RibList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d
@@ -413,6 +427,8 @@ Public Class RibPanelVM
End Get
End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String
@@ -596,6 +612,8 @@ Public Class RibPanelVM
SelRib = m_RibList(0)
NotifyPropertyChanged(NameOf(SelRib))
End If
' abilito lista ribs
SetRibListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
@@ -623,7 +641,7 @@ Public Class RibPanelVM
' attivo modifiche su scena
Map.refSceneHostVM.MainScene.ResetStatus()
' rendo traspanete estrusione
EgtSetAlpha(m_SelRib.nExtrusionId, 50)
'EgtSetAlpha(m_SelRib.nExtrusionId, 50)
' seleziono percorso corrente
EgtDeselectAll()
Select Case RibSelectionType
@@ -631,8 +649,13 @@ Public Class RibPanelVM
EgtSelectObj(m_SelRib.nCurveId)
Case RibSelectionTypes.EXTRUSION
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelRib.nCurveId)
Case RibSelectionTypes.BOTH
@@ -640,6 +663,8 @@ Public Class RibPanelVM
EgtSelectObj(m_SelRib.nExtrusionId)
End Select
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True
End Function
@@ -649,6 +674,7 @@ Public Class RibPanelVM
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione
@@ -666,12 +692,12 @@ Public Class RibPanelVM
' seleziono nuova estrusione
EgtSelectObj(m_SelRib.nExtrusionId)
' ripristino trasparenza estrusione
EgtSetAlpha(m_SelRib.nExtrusionId, 100)
'EgtSetAlpha(m_SelRib.nExtrusionId, 100)
EgtDraw()
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
Case Controller.CMD.MOVE, Controller.CMD.ROTATE
EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
' EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
' seleziono nuova estrusione
EgtSelectObj(m_SelRib.nExtrusionId)
EgtDraw()
@@ -688,6 +714,10 @@ Public Class RibPanelVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -754,9 +784,10 @@ Public Class RibPanelVM
EgtSelectObj(nNewEntityId)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else
' cancello layer
'EgtErase(nNewRibLayerId)
EgtErase(nNewExtrusionLayerId)
End If
End If
@@ -779,6 +810,13 @@ Public Class RibPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If
End Sub
@@ -814,6 +852,18 @@ Public Class RibPanelVM
Return nRibIndex + 1
End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetRibListIsEnabled(bValue)
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -837,7 +887,9 @@ Public Class RibPanelVM
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertRib()
ManageInterface(True)
End Sub
#End Region ' Import
@@ -861,6 +913,7 @@ Public Class RibPanelVM
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewRibLayerId = GDB_ID.NULL Then nNewRibLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewRibLayerId, LAY_NEWRIB)
@@ -905,10 +958,11 @@ Public Class RibPanelVM
Else
SelRib = Nothing
m_bEdit_IsChecked = False
NotifyPropertyChanged(NameOf( bEdit_IsChecked))
NotifyPropertyChanged(NameOf(bEdit_IsChecked))
End If
NotifyPropertyChanged(NameOf(SelRib))
End If
SetRibListIsEnabled(True)
End Sub
#End Region ' Delete
@@ -1192,6 +1246,7 @@ Public Class RibPanelVM
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1216,6 +1271,7 @@ Public Class RibPanelVM
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1332,6 +1388,7 @@ Public Class RibPanelVM
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
+11 -6
View File
@@ -51,11 +51,13 @@ Public Class CopyFromWndVM
Public Sub Ok()
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
End If
' copio i parametri nella rib corrente
Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSTYPE,
Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSSTRANDWIDTH,
MachiningParam.Params.RIBSTYPE,
MachiningParam.Params.RIBSOVERLAP,
MachiningParam.Params.RIBSSTRANDCOUNT,
MachiningParam.Params.RIBSLINK,
@@ -70,9 +72,9 @@ Public Class CopyFromWndVM
MachiningParam.Params.RIBSLEADOUTWIPEDIR})
For Each Param In ParamList
Select Case Map.refRibPanelVM.SelRib.Type
'Case RibEntity.RibTypes.FROMDRAW
' CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nCurveId)
' CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
Case RibEntity.RibTypes.FROMDRAW
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nCurveId)
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
Case RibEntity.RibTypes.FROMIMPORT
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
End Select
@@ -98,11 +100,14 @@ Public Class CopyFromWndVM
Else
RibTypeParam.SelValue = RibTypeParam.PartSelValue
End If
Case MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
Case MachiningParam.Params.RIBSSTRANDWIDTH, MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR
Dim RibTypeParam As RibNumericMachiningParam = Nothing
Dim dRibParam As Double = 0
Select Case Type
Case MachiningParam.Params.RIBSSTRANDWIDTH
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDWIDTH)
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDWIDTH, dRibParam)
Case MachiningParam.Params.RIBSOVERLAP
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSOVERLAP)
bRead = EgtGetInfo(nFromId, MAC_RIBSOVERLAP, dRibParam)
+15 -2
View File
@@ -42,7 +42,8 @@ Public Class RibParamPanelVM
m_Type = Cathegories.RIBS
m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId, Me),
m_MachiningParamList = New List(Of MachiningParam)({New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nRibId, nPartId, Me),
New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId, Me),
@@ -135,6 +136,8 @@ Public Class RibParamPanelVM
Map.refSliceManagerVM.UpdateDimensions()
End If
End If
' riattivo lista ribs
Map.refRibPanelVM.SetRibListIsEnabled(False)
' ripristino modalita' standard
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
Map.refRibPanelVM.ResetMachParamIsChecked()
@@ -228,10 +231,14 @@ Public Class RibNumericMachiningParam
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.RIBSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDWIDTH, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dPartValue)
m_bIsLen = True
Case Params.RIBSOVERLAP
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dPartValue)
m_bIsLen = True
m_bIsLen = False
Case Params.RIBSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDCOUNT, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dPartValue)
@@ -288,6 +295,12 @@ Public Class RibNumericMachiningParam
sWriteValue = DoubleToString(m_dValue, 2)
End If
Select Case Type
Case Params.RIBSSTRANDWIDTH
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSSTRANDWIDTH, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDWIDTH)
End If
Case Params.RIBSOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSOVERLAP, sWriteValue)
+52 -22
View File
@@ -85,21 +85,23 @@ Public Class MySceneHostVM
' 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 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
Else
EgtOutLog("Problems with Licence")
' 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 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
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".lic",
.Filter = "Licences (.lic)|*.lic",
.CheckFileExists = True,
.ValidateNames = True
}
.DefaultExt = ".lic",
.Filter = "Licences (.lic)|*.lic",
.CheckFileExists = True,
.ValidateNames = True
}
If LicDlg.ShowDialog() = True Then
' Recupero il direttorio del file
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
@@ -261,7 +263,14 @@ Public Class MySceneHostVM
If Not String.IsNullOrWhiteSpace(sDir) Then
sDir = Path.GetDirectoryName(sDir)
End If
Dim OpenFileDialog As New Windows.Forms.OpenFileDialog With {
'Dim OpenFileDialog As New Windows.Forms.OpenFileDialog With {
' .Title = "Open",
' .Filter = "Icarus project(*.icrs)|*.icrs" &
' "|New geometry EgalTech(*.nge)|*.nge",
' .FilterIndex = 1,
' .InitialDirectory = sDir
'}
Dim OpenFileDialog As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = "Open",
.Filter = "Icarus project(*.icrs)|*.icrs" &
"|New geometry EgalTech(*.nge)|*.nge",
@@ -274,8 +283,6 @@ Public Class MySceneHostVM
bOk = MainController.OpenProject(sFilePath, False)
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
' imposto modalita' import
Map.refTopPanelVM.SelPage = Pages.NULL
Return bOk
End Function
@@ -313,12 +320,25 @@ Public Class MySceneHostVM
If String.IsNullOrWhiteSpace(sFile) Then sFile = "New.icrs"
' Eventuale sistemazione estensione
sFile = IO.Path.ChangeExtension(sFile, "icrs")
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
End If
If Not String.IsNullOrWhiteSpace(sDir) Then
sDir = Path.GetDirectoryName(sDir)
End If
' Assegnazione nome file con dialogo
Dim SaveFileDialog As New Windows.Forms.SaveFileDialog With {
'Dim SaveFileDialog As New Windows.Forms.SaveFileDialog With {
' .Title = "Save",
' .Filter = "Icarus Project(*.icrs)|*.icrs",
' .FileName = sFile,
' .InitialDirectory = IO.Path.GetDirectoryName(sFile)
'}
Dim SaveFileDialog As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = "Save",
.Filter = "Icarus Project(*.icrs)|*.icrs",
.Filter = "Icarus project(*.icrs)|*.icrs",
.FileName = sFile,
.InitialDirectory = IO.Path.GetDirectoryName(sFile)
.InitialDirectory = sDir
}
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim sFileName As String = SaveFileDialog.FileName
@@ -499,7 +519,8 @@ Public Class MySceneHostVM
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
' verifico che ci sia una sola entita'
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
' 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)
@@ -1023,7 +1044,8 @@ Public Class MySceneHostVM
EgtErase(EgtGetFirstPart())
CurrentMachine.CreateMachineTable()
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
Map.refTopPanelVM.PartList.Clear()
@@ -1052,7 +1074,8 @@ Public Class MySceneHostVM
Else
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
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
' leggo materiale e macchina
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
@@ -1064,7 +1087,8 @@ Public Class MySceneHostVM
' imposto la macchina
Map.refMachinePanelVM.SelectedMachine = ProjectMachine
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)
Return
End If
@@ -1087,7 +1111,9 @@ Public Class MySceneHostVM
Else
Dim sMaterialName As String = ""
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)
End If
End If
@@ -1171,7 +1197,8 @@ Public Class MySceneHostVM
Else
Map.refProjManagerVM.MruFiles.Remove(sFile)
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 Sub
@@ -1179,7 +1206,8 @@ Public Class MySceneHostVM
' Segnalo eventuale errore
If Not bOk Then
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
Map.refProjManagerVM.MruImportFiles.Add(sFile)
EgtSetInfo(EgtGetLastPart(), FILE_PATH, sFile)
@@ -1197,7 +1225,8 @@ Public Class MySceneHostVM
' Abilito progress e bottone stop
Map.refMyStatusBarVM.StartLoading("", True)
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 Sub
@@ -1210,7 +1239,8 @@ Public Class MySceneHostVM
' Segnalo eventuale errore
If Not bOk Then
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
' creo oggetto pezzo in lista
'Map.refProjectVM.
+1 -3
View File
@@ -15,9 +15,6 @@
<EgtWPFLib5:EgtMainWindow.TitlePanel>
<PrintApp:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/>
</EgtWPFLib5:EgtMainWindow.TitlePanel>
<EgtWPFLib5:EgtMainWindow.HelpPanel>
<PrintApp:HelpPanelV DataContext="{StaticResource HelpPanelVM}"/>
</EgtWPFLib5:EgtMainWindow.HelpPanel>
<EgtWPFLib5:EgtMainWindow.OpacityMask>
<SolidColorBrush Color="White" Opacity="{Binding Window_Opacity}"/>
</EgtWPFLib5:EgtMainWindow.OpacityMask>
@@ -29,4 +26,5 @@
<PrintApp:ProjectV DataContext="{StaticResource ProjectVM}"/>
</DockPanel>
</EgtWPFLib5:EgtMainWindow>
+6 -2
View File
@@ -130,7 +130,10 @@ Public Class SecondaryWindowVM
Dim sFile As String = Environment.GetCommandLineArgs(1)
Dim sExt As String = IO.Path.GetExtension(sFile).ToLower()
If String.IsNullOrWhiteSpace(sFile) OrElse String.IsNullOrWhiteSpace(sExt) Then Return False
Return OpenStdFile(sFile)
Dim bOk As Boolean = OpenStdFile(sFile)
m_Window_Opacity = 1
NotifyPropertyChanged(NameOf(Window_Opacity))
Return bOk
End Function
Friend Function OpenStdFile(sFile As String) As Boolean
@@ -180,7 +183,8 @@ Public Class SecondaryWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object)
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
End If
Map.refMainWindowVM.CloseApplication()
+61 -3
View File
@@ -40,6 +40,10 @@ Public Class ShellNumberPanelVM
Return m_SelShellNumber
End Get
Set(value As ShellNumberEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelShellNumber))
Return
End If
m_SelShellNumber = value
EgtDeselectAll()
If Not IsNothing(value) Then
@@ -354,6 +358,8 @@ Public Class ShellNumberPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SHELLNUMBERPARAM)
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If
@@ -363,6 +369,8 @@ Public Class ShellNumberPanelVM
m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub
Public ReadOnly Property Compo_Visibility As Visibility
@@ -371,11 +379,17 @@ Public Class ShellNumberPanelVM
End Get
End Property
Private m_ShellNumberList_IsEnabled As Boolean = False
Public ReadOnly Property ShellNumberList_IsEnabled As Boolean
Get
Return Not m_bMachParam_IsChecked
Return If(m_ShellNumberList.Count > 0, m_ShellNumberList_IsEnabled, False)
End Get
End Property
Friend Sub SetShellNumberListIsEnabled(bValue As Boolean)
m_ShellNumberList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d
@@ -393,6 +407,8 @@ Public Class ShellNumberPanelVM
End Get
End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String
@@ -576,6 +592,8 @@ Public Class ShellNumberPanelVM
SelShellNumber = m_ShellNumberList(0)
NotifyPropertyChanged(NameOf(SelShellNumber))
End If
' abilito lista shell number
SetShellNumberListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
@@ -611,8 +629,13 @@ Public Class ShellNumberPanelVM
EgtSelectObj(m_SelShellNumber.nCurveId)
Case ShellNumberSelectionTypes.EXTRUSION
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelShellNumber.nCurveId)
Case ShellNumberSelectionTypes.BOTH
@@ -620,6 +643,8 @@ Public Class ShellNumberPanelVM
EgtSelectObj(m_SelShellNumber.nExtrusionId)
End Select
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True
End Function
@@ -629,6 +654,7 @@ Public Class ShellNumberPanelVM
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione
@@ -668,6 +694,10 @@ Public Class ShellNumberPanelVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -710,6 +740,7 @@ Public Class ShellNumberPanelVM
If NewGeomType = GDB_TY.CRV_COMPO Then
If Not EgtCurveIsClosed(nNewEntityId) Then
EgtCloseCurveCompo(nNewEntityId)
m_bEscOnLine2P = True
End If
EgtSetName(nNewEntityId, RIB_CURVE)
' resetto colore entita'
@@ -762,6 +793,13 @@ Public Class ShellNumberPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If
End Sub
@@ -797,6 +835,19 @@ Public Class ShellNumberPanelVM
Return nShellNumberIndex + 1
End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetShellNumberListIsEnabled(bValue)
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -820,7 +871,9 @@ Public Class ShellNumberPanelVM
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertShellNumber()
ManageInterface(True)
End Sub
#End Region ' Import
@@ -844,6 +897,7 @@ Public Class ShellNumberPanelVM
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
@@ -892,6 +946,7 @@ Public Class ShellNumberPanelVM
End If
NotifyPropertyChanged(NameOf(SelShellNumber))
End If
SetShellNumberListIsEnabled(True)
End Sub
#End Region ' Delete
@@ -1176,6 +1231,7 @@ Public Class ShellNumberPanelVM
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1200,6 +1256,7 @@ Public Class ShellNumberPanelVM
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1316,6 +1373,7 @@ Public Class ShellNumberPanelVM
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
+6 -3
View File
@@ -71,11 +71,14 @@ Public Class MySimulation
Case MCH_SIM.OUTSTROKE
Dim sInfo As String = String.Empty
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
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
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 If
' 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 EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
'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
' Imposto stato corrente
MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP)
+27 -10
View File
@@ -44,6 +44,11 @@ Public Class SliceManagerVM
Private m_bCalcTFS As Boolean = False
Private m_bGenerate As Boolean = False
Private m_bCalcSolid As Boolean = False
Friend ReadOnly Property bCalcSolid As Boolean
Get
Return m_bCalcSolid
End Get
End Property
Friend Sub SetCalcSolid(value As Boolean)
m_bCalcSolid = value
End Sub
@@ -317,7 +322,8 @@ Public Class SliceManagerVM
End If
EgtGetCurrFilePath(sCurrProject)
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
End If
' mostro barre di caricamento
@@ -391,7 +397,8 @@ Public Class SliceManagerVM
Map.refTopPanelVM.SelPart.RefreshPrintLayers()
' in caso di errore, segnalazione
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
If bOk And m_bGenerate Then
' verifico esistenza e correttezza machgroup
@@ -419,7 +426,8 @@ Public Class SliceManagerVM
Else
sOut &= sMsg
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
' aggiorno tempo e massa
@@ -476,7 +484,8 @@ Public Class SliceManagerVM
EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sInitMachScriptPath) Then
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
End If
Dim nErr As Integer = 999
@@ -495,7 +504,8 @@ Public Class SliceManagerVM
EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sExitMachScriptPath) Then
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
End If
Dim nErr As Integer = 999
@@ -526,26 +536,32 @@ Public Class SliceManagerVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Slice()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refStartMachPanelVM.bCPlaneObj_IsActive OrElse Map.refRibPanelVM.bCPlaneObj_IsActive OrElse
Map.refShellNumberPanelVM.bCPlaneObj_IsActive OrElse Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then Return
If m_bCalculating Then Return
m_bCalculating = True
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
Return
End If
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
Return
End If
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
Return
End If
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
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
Return
End If
@@ -707,7 +723,8 @@ Public Class SliceManagerVM
Process.Start("Notepad.exe", sIsoFilePath)
' altrimenti lo segnalo
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
NotifyPropertyChanged(NameOf(Time_Visibility))
+47 -45
View File
@@ -20,23 +20,22 @@ Public Class SliderManagerVM
End Get
Set(value As Integer)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED
' se diverso da nullo nascondo precedente
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
If m_nLayerIndex = 0 Then
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
Next
ElseIf m_nLayerIndex > 0 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
End If
' nascondo precedente
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
If m_nLayerIndex = 0 Then
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
Next
ElseIf m_nLayerIndex > 0 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
End If
m_nLayerIndex = value
' se diverso da nullo visualizzo corrente
If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
If m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
' porto barra nuovo strato a 100
If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
Case ViewSliderType.UNTIL_SELECTED
@@ -64,6 +63,7 @@ Public Class SliderManagerVM
End If
m_nLayerIndex = value
End Select
DisableMgr.ReEnable()
NotifyPropertyChanged(NameOf(ghShowValue))
NotifyPropertyChanged(NameOf(ghValueIndex))
NotifyPropertyChanged(NameOf(ghValueHeight))
@@ -71,47 +71,44 @@ Public Class SliderManagerVM
End Set
End Property
Private Sub SetLayerIndex(value As Integer)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd = value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
End If
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd = value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
m_nLayerIndex = value
Case ViewSliderType.UNTIL_SELECTED
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd <= value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
End If
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd <= value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
m_nLayerIndex = value
Case ViewSliderType.FROM_SELECTED
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd >= value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
End If
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd >= value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
m_nLayerIndex = value
End Select
DisableMgr.ReEnable()
NotifyPropertyChanged(NameOf(nLayerIndex))
NotifyPropertyChanged(NameOf(ghShowValue))
NotifyPropertyChanged(NameOf(ghValueIndex))
@@ -201,6 +198,8 @@ Public Class SliderManagerVM
Return m_dLayerAdvancement
End Get
Set(value As Double)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED
Dim nTotSolid As Integer = 0
@@ -247,6 +246,7 @@ Public Class SliderManagerVM
End If
m_dLayerAdvancement = value
End Select
DisableMgr.ReEnable()
EgtDraw()
End Set
End Property
@@ -335,6 +335,7 @@ Public Class SliderManagerVM
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
' ciclo tutti i layer per nasconderli/mostrarli
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
@@ -361,6 +362,7 @@ Public Class SliderManagerVM
End If
Next
End Select
DisableMgr.ReEnable()
' mostro/nascondo slider orizzontale
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
@@ -28,6 +28,7 @@
ItemsSource="{Binding StartList}"
SelectedItem="{Binding SelStart}"
DisplayMemberPath="ghName"
IsEnabled="{Binding StartList_IsEnabled}"
Style="{StaticResource LeftPanel_ComboBox}"/>
<!-- Add Button -->
<ToggleButton x:Name="AddBtn"
+72 -27
View File
@@ -35,6 +35,10 @@ Public Class StartMachPanelVM
Return m_SelStart
End Get
Set(value As StartEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelStart))
Return
End If
m_SelStart = value
EgtDeselectAll()
If Not IsNothing(value) Then
@@ -293,6 +297,18 @@ Public Class StartMachPanelVM
End Get
End Property
Private m_StartList_IsEnabled As Boolean = False
Public ReadOnly Property StartList_IsEnabled As Boolean
Get
Return If(m_StartList.Count > 0, m_StartList_IsEnabled, False)
End Get
End Property
Friend Sub SetStartListIsEnabled(bValue As Boolean)
m_StartList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(StartList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d
@@ -304,6 +320,8 @@ Public Class StartMachPanelVM
End Get
End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip"
Public ReadOnly Property Point_ToolTip As String
@@ -458,6 +476,8 @@ Public Class StartMachPanelVM
SelStart = m_StartList(0)
NotifyPropertyChanged(NameOf(SelStart))
End If
' abilito lista start mach
SetStartListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
@@ -481,16 +501,33 @@ Public Class StartMachPanelVM
' seleziono percorso corrente
EgtDeselectAll()
EgtSelectObj(m_SelStart.nId)
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True
End Function
Friend Sub UpdateUI()
' se attiva operazione in piu' passaggi, esco
If Map.refSceneHostVM.MainController.GetContinue() Then Return
Dim NewEntity As StartEntity = Nothing
' se finita creazione curva (è stata chiusa)
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE,
Controller.CMD.MOVE, Controller.CMD.ROTATE
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Select
' riabilito interfaccia
ManageInterface(True)
' se finita creazione curva
If bIsCreatingPath Then
m_bIsCreatingPath = False
Dim NewEntity As StartEntity = Nothing
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewStartLayerId)
Dim NewGeomType As GDB_TY = EgtGetType(nNewEntityId)
@@ -503,37 +540,22 @@ Public Class StartMachPanelVM
NewEntityType = StartMachTypes.COMPO
End Select
EgtSetName(nNewEntityId, START_GEOM)
' coloro l'entita' di rosso
Dim c3Red As Color3d
c3Red.FromColor(System.Drawing.Color.Red)
EgtSetColor(nNewEntityId, c3Red)
' resetto colore entita'
EgtResetColor(nNewEntityId)
' lo sposto nel layer degli start
EgtRelocateGlob(nNewEntityId, m_nStartMachLayerId, GDB_POS.LAST_SON)
' lo aggiungo alla lista
NewEntity = New StartEntity(nNewEntityId, NewEntityType)
m_StartList.Add(NewEntity)
' cancello layer di disegno
EgtErase(nNewStartLayerId)
' lo seleziono
SelStart = NewEntity
NotifyPropertyChanged(NameOf(SelStart))
End If
' cancello layer di disegno
EgtErase(nNewStartLayerId)
End If
' aggiorno posizione
RefreshPos()
' se aggiunta entita'
If Not IsNothing(NewEntity) Then
SelStart = NewEntity
NotifyPropertyChanged(NameOf(SelStart))
End If
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
Select Case command
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE,
Controller.CMD.MOVE, Controller.CMD.ROTATE
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
End Sub
Friend Sub OnKeyDown(Key As Forms.Keys)
@@ -550,6 +572,12 @@ Public Class StartMachPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
ManageInterface(True)
End If
End If
End Sub
@@ -565,6 +593,18 @@ Public Class StartMachPanelVM
End If
End Sub
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetStartListIsEnabled(bValue)
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -588,13 +628,13 @@ Public Class StartMachPanelVM
''' </summary>
Public Sub Point(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
ManageInterface(False)
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewStartLayerId, LAY_NEWSTART)
End If
EgtSetCurrPartLayer(m_nPartId, nNewStartLayerId)
'InitCommand(True)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.POINT) Then
m_bIsCreatingPath = True
End If
@@ -621,7 +661,8 @@ Public Class StartMachPanelVM
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
ManageInterface(False)
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewStartLayerId, LAY_NEWSTART)
@@ -888,6 +929,7 @@ Public Class StartMachPanelVM
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -912,6 +954,7 @@ Public Class StartMachPanelVM
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -952,6 +995,7 @@ Public Class StartMachPanelVM
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1012,6 +1056,7 @@ Public Class StartMachPanelVM
End If
NotifyPropertyChanged(NameOf(SelStart))
End If
SetStartListIsEnabled(True)
End Sub
#End Region ' Delete
+2 -2
View File
@@ -264,7 +264,7 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="FMin"
<!--<DataGridTextColumn Header="FMin"
Binding="{Binding sFMin}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
@@ -276,7 +276,7 @@
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
</DataGridTextColumn>-->
<DataGridTextColumn Binding="{Binding sFTrg}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
+1 -1
View File
@@ -337,7 +337,7 @@ Public Class TFSEditorVM
Public ReadOnly Property Seconds_Msg As String
Get
Return "s"
Return "min:s"
End Get
End Property
+1 -1
View File
@@ -58,7 +58,7 @@
<ToggleButton x:Name="ModifyBtn"
Grid.Column="2"
Grid.Row="1"
Content="{Binding SelectedItem.sName, ElementName=ModifyModeListBox}"
Content="{Binding SelModifyModeName}"
IsChecked="{Binding bModify_IsChecked}"
Margin="2.5,0,2.5,0"
Style="{StaticResource TopPanel_Modify_ToggleButton}">
+30 -1
View File
@@ -121,6 +121,7 @@ Public Class TopPanelVM
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.NULL)
NotifyPropertyChanged(NameOf(SelModifyMode))
End If
NotifyPropertyChanged(NameOf(SelModifyModeName))
' chiudo il popup
SetModifyIsChecked(False)
End Set
@@ -128,8 +129,15 @@ Public Class TopPanelVM
Friend Sub SetSelModifyMode(ModifyMode As ModifyModes)
SelModifyMode = m_ModifyModeList.FirstOrDefault(Function(x) x.ModifyMode = ModifyMode)
NotifyPropertyChanged(NameOf(SelModifyMode))
NotifyPropertyChanged(NameOf(SelModifyModeName))
End Sub
Public ReadOnly Property SelModifyModeName As String
Get
Return If(Not IsNothing(m_SelModifyMode) AndAlso m_SelModifyMode.ModifyMode <> ModifyModes.NULL, m_SelModifyMode.sName, "Modify")
End Get
End Property
Private m_bModify_IsChecked As Boolean
Public Property bModify_IsChecked As Boolean
Get
@@ -266,7 +274,27 @@ Public Class TopPanelVM
WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, value.sGUID.ToString())
' imposto selezionata come corrente
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))
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
m_SelMachining = value
@@ -744,7 +772,8 @@ Public Class TopPanelVM
Public Sub Machining()
If IsNothing(m_SelPart) OrElse IsNothing(CurrMachining) Then Return
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
End If
SelPage = Pages.CURRMACHINING
+31 -8
View File
@@ -79,6 +79,14 @@ Public Module CurrentMachine
End Get
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"
Sub InitCurrentMachine(sMachinesRootDir As String, sMachineName As String)
@@ -97,6 +105,8 @@ Public Module CurrentMachine
m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini"
' impostazione cartella materiali
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
Dim DisableMgr As New DisableModifiedMgr
' recupero box macchina
@@ -147,20 +157,26 @@ Public Module CurrentMachine
End Sub
Public Sub UpdateExtrusionArea()
Dim DisableMgr As New DisableModifiedMgr
' recupero eventuale vecchia area di estrusione
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
If nExtrusionAreaId <> GDB_ID.NULL Then
' e la cancello
EgtErase(nExtrusionAreaId)
End If
If nExtrusionAreaId <> GDB_ID.NULL Then EgtErase(nExtrusionAreaId)
Dim nExtrusionRectId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_RECT)
If nExtrusionRectId <> GDB_ID.NULL Then EgtErase(nExtrusionRectId)
' se lavorazione corrente nulla, esco
If IsNothing(Map.refTopPanelVM.CurrMachining) Then Return
If IsNothing(Map.refTopPanelVM.CurrMachining) Then
DisableMgr.ReEnable()
Return
End If
' se non esiste file dati macchina, esco
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then Return
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then
DisableMgr.ReEnable()
Return
End If
' recupero tipo di slice
Dim sExtrusionType As String
Dim sExtrusionType As String = S_VERTICAL
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
Dim SlicingTypeValue As Machining.MPAR_SLICINGTYPE = SlicingTypeParam.SelValue.Id
@@ -178,12 +194,19 @@ Public Module CurrentMachine
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
nExtrusionAreaId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
Const AREA_WIDTH As Double = 10
Dim nAuxRectId As Integer = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin - AREA_WIDTH, dExtrYMin - AREA_WIDTH, 0), New Point3d(dExtrXMax + AREA_WIDTH, dExtrYMax + AREA_WIDTH, 0))
nExtrusionRectId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
nExtrusionAreaId = EgtCreateSurfTmByRegion( nTabLayerId, { nAuxRectId, nExtrusionRectId}, EPS_STM)
EgtErase( nAuxRectId)
Dim c3Temp As New Color3d
c3Temp.FromColor(System.Drawing.Color.Lime)
EgtSetColor(nExtrusionAreaId, c3Temp)
EgtSetName(nExtrusionAreaId, EXTRUSION_AREA)
EgtSetColor(nExtrusionRectId, c3Temp)
EgtSetName(nExtrusionRectId, EXTRUSION_RECT)
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
DisableMgr.ReEnable()
EgtDraw()
End Sub
+148 -202
View File
@@ -3,7 +3,6 @@
xmlns:PrintApp="clr-namespace:Icarus"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtWPFLib48="clr-namespace:EgtWPFLib48;assembly=EgtWPFLib48"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
>
@@ -52,7 +51,6 @@
<PrintApp:MachineViewPanelVM x:Key="MachineViewPanelVM"/>
<!--<PrintApp:ModifyPartPanelVM x:Key="ModifyPartPanelVM"/>-->
<PrintApp:ManagePartPanelVM x:Key="ManagePartPanelVM"/>
<PrintApp:HelpPanelVM x:Key="HelpPanelVM"/>
<!--<EgtBEAMWALL:CALCPanelVM x:Key="CALCPanelVM"/>
<EgtBEAMWALL:PartParametersVM x:Key="PartParametersVM"/>
<EgtBEAMWALL:LeftPanelVM x:Key="LeftPanelVM"/>
@@ -933,7 +931,15 @@
<Style x:Key="ParameterList_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource BaseTextBox}">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
</Style>
<Style x:Key="ColorPicker_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource BaseTextBox}">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Width" Value="65"/>
</Style>
<Style x:Key="ParameterList_TextBox2" TargetType="{x:Type EgtWPFLib5:EgtTextBox2}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox2}}">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="ExplicitUpdateSource" Value="EnterKeyPressOrLostFocus"/>
@@ -4191,70 +4197,81 @@
Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding AboutBoxCommand}"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource AboutBox_Button}">
<Image Source="{TemplateBinding Icon}"
Style="{StaticResource Button_Image}"/>
<Image Source="{TemplateBinding Icon}"/>
</Button>
<ContentPresenter Grid.Column="1"
Content="{TemplateBinding TitlePanel}"
VerticalAlignment="Center"/>
<TextBlock Text="{TemplateBinding ProjectName}"
ToolTip="{TemplateBinding ProjectPath}"
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ContentPresenter Content="{TemplateBinding TitlePanel}"
VerticalAlignment="Center"/>
<TextBlock Text="{TemplateBinding ProjectName}"
ToolTip="{TemplateBinding ProjectPath}"
Grid.Column="1"
TextTrimming="CharacterEllipsis"
FontSize="14"
VerticalAlignment="Center"
Background="{StaticResource Icarus_Gray}"
Padding="5,2,5,3"
Margin="10,0,0,0"
Foreground="White"/>
<TextBlock x:Name="PART_MoveRectangle"
Text="{TemplateBinding Title}"
Grid.Column="2"
TextTrimming="CharacterEllipsis"
HorizontalAlignment="Stretch"
FontSize="14"
TextAlignment="Center"
VerticalAlignment="Center"
Width="Auto"
Foreground="{StaticResource Icarus_Gray}"
Panel.ZIndex="0"/>
</Grid>
<Grid x:Name="WindowControlsGrid"
Grid.Column="2"
Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="MinimizeButton"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Minimize.png"/>
</Button>
<Button x:Name="MaximizeButton"
Grid.Column="1"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Maximize.png"/>
</Button>
<Button x:Name="RestoreButton"
Grid.Column="1"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}"
Visibility="Collapsed">
<Image Source="\Resources\Common\Restore.png"/>
</Button>
<Button x:Name="CloseButton"
Grid.Column="2"
TextTrimming="CharacterEllipsis"
FontSize="14"
VerticalAlignment="Center"
Background="{StaticResource Icarus_Gray}"
Padding="5,2,5,3"
Margin="10,0,0,0"
Foreground="White"/>
<TextBlock x:Name="PART_MoveRectangle"
Text="{TemplateBinding Title}"
Grid.Column="3"
TextTrimming="CharacterEllipsis"
HorizontalAlignment="Stretch"
FontSize="14"
TextAlignment="Center"
VerticalAlignment="Center"
Width="Auto"
Foreground="{StaticResource Icarus_Gray}"
Panel.ZIndex="0"/>
<Button x:Name="MinimizeButton"
Grid.Column="4"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Minimize.png"/>
</Button>
<Button x:Name="MaximizeButton"
Grid.Column="5"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Maximize.png"/>
</Button>
<Button x:Name="RestoreButton"
Grid.Column="5"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}"
Visibility="Collapsed">
<Image Source="\Resources\Common\Restore.png"/>
</Button>
<Button x:Name="CloseButton"
Grid.Column="6"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Command="{TemplateBinding CloseCommand}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Close.png"/>
</Button>
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Command="{TemplateBinding CloseCommand}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Close.png"/>
</Button>
</Grid>
</Grid>
<Grid x:Name="PART_MainContentGrid"
Grid.Row="1"
@@ -4319,9 +4336,6 @@
Height="{StaticResource WindowBorder_Height}"
x:Name="topLeft" />
</Grid>
<Grid Panel.ZIndex="20">
<ContentPresenter Content="{TemplateBinding HelpPanel}"/>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="WindowState" Value="Maximized">
@@ -4403,7 +4417,8 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{TemplateBinding Title}"
<TextBlock x:Name="PART_MoveRectangle"
Text="{TemplateBinding Title}"
Grid.Column="1"
TextTrimming="CharacterEllipsis"
HorizontalAlignment="Stretch"
@@ -4434,143 +4449,52 @@
</Setter>
</Style>
<Style x:Key="Help_Window" TargetType="{x:Type EgtWPFLib5:EgtMainWindow}">
<Setter Property="Background" Value="White"/>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!--EgtHexagon-->
<PrintApp:HexClipConverter x:Key="ClipConverter"/>
<Style TargetType="{x:Type PrintApp:EgtHexItem}" x:Key="EgtHexItem">
<Setter Property="Background" Value="CornflowerBlue"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="MinHeight" Value="320"/>
<Setter Property="MinWidth" Value="480"/>
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/>
<Setter Property="Title" Value="{Binding Title}"/>
<Setter Property="BorderThickness" Value="1.5"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgtWPFLib5:EgtMainWindow}">
<Grid Background="Transparent" x:Name="WindowRoot">
<Border x:Name="ResizeBorder"
BorderBrush="{StaticResource Icarus_Gray}"
BorderThickness="{StaticResource WindowBorder_Thickness}">
<Grid x:Name="LayoutRoot"
Background="{TemplateBinding Background}">
<Grid.RowDefinitions>
<RowDefinition Height="{StaticResource TitleBarHeight}"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ControlTemplate TargetType="PrintApp:EgtHexItem">
<Grid Name="hexBorder" Background="{TemplateBinding BorderBrush}">
<Grid.Clip>
<MultiBinding Converter="{StaticResource ClipConverter}">
<Binding Path="ActualWidth" ElementName="hexBorder"/>
<Binding Path="ActualHeight" ElementName="hexBorder"/>
<Binding Path="Orientation" RelativeSource="{RelativeSource TemplatedParent}"/>
</MultiBinding>
</Grid.Clip>
<!--TitleBar-->
<Grid x:Name="PART_HeaderBar"
Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Name="hexContent"
Background="{TemplateBinding Background}"
Margin="{TemplateBinding BorderThickness}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Grid.Clip>
<MultiBinding Converter="{StaticResource ClipConverter}">
<Binding Path="ActualWidth" ElementName="hexContent"/>
<Binding Path="ActualHeight" ElementName="hexContent"/>
<Binding Path="Orientation" RelativeSource="{RelativeSource TemplatedParent}"/>
</MultiBinding>
</Grid.Clip>
<Button Command="{Binding AboutBoxCommand}"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource AboutBox_Button}">
<Image Source="{TemplateBinding Icon}"/>
</Button>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="PART_MoveRectangle"
Text="{TemplateBinding Title}"
Grid.Column="2"
TextTrimming="CharacterEllipsis"
HorizontalAlignment="Stretch"
FontSize="14"
TextAlignment="Center"
VerticalAlignment="Center"
Width="Auto"
Foreground="{StaticResource Icarus_Gray}"
Panel.ZIndex="0"/>
</Grid>
<Grid x:Name="WindowControlsGrid"
Grid.Column="2"
Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="CloseButton"
Grid.Column="2"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Command="{TemplateBinding CloseCommand}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Close.png"/>
</Button>
</Grid>
</Grid>
<Grid x:Name="PART_MainContentGrid"
Grid.Row="1"
Panel.ZIndex="10">
<ContentPresenter x:Name="PART_MainContentPresenter"/>
</Grid>
</Grid>
</Border>
<!-- Resize grid to be inserted here -->
<Grid x:Name="PART_ResizeGrid">
<Rectangle x:Name="top"
Height="{StaticResource WindowBorder_Height}"
VerticalAlignment="Top"
Fill="Transparent"
Stroke="{x:Null}"
Margin="5,0,5,0" />
<Rectangle x:Name="bottom"
Height="{StaticResource WindowBorder_Height}"
VerticalAlignment="Bottom"
Fill="Transparent"
Stroke="{x:Null}"
Margin="5,0,5,0" />
<Rectangle x:Name="left"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Left"
Fill="Transparent"
Stroke="{x:Null}"
Margin="0,5,0,5"/>
<Rectangle x:Name="right"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Right"
Fill="Transparent"
Stroke="{x:Null}"
Margin="0,5,0,5"/>
<Rectangle x:Name="bottomLeft"
Height="{StaticResource WindowBorder_Height}"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Fill="Transparent"
Stroke="{x:Null}"/>
<Rectangle x:Name="bottomRight"
Height="{StaticResource WindowBorder_Height}"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Fill="Transparent"
Stroke="{x:Null}"/>
<Rectangle x:Name="topRight"
Height="{StaticResource WindowBorder_Height}"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Fill="Transparent"
Stroke="{x:Null}"/>
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
HorizontalAlignment="Left"
Width="{StaticResource WindowBorder_Height}"
VerticalAlignment="Top"
Height="{StaticResource WindowBorder_Height}"
x:Name="topLeft" />
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
ClipToBounds="True"
Margin="{TemplateBinding Padding}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"/>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="WindowState" Value="Maximized">
<Setter TargetName="ResizeBorder" Property="BorderThickness" Value="0"/>
<Trigger Property="IsSelected" Value="True">
<Setter Property="BorderBrush" Value="Gold"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -4578,6 +4502,39 @@
</Setter>
</Style>
<!--HexList-->
<Style TargetType="{x:Type PrintApp:EgtHexList}" x:Key="EgtHexList">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<PrintApp:EgtHexagon ColumnCount="{Binding Path=ColumnCount, RelativeSource={RelativeSource AncestorType=ListBox}}"
RowCount="{Binding Path=RowCount, RelativeSource={RelativeSource AncestorType=ListBox}}"
Background="{Binding Path=Background, RelativeSource={RelativeSource AncestorType=ListBox}}"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type PrintApp:EgtHexList}">
<Grid>
<Border BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<ScrollViewer Focusable="False"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
Padding="{TemplateBinding Padding}">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</ScrollViewer>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!--EgtMainWindow-->
@@ -4838,17 +4795,6 @@
</Style>
-->
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- Help -->
<Style x:Key="TopBar_HelpButton" TargetType="{x:Type Grid}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
</ResourceDictionary>
-24
View File
@@ -35,8 +35,6 @@ Module Map
Private m_refManagePartPanelVM As ManagePartPanelVM
Private m_refMachineViewPanelVM As MachineViewPanelVM
Private m_refImportLoadingWndVM As ImportLoadingWndVM
Private m_refHelpPanelVM As HelpPanelVM
Private m_refHelpWndVM As HelpWndVM
#Region "Get"
@@ -249,18 +247,6 @@ Module Map
End Get
End Property
Public ReadOnly Property refHelpPanelVM As HelpPanelVM
Get
Return m_refHelpPanelVM
End Get
End Property
Public ReadOnly Property refHelpWndVM As HelpWndVM
Get
Return m_refHelpWndVM
End Get
End Property
#End Region ' Get
#Region "Set"
@@ -429,16 +415,6 @@ Module Map
Return Not IsNothing(m_refImportLoadingWndVM)
End Function
Friend Function SetRefHelpPanelVM(HelpPanelVM As HelpPanelVM) As Boolean
m_refHelpPanelVM = HelpPanelVM
Return Not IsNothing(m_refHelpPanelVM)
End Function
Friend Function SetRefHelpWndVM(HelpWndVM As HelpWndVM) As Boolean
m_refHelpWndVM = HelpWndVM
Return Not IsNothing(m_refHelpWndVM)
End Function
#End Region ' Set
#Region "Init"
@@ -150,8 +150,8 @@ Public Class ViewLayer
End Sub
Friend Sub UpdateVisibility(bIsVisible As Boolean)
' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr ' se solidi
Dim DisableMgr As New DisableModifiedMgr
' se solidi
If m_Type = ViewLayerType.SOLID_SLICE Then
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
' aggiorno parametro di calcolo solidi sui pezzi
@@ -242,7 +242,6 @@ Public Class ViewLayer
Next
Next
End If
' Ripristino stato segnalazione modifica
DisableMgr.ReEnable()
End Sub