Compare commits

..

159 Commits

Author SHA1 Message Date
Demetrio Cassarino 0091502aa5 Merge commit 'cf978712bae6c9217370feb1c0fc08bcdc4d7f61' into features/NewProjectGrid 2026-04-23 10:51:10 +02:00
Dario Sassi cf978712ba EgtCAM5 :
- correzione per problema blocco selezione lavorazione al rientro nella lista.
2026-04-12 21:49:59 +02:00
Dario Sassi 3e41014f5b EgtCAM5 :
- corretto aggiornamento visualizzazione PreviewTool di tipo corretto al rientro nella lavorazione.
2026-04-07 17:53:05 +02:00
Dario Sassi a62a53ea61 EgtCAM5 :
- modifica disegno utensile per preview in lavorazione.
2026-04-03 17:52:17 +02:00
Riccardo Elitropi 60adc08781 EgtCAM5 3.1d1 :
- Aggiunto parametro Overlap per Sgrossature.
2026-04-01 18:07:53 +02:00
Dario Sassi 06510d5925 EgtCAM5 :
- correzione selezione per lavorazioni.
2026-03-31 11:42:26 +02:00
Dario Sassi d8c97cf352 Merge commit '78310cd71187b942ed8c0e7d9728bd19ae207448' 2026-03-26 16:15:28 +01:00
Demetrio Cassarino 78310cd711 Merge commit '4e947f293e849ceeef263f4cc6d65bd3278e4db0' into features/NewProjectGrid 2026-03-26 15:17:59 +01:00
Demetrio Cassarino e48cbffa6b -aggiunto modifica per salvare dimensioni finestra ExecuteWindow 2026-03-26 15:17:46 +01:00
Dario Sassi 4e947f293e EgtCAM5 :
- piccole migliorie a ExecuteWindow.
2026-03-25 08:45:26 +01:00
Dario Sassi 014ce6db17 Merge remote-tracking branch 'origin/features/NewProjectGrid' 2026-03-25 08:13:42 +01:00
Dario Sassi 705aeaaab7 EgtCAM5 :
- piccola miglioria alla modifica precedente.
2026-03-24 13:35:11 +01:00
Dario Sassi 228c4f9a48 EgtCAM5 :
- correzione gestione geometria selezionata con più sottoentità per la lavorazione corrente.
2026-03-24 13:30:20 +01:00
Demetrio Cassarino 375c53122c -sistemato apertura e chiusura su infoexpander 2026-03-20 15:43:08 +01:00
Dario Sassi bb22395a22 Merge commit 'e2e365765d81fa12bad9018462bb335b668844f3' 2026-03-18 12:15:30 +01:00
Demetrio Cassarino e2e365765d -migliorata gestione griglia dinamica 2026-03-18 09:22:27 +01:00
Dario Sassi 4eac19a2ff EgtCAM5 :
- piccole modifiche ad analisi superfici di Bezier.
2026-03-13 13:39:21 +01:00
Dario Sassi c276398b29 Merge commit 'e88e19ed3fc5c09b063227daf658e5440c25b3ca' 2026-03-13 09:56:20 +01:00
Demetrio Cassarino e88e19ed3f -migliorata gestione griglia dinamica chiusura expander 2026-03-13 09:48:53 +01:00
Demetrio Cassarino 87fba7e739 Merge commit '92a6cefe6762d632438a17ce7c29f07ec82361f9' into features/ButtonPreview 2026-03-13 09:09:37 +01:00
Dario Sassi 92a6cefe67 EgtCAM5 3.1c2 :
- ricompilazione con cambio versione.
2026-03-12 19:18:23 +01:00
Dario Sassi 9193518d4f Merge commit 'dda46787db9dbbb232e2c81b4ef093fba7036ec3' 2026-03-12 18:27:27 +01:00
Daniele Bariletti 6e06d76a7c - modificata la funzione EgtSurfBezParamsFromPoint 2026-03-12 18:15:59 +01:00
Demetrio Cassarino dda46787db -introdotto griglia dinamica per gestire spostamento colonne 2026-03-12 11:31:10 +01:00
Daniele Bariletti ca2144f058 - miglioria all'analisi di una surf di bezier. 2026-03-11 16:12:15 +01:00
Daniele Bariletti e0ea153122 - aggiunta funzione per tagliare una trimesh con una curva chiusa. 2026-03-11 13:13:25 +01:00
Daniele Bariletti 0b471786cc - aggiunta funzione analizza per le superfici di bezier. 2026-03-10 17:41:01 +01:00
Dario Sassi ece48a6523 Merge commit '5e151fd7ec16aba3cacac08b98ec3cfd04521f8a' 2026-03-06 12:25:55 +01:00
Demetrio Cassarino 5e151fd7ec -gestito in modo corretto la visualizzazione del tool tramite tasti su/giù da tastiera 2026-03-06 12:13:12 +01:00
Dario Sassi ade3d5c1aa Merge commit 'b3db41c0ae4c74d40e57806c3ef462c4462985ba' 2026-03-06 11:31:58 +01:00
Demetrio Cassarino b3db41c0ae -modificata gestione tasti su slider ora solo con destra/sinistra mentre su/giù mette il focus sul bottone preview 2026-03-06 11:24:11 +01:00
Dario Sassi ad21ccf4d8 Merge commit '29dd3ca6d42fd61a1f8315615a14181412dfc4b2' 2026-03-05 16:07:55 +01:00
Demetrio Cassarino 29dd3ca6d4 -piccola modifica al bottone previewtool 2026-03-05 16:06:54 +01:00
Demetrio Cassarino 2174bdfd20 Merge commit 'd28ac71a5e79d7c5038e4ffb7e402ee7fc0a549b' into features/ButtonPreview 2026-03-05 16:02:22 +01:00
Dario Sassi d28ac71a5e EgtCAM5 :
- piccoli ritocchi ai disegni per MachiningToolPreview.
2026-03-05 15:52:09 +01:00
Dario Sassi 1f92a28e44 Merge commit '3944eb085fcaae0278ab3c3a951045e997808361' 2026-03-05 15:26:36 +01:00
Demetrio Cassarino 3944eb085f -aggiornato pulsante visualizzazione tool con immagini 2026-03-05 12:19:21 +01:00
Dario Sassi 30b436c33b Merge commit 'd2f947b9b18849e47b5b77c015fea225e59f7aa9' 2026-03-05 12:12:48 +01:00
Demetrio Cassarino d2f947b9b1 -aggiornato in updatemachine visualizzazione corretta tool 2026-03-05 11:35:17 +01:00
Demetrio Cassarino 50c06fee70 Merge commit '265938c37f9b9a5c61da5157f5f60c9f74d0ac52' into features/ButtonPreview 2026-03-05 11:32:43 +01:00
Dario Sassi 265938c37f EgtCAM5 :
- correzione a MachiningPrevieTool nel caso di Update/Apply.
2026-03-05 11:17:45 +01:00
Dario Sassi 3d4cfc0eb8 Merge commit 'c5ddcff63f810dedc6fe57acfd64edac298f4f4a' 2026-03-05 10:08:30 +01:00
Demetrio Cassarino c5ddcff63f -sistemato errore su aggiorna macchina 2026-03-05 09:00:14 +01:00
Demetrio Cassarino dc7a3b78cd Merge commit '4147457b7d66c393119cab246288fa2cbbbf6457' into features/ButtonPreview 2026-03-05 08:42:21 +01:00
Dario Sassi 4147457b7d EgtCAM5 :
- correzione nel passaggio da Machining a Draw.
2026-03-05 08:11:40 +01:00
Dario Sassi f2d465ff14 Merge commit '3cac37cb0da6c974ca32899dadb544fc34b2609c' 2026-03-04 17:21:19 +01:00
Demetrio Cassarino 3cac37cb0d -aggiunto pulsante a 3 step per visualizzare l'utensile e la testa 2026-03-04 17:02:20 +01:00
Dario Sassi ffa0ce03bb EgtCAM5 3.1c1 :
- ricompilazione con cambio versione.
2026-03-03 18:37:24 +01:00
Dario Sassi 68063e5b39 EgtCAM5 :
- correzioni per visibilità di ReversePost toolbar.
2026-02-22 16:28:30 +01:00
Dario Sassi 18505bfa5d EgtCAM5 3.1b1 :
- correzioni a recupero nome da nota NcName di Gruppo di Lavoro per file di generazione e stima.
2026-02-19 11:30:36 +01:00
Dario Sassi a7999c4182 EgtCAM5 3.1a4 :
- ricompilazione con cambio versione.
2026-02-10 09:43:11 +01:00
Dario Sassi b0186d096f EgtCAM5 :
- miglioria nella gestione del rilascio istanza all'uscita.
2026-01-27 16:23:27 +01:00
Dario Sassi 6e5f917d6f EgtCAM5 :
- piccola miglioria nel log per indicare tutte le estensioni presenti.
2026-01-23 19:19:26 +01:00
Dario Sassi 5819bc4bf8 EgtCAM5 :
- in lavorazioni anteprima utensile migliorata gestione frecce avanti/indietro.
2026-01-21 16:00:10 +01:00
Dario Sassi dee67518e7 EgtCAM5 :
- correzione in gestione geometria selezionata per lavorazioni.
2026-01-21 13:28:39 +01:00
Dario Sassi 50f5e0528f Merge commit '08ea864a5e0a20abacc061e8ec962b9d42797da1' 2026-01-16 14:46:30 +01:00
Demetrio Cassarino 08ea864a5e EgtCAM5 3.1a3:
- sistemato grafica pulsanti special
- sistemato sfondo pulsanti popup
2026-01-16 14:44:14 +01:00
Dario Sassi 7a25e8d634 EgtCAM5 3.1a2 :
- aggiunta toolbar per ReversePost
- gestione protezione da licenza di Trimming e ReversePost
- aggiunte info su Window, Trimming e ReversePost in AboutBox.
2026-01-14 11:38:24 +01:00
Dario Sassi f4163dc818 EgtCAM5 :
- aggiunte toolbar per Window e per Trimming.
2026-01-13 20:19:02 +01:00
Dario Sassi 7beff98f1c EgtCAM5 :
- non viene inserito negli MRU degli script lua il file temporaneo ImmExecN.lua per esecuzione speciale con edit.
2026-01-08 10:41:04 +01:00
Dario Sassi 4a2928192d EgtCAM5 3.1a1 :
- ripristino versione nuova con correzione estensione CN (problema con disabilitazione più gruppi di lavoro).
2026-01-07 11:29:02 +01:00
Dario Sassi 1d32d9b634 EgtCAM5 2.7l3 :
- versione patch per COMI-ABB con correzione assegnazione estensione partprogram in generazione.
2026-01-07 11:24:22 +01:00
Dario Sassi 4a7f552db6 EgtCAM5 :
- piccola correzione in messaggio di AboutBox.
2026-01-02 19:16:19 +01:00
Dario Sassi f456fedda8 EgtCAM5 3.1a1 :
- ricompilazione con cambio major version.
2026-01-02 18:30:26 +01:00
Dario Sassi 084c4e01ed EgtCAM5 :
- modifiche per gestione selezione per colore.
2025-12-15 16:54:30 +01:00
Dario Sassi 8d20d1d071 EgtCAM5 2.7l2 :
- corretta assegnazione materiale per macchine marmo (STONE5)
- ora si controlla STONE5 e non più STONE.
2025-12-11 18:17:15 +01:00
Dario Sassi a3eae73a52 EgtCAM5 :
- migliorie e correzioni a Combo per Info.
2025-12-05 10:33:24 +01:00
Dario Sassi a821341706 EgtCAM5 :
- eliminato enorme rallentamento con selezione a Finestra da popup menù (con Shift era già veloce).
2025-12-04 17:51:21 +01:00
Dario Sassi 9946b15588 EgtCAM5 :
- correzione gestione ComboBox in input/modifica dati di entità.
2025-12-04 16:06:30 +01:00
Dario Sassi 4d610cea8b EgtCAM5 :
- sulla status bar in modalità Disegna aggiunta indicazione numero di entità selezionate (Sel : NNN)
- migliorie e correzioni a ExecuteWindow per caso di passaggio a Lavorazioni.
2025-12-03 18:45:00 +01:00
Dario Sassi 2648b704cc EgtCAM5 2.7l1 :
- piccoli aggiustamenti a ExecuteWindow.
2025-12-03 15:04:07 +01:00
Dario Sassi e59e8a051a Merge commit '9d8188521ee7a863e3b03c70b946db435c667e6b' 2025-12-03 11:40:55 +01:00
Demetrio Cassarino 9d8188521e -aggiunto finestra per esecuzione script lua 2025-12-02 12:36:00 +01:00
Dario Sassi 18de1a1ab7 Merge commit '0a7f87291265ab5ce05d06d9a6d2a7cfd999331f' 2025-11-24 14:33:30 +01:00
Demetrio Cassarino 0a7f872912 -aggiunto focus quando viene mostrata la textbox per inserire la info 2025-11-24 10:13:20 +01:00
Dario Sassi 84b2edd17a EgtCAM5 :
- piccola modifica in simulazione per gestire Flag=12 quasi come 11 (pausa richiesta da sotto).
2025-11-17 14:46:28 +01:00
Dario Sassi 7a8c883259 Merge commit '4f06a19553216a32731114b29b8f7ea5e61d9b22' 2025-11-10 12:15:01 +01:00
Demetrio Cassarino 4f06a19553 -aggiunto controllo su textbox e combobox su stessa info 2025-11-10 12:14:14 +01:00
Dario Sassi 3a7152066b Merge commit '2ce61cd5abfa06958f356ccea4ffad624acd7b8c' 2025-11-10 11:53:54 +01:00
Demetrio Cassarino 2ce61cd5ab -inserito controllo su terminazione stringa 2025-11-10 11:50:33 +01:00
Demetrio Cassarino 50ad698187 -implementato a capo quando viene inserito un testo oltre al valore della combobox 2025-11-10 11:46:04 +01:00
Dario Sassi 85591b39a7 Merge commit '18be9679c5562c309852bfeac06670dea4dfec66' 2025-11-10 11:22:14 +01:00
Demetrio Cassarino 18be9679c5 -sistemata gestione combobox info
-camboata visualizzazione info combobox
2025-11-10 10:26:28 +01:00
Demetrio Cassarino 2c9061619a Merge commit '575bcc02d0c676f3cb82f6b4f7694e03a59f7ac2' into features/AddGetAllInfo 2025-11-10 08:06:52 +01:00
Dario Sassi 575bcc02d0 EgtCAM5 :
- gestione metacomando da Info in PrepareInputBox.
2025-11-09 22:56:01 +01:00
Dario Sassi e965ceb26c EgtCAM5 :
- aggiunto controllo su vettore Info già presenti introdotto in precedente modifica.
2025-11-08 12:17:31 +01:00
Dario Sassi 0c18c822f1 Merge commit 'e6d85c573af905010347a23c874351c984d03529' 2025-11-07 17:01:36 +01:00
Demetrio Cassarino e6d85c573a -aggiornamento versione 2025-11-07 14:34:03 +01:00
Demetrio Cassarino 592e7161ce EgtCAM5 2.7k2
-aggiunto in inputexpander possibilità di visualizzare tutte le info presenti una combobox
2025-11-07 14:29:27 +01:00
Dario Sassi 08c4d9c7b9 EgtCAM5 :
- nell'ordine del TopTray il gruppo di bottoni Special è stato portato alla fine.
2025-11-02 11:10:41 +01:00
Dario Sassi 4ae5efb94b EgtCAM5 2.7k1 :
- possibilità di comandi speciali con indice non consecutivo (1-99 standard, 101-199 avanzati solo per utenti interni).
2025-10-31 15:32:00 +01:00
Dario Sassi 69261c7c73 EgtCAM5 2.7j2 :
- ricompilazione con cambio versione.
2025-10-31 09:19:58 +01:00
Dario Sassi 361dc20f9b EgtCAM5 :
- tolto import inutile.
2025-10-27 17:24:55 +01:00
Dario Sassi 95d1e4b5ac EgtCAM5 :
- in disposizione possibilità di modificare altezza sottopezzo (parametro Z di movimento grezzo).
2025-10-27 17:15:49 +01:00
Dario Sassi 621a31931c EgtCAM5 :
- piccole migliorie in dialogo disposizione.
2025-10-26 19:26:00 +01:00
Dario Sassi 4f7dd6ef17 EgtCAM5 :
- in ProcessEvents quando nPause vale -1 si forza un ridisegno.
2025-10-13 08:51:05 +02:00
Dario Sassi 722e0c243d EgtCAM5 2.7j1 :
- ricompilazione con cambio versione.
2025-10-11 12:41:47 +02:00
Dario Sassi 921e681759 EgtCAM5 :
- correzione gestione LinkType per sgrossature con lama.
2025-09-30 08:30:21 +02:00
Dario Sassi d065c0beeb EgtCAM5 2.7i2 :
- se macchina di tipo Stone ora possibile modifica in configurazione di parametri per archi con lama.
2025-09-29 10:54:12 +02:00
Dario Sassi f8ea19537a EgtCAM5 :
- gestione opzioni visualizzazione Zmap da interfaccia (solo per utenti interni ovvero UserLevel > 5).
2025-09-19 18:54:45 +02:00
Daniele Bariletti 289a6b1608 EgtCAM5 :
- aggiunta modalità bonus per analizza su una trimesh: visualizzazione del triangolo selezionato e del suo id.
2025-09-17 11:26:12 +02:00
Dario Sassi f6baeb6afc EgtCAM5 2.7i1 :
- piccola semplificazione per cambio font di default.
2025-09-11 15:24:19 +02:00
Dario Sassi 9fa231f68a EgtCAM5 :
- corretta impostazione all'avvio dello spessore delle linee.
2025-08-28 09:56:21 +02:00
Dario Sassi bba92a4980 EgtCAM5 :
- modifiche per impostazione qualità di visualizzazione superfici (con eliminazione SmoothTriMesh/ShowTriaAdv).
2025-08-24 19:18:58 +02:00
Dario Sassi cfaf513a91 EgtCAM5 2.7h1 :
- ricompilazione con cambio versione.
2025-08-01 09:56:27 +02:00
Dario Sassi 8d33111af2 Merge commit 'fd565e96cc9495985b0cb8fe57700b6f924c18da' 2025-08-01 08:32:05 +02:00
Demetrio Cassarino fd565e96cc -aggiunto campo combobox in note lavorazione 2025-07-31 15:32:38 +02:00
Dario Sassi b7628fff66 EgtCAM5 2.7g2 :
- aggiunto comando per creare curve di Bezier polinomiali di grado 3 con modalità simili ai BiArchi.
2025-07-21 13:12:35 +02:00
Dario Sassi cd3c90764e EgtCAM5 :
- in comandi disegno 2d separati bottoni Arc3R e Arc2PR e aggiunto bottone BiArc.
2025-07-18 18:46:23 +02:00
Dario Sassi 0db2ce6b91 EgtCAM5 2.7g1 :
- piccola correzione in simulazione per Trace.
2025-07-14 15:11:17 +02:00
Dario Sassi 993e7e86a2 EgtCAM5 2.7f2 :
- modifiche per aggiunta utensile di tipo Probe e lavorazione Probing.
2025-06-10 18:38:46 +02:00
Dario Sassi e335308709 EgtCAM5 2.7f1 :
- aggiunta in simulazione eventuale check per traccia utensile.
2025-06-08 19:26:48 +02:00
Dario Sassi 4c13cdb8f4 EgtCAM5 2.7e4 :
- sistemato messaggio segnalazione problema generico in aggiornamento lavorazioni.
2025-05-30 08:23:40 +02:00
Dario Sassi 9b06802cf9 EgtCAM5 2.7e3 :
- ricompilazione con cambio versione.
2025-05-25 18:51:56 +02:00
Demetrio Cassarino caf4fbcff9 -aggiunto flag 8 2025-05-22 15:13:09 +02:00
Demetrio Cassarino 218eeaffe8 -aggiunto flag 8 CheckNoSim per beamwall 2025-05-22 12:08:36 +02:00
Dario Sassi 03509c7022 EgtCAM5 2.7e2 :
- ricompilazione con cambio versione.
2025-05-21 18:51:05 +02:00
Dario Sassi 6a600e632d EgtCAM5 2.7e1 :
- gestione di un eventuale supporto del pezzo in disposizione.
2025-05-05 08:05:13 +02:00
Dario Sassi b866cd273e EgtCAM5 2.7d2 :
- aggiunti maggiori controlli in aggiornamento macchine.
2025-04-24 07:47:58 +02:00
Dario Sassi 7be4dd9c75 EgtCAM5 :
- aggiunta gestione estensione partprogram da file Ini di macchina ([PartProgram] Extension=.XXX).
2025-04-15 16:27:16 +02:00
Dario Sassi 1d156eddc1 EgtCAM5 :
- in lavorazioni quando si seleziona una faccia oltre al contorno in rosso si visualizza una sferetta sulla curva di indice 0
- eliminata gestione tipi "dr", "lr" e "sr" da Parametri Avanzati in UserNotes perchè inutili
- semplificato lancio Aggiornamento Lavorazioni tenendo conto delle modifiche fatte alle librerie sottostanti.
2025-04-07 12:01:25 +02:00
Dario Sassi 726afaa58d EgtCAM5 2.7d1 :
- in Finestra Opzioni aggiunto bottone aggiorna per Doors.
2025-04-03 16:05:59 +02:00
Dario Sassi d1592cce43 Merge commit 'dc6c075508ba6d26d04fa2c34a14364e73b8ac62' 2025-03-27 16:25:18 +01:00
Demetrio Cassarino dc6c075508 -sistemato accensione lampade su pulsante aggiorna 2025-03-27 16:20:24 +01:00
Dario Sassi f126f72c3b Merge commit '2735c66b11e13c5d7e7edd4fbdd5ce951ed20588' 2025-03-26 15:32:15 +01:00
Demetrio Cassarino 2735c66b11 -sistemato gestione lampadina da simulazione a operazioni 2025-03-26 15:05:43 +01:00
Dario Sassi a4b48377c7 Merge commit 'bc22e32821b4c425a30cca48868e20d88a0b554c' 2025-03-26 08:48:06 +01:00
Demetrio Cassarino bc22e32821 -aggiunto lampadina per lavorazioni per permettere la possbilità di spegnere la lavorazione 2025-03-26 08:24:39 +01:00
Dario Sassi 5624f05ad6 EgtCAM5 :
- eliminato Imports System.Windows.Forms.AxHost inutili (impedisce il riconoscimento della pressione del tasto CTRL in OnMouseSelectedPoint)
- corretta gestione marcatura oggetti su espansione albero entità.
2025-03-22 15:15:03 +01:00
Dario Sassi 0c68d8c142 EgtCAM5 :
- correzioni per ripristinare la selezione multipla di oggetti.
2025-03-22 11:03:11 +01:00
Dario Sassi e2480dcf1d EgtCAM5 2.7c2 :
- ricompilazione con cambio versione.
2025-03-21 19:06:29 +01:00
Dario Sassi cc63f278c6 Merge commit '54360bbccfcda35fbd2251b3ef6f2e3844d3cce4' 2025-03-21 18:55:50 +01:00
Demetrio Cassarino 54360bbccf -piccola modifca su inserimento note aggiunto ctrl+v 2025-03-21 11:15:44 +01:00
Demetrio Cassarino c71d7c84f7 Merge commit '9e9aad2eedf58f8dc9c14020f37af944aefc2e07' into feature/cw_ccw 2025-03-21 11:11:17 +01:00
Dario Sassi 9e9aad2eed EgtCAM5 :
- sistemata dipendenza nuova lavorazione 5assi da opzione chiave AdvancedMachinings.
2025-03-17 08:47:28 +01:00
Demetrio Cassarino a2a1b83888 Merge commit 'f44ae792c680605815a4359a0f9f3875e46ecda4' into feature/cw_ccw 2025-03-17 08:13:20 +01:00
Dario Sassi f44ae792c6 EgtCAM5 2.7c1 :
- modifica per esecuzione da Door con calcolo lavorazioni, simulazione e generazione CN (ora va in modalità Lavora).
2025-03-09 23:16:13 +01:00
Dario Sassi 4692bd0308 EgtCAM5 2.7b3 :
- modifiche varie per gestione import/insert del formato PLY.
2025-03-02 19:48:58 +01:00
Demetrio Cassarino 2e863c0ce2 Merge commit '34fa0909ab04096a26a602142ebd8b6bd6da80e5' into feature/cw_ccw 2025-02-10 12:49:54 +01:00
Emmanuele Sassi 1735e281e5 Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2025-02-06 10:42:57 +01:00
Emmanuele Sassi 125e7346d4 EgtCAM5 2.7b1 :
- Modifiche ad MTable
2025-02-06 10:42:23 +01:00
Emmanuele Sassi bd3cdf7ea0 - aggiunta selezione multipla su MTable
- aggiunto bottone link in MTable
- aggiunto sposta con salto in MTable
2025-02-06 10:38:07 +01:00
Dario Sassi d90a49248f EgtCAM5 :
-in disposizione attivato comando cancella grezzo.
2025-02-03 08:19:18 +01:00
Dario Sassi 3833b7c7c5 EgtCAM5 :
- in simulazione se programma minimizzato per velocizzare non si fa eseguire aggiornamento scena
- in disposizione sistemato conteggio bloccaggi utilizzati all'ingresso.
2025-02-02 13:05:31 +01:00
Dario Sassi 89b063b92f EgtCAM5 2.7a3 :
- in Disposizione modifiche per impostazione eventuale asse di tavola cui è agganciato il bloccaggio.
2025-01-31 16:15:20 +01:00
Dario Sassi df26bef2aa EgtCAM5 2.7a2 :
- piccola modifica per consentire di importare BTL con feature Variant definite tramite script lua.
2025-01-22 12:19:33 +01:00
Emmanuele Sassi 5cddbffb45 - aggiunta colonna link in Mtable 2025-01-20 10:31:02 +01:00
Dario Sassi 2daa33ba91 EgtCAM5 :
- aggiunto controllo validità oggetto nella gestione del tasto ESC.
2025-01-13 08:47:19 +01:00
Dario Sassi f83e8294bc EgtCAM5 2.7a1 :
- ricompilazione con cambio versione.
2025-01-10 17:30:29 +01:00
Dario Sassi 1dfc46e6ce Merge commit 'd7df513bf73ef06753dcb395cab2c2f1ff3b579f' 2025-01-10 16:46:11 +01:00
Demetrio Cassarino d7df513bf7 -aggiunto su selezione escape la possibilità di nascondere combobox note 2025-01-08 11:16:34 +01:00
Demetrio Cassarino 8aac3ea989 -aggiunto in errore macchina immagine di errrore 2024-12-19 11:52:20 +01:00
Demetrio Cassarino a514a70b5b Merge commit 'cf86b93725eb304415c0c3cd7ade9d2f6c8e404f' into feature/cw_ccw 2024-12-19 11:37:12 +01:00
Dario Sassi cf86b93725 EgtCAM5 2.6l3 :
- aggiunta gestione flag in import 3MF per mantenere la struttura gerarchica dei pezzi nel file (1) oppure no (0).
2024-12-17 10:27:24 +01:00
Dario Sassi fef104b371 EgtCAM5 2.6l1 :
- aggiunta gestione importazione formato OFF.
2024-11-29 19:00:25 +01:00
Dario Sassi afe756aada EgtCAM5 2.6k2 :
- ora al passaggio a LAVORA se c'è già un gruppo corrente si attiva quello, altrimenti il primo.
2024-11-20 19:56:07 +01:00
Demetrio Cassarino 34fa0909ab -aggiunto pulsante per info già presenti
-aggiunto selezione in scena e apertura in albero
-sitemato accensione luce
2024-11-20 08:10:50 +01:00
Demetrio Cassarino a662d1dca2 -aggiunto multi riga su info 2024-10-09 14:42:27 +02:00
Demetrio Cassarino e5a32f9c21 Merge remote-tracking branch 'origin/master' into feature/cw_ccw 2024-10-01 14:13:55 +02:00
155 changed files with 5255 additions and 3240 deletions
+19 -1
View File
@@ -30,7 +30,7 @@ Public Class AboutBoxWndV
" Inst" & IniFile.m_nInstance.ToString() &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "SupportPlane " & sAssStatus & Environment.NewLine
sInfo &= "SupportPlan " & sAssStatus & Environment.NewLine
sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
@@ -70,6 +70,24 @@ Public Class AboutBoxWndV
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
End If
If IniFile.IsActiveWindow() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sWindowDirPath, sVersion)
sInfo &= Environment.NewLine & "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
End If
If IniFile.IsActiveTrimming() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sTrimmingDirPath, sVersion)
sInfo &= Environment.NewLine & "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
End If
If IniFile.IsActiveReversePost() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sReversePostDirPath, sVersion)
sInfo &= Environment.NewLine & "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
End If
If IniFile.IsActiveGunStock() Then
bExtensions = True
Dim sVersion As String = "---"
+5 -4
View File
@@ -31,8 +31,8 @@ Public Class TreeViewItemBase
End Set
End Property
Private m_isExpanded As Boolean
Public Property IsExpanded As Boolean
Friend m_isExpanded As Boolean
Public Property IsExpanded As Boolean
Get
Return m_isExpanded
End Get
@@ -92,6 +92,7 @@ Public Class InheritableTreeViewItem
Implements INotifyPropertyChanged
Friend m_Name As String
Public Property Name As String
Get
Return m_Name
@@ -195,7 +196,6 @@ Public Class ParentItem
Inherits TreeViewItemBase
Private m_sPictureString As String
Private m_Items As ObservableCollection(Of ChildItem)
Public Property PictureString As String
Get
@@ -209,6 +209,7 @@ Public Class ParentItem
End Set
End Property
Private m_Items As ObservableCollection(Of ChildItem)
Public Property Items As ObservableCollection(Of ChildItem)
Get
Return m_Items
@@ -255,4 +256,4 @@ Public Class ChildItem
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
End Sub
End Class
End Class
@@ -13,7 +13,7 @@ Public Class BeamMachiningsWindowV
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.m_CloseWindow
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.OnCloseWindow
Me.DialogResult = bDialogResult
End Sub
+3
View File
@@ -51,6 +51,9 @@ Module ConstGen
' Chiave di Info in gruppo di lavoro per none part-program
Public Const KEY_MCHGRP_NCNAME As String = "NcName"
' File Dimensioni Griglia CAM5
Public Const DIMENSION_FILE_NAME As String = "Dimension.ini"
' Costante per flag di BBox
Public Const BBFLAG As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
+29 -6
View File
@@ -73,7 +73,7 @@ Module ConstIni
Public Const K_SELSURF As String = "SelSurf"
Public Const K_SHOWMODE As String = "ShowMode"
Public Const K_CURVEDIR As String = "CurveDir"
Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
Public Const K_SHOWSURFQUALITY As String = "ShowSurfQuality"
Public Const K_SHOWZMAP As String = "ShowZmap"
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
Public Const K_ZOOMWIN As String = "ZoomWin"
@@ -105,11 +105,15 @@ Module ConstIni
Public Const S_IMPORT As String = "Import"
Public Const K_DXFSCALE As String = "DxfScale"
Public Const K_STLSCALE As String = "StlScale"
Public Const K_OFFSCALE As String = "OffScale"
Public Const K_PLYSCALE As String = "PlyScale"
Public Const K_IMGSCALE As String = "ImgScale"
Public Const K_CNCFLAG As String = "CncFlag"
Public Const K_BTLFLAG As String = "BtlFlag"
Public Const K_BTLAUXDIR As String = "BtlAuxDir"
Public Const K_3MFFLAG As String = "3mfFlag"
Public Const K_ADVFLAG As String = "AdvFlag"
Public Const K_ADVTOLER As String = "AdvToler"
Public Const S_EXPORT As String = "Export"
Public Const K_DXFFLAG As String = "DxfFlag"
@@ -140,10 +144,6 @@ Module ConstIni
Public Const K_BEAMWALLBASEDIR As String = "BaseDir"
Public Const K_BEAMWALLBUTTON As String = "Button"
Public Const S_PRINTING3D As String = "3dPrinting"
Public Const K_ENABLE As String = "Enable"
Public Const K_3PRNBASEDIR As String = "BaseDir"
Public Const S_DOORS As String = "Doors"
Public Const K_DDFENABLE As String = "DdfEnable"
Public Const K_BASEDIR As String = "BaseDir"
@@ -155,6 +155,22 @@ Module ConstIni
Public Const K_TABLESDIR As String = "TablesDir"
Public Const K_CURRMTABLE As String = "CurrMTable"
Public Const K_MTABLEWINPLACE As String = "MTableWinPlace"
Public Const K_OPTIMIZEMACHFORLINE As String = "OptimizeMachForLine"
Public Const S_WINDOW As String = "Window"
Public Const K_WINDOWENABLE As String = "JwdEnable"
Public Const K_WINDOWBASEDIR As String = "BaseDir"
Public Const K_WINDOWBUTTON As String = "Button"
Public Const S_TRIMMING As String = "Trimming"
Public Const K_TRIMMINGENABLE As String = "TrimEnable"
Public Const K_TRIMMINGBASEDIR As String = "BaseDir"
Public Const K_TRIMMINGBUTTON As String = "Button"
Public Const S_REVERSEPOST As String = "ReversePost"
Public Const K_REVERSEPOSTENABLE As String = "RevEnable"
Public Const K_REVERSEPOSTBASEDIR As String = "BaseDir"
Public Const K_REVERSEPOSTBUTTON As String = "Button"
Public Const S_GUNSTOCK As String = "GunStock"
Public Const K_GUNSTOCKENABLE As String = "GsEnable"
@@ -184,7 +200,8 @@ Module ConstIni
Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing"
Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing"
Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling"
Public Const K_SELVMILLQUALITY As String = "VMillQuality"
Public Const K_SELGEOMPROBING As String = "SelGeomProbing"
Public Const K_VMILLQUALITY As String = "VMillQuality"
Public Const K_MACHININGGROUP As String = "MachiningGroup"
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
@@ -193,6 +210,7 @@ Module ConstIni
Public Const S_SIMUL As String = "Simul"
Public Const K_SLIDERX As String = "SliderX"
Public Const K_SLIDERVAL As String = "SliderVal"
Public Const K_TRACEENABLE As String = "TraceEnable"
Public Const S_OPTIONS As String = "Options"
Public Const K_NEWMACHININGISLASTONE As String = "NewMachiningIsLastOne"
@@ -205,4 +223,9 @@ Module ConstIni
Public Const S_MRUGUNSTOCKPEZ As String = "MruGunStockPez"
Public Const K_FILE As String = "File"
Public Const S_EXECUTEWINDOW As String = "ExecuteWindow"
Public Const K_LEFT As String = "Left"
Public Const K_TOP As String = "Top"
Public Const K_WIDTH As String = "Width"
Public Const K_HEIGHT As String = "Height"
End Module
+19 -14
View File
@@ -1,6 +1,13 @@
Module ConstMachIni
Public Const S_MCH_GENERAL As String = "General"
Public Const K_MATERIAL As String = "Material"
Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const K_EXTENSION As String = "Extension"
Public Const S_TOOLS As String = "Tools"
Public Const K_PROBE As String = "Probe"
Public Const K_DRILLBIT As String = "Drillbit"
Public Const K_SAWBLADE As String = "Sawblade"
Public Const K_MILL As String = "Mill"
@@ -8,22 +15,17 @@
Public Const K_CHISEL As String = "Chisel"
Public Const K_WATERJET As String = "WaterJet"
Public Const K_COMPO As String = "Compo"
Public Const K_SHOWTOOLCHANGER As String = "ShowToolChanger"
Public Const K_SHOWHEADEXIT As String = "ShowHeadExit"
Public Const K_DRILLHOLDER As String = "DrillHolder"
Public Const K_SAWBLADEHOLDER As String = "SawBladeHolder"
Public Const K_MILLHOLDER As String = "MillHolder"
Public Const K_DRILLMAKER As String = "DrillMaker"
Public Const K_SAWBLADEMAKER As String = "SawbladeMaker"
Public Const K_MILLMAKER As String = "MillMaker"
Public Const K_MORTISEMAKER As String = "MortiseMaker"
Public Const K_CHISELMAKER As String = "ChiselMaker"
Public Const K_MOUNTEDTOOLCONFIG As String = "MountedToolConfig"
Public Const K_ACTIVE As String = "Active"
Public Const S_TOOLHOLDER As String = "ToolHolder"
Public Const S_MACHININGS As String = "Machinings"
Public Const K_PROBING As String = "Probing"
Public Const K_SAWING As String = "Sawing"
Public Const K_DRILLING As String = "Drilling"
Public Const K_MILLING As String = "Milling"
@@ -37,18 +39,12 @@
Public Const K_SURFFINISHING As String = "SurfFinishing"
Public Const K_5AXMILLING As String = "5AxMilling"
Public Const K_WATERJETTING As String = "WaterJetting"
Public Const K_SAWINGONARCS As String = "SawingOnArcs"
Public Const S_GENMACHINING As String = "GenMachining"
Public Const K_GENSCRIPT As String = "GenScript"
Public Const S_TOOLCHANGER As String = "ToolChanger"
Public Const K_NUMBER As String = "Number"
Public Const K_POS As String = "Pos"
Public Const K_NAME As String = "Name"
Public Const K_MANUALNUMBER As String = "ManualNumber"
Public Const K_MANUALPOS As String = "ManualPos"
Public Const K_MANUALNAME As String = "ManualName"
Public Const S_5AXMILLING As String = "5AxMilling"
Public Const K_5AXSCRIPT As String = "5AxScript"
Public Const S_DISPOSITION As String = "Disposition"
Public Const K_DISP_INITSCRIPT As String = "InitScript"
@@ -68,7 +64,16 @@
Public Const S_VMILL As String = "VMill"
Public Const K_VM_ENABLE As String = "Enable"
Public Const S_TOOLTRACE As String = "ToolTrace"
Public Const K_TT_ENABLE As String = "Enable"
Public Const S_ESTIMATIONS As String = "Estimations"
Public Const K_EST_ENABLE As String = "Enable"
' Tipi di materiali previsti attualmente per le macchine
Public Const MCH_MAT_STONE As String = "Stone"
Public Const MCH_MAT_WOOD As String = "Wood"
Public Const MCH_MAT_BEAM As String = "Beam"
Public Const MCH_MAT_ADDITIVE As String = "Additive"
End Module
+1 -1
View File
@@ -11,7 +11,7 @@
m_CurrSetUpVM = CurrSetUpVM
End Sub
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.m_CloseWindow
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.OnCloseWindow
' Me.DialogResult = bDialogResult
'End Sub
@@ -0,0 +1,4 @@
Public Interface IListItemConverter
Function Convert(ByVal masterListItem As Object) As Object
Function ConvertBack(ByVal targetListItem As Object) As Object
End Interface
@@ -0,0 +1,80 @@
Imports System.Windows.Controls.Primitives
Imports System.ComponentModel
Public Class MultiSelectorBehaviours
Public Shared ReadOnly SynchronizedSelectedItemsProperty As DependencyProperty = DependencyProperty.RegisterAttached("SynchronizedSelectedItems", GetType(IList), GetType(MultiSelectorBehaviours), New PropertyMetadata(Nothing, AddressOf OnSynchronizedSelectedItemsChanged))
Public Shared ReadOnly SynchronizationManagerProperty As DependencyProperty = DependencyProperty.RegisterAttached("SynchronizationManager", GetType(SynchronizationManager), GetType(MultiSelectorBehaviours), New PropertyMetadata(Nothing))
Public Shared Function GetSynchronizedSelectedItems(ByVal dependencyObject As DependencyObject) As IList
Return CType(dependencyObject.GetValue(SynchronizedSelectedItemsProperty), IList)
End Function
Public Shared Sub SetSynchronizedSelectedItems(ByVal dependencyObject As DependencyObject, ByVal value As IList)
dependencyObject.SetValue(SynchronizedSelectedItemsProperty, value)
End Sub
Private Shared Function GetSynchronizationManager(ByVal dependencyObject As DependencyObject) As SynchronizationManager
Return CType(dependencyObject.GetValue(SynchronizationManagerProperty), SynchronizationManager)
End Function
Private Shared Sub SetSynchronizationManager(ByVal dependencyObject As DependencyObject, ByVal value As SynchronizationManager)
dependencyObject.SetValue(SynchronizationManagerProperty, value)
End Sub
Private Shared Sub OnSynchronizedSelectedItemsChanged(ByVal dependencyObject As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
If e.OldValue IsNot Nothing Then
Dim synchronizer As SynchronizationManager = GetSynchronizationManager(dependencyObject)
synchronizer.StopSynchronizing()
SetSynchronizationManager(dependencyObject, Nothing)
End If
Dim list As IList = TryCast(e.NewValue, IList)
Dim selector As Selector = TryCast(dependencyObject, Selector)
If list IsNot Nothing AndAlso selector IsNot Nothing Then
Dim synchronizer As SynchronizationManager = GetSynchronizationManager(dependencyObject)
If synchronizer Is Nothing Then
synchronizer = New SynchronizationManager(selector)
SetSynchronizationManager(dependencyObject, synchronizer)
End If
synchronizer.StartSynchronizingList()
End If
End Sub
Private Class SynchronizationManager
Private ReadOnly _multiSelector As Selector
Private _synchronizer As TwoListSynchronizer
Friend Sub New(ByVal selector As Selector)
_multiSelector = selector
End Sub
Public Sub StartSynchronizingList()
Dim list As IList = GetSynchronizedSelectedItems(_multiSelector)
If list IsNot Nothing Then
_synchronizer = New TwoListSynchronizer(GetSelectedItemsCollection(_multiSelector), list)
_synchronizer.StartSynchronizing()
End If
End Sub
Public Sub StopSynchronizing()
_synchronizer.StopSynchronizing()
End Sub
Public Shared Function GetSelectedItemsCollection(ByVal selector As Selector) As IList
If TypeOf selector Is MultiSelector Then
Return (TryCast(selector, MultiSelector)).SelectedItems
ElseIf TypeOf selector Is ListBox Then
Return (TryCast(selector, ListBox)).SelectedItems
Else
Throw New InvalidOperationException("Target object has no SelectedItems property to bind.")
End If
End Function
End Class
End Class
@@ -0,0 +1,163 @@
Imports System.Collections.Specialized
Public Class TwoListSynchronizer
Implements IWeakEventListener
Private Shared ReadOnly DefaultConverter As IListItemConverter = New DoNothingListItemConverter()
Private ReadOnly _masterList As IList
Private ReadOnly _masterTargetConverter As IListItemConverter
Private ReadOnly _targetList As IList
Public Sub New(ByVal masterList As IList, ByVal targetList As IList, ByVal masterTargetConverter As IListItemConverter)
_masterList = masterList
_targetList = targetList
_masterTargetConverter = masterTargetConverter
End Sub
Public Sub New(ByVal masterList As IList, ByVal targetList As IList)
Me.New(masterList, targetList, DefaultConverter)
End Sub
Private Delegate Sub ChangeListAction(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
Public Sub StartSynchronizing()
ListenForChangeEvents(_masterList)
ListenForChangeEvents(_targetList)
SetListValuesFromSource(_masterList, _targetList, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
If Not TargetAndMasterCollectionsAreEqual() Then
SetListValuesFromSource(_targetList, _masterList, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
End If
End Sub
Public Sub StopSynchronizing()
StopListeningForChangeEvents(_masterList)
StopListeningForChangeEvents(_targetList)
End Sub
Public Function ReceiveWeakEvent(ByVal managerType As Type, ByVal sender As Object, ByVal e As EventArgs) As Boolean Implements IWeakEventListener.ReceiveWeakEvent
HandleCollectionChanged(TryCast(sender, IList), TryCast(e, NotifyCollectionChangedEventArgs))
Return True
End Function
Protected Sub ListenForChangeEvents(ByVal list As IList)
If TypeOf list Is INotifyCollectionChanged Then
CollectionChangedEventManager.AddListener(TryCast(list, INotifyCollectionChanged), Me)
End If
End Sub
Protected Sub StopListeningForChangeEvents(ByVal list As IList)
If TypeOf list Is INotifyCollectionChanged Then
CollectionChangedEventManager.RemoveListener(TryCast(list, INotifyCollectionChanged), Me)
End If
End Sub
Private Sub AddItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
Dim itemCount As Integer = e.NewItems.Count
For i As Integer = 0 To itemCount - 1
Dim insertionPoint As Integer = e.NewStartingIndex + i
If insertionPoint > list.Count Then
list.Add(converter(e.NewItems(i)))
Else
list.Insert(insertionPoint, converter(e.NewItems(i)))
End If
Next
End Sub
Private Function ConvertFromMasterToTarget(ByVal masterListItem As Object) As Object
Return If(_masterTargetConverter Is Nothing, masterListItem, _masterTargetConverter.Convert(masterListItem))
End Function
Private Function ConvertFromTargetToMaster(ByVal targetListItem As Object) As Object
Return If(_masterTargetConverter Is Nothing, targetListItem, _masterTargetConverter.ConvertBack(targetListItem))
End Function
Private Sub HandleCollectionChanged(ByVal sender As Object, ByVal e As NotifyCollectionChangedEventArgs)
Dim sourceList As IList = TryCast(sender, IList)
Select Case e.Action
Case NotifyCollectionChangedAction.Add
PerformActionOnAllLists(AddressOf AddItems, sourceList, e)
Case NotifyCollectionChangedAction.Move
PerformActionOnAllLists(AddressOf MoveItems, sourceList, e)
Case NotifyCollectionChangedAction.Remove
PerformActionOnAllLists(AddressOf RemoveItems, sourceList, e)
Case NotifyCollectionChangedAction.Replace
PerformActionOnAllLists(AddressOf ReplaceItems, sourceList, e)
Case NotifyCollectionChangedAction.Reset
UpdateListsFromSource(TryCast(sender, IList))
Case Else
End Select
End Sub
Private Sub MoveItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
RemoveItems(list, e, converter)
AddItems(list, e, converter)
End Sub
Private Sub PerformActionOnAllLists(ByVal action As ChangeListAction, ByVal sourceList As IList, ByVal collectionChangedArgs As NotifyCollectionChangedEventArgs)
If sourceList Is _masterList Then
PerformActionOnList(_targetList, action, collectionChangedArgs, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
Else
PerformActionOnList(_masterList, action, collectionChangedArgs, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
End If
End Sub
Private Sub PerformActionOnList(ByVal list As IList, ByVal action As ChangeListAction, ByVal collectionChangedArgs As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
StopListeningForChangeEvents(list)
action(list, collectionChangedArgs, converter)
ListenForChangeEvents(list)
End Sub
Private Sub RemoveItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
If e.OldItems.Count = 1 AndAlso e.OldStartingIndex <= list.Count - 1 Then
list.RemoveAt(e.OldStartingIndex)
Else
For Each Item In e.OldItems
list.Remove(Item)
Next
End If
End Sub
Private Sub ReplaceItems(ByVal list As IList, ByVal e As NotifyCollectionChangedEventArgs, ByVal converter As Converter(Of Object, Object))
RemoveItems(list, e, converter)
AddItems(list, e, converter)
End Sub
Private Sub SetListValuesFromSource(ByVal sourceList As IList, ByVal targetList As IList, ByVal converter As Converter(Of Object, Object))
StopListeningForChangeEvents(targetList)
targetList.Clear()
For Each o As Object In sourceList
targetList.Add(converter(o))
Next
ListenForChangeEvents(targetList)
End Sub
Private Function TargetAndMasterCollectionsAreEqual() As Boolean
Return _masterList.Cast(Of Object)().SequenceEqual(_targetList.Cast(Of Object)().[Select](Function(item) ConvertFromTargetToMaster(item)))
End Function
Private Sub UpdateListsFromSource(ByVal sourceList As IList)
If sourceList Is _masterList Then
SetListValuesFromSource(_masterList, _targetList, New Converter(Of Object, Object)(AddressOf ConvertFromMasterToTarget))
Else
SetListValuesFromSource(_targetList, _masterList, New Converter(Of Object, Object)(AddressOf ConvertFromTargetToMaster))
End If
End Sub
Friend Class DoNothingListItemConverter
Implements IListItemConverter
Public Function Convert(ByVal masterListItem As Object) As Object Implements IListItemConverter.Convert
Return masterListItem
End Function
Public Function ConvertBack(ByVal targetListItem As Object) As Object Implements IListItemConverter.ConvertBack
Return targetListItem
End Function
End Class
End Class
+186 -340
View File
@@ -9,157 +9,102 @@
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Expander Name="Draw2D" Style="{StaticResource ExpanderStyle}" Grid.Row="0"
IsExpanded="{Binding Draw2DIsExpanded}">
IsExpanded="{Binding Draw2DIsExpanded}">
<Expander.Header>
<TextBlock Text="{Binding Draw2DMsg}"/>
</Expander.Header>
<UniformGrid Columns="3">
<Button x:Name="PuntoBtn" ToolTip="Punto" Style="{StaticResource DrawPanelButton}"
Command="{Binding PointBaseCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Point+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Vettore" Style="{StaticResource DrawPanelButton}"
Command="{Binding PointVectorCommand}">
<Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Riferimento" Style="{StaticResource DrawPanelButton}"
Command="{Binding PointReferenceCommand}">
<Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding PointToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding PointCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Linea 2 Punti" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Line2PBaseCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Line2P+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Linea 2 Punti con Continuazione" Style="{StaticResource DrawPanelButton}"
Command="{Binding Line2PContinuationCommand}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding Line2PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Line2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Linea Punto Direzione Lunghezza" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding LinePDLBaseCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinePDL+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Linea Punto Vettore Direzione Lunghezza" Style="{StaticResource DrawPanelButton}"
Command="{Binding LinePDLVectorCommand}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding LinePDLToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding LinePDLCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinePDL.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcCSE.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Arc2PRToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Arc2PRCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Arc2PR.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Arc3P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Arco " Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcPDP+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Linea Punto Vettore Direzione Lunghezza" Style="{StaticResource DrawPanelButton}"
Command="{Binding LinePDLVectorCommand}">
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding ArcPDPToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
<Button ToolTip="{Binding BiArcToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding BiArcCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/BiArc.png" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/>
<Button ToolTip="{Binding CircleCPToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Circle3PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Circle3PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Rectangle2PCommand}" IsEnabled="{Binding bLayerOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding Rectangle2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Rectangle2P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding PolygonToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding PolygonCommand}" IsEnabled="{Binding bLayerOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding PolygonCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Polygon.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding PolygonSideToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Quota Lineare" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding LinearDimensionBaseCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinearDimension+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Quota Allineata" Style="{StaticResource DrawPanelButton}"
Command="{Binding AlignedDimensionCommand}">
<Image Source="/Resources/DrawPanel/LinearDimension.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding LinearDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding LinearDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinearDimension.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Quota Angolare" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding AngularDimensionBaseCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/AngularDimension +.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Quota Angolare Avanzata" Style="{StaticResource DrawPanelButton}"
Command="{Binding AlignedDimensionPlusCommand}">
<Image Source="/Resources/DrawPanel/AngularDimension.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding AngularDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding AngularDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/AngularDimension.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Quota Diametrale" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding DiamDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/DiametralDimension+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Quota Radiale" Style="{StaticResource DrawPanelButton}"
Command="{Binding RadDimensionCommand}">
<Image Source="/Resources/DrawPanel/DiametralDimension.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding DiamRadDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding DiamRadDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/DiametralDimension.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Testo" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding TextBaseCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Text+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Testo Avanzato" Style="{StaticResource DrawPanelButton}"
Command="{Binding TextPlusCommand}">
<Image Source="/Resources/DrawPanel/TextA.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding TextToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding TextCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
@@ -169,135 +114,95 @@
<TextBlock Text="{Binding Draw3DMsg}"/>
</Expander.Header>
<UniformGrid Columns="3">
<Button ToolTip="Piano Contornato" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding FloorCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Plane+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Regione Piana" Style="{StaticResource DrawPanelButton}"
Command="{Binding RegionCommand}">
<Image Source="/Resources/DrawPanel/Plane.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding PlaneToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding PlaneCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Plane.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtrudeToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtrudeCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtrudeCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Extrude.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RevolveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding RevolveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding RevolveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Revolve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ScrewToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ScrewCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ScrewCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Screw.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding SweptToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SweptCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding SweptCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Swept.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RuledToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding RuledCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding RuledCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Ruled.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding SolidAddSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SolidAddSurfCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding SolidAddSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidAddSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Sottrai Superfici e Regioni Piane" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SubtractSurfacesCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidSubtractSurf+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Taglia Superficie con Superficie Inversa" Style="{StaticResource DrawPanelButton}"
Command="{Binding CutSurfacesCommand}">
<Image Source="/Resources/DrawPanel/SolidSubtractSurf.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding SolidSubtractSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SolidSubtractSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidSubtractSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Interseca Superfici e Regioni Piane" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding IntersectSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidIntersectSurf+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Taglia Superficie con Superficie" Style="{StaticResource DrawPanelButton}"
Command="{Binding CutSurfCommand}">
<Image Source="/Resources/DrawPanel/SolidIntersectSurf.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding SolidIntersectSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SolidIntersectSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidIntersectSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding IntersectSurfSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding IntersectSurfSurfCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding IntersectSurfSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/IntersectSurfSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtractLoopsToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractLoopsCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractLoopsCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractLoops.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtractFacetLoopsToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractFacetLoopsCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractFacetLoopsCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractFacetLoops.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Esplodi Superfici e Regioni Piane" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExplodeSurfaceCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeSurf+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Esplodi Superfici Mesh in Triangoli" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExplodeSurfaceMeshCommand}">
<Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding ExplodeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExplodeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtractSurfFacetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractSurfFacetCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractSurfFacetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractSurfFacet.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding MergeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MergeSurfCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding MergeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/MergeSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding InvertSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ApproxSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Muovi Vertice di Superficie" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveStmVertexCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/StmMoveVertex+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Muovi Faccia di Superficie" Style="{StaticResource DrawPanelButton}"
Command="{Binding MoveStmFacetCommand}">
<Image Source="/Resources/DrawPanel/StmMoveVertex.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding StmMoveVertexFacetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveStmVertexFacetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/StmMoveVertex.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
@@ -307,22 +212,14 @@
</Expander.Header>
<UniformGrid Columns="3">
<Button ToolTip="{Binding DeleteToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Cambia Layer" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeLayerBaseCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Cambia Layer con Trasformazioni" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeLayerTrasfCommand}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding ChangeLayerToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeStatusToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
@@ -330,159 +227,108 @@
<Image Source="/Resources/DrawPanel/ChangeStatus.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeColorToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeColor.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeAlphaToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeAlphaCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeAlphaCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeColorAlpha.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ResetColorToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ResetColorCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ResetColorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemoveColor.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding InvertCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding InvertCurveCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding InvertCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeStartToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeStartCurveCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeStartCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ThickCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtendCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtendCurveCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtendCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtendCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding BreakCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding BreakCurveCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding BreakCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/BreakCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding SplitCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding SplitCurveCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding SplitCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SplitCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExplodeCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExplodeCurveCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ExplodeCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Unisci Curve" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding JoinCurveBasCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/JoinCurve+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Unisci Curve creando una Copia" Style="{StaticResource DrawPanelButton}"
Command="{Binding JoinCurveCopyCommand}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Fondi Curve nella Composita" Style="{StaticResource DrawPanelButton}"
Command="{Binding JoinCurveCompositeCommand}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding JoinCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding JoinCurveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Offset.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding FilletToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding FilletCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding FilletCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Fillet.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChamferToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChamferCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChamferCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Arco Capovolto" Style="{StaticResource DrawPanelButton}"
Command="{Binding UpsideDownArchCommand}" ToolTipService.ShowOnDisabled="True" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ArcFlip+.png" Stretch="Uniform"/>
<Button.ContextMenu >
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Arco Esplementare" Style="{StaticResource DrawPanelButton}"
Command="{Binding ComplementaryArchCommand}">
<Image Source="/Resources/DrawPanel/ArcFlip.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
<Button ToolTip="{Binding ArcFlipToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcFlipCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ArcFlip.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ModifyCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyCurveCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Aggiungi Punto" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding AddPointCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/AddPointCurve+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Trasforma in Arco" Style="{StaticResource DrawPanelButton}"
Command="{Binding TrasformArcCommand}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Chiudi Curva Composita" Style="{StaticResource DrawPanelButton}"
Command="{Binding CloseCurveCommand}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="Rimuovi Punto" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding RemoveCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemovePointCurve+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Trasforma in Retta" Style="{StaticResource DrawPanelButton}"
Command="{Binding TrasformRectCommand}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="Apri Curva Composita" Style="{StaticResource DrawPanelButton}"
Command="{Binding OpenCurveCommand}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="Approssima Curva" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ApproxCurveBaseCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxCurve+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Approssima Curva con Linee" Style="{StaticResource DrawPanelButton}"
Command="{Binding ApproxCurveLineCommand}">
<Image Source="/Resources/DrawPanel/ApproxCurve.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding AddPointCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding AddPointCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RemovePointCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding RemovePointCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ApproxCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ApproxCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ModifyArcRadiusToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyArcRadiusCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyArcRadiusCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ModifyArcRadius.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ModifyTextToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyTextCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyTextCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ModifyText.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
@@ -493,8 +339,8 @@
</Expander.Header>
<UniformGrid Columns="3">
<Button ToolTip="{Binding MoveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource DrawPanelButton}"
@@ -502,33 +348,33 @@
<Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/>
<Button ToolTip="{Binding RotateToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding RotateCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding RotateCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding MirrorToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MirrorCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding MirrorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ScaleToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ScaleCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding ScaleCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Rotate3DToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Rotate3DCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding Rotate3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Rotate3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Mirror3DToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Mirror3DCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding Mirror3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Scale3DToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Scale3DCommand}" IsEnabled="{Binding bSelOk}">
ToolTipService.ShowOnDisabled="True"
Command="{Binding Scale3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale3D.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
+93 -1035
View File
File diff suppressed because it is too large Load Diff
+51 -49
View File
@@ -161,6 +161,13 @@
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
</Compile>
<Compile Include="CurrSetUp\CurrSetUpVM.vb" />
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
<Compile Include="ExecuteWindow\ExecuteWindowV.xaml.vb">
<DependentUpon>ExecuteWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="ExecuteWindow\ExecuteWindowVM.vb" />
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
<DependentUpon>LeftTrayV.xaml</DependentUpon>
</Compile>
@@ -170,6 +177,9 @@
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpander.vb" />
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\ProbingParameterExpanderV.xaml.vb">
<DependentUpon>ProbingParameterExpanderV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\FiveAxisMachinigParameterExpanderV.xaml.vb">
<DependentUpon>FiveAxisMachinigParameterExpanderV.xaml</DependentUpon>
</Compile>
@@ -283,8 +293,20 @@
<Compile Include="Special-BeamWall\WallPanelV.xaml.vb">
<DependentUpon>WallPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
<Compile Include="Special-BeamWall\Wall.vb" />
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
<Compile Include="Special-ReversePost\ReversePostPanelV.xaml.vb">
<DependentUpon>ReversePostPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-ReversePost\ReversePostPanelVM.vb" />
<Compile Include="Special-Trimming\TrimmingPanelV.xaml.vb">
<DependentUpon>TrimmingPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-Trimming\TrimmingPanelVM.vb" />
<Compile Include="Special-Window\WindowPanelV.xaml.vb">
<DependentUpon>WindowPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-Window\WindowPanelVM.vb" />
<Compile Include="SpecialPanel\SpecialPanelV.xaml.vb">
<DependentUpon>SpecialPanelV.xaml</DependentUpon>
</Compile>
@@ -300,6 +322,7 @@
<Compile Include="Utility\Analyze.vb" />
<Compile Include="Utility\BasePanelVM.vb" />
<Compile Include="Utility\BindingProxy.vb" />
<Compile Include="Utility\DynamicGridModule.vb" />
<Compile Include="Utility\Map.vb" />
<Compile Include="Internals\MruList.vb" />
<Compile Include="Utility\MachineModel.vb" />
@@ -379,6 +402,7 @@
</Compile>
<Compile Include="PopUpViewPanel\PopUpViewPanelVM.vb" />
<Compile Include="Utility\SelData.vb" />
<Compile Include="Utility\WindowStateBehavior.vb" />
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
<DependentUpon>ViewPanelV.xaml</DependentUpon>
</Compile>
@@ -460,6 +484,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ExecuteWindow\ExecuteWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LeftTray\LeftTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -472,6 +500,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\ProbingParameterExpanderV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\FiveAxisMachinigParameterExpanderV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -624,6 +656,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-ReversePost\ReversePostPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-Trimming\TrimmingPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-Window\WindowPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SpecialPanel\SpecialPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -1036,64 +1080,22 @@
<Resource Include="Resources\DrawPanel\StmMoveVertex.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Point+.png" />
<Resource Include="Resources\DrawPanel\Arc2PR.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Line2P+.png" />
<Resource Include="Resources\DrawPanel\BiArc.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\LinePDL+.png" />
<Resource Include="Resources\ExecuteWindow\reload.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ArcPDP+.png" />
<Resource Include="Resources\ToolPreview\Head.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Text+.png" />
<Resource Include="Resources\ToolPreview\Tool.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\TextA.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ArcFlip+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\LinearDimension+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\AngularDimension +.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\DiametralDimension+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Plane+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\SolidSubtractSurf+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\SolidIntersectSurf+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ExplodeSurf+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\StmMoveVertex+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ChangeLayer+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\JoinCurve+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\AddPointCurve+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\RemovePointCurve+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ApproxCurve+.png" />
<Resource Include="Resources\ToolPreview\Delete.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
+1 -1
View File
@@ -6,7 +6,7 @@
<StackPanel Orientation="Horizontal">
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom">
Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom">
<Button.ContextMenu>
<ContextMenu ItemsSource="{Binding MruScriptNames}" ItemContainerStyle="{StaticResource MruScriptItem}">
</ContextMenu>
+7 -2
View File
@@ -65,8 +65,13 @@ Public Class ExecutePanelVM
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Exec(ByVal param As Object)
Map.refProjectVM.PreExecScript(True)
Map.refProjectVM.ExecScript(String.Empty)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Dim ExecuteWindow As New ExecuteWindowV(Application.Current.MainWindow, New ExecuteWindowVM)
ExecuteWindow.ShowDialog()
Else
Map.refProjectVM.PreExecScript(True)
Map.refProjectVM.ExecScript(String.Empty)
End If
End Sub
#End Region ' ExecCommand
+41
View File
@@ -0,0 +1,41 @@
<EgtWPFLib5:EgtCustomWindow x:Class="ExecuteWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="Execute Window"
Height="500" Width="600"
IsResizable="True"
IsMinimizable="False"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
TitleBarHeight="32"
PreviewKeyDown="EgtCustomWindow_PreviewKeyDown"
EgtCAM5:WindowStateIniBehavior.PersistenceKey="Dimension"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding sScriptText}"
Style="{StaticResource ExecuteWindow_TextBox}"/>
<Button Grid.Row="1"
Grid.ColumnSpan="2"
Content="{Binding OkMsg}"
Command="{Binding Ok_Command}"
Style="{StaticResource EgtCAM5_InputButton}"
Margin="0,5,0,10"/>
<Button Grid.Column="1"
Command="{Binding Reload_Command}"
IsEnabled="{Binding bReload_IsEnable}"
Style="{StaticResource ExecuteWindow_Button}">
<Image Source="/Resources/ExecuteWindow/reload.png" Stretch="Uniform"/>
</Button>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
+32
View File
@@ -0,0 +1,32 @@
Public Class ExecuteWindowV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_ExecuteWindowVM As ExecuteWindowVM
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(Owner As Window, ExecuteWindowVM As ExecuteWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ExecuteWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ExecuteWindowVM = ExecuteWindowVM
End Sub
#End Region ' Constructor
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ExecuteWindowVM.OnCloseWindow
Me.DialogResult = bDialogResult
End Sub
Private Sub EgtCustomWindow_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If e.Key = Key.Escape Then
Me.Close()
End If
End Sub
End Class
+130
View File
@@ -0,0 +1,130 @@
Imports System.Text
Imports EgtUILib
Imports System.IO
Public Class ExecuteWindowVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
' Evento per chiusura finestra
Friend Event OnCloseWindow(bDialogResult As Boolean)
Private ReadOnly sScriptFilePath As String = Path.Combine(IniFile.m_sTempDir, "ImmExec" & IniFile.m_nInstance.ToString() & ".lua")
Private m_sScriptText As String
Public Property sScriptText As String
Get
Return m_sScriptText
End Get
Set(value As String)
m_sScriptText = value
NotifyPropertyChanged(NameOf(sScriptText))
End Set
End Property
Private Sub SetScriptFile(value As String)
m_sScriptText = value
NotifyPropertyChanged(NameOf(sScriptText))
End Sub
Private m_bReload_IsEnable As Boolean = File.Exists(sScriptFilePath)
Public ReadOnly Property bReload_IsEnable As Boolean
Get
Return m_bReload_IsEnable
End Get
End Property
#Region "Messages"
Public ReadOnly Property OkMsg As String
Get
Return EgtMsg(20041)
End Get
End Property
Public ReadOnly Property SaveMsg As String
Get
Return EgtMsg(6453)
End Get
End Property
#End Region ' Messages
' Definizione Comandi
Private m_cmdOk As ICommand
Private m_cmdReload As ICommand
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
End Sub
#End Region ' Constructor
#Region "METHODS"
Private Sub SaveScript(sPathFileScript As String, sScriptText As String)
If String.IsNullOrWhiteSpace(sPathFileScript) OrElse String.IsNullOrWhiteSpace(sScriptText) Then Return
File.WriteAllText(sPathFileScript, sScriptText, Encoding.UTF8)
End Sub
Private Function ReadScript(sPathFileScript As String) As String
If String.IsNullOrWhiteSpace(sPathFileScript) Then Return String.Empty
Return File.ReadAllText(sPathFileScript)
End Function
#End Region ' Methods
#Region "COMMANDS"
#Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
' Verifico ci sia del testo
If String.IsNullOrWhiteSpace(m_sScriptText) Then Return
' Salva il file script
SaveScript(sScriptFilePath, m_sScriptText)
' Esegue il file script
Map.refProjectVM.PreExecScript(False)
Map.refProjectVM.ExecScript(sScriptFilePath)
' Se non passato a lavorazione, aggiornamento visualizzazione
If IniFile.m_ProjectMode <> ProjectModeOpt.MACHINING Then EgtDraw()
' Chiudo finestra
RaiseEvent OnCloseWindow(True)
End Sub
#End Region ' Ok_Command
#Region "Reload_Command"
Public ReadOnly Property Reload_Command As ICommand
Get
If m_cmdReload Is Nothing Then
m_cmdReload = New Command(AddressOf Reload)
End If
Return m_cmdReload
End Get
End Property
Public Sub Reload()
If File.Exists(sScriptFilePath) Then
SetScriptFile(ReadScript(sScriptFilePath))
End If
End Sub
#End Region ' Reload_Command
#End Region ' Commands
End Class
+2 -1
View File
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
DockPanel.Dock="Left">
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
</Grid>
+15 -13
View File
@@ -2,7 +2,6 @@
Imports System.IO
Imports EgtCAM5.MyMachinePanelVM
Imports System.Security.Cryptography
Imports System.Windows.Forms.AxHost
Imports EgtUILib
Imports EgtWPFLib5
@@ -98,20 +97,23 @@ Public Class MyMachGroupPanelVM
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
Else
Else
Return -2
End If
End If
' Se non ci sono pezzi selezionati
' Se non ci sono pezzi selezionati
Else
' se ci sono gruppi di lavorazione
If bMachGroup Then
nGroupId = EgtGetFirstMachGroup()
nGroupId = EgtGetCurrMachGroup()
If nGroupId = GDB_ID.NULL Then
nGroupId = EgtGetFirstMachGroup()
End If
Return If(EgtSetCurrMachGroup(nGroupId), 0, 1)
' se altrimenti ammessi gruppi di lavoro vuoti
' se altrimenti ammessi gruppi di lavoro vuoti
ElseIf bAllowEmpty Then
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
' altrimenti esco
' altrimenti esco
Else
Return -1
End If
@@ -309,19 +311,19 @@ Public Class MyMachGroupPanelVM
End Sub
Private Sub LoadMaterialType()
Dim sMatType As String = "Wood"
Dim sMatType As String = MCH_MAT_WOOD
' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name
' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini"
Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath
EgtUILib.GetPrivateProfileString(S_GENERAL, EgtWPFLib5.EstConstMachIni.K_MATERIAL, sMatType, sMatType, sMachineIniPath)
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, sMatType, sMatType, sMachineIniPath)
Select Case sMatType
Case "Stone"
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE
Case "Wood"
Case MCH_MAT_STONE
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE5
Case MCH_MAT_WOOD
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
Case "Beam"
Case MCH_MAT_BEAM
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM
Case "Additive"
Case MCH_MAT_ADDITIVE
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
Case Else
' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore
+18 -6
View File
@@ -16,10 +16,8 @@
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="40*"/>
<ColumnDefinition Width="20*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -28,6 +26,8 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5">
@@ -57,12 +57,24 @@
</ComboBox>
</UniformGrid>
<UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5">
<UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5"
Visibility="{Binding StoneVisibility}">
<TextBlock Text="{Binding ExtSawArcMinRadMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ExtSawArcMinRad}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="5" Columns="2" Margin="0,0,0,5"
Visibility="{Binding StoneVisibility}">
<TextBlock Text="{Binding IntSawArcMaxSideAngMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding IntSawArcMaxSideAng}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="6" Columns="2" Margin="0,0,0,5">
<TextBlock Text="{Binding ApproxLinTolMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ApproxLinTol}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="5" Columns="2">
<UniformGrid Grid.Row="7" Columns="2">
<TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0"
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
+83 -20
View File
@@ -1,5 +1,6 @@
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Public Class MachOptionVM
@@ -48,21 +49,6 @@ Public Class MachOptionVM
End Set
End Property
Private m_sApproxLinTol As String
Public Property ApproxLinTol As String
Get
Return m_sApproxLinTol
End Get
Set(value As String)
Dim dApproxLinTol As Double = 0
If StringToLen(value, dApproxLinTol) Then
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
EgtMdbSave()
m_sApproxLinTol = value
End If
End Set
End Property
Private m_SplitArcsList As New List(Of MCH_SA)({MCH_SA.NEVER, MCH_SA.GEN_PLANE, MCH_SA.NO_XY_PLANE, MCH_SA.ALWAYS})
Public ReadOnly Property SplitArcsList As List(Of MCH_SA)
Get
@@ -82,6 +68,51 @@ Public Class MachOptionVM
End Set
End Property
Private m_sExtSawArcMinRad As String
Public Property ExtSawArcMinRad As String
Get
Return m_sExtSawArcMinRad
End Get
Set(value As String)
Dim dExtSawArcMinRad As Double = 0
If StringToLen(value, dExtSawArcMinRad) Then
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dExtSawArcMinRad)
EgtMdbSave()
m_sExtSawArcMinRad = value
End If
End Set
End Property
Private m_sIntSawArcMaxSideAng As String
Public Property IntSawArcMaxSideAng As String
Get
Return m_sIntSawArcMaxSideAng
End Get
Set(value As String)
Dim dIntSawArcMaxSideAng As Double = 0
If StringToLen(value, dIntSawArcMaxSideAng) Then
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dIntSawArcMaxSideAng)
EgtMdbSave()
m_sIntSawArcMaxSideAng = value
End If
End Set
End Property
Private m_sApproxLinTol As String
Public Property ApproxLinTol As String
Get
Return m_sApproxLinTol
End Get
Set(value As String)
Dim dApproxLinTol As Double = 0
If StringToLen(value, dApproxLinTol) Then
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
EgtMdbSave()
m_sApproxLinTol = value
End If
End Set
End Property
Private m_ArchivedSetUpList As New List(Of String)
Public Property ArchivedSetUpList As List(Of String)
Get
@@ -121,11 +152,6 @@ Public Class MachOptionVM
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9)
End Get
End Property
Public ReadOnly Property ApproxLinTolMsg As String
Get
Return EgtMsg(6410) ' Tolleranza di approssimazione
End Get
End Property
Public ReadOnly Property SplitArcsMsg As String
Get
@@ -133,6 +159,24 @@ Public Class MachOptionVM
End Get
End Property
Public ReadOnly Property ExtSawArcMinRadMsg As String
Get
Return EgtMsg(6411) ' Minimo raggio arco esterno con lama
End Get
End Property
Public ReadOnly Property IntSawArcMaxSideAngMsg As String
Get
Return EgtMsg(6412) ' Massima inclinazione arco interno con lama
End Get
End Property
Public ReadOnly Property ApproxLinTolMsg As String
Get
Return EgtMsg(6410) ' Tolleranza di approssimazione
End Get
End Property
Public ReadOnly Property DefaultSetUpMsg As String
Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
@@ -161,6 +205,14 @@ Public Class MachOptionVM
Dim nVal As Integer = 0
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
' Leggo minimo raggio arco esterno lavorabile con lama
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
m_sExtSawArcMinRad = LenToString(dVal, 4)
' Leggo massima inclinazione lama per lavorare archi interni
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
m_sIntSawArcMaxSideAng = LenToString(dVal, 4)
' Leggo tolleranza lineare di approssimazione
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal)
@@ -185,6 +237,17 @@ Public Class MachOptionVM
End If
End Sub
#Region "Visibility"
Public ReadOnly Property StoneVisibility As Visibility
Get
Dim sGenMat As String = ""
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, MCH_MAT_WOOD, sGenMat, IniFile.m_sCurrMachIniFilePath)
Return If( sGenMat = MCH_MAT_STONE, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#End Region
#Region "COMMANDS"
#Region "CloseMachOptionsCommand"
+11 -12
View File
@@ -1,16 +1,15 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:local="clr-namespace:EgtCAM5"
Title="{Binding Title}" Icon="{Binding IconSource}"
TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32"
BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2"
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
AboutBoxCommand="{Binding AboutBoxCommand}"
AllowDrop="True" Drop="MainWindow_Drop"
SnapsToDevicePixels="True"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:local="clr-namespace:EgtCAM5"
Title="{Binding Title}" Icon="{Binding IconSource}"
TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32"
BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2"
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
AboutBoxCommand="{Binding AboutBoxCommand}"
AllowDrop="True" Drop="MainWindow_Drop"
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<EgtWPFLib5:EgtCustomWindow.TitlePanel>
<local:TopCommandBarV DataContext="{StaticResource TopCommandBarViewModel}"/>
+55 -38
View File
@@ -16,7 +16,6 @@ Public Class MainWindowVM
Private m_sDataRoot As String = String.Empty
Private m_sConfigDir As String = String.Empty
Private m_OnTerminateProcessCallback As New OnTerminateProcessCallback(AddressOf OnTerminateProcess)
Private m_IndexTab As Integer = 0
' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY
@@ -47,6 +46,13 @@ Public Class MainWindowVM
End Set
End Property
Private m_sDimensionDir As String = String.Empty
Public ReadOnly Property DimensionDir As String
Get
Return m_sDimensionDir
End Get
End Property
Private m_cmdMainWindow_ContentRendered As ICommand
Private m_cmdAboutBox As ICommand
' MainWindow Activated Event
@@ -98,11 +104,11 @@ Public Class MainWindowVM
Public ReadOnly Property IconSource As String
Get
#If PLATFORM = "x64" Then
#If PLATFORM = "x64" Then
Return "/Resources/EgtCAM5_64.ico"
#else
Return "/Resources/EgtCAM5.ico"
#End If
#Else
Return "/Resources/EgtCAM5.ico"
#End If
End Get
End Property
@@ -190,13 +196,7 @@ Public Class MainWindowVM
' Salvo impostazione macchina corrente
Map.refMachinePanelVM.SaveCurrentMachine()
' Aggiorno istanze usate
m_objMutex.WaitOne(1000)
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
ReleaseInstance()
' Chiudo la finestra principale del programma
Application.Current.MainWindow.Close()
Else
@@ -204,15 +204,9 @@ Public Class MainWindowVM
End If
End Sub
Private Function OnTerminateProcess( nExitCode As Integer) As Boolean
Private Function OnTerminateProcess(nExitCode As Integer) As Boolean
' Aggiorno istanze usate
m_objMutex.WaitOne(1000)
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
ReleaseInstance()
' Dichiaro di procedere con la terminazione del programma
Return True
End Function
@@ -307,12 +301,9 @@ Public Class MainWindowVM
Map.refMainWindowVM.ManageClosingApplication()
' Terminazione generale di EgtInterface
EgtExit()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
' Aggiorno istanze usate
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
ReleaseInstance()
' Termino
Application.Current.Shutdown()
End Sub
@@ -363,6 +354,8 @@ Public Class MainWindowVM
Else
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
End If
' Recupero percorso file Dimension
m_sDimensionDir = m_sConfigDir & "\" & DIMENSION_FILE_NAME
' Verifico indice di istanza
ManageInstance()
' Imposto tipo di chiave
@@ -386,8 +379,8 @@ Public Class MainWindowVM
EgtSetLockId(sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2611, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2611, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 3104, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 3104, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto abilitazione lavorazioni avanzate
@@ -423,14 +416,6 @@ Public Class MainWindowVM
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", OptionModule.m_sFontText)
EgtSetFont(sNfeDir, OptionModule.m_sFontText)
' Imposto direttorio ausiliario per import/gestione BTL
Dim sBtlAuxDir As String = String.Empty
GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
EgtSetBtlAuxDir(sBtlAuxDir)
' Imposto direttorio libreria per export ThreeJs
Dim sThreeJSLibDir As String = String.Empty
GetPrivateProfileString(S_EXPORT, K_THREEJSLIBDIR, "", sThreeJSLibDir)
EgtSetThreeJSLibDir(sThreeJSLibDir)
' Imposto dir di default per libreria Lua e lancio libreria di base
Dim sLuaLibsDir As String = String.Empty
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
@@ -438,6 +423,14 @@ Public Class MainWindowVM
Dim sLuaBaseLib As String = String.Empty
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
EgtLuaRequire(sLuaBaseLib)
' Imposto direttorio ausiliario per import/gestione BTL (sempre dopo impostazioni lua)
Dim sBtlAuxDir As String = String.Empty
GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
EgtSetBtlAuxDir(sBtlAuxDir)
' Imposto direttorio libreria per export ThreeJs
Dim sThreeJSLibDir As String = String.Empty
GetPrivateProfileString(S_EXPORT, K_THREEJSLIBDIR, "", sThreeJSLibDir)
EgtSetThreeJSLibDir(sThreeJSLibDir)
' Imposto direttorio temporaneo a EgtInterface
EgtSetTempDir(m_sTempDir)
' Imposto IniFile a EgtInterface
@@ -530,6 +523,17 @@ Public Class MainWindowVM
End If
End If
End Sub
Private Sub ReleaseInstance()
' Aggiorno istanze usate
Dim bOk As Boolean = m_objMutex.WaitOne(1000)
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
If bOk Then m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
End Sub
Friend Sub NotifyMainWindow_ContentRendered()
' Notifico ProjectVM
@@ -598,12 +602,25 @@ Public Class MainWindowVM
' pulisco output
Map.refStatusBarVM.NotifyStatusOutput("")
Map.refInputExpanderVM.ResetInputBox()
ElseIf e.Key = Key.Left OrElse e.Key = Key.Right OrElse e.Key = Key.Up OrElse e.Key = Key.Down AndAlso
Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
' Nascondo la combobox delle usernotes
Map.refMachiningParameterExpanderVM.CurrOperation.SetComboAddVisibility(Visibility.Collapsed)
'riattivo il pulsante per visualizzare la combobox delle note
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_IsEnable(True)
End If
ElseIf (e.Key = Key.Left OrElse e.Key = Key.Right) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
Map.refMachiningParameterExpanderVM.FocusSlider()
Dim nStep As Integer = If(e.Key = Key.Right OrElse e.Key = Key.Up, 1, -1)
Dim nStep As Integer = If(e.Key = Key.Right, 1, -1)
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
e.Handled = True
ElseIf (e.Key = Key.Up OrElse e.Key = Key.Down) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
Map.refMachiningParameterExpanderVM.FocusButtonPreview()
If e.Key = Key.Down Then
Map.refMachiningParameterExpanderVM.RevertPreviewMachiningTool()
Else
Map.refMachiningParameterExpanderVM.PreviewMachiningTool()
End If
e.Handled = True
End If
End Sub
+3 -3
View File
@@ -30,7 +30,7 @@ Imports System.Windows
#End If
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtCAM5")>
<Assembly: AssemblyCopyright("Copyright © 2016-2024 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2016-2026 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.11.1")>
<Assembly: AssemblyFileVersion("2.6.11.1")>
<Assembly: AssemblyVersion("3.1.4.1")>
<Assembly: AssemblyFileVersion("3.1.4.1")>
+2 -2
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.34209
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
+22 -20
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.34209
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
@@ -12,15 +12,16 @@ Option Strict On
Option Explicit On
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
@@ -28,17 +29,17 @@ Partial Friend NotInheritable Class MySettings
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
@@ -49,10 +50,11 @@ Partial Friend NotInheritable Class MySettings
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
@@ -62,9 +64,9 @@ Namespace My
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.EgtCAM5.MySettings
Friend ReadOnly Property Settings() As Global.EgtCAM5.My.MySettings
Get
Return Global.EgtCAM5.MySettings.Default
Return Global.EgtCAM5.My.MySettings.Default
End Get
End Property
End Module
@@ -3,14 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
Style="{StaticResource ExpanderStyle}">
Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding PropertiesMsg}"/>
</Expander.Header>
<UniformGrid>
<TextBox Text="{Binding InfoBox, Mode=OneWay}" MaxHeight="250" IsReadOnly="True"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
</UniformGrid>
<TextBox Text="{Binding InfoBox, Mode=OneWay}" IsReadOnly="True"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
</Expander>
</UserControl>
@@ -21,6 +21,7 @@ Public Class InfoExpanderVM
Set(value As Boolean)
If value <> m_IsExpanded Then
m_IsExpanded = value
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(m_IsExpanded)
OnPropertyChanged("IsEnabled")
End If
End Set
@@ -1,9 +1,11 @@
<UserControl x:Class="InputExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}"
Style="{StaticResource ExpanderStyle}">
Style="{StaticResource ExpanderStyle}">
<StackPanel>
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
@@ -16,26 +18,42 @@
</StackPanel.Style>
<TextBlock Text="{Binding TextBlock}"
Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/>
<TextBox Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding TextVisibility}" Margin="5,0,5,5">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
</TextBox.InputBindings>
</TextBox>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
PreviewKeyDown="TextBox_PreviewKeyDown" IsVisibleChanged="Txt_IsVisibleChanged"
Visibility="{Binding TextVisibility}" Height="Auto" Margin="5,0,5,5" >
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
</TextBox.InputBindings>
</TextBox>
<Button Grid.Column="1"
Content="+"
Command="{Binding ShowInfoItemCommand}"
Visibility="{Binding ShowInfoItemVisibility}"
Width="20"
Height="20"
Margin="5,-1,5,0"
VerticalAlignment="Top"/>
</Grid>
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding ComboVisibility}" Margin="5,0,5,5"/>
Visibility="{Binding ComboVisibility}" Margin="5,5,5,5"/>
<Grid Margin="5,0,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}"
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
<Button Command="{Binding DoneCommand}" Grid.Column="1"
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
</Grid>
</StackPanel>
</Expander>
@@ -1,3 +1,17 @@
Public Class InputExpanderV
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) Or
(e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then
Txt.AcceptsReturn = True
Txt.TextWrapping = TextWrapping.Wrap
End If
End Sub
Private Sub Txt_IsVisibleChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
If Txt.IsVisible Then
Txt.Focus()
End If
End Sub
End Class
@@ -1,11 +1,18 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports MS.Internal
Public Class InputExpanderVM
Inherits ViewModelBase
#Region "FIELDS & PROPERTIES"
' Variabile temporanea per salvare bShow
Private m_bTempShow As Boolean
' Lista temporanea delle Info
Private m_TempInfoList As New List(Of InfoItem)
' Expander fields
Private m_IsExpanded As Boolean
Public Property IsExpanded As Boolean
@@ -146,9 +153,26 @@ Public Class InputExpanderVM
Return m_ComboSelectedIndex
End Get
Set(value As Integer)
Map.refProjectVM.SetLastInteger(value)
If m_bTempShow Then Map.refProjectVM.SetLastInteger(value)
m_ComboSelectedIndex = value
' se la combo è di Info ed è valida, la aggiungo alla textbox
If m_ComboSelectedIndex >= 0 AndAlso m_TempInfoList.Count() > 0 Then
Dim CurrItem As InfoItem = m_TempInfoList(m_ComboSelectedIndex)
If String.IsNullOrEmpty(m_TextBox) Then
m_TextBox = CurrItem.sKey & "=" & CurrItem.sValue
Else
If Not m_TextBox.EndsWith(vbCrLf) Then m_TextBox &= vbCrLf
m_TextBox &= CurrItem.sKey & "=" & CurrItem.sValue
End If
ComboVisibility = Visibility.Collapsed
ComboItemsList.RemoveAt(m_ComboSelectedIndex)
m_TempInfoList.RemoveAt(m_ComboSelectedIndex)
m_ComboSelectedIndex = -1
If ComboItemsList.Count <= 0 Then ShowInfoItemVisibility = Visibility.Collapsed
End If
OnPropertyChanged("ComboSelectedIndex")
OnPropertyChanged("ComboItemsList")
OnPropertyChanged("TextBox")
End Set
End Property
@@ -177,9 +201,26 @@ Public Class InputExpanderVM
End Set
End Property
Private m_ShowInfoItemVisibility As Visibility
''' <summary>
''' Propietà visibilità bottone +
''' </summary>
Public Property ShowInfoItemVisibility As Visibility
Get
Return m_ShowInfoItemVisibility
End Get
Set(value As Visibility)
If value <> m_ShowInfoItemVisibility Then
m_ShowInfoItemVisibility = value
OnPropertyChanged("ShowInfoItemVisibility")
End If
End Set
End Property
' Commands definition
Private m_cmdShow As ICommand
Private m_cmdDone As ICommand
Private m_cmdShowInfoItem As ICommand
#Region "Messages"
@@ -203,6 +244,7 @@ Public Class InputExpanderVM
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefInputExpanderVM(Me)
ComboSelectedIndex = -1
End Sub
#End Region ' Constructor
@@ -269,23 +311,69 @@ Public Class InputExpanderVM
#End Region ' DoneCommand
#Region "ShowInfoItemCommand"
''' <summary>
''' Comando per la visualizzazione della combobox
''' </summary>
Public ReadOnly Property ShowInfoItemCommand As ICommand
Get
If m_cmdShowInfoItem Is Nothing Then
m_cmdShowInfoItem = New Command(AddressOf ShowInfoItem)
End If
Return m_cmdShowInfoItem
End Get
End Property
''' <summary>
''' Funzione per la visualizzazione della combobox
''' </summary>
''' <param name="param"></param>
Public Sub ShowInfoItem(ByVal param As Object)
' Se presente info inserita in textbox
If Not String.IsNullOrWhiteSpace( m_TextBox) Then
Dim vLines As String() = m_TextBox.Split( vbCrLf.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
For Each sLine As String In vLines
Dim vKeyVal As String() = sLine.Split("="c)
Dim nInd As Integer = m_TempInfoList.FindIndex( Function(x) x.sKey = vKeyVal(0))
If nInd <> -1 Then
ComboItemsList.RemoveAt( nInd)
m_TempInfoList.RemoveAt( nInd)
End If
Next
End If
ComboVisibility = Visibility.Visible
End Sub
#End Region ' ShowInfoItemCommand
#End Region
#Region "METHODS"
Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam)
Title = PrepareInputBoxParam.sTitle
' Divido il titolo che può contenere comandi dopo il ';'
Dim vsSplitTitle As String() = PrepareInputBoxParam.sTitle.Split(";"c)
Title = vsSplitTitle(0)
If PrepareInputBoxParam.sLabel <> "" Then
TextBlock = PrepareInputBoxParam.sLabel
TextBox = ""
TextVisibility = Visibility.Visible
' Se presente il comando "Sic=1"
If vsSplitTitle.Count() > 1 AndAlso vsSplitTitle(1) = "Sic=1" Then
m_bTempShow = False
ComboInfo()
If ComboItemsList.Count > 0 Then ShowInfoItemVisibility = Visibility.Visible
End If
End If
If PrepareInputBoxParam.sCheckLabel <> "" Then
CheckBoxText = PrepareInputBoxParam.sCheckLabel
CheckVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowCombo Then
m_bTempShow = PrepareInputBoxParam.bShowCombo
ComboItemsList.Clear()
m_TempInfoList.Clear()
ComboVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowBtn Then
@@ -302,6 +390,7 @@ Public Class InputExpanderVM
CheckVisibility = Visibility.Collapsed
ComboVisibility = Visibility.Collapsed
ShowBtnVisibility = Visibility.Collapsed
ShowInfoItemVisibility = Visibility.Collapsed
IsExpanded = False
IsEnabled = False
End Sub
@@ -329,12 +418,33 @@ Public Class InputExpanderVM
Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean
ComboItemsList.Add(sText)
If bSelected Then
ComboSelectedIndex = ComboItemsList.Count - 1
End If
Return True
End Function
''' <summary>
''' Funzione che popola la lista ComboItemsList
''' </summary>
Private Sub ComboInfo()
m_TempInfoList.Clear()
ComboItemsList.Clear()
Dim vsInfo As String() = Nothing
EgtGetAllInfo( Map.refManageLayerExpanderVM.RightClickedTreeItemId, vsInfo)
If Not m_bTempShow And Not IsNothing( vsInfo) Then
For nInd As Integer = 0 To vsInfo.Count() - 1
Dim vKeyVal As String() = vsInfo( nInd).Split("="c)
m_TempInfoList.Add(New InfoItem( nInd, vKeyVal(0), vKeyVal(1)))
ComboItemsList.Add( vsInfo( nInd))
Next
End If
End Sub
#End Region ' Methods
End Class
@@ -19,11 +19,12 @@ Public Class LayerTreeViewItem
''' </summary>
Public Overrides Property IsSelected As Boolean
Get
Return m_IsSelected
Return m_isSelected
End Get
Set(value As Boolean)
If (value <> m_IsSelected) Then
m_IsSelected = value
If value Then Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(value)
If (value <> m_isSelected) Then
m_isSelected = value
If value Then
' recupero l'Id del nuovo oggetto selezionato
Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False)
@@ -69,17 +70,17 @@ Public Class LayerTreeViewItem
Return m_bOnOff
End Get
Set(value As Boolean)
If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
'If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
If m_bOnOff <> value Then
m_bOnOff = value
' se abilitato, eseguo operazione
If m_SendCmd Then
Map.refProjectVM.SetLastInteger(Id)
If value Then
Map.refProjectVM.ExecuteCommand(Controller.CMD.SHOW)
EgtSetStatus(Id, GDB_ST.ON_)
Else
Map.refProjectVM.ExecuteCommand(Controller.CMD.HIDE)
EgtSetStatus(Id, GDB_ST.OFF)
End If
EgtDraw()
End If
Dim bOnOffGroup As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) AndAlso Items.Count > 0
If bOnOffGroup Then
@@ -5,7 +5,7 @@
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
xmlns:local="clr-namespace:EgtCAM5">
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
<Expander IsExpanded="{Binding ManageLayerIsExpanded}" Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding HeaderName}" Margin="0,0,5,0"/>
@@ -13,15 +13,19 @@
</StackPanel>
</Expander.Header>
<StackPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<UniformGrid Rows="1">
<Button Content="{Binding NewPartMsg}" Command="{Binding NewPartCommand}" Height="30"/>
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
</UniformGrid>
<TreeView Name="LayerTreeView" MinHeight="250" MaxHeight="400"
<TreeView Grid.Row="1" x:Name="LayerTreeView"
ItemsSource="{Binding Path=LayerList}"
VirtualizingStackPanel.IsVirtualizing = "True"
VirtualizingStackPanel.VirtualizationMode = "Recycling">
@@ -50,8 +54,8 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="False" Height="15" Width="15" Margin="0,0,5,0"/>
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
<Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
@@ -61,7 +65,7 @@
</TreeView.Resources>
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia
che si presenta quando la categoria rimane vuota (ombra causata dal multibinding).-->
che si presenta quando la categoria rimane vuota (ombra causata dal multibinding).-->
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
@@ -116,6 +120,6 @@
</ContextMenu>
</TreeView.ContextMenu>
</TreeView>
</StackPanel>
</Grid>
</Expander>
</UserControl>
@@ -1,6 +1,5 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtCAM5.IniFile
Public Class ManageLayerExpanderVM
Inherits ViewModelBase
@@ -30,22 +29,6 @@ Public Class ManageLayerExpanderVM
End Set
End Property
' Definizione comandi
Private m_cmdNewPart As ICommand
Private m_cmdNewLayer As ICommand
Private m_cmdLayerColor As ICommand
Private m_cmdTreeViewDoubleClick As ICommand
Private m_cmdTreeViewMouseUp As ICommand
Private m_cmdTreeViewMouseRightButton As ICommand
Private m_cmdSelect As ICommand
Private m_cmdDeselect As ICommand
Private m_cmdName As ICommand
Private m_cmdInfo As ICommand
Private m_cmdRelocate As ICommand
Private m_cmdCopy As ICommand
Private m_cmdDelete As ICommand
Private m_cmdSave As ICommand
' Lista dei layer
Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem)
Public Property LayerList As ObservableCollection(Of LayerTreeViewItem)
@@ -54,6 +37,7 @@ Public Class ManageLayerExpanderVM
End Get
Set(value As ObservableCollection(Of LayerTreeViewItem))
m_LayerList = value
OnPropertyChanged("LayerList")
End Set
End Property
@@ -71,6 +55,22 @@ Public Class ManageLayerExpanderVM
End Get
End Property
Private m_ManageLayerIsExpanded As Boolean
Public Property ManageLayerIsExpanded As Boolean
Get
Return m_ManageLayerIsExpanded
End Get
Set(value As Boolean)
m_ManageLayerIsExpanded = value
Map.refDrawOptionPanelVM.SetManageLayerRowIsExpanded(m_ManageLayerIsExpanded)
OnPropertyChanged("ManageLayerIsExpanded")
End Set
End Property
Friend Sub SetManageLayerIsExpanded(value As Boolean)
m_ManageLayerIsExpanded = value
OnPropertyChanged("ManageLayerIsExpanded")
End Sub
#Region "Messages"
Public ReadOnly Property NewPartMsg As String
@@ -131,6 +131,22 @@ Public Class ManageLayerExpanderVM
#End Region
' Definizione comandi
Private m_cmdNewPart As ICommand
Private m_cmdNewLayer As ICommand
Private m_cmdLayerColor As ICommand
Private m_cmdTreeViewDoubleClick As ICommand
Private m_cmdTreeViewMouseUp As ICommand
Private m_cmdTreeViewMouseRightButton As ICommand
Private m_cmdSelect As ICommand
Private m_cmdDeselect As ICommand
Private m_cmdName As ICommand
Private m_cmdInfo As ICommand
Private m_cmdRelocate As ICommand
Private m_cmdCopy As ICommand
Private m_cmdDelete As ICommand
Private m_cmdSave As ICommand
#End Region
#Region "CONSTRUCTOR"
@@ -140,6 +156,7 @@ Public Class ManageLayerExpanderVM
Map.SetRefManageLayerExpanderVM(Me)
'Imposto tempo di evidenziazione delle entità clickate
ObjTreeTimer.Interval = TimeSpan.FromMilliseconds(1000)
SetManageLayerIsExpanded(True)
End Sub
#End Region ' Constructor
@@ -166,7 +183,7 @@ Public Class ManageLayerExpanderVM
Public Sub NewPart(ByVal param As Object)
Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWPART)
' Seleziono nell'albero il layer del pezzo appena creato
SelectIdInObjTree(EgtGetCurrLayer(), False)
SelectIdInObjTreeNoMark(EgtGetCurrLayer())
End Sub
#End Region ' NewPartCommand
@@ -191,7 +208,7 @@ Public Class ManageLayerExpanderVM
Public Sub NewLayer(ByVal param As Object)
Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWLAYER)
' Seleziono nell'albero il layer appena creato
SelectIdInObjTree(EgtGetCurrLayer(), False)
SelectIdInObjTreeNoMark(EgtGetCurrLayer())
End Sub
#End Region ' NewLayerCommand
@@ -241,6 +258,7 @@ Public Class ManageLayerExpanderVM
If m_nObjTreeOldId <> GDB_ID.NULL Then
Map.refProjectVM.SetLastInteger(m_nObjTreeOldId)
Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(True)
End If
End Sub
@@ -492,7 +510,7 @@ Public Class ManageLayerExpanderVM
Map.refProjectVM.SetLastInteger(RightClickedTreeItemId)
Map.refProjectVM.ExecuteCommand(Controller.CMD.DELETE)
' Seleziono prossimo
SelectIdInObjTree(nNewId, False)
SelectIdInObjTreeNoMark(nNewId)
End Sub
#End Region ' DeleteCommand
@@ -528,16 +546,18 @@ Public Class ManageLayerExpanderVM
#Region "METHODS"
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer
Private m_nObjTreeOldId As Integer = GDB_ID.NULL
Friend m_nObjTreeOldId As Integer = GDB_ID.NULL
Private m_nObjTreeMenuId As Integer = GDB_ID.NULL
Private m_bEnableUpdateObjInObjTree As Boolean = True
Friend Sub SelectIdInObjTreeNoMark(nId As Integer)
SelectIdInObjTree(nId, False)
LayerTreeViewItem.m_MarkOnSel = False
MySelectIdInObjTree(nId)
LayerTreeViewItem.m_MarkOnSel = True
End Sub
Friend Sub SelectIdInObjTree(nId As Integer)
SelectIdInObjTree(nId, True)
MySelectIdInObjTree(nId)
End Sub
Friend Sub UpdateObjTreeOldId(ObjTreeOldId As Integer)
@@ -581,7 +601,7 @@ Public Class ManageLayerExpanderVM
AddGroupInObjTree(GDB_ID.ROOT, GDB_LV.USER, GDB_MD.STD, 0, LayerList)
If nOldId <> GDB_ID.NULL Then
m_bEnableUpdateObjInObjTree = False
If Not SelectIdInObjTree(nOldId, True) Then
If Not MySelectIdInObjTree(nOldId) Then
Map.refInfoExpanderVM.SetInfoBox(String.Empty)
End If
m_bEnableUpdateObjInObjTree = True
@@ -803,14 +823,11 @@ Public Class ManageLayerExpanderVM
Return nOldId
End Function
Private Function SelectIdInObjTree(nId As Integer, bMark As Boolean) As Boolean
Private Function MySelectIdInObjTree(nId As Integer) As Boolean
Dim tNode As LayerTreeViewItem = SearchIdInLayerList(LayerList, nId, True)
If Not IsNothing(tNode) Then
If Not bMark Then LayerTreeViewItem.m_MarkOnSel = False
tNode.IsSelected = True
tNode.NotifyPropertyChanged("IsSelected")
If Not bMark Then LayerTreeViewItem.m_MarkOnSel = True
tNode.IsExpanded = True
m_nObjTreeOldId = nId
Return True
Else
+14 -15
View File
@@ -1,30 +1,29 @@
<UserControl x:Class="DrawOptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<!--<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
--><!--ContentPresenter that contains the ManageLayerExpander--><!--
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
--><!--ContentPresenter that contains the InfoExpander--><!--
<ContentPresenter Content="{Binding InfoExpander}"/>
--><!--ContentPresenter that contains the InputExpander--><!--
<ContentPresenter Content="{Binding InputExpander}"/>
</StackPanel>-->
<Grid Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid x:Name="DrawGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition MinHeight="100" MaxHeight="800"
EgtCAM5:DrawOptionPanelVM.RowId="ManageLayer"
EgtCAM5:DrawOptionPanelVM.IsExpanded="{Binding ManageLayerRowIsExpanded}"
EgtCAM5:DrawOptionPanelVM.TargetSplitter="{Binding ElementName=ManagerLayerGridSplitter}"/>
<RowDefinition MinHeight="100" MaxHeight="400"
EgtCAM5:DrawOptionPanelVM.RowId="Info"
EgtCAM5:DrawOptionPanelVM.IsExpanded="{Binding InfoRowIsExpanded}"
EgtCAM5:DrawOptionPanelVM.TargetSplitter="{Binding ElementName=InfoGridSplitter}"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--ContentPresenter that contains the ManageLayerExpander-->
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
<GridSplitter Grid.Row="0" Height="5" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/>
<GridSplitter x:Name="ManagerLayerGridSplitter" Style="{StaticResource General_GridSplitter}"/>
<!--ContentPresenter that contains the InfoExpander-->
<ContentPresenter Grid.Row="1" Content="{Binding InfoExpander}"/>
<GridSplitter Grid.Row="1" Height="5" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/>
<ContentPresenter Grid.Row="1" Content="{Binding InfoExpander}"/>
<GridSplitter x:Name="InfoGridSplitter" Grid.Row="1" Style="{StaticResource General_GridSplitter}"/>
<!--ContentPresenter that contains the InputExpander-->
<ContentPresenter Grid.Row="2" Content="{Binding InputExpander}"/>
</Grid>
</UserControl>
</UserControl>
+25 -2
View File
@@ -1,7 +1,30 @@
Public Class DrawOptionPanelV
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
Dim x = ciao.MaxHeight
Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Map.SetRefDrawOptionPanelV(Me)
If Not IsActivePlugin() Then
AddHandler DrawGrid.Loaded,
Sub()
DynamicGridModule.RestoreDrawGridLayout(DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DynamicGridModule.RestoreDrawGridLayout(DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DrawGrid.UpdateLayout()
End Sub
AddHandler ManagerLayerGridSplitter.DragCompleted,
Sub()
DynamicGridModule.SaveDrawGridLayout(DrawGrid, "ManageLayer", If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
End Sub
AddHandler InfoGridSplitter.DragCompleted,
Sub()
DynamicGridModule.SaveDrawGridLayout(DrawGrid, "Info", If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
End Sub
End If
End Sub
End Class
+112 -1
View File
@@ -1,4 +1,4 @@
Imports EgtUILib
Imports System.IO
Public Class DrawOptionPanelVM
Inherits ViewModelBase
@@ -37,6 +37,28 @@ Public Class DrawOptionPanelVM
End Get
End Property
Private m_ManageLayerRowIsExpanded As Boolean = True
Public ReadOnly Property ManageLayerRowIsExpanded As Boolean
Get
Return m_ManageLayerRowIsExpanded
End Get
End Property
Friend Sub SetManageLayerRowIsExpanded(value As Boolean)
m_ManageLayerRowIsExpanded = value
OnPropertyChanged("ManageLayerRowIsExpanded")
End Sub
Private m_InfoRowIsExpanded As Boolean = True
Public ReadOnly Property InfoRowIsExpanded As Boolean
Get
Return m_InfoRowIsExpanded
End Get
End Property
Friend Sub SetInfoRowIsExpanded(value As Boolean)
m_InfoRowIsExpanded = value
OnPropertyChanged("InfoRowIsExpanded")
End Sub
#Region "CONSTRUCTOR"
Sub New()
@@ -60,4 +82,93 @@ Public Class DrawOptionPanelVM
#End Region ' METHODS
#Region "DEPENCY PROPERTY"
Public Shared ReadOnly RowIdProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"RowId",
GetType(String),
GetType(DrawOptionPanelVM),
New PropertyMetadata(Nothing)
)
Public Shared Sub SetRowId(element As DependencyObject, value As String)
element.SetValue(RowIdProperty, value)
End Sub
Public Shared Function GetRowId(element As DependencyObject) As String
Return CType(element.GetValue(RowIdProperty), String)
End Function
Public Shared ReadOnly IsExpandedProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"IsExpanded",
GetType(Boolean),
GetType(DrawOptionPanelVM),
New PropertyMetadata(True, AddressOf OnIsExpandedChanged)
)
Public Shared Sub SetIsExpanded(element As DependencyObject, value As Boolean)
element.SetValue(IsExpandedProperty, value)
End Sub
Public Shared Function GetIsExpanded(element As DependencyObject) As Boolean
Return CType(element.GetValue(IsExpandedProperty), Boolean)
End Function
Public Shared Function GetTargetSplitter(d As DependencyObject) As GridSplitter
Return CType(d.GetValue(TargetSplitterProperty), GridSplitter)
End Function
Public Shared Sub SetTargetSplitter(d As DependencyObject, value As GridSplitter)
d.SetValue(TargetSplitterProperty, value)
End Sub
Public Shared ReadOnly TargetSplitterProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"TargetSplitter",
GetType(GridSplitter),
GetType(DrawOptionPanelVM),
New PropertyMetadata(Nothing)
)
Private Shared Sub OnIsExpandedChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim row As RowDefinition = TryCast(d, RowDefinition)
If IsNothing(row) Then Return
Dim isExpanded As Boolean = CBool(e.NewValue)
Dim splitter = DrawOptionPanelVM.GetTargetSplitter(row)
If splitter IsNot Nothing Then
splitter.IsEnabled = isExpanded
splitter.Visibility = If(isExpanded, Visibility.Visible, Visibility.Collapsed)
End If
Dim rowId As String = GetRowId(row)
Dim rowHeight As Double = 0
If rowId = "ManageLayer" Then
rowHeight = 400
ElseIf rowId = "Info" Then
rowHeight = 150
End If
If Not isExpanded Then
row.ClearValue(RowDefinition.HeightProperty)
row.Height = New GridLength(1, GridUnitType.Auto)
row.MinHeight = 0
Else
If File.Exists(Map.refMainWindowVM.DimensionDir) Then
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
Map.refDrawOptionPanelV.DrawGrid.UpdateLayout()
Else
row.Height = New GridLength(rowHeight)
End If
End If
End Sub
#End Region ' Depency Property
End Class
@@ -18,6 +18,7 @@ Public Class EstimationsExpanderVM
Set(value As Boolean)
If value <> m_Estimation_IsExpanded Then
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.ESTIMATIONS, value)
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
End If
End Set
End Property
@@ -138,7 +139,7 @@ Public Class EstimationsExpanderVM
If Not String.IsNullOrEmpty(sCurrFilePath) Then
sInfo = "EgtCAM5 - " & sCurrFilePath
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sEstFile) AndAlso Not String.IsNullOrWhiteSpace(sEstFile) Then
sEstFile = Path.ChangeExtension(Path.GetDirectoryName(sCurrFilePath) & "\" & sEstFile, ".html")
sEstFile = Path.ChangeExtension(Path.GetDirectoryName(sCurrFilePath) & "\" & Path.GetFileName( sEstFile), ".html")
Else
sEstFile = Path.ChangeExtension(sCurrFilePath, Nothing)
If IniFile.m_bMachiningGroup Then
@@ -94,26 +94,11 @@ Public Class MachiningTreeExpanderVM
' Sposto la lavorazione aggiunta subito dopo quella appena selezionata
EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER)
End If
' Recupero geometria correntemente selezionata e la metto in un vettore
Dim SelectedEntities As New List(Of Integer)
Dim EntityId As Integer = EgtGetFirstSelectedObj()
While EntityId <> GDB_ID.NULL
SelectedEntities.Add(EntityId)
EntityId = EgtGetNextSelectedObj()
End While
' Imposto l'operazione appena creata come corrente
EgtSetCurrMachining(MachiningId)
' Gestione speciale per superfici ( si aggiunge l'identificazione della faccia)
If SelectedEntities.Count() > 0 AndAlso EgtGetType(SelectedEntities(0)) = GDB_TY.SRF_MESH Then
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllIdSub(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
' Gestione standard per altre entità (curve, regioni, ...)
Else
' Imposto il vettore come geometria di lavorazione
EgtSetMachiningGeometry(SelectedEntities.ToArray)
End If
' Imposto geometria da lavorare (tutta quella selezionata)
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllSelectedGeom(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
' Calcolo la lavorazione con la nuova geometria
EgtApplyMachining(True)
EgtDraw()
@@ -152,6 +137,8 @@ Public Class MachiningTreeExpanderVM
Return EgtMsg(MSG_MACHININGSDBPAGE + 12)
Case MCH_MY.FIVEAXISMILLING
Return EgtMsg(31213)
Case MCH_MY.PROBING
Return EgtMsg(31220)
Case Else
Return "Mach"
End Select
@@ -1,4 +1,6 @@
Imports EgtUILib
Imports System.ComponentModel
Imports System.Globalization
Imports EgtUILib
Public Class DispositionParameterExpanderVM
Inherits ViewModelBase
@@ -273,7 +275,7 @@ Public Class DispositionParameterExpanderVM
End If
Select Case m_ActiveObject
Case ObjectType.RAWPART
' Abilito la selezione delle Fixture
' Abilito la selezione dei Grezzi
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
Case ObjectType.FIXTURE
' Abilito la selezione delle Fixture
@@ -311,12 +313,16 @@ Public Class DispositionParameterExpanderVM
' se movimento di traslazione
If m_MoveIsChecked Then
Dim InputPoint As New Point3d(0, 0, 0)
Dim dSupp As Double = -1
Dim Values() As String = m_InputValue.Split(","c)
If Values.Count = 2 Then
If Values.Count >= 2 Then
StringToLen(Values(0), InputPoint.x)
StringToLen(Values(1), InputPoint.y)
If Values.Count >= 3 Then
StringToLen(Values(2), dSupp)
End If
Else
m_InputErrorMsg = "Il valore non è una cordinata XY"
m_InputErrorMsg = "Il valore non è un punto X,Y"
OnPropertyChanged("InputErrorMsg")
Return
End If
@@ -329,13 +335,44 @@ Public Class DispositionParameterExpanderVM
' imposto il riferimento della tavola
Dim ptTableRef As Point3d
EgtGetTableRef(1, ptTableRef)
' calcolo il punto del grezzo da posizionar nelle coordinate di input
' calcolo il punto del grezzo da posizionare nelle coordinate di input
Dim ptRawRefPoint As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
' creo un punto con le coordinate di input espresse rispetto alla tavola
Dim TableRefInputPoint As New Point3d(InputPoint)
TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef))
' calcolo il vettore di spostamento del grezzo
vtMove = TableRefInputPoint - ptRawRefPoint
vtMove.z = 0
' verifico ed aggiusto eventuale supporto
Dim dOldSupp As Double = 0
Dim nOldSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
If nOldSuppId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nOldSuppId, GDB_BB.STANDARD, bboxSupport)
dOldSupp = bboxSupport.DimZ()
End If
If dSupp > -EPS_SMALL AndAlso Math.Abs( dSupp - dOldSupp) > EPS_SMALL Then
' da cancellare
If dSupp < EPS_SMALL Then
EgtErase( nOldSuppId)
vtMove.z = dSupp - dOldSupp
' da creare o modificare
Else
EgtErase( nOldSuppId)
Dim nNewSuppId As Integer = GDB_ID.NULL
Dim nRawOutLnId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, RAWOUTLINE)
If nRawOutLnId <> GDB_ID.NULL Then
Dim vtExtr As New Vector3d( 0, 0, -dSupp)
nNewSuppId = EgtCreateSurfTmByRegionExtrusion( nFirstSelectedId, 1, {nRawOutLnId}, vtExtr, 0.05, GDB_RT.GLOB)
End If
If nNewSuppId <> GDB_ID.NULL Then
EgtSetName( nNewSuppId, SUPPORT)
EgtSetColor( nNewSuppId, New Color3d(150, 75, 0))
If nOldSuppId <> GDB_ID.NULL Then EgtChangeId( nNewSuppId, nOldSuppId)
vtMove.z = dSupp - dOldSupp
End If
End If
End If
' se è una ventosa
ElseIf EgtVerifyFixture(nFirstSelectedId) Then
Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB)
@@ -434,8 +471,24 @@ Public Class DispositionParameterExpanderVM
''' Execute the Point. This method is invoked by the DoneCommand.
''' </summary>
Public Sub CheckedRawRef(ByVal param As Object)
' Assegno corner di riferimento
Dim nRawRef As MCH_CR = DirectCast(param, MCH_CR)
m_RawRefPosition = nRawRef
' Se grezzo selezionato, visualizzo sua posizione
Dim nFirstSelectedId As Integer = EgtGetFirstSelectedObj()
If EgtVerifyRawPartCurrPhase(nFirstSelectedId) Then
Dim ptR As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
Dim sSupp As String = ""
Dim nSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
If nSuppId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nSuppId, GDB_BB.STANDARD, bboxSupport)
Dim dSupp As Double = bboxSupport.DimZ()
sSupp = "," & LenToString( dSupp, 2)
End If
m_InputValue = LenToString( ptR.x, 2) & "," & LenToString( ptR.y, 2) & sSupp
OnPropertyChanged( "InputValue")
End If
End Sub
#End Region ' CheckedRawRefCommand
@@ -1,5 +1,4 @@
Imports System.Windows.Forms.AxHost
Imports EgtUILib
Imports EgtUILib
Imports Microsoft.VisualBasic.ApplicationServices
Public NotInheritable Class DispositionUtility
@@ -323,11 +322,11 @@ Public NotInheritable Class DispositionUtility
Dim dFixtureHeight As Double = 0
EgtGetInfo(nFixtureId, "H", dFixtureHeight)
' recupero altezza grezzo riferita alla tavola
Dim dRawPartMin As Point3d = bboxRawPart.Min
dRawPartMin.ToLoc(TableFrame)
Dim ptRawPartMin As Point3d = bboxRawPart.Min
ptRawPartMin.ToLoc(TableFrame)
' se l'altezza grezzo è minore di quella della ventosa, lo sposto alla stessa altezza
If dRawPartMin.z < dFixtureHeight - EPS_SMALL Then
Dim vtMove As New Vector3d(0, 0, dFixtureHeight - dRawPartMin.z)
If ptRawPartMin.z < dFixtureHeight - EPS_SMALL Then
Dim vtMove As New Vector3d(0, 0, dFixtureHeight - ptRawPartMin.z)
EgtMoveRawPart(nRawPartId, vtMove)
' ricalcolo il BBox del solido del grezzo per averlo aggiornato con la nuova Z
EgtGetBBoxGlob(nRawSolidId, GDB_BB.ONLY_VISIBLE, bboxRawPart)
@@ -359,19 +358,19 @@ Public NotInheritable Class DispositionUtility
nOtherFixtureId = EgtGetNextFixture(nOtherFixtureId)
End While
' recupero altezza grezzo riferita alla tavola
Dim dRawPartMin As Point3d = bboxRawPart.Min
dRawPartMin.ToLoc(TableFrame)
Dim ptRawPartMin As Point3d = bboxRawPart.Min
ptRawPartMin.ToLoc(TableFrame)
' se non ci sono ventose sotto il grezzo
If Not bIsFixtureUnderRawPart Then
' verifico che il grezzo sia ad altezza tavola
If dRawPartMin.z <> 0 Then
Dim vtMove As New Vector3d(0, 0, -dRawPartMin.z)
If ptRawPartMin.z <> 0 Then
Dim vtMove As New Vector3d(0, 0, -ptRawPartMin.z)
EgtMoveRawPart(nRawPartId, vtMove)
End If
Else
' se ci sono verifico che l'altezza del grezzo sia quella della ventosa più alta
If Math.Abs(dRawPartMin.z - dMaxFixtureHeight) > EPS_SMALL Then
Dim vtMove As New Vector3d(0, 0, dMaxFixtureHeight - dRawPartMin.z)
If Math.Abs(ptRawPartMin.z - dMaxFixtureHeight) > EPS_SMALL Then
Dim vtMove As New Vector3d(0, 0, dMaxFixtureHeight - ptRawPartMin.z)
EgtMoveRawPart(nRawPartId, vtMove)
End If
End If
@@ -473,23 +472,30 @@ Public NotInheritable Class DispositionUtility
' Recupero il solido del grezzo
Dim nMovedRawSolidId As Integer = EgtGetFirstNameInGroup(nRawId, RAWSOLID)
' definisco il box del solido del grezzo
Dim bboxRawPartId As New BBox3d
EgtGetBBoxGlob(nMovedRawSolidId, GDB_BB.ONLY_VISIBLE, bboxRawPartId)
Dim bboxRawPart As New BBox3d
EgtGetBBoxGlob(nMovedRawSolidId, GDB_BB.STANDARD, bboxRawPart)
' aggiungo il box dell'eventuale supporto o sottopezzo
Dim nSupportId As Integer = EgtGetFirstNameInGroup(nRawId, SUPPORT)
If nSupportId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nSupportId, GDB_BB.STANDARD, bboxSupport)
bboxRawPart.Add( bboxSupport)
End If
' Variabile che dice se c'è almeno una ventosa sotto il grezzo
Dim bIsFixtureUnderRawPart As Boolean = False
Dim bboxFixture As New BBox3d
' variabile che contiene la massima altezza delle ventose sottostanti
Dim dMaxFixtureHeight As Double = 0
' recupero altezza grezzo riferita alla tavola
Dim dRawPartMin As Point3d = bboxRawPartId.Min
dRawPartMin.ToLoc(TableFrame)
Dim ptRawPartMin As Point3d = bboxRawPart.Min
ptRawPartMin.ToLoc(TableFrame)
' Ciclo sui sottopezzi presenti per verificare le collisioni con il grezzo
Dim nFixtureId As Integer = EgtGetFirstFixture()
While nFixtureId <> GDB_ID.NULL
' calcolo il BBox del sottopezzo
EgtGetBBoxGlob(nFixtureId, GDB_BB.ONLY_VISIBLE, bboxFixture)
' verifico se c'è sovrapposizione
If bboxRawPartId.OverlapsXY(bboxFixture) Then
If bboxRawPart.OverlapsXY(bboxFixture) Then
' recupero il tipo di fixture
Dim nFxtType As FIX_TYPE = FixtureType(nFixtureId)
' Se è ventosa o morsa
@@ -502,22 +508,22 @@ Public NotInheritable Class DispositionUtility
dMaxFixtureHeight = dFixtureHeight
End If
' se l'altezza grezzo è diversa da quella della ventosa, lo sposto alla stessa altezza
If dRawPartMin.z < dFixtureHeight - EPS_SMALL Then
Dim vtMove As New Vector3d(0, 0, dFixtureHeight - dRawPartMin.z)
If ptRawPartMin.z < dFixtureHeight - EPS_SMALL Then
Dim vtMove As New Vector3d(0, 0, dFixtureHeight - ptRawPartMin.z)
EgtMoveRawPart(nRawId, vtMove)
' recupero il solido del grezzo
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nRawId, RAWSOLID)
' ricalcolo il BBox del solido del grezzo per averlo aggiornato con la nuova Z
EgtGetBBoxGlob(nRawSolidId, GDB_BB.ONLY_VISIBLE, bboxRawPartId)
dRawPartMin = bboxRawPartId.Min
dRawPartMin.ToLoc(TableFrame)
EgtGetBBoxGlob(nRawSolidId, GDB_BB.ONLY_VISIBLE, bboxRawPart)
ptRawPartMin = bboxRawPart.Min
ptRawPartMin.ToLoc(TableFrame)
End If
bIsFixtureUnderRawPart = True
End If
' Se è morsa
If nFxtType = FIX_TYPE.VISE Then
' regolo la posizione in Z della morsa
EgtSetFixtureMobile( nFixtureId, bboxRawPartId.DimZ())
EgtSetFixtureMobile( nFixtureId, bboxRawPart.DimZ())
End If
' Se è un riferimento o una morsa
If nFxtType = FIX_TYPE.REFERENCE Or nFxtType = FIX_TYPE.VISE Then
@@ -526,7 +532,7 @@ Public NotInheritable Class DispositionUtility
' calcolo bbox dell'arco di riferimento
Dim bboxArcRef As New BBox3d
EgtGetBBoxGlob(arcRefId, GDB_BB.STANDARD, bboxArcRef)
If bboxRawPartId.OverlapsXY(bboxArcRef) Then
If bboxRawPart.OverlapsXY(bboxArcRef) Then
' recupero contorno del grezzo
Dim ccompoRawPartOutlineId As Integer = EgtGetFirstNameInGroup(nRawId, RAWOUTLINE)
'recupero il raggio dell'arco di riferimento
@@ -588,14 +594,14 @@ Public NotInheritable Class DispositionUtility
' se non ci sono ventose sotto il grezzo
If Not bIsFixtureUnderRawPart Then
' verifico che il grezzo sia ad altezza tavola
If dRawPartMin.z <> 0 Then
Dim vtMove As New Vector3d(0, 0, -dRawPartMin.z)
If ptRawPartMin.z <> 0 Then
Dim vtMove As New Vector3d(0, 0, -ptRawPartMin.z)
EgtMoveRawPart(nRawId, vtMove)
End If
Else
' se ci sono verifico che l'altezza del grezzo sia quella della ventosa più alta
If Math.Abs(dRawPartMin.z - dMaxFixtureHeight) > EPS_SMALL Then
Dim vtMove As New Vector3d(0, 0, dMaxFixtureHeight - dRawPartMin.z)
If Math.Abs(ptRawPartMin.z - dMaxFixtureHeight) > EPS_SMALL Then
Dim vtMove As New Vector3d(0, 0, dMaxFixtureHeight - ptRawPartMin.z)
EgtMoveRawPart(nRawId, vtMove)
End If
End If
@@ -775,6 +781,9 @@ Public NotInheritable Class DispositionUtility
m_nUsedHookId = nNearestHookId
' Segno hook come utilizzato
SetHookUsed(m_nUsedHookId, nMoveId, True)
Dim sLinkName As String = ""
EgtGetName( EgtGetParent( m_nUsedHookId), sLinkName)
EgtSetFixtureLink( nMoveId, sLinkName)
Return True
End Function
@@ -62,8 +62,8 @@ Public Class FixtureParametersVM
Dim nUsedFixtureId As Integer = EgtGetFirstFixture()
While nUsedFixtureId <> GDB_ID.NULL
Dim sUsedFixtureName As String = String.Empty
EgtGetName(nUsedFixtureId, sUsedFixtureName)
For Index = 0 To m_FixtureTypeList.Count - 1
EgtGetName(nUsedFixtureId, sUsedFixtureName)
If sUsedFixtureName = m_FixtureTypeList(Index).Name Then
Dim CurrFixtureType As FixtureType = DirectCast(m_FixtureTypeList(Index), FixtureType)
CurrFixtureType.UsedNumber += 1
@@ -76,6 +76,7 @@ Public Class FixtureParametersVM
Friend Sub UpdateFixtureTypeList()
m_FixtureTypeList = New ObservableCollection(Of FixtureListItem)(FixtureType.ReadFixtureTypeFromMachIni())
UpdateFixtureCount()
OnPropertyChanged("FixtureTypeList")
End Sub
@@ -140,6 +141,7 @@ Public Class FixtureParametersVM
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo
EgtRemoveFixture(nAddedFixtureId)
EgtSetFixtureLink( nAddedFixtureId, "")
MessageBox.Show("No free hook point!", "ERROR")
Return
End If
@@ -297,6 +299,7 @@ Public Class FixtureParametersVM
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
EgtSetFixtureLink( nFixtureId, "")
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
@@ -320,6 +323,7 @@ Public Class FixtureParametersVM
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
EgtSetFixtureLink( nFixtureId, "")
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
@@ -348,6 +352,7 @@ Public Class FixtureParametersVM
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
EgtSetFixtureLink( nFixtureId, sBarName)
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
@@ -373,6 +378,7 @@ Public Class FixtureParametersVM
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
EgtSetFixtureLink( nFixtureId, sCharName)
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
@@ -7,7 +7,7 @@
<CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/>
<UniformGrid Columns="2" Margin="0,5,0,0">
<Button Content="New" Command="{Binding NewRawPartCommand}"/>
<Button Content="Remove"/> <!--Command="{Binding RemoveRawPartCommand}"-->
<Button Content="Remove" Command="{Binding RemoveRawPartCommand}"/>
</UniformGrid>
<Grid Visibility="{Binding RawPartParamVisibility, Mode=OneWay}">
<Grid.RowDefinitions>
@@ -117,7 +117,7 @@ Public Class RawPartOptionVM
End Property
''' <summary>
''' Execute the Point. This method is invoked by the DoneCommand.
''' Execute NewRawPart. This method is invoked by the DoneCommand.
''' </summary>
Public Sub NewRawPart()
DispositionUtility.ShowParts()
@@ -127,6 +127,36 @@ Public Class RawPartOptionVM
#End Region ' NewRawPartCommand
#Region "RemoveRawPartCommand"
''' <summary>
''' Returns a command that do Done.
''' </summary>
Public ReadOnly Property RemoveRawPartCommand As ICommand
Get
If m_cmdRemoveRawPart Is Nothing Then
m_cmdRemoveRawPart = New RelayCommand(AddressOf RemoveRawPart)
End If
Return m_cmdRemoveRawPart
End Get
End Property
''' <summary>
''' Execute RemoveRawPart. This method is invoked by the DoneCommand.
''' </summary>
Public Sub RemoveRawPart()
' ciclo sui grezzi selezionati
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
While nSelRawPartId <> GDB_ID.NULL
' rimuovo il grezzo dalla disposizione
EgtRemoveRawPart(nSelRawPartId)
nSelRawPartId = EgtGetNextSelectedObj()
End While
EgtDraw()
End Sub
#End Region ' RemoveRawPartCommand
#End Region ' Commands
End Class
@@ -109,34 +109,6 @@
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
ParamCmBxList="{Binding Path=WorkSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/>
</EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox>
<TextBlock Text="{Binding SystemNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Visibility="{Binding SysNotes_Visibility}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid>
</StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
@@ -264,7 +236,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -294,43 +271,6 @@
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiPerpTxBl}"
ParamTxBx="{Binding Path=LiPerp,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
ParamTxBx="{Binding Path=LiElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiCompLenTxBl}"
ParamTxBx="{Binding Path=LiCompLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
@@ -369,43 +309,6 @@
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
ParamTxBx="{Binding Path=LoTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoPerpTxBl}"
ParamTxBx="{Binding Path=LoPerp,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoElevTxBl}"
ParamTxBx="{Binding Path=LoElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoCompLenTxBl}"
ParamTxBx="{Binding Path=LoCompLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
@@ -444,53 +347,6 @@
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding LeaveTabTxBl}"
ParamChBx="{Binding Path=LeaveTab,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
</Expander.Header>
<StackPanel Margin="2">
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabLenTxBl}"
ParamTxBx="{Binding Path=TabLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabLenErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabHeightTxBl}"
ParamTxBx="{Binding Path=TabHeight,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabHeightErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabAngleTxBl}"
ParamTxBx="{Binding Path=TabAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabAngleErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabDistTxBl}"
ParamTxBx="{Binding Path=TabDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabDistErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabMinTxBl}"
ParamTxBx="{Binding Path=TabMin,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabMinErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabMaxTxBl}"
ParamTxBx="{Binding Path=TabMax,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabMaxErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding LeaveTabTxBl}"
@@ -571,7 +427,7 @@
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
@@ -224,7 +224,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -1,4 +1,4 @@
<UserControl x:Class="FiveAxisMachinigParameterExpanderV"
<UserControl x:Class="FiveAxisMachiningParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
@@ -216,6 +216,11 @@
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
@@ -1,6 +1,6 @@
Imports EgtWPFLib5.EgtFloating
Public Class FiveAxisMachinigParameterExpanderV
Public Class FiveAxisMachiningParameterExpanderV
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
@@ -80,16 +80,4 @@ Public Class FiveAxisMachinigParameterExpanderV
Return TryCast(target, T)
End Function
Private Sub StackPanel_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If e.Key = Key.Tab Then
Dim s As EgtWPFLib5.StringParamV = TryCast(e.OriginalSource, EgtWPFLib5.StringParamV)
If Not IsNothing(s) Then
s.MoveFocus(New TraversalRequest(FocusNavigationDirection.Next))
End If
e.Handled = True
End If
End Sub
End Class
@@ -214,7 +214,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -80,28 +80,25 @@
<Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}"
Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="0,2.5,0,2.5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox Name="ViewToolBtn"
Content="{Binding ViewToolBtnMsg}"
IsChecked="{Binding ViewTool}"
Style="{StaticResource ViewTool_CheckBox}"/>
<Button Command="{Binding PreviewMachiningTool_Command}"
x:Name="ButtonPreview"
Style="{StaticResource PreviewTool_Button}">
<Image Source="{Binding sToolPreview_Image}" Stretch="Uniform"/>
</Button>
<Slider Grid.Row="1"
<Slider Grid.Column="1"
x:Name="SliderV"
Value="{Binding SliderValue}"
IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"
IsEnabled="{Binding Slider_IsEnable}"
TickFrequency="{Binding SliderTick}"
Minimum="1"
Maximum="{Binding SliderScale}"
IsSnapToTickEnabled="False"
Style="{StaticResource SliderValue_Slider}"/>
</Grid>
@@ -1,5 +1,5 @@
Imports EgtWPFLib5
Imports EgtWPFLib5.EgtFloating
Imports EgtCAM5.MachiningParameterExpanderVM
Imports EgtUILib
Public Class MachiningParameterExpanderV
@@ -9,9 +9,12 @@ Public Class MachiningParameterExpanderV
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
Me.SliderV.Focusable = False
' Associo il gestore evento m_EventFocusOnSlider all'evento generato da FocusOnSlider
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnSlider, AddressOf FocusOnSlider
' Associo il gestore evento m_EventFocusOnButtonPreview all'evento generato da FocusOnButtonPreview
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnButtonPreview, AddressOf FocusOnButtonPreview
End Sub
''' <summary>
@@ -21,4 +24,11 @@ Public Class MachiningParameterExpanderV
Me.SliderV.Focus()
End Sub
''' <summary>
''' Funzione che mette il focus sul bottone
''' </summary>
Friend Sub FocusOnButtonPreview()
Me.ButtonPreview.Focus()
End Sub
End Class
@@ -1,6 +1,4 @@
Imports System.ComponentModel
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtUILib
Imports EgtWPFLib5
Public Class MachiningParameterExpanderVM
@@ -10,6 +8,32 @@ Public Class MachiningParameterExpanderVM
''' Evento che permette di mettere il focus sullo slider
''' </summary>
Friend Event m_EventFocusOnSlider()
''' <summary>
''' Evento che permette di mettere il focus sul bottone
''' </summary>
Friend Event m_EventFocusOnButtonPreview()
Private m_nPreviewMachiningTool As Integer = MCH_LOOK.NONE
Public ReadOnly Property nPreviewMachiningTool As Integer
Get
Return m_nPreviewMachiningTool
End Get
End Property
Friend Sub SetPreviewMachiningTool(value As MCH_LOOK)
m_nPreviewMachiningTool = value
NotifyPropertyChanged(NameOf(nPreviewMachiningTool))
End Sub
Private m_sToolPreview_Image As String
Public ReadOnly Property sToolPreview_Image As String
Get
Return m_sToolPreview_Image
End Get
End Property
Friend Sub SetToolPreview_Image(value As String)
m_sToolPreview_Image = value
NotifyPropertyChanged(NameOf(sToolPreview_Image))
End Sub
Private WithEvents m_CurrOperation As MachiningTreeViewItem
Public Property CurrOperation As MachiningTreeViewItem
@@ -54,29 +78,6 @@ Public Class MachiningParameterExpanderVM
End Get
End Property
Private m_bPreviewTool As Boolean = False
Public Property ViewTool As Boolean
Get
Return m_bPreviewTool
End Get
Set(value As Boolean)
If value Then
EgtPreparePreviewMachiningTool()
m_bPreviewTool = True
ResetSliderValue()
Else
EgtRemovePreviewMachiningTool()
m_bPreviewTool = False
ResetSliderValue()
End If
EgtDraw()
End Set
End Property
Friend Sub SetViewTool(value As Boolean)
ViewTool = value
NotifyPropertyChanged("ViewTool")
End Sub
' Slider per muovere l'utensile in aggiunta ai pulsanti indietro e avanti
Private m_SliderScale As Integer = 100
Public ReadOnly Property SliderScale As Integer
@@ -85,15 +86,15 @@ Public Class MachiningParameterExpanderVM
End Get
End Property
Friend Sub SetSliderScale(value As Integer)
m_SliderScale = Math.Max( value, 1)
m_SliderScale = Math.Max(value, 1)
If m_SliderScale <= 10 Then
m_SliderTick = 1
Else
m_SliderTick = CInt( m_SliderScale / 10)
m_SliderTick = CInt(m_SliderScale / 10)
End If
NotifyPropertyChanged( NameOf(SliderScale))
NotifyPropertyChanged( NameOf(SliderTick))
End Sub
NotifyPropertyChanged(NameOf(SliderScale))
NotifyPropertyChanged(NameOf(SliderTick))
End Sub
Private m_SliderTick As Integer = 10
Public ReadOnly Property SliderTick As Integer
@@ -109,7 +110,7 @@ Public Class MachiningParameterExpanderVM
Return m_SliderValue
End Get
Set(value As Integer)
If m_bPreviewTool Then
If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, value - m_SliderValue)
If nId <> GDB_ID.NULL Then m_nPtEntId = nId
EgtDraw()
@@ -118,7 +119,7 @@ Public Class MachiningParameterExpanderVM
End Set
End Property
Friend Sub ResetSliderValue()
If m_bPreviewTool Then
If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
Else
m_nPtEntId = GDB_ID.NULL
@@ -127,8 +128,9 @@ Public Class MachiningParameterExpanderVM
NotifyPropertyChanged(NameOf(SliderValue))
End Sub
Friend Sub SetSliderValue(value As Integer)
If m_nPreviewMachiningTool = MCH_LOOK.NONE Then Return
Dim nOldSliderValue As Integer = m_SliderValue
m_SliderValue = Math.Min( Math.Max( m_SliderValue + value, 1), m_SliderScale)
m_SliderValue = Math.Min(Math.Max(m_SliderValue + value, 1), m_SliderScale)
Dim nStep As Integer = m_SliderValue - nOldSliderValue
If nStep = 0 Then Return
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, nStep)
@@ -137,6 +139,17 @@ Public Class MachiningParameterExpanderVM
NotifyPropertyChanged(NameOf(SliderValue))
End Sub
Private m_Slider_IsEnable As Boolean
Public ReadOnly Property Slider_IsEnable As Boolean
Get
Return m_Slider_IsEnable
End Get
End Property
Friend Sub SetSlider_IsEnable(value As Boolean)
m_Slider_IsEnable = value
NotifyPropertyChanged(NameOf(Slider_IsEnable))
End Sub
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
Dim WoodMillParamExpanderV As WoodMillingParameterExpanderV
@@ -152,8 +165,9 @@ Public Class MachiningParameterExpanderVM
Dim StoneDrillParamExpanderV As StoneDrillingParameterExpanderV
Dim SurfFinishParamExpanderV As SurfFinishingParameterExpanderV
Dim WjParamExpanderV As WaterjettingParameterExpanderV
Dim FiveAxExpanderV As FiveAxisMachinigParameterExpanderV
Dim FiveAxExpanderV As FiveAxisMachiningParameterExpanderV
Dim SurfRoughExpanderV As SurfRoughingParameterExpanderV
Dim ProbExpanderV As ProbingParameterExpanderV
Private Sub Dummy()
@@ -192,7 +206,7 @@ Public Class MachiningParameterExpanderVM
Select Case nType
Case MCH_OY.DRILLING
If MatType = MaterialType.STONE Then
If MatType = MaterialType.STONE5 Then
If IsNothing(StoneDrillParamExpanderV) Then StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
StoneDrillParamExpanderV.DataContext = m_CurrOperation
Return StoneDrillParamExpanderV
@@ -202,7 +216,7 @@ Public Class MachiningParameterExpanderVM
Return WoodDrillParamExpanderV
End If
Case MCH_OY.SAWING
If MatType = MaterialType.STONE Then
If MatType = MaterialType.STONE5 Then
If IsNothing(StoneSawParamExpanderV) Then StoneSawParamExpanderV = New StoneSawingParameterExpanderV
StoneSawParamExpanderV.DataContext = m_CurrOperation
Return StoneSawParamExpanderV
@@ -216,7 +230,7 @@ Public Class MachiningParameterExpanderVM
If IsNothing(BeamMillParamExpanderV) Then BeamMillParamExpanderV = New BeamMillingParameterExpanderV
BeamMillParamExpanderV.DataContext = m_CurrOperation
Return BeamMillParamExpanderV
ElseIf MatType = MaterialType.STONE Then
ElseIf MatType = MaterialType.STONE5 Then
If IsNothing(StoneMillParamExpanderV) Then StoneMillParamExpanderV = New StoneMillingParameterExpanderV
StoneMillParamExpanderV.DataContext = m_CurrOperation
Return StoneMillParamExpanderV
@@ -234,7 +248,7 @@ Public Class MachiningParameterExpanderVM
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
Return StoneSawFinishParamExpanderV
Case MCH_OY.POCKETING
If MatType = MaterialType.STONE Or MatType = MaterialType.STONE5 Then
If MatType = MaterialType.STONE5 Then
' se macchina di tipo STONE ricavo il tipo di utensile
Dim sMachiningToolName = String.Empty
EgtMdbSetCurrMachining(sName)
@@ -270,13 +284,17 @@ Public Class MachiningParameterExpanderVM
WjParamExpanderV.DataContext = m_CurrOperation
Return WjParamExpanderV
Case MCH_OY.FIVEAXISMILLING
If IsNothing(FiveAxExpanderV) Then FiveAxExpanderV = New FiveAxisMachinigParameterExpanderV
If IsNothing(FiveAxExpanderV) Then FiveAxExpanderV = New FiveAxisMachiningParameterExpanderV
FiveAxExpanderV.DataContext = m_CurrOperation
Return FiveAxExpanderV
Case MCH_OY.SURFROUGHING
If IsNothing(SurfRoughExpanderV) Then SurfRoughExpanderV = New SurfRoughingParameterExpanderV
SurfRoughExpanderV.DataContext = m_CurrOperation
Return SurfRoughExpanderV
Case MCH_OY.PROBING
If IsNothing(ProbExpanderV) Then ProbExpanderV = New ProbingParameterExpanderV
ProbExpanderV.DataContext = m_CurrOperation
Return ProbExpanderV
End Select
'MachiningParameterExpanderItem.ReadOperationParam()
@@ -314,9 +332,8 @@ Public Class MachiningParameterExpanderVM
#End Region ' Messages
' Definizione comando
Private m_cmdNextStepTool As ICommand
Private m_cmdPrevStepTool As ICommand
Private m_cmdUpdateMachining As ICommand
Private m_cmdPreviewMachiningTool As ICommand
#Region "CONSTRUCTOR"
@@ -337,6 +354,51 @@ Public Class MachiningParameterExpanderVM
RaiseEvent m_EventFocusOnSlider()
End Sub
''' <summary>
''' Funzione che attiva l'evento che mette il focus sul bottone
''' </summary>
Public Sub FocusButtonPreview()
RaiseEvent m_EventFocusOnButtonPreview()
End Sub
Friend Sub PreviewMachiningTool()
Select Case nPreviewMachiningTool
Case MCH_LOOK.NONE
SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
SetSlider_IsEnable(True)
Case MCH_LOOK.TAB_TOOL
SetPreviewMachiningTool(MCH_LOOK.TAB_HEAD)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Head.png")
SetSlider_IsEnable(True)
Case MCH_LOOK.TAB_HEAD
SetPreviewMachiningTool(MCH_LOOK.NONE)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Delete.png")
SetSlider_IsEnable(False)
End Select
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
EgtDraw()
End Sub
Friend Sub RevertPreviewMachiningTool()
Select Case nPreviewMachiningTool
Case MCH_LOOK.NONE
SetPreviewMachiningTool(MCH_LOOK.TAB_HEAD)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Head.png")
SetSlider_IsEnable(True)
Case MCH_LOOK.TAB_TOOL
SetPreviewMachiningTool(MCH_LOOK.NONE)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Delete.png")
SetSlider_IsEnable(False)
Case MCH_LOOK.TAB_HEAD
SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
SetSlider_IsEnable(True)
End Select
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
EgtDraw()
End Sub
#End Region ' Methods
#Region "COMMANDS"
@@ -371,76 +433,20 @@ Public Class MachiningParameterExpanderVM
Return
End If
Dim bRecalc As Boolean = False
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
bRecalc = True
Else
' Controllo se il tipo e' dr o sr o lr bRecalc e' true come quando viene selezionato Shift
For Each ItemNote As NoteListBoxItem In m_CurrOperation.NotesList
bRecalc = ItemNote.Type.Equals("dr") OrElse ItemNote.Type.Equals("lr") OrElse ItemNote.Type.Equals("sr") OrElse ItemNote.Type.Equals("br")
If bRecalc Then Exit For
Next
End If
' Verifico se forzato ricalcolo da interfaccia
Dim bRecalc As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) <> 0)
' La modifica di alcuni parametri forza il ricalcolo della geometria
Dim ModifiedGeometry As Boolean = m_CurrOperation.m_IsModifiedSelectedFaceUseType
' aggiorno valori modificati
' Aggiorno parametri di lavorazione
m_CurrOperation.WriteOperationParam()
' Carico tutta la geometria selezionata in una lista
Dim SelectedGeometry As New List(Of Integer)
Dim EntityIndex As Integer = EgtGetFirstSelectedObj()
While EntityIndex <> GDB_ID.NULL
SelectedGeometry.Add(EntityIndex)
EntityIndex = EgtGetNextSelectedObj()
End While
' Gestione speciale per superfici ( si aggiunge l'identificazione della faccia)
If SelectedGeometry.Count() > 0 AndAlso
(EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_MESH Or EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_FRGN) Then
' Aggiorno lista speciale con facce
SelData.VerifyIdSub()
' Verifico se geometria cambiata, confrontando selezione attuale con facet con geometria di lavorazione
Dim nInd As Integer = 0
Dim nMchId, nMchSub As Integer
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
Dim nSelId, nSelSub As Integer
SelData.GetIdSub(nInd, nSelId, nSelSub)
While Not ModifiedGeometry And (nMchId <> GDB_ID.NULL Or nSelId <> GDB_ID.NULL)
' Controllo uguaglianza
If nMchId <> nSelId Or nMchSub <> nSelSub Then ModifiedGeometry = True
' Passo al successivo
nInd += 1
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
SelData.GetIdSub(nInd, nSelId, nSelSub)
End While
If ModifiedGeometry Then
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllIdSub(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
End If
' Gestione standard per altre entità (curve, testi, ...)
Else
' Verifico se geometria cambiata, confrontando selezione attuale con geometria di lavorazione
Dim nInd As Integer = 0
Dim nMchId, nMchSub As Integer
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
Dim nSelId As Integer
nSelId = If(nInd < SelectedGeometry.Count(), SelectedGeometry(nInd), GDB_ID.NULL)
While Not ModifiedGeometry And (nMchId <> GDB_ID.NULL Or nSelId <> GDB_ID.NULL)
' Controllo uguaglianza
If nMchId <> nSelId Then ModifiedGeometry = True
' Passo al successivo
nInd += 1
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
nSelId = If(nInd < SelectedGeometry.Count(), SelectedGeometry(nInd), GDB_ID.NULL)
End While
' Imposto geometria selezionata come geometria di lavorazione
If ModifiedGeometry Then
EgtSetMachiningGeometry(SelectedGeometry.ToArray)
End If
End If
' Ricalcolo la lavorazione
If Not EgtApplyMachining(bRecalc Or ModifiedGeometry) Then
' Imposto geometria da lavorare (tutta quella selezionata)
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllSelectedGeom(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
' Rigenero la lavorazione
If Not EgtApplyMachining(bRecalc) Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
Dim sInfo As String = String.Empty
@@ -459,9 +465,13 @@ Public Class MachiningParameterExpanderVM
Map.refStatusBarVM.NotifyStatusOutput("")
End If
End If
' Restart visualizzazione utensile
SetSliderScale( EgtGetPreviewMachiningToolStepCount())
SetViewTool(True)
EgtPreparePreviewMachiningTool()
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
SetSliderScale(EgtGetPreviewMachiningToolStepCount())
SetSlider_IsEnable(True)
ResetSliderValue()
IsModified(False)
ErrorOnOperation(False)
EgtDraw()
@@ -470,6 +480,23 @@ Public Class MachiningParameterExpanderVM
#End Region ' UpdateMachiningCommand
#Region "PreviewMachiningTool_Command"
Public ReadOnly Property PreviewMachiningTool_Command As ICommand
Get
If m_cmdPreviewMachiningTool Is Nothing Then
m_cmdPreviewMachiningTool = New RelayCommand(AddressOf PreviewMachiningTool)
End If
Return m_cmdPreviewMachiningTool
End Get
End Property
Public Sub PreviewMachiningTool(ByVal param As Object)
PreviewMachiningTool()
End Sub
#End Region ' PreviewMachiningTool_Command
#End Region ' Commands
Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified
@@ -232,7 +232,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -129,13 +129,13 @@
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
@@ -241,7 +241,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -0,0 +1,275 @@
<UserControl x:Class="ProbingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<sys:Int32 x:Key="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
</UserControl.Resources>
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/>
</EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox>
<TextBlock Text="{Binding SystemNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Visibility="{Binding SysNotes_Visibility}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid>
</StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<Expander.Header>
<UniformGrid Columns="2">
<TextBlock Text="{Binding AdvancedParamMsg}"
Margin="2.5"/>
<Button Command="{Binding ShowNoteListComboCommand}"
ToolTip="{Binding ShowNoteToolTip}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
Grid.Column="1"
HorizontalAlignment="Right"
Margin="2.5,2.5,7,2.5"
Width="20">
<Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
ParamChBx="{Binding Path=InvertToolDir,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
ParamTxBx="{Binding Path=InitAngs,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
ParamTxBx="{Binding Path=BlockedAxis,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SolChoiceTypeTxBl}"
ParamCmBxList="{Binding Path=SolChoiceTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True,
Mode=OneWay}"
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
<Grid Grid.Row="1" Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ItemsControl ItemsSource="{Binding NotesList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Description}"
Margin="0,5.5,29,0"
Width="82"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<TabControl SelectedIndex="{Binding SelTypeValue}"
Grid.Column="1"
Background="Transparent"
BorderBrush="Transparent">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="TEXT">
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
ParamTxBx="{Binding Path=Feed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
ParamTxBx="{Binding Path=TipFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ParamTxBx="{Binding Path=StartFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
ParamTxBx="{Binding Path=EndFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl>
@@ -0,0 +1,83 @@
Imports EgtWPFLib5.EgtFloating
Public Class ProbingParameterExpanderV
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
CalculateOperationParametersStackPanelMaxHeight()
End Sub
Dim m_bSizeChanging As Boolean = False
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
m_bSizeChanging = False
End Sub
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
If IndexedExpander.IsExpanded Then
OpenedExpanderList.Add(True)
IndexedExpander.IsExpanded = False
Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
' Sottraggo anche i padding
AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
Else
OpenedExpanderList.Add(False)
End If
Else
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
If OpenedExpanderList(Index) Then
IndexedExpander.IsExpanded = True
End If
End If
Next
End Sub
' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
Dim target As DependencyObject = dependencyObject
Do
target = LogicalTreeHelper.GetParent(target)
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
If IsNothing(target) Then
target = dependencyObject
Do
target = VisualTreeHelper.GetParent(target)
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
End If
Return TryCast(target, T)
End Function
End Class
@@ -213,7 +213,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -217,7 +217,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -211,7 +211,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -124,10 +124,10 @@
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList,
ParamCmBxList="{Binding Path=LeadLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
</Expander>
@@ -209,7 +209,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -217,7 +217,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -124,12 +124,6 @@
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadLinkTypeTxBl}"
ParamCmBxList="{Binding Path=LeadLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
@@ -230,7 +224,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -92,7 +92,12 @@
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OverLapTxBl}"
ParamTxBx="{Binding Path=OverLap,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
@@ -236,6 +241,11 @@
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
@@ -199,7 +199,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -218,7 +218,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -236,7 +236,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -226,7 +226,12 @@
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/>
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
@@ -28,6 +28,31 @@ Public Class DispositionOpListBoxItem
End Set
End Property
Public Property OnOffAll As Boolean?
Get
Dim OpIndexes As List(Of Integer) = GetOpIndexes()
' Ritorno il valore specificato in base agli stati delle operazioni di cui abbiamo raccolto gli indici
If OpIndexes.Count = 0 Then Return False
Dim bTemp As Boolean = DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpIndexes(0)), MachiningOpListBoxItem).OnOff
For OpInDispIndex = 1 To OpIndexes.Count - 1
If DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpIndexes(OpInDispIndex)), MachiningOpListBoxItem).OnOff <> bTemp Then Return Nothing
Next
Return bTemp
End Get
Set(value As Boolean?)
' Recupero gli indici delle operazioni della Disposizione corrente
Dim OpIndexes As List(Of Integer) = GetOpIndexes()
If OpIndexes.Count = 0 Then
NotifyPropertyChanged(NameOf(OnOffAll))
Return
End If
For Each OpInDispIndex In OpIndexes
DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpInDispIndex), MachiningOpListBoxItem).OnOff = If(IsNothing(value), False, CBool(value))
Next
End Set
End Property
Private m_Image As String = String.Empty
Public Property Image As String
Get
@@ -1,5 +1,4 @@
Imports System.ComponentModel
Imports System.Collections.ObjectModel
Imports System.Collections.ObjectModel
Imports EgtUILib
Public Class MachiningOpListBoxItem
@@ -126,6 +125,31 @@ Public Class MachiningOpListBoxItem
End Get
End Property
Private m_bOnOff As Boolean = True
Public Property OnOff As Boolean
Get
Return m_bOnOff
End Get
Set(value As Boolean)
If m_bOnOff <> value Then
m_bOnOff = value
Dim bOldEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
' se abilitato, eseguo operazione
Dim status As Integer = GDB_ST.OFF
If value Then
status = GDB_ST.ON_
End If
ModifyStatusLamp()
EgtSetStatus(Id, status)
If bOldEnMod Then EgtEnableModified()
EgtDraw()
End If
NotifyPropertyChanged(NameOf(OnOff))
End Set
End Property
' Definizione comandi
Private m_cmdModifyNameEnter As ICommand
Private m_cmdModifyNameEsc As ICommand
@@ -177,6 +201,21 @@ Public Class MachiningOpListBoxItem
End Select
End Function
Private Sub ModifyStatusLamp()
' Recupero l'indice dell'operazione a cui abbiamo appena modificato lo Status e l'indice della Disposizione che la contiene
Dim DispIndex As Integer = 0
Dim OpIndex As Integer = 0
For Each OpItem In Map.refOperationsListExpanderVM.OperationList
If EgtGetOperationType(OpItem.Id) = MCH_OY.DISP Then DispIndex = OpIndex
If OpItem.Id = Id Then
Exit For
End If
OpIndex += 1
Next
' Notifico StatusAll per calcolare lo stato della CheckBox della Disposizione
Map.refOperationsListExpanderVM.OperationList(DispIndex).NotifyPropertyChanged(NameOf(DispositionOpListBoxItem.OnOffAll))
End Sub
#Region "COMMANDS"
#Region "ModifyNameEnterCommand"
@@ -37,14 +37,23 @@ Public Class OperationListBoxItem
If Not IsNothing(value) Then
Dim indexes As List(Of OperationListBoxItem) = New List(Of OperationListBoxItem)
Dim Count As Integer = 0
Dim nLastInd As Integer = -1
Dim nInd As Integer = 0
For Each OperationListBoxItem In Map.refOperationsListExpanderVM.OperationList
If OperationListBoxItem.IsSelected And OperationListBoxItem.Id <> m_Id Then
Count = Count + 1
indexes.Add(OperationListBoxItem)
nLastInd = nInd
End If
nInd += 1
Next
' Per evitare problemi con primo Item selezionato quando ListView non ancora esistente
If indexes.Count = 1 And nLastInd = 0 Then
Map.refOperationsListExpanderVM.OperationList(0).IsSelected = False
indexes.Clear()
End If
' E' possibile selezionare più lavorazioni solo se della stessa fase
If indexes.Count > 0 Then
If EgtGetOperationPhase(Id) <> EgtGetOperationPhase(indexes(0).Id) Then
Return
@@ -52,10 +61,11 @@ Public Class OperationListBoxItem
End If
m_IsSelected = value
' Verifico se c'è l'operazione precedente
If Not value Or
indexes.Any(Function(i) i.Type = MCH_OY.DISP) Or
(Not indexes.Any(Function(i) i.Type = MCH_OY.DISP) And Type = MCH_OY.DISP And Count > 0) Then
(Not indexes.Any(Function(i) i.Type = MCH_OY.DISP) And Type = MCH_OY.DISP And indexes.Count > 0) Then
m_IsSelected = False
@@ -74,9 +84,10 @@ Public Class OperationListBoxItem
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
NotifyPropertyChanged("IsSelected")
' Aggiorno visualizzazione
EgtDraw()
If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
Return
End If
' Imposto la fase di lavorazione corrente
EgtSetCurrPhase(EgtGetOperationPhase(Id))
' Abilito la selezione dei Percorsi di Lavorazione
@@ -124,7 +135,7 @@ Public Class OperationListBoxItem
Map.refMachiningTreeExpanderVM.nSelectedOperationId = Me.Id
End If
' Aggiorno visualizzazione
EgtDraw()
If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
End If
' Resetto valori slider
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
@@ -1,7 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtUILib
Public Class OperationParametersExpanderVM
Inherits ViewModelBase
@@ -32,6 +29,7 @@ Public Class OperationParametersExpanderVM
' disattivo MTable e SpecialPanel se vado sulla modifica di una lavorazione
Map.refDoorPanelVM.MTableIsEnabled(Not m_ParametersIsExpanded)
Map.refSpecialPanelVM.SpecialPanelIsEnabled(Not m_ParametersIsExpanded)
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
End Set
End Property
@@ -177,9 +175,16 @@ Public Class OperationParametersExpanderVM
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomWaterJetting
Case MCH_OY.FIVEAXISMILLING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomFiveAxMilling
Case MCH_OY.PROBING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing
End Select
' Imposto visualizzazione utensile
Map.refMachiningParameterExpanderVM.SetViewTool( True)
'Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
'Map.refMachiningParameterExpanderVM.SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
'Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(True)
EgtPreparePreviewMachiningTool()
Map.refMachiningParameterExpanderVM.PreviewMachiningTool()
EgtDraw()
End If
OnPropertyChanged("ParametersIsExpanded")
Return True
@@ -209,7 +214,10 @@ Public Class OperationParametersExpanderVM
EgtDraw()
Else
' Nascondo visualizzazione utensile
Map.refMachiningParameterExpanderVM.SetViewTool( False)
Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.NONE)
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(False)
Map.refMachiningParameterExpanderVM.ResetSliderValue()
EgtRemovePreviewMachiningTool()
End If
ParametersExpanderName = String.Empty
' Disabilito la selezione delle lavorazioni
@@ -1,170 +1,176 @@
<UserControl x:Class="OperationsListExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<StackPanel Name="OperationsListExpanderViewStackPanel" IsEnabled="{Binding OpersListViewIsEnabled}">
<Expander Header="{Binding OperationListHeader}"
IsEnabled="{Binding OpersListViewIsEnabled}"
IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
Style="{StaticResource ExpanderStyle}">
<Expander.InputBindings>
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
</Expander.InputBindings>
<Expander Header="{Binding OperationListHeader}" IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
Style="{StaticResource ExpanderStyle}">
<Expander.InputBindings>
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
</Expander.InputBindings>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel>
<UniformGrid Rows="1">
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/>
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/>
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/>
</UniformGrid>
<UniformGrid Rows="1">
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/>
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/>
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/>
</UniformGrid>
<ListBox IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding OperationList}"
Height="200" x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended">
<ListBox.Resources>
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
<DataTemplate.Resources>
<Style x:Key="LayoutRoot" TargetType="Grid">
<!--<Style.Triggers>
--><!--these are the triggers that make the code cursor jump from box 1 to box 2 to box 3.--><!--
<DataTrigger Binding="{Binding ElementName=Box, Path=Visibility}" Value="Visible">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=Box}"/>
</DataTrigger>
</Style.Triggers>-->
</Style>
</DataTemplate.Resources>
<Border Background="Transparent">
<Border.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick"
<ListBox Grid.Row="1"
ItemsSource="{Binding OperationList}"
IsSynchronizedWithCurrentItem="True"
x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended">
<ListBox.Resources>
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
<DataTemplate.Resources>
<Style x:Key="LayoutRoot" TargetType="Grid"/>
</DataTemplate.Resources>
<Border Background="Transparent">
<Border.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick"
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
CommandParameter="{Binding Id}"/>
</Border.InputBindings>
<Grid Style="{StaticResource LayoutRoot}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="1" Text="{Binding Name}"
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
<TextBox Grid.Column="1" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
Width="150"
x:Name="Box"
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
<!--IsVisibleChanged="MachiningOpListBoxItem_IsVisibleChanged"
</Border.InputBindings>
<Grid Style="{StaticResource LayoutRoot}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="1"
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="2" Text="{Binding Name}"
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
<TextBox Grid.Column="2" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
Width="150"
x:Name="Box"
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
<!--IsVisibleChanged="MachiningOpListBoxItem_IsVisibleChanged"
LostKeyboardFocus="MachiningOpListBoxItem_LostKeyboardFocus">-->
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/>
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
</TextBox.InputBindings>
</TextBox>
<TextBlock Grid.Column="2" Text="{Binding Info}"/>
</Grid>
</Border>
</DataTemplate>
<DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}">
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}">
<Border.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick"
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/>
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
</TextBox.InputBindings>
</TextBox>
<TextBlock Grid.Column="3" Text="{Binding Info}"/>
</Grid>
</Border>
</DataTemplate>
<DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}">
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}">
<Border.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick"
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
CommandParameter="{Binding Id}"/>
</Border.InputBindings>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
<TextBlock Text="{Binding Name}" Foreground="White"
FontSize="15" FontWeight="SemiBold"/>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.Resources>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<!--<Interactivity:Interaction.Triggers>
</Border.InputBindings>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
<CheckBox IsChecked="{Binding OnOffAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
<!--<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}"
IsChecked="{Binding OnOffAll}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>-->
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
<TextBlock Text="{Binding Name}" Foreground="White"
FontSize="15" FontWeight="SemiBold"/>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.Resources>
<!--<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>-->
<!--<Interactivity:Interaction.Triggers>
<Interactivity:EventTrigger EventName="MouseDoubleClick">
<Interactivity:InvokeCommandAction Command="{Binding OperationListDoubleClickCommand}"/>
</Interactivity:EventTrigger>
</Interactivity:Interaction.Triggers>-->
<!--<Interactivity:Interaction.Behaviors>
<!--<Interactivity:Interaction.Behaviors>
<EgtCAM5:ScrollIntoViewForListBox/>
</Interactivity:Interaction.Behaviors>-->
<ListBox.InputBindings>
<KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/>
</ListBox.InputBindings>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="False"/>
<Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="True"/>
<Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{Binding DuplicateMachMsg}"
Command="{Binding DuplicateMachCommand}"
IsEnabled="{Binding DuplicateCmd_IsEnabled}">
</MenuItem>
<MenuItem Header="{Binding MachToDbMsg}"
Command="{Binding MachToDbCommand}"
IsEnabled="{Binding MachToDb_IsEnabled}">
</MenuItem>
<MenuItem Header="{Binding RenameMsg}"
Command="{Binding RenameCommand}"
IsEnabled="{Binding Rename_IsEnabled}">
</MenuItem>
</ContextMenu>
</ListBox.ContextMenu>
<ListBox.Style>
<Style TargetType="ListBox">
<EventSetter Event="SelectionChanged" Handler="ItemsControl_SelectionChanged"/>
</Style>
</ListBox.Style>
</ListBox>
<ListBox.InputBindings>
<KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/>
</ListBox.InputBindings>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="False"/>
<Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="True"/>
<Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{Binding DuplicateMachMsg}"
Command="{Binding DuplicateMachCommand}"
IsEnabled="{Binding DuplicateCmd_IsEnabled}">
</MenuItem>
<MenuItem Header="{Binding MachToDbMsg}"
Command="{Binding MachToDbCommand}"
IsEnabled="{Binding MachToDb_IsEnabled}">
</MenuItem>
<MenuItem Header="{Binding RenameMsg}"
Command="{Binding RenameCommand}"
IsEnabled="{Binding Rename_IsEnabled}">
</MenuItem>
</ContextMenu>
</ListBox.ContextMenu>
<ListBox.Style>
<Style TargetType="ListBox">
<EventSetter Event="SelectionChanged" Handler="ItemsControl_SelectionChanged"/>
</Style>
</ListBox.Style>
</ListBox>
<UniformGrid Rows="1">
<Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30" IsEnabled="{Binding MoveUp_IsEnabled}" />
<Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30" IsEnabled="{Binding MoveDown_IsEnabled}"/>
<Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/>
<Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/>
</UniformGrid>
<UniformGrid Grid.Row="2" Rows="1">
<Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30" IsEnabled="{Binding MoveUp_IsEnabled}" />
<Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30" IsEnabled="{Binding MoveDown_IsEnabled}"/>
<Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/>
<Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/>
</UniformGrid>
</StackPanel>
</Expander>
</StackPanel>
</Grid>
</Expander>
</UserControl>
@@ -84,6 +84,8 @@ Public Class OperationsListExpanderVM
Set(value As Boolean)
If value <> m_ListIsExpanded Then
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value)
SetStatusOnLamp()
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(value)
End If
End Set
End Property
@@ -111,6 +113,37 @@ Public Class OperationsListExpanderVM
End Set
End Property
Private m_tmpOperationList As New ObservableCollection(Of MachiningOpListBoxItem)
Public Property tmpOperationList As ObservableCollection(Of MachiningOpListBoxItem)
Get
Return m_tmpOperationList
End Get
Set(value As ObservableCollection(Of MachiningOpListBoxItem))
m_tmpOperationList = value
End Set
End Property
Private m_StatusLampList As New ObservableCollection(Of StatusLamp)
Public Property StatusLampList As ObservableCollection(Of StatusLamp)
Get
Return m_StatusLampList
End Get
Set(value As ObservableCollection(Of StatusLamp))
m_StatusLampList = value
End Set
End Property
' Forza il disegno quando seleziono la lampadina
Private m_ForceDrawInIsSelected As Boolean = True
Public Property ForceDrawInIsSelected As Boolean
Get
Return m_ForceDrawInIsSelected
End Get
Set(value As Boolean)
m_ForceDrawInIsSelected = value
End Set
End Property
Public ReadOnly Property DuplicateCmd_IsEnabled As Boolean
Get
Dim SelType As Integer = MCH_OY.NONE
@@ -258,7 +291,7 @@ Public Class OperationsListExpanderVM
#Region "CONSTRUCTOR"
Sub New()
m_bMoveThroughDisps = ( GetPrivateProfileInt( S_MACH, K_MOVETHROUGHDISPS, 0) <> 0)
m_bMoveThroughDisps = (GetPrivateProfileInt(S_MACH, K_MOVETHROUGHDISPS, 0) <> 0)
' Creo riferimento a questa classe in Map
Map.SetRefOperationsListExpanderVM(Me)
Me.ListIsExpanded = True
@@ -333,7 +366,7 @@ Public Class OperationsListExpanderVM
For Each nId As Integer In vRawId
EgtKeepRawPart(nId, nLastPhase)
Next
EgtKeepAllDispAxes( nLastPhase)
EgtKeepAllDispAxes(nLastPhase)
For Each nId As Integer In vFxtId
EgtKeepFixture(nId, nLastPhase)
Next
@@ -435,10 +468,13 @@ Public Class OperationsListExpanderVM
If EgtGetOperationMode(selOperation.Id) Then
Map.refOperationParametersExpanderVM.ParametersIsExpanded = True
If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then
Map.refMachiningParameterExpanderVM.SetSliderScale( EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue()
EgtDraw()
End If
End If
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
End Sub
#End Region ' OperationListDoubleClickCommand
@@ -462,55 +498,55 @@ Public Class OperationsListExpanderVM
''' </summary>
Public Sub MoveUp()
' Verifico il numero di elementi selezionati
Dim indexes As New List( Of Integer)()
Dim indexes As New List(Of Integer)()
For index As Integer = 0 To OperationList.Count - 1
' Verifico gli elementi selezionati
If OperationList.Item( index).IsSelected Then
If OperationList.Item(index).IsSelected Then
' Se presente una disposizione esco
If EgtGetOperationType( OperationList.Item( index).Id) = MCH_OY.DISP Then Return
If EgtGetOperationType(OperationList.Item(index).Id) = MCH_OY.DISP Then Return
' Aggiungo l'operazione
indexes.Add( index)
indexes.Add(index)
End If
Next
Dim lenIndexes As Integer = indexes.Count
' Recupero Id ultima entità selezionata e precedente a quelle selezionate
Dim LastSelectedId As Integer = OperationList( indexes( lenIndexes - 1)).Id
Dim PreviousId As Integer = OperationList( indexes( 0) - 1).Id
Dim LastSelectedId As Integer = OperationList(indexes(lenIndexes - 1)).Id
Dim PreviousId As Integer = OperationList(indexes(0) - 1).Id
' Sposto l'operazione precedente a quelle selezionate nell'ambiente Egt
If EgtRelocate( PreviousId, LastSelectedId, GDB_POS.AFTER) Then
If EgtRelocate(PreviousId, LastSelectedId, GDB_POS.AFTER) Then
' Sposto l'operazione precedente a quelle selezionate nella grafica
OperationList.Move( indexes(0) - 1, indexes( lenIndexes - 1)) ' + 1)
OperationList.Move(indexes(0) - 1, indexes(lenIndexes - 1)) ' + 1)
' Ricalcolo le lavorazioni selezionate e quella che era precedente (e ora è seguente)
If Not m_bMoveThroughDisps Then
For index As Integer = 0 To indexes.Count - 1
EgtSetCurrMachining( OperationList( indexes( index)).Id)
EgtApplyMachining( False)
EgtSetCurrMachining(OperationList(indexes(index)).Id)
EgtApplyMachining(False)
Next
EgtSetCurrMachining( PreviousId)
EgtApplyMachining( False)
EgtSetCurrMachining(PreviousId)
EgtApplyMachining(False)
EgtDraw()
OnPropertyChanged( "MoveUp_IsEnabled")
OnPropertyChanged( "MoveDown_IsEnabled")
OnPropertyChanged("MoveUp_IsEnabled")
OnPropertyChanged("MoveDown_IsEnabled")
Map.refProjectVM.EmitTitle()
Else
Dim nCurrPhase As Integer = EgtGetOperationPhase(LastSelectedId)
For index As Integer = 0 To indexes.Count - 1
Dim nOpeId As Integer = OperationList( indexes( index) - 1).Id
If EgtGetOperationType( nOpeId) <> MCH_OY.DISP Then
EgtAdjustOperationPhase( nOpeId)
EgtSetCurrMachining( nOpeId)
EgtApplyMachining( False)
Dim nOpeId As Integer = OperationList(indexes(index) - 1).Id
If EgtGetOperationType(nOpeId) <> MCH_OY.DISP Then
EgtAdjustOperationPhase(nOpeId)
EgtSetCurrMachining(nOpeId)
EgtApplyMachining(False)
End If
Next
If EgtGetOperationType( PreviousId) <> MCH_OY.DISP Then
EgtSetCurrMachining( PreviousId)
EgtApplyMachining( False)
If EgtGetOperationType(PreviousId) <> MCH_OY.DISP Then
EgtSetCurrMachining(PreviousId)
EgtApplyMachining(False)
End If
Dim nNewPhase As Integer = EgtGetOperationPhase(LastSelectedId)
If nNewPhase <> nCurrPhase Then EgtSetCurrPhase( nNewPhase)
If nNewPhase <> nCurrPhase Then EgtSetCurrPhase(nNewPhase)
EgtDraw()
OnPropertyChanged( NameOf(MoveUp_IsEnabled))
OnPropertyChanged( NameOf(MoveDown_IsEnabled))
OnPropertyChanged(NameOf(MoveUp_IsEnabled))
OnPropertyChanged(NameOf(MoveDown_IsEnabled))
Map.refProjectVM.EmitTitle()
End If
End If
@@ -537,52 +573,52 @@ Public Class OperationsListExpanderVM
''' </summary>
Public Sub MoveDown()
' Verifico il numero di elementi selezionati
Dim indexes As New List( Of Integer)()
Dim indexes As New List(Of Integer)()
For index As Integer = 0 To OperationList.Count - 1
' Verifico gli elementi selezionati
If OperationList.Item( index).IsSelected Then
If OperationList.Item(index).IsSelected Then
' Se presente una disposizione esco
If EgtGetOperationType( OperationList.Item( index).Id) = MCH_OY.DISP Then Return
If EgtGetOperationType(OperationList.Item(index).Id) = MCH_OY.DISP Then Return
' Aggiungo l'operazione
indexes.Add( index)
indexes.Add(index)
End If
Next
Dim lenIndexes As Integer = indexes.Count
' Recupero Id prima entità selezionata e successiva a quelle selezionate
Dim FirstSelectedId As Integer = OperationList( indexes( 0)).Id
Dim NextId As Integer = OperationList( indexes( lenIndexes - 1) + 1).Id
Dim FirstSelectedId As Integer = OperationList(indexes(0)).Id
Dim NextId As Integer = OperationList(indexes(lenIndexes - 1) + 1).Id
' Sposto l'operazione successiva a quelle selezionate nell'ambiente Egt
If EgtRelocate( NextId, FirstSelectedId, GDB_POS.BEFORE) Then
If EgtRelocate(NextId, FirstSelectedId, GDB_POS.BEFORE) Then
' Sposto l'operazione successiva a quelle selezionate nella grafica
OperationList.Move( indexes( lenIndexes - 1) + 1, indexes( 0))
OperationList.Move(indexes(lenIndexes - 1) + 1, indexes(0))
' Ricalcolo la lavorazioni selezionate e quella che era seguente (e ora è precedente)
If Not m_bMoveThroughDisps Then
EgtSetCurrMachining( NextId)
EgtApplyMachining( False)
EgtSetCurrMachining(NextId)
EgtApplyMachining(False)
For index As Integer = 0 To indexes.Count - 1
EgtSetCurrMachining( OperationList( indexes( index)).Id)
EgtApplyMachining( False)
EgtSetCurrMachining(OperationList(indexes(index)).Id)
EgtApplyMachining(False)
Next
EgtDraw()
OnPropertyChanged( "MoveUp_IsEnabled")
OnPropertyChanged( "MoveDown_IsEnabled")
OnPropertyChanged("MoveUp_IsEnabled")
OnPropertyChanged("MoveDown_IsEnabled")
Map.refProjectVM.EmitTitle()
Else
If EgtGetOperationType( NextId) <> MCH_OY.DISP Then
EgtSetCurrMachining( NextId)
EgtApplyMachining( False)
If EgtGetOperationType(NextId) <> MCH_OY.DISP Then
EgtSetCurrMachining(NextId)
EgtApplyMachining(False)
End If
For index As Integer = 0 To indexes.Count - 1
Dim nOpeId As Integer = OperationList( indexes( index) + 1).Id
If EgtGetOperationType( nOpeId) <> MCH_OY.DISP Then
EgtAdjustOperationPhase( nOpeId)
EgtSetCurrMachining( nOpeId)
EgtApplyMachining( False)
Dim nOpeId As Integer = OperationList(indexes(index) + 1).Id
If EgtGetOperationType(nOpeId) <> MCH_OY.DISP Then
EgtAdjustOperationPhase(nOpeId)
EgtSetCurrMachining(nOpeId)
EgtApplyMachining(False)
End If
Next
EgtDraw()
OnPropertyChanged( NameOf( MoveUp_IsEnabled))
OnPropertyChanged( NameOf( MoveDown_IsEnabled))
OnPropertyChanged(NameOf(MoveUp_IsEnabled))
OnPropertyChanged(NameOf(MoveDown_IsEnabled))
Map.refProjectVM.EmitTitle()
End If
End If
@@ -608,6 +644,8 @@ Public Class OperationsListExpanderVM
''' Execute the Point. This method is invoked by the PointCommand.
''' </summary>
Public Sub Update()
Dim tmpStatusLamp As New StatusLamp()
Map.refOperationsListExpanderVM.StatusLampList = tmpStatusLamp.LoadStatusLamp()
' Cursore di attesa
Application.Current.MainWindow.ForceCursor = True
Application.Current.MainWindow.Cursor = Cursors.Wait
@@ -616,16 +654,17 @@ Public Class OperationsListExpanderVM
Dim sErr As String = String.Empty
Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr)
EgtSetModified()
' Deseleziono l'Operazione selezionata e la de-evidenzio nel Disegno
' Aggiorno geometrie di lavorazione selezionate e marcate
m_ForceDrawInIsSelected = False
For Each Operation In OperationList
If Operation.IsSelected Then
Operation.IsSelected = False
Operation.IsSelected = True
End If
Next
' Ricarico la lista delle Operazioni
LoadOperationList(GDB_ID.NULL)
' Aggiorno visualizzazione e ritorno a cursore standard
m_ForceDrawInIsSelected = True
EgtDraw()
' Ripristino cursore
Application.Current.MainWindow.ForceCursor = False
Application.Current.MainWindow.Cursor = Cursors.Arrow
' In caso di errori, li segnalo
@@ -633,7 +672,8 @@ Public Class OperationsListExpanderVM
If Not String.IsNullOrEmpty(sErr) Then
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
' Errore nell'aggiornamento delle lavorazioni!
MessageBox.Show(EgtMsg(5346), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(MSG_OPERATION + 11))
@@ -999,7 +1039,9 @@ Public Class OperationsListExpanderVM
Private Sub LoadOperationList()
OperationList.Clear()
tmpOperationList.Clear()
Dim Id As Integer
Dim OpStatusOnOff As Integer
Dim OpStatus As Boolean = True
Dim OpName As String = String.Empty
Dim OpType As Integer = 0
@@ -1012,9 +1054,14 @@ Public Class OperationsListExpanderVM
If IsValidMachiningType(OpType) Then
EgtSetCurrMachining(Id)
OpStatus = EgtGetOperationMode(Id)
EgtGetStatus(Id, OpStatusOnOff)
EgtGetMachiningParam(MCH_MP.TOOL, OpTool)
EgtGetMachiningParam(MCH_MP.NAME, OpMach)
OperationList.Add(New MachiningOpListBoxItem(Id, OpStatus, OpName, OpType, OpTool, OpMach))
' Dichiarato per far si che le due liste operino in contemporaneo
Dim local_MachiningOpListBoxItem As New MachiningOpListBoxItem(Id, OpStatus, OpName, OpType, OpTool, OpMach)
OperationList.Add(local_MachiningOpListBoxItem)
' Lista creata per lavorare solo su le operazioni di macchina, utilizzata per la gestione dello spegnimento e accensione delle lamp
tmpOperationList.Add(local_MachiningOpListBoxItem)
ElseIf IsValidDispositionType(OpType) Then
OpStatus = True
OpTool = String.Empty
@@ -1255,8 +1302,11 @@ Public Class OperationsListExpanderVM
' Annullo creazione nuova lavorazione
If m_NewMachining Then EndNewMachining(GDB_ID.NULL)
' Disabilito visualizzazione utensile
If Not IsNothing(m_MachiningParameterExpander) Then
Map.refMachiningParameterExpanderVM.SetViewTool( False)
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.NONE)
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(False)
Map.refMachiningParameterExpanderVM.ResetSliderValue()
EgtRemovePreviewMachiningTool()
End If
' Deseleziono le operazioni correnti per eliminare il mark
For Each Operation In OperationList
@@ -1266,6 +1316,83 @@ Public Class OperationsListExpanderVM
Next
End Sub
Private Sub SetStatusOnLamp()
If Not IsNothing(m_tmpOperationList) Then
For Each ItemOp As MachiningOpListBoxItem In m_tmpOperationList
If Not ItemOp.OnOff Then
EgtSetStatus(ItemOp.Id, GDB_ST.OFF)
End If
Next
End If
EgtDraw()
End Sub
#End Region ' Methods
End Class
Public Class StatusLamp
#Region "FIELDS & PROPERTIES"
Private m_nId As Integer
Public Property nId As Integer
Get
Return m_nId
End Get
Set(value As Integer)
m_nId = value
End Set
End Property
Private m_bStatusLamp As Boolean
Public Property bStatusLamp As Boolean
Get
Return m_bStatusLamp
End Get
Set(value As Boolean)
m_bStatusLamp = value
End Set
End Property
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(nId As Integer, bStatusLamp As Boolean)
m_nId = nId
m_bStatusLamp = bStatusLamp
End Sub
Sub New()
End Sub
#End Region ' Constructor
#Region "METHODS"
Public Function LoadStatusLamp() As ObservableCollection(Of StatusLamp)
Dim tmpStatusLampList As New ObservableCollection(Of StatusLamp)
For Each ItemOp As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
tmpStatusLampList.Add(New StatusLamp(ItemOp.Id, ItemOp.OnOff))
Next
Return tmpStatusLampList
End Function
Public Sub UpdateStatusLamp()
Dim tmpStatusLamp As StatusLamp
If Not IsNothing(Map.refOperationsListExpanderVM.tmpOperationList) Then
For Each ItemOp As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
tmpStatusLamp = Map.refOperationsListExpanderVM.StatusLampList.FirstOrDefault(Function(x) x.nId = ItemOp.Id)
If Not tmpStatusLamp.bStatusLamp Then
EgtSetStatus(ItemOp.Id, GDB_ST.OFF)
ItemOp.OnOff = False
End If
Next
End If
End Sub
#End Region ' Methods
End Class
@@ -51,7 +51,14 @@
<TextBlock Text="{Binding VMillMsg}" Margin="5,0,0,0"/>
</StackPanel>
<Grid>
<StackPanel Orientation="Horizontal" Visibility="{Binding Trace_Visibility}"
IsEnabled="{Binding Trace_IsEnabled}" Margin="10,5,10,0">
<CheckBox HorizontalAlignment="Left" VerticalAlignment="Center"
IsChecked="{Binding TraceActive}"/>
<TextBlock Text="{Binding TraceMsg}" Margin="5,0,0,0"/>
</StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
@@ -18,6 +17,10 @@ Public Class SimulationExpanderVM
Set(value As Boolean)
If value <> m_Simulation_IsExpanded Then
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.SIMULATION, value)
Map.refOperationsListExpanderVM.StatusLampList.Clear()
Dim tmpStatusLamp As New StatusLamp()
Map.refOperationsListExpanderVM.StatusLampList = tmpStatusLamp.LoadStatusLamp()
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
End If
End Set
End Property
@@ -246,7 +249,8 @@ Public Class SimulationExpanderVM
Dim SliderVal As Double = GetPrivateProfileDouble(S_SIMUL, K_SLIDERVAL, 10)
SliderValue = SliderVal
' Gestione check VMill
If IsKeyEnabledVirtualMilling() And EgtUILib.GetPrivateProfileInt(S_VMILL, K_VM_ENABLE, 0, m_sCurrMachIniFilePath) <> 0 Then
If IsKeyEnabledVirtualMilling() And
EgtUILib.GetPrivateProfileInt(S_VMILL, K_VM_ENABLE, 0, m_sCurrMachIniFilePath) <> 0 Then
VMill_Visibility = Visibility.Visible
VMill_IsEnabled = True
Dim bVal As Boolean
@@ -259,6 +263,16 @@ Public Class SimulationExpanderVM
VMillActive = False
EgtEnableModified()
End If
' Gestione check Trace
If IniFile.GetPrivateProfileInt(S_SIMUL, K_TRACEENABLE, 0) <> 0 And
EgtUILib.GetPrivateProfileInt(S_TOOLTRACE, K_TT_ENABLE, 0, m_sCurrMachIniFilePath) <> 0 Then
Trace_Visibility = Visibility.Visible
Trace_IsEnabled = True
If TraceActive Then TraceActive = True
Else
Trace_Visibility = Visibility.Collapsed
Trace_IsEnabled = False
End If
' Aggiorno visualizzazione dati macchina
ShowCncData()
StatusMsg = EgtMsg(MSG_SIMULATION + 14) ' HOME
@@ -348,8 +362,10 @@ Public Class SimulationExpanderVM
End If
' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
UpdateMachView()
' Aggiorno visualizzazione
EgtDraw()
' Aggiorno visualizzazione (solo se interfaccia non minimizzata, per aumentare velocità)
If Application.Current.MainWindow.WindowState <> WindowState.Minimized Then
EgtDraw()
End If
' Aggiorno dati CNC
If nShowDataCounter = 5 Or GetSimulationStatus() = MCH_SIM_ST.UI_PAUSE Or GetSimulationStatus() = MCH_SIM_ST.UI_STOP Then
ShowCncData()
@@ -361,7 +377,7 @@ Public Class SimulationExpanderVM
End If
Else
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
System.Threading.Thread.Sleep(4)
System.Threading.Thread.Sleep(5)
End If
' Costringo ad aggiornare UI
UpdateUI()
@@ -393,6 +409,7 @@ Public Class SimulationExpanderVM
MachineAxisList(Index).IsReadOnlyAxesValue = True
Next
End If
Trace_IsEnabled = (value = MCH_SIM_ST.UI_PAUSE OrElse value = MCH_SIM_ST.UI_STOP)
EgtSimSetUiStatus(GetStatus())
End Sub
@@ -432,18 +449,19 @@ Public Class SimulationExpanderVM
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
#End If
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & sCncFile
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & Path.GetFileName(sCncFile)
Else
sCncFile = Path.ChangeExtension(sCurrFilePath, Nothing)
If IniFile.m_bMachiningGroup Then
Dim sMGrpName As String = String.Empty
If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then
sCncFile &= "_" & sMGrpName & ".cnc"
sCncFile &= "_" & sMGrpName
sInfo &= "-" & sMGrpName
End If
Else
sCncFile &= ".cnc"
End If
Dim sExt As String = ".cnc"
EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath)
sCncFile = Path.ChangeExtension(sCncFile, sExt)
End If
Return True
End Function
@@ -451,16 +469,16 @@ Public Class SimulationExpanderVM
Friend Sub SimulationExpander_Update_CncData( nFlag As Integer)
If Simulation_IsExpanded Then
ShowCncData()
' Se fermo per Collisione rilevata da script Lua
If nFlag = 11 Then
' Se fermo per Collisione rilevata da script Lua o per altra richiesta
If nFlag = 11 Or nFlag = 12 Then
' Imposto stato Pausa
SetSimulationStatus(MCH_SIM_ST.UI_PAUSE)
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage")
' Dichiaro di non arrestarsi alla successiva notifica di collisione
m_bStopOnNextCollision = False
' Se fermo per Collisione, dichiaro di non arrestarsi alla successiva notifica di collisione
If nFlag = 11 Then m_bStopOnNextCollision = False
End If
End If
End Sub
+21 -8
View File
@@ -1,24 +1,37 @@
<UserControl x:Class="MachiningOptionPanelV"
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:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid x:Name="MachiningGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid.RowDefinitions>
<RowDefinition MinHeight="100" Height="400" MaxHeight="800"
EgtCAM5:MachiningOptionPanelVM.IsExpanded="{Binding OperationsListRowIsExpanded}"
EgtCAM5:MachiningOptionPanelVM.TargetSplitter="{Binding ElementName=MachiningGridSplitter}"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--ContentPresenter that contains the OperationsListExpander-->
<ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/>
<GridSplitter Name="MachiningGridSplitter" Style="{StaticResource General_GridSplitter}"/>
<!--ContentPresenter that contains the OperationParametersExpander-->
<ContentPresenter Content="{Binding OperationParametersExpander,Mode=OneWay}"/>
<ContentPresenter Grid.Row="1" Content="{Binding OperationParametersExpander,Mode=OneWay}"/>
<!--ContentPresenter that contains the MachiningsTreeExpander-->
<ContentPresenter Content="{Binding MachiningsTreeExpander}"/>
<ContentPresenter Grid.Row="2" Content="{Binding MachiningsTreeExpander}"/>
<!--ContentPresenter that contains the SimulationExpander-->
<ContentPresenter Content="{Binding SimulationExpander}"/>
<ContentPresenter Grid.Row="3" Content="{Binding SimulationExpander}"/>
<!--ContentPresenter that contains the EstimationsExpander-->
<ContentPresenter Content="{Binding EstimationsExpander}"/>
<ContentPresenter Grid.Row="4" Content="{Binding EstimationsExpander}"/>
<Button Content="{Binding GenerateMsg}" Height="30"
<Button Grid.Row="5"
Content="{Binding GenerateMsg}" Height="30"
IsEnabled="{Binding GenerateIsEnabled}"
Command="{Binding GenerateCommand}"/>
</StackPanel>
</Grid>
</UserControl>
+20 -2
View File
@@ -1,7 +1,25 @@
Public Class MachiningOptionPanelV
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
Dim x = ciao.MaxHeight
Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Map.SetRefMachiningOptionPanelV(Me)
If Not IsActivePlugin() Then
AddHandler MachiningGrid.Loaded,
Sub()
DynamicGridModule.RestoreMachiningGridLayout(MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
MachiningGrid.UpdateLayout()
End Sub
AddHandler MachiningGridSplitter.DragCompleted,
Sub()
DynamicGridModule.SaveMachiningGridLayout(MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
End Sub
End If
End Sub
End Class
+75
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Imports System.IO
Public Class MachiningOptionPanelVM
Inherits ViewModelBase
@@ -132,6 +133,17 @@ Public Class MachiningOptionPanelVM
End Get
End Property
Private m_OperationsListRowIsExpanded As Boolean = True
Public ReadOnly Property OperationsListRowIsExpanded As Boolean
Get
Return m_OperationsListRowIsExpanded
End Get
End Property
Friend Sub SetOperationsListRowIsExpanded(value As Boolean)
m_OperationsListRowIsExpanded = value
OnPropertyChanged("OperationsListRowIsExpanded")
End Sub
#Region "Messages"
Public ReadOnly Property GenerateMsg As String
@@ -195,4 +207,67 @@ Public Class MachiningOptionPanelVM
#End Region ' COMMANDS
#Region "DEPENCY PROPERTY"
Public Shared ReadOnly IsExpandedProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"IsExpanded",
GetType(Boolean),
GetType(MachiningOptionPanelVM),
New PropertyMetadata(True, AddressOf OnIsExpandedChanged)
)
Public Shared Sub SetIsExpanded(element As DependencyObject, value As Boolean)
element.SetValue(IsExpandedProperty, value)
End Sub
Public Shared Function GetIsExpanded(element As DependencyObject) As Boolean
Return CType(element.GetValue(IsExpandedProperty), Boolean)
End Function
Public Shared Function GetTargetSplitter(d As DependencyObject) As GridSplitter
Return CType(d.GetValue(TargetSplitterProperty), GridSplitter)
End Function
Public Shared Sub SetTargetSplitter(d As DependencyObject, value As GridSplitter)
d.SetValue(TargetSplitterProperty, value)
End Sub
Public Shared ReadOnly TargetSplitterProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"TargetSplitter",
GetType(GridSplitter),
GetType(MachiningOptionPanelVM),
New PropertyMetadata(Nothing)
)
Private Shared Sub OnIsExpandedChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim row As RowDefinition = TryCast(d, RowDefinition)
If IsNothing(row) Then Return
Dim isExpanded As Boolean = CBool(e.NewValue)
Dim splitter = MachiningOptionPanelVM.GetTargetSplitter(row)
If Not IsNothing(splitter) Then
splitter.IsEnabled = isExpanded
splitter.Visibility = If(isExpanded, Visibility.Visible, Visibility.Collapsed)
End If
If Not isExpanded Then
row.ClearValue(RowDefinition.HeightProperty)
row.Height = New GridLength(1, GridUnitType.Auto)
row.MinHeight = 0
Else
If File.Exists(Map.refMainWindowVM.DimensionDir) Then
DynamicGridModule.RestoreMachiningGridLayout(Map.refMachiningOptionPanelV.MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
Map.refMachiningOptionPanelV.MachiningGrid.UpdateLayout()
Else
row.Height = New GridLength(350)
End If
End If
End Sub
#End Region ' Depency Property
End Class
+1
View File
@@ -60,6 +60,7 @@ Public Class OptionPanelVM
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
End If
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SetManageLayerIsExpanded(True)
NotifyPropertyChanged("ModePanel")
End Sub
+66 -6
View File
@@ -12,8 +12,10 @@ Friend Module OptionModule
Friend m_GridColor As Color3d
' Flag per visualizzazione spessa delle linee
Friend m_bThickLine As Boolean
' Flag per visualizzazione smussata delle superfici
Friend m_bSmoothTriMesh As Boolean
' Qualità di visualizzazione delle superfici
Friend m_ShowSurfQuality As SceneSurfQualityOpt
' Tipo di visualizzazione delle Zmap
Friend m_nShowZmapType As Integer
' Colore di default in disegno
Friend m_DefMaterialColor As Color3d
@@ -23,7 +25,10 @@ Friend Module OptionModule
' Parametri per import
Friend m_dDxfScaleFactor As Double
Friend m_dStlScaleFactor As Double
Friend m_dOffScaleFactor As Double
Friend m_dPlyScaleFactor As Double
Friend m_dImgScaleFactor As Double
Friend m_dAdvImpTolerance As Double
' Parametri per export
Friend m_nExportDxfFlag As Integer
@@ -56,7 +61,9 @@ Friend Module OptionModule
Friend m_SelGeomSurfRoughing As SceneSelModeOpt
Friend m_SelGeomWaterJetting As SceneSelModeOpt
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
Friend m_SelVMillQuality As VMillSelTypeOpt
Friend m_SelGeomProbing As SceneSelModeOpt
' Qualità di calcolo del virtual milling
Friend m_VMillQuality As VMillSelTypeOpt
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
Friend m_bNewMachiningIsLastOne As Boolean
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
@@ -67,6 +74,9 @@ Friend Module OptionModule
Friend m_bBeamOn As Boolean
Friend m_bWallOn As Boolean
Friend m_bDoorsOn As Boolean
Friend m_bWindowOn As Boolean
Friend m_bTrimmingOn As Boolean
Friend m_bReversePostOn As Boolean
Friend m_bGunstockOn As Boolean
' inizializzazione lettura variabili ad inizio programma
@@ -107,17 +117,31 @@ Friend Module OptionModule
' Inizializzo flag linee ingrossate
m_bThickLine = (GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1)
' Inizializzo flag visualizzazione smussata delle superfici
m_bSmoothTriMesh = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
Dim nSSQ As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWSURFQUALITY, 0)
m_ShowSurfQuality = DirectCast( Math.Min( Math.Max( nSSQ, -2), 2), SceneSurfQualityOpt)
' Inizializzo tipo di visualizzazione Zmap
m_nShowZmapType = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 9)
' Inizio colore di default in disegno
Dim DefColor As New Color3d(0, 0, 0)
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
m_DefMaterialColor = DefColor
' Inizializzo tolleranza geometrica
m_dGeometryTolerance = GetPrivateProfileDouble(S_GEOMDB, K_SURFTMTOLER, 0.05)
' Inizializzo stile corrente delle quotature
m_dExtLineLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
m_dArrowLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
m_dTextDist = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
m_nLenIsMM = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
m_nDecDigit = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
m_sFont = "" : GetPrivateProfileStringUtf8(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", m_sFont)
m_dTextHeight = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
' Inizializzo variabili per import
m_dDxfScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
m_dStlScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
m_dOffScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_OFFSCALE, 1)
m_dPlyScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_PLYSCALE, 1)
m_dImgScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_IMGSCALE, 1)
m_dAdvImpTolerance = GetPrivateProfileDouble(S_IMPORT, K_ADVTOLER, 0.05)
' Inizializzo variabili per export
m_nExportDxfFlag = GetPrivateProfileInt(S_EXPORT, K_DXFFLAG, EEX_FL.COMP_LAYER)
m_nImgWidth = GetPrivateProfileInt(S_EXPORT, K_IMGWIDTH, 400)
@@ -148,9 +172,12 @@ Friend Module OptionModule
m_SelGeomSurfRoughing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMFIVEAXMILLING, -1)
m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELVMILLQUALITY, 0)
m_SelVMillQuality = If(Temp < -2 Or Temp > 2, VMillSelTypeOpt.HIGHER, DirectCast(Temp, VMillSelTypeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMPROBING, -1)
m_SelGeomProbing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
' Inizializzo qualità di virtual milling
Temp = GetPrivateProfileInt(S_MACH, K_VMILLQUALITY, 0)
m_VMillQuality = DirectCast(Math.Min( Math.Max( Temp, -2), 2), VMillSelTypeOpt)
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
' Inizializzo variabile che indica se usare script di disposizione
@@ -160,9 +187,42 @@ Friend Module OptionModule
m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
m_bWindowOn = (GetPrivateProfileInt(S_WINDOW, K_WINDOWENABLE, 0) <> 0)
m_bTrimmingOn = (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
m_bReversePostOn = (GetPrivateProfileInt(S_REVERSEPOST, K_REVERSEPOSTENABLE, 0) <> 0)
m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
End Sub
' restituisco spessore linee
Friend Function GetLineWidth() As Integer
Return If( m_bThickLine, 2, 1)
End Function
' imposto stato visualizzazione superfici
Friend Sub SetShowSurfQuality( bRedraw As Boolean)
Dim bSmoothTriMesh As Boolean = True
Dim dSrfBezShowTol As Double = 0.2
Select m_ShowSurfQuality
Case SceneSurfQualityOpt.LOWER
bSmoothTriMesh = False
dSrfBezShowTol = 4
Case SceneSurfQualityOpt.LOW
bSmoothTriMesh = False
dSrfBezShowTol = 1
Case SceneSurfQualityOpt.STANDARD
bSmoothTriMesh = True
dSrfBezShowTol = 0.2
Case SceneSurfQualityOpt.HIGH
bSmoothTriMesh = True
dSrfBezShowTol = 0.05
Case SceneSurfQualityOpt.HIGHER
bSmoothTriMesh = True
dSrfBezShowTol = 0.01
End Select
EgtSetShowTriaAdv(bSmoothTriMesh, false)
EgtSetShowSurfBezierTol(dSrfBezShowTol, bRedraw)
End Sub
End Module
' Classe che identifica una lingua del programma con nome e path del file dei messaggi
+121 -27
View File
@@ -9,11 +9,12 @@
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinWidth="400" MinHeight="382"
Width="400" Height="575"
Width="400" Height="600"
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<EgtWPFLib5:EgtCustomWindow.Resources>
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
<local:SceneSurfQualityOptConverter x:Key="SceneSurfQualityOptConverter"/>
<local:VMillTypeConverter x:Key="VMillTypeConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources>
@@ -65,10 +66,17 @@
Grid.Row="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding ThickLine}"
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SmoothTriMeshMsg}" VerticalAlignment="Center"
<TextBlock Text="{Binding SceneSurfQualityMsg}" VerticalAlignment="Center"
Grid.Row="1" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SmoothTriMesh}"
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding SceneSurfQualityOptList, Mode=OneWay}"
SelectedItem="{Binding SelectedSceneSurfQualityOpt}"
Grid.Column="1" Grid.Row="1" Height="25" Margin="0,5,0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource SceneSurfQualityOptConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<UniformGrid Columns="2"
Margin="0,0,0,5">
@@ -77,7 +85,31 @@
SelectedItem="{Binding SelectedTextFont}" Height="25"
Margin="10,5,0,0"/>
</UniformGrid>
<Grid Margin="5,5,5,5">
<GroupBox Header="ShowZmap"
Visibility="{Binding ShowZmapVisibility}"
Margin="0,0,0,5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding ShowZmapSurf}"
Content="Surfaces" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="0" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapLines}"
Content="Lines" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="1" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapNormals}"
Content="Normals" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="2" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapBiColor}"
Content="BiColor" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="3" Margin="5,5,10,5" VerticalAlignment="Center"/>
</Grid>
</GroupBox>
<Grid Margin="5,100,5,5">
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
</Grid>
</StackPanel>
@@ -136,6 +168,9 @@
</TabItem>
<TabItem Header="{Binding ImportMsg}">
<StackPanel Margin="5,5,5,0">
<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header=""
Margin="0,0,0,5">
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
@@ -147,10 +182,12 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding UnitScaleMsg}" />
Text="{Binding UnitScaleMsg}"/>
<TextBlock Grid.Row="0" Grid.Column="2"
VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding FactorScaleMsg}"/>
@@ -159,12 +196,12 @@
<ComboBox Grid.Row="1" Grid.Column="1"
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
Margin="10,5,0,5"/>
<TextBox Grid.Row="1" Grid.Column="2"
Text="{Binding DxfScaleFactor}" Height="25"
IsEnabled="{Binding DXFScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
Margin="10,5,0,5"/>
<TextBlock Grid.Row="2" Grid.Column="0"
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="2" Grid.Column="1"
@@ -177,17 +214,47 @@
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Grid.Row="3" Grid.Column="0"
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
Text="{Binding OffScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="3" Grid.Column="1"
ItemsSource="{Binding ScaleOffList, Mode=OneWay}"
SelectedItem="{Binding SelectedOffScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="3" Grid.Column="2"
Text="{Binding OffScaleFactor}" Height="25"
IsEnabled="{Binding OffScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Grid.Row="4" Grid.Column="0"
Text="{Binding PlyScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="4" Grid.Column="1"
ItemsSource="{Binding ScalePlyList, Mode=OneWay}"
SelectedItem="{Binding SelectedPlyScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="4" Grid.Column="2"
Text="{Binding PlyScaleFactor}" Height="25"
IsEnabled="{Binding PlyScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Grid.Row="5" Grid.Column="0"
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="5" Grid.Column="1"
ItemsSource="{Binding ScaleImageList, Mode=OneWay}"
SelectedItem="{Binding SelectedImageScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="3" Grid.Column="2"
<TextBox Grid.Row="5" Grid.Column="2"
Text="{Binding ImageScaleFactor}" Height="25"
IsEnabled="{Binding ImageScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
</Grid>
</GroupBox>
<UniformGrid Grid.ColumnSpan="2" Columns="2"
Margin="0,5,0,5">
<TextBlock Text="{Binding AdvImpToleranceMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding AdvImpTolerance}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,0"/>
</UniformGrid>
</StackPanel>
</TabItem>
<TabItem Header="{Binding ExportMsg}">
@@ -214,6 +281,15 @@
Header="{Binding MachiningSelGeomMsg}"
Margin="5,5,5,0">
<UniformGrid Columns="2">
<TextBlock Text="{Binding GeomTypeProbingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedProbingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeDrillingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedDrillingGeomType}" Height="25">
@@ -330,7 +406,7 @@
<UniformGrid Columns="2" Grid.ColumnSpan="2" Margin="0,5,0,0">
<TextBlock Text="{Binding VMillQualityMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding VMillTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedVMillTypeType}" Height="25">
SelectedItem="{Binding SelectedVMillQualityType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource VMillTypeConverter}}"/>
@@ -359,9 +435,9 @@
<StackPanel>
<Grid Margin="5,20,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
@@ -369,33 +445,51 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding SpecialMsg}"
Grid.Row="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}"
Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding BeamMsg}"
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding BeamOn}" IsEnabled="{Binding BeamEnabled}"
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}"
Command="{Binding UpdateBeam_Command}"
Grid.Row="1" Grid.Column="2" Height="26"/>
Grid.Row="0" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WallMsg}"
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}"
Command="{Binding UpdateWall_Command}"
Grid.Row="2" Grid.Column="2" Height="26"/>
Grid.Row="1" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center"
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}"
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}"
Command="{Binding UpdateDoors_Command}"
Grid.Row="2" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WindowMsg}" VerticalAlignment="Center"
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WindowOn}" IsEnabled="{Binding WindowEnabled}"
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
<TextBlock Text="{Binding TrimmingMsg}" VerticalAlignment="Center"
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
<CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}"
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center"
Grid.Row="5" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}"
Grid.Row="5" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
Grid.Row="6" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
Grid.Row="6" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SpecialMsg}"
Grid.Row="7" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}"
Grid.Row="7" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
</Grid>
</StackPanel>
</TabItem>
+494 -53
View File
@@ -34,6 +34,13 @@ Public Class OptionWindowVM
End Get
End Property
Private m_SceneSurfQualityOptList As ObservableCollection(Of SceneSurfQualityOpt) = New ObservableCollection(Of SceneSurfQualityOpt)({SceneSurfQualityOpt.LOWER, SceneSurfQualityOpt.LOW, SceneSurfQualityOpt.STANDARD, SceneSurfQualityOpt.HIGH, SceneSurfQualityOpt.HIGHER})
Public ReadOnly Property SceneSurfQualityOptList As ObservableCollection(Of SceneSurfQualityOpt)
Get
Return m_SceneSurfQualityOptList
End Get
End Property
Private m_FontList As New ObservableCollection(Of String)
Public ReadOnly Property FontList As ObservableCollection(Of String)
Get
@@ -65,6 +72,20 @@ Public Class OptionWindowVM
End Get
End Property
Private m_ScaleOffList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 46)})
Public ReadOnly Property ScaleOffList As List(Of String)
Get
Return m_ScaleOffList
End Get
End Property
Private m_ScalePlyList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 46)})
Public ReadOnly Property ScalePlyList As List(Of String)
Get
Return m_ScalePlyList
End Get
End Property
Private m_ScaleImageList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 46)})
Public ReadOnly Property ScaleImageList As List(Of String)
Get
@@ -84,6 +105,18 @@ Public Class OptionWindowVM
End Set
End Property
Public Property SelectedSceneSurfQualityOpt As SceneSurfQualityOpt
Get
Return OptionModule.m_ShowSurfQuality
End Get
Set(value As SceneSurfQualityOpt)
If WritePrivateProfileString(S_SCENE, K_SHOWSURFQUALITY, CInt(value).ToString()) Then
OptionModule.m_ShowSurfQuality = value
OptionModule.SetShowSurfQuality( true)
End If
End Set
End Property
Public Property SelectedMillingGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomMilling
@@ -144,8 +177,7 @@ Public Class OptionWindowVM
End If
End Set
End Property
Public Property SelectedGenGeomType As SceneSelModeOpt
Public Property SelectedGenGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomGenMachining
End Get
@@ -155,8 +187,7 @@ Public Class OptionWindowVM
End If
End Set
End Property
Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomSurfRoughing
End Get
@@ -166,7 +197,6 @@ Public Class OptionWindowVM
End If
End Set
End Property
Public Property SelectedSurfFinishGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomSurfFinishing
@@ -188,7 +218,6 @@ Public Class OptionWindowVM
' End If
' End Set
'End Property
Public Property SelectedFiveAxGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomFiveAxMilling
@@ -199,14 +228,24 @@ Public Class OptionWindowVM
End If
End Set
End Property
Public Property SelectedVMillTypeType As VMillSelTypeOpt
Public Property SelectedProbingGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelVMillQuality
Return OptionModule.m_SelGeomProbing
End Get
Set(value As SceneSelModeOpt)
If WritePrivateProfileString(S_MACH, K_SELGEOMPROBING, CInt(value).ToString()) Then
OptionModule.m_SelGeomProbing = value
End If
End Set
End Property
Public Property SelectedVMillQualityType As VMillSelTypeOpt
Get
Return OptionModule.m_VMillQuality
End Get
Set(value As VMillSelTypeOpt)
If WritePrivateProfileString(S_MACH, K_SELVMILLQUALITY, CInt(value).ToString()) Then
OptionModule.m_SelVMillQuality = value
If WritePrivateProfileString(S_MACH, K_VMILLQUALITY, CInt(value).ToString()) Then
OptionModule.m_VMillQuality = value
End If
End Set
End Property
@@ -287,19 +326,10 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bThickLine = value
WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1"))
EgtSetLineAttribs(If(value, 2, 1))
End Set
End Property
Public Property SmoothTriMesh As Boolean
Get
Return OptionModule.m_bSmoothTriMesh
End Get
Set(value As Boolean)
OptionModule.m_bSmoothTriMesh = value
WritePrivateProfileString(S_SCENE, K_SHOWTRIAADV, If(value, "1", "0"))
EgtSetShowTriaAdv(value)
Dim nThickLine As Integer = OptionModule.GetLineWidth()
WritePrivateProfileString(S_SCENE, K_LINEWIDTH, nThickLine.ToString())
EgtSetLineAttribs(nThickLine)
EgtDraw()
End Set
End Property
@@ -309,13 +339,68 @@ Public Class OptionWindowVM
End Get
Set(value As String)
OptionModule.m_sFontText = value
Dim sNfeDir As String = String.Empty
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
EgtSetFont(sNfeDir, OptionModule.m_sFontText)
EgtSetFont("", OptionModule.m_sFontText)
WritePrivateProfileString(S_GEOMDB, K_DEFAULTFONT, OptionModule.m_sFontText)
End Set
End Property
Public Property ShowZmapSurf As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 1) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 1)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 1)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapLines As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 2) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 2)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 2)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapNormals As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 4) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 4)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 4)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapBiColor As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 8) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 8)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 8)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property DxfScaleFactor As String
Get
Return LenToString(OptionModule.m_dDxfScaleFactor, 5)
@@ -346,6 +431,36 @@ Public Class OptionWindowVM
End Set
End Property
Public Property OffScaleFactor As String
Get
Return LenToString(OptionModule.m_dOffScaleFactor, 5)
End Get
Set(value As String)
Dim dVal As Double = 0
If StringToLen(value, dVal) AndAlso dVal > 0 Then
OptionModule.m_dOffScaleFactor = dVal
WritePrivateProfileString(S_IMPORT, K_OFFSCALE, DoubleToString(OptionModule.m_dOffScaleFactor, 5))
Map.refProjectVM.GetController().SetScaleForOffImport(OptionModule.m_dOffScaleFactor)
NotifyPropertyChanged("OffScaleFactor")
End If
End Set
End Property
Public Property PlyScaleFactor As String
Get
Return LenToString(OptionModule.m_dPlyScaleFactor, 5)
End Get
Set(value As String)
Dim dVal As Double = 0
If StringToLen(value, dVal) AndAlso dVal > 0 Then
OptionModule.m_dPlyScaleFactor = dVal
WritePrivateProfileString(S_IMPORT, K_PLYSCALE, DoubleToString(OptionModule.m_dPlyScaleFactor, 5))
Map.refProjectVM.GetController().SetScaleForPLyImport(OptionModule.m_dPlyScaleFactor)
NotifyPropertyChanged("PlyScaleFactor")
End If
End Set
End Property
Public Property ImageScaleFactor As String
Get
Return LenToString(OptionModule.m_dImgScaleFactor, 5)
@@ -361,6 +476,20 @@ Public Class OptionWindowVM
End Set
End Property
Public Property AdvImpTolerance As String
Get
Return LenToString(OptionModule.m_dAdvImpTolerance, 5)
End Get
Set(value As String)
Dim dVal As Double = 0
If StringToLen(value, dVal) AndAlso dVal > 0 Then
OptionModule.m_dAdvImpTolerance = dVal
Map.refProjectVM.GetController.SetAdvImpTolerance(OptionModule.m_dAdvImpTolerance)
WritePrivateProfileString(S_IMPORT, K_ADVTOLER, DoubleToString(OptionModule.m_dAdvImpTolerance, 5))
End If
End Set
End Property
Public Property ImageWidth As String
Get
Return OptionModule.m_nImgWidth.ToString()
@@ -515,6 +644,28 @@ Public Class OptionWindowVM
End Set
End Property
Private m_OffScaleEnable As Boolean = False
Public Property OffScaleEnable As Boolean
Get
Return m_OffScaleEnable
End Get
Set(value As Boolean)
m_OffScaleEnable = value
NotifyPropertyChanged("OffScaleEnable")
End Set
End Property
Private m_PlyScaleEnable As Boolean = False
Public Property PlyScaleEnable As Boolean
Get
Return m_PlyScaleEnable
End Get
Set(value As Boolean)
m_PlyScaleEnable = value
NotifyPropertyChanged("PlyScaleEnable")
End Set
End Property
Private m_ImageScaleEnable As Boolean = False
Public Property ImageScaleEnable As Boolean
Get
@@ -576,6 +727,56 @@ Public Class OptionWindowVM
End Set
End Property
Public Property SelectedOffScale As String
Get
If Math.Abs(OptionModule.m_dOffScaleFactor - ONEMM) < EPS_SMALL * 10 Then
Return ScaleOffList(ScaleOffList.IndexOf("mm"))
ElseIf Math.Abs(OptionModule.m_dOffScaleFactor - ONEINCH) < EPS_SMALL * 10 Then
Return ScaleOffList(ScaleOffList.IndexOf("inch"))
Else
OffScaleEnable = True
Return ScaleOffList(ScaleOffList.IndexOf(EgtMsg(MSG_OPTIONPAGE + 46)))
End If
End Get
Set(value As String)
If value = "mm" Then
OffScaleFactor = LenToString(ONEMM, 3)
OffScaleEnable = False
ElseIf value = "inch" Then
OffScaleFactor = LenToString(ONEINCH, 4)
OffScaleEnable = False
Else
OffScaleFactor = LenToString(OptionModule.m_dOffScaleFactor, 4)
OffScaleEnable = True
End If
End Set
End Property
Public Property SelectedPlyScale As String
Get
If Math.Abs(OptionModule.m_dPlyScaleFactor - ONEMM) < EPS_SMALL * 10 Then
Return ScalePlyList(ScalePlyList.IndexOf("mm"))
ElseIf Math.Abs(OptionModule.m_dPlyScaleFactor - ONEINCH) < EPS_SMALL * 10 Then
Return ScalePlyList(ScalePlyList.IndexOf("inch"))
Else
PlyScaleEnable = True
Return ScalePlyList(ScalePlyList.IndexOf(EgtMsg(MSG_OPTIONPAGE + 46)))
End If
End Get
Set(value As String)
If value = "mm" Then
PlyScaleFactor = LenToString(ONEMM, 3)
PlyScaleEnable = False
ElseIf value = "inch" Then
PlyScaleFactor = LenToString(ONEINCH, 4)
PLyScaleEnable = False
Else
PLyScaleFactor = LenToString(OptionModule.m_dPlyScaleFactor, 4)
PLyScaleEnable = True
End If
End Set
End Property
Public Property SelectedImageScale As String
Get
If Math.Abs(OptionModule.m_dImgScaleFactor - ONEMM) < EPS_SMALL * 10 Then
@@ -657,6 +858,11 @@ Public Class OptionWindowVM
Return (IniFile.m_nKeyOptions And KEY_OPT.DOORS) <> 0
End Get
End Property
Public ReadOnly Property DoorsActive As Boolean
Get
Return IniFile.IsActiveDoors()
End Get
End Property
Public Property DoorsOn As Boolean
Get
Return DoorsEnabled AndAlso OptionModule.m_bDoorsOn
@@ -667,6 +873,51 @@ Public Class OptionWindowVM
End Set
End Property
Public ReadOnly Property WindowEnabled As Boolean
Get
Return (IniFile.m_nKeyOptions And KEY_OPT.WINDOW) <> 0
End Get
End Property
Public Property WindowOn As Boolean
Get
Return OptionModule.m_bWindowOn
End Get
Set(value As Boolean)
OptionModule.m_bWindowOn = value
WritePrivateProfileString(S_WINDOW, K_WINDOWENABLE, If(value, "1", "0"))
End Set
End Property
Public ReadOnly Property TrimmingEnabled As Boolean
Get
Return (IniFile.m_nKeyOptions And KEY_OPT.TRIMMING) <> 0
End Get
End Property
Public Property TrimmingOn As Boolean
Get
Return OptionModule.m_bTrimmingOn
End Get
Set(value As Boolean)
OptionModule.m_bTrimmingOn = value
WritePrivateProfileString(S_TRIMMING, K_TRIMMINGENABLE, If(value, "1", "0"))
End Set
End Property
Public ReadOnly Property ReversePostEnabled As Boolean
Get
Return (IniFile.m_nKeyOptions And KEY_OPT.REVERSEPOST) <> 0
End Get
End Property
Public Property ReversePostOn As Boolean
Get
Return OptionModule.m_bReversePostOn
End Get
Set(value As Boolean)
OptionModule.m_bReversePostOn = value
WritePrivateProfileString(S_REVERSEPOST, K_REVERSEPOSTENABLE, If(value, "1", "0"))
End Set
End Property
Public ReadOnly Property GunstockEnabled As Boolean
Get
Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0
@@ -694,6 +945,7 @@ Public Class OptionWindowVM
Private m_cmdExportMachineCmd As ICommand
Private m_cmdUpdateBeamCmd As ICommand
Private m_cmdUpdateWallCmd As ICommand
Private m_cmdUpdateDoorsCmd As ICommand
#Region "Messages"
@@ -739,9 +991,9 @@ Public Class OptionWindowVM
Return EgtMsg(6536) ' Linee spesse
End Get
End Property
Public ReadOnly Property SmoothTriMeshMsg As String
Public ReadOnly Property SceneSurfQualityMsg As String
Get
Return EgtMsg(6518) ' Superfici smussate
Return EgtMsg(6518) ' Qualità visualizzazione superfici
End Get
End Property
Public ReadOnly Property UpdateLicenceMsg As String
@@ -808,28 +1060,42 @@ Public Class OptionWindowVM
Public ReadOnly Property ImportMsg As String
Get
Return EgtMsg(MSG_OPTIONPAGE + 19)
Return EgtMsg(6519) ' Import
End Get
End Property
Public ReadOnly Property DxfScaleFactorMsg As String
Get
Return EgtMsg(MSG_OPTIONPAGE + 20)
Return EgtMsg(6520) ' DXF
End Get
End Property
Public ReadOnly Property StlScaleFactorMsg As String
Get
Return EgtMsg(MSG_OPTIONPAGE + 21)
Return EgtMsg(6521) ' STL
End Get
End Property
Public ReadOnly Property OffScaleFactorMsg As String
Get
Return EgtMsg(6561) ' OFF
End Get
End Property
Public ReadOnly Property PlyScaleFactorMsg As String
Get
Return EgtMsg(6563) ' PLY
End Get
End Property
Public ReadOnly Property ImageScaleFactorMsg As String
Get
Return EgtMsg(MSG_OPTIONPAGE + 22)
Return EgtMsg(6522) ' Immagini
End Get
End Property
Public ReadOnly Property AdvImpToleranceMsg As String
Get
Return EgtMsg(6562) ' Tolleranza di importazione
End Get
End Property
Public ReadOnly Property ExportMsg As String
Get
Return EgtMsg(MSG_OPTIONPAGE + 23)
Return EgtMsg(6523) ' Export
End Get
End Property
Public ReadOnly Property UnitScaleMsg As String
@@ -941,7 +1207,22 @@ Public Class OptionWindowVM
End Property
Public ReadOnly Property DoorsMsg As String
Get
Return "Doors"
Return "Doors (" & Path.GetFileName( IniFile.m_sDoorsDirPath) & ")"
End Get
End Property
Public ReadOnly Property WindowMsg As String
Get
Return "Window"
End Get
End Property
Public ReadOnly Property TrimmingMsg As String
Get
Return "Trimming"
End Get
End Property
Public ReadOnly Property ReversePostMsg As String
Get
Return "ReversePost"
End Get
End Property
Public ReadOnly Property GunstockMsg As String
@@ -984,6 +1265,12 @@ Public Class OptionWindowVM
Return EgtMsg(31212)
End Get
End Property
Public ReadOnly Property GeomTypeProbingMsg As String
Get
Return EgtMsg(31220)
End Get
End Property
Public ReadOnly Property VMillQualityMsg As String
Get
@@ -994,6 +1281,17 @@ Public Class OptionWindowVM
#End Region
#Region "Visibility"
Public ReadOnly Property ShowZmapVisibility As Visibility
Get
Return If( (IniFile.m_nUserLevel > 5), Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#End Region
#Region "COMMANDS"
#Region "TopSceneBackground"
@@ -1205,10 +1503,18 @@ Public Class OptionWindowVM
Dim sMachDir As String = Path.Combine(IniFile.m_sMachinesRoot, sMachName)
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sMachinesRoot, "Temp")
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory(sTempDir)
Try
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory(sTempDir)
Catch
' Problemi di accesso al direttorio delle macchine
Dim sErr As String = EgtMsg(6564)
EgtOutLog(sErr & " (" & sTempDir & ")")
MessageBox.Show(sErr, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
Return
End Try
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sMachZip)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
@@ -1256,7 +1562,7 @@ Public Class OptionWindowVM
' L'aggiornamento della macchina "{0}" non è riuscito.
Dim sKo As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 35), sMachName)
EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End Try
End If
@@ -1609,6 +1915,116 @@ Public Class OptionWindowVM
#End Region ' UpdateWall
#Region "UpdateDoors"
Public ReadOnly Property UpdateDoors_Command() As ICommand
Get
If m_cmdUpdateDoorsCmd Is Nothing Then
m_cmdUpdateDoorsCmd = New RelayCommand(AddressOf UpdateDoorsCmd)
End If
Return m_cmdUpdateDoorsCmd
End Get
End Property
Public Sub UpdateDoorsCmd()
' Recupero la versione del programma in esecuzione
Dim sExeVer As String = IniFile.GetProgramVersion()
' Verifico presenza di una precedente installazione del Doors (file Version.lua oppure Main.lua)
Dim sDoorsVer As String = ""
IniFile.GetSpecialLuaVersion(IniFile.m_sDoorsDirPath, sDoorsVer)
If String.IsNullOrEmpty(sDoorsVer) Then
If My.Computer.FileSystem.FileExists(Path.Combine(IniFile.m_sDoorsDirPath, "Main.lua")) AndAlso
My.Computer.FileSystem.FileExists(Path.Combine(IniFile.m_sDoorsDirPath, "Machining.lua")) Then
sDoorsVer = "2.6l9"
Else
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
Dim sOut As String = String.Format(EgtMsg(6555), "Doors")
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Esco
Return
End If
End If
' Apro dialogo per richiesta file zip del Doors
Dim DoorsDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".zip",
.Filter = "Doors (.zip)|*.zip",
.CheckFileExists = True,
.ValidateNames = True
}
If DoorsDlg.ShowDialog() <> True Then Return
Dim sDoorsZip As String = DoorsDlg.FileName
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Doors")
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sDoorsZip)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Recupero i dati del nuovo Doors
Dim sNewName = ""
Dim sNewVer = ""
Dim sNewMinExe = ""
IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
' Verifico che sia veramente il Doors
If String.Compare(sNewName, "Doors") <> 0 Then
' Il file zip non contiene il modulo "{0}". - Avviso
Dim sOut As String = String.Format(EgtMsg(6556), "Doors")
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione minima del programma
If String.Compare(sExeVer, sNewMinExe) < 0 Then
' Il nuovo modulo "{0}" richiede un programma con versione minima {1}. - Avviso
Dim sOut As String = String.Format(EgtMsg(6557), "Doors", sNewMinExe)
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione del Doors e se più vecchia chiedo cosa fare
If String.Compare(sNewVer, sDoorsVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "Doors")
If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
End If
' Faccio una copia di backup del Doors corrente
Dim sBackupDir As String = IniFile.m_sDoorsDirPath & ".old"
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
My.Computer.FileSystem.CopyDirectory(IniFile.m_sDoorsDirPath, sBackupDir, True)
Catch ex As Exception
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
Dim sOut As String = String.Format(EgtMsg(6559), "Doors")
EgtOutLog(sOut)
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Try
' Installo il Doors
My.Computer.FileSystem.CopyDirectory(sTempDir, IniFile.m_sDoorsDirPath, True)
' Rimuovo il direttorio temporaneo di installazione
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
' Il modulo "{0}" è stata aggiornato con successo. - Info
Dim sOk As String = String.Format(EgtMsg(6560), "Doors")
EgtOutLog(sOk)
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
End Sub
#End Region ' UpdateDoors
#Region "CloseOptionsCommand"
''' <summary>
@@ -1693,21 +2109,21 @@ Public Class GeomTypeConverter
End Class
Public Class VMillTypeConverter
Public Class SceneSurfQualityOptConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value)
Case VMillSelTypeOpt.LOWER
Return EgtMsg(31215)
Case VMillSelTypeOpt.LOW
Return EgtMsg(31216)
Case VMillSelTypeOpt.STANDARD
Return EgtMsg(31217)
Case VMillSelTypeOpt.HIGH
Return EgtMsg(31218)
Case VMillSelTypeOpt.HIGHER
Return EgtMsg(31219)
Case SceneSurfQualityOpt.LOWER
Return EgtMsg(31215) ' Inferiore
Case SceneSurfQualityOpt.LOW
Return EgtMsg(31216) ' Bassa
Case SceneSurfQualityOpt.STANDARD
Return EgtMsg(31217) ' Media
Case SceneSurfQualityOpt.HIGH
Return EgtMsg(31218) ' Alta
Case SceneSurfQualityOpt.HIGHER
Return EgtMsg(31219) ' Superiore
Case Else
Return ""
End Select
@@ -1716,4 +2132,29 @@ Public Class VMillTypeConverter
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
End Class
Public Class VMillTypeConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value)
Case VMillSelTypeOpt.LOWER
Return EgtMsg(31215) ' Inferiore
Case VMillSelTypeOpt.LOW
Return EgtMsg(31216) ' Bassa
Case VMillSelTypeOpt.STANDARD
Return EgtMsg(31217) ' Media
Case VMillSelTypeOpt.HIGH
Return EgtMsg(31218) ' Alta
Case VMillSelTypeOpt.HIGHER
Return EgtMsg(31219) ' Superiore
Case Else
Return ""
End Select
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
+9 -9
View File
@@ -1,24 +1,24 @@
<UserControl x:Class="PopUpGridPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel Background="Transparent" Orientation="Horizontal">
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}">
<StackPanel Background="#93D5F4" Orientation="Horizontal">
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="3,3,1,3">
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}">
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/CplaneInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}">
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlane3PCommand}" ToolTip="{Binding CPlane3PointsToolTip}" Style="{StaticResource GridViewPanelButton}">
<Button Command="{Binding CPlane3PCommand}" ToolTip="{Binding CPlane3PointsToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/Cplane3POINTS.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlanePerpObjCommand}" ToolTip="{Binding CPlanePerpCurveToolTip}" Style="{StaticResource GridViewPanelButton}">
<Button Command="{Binding CPlanePerpObjCommand}" ToolTip="{Binding CPlanePerpCurveToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/CplanePERPCURVE.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneObjCommand}" ToolTip="{Binding CPlaneObjectToolTip}" Style="{StaticResource GridViewPanelButton}">
<Button Command="{Binding CPlaneObjCommand}" ToolTip="{Binding CPlaneObjectToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,3,3">
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
</Button>
</StackPanel>
+9 -9
View File
@@ -1,24 +1,24 @@
<UserControl x:Class="PopUpViewPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel Background="Transparent" Orientation="Horizontal">
<Button ToolTip="{Binding ZoomInToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomInCommand}">
<StackPanel Background="#93D5F4" Orientation="Horizontal">
<Button ToolTip="{Binding ZoomInToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomInCommand}" Margin="3,3,1,3">
<Image Source="/Resources/GridViewPanel/ZoomIn.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ZoomOutToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomOutCommand}">
<Button ToolTip="{Binding ZoomOutToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomOutCommand}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/ZoomOut.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}">
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/ZoomSel.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}">
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/LookFromISO_NE.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_NWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNWCommand}">
<Button ToolTip="{Binding LookFromIso_NWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNWCommand}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/LookFromISO_NW.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ViewToCPlaneToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ViewToCPlaneCommand}">
<Button ToolTip="{Binding ViewToCPlaneToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ViewToCPlaneCommand}" Margin="1,3,3,3">
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
</Button>
</StackPanel>
+2 -2
View File
@@ -13,10 +13,10 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style>
<Setter Property="DockPanel.Dock" Value="{Binding}" />
<Setter Property="DockPanel.Dock" Value="{Binding}"/>
</Style>
</ItemsControl.ItemContainerStyle>
<interactivity:Interaction.Triggers>
<interactivity:EventTrigger EventName="Loaded">
<interactivity:InvokeCommandAction Command="{Binding LoadedCommand}"/>
-7
View File
@@ -11,13 +11,6 @@ Public Class ProjectV
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo riferimento a questa classe in Map
Map.SetRefProjectV(Me)
'SpecialPanel.Visibility = Visibility.Collapsed
'BeamPanel.Visibility = Visibility.Collapsed
'WallPanel.Visibility = Visibility.Collapsed
'DoorsPanel.Visibility = Visibility.Collapsed
'GunStockPanel.Visibility = Visibility.Collapsed
'PrintingPanel.Visibility = Visibility.Collapsed
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
End Sub
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
+111 -170
View File
@@ -1,10 +1,11 @@
Imports System.Windows.Forms.Integration
Imports System.Windows.Interop
Imports System.Globalization
Imports System.IO
Imports System.Globalization
Imports System.Windows.Forms.Integration
Imports System.Windows.Interop
Imports System.Windows.Threading
Imports EgtUILib
Imports EgtUILib.EgtInterface
Imports EgtWPFLib5
Imports EgtWPFLib5.EgtFloating
Public Class ProjectVM
Inherits TabViewModel
@@ -65,13 +66,6 @@ Public Class ProjectVM
End Get
End Property
Private m_DynamicGridList As New List(Of Object)
Public ReadOnly Property DynamicGridList As List(Of Object)
Get
Return m_DynamicGridList
End Get
End Property
#End Region
#Region "EGTUILIB FIELDS"
@@ -100,9 +94,9 @@ Public Class ProjectVM
Dim m_BottomTrayV As New BottomTrayV
Dim m_SceneContentControlV As New SceneContentControlV
CreateDynamicGrid()
DynamicGridModule.CreateDynamicGrid()
Dim gridSplitter As GridSplitter = CreateGridSplitter()
Dim gridSplitter As GridSplitter = DynamicGridModule.CreateGridSplitter()
' aggiungo componenti interfaccia
Dim bPlugin As Boolean = False
@@ -143,29 +137,27 @@ Public Class ProjectVM
m_DynamicGrid.Children.Add(m_LeftTrayV)
Case Else
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
' aggiungo LeftTrayV alla griglia
'm_DynamicGrid.Children.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
End Select
Next
End If
End If
Next
'm_PanelList.Add(New BottomTrayV)
'm_PanelList.Add(New TopTrayV)
' aggiungo gridSplitter alla griglia
m_DynamicGrid.Children.Add(gridSplitter)
'm_PanelList.Add(New BottomTrayV)
' aggiungo BottomTrayV alla griglia
m_DynamicGrid.Children.Add(m_BottomTrayV)
'm_PanelList.Add(New TopTrayV)
' aggiungo TopTrayV alla griglia
m_DynamicGrid.Children.Add(m_TopTrayV)
' nascondo tasti gestione progetto se attivo plugin
Map.refTopCommandBarVM.SetProjectManagerVisibility(False)
Else
PololateGrid(m_TopTrayV, m_LeftTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
'm_PanelList.Add(New TopTrayV)
'm_PanelList.Add(New LeftTrayV)
'm_PanelList.Add(New RightTrayV)
'm_PanelList.Add(New BottomTrayV)
DynamicGridModule.PopulateGrid(m_TopTrayV, m_LeftTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
' aggiungo TopTrayV alla griglia
m_DynamicGrid.Children.Add(m_TopTrayV)
' aggiungo LeftTrayV alla griglia
@@ -180,6 +172,12 @@ Public Class ProjectVM
'm_PanelList.Add(New SceneContentControlV)
' aggiungo SceneContentControlV alla griglia
m_DynamicGrid.Children.Add(m_SceneContentControlV)
' Carico le dimensioni salvate su ini se presenti
AddHandler m_DynamicGrid.Loaded,
Sub()
DynamicGridModule.RestoreGridLayout(If(IsActivePlugin(), DynamicGridModule.PROJECT_EGTCAM5_PLUGIN, DynamicGridModule.PROJECT_EGTCAM5))
m_DynamicGrid.UpdateLayout()
End Sub
m_PanelList.Add(m_DynamicGrid)
End Sub
@@ -264,6 +262,27 @@ Public Class ProjectVM
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveWindow() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion(IniFile.m_sWindowDirPath, sVersion)
Dim sOut As String = "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveTrimming() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion(IniFile.m_sTrimmingDirPath, sVersion)
Dim sOut As String = "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveReversePost() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion(IniFile.m_sReversePostDirPath, sVersion)
Dim sOut As String = "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveGunStock() Then
bExtensions = True
Dim sVersion As String = "---"
@@ -344,140 +363,11 @@ Public Class ProjectVM
#Region "METHODS"
''' <summary>
''' Funzione per popolare la griglia
''' </summary>
''' <param name="m_TopTrayV"></param>
''' <param name="m_LeftTrayV"></param>
''' <param name="m_RightTrayV"></param>
''' <param name="m_BottomTrayV"></param>
''' <param name="m_SceneContentControlV"></param>
''' <param name="gridSplitter"></param>
Private Shared Sub PololateGrid(m_TopTrayV As TopTrayV, m_LeftTrayV As LeftTrayV, m_RightTrayV As RightTrayV, m_BottomTrayV As BottomTrayV, m_SceneContentControlV As SceneContentControlV, gridSplitter As GridSplitter)
' aggiungo TopTrayV
Grid.SetRow(m_TopTrayV, 0)
Grid.SetColumnSpan(m_TopTrayV, 3)
' aggiungo LeftTrayV
Grid.SetRow(m_LeftTrayV, 1)
Grid.SetColumn(m_LeftTrayV, 0)
Grid.SetRowSpan(m_LeftTrayV, 2)
' aggiungo RightTrayV
Grid.SetRow(m_RightTrayV, 1)
Grid.SetColumn(m_RightTrayV, 2)
Grid.SetRowSpan(m_RightTrayV, 2)
'aggiungo gridSplitter
Grid.SetRow(gridSplitter, 1)
Grid.SetColumn(gridSplitter, 2)
' aggiungo BottomTrayV
Grid.SetRow(m_BottomTrayV, 2)
Grid.SetColumn(m_BottomTrayV, 1)
' aggiungo Scena
Grid.SetRow(m_SceneContentControlV, 1)
Grid.SetColumn(m_SceneContentControlV, 1)
End Sub
''' <summary>
''' Funzione per popolare la griglia con PlugIn
''' </summary>
''' <param name="m_TopTrayV"></param>
''' <param name="m_RightTrayV"></param>
''' <param name="m_BottomTrayV"></param>
''' <param name="m_SceneContentControlV"></param>
''' <param name="gridSplitter"></param>
Private Shared Sub PopolateGridWithPlugIn(m_TopTrayV As TopTrayV, m_RightTrayV As RightTrayV, m_BottomTrayV As BottomTrayV, m_SceneContentControlV As SceneContentControlV, gridSplitter As GridSplitter)
' aggiungo TopTrayV
Grid.SetRow(m_TopTrayV, 0)
Grid.SetColumn(m_TopTrayV, 1)
' aggiungo RightTrayV
Grid.SetRow(m_RightTrayV, 0)
Grid.SetColumn(m_RightTrayV, 2)
Grid.SetRowSpan(m_RightTrayV, 2)
'aggiungo gridSplitter
Grid.SetRow(gridSplitter, 0)
Grid.SetColumn(gridSplitter, 2)
Grid.SetRowSpan(gridSplitter, 2)
' aggiungo BottomTrayV
Grid.SetRow(m_BottomTrayV, 2)
Grid.SetColumn(m_BottomTrayV, 1)
' aggiungo Scena
Grid.SetRow(m_SceneContentControlV, 1)
Grid.SetColumn(m_SceneContentControlV, 1)
End Sub
''' <summary>
''' Creazione GridSplitter
''' </summary>
''' <returns></returns>
Private Shared Function CreateGridSplitter() As GridSplitter
' creo gridsplitter
Return New GridSplitter With {
.Width = 30,
.HorizontalAlignment = HorizontalAlignment.Left,
.VerticalAlignment = VerticalAlignment.Stretch,
.Background = Brushes.Transparent
}
End Function
''' <summary>
''' Creazione Griglia Dinamica
''' </summary>
Private Sub CreateDynamicGrid()
' creo colonne griglia dinamica
Dim gridCol1 As New ColumnDefinition With {
.Width = New GridLength(1, GridUnitType.Auto)
}
'.Width = New GridLength(1, GridUnitType.Auto)
Dim gridCol2 As New ColumnDefinition With {
.Width = New GridLength(1, GridUnitType.Star)
}
Dim gridCol3 As New ColumnDefinition With {
.Width = New GridLength(250)
}
' aggiungo le colonne alla griglia
m_DynamicGrid.ColumnDefinitions.Add(gridCol1)
m_DynamicGrid.ColumnDefinitions.Add(gridCol2)
m_DynamicGrid.ColumnDefinitions.Add(gridCol3)
' creo righe griglia dinamica
Dim gridRow1 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Auto)
}
Dim gridRow2 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Star)
}
Dim gridRow3 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Auto)
}
' aggiungo righe alla griglia
m_DynamicGrid.RowDefinitions.Add(gridRow1)
m_DynamicGrid.RowDefinitions.Add(gridRow2)
m_DynamicGrid.RowDefinitions.Add(gridRow3)
End Sub
Private Sub PreInitializeScene()
' imposto colore di default
Dim DefColor As New Color3d(0, 0, 0)
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
m_ProjectScene.SetDefaultMaterial(DefColor)
m_ProjectScene.SetDefaultMaterial(OptionModule.m_DefMaterialColor)
' imposto colori sfondo
Dim BackTopColor As New Color3d(192, 192, 192)
GetPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
Dim BackBotColor As New Color3d(BackTopColor)
GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
m_ProjectScene.SetViewBackground(BackTopColor, BackBotColor)
' imposto spessore linee
Dim nLineWidth As Integer = 1
nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
m_ProjectScene.SetLineWidth(nLineWidth)
m_ProjectScene.SetViewBackground(OptionModule.m_TopSceneBackground, OptionModule.m_BotSceneBackground)
' imposto colori di evidenziazione
Dim MarkColor As New Color3d(255, 255, 0)
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
@@ -519,6 +409,7 @@ Public Class ProjectVM
End If
End If
m_Controller.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
m_Controller.SetAdvImpTolerance(OptionModule.m_dAdvImpTolerance)
m_Controller.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
' imposto unità di misura per interfaccia utente
IniFile.m_bMmUnits = (GetPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
@@ -540,27 +431,21 @@ Public Class ProjectVM
' modo di visualizzazione
Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
Map.refShowPanelVM.ShowModeState(nShowMode)
' imposto spessore curve
EgtSetLineAttribs(OptionModule.GetLineWidth())
' visualizzazione direzione curve
Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0)
Map.refShowPanelVM.ShowCurveDir(nShowCurveDir)
' visualizzazione avanzata dei triangoli costituenti le superfici
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
EgtSetShowTriaAdv(bShowTriaAdv)
' qualità di visualizzazione delle superfici
OptionModule.SetShowSurfQuality(False)
' tipo visualizzazione per Zmap
Dim nShowZmap As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
EgtSetShowZmap(nShowZmap, False)
EgtSetShowZmap(OptionModule.m_nShowZmapType, False)
' dimensione lineare max in pixel delle textures
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
' stile corrente delle quotature
OptionModule.m_dExtLineLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
OptionModule.m_dArrowLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
OptionModule.m_dTextDist = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
OptionModule.m_nLenIsMM = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
OptionModule.m_nDecDigit = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
OptionModule.m_sFont = "" : GetPrivateProfileStringUtf8(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", m_sFont)
OptionModule.m_dTextHeight = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
EgtSetCurrDimensionStyle(OptionModule.m_dExtLineLen, OptionModule.m_dArrowLen, OptionModule.m_dTextDist,
OptionModule.m_nLenIsMM, OptionModule.m_nDecDigit, OptionModule.m_sFont, OptionModule.m_dTextHeight)
' lettura da ini della variabile che abilita i gruppi di lavorazione
IniFile.m_bMachiningGroup = (GetPrivateProfileInt(S_MACH, K_MACHININGGROUP, 0) <> 0)
Map.refTopCommandBarVM.DrawMode_IsChecked()
@@ -576,6 +461,8 @@ Public Class ProjectVM
' Imposto default per import
m_Controller.SetScaleForDxfImport(OptionModule.m_dDxfScaleFactor)
m_Controller.SetScaleForStlImport(OptionModule.m_dStlScaleFactor)
m_Controller.SetScaleForOffImport(OptionModule.m_dOffScaleFactor)
m_Controller.SetScaleForPlyImport(OptionModule.m_dPlyScaleFactor)
m_Controller.SetScaleForImageImport(OptionModule.m_dImgScaleFactor)
' Imposto default per export
m_Controller.SetDefaultForDxfExport(OptionModule.m_nExportDxfFlag)
@@ -601,7 +488,7 @@ Public Class ProjectVM
Dim nFlag As Integer = 1
If Environment.GetCommandLineArgs.Count() > 4 Then Integer.TryParse(Environment.GetCommandLineArgs(4), nFlag)
' Modalità cieco con valori 0, 3 e 4
Return (nFlag <> 0 And nFlag <> 3 And nFlag <> 4)
Return (nFlag <> 0 And nFlag <> 3 And nFlag <> 4 And nFlag <> 8)
End If
If sExt = ".ddf" And Environment.GetCommandLineArgs.Count() > 2 Then
' Flag
@@ -710,7 +597,13 @@ Public Class ProjectVM
' Esecuzione
OpenDoorFile(sFile, bNcGen, bExit, nProbing)
' Se richiesta uscita immediata
If bExit Then Map.refMainWindowVM.CloseApplicationCmd()
If bExit Then
Map.refMainWindowVM.CloseApplicationCmd()
End If
' Se applicate lavorazioni, vado in modalità Lavora
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
Map.refTopCommandBarVM.SetMachiningMode()
End If
Return
End If
' Se file tol, gestione aggiornamento dei dati degli utensili
@@ -759,7 +652,7 @@ Public Class ProjectVM
bOk = ExecWall(sFile, sMachine, nFlag, False)
End If
' Se richiesta uscita immediata
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Or nFlag = 8 Then
Map.refMachinePanelVM.SaveCurrentMachine()
Map.refMainWindowVM.CloseApplicationCmd()
' Altrimenti se errore
@@ -778,7 +671,7 @@ Public Class ProjectVM
Select Case nFileType
Case FT.NGE, FT.NFE
Return m_Controller.OpenProject(sFile, False)
Case FT.DXF, FT.STL, FT._3MF, FT._3DM, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
Case FT.DXF, FT.STL, FT._3MF, FT._3DM, FT.OFF, FT.PLY, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
Return m_Controller.ImportProject(sFile, False)
Case FT.TSC, FT.LUA
Return m_Controller.Exec(sFile, False)
@@ -791,7 +684,6 @@ Public Class ProjectVM
' Formato descrizione porte
If Path.GetExtension(sFile).ToLower() = ".ddf" Then
nErr = ExecDoors(m_ProjectScene, sFile, bNcGen, bBatch, nProbing)
'CreateDoors(sFile, bNcGen, bBatch, nProbing)
Map.refProjectVM.EmitTitle()
Return True
End If
@@ -1490,8 +1382,28 @@ Public Class ProjectVM
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
Else
m_Controller.MouseSelectedObj(nId, bLast)
m_Controller.MouseSelectedObj(nId, False)
If bLast Then
If EgtIsSelectedObj(nId) Then
' Selezione layer in albero
Map.refManageLayerExpanderVM.UpdateObjInObjTreeNoMark(nId)
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(nId)
Map.refManageLayerExpanderVM.UpdateObjTree()
End If
EgtDraw()
End If
End If
' Carico se presenti le dimensioni della griglia
Application.Current.Dispatcher.BeginInvoke(
Sub()
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
End Sub,
DispatcherPriority.Render)
End Sub
Private Sub OnMouseSelectedColor(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedColor
m_Controller.MouseSelectedColor(nId)
End Sub
Private Sub OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPart
@@ -1544,7 +1456,7 @@ Public Class ProjectVM
m_Controller.MouseMoveInSelectionPoint(PtP)
End Sub
Private Sub OnMouseAnalyzedEx(sender As Object, nId As Integer, nSub As Integer, ptSel As Point3d) Handles m_ProjectScene.OnMouseAnalyzedEx
Private Sub OnMouseAnalyzedEx(sender As Object, nId As Integer, nSub As Integer, ptSel As Point3d, nModKey As Integer) Handles m_ProjectScene.OnMouseAnalyzedEx
Map.refManageLayerExpanderVM.UpdateObjInObjTree(nId)
Map.refManageLayerExpanderVM.SelectIdInObjTree(nId)
' Cancello geometria e info di eventuale precedente analisi
@@ -1558,11 +1470,14 @@ Public Class ProjectVM
' Se superficie trimesh, visualizzo dati faccetta toccata
ElseIf EgtGetType(nId) = GDB_TY.SRF_MESH Then
Dim nFac As Integer = EgtSurfTmFacetFromTria(nId, nSub)
If nFac <> -1 Then
If nFac >= 0 Then
' Visualizzo la normale e il contorno della faccia
Analyze.CreateAnalyzeGroup()
Analyze.CreateFacetNormal(nId, nFac)
Analyze.CreateFacetLoops(nId, nFac)
If nModKey = Scene.MODKEY.SHIFT Then
Analyze.CreateTriaLoop(nId, nSub)
End If
' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d
Dim vtN As Vector3d
@@ -1574,6 +1489,9 @@ Public Class ProjectVM
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
If nModKey = Scene.MODKEY.SHIFT Then
sOut &= ", Triangle " + nSub.ToString()
End If
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
' Se Regione, visualizzo dati parte toccata
@@ -1597,6 +1515,25 @@ Public Class ProjectVM
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
' Se Superficie di Bezier
ElseIf EgtGetType(nId) = GDB_TY.SRF_BEZ Then
' Visualizzo il punto selezionato, la normale e le tangenti nelle direzioni dei parametri
Analyze.CreateAnalyzeGroup()
Dim dU, dV As Double
Dim vtN As Vector3d
If Analyze.CreateSBzPointNormalAndTangents(nId, ptSel, dU, dV, vtN) Then
Dim dLen, dPhi, dTheta As Double
vtN.ToSpherical(dLen, dTheta, dPhi)
' Emetto info sulla barra di stato
Dim sOut As String = "U=" + DoubleToString(dU, 4) + ",V=" + DoubleToString(dV, 4) +
" : P(" + LenToString(ptSel.x, 3) + "," + LenToString(ptSel.y, 3) + "," + LenToString(ptSel.z, 3) + ")" +
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
If nModKey = Scene.MODKEY.SHIFT Then
Analyze.CreateSBzIsoParam(nId, dU, dV)
End If
End If
End If
' Aggiorno la visualizzazione
EgtDraw()
@@ -1611,6 +1548,8 @@ Public Class ProjectVM
If e.KeyData = System.Windows.Forms.Keys.Delete AndAlso Map.refTopCommandBarVM.DrawIsChecked Then
m_Controller.SetLastInteger(GDB_ID.SEL)
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
' controllo per chiudere expander info
If Not Map.refInfoExpanderVM.IsEnabled Then Map.refDrawOptionPanelV.DrawGrid.RowDefinitions(1).Height = New GridLength(1, GridUnitType.Auto)
' Con END eseguo deselezione di tutto
ElseIf e.KeyData = System.Windows.Forms.Keys.End Then
m_Controller.MouseDeselectedAll(True)
@@ -1718,6 +1657,8 @@ Public Class ProjectVM
nFlag = GetPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
ElseIf nType = FT.BTL Or nType = FT.BTLX Then
nFlag = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
ElseIf nType = FT._3MF Then
nFlag = GetPrivateProfileInt(S_IMPORT, K_3MFFLAG, EI3_FL.NONE)
ElseIf nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or
nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then
nFlag = GetPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

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