Compare commits

..

186 Commits

Author SHA1 Message Date
Emmanuele Sassi 056a3f009b Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-08-19 12:24:56 +02:00
Emmanuele Sassi 51ad8f4c0a - introdotto ColumnChooser
- aggiunta gestione messaggi per componenti DevExpress
2026-08-19 12:24:53 +02:00
Demetrio Cassarino 5154f2e379 -inizio spostamento dbutelnsili e attrezzaggio da finestra a pagina 2026-08-13 15:15:39 +02:00
Demetrio Cassarino 5041aeafcb -piccola modifica pulsnti scena assemblato 2026-08-12 16:41:03 +02:00
Demetrio Cassarino 4d3b6f192c -sistemato stile colore borderbrush in optimizerpanel 2026-08-11 16:49:18 +02:00
Emmanuele Sassi 2a148d350c Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-08-11 12:10:38 +02:00
Emmanuele Sassi cd3cf4bf64 - gestito nuovo bottone Dropdown in tabella BTLPart
- sistemati filter e aggiunta possibilita' di mettere e togliere colonne in BTLPartList
- modificato stile e colore OptimizePanel
2026-08-11 12:07:59 +02:00
Demetrio Cassarino b042a6cfe3 -fine modifica colori programma
-aggiunto controllo su apertura finestre strategia e parametri generali
2026-08-11 08:14:24 +02:00
Demetrio Cassarino f7e8dc441d -sistemato colori border
-aggiornato gestione visualizzazione assemblato
2026-08-10 12:45:17 +02:00
Demetrio Cassarino 18a9bd1f32 -inizio pulizia colori 2026-08-10 11:17:51 +02:00
Demetrio Cassarino db2c643630 -aggiunto in assemblato wireframe e linee nascoste 2026-08-10 10:11:23 +02:00
Demetrio Cassarino a41ff0801b Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-08-07 09:12:05 +02:00
Demetrio Cassarino 83e9970c54 -piccoli aggiornameenti grafica strategie 2026-08-07 09:12:01 +02:00
Emmanuele Sassi 13656be1fc - aggiunto EgwSplitButton per gestione Ticket
- eliminati margini negativi da GlobalState in tabella grezzi
- aggiornati EgwRedmineAPI e EgwWPFBaseLib
2026-08-06 18:47:16 +02:00
Emmanuele Sassi 61e124af02 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-08-05 19:52:37 +02:00
Emmanuele Sassi 0e32a15f3b Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-08-05 19:52:32 +02:00
Demetrio Cassarino ab9f90727c -pulizia dizionari optimizer e supervisor 2026-08-05 15:49:56 +02:00
Emmanuele Sassi 9af16ee1d4 - fix posizione icona rotazione in GlobalState del grezzo
- corretto default su fine calcolo verifica con valore utilizzato per grezzi
2026-08-04 16:15:48 +02:00
Demetrio Cassarino 5619e2af37 -corretto stile sfondo per barre in produzione 2026-08-04 13:44:25 +02:00
Demetrio Cassarino 022aeb8595 -piccola modifica in SelectedMachGroup 2026-08-04 11:56:00 +02:00
Demetrio Cassarino 7f4d94376d Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-08-04 11:51:01 +02:00
Demetrio Cassarino 48d498ed2f EgtBEAMWALL 3.1.8.1:
-cambio versione
-ripristinato background per produzione
-pulito dizionario
2026-08-04 11:50:57 +02:00
Emmanuele Sassi 68f501b064 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-08-04 09:45:41 +02:00
Emmanuele Sassi afe74550ff - correzione su bDo della feature nella barra
- riattivazione righe dopo errore di calcolo
- riaggiunte operazioni da fare a fine calcolo tipo salvataggio
- corretta gestione focus tagella grezzi che selezionava due righe aggiungendo una nuova barra
- corretto errore con solido portato in barra
2026-08-04 09:45:38 +02:00
Demetrio Cassarino 6e7f68745e -corretto OnCloseGetDist 2026-07-31 16:54:26 +02:00
Demetrio Cassarino b5388c02b5 -aggiunto background per produzione
-inizio pulizia dizionario
-eliminato immagini inutilizzate
-aggiunto righello in scena assemblato
2026-07-31 16:52:31 +02:00
Demetrio Cassarino 9c159da137 EgtBEAMWALL 3.1.7.8:
-cambio versione
-aggiornato messaggi feedback
2026-07-30 11:56:00 +02:00
Emmanuele Sassi 76165af2e7 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-30 11:43:06 +02:00
Emmanuele Sassi 779afbe2ff - introdotto bottone per ticketmanager 2026-07-30 11:43:02 +02:00
Demetrio Cassarino d079301d7a -pulito codice 2026-07-30 11:27:16 +02:00
Demetrio Cassarino 2625bb4737 -corretto controllo su section in pdf 2026-07-30 10:23:08 +02:00
Demetrio Cassarino fa3cfed5ac Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-30 09:53:22 +02:00
Demetrio Cassarino 9c04a5f011 -sistemato pulsante visualizza archiviati
-cambiato visualizzazione prodmanager
-cambiato gestione active e available strategy
2026-07-30 09:53:17 +02:00
Emmanuele Sassi 2cad0e5db0 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-29 14:03:35 +02:00
Emmanuele Sassi d96b68932f - corretto e semplificato funzionamento UpdateBTL
- corretto nome btl in riga su BTLPartList che non veniva mostrato quando btl importato
- corretto funzionamento selezione ed apertura master in BTLPartList
2026-07-29 14:02:07 +02:00
Demetrio Cassarino 227f289b5a -gestito visibilità pannello optmizer
-gestito assemblato
2026-07-27 11:32:57 +02:00
Demetrio Cassarino 5afe7bf01a EgtBEAMWALL 3.1.7.7:
-cambio versione
-gestito visibilità tabella pparameters
-ripristinato finestra ChangeParameter
-ripristinato FreeContourInput
-aggiornato visualizzazione lista utensili in parametri strategia
2026-07-24 12:15:12 +02:00
Demetrio Cassarino 5db3d10fe4 -aggiornato visualizzazione tabella feature
-aggiunto egtzoom in modifca lunghezza barra
2026-07-23 08:14:55 +02:00
Demetrio Cassarino 9f991c2c55 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-21 14:24:11 +02:00
Demetrio Cassarino a57298e7ad -aggiunto egtdraw in removepart 2026-07-21 14:24:07 +02:00
Emmanuele Sassi 6f78f45664 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-21 13:51:43 +02:00
Emmanuele Sassi e713c03389 - correzioni verifica che bloccava i pezzi gia' in supervisore
- Open project ripristina se selezione del tempo ma al posto di periodo mette ultimo mese per vedere sempre ultimi progetti
- aggiornamento EgwRedmineAPI per compatibilita' con Redmine 6
2026-07-21 13:51:39 +02:00
Demetrio Cassarino 6996586dd5 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-20 13:57:03 +02:00
Demetrio Cassarino 505311b315 -aggiunto controllo su cartella DataGridLayoutFile 2026-07-20 13:56:35 +02:00
Emmanuele Sassi 9197e1294d Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-20 12:45:32 +02:00
Emmanuele Sassi bdf7909381 - modificato MachManaging per evitare che entri in if Siemens quando e' in Tpa
- modifiche per sistemare selezione in BtlPartList
2026-07-20 12:45:28 +02:00
Demetrio Cassarino 338a53eec4 -ripristinato immagine strategia modificata in pezzo 2026-07-17 12:44:34 +02:00
Emmanuele Sassi 52cb5f19ad EgtBEAMWALL 3.1.7.6:
- correzione errore di apertura dettaglio feature sotto BtlPart
- correzione chiusura pagina strategia
- chiusa riga BtlPart se selezionata un'altra
2026-07-17 09:51:55 +02:00
Emmanuele Sassi 70959caf16 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-16 16:52:45 +02:00
Emmanuele Sassi e17392de71 EgtBEAMWALL 3.1.7.5:
- gestiti RedmineUrl e RedmineProject da ini
2026-07-16 16:52:25 +02:00
Demetrio Cassarino 7de59fd9e1 -aggiornato eliminazione parametri INFONGEPART
-gestito riselezione stesso item della tabella
2026-07-16 15:44:49 +02:00
Demetrio Cassarino 18246ddfc7 -aggiunto app.manifest a optmizer 2026-07-16 11:53:15 +02:00
Demetrio Cassarino ffe809cdb2 -ripristinato tooltip pulsanti in btlpartlist 2026-07-16 10:51:22 +02:00
Demetrio Cassarino 06879aaba4 -aggiunto aggiornamento pezzo in feature
-aggiornato finestra updateorappendV
2026-07-16 09:26:14 +02:00
Emmanuele Sassi e557fb0338 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-15 17:14:16 +02:00
Emmanuele Sassi ef74d3a9e7 EgtBEAMWALL 3.1.7.4:
- in apri file modificato per mostrare ultimo mese al posto di un periodo specifico in apertura
- corretta modifica bDo feature con visualizzazione solido
2026-07-15 17:14:13 +02:00
Demetrio Cassarino 4166ecdfa9 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-15 16:49:42 +02:00
Demetrio Cassarino 9223c978ec -rimosso stile per textedit
-aggiornato creazione assemblato in updatebtl
2026-07-15 16:49:36 +02:00
Dario Sassi bf648b14fe Merge branch 'feature/BeamNewParam' into feature/DevExpress-RawPartList 2026-07-15 12:06:46 +02:00
Emmanuele Sassi 789e3c64cc EgtBEAMWALL 3.1.7.3:
- corretto nome cartella OptimizerWindow
- corretto icona finestra ed aggiunto comando di apertura AboutBox
- impostato avvio gestore Redmine in apertura programma solo se notifiche attive
2026-07-15 10:04:32 +02:00
Emmanuele Sassi efe117fbc8 - aggiunto 10 a nProjectType in lancio simulazione per distinguere Aedifica da BeamWall 2026-07-14 16:44:37 +02:00
Emmanuele Sassi 8d36df10f5 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-14 16:00:09 +02:00
Emmanuele Sassi b89941a925 - modifiche per integrazione funzionalita' Redmine di scrittura dati su ini
- modifiche per integrazione badge di Redmine
2026-07-14 16:00:00 +02:00
Demetrio Cassarino 07ee1d5761 EgtBEAMWALL 3.1.7.2:
-rimosso codice inutilizzato
-sistemato grafica visualizzazione tabella feature
2026-07-13 08:57:28 +02:00
Demetrio Cassarino 65cb7280c4 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-09 15:17:06 +02:00
Demetrio Cassarino 68a926e111 -rimosso FocusedRowHandle da BTLPartList e RawPartList
-riprisitinato vecchio PDFViewer
2026-07-09 15:17:02 +02:00
Emmanuele Sassi f2ee4f346d - eliminati nuget DevExpress non utilizzati 2026-07-09 12:57:51 +02:00
Emmanuele Sassi 42dca6acf9 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-07-09 12:15:21 +02:00
Emmanuele Sassi 9313401d5d - aggiunta creazione ticket con EgwRedmineAPI invece che invio mail 2026-07-09 12:15:18 +02:00
Demetrio Cassarino 7d29465398 -sistemato converter in btlpartlist
-aggiornato stampa etichette
2026-07-09 08:29:22 +02:00
Demetrio Cassarino 97c4e66eba .sistemato CANC in RawPart 2026-07-08 16:18:37 +02:00
Demetrio Cassarino 133769af3c -inizio cambio treeview con devexpress 2026-07-08 15:49:29 +02:00
Demetrio Cassarino cdfb91a7ca -sistemato stile tabelle 2026-07-07 10:30:08 +02:00
Emmanuele Sassi 5dc59ff31c - correzione pressione tasto su tabelle per gestione tasto canc
- piccoli miglioramenti grafici
- corretta funzione salvataggio alyout della tabella feature pezzo in barra
2026-07-06 17:23:04 +02:00
Demetrio Cassarino 2b9c50e281 -gestito CANC su BTLPartLIst e RawPartList 2026-07-03 11:13:22 +02:00
Demetrio Cassarino 193a4ded1c Merge commit '586795a26db9dda67249667b7f948ba2e27c231e' into feature/DevExpress-RawPartList 2026-07-02 12:58:59 +02:00
Demetrio Cassarino 586795a26d EgtBEAMWALL 3.1.7.1:
-cambio versione
-aggiornato parametri generali e strategie
2026-07-02 12:56:31 +02:00
Demetrio Cassarino bdae2bb344 -piccola modifica a rawpartlist 2026-07-02 12:03:52 +02:00
Demetrio Cassarino b8d60e3cef -corretto errori merge 2026-06-30 16:50:40 +02:00
Demetrio Cassarino ffcc4ddd49 -ripristinato errore merge 2026-06-30 15:18:40 +02:00
Demetrio Cassarino 918f1c1932 Merge branch 'feature/RipristinoSiemens' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/RipristinoSiemens 2026-06-30 14:38:14 +02:00
Demetrio Cassarino 78356e2bcd Reapply "Merge commit 'bc42b200a1cfac69310501b4e3dc7691a360f440' into feature/DevExpress-RawPartList"
This reverts commit 034c9a6930.
2026-06-30 14:38:10 +02:00
Demetrio Cassarino 973d279d27 Revert "Merge commit 'bc42b200a1cfac69310501b4e3dc7691a360f440' into feature/DevExpress-RawPartList"
This reverts commit 6f5360ca35, reversing
changes made to 79cbcd6a74.
2026-06-30 14:36:54 +02:00
Demetrio Cassarino 5a5be6e417 Revert "Merge branch 'feature/RipristinoSiemens' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/RipristinoSiemens"
This reverts commit d6d1091a0c, reversing
changes made to d0e58adb94.
2026-06-30 14:32:51 +02:00
Demetrio Cassarino d770de472f -corretto merge 2026-06-30 14:29:54 +02:00
Demetrio Cassarino fccd7886b7 -correzione merge 2026-06-30 14:29:54 +02:00
Demetrio Cassarino 56798ba30c -inizio aggiunta pdfviewer devexpress 2026-06-30 14:29:54 +02:00
Demetrio Cassarino fec45afda0 EgtBEAMWALL 3.1.6.2:
-sistemato canc in btlpartlistv
2026-06-30 14:29:53 +02:00
Demetrio Cassarino c9a1ccb11b -aggiunto immagine 2026-06-30 14:26:06 +02:00
Demetrio Cassarino d7e240d21a -aggiornato copytoclipboard in statistic 2026-06-30 14:26:06 +02:00
Demetrio Cassarino 38dfb38250 -sistemato egtmessagebox
-aggoirnato rabella optmizerstatistic
2026-06-30 14:26:06 +02:00
Demetrio Cassarino 7c7cb786ba -sistemato pulsanti in expander btlpartlist
-aggiunto editing in celle pparameters
-aggiunto editing in rawpartlist
-cambiato tabelle statistiche con devexpress
2026-06-30 14:26:06 +02:00
Demetrio Cassarino a94fd12a7b EgtBEAMWALL 3.1.6.1:
-cambio versione
-cambiate le tabelle con devexpress
2026-06-30 14:26:06 +02:00
Emmanuele Sassi 385fd8fdae - creata cartella per config nuove tabelle 2026-06-30 14:25:03 +02:00
Demetrio Cassarino 822ae92b0b -inizio modifica selecteditem in rawpartlist 2026-06-30 14:25:02 +02:00
Demetrio Cassarino f4cbc64b5c -aggiunto stile per colonna e immagine 2026-06-30 14:25:02 +02:00
Demetrio Cassarino af604a996d -sistemato dizionario 2026-06-30 14:25:02 +02:00
Demetrio Cassarino df06b205bd -spostato grafica tabella in dizionario 2026-06-30 14:23:27 +02:00
Demetrio Cassarino 1ec65642c8 EgtBEAMWALL 3.1.5.1:
-cambio versione
-pulizia codice
2026-06-30 14:21:40 +02:00
Emmanuele Sassi 84d54b5a98 - modificata posizione bottoni verifica, cerca e filtro in BTLPartList
- gestita apertura di un singolo dettaglio su nuovi GridControl
- migliorata nuova tabella RawPart
- sistemato popup del RawPart
2026-06-30 14:18:19 +02:00
Emmanuele Sassi 0e58787a85 - sistemata larghezza colonna di calcolo in BTLPartList
- gestito IsEnabled su riga della tabella BTLPartList
2026-06-30 14:16:11 +02:00
Emmanuele Sassi 57a53fa0e8 - inizio trasposizione RawPartList con GridControl 2026-06-30 14:14:51 +02:00
Emmanuele Sassi ec454f8560 EgtBeamWall 3.1.4.5:
- trasformato BTLPartManager in PopupMenu
- aggiunti filtri
- aggiunto filtro SectXMat
- corrette colonne con Check
- commentato vecchio EgwDataGrid
- gestita visibilita' GroupSummary, da utilizzare correttamente
2026-06-30 14:12:25 +02:00
Emmanuele Sassi 21c89d9061 - aggiunte librerie DevExpress e gestione GridControl per BTLPartList 2026-06-30 14:11:06 +02:00
Demetrio Cassarino de6aac3b71 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-06-30 14:06:40 +02:00
Demetrio Cassarino 3451e8f443 Revert "Merge commit 'bc42b200a1cfac69310501b4e3dc7691a360f440' into feature/DevExpress-RawPartList"
This reverts commit 6f5360ca35, reversing
changes made to 79cbcd6a74.
2026-06-30 14:04:01 +02:00
Demetrio Cassarino f313853774 Revert "Merge branch 'feature/RipristinoSiemens' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/RipristinoSiemens"
This reverts commit d6d1091a0c, reversing
changes made to d0e58adb94.
2026-06-30 14:04:01 +02:00
Demetrio Cassarino 9a3b835033 -migliorato gestione active strategy 2026-06-30 14:04:01 +02:00
Demetrio Cassarino c802fb31b7 Revert "Merge commit 'bc42b200a1cfac69310501b4e3dc7691a360f440' into feature/DevExpress-RawPartList"
This reverts commit 6f5360ca35, reversing
changes made to 79cbcd6a74.
2026-06-30 14:00:08 +02:00
Demetrio Cassarino a509520945 Reapply "Merge commit 'bc42b200a1cfac69310501b4e3dc7691a360f440' into feature/DevExpress-RawPartList"
This reverts commit 034c9a6930.
2026-06-30 13:57:23 +02:00
Demetrio Cassarino 034c9a6930 Revert "Merge commit 'bc42b200a1cfac69310501b4e3dc7691a360f440' into feature/DevExpress-RawPartList"
This reverts commit 6f5360ca35, reversing
changes made to 79cbcd6a74.
2026-06-30 13:54:01 +02:00
Demetrio Cassarino 6f5360ca35 Merge commit 'bc42b200a1cfac69310501b4e3dc7691a360f440' into feature/DevExpress-RawPartList 2026-06-30 13:51:50 +02:00
Demetrio Cassarino bc42b200a1 Revert "Merge branch 'feature/RipristinoSiemens' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/RipristinoSiemens"
This reverts commit d6d1091a0c, reversing
changes made to d0e58adb94.
2026-06-30 13:50:34 +02:00
Emmanuele Sassi d6d1091a0c Merge branch 'feature/RipristinoSiemens' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/RipristinoSiemens 2026-06-30 13:15:49 +02:00
Demetrio Cassarino d0e58adb94 -migliorato gestione active strategy 2026-06-30 12:41:26 +02:00
Demetrio Cassarino 79cbcd6a74 Merge commit 'd760af177008ea70904661d02dcef5548c36855a' into feature/DevExpress-RawPartList 2026-06-30 08:51:18 +02:00
Demetrio Cassarino d760af1770 -aggiunto controllo in edita pezzo
-aggiunto controllo in modifica macchina
2026-06-30 08:50:58 +02:00
Demetrio Cassarino e56cc58aa4 -aggiunto controlli su edit 2026-06-29 16:55:17 +02:00
Demetrio Cassarino d46916bdfd Merge commit 'df825b9070414602bc48a75504af2da68c4d5bcb' into feature/DevExpress-RawPartList 2026-06-29 12:53:59 +02:00
Demetrio Cassarino df825b9070 -aggiornato funzione chiusura programma 2026-06-29 12:52:47 +02:00
Demetrio Cassarino 8162c09ec0 Merge commit 'd473c7ad886edd8d1b825942d37a6778837f45fb' into feature/DevExpress-RawPartList 2026-06-29 11:18:47 +02:00
Demetrio Cassarino d473c7ad88 -aggiunto controllo su configurationpage
-aggiornato gestione index strategie
2026-06-29 11:18:18 +02:00
Demetrio Cassarino 365dc15127 -aggiunto controllo modifica configurazione strategie in chiusura programma
-spostato pulsante aggiorna strategie
2026-06-26 12:54:55 +02:00
Demetrio Cassarino feb9f517e7 -corretto merge 2026-06-26 12:02:01 +02:00
Demetrio Cassarino 2eed87fbe8 Merge commit 'cdf740cba7080760f7c88a112dd619bc8a9deb9c' into feature/DevExpress-RawPartList 2026-06-26 08:19:14 +02:00
Demetrio Cassarino cdf740cba7 -sistemato pulsante salva su configurazione
-aggiunto parametri strategie per lettura lingua
2026-06-25 12:40:08 +02:00
Emmanuele Sassi b885b7d598 - aggiunta lettura file messaggi automatismo 2026-06-25 10:50:43 +02:00
Emmanuele Sassi 113cbe0710 Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList 2026-06-25 10:41:54 +02:00
Emmanuele Sassi 1c0d81852b - creata cartella per config nuove tabelle 2026-06-25 10:41:46 +02:00
Demetrio Cassarino 15c919b0c6 EgtBEAMWALL 3.1.6.4:
-cambiato immagine bottone verifica tutti con rotazione
-aggiunto pulsante aggiorna feature strategie in configurazione
2026-06-24 11:50:43 +02:00
Demetrio Cassarino fb7a7fcb2a EgtBEAMWALL 3.1.6.3:
-aggiunto ordinamento strategie per nIndexInList
-ripristinato valori in tabelle
2026-06-19 15:13:25 +02:00
Demetrio Cassarino 8b69683620 -corretto salvataggio json strategie con ordinamento 2026-06-18 11:28:18 +02:00
Demetrio Cassarino 75340d15cf -correzione merge 2026-06-18 10:26:31 +02:00
Demetrio Cassarino 10ed5c3fd9 -inizio aggiunta pdfviewer devexpress 2026-06-18 10:25:55 +02:00
Demetrio Cassarino 4e42c09b82 -aggiunto messaggio di errore di chiusura software con cam5 aperto
-aggiunto ordine strategie
2026-06-16 09:37:42 +02:00
Demetrio Cassarino 096b9a5933 EgtBEAMWALL 3.1.6.2:
-sistemato canc in btlpartlistv
2026-06-15 15:42:53 +02:00
Demetrio Cassarino 29d68b3d21 EgtBEAMWALL 3.1.6.2:
-aggiornato tasto CANC per btlpart e selbtlfeature
2026-06-12 12:11:28 +02:00
Demetrio Cassarino 6d7b141042 -aggiunto immagine 2026-06-11 10:24:36 +02:00
Demetrio Cassarino 5eefbdad0e -aggiornato copytoclipboard in statistic 2026-06-11 10:24:16 +02:00
Demetrio Cassarino a1221862a4 -sistemato egtmessagebox
-aggoirnato rabella optmizerstatistic
2026-06-10 15:19:47 +02:00
Demetrio Cassarino 9c907c96ce -ripristinato messagebox per errore licenza 2026-06-09 16:07:55 +02:00
Demetrio Cassarino e3c9fdfdf4 -sistemato pulsanti in expander btlpartlist
-aggiunto editing in celle pparameters
-aggiunto editing in rawpartlist
-cambiato tabelle statistiche con devexpress
2026-06-09 16:05:54 +02:00
Demetrio Cassarino 709ccc19dd EgtBEAMWALL 3.1.6.1:
-cambio versione
-aggiunto controllo su parametri generali
2026-06-09 08:41:13 +02:00
Demetrio Cassarino 0642982973 EgtBEAMWALL 3.1.6.1:
-cambio versione
-cambiate le tabelle con devexpress
2026-06-09 08:35:04 +02:00
Demetrio Cassarino 13549a1cf4 Merge branch 'feature/RipristinoSiemens' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/RipristinoSiemens 2026-06-04 07:27:25 +02:00
Demetrio Cassarino 2fda49f4ef -aggiunti controlli su BTLdataWnd e PartParamters 2026-06-04 07:27:21 +02:00
Emmanuele Sassi 04a5b75a0e Merge branch 'feature/RipristinoSiemens' into feature/DevExpress-RawPartList 2026-06-03 16:44:51 +02:00
Emmanuele Sassi 2631033c92 - aggiunta verifica sezioni su apertura magazzino per aggiornare modifiche fatte ai pezzi 2026-06-03 16:35:04 +02:00
Emmanuele Sassi ca6c2ac4a5 Merge branch 'feature/RipristinoSiemens' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/RipristinoSiemens 2026-06-01 18:48:18 +02:00
Emmanuele Sassi 7e668565eb - aggiunto debug ExecProcess
- inizio correzione Parametri pezzo
2026-06-01 18:48:12 +02:00
Demetrio Cassarino 48359ed2bd -aggiornato BTLDataWndV 2026-05-29 17:14:24 +02:00
Demetrio Cassarino 983c7f35fd sistemato commit 2026-05-29 15:54:05 +02:00
Demetrio Cassarino 404dc17b24 EgtBEAMWALL 3.1.5.2:
.aggiunto controlli su rimvuovi pezzo da assemblato
-aggiunto controllo su rotazione in verifica con rotazione
-aggiunto controllo riabilita pulsanti machgroup in resetsupervisor
-aggiunto controlli su aggiungi pezzo in assemblato
-cambio versione
2026-05-29 15:53:24 +02:00
Demetrio Cassarino 86f3dab3ef -inizio modifica selecteditem in rawpartlist 2026-05-28 08:50:47 +02:00
Demetrio Cassarino b367acd06a -aggiunto stile per colonna e immagine 2026-05-27 11:49:34 +02:00
Emmanuele Sassi 272c17c2cb Merge branch 'feature/RipristinoSiemens' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/RipristinoSiemens 2026-05-26 16:26:56 +02:00
Emmanuele Sassi 2917207424 - allargato spazio letto su db302 siemens
- eliminati bottoni macchina su siemens
- aggiunto ResetStep su bottono reset
- aggiunta modalita' remotedebug per Optimizer
2026-05-26 16:26:52 +02:00
Demetrio Cassarino 789e543e3a -aggiunto controllo su removescenepart 2026-05-26 14:01:57 +02:00
Demetrio Cassarino 7e4b8678c4 -sistemato dizionario 2026-05-25 10:36:56 +02:00
Emmanuele Sassi 428c14242a Merge branch 'feature/NewGraphicsProgram' into feature/RipristinoSiemens 2026-05-25 07:49:04 +02:00
Emmanuele Sassi c392165881 Merge remote-tracking branch 'origin/feature/DevExpress' into feature/DevExpress-RawPartList 2026-05-21 09:38:58 +02:00
Emmanuele Sassi d04dde4264 - modificata posizione bottoni verifica, cerca e filtro in BTLPartList
- gestita apertura di un singolo dettaglio su nuovi GridControl
- migliorata nuova tabella RawPart
- sistemato popup del RawPart
2026-05-21 09:28:16 +02:00
Demetrio Cassarino e80b8252ef -spostato grafica tabella in dizionario 2026-05-19 10:16:22 +02:00
Demetrio Cassarino 59644a3329 Merge commit 'b5aae24151c1b66d808f9b5843c15d757c5d53c0' into feature/DevExpress 2026-05-14 16:33:12 +02:00
Demetrio Cassarino 5d7a931f87 Merge commit '377a6cef07e9db542071beccda2d89d6fd52b335' into feature/DevExpress 2026-05-13 15:48:06 +02:00
Demetrio Cassarino 4b9ed93a7a EgtBEAMWALL 3.1.5.1:
-cambio versione
-pulizia codice
2026-05-13 11:26:01 +02:00
Emmanuele Sassi d61104aaab Merge branch 'feature/DevExpress' into feature/DevExpress-RawPartList 2026-05-07 15:57:32 +02:00
Emmanuele Sassi 67944bfdcb Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/DevExpress 2026-05-07 15:35:51 +02:00
Emmanuele Sassi 31dcf81fc2 - gestita simulazione che non permette modifiche quando trave in produzione 2026-05-07 15:28:33 +02:00
Emmanuele Sassi b7ada79678 Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/RipristinoSiemens 2026-05-07 15:20:11 +02:00
Emmanuele Sassi a158df1115 - modifica a comunicazione Siemens per uscire da ciclo di attesa risposta macchina in caso di reset 2026-05-07 15:19:27 +02:00
Emmanuele Sassi b0f7488fd6 Merge branch 'feature/NewGraphicsProgram' into feature/RipristinoSiemens 2026-05-05 11:27:50 +02:00
Emmanuele Sassi 8b871d0c15 Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/RipristinoSiemens 2026-05-05 11:21:09 +02:00
Emmanuele Sassi 01804c5d0d Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/RipristinoSiemens 2026-04-30 14:59:43 +02:00
Emmanuele Sassi 75c02a7625 EgtBEAMWALL.Supervisor 3.1.4.7:
- aggiunta comunicazione con controllo Siemens attraverso Sharp7
2026-04-30 14:58:16 +02:00
Emmanuele Sassi e446f21069 - sistemata larghezza colonna di calcolo in BTLPartList
- gestito IsEnabled su riga della tabella BTLPartList
2026-04-22 13:45:59 +02:00
Emmanuele Sassi 2e2f2dd66d - inizio trasposizione RawPartList con GridControl 2026-04-20 14:43:45 +02:00
Emmanuele Sassi 31b379bb3d - riportato CheckGen su calcolo barre 2026-04-16 16:33:57 +02:00
Emmanuele Sassi f1a8c8912d Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/DevExpress 2026-04-16 16:06:50 +02:00
Emmanuele Sassi 36747a9faa EgtBeamWall 3.1.4.5:
- trasformato BTLPartManager in PopupMenu
- aggiunti filtri
- aggiunto filtro SectXMat
- corrette colonne con Check
- commentato vecchio EgwDataGrid
- gestita visibilita' GroupSummary, da utilizzare correttamente
2026-04-16 16:06:08 +02:00
Emmanuele Sassi 2ae8427be4 Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/DevExpress 2026-04-10 12:19:45 +02:00
Emmanuele Sassi 420af319a1 Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/DevExpress 2026-04-03 10:10:57 +02:00
Emmanuele Sassi 69c58ddbd9 Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/DevExpress 2026-04-03 10:06:51 +02:00
Emmanuele Sassi 6bc913530a Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/DevExpress 2026-04-02 18:35:44 +02:00
Emmanuele Sassi 46548eeeb0 Merge remote-tracking branch 'origin/feature/NewGraphicsProgram' into feature/DevExpress 2026-04-02 17:08:25 +02:00
Emmanuele Sassi f605ba5b84 - aggiunte librerie DevExpress e gestione GridControl per BTLPartList 2026-04-02 17:08:07 +02:00
285 changed files with 12246 additions and 9746 deletions
@@ -163,7 +163,7 @@ Public Class BTLFeatureVM
Public ReadOnly Property CALC_ROT_Visibility As Visibility Public ReadOnly Property CALC_ROT_Visibility As Visibility
Get Get
Return If(m_BTLFeatureM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed) Return If(m_BTLFeatureM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
@@ -155,7 +155,7 @@ Public Module CalcIntegration
Else Else
vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """ " & vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """ " &
"""" & vBar(nCurrBar).nProjType & """ " & """" & vBar(nCurrBar).nProjType & """ " &
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType """" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType & " " & vBar(nCurrBar).nBarState
End If End If
vProc(j).Proc.StartInfo.UseShellExecute = False vProc(j).Proc.StartInfo.UseShellExecute = False
@@ -475,7 +475,7 @@ Public Module CalcIntegration
End Module End Module
Public Class Bar Public Class Bar
Public nBarState As Integer Public nBarState As Integer = -1
Public nBarId As Integer Public nBarId As Integer
Public sBarPath As String Public sBarPath As String
Public bBarOk As Boolean Public bBarOk As Boolean
@@ -8,38 +8,47 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Style="{StaticResource List_StackPanel}"> <StackPanel Orientation="Vertical"
Margin="5,5,5,0">
<GroupBox Header="{Binding CurrentLanguage_Msg}" <GroupBox Header="{Binding CurrentLanguage_Msg}"
Style="{StaticResource Warehouse_GroupBox}"> Margin="0,0,0,5"
Style="{StaticResource Optimizer_GroupBox}">
<UniformGrid Rows="2" <UniformGrid Rows="2"
Style="{StaticResource General_UniformGrid}"> Margin="3">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" <ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}"
SelectedItem="{Binding SelectedLanguage}" SelectedItem="{Binding SelectedLanguage}"
DisplayMemberPath="Name" DisplayMemberPath="Name"
Style="{StaticResource General_ComboBox}"/> Height="25"
Margin="0,0,0,5"
Style="{StaticResource Optmizer_ComboBox}"/>
<TextBlock Text="{Binding LanguageAdvert_Msg}" <TextBlock Text="{Binding LanguageAdvert_Msg}"
Style="{StaticResource General_TextBlock}"/> TextAlignment="Center"
TextWrapping="Wrap"/>
</UniformGrid> </UniformGrid>
</GroupBox> </GroupBox>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<TextBlock Text="{Binding MMUnits_Msg}" <TextBlock Text="{Binding MMUnits_Msg}"
Style="{StaticResource MMUnits_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}" <ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedIndex="{Binding SelMeasureUnit}" SelectedIndex="{Binding SelMeasureUnit}"
Style="{StaticResource UnitMeasureList_ComboBox}"/> Height="25"
Margin="0,5,0,0"
Style="{StaticResource Optmizer_ComboBox}"/>
</UniformGrid> </UniformGrid>
<GroupBox Header="{Binding Nesting_Msg}" <GroupBox Header="{Binding Nesting_Msg}"
Style="{StaticResource Warehouse_GroupBox}"> Margin="0,0,0,5"
Style="{StaticResource Optimizer_GroupBox}">
<StackPanel> <StackPanel>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,5,0,5">
<TextBlock Text="{Binding SectionTime_Msg}"/> <TextBlock Text="{Binding SectionTime_Msg}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"/> Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"/>
</UniformGrid> </UniformGrid>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<TextBlock Grid.Row="1" Text="{Binding PartTime_Msg}"/> <TextBlock Grid.Row="1" Text="{Binding PartTime_Msg}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1" <EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
@@ -48,11 +57,12 @@
</StackPanel> </StackPanel>
</GroupBox> </GroupBox>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<TextBlock Text="{Binding PrintLabel_Msg}" <TextBlock Text="{Binding PrintLabel_Msg}"
Style="{StaticResource MMUnits_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}" <CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
Style="{StaticResource General_CheckBox}"/> Margin="0,5,0,0"/>
</UniformGrid> </UniformGrid>
<GroupBox Header="{Binding BackupRestore_Msg}" <GroupBox Header="{Binding BackupRestore_Msg}"
Style="{StaticResource Optimizer_GroupBox}"> Style="{StaticResource Optimizer_GroupBox}">
@@ -63,33 +73,36 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource General_Grid}"> <Grid Margin="0,2,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox x:Name="ExternalBackup_CheckBox" <CheckBox x:Name="ExternalBackup_CheckBox"
IsChecked="{Binding bExternalBackupActive}" IsChecked="{Binding bExternalBackupActive}"
Style="{StaticResource PParameters_CheckBox}"/> VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding External_Msg}" Text="{Binding External_Msg}"
Style="{StaticResource Ext_TextBlock}"/> VerticalAlignment="Center"/>
</Grid> </Grid>
<Grid Grid.Row="1" <Grid Grid.Row="1"
Style="{StaticResource General_Grid}"> Margin="0,2,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox Text="{Binding ExternalBackupFolderPath}" <TextBox Text="{Binding ExternalBackupFolderPath}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}" IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Style="{StaticResource General_TextBox}"/> Margin="0,0,2.5,0"/>
<Button Grid.Column="1" <Button Grid.Column="1"
Content="..." Content="..."
Foreground="{StaticResource BeamWall_White}"
Command="{Binding ChooseExternalBackupFolderPath_Command}" Command="{Binding ChooseExternalBackupFolderPath_Command}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}" IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Style="{StaticResource General_Button}"/> Foreground="{StaticResource BeamWall_White}"
Height="20"
Width="20"
Margin="2.5,0,0,0"
Style="{StaticResource Optimizer_Button}"/>
</Grid> </Grid>
<Grid Grid.Row="2"> <Grid Grid.Row="2">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -100,39 +113,24 @@
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ReminderList}" ItemsSource="{Binding ReminderList}"
SelectedItem="{Binding SelReminder}" SelectedItem="{Binding SelReminder}"
Style="{StaticResource GeneralConfiguration_ComboBox}" /> Margin="0,0,0,5"
Style="{StaticResource Optmizer_ComboBox}"/>
</Grid> </Grid>
<StackPanel Grid.Row="3" <StackPanel Grid.Row="3"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<Button Content="{Binding Backup_Msg}" <Button Content="{Binding Backup_Msg}"
Command="{Binding Backup_Command}" Command="{Binding Backup_Command}"
Style="{StaticResource MovePartInRawPartWnd_Button}"/> Height="30"
Width="80"
Margin="0,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="{Binding Restore_Msg}" <Button Content="{Binding Restore_Msg}"
Command="{Binding Restore_Command}" Command="{Binding Restore_Command}"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</GroupBox> </GroupBox>
<!--<UniformGrid Columns="2"
Style="{StaticResource GeneralConfiguration_UniformGrid}">
<TextBlock Text="{Binding Import_Msg}"
Style="{StaticResource MMUnits_TextBlock}"/>
<CheckBox IsChecked="{Binding bVerifyImportBTL_IsChecked}"
Style="{StaticResource General_CheckBox}"/>
</UniformGrid>
<GroupBox Header="{Binding Tema_Msg}"
Style="{StaticResource Warehouse_GroupBox}">
<UniformGrid Rows="2"
Style="{StaticResource General_UniformGrid}">
<ComboBox ItemsSource="{Binding Themes, Mode=OneWay}"
SelectedItem="{Binding SelectedTheme}"
DisplayMemberPath="Name"
Style="{StaticResource General_ComboBox}"/>
<TextBlock Text="{Binding TemaAdvert_Msg}"
Style="{StaticResource General_TextBlock}"/>
</UniformGrid>
</GroupBox>-->
</StackPanel> </StackPanel>
</Grid> </Grid>
@@ -14,36 +14,38 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<GroupBox Style="{StaticResource MachineConfiguration_GroupBox}"> <GroupBox Padding="5,10,5,5"
Style="{StaticResource NoHeader_GroupBox}">
<EgtBEAMWALLCORE:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/> <EgtBEAMWALLCORE:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
</GroupBox> </GroupBox>
</StackPanel> </StackPanel>
<StackPanel Grid.Row="1" <StackPanel Grid.Row="1"
Visibility="{Binding MachineParameter_Visibility}" Visibility="{Binding MachineParameter_Visibility}"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<ItemsControl ItemsSource="{Binding ConfigMachTableList}"> <ItemsControl ItemsSource="{Binding ConfigMachTableList}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel x:Name="GroupStackPanel" <StackPanel x:Name="GroupStackPanel"
Style="{StaticResource PartManager_StackPanel}"/> Orientation="Horizontal"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<GroupBox Header="{Binding sName}" <GroupBox Header="{Binding sName}"
Style="{StaticResource MachineParam_GroupBox}"> VerticalAlignment="Top"
Style="{StaticResource Optimizer_GroupBox}">
<ItemsControl Name="MachParamsItemsControl" <ItemsControl Name="MachParamsItemsControl"
ItemsSource="{Binding MachParamList}" ItemsSource="{Binding MachParamList}"
Style="{StaticResource MachinePanel_ItemsControl}"> Margin="0,5,0,0">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Style="{StaticResource Project_WrapPanel}"/> <WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Style="{StaticResource MachParam_Grid}"> <Grid Margin="0,0,5,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
@@ -51,14 +53,18 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
ToolTip="{Binding sName}" ToolTip="{Binding sName}"
Style="{StaticResource MachinePanel_TextBlock}"/> TextWrapping="WrapWithOverflow"
Width="150"
Style="{StaticResource MachParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}" Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Style="{StaticResource MachineConfiguration_TextBox}"/> Width="60"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="{Binding sDescription}" Text="{Binding sDescription}"
ToolTip="{Binding sDescription}" ToolTip="{Binding sDescription}"
Style="{StaticResource Description_TextBlock}"/> TextWrapping="WrapWithOverflow"
Width="148"
Style="{StaticResource MachParam_TextBlock}"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
@@ -73,9 +79,14 @@
Command="{Binding SaveCommand}" Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}" ToolTip="{Binding SaveToolTip}"
Visibility="{Binding Machine_Visibility}" Visibility="{Binding Machine_Visibility}"
Style="{StaticResource SaveMachinePanel_Button}"> HorizontalAlignment="Right"
<Image Source="{StaticResource Save_Image}" VerticalAlignment="Bottom"
Style="{StaticResource BTLDataWnd_Image}"/> Height="50"
Width="50"
Margin="50"
Style="{StaticResource Optimizer_Button}">
<Image Source="/Resources/ProjectManager/Save.png"
Stretch="Uniform"/>
</Button> </Button>
</Grid> </Grid>
+2
View File
@@ -102,6 +102,8 @@ Public Module ConstIni
Public Const K_ENABLE As String = "Enable" Public Const K_ENABLE As String = "Enable"
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities" Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
Public Const K_TEMPLATE As String = "Template" Public Const K_TEMPLATE As String = "Template"
Public Const K_PRINTERMODE As String = "Mode"
Public Const K_NETWORKADDRESS As String = "NetworkAddress"
Public Const S_BEAM_LIST As String = "Beam_List" Public Const S_BEAM_LIST As String = "Beam_List"
Public Const S_WALL_LIST As String = "Wall_List" Public Const S_WALL_LIST As String = "Wall_List"
+3 -3
View File
@@ -56,8 +56,8 @@
<Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwProxy.LiMan.1.0.2408.718\lib\EgwProxy.LiMan.dll</HintPath> <HintPath>..\packages\EgwProxy.LiMan.1.0.2408.718\lib\EgwProxy.LiMan.dll</HintPath>
</Reference> </Reference>
<Reference Include="EgwWPFBaseLib, Version=3.1.1.2, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="EgwWPFBaseLib, Version=3.1.7.3, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwWPFBaseLib.3.1.1.2\lib\EgwWPFBaseLib.dll</HintPath> <HintPath>..\packages\EgwWPFBaseLib.3.1.7.3\lib\EgwWPFBaseLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
@@ -182,7 +182,7 @@
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb"> <Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb">
<DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon> <DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="OptmizerWindow\OptimizerWindow.vb" /> <Compile Include="OptimizerWindow\OptimizerWindow.vb" />
<Compile Include="TitleBar\TitleBarV.xaml.vb"> <Compile Include="TitleBar\TitleBarV.xaml.vb">
<DependentUpon>TitleBarV.xaml</DependentUpon> <DependentUpon>TitleBarV.xaml</DependentUpon>
</Compile> </Compile>
@@ -10,30 +10,32 @@
Width="750" Height="450" Width="750" Height="450"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TabControl> <TabControl>
<TabItem Header="{Binding BasicColor_Msg}"> <TabItem Header="{Binding BasicColor_Msg}">
<Grid Style="{StaticResource EgtColorPicker_Grid}"> <Grid HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColors}" <ListBox ItemsSource="{Binding BasicColors}"
SelectedItem="{Binding SelColor}" SelectedItem="{Binding SelColor}"
Style="{StaticResource EgtColorPicker_ListBox}"> HorizontalAlignment="Center"
BorderThickness="0">
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid Columns="13"/> <UniformGrid Columns="13"/>
@@ -42,7 +44,11 @@
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<Rectangle Fill="{Binding Fill}" <Rectangle Fill="{Binding Fill}"
Style="{StaticResource EgtColorPicker_Rectangle}"/> Stroke="{StaticResource BeamWall_Black}"
StrokeThickness="0.5"
Height="20"
Width="20"
Margin="2"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
<ListBox.ItemContainerStyle> <ListBox.ItemContainerStyle>
@@ -77,14 +83,15 @@
</EgtWPFLib5:EgtHexList> </EgtWPFLib5:EgtHexList>
</TabItem> </TabItem>
<TabItem Header="{Binding ColorPickerTheme_Msg}"> <TabItem Header="{Binding ColorPickerTheme_Msg}">
<Grid Style="{StaticResource EgtColorPicker_Grid}"> <Grid HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColorsTheme}" <ListBox ItemsSource="{Binding BasicColorsTheme}"
SelectedItem="{Binding SelColorTheme}" SelectedItem="{Binding SelColorTheme}"
Style="{StaticResource BasicColor_ListBox}"> BorderThickness="0">
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid Columns="13"/> <UniformGrid Columns="13"/>
@@ -93,7 +100,11 @@
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<Rectangle Fill="{Binding Fill}" <Rectangle Fill="{Binding Fill}"
Style="{StaticResource EgtColorPicker_Rectangle}"/> Stroke="{StaticResource BeamWall_Black}"
StrokeThickness="0.5"
Height="20"
Width="20"
Margin="2"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
<ListBox.ItemContainerStyle> <ListBox.ItemContainerStyle>
@@ -108,14 +119,16 @@
</TabControl> </TabControl>
</Grid> </Grid>
<Grid Grid.Column="1" <Grid Grid.Column="1"
Style="{StaticResource CustomerColor_Grid}"> Margin="5,0,0,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding CustomColor_Msg}" <TextBlock Text="{Binding CustomColor_Msg}"
Style="{StaticResource EgtColorPicker_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
Margin="5,18,5,10"
Style="{StaticResource DialogWindow_TextBlock}"/>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -123,7 +136,9 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ListBox ItemsSource="{Binding CustomColors}" <ListBox ItemsSource="{Binding CustomColors}"
SelectedItem="{Binding SelCustomColor}" SelectedItem="{Binding SelCustomColor}"
Style="{StaticResource CustomerColor_ListBox}"> Background="Transparent"
BorderThickness="0"
HorizontalAlignment="Center">
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid Columns="13"/> <UniformGrid Columns="13"/>
@@ -132,7 +147,11 @@
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<Rectangle Fill="{Binding Fill}" <Rectangle Fill="{Binding Fill}"
Style="{StaticResource EgtColorPicker_Rectangle}"/> Stroke="{StaticResource BeamWall_Black}"
StrokeThickness="0.5"
Height="20"
Width="20"
Margin="2"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
<ListBox.ItemContainerStyle> <ListBox.ItemContainerStyle>
@@ -144,23 +163,29 @@
</ListBox> </ListBox>
</Grid> </Grid>
<Grid Grid.Row="2" <Grid Grid.Row="2"
Style="{StaticResource CurrColor_Grid}"> Margin="0,20,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Style="{StaticResource AddColor_Grid}"> <Grid HorizontalAlignment="Left"
Margin="0,10,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Rectangle Fill="{Binding CurrColor}" <Rectangle Fill="{Binding CurrColor}"
Style="{StaticResource CurrColor_Rectangle}"/> Stroke="{StaticResource BeamWall_Black}"
StrokeThickness="0.5"
Height="70"
Width="100"
Margin="0"/>
<Button Grid.Row="1" <Button Grid.Row="1"
x:Name="SaveColor" x:Name="SaveColor"
Content="{Binding AddCColor_Msg}" Content="{Binding AddCColor_Msg}"
Command="{Binding SaveColor_Command}" Command="{Binding SaveColor_Command}"
Style="{StaticResource EgtColorPicker_TextButton}"/> Height="30"
Margin="0,10,0,0"/>
</Grid> </Grid>
<Grid Grid.Column="1"> <Grid Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -174,45 +199,79 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding Red_Msg}" <TextBlock Text="{Binding Red_Msg}"
Style="{StaticResource RedColor_TextBlock}"/> HorizontalAlignment="Right"
Margin="0,10,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1" <TextBox Grid.Column="1"
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource RedColor_TextBox}"/> IsReadOnly="False"
HorizontalAlignment="Right"
VerticalContentAlignment="Center"
TextAlignment="Center"
Width="65"
Margin="0,5,5,0"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding Green_Msg}" Text="{Binding Green_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/> HorizontalAlignment="Right"
Margin="5,5,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1" <TextBox Grid.Column="1"
Grid.Row="1" Grid.Row="1"
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource GreenColor_TextBox}"/> IsReadOnly="False"
HorizontalAlignment="Right"
VerticalContentAlignment="Center"
TextAlignment="Center"
Width="65"
Margin="5,5,5,0"/>
<TextBlock Grid.Row="2" <TextBlock Grid.Row="2"
Text="{Binding Blu_Msg}" Text="{Binding Blu_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/> HorizontalAlignment="Right"
Margin="5,5,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Row="2" <TextBox Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource GreenColor_TextBox}"/> IsReadOnly="False"
HorizontalAlignment="Right"
VerticalContentAlignment="Center"
TextAlignment="Center"
Width="65"
Margin="5,5,5,0"/>
<TextBlock Grid.Row="3" <TextBlock Grid.Row="3"
Text="{Binding Hexadecimal_Msg}" Text="{Binding Hexadecimal_Msg}"
Style="{StaticResource GreenColor_TextBlock}"/> HorizontalAlignment="Right"
Margin="5,5,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Row="3" <TextBox Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Text="{Binding Hexadecimal}" Text="{Binding Hexadecimal}"
Style="{StaticResource GreenColor_TextBox}"/> IsReadOnly="False"
HorizontalAlignment="Right"
VerticalContentAlignment="Center"
TextAlignment="Center"
Width="65"
Margin="5,5,5,0"/>
</Grid> </Grid>
</Grid> </Grid>
</Grid> </Grid>
</Grid> </Grid>
<UniformGrid Grid.Row="2" <UniformGrid Grid.Row="2"
Rows="1" Rows="1"
Style="{StaticResource EgtColorPicker_UniformGrid}"> Margin="10,10,10,5">
<Button IsDefault="True" <Button IsDefault="True"
Content="OK" Content="OK"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/> Height="24"
Width="64"
Margin="2.5,0,2.5,2"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="Cancel" <Button Content="Cancel"
Command="{Binding Cancel_Command}" Command="{Binding Cancel_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/> Height="24"
Width="64"
Margin="2.5,0,2.5,2"
Style="{StaticResource Optimizer_Button}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtBEAMWALLCORE:OptimizerWindow>
@@ -9,66 +9,86 @@
Height="650" Width="1000" Height="650" Width="1000"
Style="{StaticResource OptimizerWindow.Dialog}"> Style="{StaticResource OptimizerWindow.Dialog}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Command="{Binding GoBack_Command}" <Button Command="{Binding GoBack_Command}"
Style="{StaticResource RightPanel_Button}"> HorizontalAlignment="Right"
<Image Source="{DynamicResource Restore_Image}" BorderBrush="Transparent"
Style="{StaticResource Button_Image}"/> BorderThickness="1"
Height="24"
Width="64"
FontSize="12"
Margin="2.5,0,5,0">
<Image Source="{StaticResource Restore_Image}"
Height="15"
Stretch="Uniform"/>
</Button> </Button>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sSelPath}" Text="{Binding sSelPath}"
Style="{StaticResource EgtManageDialog_TextBlock}"/> HorizontalAlignment="Left"
Margin="5"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ComboBox Grid.Column="2" <ComboBox Grid.Column="2"
ItemsSource="{Binding ViewModeList}" ItemsSource="{Binding ViewModeList}"
SelectedItem="{Binding SelViewMode}" SelectedItem="{Binding SelViewMode}"
Style="{StaticResource EgtManageDialog_ComboBox}"> HorizontalAlignment="Right"
BorderThickness="1"
Height="25"
Width="200"
IsSynchronizedWithCurrentItem="True"
Margin="2.5,5,2.5,5">
<ComboBox.ItemTemplate> <ComboBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal">
<Image Source="{Binding Image}" <Image Source="{Binding Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
<TextBlock Text="{Binding Name}" <TextBlock Text="{Binding Name}"
Style="{StaticResource ComboManageDialog_TextBlock}"/> HorizontalAlignment="Left"
Margin="10,0,0,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
</ComboBox> </ComboBox>
</Grid> </Grid>
<Grid Grid.Row="1" <Grid Grid.Row="1"
Style="{StaticResource AddRawPartWnd_Grid}"> Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="4*"/> <ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TreeView x:Name="FileTree" <TreeView x:Name="FileTree"
ItemsSource="{Binding RootList}" ItemsSource="{Binding RootList}"
Style="{StaticResource EgtManageDialog_TreeView}"> BorderBrush="{StaticResource BeamWall_White}"
FontSize="15"
Margin="10">
<TreeView.Resources> <TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}" <HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
ItemsSource="{Binding TreeItemList_View}"> ItemsSource="{Binding TreeItemList_View}">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal">
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Style="{StaticResource Button_Image}"/> Height="15"
Stretch="Uniform"/>
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/> Style="{StaticResource DialogWindow_TextBlock}"/>
</StackPanel> </StackPanel>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}"> <DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal">
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Style="{StaticResource Button_Image}"/> Height="15"
Stretch="Uniform"/>
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/> Style="{StaticResource DialogWindow_TextBlock}"/>
</StackPanel> </StackPanel>
@@ -83,7 +103,9 @@
</TreeView> </TreeView>
<TabControl Grid.Column="1" <TabControl Grid.Column="1"
SelectedIndex="{Binding nSelTab}" SelectedIndex="{Binding nSelTab}"
Style="{StaticResource EgtManageDialog_TabControl}"> Background="Transparent"
BorderBrush="{StaticResource BeamWall_White}"
BorderThickness="0">
<TabControl.ItemContainerStyle> <TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}"> <Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/> <Setter Property="Visibility" Value="Collapsed"/>
@@ -97,13 +119,15 @@
<ListBox.Resources> <ListBox.Resources>
<DataTemplate x:Key="ListTemplateView" <DataTemplate x:Key="ListTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}"> DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource EgtManageDialog_Grid}"> <Grid Height="20"
Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Style="{StaticResource Button_Image}"/> Height="15"
Stretch="Uniform"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sName}" Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/> Style="{StaticResource DialogWindow_TextBlock}"/>
@@ -111,28 +135,38 @@
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="TilesTemplateView" <DataTemplate x:Key="TilesTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}"> DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource EgtDirectory_Grid}"> <Grid Height="50"
Width="250"
Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Style="{StaticResource Button_Image}"/> Height="15"
Stretch="Uniform"/>
<UniformGrid Grid.Column="1" <UniformGrid Grid.Column="1"
Rows="3" Rows="3"
Style="{StaticResource EgtManageDialog_UniformGrid}"> Margin="2.5,0,2.5,5">
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
TextAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Text="{Binding ghTypeItem}" <TextBlock Text="{Binding ghTypeItem}"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
TextAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Text="{Binding sDimension}" <TextBlock Text="{Binding sDimension}"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
TextAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate x:Key="ContentTemplateView" <DataTemplate x:Key="ContentTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}"> DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Style="{StaticResource ContentTemplate_Grid}"> <Grid Height="50"
Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -144,26 +178,36 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Style="{StaticResource Button_Image}"/> Height="15"
Stretch="Uniform"/>
<UniformGrid Grid.Column="1" <UniformGrid Grid.Column="1"
Rows="2" Rows="2"
Style="{StaticResource EgtManageDialog_UniformGrid}"> Margin="2.5,0,2.5,5">
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
TextAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Text="{Binding ghTypeItem}" <TextBlock Text="{Binding ghTypeItem}"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
TextAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid> </UniformGrid>
<UniformGrid Grid.Column="2" <UniformGrid Grid.Column="2"
Rows="2" Rows="2"
Style="{StaticResource EgtManageDialog_UniformGrid}"> Margin="2.5,0,2.5,5">
<TextBlock Text="{Binding sLastModifyDate}" <TextBlock Text="{Binding sLastModifyDate}"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
TextAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock Text="{Binding sDimension}" <TextBlock Text="{Binding sDimension}"
Style="{StaticResource Info_TextBlock}"/> HorizontalAlignment="Left"
TextAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
<Border Grid.Row="1" <Border Grid.Row="1"
Style="{StaticResource EgtManageDialog_Border}"/> BorderBrush="{StaticResource Border.Static.Alto.Border}"
BorderThickness="1"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ListBox.Resources> </ListBox.Resources>
@@ -207,7 +251,7 @@
<Setter Property="ItemsPanel"> <Setter Property="ItemsPanel">
<Setter.Value> <Setter.Value>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Style="{StaticResource Project_WrapPanel}"/> <WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
@@ -219,7 +263,7 @@
<Setter Property="ItemsPanel"> <Setter Property="ItemsPanel">
<Setter.Value> <Setter.Value>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Style="{StaticResource ProjectH_WrapPanel}"/> <WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
@@ -231,7 +275,8 @@
<Setter Property="ItemsPanel"> <Setter Property="ItemsPanel">
<Setter.Value> <Setter.Value>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Style="{StaticResource EgtManageDialog_StackPanel}"/> <StackPanel Orientation="Vertical"
HorizontalAlignment="Stretch"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
@@ -269,10 +314,13 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}" <Image Source="{Binding sIconSource}"
Style="{StaticResource Source_Image}"/> Height="15"
Stretch="Uniform"
Margin="2.5,0,2.5,0"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sName}" Text="{Binding sName}"
Style="{StaticResource NameImage_TextBlock}"/> VerticalAlignment="Center"
Margin="2.5,0,0,0"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
@@ -313,33 +361,55 @@
</TabControl> </TabControl>
</Grid> </Grid>
<Grid Grid.Row="2" <Grid Grid.Row="2"
Style="{StaticResource AddRawPartWnd_Grid}"> Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding FileName_Msg}" <TextBlock Text="{Binding FileName_Msg}"
Style="{StaticResource FileName_TextBlock}"/> HorizontalAlignment="Right"
Margin="5"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1" <TextBox Grid.Column="1"
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Style="{StaticResource SaveFileName_TextBox}"/> HorizontalAlignment="Stretch"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
TextAlignment="Left"
FontWeight="Normal"
FontFamily="12"
Height="22"
Margin="2.5,2.5,2.5,5"/>
<ComboBox Grid.Column="2" <ComboBox Grid.Column="2"
ItemsSource="{Binding FilterList}" ItemsSource="{Binding FilterList}"
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}" SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
DisplayMemberPath="sNameExstension" DisplayMemberPath="sNameExstension"
Style="{StaticResource FilterList_ComboBox}"/> HorizontalAlignment="Right"
BorderThickness="1"
Height="25"
Width="200"
IsSynchronizedWithCurrentItem="True"
Margin="10,2.5,2.5,5"/>
</Grid> </Grid>
<UniformGrid Grid.Row="3" <UniformGrid Grid.Row="3"
Rows="1" Rows="1"
Style="{StaticResource Command_UniformGrid}"> Margin="2.5,0,2.5,2.5">
<Button IsDefault="True" <Button IsDefault="True"
Content="OK" Content="OK"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
Style="{StaticResource EgtManageDialogOK_HalfRound_Button}"/> HorizontalAlignment="Right"
Height="24"
Width="64"
Margin="15,0,2.5,2"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="Cancel" <Button Content="Cancel"
Command="{Binding Cancel_Command}" Command="{Binding Cancel_Command}"
Style="{StaticResource EgtManageDialogCancel_HalfRound_Button}"/> HorizontalAlignment="Left"
Height="24"
Width="64"
Margin="2.5,0,0,2"
Style="{StaticResource Optimizer_Button}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtBEAMWALLCORE:OptimizerWindow>
@@ -9,12 +9,12 @@
ShowInTaskbar="False" ShowInTaskbar="False"
Style="{StaticResource OptimizerWindow.Dialog}"> Style="{StaticResource OptimizerWindow.Dialog}">
<Grid Style="{StaticResource EgtMessageBox_Grid}"> <Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource MessageBox_Grid}"> <Grid Margin="20">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -22,11 +22,13 @@
<Image Source="{Binding sIconSource}"/> <Image Source="{Binding sIconSource}"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sMessage}" Text="{Binding sMessage}"
Style="{StaticResource EgtMessageBox_TextBlock}"/> Margin="5,0,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid> </Grid>
<ItemsControl Grid.Row="1" <ItemsControl Grid.Row="1"
ItemsSource="{Binding ButtonList}" ItemsSource="{Binding ButtonList}"
Style="{StaticResource EgtMessageBox_ItemsControl}"> HorizontalAlignment="Center"
Margin="0,0,0,10">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid Rows="1"/> <UniformGrid Rows="1"/>
@@ -37,7 +39,10 @@
<Button IsDefault="{Binding bIsDefault}" <Button IsDefault="{Binding bIsDefault}"
Content="{Binding sMessage}" Content="{Binding sMessage}"
Command="{Binding Command_Command}" Command="{Binding Command_Command}"
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/> Height="24"
Width="64"
Margin="2.5,0,2.5,2"
Style="{StaticResource Optimizer_Button}"/>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
@@ -1,5 +1,6 @@
Imports EgtWPFLib5 Imports System.Windows
Imports System.Windows Imports System.Windows.Threading
Imports EgtWPFLib5
Public Class EgtMessageBoxV Public Class EgtMessageBoxV
@@ -25,6 +26,18 @@ Public Class EgtMessageBoxV
#Region "METHODS" #Region "METHODS"
Protected Overrides Sub OnSourceInitialized(e As EventArgs)
MyBase.OnSourceInitialized(e)
Me.WindowStartupLocation = WindowStartupLocation.CenterScreen
End Sub
Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
Dispatcher.BeginInvoke(Sub()
Me.Topmost = True
Me.Activate()
End Sub, DispatcherPriority.ContextIdle)
End Sub
''' <summary> ''' <summary>
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato ''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
''' </summary> ''' </summary>
+16 -6
View File
@@ -23,27 +23,37 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding TotText_Msg}" Text="{Binding TotText_Msg}"
Style="{StaticResource MessageBox_TextBlock}"/> TextAlignment="Center"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<TextBlock Grid.Row="2" <TextBlock Grid.Row="2"
Text="{Binding StepText_Msg}" Text="{Binding StepText_Msg}"
Visibility="{Binding StepText_Visibility}" Visibility="{Binding StepText_Visibility}"
Style="{StaticResource MessageBox_TextBlock}"/> TextAlignment="Center"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<Grid Grid.Row="3" <Grid Grid.Row="3"
Visibility="{Binding StepProgress_Visibility}"> Visibility="{Binding StepProgress_Visibility}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource EgtManageDialog_Grid}"/> <Grid Height="20"
Margin="5,5,5,0"/>
<ProgressBar Grid.Row="1" <ProgressBar Grid.Row="1"
Value="{Binding StepProgress_Value}" Value="{Binding StepProgress_Value}"
Style="{StaticResource NestingRunningWndV_ProgressBar}"/> Minimum="0"
Maximum="100"
Height="20"
Margin="40,0,40,0"/>
</Grid> </Grid>
<ProgressBar Grid.Row="5" <ProgressBar Grid.Row="5"
Value="{Binding TotProgress_Value}" Value="{Binding TotProgress_Value}"
Style="{StaticResource NestingRunningWndV_ProgressBar}"/> Minimum="0"
Maximum="100"
Height="20"
Margin="40,0,40,0"/>
<TextBlock Grid.Row="7" <TextBlock Grid.Row="7"
Text="{Binding TotProgress_Msg}" Text="{Binding TotProgress_Msg}"
Style="{StaticResource MessageBox_TextBlock}"/> TextAlignment="Center"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
</Grid> </Grid>
</EgtWPFLib5:EgtCustomWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -267,13 +267,13 @@ Public MustInherit Class MyMachGroupVM
Public ReadOnly Property CALC_ROT_Visibility As Visibility Public ReadOnly Property CALC_ROT_Visibility As Visibility
Get Get
Return If(MyMachGroupM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed) Return If(MyMachGroupM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
Public ReadOnly Property CALC_FALL_Visibility As Visibility Public ReadOnly Property CALC_FALL_Visibility As Visibility
Get Get
Return If(MyMachGroupM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed) Return If(MyMachGroupM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
@@ -400,7 +400,7 @@ Public MustInherit Class MyMachGroupVM
Get Get
Select Case nProduction_State Select Case nProduction_State
Case ItemState.ND Case ItemState.ND
Return Brushes.White Return Brushes.Transparent ' Brushes.White
Case ItemState.Assigned Case ItemState.Assigned
Return Brushes.LightGray Return Brushes.LightGray
Case ItemState.Confirmed Case ItemState.Confirmed
+3 -3
View File
@@ -319,13 +319,13 @@ Public MustInherit Class PartVM
Public ReadOnly Property CALC_ROT_Visibility As Visibility Public ReadOnly Property CALC_ROT_Visibility As Visibility
Get Get
Return If(m_PartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed) Return If(m_PartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
Public ReadOnly Property CALC_FALL_Visibility As Visibility Public ReadOnly Property CALC_FALL_Visibility As Visibility
Get Get
Return If(m_PartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed) Return If(m_PartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
@@ -468,7 +468,7 @@ Public MustInherit Class PartVM
Get Get
Select Case nProduction_State Select Case nProduction_State
Case ItemState.ND Case ItemState.ND
Return Brushes.White Return Brushes.Transparent ' Brushes.White
Case ItemState.Assigned Case ItemState.Assigned
Return Brushes.LightGray Return Brushes.LightGray
Case ItemState.Confirmed Case ItemState.Confirmed
@@ -8,34 +8,50 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Style="{StaticResource CalcPanel_Grid}"> <Grid Margin="0,0,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="Macchina corrente" <TextBlock Text="Macchina corrente"
Style="{StaticResource CurrMach_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
VerticalAlignment="Center"
Margin="0,0,5,0"/>
<!--Combobox per selezionare la macchina corrente--> <!--Combobox per selezionare la macchina corrente-->
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name" ItemsSource="{Binding Path=MachineList}"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name" SelectedItem="{Binding Path=SelectedMachine}"
Style="{StaticResource CalcPanel_ComboBox}"/> DisplayMemberPath="Name"
SelectedValuePath="Name"
Height="22"
Width="150"
Style="{StaticResource Optmizer_ComboBox}"/>
</Grid> </Grid>
<StackPanel Grid.Column="1" <StackPanel Grid.Column="1"
Style="{StaticResource MachinePanel_StackPanel}"> Orientation="Horizontal"
HorizontalAlignment="Center">
<Button Content="{Binding ToolDBMsg}" <Button Content="{Binding ToolDBMsg}"
ToolTip="{Binding ToolDBToolTip}" ToolTip="{Binding ToolDBToolTip}"
Command="{Binding ToolDbCommand}" Command="{Binding ToolDbCommand}"
Style="{StaticResource GeneralConfiguration_Button}"/> Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="{Binding SetUpMsg}" <Button Content="{Binding SetUpMsg}"
Command="{Binding SetUpCommand}" Command="{Binding SetUpCommand}"
ToolTip="{Binding SetUpToolTip}" ToolTip="{Binding SetUpToolTip}"
Style="{StaticResource GeneralConfiguration_Button}" Visibility="{Binding SetUp_Visibility}"
Visibility="{Binding SetUp_Visibility}"/> Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="{Binding ParameterMachineMsg}" <Button Content="{Binding ParameterMachineMsg}"
ToolTip="{Binding ParameterMachineMsg}" ToolTip="{Binding ParameterMachineMsg}"
Command="{Binding ParameterMachine_Command}" Command="{Binding ParameterMachine_Command}"
Style="{StaticResource ParameterMachine_Button}"/> Height="30"
Width="140"
Margin="5,0,0,0"
Style="{StaticResource Optimizer_Button}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
@@ -38,23 +38,29 @@
Command="{Binding NewCommand}" Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
Style="{StaticResource MachiningDB_Button}"/> Height="30"
Width="64"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="{Binding SaveMsg}" <Button Content="{Binding SaveMsg}"
Command="{Binding SaveCommand}" Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
Style="{StaticResource MachiningDB_Button}"/> Height="30"
Width="64"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="{Binding RemoveMsg}" <Button Content="{Binding RemoveMsg}"
Command="{Binding RemoveCommand}" Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
Style="{StaticResource MachiningDB_Button}"/> Height="30"
Width="64"
Style="{StaticResource Optimizer_Button}"/>
</UniformGrid> </UniformGrid>
<TreeView Grid.Row="1" <TreeView Grid.Row="1"
Name="MachiningsTreeView" Name="MachiningsTreeView"
ItemsSource="{Binding Path=MachiningsList}" ItemsSource="{Binding Path=MachiningsList}"
Style="{StaticResource MachiningDB_TreeView}"> Background="{StaticResource TreeView.Static.Background}">
<TreeView.ItemContainerStyle> <TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}"> <Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
@@ -65,24 +71,29 @@
<TreeView.Resources> <TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" <HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}"
ItemsSource="{Binding Items}"> ItemsSource="{Binding Items}">
<Grid Style="{StaticResource MachiningDB_Grid}"> <Grid Height="20">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="{Binding PictureString}" <Image Source="{Binding PictureString}"
Style="{StaticResource MachiningDB_Image}"/> Height="20"
Width="20"
Margin="0,0,5,0"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding Name}" Text="{Binding Name}"
Style="{StaticResource MachiningDB_TextBlock}"/> VerticalAlignment="Center"
FontSize="15"
Margin="0,-2,5,0"/>
<Ellipse Grid.Column="2" <Ellipse Grid.Column="2"
Fill="{Binding FamilyColor}" Fill="{Binding FamilyColor}"
Style="{StaticResource SetUp_Ellipse}"/> Height="20"
Width="20"/>
</Grid> </Grid>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}"> <DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
<Grid Style="{StaticResource MachiningDB_Grid}"> <Grid Height="20">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -90,10 +101,13 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding NamePar}" Text="{Binding NamePar}"
Style="{StaticResource MachiningDB_TextBlock}"/> VerticalAlignment="Center"
FontSize="15"
Margin="0,-2,5,0"/>
<Ellipse Grid.Column="2" <Ellipse Grid.Column="2"
Fill="{Binding ToolColor}" Fill="{Binding ToolColor}"
Style="{StaticResource SetUp_Ellipse}"/> Height="20"
Width="20"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</TreeView.Resources> </TreeView.Resources>
@@ -103,14 +117,20 @@
Columns="3"> Columns="3">
<Button Content="{Binding ImportMsg}" <Button Content="{Binding ImportMsg}"
Command="{Binding ImportCommand}" Command="{Binding ImportCommand}"
Style="{StaticResource MachiningDB_Button}"/> Height="30"
Width="64"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="{Binding ExportMsg}" <Button Content="{Binding ExportMsg}"
Command="{Binding ExportCommand}" Command="{Binding ExportCommand}"
Style="{StaticResource MachiningDB_Button}"/> Height="30"
Width="64"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="{Binding ResetMsg}" <Button Content="{Binding ResetMsg}"
Command="{Binding ReloadMachiningCommand}" Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"
Style="{StaticResource MachiningDB_Button}"/> Height="30"
Width="64"
Style="{StaticResource Optimizer_Button}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
+3 -3
View File
@@ -17,7 +17,7 @@ Imports System.Windows
<Assembly: AssemblyDescription("")> <Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("Aedifica.Core")> <Assembly: AssemblyProduct("Aedifica.Core")>
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")> <Assembly: AssemblyCopyright("Copyright © 2020-2026 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -38,5 +38,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.5.2")> <Assembly: AssemblyVersion("3.1.8.2")>
<Assembly: AssemblyFileVersion("3.1.5.2")> <Assembly: AssemblyFileVersion("3.1.8.2")>
@@ -24,7 +24,8 @@
<GroupBox Header="{Binding Filters_Msg}" <GroupBox Header="{Binding Filters_Msg}"
Visibility="{Binding Filters_Visibility}" Visibility="{Binding Filters_Visibility}"
Style="{StaticResource NewOpenProjectFile_GroupBox}"> Margin="5"
Style="{StaticResource Optimizer_GroupBox}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -38,21 +39,32 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding BTLDateTypeList}" <ComboBox ItemsSource="{Binding BTLDateTypeList}"
SelectedIndex="{Binding SelBTLDateType}" SelectedIndex="{Binding SelBTLDateType}"
Style="{StaticResource BTLDateTypeList_ComboBox}"/> Height="22"
MinWidth="55"
Width="105"
Margin="5"
Style="{StaticResource Optmizer_ComboBox}"/>
<StackPanel Grid.Column="1" <StackPanel Grid.Column="1"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<ComboBox ItemsSource="{Binding DayTypeList}" <ComboBox ItemsSource="{Binding DayTypeList}"
SelectedIndex="{Binding SelDayType}" SelectedIndex="{Binding SelDayType}"
Style="{StaticResource DayTypeList_ComboBox}"/> Height="22"
Width="105"
Margin="0,0,2.5,0"
Style="{StaticResource Optmizer_ComboBox}"/>
<StackPanel Visibility="{Binding Date_Visibility}" <StackPanel Visibility="{Binding Date_Visibility}"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<TextBlock Text="{Binding From_Msg}" <TextBlock Text="{Binding From_Msg}"
Style="{StaticResource Filter_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
VerticalAlignment="Center"
Margin="2.5,0,2.5,0"/>
<DatePicker SelectedDate="{Binding dtStartDate}" <DatePicker SelectedDate="{Binding dtStartDate}"
CalendarStyle="{StaticResource Filter_Calendar}" CalendarStyle="{StaticResource Filter_Calendar}"
Style="{StaticResource Filter_DatePicker}"/> Style="{StaticResource Filter_DatePicker}"/>
<TextBlock Text="{Binding To_Msg}" <TextBlock Text="{Binding To_Msg}"
Style="{StaticResource Filter_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
VerticalAlignment="Center"
Margin="2.5,0,2.5,0"/>
<DatePicker SelectedDate="{Binding dtEndDate}" <DatePicker SelectedDate="{Binding dtEndDate}"
CalendarStyle="{StaticResource Filter_Calendar}" CalendarStyle="{StaticResource Filter_Calendar}"
Style="{StaticResource Filter_DatePicker}"/> Style="{StaticResource Filter_DatePicker}"/>
@@ -61,7 +73,7 @@
<CheckBox Grid.Column="2" <CheckBox Grid.Column="2"
IsChecked="{Binding bViewArchived}" IsChecked="{Binding bViewArchived}"
Content="{Binding ViewArchived_Msg}" Content="{Binding ViewArchived_Msg}"
Style="{StaticResource PParameters_CheckBox}"/> VerticalAlignment="Center"/>
</Grid> </Grid>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -71,25 +83,35 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding FilterTypeList}" <ComboBox ItemsSource="{Binding FilterTypeList}"
SelectedItem="{Binding SelFilterType}" SelectedItem="{Binding SelFilterType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/> Height="25"
Width="105"
Margin="5"
Style="{StaticResource Optmizer_ComboBox}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SearchText}" Text="{Binding SearchText}"
Visibility="{Binding SearchText_Visibility}" Visibility="{Binding SearchText_Visibility}"
Style="{StaticResource NewSearchText_TextBox}"/> TextWrapping="Wrap"
Margin="5"/>
<StackPanel Grid.Column="2" <StackPanel Grid.Column="2"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<TextBlock Text="{Binding Rows_Msg}" <TextBlock Text="{Binding Rows_Msg}"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<ComboBox ItemsSource="{Binding RowQuantityList}" <ComboBox ItemsSource="{Binding RowQuantityList}"
SelectedIndex="{Binding SelRowQuantity}" SelectedIndex="{Binding SelRowQuantity}"
Style="{StaticResource OpenProjectFileDialog_ComboBox}"/> Height="22"
MinWidth="55"
Style="{StaticResource Optmizer_ComboBox}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>
</GroupBox> </GroupBox>
<Border Grid.Row="1" <Border Grid.Row="1"
Style="{StaticResource NewOpenProjectFileDialog_Border}"/> Margin="1"
Style="{StaticResource Optimizer_Border}"/>
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1" <EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
x:Name="MainDataGrid" x:Name="MainDataGrid"
@@ -125,9 +147,22 @@
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/> <TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
<ToggleButton Grid.Column="1" <ToggleButton Grid.Column="1"
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}" IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource Small_ToggleButton}"> Height="20"
<Image Source="{StaticResource Edit_Image}" Width="20"
Style="{StaticResource Lock_Image}"/> Margin="5,0,0,0">
<Image Source="/Resources/PartManager/Locked.png"
Height="15"
Stretch="Uniform">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsEnabled,RelativeSource={RelativeSource self}}" Value="False">
<Setter Property="Source" Value="/Resources/PartManager/Unlocked.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton> </ToggleButton>
</Grid> </Grid>
</DataGridTextColumn.Header> </DataGridTextColumn.Header>
@@ -148,9 +183,11 @@
<DataGridTemplateColumn x:Key="colARCHIVED"> <DataGridTemplateColumn x:Key="colARCHIVED">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<Image Source="{StaticResource Archived_Image}" <Image Source="\Resources\OpenProjectFileDialog\Archived.png"
Visibility="{Binding Archived_Visibility}" Visibility="{Binding Archived_Visibility}"
Style="{StaticResource Archived_Image}"/> Height="15"
Width="15"
Stretch="UniformToFill"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.Header> <DataGridTemplateColumn.Header>
@@ -167,11 +204,15 @@
</DataGrid.RowStyle> </DataGrid.RowStyle>
<DataGrid.RowDetailsTemplate> <DataGrid.RowDetailsTemplate>
<DataTemplate> <DataTemplate>
<ItemsControl ItemsSource="{Binding ProjFileList}" HorizontalAlignment="Left" Margin="50,-1,0,0" <ItemsControl ItemsSource="{Binding ProjFileList}"
Style="{StaticResource ProjFileList_ItemsControl}"> HorizontalAlignment="Left"
BorderThickness="0"
Padding="0"
Margin="50,-1,0,0">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Style="{StaticResource ProjFileList_Grid}"> <Grid TextBlock.FontWeight="Normal"
TextBlock.FontSize="12">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding Path=DataContext.ProdColumns[0].ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/> <ColumnDefinition Width="{Binding Path=DataContext.ProdColumns[0].ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -181,10 +222,11 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Grid.ColumnSpan="2" <Grid Grid.ColumnSpan="2"
Style="{StaticResource Gray_Grid}"/> Background="{StaticResource BeamWall_Gray}"
Margin="40,0,40,0"/>
<Grid Grid.Column="1" <Grid Grid.Column="1"
Grid.Row="1" Grid.Row="1"
Style="{StaticResource NewOpenProjectFile_Grid}"> Margin="2">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -196,18 +238,21 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}" <TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource OpenWnd_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.DarkGray.Foreground}"
Margin="0,0,20,0"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sBTLFileName}"/> Text="{Binding sBTLFileName}"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding Path=DataContext.ListName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}" Text="{Binding Path=DataContext.ListName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource OpenWnd_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.DarkGray.Foreground}"
Margin="0,0,20,0"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Text="{Binding sListName}"/> Text="{Binding sListName}"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="{Binding Path=DataContext.ExportDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}" Text="{Binding Path=DataContext.ExportDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource OpenWnd_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.DarkGray.Foreground}"
Margin="0,0,20,0"/>
<TextBlock Grid.Column="3" <TextBlock Grid.Column="3"
Text="{Binding dtExportDate}"/> Text="{Binding dtExportDate}"/>
</Grid> </Grid>
@@ -221,22 +266,26 @@
<UniformGrid Grid.Row="2" <UniformGrid Grid.Row="2"
Columns="4" Columns="4"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<Button Name="OpenBtn" <Button Name="OpenBtn"
IsDefault="True" IsDefault="True"
Content="{Binding Open_Msg}" Content="{Binding Open_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Content="{Binding Archive_Msg}" <Button Content="{Binding Archive_Msg}"
Command="{Binding Archive_Command}" Command="{Binding Archive_Command}"
IsEnabled="{Binding bArchived_IsEnabled}" IsEnabled="{Binding bArchived_IsEnabled}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Content="{Binding Delete_Msg}" <Button Content="{Binding Delete_Msg}"
Command="{Binding Delete_Command}" Command="{Binding Delete_Command}"
IsEnabled="{Binding bDelete_IsEnabled}" IsEnabled="{Binding bDelete_IsEnabled}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Command="{Binding Cancel_Command}" <Button Command="{Binding Cancel_Command}"
Content="{Binding Cancel_Msg}" Content="{Binding Cancel_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
@@ -544,7 +544,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_NAME) m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_NAME)
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_ARCHIVED) m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_ARCHIVED)
' leggo valori per filtri ' leggo valori per filtri
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0) Dim IniDayType As DayTypes = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
m_SelDayType = If(IniDayType <> DayTypes.PERIOD, IniDayType, DayTypes.LASTMONTH)
Select Case m_SelDayType Select Case m_SelDayType
Case DayTypes.LASTMONTH Case DayTypes.LASTMONTH
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1) m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
@@ -555,7 +556,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Case DayTypes.LAST6MONTHS Case DayTypes.LAST6MONTHS
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1) m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 6) m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 6)
Case DayTypes.PERIOD Case Else ' DayTypes.LASTMONTH
Dim sStartDate As String = "0" Dim sStartDate As String = "0"
Dim lStartDate As Long = 0 Dim lStartDate As Long = 0
GetMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, 0, sStartDate) GetMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, 0, sStartDate)
@@ -24,7 +24,8 @@
<GroupBox Header="Filters" <GroupBox Header="Filters"
Visibility="{Binding Filters_Visibility}" Visibility="{Binding Filters_Visibility}"
Style="{StaticResource OpenProjectFile_GroupBox}"> BorderBrush="{StaticResource BeamWall_RegentStBlue}"
Margin="5">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -37,21 +38,31 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding BTLDateTypeList}" <ComboBox ItemsSource="{Binding BTLDateTypeList}"
SelectedIndex="{Binding SelBTLDateType}" SelectedIndex="{Binding SelBTLDateType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/> Height="25"
Width="105"
Margin="5"
Style="{StaticResource Optmizer_ComboBox}"/>
<StackPanel Grid.Column="1" <StackPanel Grid.Column="1"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<ComboBox ItemsSource="{Binding DayTypeList}" <ComboBox ItemsSource="{Binding DayTypeList}"
SelectedIndex="{Binding SelDayType}" SelectedIndex="{Binding SelDayType}"
Style="{StaticResource OpenProjectFile_ComboBox}"/> Height="25"
Width="105"
Margin="0,0,2.5,0"
Style="{StaticResource Optmizer_ComboBox}"/>
<StackPanel Visibility="{Binding Date_Visibility}" <StackPanel Visibility="{Binding Date_Visibility}"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<TextBlock Text="{Binding From_Msg}" <TextBlock Text="{Binding From_Msg}"
Style="{StaticResource Filter_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
VerticalAlignment="Center"
Margin="2.5,0,2.5,0"/>
<DatePicker SelectedDate="{Binding dtStartDate}" <DatePicker SelectedDate="{Binding dtStartDate}"
CalendarStyle="{StaticResource Filter_Calendar}" CalendarStyle="{StaticResource Filter_Calendar}"
Style="{StaticResource Filter_DatePicker}"/> Style="{StaticResource Filter_DatePicker}"/>
<TextBlock Text="{Binding To_Msg}" <TextBlock Text="{Binding To_Msg}"
Style="{StaticResource Filter_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
VerticalAlignment="Center"
Margin="2.5,0,2.5,0"/>
<DatePicker SelectedDate="{Binding dtEndDate}" <DatePicker SelectedDate="{Binding dtEndDate}"
CalendarStyle="{StaticResource Filter_Calendar}" CalendarStyle="{StaticResource Filter_Calendar}"
Style="{StaticResource Filter_DatePicker}"/> Style="{StaticResource Filter_DatePicker}"/>
@@ -66,25 +77,34 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding FilterTypeList}" <ComboBox ItemsSource="{Binding FilterTypeList}"
SelectedItem="{Binding SelFilterType}" SelectedItem="{Binding SelFilterType}"
Style="{StaticResource NewOpenProjectFile_ComboBox}"/> Height="25"
Width="105"
Margin="5"
Style="{StaticResource Optmizer_ComboBox}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding SearchText}" Text="{Binding SearchText}"
Visibility="{Binding SearchText_Visibility}" Visibility="{Binding SearchText_Visibility}"
Style="{StaticResource NewSearchText_TextBox}"/> TextWrapping="Wrap"
Margin="5"/>
<StackPanel Grid.Column="2" <StackPanel Grid.Column="2"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<TextBlock Text="Rows" <TextBlock Text="Rows"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<ComboBox ItemsSource="{Binding RowQuantityList}" <ComboBox ItemsSource="{Binding RowQuantityList}"
SelectedIndex="{Binding SelRowQuantity}" SelectedIndex="{Binding SelRowQuantity}"
Style="{StaticResource RowQTY_ComboBox}"/> Width="55"
Style="{StaticResource Optmizer_ComboBox}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>
</GroupBox> </GroupBox>
<Border Grid.Row="1" <Border Grid.Row="1"
Style="{StaticResource NewOpenProjectFileDialog_Border}"/> Margin="1"
Style="{StaticResource Optimizer_Border}"/>
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1" <EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
ItemsSource="{Binding ProjectList}" ItemsSource="{Binding ProjectList}"
@@ -175,17 +195,20 @@
<UniformGrid Grid.Row="2" <UniformGrid Grid.Row="2"
Columns="3" Columns="3"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<Button Name="OpenBtn" <Button Name="OpenBtn"
IsDefault="True" IsDefault="True"
Content="{Binding Open_Msg}" Content="{Binding Open_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Content="{Binding Delete_Msg}" <Button Content="{Binding Delete_Msg}"
Command="{Binding Delete_Command}" Command="{Binding Delete_Command}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button IsCancel="True" <Button IsCancel="True"
Content="{Binding Cancel_Msg}" Content="{Binding Cancel_Msg}"
Style="{DynamicResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
@@ -422,18 +422,21 @@ Public MustInherit Class OpenProjectFileDialogVM
Case DayTypes.LAST6MONTHS Case DayTypes.LAST6MONTHS
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1) m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 6) m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 6)
Case DayTypes.PERIOD Case Else 'DayTypes.LASTMONTH
Dim sStartDate As String = "0" m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
Dim lStartDate As Long = 0 m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5)
GetMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, 0, sStartDate) 'Case DayTypes.PERIOD
Long.TryParse(sStartDate, lStartDate) ' Dim sStartDate As String = "0"
m_dtStartDate = If(lStartDate > 0, DateTime.FromFileTimeUtc(lStartDate), DateTime.Today) ' Dim lStartDate As Long = 0
Dim sEndDate As String = "0" ' GetMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, 0, sStartDate)
Dim lEndDate As Long = 0 ' Long.TryParse(sStartDate, lStartDate)
GetMainPrivateProfileString(S_OPENFILEDIALOG, K_ENDDATE, 0, sEndDate) ' m_dtStartDate = If(lStartDate > 0, DateTime.FromFileTimeUtc(lStartDate), DateTime.Today)
Long.TryParse(sEndDate, lEndDate) ' Dim sEndDate As String = "0"
m_dtEndDate = If(lEndDate > 0, DateTime.FromFileTimeUtc(lEndDate), DateTime.Today) ' Dim lEndDate As Long = 0
m_Date_Visibility = Visibility.Visible ' GetMainPrivateProfileString(S_OPENFILEDIALOG, K_ENDDATE, 0, sEndDate)
' Long.TryParse(sEndDate, lEndDate)
' m_dtEndDate = If(lEndDate > 0, DateTime.FromFileTimeUtc(lEndDate), DateTime.Today)
' m_Date_Visibility = Visibility.Visible
End Select End Select
End Sub End Sub
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -10,7 +10,9 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="6" <Border Grid.ColumnSpan="6"
Style="{StaticResource TitleBar_Border}"/> Background="{StaticResource BeamWall_Casper}"
BorderBrush="{StaticResource BeamWall_Casper}"
BorderThickness="0"/>
<Image MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}" <Image MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
Source="/Resources/EgalwareLogo.ico"/> Source="/Resources/EgalwareLogo.ico"/>
<ContentControl Grid.Column="1"/> <ContentControl Grid.Column="1"/>
+29 -22
View File
@@ -1,49 +1,56 @@
<StackPanel x:Class="ViewPanelV" <StackPanel x:Class="ViewPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource BTLPartManager_StackPanel}"> Orientation="Vertical">
<Button ToolTip="{Binding ZoomAllToolTip}" <Button ToolTip="{Binding ZoomAllToolTip}"
Style="{StaticResource Mach_Button}" Command="{Binding ZoomAllCommand}"
Command="{Binding ZoomAllCommand}"> Height="30"
Width="30">
<Image Source="{StaticResource ZoomAll_Image}" <Image Source="{StaticResource ZoomAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromTopToolTip}" <Button ToolTip="{Binding LookFromTopToolTip}"
Style="{StaticResource Mach_Button}" Command="{Binding TopViewCommand}"
Command="{Binding TopViewCommand}"> Height="30"
Width="30">
<Image Source="{StaticResource LookFromTOP_Image}" <Image Source="{StaticResource LookFromTOP_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromFrontToolTip}" <Button ToolTip="{Binding LookFromFrontToolTip}"
Style="{StaticResource Mach_Button}" Command="{Binding FrontViewCommand}"
Command="{Binding FrontViewCommand}"> Height="30"
Width="30">
<Image Source="{StaticResource LookFromFRONT_Image}" <Image Source="{StaticResource LookFromFRONT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromRightToolTip}" <Button ToolTip="{Binding LookFromRightToolTip}"
Style="{StaticResource Mach_Button}" Command="{Binding RightViewCommand}"
Command="{Binding RightViewCommand}"> Height="30"
Width="30">
<Image Source="{StaticResource LookFromRIGHT_Image}" <Image Source="{StaticResource LookFromRIGHT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromBackToolTip}" <Button ToolTip="{Binding LookFromBackToolTip}"
Style="{StaticResource Mach_Button}" Command="{Binding BackViewCommand}"
Command="{Binding BackViewCommand}"> Height="30"
Width="30">
<Image Source="{StaticResource LookFromBACK_Image}" <Image Source="{StaticResource LookFromBACK_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromLeftToolTip}" <Button ToolTip="{Binding LookFromLeftToolTip}"
Style="{StaticResource Mach_Button}" Command="{Binding LeftViewCommand}"
Command="{Binding LeftViewCommand}"> Height="30"
Width="30">
<Image Source="{StaticResource LookFromLEFT_Image}" <Image Source="{StaticResource LookFromLEFT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromIso_SWToolTip}" <Button ToolTip="{Binding LookFromIso_SWToolTip}"
Style="{StaticResource Mach_Button}" Command="{Binding IsoViewSWCommand}"
Command="{Binding IsoViewSWCommand}"> Height="30"
Width="30">
<Image Source="{StaticResource LookFromISO_SW_Image}" <Image Source="{StaticResource LookFromISO_SW_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="EgwProxy.LiMan" version="1.0.2408.718" targetFramework="net472" /> <package id="EgwProxy.LiMan" version="1.0.2408.718" targetFramework="net472" />
<package id="EgwWPFBaseLib" version="3.1.1.2" targetFramework="net472" /> <package id="EgwWPFBaseLib" version="3.1.7.3" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net472" /> <package id="Newtonsoft.Json" version="13.0.4" targetFramework="net472" />
<package id="RestSharp" version="111.2.0" targetFramework="net472" /> <package id="RestSharp" version="111.2.0" targetFramework="net472" />
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.5.2")] [assembly: AssemblyVersion("3.1.8.2")]
[assembly: AssemblyFileVersion("3.1.5.2")] [assembly: AssemblyFileVersion("3.1.8.2")]
@@ -9,7 +9,8 @@
ShowInTaskbar="False" ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"> WindowStartupLocation="CenterOwner">
<Border Style="{StaticResource AboutBoxV_Border}"> <Border BorderBrush="{StaticResource Border.Static.RegentStBlue.Border}"
BorderThickness="2">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/> <ColumnDefinition Width="0.5*"/>
@@ -37,31 +38,46 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.Column="1" <Border Grid.Column="1"
Style="{StaticResource AboutBox_Border}"> BorderBrush="{StaticResource Border.Static.White.Border}">
<Image Source="{StaticResource AboutBox_Image}" <Image Source="{StaticResource AboutBox_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Border> </Border>
</Grid> </Grid>
<TextBlock Grid.Row="3" <TextBlock Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Name="DescriptionLbl" Name="DescriptionLbl"
Style="{StaticResource AboutBox_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"/>
<TextBlock Grid.Row="4" <TextBlock Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Name="VersionLbl" Name="VersionLbl"
Style="{StaticResource AboutBox_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"/>
<TextBlock Grid.Row="5" <TextBlock Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Name="CopyrightLbl" Name="CopyrightLbl"
Style="{StaticResource Copyright_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="12"/>
<TextBox Grid.Row="6" <TextBox Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Name="InfoLbl" Name="InfoLbl"
Style="{StaticResource AboutBox_TextBox}"/> IsReadOnly="True"
Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="12"
TextWrapping="Wrap"/>
<Button Grid.Row="8" <Button Grid.Row="8"
Grid.Column="1" Grid.Column="1"
Name="ExitBtn" Name="ExitBtn"
Style="{StaticResource AboutBox_Button}"/> IsCancel="True"
Margin="100,0"/>
</Grid> </Grid>
</Border> </Border>
</Window> </Window>
@@ -1,5 +1,4 @@
Imports EgtUILib Imports EgtUILib
Imports EgtBEAMWALL.Core
Public Class AboutBoxV Public Class AboutBoxV
@@ -7,7 +7,7 @@
Title="AddProcess" Title="AddProcess"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource BlockedWnd_Grid}"> <Grid Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -18,12 +18,20 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border Style="{StaticResource AddFeatureWnd_Border}"> <Border Background="{StaticResource Border.Static.Kashmir.Background}"
CornerRadius="4,0,0,4"
Margin="0,2,0,2">
<TextBlock Text="{Binding Process_Msg}" <TextBlock Text="{Binding Process_Msg}"
Style="{StaticResource List_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="20"
Margin="10,0,10,0"
Style="{StaticResource ForegroundWhite_TextBlock}"/>
</Border> </Border>
<Border Grid.Row="1" <Border Grid.Row="1"
Style="{StaticResource PRCList_Border}"> BorderBrush="{StaticResource Border.Static.Glacier.Border}"
BorderThickness="2,2,0,2"
CornerRadius="4,0,0,4">
<ListBox Grid.Row="1" <ListBox Grid.Row="1"
ItemsSource="{Binding PRCListView}" ItemsSource="{Binding PRCListView}"
SelectedItem="{Binding nSelPRC}" SelectedItem="{Binding nSelPRC}"
@@ -34,26 +42,43 @@
<TextBlock Text="{Binding ghDesc}" <TextBlock Text="{Binding ghDesc}"
ToolTip="{Binding ghDesc}" ToolTip="{Binding ghDesc}"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
Style="{StaticResource PRCList_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
TextAlignment="Justify"
TextWrapping="Wrap"
Margin="10,5,10,0"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
</Border> </Border>
<Border Grid.Column="1" <Border Grid.Column="1"
Style="{StaticResource Custom_Border}"> Background="{StaticResource Border.Static.Kashmir.Background}"
BorderThickness="0,2,0,2">
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding Custom_Msg}" Text="{Binding Custom_Msg}"
Style="{StaticResource List_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="20"
Margin="10,0,10,0"
Style="{StaticResource ForegroundWhite_TextBlock}"/>
</Border> </Border>
<Border Grid.Row="1" <Border Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Style="{StaticResource MacroCustomList_Border}"> BorderBrush="{StaticResource Border.Static.Glacier.Border}"
BorderThickness="0,2,0,2"
CornerRadius="0">
<ListBox ItemsSource="{Binding MacroCustomList}" <ListBox ItemsSource="{Binding MacroCustomList}"
SelectedIndex="{Binding nSelMacroCustom}" SelectedIndex="{Binding nSelMacroCustom}"
Style="{StaticResource MacroCustom_ListBox}"> Background="Transparent"
BorderThickness="0"
Height="610"
Width="980"
Margin="5"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Style="{StaticResource MacroCustom_WrapPanel}"/> <WrapPanel Orientation="Horizontal"
IsItemsHost="True"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ListBox.ItemsPanel> </ListBox.ItemsPanel>
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
@@ -64,23 +89,37 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding sMacroName}" <TextBlock Text="{Binding sMacroName}"
Style="{StaticResource Macro_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="14"
Margin="5"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<Image Grid.Row="1" <Image Grid.Row="1"
Source="{Binding sMacroDrawPath}" Source="{Binding sMacroDrawPath}"
Style="{StaticResource Macro_Image}"/> Width="300"
Margin="5,0,5,5"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
</Border> </Border>
<Border Grid.Column="2" <Border Grid.Column="2"
Style="{StaticResource Default_Border}"> Background="{StaticResource Border.Static.Kashmir.Background}"
CornerRadius="0,4,4,0"
Padding="0,10,0,10"
Margin="0,2,0,2">
<TextBlock Text="{Binding Default_Msg}" <TextBlock Text="{Binding Default_Msg}"
Style="{StaticResource List_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="20"
Margin="10,0,10,0"
Style="{StaticResource ForegroundWhite_TextBlock}"/>
</Border> </Border>
<Border Grid.Row="1" <Border Grid.Row="1"
Grid.Column="2" Grid.Column="2"
Style="{StaticResource MacroDefaultList_Border}"> BorderBrush="{StaticResource Border.Static.Glacier.Border}"
BorderThickness="0,2,2,2"
CornerRadius="0,4,4,0">
<ListBox ItemsSource="{Binding MacroDefaultList}" <ListBox ItemsSource="{Binding MacroDefaultList}"
SelectedIndex="{Binding nSelMacroDefault}" SelectedIndex="{Binding nSelMacroDefault}"
Style="{StaticResource MacroDefault_ListBox}" Style="{StaticResource MacroDefault_ListBox}"
@@ -88,7 +127,12 @@
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding sMacroName}" <TextBlock Text="{Binding sMacroName}"
Style="{StaticResource MacroDefault_TextBlock}"/> HorizontalAlignment="Left"
VerticalAlignment="Top"
TextAlignment="Justify"
Width="239"
Margin="2.5"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
@@ -96,14 +140,16 @@
<UniformGrid Columns="2" <UniformGrid Columns="2"
Grid.Row="2" Grid.Row="2"
Grid.ColumnSpan="3" Grid.ColumnSpan="3"
Style="{StaticResource AddFeatureWnd_UniformGrid}"> Margin="5">
<Button Content="{Binding OK_Msg}" <Button Content="{Binding OK_Msg}"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Content="{Binding Cancel_Msg}" <Button Content="{Binding Cancel_Msg}"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtBEAMWALLCORE:OptimizerWindow>
@@ -106,11 +106,7 @@ Public Class AddFeatureWndVM
GetMacroListDefault(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName) GetMacroListDefault(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
' ricavo lista file Macro Custom ' ricavo lista file Macro Custom
GetMacroListCustom(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName) GetMacroListCustom(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
If MacroCustomList.Count > 0 Then MacroList_IsEnabled = If(MacroCustomList.Count > 0, True, False)
MacroList_IsEnabled = True
Else
MacroList_IsEnabled = False
End If
End If End If
End If End If
NotifyPropertyChanged(NameOf(nSelPRC)) NotifyPropertyChanged(NameOf(nSelPRC))
@@ -8,7 +8,7 @@
Title="AddPartWndV" Title="AddPartWndV"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource AddPartWndV_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -16,19 +16,24 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource AddPart_Grid}"> <Grid HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="Name" <TextBlock Text="Name"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sNAM}" Text="{Binding sNAM}"
Style="{StaticResource NAM_TextBox}"/> TextWrapping="Wrap"
Width="200"/>
</Grid> </Grid>
<Grid Grid.Row="1" <Grid Grid.Row="1"
Style="{StaticResource AddPartWnd_Grid}"> Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -36,19 +41,31 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="Prod Number" <TextBlock Text="Prod Number"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding nPDN}" Text="{Binding nPDN}"
Style="{StaticResource Dimension_TextBox}"/> VerticalContentAlignment="Center"
TextWrapping="Wrap"
Height="25"
Width="50"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="Count" Text="Count"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3" <EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sCNT}" Text="{Binding sCNT}"
Style="{StaticResource Dimension_TextBox}"/> VerticalContentAlignment="Center"
TextWrapping="Wrap"
Height="25"
Width="50"/>
</Grid> </Grid>
<Grid Grid.Row="2" <Grid Grid.Row="2"
Style="{StaticResource AddPartWnd_Grid}"> Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -58,34 +75,54 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="W" <TextBlock Text="W"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sW}" Text="{Binding sW}"
Style="{StaticResource Dimension_TextBox}"/> VerticalContentAlignment="Center"
TextWrapping="Wrap"
Height="25"
Width="50"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="H" Text="H"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3" <EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sH}" Text="{Binding sH}"
Style="{StaticResource Dimension_TextBox}"/> VerticalContentAlignment="Center"
TextWrapping="Wrap"
Height="25"
Width="50"/>
<TextBlock Grid.Column="4" <TextBlock Grid.Column="4"
Text="L" Text="L"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Column="5" <EgtWPFLib5:EgtTextBox Grid.Column="5"
Text="{Binding sL}" Text="{Binding sL}"
Style="{StaticResource Dimension_TextBox}"/> VerticalContentAlignment="Center"
TextWrapping="Wrap"
Height="25"
Width="65"/>
</Grid> </Grid>
<UniformGrid Grid.Row="3" <UniformGrid Grid.Row="3"
Columns="2" Columns="2"
Style="{StaticResource AddPartWnd_UniformGrid}"> Margin="0,5,0,5">
<Button Content="Ok" <Button Content="Ok"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Content="Cancel" <Button Content="Cancel"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtBEAMWALLCORE:OptimizerWindow>
@@ -147,7 +147,7 @@ Public Class AddPartWndVM
#Region "COMMANDS" #Region "COMMANDS"
#Region "Ok" #Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand Public ReadOnly Property Ok_Command As ICommand
Get Get
@@ -169,7 +169,7 @@ Public Class AddPartWndVM
End If End If
End Sub End Sub
#End Region ' Ok #End Region ' Ok_Command
#End Region ' COMMANDS #End Region ' COMMANDS
@@ -7,8 +7,8 @@
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
Title="AddRawPartWnd" Title="AddRawPartWnd"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -18,37 +18,46 @@
SelectedItem="{Binding SelDimension}" SelectedItem="{Binding SelDimension}"
DisplayMemberPath="sDimension" DisplayMemberPath="sDimension"
Visibility="{Binding DimensionsList_Visibility}" Visibility="{Binding DimensionsList_Visibility}"
Style="{StaticResource AddRawPartWnd_ComboBox}"/> Margin="0,0,0,5"
Style="{StaticResource Optmizer_ComboBox}"/>
<ItemsControl Grid.Row="1" <ItemsControl Grid.Row="1"
ItemsSource="{Binding VariableList}"> ItemsSource="{Binding VariableList}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Style="{StaticResource AddPartWnd_Grid}"> <Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding sMsg}" <TextBlock Text="{Binding sMsg}"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue}" Text="{Binding sValue}"
Style="{StaticResource Value_TextBox}"/> TextWrapping="Wrap"
Width="65"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
<UniformGrid Grid.Row="2" <UniformGrid Grid.Row="2"
Columns="2" Columns="2"
Style="{StaticResource AddRawPartWnd_UniformGrid}"> Margin="0,0,0,5">
<Button Grid.Column="1" <Button Grid.Column="1"
Content="Ok" Content="Ok"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource AddRawPartWnd_Button}"/> Height="30"
Width="80"
Margin="0,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Grid.Column="3" <Button Grid.Column="3"
Content="Cancel" Content="Cancel"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
@@ -143,7 +143,7 @@ Public Class AddRawPartWndVM
#Region "COMMANDS" #Region "COMMANDS"
#Region "Ok" #Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand Public ReadOnly Property Ok_Command As ICommand
Get Get
@@ -167,7 +167,7 @@ Public Class AddRawPartWndVM
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
End Sub End Sub
#End Region ' Ok #End Region ' Ok_Command
#End Region ' COMMANDS #End Region ' COMMANDS
+2 -1
View File
@@ -1,13 +1,14 @@
<Application x:Class="Application" <Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"> xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<!--<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DarkDictionary.xaml"/> <!--<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DarkDictionary.xaml"/>
<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DefaultDictionary.xaml"/>--> <ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DefaultDictionary.xaml"/>-->
<ResourceDictionary Source="/EgwRedmineAPI;component/Themes/Generic.xaml"/>
<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/> <ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/>
<ResourceDictionary Source="Utility/Dictionary.xaml"/> <ResourceDictionary Source="Utility/Dictionary.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
+182 -74
View File
@@ -18,10 +18,17 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<ComboBox ItemsSource="{Binding StrategySetupList}" <ComboBox ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLDataWnd_ComboBox}"> Foreground="{StaticResource BeamWall_Black}"
HorizontalAlignment="Center"
FontSize="15"
Height="30"
Width="160"
Margin="0,10,0,10"
Style="{StaticResource Optmizer_ComboBox}">
<ComboBox.ItemContainerStyle> <ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}"> <Style TargetType="{x:Type ComboBoxItem}">
<EventSetter Event="PreviewMouseDown" Handler="ComboBoxItem_PreviewMouseDown"/> <EventSetter Event="PreviewMouseDown" Handler="ComboBoxItem_PreviewMouseDown"/>
@@ -29,7 +36,13 @@
</ComboBox.ItemContainerStyle> </ComboBox.ItemContainerStyle>
</ComboBox> </ComboBox>
<TextBlock Text="{Binding ErrText}" <TextBlock Text="{Binding ErrText}"
Style="{StaticResource ErrConfig_TextBlock}"/> Foreground="{StaticResource BeamWall_Red}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
TextAlignment="Justify"
TextWrapping="Wrap"
FontSize="13"
Margin="10,0,0,0"/>
</StackPanel> </StackPanel>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -44,18 +57,25 @@
Tag="{Binding GeneralParametersList}"/> Tag="{Binding GeneralParametersList}"/>
<UniformGrid Grid.Column="1" <UniformGrid Grid.Column="1"
Columns="2" Columns="2"
Style="{StaticResource BTLDataWnd_UniformGrid}"> VerticalAlignment="Bottom"
Margin="0,0,5,0">
<Button Command="{Binding Ok_Command}" <Button Command="{Binding Ok_Command}"
ToolTip="{Binding SaveAsToolTip}" ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource OKBTLDataWnd_Button}"> Height="40"
Width="40"
Margin="0,0,5,5"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Ok_Image}" <Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding Cancel_Command}" <Button Command="{Binding Cancel_Command}"
ToolTip="{Binding SaveAsToolTip}" ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource BTLDataWnd_Button}"> Height="40"
Width="40"
Margin="0,0,0,5"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Delete_Image}" <Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
@@ -66,119 +86,207 @@
Columns="6" Columns="6"
Rows="7"> Rows="7">
<TextBlock Text="{Binding PROJNUM_MSG}" <TextBlock Text="{Binding PROJNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sPROJNUM, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sPROJNUM, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PROJNAME_MSG}" <TextBlock Text="{Binding PROJNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sPROJNAME, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sPROJNAME, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PROJPART_MSG}" <TextBlock Text="{Binding PROJPART_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sPROJPART, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sPROJPART, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PROJGUID_MSG}" <TextBlock Text="{Binding PROJGUID_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sPROJGUID, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sPROJGUID, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding LISTNAME_MSG}" <TextBlock Text="{Binding LISTNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sLISTNAME, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sLISTNAME, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding CUSTOMER_MSG}" <TextBlock Text="{Binding CUSTOMER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sCUSTOMER, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sCUSTOMER, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding ARCHITECT_MSG}" <TextBlock Text="{Binding ARCHITECT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sARCHITECT, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sARCHITECT, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EDITOR_MSG}" <TextBlock Text="{Binding EDITOR_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sEDITOR, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sEDITOR, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding DELIVDATE_MSG}" <TextBlock Text="{Binding DELIVDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sDELIVDATE, UpdateSourceTrigger=Explicit}" Text="{Binding sDELIVDATE, UpdateSourceTrigger=Explicit,
Style="{StaticResource PartParam_TextBox}"/> RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EXPDATE_MSG}" <TextBlock Text="{Binding EXPDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sEXPDATE, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sEXPDATE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EXPTIME_MSG}" <TextBlock Text="{Binding EXPTIME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sEXPTIME, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sEXPTIME, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EXPRELEASE_MSG}" <TextBlock Text="{Binding EXPRELEASE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sEXPRELEASE, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sEXPRELEASE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding LANGUAGE_MSG}" <TextBlock Text="{Binding LANGUAGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sLANGUAGE, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sLANGUAGE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding RANGE_MSG}" <TextBlock Text="{Binding RANGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ocRANGE, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
Path=Tag.ocRANGE,
Mode=OneWay}" Mode=OneWay}"
SelectedIndex="{Binding SelRANGE, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
Path=Tag.SelRANGE,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}" <TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ocPROCESSINGQUALITY, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
Path=Tag.ocPROCESSINGQUALITY,
Mode=OneWay}" Mode=OneWay}"
SelectedIndex="{Binding SelPROCESSINGQUALITY, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
Path=Tag.SelPROCESSINGQUALITY,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding COMPUTERNAME_MSG}" <TextBlock Text="{Binding COMPUTERNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sCOMPUTERNAME, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sCOMPUTERNAME, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding USER_MSG}" <TextBlock Text="{Binding USER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sUSER, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sUSER, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding SRCFILE_MSG}" <TextBlock Text="{Binding SRCFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sSRCFILE, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sSRCFILE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EXPFILE_MSG}" <TextBlock Text="{Binding EXPFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sEXPFILE, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sEXPFILE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding RECESS_MSG}" <TextBlock Text="{Binding RECESS_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ocRECESS, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
Path=Tag.ocRECESS,
Mode=OneWay}" Mode=OneWay}"
SelectedIndex="{Binding SelRECESS, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
Path=Tag.SelRECESS,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding USERATTRIBUTE_MSG}" <TextBlock Text="{Binding USERATTRIBUTE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sUSERATTRIBUTE, UpdateSourceTrigger=Explicit}" Text="{Binding CurrBTLStructure.sUSERATTRIBUTE, UpdateSourceTrigger=LostFocus}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</UniformGrid> </UniformGrid>
</TabItem> </TabItem>
@@ -6,6 +6,7 @@
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
Me.DataContext = BTLDataWndVM Me.DataContext = BTLDataWndVM
Me.Tag = Map.refProjectVM.BTLStructureVM
' Assegno al riferimento locale al VM il VM preso dal DataContext ' Assegno al riferimento locale al VM il VM preso dal DataContext
m_BTLDataWndVM = BTLDataWndVM m_BTLDataWndVM = BTLDataWndVM
End Sub End Sub
@@ -19,6 +20,7 @@
If Not IsNothing(Map.refBTLDataWndVM.SelStrategySetup) AndAlso Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then If Not IsNothing(Map.refBTLDataWndVM.SelStrategySetup) AndAlso Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
Map.refStrategyManagerVM.SelStrategySetup.Read() Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content) Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content)
Map.refBTLDataWndVM.SelStrategySetup = SelStrategy.Content Map.refBTLDataWndVM.SelStrategySetup = SelStrategy.Content
End If End If
@@ -33,6 +33,7 @@ Public Class BTLDataWndVM
If m_SelStrategySetup <> value Then If m_SelStrategySetup <> value Then
Map.refStrategyManagerVM.SelStrategySetup.sName = value Map.refStrategyManagerVM.SelStrategySetup.sName = value
Map.refStrategyManagerVM.SelStrategySetup.Read() Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
ReadCustomGeneralParameters(value) ReadCustomGeneralParameters(value)
End If End If
m_SelStrategySetup = value m_SelStrategySetup = value
@@ -80,6 +81,13 @@ Public Class BTLDataWndVM
NotifyPropertyChanged(NameOf(ErrText)) NotifyPropertyChanged(NameOf(ErrText))
End Sub End Sub
Private m_CurrBTLStructure As BTLStructureVM
Public ReadOnly Property CurrBTLStructure As BTLStructureVM
Get
Return m_CurrBTLStructure
End Get
End Property
#Region "Parametri generici" #Region "Parametri generici"
Public m_sPROJNUM As String Public m_sPROJNUM As String
@@ -565,8 +573,9 @@ Public Class BTLDataWndVM
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True) Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True)
End Sub End Sub
Sub New() Sub New(BTLStructure As BTLStructureVM)
Map.SetRefBTLDataWndVM(Me) Map.SetRefBTLDataWndVM(Me)
m_CurrBTLStructure = BTLStructure
SetIsBTLDataWnd(True) SetIsBTLDataWnd(True)
' leggo parametri Btl ' leggo parametri Btl
ReadBtlParams() ReadBtlParams()
@@ -829,7 +838,7 @@ Public Class BTLDataWndVM
#Region "COMMANDS" #Region "COMMANDS"
#Region "Ok" #Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand Public ReadOnly Property Ok_Command As ICommand
Get Get
@@ -851,14 +860,14 @@ Public Class BTLDataWndVM
End If End If
SetIsBTLDataWnd(True) SetIsBTLDataWnd(True)
SaveInfo() SaveInfo()
Map.refLeftPanelVM.ResetCalc() Map.refPartListVM.ResetCalc()
Map.refSceneHostVM.SaveProject() Map.refSceneHostVM.SaveProject()
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
End Sub End Sub
#End Region ' Ok #End Region ' Ok_Command
#Region "Cancel" #Region "Cancel_Command"
Public ReadOnly Property Cancel_Command As ICommand Public ReadOnly Property Cancel_Command As ICommand
Get Get
@@ -873,7 +882,7 @@ Public Class BTLDataWndVM
RaiseEvent m_CloseWindow(False) RaiseEvent m_CloseWindow(False)
End Sub End Sub
#End Region ' Cancel #End Region ' Cancel_Command
#End Region ' COMMANDS #End Region ' COMMANDS
@@ -1,49 +1,55 @@
<Border x:Class="BTLPartManagerV" <Border x:Class="BTLPartManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{StaticResource BTLPartManagerVM}" DataContext="{StaticResource BTLPartManagerVM}"
Style="{StaticResource BTLPartManager_Border}"> Background="{StaticResource Border.Static.FountainBlue.Background}"
BorderBrush="{StaticResource Border.Static.Teal.Border}"
BorderThickness="2"
CornerRadius="5"
Margin="0"
Padding="0">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal"
Margin="0">
<Button Command="{Binding CopyPart_Command}" <Button Command="{Binding CopyPart_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding CopyPart_ToolTip}" ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}" IsEnabled="{Binding CopyPart_IsEnabled}">
Style="{StaticResource LP_Button}"> <Image Source="{StaticResource CopyPart_Image}"
<Image Source="{StaticResource CopyPart_Image}" Height="20"
Style="{StaticResource BTLDataWnd_Image}"/> Width="20"
Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding RemovePart_Command}" <Button Command="{Binding RemovePart_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding RemovePart_ToolTip}" ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}" IsEnabled="{Binding RemovePart_IsEnabled}">
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource Remove_Image}" <Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Height="20"
Width="20"
Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Simulate_ToolTip}" <Button ToolTip="{Binding Simulate_ToolTip}"
Click="ClosePopUp_Click"
Command="{Binding Simulate_Command}" Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}" IsEnabled="{Binding Simulate_IsEnabled}">
Style="{StaticResource LP_Button}"> <Image Source="{StaticResource Simulate_Image}"
<Image Source="{StaticResource Simulate_Image}" Height="20"
Style="{StaticResource BTLDataWnd_Image}"/> Width="20"
Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Edit_ToolTip}" <Button ToolTip="{Binding Edit_ToolTip}"
Click="ClosePopUp_Click"
Command="{Binding Edit_Command}" Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}" IsEnabled="{Binding Edit_IsEnabled}">
Style="{StaticResource LP_Button}"> <Image Source="{StaticResource Edit_Image}"
<Image Source="{StaticResource Edit_Image}" Height="20"
Style="{StaticResource BTLDataWnd_Image}"/> Width="20"
Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding ResetCalc_Command}" <Button Command="{Binding ResetCalc_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding ResetCalc_ToolTip}" ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}" IsEnabled="{Binding CALCPanel_IsEnabled}">
Style="{StaticResource LP_Button}"> <Image Source="{StaticResource ResetCalc_Image}"
<Image Source="{StaticResource ResetCalc_Image}" Height="20"
Style="{StaticResource BTLDataWnd_Image}"/> Width="20"
Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
@@ -1,14 +1,3 @@
Public Class BTLPartManagerV Public Class BTLPartManagerV
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
Dim Button As Button = DirectCast(sender, Button)
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
Dim BTLPartManagerV As BTLPartManagerV = DirectCast(StackPanel.Parent, BTLPartManagerV)
Dim Popup As Primitives.Popup = DirectCast(BTLPartManagerV.Parent, Primitives.Popup)
If Not IsNothing(Popup) Then
Popup.IsOpen = False
End If
End Sub
End Class End Class
@@ -8,7 +8,12 @@ Public Class BTLPartManagerVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png" Private m_BTLDataWndVM As BTLDataWndVM
Public ReadOnly Property BTLDataWndVM As BTLDataWndVM
Get
Return m_BTLDataWndVM
End Get
End Property
Private m_BTLPartManager_IsEnabled As Boolean = True Private m_BTLPartManager_IsEnabled As Boolean = True
Public ReadOnly Property BTLPartManager_IsEnabled As Boolean Public ReadOnly Property BTLPartManager_IsEnabled As Boolean
@@ -19,7 +24,7 @@ Public Class BTLPartManagerVM
Public ReadOnly Property CopyPart_IsEnabled As Boolean Public ReadOnly Property CopyPart_IsEnabled As Boolean
Get Get
Return m_BTLPartManager_IsEnabled AndAlso Not IsNothing(Map.refShowBeamPanelVM) AndAlso Not Map.refShowBeamPanelVM.bShowAll AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 1 Return m_BTLPartManager_IsEnabled AndAlso Not IsNothing(Map.refShowBeamPanelVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 1
End Get End Get
End Property End Property
@@ -178,7 +183,7 @@ Public Class BTLPartManagerVM
#Region "COMMANDS" #Region "COMMANDS"
#Region "CopyPart" #Region "CopyPart_Command"
Public ReadOnly Property CopyPart_Command As ICommand Public ReadOnly Property CopyPart_Command As ICommand
Get Get
@@ -196,15 +201,15 @@ Public Class BTLPartManagerVM
' creo copia ' creo copia
Dim NewPart As BTLPartM = SelPart.Copy() Dim NewPart As BTLPartM = SelPart.Copy()
If Not IsNothing(NewPart) Then If Not IsNothing(NewPart) Then
Map.refProjectVM.UpdatePart(NewPart.nPartId) If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then Map.refProjectVM.UpdatePart(NewPart.nPartId)
' selezione ultimo che e' quello appena creato ' selezione ultimo che e' quello appena creato
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True) Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True)
End If End If
End Sub End Sub
#End Region ' CopyPart #End Region ' CopyPart_Command
#Region "RemovePart" #Region "RemovePart_Command"
Public ReadOnly Property RemovePart_Command As ICommand Public ReadOnly Property RemovePart_Command As ICommand
Get Get
@@ -216,81 +221,12 @@ Public Class BTLPartManagerVM
End Property End Property
Public Sub RemovePartCmd() Public Sub RemovePartCmd()
If IsNothing(ProjectManagerVM.CurrProd) Then Return Map.refProjectVM.BTLStructureVM.DeletePart()
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1
RemovePart(CurrSelBTLParts(RemoveIndex), RemoveIndex = 0)
Next
End If
Else
Return
End If
End Sub End Sub
Public Sub RemovePart(BTLPartToDelete As BTLPartVM, bSelPrevious As Boolean) #End Region ' RemovePart_Command
' verifico se ci sono già copie in grezzi
Dim nDuploCount As Integer = 0
If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then
' avviso che il pezzo non è cancellabile perchè in produzione
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning)
Return
End If
' verifico se rimuovere sezione dalla lista
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToDelete AndAlso x.Section = BTLPartToDelete.Section) Then
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToDelete.Section)
Map.refProjectVM.BTLStructureVM.SelSection = SectionXMaterial.Empty
End If
' Eseguo cancellazione
EgtBeamSetPart(BTLPartToDelete.nPartId)
RemoveScenePart(BTLPartToDelete)
' seleziono elemento precedente
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete)
Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete)
Map.refProjectVM.BTLStructureVM.SelBTLParts.Remove(BTLPartToDelete)
If EgtBeamErasePart() Then
If bSelPrevious Then
If FilteredIndex = 0 Then
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(1))
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
End If
ElseIf FilteredIndex = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 1 Then
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 2))
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
End If
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(FilteredIndex - 1))
End If
End If
' rimuovo dalla lista pezzi
Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
End If
End Sub
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM) #Region "Simulate_Command"
' Rimuovo pezzo dalla scena
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(BTLPartToDelete.nPROJ)
If IdAsseBase < 0 Then Return
' Setto il nuovo contesto
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
Dim DeletePartId As Integer = Map.refSceneShowBuldingVM.MapInfo(BTLPartToDelete.nPartId)
EgtErase(DeletePartId)
Map.refSceneShowBuldingVM.MapInfo.Remove(BTLPartToDelete.nPartId)
EgtBeamShowBuilding(IdAsseBase, True)
EgtZoom(ZM.ALL)
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
End Sub
#End Region ' RemovePart
#Region "SimulateCommand"
Public ReadOnly Property Simulate_Command As ICommand Public ReadOnly Property Simulate_Command As ICommand
Get Get
@@ -316,7 +252,7 @@ Public Class BTLPartManagerVM
Dim TempBarList(0) As EgtBEAMWALL.Core.Bar Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId,
.nProgramPage = ProjectType.PROJ, .nProgramPage = ProjectType.PROJ,
.nProjType = ProjType, .nProjType = ProjType + 10,
.bBarOk = True, .bBarOk = True,
.nMachineName = ProjectManagerVM.CurrProd.sMachine, .nMachineName = ProjectManagerVM.CurrProd.sMachine,
.nCmdType = CalcIntegration.CmdTypes.SIMULATE, .nCmdType = CalcIntegration.CmdTypes.SIMULATE,
@@ -335,9 +271,9 @@ Public Class BTLPartManagerVM
Return True Return True
End Function End Function
#End Region ' SimulateCommand #End Region ' Simulate_Command
#Region "Edit" #Region "Edit_Command"
Public ReadOnly Property Edit_Command As ICommand Public ReadOnly Property Edit_Command As ICommand
Get Get
@@ -349,6 +285,17 @@ Public Class BTLPartManagerVM
End Property End Property
Friend Sub Edit() Friend Sub Edit()
If IsNothing(Map.refBTLDataWndVM) Then Return
If IsNothing(Map.refProjectVM) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM) Then Return
If Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId < -1 Then Return
If IsNothing(ProjectManagerVM.CurrProd) Then Return
If IsNothing(Map.refBTLDataWndVM) Then
m_BTLDataWndVM = New BTLDataWndVM(Map.refProjectVM.BTLStructureVM)
End If
Map.refBTLDataWndVM.SetIsBTLDataWnd(False) Map.refBTLDataWndVM.SetIsBTLDataWnd(False)
Dim bValuePart As Boolean = False Dim bValuePart As Boolean = False
For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList
@@ -365,15 +312,18 @@ Public Class BTLPartManagerVM
Map.refProjectVM.SetRawPartManagerVisibility(False) Map.refProjectVM.SetRawPartManagerVisibility(False)
Map.refProjectVM.SetFeatureListVisibility(False) Map.refProjectVM.SetFeatureListVisibility(False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGER)
' Disabilito LeftPanel ' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False) Map.refProjectVM.SetLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2) Map.refProjectVM.SetLeftPanel_Opacity(0.2)
End Sub End Sub
#End Region ' Edit #End Region ' Edit_Command
#Region "ResetCalc" #Region "ResetCalc_Command"
Public ReadOnly Property ResetCalc_Command As ICommand Public ReadOnly Property ResetCalc_Command As ICommand
Get Get
@@ -392,17 +342,16 @@ Public Class BTLPartManagerVM
If IsNothing(SelPart) Then Return If IsNothing(SelPart) Then Return
If SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then If SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then
' Resetto info ' Resetto info
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then If Map.refProjectVM.InfoNgeValue.Count > 0 Then
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList For Each InfoNgePart As String In Map.refProjectVM.InfoNgeValue
Dim sInfoNgePart As String() = InfoNgePart.Split("="c) EgtRemoveInfo(SelPart.nPartId, InfoNgePart)
EgtRemoveInfo(SelPart.nPartId, sInfoNgePart(0))
Next Next
End If End If
SelPart.ResetCalcTotalPart() SelPart.ResetCalcTotalPart()
End If End If
End Sub End Sub
#End Region ' ResetCalc #End Region ' ResetCalc_Command
#End Region ' COMMANDS #End Region ' COMMANDS
@@ -209,8 +209,9 @@ Public Class BTLFeatureVM
Return m_BTLFeatureM.bDO Return m_BTLFeatureM.bDO
End Get End Get
Set(value As Boolean) Set(value As Boolean)
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
If value <> m_BTLFeatureM.bDO Then If value <> m_BTLFeatureM.bDO Then
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
If EgtBeamEnableProcess(nFeatureId, value, Not m_bDO_MultipleUpdate) Then If EgtBeamEnableProcess(nFeatureId, value, Not m_bDO_MultipleUpdate) Then
m_BTLFeatureM.bDO = value m_BTLFeatureM.bDO = value
' setto feature da ricalcolare ' setto feature da ricalcolare
@@ -224,7 +225,10 @@ Public Class BTLFeatureVM
Item.NotifyPropertyChanged(NameOf(Item.sMsg)) Item.NotifyPropertyChanged(NameOf(Item.sMsg))
Next Next
End If End If
If Not IsNothing(m_BTLPartM) AndAlso Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then Map.refProjectVM.UpdatePart(m_BTLPartM.nPartId)
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
If Not m_bDO_MultipleUpdate Then EgtDraw() If Not m_bDO_MultipleUpdate Then EgtDraw()
' aggiorno stato abilitazione del bottone modifica free contour ' aggiorno stato abilitazione del bottone modifica free contour
Map.refFeatureManagerVM.SetEditIsEnabled() Map.refFeatureManagerVM.SetEditIsEnabled()
End If End If
@@ -293,6 +297,12 @@ Public Class BTLFeatureVM
End Set End Set
End Property End Property
Public ReadOnly Property sFeature_Name As String
Get
Return $"[{nSelGRP}-{nPRC:000}] {sName}"
End Get
End Property
#Region "Messages" #Region "Messages"
Public ReadOnly Property Edit_ToolTip As String Public ReadOnly Property Edit_ToolTip As String
@@ -481,7 +491,7 @@ Public Class BTLFeatureVM
#Region "COMMANDS" #Region "COMMANDS"
#Region "DeleteFeature" #Region "DeleteFeature_Command"
Public ReadOnly Property DeleteFeature_Command As ICommand Public ReadOnly Property DeleteFeature_Command As ICommand
Get Get
@@ -496,9 +506,9 @@ Public Class BTLFeatureVM
Map.refFeatureListManagerVM.RemoveFeature() Map.refFeatureListManagerVM.RemoveFeature()
End Sub End Sub
#End Region ' DeleteFeature #End Region ' DeleteFeature_Command
#Region "Edit" #Region "Edit_Command"
Public ReadOnly Property Edit_Command As ICommand Public ReadOnly Property Edit_Command As ICommand
Get Get
@@ -510,13 +520,17 @@ Public Class BTLFeatureVM
End Property End Property
Public Sub Edit() Public Sub Edit()
Map.refProjectVM.SetPParametersVisibility(False)
' Disabilito pulsante assemblato
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
' attivo modalita' contorno libero ' attivo modalita' contorno libero
Map.refFreeContourManagerVM.Open() Map.refFreeContourManagerVM.Open()
End Sub End Sub
#End Region ' Edit #End Region ' Edit_Command
#Region "Save" #Region "Save_Command"
Public ReadOnly Property Save_Command As ICommand Public ReadOnly Property Save_Command As ICommand
Get Get
@@ -535,11 +549,15 @@ Public Class BTLFeatureVM
End Select End Select
' disattivo modalita' contorno libero ' disattivo modalita' contorno libero
Map.refFreeContourManagerVM.Close(True) Map.refFreeContourManagerVM.Close(True)
Map.refProjectVM.SetPParametersVisibility(True)
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
EgtSetMark(nFeatureId)
EgtDraw()
End Sub End Sub
#End Region ' Save #End Region ' Save_Command
#Region "Cancel" #Region "Cancel_Command"
Public ReadOnly Property Cancel_Command As ICommand Public ReadOnly Property Cancel_Command As ICommand
Get Get
@@ -553,11 +571,13 @@ Public Class BTLFeatureVM
Public Sub Cancel() Public Sub Cancel()
' disattivo modalita' contorno libero ' disattivo modalita' contorno libero
Map.refFreeContourManagerVM.Close(False) Map.refFreeContourManagerVM.Close(False)
Map.refProjectVM.SetPParametersVisibility(True)
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
End Sub End Sub
#End Region ' Cancel #End Region ' Cancel_Command
#Region "Strategy" #Region "Strategy_Command"
Public ReadOnly Property Strategy_Command As ICommand Public ReadOnly Property Strategy_Command As ICommand
Get Get
@@ -571,14 +591,15 @@ Public Class BTLFeatureVM
Public Sub Strategy() Public Sub Strategy()
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.STRATEGYMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.STRATEGYMANAGER)
' Disabilito LeftPanel ' Disabilito LeftPanel
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(False)
Map.refProjectVM.SetLeftPanel_IsEnabled(False) Map.refProjectVM.SetLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2) Map.refProjectVM.SetLeftPanel_Opacity(0.2)
Map.refForcedStrategyPanelVM.Init(BTLFeatureM) Map.refForcedStrategyPanelVM.Init(BTLFeatureM)
End Sub End Sub
#End Region ' Strategy #End Region ' Strategy_Command
#Region "EditFeature" #Region "EditFeature_Command"
Public ReadOnly Property EditFeature_Command As ICommand Public ReadOnly Property EditFeature_Command As ICommand
Get Get
@@ -589,14 +610,16 @@ Public Class BTLFeatureVM
End Get End Get
End Property End Property
Friend Sub EditFeature() Friend Sub EditFeature(Feature As BTLFeatureVM)
If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetSelFeature(Feature)
Map.refForcedStrategyPanelVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM) Map.refForcedStrategyPanelVM.Init(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.BTLFeatureM)
End If End If
' se modalità building, la tolgo ' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False
End If End If
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(False)
Map.refProjectVM.SetRawPartManagerVisibility(False) Map.refProjectVM.SetRawPartManagerVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.STRATEGYMANAGERBTL) Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.STRATEGYMANAGERBTL)
@@ -607,7 +630,7 @@ Public Class BTLFeatureVM
EgtDraw() EgtDraw()
End Sub End Sub
#End Region ' EditFeature #End Region ' EditFeature_Command
#End Region ' COMMANDS #End Region ' COMMANDS
+61 -92
View File
@@ -10,14 +10,13 @@ Public Class BTLPartVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
Private WithEvents m_BTLPartM As BTLPartM Private WithEvents m_BTLPartM As BTLPartM
Public ReadOnly Property BTLPartM As BTLPartM Public ReadOnly Property BTLPartM As BTLPartM
Get Get
Return m_BTLPartM Return m_BTLPartM
End Get End Get
End Property End Property
Private m_BTLStructureM As BTLStructureM Private m_BTLStructureM As BTLStructureM
Public ReadOnly Property nPartId As Integer Public ReadOnly Property nPartId As Integer
@@ -187,9 +186,11 @@ Public Class BTLPartVM
Get Get
Dim nOrigGroupId As Integer = nPartId Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId) If Not Map.refSceneShowBuldingVM.MapInfo.TryGetValue(nPartId, nOrigGroupId) Then
EgtOutLog(nPartId & " non presente")
End If
End If End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then If EgtBeamGetBuildingIsOn() Then
nOrigGroupId = GetOrigFrameGroup(nPartId) nOrigGroupId = GetOrigFrameGroup(nPartId)
End If End If
Dim frBeam As New Frame3d Dim frBeam As New Frame3d
@@ -248,9 +249,11 @@ Public Class BTLPartVM
Get Get
Dim nOrigGroupId As Integer = nPartId Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId) If Not Map.refSceneShowBuldingVM.MapInfo.TryGetValue(nPartId, nOrigGroupId) Then
EgtOutLog(nPartId & " non presente")
End If
End If End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then If EgtBeamGetBuildingIsOn() Then
nOrigGroupId = GetOrigFrameGroup(nPartId) nOrigGroupId = GetOrigFrameGroup(nPartId)
End If End If
Dim frBeam As New Frame3d Dim frBeam As New Frame3d
@@ -309,9 +312,11 @@ Public Class BTLPartVM
Get Get
Dim nOrigGroupId As Integer = nPartId Dim nOrigGroupId As Integer = nPartId
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId) If Not Map.refSceneShowBuldingVM.MapInfo.TryGetValue(nPartId, nOrigGroupId) Then
EgtOutLog(nPartId & " non presente")
End If
End If End If
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then If EgtBeamGetBuildingIsOn() Then
nOrigGroupId = GetOrigFrameGroup(nPartId) nOrigGroupId = GetOrigFrameGroup(nPartId)
End If End If
Dim frBeam As New Frame3d Dim frBeam As New Frame3d
@@ -1369,13 +1374,13 @@ Public Class BTLPartVM
Public ReadOnly Property CALC_ROT_Visibility As Visibility Public ReadOnly Property CALC_ROT_Visibility As Visibility
Get Get
Return If(m_BTLPartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed) Return If(m_BTLPartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
Public ReadOnly Property CALC_FALL_Visibility As Visibility Public ReadOnly Property CALC_FALL_Visibility As Visibility
Get Get
Return If(m_BTLPartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed) Return If(m_BTLPartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
@@ -1422,7 +1427,7 @@ Public Class BTLPartVM
Public ReadOnly Property Section As SectionXMaterial Public ReadOnly Property Section As SectionXMaterial
Get Get
Dim nOrigGroupId As Integer = nPartId Dim nOrigGroupId As Integer = nPartId
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() Then
nOrigGroupId = GetOrigFrameGroup(nPartId) nOrigGroupId = GetOrigFrameGroup(nPartId)
End If End If
Dim frBeam As New Frame3d Dim frBeam As New Frame3d
@@ -1544,7 +1549,10 @@ Public Class BTLPartVM
Return m_SelBTLFeatureVM Return m_SelBTLFeatureVM
End Get End Get
Set(value As BTLFeatureVM) Set(value As BTLFeatureVM)
If Not IsNothing(m_PrevSelBTLFeatureVM) Then m_PrevSelBTLFeatureVM.DeselGeomFeature() If Not IsNothing(m_PrevSelBTLFeatureVM) Then
m_PrevSelBTLFeatureVM.DeselGeomFeature()
EgtResetMark(m_PrevSelBTLFeatureVM.nFeatureId)
End If
m_SelBTLFeatureVM = value m_SelBTLFeatureVM = value
If Not IsNothing(m_SelBTLFeatureVM) Then If Not IsNothing(m_SelBTLFeatureVM) Then
m_SelBTLFeatureVM.SelGeomFeature() m_SelBTLFeatureVM.SelGeomFeature()
@@ -1573,9 +1581,6 @@ Public Class BTLPartVM
End If End If
End If End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged() If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
Map.refProdManagerVM.SetBtlImage(DOWN_IMAGE)
Map.refProdManagerVM.SetOpenImage(DOWN_IMAGE)
Map.refProdManagerVM.SetSaveImage(DOWN_IMAGE)
If Not IsNothing(m_SelBTLFeatureVM) Then If Not IsNothing(m_SelBTLFeatureVM) Then
SetSelFeatureMsg(EgtMsg(5356) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName) SetSelFeatureMsg(EgtMsg(5356) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
SetDeselFeatureMsg(EgtMsg(5357) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName) SetDeselFeatureMsg(EgtMsg(5357) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
@@ -1585,10 +1590,10 @@ Public Class BTLPartVM
' se modalità building, la tolgo ' se modalità building, la tolgo
If Not IsNothing(m_SelBTLFeatureVM) AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Not IsNothing(m_SelBTLFeatureVM) AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(False) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(True) Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True) Map.refProjectVM.SetFeatureListVisibility(False)
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
End If End If
End Set End Set
End Property End Property
@@ -1623,9 +1628,6 @@ Public Class BTLPartVM
End If End If
End If End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged() If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
Map.refProdManagerVM.SetBtlImage(DOWN_IMAGE)
Map.refProdManagerVM.SetOpenImage(DOWN_IMAGE)
Map.refProdManagerVM.SetSaveImage(DOWN_IMAGE)
If Not IsNothing(m_SelBTLFeatureVM) Then If Not IsNothing(m_SelBTLFeatureVM) Then
SetSelFeatureMsg(EgtMsg(5356) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName) SetSelFeatureMsg(EgtMsg(5356) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
SetDeselFeatureMsg(EgtMsg(5357) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName) SetDeselFeatureMsg(EgtMsg(5357) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
@@ -1662,20 +1664,6 @@ Public Class BTLPartVM
End Get End Get
End Property End Property
Private m_bOpenFeatureList As Boolean = False
Public Property bOpenFeatureList As Boolean
Get
Return m_bOpenFeatureList
End Get
Set(value As Boolean)
m_bOpenFeatureList = value
End Set
End Property
Friend Sub SetOpenFeatureList(Value As Boolean)
m_bOpenFeatureList = Value
NotifyPropertyChanged(NameOf(bOpenFeatureList))
End Sub
Public Property IsInverted As Boolean Public Property IsInverted As Boolean
Get Get
Return BTLPartM.nINVERTED = 180 Return BTLPartM.nINVERTED = 180
@@ -1684,10 +1672,9 @@ Public Class BTLPartVM
' eseguo inversione ' eseguo inversione
m_BTLPartM.Inversion(Map.refProjectVM.BTLStructureVM.nPROJTYPE) m_BTLPartM.Inversion(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' Resetto info ' Resetto info
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then If Map.refProjectVM.InfoNgeValue.Count > 0 Then
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList For Each InfoNgePart As String In Map.refProjectVM.InfoNgeValue
Dim sInfoNgePart As String() = InfoNgePart.Split("="c) EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, InfoNgePart)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0))
Next Next
End If End If
' setto part e tutte le feature da ricalcolare ' setto part e tutte le feature da ricalcolare
@@ -1882,10 +1869,9 @@ Public Class BTLPartVM
' setto part e tutte le feature da ricalcolare ' setto part e tutte le feature da ricalcolare
If bResetCalc Then If bResetCalc Then
' Resetto info ' Resetto info
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then If Map.refProjectVM.InfoNgeValue.Count > 0 Then
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList For Each InfoNgePart As String In Map.refProjectVM.InfoNgeValue
Dim sInfoNgePart As String() = InfoNgePart.Split("="c) EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, InfoNgePart)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0))
Next Next
End If End If
ResetCalcTotalPart() ResetCalcTotalPart()
@@ -2227,11 +2213,26 @@ Public Class BTLPartVM
Return True Return True
End Function End Function
Public Sub BackRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True)
' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
' ruoto
Rotation(False, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw)
' imposto lock
bLockRotation = True
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
If bUpdateSection AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
' se esiste, imposto sezione inversa
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
End If
End Sub
#End Region ' METHODS #End Region ' METHODS
#Region "COMMANDS" #Region "COMMANDS"
#Region "Invert" #Region "Invert_Command"
Public ReadOnly Property Invert_Command As ICommand Public ReadOnly Property Invert_Command As ICommand
Get Get
@@ -2253,41 +2254,9 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(sINVERTED)) NotifyPropertyChanged(NameOf(sINVERTED))
End Sub End Sub
#End Region ' Invert #End Region ' Invert_Command
#Region "BackRotation" #Region "ForwardRotation_Command"
Public ReadOnly Property BackRotation_Command As ICommand
Get
If m_cmdBackRotation Is Nothing Then
m_cmdBackRotation = New Command(AddressOf BackRotationCmd)
End If
Return m_cmdBackRotation
End Get
End Property
Public Sub BackRotationCmd()
BackRotation(True)
End Sub
Public Sub BackRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True)
' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
' ruoto
Rotation(False, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw)
' imposto lock
bLockRotation = True
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
If bUpdateSection AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
' se esiste, imposto sezione inversa
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
End If
End Sub
#End Region ' BackRotation
#Region "ForwardRotation"
Public ReadOnly Property ForwardRotation_Command As ICommand Public ReadOnly Property ForwardRotation_Command As ICommand
Get Get
@@ -2316,7 +2285,7 @@ Public Class BTLPartVM
End If End If
End Sub End Sub
#End Region ' ForwardRotation #End Region ' ForwardRotation_Command
' Comando inutilizzato ma conservato per eventuale rotazione a causa di importazione con rotazione sbagliata ' Comando inutilizzato ma conservato per eventuale rotazione a causa di importazione con rotazione sbagliata
#Region "XRotation" #Region "XRotation"
@@ -2359,7 +2328,7 @@ Public Class BTLPartVM
#End Region ' XRotation #End Region ' XRotation
#Region "PartColour" #Region "PartColour_Command"
Public ReadOnly Property PartColour_Command As ICommand Public ReadOnly Property PartColour_Command As ICommand
Get Get
@@ -2391,9 +2360,9 @@ Public Class BTLPartVM
Return True Return True
End Function End Function
#End Region ' PartColour #End Region ' PartColour_Command
#Region "Verify" #Region "Verify_Command"
Public ReadOnly Property Verify_Command As ICommand Public ReadOnly Property Verify_Command As ICommand
Get Get
@@ -2411,9 +2380,9 @@ Public Class BTLPartVM
Return Return
End Sub End Sub
#End Region ' Verify #End Region ' Verify_Command
#Region "AddToRawPart" #Region "AddToRawPart_Command"
Public ReadOnly Property AddToRawPart_Command As ICommand Public ReadOnly Property AddToRawPart_Command As ICommand
Get Get
@@ -2708,9 +2677,9 @@ Public Class BTLPartVM
Return True Return True
End Function End Function
#End Region ' AddToRawPart #End Region ' AddToRawPart_Command
#Region "SelectAllFeature" #Region "SelectAllFeature_Command"
Public ReadOnly Property SelectAllFeature_Command As ICommand Public ReadOnly Property SelectAllFeature_Command As ICommand
Get Get
@@ -2726,9 +2695,9 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(bDOALL)) NotifyPropertyChanged(NameOf(bDOALL))
End Sub End Sub
#End Region ' SelectAllFeature #End Region ' SelectAllFeature_Command
#Region "DeselectAllFeature" #Region "DeselectAllFeature_Command"
Public ReadOnly Property DeselectAllFeature_Command As ICommand Public ReadOnly Property DeselectAllFeature_Command As ICommand
Get Get
@@ -2744,9 +2713,9 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(bDOALL)) NotifyPropertyChanged(NameOf(bDOALL))
End Sub End Sub
#End Region ' DeselectAllFeature #End Region ' DeselectAllFeature_Command
#Region "SelectItemFeature" #Region "SelectItemFeature_Command"
Public ReadOnly Property SelectItemFeature_Command As ICommand Public ReadOnly Property SelectItemFeature_Command As ICommand
Get Get
@@ -2768,9 +2737,9 @@ Public Class BTLPartVM
Next Next
End Sub End Sub
#End Region ' SelectItemFeature #End Region ' SelectItemFeature_Command
#Region "DeselectItemFeature" #Region "DeselectItemFeature_Command"
Public ReadOnly Property DeselectItemFeature_Command As ICommand Public ReadOnly Property DeselectItemFeature_Command As ICommand
Get Get
@@ -2792,7 +2761,7 @@ Public Class BTLPartVM
Next Next
End Sub End Sub
#End Region ' DeselectItemFeature #End Region ' DeselectItemFeature_Command
#End Region ' COMMANDS #End Region ' COMMANDS
@@ -13,8 +13,6 @@ Public Class BTLStructureVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
' Nome file NGE con i pezzi selezionati per effettuare UpdateBTL ' Nome file NGE con i pezzi selezionati per effettuare UpdateBTL
Friend Const UPDATEBTL_NGE As String = "UpdateBTL.nge" Friend Const UPDATEBTL_NGE As String = "UpdateBTL.nge"
@@ -110,11 +108,11 @@ Public Class BTLStructureVM
Map.refProjectVM.MacroFeature_IsEnabled = True Map.refProjectVM.MacroFeature_IsEnabled = True
' se modalità building, la tolgo ' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetSceneShowBuldingVisibility(False) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(True) Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True) Map.refProjectVM.SetFeatureListVisibility(False)
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
End If End If
SceneSelPartSelection() SceneSelPartSelection()
' seleziono pezzo in Db geometrico ' seleziono pezzo in Db geometrico
@@ -169,15 +167,9 @@ Public Class BTLStructureVM
Next Next
Next Next
Next Next
' aggiorno stato selezionato tutto
Map.refShowBeamPanelVM.bShowAll = False
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False) Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
Map.refProdManagerVM.SetBtlImage(DOWN_IMAGE)
Map.refProdManagerVM.SetOpenImage(DOWN_IMAGE)
Map.refProdManagerVM.SetSaveImage(DOWN_IMAGE)
NotifyPropertyChanged(NameOf(SelBTLPart)) NotifyPropertyChanged(NameOf(SelBTLPart))
If Not bIsReselect AndAlso m_SelBTLParts.Count = 1 Then BtlPart.SetOpenFeatureList(True)
End Sub End Sub
Private Sub DeselectBTLPart(BtlPart As BTLPartVM) Private Sub DeselectBTLPart(BtlPart As BTLPartVM)
' se necessario tolgo solido dal precedentemente selezionato ' se necessario tolgo solido dal precedentemente selezionato
@@ -193,59 +185,6 @@ Public Class BTLStructureVM
BtlPart.SelBTLFeatureVM = Nothing BtlPart.SelBTLFeatureVM = Nothing
End If End If
EgtDraw() EgtDraw()
If m_SelBTLParts.Count = 1 Then
m_SelBTLParts(0).SetOpenFeatureList(True)
End If
If BtlPart.bOpenFeatureList Then
BtlPart.SetOpenFeatureList(False)
End If
End Sub
Public Sub SelectBTLPartScene(BtlPart As BTLPartVM, Optional bIsReselect As Boolean = False)
m_SelBTLPart = BtlPart
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
' resetto gruppo di lavorazione corrente
EgtResetCurrMachGroup()
End If
If Not IsNothing(BtlPart) Then
' gestisco selezione pezzo
EgtBeamShowFacesName(False)
EgtBeamShowLoadingSide(False, False)
Map.refProjectVM.MacroFeature_IsEnabled = True
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
EgtBeamSetPart(BtlPart.nPartId)
EgtBeamShowFacesName(True)
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
Dim MachGroupList As New List(Of MyMachGroupVM)
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
Dim bFound As Boolean = False
For Each Part As PartVM In Machgroup.PartVMList
If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
Part.SetSearchFound()
bFound = True
Else
Part.ResetSearchFound()
End If
Next
If bFound Then
Machgroup.SetSearchFound()
Else
Machgroup.ResetSearchFound()
End If
Next
End If
End If
' seleziono la prima feature
If Not IsNothing(BtlPart) AndAlso Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SetSelFeature(SelBTLPart.SelBTLFeatureVM)
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL)
NotifyPropertyChanged(NameOf(SelBTLPart))
If Not bIsReselect AndAlso m_SelBTLParts.Count = 1 Then BtlPart.SetOpenFeatureList(True)
End Sub End Sub
Private m_SelBTLPart As BTLPartVM = Nothing Private m_SelBTLPart As BTLPartVM = Nothing
@@ -817,6 +756,7 @@ Public Class BTLStructureVM
Private m_cmdDeletePart As ICommand Private m_cmdDeletePart As ICommand
Private m_cmdData As ICommand Private m_cmdData As ICommand
Private m_cmdAddPart As ICommand Private m_cmdAddPart As ICommand
Private m_cmdChangeParameter As ICommand
Private m_cmdUpdateBTL As ICommand Private m_cmdUpdateBTL As ICommand
#Region "Messages" #Region "Messages"
@@ -953,70 +893,6 @@ Public Class BTLStructureVM
DisableMgr.ReEnable() DisableMgr.ReEnable()
End Sub End Sub
Friend Sub ShowAll(Optional bRedraw As Boolean = True, Optional bOnlySelected As Boolean = False)
' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr
If Not IsNothing(SelBTLPart) Then
' se pezzo solido, lo riporto normale
Configuration.DeselectSolid()
' tolgo pezzo selezionato
SelBTLPart.SelBTLFeatureVM = Nothing
End If
' mostro tutti i pezzi
' creo lista id presenti
Dim BTLPartIdList As List(Of Integer) = (From Part In BTLPartVMList
Select Part.nPartId).ToList()
BTLPartIdList.Sort()
Dim nGeomPartId As Integer = EgtGetFirstPart()
While nGeomPartId <> GDB_ID.NULL
Dim CurrPart As BTLPartVM = BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nGeomPartId)
If Not IsNothing(CurrPart) AndAlso Not bOnlySelected Then
Dim nMode As Integer
EgtGetMode(CurrPart.nPartId, nMode)
If nMode <> GDB_MD.STD Then
EgtSetMode(CurrPart.nPartId, GDB_MD.STD)
End If
Else
EgtSetMode(nGeomPartId, GDB_MD.HIDDEN)
End If
nGeomPartId = EgtGetNextPart(nGeomPartId)
End While
' ripristino precedente impostazione modificato
DisableMgr.ReEnable()
Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
EgtZoom(ZM.ALL, bRedraw)
' imposto stato per ShowBeamPanel
If Not bOnlySelected Then Map.refShowBeamPanelVM.bShowAll = True
End Sub
Friend Sub HideAll(Optional bRedraw As Boolean = True)
' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr
If Not IsNothing(SelBTLPart) Then
' se pezzo solido, lo riporto normale
Configuration.DeselectSolid(GDB_ID.NULL, True)
' tolgo pezzo selezionato
SelBTLPart.SelBTLFeatureVM = Nothing
End If
SetSelBTLPart(Nothing)
' nascondo tutti i pezzi
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
Dim nMode As Integer
EgtGetMode(nPartId, nMode)
If nMode <> GDB_MD.HIDDEN Then
EgtSetMode(nPartId, GDB_MD.HIDDEN)
End If
nPartId = EgtGetNextPart(nPartId)
End While
' ripristino precedente impostazione modificato
DisableMgr.ReEnable()
Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
EgtZoom(ZM.ALL, bRedraw)
' imposto stato per ShowBeamPanel
Map.refShowBeamPanelVM.bShowAll = True
End Sub
Friend Sub ShowBuilding(nIdAsseBase As Integer, bShow As Boolean, Optional bRedraw As Boolean = True) Friend Sub ShowBuilding(nIdAsseBase As Integer, bShow As Boolean, Optional bRedraw As Boolean = True)
' disabilito impostazione modificato ' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
@@ -1239,13 +1115,77 @@ Public Class BTLStructureVM
End If End If
End Sub End Sub
Public Sub RemovePart(BTLPartToDelete As BTLPartVM, bSelPrevious As Boolean)
' verifico se ci sono già copie in grezzi
Dim nDuploCount As Integer = 0
If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then
' avviso che il pezzo non è cancellabile perchè in produzione
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning)
Return
End If
' verifico se rimuovere sezione dalla lista
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToDelete AndAlso x.Section = BTLPartToDelete.Section) Then
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToDelete.Section)
Map.refProjectVM.BTLStructureVM.SelSection = SectionXMaterial.Empty
End If
' Eseguo cancellazione
EgtBeamSetPart(BTLPartToDelete.nPartId)
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then RemoveScenePart(BTLPartToDelete)
' seleziono elemento precedente
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete)
Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete)
Map.refProjectVM.BTLStructureVM.SelBTLParts.Remove(BTLPartToDelete)
If EgtBeamErasePart() Then
If bSelPrevious Then
If FilteredIndex = 0 Then
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(1))
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
End If
ElseIf FilteredIndex = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 1 Then
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 2))
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
End If
Else
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(FilteredIndex + 1))
End If
End If
EgtDraw()
' rimuovo dalla lista pezzi
Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
End If
End Sub
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
' Rimuovo pezzo dalla scena
Dim IdAsseBase As Integer = 0
Dim DeletePartId As Integer = 0
If Not Map.refProdManagerVM.ListProjAsseBase.TryGetValue(BTLPartToDelete.nPROJ, IdAsseBase) Then
Return
End If
' Setto il nuovo contesto
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
If Map.refSceneShowBuldingVM.MapInfo.TryGetValue(BTLPartToDelete.nPartId, DeletePartId) Then
EgtErase(DeletePartId)
Map.refSceneShowBuldingVM.MapInfo.Remove(BTLPartToDelete.nPartId)
End If
EgtBeamShowBuilding(IdAsseBase, True)
EgtZoom(ZM.ALL)
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
End Sub
#End Region ' Methods #End Region ' Methods
#Region "COMMANDS" #Region "COMMANDS"
#Region "DeletePart" #Region "DeletePart_Command"
Public ReadOnly Property DeletePart_Command As ICommand Public ReadOnly Property DeletePart_Command() As ICommand
Get Get
If m_cmdDeletePart Is Nothing Then If m_cmdDeletePart Is Nothing Then
m_cmdDeletePart = New Command(AddressOf DeletePart) m_cmdDeletePart = New Command(AddressOf DeletePart)
@@ -1255,12 +1195,22 @@ Public Class BTLStructureVM
End Property End Property
Public Sub DeletePart() Public Sub DeletePart()
Map.refBTLPartManagerVM.RemovePartCmd() If IsNothing(ProjectManagerVM.CurrProd) Then Return
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1
RemovePart(CurrSelBTLParts(RemoveIndex), RemoveIndex = 0)
Next
End If
Else
Return
End If
End Sub End Sub
#End Region ' DeletePart #End Region ' DeletePart_Command
#Region "Data" #Region "Data_Command"
Public ReadOnly Property Data_Command As ICommand Public ReadOnly Property Data_Command As ICommand
Get Get
@@ -1272,13 +1222,13 @@ Public Class BTLStructureVM
End Property End Property
Friend Sub Data(nProjId As Integer) Friend Sub Data(nProjId As Integer)
Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM()) Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM(Map.refProjectVM.BTLStructureVM))
BTLDataWnd.ShowDialog() BTLDataWnd.ShowDialog()
End Sub End Sub
#End Region ' Data #End Region ' Data_Command
#Region "AddPart" #Region "AddPart_Command"
Public ReadOnly Property AddPart_Command As ICommand Public ReadOnly Property AddPart_Command As ICommand
Get Get
@@ -1330,9 +1280,56 @@ Public Class BTLStructureVM
End If End If
End Sub End Sub
#End Region ' AddPart #End Region ' AddPart_Command
#Region "UpdateBTL" #Region "ChangeParameter"
Public ReadOnly Property ChangeParameter_Command As ICommand
Get
If m_cmdChangeParameter Is Nothing Then
m_cmdChangeParameter = New Command(AddressOf ChangeParameter)
End If
Return m_cmdChangeParameter
End Get
End Property
Friend Sub ChangeParameter()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
Dim ChangeParameterWndVM As New ChangeParameterWndVM
Dim ChangeParameterWnd As New ChangeParameterWndV(Application.Current.MainWindow, ChangeParameterWndVM)
If ChangeParameterWnd.ShowDialog() Then
LoadingWndHelper.OpenLoadingWnd(ActiveIds.CHANGEPARAM, 1, EgtMsg(63014), "", 100) ' Modifying parameters
' faccio passare pezzi
If Not IsNothing(ChangeParameterWndVM.SelParam) Then
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
For Each Feature In Part.BTLFeatureVMList.Where(Function(x) x.nPRC = ChangeParameterWndVM.SelPRC.nPRC AndAlso CalcBeamPrivateProfileGRP(x.nSelGRP) = ChangeParameterWndVM.SelPRC.nGRP)
If ChangeParameterWndVM.SelParam.BTLParamM.nType = BTLParamType.CHECKBOX AndAlso Feature.bDO = ChangeParameterWndVM.SelParam.bActualValue Then
Feature.bDO = ChangeParameterWndVM.SelParam.bNewValue
Else
Dim ParamList As ObservableCollection(Of BTLParamVM) = Feature.PBTLParamVMList
For Each Param In ParamList.Where(Function(x) x.sName = ChangeParameterWndVM.SelParam.sName)
Select Case Param.nType
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
If Math.Abs(Param.dValue - ChangeParameterWndVM.SelParam.dActualValue) < EPS_SMALL Then
Param.UpdateParamValue(ChangeParameterWndVM.SelParam.dNewValue, "")
End If
Case BTLParamType.STRING_
If Param.sValue = ChangeParameterWndVM.SelParam.sActualValue Then
Param.UpdateParamValue(0, ChangeParameterWndVM.SelParam.sNewValue)
End If
End Select
Next
End If
Next
Next
End If
LoadingWndHelper.CloseLoadingWnd(ActiveIds.CHANGEPARAM)
End If
End Sub
#End Region ' ChangeParameter
#Region "UpdateBTL_Command"
Public ReadOnly Property UpdateBTL_Command As ICommand Public ReadOnly Property UpdateBTL_Command As ICommand
Get Get
@@ -1359,23 +1356,23 @@ Public Class BTLStructureVM
End If End If
' se vista tutti i pezzi ' se vista tutti i pezzi
Dim bShowBuilding As Boolean = False 'Dim bShowBuilding As Boolean = False
Dim bShowSolid As Boolean = False 'Dim bShowSolid As Boolean = False
Dim nSelPartId As Integer = GDB_ID.NULL 'Dim nSelPartId As Integer = GDB_ID.NULL
If Map.refShowBeamPanelVM.bShowAll Then 'If Map.refShowBeamPanelVM.bShowAll Then
' verifico se assemblato e lo annullo per salvataggio ' ' verifico se assemblato e lo annullo per salvataggio
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked ' bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False) ' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
' se vista singolo pezzo ' ' se vista singolo pezzo
Else 'Else
bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked ' bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False) ' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
' se pezzo selezionato lo segno e metto vista tutti ' ' se pezzo selezionato lo segno e metto vista tutti
If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then ' If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId ' nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
End If ' End If
Map.refProjectVM.BTLStructureVM.ShowAll(False) ' Map.refProjectVM.BTLStructureVM.ShowAll(False)
End If 'End If
Dim sDir As String = String.Empty Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTUPDATEDIR, "", sDir) GetMainPrivateProfileString(S_GENERAL, K_LASTUPDATEDIR, "", sDir)
@@ -1393,15 +1390,15 @@ Public Class BTLStructureVM
If BTLDlg.ShowDialog() Then If BTLDlg.ShowDialog() Then
sFile = BTLDlg.FileName sFile = BTLDlg.FileName
Else Else
' se assemblato lo ripristino '' se assemblato lo ripristino
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False) 'If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
If nSelPartId <> GDB_ID.NULL Then 'If nSelPartId <> GDB_ID.NULL Then
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId) ' Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
If Not IsNothing(SelPart) Then ' If Not IsNothing(SelPart) Then
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False) ' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
End If ' End If
End If 'End If
EgtZoom(ZM.ALL) 'EgtZoom(ZM.ALL)
Return Return
End If End If
End If End If
@@ -1490,6 +1487,9 @@ Public Class BTLStructureVM
nAsseBaseSubNodeId = EgtGetNext(nAsseBaseSubNodeId) nAsseBaseSubNodeId = EgtGetNext(nAsseBaseSubNodeId)
End While End While
' imposto numero del progetto su assebase
EgtSetInfo(AsseBaseId, PROJ, nProjId)
' salvo il file BTL da cui abbiamo rimosso BtlInfo come file NGE ' salvo il file BTL da cui abbiamo rimosso BtlInfo come file NGE
EgtSaveFile(Map.refMainWindowVM.MainWindowM.sTempDir & "\" & UPDATEBTL_NGE, NGE.CMPTEXT) EgtSaveFile(Map.refMainWindowVM.MainWindowM.sTempDir & "\" & UPDATEBTL_NGE, NGE.CMPTEXT)
@@ -1509,16 +1509,16 @@ Public Class BTLStructureVM
EgtDeleteContext(nTempCtx) EgtDeleteContext(nTempCtx)
' rileggo la struttura BTL ' rileggo la struttura BTL
ReloadBTLStructure() ReloadBTLStructure()
' se assemblato lo ripristino '' se assemblato lo ripristino
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False) 'If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
If nSelPartId <> GDB_ID.NULL Then 'If nSelPartId <> GDB_ID.NULL Then
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId) ' Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
If Not IsNothing(SelPart) Then ' If Not IsNothing(SelPart) Then
'SelPart.IsSelected = True ' 'SelPart.IsSelected = True
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False) ' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
End If ' End If
End If 'End If
EgtZoom(ZM.ALL) 'EgtZoom(ZM.ALL)
Return Return
End If End If
' salvo lo stato del bottone per accodare ' salvo lo stato del bottone per accodare
@@ -1571,6 +1571,8 @@ Public Class BTLStructureVM
While nAddedPartId <> GDB_ID.NULL While nAddedPartId <> GDB_ID.NULL
' incremento il PDN del Part aggiunto rispetto al PDN maggiore attualmente presente ' incremento il PDN del Part aggiunto rispetto al PDN maggiore attualmente presente
EgtSetInfo(nAddedPartId, BTL_PRT_PDN, Map.refProjectVM.BTLStructureVM.BTLStructureM.NewPDN() + nIncrPDN) EgtSetInfo(nAddedPartId, BTL_PRT_PDN, Map.refProjectVM.BTLStructureVM.BTLStructureM.NewPDN() + nIncrPDN)
' scrivo in ogni pezzo ProjId
EgtSetInfo(nAddedPartId, BTL_PRT_PROJ, nProjId)
' recupero layer del box ' recupero layer del box
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nAddedPartId, "Box") Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nAddedPartId, "Box")
' recupero box del layer box ' recupero box del layer box
@@ -1626,23 +1628,23 @@ Public Class BTLStructureVM
' rileggo la struttura BTL ' rileggo la struttura BTL
ReloadBTLStructure() ReloadBTLStructure()
' se assemblato lo ripristino ' se assemblato lo ripristino
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False) 'If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
If nSelPartId <> GDB_ID.NULL Then 'If nSelPartId <> GDB_ID.NULL Then
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId) ' Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
If Not IsNothing(SelPart) Then ' If Not IsNothing(SelPart) Then
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False) ' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
End If ' End If
End If 'End If
EgtZoom(ZM.ALL) 'EgtZoom(ZM.ALL)
Return Return
End If End If
' sovrascrivo i Part nel progetto aperto con i Part checkati nella lista
If UpdateBTLWndVM.BTLPartList.Count > 0 Then If UpdateBTLWndVM.BTLPartList.Count > 0 Then
' sovrascrivo i Part nel progetto aperto con i Part checkati nella lista Dim BTLPartToUpdateId As New List(Of Integer)
Dim BTLPartToOverwriteWithList As New ObservableCollection(Of BTLPartToUpdate)
' Elimino dal TempCtx i Part non checkati ' Elimino dal TempCtx i Part non checkati
For Each BTLPartToOverwriteWith In UpdateBTLWndVM.BTLPartList For Each BTLPartToOverwriteWith In UpdateBTLWndVM.BTLPartList
If BTLPartToOverwriteWith.bInsert Then If BTLPartToOverwriteWith.bInsert Then
BTLPartToOverwriteWithList.Add(BTLPartToOverwriteWith) BTLPartToUpdateId.Add(BTLPartToOverwriteWith.nPartId)
Else Else
' elimino pezzo copia ' elimino pezzo copia
Dim nCurrPartId = EgtGetCurrPart() Dim nCurrPartId = EgtGetCurrPart()
@@ -1655,37 +1657,20 @@ Public Class BTLStructureVM
' nei soli Part checkati del BTL nella finestra UpdateBTLWnd ' nei soli Part checkati del BTL nella finestra UpdateBTLWnd
Dim NewAsseBaseSubNodeDict As New Dictionary(Of Integer, Integer) Dim NewAsseBaseSubNodeDict As New Dictionary(Of Integer, Integer)
For Each AsseBaseSubNodeItem In AsseBaseSubNodeDict For Each AsseBaseSubNodeItem In AsseBaseSubNodeDict
For Each BTLPartToOverwriteWithItem In BTLPartToOverwriteWithList Dim Sou As Integer = 0
Dim bExitFor As Boolean = False EgtGetInfo(AsseBaseSubNodeItem.Key, "!SOU", Sou)
For Each UIDItem In BTLPartToOverwriteWithItem.UIDList If BTLPartToUpdateId.Contains(Sou) Then
If AsseBaseSubNodeItem.Value = UIDItem Then NewAsseBaseSubNodeDict.Add(AsseBaseSubNodeItem.Key, AsseBaseSubNodeItem.Value)
NewAsseBaseSubNodeDict.Add(AsseBaseSubNodeItem.Key, AsseBaseSubNodeItem.Value) Else
bExitFor = True
Exit For
End If
Next
If bExitFor Then Exit For
Next
Next
' confronto la lista appena costruita con quella originale ed elimino dal contesto i sottonodi con i valori non più presenti
For Each AsseBaseSubNodeItem In AsseBaseSubNodeDict
If Not NewAsseBaseSubNodeDict.ContainsValue(AsseBaseSubNodeItem.Value) Then
EgtErase(AsseBaseSubNodeItem.Key) EgtErase(AsseBaseSubNodeItem.Key)
End If End If
Next Next
' salvo il file NGE inserito a cui abbiamo rimosso i Part non checkati e gli AsseBase non più associati
EgtSaveFile(Map.refMainWindowVM.MainWindowM.sTempDir & "\" & UPDATEBTL_NGE, NGE.CMPTEXT)
' torno sul contesto corrente
EgtDeleteContext(nTempCtx)
EgtSetCurrentContext(nCurrCtx)
' aggiungo informazioni su pezzi ' aggiungo informazioni su pezzi
Dim nPartId As Integer = EgtGetFirstPart(GDB_ID.ROOT) Dim nPartId As Integer = EgtGetFirstPart(GDB_ID.ROOT)
While nPartId <> GDB_ID.NULL While nPartId <> GDB_ID.NULL
' scrivo in ogni pezzo ProjId ' scrivo in ogni pezzo ProjId
EgtSetInfo(nPartId, BTL_PRT_PROJ, ProjectManagerVM.CurrProd.nProjId) EgtSetInfo(nPartId, BTL_PRT_PROJ, nProjId)
' scrivo Id negli outline ' scrivo Id negli outline
Dim nPRId As Integer = 1 Dim nPRId As Integer = 1
Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE) Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
@@ -1702,14 +1687,31 @@ Public Class BTLStructureVM
End If End If
nPartId = EgtGetNextPart(nPartId) nPartId = EgtGetNextPart(nPartId)
End While End While
' scrivo info proj e type su layer BtlInfo
Dim nBTLInfoLayer As Integer = EgtGetLastNameInGroup(GDB_ID.ROOT, BTLINFO) ' salvo il file NGE inserito a cui abbiamo rimosso i Part non checkati e gli AsseBase non più associati
EgtSetInfo(nBTLInfoLayer, BTL_PRT_PROJ, ProjectManagerVM.CurrProd.nProjId) EgtSaveFile(Map.refMainWindowVM.MainWindowM.sTempDir & "\" & UPDATEBTL_NGE, NGE.CMPTEXT)
EgtSetInfo(nBTLInfoLayer, BTL_GEN_PROJTYPE, nType)
' torno sul contesto corrente
EgtDeleteContext(nTempCtx)
EgtSetCurrentContext(nCurrCtx)
' rileggo la struttura BTL del progetto corrente per non avere quella del contesto temporaneo ancora presente ' rileggo la struttura BTL del progetto corrente per non avere quella del contesto temporaneo ancora presente
ReloadBTLStructure() ReloadBTLStructure()
' salvo gli id degli AsseBase presenti nel progetto corrente
Dim AsseBaseIdList As New List(Of Integer)
Dim AsseBaseList As New List(Of Integer)
AsseBaseId = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
While AsseBaseId <> GDB_ID.NULL
AsseBaseIdList.Add(AsseBaseId)
Dim tmpAsseBaseId = EgtGetFirstInGroup(AsseBaseId)
While tmpAsseBaseId <> GDB_ID.NULL
AsseBaseList.Add(tmpAsseBaseId)
tmpAsseBaseId = EgtGetNext(tmpAsseBaseId)
End While
AsseBaseId = EgtGetNextName(AsseBaseId, ASSEBASE)
End While
' elimino i pezzi da sovrascrivere nel progetto corrente ' elimino i pezzi da sovrascrivere nel progetto corrente
For Each BTLPartToOverwriteWith In UpdateBTLWndVM.BTLPartList For Each BTLPartToOverwriteWith In UpdateBTLWndVM.BTLPartList
If BTLPartToOverwriteWith.bInsert Then If BTLPartToOverwriteWith.bInsert Then
@@ -1720,6 +1722,13 @@ Public Class BTLStructureVM
Dim nCurrPartId = EgtGetCurrPart() Dim nCurrPartId = EgtGetCurrPart()
EgtErase(nPartToDeleteId) EgtErase(nPartToDeleteId)
nCurrPartId = EgtGetCurrPart() nCurrPartId = EgtGetCurrPart()
For Each AsseBaseListItem As Integer In AsseBaseList
Dim Sou As Integer = GDB_ID.NULL
EgtGetInfo(AsseBaseListItem, "!SOU", Sou)
If Sou = nPartToDeleteId Then
EgtErase(AsseBaseListItem)
End If
Next
' verifico se rimuovere sezione dalla lista ' verifico se rimuovere sezione dalla lista
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToUpdate AndAlso x.Section = BTLPartToUpdate.Section) Then If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToUpdate AndAlso x.Section = BTLPartToUpdate.Section) Then
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToUpdate.Section) Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToUpdate.Section)
@@ -1732,28 +1741,6 @@ Public Class BTLStructureVM
End If End If
Next Next
' salvo gli id degli AsseBase presenti nel progetto corrente
Dim AsseBaseIdList As New List(Of Integer)
AsseBaseId = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
While AsseBaseId <> GDB_ID.NULL
AsseBaseIdList.Add(AsseBaseId)
' elimino i sottonodi di AsseBase da sovrascrivere
AsseBaseId = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
nAsseBaseSubNodeId = EgtGetFirstInGroup(AsseBaseId)
'While nAsseBaseSubNodeId <> GDB_ID.NULL
' If NewAsseBaseSubNodeDict.ContainsKey(nAsseBaseSubNodeId) Then
' ' se sottonodo da cancellare salvo il suo id e ricavo il seguente prima di cancellarlo
' Dim nCurrAsseBaseSubNodeId = nAsseBaseSubNodeId
' nAsseBaseSubNodeId = EgtGetNext(nCurrAsseBaseSubNodeId)
' bOk = EgtErase(nCurrAsseBaseSubNodeId)
' Else
' ' altrimenti ricavo il seguente e basta
' nAsseBaseSubNodeId = EgtGetNext(nAsseBaseSubNodeId)
' End If
'End While
AsseBaseId = EgtGetNextName(AsseBaseId, ASSEBASE)
End While
' calcolo BBox globale del progetto corrente ' calcolo BBox globale del progetto corrente
Dim b3Parts As New BBox3d Dim b3Parts As New BBox3d
Dim nProjPartId As Integer = EgtGetFirstPart() Dim nProjPartId As Integer = EgtGetFirstPart()
@@ -1781,7 +1768,7 @@ Public Class BTLStructureVM
Dim nAsseBaseToEraseId As Integer = 0 Dim nAsseBaseToEraseId As Integer = 0
EgtGetInfo(nAsseBaseId, BTL_PRT_PROJ, nAsseBaseProjId) EgtGetInfo(nAsseBaseId, BTL_PRT_PROJ, nAsseBaseProjId)
' se AsseBase di questo step del ciclo è nuovo e suo ProjId uguale a quello del progetto corrente ' se AsseBase di questo step del ciclo è nuovo e suo ProjId uguale a quello del progetto corrente
If Not AsseBaseIdList.Contains(nAsseBaseId) AndAlso nAsseBaseProjId = CurrProd.nProdId Then If Not AsseBaseIdList.Contains(nAsseBaseId) AndAlso nAsseBaseProjId = nProjId Then
' riloco i sottonodi del nuovo AsseBase nell'AsseBase del progetto aperto col medesimo ProjId ' riloco i sottonodi del nuovo AsseBase nell'AsseBase del progetto aperto col medesimo ProjId
Dim AsseBaseSubNodeId As Integer = EgtGetFirstInGroup(nAsseBaseId) Dim AsseBaseSubNodeId As Integer = EgtGetFirstInGroup(nAsseBaseId)
While AsseBaseSubNodeId <> GDB_ID.NULL While AsseBaseSubNodeId <> GDB_ID.NULL
@@ -1791,7 +1778,7 @@ Public Class BTLStructureVM
Dim SameAsseBaseProjId As Integer Dim SameAsseBaseProjId As Integer
EgtGetInfo(FindAsseBaseId, BTL_PRT_PROJ, SameAsseBaseProjId) EgtGetInfo(FindAsseBaseId, BTL_PRT_PROJ, SameAsseBaseProjId)
' se l'ho trovato esco dal While (FindAsseBaseId è l'id dell'AsseBase in cui vogliamo rilocare i sottonodi) ' se l'ho trovato esco dal While (FindAsseBaseId è l'id dell'AsseBase in cui vogliamo rilocare i sottonodi)
If SameAsseBaseProjId = CurrProd.nProdId Then Exit While If SameAsseBaseProjId = nProjId Then Exit While
FindAsseBaseId = EgtGetNextName(FindAsseBaseId, ASSEBASE) FindAsseBaseId = EgtGetNextName(FindAsseBaseId, ASSEBASE)
End While End While
' salvo id dell'AsseBase corrente per ottenere il seguente prima di rilocarlo ' salvo id dell'AsseBase corrente per ottenere il seguente prima di rilocarlo
@@ -1854,25 +1841,31 @@ Public Class BTLStructureVM
' copio il file originale scelto nel dialog per l'Update nella cartella Proj del progetto corrente ' copio il file originale scelto nel dialog per l'Update nella cartella Proj del progetto corrente
If File.Exists(sFile) Then If File.Exists(sFile) Then
'Dim sDestPath As String = ProjectManagerVM.CurrProj.sProjDirPath & "\" & Path.GetFileNameWithoutExtension(sFile) 'Dim sDestPath As String = ProjectManagerVM.CurrProj.sProjDirPath & "\" & Path.GetFileNameWithoutExtension(sFile)
Dim sDestPath As String = CurrProd.sProdDirPath & "\Projs\" & ProjectManagerVM.CurrProd.nProjIdList(0).ToString("0000") & "\" & Path.GetFileNameWithoutExtension(sFile) Dim sDestPath As String = CurrProd.sProdDirPath & "\Projs\" & nProjId.ToString("0000") & "\" & Path.GetFileNameWithoutExtension(sFile)
While File.Exists(sDestPath & ".btl") If File.Exists(sDestPath & ".btl") Then
sDestPath &= "_1" Dim nIndex As Integer = 1
End While While File.Exists(sDestPath & ".btl")
sDestPath &= "_" & nIndex.ToString()
End While
End If
File.Copy(sFile, sDestPath & ".btl", False) File.Copy(sFile, sDestPath & ".btl", False)
End If End If
End If End If
' se assemblato lo ripristino '' se assemblato lo ripristino
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False) 'If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
If nSelPartId <> GDB_ID.NULL Then 'If nSelPartId <> GDB_ID.NULL Then
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId) ' Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
If Not IsNothing(SelPart) Then ' If Not IsNothing(SelPart) Then
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False) ' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
End If ' End If
'End If
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
Map.refProjectVM.BTLStructureVM.SelectBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
End If End If
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
End Sub End Sub
#End Region ' UpdateBTL #End Region ' UpdateBTL_Command
#End Region ' Commands #End Region ' Commands
@@ -19,8 +19,10 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding Msg_Text}" Text="{Binding Msg_Text}"
Style="{StaticResource Msg_TextBlock}"/> TextAlignment="Center"
<Grid Style="{StaticResource BlockedWnd_Grid}"> Margin="40,0,40,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<Grid Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -33,12 +35,14 @@
IsDefault="True" IsDefault="True"
Command="{Binding Save_Command}" Command="{Binding Save_Command}"
Visibility="{Binding Buttons_Visibility}" Visibility="{Binding Buttons_Visibility}"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Grid.Column="3" <Button Grid.Column="3"
Content="{Binding DoNotSave_Msg}" Content="{Binding DoNotSave_Msg}"
Command="{Binding DoNotSave_Command}" Command="{Binding DoNotSave_Command}"
Visibility="{Binding Buttons_Visibility}" Visibility="{Binding Buttons_Visibility}"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</Grid> </Grid>
</Grid> </Grid>
@@ -112,7 +112,7 @@ Public Class BlockedWndVM
#Region "COMMANDS" #Region "COMMANDS"
#Region "Save" #Region "Save_Command"
Public ReadOnly Property Save_Command As ICommand Public ReadOnly Property Save_Command As ICommand
Get Get
@@ -130,9 +130,9 @@ Public Class BlockedWndVM
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "") DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
End Sub End Sub
#End Region ' Save #End Region ' Save_Command
#Region "DoNotSave" #Region "DoNotSave_Command"
Public ReadOnly Property DoNotSave_Command As ICommand Public ReadOnly Property DoNotSave_Command As ICommand
Get Get
@@ -148,7 +148,7 @@ Public Class BlockedWndVM
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "") DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
End Sub End Sub
#End Region ' DoNotSave #End Region ' DoNotSave_Command
#End Region ' COMMANDS #End Region ' COMMANDS
+69 -15
View File
@@ -3,6 +3,7 @@ Imports System.IO
Imports System.Threading Imports System.Threading
Imports System.Windows.Threading Imports System.Windows.Threading
Imports EgtBEAMWALL.Core Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Core.CalcIntegration
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgwMultiEngineManager.Data Imports EgwMultiEngineManager.Data
@@ -70,6 +71,17 @@ Public Class CALCPanelVM
NotifyPropertyChanged(NameOf(ChooseMachine_Visibility)) NotifyPropertyChanged(NameOf(ChooseMachine_Visibility))
End Sub End Sub
Private m_ChooseMachine_IsEnabled As Boolean = False
Public ReadOnly Property ChooseMachine_IsEnabled As Boolean
Get
Return m_ChooseMachine_IsEnabled
End Get
End Property
Friend Sub SetChooseMachine_IsEnabled(IsEnabled As Boolean)
m_ChooseMachine_IsEnabled = IsEnabled
NotifyPropertyChanged(NameOf(ChooseMachine_IsEnabled))
End Sub
' Lista delle macchine disponibili per il tipo di progetto corrente ' Lista delle macchine disponibili per il tipo di progetto corrente
Private m_MachineList As New ObservableCollection(Of Machine) Private m_MachineList As New ObservableCollection(Of Machine)
Public Property MachineList As ObservableCollection(Of Machine) Public Property MachineList As ObservableCollection(Of Machine)
@@ -133,6 +145,7 @@ Public Class CALCPanelVM
Sub New() Sub New()
' imposto riferimento in Map ' imposto riferimento in Map
Map.SetRefCALCPanelVM(Me) Map.SetRefCALCPanelVM(Me)
SetChooseMachine_IsEnabled(False)
Core.CalcIntegration.SetMaxCamInstances(Map.refMainWindowVM.MainWindowM.GetMaxCamInstances()) Core.CalcIntegration.SetMaxCamInstances(Map.refMainWindowVM.MainWindowM.GetMaxCamInstances())
AddHandler Core.CalcIntegration.Calc_ProcessResult, AddressOf Calc_ProcessResult AddHandler Core.CalcIntegration.Calc_ProcessResult, AddressOf Calc_ProcessResult
AddHandler Core.CalcIntegration.Calc_Ended, AddressOf Calc_Ended AddHandler Core.CalcIntegration.Calc_Ended, AddressOf Calc_Ended
@@ -149,7 +162,7 @@ Public Class CALCPanelVM
ProcessResults(e.m_Result) ProcessResults(e.m_Result)
End Sub End Sub
Private Sub Calc_Ended(sender As Object, e As CalcEndEventArgs) Friend Sub Calc_Ended(sender As Object, e As CalcEndEventArgs)
If e.End_ = CalcEndEventArgs.Results.ERROR_ OrElse e.End_ = CalcEndEventArgs.Results.NULL Then If e.End_ = CalcEndEventArgs.Results.ERROR_ OrElse e.End_ = CalcEndEventArgs.Results.NULL Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62540)) EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62540))
End If End If
@@ -161,10 +174,31 @@ Public Class CALCPanelVM
If e.CmdType = CmdTypes.CHECKGEN Then If e.CmdType = CmdTypes.CHECKGEN Then
Map.refProdManagerVM.Save() Map.refProdManagerVM.Save()
End If End If
' se modalita' assemblato attiva Map.refProjectVM.SetCalcRunning(False)
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then Map.refMyStatusBarVM.ResetStopProgress()
' lo rimonto ' se lanciato dal produci, eseguo produci
Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False) If m_FromProduce <> ProduceType.NULL Then
Select Case m_FromProduce
Case ProduceType.PRODUCE
Map.refRawPartManagerVM.ProduceRawPart()
Case ProduceType.PRODUCEALL
Map.refRawPartManagerVM.ProduceAllRawPart()
End Select
m_FromProduce = ProduceType.NULL
End If
End Sub
Friend Sub Calc_Ended(CmdType As CmdTypes)
'If e.End_ = CalcEndEventArgs.Results.ERROR_ OrElse e.End_ = CalcEndEventArgs.Results.NULL Then
' EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62540))
'End If
If CmdType = CmdTypes.EDIT Then
Map.refMyStatusBarVM.SetOutputMessage("Editor closed")
m_ReloadEditedFile = True
End If
' se verify o verifyall, salvo il progetto per conservarne gli stati calcolati
If CmdType = CmdTypes.CHECKGEN OrElse CmdType = CmdTypes.CHECKNOSIM Then
Map.refProdManagerVM.Save()
End If End If
Map.refProjectVM.SetCalcRunning(False) Map.refProjectVM.SetCalcRunning(False)
Map.refMyStatusBarVM.ResetStopProgress() Map.refMyStatusBarVM.ResetStopProgress()
@@ -281,16 +315,18 @@ Public Class CALCPanelVM
Else Else
' Inizializzo i pezzi del gruppo di lavoro in verifica ' Inizializzo i pezzi del gruppo di lavoro in verifica
Dim Machgroup As MyMachGroupVM = GetMachgroupVMFromMachgroupId(nBarId) Dim Machgroup As MyMachGroupVM = GetMachgroupVMFromMachgroupId(nBarId)
For Each Part As PartVM In Machgroup.PartVMList If Not IsNothing(Machgroup) Then
Part.CalcPartUpdate(0, 0, "") For Each Part As PartVM In Machgroup.PartVMList
' Resetto feature in collisione Part.CalcPartUpdate(0, 0, "")
For Each Feature As BTLFeatureVM In Part.FeatureVMList ' Resetto feature in collisione
If Feature.nState = CalcStates.COLLISION Then For Each Feature As BTLFeatureVM In Part.FeatureVMList
Feature.ResetFeatureError() If Feature.nState = CalcStates.COLLISION Then
End If Feature.ResetFeatureError()
End If
Next
Next Next
Next Machgroup.CalcMachGroupUpdate(0, 0, "")
Machgroup.CalcMachGroupUpdate(0, 0, "") End If
End If End If
' Ciclo ... ' Ciclo ...
Dim nCUTID As Integer = -1 Dim nCUTID As Integer = -1
@@ -406,9 +442,24 @@ Public Class CALCPanelVM
End If End If
Else Else
' do errore
bErrors = True bErrors = True
nLastErr = 25 nLastErr = 25
sLastMsg = "Execution Error" sLastMsg = "Execution Error"
' riattivo comunque righe
If nProgramPage = ProjectType.PROJ Then
Dim BTLPart As BTLPartVM = GetBTLPartVMFromBTLPartId(nBarId)
BTLPart.SetIsRowEnabled(True)
BTLPart.CalcGlobalUpdate()
Else
Dim Machgroup As MyMachGroupVM = GetMachgroupVMFromMachgroupId(nBarId)
For Each Part In Machgroup.PartVMList
Part.CalcGlobalUpdate()
Next
Machgroup.SetIsRowEnabled(True)
Machgroup.CalcGlobalUpdate()
End If
End If End If
End Sub End Sub
@@ -557,6 +608,7 @@ Public Class CALCPanelVM
Private Sub VerifyProjWithEngine(CurrPart As BTLPartVM, CmdType As Integer) Private Sub VerifyProjWithEngine(CurrPart As BTLPartVM, CmdType As Integer)
If Not CurrPart.bDO Then Return If Not CurrPart.bDO Then Return
CurrPart.SetIsRowEnabled(False)
Dim Args As New Dictionary(Of String, String) Dim Args As New Dictionary(Of String, String)
Args.Add("BarId", CurrPart.nPartId) Args.Add("BarId", CurrPart.nPartId)
Args.Add("ProgramPage", ProjectType.PROJ) Args.Add("ProgramPage", ProjectType.PROJ)
@@ -607,6 +659,7 @@ Public Class CALCPanelVM
Private Sub VerifyProdWithEngine(CurrMachGroup As MyMachGroupVM) Private Sub VerifyProdWithEngine(CurrMachGroup As MyMachGroupVM)
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra ' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Return If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Return
CurrMachGroup.SetIsRowEnabled(False)
Dim Args As New Dictionary(Of String, String) Dim Args As New Dictionary(Of String, String)
Args.Add("BarId", CurrMachGroup.Id) Args.Add("BarId", CurrMachGroup.Id)
Args.Add("ProgramPage", ProjectType.PROD) Args.Add("ProgramPage", ProjectType.PROD)
@@ -803,7 +856,7 @@ Public Class CALCPanelVM
Map.refMyStatusBarVM.MaximumValue = Map.refMachGroupPanelVM.MachGroupVMList.Count Map.refMyStatusBarVM.MaximumValue = Map.refMachGroupPanelVM.MachGroupVMList.Count
For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra ' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If DirectCast(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), MyMachGroupVM).nProduction_State >= ItemState.Assigned Then Return If DirectCast(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), MyMachGroupVM).nProduction_State >= ItemState.Assigned Then Continue For
VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex)) VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex))
Next Next
End If End If
@@ -979,6 +1032,7 @@ Public Class CALCPanelVM
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0)) Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
End If End If
Map.refProjectVM.BTLStructureVM.LoadFilters()
Map.refMyStatusBarVM.RefreshMachName() Map.refMyStatusBarVM.RefreshMachName()
End Sub End Sub
@@ -1,19 +1,22 @@
<StackPanel x:Class="CalcPanelV" <StackPanel x:Class="CalcPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource PartManager_StackPanel}"> Orientation="Horizontal">
<Button ToolTip="{Binding ChooseMachine_ToolTip}" <Button ToolTip="{Binding ChooseMachine_ToolTip}"
Command="{Binding ChooseMachine_Command}" Command="{Binding ChooseMachine_Command}"
IsEnabled="{Binding CALCPanel_IsEnabled}" IsEnabled="{Binding ChooseMachine_IsEnabled}"
Visibility="{Binding ChooseMachineBtn_Visibility}" Visibility="{Binding ChooseMachineBtn_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource ChooseMachine_Image}" <Image Source="{StaticResource ChooseMachine_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Grid Visibility="{Binding ChooseMachine_Visibility}" <Grid Visibility="{Binding ChooseMachine_Visibility}"
Style="{StaticResource CalcPanel_Grid}"> Margin="0,0,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -23,11 +26,18 @@
DisplayMemberPath="Name" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedItem="{Binding Path=SelectedMachine}"
SelectedValuePath="Name" SelectedValuePath="Name"
Style="{StaticResource CalcPanel_ComboBox}"/> Height="22"
Width="150"
Style="{StaticResource Optmizer_ComboBox}"/>
<Button Grid.Column="1" <Button Grid.Column="1"
Content="OK" Content="OK"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
Style="{StaticResource CalcPanel_Button}"/> FontWeight="Light"
FontSize="10"
Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
@@ -7,14 +7,15 @@
Title="ChangeMaterialWnd" Title="ChangeMaterialWnd"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Style="{StaticResource ChangeMaterialWnd_Grid}"> <Grid HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -24,28 +25,41 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding ProjMaterial_Msg}" <TextBlock Text="{Binding ProjMaterial_Msg}"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ProjMaterialList}" ItemsSource="{Binding ProjMaterialList}"
SelectedItem="{Binding SelProjMaterial}" SelectedItem="{Binding SelProjMaterial}"
Style="{StaticResource ProjMaterial_ComboBox}"/> Height="24"
MinWidth="55"
Width="150"
Margin="5,-2,0,5"/>
</Grid> </Grid>
<Grid Grid.Row="1" <Grid Grid.Row="1"
Style="{StaticResource ChangeMaterialWnd_Grid}"> HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding WjMaterial_Msg}" <TextBlock Text="{Binding WjMaterial_Msg}"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding WhMaterialList}" ItemsSource="{Binding WhMaterialList}"
SelectedItem="{Binding SelWhMaterial}" SelectedItem="{Binding SelWhMaterial}"
Style="{StaticResource ProjMaterial_ComboBox}"/> Height="24"
MinWidth="55"
Width="150"
Margin="5,-2,0,5"/>
</Grid> </Grid>
<Grid Grid.Row="2" <Grid Grid.Row="2"
Style="{StaticResource AddPartWnd_Grid}"> Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -57,11 +71,13 @@
Content="{Binding Ok_Msg}" Content="{Binding Ok_Msg}"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Grid.Column="3" <Button Grid.Column="3"
Content="{Binding Cancel_Msg}" Content="{Binding Cancel_Msg}"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</Grid> </Grid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtBEAMWALLCORE:OptimizerWindow>
@@ -5,11 +5,11 @@
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
SizeToContent="Height" SizeToContent="Height"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
Width="300" Width="400"
Title="ChangeParameterWnd" Title="ChangeParameterWnd"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
@@ -27,26 +27,41 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="Process" <TextBlock Text="Process"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding PRCList}" ItemsSource="{Binding PRCList}"
SelectedItem="{Binding SelPRC}" SelectedItem="{Binding SelPRC}"
DisplayMemberPath="ghDesc" DisplayMemberPath="ghDesc"
Style="{StaticResource PRCList_ComboBox}"/> HorizontalAlignment="Stretch"
Height="24"
MinWidth="55"
Margin="5,-2,0,5"/>
<TextBlock Grid.Row="2" <TextBlock Grid.Row="2"
Text="Parameter" Text="Parameter"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<ComboBox Grid.Row="2" <ComboBox Grid.Row="2"
Grid.Column="1" Grid.Column="1"
ItemsSource="{Binding ParamList}" ItemsSource="{Binding ParamList}"
SelectedItem="{Binding SelParam}" SelectedItem="{Binding SelParam}"
DisplayMemberPath="sNameAndDescription" DisplayMemberPath="sNameAndDescription"
Style="{StaticResource PRCList_ComboBox}"/> HorizontalAlignment="Stretch"
Height="24"
MinWidth="55"
Margin="5,-2,0,5"/>
<TextBlock Grid.Row="4" <TextBlock Grid.Row="4"
Text="Actual value" Text="Actual value"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Row="4" <EgtWPFLib5:EgtTextBox Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Text="{Binding SelParam.sActualValue}" Text="{Binding SelParam.sActualValue}"
@@ -55,11 +70,15 @@
Grid.Column="1" Grid.Column="1"
IsChecked="{Binding SelParam.bActualValue}" IsChecked="{Binding SelParam.bActualValue}"
Visibility="{Binding SelParam.IsCheckBox_Visibility}" Visibility="{Binding SelParam.IsCheckBox_Visibility}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<TextBlock Grid.Row="6" <TextBlock Grid.Row="6"
Text="New Value" Text="New Value"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Row="6" <EgtWPFLib5:EgtTextBox Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Text="{Binding SelParam.sNewValue}" Text="{Binding SelParam.sNewValue}"
@@ -68,11 +87,12 @@
Grid.Column="1" Grid.Column="1"
IsChecked="{Binding SelParam.bNewValue}" IsChecked="{Binding SelParam.bNewValue}"
Visibility="{Binding SelParam.IsCheckBox_Visibility}" Visibility="{Binding SelParam.IsCheckBox_Visibility}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<Grid Grid.Row="8" <Grid Grid.Row="8"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{StaticResource AddPartWnd_Grid}"> Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -84,11 +104,13 @@
Content="Ok" Content="Ok"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Grid.Column="3" <Button Grid.Column="3"
Content="Cancel" Content="Cancel"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</Grid> </Grid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtBEAMWALLCORE:OptimizerWindow>
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{DynamicResource ConfigurationPageVM}"> DataContext="{StaticResource ConfigurationPageVM}">
<OPTIMIZER:MachinePanelV DataContext="{Binding MachinePanelVM}"/> <OPTIMIZER:MachinePanelV DataContext="{Binding MachinePanelVM}"/>
@@ -1,7 +1,6 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.IO Imports System.IO
Imports System.IO.Compression Imports System.IO.Compression
Imports System.Reflection
Imports EgtBEAMWALL.Core Imports EgtBEAMWALL.Core
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
@@ -25,22 +24,9 @@ Public Class ConfigurationPageVM
Set(value As Integer) Set(value As Integer)
m_SelConfigSubPage = value m_SelConfigSubPage = value
If m_SelConfigSubPage = ConfigSubPages.GENERAL Then If m_SelConfigSubPage = ConfigSubPages.GENERAL Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(True)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(False)
ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(False)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(False) SetPDFEditor_Visibility(False)
ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetPDFEditor_Visibility(True) SetPDFEditor_Visibility(True)
SetGeneral_Visibility(False)
SetStrategyManager_Visibility(False) SetStrategyManager_Visibility(False)
End If End If
End Set End Set
@@ -82,6 +68,7 @@ Public Class ConfigurationPageVM
End Get End Get
End Property End Property
Public OrigSelectedLanguage As Language
Private m_SelectedLanguage As Language Private m_SelectedLanguage As Language
Public Property SelectedLanguage As Language Public Property SelectedLanguage As Language
Get Get
@@ -94,6 +81,7 @@ Public Class ConfigurationPageVM
End Set End Set
End Property End Property
Public nOrigSelMeasureUnit As Integer = If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
Public Property SelMeasureUnit As Integer Public Property SelMeasureUnit As Integer
Get Get
Return If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH) Return If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
@@ -108,6 +96,7 @@ Public Class ConfigurationPageVM
End Set End Set
End Property End Property
Public sOrigSectionTime As String
Private m_SectionTime As Double Private m_SectionTime As Double
Public Property SectionTime As String Public Property SectionTime As String
Get Get
@@ -121,6 +110,7 @@ Public Class ConfigurationPageVM
End Set End Set
End Property End Property
Public sOrigPartTime As String
Private m_PartTime As Double Private m_PartTime As Double
Public Property PartTime As String Public Property PartTime As String
Get Get
@@ -134,6 +124,7 @@ Public Class ConfigurationPageVM
End Set End Set
End Property End Property
Public bOrigPrintLabel_IsChecked As Boolean
Private m_bPrintLabel_IsChecked As Boolean Private m_bPrintLabel_IsChecked As Boolean
Public Property bPrintLabel_IsChecked As String Public Property bPrintLabel_IsChecked As String
Get Get
@@ -158,6 +149,7 @@ Public Class ConfigurationPageVM
End Get End Get
End Property End Property
Public bOrigExternalBackupActive As Boolean
Private m_bExternalBackupActive As Boolean Private m_bExternalBackupActive As Boolean
Public Property bExternalBackupActive As Boolean Public Property bExternalBackupActive As Boolean
Get Get
@@ -169,6 +161,7 @@ Public Class ConfigurationPageVM
End Set End Set
End Property End Property
Public sOrigExternalBackupFolderPath As String
Private m_ExternalBackupFolderPath As String Private m_ExternalBackupFolderPath As String
Public Property ExternalBackupFolderPath As String Public Property ExternalBackupFolderPath As String
Get Get
@@ -187,6 +180,7 @@ Public Class ConfigurationPageVM
End Get End Get
End Property End Property
Public OrigSelReminder As IdNameStruct
Private m_SelReminder As IdNameStruct Private m_SelReminder As IdNameStruct
Public Property SelReminder As IdNameStruct Public Property SelReminder As IdNameStruct
Get Get
@@ -198,17 +192,6 @@ Public Class ConfigurationPageVM
End Set End Set
End Property End Property
Private m_bGeneral_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property General_Visibility As Visibility
Get
Return m_bGeneral_Visibility
End Get
End Property
Friend Sub SetGeneral_Visibility(value As Boolean)
m_bGeneral_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(General_Visibility))
End Sub
Private m_bStrategyManager_Visibility As Visibility = Visibility.Visible Private m_bStrategyManager_Visibility As Visibility = Visibility.Visible
Public ReadOnly Property StrategyManager_Visibility As Visibility Public ReadOnly Property StrategyManager_Visibility As Visibility
Get Get
@@ -604,16 +587,23 @@ Public Class ConfigurationPageVM
Exit For Exit For
End If End If
Next Next
OrigSelectedLanguage = m_SelectedLanguage
' leggo SectionTime e PartTime ' leggo SectionTime e PartTime
GetMainPrivateProfileString(S_NEST, K_SECTIONTIME, "", SectionTime) GetMainPrivateProfileString(S_NEST, K_SECTIONTIME, "", SectionTime)
sOrigSectionTime = SectionTime
GetMainPrivateProfileString(S_NEST, K_PARTTIME, "", PartTime) GetMainPrivateProfileString(S_NEST, K_PARTTIME, "", PartTime)
sOrigPartTime = PartTime
m_bPrintLabel_IsChecked = (GetMainPrivateProfileInt(S_PRINTER, K_ENABLE, 0) <> 0) m_bPrintLabel_IsChecked = (GetMainPrivateProfileInt(S_PRINTER, K_ENABLE, 0) <> 0)
bOrigPrintLabel_IsChecked = m_bPrintLabel_IsChecked
' leggo dati per backup ' leggo dati per backup
GetMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, "", m_ExternalBackupFolderPath) GetMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, "", m_ExternalBackupFolderPath)
sOrigExternalBackupFolderPath = m_ExternalBackupFolderPath
Dim nDefaultReminderFrequency As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_REMINDERFREQUENCY, 1) Dim nDefaultReminderFrequency As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_REMINDERFREQUENCY, 1)
SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency) SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency)
OrigSelReminder = SelReminder
Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0) Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0)
m_bExternalBackupActive = nExternalBackupActive > 0 m_bExternalBackupActive = nExternalBackupActive > 0
bOrigExternalBackupActive = m_bExternalBackupActive
SetMachineParameter_Visibility(False) SetMachineParameter_Visibility(False)
SetMachine_Visibility(False) SetMachine_Visibility(False)
' Recupero flag per verificare se fare solo l'importazione del btl o anche la verifica ' Recupero flag per verificare se fare solo l'importazione del btl o anche la verifica
@@ -636,7 +626,6 @@ Public Class ConfigurationPageVM
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5)) WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5)) WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0)) WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0))
Map.refMyMachine.VerifyConfigPageModification()
End Sub End Sub
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina ' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
@@ -654,6 +643,26 @@ Public Class ConfigurationPageVM
Return False Return False
End Function End Function
Friend Function SaveConfigPage() As Boolean
If OrigSelectedLanguage.Name <> m_SelectedLanguage.Name OrElse
sOrigSectionTime <> SectionTime OrElse
sOrigPartTime <> PartTime OrElse
bOrigPrintLabel_IsChecked <> m_bPrintLabel_IsChecked OrElse
sOrigExternalBackupFolderPath <> m_ExternalBackupFolderPath OrElse
OrigSelReminder.Name <> SelReminder.Name OrElse
bOrigExternalBackupActive <> m_bExternalBackupActive OrElse
nOrigSelMeasureUnit <> SelMeasureUnit Then
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62593), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question)
Case MessageBoxResult.Yes
VerifyConfigPageModification()
Return True
Case MessageBoxResult.No
Return False
End Select
End If
Return True
End Function
'''' <summary> '''' <summary>
'''' Seleziona il tema se presente '''' Seleziona il tema se presente
'''' </summary> '''' </summary>
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core" xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{DynamicResource ConfigurationPageVM}"> DataContext="{StaticResource ConfigurationPageVM}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -16,36 +16,57 @@
<TabControl Grid.RowSpan="2" <TabControl Grid.RowSpan="2"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
SelectedIndex="{Binding SelConfigSubPage}" SelectedIndex="{Binding SelConfigSubPage}"
Style="{StaticResource Optimizer_TabControl}"> Background="{StaticResource TabControl.Static.Generic.Background}"
TabStripPlacement="Top"
Margin="5,5,2.5,5">
<TabControl.Style>
<Style TargetType="{x:Type TabControl}">
<Style.Resources>
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource Optimizer_TabItem}"/>
</Style.Resources>
</Style>
</TabControl.Style>
<TabItem> <TabItem>
<TabItem.Header> <TabItem.Header>
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}"> <TextBlock Text="{Binding General_Msg}"
<TextBlock Text="{Binding General_Msg}" FontSize="15"/>
Style="{StaticResource ConfigurationProgram_TextBlock}"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
</TabItem.Header> </TabItem.Header>
<TabItem.Content> <TabItem.Content>
<EgtBEAMWALLCORE:General_ConfigurationPageV/> <StackPanel Orientation="Horizontal"
Margin="5">
<EgtBEAMWALLCORE:General_ConfigurationPageV/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
VerticalAlignment="Top"
Height="40"
Width="40"
Margin="10,15,10,10"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Save_Image}"
Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Content> </TabItem.Content>
</TabItem> </TabItem>
<TabItem> <TabItem>
<TabItem.Header> <TabItem.Header>
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}"> <StackPanel Orientation="Horizontal"
Margin="5">
<TextBlock Text="{Binding PDFEditor_Msg}" <TextBlock Text="{Binding PDFEditor_Msg}"
Style="{StaticResource ConfigurationProgram_TextBlock}"/> FontSize="15"/>
<Button Command="{Binding SaveCommand}" <Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}" ToolTip="{Binding SaveToolTip}"
Visibility="{Binding PDFEditor_Visibility}" Visibility="{Binding PDFEditor_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}"> HorizontalAlignment="Center"
VerticalAlignment="Center"
Height="25"
Width="25"
Margin="5,0,0,0"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Save_Image}" <Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
</TabItem.Header> </TabItem.Header>
@@ -66,6 +66,20 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon> <ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RemoteDebug|x86'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x86\RemoteDebug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Optimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="EgtBEAMWALL.Core"> <Reference Include="EgtBEAMWALL.Core">
<HintPath>..\EgtBEAMWALL.Core\bin\Debug\EgtBEAMWALL.Core.dll</HintPath> <HintPath>..\EgtBEAMWALL.Core\bin\Debug\EgtBEAMWALL.Core.dll</HintPath>
@@ -185,9 +199,6 @@
<Compile Include="Panel\TopPanelV.xaml.vb"> <Compile Include="Panel\TopPanelV.xaml.vb">
<DependentUpon>TopPanelV.xaml</DependentUpon> <DependentUpon>TopPanelV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="PopUp\BTLPartListPopUpV.xaml.vb">
<DependentUpon>BTLPartListPopUpV.xaml</DependentUpon>
</Compile>
<Compile Include="PopUp\RawPartListPopUpV.xaml.vb"> <Compile Include="PopUp\RawPartListPopUpV.xaml.vb">
<DependentUpon>RawPartListPopUpV.xaml</DependentUpon> <DependentUpon>RawPartListPopUpV.xaml</DependentUpon>
</Compile> </Compile>
@@ -238,6 +249,7 @@
<Compile Include="SceneHost\SceneHostV.xaml.vb"> <Compile Include="SceneHost\SceneHostV.xaml.vb">
<DependentUpon>SceneHostV.xaml</DependentUpon> <DependentUpon>SceneHostV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="SceneShowBulding\InstrumentPanelShowBuildingVM.vb" />
<Compile Include="SceneShowBulding\SceneBuildingV.xaml.vb"> <Compile Include="SceneShowBulding\SceneBuildingV.xaml.vb">
<DependentUpon>SceneBuildingV.xaml</DependentUpon> <DependentUpon>SceneBuildingV.xaml</DependentUpon>
</Compile> </Compile>
@@ -246,7 +258,12 @@
<DependentUpon>SceneShowBuldingV.xaml</DependentUpon> <DependentUpon>SceneShowBuldingV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="SceneShowBulding\SceneShowBuldingVM.vb" /> <Compile Include="SceneShowBulding\SceneShowBuldingVM.vb" />
<Compile Include="SceneShowBulding\ShowPanelShowBuildingVM.vb" />
<Compile Include="SceneShowBulding\ViewPanelShowBuildingVM.vb" /> <Compile Include="SceneShowBulding\ViewPanelShowBuildingVM.vb" />
<Compile Include="SetUpDB\SetUpDBV.xaml.vb">
<DependentUpon>SetUpDBV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUpDB\SetUpDBVM.vb" />
<Compile Include="SetUp\SetUpSupportClass.vb" /> <Compile Include="SetUp\SetUpSupportClass.vb" />
<Compile Include="SetUp\SetUpV.xaml.vb"> <Compile Include="SetUp\SetUpV.xaml.vb">
<DependentUpon>SetUpV.xaml</DependentUpon> <DependentUpon>SetUpV.xaml</DependentUpon>
@@ -311,6 +328,9 @@
<Compile Include="SupervisorCommThread\SupervisorComm.vb" /> <Compile Include="SupervisorCommThread\SupervisorComm.vb" />
<Compile Include="SupervisorCommThread\SupervisorCommThread.vb" /> <Compile Include="SupervisorCommThread\SupervisorCommThread.vb" />
<Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" /> <Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" />
<Compile Include="ToolsDbWindow\ToolDbWindowV.xaml.vb">
<DependentUpon>ToolDbWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="ToolsDbWindow\ToolsUpdate.vb" /> <Compile Include="ToolsDbWindow\ToolsUpdate.vb" />
<Compile Include="UpdateBTLWnd\UpdateBTLWndV.xaml.vb"> <Compile Include="UpdateBTLWnd\UpdateBTLWndV.xaml.vb">
<DependentUpon>UpdateBTLWndV.xaml</DependentUpon> <DependentUpon>UpdateBTLWndV.xaml</DependentUpon>
@@ -322,6 +342,7 @@
<Compile Include="UpdateBTLWnd\UpdateOrAppendWndVM.vb" /> <Compile Include="UpdateBTLWnd\UpdateOrAppendWndVM.vb" />
<Compile Include="Utility\Configuration.vb" /> <Compile Include="Utility\Configuration.vb" />
<Compile Include="Utility\CurrentMachine.vb" /> <Compile Include="Utility\CurrentMachine.vb" />
<Compile Include="Utility\CustomDXGridLocalizer.vb" />
<Compile Include="Utility\DbControllers.vb" /> <Compile Include="Utility\DbControllers.vb" />
<Compile Include="Utility\Dictionary.xaml.vb"> <Compile Include="Utility\Dictionary.xaml.vb">
<DependentUpon>Dictionary.xaml</DependentUpon> <DependentUpon>Dictionary.xaml</DependentUpon>
@@ -501,6 +522,7 @@
<LastGenOutput>Resources.Designer.vb</LastGenOutput> <LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace> <CustomToolNamespace>My.Resources</CustomToolNamespace>
</EmbeddedResource> </EmbeddedResource>
<None Include="app.manifest" />
<None Include="My Project\Settings.settings"> <None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
@@ -678,10 +700,6 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="PopUp\BTLPartListPopUpV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PopUp\RawPartListPopUpV.xaml"> <Page Include="PopUp\RawPartListPopUpV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -738,6 +756,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="SetUpDB\SetUpDBV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SetUp\SetUpV.xaml"> <Page Include="SetUp\SetUpV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -802,6 +824,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="ToolsDbWindow\ToolDbWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UpdateBTLWnd\UpdateBTLWndV.xaml"> <Page Include="UpdateBTLWnd\UpdateBTLWndV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -892,7 +918,6 @@
<Resource Include="Resources\DrawPanel\Swept.png" /> <Resource Include="Resources\DrawPanel\Swept.png" />
<Resource Include="Resources\DrawPanel\Text.png" /> <Resource Include="Resources\DrawPanel\Text.png" />
<Resource Include="Resources\DrawPanel\ThickCurve.png" /> <Resource Include="Resources\DrawPanel\ThickCurve.png" />
<Resource Include="Resources\Egalware.ico" />
<Resource Include="Resources\EgtBEAMWALL.ico" /> <Resource Include="Resources\EgtBEAMWALL.ico" />
<Resource Include="Resources\EgtDialog\Folder.png" /> <Resource Include="Resources\EgtDialog\Folder.png" />
<Resource Include="Resources\EgtDialog\New.png" /> <Resource Include="Resources\EgtDialog\New.png" />
@@ -908,9 +933,7 @@
<Resource Include="Resources\InstrumentPanel\Analyze.png" /> <Resource Include="Resources\InstrumentPanel\Analyze.png" />
<Resource Include="Resources\InstrumentPanel\ChangeParam.png" /> <Resource Include="Resources\InstrumentPanel\ChangeParam.png" />
<Resource Include="Resources\InstrumentPanel\GetDist.png" /> <Resource Include="Resources\InstrumentPanel\GetDist.png" />
<Resource Include="Resources\InstrumentPanel\Ott.png" />
<Resource Include="Resources\InstrumentPanel\Statistics.png" /> <Resource Include="Resources\InstrumentPanel\Statistics.png" />
<Resource Include="Resources\InstrumentPanel\Vis.png" />
<Resource Include="Resources\LeftPanel\AddFeature.png" /> <Resource Include="Resources\LeftPanel\AddFeature.png" />
<Resource Include="Resources\LeftPanel\AddPart.png" /> <Resource Include="Resources\LeftPanel\AddPart.png" />
<Resource Include="Resources\LeftPanel\AddToRawPart.png" /> <Resource Include="Resources\LeftPanel\AddToRawPart.png" />
@@ -918,25 +941,12 @@
<Resource Include="Resources\LeftPanel\CopyPart.png" /> <Resource Include="Resources\LeftPanel\CopyPart.png" />
<Resource Include="Resources\LeftPanel\MacroFeature.png" /> <Resource Include="Resources\LeftPanel\MacroFeature.png" />
<Resource Include="Resources\LeftPanel\NewRawPart.png" /> <Resource Include="Resources\LeftPanel\NewRawPart.png" />
<Resource Include="Resources\LeftPanel\NewRawPartAuto.png" />
<Resource Include="Resources\LeftPanel\RemoveFeature.png" />
<Resource Include="Resources\LeftPanel\RemovePart.png" />
<Resource Include="Resources\MainMenu\Send.png" /> <Resource Include="Resources\MainMenu\Send.png" />
<Resource Include="Resources\MovePartInRawPart\MoveLeftParts.png" /> <Resource Include="Resources\MovePartInRawPart\MoveLeftParts.png" />
<Resource Include="Resources\MovePartInRawPart\MoveRightParts.png" /> <Resource Include="Resources\MovePartInRawPart\MoveRightParts.png" />
<Resource Include="Resources\OpenProjectFileDialog\Archived.png" /> <Resource Include="Resources\OpenProjectFileDialog\Archived.png" />
<Resource Include="Resources\OptimizePanel\FlipRot.png" />
<Resource Include="Resources\OptimizePanel\UnlockFlip.png" />
<Resource Include="Resources\OptimizePanel\UnlockRotation.png" />
<Resource Include="Resources\OptimizePanel\Warehouse.png" /> <Resource Include="Resources\OptimizePanel\Warehouse.png" />
<Resource Include="Resources\PartManager\Clock.png" />
<Resource Include="Resources\PartManager\LeftInvert.png" />
<Resource Include="Resources\PartManager\LeftRotate.png" />
<Resource Include="Resources\PartManager\Locked.old.png" />
<Resource Include="Resources\PartManager\Locked.png" /> <Resource Include="Resources\PartManager\Locked.png" />
<Resource Include="Resources\PartManager\RightInvert.png" />
<Resource Include="Resources\PartManager\RightRotate.png" />
<Resource Include="Resources\PartManager\Unlocked.old.png" />
<Resource Include="Resources\PartManager\Unlocked.png" /> <Resource Include="Resources\PartManager\Unlocked.png" />
<Resource Include="Resources\PDFEditor\Delete.png" /> <Resource Include="Resources\PDFEditor\Delete.png" />
<Resource Include="Resources\PDFEditor\MoveDown.png" /> <Resource Include="Resources\PDFEditor\MoveDown.png" />
@@ -944,18 +954,8 @@
<Resource Include="Resources\PDFEditor\PDFPreview.png" /> <Resource Include="Resources\PDFEditor\PDFPreview.png" />
<Resource Include="Resources\PDFEditor\PrintPDF.png" /> <Resource Include="Resources\PDFEditor\PrintPDF.png" />
<Resource Include="Resources\ProjectManager\AddProj.png" /> <Resource Include="Resources\ProjectManager\AddProj.png" />
<Resource Include="Resources\ProjectManager\ExportProject.png" />
<Resource Include="Resources\ProjectManager\GoToProd.png" />
<Resource Include="Resources\ProjectManager\GoToProj.png" />
<Resource Include="Resources\ProjectManager\ImportBTL.png" />
<Resource Include="Resources\ProjectManager\ImportProject.png" />
<Resource Include="Resources\ProjectManager\New.png" />
<Resource Include="Resources\ProjectManager\Open.png" />
<Resource Include="Resources\ProjectManager\Options.png" />
<Resource Include="Resources\ProjectManager\Save.png" /> <Resource Include="Resources\ProjectManager\Save.png" />
<Resource Include="Resources\ProjectManager\SaveAs.png" />
<Resource Include="Resources\ProjectManager\UpdateBTL.png" /> <Resource Include="Resources\ProjectManager\UpdateBTL.png" />
<Resource Include="Resources\ShowBeamPanel\ShowAll.png" />
<Resource Include="Resources\ShowBeamPanel\ShowBuilding.png" /> <Resource Include="Resources\ShowBeamPanel\ShowBuilding.png" />
<Resource Include="Resources\ShowBeamPanel\ShowSolid.png" /> <Resource Include="Resources\ShowBeamPanel\ShowSolid.png" />
<Resource Include="Resources\ShowPanel\RenderingHL.png" /> <Resource Include="Resources\ShowPanel\RenderingHL.png" />
@@ -964,15 +964,9 @@
<Resource Include="Resources\Statistics\CopyToClipboard.png" /> <Resource Include="Resources\Statistics\CopyToClipboard.png" />
<Resource Include="Resources\Statistics\PrintPDF.png" /> <Resource Include="Resources\Statistics\PrintPDF.png" />
<Resource Include="Resources\TopPanel\CopyRawPart.png" /> <Resource Include="Resources\TopPanel\CopyRawPart.png" />
<Resource Include="Resources\TopPanel\MoveDownPart.png" />
<Resource Include="Resources\TopPanel\MovePartInRawPart.png" /> <Resource Include="Resources\TopPanel\MovePartInRawPart.png" />
<Resource Include="Resources\TopPanel\MoveUpPart.png" />
<Resource Include="Resources\TopPanel\ProduceAllRawPart.png" /> <Resource Include="Resources\TopPanel\ProduceAllRawPart.png" />
<Resource Include="Resources\TopPanel\ProduceRawPart.png" /> <Resource Include="Resources\TopPanel\ProduceRawPart.png" />
<Resource Include="Resources\TopPanel\RemoveAllRawPart.png" />
<Resource Include="Resources\TopPanel\RemovePart.old.png" />
<Resource Include="Resources\TopPanel\RemovePart.png" />
<Resource Include="Resources\TopPanel\RemoveRawPart.png" />
<Resource Include="Resources\TopPanel\ReorderPart.png" /> <Resource Include="Resources\TopPanel\ReorderPart.png" />
<Resource Include="Resources\TreeView\Folder.png" /> <Resource Include="Resources\TreeView\Folder.png" />
<Resource Include="Resources\ViewPanel\LookFromBACK.png" /> <Resource Include="Resources\ViewPanel\LookFromBACK.png" />
@@ -986,8 +980,6 @@
<Resource Include="Resources\ViewPanel\LookFromRIGHT.png" /> <Resource Include="Resources\ViewPanel\LookFromRIGHT.png" />
<Resource Include="Resources\ViewPanel\LookFromTOP.png" /> <Resource Include="Resources\ViewPanel\LookFromTOP.png" />
<Resource Include="Resources\ViewPanel\ZoomAll.png" /> <Resource Include="Resources\ViewPanel\ZoomAll.png" />
<Resource Include="Resources\ViewPanel\ZoomIn.png" />
<Resource Include="Resources\ViewPanel\ZoomOut.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\down.png" /> <Resource Include="Resources\NewPage\down.png" />
@@ -996,14 +988,26 @@
<PackageReference Include="BouncyCastle"> <PackageReference Include="BouncyCastle">
<Version>1.8.5</Version> <Version>1.8.5</Version>
</PackageReference> </PackageReference>
<PackageReference Include="DevExpress.Wpf.Core">
<Version>25.2.6</Version>
</PackageReference>
<PackageReference Include="DevExpress.Wpf.Grid">
<Version>25.2.6</Version>
</PackageReference>
<PackageReference Include="DevExpress.Wpf.PdfViewer">
<Version>25.2.6</Version>
</PackageReference>
<PackageReference Include="EgwMultiEngineManager.Core"> <PackageReference Include="EgwMultiEngineManager.Core">
<Version>3.1.1.2</Version> <Version>3.1.1.2</Version>
</PackageReference> </PackageReference>
<PackageReference Include="EgwMultiEngineManager.Data"> <PackageReference Include="EgwMultiEngineManager.Data">
<Version>3.1.1.2</Version> <Version>3.1.1.2</Version>
</PackageReference> </PackageReference>
<PackageReference Include="EgwRedmineAPI">
<Version>3.1.8.1</Version>
</PackageReference>
<PackageReference Include="EgwWPFBaseLib"> <PackageReference Include="EgwWPFBaseLib">
<Version>3.1.3-beta.6</Version> <Version>3.1.8-beta.4</Version>
</PackageReference> </PackageReference>
<PackageReference Include="EntityFramework"> <PackageReference Include="EntityFramework">
<Version>6.4.4</Version> <Version>6.4.4</Version>
@@ -1051,9 +1055,6 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\LeftPanel\All_Filter.png" /> <Resource Include="Resources\LeftPanel\All_Filter.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\Cancel.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\Ok.png" /> <Resource Include="Resources\NewPage\Ok.png" />
</ItemGroup> </ItemGroup>
@@ -1117,21 +1118,9 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\MoveUp.png" /> <Resource Include="Resources\NewPage\MoveUp.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\MoveLeft.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\MoveRight.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\Inversion.png" /> <Resource Include="Resources\NewPage\Inversion.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\deselectall.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\selectall.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\configuration.png" /> <Resource Include="Resources\NewPage\configuration.png" />
</ItemGroup> </ItemGroup>
@@ -1144,12 +1133,6 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\padlock-unlock.png" /> <Resource Include="Resources\NewPage\padlock-unlock.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\play.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\add.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\diskette.png" /> <Resource Include="Resources\NewPage\diskette.png" />
</ItemGroup> </ItemGroup>
@@ -1159,9 +1142,6 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\adjustment.png" /> <Resource Include="Resources\NewPage\adjustment.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\up.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\openfolder.png" /> <Resource Include="Resources\NewPage\openfolder.png" />
</ItemGroup> </ItemGroup>
@@ -1177,15 +1157,6 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\import.png" /> <Resource Include="Resources\NewPage\import.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\ViewPanel\ZoomAll+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\InstrumentPanel\GetDist+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\modify_adjustment.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\SplashScreen\SplashScreen.png" /> <Resource Include="Resources\SplashScreen\SplashScreen.png" />
</ItemGroup> </ItemGroup>
@@ -1217,8 +1188,24 @@
<Resource Include="Resources\EgtDialog\Tiles.png" /> <Resource Include="Resources\EgtDialog\Tiles.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewPage\VerifyAllR.png" /> <Resource Include="Resources\NewPage\reset.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\VerifyAllRotation.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\arrow.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\EditIntestazione.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\disketteas.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\MainMenu\TicketManager.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Aedifica\Aedifica.OptimizerR32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Aedifica\Aedifica.OptimizerR32.exe
@@ -1,4 +1,5 @@
Imports System.IO Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Core.ConstIni Imports EgtBEAMWALL.Core.ConstIni
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
@@ -44,6 +45,7 @@ Module MyExecProcessManager
Dim sEnvironment As String = "" Dim sEnvironment As String = ""
Dim sPipeLuaFile As String = "" Dim sPipeLuaFile As String = ""
Dim nMaxCamInstances As Integer = 0 Dim nMaxCamInstances As Integer = 0
Dim bDebug As Boolean = False
While GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_ENVIRONMENT, "", sEnvironment) > 0 AndAlso While GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_ENVIRONMENT, "", sEnvironment) > 0 AndAlso
GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_PIPELUAFILE, "", sPipeLuaFile) AndAlso GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_PIPELUAFILE, "", sPipeLuaFile) AndAlso
GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_MAXCAMINSTANCES, "", nMaxCamInstances) GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_MAXCAMINSTANCES, "", nMaxCamInstances)
@@ -64,7 +66,10 @@ Module MyExecProcessManager
nGroupIndex += 1 nGroupIndex += 1
Continue While Continue While
End If End If
Dim NewExecProcessManager As New ExecProcessManager(nGroupIndex, Environment, sCamExePath, PipeLuaPath, nMaxCamInstances, ExecProcessManager.ReturnModes.EVENT_, False) ' leggo se modalita' debug
Dim nDebug As Integer = GetMainPrivateProfileInt(S_EXECGROUP & nGroupIndex.ToString(), K_DEBUG, 0)
bDebug = (nDebug = 1)
Dim NewExecProcessManager As New ExecProcessManager(nGroupIndex, Environment, sCamExePath, PipeLuaPath, nMaxCamInstances, ExecProcessManager.ReturnModes.EVENT_, bDebug)
AddHandler NewExecProcessManager.m_AnswerReceived, AddressOf ExecProcessManager_AnswerReceived AddHandler NewExecProcessManager.m_AnswerReceived, AddressOf ExecProcessManager_AnswerReceived
NewExecProcessManager.StartExecutionThread() NewExecProcessManager.StartExecutionThread()
m_ExecProcessManagerList.Add(Environment, NewExecProcessManager) m_ExecProcessManagerList.Add(Environment, NewExecProcessManager)
@@ -83,7 +88,7 @@ Module MyExecProcessManager
Integer.TryParse(Answer.Args("BarId"), nBarId) Integer.TryParse(Answer.Args("BarId"), nBarId)
EgtOutLog("Risultato progetto " & nBarId) EgtOutLog("Risultato progetto " & nBarId)
CALCPanelVM.ProcessResults(sBarPath, nProgramPage, nBarId) CALCPanelVM.ProcessResults(sBarPath, nProgramPage, nBarId)
If Answer.Args.Count > 4 Then If Answer.Args.Count > 5 Then
Dim PartItem As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nBarId) Dim PartItem As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nBarId)
Dim nPreInvert As Integer = -1 Dim nPreInvert As Integer = -1
Dim bPreInvert As Boolean = False Dim bPreInvert As Boolean = False
@@ -101,16 +106,19 @@ Module MyExecProcessManager
End If End If
If nPreRotate > 0 Then If nPreRotate > 0 Then
Dim dAng As Integer = nPreRotate * 90 Dim dAng As Integer = nPreRotate * 90
PartItem.ForwardRotation(True, True, dAng, False) Application.Current.Dispatcher.BeginInvoke(Sub()
PartItem.ForwardRotation(True, True, dAng, False)
End Sub)
End If End If
Dim prefix As String = "INFONGEPART_" Dim prefix As String = "INFONGEPART_"
m_sInfoNgePartList = Answer.Args.Where(Function(k) k.Key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)).Select(Function(k) k.Value).ToList() m_sInfoNgePartList = Answer.Args.Where(Function(k) k.Key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)).Select(Function(k) k.Value).ToList()
For Each InfoNgePartItem As String In sInfoNgePartList For Each InfoNgePartItem As String In m_sInfoNgePartList
Dim sKeyVal() As String = InfoNgePartItem.Trim().Split("="c) Dim sKeyVal() As String = InfoNgePartItem.Trim().Split("="c)
EgtSetInfo(PartItem.nPartId, sKeyVal(0), sKeyVal(1)) EgtSetInfo(PartItem.nPartId, sKeyVal(0), sKeyVal(1))
Map.refProjectVM.InfoNgeValue.Add(sKeyVal(0))
Next Next
End If End If
@@ -121,6 +129,11 @@ Module MyExecProcessManager
Dim nRunningProcesses As Integer = BeamManager.nRunningProcesses Dim nRunningProcesses As Integer = BeamManager.nRunningProcesses
Map.refMyStatusBarVM.SetLoadingProgress(Map.refMyStatusBarVM.MaximumValue - nQuestionInQueue - (nRunningProcesses - nFreeOrWaitingAnswerProcesses)) Map.refMyStatusBarVM.SetLoadingProgress(Map.refMyStatusBarVM.MaximumValue - nQuestionInQueue - (nRunningProcesses - nFreeOrWaitingAnswerProcesses))
If nQuestionInQueue = 0 AndAlso nFreeOrWaitingAnswerProcesses = nRunningProcesses Then If nQuestionInQueue = 0 AndAlso nFreeOrWaitingAnswerProcesses = nRunningProcesses Then
Dim CmdType As CmdTypes = CmdTypes.CHECKGEN
If Answer.Args.ContainsKey("CmdType") Then
CmdType = Answer.Args("CmdType")
End If
Map.refCALCPanelVM.Calc_Ended(CmdType)
Map.refMyStatusBarVM.EndLoading(EgtMsg(62577), 2) Map.refMyStatusBarVM.EndLoading(EgtMsg(62577), 2)
Map.refSceneShowBuldingVM.SceneShowBulding.Enable(True) Map.refSceneShowBuldingVM.SceneShowBulding.Enable(True)
Map.refSceneBuildingVM.SetViewPanel_IsEnable(True) Map.refSceneBuildingVM.SetViewPanel_IsEnable(True)
@@ -1,26 +1,39 @@
<StackPanel x:Class="FeatureListManagerV" <StackPanel x:Class="FeatureListManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{StaticResource FeatureListManagerVM}" DataContext="{StaticResource FeatureListManagerVM}"
Style="{StaticResource FeatureListManager_StackPanel}"> Orientation="Vertical"
HorizontalAlignment="Left">
<Button Command="{Binding CopyFeature_Command}" <Button Command="{Binding CopyFeature_Command}"
ToolTip="{Binding CopyFeature_ToolTip}" ToolTip="{Binding CopyFeature_ToolTip}"
Style="{StaticResource LP_Button}"> FontWeight="Light"
Height="30"
Width="30"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource CopyFeature_Image}" <Image Source="{StaticResource CopyFeature_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding AddFeature_Command}" <Button Command="{Binding AddFeature_Command}"
ToolTip="{Binding AddFeature_ToolTip}" ToolTip="{Binding AddFeature_ToolTip}"
Style="{StaticResource LP_Button}"> FontWeight="Light"
Height="30"
Width="30"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource AddFeature_Image}" <Image Source="{StaticResource AddFeature_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding RemoveFeature_Command}" <Button Command="{Binding RemoveFeature_Command}"
ToolTip="{Binding RemoveFeature_ToolTip}" ToolTip="{Binding RemoveFeature_ToolTip}"
Style="{StaticResource LP_Button}"> FontWeight="Light"
Height="30"
Width="30"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Remove_Image}" <Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{StaticResource FeatureManager_Grid}"> Margin="2,4,0,2">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -20,7 +20,7 @@
<Expander Header="{Binding Face_Msg}" <Expander Header="{Binding Face_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}" IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureManager_Expander}"> Width="80">
<ListBox ItemsSource="{Binding Tag.SIDEList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" <ListBox ItemsSource="{Binding Tag.SIDEList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelSIDE, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" SelectedItem="{Binding Tag.nSelSIDE, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}" IsEnabled="{Binding FeatureManager_IsEnabled}"
@@ -30,7 +30,7 @@
<Expander Grid.Column="1" <Expander Grid.Column="1"
Header="{Binding Group_Msg}" Header="{Binding Group_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}" IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureManager_Expander}"> Width="80">
<ListBox ItemsSource="{Binding Tag.GRPList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" <ListBox ItemsSource="{Binding Tag.GRPList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}" IsEnabled="{Binding FeatureManager_IsEnabled}"
@@ -41,46 +41,71 @@
Text="{Binding Priority_Msg}" Text="{Binding Priority_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}" IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}" Visibility="{Binding Priority_Visibility}"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3" <EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding Tag.sPriority, Text="{Binding Tag.sPriority,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}},
UpdateSourceTrigger=Explicit}" UpdateSourceTrigger=Explicit}"
IsEnabled="{Binding FeatureManager_IsEnabled}" IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}" Visibility="{Binding Priority_Visibility}"
Style="{StaticResource Dimension_TextBox}"/> TextWrapping="Wrap"
VerticalAlignment="Center"
Height="25"/>
<TextBlock Grid.Column="4" <TextBlock Grid.Column="4"
Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Style="{StaticResource FeatureManager_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Top"
TextTrimming="CharacterEllipsis"
Margin="5,5,0,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="5" <ComboBox Grid.Column="5"
ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}" IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Variant_Visibility}" Visibility="{Binding Variant_Visibility}"
Style="{StaticResource Feature_ComboBox}"/> Height="24"
MinWidth="55"
Margin="5,-2,0,5"/>
<Button Grid.Column="6" <Button Grid.Column="6"
Content="{Binding Edit_Msg}" Content="{Binding Edit_Msg}"
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
IsEnabled="{Binding Edit_IsEnabled}" IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource GeneralConfiguration_Button}"/> Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Grid.Column="7" <Button Grid.Column="7"
Content="{Binding Save_Msg}" Content="{Binding Save_Msg}"
Command="{Binding Tag.Save_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" Command="{Binding Tag.Save_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Style="{StaticResource GeneralConfiguration_Button}"/> Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Grid.Column="8" <Button Grid.Column="8"
Content="{Binding Cancel_Msg}" Content="{Binding Cancel_Msg}"
Command="{Binding Tag.Cancel_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" Command="{Binding Tag.Cancel_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}" Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Style="{StaticResource GeneralConfiguration_Button}"/> Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Grid.Column="9" <Button Grid.Column="9"
Command="{Binding MacroFeature_Command}" Command="{Binding MacroFeature_Command}"
ToolTip="{Binding MacroFeature_ToolTip}" ToolTip="{Binding MacroFeature_ToolTip}"
IsEnabled="{Binding MacroFeature_IsEnabled}" IsEnabled="{Binding MacroFeature_IsEnabled}"
Style="{StaticResource MacroFeaturen_Button}"> HorizontalAlignment="Right"
FontWeight="Light"
Height="30"
Width="30"
Margin="2.5,2.5,10,2.5"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource MacroFeature_Image}" <Image Source="{StaticResource MacroFeature_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</Grid> </Grid>
@@ -9,19 +9,24 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.RowSpan="2" <Border Grid.RowSpan="2"
Style="{StaticResource ForcedStrategyBTL_Border}"> Margin="-9,-8,2,0"
Style="{StaticResource Optimizer_Border}">
<ListBox ItemsSource="{Binding StrategyList}" <ListBox ItemsSource="{Binding StrategyList}"
SelectedItem="{Binding SelStrategy}" SelectedItem="{Binding SelStrategy}"
Style="{StaticResource ForcedStrategyBTL_ListBox}"> Style="{StaticResource ForcedStrategyBTL_ListBox}">
<ListBox.Resources> <ListBox.Resources>
<DataTemplate DataType="{x:Type Optimizer:Strategy}"> <DataTemplate DataType="{x:Type Optimizer:Strategy}">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal">
<RadioButton IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}" <RadioButton IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
GroupName="ForcedStrategy"/> GroupName="ForcedStrategy"/>
<Image Source="{Binding sStrategyImagePath}" <Image Source="{Binding sStrategyImagePath}"
Style="{StaticResource ForcedStrategyBTL_Image}"/> Height="100"
Width="100"
Stretch="Uniform"/>
<TextBlock Text="{Binding sStrategyName}" <TextBlock Text="{Binding sStrategyName}"
Style="{StaticResource ForcedStrategy_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="13"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ListBox.Resources> </ListBox.Resources>
@@ -29,10 +34,15 @@
</Border> </Border>
<GroupBox Grid.Column="1" <GroupBox Grid.Column="1"
Style="{StaticResource ForcedStrategyBTL_GroupBox}"> Margin="0,-12,-10,0"
Style="{StaticResource ProjectParameters_GroupBox}">
<GroupBox.Header> <GroupBox.Header>
<TextBlock Text="{Binding SelStrategy.sStrategyName}" <TextBlock Text="{Binding SelStrategy.sStrategyName}"
Style="{StaticResource ForcedStrategyBTL_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
FontWeight="Bold"
FontSize="13"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
</GroupBox.Header> </GroupBox.Header>
<Optimizer:ParameterStrategyV Tag="{Binding SelStrategy}"/> <Optimizer:ParameterStrategyV Tag="{Binding SelStrategy}"/>
</GroupBox> </GroupBox>
@@ -12,19 +12,24 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.RowSpan="2" <Border Grid.RowSpan="2"
Style="{StaticResource ForcedStrategyBTL_Border}"> Margin="-9,0,2,0"
Style="{StaticResource Optimizer_Border}">
<ListBox ItemsSource="{Binding StrategyList}" <ListBox ItemsSource="{Binding StrategyList}"
SelectedItem="{Binding SelStrategy}" SelectedItem="{Binding SelStrategy}"
Style="{StaticResource ForcedStrategyBTL_ListBox}"> Style="{StaticResource ForcedStrategyBTL_ListBox}">
<ListBox.Resources> <ListBox.Resources>
<DataTemplate DataType="{x:Type OPTIMIZER:Strategy}"> <DataTemplate DataType="{x:Type OPTIMIZER:Strategy}">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal">
<RadioButton IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}" <RadioButton IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
GroupName="ForcedStrategy"/> GroupName="ForcedStrategy"/>
<Image Source="{Binding sStrategyImagePath}" <Image Source="{Binding sStrategyImagePath}"
Style="{StaticResource ForcedStrategyBTL_Image}"/> Height="100"
Width="100"
Stretch="Uniform"/>
<TextBlock Text="{Binding sStrategyName}" <TextBlock Text="{Binding sStrategyName}"
Style="{StaticResource ForcedStrategy_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="13"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ListBox.Resources> </ListBox.Resources>
@@ -32,28 +37,40 @@
</Border> </Border>
<GroupBox Grid.Column="1" <GroupBox Grid.Column="1"
Style="{StaticResource ForcedStrategyBTL_GroupBox}"> Margin="0"
Style="{StaticResource ProjectParameters_GroupBox}">
<GroupBox.Header> <GroupBox.Header>
<TextBlock Text="{Binding SelStrategy.sStrategyName}" <TextBlock Text="{Binding SelStrategy.sStrategyName}"
Style="{StaticResource ForcedStrategyBTL_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
FontWeight="Bold"
FontSize="13"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
</GroupBox.Header> </GroupBox.Header>
<OPTIMIZER:ParameterStrategyV Tag="{Binding SelStrategy}"/> <OPTIMIZER:ParameterStrategyV Tag="{Binding SelStrategy}"/>
</GroupBox> </GroupBox>
<StackPanel Grid.Row="2" <StackPanel Grid.Row="2"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{StaticResource PParameters_StackPanel}"> Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Command="{Binding Ok_Command}" <Button Command="{Binding Ok_Command}"
ToolTip="{Binding Ok_Msg}" ToolTip="{Binding Ok_Msg}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Ok_Image}" <Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding Cancel_Command}" <Button Command="{Binding Cancel_Command}"
ToolTip="{Binding Cancel_Msg}" ToolTip="{Binding Cancel_Msg}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Delete_Image}" <Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
@@ -29,10 +29,22 @@ Public Class ForcedStrategyPanelVM
End Get End Get
Set(value As Strategy) Set(value As Strategy)
m_SelStrategy = value m_SelStrategy = value
SetUpdate_Visibility(False)
NotifyPropertyChanged(NameOf(SelStrategy)) NotifyPropertyChanged(NameOf(SelStrategy))
End Set End Set
End Property End Property
Private m_bUpdate_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property Update_Visibility As Visibility
Get
Return m_bUpdate_Visibility
End Get
End Property
Friend Sub SetUpdate_Visibility(value As Boolean)
m_bUpdate_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(Update_Visibility))
End Sub
Private m_CurrentFeature As BTLFeatureM Private m_CurrentFeature As BTLFeatureM
' Definizione Comandi ' Definizione Comandi
@@ -145,21 +157,6 @@ Public Class ForcedStrategyPanelVM
m_StrategyList = New ObservableCollection(Of Strategy)((From JsonAvailableStrategy In JsonAvailableTopology.StrategyList m_StrategyList = New ObservableCollection(Of Strategy)((From JsonAvailableStrategy In JsonAvailableTopology.StrategyList
Select JsonAvailableStrategy.Deserialize(ProjectManagerVM.CurrProd.nType, -1)).ToList()) Select JsonAvailableStrategy.Deserialize(ProjectManagerVM.CurrProd.nType, -1)).ToList())
End If End If
If File.Exists(sAvailableStrategiesFilePath) Then
sReadedFile = File.ReadAllText(sAvailableStrategiesFilePath)
Dim JsonStrategyFeatureList As List(Of JsonAvailableStrategyFeature) = JsonConvert.DeserializeObject(Of List(Of JsonAvailableStrategyFeature))(sReadedFile)
Dim JsonAvailableStrategyFeature As JsonAvailableStrategyFeature = JsonStrategyFeatureList.FirstOrDefault(Function(x) x.nGrp = nGRP AndAlso x.nPrc = nPRC)
If IsNothing(JsonAvailableStrategyFeature) Then Return False
Dim JsonAvailableTopology As JsonAvailableTopology = JsonAvailableStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
If IsNothing(JsonAvailableTopology) Then
' ricavo topologia da feature
FindTopologyFromFeature(nFeatureId, sTopologyName)
JsonAvailableTopology = JsonAvailableStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
End If
If IsNothing(JsonAvailableTopology) Then Return False
m_StrategyList = New ObservableCollection(Of Strategy)((From JsonAvailableStrategy In JsonAvailableTopology.StrategyList
Select JsonAvailableStrategy.Deserialize(ProjectManagerVM.CurrProd.nType, -1)).ToList())
End If
' recupero custom ' recupero custom
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nFeatureId)) Dim nPartId As Integer = EgtGetParent(EgtGetParent(nFeatureId))
Dim nPartProjId As Integer = 0 Dim nPartProjId As Integer = 0
@@ -269,6 +266,25 @@ Public Class ForcedStrategyPanelVM
End Function End Function
Friend Sub ForcedStrategy() Friend Sub ForcedStrategy()
If IsNothing(m_CurrentFeature) Then Return
If m_CurrentFeature.nFeatureId < 0 Then Return
If IsNothing(m_SelStrategy) Then Return
Dim StrategyType As Integer = 0
If TypeOf m_CurrentFeature.ParentPart Is BTLPartM Then
StrategyType = 1
ElseIf TypeOf m_CurrentFeature.ParentPart Is PartM Then
StrategyType = 2
Else Return
End If
If StrategyType = 1 AndAlso
(IsNothing(Map.refProjectVM.BTLStructureVM) OrElse
IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) OrElse
IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM)) Then Return
If StrategyType = 2 AndAlso
(IsNothing(Map.refProjectVM.MachGroupPanelVM) OrElse
IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) OrElse
IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) OrElse
IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM)) Then Return
' cancello precedenti valori ' cancello precedenti valori
Dim sPrecStrategyID As String = "" Dim sPrecStrategyID As String = ""
EgtGetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, sPrecStrategyID) EgtGetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, sPrecStrategyID)
@@ -285,14 +301,16 @@ Public Class ForcedStrategyPanelVM
m_SelStrategy.SetbIsStrategyModify(False) m_SelStrategy.SetbIsStrategyModify(False)
EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY) EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY)
EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED") EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED")
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(False) If StrategyType = 1 Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(False) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(False)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(False)
End If
Else Else
m_SelStrategy.SetbIsStrategyModify(True) m_SelStrategy.SetbIsStrategyModify(True)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True) If StrategyType = 1 Then
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(True) Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(True)
ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then ElseIf StrategyType = 2 Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True) Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If End If
EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, SelStrategy.sStrategyId) EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, SelStrategy.sStrategyId)
@@ -361,6 +379,7 @@ Public Class ForcedStrategyPanelVM
ForcedStrategy() ForcedStrategy()
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
' Abilito LeftPanel ' Abilito LeftPanel
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
Map.refProjectVM.SetLeftPanel_IsEnabled(True) Map.refProjectVM.SetLeftPanel_IsEnabled(True)
Map.refProjectVM.SetLeftPanel_Opacity(1) Map.refProjectVM.SetLeftPanel_Opacity(1)
Map.refSceneHostVM.SaveProject() Map.refSceneHostVM.SaveProject()
@@ -382,6 +401,7 @@ Public Class ForcedStrategyPanelVM
Public Sub Cancel() Public Sub Cancel()
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
' Abilito LeftPanel ' Abilito LeftPanel
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
Map.refProjectVM.SetLeftPanel_IsEnabled(True) Map.refProjectVM.SetLeftPanel_IsEnabled(True)
Map.refProjectVM.SetLeftPanel_Opacity(1) Map.refProjectVM.SetLeftPanel_Opacity(1)
End Sub End Sub
@@ -1,16 +1,35 @@
<UserControl x:Class="FreeContourInputV" <UserControl x:Class="FreeContourInputV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource FreeContourInput_UserControl}"> Height="32"
Margin="5"
VerticalAlignment="Top">
<StackPanel Style="{StaticResource FreeContourInput_StackPanel}"> <StackPanel Orientation="Horizontal">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Style.Triggers>
<DataTrigger Binding="{Binding FocusTextBox}" Value="True">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=PropertySearch}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<TextBlock Text="{Binding Message}" <TextBlock Text="{Binding Message}"
Visibility="{Binding Message_Visibility}" Visibility="{Binding Message_Visibility}"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}" <TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding Text_Visibility}" Visibility="{Binding Text_Visibility}"
Style="{StaticResource FreeContour_TextBox}"> HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
TextWrapping="Wrap"
Height="22"
Width="200"
Margin="5,0,5,0">
<TextBox.InputBindings> <TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/> <KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/> <KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/>
@@ -19,25 +38,33 @@
<CheckBox Content="{Binding CheckBoxText}" <CheckBox Content="{Binding CheckBoxText}"
IsChecked="{Binding IsChecked}" IsChecked="{Binding IsChecked}"
Visibility="{Binding Check_Visibility}" Visibility="{Binding Check_Visibility}"
Style="{StaticResource FreeContourInput_CheckBox}"/> VerticalAlignment="Center"
Margin="5,0,5,0"/>
<ComboBox ItemsSource="{Binding ComboItemsList}" <ComboBox ItemsSource="{Binding ComboItemsList}"
SelectedIndex="{Binding ComboSelectedIndex}" SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding Combo_Visibility}" Visibility="{Binding Combo_Visibility}"
Style="{StaticResource FreeContourInput_ComboBox}"/> Margin="5,0,5,0"
<Grid Style="{StaticResource FreeContourInput_Grid}"> Style="{StaticResource Optmizer_ComboBox}"/>
<Grid Margin="5,0,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Command="{Binding Show_Command}" <Button Command="{Binding Show_Command}"
Visibility="{Binding ShowBtn_Visibility}"
Content="{Binding ShowMsg}" Content="{Binding ShowMsg}"
Style="{StaticResource GeneralConfiguration_Button}"/> Visibility="{Binding ShowBtn_Visibility}"
Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Grid.Column="1" <Button Grid.Column="1"
Command="{Binding Done_Command}" Command="{Binding Done_Command}"
Visibility="{Binding DoneBtn_Visibility}"
Content="{Binding OkMsg}" Content="{Binding OkMsg}"
Style="{StaticResource GeneralConfiguration_Button}"/> Visibility="{Binding DoneBtn_Visibility}"
Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
</UserControl> </UserControl>
@@ -1,76 +1,113 @@
<StackPanel x:Class="FreeContourManagerV" <StackPanel x:Class="FreeContourManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource FreeContourManager_StackPanel}"> Orientation="Horizontal"
Margin="2,5,2,5">
<ComboBox ItemsSource="{Binding TypeList}" <ComboBox ItemsSource="{Binding TypeList}"
SelectedIndex="{Binding SelType, Delay=1}" SelectedIndex="{Binding SelType, Delay=1}"
Style="{StaticResource ProdType_ComboBox}"/> Height="22"
Width="160"
Margin="5,0,5,0"
Style="{StaticResource Optmizer_ComboBox}"/>
<ComboBox ItemsSource="{Binding PathList}" <ComboBox ItemsSource="{Binding PathList}"
SelectedIndex="{Binding SelPath}" SelectedIndex="{Binding SelPath}"
Visibility="{Binding PathList_Visibility}" Visibility="{Binding PathList_Visibility}"
Style="{StaticResource ProdPath_ComboBox}"/> Height="22"
Width="100"
Margin="0,0,5,0"
Style="{StaticResource Optmizer_ComboBox}"/>
<Button Command="{Binding Line2P_Command}" <Button Command="{Binding Line2P_Command}"
ToolTip="{Binding Line2P_ToolTip}" ToolTip="{Binding Line2P_ToolTip}"
IsEnabled="{Binding Line2P_IsEnabled}" IsEnabled="{Binding Line2P_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Line2P_Image}" <Image Source="{StaticResource Line2P_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding Delete_Command}" <Button Command="{Binding Delete_Command}"
ToolTip="{Binding Delete_ToolTip}" ToolTip="{Binding Delete_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource DeleteD_Image}" <Image Source="{StaticResource DeleteD_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding ModifyCurve_Command}" <Button Command="{Binding ModifyCurve_Command}"
ToolTip="{Binding ModifyCurve_ToolTip}" ToolTip="{Binding ModifyCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource ModifyCurve_Image}" <Image Source="{StaticResource ModifyCurve_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding AddPointCurve_Command}" <Button Command="{Binding AddPointCurve_Command}"
ToolTip="{Binding AddPointCurve_ToolTip}" ToolTip="{Binding AddPointCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource AddPointCurve_Image}" <Image Source="{StaticResource AddPointCurve_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding RemovePointCurve_Command}" <Button Command="{Binding RemovePointCurve_Command}"
ToolTip="{Binding RemovePointCurve_ToolTip}" ToolTip="{Binding RemovePointCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource RemovePointCurve_Image}" <Image Source="{StaticResource RemovePointCurve_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding ChangeStart_Command}" <Button Command="{Binding ChangeStart_Command}"
ToolTip="{Binding ChangeStart_ToolTip}" ToolTip="{Binding ChangeStart_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource ChangeStart_Image}" <Image Source="{StaticResource ChangeStart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding InvertCurve_Command}" <Button Command="{Binding InvertCurve_Command}"
ToolTip="{Binding InvertCurve_ToolTip}" ToolTip="{Binding InvertCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource InvertCurve_Image}" <Image Source="{StaticResource InvertCurve_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding Move_Command}" <Button Command="{Binding Move_Command}"
ToolTip="{Binding Move_ToolTip}" ToolTip="{Binding Move_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Move_Image}" <Image Source="{StaticResource Move_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding Rotate_Command}" <Button Command="{Binding Rotate_Command}"
ToolTip="{Binding Rotate_ToolTip}" ToolTip="{Binding Rotate_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource RotateD_Image}" <Image Source="{StaticResource RotateD_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding TextAngle_Command}" <Button Command="{Binding TextAngle_Command}"
ToolTip="{Binding TextAngle_ToolTip}" ToolTip="{Binding TextAngle_ToolTip}"
Visibility="{Binding TextAngle_Visibility}" Visibility="{Binding TextAngle_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Text_Image}" <Image Source="{StaticResource Text_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
@@ -301,7 +301,6 @@ Public Class FreeContourManagerVM
Map.refPartListVM.SetBTLPartListIsEnabled(False) Map.refPartListVM.SetBTLPartListIsEnabled(False)
Map.refPParameterListVM.SetPParameterListIsEnabled(False) Map.refPParameterListVM.SetPParameterListIsEnabled(False)
Map.refShowBeamPanelVM.SetShowSolid_IsEnabled(False) Map.refShowBeamPanelVM.SetShowSolid_IsEnabled(False)
Map.refShowBeamPanelVM.SetShowAll_IsEnabled(False)
'resetto tutte le variabili 'resetto tutte le variabili
SelPart = Nothing SelPart = Nothing
SelFeature = Nothing SelFeature = Nothing
@@ -539,7 +538,8 @@ Public Class FreeContourManagerVM
Map.refPartListVM.SetBTLPartListIsEnabled(True) Map.refPartListVM.SetBTLPartListIsEnabled(True)
Map.refPParameterListVM.SetPParameterListIsEnabled(True) Map.refPParameterListVM.SetPParameterListIsEnabled(True)
Map.refShowBeamPanelVM.SetShowSolid_IsEnabled(True) Map.refShowBeamPanelVM.SetShowSolid_IsEnabled(True)
Map.refShowBeamPanelVM.SetShowAll_IsEnabled(True) ' riabilito assemblato
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
' reimposto vista normale per pezzo ' reimposto vista normale per pezzo
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False) Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
@@ -21,12 +21,19 @@
<OPTIMIZER:ProjectParametersV Margin="0,10,0,0"/> <OPTIMIZER:ProjectParametersV Margin="0,10,0,0"/>
<StackPanel Grid.Row="1" <StackPanel Grid.Row="1"
Style="{StaticResource GeneralParametersStrategy_StackPanel}"> Orientation="Horizontal"
HorizontalAlignment="Right"
Margin="10">
<Button Command="{Binding Ok_Command}" <Button Command="{Binding Ok_Command}"
ToolTip="{Binding SaveAsToolTip}" ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource SaveStrategy_Button}"> HorizontalAlignment="Center"
VerticalAlignment="Center"
Height="40"
Width="40"
Margin="5,0,0,0"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Ok_Image}" <Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
@@ -365,6 +365,28 @@ Public MustInherit Class ProjectParameters
End Set End Set
End Property End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sValue As String Private m_sValue As String
Public Property sValue As String Public Property sValue As String
Get Get
@@ -421,6 +443,8 @@ Public MustInherit Class ProjectParameters
If IsNothing(JsonProjectParameters) Then Return If IsNothing(JsonProjectParameters) Then Return
m_sName = JsonProjectParameters.sName m_sName = JsonProjectParameters.sName
m_sNameNge = JsonProjectParameters.sNameNge m_sNameNge = JsonProjectParameters.sNameNge
m_idDescriptionShortMsg = JsonProjectParameters.idDescriptionShortMsg
m_idDescriptionLongMsg = JsonProjectParameters.idDescriptionLongMsg
End Sub End Sub
#End Region ' Constructor #End Region ' Constructor
@@ -465,6 +489,7 @@ Public MustInherit Class ProjectParameters
End Select End Select
End If End If
End Sub End Sub
#End Region ' Methods #End Region ' Methods
End Class End Class
@@ -485,6 +510,7 @@ Public Class BooleanGenericParameter
SetbIsBooleanModify(True) SetbIsBooleanModify(True)
End If End If
m_bValue = value m_bValue = value
NotifyPropertyChanged(NameOf(bValue))
End Set End Set
End Property End Property
Friend Sub SetValue(bValue As Boolean) Friend Sub SetValue(bValue As Boolean)
@@ -565,6 +591,7 @@ Public Class DoubleGenericParameter
If m_dValue <> dValue Then If m_dValue <> dValue Then
If Not Map.refBTLDataWndVM.IsBTLDataWnd Then Map.refStrategyManagerVM.SetbIsModifyStrategy(True) If Not Map.refBTLDataWndVM.IsBTLDataWnd Then Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
SetbIsDoubleModify(True) SetbIsDoubleModify(True)
NotifyPropertyChanged(NameOf(sValue))
End If End If
m_dValue = dValue m_dValue = dValue
Else Else
@@ -657,6 +684,7 @@ Public Class StringGenericParameter
SetbIsStringModify(True) SetbIsStringModify(True)
End If End If
m_sValue = value m_sValue = value
NotifyPropertyChanged(NameOf(sValue))
End Set End Set
End Property End Property
Friend Sub SetValue(dValue As String) Friend Sub SetValue(dValue As String)
@@ -746,10 +774,12 @@ Public Class ComboGenericParameter
End If End If
End If End If
m_SelValue = value m_SelValue = value
NotifyPropertyChanged(NameOf(SelValue))
End Set End Set
End Property End Property
Friend Sub SetSelValue(sValue As String) Friend Sub SetSelValue(sValue As String)
m_SelValue = m_ComboList.FirstOrDefault(Function(x) x.sValue = sValue) m_SelValue = m_ComboList.FirstOrDefault(Function(x) x.sValue = sValue)
If IsNothing(m_SelValue) Then m_SelValue = m_ComboList(0)
End Sub End Sub
Private m_bComboBoxVisibility As Visibility = Visibility.Collapsed Private m_bComboBoxVisibility As Visibility = Visibility.Collapsed
@@ -850,31 +880,13 @@ Public Class ListGenericParameter
Next Next
End Sub End Sub
Private m_AvailableToolList_View As ICollectionView = Nothing Private m_ToolList_View As ICollectionView = Nothing
Public ReadOnly Property AvailableToolList_View As ICollectionView Public ReadOnly Property ToolList_View As ICollectionView
Get Get
Return m_AvailableToolList_View Return m_ToolList_View
End Get End Get
End Property End Property
Private m_ActiveToolList_View As ICollectionView = Nothing
Public ReadOnly Property ActiveToolList_View As ICollectionView
Get
Return m_ActiveToolList_View
End Get
End Property
Private m_bAvailableToolListVisibility As Visibility = Visibility.Collapsed
Public ReadOnly Property AvailableToolListVisibility As Visibility
Get
Return m_bAvailableToolListVisibility
End Get
End Property
Friend Sub SetAvailableToolListVisibility(value As Boolean)
m_bAvailableToolListVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(AvailableToolListVisibility))
End Sub
Private m_bOpenToolListIsEnable As Boolean = True Private m_bOpenToolListIsEnable As Boolean = True
Public ReadOnly Property OpenToolListIsEnable As Boolean Public ReadOnly Property OpenToolListIsEnable As Boolean
Get Get
@@ -886,28 +898,6 @@ Public Class ListGenericParameter
NotifyPropertyChanged(NameOf(OpenToolListIsEnable)) NotifyPropertyChanged(NameOf(OpenToolListIsEnable))
End Sub End Sub
Private m_bActiveToolListIsEnable As Boolean
Public ReadOnly Property ActiveToolListIsEnable As Boolean
Get
Return m_bActiveToolListIsEnable
End Get
End Property
Friend Sub SetActiveToolListIsEnable(value As Boolean)
m_bActiveToolListIsEnable = value
NotifyPropertyChanged(NameOf(ActiveToolListIsEnable))
End Sub
Private m_bAvailableToolListIsEnable As Boolean
Public ReadOnly Property AvailableToolListIsEnable As Boolean
Get
Return m_bAvailableToolListIsEnable
End Get
End Property
Friend Sub SetAvailableToolListIsEnable(value As Boolean)
m_bAvailableToolListIsEnable = value
NotifyPropertyChanged(NameOf(AvailableToolListIsEnable))
End Sub
Private m_bListBoxVisibility As Visibility = Visibility.Collapsed Private m_bListBoxVisibility As Visibility = Visibility.Collapsed
Public ReadOnly Property bListBoxVisibility As Visibility Public ReadOnly Property bListBoxVisibility As Visibility
Get Get
@@ -933,6 +923,24 @@ Public Class ListGenericParameter
NotifyPropertyChanged(NameOf(bIsListModify)) NotifyPropertyChanged(NameOf(bIsListModify))
End Sub End Sub
Private m_OpenToolList_IsChecked As Boolean
Public Property OpenToolList_IsChecked As Boolean
Get
Return m_OpenToolList_IsChecked
End Get
Set(value As Boolean)
m_OpenToolList_IsChecked = value
For Each ItemList In m_ListValue
If m_OpenToolList_IsChecked Then
ItemList.SetTool_Visibility(True)
ElseIf Not ItemList.bIsActive Then
ItemList.SetTool_Visibility(False)
End If
Next
NotifyPropertyChanged(NameOf(OpenToolList_IsChecked))
End Set
End Property
#Region "Messages" #Region "Messages"
Public ReadOnly Property SelectAllToolTip As String Public ReadOnly Property SelectAllToolTip As String
@@ -961,12 +969,6 @@ Public Class ListGenericParameter
#End Region ' Messages #End Region ' Messages
' Definizione comandi
Private m_cmdDeselectAll As ICommand
Private m_cmdSelectAll As ICommand
Private m_cmdOpenToolList As ICommand
Private m_cmdCloseToolList As ICommand
#End Region ' Fields & Properties #End Region ' Fields & Properties
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -984,7 +986,7 @@ Public Class ListGenericParameter
While bNext While bNext
EgtTdbSetCurrTool(sName) EgtTdbSetCurrTool(sName)
EgtTdbGetCurrToolParam(MCH_TP.UUID, sUUID) EgtTdbGetCurrToolParam(MCH_TP.UUID, sUUID)
'm_ListValue.Add(New ToolParameter(sUUID, sName, Me)) m_ListValue.Add(New ToolParameter(sUUID, sName, Me))
bNext = EgtTdbGetNextTool(nSubType, sName, nType) bNext = EgtTdbGetNextTool(nSubType, sName, nType)
End While End While
End Sub End Sub
@@ -1006,116 +1008,26 @@ Public Class ListGenericParameter
Return JsonParametersHelper Return JsonParametersHelper
End Function End Function
Friend Function AvailableToolFilter(Strategy As Object) As Boolean
Return DirectCast(Strategy, ToolParameter).bIsActive = False
End Function
Friend Function ActiveToolFilter(Strategy As Object) As Boolean
Return DirectCast(Strategy, ToolParameter).bIsActive = True
End Function
Friend Sub CreateToolsViews() Friend Sub CreateToolsViews()
m_AvailableToolList_View = New ListCollectionView(m_ListValue) m_ToolList_View = New ListCollectionView(m_ListValue)
m_AvailableToolList_View.Filter = AddressOf AvailableToolFilter m_ToolList_View.SortDescriptions.Add(New SortDescription("bIsActive", ListSortDirection.Descending))
m_ActiveToolList_View = New ListCollectionView(m_ListValue)
m_ActiveToolList_View.Filter = AddressOf ActiveToolFilter
End Sub End Sub
''' <summary> ''' <summary>
''' Funzione per visualizzare le liste available e active tool ''' Funzione per visualizzare le liste available e active tool
''' </summary> ''' </summary>
Friend Sub ToolView() Friend Sub ToolView()
SetActiveToolListIsEnable(If(m_ActiveToolList_View.IsEmpty, False, True)) For Each ItemList In m_ListValue
SetAvailableToolListIsEnable(If(m_AvailableToolList_View.IsEmpty, False, True)) If ItemList.bIsActive AndAlso Not m_OpenToolList_IsChecked Then
ItemList.SetTool_Visibility(True)
Else
ItemList.SetTool_Visibility(False)
End If
Next
End Sub End Sub
#End Region ' Methods #End Region ' Methods
#Region "COMMANDS"
#Region "OpenToolListCommand"
Public ReadOnly Property OpenToolListCommand As ICommand
Get
If m_cmdOpenToolList Is Nothing Then
m_cmdOpenToolList = New Command(AddressOf OpenToolList)
End If
Return m_cmdOpenToolList
End Get
End Property
Friend Sub OpenToolList()
SetAvailableToolListVisibility(True)
SetOpenToolListIsEnable(False)
End Sub
#End Region ' OpenToolListCommand
#Region "CloseToolListCommand"
Public ReadOnly Property CloseToolListCommand As ICommand
Get
If m_cmdCloseToolList Is Nothing Then
m_cmdCloseToolList = New Command(AddressOf CloseToolList)
End If
Return m_cmdCloseToolList
End Get
End Property
Friend Sub CloseToolList()
SetAvailableToolListVisibility(False)
SetOpenToolListIsEnable(True)
End Sub
#End Region ' CloseToolListCommand
#Region "SelectAllCommand"
Public ReadOnly Property SelectAllCommand As ICommand
Get
If m_cmdSelectAll Is Nothing Then
m_cmdSelectAll = New Command(AddressOf SelectAll)
End If
Return m_cmdSelectAll
End Get
End Property
Friend Sub SelectAll()
'If Not IsNothing(sSubType) Then
' For Each ItemTool As ToolParameter In m_ListValue
' ItemTool.bIsActive = True
' Next
'End If
SetAvailableToolListIsEnable(False)
Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
End Sub
#End Region ' SelectAllCommand
#Region "DeselectAllCommand"
Public ReadOnly Property DeselectAllCommand As ICommand
Get
If m_cmdDeselectAll Is Nothing Then
m_cmdDeselectAll = New Command(AddressOf DeselectAll)
End If
Return m_cmdDeselectAll
End Get
End Property
Friend Sub DeselectAll()
'If Not IsNothing(sSubType) Then
' For Each ItemTool As ToolParameter In m_ListValue
' ItemTool.bIsActive = False
' Next
'End If
SetActiveToolListIsEnable(False)
Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
End Sub
#End Region ' DeselectAllCommand
#End Region ' Commands
End Class End Class
Class GroupVisibilityConverter Class GroupVisibilityConverter
@@ -10,7 +10,7 @@
Name="GeneralParametersWnd" Name="GeneralParametersWnd"
Style="{StaticResource OptimizerWindow.Dialog}"> Style="{StaticResource OptimizerWindow.Dialog}">
<Grid Style="{StaticResource GeneralParametersWnd_Grid}"> <Grid Margin="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@@ -22,21 +22,34 @@
<ComboBox Grid.ColumnSpan="2" <ComboBox Grid.ColumnSpan="2"
ItemsSource="{Binding StrategySetupList}" ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLDataWnd_ComboBox}"/> Foreground="{StaticResource BeamWall_Black}"
HorizontalAlignment="Center"
FontSize="15"
Height="30"
Width="160"
Margin="0,10,0,10"
Style="{StaticResource Optmizer_ComboBox}"/>
<OPTIMIZER:ProjectParametersV Grid.Row="1" <OPTIMIZER:ProjectParametersV Grid.Row="1"
Grid.RowSpan="2" Grid.RowSpan="2"
IsEnabled="{Binding GeneralParametersIsEnable}"/> IsEnabled="{Binding GeneralParametersIsEnable}"/>
<UniformGrid Grid.Row="1" <UniformGrid Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Rows="2" Rows="2"
Style="{StaticResource BTLDataWnd_UniformGrid}"> Margin="0,0,5,0">
<CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}" <CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLDataWnd_CheckBox}"/> HorizontalAlignment="Center"
VerticalAlignment="Top"
Margin="10,10,0,0"/>
<Button Command="{Binding Ok_Command}" <Button Command="{Binding Ok_Command}"
ToolTip="{Binding SaveAsToolTip}" ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource GeneralParametersWnd_Button}"> HorizontalAlignment="Center"
VerticalAlignment="Bottom"
Height="40"
Width="40"
Margin="5,0,0,5"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Ok_Image}" <Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
@@ -147,52 +147,43 @@ Public Class GeneralParametersWndVM
For Each GeneralParameter In m_GeneralParametersList For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType() Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter) Case GetType(BooleanGenericParameter)
SetbSaveGeneralParameters(True) SetbParametersEnable(True)
SetGeneralParametersIsEnable(True)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Else Else
SetbSaveGeneralParameters(False) SetbParametersEnable(False)
SetGeneralParametersIsEnable(False)
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
End If End If
Case GetType(DoubleGenericParameter) Case GetType(DoubleGenericParameter)
SetbSaveGeneralParameters(True) SetbParametersEnable(True)
SetGeneralParametersIsEnable(True)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Else Else
SetbSaveGeneralParameters(False) SetbParametersEnable(False)
SetGeneralParametersIsEnable(False)
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
End If End If
Case GetType(ComboGenericParameter) Case GetType(ComboGenericParameter)
SetbSaveGeneralParameters(True) SetbParametersEnable(True)
SetGeneralParametersIsEnable(True)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Else Else
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
SetbSaveGeneralParameters(False) SetbParametersEnable(False)
SetGeneralParametersIsEnable(False)
End If End If
Case GetType(StringGenericParameter) Case GetType(StringGenericParameter)
SetbSaveGeneralParameters(True) SetbParametersEnable(True)
SetGeneralParametersIsEnable(True)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Else Else
SetbSaveGeneralParameters(False) SetbParametersEnable(False)
SetGeneralParametersIsEnable(False)
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
End If End If
Case GetType(ListGenericParameter) Case GetType(ListGenericParameter)
SetbSaveGeneralParameters(True) SetbParametersEnable(True)
SetGeneralParametersIsEnable(True)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";" sInfo &= Item.sUUID & "," & Item.sName & ";"
@@ -200,8 +191,7 @@ Public Class GeneralParametersWndVM
If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then If EgtExistsInfo(nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
Else Else
SetbSaveGeneralParameters(False) SetbParametersEnable(False)
SetGeneralParametersIsEnable(False)
sInfo = sTmpInfo sInfo = sTmpInfo
End If End If
End If End If
@@ -246,6 +236,11 @@ Public Class GeneralParametersWndVM
Next Next
End Sub End Sub
Private Sub SetbParametersEnable(bValue As Boolean)
SetbSaveGeneralParameters(bValue)
SetGeneralParametersIsEnable(bValue)
End Sub
#End Region ' Methods #End Region ' Methods
#Region "COMMANDS" #Region "COMMANDS"
@@ -64,6 +64,28 @@ Public Class JsonGeneralParameters
End Set End Set
End Property End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sValue As String Private m_sValue As String
Public Property sValue As String Public Property sValue As String
Get Get
@@ -113,13 +135,15 @@ Public Class JsonGeneralParameters
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
<JsonConstructor> <JsonConstructor>
Sub New(nGroup As String, sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, sType As String, sMinUserLevel As String) Sub New(nGroup As String, sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionLongMsg As Integer, idDescriptionShortMsg As Integer, sType As String, sMinUserLevel As String)
m_nGroup = nGroup m_nGroup = nGroup
m_sName = sName m_sName = sName
m_sNameNge = sNameNge m_sNameNge = sNameNge
m_sValue = sValue m_sValue = sValue
m_sDescriptionShort = sDescriptionShort m_sDescriptionShort = sDescriptionShort
m_sDescriptionLong = sDescriptionLong m_sDescriptionLong = sDescriptionLong
m_idDescriptionShortMsg = idDescriptionShortMsg
m_idDescriptionLongMsg = idDescriptionLongMsg
m_sType = sType m_sType = sType
m_sMinUserLevel = sMinUserLevel m_sMinUserLevel = sMinUserLevel
End Sub End Sub
@@ -142,6 +166,8 @@ Public Class JsonGeneralParameters
m_nGroup = ProjectParameters.nGroup m_nGroup = ProjectParameters.nGroup
m_sDescriptionShort = ProjectParameters.sDescriptionShort m_sDescriptionShort = ProjectParameters.sDescriptionShort
m_sDescriptionLong = ProjectParameters.sDescriptionLong m_sDescriptionLong = ProjectParameters.sDescriptionLong
m_idDescriptionShortMsg = ProjectParameters.idDescriptionShortMsg
m_idDescriptionLongMsg = ProjectParameters.idDescriptionLongMsg
m_sMinUserLevel = ProjectParameters.sMinUserLevel m_sMinUserLevel = ProjectParameters.sMinUserLevel
End Sub End Sub
@@ -192,8 +218,16 @@ Public Class JsonGeneralParameters
ProjectParameters.nGroup = m_nGroup ProjectParameters.nGroup = m_nGroup
ProjectParameters.sName = m_sName ProjectParameters.sName = m_sName
ProjectParameters.sNameNge = m_sNameNge ProjectParameters.sNameNge = m_sNameNge
ProjectParameters.sDescriptionShort = m_sDescriptionShort If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
ProjectParameters.sDescriptionLong = m_sDescriptionLong ProjectParameters.sDescriptionShort = m_sDescriptionShort
Else
ProjectParameters.sDescriptionShort = EgtMsg(m_idDescriptionShortMsg)
End If
If m_idDescriptionLongMsg < 0 OrElse EgtMsg(m_idDescriptionLongMsg).StartsWith("Msg") Then
ProjectParameters.sDescriptionLong = m_sDescriptionLong
Else
ProjectParameters.sDescriptionLong = EgtMsg(m_idDescriptionLongMsg)
End If
ProjectParameters.sMinUserLevel = m_sMinUserLevel ProjectParameters.sMinUserLevel = m_sMinUserLevel
Return ProjectParameters Return ProjectParameters
End Function End Function
@@ -64,6 +64,28 @@ Public Class JsonProjectParameters
End Set End Set
End Property End Property
Private m_idDescriptionShortMsg As Integer
Public Property idDescriptionShortMsg As Integer
Get
Return m_idDescriptionShortMsg
End Get
Set(value As Integer)
m_idDescriptionShortMsg = value
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
End Set
End Property
Private m_idDescriptionLongMsg As Integer
Public Property idDescriptionLongMsg As Integer
Get
Return m_idDescriptionLongMsg
End Get
Set(value As Integer)
m_idDescriptionLongMsg = value
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
End Set
End Property
Private m_sValue As String Private m_sValue As String
Public Property sValue As String Public Property sValue As String
Get Get
@@ -113,7 +135,7 @@ Public Class JsonProjectParameters
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
<JsonConstructor> <JsonConstructor>
Sub New(mGroup As String, sName As String, sNameNge As String, sValue As String, sType As String, sDescriptionShort As String, sDescriptionLong As String, sMinUserLevel As String) Sub New(mGroup As String, sName As String, sNameNge As String, sValue As String, sType As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionShortMsg As Integer, idDescriptionLongMsg As Integer, sMinUserLevel As String)
m_nGroup = nGroup m_nGroup = nGroup
m_sName = sName m_sName = sName
m_sNameNge = sNameNge m_sNameNge = sNameNge
@@ -121,6 +143,8 @@ Public Class JsonProjectParameters
m_sType = sType m_sType = sType
m_sDescriptionShort = sDescriptionShort m_sDescriptionShort = sDescriptionShort
m_sDescriptionLong = sDescriptionLong m_sDescriptionLong = sDescriptionLong
m_idDescriptionShortMsg = idDescriptionShortMsg
m_idDescriptionLongMsg = idDescriptionLongMsg
m_sMinUserLevel = sMinUserLevel m_sMinUserLevel = sMinUserLevel
End Sub End Sub
@@ -141,6 +165,8 @@ Public Class JsonProjectParameters
End Select End Select
m_sDescriptionShort = ProjectParameters.sDescriptionShort m_sDescriptionShort = ProjectParameters.sDescriptionShort
m_sDescriptionLong = ProjectParameters.sDescriptionLong m_sDescriptionLong = ProjectParameters.sDescriptionLong
m_idDescriptionShortMsg = ProjectParameters.idDescriptionShortMsg
m_idDescriptionLongMsg = ProjectParameters.idDescriptionLongMsg
m_sMinUserLevel = ProjectParameters.sMinUserLevel m_sMinUserLevel = ProjectParameters.sMinUserLevel
End Sub End Sub
@@ -191,6 +217,16 @@ Public Class JsonProjectParameters
ProjectParameters.nGroup = nGroup ProjectParameters.nGroup = nGroup
ProjectParameters.sName = m_sName ProjectParameters.sName = m_sName
ProjectParameters.sNameNge = m_sNameNge ProjectParameters.sNameNge = m_sNameNge
If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
ProjectParameters.sDescriptionShort = m_sDescriptionShort
Else
ProjectParameters.sDescriptionShort = EgtMsg(m_idDescriptionShortMsg)
End If
If m_idDescriptionLongMsg < 0 OrElse EgtMsg(m_idDescriptionLongMsg).StartsWith("Msg") Then
ProjectParameters.sDescriptionLong = m_sDescriptionLong
Else
ProjectParameters.sDescriptionLong = EgtMsg(m_idDescriptionLongMsg)
End If
ProjectParameters.sDescriptionShort = m_sDescriptionShort ProjectParameters.sDescriptionShort = m_sDescriptionShort
ProjectParameters.sDescriptionLong = m_sDescriptionLong ProjectParameters.sDescriptionLong = m_sDescriptionLong
ProjectParameters.sMinUserLevel = m_sMinUserLevel ProjectParameters.sMinUserLevel = m_sMinUserLevel
@@ -1,7 +1,8 @@
<UserControl x:Class="ProjectParametersV" <UserControl x:Class="ProjectParametersV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"> xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<OPTIMIZER:GroupVisibilityConverter x:Key="GroupVisibilityConverter"/> <OPTIMIZER:GroupVisibilityConverter x:Key="GroupVisibilityConverter"/>
<CollectionViewSource x:Key="GroupedParameters" Source="{Binding GeneralParametersList}"> <CollectionViewSource x:Key="GroupedParameters" Source="{Binding GeneralParametersList}">
@@ -14,10 +15,14 @@
<GroupBox Style="{StaticResource ProjectParameters_GroupBox}"> <GroupBox Style="{StaticResource ProjectParameters_GroupBox}">
<GroupBox.Header> <GroupBox.Header>
<TextBlock Text="GENERAL PARAMETERS" <TextBlock Text="GENERAL PARAMETERS"
Style="{StaticResource ProjectParameters_TextBlock}"/> HorizontalAlignment="Left"
FontWeight="Bold"
TextWrapping="WrapWithOverflow"
Style="{StaticResource DialogWindow_TextBlock}"/>
</GroupBox.Header> </GroupBox.Header>
<ItemsControl ItemsSource="{Binding Source={StaticResource GroupedParameters}}" <ItemsControl ItemsSource="{Binding Source={StaticResource GroupedParameters}}"
Style="{StaticResource ParameterStrategy_ItemsControl}"> Margin="5,10,0,0"
Style="{StaticResource UsersControl_ItemsControl}">
<ItemsControl.GroupStyle> <ItemsControl.GroupStyle>
<GroupStyle> <GroupStyle>
<GroupStyle.Panel> <GroupStyle.Panel>
@@ -30,10 +35,15 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}"> <ControlTemplate TargetType="{x:Type GroupItem}">
<GroupBox Style="{StaticResource Item_GroupBox}"> <GroupBox BorderThickness="1"
Margin="0,0,0,5"
Style="{StaticResource ProjectParameters_GroupBox}">
<GroupBox.Header> <GroupBox.Header>
<TextBlock Text="{Binding Name}" <TextBlock Text="{Binding Name}"
Style="{StaticResource ProjectParameters_TextBlock}"/> HorizontalAlignment="Left"
FontWeight="Bold"
TextWrapping="WrapWithOverflow"
Style="{StaticResource DialogWindow_TextBlock}"/>
</GroupBox.Header> </GroupBox.Header>
<ItemsPresenter /> <ItemsPresenter />
<GroupBox.Visibility> <GroupBox.Visibility>
@@ -53,129 +63,111 @@
<DataTemplate DataType="{x:Type OPTIMIZER:BooleanGenericParameter}"> <DataTemplate DataType="{x:Type OPTIMIZER:BooleanGenericParameter}">
<UniformGrid Columns="2" <UniformGrid Columns="2"
Visibility="{Binding bBooleanVisibility}" Visibility="{Binding bBooleanVisibility}"
Style="{StaticResource ProjectParameters_UniformGrid}"> Margin="2,2,2,5">
<TextBlock Text="{Binding sDescriptionShort}" <TextBlock Text="{Binding sDescriptionShort}"
Style="{StaticResource ProjectParameters_TextBlock}"/> HorizontalAlignment="Left"
FontWeight="Bold"
TextWrapping="WrapWithOverflow"
Style="{StaticResource DialogWindow_TextBlock}"/>
<CheckBox IsChecked="{Binding bValue, UpdateSourceTrigger=PropertyChanged}" <CheckBox IsChecked="{Binding bValue, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</UniformGrid> </UniformGrid>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type OPTIMIZER:DoubleGenericParameter}"> <DataTemplate DataType="{x:Type OPTIMIZER:DoubleGenericParameter}">
<UniformGrid Columns="2" <UniformGrid Columns="2"
Visibility="{Binding bDoubleVisibility}" Visibility="{Binding bDoubleVisibility}"
Style="{StaticResource ProjectParameters_UniformGrid}"> Margin="2,2,2,5">
<TextBlock Text="{Binding sDescriptionShort}" <TextBlock Text="{Binding sDescriptionShort}"
Style="{StaticResource ProjectParameters_TextBlock}"/> HorizontalAlignment="Left"
<TextBox Text="{Binding sValue}" FontWeight="Bold"
Style="{StaticResource ColorPicker_TextBox}"/> TextWrapping="WrapWithOverflow"
Style="{StaticResource DialogWindow_TextBlock}"/>
<EgtWPFLib5:EgtTextBox2 Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Style="{StaticResource ParameterList_TextBox2}"/>
</UniformGrid> </UniformGrid>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type OPTIMIZER:ComboGenericParameter}"> <DataTemplate DataType="{x:Type OPTIMIZER:ComboGenericParameter}">
<UniformGrid Columns="2" <UniformGrid Columns="2"
Visibility="{Binding bComboBoxVisibility}" Visibility="{Binding bComboBoxVisibility}"
Style="{StaticResource ProjectParameters_UniformGrid}"> Margin="2,2,2,5">
<TextBlock Text="{Binding sDescriptionShort}" <TextBlock Text="{Binding sDescriptionShort}"
Style="{StaticResource ProjectParameters_TextBlock}"/> HorizontalAlignment="Left"
FontWeight="Bold"
TextWrapping="WrapWithOverflow"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ComboBox ItemsSource="{Binding ComboList}" <ComboBox ItemsSource="{Binding ComboList}"
SelectedItem="{Binding SelValue}" SelectedItem="{Binding SelValue}"
DisplayMemberPath="sValue" DisplayMemberPath="sValue"
Style="{StaticResource ProjectParameters_ComboBox}"> Foreground="{StaticResource BeamWall_Black}"
Height="22"
Width="150"
Margin="0">
</ComboBox> </ComboBox>
</UniformGrid> </UniformGrid>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type OPTIMIZER:StringGenericParameter}"> <DataTemplate DataType="{x:Type OPTIMIZER:StringGenericParameter}">
<UniformGrid Columns="2" <UniformGrid Columns="2"
Visibility="{Binding bStringVisibility}" Visibility="{Binding bStringVisibility}"
Style="{StaticResource ProjectParameters_UniformGrid}"> Margin="2,2,2,5">
<TextBlock Text="{Binding sDescriptionShort}" <TextBlock Text="{Binding sDescriptionShort}"
Style="{StaticResource ProjectParameters_TextBlock}"/> HorizontalAlignment="Left"
<TextBox Text="{Binding sValue}" FontWeight="Bold"
Style="{StaticResource ColorPicker_TextBox}"/> TextWrapping="WrapWithOverflow"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Stretch"
VerticalContentAlignment="Center"
TextAlignment="Center"
Width="65"/>
</UniformGrid> </UniformGrid>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type OPTIMIZER:ListGenericParameter}"> <DataTemplate DataType="{x:Type OPTIMIZER:ListGenericParameter}">
<Grid Visibility="{Binding bListBoxVisibility}" <UniformGrid Columns="3"
Style="{StaticResource AddRawPartWnd_Grid}"> Visibility="{Binding bListBoxVisibility}"
<Grid.RowDefinitions> Margin="5,2,5,0">
<RowDefinition Height="Auto"/> <TextBlock Text="{Binding sDescriptionShort}"
<RowDefinition Height="Auto"/> HorizontalAlignment="Left"
</Grid.RowDefinitions> VerticalAlignment="Top"
<Grid.ColumnDefinitions> FontWeight="Normal"
<ColumnDefinition Width="1.3*"/> TextWrapping="WrapWithOverflow"
<ColumnDefinition Width="1*"/> Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid.ColumnDefinitions> <ToggleButton Grid.Column="1"
<TextBlock Text="{Binding sDescriptionShort}" ToolTip="{Binding OpenToolListToolTip}"
Style="{StaticResource ListProjectParameters_TextBlock}"/> IsChecked="{Binding OpenToolList_IsChecked}"
<StackPanel Grid.Column="1" HorizontalAlignment="Left"
Style="{StaticResource PartManager_StackPanel}"> VerticalAlignment="Top"
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}"> Width="50"
<Button ToolTip="{Binding OpenToolListToolTip}" Height="30"
IsEnabled="{Binding OpenToolListIsEnable}" Margin="0,0,0,5">
Command="{Binding OpenToolListCommand}" <Image Source="{StaticResource Plus_Image}"
Style="{StaticResource ProjectParameters_Button}"> Stretch="Uniform"/>
<Image Source="{StaticResource Plus_Image}" </ToggleButton>
Style="{StaticResource BTLDataWnd_Image}"/> <Border Grid.Column="2"
</Button> Margin="2,5,2,0"
<Button ToolTip="{Binding DeselectAllToolTip}" Style="{StaticResource Optimizer_Border}">
IsEnabled="{Binding ActiveToolListIsEnable}" <ItemsControl ItemsSource="{Binding ToolList_View}"
Command="{Binding DeselectAllCommand}" BorderThickness="0"
Style="{StaticResource CloseProjectParameters_Button}"> Height="200"
<Image Source="{StaticResource DeselectAll_Image}" Width="180"
Style="{StaticResource BTLDataWnd_Image}"/> Style="{StaticResource UsersControl_ItemsControl}">
</Button> <ItemsControl.ItemTemplate>
</StackPanel> <DataTemplate>
<Border Style="{StaticResource ForcedStrategyBTL_Border}"> <StackPanel Orientation="Horizontal"
<ItemsControl ItemsSource="{Binding ActiveToolList_View}" Margin="5,5,5,0">
Style="{StaticResource ProjectParameters_ItemsControl}"> <CheckBox IsChecked="{Binding bIsActive, UpdateSourceTrigger=PropertyChanged}"
<ItemsControl.ItemTemplate> Visibility="{Binding Tool_Visibility}"
<DataTemplate> VerticalAlignment="Center"
<StackPanel Style="{StaticResource List_StackPanel}"> Margin="5,0,5,0"/>
<CheckBox IsChecked="{Binding bIsActive, UpdateSourceTrigger=PropertyChanged}" <TextBlock Text="{Binding sName}"
Style="{StaticResource FreeContourInput_CheckBox}"/> Visibility="{Binding Tool_Visibility}"
<TextBlock Text="{Binding sName}" Style="{StaticResource DialogWindow_TextBlock}"/>
Style="{StaticResource DialogWindow_TextBlock}"/> </StackPanel>
</StackPanel> </DataTemplate>
</DataTemplate> </ItemsControl.ItemTemplate>
</ItemsControl.ItemTemplate> </ItemsControl>
</ItemsControl> </Border>
</Border> </UniformGrid>
</StackPanel>
<StackPanel Grid.Row="1"
Grid.Column="1"
Visibility="{Binding AvailableToolListVisibility}"
Style="{StaticResource PartManager_StackPanel}">
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
<Button ToolTip="{Binding CloseToolListToolTip}"
Command="{Binding CloseToolListCommand}"
Style="{StaticResource ProjectParameters_Button}">
<Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding SelectAllToolTip}"
IsEnabled="{Binding AvailableToolListIsEnable}"
Command="{Binding SelectAllCommand}"
Style="{StaticResource ProjectParameters_Button}">
<Image Source="{StaticResource SelectAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
<Border Style="{StaticResource ProjectParamters_Border}">
<ItemsControl ItemsSource="{Binding AvailableToolList_View}"
Style="{StaticResource AvailableToolList_ItemsControl}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Style="{StaticResource List_StackPanel}">
<CheckBox IsChecked="{Binding bIsActive, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FreeContourInput_CheckBox}"/>
<TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
</StackPanel>
</Grid>
</DataTemplate> </DataTemplate>
</ItemsControl.Resources> </ItemsControl.Resources>
</ItemsControl> </ItemsControl>
@@ -7,7 +7,7 @@
Title="InputPwdWndV" Title="InputPwdWndV"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -15,13 +15,16 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding PasswordMsg}" <TextBlock Text="{Binding PasswordMsg}"
Style="{StaticResource PasswordMsg_TextBlock}"/> HorizontalAlignment="Center"
VerticalAlignment="Top"
Margin="0,0,0,5"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<PasswordBox Grid.Row="1" <PasswordBox Grid.Row="1"
x:Name="PwdBox" x:Name="PwdBox"
PasswordChanged="PasswordBox_PasswordChanged"/> PasswordChanged="PasswordBox_PasswordChanged"/>
<Grid Grid.Row="2" <Grid Grid.Row="2"
Style="{StaticResource AddPartWnd_Grid}"> Margin="0,0,0,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -33,11 +36,17 @@
Content="Ok" Content="Ok"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource GeneralConfiguration_Button}"/> Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Grid.Column="3" <Button Grid.Column="3"
Content="Cancel" Content="Cancel"
IsCancel="True" IsCancel="True"
Style="{StaticResource GeneralConfiguration_Button}"/> Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
</Grid> </Grid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtBEAMWALLCORE:OptimizerWindow>
@@ -1,29 +1,27 @@
<StackPanel x:Class="InstrumentPanelV" <StackPanel x:Class="InstrumentPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource BTLPartManager_StackPanel}"> Orientation="Vertical">
<ToggleButton ToolTip="{Binding GetDistToolTip}" <ToggleButton ToolTip="{Binding GetDistToolTip}"
IsChecked="{Binding GetDistIsChecked}" IsChecked="{Binding GetDistIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}"> Height="30"
Width="30"
Margin="5,2,5,2">
<Image Source="{StaticResource GetDist_Image}" <Image Source="{StaticResource GetDist_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</ToggleButton> </ToggleButton>
<Button ToolTip="{Binding ChangeParam_ToolTip}"
Command="{Binding ChangeParameter_Command}"
Visibility="{Binding ChangeParam_Visibility}"
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="{StaticResource ChangeParam_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Content="MAT" <Button Content="MAT"
ToolTip="{Binding ChangeMaterial_ToolTip}" ToolTip="{Binding ChangeMaterial_ToolTip}"
Command="{Binding ChangeMaterial_Command}" Command="{Binding ChangeMaterial_Command}"
Visibility="Collapsed" Visibility="Collapsed"
IsEnabled="{Binding InstrumentPanel_IsEnabled}" IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Style="{StaticResource InstrumentPanel_Button}"/> FontWeight="Light"
FontSize="12"
Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}"/>
<!--Visibility="{Binding ChangeMaterial_Visibility}"--> <!--Visibility="{Binding ChangeMaterial_Visibility}"-->
</StackPanel> </StackPanel>
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel Imports EgtUILib
Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtBEAMWALL.Core Imports EgtBEAMWALL.Core
@@ -31,7 +30,6 @@ Public Class MyInstrumentPanelVM
End Property End Property
' Definizione comandi ' Definizione comandi
Private m_cmdChangeParameter As ICommand
Private m_cmdChangeMaterial As ICommand Private m_cmdChangeMaterial As ICommand
#Region "Messages" #Region "Messages"
@@ -81,53 +79,6 @@ Public Class MyInstrumentPanelVM
#Region "COMMANDS" #Region "COMMANDS"
#Region "ChangeParameter"
Public ReadOnly Property ChangeParameter_Command As ICommand
Get
If m_cmdChangeParameter Is Nothing Then
m_cmdChangeParameter = New Command(AddressOf ChangeParameter)
End If
Return m_cmdChangeParameter
End Get
End Property
Friend Sub ChangeParameter()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
Dim ChangeParameterWndVM As New ChangeParameterWndVM
Dim ChangeParameterWnd As New ChangeParameterWndV(Application.Current.MainWindow, ChangeParameterWndVM)
If ChangeParameterWnd.ShowDialog() Then
LoadingWndHelper.OpenLoadingWnd(ActiveIds.CHANGEPARAM, 1, EgtMsg(63014), "", 100) ' Modifying parameters
' faccio passare pezzi
If Not IsNothing(ChangeParameterWndVM.SelParam) Then
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
For Each Feature In Part.BTLFeatureVMList.Where(Function(x) x.nPRC = ChangeParameterWndVM.SelPRC.nPRC AndAlso CalcBeamPrivateProfileGRP(x.nSelGRP) = ChangeParameterWndVM.SelPRC.nGRP)
If ChangeParameterWndVM.SelParam.BTLParamM.nType = BTLParamType.CHECKBOX AndAlso Feature.bDO = ChangeParameterWndVM.SelParam.bActualValue Then
Feature.bDO = ChangeParameterWndVM.SelParam.bNewValue
Else
Dim ParamList As ObservableCollection(Of BTLParamVM) = Feature.PBTLParamVMList
For Each Param In ParamList.Where(Function(x) x.sName = ChangeParameterWndVM.SelParam.sName)
Select Case Param.nType
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
If Math.Abs(Param.dValue - ChangeParameterWndVM.SelParam.dActualValue) < EPS_SMALL Then
Param.UpdateParamValue(ChangeParameterWndVM.SelParam.dNewValue, "")
End If
Case BTLParamType.STRING_
If Param.sValue = ChangeParameterWndVM.SelParam.sActualValue Then
Param.UpdateParamValue(0, ChangeParameterWndVM.SelParam.sNewValue)
End If
End Select
Next
End If
Next
Next
End If
LoadingWndHelper.CloseLoadingWnd(ActiveIds.CHANGEPARAM)
End If
End Sub
#End Region ' ChangeParameter
#Region "ChangeMaterial" #Region "ChangeMaterial"
Public ReadOnly Property ChangeMaterial_Command As ICommand Public ReadOnly Property ChangeMaterial_Command As ICommand
+141 -60
View File
@@ -6,88 +6,142 @@
<UniformGrid Columns="6" <UniformGrid Columns="6"
Rows="7" Rows="7"
Style="{StaticResource AddFeatureWnd_UniformGrid}"> Margin="5">
<TextBlock Text="{Binding PROJNUM_MSG}" <TextBlock Text="{Binding PROJNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> HorizontalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJNUM, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sPROJNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PROJNAME_MSG}" <TextBlock Text="{Binding PROJNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJNAME, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sPROJNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PROJPART_MSG}" <TextBlock Text="{Binding PROJPART_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJPART, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sPROJPART, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PROJGUID_MSG}" <TextBlock Text="{Binding PROJGUID_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPROJGUID, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sPROJGUID, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding LISTNAME_MSG}" <TextBlock Text="{Binding LISTNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sLISTNAME, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sLISTNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding CUSTOMER_MSG}" <TextBlock Text="{Binding CUSTOMER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCUSTOMER, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sCUSTOMER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding ARCHITECT_MSG}" <TextBlock Text="{Binding ARCHITECT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sARCHITECT, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sARCHITECT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EDITOR_MSG}" <TextBlock Text="{Binding EDITOR_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEDITOR, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sEDITOR, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding DELIVDATE_MSG}" <TextBlock Text="{Binding DELIVDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sDELIVDATE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sDELIVDATE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EXPDATE_MSG}" <TextBlock Text="{Binding EXPDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPDATE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sEXPDATE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EXPTIME_MSG}" <TextBlock Text="{Binding EXPTIME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPTIME, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sEXPTIME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EXPRELEASE_MSG}" <TextBlock Text="{Binding EXPRELEASE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPRELEASE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sEXPRELEASE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding LANGUAGE_MSG}" <TextBlock Text="{Binding LANGUAGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sLANGUAGE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sLANGUAGE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding RANGE_MSG}" <TextBlock Text="{Binding RANGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.ocRANGE, Path=Tag.ocRANGE,
@@ -95,9 +149,12 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.SelRANGE, Path=Tag.SelRANGE,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}" <TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.ocPROCESSINGQUALITY, Path=Tag.ocPROCESSINGQUALITY,
@@ -105,33 +162,52 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.SelPROCESSINGQUALITY, Path=Tag.SelPROCESSINGQUALITY,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding COMPUTERNAME_MSG}" <TextBlock Text="{Binding COMPUTERNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCOMPUTERNAME, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sCOMPUTERNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding USER_MSG}" <TextBlock Text="{Binding USER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sUSER, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sUSER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding SRCFILE_MSG}" <TextBlock Text="{Binding SRCFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sSRCFILE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sSRCFILE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding EXPFILE_MSG}" <TextBlock Text="{Binding EXPFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sEXPFILE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sEXPFILE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding RECESS_MSG}" <TextBlock Text="{Binding RECESS_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.ocRECESS, Path=Tag.ocRECESS,
@@ -139,13 +215,18 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.SelRECESS, Path=Tag.SelRECESS,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding USERATTRIBUTE_MSG}" <TextBlock Text="{Binding USERATTRIBUTE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sUSERATTRIBUTE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sUSERATTRIBUTE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</UniformGrid> </UniformGrid>
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,11 @@
Imports System.Reflection Imports System.IO
Imports System.Reflection
Imports DevExpress.Data
Imports DevExpress.Xpf.Bars
Imports DevExpress.Xpf.Core.Serialization
Imports DevExpress.Xpf.Grid
Imports DevExpress.Xpf.Utils
Imports EgtBEAMWALL.Core
Public Class BTLPartListV Public Class BTLPartListV
@@ -8,111 +15,248 @@ Public Class BTLPartListV
Private m_isDraggingSelectionField As FieldInfo Private m_isDraggingSelectionField As FieldInfo
Private m_endDraggingMethod As MethodInfo Private m_endDraggingMethod As MethodInfo
Private m_sDataGridLayoutPath As String = ""
Private _lastExpanded As Integer = -1
Private bSelOnFeature As Boolean = False
Sub New() Sub New()
' This call is required by the designer. ' This call is required by the designer.
InitializeComponent() InitializeComponent()
' Add any initialization after the InitializeComponent() call. ' Add any initialization after the InitializeComponent() call.
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\BTLPart.json"
' controllo se la directory esiste
If Not Directory.Exists(Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile") Then
' Se non esiste, la crea
Directory.CreateDirectory(Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile")
End If
For Each Column In BTLPart_GridControl.Columns
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
Next
DXSerializer.AddAllowPropertyHandler(BTLPart_GridControl, AddressOf OnAddAllowProperty)
End Sub
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
e.Allow = True
End If
End Sub
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
If e.Property.Name = "FilterString" Then
e.Allow = False
ElseIf e.Property.Name = "MRUFilters" Then
e.Allow = False
ElseIf e.Property.Name = "MRUFilterList" Then
e.Allow = False
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
e.Allow = False
End If
End Sub
' salvataggio del layout colonne
Public Sub SaveBTLPartGridControlLayout()
BTLPart_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
End Sub
Public Sub IsVisibleGroupSummary(bValue As Boolean)
If bValue AndAlso BTLPart_GridControl.GroupSummary.Count = 0 Then
BTLPart_GridControl.GroupSummary.Clear()
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nPDN",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Count,
.ShowInGroupColumnFooter = "nPDN"}
BTLPart_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Sum,
.ShowInGroupColumnFooter = "sCNT"}
BTLPart_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Sum,
.ShowInGroupColumnFooter = "sADDED"}
BTLPart_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nINPROD",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Sum,
.ShowInGroupColumnFooter = "nINPROD"}
BTLPart_GridControl.GroupSummary.Add(INPRODGroupSummaryItem)
Dim DONEGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nDONE",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Sum,
.ShowInGroupColumnFooter = "nDONE"}
BTLPart_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
End If
BTLPart_TableView.ShowGroupFooters = bValue
End Sub
Public Sub Me_Loaded() Handles Me.Loaded
' imposto DataContext
m_BTLPartListVM = DataContext m_BTLPartListVM = DataContext
' Evita il drag sulla selezione multipla ' imposto riferimento ad action per salvataggio layout tabella
m_isDraggingSelectionField = m_DataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic) m_BTLPartListVM.refSaveBTLPartGridControlLayout = AddressOf SaveBTLPartGridControlLayout
m_endDraggingMethod = m_DataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic) ' rispristino layout tabella
End Sub If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
BTLPart_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
' Evita il drag sulla selezione multipla
If e.LeftButton = MouseButtonState.Pressed Then
If CBool(If(m_isDraggingSelectionField?.GetValue(sender), False)) Then m_endDraggingMethod.Invoke(sender, New Object(-1) {})
End If End If
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
IsVisibleGroupSummary(False)
End Sub End Sub
Private Sub PartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) ' customizzazione ContextMenu del GridControl
If e.ChangedButton = MouseButton.Left Then Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
If TypeOf sender Is DataGridRow Then If e.MenuType = GridMenuType.Column Then
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count <> 1 Then Return ' rimozione bottoni
Dim Row As DataGridRow = DirectCast(sender, DataGridRow) e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
If TypeOf Row.DataContext IsNot BTLPartVM Then Return e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
Dim BTLPartVM As BTLPartVM = DirectCast(Row.DataContext, BTLPartVM) e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
Dim DataGridDetailsPresenter As Object = TreeHelperManager.FindVisualParents(Of Button, CheckBox, Primitives.DataGridDetailsPresenter)(e.OriginalSource) e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
If Not IsNothing(DataGridDetailsPresenter) Then Return e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Contains(BTLPartVM) Then
BTLPartVM.SetOpenFeatureList(Not BTLPartVM.bOpenFeatureList) Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
End If Dim item As ColumnBase = CType(info.Column, ColumnBase)
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.BTLStructureVM.SelBTLPart.Equals(BTLPartVM) Then ' aggiunta separatore
Map.refProjectVM.BTLStructureVM.SelectBTLPart(BTLPartVM, True) Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
End If e.Customizations.Add(separator)
' aggiunta bottone AllowResize e Auto Fit
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (BTLPart_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
e.Customizations.Add(AllowResize)
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
e.Customizations.Add(FixAuto)
End If End If
End If End If
End Sub End Sub
Private Sub ListBox_PreviewMouseWheel(ByVal sender As Object, ByVal e As MouseWheelEventArgs) ' gestore evento Allow Resize
' gestione dello scroll, per permetterlo anche quando mouse su RowDetails Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
Dim info As GridColumnMenuInfo = TryCast(BTLPart_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
Else
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
End If
End Sub
' gestore evento Auto Fit
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
Dim info As GridColumnMenuInfo = TryCast(BTLPart_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
BTLPart_TableView.UpdateLayout()
item.Width = item.ActualWidth
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
End Sub
Private Sub FilterAllBtn_PreviewMouseDown(sender As Object, e As RoutedEventArgs)
If FilterSectxMat_Popup.IsOpen Then
FilterSectxMat_Popup.IsOpen = False
e.Handled = True
End If
End Sub
Private Sub FilterAllBtn_Click(sender As Object, e As RoutedEventArgs)
If Not FilterSectxMat_Popup.IsOpen Then
FilterSectxMat_Popup.IsOpen = True
End If
End Sub
Private _expandedRowHandle As Integer = -1
Private Sub View_MasterRowExpanding(sender As Object, e As DevExpress.Xpf.Grid.RowAllowEventArgs)
If _expandedRowHandle <> -1 AndAlso _expandedRowHandle <> e.RowHandle Then
If BTLPart_GridControl.IsMasterRowExpanded(_expandedRowHandle) Then
BTLPart_GridControl.CollapseMasterRow(_expandedRowHandle)
End If
End If
End Sub
Private Sub View_MasterRowExpanded(sender As Object, e As RowEventArgs)
_expandedRowHandle = e.RowHandle
End Sub
Private Sub View_MasterRowCollapsed(sender As Object, e As RowEventArgs)
If _expandedRowHandle = e.RowHandle Then
_expandedRowHandle = -1
End If
End Sub
Private Sub View_FocusedRowChanged(sender As Object, e As FocusedRowChangedEventArgs)
Dim view = CType(sender, TableView)
' Se cè una master aperta e la riga selezionata è diversa
If _expandedRowHandle <> -1 AndAlso _expandedRowHandle <> BTLPart_TableView.FocusedRowHandle Then
' Se è ancora espansa (sorting/filtering potrebbe averla chiusa)
If BTLPart_GridControl.IsMasterRowExpanded(_expandedRowHandle) Then
BTLPart_GridControl.CollapseMasterRow(_expandedRowHandle)
End If
_expandedRowHandle = -1
End If
End Sub
Private Sub Button_PreviewMouseDown(sender As Object, e As RoutedEventArgs)
Dim button = CType(sender, Button)
Dim cell = TryCast(button.DataContext, EditGridCellData)
Dim BTLPartVM = TryCast(cell.Row, BTLPartVM)
' 1) Chiudi eventuale master aperta
If _expandedRowHandle <> -1 AndAlso BTLPart_GridControl.IsMasterRowExpanded(_expandedRowHandle) Then
' Ottieni il RowHandle della riga del bottone
Dim expandedRow = BTLPart_GridControl.GetRow(_expandedRowHandle)
' Confronto per riferimento: stessa istanza di ViewModel = stessa riga
If Not Object.ReferenceEquals(BTLPartVM, expandedRow) Then
BTLPart_GridControl.CollapseMasterRow(_expandedRowHandle)
_expandedRowHandle = -1
End If
End If
' 2) Esegui il comando MVVM della riga
If Not IsNothing(BTLPartVM) Then
BTLPartVM.ForwardRotation_Command.Execute(Nothing)
End If
' 3) Blocca la gestione del click da parte della grid
e.Handled = True e.Handled = True
Dim DependencyParent As DependencyObject = sender
While TypeOf DependencyParent IsNot ListBox
DependencyParent = VisualTreeHelper.GetParent(DependencyParent)
End While
If IsNothing(DependencyParent) Then
Return
End If
Dim parent As ListBox = TryCast(DependencyParent, ListBox)
If IsNothing(parent) Then
Return
End If
parent?.[RaiseEvent](New MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta) With {
.RoutedEvent = MouseWheelEvent,
.Source = sender})
End Sub End Sub
Private Sub OpenPopUp_Click(sender As Object, e As RoutedEventArgs) Private Sub BTLPart_TableView_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Dim btn As Button = DirectCast(sender, Button) ' Ottieni il bottone che ha generato l'evento bSelOnFeature = False
Dim parent As DependencyObject = btn
' Cerca il Popup nel Visual Tree
While Not IsNothing(parent) AndAlso TypeOf parent IsNot DataGridRow
parent = VisualTreeHelper.GetParent(parent)
End While
If Not IsNothing(parent) Then
Dim popup As New BTLPartListPopUpV()
If Not IsNothing(popup) Then
popup.PlacementTarget = btn ' Associa il popup al bottone
popup.IsOpen = True ' Mostra il popup
End If
End If
End Sub End Sub
Private Sub SelectButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) Private Sub ListBox_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Dim button = TryCast(sender, Button) bSelOnFeature = True
Dim listBoxItem = FindAncestor(Of ListBoxItem)(button)
If Not IsNothing(listBoxItem) Then
listBoxItem.IsSelected = True
End If
End Sub End Sub
Private Function FindAncestor(Of T As DependencyObject)(ByVal current As DependencyObject) As T Private Sub BTLPart_GridControl_PreviewKeyDown(sender As Object, e As KeyEventArgs)
While Not IsNothing(current) If e.Key = Key.Delete Then
Dim BTLStructureVM As BTLStructureVM = TryCast(Me.Tag, BTLStructureVM)
If IsNothing(BTLStructureVM) Then Return
If TypeOf current Is T Then Dim SelBTLPart As BTLPartVM = BTLStructureVM.SelBTLPart
Return CType(current, T) Dim SelBTLFeatureVM As BTLFeatureVM = SelBTLPart?.SelBTLFeatureVM
If bSelOnFeature AndAlso Not IsNothing(SelBTLFeatureVM) Then
SelBTLFeatureVM.DeleteFeature()
e.Handled = True
Return
End If End If
current = VisualTreeHelper.GetParent(current) BTLStructureVM.DeletePart()
End While e.Handled = True
End If
Return Nothing End Sub
End Function
End Class End Class
Public Class SettingsBtnVerticalOffsetMultiConverter
Implements IMultiValueConverter
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
Dim x = 3
Return 10
End Function
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
@@ -9,6 +9,8 @@ Public Class BTLPartListVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Friend refSaveBTLPartGridControlLayout As Action
Private m_colPart_Do As EgwWPFBaseLib.ColumnLayout Private m_colPart_Do As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colPart_Do As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colPart_Do As EgwWPFBaseLib.ColumnLayout
Get Get
@@ -63,6 +65,28 @@ Public Class BTLPartListVM
End Set End Set
End Property End Property
Private m_CALCPanel_IsEnabled As Boolean = True
Public ReadOnly Property CALCPanel_IsEnabled As Boolean
Get
Return m_CALCPanel_IsEnabled
End Get
End Property
Friend Sub SetCALCPanel_IsEnabled(value As Boolean)
m_CALCPanel_IsEnabled = value
NotifyPropertyChanged(NameOf(CALCPanel_IsEnabled))
End Sub
Private m_BTLUpdated As Boolean = True
Public ReadOnly Property BTLUpdated As Boolean
Get
Return m_BTLUpdated
End Get
End Property
Friend Sub SetBTLUpdated(bValue As Boolean)
m_BTLUpdated = bValue
NotifyPropertyChanged(NameOf(BTLUpdated))
End Sub
#Region "Messages" #Region "Messages"
Public ReadOnly Property PDN_Msg As String Public ReadOnly Property PDN_Msg As String
@@ -185,8 +209,37 @@ Public Class BTLPartListVM
End Get End Get
End Property End Property
Public ReadOnly Property VerifyAll_ToolTip As String
Get
Return EgtMsg(61928)
End Get
End Property
Public ReadOnly Property VerifyAllFlipRot_ToolTip As String
Get
Return EgtMsg(62000)
End Get
End Property
Public ReadOnly Property FilterAll_ToolTip As String
Get
Return EgtMsg(62570)
End Get
End Property
Public ReadOnly Property ResetCalc_ToolTip As String
Get
Return EgtMsg(61940)
End Get
End Property
#End Region ' Messages #End Region ' Messages
' Definizione comandi
Private m_cmdVerifyAll As ICommand
Private m_cmdVerifyFlipRotAll As ICommand
Private m_cmdResetCalc As ICommand
#End Region ' Fields & Properties #End Region ' Fields & Properties
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -207,6 +260,94 @@ Public Class BTLPartListVM
#End Region ' Constructor #End Region ' Constructor
#Region "METHODS"
Friend Sub Close()
If Not IsNothing(refSaveBTLPartGridControlLayout) Then
refSaveBTLPartGridControlLayout()
End If
End Sub
#End Region ' Methods
#Region "COMMANDS"
#Region "VerifyAll"
Public ReadOnly Property VerifyAll_Command As ICommand
Get
If m_cmdVerifyAll Is Nothing Then
m_cmdVerifyAll = New Command(AddressOf VerifyAll)
End If
Return m_cmdVerifyAll
End Get
End Property
Friend Sub VerifyAll()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
' imposto flag per calcolo
Map.refCALCPanelVM.SetCalculating(True)
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ, CalcIntegration.CmdTypes.CHECKNOSIM)
Return
End Sub
#End Region ' VerifyAll
#Region "VerifyAllFlipRot"
Public ReadOnly Property VerifyAllFlipRot_Command As ICommand
Get
If m_cmdVerifyFlipRotAll Is Nothing Then
m_cmdVerifyFlipRotAll = New Command(AddressOf VerifyAllFlipRot)
End If
Return m_cmdVerifyFlipRotAll
End Get
End Property
Friend Sub VerifyAllFlipRot()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
' imposto flag per calcolo
Map.refCALCPanelVM.SetCalculating(True)
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ, CalcIntegration.CmdTypes.FLIP_ROT)
Return
End Sub
#End Region ' VerifyAllRotate
#Region "ResetCalc"
Public ReadOnly Property ResetCalc_Command As ICommand
Get
If m_cmdResetCalc Is Nothing Then
m_cmdResetCalc = New Command(AddressOf ResetCalc)
End If
Return m_cmdResetCalc
End Get
End Property
Public Sub ResetCalc()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
Map.refCALCPanelVM.SetCalculating(False)
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
If Part.nGlobalState <> CalcStates.NOTCALCULATED Then
' Resetto info
If Map.refProjectVM.InfoNgeValue.Count > 0 Then
For Each InfoNgePart As String In Map.refProjectVM.InfoNgeValue
EgtRemoveInfo(Part.nPartId, InfoNgePart)
Next
End If
' resetto stato dei calcoli
Part.ResetCalcTotalPart()
End If
If Not Part.IsRowEnabled Then Part.SetIsRowEnabled(True)
Next
End Sub
#End Region ' ResetCalc
#End Region ' Commands
End Class End Class
Class DataGridCellBorderThicknessConverter Class DataGridCellBorderThicknessConverter
@@ -237,17 +378,17 @@ Class DataGridCellBorderThicknessConverter
End Class End Class
Class ProjIdToBtlFileName Class ProjIdToBtlFileName
Implements IValueConverter Implements IMultiValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
If TypeOf value IsNot Integer Then Return "" If TypeOf values(0) IsNot String Then Return ""
Dim nProjId As Integer = CInt(value) Dim nProjId As Integer = Integer.Parse(System.Text.RegularExpressions.Regex.Match(values(0), "\d+").Value)
Dim ProjModel As EgtBEAMWALL.DataLayer.DatabaseModels.ProjModel = DbControllers.m_ProjController.FindByProjId(nProjId) Dim ProjModel As EgtBEAMWALL.DataLayer.DatabaseModels.ProjModel = DbControllers.m_ProjController.FindByProjId(nProjId)
If IsNothing(ProjModel) Then Return "" If IsNothing(ProjModel) Then Return ""
Return ProjModel.BTLFileName Return ProjModel.BTLFileName
End Function End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
Throw New NotImplementedException() Throw New NotImplementedException()
End Function End Function
@@ -2,110 +2,150 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"> xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
Margin="-7">
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.FeatureVMList, <dxg:GridControl x:Name="FeatureVMList_GridControl"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}" ItemsSource="{Binding Tag.FeatureVMList,
SelectedItem="{Binding Tag.SelFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}" SelectedItem="{Binding Tag.SelFeatureVM,
SelectionMode="Single" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
Margin="0,0,0,5" SelectionMode="Row">
ColumnLayouts="{Binding FeatureInPartInRawPartColumns}" <dxg:GridControl.View>
BeginningEdit="FeatureInPartInRawPartList_BeginningEdit" <dxg:TableView x:Name="FeatureVMList_TableView"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}" AllowPerPixelScrolling="True"
AlternationCount="2" AllowEditing="False"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}" AllowSorting="True"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}" AllowGrouping="True"
Style="{StaticResource Optimizer_DataGrid}"> AllowColumnFiltering="True"
<DataGrid.RowStyle> AllowFilterEditor="False"
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}"> AllowFilterPanelNavigation="False"
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/> ExtendScrollBarToFixedColumns="True"
</Style> Focusable="False"
</DataGrid.RowStyle> GroupSummaryDisplayMode="AlignByColumns"
IsTotalSummaryMenuEnabled="False"
<DataGrid.InputBindings> IsGroupFooterMenuEnabled="True"
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command, NavigationStyle="Row"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"/> ShowGroupPanel="False"
</DataGrid.InputBindings> ShowTotalSummary="False"
<DataGrid.Resources> ShowSearchPanelMode="Default"
<DataGridTemplateColumn x:Key="colDO"> ShowFilterPanelMode="Never"
<DataGridTemplateColumn.HeaderTemplate> ShowIndicator="False"
<DataTemplate> ShowColumnHeaders="True"
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}" ShowHorizontalLines="True"
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}" ShowVerticalLines="False"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/> ShowFocusedRectangle="True"
</DataTemplate> ShowGridMenu="OnShowGridMenu"
</DataGridTemplateColumn.HeaderTemplate> ShowGroupFooters="True"
<DataGridTemplateColumn.CellTemplate> ShowSearchPanelResultInfo="True"
<DataTemplate> ShowSearchPanelNavigationButtons="True"
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}" UseEvenRowBackground="True"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
</DataTemplate> PreviewMouseDown="FeatureVMList_TableView_PreviewMouseDown"
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> ColumnHeaderStyle="{StaticResource Header_Style}"
<!--Validità feature--> ColumnHeaderImageStyle="{StaticResource HeaderImage_Style}"
<DataGridTemplateColumn x:Key="colCALC">
<DataGridTemplateColumn.CellTemplate> RowStyle="{StaticResource Row_Style}"
<DataTemplate>
<Grid> Style="{StaticResource TableView_Style}"/>
<Grid.ColumnDefinitions> </dxg:GridControl.View>
<ColumnDefinition Width="1*"/> <dxg:GridColumn FieldName="bDO"
<ColumnDefinition Width="10"/> AllowSorting="False"
</Grid.ColumnDefinitions> Header=""
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}" Fixed="Left"
Background="{Binding Calc_Background}"/> Style="{StaticResource ColumnInfo_Style}">
<Grid Grid.Column="1" <dxg:GridColumn.HeaderTemplate>
Style="{StaticResource FeatureInPartInRawPartList_Grid}"> <DataTemplate>
<Grid.RowDefinitions> <CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
<RowDefinition Height="1*"/> IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"/>
<RowDefinition Height="Auto"/> </DataTemplate>
</Grid.RowDefinitions> </dxg:GridColumn.HeaderTemplate>
<TextBlock Visibility="{Binding CALC_ROT_Visibility}" <dxg:GridColumn.CellTemplate>
Style="{StaticResource CALC_ROT_TextBlock}"/> <DataTemplate>
<TextBlock Grid.Row="1" <dxe:CheckEdit IsChecked="{Binding RowData.Row.bDO}"
Text="{Binding CALC_ERR_Letter}" IsEnabled="{Binding RowData.Row.IsEnabled}"
Foreground="{Binding CALC_ERR_Foreground}" HorizontalAlignment="Center"/>
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/> </DataTemplate>
</Grid> </dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="GlobalState"
Header=""
SortFieldName="nGlobalState"
AllowColumnFiltering="False">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Grid Margin="5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="12"/>
</Grid.ColumnDefinitions>
<Border Background="{Binding RowData.Row.Calc_Background}"
Height="20"
Width="20"/>
<Grid Grid.Column="1"
HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="&#11119;"
Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontWeight="SemiBold"
FontSize="12"
Margin="1,-4,0,0"/>
<TextBlock Grid.Row="1"
Text="{Binding RowData.Row.CALC_ERR_Letter}"
Foreground="{Binding RowData.Row.CALC_ERR_Foreground}"
TextAlignment="Center"
FontWeight="Bold"
FontSize="12"
Margin="-1,-6,1,-3"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
</Grid> </Grid>
</DataTemplate> </Grid>
</DataGridTemplateColumn.CellTemplate> </DataTemplate>
</DataGridTemplateColumn> </dxg:GridColumn.CellTemplate>
<!--Descrizione--> </dxg:GridColumn>
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}"> <dxg:GridColumn FieldName="sDesc"
<DataGridTextColumn.HeaderTemplate> AllowSorting="False"
<DataTemplate> Header="{Binding Description_Msg}"
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/> Style="{StaticResource ColumnInfo_Style}"/>
</DataTemplate> <dxg:GridColumn FieldName="sPriority"
</DataGridTextColumn.HeaderTemplate> Header="{Binding Priority_Msg}"
</DataGridTextColumn> Style="{StaticResource ColumnInfo_Style}"/>
<!--Descrizione--> <dxg:GridColumn FieldName="Strategy"
<DataGridTextColumn x:Key="colPRIORITY" Binding="{Binding sPriority}"> AllowSorting="False"
<DataGridTextColumn.HeaderTemplate> Header=""
<DataTemplate> Image="{StaticResource HeaderEdit_Image}"
<TextBlock Text="{Binding DataContext.Priority_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/> Fixed="Right"
</DataTemplate> Style="{StaticResource ColumnButton_Style}">
</DataGridTextColumn.HeaderTemplate> <dxg:GridColumn.CellTemplate>
</DataGridTextColumn> <DataTemplate>
<!--STR - Strategia--> <Button Command="{Binding RowData.Row.Strategy_Command}"
<DataGridTemplateColumn x:Key="colSTRATEGY"> IsEnabled="{Binding RowData.Row.IsEnabled}"
<DataGridTemplateColumn.HeaderTemplate> ToolTip="{Binding RowData.Row.Strategy_ToolTip}">
<DataTemplate> <Image Source="{StaticResource Edit_Image}"
<TextBlock Text="Strategia"/> Height="20"
</DataTemplate> Width="20"
</DataGridTemplateColumn.HeaderTemplate> Stretch="Uniform"/>
<DataGridTemplateColumn.CellTemplate> </Button>
<DataTemplate> </DataTemplate>
<Button ToolTip="{Binding Strategy_ToolTip}" </dxg:GridColumn.CellTemplate>
Command="{Binding Strategy_Command}" </dxg:GridColumn>
Style="{StaticResource FeatureInPartInRawPartList_Button}"> </dxg:GridControl>
<Image Source="{StaticResource Verify_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Resources>
</EgwWPFBaseLib:EgwDataGrid>
</UserControl> </UserControl>
@@ -1,25 +1,127 @@
Imports EgtBEAMWALL.Core Imports System.IO
Imports DevExpress.Xpf.Bars
Imports DevExpress.Xpf.Core.Serialization
Imports DevExpress.Xpf.Grid
Imports EgtBEAMWALL.Core
Public Class FeatureInPartInRawPartListV Public Class FeatureInPartInRawPartListV
' funzione che impedisce di editare le righe che sono gia' in produzione Private m_FeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM
Private Sub FeatureInPartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs) Private m_sDataGridLayoutPath As String = ""
If IsNothing(e.Row) Then Return
Dim RowVM As BTLFeatureVM = DirectCast(e.Row.DataContext, BTLFeatureVM) Sub New()
' se in produzione impedisco modifica dei parametri
If DirectCast(RowVM.BTLFeatureM.ParentPart, PartM).nProductionState > ItemState.ND Then ' This call is required by the designer.
'For Each cell In Row.Item InitializeComponent()
e.Cancel = True
' Add any initialization after the InitializeComponent() call.
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\FeatureInPartInRawPart.json"
For Each Column In FeatureVMList_GridControl.Columns
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
Next
FeatureVMList_GridControl.Columns("sPriority").Visible = False
DXSerializer.AddAllowPropertyHandler(FeatureVMList_GridControl, AddressOf OnAddAllowProperty)
End Sub
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
e.Allow = True
End If End If
End Sub End Sub
Private Sub FeatureList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) ' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
If TypeOf sender Is DataGridRow Then Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
Dim Row As DataGridRow = DirectCast(sender, DataGridRow) If e.Property.Name = "FilterString" Then
If Not IsNothing(Row) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then e.Allow = False
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM ElseIf e.Property.Name = "MRUFilters" Then
e.Allow = False
ElseIf e.Property.Name = "MRUFilterList" Then
e.Allow = False
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
e.Allow = False
End If
End Sub
' salvataggio del layout colonne
Public Sub SaveFeatureInPartInRawPartGridControlLayout()
FeatureVMList_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
End Sub
Public Sub Me_Loaded() Handles Me.Loaded
' imposto DataContext
m_FeatureInPartInRawPartListVM = Me.DataContext
' imposto riferimento ad action per salvataggio layout tabella
m_FeatureInPartInRawPartListVM.refSaveFeatureInPartInRawPartGridControlLayout = AddressOf SaveFeatureInPartInRawPartGridControlLayout
' rispristino layout tabella
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
FeatureVMList_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
End If
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
FeatureVMList_TableView.ShowGroupFooters = False
End Sub
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
If e.MenuType = GridMenuType.Column Then
' rimozione bottoni
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
' aggiunta separatore
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
e.Customizations.Add(separator)
' aggiunta bottone AllowResize e Auto Fit
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (FeatureVMList_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
e.Customizations.Add(AllowResize)
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
e.Customizations.Add(FixAuto)
End If End If
End If End If
End Sub End Sub
' gestore evento Allow Resize
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
Dim info As GridColumnMenuInfo = TryCast(FeatureVMList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
Else
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
End If
End Sub
' gestore evento Auto Fit
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
Dim info As GridColumnMenuInfo = TryCast(FeatureVMList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
FeatureVMList_TableView.UpdateLayout()
item.Width = item.ActualWidth
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
End Sub
Private Sub FeatureVMList_TableView_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Dim IndexRow As Integer = FeatureVMList_TableView.FocusedRowHandle
If IndexRow < 0 Then Return
If IsNothing(Map.refProjectVM) Then Return
If IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return
If IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) Then Return
If IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Return
If IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then Return
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.FeatureVMList(IndexRow)
End Sub
End Class End Class
@@ -8,6 +8,8 @@ Public Class FeatureInPartInRawPartListVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Public refSaveFeatureInPartInRawPartGridControlLayout As Action
Private m_colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout Private m_colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
Get Get
@@ -78,6 +80,12 @@ Public Class FeatureInPartInRawPartListVM
End If End If
End Sub End Sub
Friend Sub Close()
If Not IsNothing(refSaveFeatureInPartInRawPartGridControlLayout) Then
refSaveFeatureInPartInRawPartGridControlLayout()
End If
End Sub
#End Region ' Methods #End Region ' Methods
End Class End Class
@@ -2,9 +2,22 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"> xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
<Grid Margin="5"> <Grid Margin="5">
<Grid.Resources>
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" />
</Grid.Resources>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -13,137 +26,122 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<EgwWPFBaseLib:EgwDataGrid CanUserDeleteRows="False" <dxg:GridControl x:Name="PParameterList_GridControl"
SelectionMode="Single" ItemsSource="{Binding Tag.PBTLParamVMList,
Margin="0,0,0,5" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
ItemsSource="{Binding Tag.PBTLParamVMList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}" SelectedItem="{Binding Tag.SelPBTLParam,
SelectedItem="{Binding Tag.SelPBTLParam, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
IsEnabled="{Binding PParameterList_IsEnabled}" SelectionMode="Row">
ColumnLayouts="{Binding PParameterListColumns}" <dxg:GridControl.View>
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}" <dxg:TableView x:Name="PParameterList_TableView"
AlternationCount="2" AllowPerPixelScrolling="True"
ColumnHeaderStyle="{StaticResource PParam_DataGridColumnHeader}" AllowEditing="True"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}" AllowSorting="True"
Style="{StaticResource Optimizer_DataGrid}"> AllowGrouping="True"
<DataGrid.RowStyle> AllowColumnFiltering="True"
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}"> AllowFilterEditor="False"
<EventSetter Event="PreviewMouseDown" Handler="PParameterList_PreviewMouseDown"/> AllowFilterPanelNavigation="False"
</Style> ExtendScrollBarToFixedColumns="True"
</DataGrid.RowStyle> Focusable="True"
GroupSummaryDisplayMode="AlignByColumns"
<DataGrid.Resources> IsTotalSummaryMenuEnabled="False"
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" /> IsGroupFooterMenuEnabled="True"
<!--Custom--> NavigationStyle="Cell"
<DataGridTemplateColumn x:Key="colCUSTOM"> ShowGroupPanel="False"
<DataGridTemplateColumn.HeaderTemplate> ShowTotalSummary="False"
<DataTemplate> ShowSearchPanelMode="Default"
<TextBlock Text="{Binding DataContext.Custom_Msg, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/> ShowFilterPanelMode="Never"
</DataTemplate> ShowIndicator="False"
</DataGridTemplateColumn.HeaderTemplate> ShowColumnHeaders="True"
<DataGridTemplateColumn.CellTemplate> ShowHorizontalLines="True"
<DataTemplate> ShowVerticalLines="False"
<CheckBox IsChecked="{Binding bCustom, UpdateSourceTrigger=PropertyChanged}" ShowFocusedRectangle="True"
Visibility="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" ShowGroupFooters="True"
Style="{StaticResource PParameters_CheckBox}"/> ShowSearchPanelResultInfo="True"
</DataTemplate> ShowSearchPanelNavigationButtons="True"
</DataGridTemplateColumn.CellTemplate> UseEvenRowBackground="True"
</DataGridTemplateColumn>
<!--Nome--> ShowGridMenu="OnShowGridMenu"
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
<DataGridTextColumn.HeaderTemplate> PreviewMouseDown="PParameterList_TableView_PreviewMouseDown"
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/> ColumnHeaderStyle="{StaticResource Header_Style}"
</DataTemplate> ColumnHeaderImageStyle="{StaticResource HeaderImage_Style}"
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn> RowStyle="{StaticResource Row_Style}"
<!--Descrizione--> CellStyle="{StaticResource Cell_Style}"
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDescription}">
<DataGridTextColumn.HeaderTemplate> Style="{StaticResource TableView_Style}"/>
<DataTemplate> </dxg:GridControl.View>
<TextBlock Text="{Binding Path=DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/> <dxg:GridColumn FieldName="bCustom"
</DataTemplate> Header="{Binding Custom_Msg}"
</DataGridTextColumn.HeaderTemplate> Fixed="Left"
<DataGridTextColumn.CellStyle> AllowEditing="False"
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}"> Style="{StaticResource ColumnInfo_Style}">
<Setter Property="Template"> <dxg:GridColumn.CellTemplate>
<Setter.Value> <DataTemplate>
<ControlTemplate TargetType="{x:Type DataGridCell}"> <dxe:CheckEdit IsChecked="{Binding RowData.Row.bCustom}"
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}" HorizontalAlignment="Center"/>
Style="{StaticResource Prod_TextBlock}"> </DataTemplate>
<TextBlock.ToolTip> </dxg:GridColumn.CellTemplate>
<ToolTip Style="{StaticResource PParameters_ToolTip}"> </dxg:GridColumn>
<ToolTip.Content> <dxg:GridColumn FieldName="sName"
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}" Header="{Binding NAM_Msg}"
Style="{StaticResource Prod_TextBlock}"/> AllowEditing="False"
</ToolTip.Content> Style="{StaticResource ColumnInfo_Style}"/>
</ToolTip> <dxg:GridColumn FieldName="sDescription"
</TextBlock.ToolTip> Header="{Binding Description_Msg}"
</TextBlock> AllowEditing="False"
</ControlTemplate> Style="{StaticResource ColumnInfo_Style}"/>
</Setter.Value> <dxg:GridColumn FieldName="sValue"
</Setter> SortFieldName="dValue"
</Style> Header="{Binding Value_Msg}"
</DataGridTextColumn.CellStyle> AllowColumnFiltering="False"
<DataGridTextColumn.EditingElementStyle> Style="{StaticResource ColumnInfo_Style}">
<Style TargetType="{x:Type TextBox}"> <dxg:GridColumn.EditSettings>
<Setter Property="FontWeight" Value="Bold" /> <dxe:TextEditSettings HorizontalContentAlignment="Center"/>
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" /> </dxg:GridColumn.EditSettings>
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}" /> </dxg:GridColumn>
</Style> <dxg:GridColumn FieldName="sMin"
</DataGridTextColumn.EditingElementStyle> SortFieldName="dMin"
</DataGridTextColumn> Header="{Binding Min_Msg}"
<!--Valore--> AllowColumnFiltering="False"
<DataGridTextColumn x:Key="colVALUE" Binding="{Binding sValue}" SortMemberPath="dValue"> AllowEditing="False"
<DataGridTextColumn.HeaderTemplate> Style="{StaticResource ColumnInfo_Style}"/>
<DataTemplate> <dxg:GridColumn FieldName="sMax"
<TextBlock Text="{Binding Path=DataContext.Value_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/> SortFieldName="dMaxn"
</DataTemplate> Header="{Binding Max_Msg}"
</DataGridTextColumn.HeaderTemplate> AllowColumnFiltering="False"
<DataGridTextColumn.EditingElementStyle> AllowEditing="False"
<Style TargetType="{x:Type TextBox}"> Style="{StaticResource ColumnInfo_Style}"/>
<Setter Property="FontWeight" Value="Bold" /> </dxg:GridControl>
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" />
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}" />
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<!--Minimo-->
<DataGridTextColumn x:Key="colMIN" Binding="{Binding sMin, Mode=OneWay}" SortMemberPath="dMin">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Min_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--Massimo-->
<DataGridTextColumn x:Key="colMAX" Binding="{Binding sMax, Mode=OneWay}" SortMemberPath="dMax">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Max_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
</DataGrid.Resources>
</EgwWPFBaseLib:EgwDataGrid>
<Image Grid.Column="1" <Image Grid.Column="1"
Source="{Binding sCurrDraw}" Source="{Binding sCurrDraw}"
Style="{StaticResource CurrDraw_Image}"/> Width="250"
Margin="2.5"/>
<StackPanel Grid.Row="1" <StackPanel Grid.Row="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{StaticResource PParameters_StackPanel}"> Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Command="{Binding Ok_Command}" <Button Command="{Binding Ok_Command}"
ToolTip="{Binding Ok_Msg}" ToolTip="{Binding Ok_Msg}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Ok_Image}" <Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding Cancel_Command}" <Button Command="{Binding Cancel_Command}"
ToolTip="{Binding Cancel_Msg}" ToolTip="{Binding Cancel_Msg}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource Delete_Image}" <Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
@@ -1,12 +1,126 @@
Public Class PParameterListV Imports System.IO
Imports DevExpress.Xpf.Bars
Imports DevExpress.Xpf.Core.Serialization
Imports DevExpress.Xpf.Grid
Imports EgtBEAMWALL.Core
Private Sub PParameterList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Public Class PParameterListV
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow) Private m_PParameterListVM As PParameterListVM
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then Private m_sDataGridLayoutPath As String = ""
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam
Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\PParameters.json"
For Each Column In PParameterList_GridControl.Columns
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
Next
PParameterList_GridControl.Columns("bCustom").Visible = False
DXSerializer.AddAllowPropertyHandler(PParameterList_GridControl, AddressOf OnAddAllowProperty)
End Sub
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
e.Allow = True
End If
End Sub
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
If e.Property.Name = "FilterString" Then
e.Allow = False
ElseIf e.Property.Name = "MRUFilters" Then
e.Allow = False
ElseIf e.Property.Name = "MRUFilterList" Then
e.Allow = False
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
e.Allow = False
End If
End Sub
' salvataggio del layout colonne
Public Sub SavePParameterGridControlLayout()
PParameterList_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
End Sub
Public Sub Me_Loaded() Handles Me.Loaded
' imposto DataContext
m_PParameterListVM = Me.DataContext
' imposto riferimento ad action per salvataggio layout tabella
m_PParameterListVM.refPParameterListGridControlLayout = AddressOf SavePParameterGridControlLayout
' rispristino layout tabella
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
PParameterList_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
End If
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
End Sub
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
If e.MenuType = GridMenuType.Column Then
' rimozione bottoni
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
' aggiunta separatore
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
e.Customizations.Add(separator)
' aggiunta bottone AllowResize e Auto Fit
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (PParameterList_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
e.Customizations.Add(AllowResize)
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
e.Customizations.Add(FixAuto)
End If End If
End If End If
End Sub End Sub
' gestore evento Allow Resize
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
Dim info As GridColumnMenuInfo = TryCast(PParameterList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
Else
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
End If
End Sub
' gestore evento Auto Fit
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
Dim info As GridColumnMenuInfo = TryCast(PParameterList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
PParameterList_TableView.UpdateLayout()
item.Width = item.ActualWidth
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
End Sub
Private Sub PParameterList_TableView_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Dim IndexRow As Integer = PParameterList_TableView.FocusedRowHandle
If IndexRow < 0 Then Return
If IsNothing(Map.refProjectVM) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam) Then Return
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.PBTLParamVMList(IndexRow)
End Sub
End Class End Class
@@ -8,6 +8,8 @@ Public Class PParameterListVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Public refPParameterListGridControlLayout As Action
Private m_colPParam_Value As EgwWPFBaseLib.ColumnLayout Private m_colPParam_Value As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colPParam_Value As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colPParam_Value As EgwWPFBaseLib.ColumnLayout
Get Get
@@ -125,6 +127,12 @@ Public Class PParameterListVM
NotifyPropertyChanged(NameOf(PParameterList_IsEnabled)) NotifyPropertyChanged(NameOf(PParameterList_IsEnabled))
End Sub End Sub
Friend Sub Close()
If Not IsNothing(refPParameterListGridControlLayout) Then
refPParameterListGridControlLayout()
End If
End Sub
#End Region ' Methods #End Region ' Methods
#Region "COMMANDS" #Region "COMMANDS"
@@ -143,10 +151,9 @@ Public Class PParameterListVM
Public Sub Ok() Public Sub Ok()
If Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState <> CalcStates.NOTCALCULATED Then If Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState <> CalcStates.NOTCALCULATED Then
' Resetto info ' Resetto info
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then If Map.refProjectVM.InfoNgeValue.Count > 0 Then
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList For Each InfoNgePart As String In Map.refProjectVM.InfoNgeValue
Dim sInfoNgePart As String() = InfoNgePart.Split("="c) EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, InfoNgePart)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0))
Next Next
End If End If
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart() Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
@@ -159,6 +166,7 @@ Public Class PParameterListVM
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER) Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel ' Abilito LeftPanel
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
Map.refProjectVM.SetLeftPanel_IsEnabled(True) Map.refProjectVM.SetLeftPanel_IsEnabled(True)
Map.refProjectVM.SetLeftPanel_Opacity(1) Map.refProjectVM.SetLeftPanel_Opacity(1)
End Sub End Sub
@@ -182,6 +190,7 @@ Public Class PParameterListVM
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER) Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel ' Abilito LeftPanel
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
Map.refProjectVM.SetLeftPanel_IsEnabled(True) Map.refProjectVM.SetLeftPanel_IsEnabled(True)
Map.refProjectVM.SetLeftPanel_Opacity(1) Map.refProjectVM.SetLeftPanel_Opacity(1)
End Sub End Sub
@@ -18,78 +18,123 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Style="{StaticResource PartParameters_UniformGrid}"> Margin="0,0,0,-45">
<TextBlock Text="{Binding NAM_MSG}" <TextBlock Text="{Binding NAM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sNAM, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sNAM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding COUNT_MSG}" <TextBlock Text="{Binding COUNT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCNT, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sCNT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding ORDERNUM_MSG}" <TextBlock Text="{Binding ORDERNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.nORDERNUM, UpdateSourceTrigger=Explicit, Text="{Binding Tag.nORDERNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PLANINGLEN_MSG}" <TextBlock Text="{Binding PLANINGLEN_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.dPLANINGLEN, UpdateSourceTrigger=Explicit, Text="{Binding Tag.dPLANINGLEN, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding STARTOFFSET_MSG}" <TextBlock Text="{Binding STARTOFFSET_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.dSTARTOFFSET, UpdateSourceTrigger=Explicit, Text="{Binding Tag.dSTARTOFFSET, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding ENDOFFSET_MSG}" <TextBlock Text="{Binding ENDOFFSET_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.dENDOFFSET, UpdateSourceTrigger=Explicit, Text="{Binding Tag.dENDOFFSET, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding DESIGN_MSG}" <TextBlock Text="{Binding DESIGN_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sDESIGN, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sDESIGN, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding GROUP_MSG}" <TextBlock Text="{Binding GROUP_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sGROUP, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sGROUP, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding STOREY_MSG}" <TextBlock Text="{Binding STOREY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sSTOREY, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sSTOREY, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding ANNOT_MSG}" <TextBlock Text="{Binding ANNOT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sANNOT, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sANNOT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding MATERIAL_MSG}" <TextBlock Text="{Binding MATERIAL_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sMATERIAL, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sMATERIAL, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</UniformGrid> </UniformGrid>
<GroupBox Grid.Row="1" <GroupBox Grid.Row="1"
Style="{DynamicResource PartParam_GroupBox}"> Margin="0,55"
<Grid Style="{StaticResource PartParameters_Grid}"> Style="{StaticResource NoHeader_GroupBox}">
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -99,13 +144,16 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding COLOUR_MSG}" <TextBlock Text="{Binding COLOUR_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<Button Grid.Column="1" <Button Grid.Column="1"
Background="{Binding Tag.PartColour, UpdateSourceTrigger=PropertyChanged, Background="{Binding Tag.PartColour, UpdateSourceTrigger=PropertyChanged,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Command="{Binding Tag.PartColour_Command, UpdateSourceTrigger=PropertyChanged, Command="{Binding Tag.PartColour_Command, UpdateSourceTrigger=PropertyChanged,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParameters_Button}"/> Height="20"
Width="100"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding TRANSPARENCY_MSG}" Text="{Binding TRANSPARENCY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> Style="{StaticResource PartParam_TextBlock}"/>
@@ -113,51 +161,79 @@
Grid.Column="1" Grid.Column="1"
Text="{Binding Tag.nCOLA, UpdateSourceTrigger=Explicit, Text="{Binding Tag.nCOLA, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
<UniformGrid Grid.Column="1" <UniformGrid Grid.Column="1"
Columns="2" Columns="2"
Style="{StaticResource PartParameters_UniformGrid}"> Margin="0,0,0,-45">
<TextBlock Text="{Binding TIMBERGRADE_MSG}" <TextBlock Text="{Binding TIMBERGRADE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sTIMBERGRADE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sTIMBERGRADE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding QUALITYGRADE_MSG}" <TextBlock Text="{Binding QUALITYGRADE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sQUALITYGRADE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sQUALITYGRADE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PACKAGE_MSG}" <TextBlock Text="{Binding PACKAGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sPACKAGE, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sPACKAGE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> Width="150"
Margin="5"
Style="{StaticResource EgtOptmizer_TextBox}"/>
<TextBlock Text="{Binding ASSEMBLYNUM_MSG}" <TextBlock Text="{Binding ASSEMBLYNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sASSEMBLYNUM, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sASSEMBLYNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding ELEMENTNUM_MSG}" <TextBlock Text="{Binding ELEMENTNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sELEMENTNUM, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sELEMENTNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding MODULENUM_MSG}" <TextBlock Text="{Binding MODULENUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sMODULENUM, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sMODULENUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}" <TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.ocPROCESSINGQUALITY, Path=Tag.ocPROCESSINGQUALITY,
@@ -165,9 +241,12 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelPROCESSINGQUALITY, Path=Tag.SelPROCESSINGQUALITY,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding RECESS_MSG}" <TextBlock Text="{Binding RECESS_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.ocRECESS, Path=Tag.ocRECESS,
@@ -175,9 +254,12 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelRECESS, Path=Tag.SelRECESS,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding STOREYTYPE_MSG}" <TextBlock Text="{Binding STOREYTYPE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.ocSTOREYTYPE, Path=Tag.ocSTOREYTYPE,
@@ -185,25 +267,35 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelSTOREYTYPE, Path=Tag.SelSTOREYTYPE,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Text="{Binding LAYER_MSG}" <TextBlock Text="{Binding LAYER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.nLAYER, UpdateSourceTrigger=Explicit, Text="{Binding Tag.nLAYER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Text="{Binding COMMENT_MSG}" <TextBlock Text="{Binding COMMENT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.sCOMMENT, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sCOMMENT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</UniformGrid> </UniformGrid>
<GroupBox Grid.Row="1" <GroupBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Style="{DynamicResource PartParam_GroupBox}"> Margin="0,55"
<Grid Style="{StaticResource PartParameters_Grid}"> Style="{StaticResource NoHeader_GroupBox}">
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -213,7 +305,9 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding REFSIDE_MSG}" <TextBlock Text="{Binding REFSIDE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.ocREFSIDE, Path=Tag.ocREFSIDE,
@@ -221,16 +315,20 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelREFSIDE, Path=Tag.SelREFSIDE,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding REFSIDEALIGN_MSG}" Text="{Binding REFSIDEALIGN_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<CheckBox Grid.Row="1" <CheckBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.bREFSIDEALIGN, Path=Tag.bREFSIDEALIGN,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
@@ -258,7 +356,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<GroupBox Grid.RowSpan="2" <GroupBox Grid.RowSpan="2"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{DynamicResource NoHeader_GroupBox}"> Style="{StaticResource NoHeader_GroupBox}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -269,27 +367,35 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding GRAINDIRECTION_MSG}" <TextBlock Text="{Binding GRAINDIRECTION_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding Tag.GrainDirection, UpdateSourceTrigger=Explicit, Text="{Binding Tag.GrainDirection, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding GRAINDIRALIGN_MSG}" Text="{Binding GRAINDIRALIGN_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<CheckBox Grid.Row="1" <CheckBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.bGRAINDIRALIGN, Path=Tag.bGRAINDIRALIGN,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParameters_CheckBox}"/> HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="0,5"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Grid.Row="2" <GroupBox Grid.Row="2"
Grid.RowSpan="2" Grid.RowSpan="2"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{DynamicResource NoHeader_GroupBox}"> Style="{StaticResource NoHeader_GroupBox}">
<Grid Style="{StaticResource PartParameters_Grid}"> <Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -299,7 +405,9 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding CAMBERSIDE_MSG}" <TextBlock Text="{Binding CAMBERSIDE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.ocCAMBERSIDE, Path=Tag.ocCAMBERSIDE,
@@ -307,22 +415,27 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelCAMBERSIDE, Path=Tag.SelCAMBERSIDE,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding CAMBERPARAMS_MSG}" Text="{Binding CAMBERPARAMS_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1" <EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Text="{Binding Tag.CamberParams, UpdateSourceTrigger=Explicit, Text="{Binding Tag.CamberParams, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Grid.Row="4" <GroupBox Grid.Row="4"
Grid.RowSpan="2" Grid.RowSpan="2"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{DynamicResource NoHeader_GroupBox}"> Style="{StaticResource NoHeader_GroupBox}">
<Grid Style="{StaticResource PartParameters_Grid}"> <Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -332,7 +445,9 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding REFSIDEFIXCLAMP_MSG}" <TextBlock Text="{Binding REFSIDEFIXCLAMP_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.ocREFSIDEFIXCLAMP, Path=Tag.ocREFSIDEFIXCLAMP,
@@ -340,22 +455,27 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelREFSIDEFIXCLAMP, Path=Tag.SelREFSIDEFIXCLAMP,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding PARTOFFSETPARAMS_MSG}" Text="{Binding PARTOFFSETPARAMS_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1" <EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Text="{Binding Tag.PartOffsetParams, UpdateSourceTrigger=Explicit, Text="{Binding Tag.PartOffsetParams, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Grid.Row="6" <GroupBox Grid.Row="6"
Grid.RowSpan="2" Grid.RowSpan="2"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{DynamicResource NoHeader_GroupBox}"> Style="{StaticResource NoHeader_GroupBox}">
<Grid Style="{StaticResource PartParameters_Grid}"> <Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -365,7 +485,9 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding MATERIALTYPEGRP_MSG}" <TextBlock Text="{Binding MATERIALTYPEGRP_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.ocMATERIALTYPEGRP, Path=Tag.ocMATERIALTYPEGRP,
@@ -373,22 +495,27 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelMATERIALTYPEGRP, Path=Tag.SelMATERIALTYPEGRP,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding MATERIALTYPESPEC_MSG}" Text="{Binding MATERIALTYPESPEC_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1" <EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Text="{Binding Tag.sMATERIALTYPESPEC, UpdateSourceTrigger=Explicit, Text="{Binding Tag.sMATERIALTYPESPEC, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Grid.Row="8" <GroupBox Grid.Row="8"
Grid.RowSpan="2" Grid.RowSpan="2"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{DynamicResource NoHeader_GroupBox}"> Style="{StaticResource NoHeader_GroupBox}">
<Grid Style="{StaticResource PartParameters_Grid}"> <Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -406,10 +533,13 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelALIGNLOCATION, Path=Tag.SelALIGNLOCATION,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding ALIGNENDTYPE_MSG}" Text="{Binding ALIGNENDTYPE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Row="1" <ComboBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
@@ -418,14 +548,16 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelALIGNENDTYPE, Path=Tag.SelALIGNENDTYPE,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParameters_ComboBox}"/> Height="22"
Width="150"
Margin="0,5"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Grid.Row="10" <GroupBox Grid.Row="10"
Grid.RowSpan="4" Grid.RowSpan="4"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{DynamicResource NoHeader_GroupBox}"> Style="{StaticResource NoHeader_GroupBox}">
<Grid Style="{StaticResource PartParameters_Grid}"> <Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -437,7 +569,9 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding UID_MSG}" <TextBlock Text="{Binding UID_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.ocUID, Path=Tag.ocUID,
@@ -445,31 +579,44 @@
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}, SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}},
Path=Tag.SelUID, Path=Tag.SelUID,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource PartParam_ComboBox}"/> Height="22"
Width="150"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="{Binding TRANSFORIG_MSG}" Text="{Binding TRANSFORIG_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1" <EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Text="{Binding Tag.TransfOrig, UpdateSourceTrigger=Explicit, Text="{Binding Tag.TransfOrig, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Grid.Row="2" <TextBlock Grid.Row="2"
Text="{Binding TRANSFVERSX_MSG}" Text="{Binding TRANSFVERSX_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="2" <EgtWPFLib5:EgtTextBox Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Text="{Binding Tag.TransfVersX, UpdateSourceTrigger=Explicit, Text="{Binding Tag.TransfVersX, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
<TextBlock Grid.Row="3" <TextBlock Grid.Row="3"
Text="{Binding TRANSFVERSY_MSG}" Text="{Binding TRANSFVERSY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/> VerticalAlignment="Center"
Margin="10,0,10,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Row="3" <EgtWPFLib5:EgtTextBox Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Text="{Binding Tag.TransfVersY, UpdateSourceTrigger=Explicit, Text="{Binding Tag.TransfVersY, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}" RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersV}}}"
Style="{StaticResource PartParam_TextBox}"/> TextWrapping="Wrap"
Width="150"
Margin="5"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
</Grid> </Grid>
File diff suppressed because it is too large Load Diff
@@ -1,84 +1,245 @@
Imports EgtBEAMWALL.Core Imports System.IO
Imports EgtUILib.EgtInterface Imports DevExpress.Data
Imports DevExpress.Xpf.Bars
Imports DevExpress.Xpf.Core.Native
Imports DevExpress.Xpf.Core.Serialization
Imports DevExpress.Xpf.Data
Imports DevExpress.Xpf.Grid
Imports EgtBEAMWALL.Core
Public Class RawPartListV Public Class RawPartListV
' funzione che permette di selezionare un RawPart anche quando gia' selezionato Private m_RawPartListVM As RawPartListVM
Private Sub RawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Map.refProjectVM.BTLStructureVM.SelBTLPart.SetOpenFeatureList(False) Private m_sDataGridLayoutPath As String = ""
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow) Private _lastExpanded As Integer = -1
Dim RowVM As MyMachGroupVM = DirectCast(Row.DataContext, MyMachGroupVM)
Dim DataGridDetailsPresenter As Object = TreeHelperManager.FindVisualParents(Of Button, CheckBox, Primitives.DataGridDetailsPresenter)(e.OriginalSource) Sub New()
If Not IsNothing(DataGridDetailsPresenter) Then Return
' se gia' selezionato rifaccio selezione perche' potrebbe essere selezionato un BTLPart ' This call is required by the designer.
If Not IsNothing(Row) AndAlso Row.IsSelected Then InitializeComponent()
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup
' Add any initialization after the InitializeComponent() call.
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\RawPart.json"
For Each Column In RawPart_GridControl.Columns
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
Next
For Each Column In Part_GridControl.Columns
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
Next
DXSerializer.AddAllowPropertyHandler(RawPart_GridControl, AddressOf OnAddAllowProperty)
DXSerializer.AddAllowPropertyHandler(Part_GridControl, AddressOf OnAddAllowProperty)
RawPart_GridControl.Columns("sPosZ").Visible = False
End Sub
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
e.Allow = True
End If
End Sub
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
If e.Property.Name = "FilterString" Then
e.Allow = False
ElseIf e.Property.Name = "MRUFilters" Then
e.Allow = False
ElseIf e.Property.Name = "MRUFilterList" Then
e.Allow = False
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
e.Allow = False
End If
End Sub
' salvataggio del layout colonne
Public Sub SaveBTLPartGridControlLayout()
RawPart_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
End Sub
Public Sub Me_Loaded() Handles Me.Loaded
' imposto DataContext
m_RawPartListVM = DataContext
' imposto riferimento ad action per salvataggio layout tabella
m_RawPartListVM.refSaveBTLPartGridControlLayout = AddressOf SaveBTLPartGridControlLayout
' rispristino layout tabella
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
RawPart_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
End If
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
IsVisibleGroupSummary(False)
End Sub
Public Sub IsVisibleGroupSummary(bValue As Boolean)
If bValue AndAlso RawPart_GridControl.GroupSummary.Count = 0 Then
RawPart_GridControl.GroupSummary.Clear()
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nPDN",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Count,
.ShowInGroupColumnFooter = "nPDN"}
RawPart_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Sum,
.ShowInGroupColumnFooter = "sCNT"}
RawPart_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Sum,
.ShowInGroupColumnFooter = "sADDED"}
RawPart_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nINPROD",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Sum,
.ShowInGroupColumnFooter = "nINPROD"}
RawPart_GridControl.GroupSummary.Add(INPRODGroupSummaryItem)
Dim DONEGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nDONE",
.DisplayFormat = "{0}",
.SummaryType = SummaryItemType.Sum,
.ShowInGroupColumnFooter = "nDONE"}
RawPart_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
End If
RawPart_TableView.ShowGroupFooters = bValue
End Sub
' customizzazione ContextMenu del GridControl
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
If e.MenuType = GridMenuType.Column Then
' rimozione bottoni
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
Dim item As ColumnBase = CType(info.Column, ColumnBase)
' aggiunta separatore
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
e.Customizations.Add(separator)
' aggiunta bottone AllowResize e Auto Fit
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (RawPart_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
e.Customizations.Add(AllowResize)
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
e.Customizations.Add(FixAuto)
End If End If
End If End If
End Sub End Sub
' funzione che impedisce di editare le righe che sono gia' in produzione ' gestore evento Allow Resize
Private Sub RawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs) Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
If IsNothing(e.Row) Then Return Dim info As GridColumnMenuInfo = TryCast(e.Link.DataContext, GridColumnMenuInfo)
Dim RowVM As MyMachGroupVM = DirectCast(e.Row.DataContext, MyMachGroupVM) Dim item As ColumnBase = CType(info.Column, ColumnBase)
' se in produzione impedisco modifica dei parametri If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
If RowVM.nProduction_State > ItemState.ND Then item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
'For Each cell In Row.Item Else
e.Cancel = True item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
End If End If
End Sub End Sub
Private Sub Button_Click(sender As Object, e As RoutedEventArgs) ' gestore evento Auto Fit
Dim btn As Button = DirectCast(sender, Button) ' Ottieni il bottone che ha generato l'evento Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
Dim parent As DependencyObject = btn Dim info As GridColumnMenuInfo = TryCast(e.Link.DataContext, GridColumnMenuInfo)
If IsNothing(info) Then Return
Dim item As ColumnBase = CType(info.Column, ColumnBase)
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
RawPart_TableView.UpdateLayout()
item.Width = item.ActualWidth
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
End Sub
' Cerca il Popup nel Visual Tree Private Sub GridControl_MasterRowExpanding(sender As Object, e As DevExpress.Xpf.Grid.RowAllowEventArgs)
While Not IsNothing(parent) AndAlso TypeOf parent IsNot DataGridRow Dim grid = CType(sender, DevExpress.Xpf.Grid.GridControl)
parent = VisualTreeHelper.GetParent(parent)
End While
If parent IsNot Nothing Then ' Chiudi solo il precedente
Dim popup As New RawPartListPopUpV() If _lastExpanded <> -1 AndAlso _lastExpanded <> e.RowHandle Then
If Not IsNothing(popup) Then grid.SetMasterRowExpanded(_lastExpanded, False)
popup.PlacementTarget = btn ' Associa il popup al bottone End If
popup.IsOpen = True ' Mostra il popup
_lastExpanded = e.RowHandle
End Sub
Private Sub RawPart_GridControl_MasterRowExpanded(sender As Object, e As RowEventArgs)
Dim masterGrid As GridControl = TryCast(sender, GridControl)
If masterGrid IsNot Nothing Then
Dim detailGrid As GridControl = TryCast(masterGrid.GetDetail(e.RowHandle, masterGrid.DetailDescriptor), GridControl)
If Not IsNothing(detailGrid) Then
If Not IsNothing(detailGrid) Then
Dim colPosX As GridColumn = detailGrid.Columns("sPOSX")
If Not IsNothing(colPosX) Then colPosX.Visible = False
Dim colPosY As GridColumn = detailGrid.Columns("sPOSY")
If Not IsNothing(colPosY) Then colPosY.Visible = False
Dim colMat As GridColumn = detailGrid.Columns("sMATERIAL")
If Not IsNothing(colMat) Then colMat.Visible = False
End If
End If End If
End If End If
End Sub End Sub
' funzione che permette di selezionare un pezzo anche quando gia' selezionato Private Sub RawPart_TableView_PreviewKeyDown(sender As Object, e As KeyEventArgs)
Private Sub PartInRawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) If e.Key = Key.Delete Then
If TypeOf sender Is DataGridRow Then Dim MyMachGroupPanelVM As MyMachGroupPanelVM = TryCast(Me.Tag, MyMachGroupPanelVM)
Dim Row As DataGridRow = DirectCast(sender, DataGridRow) If IsNothing(MyMachGroupPanelVM) Then Return
If Not IsNothing(Row) Then
Dim MyMachGroup As Core.MyMachGroupVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup Dim SelectedMachGroup As MyMachGroupVM = MyMachGroupPanelVM.SelectedMachGroup
If EgtGetCurrMachGroup() = GDB_ID.NULL Then Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = MyMachGroup Dim SelPart As PartVM = SelectedMachGroup?.SelPart
MyMachGroup.SelPart = MyMachGroup.SelPart
If MyMachGroupPanelVM.bSelOnPart AndAlso Not IsNothing(SelPart) Then
SelPart.RemovePart()
e.Handled = True
Return
End If End If
SelectedMachGroup.RemoveRawPartCmd()
e.Handled = True
End If End If
End Sub End Sub
' funzione che impedisce di editare le righe che sono gia' in produzione Private Sub RawPart_TableView_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Private Sub PartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs) Dim IndexRow As Integer = RawPart_TableView.FocusedRowHandle
If IsNothing(e.Row) Then Return If IndexRow < 0 Then Return
Dim RowVM As PartVM = DirectCast(e.Row.DataContext, PartVM) If IsNothing(Map.refMachGroupPanelVM) Then Return
' se in produzione impedisco modifica dei parametri If IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then Return
If RowVM.nProduction_State > ItemState.ND Then If Map.refMachGroupPanelVM.SelectedMachGroup.nProduction_State > ItemState.ND Then
'For Each cell In Row.Item RawPart_TableView.Grid.Columns("sStartCut").ReadOnly = True
e.Cancel = True RawPart_TableView.Grid.Columns("sStartCut").AllowEditing = DevExpress.Utils.DefaultBoolean.False
RawPart_TableView.Grid.Columns("sL").ReadOnly = True
RawPart_TableView.Grid.Columns("sL").AllowEditing = DevExpress.Utils.DefaultBoolean.False
Part_TableView.Grid.Columns("sOffset").ReadOnly = True
Part_TableView.Grid.Columns("sOffset").AllowEditing = DevExpress.Utils.DefaultBoolean.False
Else
RawPart_TableView.Grid.Columns("sStartCut").ReadOnly = False
RawPart_TableView.Grid.Columns("sStartCut").AllowEditing = DevExpress.Utils.DefaultBoolean.True
RawPart_TableView.Grid.Columns("sL").ReadOnly = False
RawPart_TableView.Grid.Columns("sL").AllowEditing = DevExpress.Utils.DefaultBoolean.True
Part_TableView.Grid.Columns("sOffset").ReadOnly = False
Part_TableView.Grid.Columns("sOffset").AllowEditing = DevExpress.Utils.DefaultBoolean.True
End If End If
End Sub End Sub
Private Sub EgwDataGrid_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs) Private Sub Grid_SelectedItemChanged(sender As Object, e As DevExpress.Xpf.Grid.SelectedItemChangedEventArgs)
e.Handled = True Dim grid = CType(sender, DevExpress.Xpf.Grid.GridControl)
Dim parent As EgwWPFBaseLib.EgwDataGrid = TryCast(sender, EgwWPFBaseLib.EgwDataGrid) Dim view = CType(grid.View, DevExpress.Xpf.Grid.TableView)
If IsNothing(parent) Then
Return If e.NewItem Is Nothing Then Return
End If
parent?.[RaiseEvent](New MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta) With { ' Trova l'indice dell'oggetto nella tua lista
.RoutedEvent = MouseWheelEvent, Dim index As Integer = CType(grid.ItemsSource, IList).IndexOf(e.NewItem)
.Source = sender})
' Sposta il focus sulla riga selezionata
view.MoveFocusedRow(index)
End Sub End Sub
End Class End Class
@@ -8,6 +8,8 @@ Public Class RawPartListVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Friend refSaveBTLPartGridControlLayout As Action
Private m_colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout Private m_colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
Get Get
@@ -248,6 +250,12 @@ Public Class RawPartListVM
m_colPartInRawPart_PosY = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSY) m_colPartInRawPart_PosY = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSY)
End Sub End Sub
Friend Sub Close()
If Not IsNothing(refSaveBTLPartGridControlLayout) Then
refSaveBTLPartGridControlLayout()
End If
End Sub
#End Region ' Methods #End Region ' Methods
End Class End Class
+3 -127
View File
@@ -2,8 +2,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{StaticResource LeftPanel_Grid}"> Background="{StaticResource Optimizer.Background}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -17,134 +18,9 @@
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{StaticResource Optimizer_Border}"/> Style="{StaticResource Optimizer_Border}"/>
<Grid Style="{StaticResource Verify_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button ToolTip="{Binding VerifyAll_ToolTip}"
Command="{Binding VerifyAll_Command}"
IsEnabled="{Binding VerifyAll_IsEnabled}"
Style="{StaticResource Verify_Button}">
<Image Source="{StaticResource VerifyAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="1"
ToolTip="{Binding VerifyAll_ToolTip}"
Command="{Binding VerifyAllFlipRot_Command}"
IsEnabled="{Binding VerifyAll_IsEnabled}"
Style="{StaticResource Verify_Button}">
<Image Source="{StaticResource VerifyAllR_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="2"
Command="{Binding ResetCalc_Command}"
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource Verify_Button}">
<Image Source="{StaticResource ResetCalc_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="3"
Name="FilterAllBtn"
ToolTip="{Binding FilterAll_ToolTip}"
Command="{Binding ShowPopUpFilterBtnCommand}"
Style="{StaticResource Verify_Button}">
<Image Source="{StaticResource AllFilter_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Popup IsOpen="{Binding IsFilterBtnOpen}"
PlacementTarget="{Binding ElementName=FilterAllBtn}"
Style="{StaticResource Filter_PopUp}">
<UniformGrid Columns="5"
Style="{StaticResource LeftPanel_UniformGrid}">
<Expander Header="{Binding Section_Msg}">
<ListBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
DisplayMemberPath="sSectionXMaterial"
Style="{StaticResource LeftPanel_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<Expander Grid.Column="1"
Header="{Binding Group_Msg}"
Style="{StaticResource LeftPanel_Expander}">
<ListBox ItemsSource="{Binding Tag.GroupList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
SelectedItem="{Binding Tag.SelGroup, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
Style="{StaticResource LeftPanel_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<Expander Grid.Column="2"
Header="{Binding SubGroup_Msg}"
Style="{StaticResource LeftPanel_Expander}">
<ListBox ItemsSource="{Binding Tag.SubGroupList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
SelectedItem="{Binding Tag.SelSubGroup, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
Style="{StaticResource LeftPanel_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<Expander Grid.Column="3"
Header="{Binding ParType_Msg}"
Style="{StaticResource LeftPanel_Expander}">
<ListBox ItemsSource="{Binding Tag.SearchParamList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
SelectedItem="{Binding Tag.SelSearchParam, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
Style="{StaticResource LeftPanel_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<Expander Grid.Column="4"
Header="{Binding ParValue_Msg}"
Style="{StaticResource LeftPanel_Expander}">
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.SearchText, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
Style="{StaticResource SearchText_TextBox}"/>
</Expander>
</UniformGrid>
</Popup>
<Expander Grid.Column="4"
Header="{Binding Section_Msg}"
Style="{StaticResource Section_Expander}">
<ListBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
DisplayMemberPath="sSectionXMaterial"
Style="{StaticResource LeftPanel_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<EgtWPFLib5:EgtTextBox Grid.Column="5"
Text="{Binding Tag.SearchText, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
Style="{StaticResource LeftPanel_TextBox}"/>
<Button Grid.Column="6" Visibility="Collapsed"
Command="{Binding RotateAll_Command}"
ToolTip="{Binding RotateAll_ToolTip}"
IsEnabled="{Binding RotateAll_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource Rotate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="7" Visibility="Collapsed"
Command="{Binding InvertAll_Command}"
ToolTip="{Binding InvertAll_ToolTip}"
IsEnabled="{Binding RotateAll_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource Inversion_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="8" Visibility="Collapsed"
Command="{Binding Edit_Command}"
ToolTip="{Binding MultipleModify_ToolTip}"
IsEnabled="{Binding RotateAll_IsEnabled}"
Style="{StaticResource MacroFeaturen_Button}">
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Grid>
<OPTIMIZER:BTLPartListV Grid.Row="1" <OPTIMIZER:BTLPartListV Grid.Row="1"
DataContext="{StaticResource PartListVM}" DataContext="{StaticResource PartListVM}"
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}" Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
Margin="4,0,4,0"/> Margin="4,0,4,2.5"/>
</Grid> </Grid>
+65 -143
View File
@@ -83,12 +83,9 @@ Public Class LeftPanelVM
End Sub End Sub
' Definizione comandi ' Definizione comandi
Private m_cmdVerifyAll As ICommand
Private m_cmdVerifyFlipRotAll As ICommand
Private m_cmdShowPopUpFilterBtnCmd As ICommand Private m_cmdShowPopUpFilterBtnCmd As ICommand
Private m_cmdRotateAll As ICommand Private m_cmdRotateAll As ICommand
Private m_cmdInvertAll As ICommand Private m_cmdInvertAll As ICommand
Private m_cmdResetCalc As ICommand
#Region "Messages" #Region "Messages"
@@ -145,6 +142,12 @@ Public Class LeftPanelVM
End Get End Get
End Property End Property
Public ReadOnly Property VerifyAllFlipRot_ToolTip As String
Get
Return EgtMsg(62000)
End Get
End Property
Public ReadOnly Property FilterAll_ToolTip As String Public ReadOnly Property FilterAll_ToolTip As String
Get Get
Return EgtMsg(62570) Return EgtMsg(62570)
@@ -202,54 +205,6 @@ Public Class LeftPanelVM
#Region "COMMANDS" #Region "COMMANDS"
#Region "VerifyAll"
Public ReadOnly Property VerifyAll_Command As ICommand
Get
If m_cmdVerifyAll Is Nothing Then
m_cmdVerifyAll = New Command(AddressOf VerifyAll)
End If
Return m_cmdVerifyAll
End Get
End Property
Friend Sub VerifyAll()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
' imposto flag per calcolo
Map.refCALCPanelVM.SetCalculating(True)
For Each BTLPartItem As BTLPartVM In Map.refProjectVM.BTLStructureVM.BTLPartVMList
BTLPartItem.SetIsRowEnabled(False)
Next
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ, CalcIntegration.CmdTypes.CHECKNOSIM)
Return
End Sub
#End Region ' VerifyAll
#Region "VerifyAllFlipRot"
Public ReadOnly Property VerifyAllFlipRot_Command As ICommand
Get
If m_cmdVerifyFlipRotAll Is Nothing Then
m_cmdVerifyFlipRotAll = New Command(AddressOf VerifyAllFlipRot)
End If
Return m_cmdVerifyFlipRotAll
End Get
End Property
Friend Sub VerifyAllFlipRot()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
' imposto flag per calcolo
Map.refCALCPanelVM.SetCalculating(True)
For Each BTLPartItem As BTLPartVM In Map.refProjectVM.BTLStructureVM.BTLPartVMList
BTLPartItem.SetIsRowEnabled(False)
Next
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ, CalcIntegration.CmdTypes.FLIP_ROT)
Return
End Sub
#End Region ' VerifyAllRotate
#Region "ShowPopUpFilterBtnCommand" #Region "ShowPopUpFilterBtnCommand"
Public ReadOnly Property ShowPopUpFilterBtnCommand As ICommand Public ReadOnly Property ShowPopUpFilterBtnCommand As ICommand
@@ -271,105 +226,72 @@ Public Class LeftPanelVM
#End Region ' ShowPopUpFilterBtnCommand #End Region ' ShowPopUpFilterBtnCommand
#Region "RotateAll" '#Region "RotateAll"
Public ReadOnly Property RotateAll_Command As ICommand ' Public ReadOnly Property RotateAll_Command As ICommand
Get ' Get
If m_cmdRotateAll Is Nothing Then ' If m_cmdRotateAll Is Nothing Then
m_cmdRotateAll = New Command(AddressOf RotateAll) ' m_cmdRotateAll = New Command(AddressOf RotateAll)
End If ' End If
Return m_cmdRotateAll ' Return m_cmdRotateAll
End Get ' End Get
End Property ' End Property
Public Sub RotateAll() ' Public Sub RotateAll()
If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return ' If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
' salvo sezione impostata ' ' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection ' Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
' se modalita' assemblato ' ' se modalita' assemblato
Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked ' Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then ' If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi ' ' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False) ' Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
End If ' End If
' ruoto i pezzi selezionati ' ' ruoto i pezzi selezionati
For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts ' For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts
Part.BackRotation(False, False) ' Part.BackRotation(False, False)
Next ' Next
' se assemblato lo ripristino ' ' se assemblato lo ripristino
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False) ' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi) ' ' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then ' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
' se esiste, imposto sezione inversa ' ' se esiste, imposto sezione inversa
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0)) ' Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection) ' If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
End If ' End If
EgtDraw() ' EgtDraw()
End Sub ' End Sub
#End Region ' RotateAll '#End Region ' RotateAll
#Region "InvertAll" '#Region "InvertAll"
Public ReadOnly Property InvertAll_Command As ICommand ' Public ReadOnly Property InvertAll_Command As ICommand
Get ' Get
If m_cmdInvertAll Is Nothing Then ' If m_cmdInvertAll Is Nothing Then
m_cmdInvertAll = New Command(AddressOf InvertAll) ' m_cmdInvertAll = New Command(AddressOf InvertAll)
End If ' End If
Return m_cmdInvertAll ' Return m_cmdInvertAll
End Get ' End Get
End Property ' End Property
Public Sub InvertAll() ' Public Sub InvertAll()
If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return ' If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
' se modalita' assemblato ' ' se modalita' assemblato
Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked ' Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then ' If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi ' ' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False) ' Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
End If ' End If
' inverto i pezzi selezionati ' ' inverto i pezzi selezionati
For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts ' For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts
Part.Invert() ' Part.Invert()
Next ' Next
' se assemblato lo ripristino ' ' se assemblato lo ripristino
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False) ' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
End Sub ' End Sub
#End Region ' InvertAll '#End Region ' InvertAll
#Region "ResetCalc"
Public ReadOnly Property ResetCalc_Command As ICommand
Get
If m_cmdResetCalc Is Nothing Then
m_cmdResetCalc = New Command(AddressOf ResetCalc)
End If
Return m_cmdResetCalc
End Get
End Property
Public Sub ResetCalc()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
Map.refCALCPanelVM.SetCalculating(False)
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
If Part.nGlobalState <> CalcStates.NOTCALCULATED Then
' Resetto info
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList
Dim sInfoNgePart As String() = InfoNgePart.Split("="c)
EgtRemoveInfo(Part.nPartId, sInfoNgePart(0))
Next
End If
' resetto stato dei calcoli
Part.ResetCalcTotalPart()
End If
If Not Part.IsRowEnabled Then Part.SetIsRowEnabled(True)
Next
End Sub
#End Region ' ResetCalc
#End Region ' COMMANDS #End Region ' COMMANDS
@@ -7,6 +7,18 @@ Public Class MyMachGroupPanelVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Private m_bSelOnPart As Boolean = False
Public ReadOnly Property bSelOnPart As Boolean
Get
Return m_bSelOnPart
End Get
End Property
Friend Sub SetbSelOnPart(value As Boolean)
m_bSelOnPart = value
NotifyPropertyChanged(NameOf(bSelOnPart))
End Sub
Public Property m_OldSelectedMachGroup As MyMachGroupVM
Public Shadows Property SelectedMachGroup As MyMachGroupVM Public Shadows Property SelectedMachGroup As MyMachGroupVM
Get Get
Return m_SelectedMachGroup Return m_SelectedMachGroup
@@ -15,21 +27,18 @@ Public Class MyMachGroupPanelVM
' deevidenzio BTLPart di questo pezzo ' deevidenzio BTLPart di questo pezzo
EgtBeamShowFacesName(False) EgtBeamShowFacesName(False)
EgtBeamShowLoadingSide(False, False) EgtBeamShowLoadingSide(False, False)
' se modalita' assemblato
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1 For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound() Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
Next Next
End If End If
If Not IsNothing(value) Then m_OldSelectedMachGroup = value
m_SelectedMachGroup = value m_SelectedMachGroup = value
If IsNothing(m_SelectedMachGroup) Then m_SelectedMachGroup = m_OldSelectedMachGroup
If Not IsNothing(value) Then If Not IsNothing(value) Then
OnPreSetCurrMachGroup() OnPreSetCurrMachGroup()
EgtSetCurrMachGroup(value.Id) EgtSetCurrMachGroup(value.Id)
@@ -37,11 +46,12 @@ Public Class MyMachGroupPanelVM
' imposto tipo di grid selezionata ' imposto tipo di grid selezionata
Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP) Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP)
End If End If
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then If Not IsNothing(SelectedMachGroup) AndAlso IsNothing(SelectedMachGroup.SelPart) Then
Map.refProjectVM.SetFeatureListVisibility(False) Map.refProjectVM.SetFeatureListVisibility(False)
End If End If
Map.refMyStatusBarVM.SetLoadingProgress(0) Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("") Map.refMyStatusBarVM.SetOutputMessage("")
SetbSelOnPart(False)
NotifyPropertyChanged(NameOf(SelectedMachGroup)) NotifyPropertyChanged(NameOf(SelectedMachGroup))
End Set End Set
End Property End Property
@@ -160,11 +170,11 @@ Public Class MyMachGroupPanelVM
Dim Beam As PartVM = BeamMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nDuploId) Dim Beam As PartVM = BeamMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nDuploId)
EgtSetCurrMachGroup(BeamMachGroup.Id) EgtSetCurrMachGroup(BeamMachGroup.Id)
Beam.DeletePart() Beam.DeletePart()
' reset necessario per poter ottenere nMachGroupId corretto
EgtResetCurrMachGroup()
' aggiorno dati utilizzo barra
BeamMachGroup.UpdateUsage()
End If End If
' reset necessario per poter ottenere nMachGroupId corretto
EgtResetCurrMachGroup()
' aggiorno dati utilizzo barra
BeamMachGroup.UpdateUsage()
Next Next
' aggiorno quantita' in prod ' aggiorno quantita' in prod
Dim BTLPart As BTLPartVM = CALCPanelVM.GetBTLPartVMFromBTLPartId(nPartId) Dim BTLPart As BTLPartVM = CALCPanelVM.GetBTLPartVMFromBTLPartId(nPartId)
@@ -197,7 +207,7 @@ Public Class MyMachGroupPanelVM
End Function End Function
Public Overrides Sub AddMachGroup() Public Overrides Sub AddMachGroup()
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(CurrentMachine.sMachineName, Map.refProjectVM.BTLStructureVM.nPROJTYPE) Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(Map.refMachinePanelVM.SelectedMachine.Name, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' e lo seleziono ' e lo seleziono
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM) SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
End Sub End Sub
@@ -209,10 +219,6 @@ Public Class MyMachGroupPanelVM
Else Else
SelectedMachGroup = Nothing SelectedMachGroup = Nothing
EgtResetCurrMachGroup() EgtResetCurrMachGroup()
' nascondo tutti i pezzi
Map.refProjectVM.BTLStructureVM.HideAll()
' mostro tutti i pezzi
Map.refShowBeamPanelVM.ShowAll(True)
End If End If
End Sub End Sub
@@ -20,8 +20,6 @@ Public Class MyMachGroupVM
Return m_SelPart Return m_SelPart
End Get End Get
Set(value As Core.PartVM) Set(value As Core.PartVM)
' mostro pezzi selezionati
Map.refShowBeamPanelVM.bShowAll = False
' se pezzo evidenziato da ultima selezione precedente ' se pezzo evidenziato da ultima selezione precedente
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count = 1 Then If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count = 1 Then
' deevidenzio MachGroup e Duplo di questo pezzo ' deevidenzio MachGroup e Duplo di questo pezzo
@@ -54,11 +52,6 @@ Public Class MyMachGroupVM
End If End If
Map.refProjectVM.SetFeatureListVisibility(False) Map.refProjectVM.SetFeatureListVisibility(False)
End If End If
' se modalita' assemblato
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
End If
m_SelPart = value m_SelPart = value
' seleziono pezzo ' seleziono pezzo
EgtDeselectAll() EgtDeselectAll()
@@ -78,14 +71,7 @@ Public Class MyMachGroupVM
End If End If
If Not IsNothing(value) Then EgtDraw() If Not IsNothing(value) Then EgtDraw()
NotifyPropertyChanged(NameOf(SelPart)) NotifyPropertyChanged(NameOf(SelPart))
' se modalità building, la tolgo Map.refMachGroupPanelVM.SetbSelOnPart(True)
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If
End Set End Set
End Property End Property
Friend Sub SetSelPart(value As Core.PartVM) Friend Sub SetSelPart(value As Core.PartVM)
@@ -189,6 +175,7 @@ Public Class MyMachGroupVM
UpdateUsage() UpdateUsage()
ResetCalcTotalMachGroup() ResetCalcTotalMachGroup()
End If End If
EgtZoom(ZM.ALL)
End If End If
End Set End Set
End Property End Property
@@ -803,6 +790,10 @@ Public Class MyMachGroupVM
End If End If
Part.nProduction_State = ItemState.ND Part.nProduction_State = ItemState.ND
Part.NotifyPropertyChanged(NameOf(Part.Background)) Part.NotifyPropertyChanged(NameOf(Part.Background))
Part.NotifyPropertyChanged(NameOf(Part.ButtonIsEnabled))
For Each Feature As BTLFeatureVM In Part.FeatureVMList
Feature.NotifyPropertyChanged(NameOf(Feature.IsEnabled))
Next
If bDuploToUpdate Then If bDuploToUpdate Then
Dim Duplo As PartVM = CALCPanelVM.GetPartVMFromPartId(Part.nPartId) Dim Duplo As PartVM = CALCPanelVM.GetPartVMFromPartId(Part.nPartId)
Duplo.ResetCalcTotalPart() Duplo.ResetCalcTotalPart()
@@ -818,6 +809,7 @@ Public Class MyMachGroupVM
End If End If
NotifyPropertyChanged(NameOf(IsReadOnly)) NotifyPropertyChanged(NameOf(IsReadOnly))
NotifyPropertyChanged(NameOf(Background)) NotifyPropertyChanged(NameOf(Background))
NotifyPropertyChanged(NameOf(ButtonIsEnabled))
End Sub End Sub
Private Sub RefreshPartList_Tick() Private Sub RefreshPartList_Tick()
@@ -906,19 +898,20 @@ Public Class MyMachGroupVM
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1) Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1)
Else Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
EgtDraw() 'EgtDraw()
End If End If
ElseIf Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 Then ElseIf Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 Then
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2) Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2)
Else Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
EgtDraw() 'EgtDraw()
End If End If
Else Else
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1) Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
End If End If
End If End If
EgtDraw()
' rimuovo dalla lista grezzi ' rimuovo dalla lista grezzi
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me) Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
End Sub End Sub
@@ -940,7 +933,7 @@ Public Class MyMachGroupVM
Friend Sub Verify() Friend Sub Verify()
If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetIsRowEnabled(False) Map.refMachGroupPanelVM.SelectedMachGroup.SetIsRowEnabled(False)
Map.refCALCPanelVM.Verify(ProjectType.PROD, CalcIntegration.CmdTypes.CHECKGEN) Map.refCALCPanelVM.Verify(ProjectType.PROD, CalcIntegration.CmdTypes.CHECKGEN)
Return Return
End Sub End Sub
@@ -976,10 +969,11 @@ Public Class MyMachGroupVM
EgtGetMachGroupMachineName(SelMachGroup.Id, MachineName) EgtGetMachGroupMachineName(SelMachGroup.Id, MachineName)
Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = SelMachGroup.Id, Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = SelMachGroup.Id,
.nProgramPage = ProjectType.PROD, .nProgramPage = ProjectType.PROD,
.nProjType = ProjType, .nProjType = ProjType + 10,
.bBarOk = True, .bBarOk = True,
.nMachineName = MachineName, .nMachineName = MachineName,
.nCmdType = CalcIntegration.CmdTypes.SIMULATE, .nCmdType = CalcIntegration.CmdTypes.SIMULATE,
.nBarState = SelMachGroup.nProduction_State,
.nGlobState = SelMachGroup.nGlobalState} .nGlobState = SelMachGroup.nGlobalState}
If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then
Dim sMachGroupFilePath As String = ProjectManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe" Dim sMachGroupFilePath As String = ProjectManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe"
@@ -1150,7 +1144,7 @@ Public Class MyMachGroupVM
End Property End Property
Public Sub RemoveRawPartCmd() Public Sub RemoveRawPartCmd()
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62574) & Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Name & " ?", EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62574) & " " & Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Name & " ?", EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
RemoveRawPart() RemoveRawPart()
Else Else
Return Return
@@ -1173,16 +1167,33 @@ Public Class MyMachGroupVM
If IsNothing(SelMachGroup) Then Return If IsNothing(SelMachGroup) Then Return
' se barra gia' assegnata a supervisore, esco ' se barra gia' assegnata a supervisore, esco
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
Dim Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.IndexOf(SelMachGroup)
SelMachGroup.DeleteMachGroup() SelMachGroup.DeleteMachGroup()
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then If Index = 0 Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0) If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
' seleziono primo pezzo
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
Map.refProjectVM.BTLStructureVM.SelectBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
End If
End If
ElseIf Index >= Map.refMachGroupPanelVM.MachGroupVMList.Count Then
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 1)
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
' seleziono primo pezzo
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
Map.refProjectVM.BTLStructureVM.SelectBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
End If
End If
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index)
End If End If
End If End If
EgtDraw() EgtDraw()
' se nessun grezzo, rimetto tutti i pezzi invisibili
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
Map.refProjectVM.BTLStructureVM.HideAll(True)
End If
End Sub End Sub
#End Region ' RemoveRawPart #End Region ' RemoveRawPart
@@ -4,7 +4,7 @@
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
IsEnabled="{Binding MachPanel_IsEnabled}" IsEnabled="{Binding MachPanel_IsEnabled}"
Style="{StaticResource MachinePanel_Grid}"> Margin="0,10,0,10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -17,7 +17,52 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Style="{StaticResource CalcPanel_Grid}"> <StackPanel Orientation="Horizontal"
Margin="5,0,0,0">
<RadioButton Content="{Binding StrategyManagerMsg}"
ToolTip="{Binding ParameterMachineMsg}"
IsChecked="{Binding StrategyManagerIsChecked}"
Width="140"
Margin="0,0,5,0"
Style="{StaticResource MainMenu_ToggleButton}"/>
<!--<RadioButton Content="{Binding ToolDBMsg}"
ToolTip="{Binding ToolDBToolTip}"
IsChecked="{Binding ToolDBIsChecked}"
Width="140"
Margin="0,0,5,0"
Style="{StaticResource MainMenu_ToggleButton}"/>-->
<!--<RadioButton Content="{Binding SetUpMsg}"
ToolTip="{Binding SetUpToolTip}"
IsChecked="{Binding SetUpIsChecked}"
Width="140"
Margin="0,0,5,0"
Style="{StaticResource MainMenu_ToggleButton}"/>-->
<Button Content="{Binding ToolDBMsg}"
Command="{Binding ToolDbCommand}"
ToolTip="{Binding ToolDBToolTip}"
Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<Button Content="{Binding SetUpMsg}"
Command="{Binding SetUpCommand}"
ToolTip="{Binding SetUpToolTip}"
Visibility="{Binding SetUp_Visibility}"
Height="30"
Width="80"
Margin="5,0,5,0"
Style="{StaticResource Optimizer_Button}"/>
<RadioButton Content="{Binding MachineParamsMsg}"
ToolTip="{Binding MachineParamsMsg}"
IsChecked="{Binding MachineParamsIsChecked}"
Width="150"
Margin="5,0,10,0"
Style="{StaticResource MainMenu_ToggleButton}"/>
</StackPanel>
<Grid Grid.Column="1"
HorizontalAlignment="Right"
Margin="0,0,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -25,62 +70,69 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding CurrentMachineMsg}" <TextBlock Text="{Binding CurrentMachineMsg}"
Style="{StaticResource CurrentMachine_TextBlock}"/> VerticalAlignment="Center"
FontSize="15"
Margin="10,0,5,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding SelMachineName, UpdateSourceTrigger=PropertyChanged}" Text="{Binding SelMachineName, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource SelMachine_TextBlock}"/> VerticalAlignment="Center"
FontWeight="Bold"
FontSize="20"
Margin="10,0,5,0"
Style="{StaticResource ForegroundCorduroy_TextBlock}"/>
<Button Grid.Column="2" <Button Grid.Column="2"
ToolTip="{Binding ChooseMachine_ToolTip}" ToolTip="{Binding ChooseMachine_ToolTip}"
Command="{Binding ChooseMachine_Command}" Command="{Binding ChooseMachine_Command}"
Style="{StaticResource ToolBarViewPanel_Button}"> Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource ChooseMachine_Image}" <Image Source="{StaticResource ChooseMachine_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"/>
</Button> </Button>
<Grid Grid.Column="3" <Grid Grid.Column="3"
Visibility="{Binding ChooseMachine_Visibility}" Visibility="{Binding ChooseMachine_Visibility}"
Style="{StaticResource CalcPanel_Grid}"> Margin="0,0,5,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--Combobox per selezionare la macchina corrente--> <!--Combobox per selezionare la macchina corrente-->
<ComboBox x:Name="SelMachineCombo" <ComboBox x:Name="SelMachineCombo"
ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name" ItemsSource="{Binding Path=MachineList}"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name" SelectedItem="{Binding Path=SelectedMachine}"
Style="{StaticResource CalcPanel_ComboBox}"/> DisplayMemberPath="Name"
SelectedValuePath="Name"
Height="22"
Width="150"
Style="{StaticResource Optmizer_ComboBox}"/>
<Button Grid.Column="1" <Button Grid.Column="1"
Content="OK" Content="OK"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
Style="{StaticResource CalcPanel_Button}"/> FontWeight="Light"
FontSize="10"
Height="30"
Width="30"
Margin="5,2,5,2"
Style="{StaticResource Optimizer_Button}"/>
</Grid> </Grid>
</Grid> </Grid>
<StackPanel Grid.Column="1"
Style="{StaticResource PParameters_StackPanel}">
<RadioButton Content="{Binding StrategyManagerMsg}"
ToolTip="{Binding ParameterMachineMsg}"
IsChecked="{Binding StrategyManagerIsChecked}"
Style="{StaticResource StrategyManager_ToggleButton}"/>
<Button Content="{Binding ToolDBMsg}"
ToolTip="{Binding ToolDBToolTip}"
Command="{Binding ToolDbCommand}"
Click="Button_Click"
Style="{StaticResource GeneralConfiguration_Button}"/>
<Button Content="{Binding SetUpMsg}"
Command="{Binding SetUpCommand}"
Click="Button_Click"
ToolTip="{Binding SetUpToolTip}"
Style="{StaticResource GeneralConfiguration_Button}"
Visibility="{Binding SetUp_Visibility}"/>
<RadioButton Content="{Binding MachineParamsMsg}"
ToolTip="{Binding MachineParamsMsg}"
IsChecked="{Binding MachineParamsIsChecked}"
Style="{StaticResource MachineParam_ToggleButton}"/>
</StackPanel>
</Grid> </Grid>
<TabControl Grid.Row="1" <TabControl Grid.Row="1"
SelectedIndex="{Binding nSelTab}" SelectedIndex="{Binding nSelTab}"
Style="{StaticResource SelTab_TabControl}"> Background="{StaticResource TabControl.Static.Generic.Background}"
BorderThickness="0"
TabStripPlacement="Top"
Margin="5,5,2.5,5">
<TabControl.Style>
<Style TargetType="{x:Type TabControl}">
<Style.Resources>
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource Optimizer_TabItem}"/>
</Style.Resources>
</Style>
</TabControl.Style>
<TabControl.ItemContainerStyle> <TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}"> <Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/> <Setter Property="Visibility" Value="Collapsed"/>
@@ -88,34 +140,39 @@
</TabControl.ItemContainerStyle> </TabControl.ItemContainerStyle>
<TabItem Header="EMPTY"/> <TabItem Header="EMPTY"/>
<TabItem Header="STRATEGIES"> <TabItem Header="STRATEGIES">
<StackPanel> <OPTIMIZER:StrategyManagerV DataContext="{StaticResource StrategyManagerVM}" Margin="0,0,0,-25"/>
<OPTIMIZER:StrategyManagerV DataContext="{StaticResource StrategyManagerVM}"/>
</StackPanel>
</TabItem> </TabItem>
<!--<TabItem Header="TOOLDB">
<OPTIMIZER:ToolDbWindowV/>
</TabItem>-->
<!--<TabItem Header="SETUP">
<OPTIMIZER:SetUpDBV/>
</TabItem>-->
<TabItem Header="PARAMETERS"> <TabItem Header="PARAMETERS">
<StackPanel Style="{StaticResource PartManager_StackPanel}"> <StackPanel Orientation="Horizontal">
<ItemsControl ItemsSource="{Binding SelectedItem.MachTableList, ElementName=SelMachineCombo}"> <ItemsControl ItemsSource="{Binding SelectedItem.MachTableList, ElementName=SelMachineCombo}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel x:Name="GroupStackPanel" <StackPanel x:Name="GroupStackPanel"
Style="{StaticResource PartManager_StackPanel}"/> Orientation="Horizontal"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<GroupBox Header="{Binding sName}" <GroupBox Header="{Binding sName}"
Style="{StaticResource MachinePanel_GroupBox}"> Foreground="{StaticResource BeamWall_Corduroy}"
VerticalAlignment="Top">
<ItemsControl Name="MachParamsItemsControl" <ItemsControl Name="MachParamsItemsControl"
ItemsSource="{Binding MachParamList}" ItemsSource="{Binding MachParamList}"
Style="{StaticResource MachinePanel_ItemsControl}"> Margin="0,5,0,0">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Style="{StaticResource Project_WrapPanel}"/> <WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Style="{StaticResource MachParam_Grid}"> <Grid Margin="0,0,5,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
@@ -123,14 +180,19 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}" <TextBlock Text="{Binding sName}"
ToolTip="{Binding sName}" ToolTip="{Binding sName}"
Style="{StaticResource MachinePanel_TextBlock}"/> TextWrapping="WrapWithOverflow"
Width="150"
Style="{StaticResource MachParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1" <EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}" Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Style="{StaticResource Name_TextBox}"/> TextWrapping="Wrap"
Width="60"/>
<TextBlock Grid.Column="2" <TextBlock Grid.Column="2"
Text="{Binding sDescription}" Text="{Binding sDescription}"
ToolTip="{Binding sDescription}" ToolTip="{Binding sDescription}"
Style="{StaticResource Description_TextBlock}"/> TextWrapping="WrapWithOverflow"
Width="148"
Style="{StaticResource MachParam_TextBlock}"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
@@ -1,8 +1,3 @@
Public Class MachinePanelV Public Class MachinePanelV
Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
Map.refMachinePanelVM.SetStrategyManagerIsChecked(False)
Map.refMachinePanelVM.SetMachineParamsIsChecked(False)
End Sub
End Class End Class
@@ -2,13 +2,20 @@
Imports EgtBEAMWALL.Core Imports EgtBEAMWALL.Core
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports Google.Protobuf.WellKnownTypes
Public Class MachinePanelVM Public Class MachinePanelVM
Inherits EgtWPFLib5.MachinePanelVM Inherits EgtWPFLib5.MachinePanelVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
'Friend Enum ConfigTabs As Integer
' EMPTY = 0
' STRATEGYMANAGER = 1
' TOOLDB = 2
' SETUP = 3
' MACHINEPARAMS = 4
'End Enum
Friend Enum ConfigTabs As Integer Friend Enum ConfigTabs As Integer
EMPTY = 0 EMPTY = 0
STRATEGYMANAGER = 1 STRATEGYMANAGER = 1
@@ -16,7 +23,7 @@ Public Class MachinePanelVM
End Enum End Enum
' Radice del direttorio delle macchine ' Radice del direttorio delle macchine
Private m_sMachinesRoot As String Friend m_sMachinesRoot As String
' Macchina correntemente selezionata e quindi attiva ' Macchina correntemente selezionata e quindi attiva
Private m_SelectedMachine As Machine = Nothing Private m_SelectedMachine As Machine = Nothing
@@ -106,9 +113,58 @@ Public Class MachinePanelVM
Friend Sub SetStrategyManagerIsChecked(value As Boolean) Friend Sub SetStrategyManagerIsChecked(value As Boolean)
m_bStrategyManagerIsChecked = value m_bStrategyManagerIsChecked = value
m_bMachineParamsIsChecked = False m_bMachineParamsIsChecked = False
SetSelTab(ConfigTabs.STRATEGYMANAGER) m_bToolDBIsChecked = False
m_bSetUpIsChecked = False
If value Then SetSelTab(ConfigTabs.STRATEGYMANAGER)
NotifyPropertyChanged(NameOf(StrategyManagerIsChecked)) NotifyPropertyChanged(NameOf(StrategyManagerIsChecked))
NotifyPropertyChanged(NameOf(MachineParamsIsChecked)) NotifyPropertyChanged(NameOf(MachineParamsIsChecked))
NotifyPropertyChanged(NameOf(ToolDBIsChecked))
NotifyPropertyChanged(NameOf(SetUpIsChecked))
End Sub
Private m_bToolDBIsChecked As Boolean = False
Public Property ToolDBIsChecked As Boolean
Get
Return m_bToolDBIsChecked
End Get
Set(value As Boolean)
m_bToolDBIsChecked = value
SetToolDBIsChecked(m_bToolDBIsChecked)
End Set
End Property
Friend Sub SetToolDBIsChecked(value As Boolean)
m_bToolDBIsChecked = value
m_bSetUpIsChecked = False
m_bMachineParamsIsChecked = False
m_bStrategyManagerIsChecked = False
'If value Then SetSelTab(ConfigTabs.TOOLDB)
NotifyPropertyChanged(NameOf(ToolDBIsChecked))
NotifyPropertyChanged(NameOf(MachineParamsIsChecked))
NotifyPropertyChanged(NameOf(StrategyManagerIsChecked))
NotifyPropertyChanged(NameOf(SetUpIsChecked))
End Sub
Private m_bSetUpIsChecked As Boolean = False
Public Property SetUpIsChecked As Boolean
Get
Return m_bSetUpIsChecked
End Get
Set(value As Boolean)
m_bSetUpIsChecked = value
SetSetUpIsChecked(m_bSetUpIsChecked)
End Set
End Property
Friend Sub SetSetUpIsChecked(value As Boolean)
m_bSetUpIsChecked = value
m_bToolDBIsChecked = False
m_bMachineParamsIsChecked = False
m_bStrategyManagerIsChecked = False
'If value Then SetSelTab(ConfigTabs.SETUP)
NotifyPropertyChanged(NameOf(ToolDBIsChecked))
NotifyPropertyChanged(NameOf(SetUpIsChecked))
NotifyPropertyChanged(NameOf(MachineParamsIsChecked))
NotifyPropertyChanged(NameOf(StrategyManagerIsChecked))
NotifyPropertyChanged(NameOf(SetUpIsChecked))
End Sub End Sub
Private m_bMachineParamsIsChecked As Boolean = False Private m_bMachineParamsIsChecked As Boolean = False
@@ -123,10 +179,14 @@ Public Class MachinePanelVM
End Property End Property
Friend Sub SetMachineParamsIsChecked(value As Boolean) Friend Sub SetMachineParamsIsChecked(value As Boolean)
m_bMachineParamsIsChecked = value m_bMachineParamsIsChecked = value
m_bSetUpIsChecked = False
m_bStrategyManagerIsChecked = False m_bStrategyManagerIsChecked = False
SetSelTab(ConfigTabs.MACHINEPARAMS) m_bToolDBIsChecked = False
If value Then SetSelTab(ConfigTabs.MACHINEPARAMS)
NotifyPropertyChanged(NameOf(MachineParamsIsChecked)) NotifyPropertyChanged(NameOf(MachineParamsIsChecked))
NotifyPropertyChanged(NameOf(StrategyManagerIsChecked)) NotifyPropertyChanged(NameOf(StrategyManagerIsChecked))
NotifyPropertyChanged(NameOf(ToolDBIsChecked))
NotifyPropertyChanged(NameOf(SetUpIsChecked))
End Sub End Sub
#Region "Messages" #Region "Messages"
@@ -267,6 +327,8 @@ Public Class MachinePanelVM
Public Overrides Sub ToolDb(ByVal param As Object) Public Overrides Sub ToolDb(ByVal param As Object)
SetSelTab(ConfigTabs.EMPTY) SetSelTab(ConfigTabs.EMPTY)
SetStrategyManagerIsChecked(False)
SetMachineParamsIsChecked(False)
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa) ' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtTdbReload() Then If Not EgtTdbReload() Then
@@ -276,7 +338,7 @@ Public Class MachinePanelVM
End If End If
Dim ToolDbWindowVM As New MyToolDbWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachIniFile, Map.refSceneHostVM.MainScene.GetCtx(), "Beam") Dim ToolDbWindowVM As New MyToolDbWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachIniFile, Map.refSceneHostVM.MainScene.GetCtx(), "Beam")
Dim ToolDbWindowV = New ToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM) Dim ToolDbWindowV = New EgtWPFLib5.ToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM)
If ToolDbWindowVM.MatType <> 0 Then If ToolDbWindowVM.MatType <> 0 Then
ToolDbWindowV.Height = 640 ToolDbWindowV.Height = 640
@@ -287,29 +349,10 @@ Public Class MachinePanelVM
End If End If
End Sub End Sub
Public Overrides Sub MachDb(ByVal param As Object)
SetSelTab(ConfigTabs.EMPTY)
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtMdbReload() Then
EgtOutLog("Impossible reloading machining Db")
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(31408), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(CurrentMachine.sMachIniFile, Map.refSceneHostVM.MainScene.GetCtx(), "Stone")
Dim MachDbWindowV = New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
MachDbWindowV.Height = 768
MachDbWindowV.Width = 1024
MachDbWindowV.ShowDialog()
Else
Exit Sub
End If
End Sub
Public Overrides Sub SetUp(ByVal param As Object) Public Overrides Sub SetUp(ByVal param As Object)
SetSelTab(ConfigTabs.EMPTY) SetSelTab(ConfigTabs.EMPTY)
SetStrategyManagerIsChecked(False)
SetMachineParamsIsChecked(False)
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista ' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
If Not File.Exists(CurrentMachine.sMachDir & "\Scripts\" & SETUP_LUA) Then If Not File.Exists(CurrentMachine.sMachDir & "\Scripts\" & SETUP_LUA) Then
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ") EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
@@ -383,6 +426,7 @@ Public Class MachinePanelVM
Friend Sub Ok() Friend Sub Ok()
SetSelMachineName(m_SelectedMachine.Name) SetSelMachineName(m_SelectedMachine.Name)
'MapV.refToolDbWindowV.Load()
SetChooseMachine_Visibility(False) SetChooseMachine_Visibility(False)
End Sub End Sub
@@ -7,8 +7,8 @@
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
Title="NewMacroFeature" Title="NewMacroFeature"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}"> Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
<Grid Style="{StaticResource BlockedWnd_Grid}"> <Grid Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@@ -20,34 +20,47 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="Feature" <TextBlock Text="Feature"
Style="{StaticResource Feature_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="5"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding sDescBTLFeature}" Text="{Binding sDescBTLFeature}"
Style="{StaticResource DescBTLFeature_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<CheckBox Grid.Column="2" <CheckBox Grid.Column="2"
Content="Default Macro" Content="Default Macro"
IsChecked="{Binding bIsCustomChecked}" IsChecked="{Binding bIsCustomChecked}"
Visibility="{Binding bCustomVisibility}" Visibility="{Binding bCustomVisibility}"
Style="{StaticResource DefaultMacro_CheckBox}"/> Margin="0,6,5,0"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
Text="Name" Text="Name"
Style="{StaticResource Option_TextBlock}"/> Foreground="{StaticResource TextBlock.Static.Corduroy.Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,5,10,0"/>
<EgtWPFLib5:EgtTextBox Grid.Row="1" <EgtWPFLib5:EgtTextBox Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Text="{Binding sFeatureName}" Text="{Binding sFeatureName}"
Style="{StaticResource FeatureName_TextBox}"/> TextWrapping="Wrap"
Width="200"
Margin="5"/>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Grid.Row="2" Grid.Row="2"
Grid.ColumnSpan="3" Grid.ColumnSpan="3"
Style="{StaticResource AddFeatureWnd_UniformGrid}"> Margin="5">
<Button Content="Ok" <Button Content="Ok"
Command="{Binding Ok_Command}" Command="{Binding Ok_Command}"
IsDefault="True" IsDefault="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
<Button Content="Cancel" <Button Content="Cancel"
IsCancel="True" IsCancel="True"
Style="{StaticResource EgtWPFLib5_Button}"/> Height="30"
Width="80"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtBEAMWALLCORE:OptimizerWindow> </EgtBEAMWALLCORE:OptimizerWindow>
+125 -10
View File
@@ -2,9 +2,12 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer" xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
IsEnabled="{Binding MainMenu_IsEnabled}" IsEnabled="{Binding MainMenu_IsEnabled}"
DataContext="{DynamicResource MainMenuVM}" DataContext="{StaticResource MainMenuVM}"
WindowChrome.IsHitTestVisibleInChrome="True"> WindowChrome.IsHitTestVisibleInChrome="True">
<!--Barra superiore dei comandi--> <!--Barra superiore dei comandi-->
@@ -30,22 +33,134 @@
Content="{Binding Supervisor_Msg}" Content="{Binding Supervisor_Msg}"
Command="{Binding Supervisor_Command}" Command="{Binding Supervisor_Command}"
Visibility="{Binding Supervisor_Visibility}" Visibility="{Binding Supervisor_Visibility}"
Style="{StaticResource MainMenu_Button}"/> Background="{StaticResource Button.MainMenu.Background}"
Foreground="{StaticResource BeamWall_White}"
TextBlock.FontWeight="Normal"
Height="30"
Width="120"
Style="{StaticResource Optimizer_Button}"/>
<Button Grid.Column="3" <EgwWPFBaseLib:EgwSplitButton Grid.Column="3"
Command="{Binding SendFeedbackCommand}" Command="{Binding SendFeedbackCommand}"
ToolTip="{Binding SendFeedbackToolTip}" ToolTip="{Binding SendFeedbackToolTip}"
Style="{StaticResource SendFeedback_Button}"> Background="{StaticResource Button.MainMenu.Background}"
BorderBrush="{StaticResource Button.Static.Border}"
CornerRadius="3"
Height="30"
DropDownHorizontalContentAlignment="Stretch"
DropDownVerticalContentAlignment="Stretch"
DropDownButtonPadding="0">
<Image Source="{StaticResource Send_Image}" <Image Source="{StaticResource Send_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Stretch="Uniform"
</Button> Margin="5,0"/>
<EgwWPFBaseLib:EgwSplitButton.DropDownButtonContent>
<Grid>
<TextBlock Text="▼"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<Border Background="Red"
Height="10"
Width="10"
Margin="5,2,2,0"
CornerRadius="5"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Visibility="{Binding BadgeVisibility}">
<TextBlock Text="{Binding sBadgeText}"
FontSize="7"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="White"
Margin="0,0,0,1"/>
</Border>
</Grid>
</EgwWPFBaseLib:EgwSplitButton.DropDownButtonContent>
<EgwWPFBaseLib:EgwSplitButton.DropDownContent>
<Border BorderBrush="{StaticResource Button.Static.Border}"
BorderThickness="2"
CornerRadius="3"
Padding="2"
Background="{StaticResource Button.MainMenu.Background}"
Margin="0">
<Button ToolTip="{Binding TicketManagerToolTip}"
Command="{Binding TicketManager_Command}"
Background="{StaticResource Button.MainMenu.Background}"
Foreground="{StaticResource BeamWall_White}"
FontWeight="Normal"
Height="30"
Width="40"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource TicketManager_Image}"
Stretch="Uniform"/>
</Button>
</Border>
</EgwWPFBaseLib:EgwSplitButton.DropDownContent>
</EgwWPFBaseLib:EgwSplitButton>
<dx:SplitButton Grid.Column="3"
Command="{Binding SendFeedbackCommand}"
ToolTip="{Binding SendFeedbackToolTip}"
Background="{StaticResource Button.MainMenu.Background}"
ArrowBackground="{StaticResource Button.MainMenu.Background}"
BorderBrush="{StaticResource Button.Static.Border}"
BorderThickness="0"
ArrowBorderThickness="0"
ArrowPadding="0"
Foreground="{StaticResource BeamWall_White}"
Height="30"
CornerRadius="3"
PopupDropAlignment="Bottom"
Visibility="Collapsed">
<dx:SplitButton.Content>
<Grid>
<Image Source="{StaticResource Send_Image}"
Stretch="Uniform"/>
<Border Background="Red"
Height="10"
Width="10"
Margin="5,0,0,0"
CornerRadius="5"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Visibility="{Binding BadgeVisibility}">
<TextBlock Text="{Binding sBadgeText}"
FontSize="7"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="White"
Margin="0,0,0,1"/>
</Border>
</Grid>
</dx:SplitButton.Content>
<dxb:PopupControlContainer Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
AllowsTransparency="True">
<Button ToolTip="{Binding TicketManagerToolTip}"
Command="{Binding TicketManager_Command}"
Background="{StaticResource Button.MainMenu.Background}"
Foreground="{StaticResource BeamWall_White}"
FontWeight="Normal"
Height="30"
Width="40"
Style="{StaticResource Optimizer_Button}">
<Image Source="{StaticResource TicketManager_Image}"
Stretch="Uniform"/>
</Button>
</dxb:PopupControlContainer>
</dx:SplitButton>
<RadioButton Grid.Column="4" <RadioButton Grid.Column="4"
IsChecked="{Binding ConfigProgram_IsChecked}" IsChecked="{Binding ConfigProgram_IsChecked}"
ToolTip="{Binding ConfigurationProgramToolTip}" ToolTip="{Binding ConfigurationProgramToolTip}"
Style="{StaticResource ConfigProgram_ToggleButton}"> Background="Transparent"
Width="40"
Style="{StaticResource MainMenu_ToggleButton}">
<Image Source="{Binding sConfigurationImagePath}" <Image Source="{Binding sConfigurationImagePath}"
Style="{StaticResource ConfigProgram_Image}"/> Height="40"
Stretch="Uniform"
Margin="0,-6,0,0"/>
</RadioButton> </RadioButton>
<OPTIMIZER:UserAdminV Grid.Column="5"/> <OPTIMIZER:UserAdminV Grid.Column="5"/>
+92 -25
View File
@@ -6,6 +6,7 @@ Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Core.ConstBeam Imports EgtBEAMWALL.Core.ConstBeam
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgwRedmineAPI
Public Class MainMenuVM Public Class MainMenuVM
Inherits VMBase Inherits VMBase
@@ -40,8 +41,12 @@ Public Class MainMenuVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
If value Then If value Then
SelPage = Pages.OPTIMIZERPAGE Dim bModify As Boolean = True
SetConfigurationImagePath(CONFIGURATION_IMAGE) If Map.refStrategyManagerVM.bIsModifyStrategy Then bModify = Map.refStrategyManagerVM.SaveCustomConfigJson()
If bModify Then
SelPage = Pages.OPTIMIZERPAGE
SetConfigurationImagePath(CONFIGURATION_IMAGE)
End If
End If End If
End Set End Set
End Property End Property
@@ -236,6 +241,28 @@ Public Class MainMenuVM
End Set End Set
End Property End Property
Private m_sBadgeText As String = ""
Public ReadOnly Property sBadgeText As String
Get
Return m_sBadgeText
End Get
End Property
Friend Sub SetBadgeText(value As String)
m_sBadgeText = value
NotifyPropertyChanged(NameOf(sBadgeText))
End Sub
Private m_BadgeVisibility As Visibility = Visibility.Collapsed
Public ReadOnly Property BadgeVisibility As Visibility
Get
Return m_BadgeVisibility
End Get
End Property
Friend Sub SetBadgeVisibility(value As Boolean)
m_BadgeVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(BadgeVisibility))
End Sub
#Region "Messages" #Region "Messages"
Public ReadOnly Property Configuration_Msg As String Public ReadOnly Property Configuration_Msg As String
@@ -277,6 +304,12 @@ Public Class MainMenuVM
End Get End Get
End Property End Property
Public ReadOnly Property TicketManagerToolTip As String
Get
Return EgtMsg(30516)
End Get
End Property
Public ReadOnly Property ConfigurationProgramToolTip As String Public ReadOnly Property ConfigurationProgramToolTip As String
Get Get
Return EgtMsg(30515) Return EgtMsg(30515)
@@ -290,6 +323,7 @@ Public Class MainMenuVM
' Definizione comandi ' Definizione comandi
Private m_cmdSupervisor As ICommand Private m_cmdSupervisor As ICommand
Private m_cmdSendFeedback As ICommand Private m_cmdSendFeedback As ICommand
Private m_cmdTicketManager As ICommand
#End Region ' Fields & Properties #End Region ' Fields & Properties
@@ -308,6 +342,14 @@ Public Class MainMenuVM
m_OpenPage_Timer.Interval = TimeSpan.FromMilliseconds(500) m_OpenPage_Timer.Interval = TimeSpan.FromMilliseconds(500)
AddHandler m_OpenPage_Timer.Tick, AddressOf OpenPage_Tick AddHandler m_OpenPage_Timer.Tick, AddressOf OpenPage_Tick
m_OpenPage_Timer.Start() m_OpenPage_Timer.Start()
' verifico se lanciare gestore notifiche
If GetMainPrivateProfileInt("Redmine", "EnableNotification", 0) = 1 AndAlso
Not String.IsNullOrWhiteSpace(Map.refMainWindowVM.MainWindowM.RedmineUrl) AndAlso
Not String.IsNullOrWhiteSpace(Map.refMainWindowVM.MainWindowM.RedmineProject) AndAlso
Not IsNothing(Map.refMainWindowVM.MainWindowM.RedmineApi) AndAlso
Not IsNothing(Map.refMainWindowVM.MainWindowM.RedmineApi.NotificationManager) Then
AddHandler Map.refMainWindowVM.MainWindowM.RedmineApi.NotificationManager.OnNotification, AddressOf NotificationManager_OnNotification
End If
End Sub End Sub
#End Region ' CONSTRUCTOR #End Region ' CONSTRUCTOR
@@ -580,7 +622,7 @@ Public Class MainMenuVM
ProjFileMList = DbControllers.m_ProjController.GetByProdAsc(ProjectManagerVM.CurrProd.nProdId) ProjFileMList = DbControllers.m_ProjController.GetByProdAsc(ProjectManagerVM.CurrProd.nProdId)
Map.refProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId) Map.refProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
End If End If
Dim sExportFileName = ProjectManagerVM.CurrProd.nProdId.ToString("0000") & " - " & ProjectManagerVM.CurrProj.sBTLFileName & " - ProjectExport" Dim sExportFileName = ProjectManagerVM.CurrProd.nProdId.ToString("0000") & " - ProjectExport"
Dim sExpZipToCreate = Map.refProdManagerVM.ExportProject(sExportFileName) Dim sExpZipToCreate = Map.refProdManagerVM.ExportProject(sExportFileName)
' Creo zip file da allegare ' Creo zip file da allegare
Dim sZipToCreate As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip" Dim sZipToCreate As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"
@@ -633,28 +675,30 @@ Public Class MainMenuVM
Catch ex1 As Exception Catch ex1 As Exception
EgtOutLog("Exception in zip: " & ex1.ToString()) EgtOutLog("Exception in zip: " & ex1.ToString())
End Try End Try
' preparo la mail per il supporto ' creo ticket
Dim bEx As Boolean = False Map.refMainWindowVM.MainWindowM.RedmineApi?.OpenNewTicket(New List(Of String)({Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"}))
Try '' preparo la mail per il supporto
Dim sAddressArray As String() = sSupportAddress.Split(CType(",", Char())) 'Dim bEx As Boolean = False
Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("Aedifica Feedback - " & sKey) 'Try
SendFeedbackWindow.Recipients.Add(sAddressArray(0)) ' Dim sAddressArray As String() = sSupportAddress.Split(CType(",", Char()))
For index As Integer = 1 To sAddressArray.Length() - 1 ' Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("AEdifica Feedback - " & sKey)
SendFeedbackWindow.Recipients.Add(sAddressArray(index), EgtWPFLib5.MapiMailMessage.RecipientType.CC) ' SendFeedbackWindow.Recipients.Add(sAddressArray(0))
Next ' For index As Integer = 1 To sAddressArray.Length() - 1
If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then ' SendFeedbackWindow.Recipients.Add(sAddressArray(index), EgtWPFLib5.MapiMailMessage.RecipientType.CC)
SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip") ' Next
End If ' If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then
SendFeedbackWindow.ShowDialog() ' SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip")
Catch ex As Exception ' End If
EgtOutLog("Feedback exception: " & ex.ToString) ' SendFeedbackWindow.ShowDialog()
bEx = True 'Catch ex As Exception
End Try ' EgtOutLog("Feedback exception: " & ex.ToString)
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then ' bEx = True
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(30512), sSupportAddress, sZipToCreate), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Information) 'End Try
Else 'If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(30514)) ' EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(30512), sSupportAddress, sZipToCreate), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Information)
End If 'Else
' Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(30514))
'End If
End Sub End Sub
Private Sub AddFileToZip(archive As ZipArchive, filePath As String, entryRoot As String) Private Sub AddFileToZip(archive As ZipArchive, filePath As String, entryRoot As String)
@@ -686,6 +730,29 @@ Public Class MainMenuVM
#End Region ' SendFeedbackCommand #End Region ' SendFeedbackCommand
#Region "TicketManager"
Public ReadOnly Property TicketManager_Command As ICommand
Get
If m_cmdTicketManager Is Nothing Then
m_cmdTicketManager = New Command(AddressOf TicketManager)
End If
Return m_cmdTicketManager
End Get
End Property
Public Sub TicketManager(ByVal param As Object)
' apro ticket manager
Map.refMainWindowVM.MainWindowM.RedmineApi?.OpenTicketList()
End Sub
#End Region ' TicketManager
#End Region ' COMMANDS #End Region ' COMMANDS
Private Sub NotificationManager_OnNotification(evt As NotificationEvent)
SetBadgeText(evt.Quantity)
SetBadgeVisibility(evt.Quantity > 0)
End Sub
End Class End Class
@@ -1,9 +1,11 @@
Imports System.Threading Imports System.IO
Imports System.Math Imports System.Math
Imports System.Threading
Imports DevExpress.Xpf.Grid
Imports EgtBEAMWALL.Core
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtBEAMWALL.Core Imports EgwRedmineAPI
Imports System.IO
Public Class MainWindowM Public Class MainWindowM
@@ -191,6 +193,42 @@ Public Class MainWindowM
End Get End Get
End Property End Property
'Private REDMINE_URL As String = "https://redmine.egalware.com/"
'Private PROJECT_ID As String = "steamware-stockmat"
Private m_RedmineUrl As String '= "http://172.16.1.71/"
Public ReadOnly Property RedmineUrl As String
Get
Return m_RedmineUrl
End Get
End Property
Private m_RedmineProject As String '= "base-stong"
Public ReadOnly Property RedmineProject As String
Get
Return m_RedmineProject
End Get
End Property
Private m_RedmineApi As EgwRedmineAPICore
Friend ReadOnly Property RedmineApi As EgwRedmineAPICore
Get
If IsNothing(m_RedmineApi) Then
m_RedmineApi = New EgwRedmineAPICore()
m_RedmineApi.SetGetPrivateProfileString(AddressOf EgwWPFBaseLib.GetMainPrivateProfileString)
m_RedmineApi.SetWritePrivateProfileString(AddressOf EgwWPFBaseLib.WriteMainPrivateProfileString)
m_RedmineApi.SetGetPrivateProfileInt(AddressOf EgwWPFBaseLib.GetMainPrivateProfileInt)
m_RedmineApi.SetWinPosFromIniToWindow(AddressOf EgwWPFBaseLib.WinPosFromIniToWindow)
m_RedmineApi.SetWinPosFromWindowToIni(AddressOf EgwWPFBaseLib.WinPosFromWindowToIni)
Dim InitRes = m_RedmineApi.Init(RedmineUrl, RedmineProject)
If Not InitRes.bResult Then
m_RedmineApi = Nothing
MessageBox.Show("Ticketing system initialization failed!" & Environment.NewLine & InitRes.sErrorMessage, "Error!", MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If
Return m_RedmineApi
End Get
End Property
#End Region ' FIELDS #End Region ' FIELDS
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -217,6 +255,7 @@ Public Class MainWindowM
m_sTempDir = m_sDataRoot & "\" & TEMP_DIR m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
' Impostazione path Ini file ' Impostazione path Ini file
IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME
EgwWPFBaseLib.SetIniFile(IniFile.m_sIniFile)
' Impostazione path BTL Ini File ' Impostazione path BTL Ini File
BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME
' Impostazione path Ini file DataGrid ' Impostazione path Ini file DataGrid
@@ -269,8 +308,8 @@ Public Class MainWindowM
EgtSetLockId(sLockId) EgtSetLockId(sLockId)
End If End If
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(5327, 3106, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions) EgtGetKeyOptions(5327, 3106, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
@@ -305,9 +344,42 @@ Public Class MainWindowM
End While End While
' Leggo file messaggi ' Leggo file messaggi
Dim sMsgFilePath As String = sMsgDir & "\" & sMsgName Dim sMsgFilePath As String = sMsgDir & "\" & sMsgName
' leggo messaggi automatismo
Dim sAutoMsgFilePath As String = ""
Dim sPluginName As String = ""
If GetMainPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sAutoMsgFilePath) > 0 AndAlso Not String.IsNullOrWhiteSpace(sAutoMsgFilePath) Then
' recupero nome del file messaggi dell'automatismo
sAutoMsgFilePath &= "\Messages\" & sMsgName
If File.Exists(sAutoMsgFilePath) Then
Dim OrigMsgFile As List(Of String) = File.ReadAllLines(sMsgFilePath).ToList()
' elimino eventuali righe vuote o commento di fine
While String.IsNullOrWhiteSpace(OrigMsgFile.Last()) OrElse OrigMsgFile.Last().StartsWith("//")
OrigMsgFile.RemoveAt(OrigMsgFile.Count - 1)
End While
Dim AutoMsgFile As List(Of String) = File.ReadAllLines(sAutoMsgFilePath).ToList()
' elimino eventuale riga di inizio file
If AutoMsgFile.Count > 2 AndAlso AutoMsgFile(0).StartsWith("//") AndAlso AutoMsgFile(1).StartsWith("0") Then
AutoMsgFile.RemoveAt(0)
AutoMsgFile.RemoveAt(0)
End If
OrigMsgFile.AddRange(AutoMsgFile)
Dim sNewMsgFilePath As String = sMsgDir & "\Complete" & sMsgName
Dim bNewMsgFile As Boolean = False
Try
File.WriteAllLines(sNewMsgFilePath, OrigMsgFile)
bNewMsgFile = True
Catch ex As Exception
End Try
If bNewMsgFile Then
sMsgFilePath = sNewMsgFilePath
End If
End If
End If
If Not EgtLoadMessages(sMsgFilePath) Then If Not EgtLoadMessages(sMsgFilePath) Then
EgtOutLog("Error in EgtLoadMessages") EgtOutLog("Error in EgtLoadMessages")
End If End If
' Leggo messaggi per GridControl di DevExpress
GridControlLocalizer.Active = New CustomDXGridLocalizer()
' Leggo e imposto unità di misura per interfaccia utente ' Leggo e imposto unità di misura per interfaccia utente
EgtSetUiUnits(GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0) EgtSetUiUnits(GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
' Leggo e imposto livello utilizzatore ' Leggo e imposto livello utilizzatore
@@ -337,6 +409,25 @@ Public Class MainWindowM
Core.Configuration.SetModifySetup(m_bMachConfig) Core.Configuration.SetModifySetup(m_bMachConfig)
' Info su opzioni chiave ' Info su opzioni chiave
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString()) EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
' inizializzo ambiente Redmine
If GetMainPrivateProfileString("Redmine", "Url", "", m_RedmineUrl) > 0 AndAlso
GetMainPrivateProfileString("Redmine", "Project", "", m_RedmineProject) > 0 AndAlso
Not String.IsNullOrWhiteSpace(m_RedmineUrl) AndAlso
Not String.IsNullOrWhiteSpace(m_RedmineProject) Then
If GetMainPrivateProfileInt("Redmine", "EnableNotification", 0) = 1 Then
m_RedmineApi = New EgwRedmineAPICore()
m_RedmineApi.SetGetPrivateProfileString(AddressOf EgwWPFBaseLib.GetMainPrivateProfileString)
m_RedmineApi.SetWritePrivateProfileString(AddressOf EgwWPFBaseLib.WriteMainPrivateProfileString)
m_RedmineApi.SetGetPrivateProfileInt(AddressOf EgwWPFBaseLib.GetMainPrivateProfileInt)
m_RedmineApi.SetWinPosFromIniToWindow(AddressOf EgwWPFBaseLib.WinPosFromIniToWindow)
m_RedmineApi.SetWinPosFromWindowToIni(AddressOf EgwWPFBaseLib.WinPosFromWindowToIni)
Dim InitRes = m_RedmineApi.Init(RedmineUrl, RedmineProject)
If Not InitRes.bResult Then
m_RedmineApi = Nothing
EgtOutLog("Ticketing system initialization failed!" & Environment.NewLine & InitRes.sErrorMessage)
End If
End If
End If
End Sub End Sub
Private Sub ManageInstance() Private Sub ManageInstance()
@@ -19,7 +19,8 @@
DockPanel.Dock="Bottom"/> DockPanel.Dock="Bottom"/>
<!--Progetto corrente--> <!--Progetto corrente-->
<TabControl SelectedIndex="{Binding nSelTabPage}" <TabControl SelectedIndex="{Binding nSelTabPage}"
Style="{StaticResource MainWindow_TabControl}"> Padding="0"
Margin="0,-4,0,0">
<TabControl.ItemContainerStyle> <TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}"> <Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/> <Setter Property="Visibility" Value="Collapsed"/>
@@ -29,10 +30,10 @@
<OPTIMIZER:ProjectV DataContext="{StaticResource ProjectVM}"/> <OPTIMIZER:ProjectV DataContext="{StaticResource ProjectVM}"/>
</TabItem> </TabItem>
<TabItem> <TabItem>
<OPTIMIZER:ConfigurationPageV DataContext="{DynamicResource ConfigurationPageVM}"/> <OPTIMIZER:ConfigurationPageV DataContext="{StaticResource ConfigurationPageVM}"/>
</TabItem> </TabItem>
<TabItem> <TabItem>
<OPTIMIZER:ConfigurationProgramV DataContext="{DynamicResource ConfigurationPageVM}"/> <OPTIMIZER:ConfigurationProgramV DataContext="{StaticResource ConfigurationPageVM}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
@@ -43,6 +43,11 @@ Public Class MainWindowV
e.Cancel = True e.Cancel = True
Return Return
End If End If
If Map.refProjectVM.bCalcRunning Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(63047), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
e.Cancel = True
Return
End If
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True e.Cancel = True
Return Return

Some files were not shown because too many files have changed in this diff Show More