Compare commits

..

160 Commits

Author SHA1 Message Date
Demetrio Cassarino eec592c782 -aggiunto gestione lampadina su operazione selezionta
-aggiunto info note
2025-04-03 14:26:07 +02:00
Demetrio Cassarino dc6c075508 -sistemato accensione lampade su pulsante aggiorna 2025-03-27 16:20:24 +01:00
Demetrio Cassarino 2735c66b11 -sistemato gestione lampadina da simulazione a operazioni 2025-03-26 15:05:43 +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
Dario Sassi 7954077676 EgtCAM5 :
- entrando in LAVORA si rende corrente la prima macchinata (anziché l'ultima).
2024-11-18 19:18:53 +01:00
Dario Sassi 60673cd9e3 EgtCAM5 2.6k1 :
- ricompilazione con cambio versione.
2024-11-16 11:16:28 +01:00
Dario Sassi 9d62cf6b99 EgtCAM5 :
- miglioramenti spostamento grezzi con morse.
2024-10-31 18:34:30 +01:00
Dario Sassi 6e2c4d8b35 EgtCAM5 2.6j3 :
- migliorie e correzioni per disposizioni con pianetti di lavoro.
2024-10-31 11:42:46 +01:00
Dario Sassi d8bff8ac9e EgtCAM5 :
- migliorie e correzioni per disposizione con piani di lavoro (bancaletti).
2024-10-20 22:29:57 +02:00
Dario Sassi 0926456513 EgtCAM5 :
- in nuova fase si conserva anche la posizione assi di disposizione della fase precedente.
2024-10-16 19:52:44 +02:00
Dario Sassi bf424a49e1 EgtCAM5 :
- ulteriori modifiche in disposizione con piani di lavoro (bancaletti).
2024-10-16 14:56:05 +02:00
Dario Sassi be4bc812da EgtCAM5 :
- in disposizione modificata gestione punti di aggancio (HOOK) e aggiunta gestione movimento barre e carrelli con memoria.
2024-10-15 17:39:55 +02:00
Dario Sassi ce18ea3ade EgtCAM5 2.6j2 :
- aggiustamenti in Disposizione per posizionamento Fixtures su tavole a bancaletti.
2024-10-15 10:54:02 +02:00
Dario Sassi 931c96a587 EgtCAM5 2.6j1 :
- ricompilazione con cambio versione.
2024-10-10 15:48:25 +02: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
Dario Sassi 5e53f20fec EgtCAM5 :
- aggiunta gestione messaggi lavorazioni avanzate non abilitate in simulazione, stima e generazione
- piccola miglioria in default VMillQuality se non trovata in Ini file.
2024-10-01 13:10:43 +02:00
Dario Sassi 44e919c134 Merge commit '52c4b2c4240e62fc5e4c57e01bb8939f7fcdf7c1' 2024-09-30 19:41:34 +02:00
Demetrio Cassarino 52c4b2c424 -rinominato valori qualità 2024-09-30 16:10:01 +02:00
Demetrio Cassarino 53fb9b3416 -piccola modifica su finestra vm 2024-09-30 16:03:36 +02:00
Dario Sassi 0c7718d91d Merge commit '0fed5c356f0762f8c61271748f9146fc85dfb228' 2024-09-30 15:42:50 +02:00
Demetrio Cassarino 0fed5c356f -piccola modifica al vm 2024-09-30 15:31:21 +02:00
Demetrio Cassarino 2b6e4c36df Merge remote-tracking branch 'origin/master' into feature/cw_ccw 2024-09-30 15:13:23 +02:00
Dario Sassi cdc9caf4ee EgtCAM5 :
- piccole modifiche in Opzioni per qualità VM.
2024-09-30 15:10:26 +02:00
Dario Sassi 5970a97c15 Merge commit 'bfc4af4c1eb5995199fc32960aacf8c918aea468' 2024-09-30 14:52:56 +02:00
Demetrio Cassarino bfc4af4c1e -aggiunto in opzioni virtualmillingquality 2024-09-30 10:08:44 +02:00
Demetrio Cassarino 07f51ed6cd Merge remote-tracking branch 'origin/master' into feature/cw_ccw 2024-09-30 08:40:55 +02:00
Dario Sassi 5490884eb4 EgtCAM5 :
- migliorata gestione anteprima utensile in lavorazione con frecce senza focus.
2024-09-25 09:23:02 +02:00
Dario Sassi 62803684c4 Merge commit '99333a0bbe9034cc37571f5594aec375fb26162d' 2024-09-23 08:31:37 +02:00
Dario Sassi 11316a5a5c EgtCAM5 2.6i1 :
- ricompilazione con cambio versione.
2024-09-21 11:54:28 +02:00
Demetrio Cassarino 99333a0bbe -aggiunto spostamento slider quando gli viene settato il focus 2024-09-20 14:42:04 +02:00
Demetrio Cassarino 3446cbd3c9 -aggiunto reset slider alla selezione singola della lavorazione 2024-09-17 15:21:13 +02:00
Dario Sassi c5fe1bc7b9 EgtCAM5 :
- modifiche per poter impostare da INI colore di Mark tipo 2.
2024-08-22 09:23:32 +02:00
Dario Sassi a1569b4cd8 EgtCAM5 2.6h2 :
- aggiunta gestione Analisi anche per superfici di tipo Region.
2024-08-21 14:42:18 +02:00
Dario Sassi 5f669acc74 EgtCAM5 2.6h1 :
- ricompilazione con cambio versione.
2024-08-07 09:48:49 +02:00
Dario Sassi e0b69567e3 EgtCAM5 2.6g7 :
- modifica per entrare da TS3 modalità Vista con Simulazione non bloccata anche per pareti (precedente era valida solo per travi).
2024-07-31 20:31:39 +02:00
Dario Sassi 8c45250a6f EgtCAM5 2.6g6 :
- modifiche per consentire feedback anche in Simulazione (solo se progetto non è da salvare)
- modifica per entrare da TS3 modalità Vista con Simulazione non bloccata.
2024-07-29 11:52:20 +02:00
Dario Sassi ef4ad38d23 EgtCAM5 :
- se lanciato in modalità Simulazione da TS3 ora si può solo simulare ed uscire dal programma.
2024-07-22 20:15:24 +02:00
Dario Sassi 85de8e95a5 EgtCAM5 2.6g5 :
- ricompilazione con cambio versione.
2024-07-22 18:13:57 +02:00
Dario Sassi 4387d75ee7 Merge commit 'ddf1f320c5462e921bc269593eb58484c80d418a' 2024-07-22 17:39:27 +02:00
Demetrio Cassarino ddf1f320c5 -riferimento a lavorazione 2024-07-22 17:24:53 +02:00
Dario Sassi 9f33d1b236 Merge commit '24607ec445d01fe6dc9ea817bdc04af3e1200888' 2024-07-16 08:45:33 +02:00
Demetrio Cassarino 60f035991d -rivisto evento per mettere il focus sullo slider 2024-07-15 10:44:25 +02:00
Demetrio Cassarino 24607ec445 -aggiunto possibilita' di portare il focus sullo slider con tutte e 4 le frecce 2024-07-12 15:30:25 +02:00
Demetrio Cassarino d75250d5f9 Merge remote-tracking branch 'origin/master' into feature/Note_Utensile 2024-07-12 15:23:00 +02:00
Dario Sassi be5985cfcd EgtCAM5 :
- aggiunto Zoom All passando da un gruppo di lavoro all'altro.
2024-07-12 15:16:16 +02:00
Dario Sassi 6aa7e850e8 Merge commit '9833802aedba444d8e92c257f303c6458f012c2f' 2024-07-12 15:07:31 +02:00
Demetrio Cassarino 9833802aed -aggiunto focus su slider 2024-07-12 12:56:27 +02:00
Dario Sassi 47aacebd3a Merge commit '62a9dd20488474796a33ff9b77ecab41294db8ba' 2024-07-11 17:17:06 +02:00
Demetrio Cassarino 62a9dd2048 -aggiunto al checkbox note updatesurcetrigger 2024-07-11 17:15:05 +02:00
Demetrio Cassarino 220d70013f Merge remote-tracking branch 'origin/master' into feature/Note_Utensile 2024-07-11 08:57:04 +02:00
Emmanuele Sassi 1633ed140d Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2024-07-09 14:42:25 +02:00
Emmanuele Sassi 07634b79b4 - correzione funzionamento MTable con due macchine 2024-07-09 14:41:29 +02:00
Dario Sassi c5e367e41c EgtCAM5 2.6g1 :
- ricompilazione con cambio versione.
2024-07-01 18:07:43 +02:00
Dario Sassi 3f487c7328 EgtCAM5 2.6f4 :
- ricompilazione con cambio versione.
2024-06-24 16:15:45 +02:00
Dario Sassi 639834d797 Merge commit '7a0a5048765a1371f8ef3914b79829173dacaf4b' 2024-06-24 16:10:09 +02:00
Demetrio Cassarino 7a0a504876 -aggiunto controllo su recalc per valori note ricalcolo 2024-06-24 15:59:19 +02:00
Dario Sassi 3253b7b8d4 EgtCAM5 :
- sistemazione parametri lavorazione sgrossatura superfici.
2024-06-06 12:23:46 +02:00
Dario Sassi a4b3fa8c28 Merge commit '841dce8d7291fb90f3cab903463f8680942a69f0' 2024-06-06 11:45:22 +02:00
Demetrio Cassarino 841dce8d72 -aggiunto parametro substep 2024-06-06 10:15:09 +02:00
Demetrio Cassarino e62b6aaccc Merge remote-tracking branch 'origin/master' into feature/Lavorazione_5_assi 2024-06-05 17:15:46 +02:00
Dario Sassi ad7b0ed010 EgtCAM5 2.6f1 :
- ricompilazione con cambio versione.
2024-06-05 17:15:14 +02:00
Dario Sassi b3d113e4f3 EgtCAM5 :
- corretta partenza disegno continuo (Ctrl) su Arco con punto, direzione e punto.
2024-05-31 12:29:06 +02:00
Dario Sassi f506ce9c64 EgtCAM5 :
- piccola ottimazione in MachiningToolSlider.
2024-05-31 12:13:21 +02:00
Dario Sassi 459d6f6739 EgtCAM5 :
- piccola miglioria a SliderThick di MachiningToolPreviw.
2024-05-31 12:03:17 +02:00
Dario Sassi 469037e3d8 Merge commit '0a4a7c4efad1d4bde9e7d23e4d9a90fd73626ef3' 2024-05-31 11:42:06 +02:00
Demetrio Cassarino 0a4a7c4efa -rimosso pulsanti indietro e avanti
-cambiato pulsante anteprima utensile con checkbox
2024-05-31 11:34:27 +02:00
Demetrio Cassarino 69ba413d31 Merge remote-tracking branch 'origin/master' into feature/Lavorazione_5_assi 2024-05-31 08:32:52 +02:00
Dario Sassi 8164b2e654 EgtCAM5 :
- modifiche per ToolPreview con slider.
2024-05-31 07:59:02 +02:00
Dario Sassi 514b8a7bb9 Merge commit 'cfa709fb40fdef6115d43d4678414d9f9da0cf4b' 2024-05-30 16:31:44 +02:00
Demetrio Cassarino cfa709fb40 -aggiunto slider da completare 2024-05-30 12:14:23 +02:00
Dario Sassi 0936baf254 Merge commit 'd328fbb186627fa1d15414bb1518b77052b1b4af' 2024-05-29 15:22:45 +02:00
Demetrio Cassarino d328fbb186 -ripristinato dimensione pagina db lavorazioni 2024-05-29 14:57:49 +02:00
Dario Sassi fcc36d7b44 Merge commit '3ebba7cb81ba17c58d5fa0295dca5178bab1dde7' 2024-05-29 12:26:05 +02:00
Demetrio Cassarino 3ebba7cb81 -rimossa variabile tipo approccio da finitura superficie e sgrossatura 2024-05-29 12:15:13 +02:00
Dario Sassi 88be7fa40d Merge remote-tracking branch 'origin/feature/Lavorazione_5_assi' 2024-05-29 09:32:21 +02:00
Demetrio Cassarino 033d76b4fb Merge remote-tracking branch 'origin/master' into feature/Lavorazione_5_assi 2024-05-29 09:16:14 +02:00
Demetrio Cassarino 3f2b8eaf08 -aggiornato ordine offset radiale e longitudinale 2024-05-29 09:16:02 +02:00
Dario Sassi 42348e6ca0 EgtCAM5 2.6e6 :
- ricompilazione con cambio versione.
2024-05-28 17:36:18 +02:00
Dario Sassi e1f0e122ec Merge commit '21c0a8cad7f61e2d05b3edb70e90344673707423' 2024-05-28 17:27:50 +02:00
Demetrio Cassarino 21c0a8cad7 -rimosso da sgrossatura sovrapposizione, aggiunto offset longitudinale e passo 2024-05-28 17:25:44 +02:00
Dario Sassi afe5dc58b1 EgtCAM5 2.6e5 :
- ricompilazione con cambio versione.
2024-05-27 17:27:47 +02:00
Dario Sassi 2beb910d2c Merge commit '31ce0ca0e0be420206122568f6e2ad4c02f7998b' 2024-05-27 17:01:59 +02:00
Demetrio Cassarino 31ce0ca0e0 -cambio nome costante 5axMachining in 5AxMilling 2024-05-27 15:31:34 +02:00
Demetrio Cassarino f7b92d1537 -aggiunto sgrossatura superfici in nuove lavorazioni
-aggiunto sgrossatura superfici in opzioni cam5
2024-05-27 14:14:01 +02:00
Demetrio Cassarino fe2dd7f9ce -rinominato SelGeomFiveAxMachining in SelGeomFiveAxMilling nel progetto e nel file in
- aggiunto in impostazioni sezione CAM le lavorazioni
2024-05-24 15:08:06 +02:00
Dario Sassi 1099a25b59 Merge remote-tracking branch 'origin/feature/Lavorazione_5_assi' 2024-05-24 10:43:39 +02:00
Demetrio Cassarino 22e329c74e -aggiunto paragrafo per lavorazioni 5 assi 2024-05-24 10:34:31 +02:00
Dario Sassi 2e5b87d38c EgtCAM5 2.6e2 :
- ricompilazione con cambio versione.
2024-05-14 09:23:08 +02:00
Dario Sassi d2886ec79b Merge commit '85f22f9978277cce16167bd2dcb4bfdd0d727725' 2024-05-07 12:10:49 +02:00
Demetrio Cassarino 85f22f9978 Merge remote-tracking branch 'origin/master' into feature/ManageNote 2024-05-06 16:12:13 +02:00
Dario Sassi 9eea6f220d EgtCAM5 2.6e1 :
- ricompilazione con cambio versione.
2024-05-03 15:03:29 +02:00
Dario Sassi 23820e3ed8 EgtCAM5 :
- aggiunto bottone per comando GRID_INVERT.
2024-04-26 17:52:37 +02:00
Dario Sassi e2d1231ea2 EgtCAM5 :
- aggiunta gestione disegno arco per due punti e raggio.
2024-04-19 17:57:22 +02:00
Dario Sassi b7b824ab8a EgtCAM5 :
- aggiunto bottone per comando Nascondi, Visualizza Layer (Shift) e Visualizza Pezzo (Ctrl)
- nell'albero entità corretto visualizza/nascondi Layer con tutte le sue entità (Shift su Lampadina).
2024-04-19 11:28:50 +02:00
Dario Sassi 14ed0480cd EgtCAM5 :
- corretto errore feedback non creato quando progetto contiene più macchinate con la stessa macchina.
2024-04-16 20:54:04 +02:00
Dario Sassi 928b8f679e EgtCAM5 :
- aggiunta gestione evento OnInsertingProject per poter passare AdvFlag a EgtController.
2024-04-13 18:42:47 +02:00
Demetrio Cassarino 919767fe34 Merge remote-tracking branch 'origin/master' into feature/ManageNote 2024-04-12 12:29:15 +02:00
Demetrio Cassarino 87507c60d8 -aggiornato grafica note 2024-04-12 12:28:46 +02:00
Dario Sassi a0c93477a1 EgtCAM5 :
- aggiunta gestione AdvFlag=0/1 della sezione [Import] nel file INI per Flag importatore formati avanzati.
2024-04-11 00:29:12 +02:00
Dario Sassi 62758acbeb EgtCAM5 2.6d2 :
- eliminata distinzione tra 32 e 64 per le diverse librerie lua (da tempo non serve più)
- modifiche per meglio gestire i problemi con la eventuale chiave di rete (errore di collegamento o capacità esaurita).
2024-04-09 14:54:19 +02:00
Dario Sassi 05d1602c2e EgtCAM5 2.6d1 :
- in Opzioni Macchina aggiunto parametro Tolleranza Lineare di Approssimazione.
2024-04-02 15:40:44 +02:00
Demetrio Cassarino 20a153a0ea -cambio lista con itemscontrol nel paragrafo note 2024-03-29 16:09:27 +01:00
Demetrio Cassarino 2febe6fb5b -migliorie grafica paragrafo note 2024-03-26 17:19:25 +01:00
Demetrio Cassarino a414b7a3e6 -pulizia codice 2024-03-15 14:46:12 +01:00
Demetrio Cassarino fe05264a7d Merge remote-tracking branch 'origin/master' into feature/ManageNote 2024-03-15 14:13:21 +01:00
Demetrio Cassarino ee17b9dfbc -modificato grafica selecteditem list 2024-03-15 12:47:05 +01:00
Dario Sassi 2a056bc9be EgtCAM5 :
- aggiunti bottoni toolbar per quotature angolari e diametrali/radiali
- corretta gestione DecDigit di quotature in pagina Opzioni (valore può essere negativo).
2024-03-14 20:08:31 +01:00
Demetrio Cassarino 5fdec18828 -aggiunto controllo su pulsante rimuovi nota 2024-03-14 09:53:54 +01:00
Demetrio Cassarino e3c84cdf05 -aggiunto immagini pulsanti 2024-03-13 17:21:45 +01:00
Demetrio Cassarino 0fb560a33b -sistemato merge errato 2024-03-13 16:50:40 +01:00
Dario Sassi 82c40a5b41 EgtCAM5 2.6c2 :
- aggiunto bottone per comandi movimento vertice e movimento faccia di superficie trimesh.
2024-03-13 09:29:04 +01:00
Demetrio Cassarino fdacf0f958 -aggiornato grafica paragrafo note 2024-03-12 17:01:42 +01:00
Dario Sassi 0c4daf8ecb EgtCAM5 2.6c2 :
- aggiunti due nuovi parametri a InitDisp.
2024-03-11 14:18:51 +01:00
Demetrio Cassarino 3588c3d511 -aggiunto tab control per visualizzazione valore in base al tipo 2024-03-08 16:57:53 +01:00
Demetrio Cassarino 5142d2a2e9 .aggiunto combo aggiunti nota, pulizia codice 2024-03-06 16:14:10 +01:00
Demetrio Cassarino 17dbfe6163 -creazione paragrafo note,
-correzione codice
2024-03-01 16:42:44 +01:00
Dario Sassi a7dc65f10e EgtCAM5 2.6b4 :
- in simulazione migliorata gestione errori dopo EgtSimulStart
- nella toolbar di Vista aggiunto anche comando IsoViewSE.
2024-02-19 14:58:17 +01:00
Dario Sassi be256404ff EgtCAM5 2.6b1 :
- corretto falso rilevamento modifica testa usata da posizione in attrezzaggio.
2024-02-02 17:02:37 +01:00
Emmanuele Sassi efe74f470c Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2024-02-02 16:17:00 +01:00
Emmanuele Sassi 3b49b58783 - Ripristinato bottone MTable in modalita' lavorazione 2024-02-02 16:16:56 +01:00
Dario Sassi d6b61e8633 EgtCAM5 :
- in about aggiunto messaggio con indicazione stato piano di manutenzione.
2024-01-25 18:23:31 +01:00
Dario Sassi 9bb0558370 EgtCAM5 2.6a1 :
- ricompilazione con cambio versione.
2024-01-23 17:26:02 +01:00
Emmanuele Sassi f58322e131 EgtCAM5 2.5l4:
- ricompilazione con cambio versione.
2024-01-15 09:09:51 +01:00
Emmanuele Sassi fd7dbaed88 Merge branch 'hotfix/OperationParamError' 2024-01-15 09:07:12 +01:00
Emmanuele Sassi 5b41936ecb - correzione per apertura parametri di lavorazione 2024-01-15 09:06:56 +01:00
Dario Sassi 14d92c0a2d - modificati riferimenti a EgtTray che è stata rimossa 2024-01-08 16:33:23 +01:00
Emmanuele Sassi 7639de860f Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2024-01-08 11:22:39 +01:00
Dario Sassi 3154944f94 EgtCAM5 2.5l3 :
- aggiunta vista da sotto e riordinati bottoni per comandi vista in toolbar
- riordinati bottoni per comandi griglia in toolbar.
2023-12-29 13:22:26 +01:00
Dario Sassi 7dc34348ed EgtCAM5 2.5l2 :
- all'uscita dal DB lavorazioni se in modalità lavora si aggiorna subito la lista delle lavorazioni inseribili.
2023-12-18 10:33:10 +01:00
Dario Sassi bee06b1999 EgtCAM5 2.5l1 :
- ricompilazione con cambio versione.
2023-12-01 16:53:08 +01:00
113 changed files with 9401 additions and 5154 deletions
+12
View File
@@ -14,11 +14,23 @@ Public Class AboutBoxWndV
Dim sLeftDays As String = ""
Dim nLeftDays As Integer
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
Dim sAssStatus As String = " discontinued"
Dim nAssLeftDays As Integer
If EgtGetKeyAssLeftDays( nAssLeftDays) And nAssLeftDays >= 0 Then
If nAssLeftDays > 30 then
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
Else If nAssLeftDays > 0 then
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
Else
sAssStatus = "to be renewed by today"
End If
End If
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" 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 &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
+6 -3
View File
@@ -1,5 +1,7 @@
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Imports EgtUILib
Imports EgtUILib.EgtInterface
' Classe che definisce un elemento di base del TreeView
Public Class TreeViewItemBase
@@ -31,7 +33,7 @@ Public Class TreeViewItemBase
End Set
End Property
Private m_isExpanded As Boolean
Friend m_isExpanded As Boolean
Public Property IsExpanded As Boolean
Get
Return m_isExpanded
@@ -92,6 +94,7 @@ Public Class InheritableTreeViewItem
Implements INotifyPropertyChanged
Friend m_Name As String
Public Property Name As String
Get
Return m_Name
@@ -195,7 +198,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 +211,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 +258,4 @@ Public Class ChildItem
MyBase.New(Name, IsSelected, IsExpanded, IsActive)
End Sub
End Class
End Class
+10 -4
View File
@@ -47,7 +47,6 @@ Module ConstIni
Public Const S_LUA As String = "Lua"
Public Const K_LIBSDIR As String = "LibsDir"
Public Const K_LIBSDIR64 As String = "LibsDir64"
Public Const K_BASELIB As String = "BaseLib"
Public Const K_BWSIM As String = "BWSim"
@@ -70,6 +69,7 @@ Module ConstIni
Public Const K_SHOWGFRAME As String = "ShowGFrame"
Public Const K_LINEWIDTH As String = "LineWidth"
Public Const K_MARK As String = "Mark"
Public Const K_MARK2 As String = "Mark2"
Public Const K_SELSURF As String = "SelSurf"
Public Const K_SHOWMODE As String = "ShowMode"
Public Const K_CURVEDIR As String = "CurveDir"
@@ -105,10 +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"
@@ -123,7 +128,6 @@ Module ConstIni
Public Const S_BEAM As String = "Beam"
Public Const K_BEAMENABLE As String = "BtlEnable"
Public Const K_BEAMBASEDIR As String = "BaseDir"
Public Const K_BEAMBASEDIR64 As String = "BaseDir64"
Public Const K_BEAMBTLEXEC As String = "BtlExec"
Public Const K_BEAMBWEEXEC As String = "BweExec"
Public Const K_BEAMMACHINES As String = "Machines"
@@ -132,7 +136,6 @@ Module ConstIni
Public Const S_WALL As String = "Wall"
Public Const K_WALLENABLE As String = "BtlEnable"
Public Const K_WALLBASEDIR As String = "BaseDir"
Public Const K_WALLBASEDIR64 As String = "BaseDir64"
Public Const K_WALLBTLEXEC As String = "BtlExec"
Public Const K_WALLBWEEXEC As String = "BweExec"
Public Const K_WALLBUTTON As String = "Button"
@@ -156,6 +159,7 @@ 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_GUNSTOCK As String = "GunStock"
Public Const K_GUNSTOCKENABLE As String = "GsEnable"
@@ -172,7 +176,6 @@ Module ConstIni
Public Const S_MACH As String = "Mach"
Public Const K_MACHINESDIR As String = "MachinesDir"
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
Public Const K_TOOLMAKERSDIR64 As String = "ToolMakersDir64"
Public Const K_CURRMACH As String = "CurrMach"
Public Const K_SELGEOMSAWING As String = "SelGeomSawing"
Public Const K_SELGEOMDRILLING As String = "SelGeomDrilling"
@@ -184,6 +187,9 @@ Module ConstIni
Public Const K_SELGEOMGENMACHINING As String = "SelGeomGenMachining"
Public Const K_SELGEOMCHISELING As String = "SelGeomChiseling"
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_MACHININGGROUP As String = "MachiningGroup"
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
+1 -1
View File
@@ -35,7 +35,7 @@
Public Const K_CHISELING As String = "Chiseling"
Public Const K_SURFROUGHING As String = "SurfRoughing"
Public Const K_SURFFINISHING As String = "SurfFinishing"
Public Const K_5AXMACHINING As String = "5axMachining"
Public Const K_5AXMILLING As String = "5AxMilling"
Public Const K_WATERJETTING As String = "WaterJetting"
Public Const K_SAWINGONARCS As String = "SawingOnArcs"
@@ -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
+26 -8
View File
@@ -74,17 +74,27 @@
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/>
</Button>
<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>
<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>
</UniformGrid>
<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="{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="{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>
<Expander Name="Draw3D" Style="{StaticResource ExpanderStyle}" Grid.Row="1"
Visibility="{Binding Draw3DVisibility}" IsExpanded="{Binding Draw3DIsExpanded}">
@@ -177,6 +187,11 @@
Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/>
</Button>
<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>
<Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}">
@@ -194,8 +209,11 @@
Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/>
<Button ToolTip="{Binding ChangeStatusToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeStatusCommand}" IsEnabled="{Binding bSelOk}">
<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}">
+153 -8
View File
@@ -97,12 +97,22 @@ Public Class DrawPanelVM
End Property
Public ReadOnly Property TextToolTip As String
Get
Return EgtMsg( 5214)
Return EgtMsg( 5214) ' Testo<br/>Testo Avanzato (Shift)
End Get
End Property
Public ReadOnly Property LinearDimensionToolTip As String
Get
Return EgtMsg( 5155)
Return EgtMsg( 5155) ' Quota Lineare<br/>Quota Allineata (Shift)
End Get
End Property
Public ReadOnly Property AngularDimensionToolTip As String
Get
Return EgtMsg( 5167) ' Quota Angolare<br/>Quota Angolare Avanzata (Shift)
End Get
End Property
Public ReadOnly Property DiamRadDimensionToolTip As String
Get
Return EgtMsg( 5168) ' Quota Diametrale<br/>Quota Radiale (Shift)
End Get
End Property
@@ -151,6 +161,11 @@ Public Class DrawPanelVM
Return EgtMsg( 5165) 'Approssima Superfici e Regioni Piane
End Get
End Property
Public ReadOnly Property StmMoveVertexFacetToolTip As String
Get
Return EgtMsg( 5166) 'Muovi Vertice di Superficie<br/>Muovi Faccia di Superficie (Shift)
End Get
End Property
Public ReadOnly Property ExtractSurfFacetToolTip As String
Get
Return EgtMsg( 5158) 'Estrai Faccia da Superficie
@@ -202,6 +217,12 @@ Public Class DrawPanelVM
Return EgtMsg(MSG_DRAWPANEL + 24)
End Get
End Property
Public ReadOnly Property ChangeStatusToolTip As String
Get
Return EgtMsg(5250)
End Get
End Property
Public ReadOnly Property ChangeAlphaToolTip As String
Get
Return EgtMsg(MSG_DRAWPANEL + 25)
@@ -455,6 +476,8 @@ Public Class DrawPanelVM
Private m_cmdPolygonSide As ICommand
Private m_cmdText As ICommand
Private m_cmdLinDim As ICommand
Private m_cmdAngDim As ICommand
Private m_cmdDiamRadDim As ICommand
Private m_cmdModifyCurve As ICommand
Private m_cmdAddPointCurve As ICommand
Private m_cmdPlane As ICommand
@@ -466,6 +489,7 @@ Public Class DrawPanelVM
Private m_cmdMergeSurf As ICommand
Private m_cmdExplodeSurf As ICommand
Private m_cmdApproxSurf As ICommand
Private m_cmdMoveStmVertexFacet As ICommand
Private m_cmdExtractSurfFacet As ICommand
Private m_cmdInvertSurf As ICommand
Private m_cmdExtractLoops As ICommand
@@ -476,6 +500,7 @@ Public Class DrawPanelVM
Private m_cmdIntersectSurfSurf As ICommand
Private m_cmdDelete As ICommand
Private m_cmdChangeLayer As ICommand
Private m_cmdChangeStatus As ICommand
Private m_cmdChangeAlpha As ICommand
Private m_cmdResetColor As ICommand
Private m_cmdChangeColor As ICommand
@@ -714,7 +739,11 @@ Public Class DrawPanelVM
''' Execute the Arc3P. This method is invoked by the Arc3PCommand.
''' </summary>
Public Sub Arc3P(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC3P)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC2PR)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC3P)
End If
End Sub
#End Region ' Arc3PCommand
@@ -737,13 +766,13 @@ Public Class DrawPanelVM
''' Execute the ArcPDP. This method is invoked by the ArcPDPCommand.
''' </summary>
Public Sub ArcPDP(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Map.refProjectVM.GetController.SetContinue()
End If
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPVP)
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Map.refProjectVM.GetController.SetContinue()
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPVP)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
End If
End Sub
@@ -872,6 +901,60 @@ Public Class DrawPanelVM
#End Region ' LinearDimensionCommand
#Region "AngularDimensionCommand"
''' <summary>
''' Returns a command that do Angular Dimension.
''' </summary>
Public ReadOnly Property AngularDimensionCommand As ICommand
Get
If m_cmdAngDim Is Nothing Then
m_cmdAngDim = New RelayCommand(AddressOf AngularDimension)
End If
Return m_cmdAngDim
End Get
End Property
''' <summary>
''' Execute the AngularDimension. This method is invoked by the AngDimCommand.
''' </summary>
Public Sub AngularDimension(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ANGULARDIMENSIONPLUS)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ANGULARDIMENSION)
End If
End Sub
#End Region ' AngularDimensionCommand
#Region "DiamRadDimensionCommand"
''' <summary>
''' Returns a command that do DiamRad Dimension.
''' </summary>
Public ReadOnly Property DiamRadDimensionCommand As ICommand
Get
If m_cmdDiamRadDim Is Nothing Then
m_cmdDiamRadDim = New RelayCommand(AddressOf DiamRadDimension)
End If
Return m_cmdDiamRadDim
End Get
End Property
''' <summary>
''' Execute the DiamRadDimension. This method is invoked by the DiamRadDimCommand.
''' </summary>
Public Sub DiamRadDimension(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.RADIALDIMENSION)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.DIAMETRALDIMENSION)
End If
End Sub
#End Region ' DiamRadDimensionCommand
#Region "ModifyCurve"
''' <summary>
@@ -1195,6 +1278,33 @@ Public Class DrawPanelVM
#End Region ' ApproxSurfCommand
#Region "MoveStmVertexFacetCommand"
''' <summary>
''' Returns a command that do MoveStmVertex.
''' </summary>
Public ReadOnly Property MoveStmVertexFacetCommand As ICommand
Get
If m_cmdMoveStmVertexFacet Is Nothing Then
m_cmdMoveStmVertexFacet = New RelayCommand(AddressOf MoveStmVertexFacet)
End If
Return m_cmdMoveStmVertexFacet
End Get
End Property
''' <summary>
''' Execute the MoveStmVertexFacet. This method is invoked by the MoveStmVertexFacetCommand.
''' </summary>
Public Sub MoveStmVertexFacet(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MOVESURFFACET)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MOVESURFVERTEX)
End If
End Sub
#End Region ' MoveStmVertexFacetCommand
#Region "ExtractSurfFacetCommand"
''' <summary>
@@ -1438,6 +1548,41 @@ Public Class DrawPanelVM
#End Region ' ChangeLayerCommand
#Region "ChangeStatusCommand"
''' <summary>
''' Returns a command that do ChangeStatus.
''' </summary>
Public ReadOnly Property ChangeStatusCommand As ICommand
Get
If m_cmdChangeStatus Is Nothing Then
m_cmdChangeStatus = New RelayCommand(AddressOf ChangeStatus)
End If
Return m_cmdChangeStatus
End Get
End Property
''' <summary>
''' Execute the ChangeStatus. This method is invoked by the ChangeStatusCommand.
''' </summary>
Public Sub ChangeStatus(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SELPART)
Map.refProjectVM.GetController.SetLastBoolean( True)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
ElseIf (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SELLAYER)
Map.refProjectVM.GetController.SetLastBoolean( True)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
Else
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SEL)
Map.refProjectVM.GetController.SetLastBoolean( False)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
End If
End Sub
#End Region ' ChangeStatusCommand
#Region "ChangeAlphaCommand"
''' <summary>
+39
View File
@@ -161,6 +161,9 @@
<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="LeftTray\LeftTrayV.xaml.vb">
<DependentUpon>LeftTrayV.xaml</DependentUpon>
</Compile>
@@ -170,6 +173,9 @@
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpander.vb" />
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\FiveAxisMachinigParameterExpanderV.xaml.vb">
<DependentUpon>FiveAxisMachinigParameterExpanderV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfFinishingParameterExpanderV.xaml.vb">
<DependentUpon>SurfFinishingParameterExpanderV.xaml</DependentUpon>
</Compile>
@@ -188,6 +194,9 @@
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\StoneDrillingParameterExpanderV.xaml.vb">
<DependentUpon>StoneDrillingParameterExpanderV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfRoughingParameterExpanderV.xaml.vb">
<DependentUpon>SurfRoughingParameterExpanderV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml.vb">
<DependentUpon>WoodDrillingParameterExpanderV.xaml</DependentUpon>
</Compile>
@@ -466,6 +475,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\FiveAxisMachinigParameterExpanderV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfFinishingParameterExpanderV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -490,6 +503,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfRoughingParameterExpanderV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -1002,6 +1019,28 @@
<ItemGroup>
<Resource Include="Resources\EgtCAM5_64.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Note\+.png" />
<Resource Include="Resources\Note\-.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\AngularDimension.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\DiametralDimension.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ChangeStatus.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\GridViewPanel\CplaneINVERT.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\StmMoveVertex.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TreeView\LampSel.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
+5 -5
View File
@@ -6,20 +6,20 @@
<Button Command="{Binding CPlaneTopCommand}" ToolTip="{Binding CPlaneTopToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneTOP.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneBottomCommand}" ToolTip="{Binding CPlaneBottomToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneBOTTOM.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneFrontCommand}" ToolTip="{Binding CPlaneFrontToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneFRONT.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneRightCommand}" ToolTip="{Binding CPlaneRightToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneRIGHT.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneBackCommand}" ToolTip="{Binding CPlaneBackToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneBACK.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneLeftCommand}" ToolTip="{Binding CPlaneLeftToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneLEFT.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneBottomCommand}" ToolTip="{Binding CPlaneBottomToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneBOTTOM.png" Stretch="Uniform"/>
<Button Command="{Binding CPlaneRightCommand}" ToolTip="{Binding CPlaneRightToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneRIGHT.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneElevationCommand}" ToolTip="{Binding CPlaneElevationToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
-5
View File
@@ -12,13 +12,8 @@ Public Class GridPanelVM
Private m_cmdCPlaneBack As ICommand
Private m_cmdCPlaneLeft As ICommand
Private m_cmdCPlaneBottom As ICommand
Private m_cmdCPlaneView As ICommand
Private m_cmdCPlaneElevation As ICommand
Private m_cmdCPlaneOrigin As ICommand
Private m_cmdCPlaneRotate As ICommand
Private m_cmdCPlane3P As ICommand
Private m_cmdCPlanePerpObj As ICommand
Private m_cmdCPlaneObj As ICommand
#Region "ToolTip"
+41 -16
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,30 +97,35 @@ 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 = EgtGetLastMachGroup()
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
End If
End Function
Private Function ExecScript(sScriptPath As String, nGroupId As Integer, nPartId As Integer) As Boolean
Private Function ExecScript(sScriptPath As String, nGroupId As Integer, nPartId As Integer, nInd As Integer, sParts As String) As Boolean
EgtLuaCreateGlobTable("DISP")
EgtLuaSetGlobIntVar("DISP.GROUPID", nGroupId)
EgtLuaSetGlobIntVar("DISP.PARTID", nPartId)
EgtLuaSetGlobIntVar("DISP.IND", nInd)
EgtLuaSetGlobStringVar("DISP.PARTS", sParts)
If Not EgtLuaExecFile(sScriptPath) Then
EgtOutLog("Error executing disposition init script " & sScriptPath)
MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 2) & " " & sScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
@@ -164,10 +168,25 @@ Public Class MyMachGroupPanelVM
If bWithScript Then
' Rendo corrente il gruppo di lavoro
EgtSetCurrMachGroup(nGroupId)
' Creo grezzo e posiziono i pezzi
' Recupero i pezzi già inseriti
Dim sParts As String = ""
Dim nInd As Integer = 0
Dim nRawId As Integer = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
Dim nPartId As Integer = EgtGetFirstPartInRawPart( nRawId)
While nPartId <> GDB_ID.NULL
nInd += 1
sParts &= nInd.ToString() & ","
nPartId = EgtGetNextPartInRawPart( nPartId)
End While
nRawId = EgtGetNextRawPart( nRawId)
End While
' Creo grezzi e posiziono i pezzi
Dim bOk As Boolean = True
sParts &= String.Join( ",", PartList)
For Each Part In PartList
If Not ExecScript(sInitScriptPath, nGroupId, Part) Then bOk = False
nInd += 1
If Not ExecScript(sInitScriptPath, nGroupId, Part, nInd, sParts) Then bOk = False
Next
Return bOk
Else
@@ -196,14 +215,18 @@ Public Class MyMachGroupPanelVM
Return False
End If
If bWithScript Then
' Creo grezzo e posiziono i pezzi
Dim bOk As Boolean = True
For Each Part In PartList
If Not ExecScript(sInitScriptPath, nGroupId, Part) Then bOk = False
Next
' Gestione ingresso senza pezzi
If PartList.Count() = 0 Then
If Not ExecScript(sInitScriptPath, nGroupId, GDB_ID.NULL) Then bOk = False
' Creo grezzi e posiziono i pezzi
If PartList.Count() > 0 then
Dim nInd As Integer = 0
Dim sParts As String = String.Join( ",", PartList)
For Each Part In PartList
nInd += 1
If Not ExecScript(sInitScriptPath, nGroupId, Part, nInd, sParts) Then bOk = False
Next
' altrimenti, ingresso senza pezzi
Else
If Not ExecScript(sInitScriptPath, nGroupId, GDB_ID.NULL, 0, "") Then bOk = False
End If
If Not bOk Then
EgtResetCurrMachGroup()
@@ -401,6 +424,8 @@ Public Class MyMachGroupPanelVM
(EgtUILib.GetPrivateProfileInt(S_ESTIMATIONS, K_EST_ENABLE, 0, IniFile.m_sCurrMachIniFilePath) <> 0)
' Setto il Materiale in base alla Macchina associata al MachGroup corrente
LoadMaterialType()
' Zoom all
EgtZoom( ZM.ALL)
End If
Return True
+8 -2
View File
@@ -15,7 +15,7 @@
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid Margin="10">
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
@@ -27,6 +27,7 @@
<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">
@@ -56,7 +57,12 @@
</ComboBox>
</UniformGrid>
<UniformGrid Grid.Row="4" Columns="2">
<UniformGrid Grid.Row="4" 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">
<TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0"
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
+24
View File
@@ -48,6 +48,21 @@ 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
@@ -106,6 +121,11 @@ 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
@@ -141,6 +161,10 @@ Public Class MachOptionVM
Dim nVal As Integer = 0
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
' Leggo tolleranza lineare di approssimazione
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal)
m_sApproxLinTol = LenToString(dVal, 4)
' Riempio lista attrezzaggi salvati
m_ArchivedSetUpList.Add(String.Empty)
If Directory.Exists(IniFile.m_sCurrMachSetUpDirPath) Then
+3 -2
View File
@@ -269,7 +269,7 @@ Public Class MyMachinePanelVM
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True)
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
MachDbWindowV.Height = 794 '674
MachDbWindowV.Height = 800 '674
MachDbWindowV.Width = 1024
MachDbWindowV.Owner = Application.Current.MainWindow
MachDbWindowV.ShowDialog()
@@ -290,10 +290,11 @@ Public Class MyMachinePanelVM
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True)
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
MachDbWindowV.Height = 794 '674
MachDbWindowV.Height = 800 '674
MachDbWindowV.Width = 1024
MachDbWindowV.Owner = Application.Current.MainWindow
MachDbWindowV.ShowDialog()
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
End If
End Sub
+23 -17
View File
@@ -357,9 +357,6 @@ Public Class MainWindowVM
' Impostazione direttorio toolmakers
Dim sToolMakersDir As String = String.Empty
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", sToolMakersDir)
#If PLATFORM = "x64" Then
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR64, sToolMakersDir, sToolMakersDir)
#End If
If Not String.IsNullOrWhiteSpace(sToolMakersDir) Then
IniFile.m_sToolMakersDir = sToolMakersDir
Else
@@ -388,8 +385,8 @@ Public Class MainWindowVM
EgtSetLockId(sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2511, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2511, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2703, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2703, 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
@@ -403,7 +400,7 @@ Public Class MainWindowVM
IniFile.m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", IniFile.m_nInstance.ToString())
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & IniFile.m_nInstance.ToString() &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & DebugLevel().ToString() & vbLf &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & DebugLevel().ToString() & vbLf &
My.Application.Info.Title.ToString() & " ver. " & m_sVersion
EgtInit(m_nDebug, IniFile.m_sLogFile, sLogMsg)
EgtSetOnTerminateProcess( m_OnTerminateProcessCallback)
@@ -425,7 +422,14 @@ 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
' Imposto dir di default per libreria Lua e lancio libreria di base
Dim sLuaLibsDir As String = String.Empty
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
EgtSetLuaLibs(sLuaLibsDir)
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)
@@ -433,16 +437,6 @@ Public Class MainWindowVM
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)
#If PLATFORM = "x64" Then
GetPrivateProfileString(S_LUA, K_LIBSDIR64, sLuaLibsDir, sLuaLibsDir)
#End If
EgtSetLuaLibs(sLuaLibsDir)
Dim sLuaBaseLib As String = String.Empty
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
EgtLuaRequire(sLuaBaseLib)
' Imposto direttorio temporaneo a EgtInterface
EgtSetTempDir(m_sTempDir)
' Imposto IniFile a EgtInterface
@@ -603,6 +597,18 @@ Public Class MainWindowVM
' pulisco output
Map.refStatusBarVM.NotifyStatusOutput("")
Map.refInputExpanderVM.ResetInputBox()
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 OrElse e.Key = Key.Up OrElse e.Key = Key.Down 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)
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
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-2023 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2016-2025 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.5.11.2")>
<Assembly: AssemblyFileVersion("2.5.11.2")>
<Assembly: AssemblyVersion("2.7.3.2")>
<Assembly: AssemblyFileVersion("2.7.3.2")>
@@ -3,7 +3,7 @@
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>
@@ -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,80 @@
</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" Height="Auto"
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>
<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"/>
<ScrollViewer HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
MaxHeight="190"
Margin="2,5,0,10">
<ItemsControl ItemsSource="{Binding InfoList}"
Visibility="{Binding InfoVisibility}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Key}"
ToolTip="{Binding Key}"
Width="70"
HorizontalAlignment="Left"
Margin="0,6,0,0"/>
<TextBox Grid.Column="1"
Text="{Binding Valour, UpdateSourceTrigger=PropertyChanged}"
Margin="8,5,2,10">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneInfoCommand}"/>
</TextBox.InputBindings>
</TextBox>
<Button Grid.Column="2"
Content="-"
Command="{Binding RemoveInfoItemCommand}"
Width="20"
Height="20"
Margin="2,-2,4,5"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<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,11 @@
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
End Class
@@ -6,6 +6,23 @@ Public Class InputExpanderVM
#Region "FIELDS & PROPERTIES"
' Variabile temporanea per salvare bShow
Private m_tmpbShow As Boolean
Private m_tmpInfoList As New ObservableCollection(Of InfoItem)
''' <summary>
''' Lista temporanea delle info
''' </summary>
Private Property tmpInfoList As ObservableCollection(Of InfoItem)
Get
Return m_tmpInfoList
End Get
Set(value As ObservableCollection(Of InfoItem))
m_tmpInfoList = value
OnPropertyChanged(NameOf(tmpInfoList))
End Set
End Property
' Expander fields
Private m_IsExpanded As Boolean
Public Property IsExpanded As Boolean
@@ -14,7 +31,7 @@ Public Class InputExpanderVM
End Get
Set(value As Boolean)
m_IsExpanded = value
OnPropertyChanged("IsExpanded")
OnPropertyChanged(NameOf(IsExpanded))
End Set
End Property
@@ -25,7 +42,7 @@ Public Class InputExpanderVM
End Get
Set(value As Boolean)
m_IsEnabled = value
OnPropertyChanged("IsEnabled")
OnPropertyChanged(NameOf(IsEnabled))
End Set
End Property
@@ -36,7 +53,7 @@ Public Class InputExpanderVM
End Get
Set(value As String)
m_Title = value
OnPropertyChanged("Title")
OnPropertyChanged(NameOf(Title))
End Set
End Property
@@ -48,7 +65,7 @@ Public Class InputExpanderVM
End Get
Set(value As String)
m_TextBlock = value
OnPropertyChanged("TextBlock")
OnPropertyChanged(NameOf(TextBlock))
End Set
End Property
@@ -61,7 +78,7 @@ Public Class InputExpanderVM
Set(value As String)
m_TextBox = value
Map.refProjectVM.NotifyInputText(value)
OnPropertyChanged("TextBox")
OnPropertyChanged(NameOf(TextBox))
End Set
End Property
@@ -73,7 +90,7 @@ Public Class InputExpanderVM
Set(value As Visibility)
If value <> m_TextVisibility Then
m_TextVisibility = value
OnPropertyChanged("TextVisibility")
OnPropertyChanged(NameOf(TextVisibility))
End If
End Set
End Property
@@ -85,7 +102,7 @@ Public Class InputExpanderVM
End Get
Set(value As Boolean)
m_FocusTextBox = value
OnPropertyChanged("FocusTextBox")
OnPropertyChanged(NameOf(FocusTextBox))
End Set
End Property
@@ -97,7 +114,7 @@ Public Class InputExpanderVM
End Get
Set(value As String)
m_CheckBoxText = value
OnPropertyChanged("CheckBoxText")
OnPropertyChanged(NameOf(CheckBoxText))
End Set
End Property
@@ -110,7 +127,7 @@ Public Class InputExpanderVM
If value <> m_IsChecked Then
Map.refProjectVM.SetLastBoolean(value)
m_IsChecked = value
OnPropertyChanged("IsChecked")
OnPropertyChanged(NameOf(IsChecked))
End If
End Set
End Property
@@ -123,7 +140,7 @@ Public Class InputExpanderVM
Set(value As Visibility)
If value <> m_CheckVisibility Then
m_CheckVisibility = value
OnPropertyChanged("CheckVisibility")
OnPropertyChanged(NameOf(CheckVisibility))
End If
End Set
End Property
@@ -136,19 +153,54 @@ Public Class InputExpanderVM
End Get
Set(value As ObservableCollection(Of String))
m_ComboItemsList = value
OnPropertyChanged("ComboItemsList")
OnPropertyChanged(NameOf(ComboItemsList))
End Set
End Property
Private m_ComboSelectedIndex As Integer
Private m_InfoList As New ObservableCollection(Of InfoItem)
''' <summary>
''' Lista delle info modificate
''' </summary>
Public Property InfoList As ObservableCollection(Of InfoItem)
Get
Return m_InfoList
End Get
Set(value As ObservableCollection(Of InfoItem))
m_InfoList = value
OnPropertyChanged(NameOf(InfoList))
End Set
End Property
Private m_ComboSelectedIndex As Integer = GDB_ID.NULL
Public Property ComboSelectedIndex As Integer
Get
Return m_ComboSelectedIndex
End Get
Set(value As Integer)
Map.refProjectVM.SetLastInteger(value)
If m_tmpbShow Then Map.refProjectVM.SetLastInteger(value)
m_ComboSelectedIndex = value
OnPropertyChanged("ComboSelectedIndex")
' Assegno l'indice selezionato ad una variabile temporanea per utilizzarlo quando rimuovo l'info dalla lista
Dim tmpComboSelectedIndex As Integer = ComboSelectedIndex
' Controllo se l'indice è maggiore o uguale a zero e la lista tmp contiene valori
If m_ComboSelectedIndex >= 0 AndAlso tmpInfoList.Count > 0 Then
' Controllo se la info è contenuta nella lista ComboItemsList
If ComboItemsList.Contains(tmpInfoList(m_ComboSelectedIndex).sKey) Then
' Aggiungo la info alla lista per visualizzarla
InfoList.Add(New InfoItem(tmpInfoList(m_ComboSelectedIndex).nId, tmpInfoList(m_ComboSelectedIndex).sKey, tmpInfoList(m_ComboSelectedIndex).sValour))
' Nascondo la combobox
ComboVisibility = Visibility.Collapsed
' Rimuovo la info dalla ComboItemsList
ComboItemsList.Remove(tmpInfoList(m_ComboSelectedIndex).sKey)
End If
' Rimuovo la info dalla tmpInfoList
tmpInfoList.Remove(tmpInfoList(tmpComboSelectedIndex))
End If
' Rendo invisibile il pulsante per attivare la combo
If ComboItemsList.Count <= 0 Then ShowInfoItemVisibility = Visibility.Collapsed
m_ComboSelectedIndex = GDB_ID.NULL
OnPropertyChanged(NameOf(ComboSelectedIndex))
OnPropertyChanged(NameOf(ComboItemsList))
OnPropertyChanged(NameOf(InfoList))
End Set
End Property
@@ -160,7 +212,7 @@ Public Class InputExpanderVM
Set(value As Visibility)
If value <> m_ComboVisibility Then
m_ComboVisibility = value
OnPropertyChanged("ComboVisibility")
OnPropertyChanged(NameOf(ComboVisibility))
End If
End Set
End Property
@@ -173,13 +225,47 @@ Public Class InputExpanderVM
End Get
Set(value As Visibility)
m_ShowBtnVisibility = value
OnPropertyChanged("ShowBtnVisibility")
OnPropertyChanged(NameOf(ShowBtnVisibility))
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(NameOf(ShowInfoItemVisibility))
End If
End Set
End Property
Private m_InfoVisibility As Visibility
''' <summary>
''' Propietà visibilità lista info modificate
''' </summary>
Public Property InfoVisibility As Visibility
Get
Return m_InfoVisibility
End Get
Set(value As Visibility)
If value <> m_InfoVisibility Then
m_InfoVisibility = value
OnPropertyChanged(NameOf(InfoVisibility))
End If
End Set
End Property
' Commands definition
Private m_cmdShow As ICommand
Private m_cmdDone As ICommand
Private m_cmdShowInfoItem As ICommand
Private m_cmdRemoveInfoItem As ICommand
#Region "Messages"
@@ -257,7 +343,18 @@ Public Class InputExpanderVM
''' Execute the Point. This method is invoked by the PointCommand.
''' </summary>
Public Sub Done(ByVal param As Object)
Map.refProjectVM.Done(m_TextBox)
' Controllo se la lista contenente la info modificata sia presente
If InfoList.Count > 0 Then
' Ciclo sulla lista
For Each Item As InfoItem In InfoList
Map.refProjectVM.NotifyInputText((Item.Key & "=" & Item.Valour).Trim())
' Assegno a m_TextBox la info modificata
m_TextBox &= vbCrLf & (Item.Key & "=" & Item.Valour).Trim() & vbCrLf
Next
End If
' Rimuovo eventuali spazi
Dim tmpTextBox As String = m_TextBox.Replace(" ", "")
Map.refProjectVM.Done(tmpTextBox)
End Sub
''' <summary>
@@ -269,6 +366,30 @@ 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)
ComboVisibility = Visibility.Visible
End Sub
#End Region ' ShowInfoItemCommand
#End Region
#Region "METHODS"
@@ -279,13 +400,37 @@ Public Class InputExpanderVM
TextBlock = PrepareInputBoxParam.sLabel
TextBox = ""
TextVisibility = Visibility.Visible
' Controllo se il titolo è uguale a INFO se si
If Title = EgtMsg(5359).ToUpper() Then
' Metto tmpbShow a false
m_tmpbShow = False
' Rendo visibile la lista delle info selezionate
InfoVisibility = Visibility.Visible
' Pulisco la lista tmpInfoList
tmpInfoList.Clear()
' Pulisco la lista InfoList
InfoList.Clear()
' Pulisco la lista ComboItemsList
ComboItemsList.Clear()
' Popolo la lista InfoList
GetInfoList()
' Rendo visibile il pulsante che mostra la lista delle info
ShowInfoItemVisibility = If(m_ComboItemsList.Count > 0, Visibility.Visible, Visibility.Collapsed)
End If
End If
If PrepareInputBoxParam.sCheckLabel <> "" Then
CheckBoxText = PrepareInputBoxParam.sCheckLabel
CheckVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowCombo Then
' Assegno a tmpbShow PrepareInputBoxParam.bShowCombo
m_tmpbShow = PrepareInputBoxParam.bShowCombo
' Pulisco la lista ComboItemsList
ComboItemsList.Clear()
' Pulisco la lista tmpInfoList
tmpInfoList.Clear()
' Pulisco la lista InfoList
InfoList.Clear()
ComboVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowBtn Then
@@ -302,6 +447,8 @@ Public Class InputExpanderVM
CheckVisibility = Visibility.Collapsed
ComboVisibility = Visibility.Collapsed
ShowBtnVisibility = Visibility.Collapsed
ShowInfoItemVisibility = Visibility.Collapsed
InfoVisibility = Visibility.Collapsed
IsExpanded = False
IsEnabled = False
End Sub
@@ -329,12 +476,42 @@ 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>
''' Rimovi nota da info lista
''' </summary>
''' <param name="InfoItem">Informazione da eliminare</param>
Friend Sub RemoveItemInfo(InfoItem As InfoItem)
' Rimuovo info da lista modifica
InfoList.Remove(InfoItem)
' Riaggiungo la info eliminata
ComboItemsList.Add(InfoItem.sKey)
' Riaggiungo la info eliminata
tmpInfoList.Add(InfoItem)
' Rendo visibile il pulsante per attivare la combo
ShowInfoItemVisibility = Visibility.Visible
End Sub
Private Sub GetInfoList()
Dim tmpInfoList As String() = Nothing
Dim sKeyVal() As String = Nothing
Dim Index As Integer = 0
EgtGetAllInfo(Map.refManageLayerExpanderVM.m_nObjTreeOldId, tmpInfoList)
If Not IsNothing(tmpInfoList) Then
For Each ItemInfo As String In tmpInfoList
sKeyVal = ItemInfo.Trim().Split(New Char() {"="c})
InfoList.Add(New InfoItem(Index, sKeyVal(0), sKeyVal(1)))
Index += 1
Next
End If
End Sub
#End Region ' Methods
End Class
@@ -69,17 +69,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
@@ -93,7 +93,7 @@ Public Class LayerTreeViewItem
EgtGetStatus(Node.Id, nStat)
If value AndAlso nStat <> GDB_ST.ON_ Then
EgtSetStatus(Node.Id, GDB_ST.ON_)
ElseIf nStat <> GDB_ST.OFF Then
ElseIf Not value AndAlso nStat <> GDB_ST.OFF Then
EgtSetStatus(Node.Id, GDB_ST.OFF)
End If
End If
@@ -103,6 +103,7 @@ Public Class LayerTreeViewItem
EgtDraw()
End If
End If
Map.refProjectVM.EmitTitle()
End Set
End Property
@@ -1,9 +1,9 @@
<UserControl x:Class="ManageLayerExpanderV"
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:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
xmlns:local="clr-namespace:EgtCAM5">
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:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
xmlns:local="clr-namespace:EgtCAM5">
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
<Expander.Header>
@@ -20,11 +20,11 @@
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
</UniformGrid>
<TreeView Name="LayerTreeView" MinHeight="150" MaxHeight="250"
ItemsSource="{Binding Path=LayerList}"
VirtualizingStackPanel.IsVirtualizing = "True"
VirtualizingStackPanel.VirtualizationMode = "Recycling">
<TreeView x:Name="LayerTreeView" MinHeight="300" MaxHeight="400"
ItemsSource="{Binding Path=LayerList}"
VirtualizingStackPanel.IsVirtualizing = "True"
VirtualizingStackPanel.VirtualizationMode = "Recycling">
<interactivity:Interaction.Triggers>
<interactivity:EventTrigger EventName="MouseDoubleClick">
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/>
@@ -50,8 +50,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 +61,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}" />
@@ -166,7 +166,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 +191,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
@@ -492,7 +492,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 +528,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 +583,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 +805,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
+4 -5
View File
@@ -1,10 +1,9 @@
<UserControl x:Class="DrawOptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<StackPanel Name="ciao" Background="Transparent" Margin="0,0,3.5001,0" 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-->
@@ -177,12 +177,17 @@ Public Class EstimationsExpanderVM
If Not bOk Then Return False
' Calcolo della stima
If Not EgtEstimate(sEstFile, sInfo) Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
sErr = sErr.Replace("Cnc", "Est")
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
MessageBox.Show(EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
MessageBox.Show(EgtMsg(5317), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
End If
bOk = False
End If
@@ -150,6 +150,8 @@ Public Class MachiningTreeExpanderVM
Return EgtMsg(MSG_MACHININGSDBPAGE + 11)
Case MCH_MY.WATERJETTING
Return EgtMsg(MSG_MACHININGSDBPAGE + 12)
Case MCH_MY.FIVEAXISMILLING
Return EgtMsg(31213)
Case Else
Return "Mach"
End Select
@@ -273,7 +273,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
@@ -281,6 +281,7 @@ Public Class DispositionParameterExpanderVM
End Select
Map.refRawPartOptionVM.SetMoveWithFixture(False)
Map.refFixtureParametersVM.UpdateFixtureTypeList()
DispositionUtility.InitHookData()
End Sub
#End Region ' METHODS
@@ -5,8 +5,6 @@ Imports EgtUILib
Public Class FixtureParametersVM
Inherits ViewModelBase
Friend Const USED As String = "USED"
Private m_FixtureTypeList As ObservableCollection(Of FixtureListItem)
Public ReadOnly Property FixtureTypeList As ObservableCollection(Of FixtureListItem)
Get
@@ -64,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
@@ -78,6 +76,7 @@ Public Class FixtureParametersVM
Friend Sub UpdateFixtureTypeList()
m_FixtureTypeList = New ObservableCollection(Of FixtureListItem)(FixtureType.ReadFixtureTypeFromMachIni())
UpdateFixtureCount()
OnPropertyChanged("FixtureTypeList")
End Sub
@@ -122,27 +121,36 @@ Public Class FixtureParametersVM
OnPropertyChanged("FixtureErrorMsg")
Return
End If
' dimensioni tavola
Dim vtTabDim As Vector3d = ptTableMax - ptTableMin
' calcolo il centro della tavola
Dim ptTableMid As New Point3d((ptTableMax.x - ptTableMin.x) / 2, (ptTableMax.y - ptTableMin.y) / 2, (ptTableMax.z - ptTableMin.z) / 2)
Dim ptTableMid As Point3d = Point3d.ORIG() + 0.5 * vtTabDim
' posiziono il nuovo sottopezzo al centro della tavola
Dim nAddedFixtureId As Integer = EgtAddFixture(SelectedFixture.Name, ptTableMid, 0, 0)
Dim nAddedFixtureId As Integer = EgtAddFixture(SelectedFixture.Name, ptTableMid, 0, 20)
If nAddedFixtureId = GDB_ID.NULL Then
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
OnPropertyChanged("FixtureErrorMsg")
Return
End If
' verifico se la ventosa ha punti di hook da ancorare
' Se la ventosa ha punti di hook da ancorare
If IsFixtureWithHook(nAddedFixtureId) Then
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo
EgtRemoveFixture(nAddedFixtureId)
MessageBox.Show("No free hook point!", "ERROR")
Return
EgtMoveFixture( nAddedFixtureId, 0.2 * vtTabDim.y * Vector3d.Y_AX())
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
EgtMoveFixture( nAddedFixtureId, 0.2 * vtTabDim.y * Vector3d.Y_AX())
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
End If
End If
' altrimenti ventosa con movimento continuo
Else
' se non ha punti di ancoraggio
' verifico se è in una posizione valida
If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
' verifico se è in una posizione valida
If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
' se non trovo una posizione valida, esco
If Not SearchOkFixturePosition(nAddedFixtureId, ptTableMin, ptTableMax, ptTableMid) Then
Return
@@ -157,76 +165,76 @@ Public Class FixtureParametersVM
' Funzione che cerca una posizione valida per la ventosa libera di muoversi
Private Function SearchOkFixturePosition(nAddedFixtureId As Integer, ptTableMin As Point3d, ptTableMax As Point3d, ptTableMid As Point3d) As Boolean
' creo un gruppo temporaneo
Dim nTempGroupId As Integer = EgtCreateGroup(GDB_ID.ROOT)
EgtSetLevel(nTempGroupId, GDB_LV.USER)
EgtSetMode(nTempGroupId, GDB_MD.STD)
' calcolo ingombro sottopezzo aggiunto
Dim bboxAddedFixture As New BBox3d
EgtGetBBoxGlob(nAddedFixtureId, GDB_BB.STANDARD, bboxAddedFixture)
' calcolo bbox tavolo
Dim bboxTableArea As New BBox3d(ptTableMin, ptTableMax)
bboxTableArea.Expand(-bboxAddedFixture.DimX / 2, -bboxAddedFixture.DimY / 2, 0)
' creo superficie delle misure della tavola
Dim nTableFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, bboxTableArea.Min, bboxTableArea.Max)
' ciclo su tutti i pezzi di questa fase
Dim nFixtureId As Integer = EgtGetFirstFixture()
While nFixtureId <> GDB_ID.NULL
' creo il bbox del sottopezzo
Dim bboxFixture As New BBox3d
EgtGetBBoxGlob(nFixtureId, GDB_BB.STANDARD, bboxFixture)
' faccio offset del bbox del sottopezzo per includere metà del sottopezzo da aggiungere
bboxFixture.Expand(bboxAddedFixture.DimX / 2, bboxAddedFixture.DimY / 2, 0)
' lo porto all'altezza della tavola
Dim ptMinFixtureFr As New Point3d(bboxFixture.Min)
Dim ptMaxFixtureFr As New Point3d(bboxFixture.Max)
ptMinFixtureFr.z = ptTableMin.z
ptMaxFixtureFr.z = ptTableMin.z
' creo la regione occupata dal bbox del sottopezzo
Dim nFixtureFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, ptMinFixtureFr, ptMaxFixtureFr)
' sottraggo la regione del sottopezzo da quella della tavola
Dim x = EgtSurfFrSubtract(nTableFrId, nFixtureFrId)
nFixtureId = EgtGetNextFixture(nFixtureId)
End While
' creo gruppo con i bordi della regione di tavola avanzata
Dim TableFrBorderGroupId As Integer = EgtCreateGroup(nTempGroupId)
Dim nTableFrBorderCount As Integer = 0
Dim nChunk As Integer = EgtSurfFrChunkCount(nTableFrId)
For Index = 0 To nChunk - 1
EgtExtractSurfFrChunkLoops(nTableFrId, Index, TableFrBorderGroupId, nTableFrBorderCount)
Next
' verifico se c'è almeno un bordo
If nTableFrBorderCount = 0 Then
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
OnPropertyChanged("FixtureErrorMsg")
Return False
' creo un gruppo temporaneo
Dim nTempGroupId As Integer = EgtCreateGroup(GDB_ID.ROOT)
EgtSetLevel(nTempGroupId, GDB_LV.USER)
EgtSetMode(nTempGroupId, GDB_MD.STD)
' calcolo ingombro sottopezzo aggiunto
Dim bboxAddedFixture As New BBox3d
EgtGetBBoxGlob(nAddedFixtureId, GDB_BB.STANDARD, bboxAddedFixture)
' calcolo bbox tavolo
Dim bboxTableArea As New BBox3d(ptTableMin, ptTableMax)
bboxTableArea.Expand(-bboxAddedFixture.DimX / 2, -bboxAddedFixture.DimY / 2, 0)
' creo superficie delle misure della tavola
Dim nTableFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, bboxTableArea.Min, bboxTableArea.Max)
' ciclo su tutti i pezzi di questa fase
Dim nFixtureId As Integer = EgtGetFirstFixture()
While nFixtureId <> GDB_ID.NULL
' creo il bbox del sottopezzo
Dim bboxFixture As New BBox3d
EgtGetBBoxGlob(nFixtureId, GDB_BB.STANDARD, bboxFixture)
' faccio offset del bbox del sottopezzo per includere metà del sottopezzo da aggiungere
bboxFixture.Expand(bboxAddedFixture.DimX / 2, bboxAddedFixture.DimY / 2, 0)
' lo porto all'altezza della tavola
Dim ptMinFixtureFr As New Point3d(bboxFixture.Min)
Dim ptMaxFixtureFr As New Point3d(bboxFixture.Max)
ptMinFixtureFr.z = ptTableMin.z
ptMaxFixtureFr.z = ptTableMin.z
' creo la regione occupata dal bbox del sottopezzo
Dim nFixtureFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, ptMinFixtureFr, ptMaxFixtureFr)
' sottraggo la regione del sottopezzo da quella della tavola
Dim x = EgtSurfFrSubtract(nTableFrId, nFixtureFrId)
nFixtureId = EgtGetNextFixture(nFixtureId)
End While
' creo gruppo con i bordi della regione di tavola avanzata
Dim TableFrBorderGroupId As Integer = EgtCreateGroup(nTempGroupId)
Dim nTableFrBorderCount As Integer = 0
Dim nChunk As Integer = EgtSurfFrChunkCount(nTableFrId)
For Index = 0 To nChunk - 1
EgtExtractSurfFrChunkLoops(nTableFrId, Index, TableFrBorderGroupId, nTableFrBorderCount)
Next
' verifico se c'è almeno un bordo
If nTableFrBorderCount = 0 Then
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
OnPropertyChanged("FixtureErrorMsg")
Return False
End If
' converto il punto medio della tavola in coordinate globali
Dim PtTableRef As Point3d
EgtGetTableRef(1, PtTableRef)
Dim frTableRef As New Frame3d(PtTableRef)
ptTableMid.ToGlob(frTableRef)
' ciclo sui bordi per trovare il punto più vicino
Dim dMinDist As Double = (bboxTableArea.Max - bboxTableArea.Min).SqLenXY
Dim ptMinAbs As Point3d
Dim BorderId As Integer = EgtGetFirstInGroup(TableFrBorderGroupId)
While BorderId <> GDB_ID.NULL
Dim dDist As Double = 0
Dim ptMinRel As Point3d
Dim nSide As Integer = 0
EgtPointCurveDistSide(ptTableMid, BorderId, Vector3d.Z_AX, GDB_ID.ROOT, dDist, ptMinRel, nSide)
If dDist < dMinDist Then
dMinDist = dDist
ptMinAbs = ptMinRel
End If
' converto il punto medio della tavola in coordinate globali
Dim PtTableRef As Point3d
EgtGetTableRef(1, PtTableRef)
Dim frTableRef As New Frame3d(PtTableRef)
ptTableMid.ToGlob(frTableRef)
' ciclo sui bordi per trovare il punto più vicino
Dim dMinDist As Double = (bboxTableArea.Max - bboxTableArea.Min).SqLenXY
Dim ptMinAbs As Point3d
Dim BorderId As Integer = EgtGetFirstInGroup(TableFrBorderGroupId)
While BorderId <> GDB_ID.NULL
Dim dDist As Double = 0
Dim ptMinRel As Point3d
Dim nSide As Integer = 0
EgtPointCurveDistSide(ptTableMid, BorderId, Vector3d.Z_AX, GDB_ID.ROOT, dDist, ptMinRel, nSide)
If dDist < dMinDist Then
dMinDist = dDist
ptMinAbs = ptMinRel
End If
BorderId = EgtGetNext(BorderId)
End While
' sposto il sottopezzo nel punto trovato
Dim vtFixtureMove As Vector3d = ptMinAbs - ptTableMid
vtFixtureMove.z = 0
EgtMoveFixture(nAddedFixtureId, vtFixtureMove)
' cancello il gruppo temporaneo
EgtErase(nTempGroupId)
BorderId = EgtGetNext(BorderId)
End While
' sposto il sottopezzo nel punto trovato
Dim vtFixtureMove As Vector3d = ptMinAbs - ptTableMid
vtFixtureMove.z = 0
EgtMoveFixture(nAddedFixtureId, vtFixtureMove)
' cancello il gruppo temporaneo
EgtErase(nTempGroupId)
Return True
End Function
@@ -239,9 +247,7 @@ Public Class FixtureParametersVM
' leggo tipo
Dim sType As String = ""
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
If sType.Equals(DispositionUtility.FREE) Then
Return False
ElseIf sType.Equals(DispositionUtility.POINT) Then
If sType.Equals(DispositionUtility.POINT) Then
Return True
ElseIf sType.Equals(DispositionUtility.LINE) Then
Return True
@@ -250,7 +256,7 @@ Public Class FixtureParametersVM
End If
End Function
' Funzione che aggancia la ventosa al più vicino hook libero
' Funzione che cerca un hook libero adatto alla ventosa e se trovato la posiziona
Friend Shared Function PositionFixtureOnNearestHook(nFixtureId As Integer) As Boolean
' cerco punto hook sulla ventosa
Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID)
@@ -262,26 +268,21 @@ Public Class FixtureParametersVM
Dim nFixtHookType As DispositionUtility.HOOKTYPE = DispositionUtility.HOOKTYPE.FREE
Dim sType As String = ""
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
If sType.Equals(DispositionUtility.FREE) Then
nFixtHookType = DispositionUtility.HOOKTYPE.FREE
' esco perchè non devo cercare alcun punto
Return True
ElseIf sType.Equals(DispositionUtility.POINT) Then
If sType.Equals(DispositionUtility.POINT) Then
nFixtHookType = DispositionUtility.HOOKTYPE.POINT
ElseIf sType.Equals(DispositionUtility.LINE) Then
nFixtHookType = DispositionUtility.HOOKTYPE.LINE
Else
nFixtHookType = DispositionUtility.HOOKTYPE.FREE
' esco perchè non devo cercare alcun punto
Return True
End If
Dim nFixtHookClass As Integer = 0
EgtGetInfo(nFixtHookId, DispositionUtility.CLASS_, nFixtHookClass)
' cerco id tavola
' Recupero Id tavola corrente
Dim sTableName As String = ""
EgtGetTableName(sTableName)
Dim nTableId As Integer = EgtGetTableId(sTableName)
' cerco hook su tavola macchina
' *** Cerco hook su tavola ***
Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID)
Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, DispositionUtility.HOOK)
' Punto di hook a cui spostare la ventosa
@@ -293,33 +294,23 @@ Public Class FixtureParametersVM
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
EgtSetInfo(nCurrHookId, used, nFixtureId)
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
EgtSetFixtureLink( nFixtureId, "")
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If
End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While
' cerco hook su barra fissa
' *** Cerco hook su barre fisse ***
Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.FIXED)
nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL
' se punto di aggancio valido
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
' sposto la ventosa
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
EgtSetInfo(nCurrHookId, USED, nFixtureId)
Return True
End If
End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While
' cerco hook su barre mobili
Dim nMobileInd As Integer = 1
Dim nMobile As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.MOBILE & nMobileInd)
While nMobile <> GDB_ID.NULL
nCurrHookId = EgtGetFirstNameInGroup(nMobile, DispositionUtility.HOOK)
While nTableFixedId <> GDB_ID.NULL
nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL
' se punto di aggancio valido
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
@@ -327,46 +318,114 @@ Public Class FixtureParametersVM
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
EgtSetInfo(nCurrHookId, USED, nFixtureId)
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
EgtSetFixtureLink( nFixtureId, "")
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If
End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While
nMobileInd += 1
nMobile = EgtGetFirstNameInGroup(nTableId, DispositionUtility.MOBILE & nMobileInd)
nTableFixedId = EgtGetNextName( nTableFixedId, DispositionUtility.FIXED)
End While
' *** Cerco hook su barre mobili ***
Dim nBarId As Integer = EgtGetFirstGroupInGroup(nTableId)
While nBarId <> GDB_ID.NULL
Dim sBarName As String = ""
If EgtGetName( nBarId, sBarName) AndAlso EgtGetAxisId( sBarName) <> GDB_ID.NULL Then
nCurrHookId = EgtGetFirstNameInGroup(nBarId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL
' se punto di aggancio valido
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
' sposto la ventosa
Dim vtMove As Vector3d = ptCurrHook - ptFixtHook
EgtMoveFixture(nFixtureId, vtMove)
' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
EgtSetFixtureLink( nFixtureId, sBarName)
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If
End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While
' Cerco su eventuali carrelli
Dim nCharId As Integer = EgtGetFirstGroupInGroup(nBarId)
While nCharId <> GDB_ID.NULL
Dim sCharName As String = ""
If EgtGetName( nCharId, sCharName) AndAlso EgtGetAxisId( sCharName) <> GDB_ID.NULL Then
nCurrHookId = EgtGetFirstNameInGroup(nCharId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL
' se punto di aggancio valido
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
' sposto la ventosa
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
EgtSetFixtureLink( nFixtureId, sCharName)
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If
End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While
End If
nCharId = EgtGetNextGroup(nCharId)
End While
End If
nBarId = EgtGetNextGroup(nBarId)
End While
Return False
End Function
' Funzione che analizza l'hook e se valido ne prestituisce lo posizione(punto)
Private Shared Function HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer, ptFixtHook As Point3d, ByRef ptCurrHook As Point3d) As Boolean
' verifico se del tipo giusto
' Funzione che analizza l'hook e se valido ne restituisce la posizione (punto)
Private Shared Function HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer,
ptFixtHook As Point3d, ByRef ptCurrHook As Point3d) As Boolean
' Verifico se del tipo giusto
Dim nTableHookType As GDB_TY = EgtGetType(nCurrHookId)
If (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = DispositionUtility.HOOKTYPE.POINT) OrElse (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = DispositionUtility.HOOKTYPE.LINE) Then
' verifico se della stessa classe
Dim nTableHookClass As Integer = 0
EgtGetInfo(nCurrHookId, DispositionUtility.CLASS_, nTableHookClass)
If nTableHookClass = nFixtHookClass Then
Dim dDist As Double = 0
' punto a distanza minima sull'hook
If nTableHookType = GDB_TY.GEO_POINT Then
' verifico se utilizzato
Dim nTableHookUsed As Boolean = False
If Not EgtGetInfo(nCurrHookId, DispositionUtility.USED, nTableHookUsed) Then
' calcolo distanza punto hook tavola dal punto hook della ventosa
EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
Return True
End If
ElseIf nTableHookType = GDB_TY.CRV_LINE Then
' calcolo distanza linea hook tavola dal punto hook della ventosa
Dim nRefId As Integer = 0
Dim dU As Double = 0
EgtPointCurveDist(ptFixtHook, nCurrHookId, nRefId, dDist, dU)
EgtAtParamPoint(nCurrHookId, dU, GDB_ID.ROOT, ptCurrHook)
Return True
End If
If Not (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = DispositionUtility.HOOKTYPE.POINT) AndAlso
Not (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = DispositionUtility.HOOKTYPE.LINE) Then
Return False
End If
' Verifico se della stessa classe
Dim nTableHookClass As Integer = DispositionUtility.GetHookClass( nCurrHookId)
If nTableHookClass <> nFixtHookClass Then
Return False
End If
Dim dDist As Double = 0
' punto a distanza minima sull'hook
If nTableHookType = GDB_TY.GEO_POINT Then
' verifico se utilizzato
If Not DispositionUtility.GetIsHookUsed( nCurrHookId) Then
' calcolo distanza punto hook tavola dal punto hook della ventosa
EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
Return True
End If
ElseIf nTableHookType = GDB_TY.CRV_LINE Then
' calcolo distanza linea hook tavola dal punto hook della ventosa
Dim ptL1 As Point3d : EgtStartPoint( nCurrHookId, GDB_ID.ROOT, ptL1)
Dim ptL2 As Point3d : EgtEndPoint( nCurrHookId, GDB_ID.ROOT, ptL2)
ptCurrHook = DispositionUtility.DistPointSegment( ptFixtHook, ptL1, ptL2)
Return True
End If
Return False
End Function
@@ -396,6 +455,7 @@ Public Class FixtureParametersVM
Dim NextSelectedId As Integer = EgtGetNextSelectedObj()
If EgtVerifyFixture(SelectedFixtureId) Then
EgtRemoveFixture(SelectedFixtureId)
DispositionUtility.RemoveFixtureFromHook( SelectedFixtureId)
For Index = 0 To FixtureTypeList.Count - 1
Dim SelFixtureName As String = String.Empty
EgtGetName(SelectedFixtureId, SelFixtureName)
@@ -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
@@ -1,384 +1,432 @@
<UserControl x:Class="BeamMillingParameterExpanderV"
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">
<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>
<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,
<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}"/>
<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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</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:StringParamV
ParamTxBl="{Binding OverLapTxBl}"
ParamTxBx="{Binding Path=OverLap,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<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"
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:StringParamV ParamTxBl="{Binding OverLapTxBl}"
ParamTxBx="{Binding Path=OverLap,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:CheckParamV
ParamTxBl="{Binding InvertToolDirTxBl}"
ParamChBx="{Binding Path=InvertToolDir,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding FaceUseTypeTxBl}"
ParamCmBxList="{Binding Path=FaceUseTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}"
Style="{DynamicResource ComboParamV_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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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:ComboParamV ParamTxBl="{Binding FaceUseTypeTxBl}"
ParamCmBxList="{Binding Path=FaceUseTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}"
Style="{DynamicResource ComboParamV_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>
</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>
<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}"
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 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}"
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: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}"
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>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class BeamMillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class BeamMillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class BeamMillingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class BeamMillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,10 +1,10 @@
<UserControl x:Class="ChiselingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,165 +75,232 @@
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
<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}"/>
<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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</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"
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:StringParamV
ParamTxBl="{Binding ReturnPosTxBl}"
ParamTxBx="{Binding Path=ReturnPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<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:StringParamV ParamTxBl="{Binding ReturnPosTxBl}"
ParamTxBx="{Binding Path=ReturnPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<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>
</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>
</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 Header="{Binding LeadOutTypeMsg}" Name="LeadOutType"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding LeadOutTypeMsg}" Name="LeadOutType"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class ChiselingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class ChiselingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class ChiselingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class ChiselingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -0,0 +1,286 @@
<UserControl x:Class="FiveAxisMachinigParameterExpanderV"
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}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_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>
</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 SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=SpeedErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<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 FiveAxisMachinigParameterExpanderV
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
@@ -1,10 +1,10 @@
<UserControl x:Class="GenMachiningParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,142 +75,212 @@
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
<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"/>
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}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<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}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<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>
</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>
</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 SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=SpeedErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=SpeedErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class GenMachiningParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class GenMachiningParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class GenMachiningParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class GenMachiningParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,10 +1,10 @@
<UserControl x:Class="MachiningParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -73,26 +73,38 @@
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
<sys:Int32 x:Key="TabMax">62</sys:Int32>
<sys:Int32 x:Key="TabMin">63</sys:Int32>
</UserControl.Resources>
</UserControl.Resources>
<StackPanel>
<ContentControl Content="{Binding Path=ParamExpanderPageV}" />
<StackPanel>
<ContentControl Content="{Binding Path=ParamExpanderPageV}" />
<Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}"
Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="ViewToolBtn" Grid.Column="0" Height="30" Content="{Binding ViewToolBtnMsg}"
IsChecked="{Binding ViewTool}" />
<Button Name="NextStepToolBtn" Grid.Column="1" Height="30" Content="{Binding NextStepToolBtnMsg}"
Command="{Binding NextStepToolCommand}" IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"/>
<Button Name="PrevStepToolBtn" Grid.Column="2" Height="30" Content="{Binding PrevStepToolBtnMsg}"
Command="{Binding PrevStepToolCommand}" IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"/>
</Grid>
</StackPanel>
<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.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox Name="ViewToolBtn"
Content="{Binding ViewToolBtnMsg}"
IsChecked="{Binding ViewTool}"
Style="{StaticResource ViewTool_CheckBox}"/>
<Slider Grid.Row="1"
x:Name="SliderV"
Value="{Binding SliderValue}"
IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"
TickFrequency="{Binding SliderTick}"
Minimum="1"
Maximum="{Binding SliderScale}"
IsSnapToTickEnabled="False"
Style="{StaticResource SliderValue_Slider}"/>
</Grid>
</StackPanel>
</UserControl>
@@ -3,81 +3,22 @@ Imports EgtWPFLib5.EgtFloating
Public Class MachiningParameterExpanderV
'Private EgtFloatingTray As EgtFloatingTray
'Private EgtFloatingPanel As EgtFloatingPanel
Sub New()
'Private m_bFirst As Boolean = True
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
'Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
' If m_bFirst Then
' EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
' EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
' AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
' PanelHeight = EgtFloatingPanel.ActualHeight
' Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
' m_bFirst = False
' End If
' CalculateOperationParametersStackPanelMaxHeight()
'End Sub
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
'Dim m_bSizeChanging As Boolean = False
' Associo il gestore evento m_EventFocusOnSlider all'evento generato da FocusOnSlider
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnSlider, AddressOf FocusOnSlider
End Sub
'Private Sub EgtFloatingTray_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
'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 = EgtFloatingTray.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
''' <summary>
''' Funzione che mette il focus allo slider
''' </summary>
Friend Sub FocusOnSlider()
Me.SliderV.Focus()
End Sub
End Class
@@ -6,6 +6,11 @@ Imports EgtWPFLib5
Public Class MachiningParameterExpanderVM
Inherits VMBase
''' <summary>
''' Evento che permette di mettere il focus sullo slider
''' </summary>
Friend Event m_EventFocusOnSlider()
Private WithEvents m_CurrOperation As MachiningTreeViewItem
Public Property CurrOperation As MachiningTreeViewItem
Get
@@ -50,7 +55,6 @@ Public Class MachiningParameterExpanderVM
End Property
Private m_bPreviewTool As Boolean = False
Private m_nPtEntId As Integer = GDB_ID.NULL
Public Property ViewTool As Boolean
Get
Return m_bPreviewTool
@@ -58,16 +62,80 @@ Public Class MachiningParameterExpanderVM
Set(value As Boolean)
If value Then
EgtPreparePreviewMachiningTool()
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
m_bPreviewTool = True
ResetSliderValue()
Else
EgtRemovePreviewMachiningTool()
m_bPreviewTool = False
ResetSliderValue()
End If
EgtDraw()
NotifyPropertyChanged("ViewTool")
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
Get
Return m_SliderScale
End Get
End Property
Friend Sub SetSliderScale(value As Integer)
m_SliderScale = Math.Max( value, 1)
If m_SliderScale <= 10 Then
m_SliderTick = 1
Else
m_SliderTick = CInt( m_SliderScale / 10)
End If
NotifyPropertyChanged( NameOf(SliderScale))
NotifyPropertyChanged( NameOf(SliderTick))
End Sub
Private m_SliderTick As Integer = 10
Public ReadOnly Property SliderTick As Integer
Get
Return m_SliderTick
End Get
End Property
Private m_nPtEntId As Integer = GDB_ID.NULL
Private m_SliderValue As Integer = 1
Public Property SliderValue As Integer
Get
Return m_SliderValue
End Get
Set(value As Integer)
If m_bPreviewTool Then
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, value - m_SliderValue)
If nId <> GDB_ID.NULL Then m_nPtEntId = nId
EgtDraw()
End If
m_SliderValue = value
End Set
End Property
Friend Sub ResetSliderValue()
If m_bPreviewTool Then
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
Else
m_nPtEntId = GDB_ID.NULL
End If
m_SliderValue = 1
NotifyPropertyChanged(NameOf(SliderValue))
End Sub
Friend Sub SetSliderValue(value As Integer)
Dim nOldSliderValue As Integer = m_SliderValue
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)
If nId <> GDB_ID.NULL Then m_nPtEntId = nId
EgtDraw()
NotifyPropertyChanged(NameOf(SliderValue))
End Sub
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
@@ -84,6 +152,8 @@ Public Class MachiningParameterExpanderVM
Dim StoneDrillParamExpanderV As StoneDrillingParameterExpanderV
Dim SurfFinishParamExpanderV As SurfFinishingParameterExpanderV
Dim WjParamExpanderV As WaterjettingParameterExpanderV
Dim FiveAxExpanderV As FiveAxisMachinigParameterExpanderV
Dim SurfRoughExpanderV As SurfRoughingParameterExpanderV
Private Sub Dummy()
@@ -106,24 +176,11 @@ Public Class MachiningParameterExpanderVM
EgtGetMachiningParam(MCH_MP.TYPE, nType)
m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY))
WoodDrillParamExpanderV.DataContext = Nothing
WoodSawParamExpanderV.DataContext = Nothing
WoodMillParamExpanderV.DataContext = Nothing
BeamMillParamExpanderV.DataContext = Nothing
PocketParamExpanderV.DataContext = Nothing
MortiseParamExpanderV.DataContext = Nothing
GenMachinParamExpanderV.DataContext = Nothing
ChiselParamExpanderV.DataContext = Nothing
StoneSawParamExpanderV.DataContext = Nothing
StoneSawFinishParamExpanderV.DataContext = Nothing
StoneSawRoughParamExpanderV.DataContext = Nothing
StoneMillParamExpanderV.DataContext = Nothing
StoneDrillParamExpanderV.DataContext = Nothing
SurfFinishParamExpanderV.DataContext = Nothing
WjParamExpanderV.DataContext = Nothing
m_CurrOperation.ReadOperationParam()
' Riferimento a operazione selezionata
EgtWPFLib5.MachiningTreeViewItem.sh_SelMach = m_CurrOperation
IsModified(False)
ErrorOnOperation(False)
@@ -136,35 +193,44 @@ Public Class MachiningParameterExpanderVM
Select Case nType
Case MCH_OY.DRILLING
If MatType = MaterialType.STONE Then
If IsNothing(StoneDrillParamExpanderV) Then StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
StoneDrillParamExpanderV.DataContext = m_CurrOperation
Return StoneDrillParamExpanderV
Else
If IsNothing(WoodDrillParamExpanderV) Then WoodDrillParamExpanderV = New WoodDrillingParameterExpanderV
WoodDrillParamExpanderV.DataContext = m_CurrOperation
Return WoodDrillParamExpanderV
End If
Case MCH_OY.SAWING
If MatType = MaterialType.STONE Then
If IsNothing(StoneSawParamExpanderV) Then StoneSawParamExpanderV = New StoneSawingParameterExpanderV
StoneSawParamExpanderV.DataContext = m_CurrOperation
Return StoneSawParamExpanderV
Else
If IsNothing(WoodSawParamExpanderV) Then WoodSawParamExpanderV = New WoodSawingParameterExpanderV
WoodSawParamExpanderV.DataContext = m_CurrOperation
Return WoodSawParamExpanderV
End If
Case MCH_OY.MILLING
If MatType = MaterialType.BEAM Then
If IsNothing(BeamMillParamExpanderV) Then BeamMillParamExpanderV = New BeamMillingParameterExpanderV
BeamMillParamExpanderV.DataContext = m_CurrOperation
Return BeamMillParamExpanderV
ElseIf MatType = MaterialType.STONE Then
If IsNothing(StoneMillParamExpanderV) Then StoneMillParamExpanderV = New StoneMillingParameterExpanderV
StoneMillParamExpanderV.DataContext = m_CurrOperation
Return StoneMillParamExpanderV
Else
If IsNothing(WoodMillParamExpanderV) Then WoodMillParamExpanderV = New WoodMillingParameterExpanderV
WoodMillParamExpanderV.DataContext = m_CurrOperation
Return WoodMillParamExpanderV
End If
Case MCH_OY.SAWROUGHING
If IsNothing(StoneSawRoughParamExpanderV) Then StoneSawRoughParamExpanderV = New StoneSawRoughingParameterExpanderV
StoneSawRoughParamExpanderV.DataContext = m_CurrOperation
Return StoneSawRoughParamExpanderV
Case MCH_OY.SAWFINISHING
If IsNothing(StoneSawFinishParamExpanderV) Then StoneSawFinishParamExpanderV = New StoneSawFinishingParameterExpanderV
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
Return StoneSawFinishParamExpanderV
Case MCH_OY.POCKETING
@@ -180,23 +246,37 @@ Public Class MachiningParameterExpanderVM
' se utensile di tipo POLISHING rendo visibili i campi sugli epicicli
If nToolType = MCH_TY.MILL_POLISHING Then m_CurrOperation.Epicycles_Visibility = Visibility.Visible
End If
If IsNothing(PocketParamExpanderV) Then PocketParamExpanderV = New PocketingParameterExpanderV
PocketParamExpanderV.DataContext = m_CurrOperation
Return PocketParamExpanderV
Case MCH_OY.MORTISING
If IsNothing(MortiseParamExpanderV) Then MortiseParamExpanderV = New MortisingParameterExpanderV
MortiseParamExpanderV.DataContext = m_CurrOperation
Return MortiseParamExpanderV
Case MCH_OY.GENMACHINING
If IsNothing(GenMachinParamExpanderV) Then GenMachinParamExpanderV = New GenMachiningParameterExpanderV
GenMachinParamExpanderV.DataContext = m_CurrOperation
Return GenMachinParamExpanderV
Case MCH_OY.CHISELING
If IsNothing(ChiselParamExpanderV) Then ChiselParamExpanderV = New ChiselingParameterExpanderV
ChiselParamExpanderV.DataContext = m_CurrOperation
Return ChiselParamExpanderV
Case MCH_OY.SURFFINISHING
If IsNothing(SurfFinishParamExpanderV) Then SurfFinishParamExpanderV = New SurfFinishingParameterExpanderV
SurfFinishParamExpanderV.DataContext = m_CurrOperation
Return SurfFinishParamExpanderV
Case MCH_OY.WATERJETTING
If IsNothing(WjParamExpanderV) Then WjParamExpanderV = New WaterjettingParameterExpanderV
WjParamExpanderV.DataContext = m_CurrOperation
Return WjParamExpanderV
Case MCH_OY.FIVEAXISMILLING
If IsNothing(FiveAxExpanderV) Then FiveAxExpanderV = New FiveAxisMachinigParameterExpanderV
FiveAxExpanderV.DataContext = m_CurrOperation
Return FiveAxExpanderV
Case MCH_OY.SURFROUGHING
If IsNothing(SurfRoughExpanderV) Then SurfRoughExpanderV = New SurfRoughingParameterExpanderV
SurfRoughExpanderV.DataContext = m_CurrOperation
Return SurfRoughExpanderV
End Select
'MachiningParameterExpanderItem.ReadOperationParam()
@@ -242,84 +322,25 @@ Public Class MachiningParameterExpanderVM
Sub New()
EgtWPFLib5.MachiningDbWindowVM.m_sMachineIniPath = IniFile.m_sCurrMachIniFilePath
WoodDrillParamExpanderV = New WoodDrillingParameterExpanderV
WoodSawParamExpanderV = New WoodSawingParameterExpanderV
WoodMillParamExpanderV = New WoodMillingParameterExpanderV
BeamMillParamExpanderV = New BeamMillingParameterExpanderV
PocketParamExpanderV = New PocketingParameterExpanderV
MortiseParamExpanderV = New MortisingParameterExpanderV
GenMachinParamExpanderV = New GenMachiningParameterExpanderV
ChiselParamExpanderV = New ChiselingParameterExpanderV
StoneSawParamExpanderV = New StoneSawingParameterExpanderV
StoneSawFinishParamExpanderV = New StoneSawFinishingParameterExpanderV
StoneSawRoughParamExpanderV = New StoneSawRoughingParameterExpanderV
StoneMillParamExpanderV = New StoneMillingParameterExpanderV
StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
SurfFinishParamExpanderV = New SurfFinishingParameterExpanderV
WjParamExpanderV = New WaterjettingParameterExpanderV
Map.SetRefMachiningParameterExpanderVM(Me)
NotifyPropertyChanged("ParamExpanderPageV")
End Sub
#End Region ' Constructor
#Region "METHODS"
''' <summary>
''' Funzione che attiva l'evento che mette il focus sullo slider
''' </summary>
Public Sub FocusSlider()
RaiseEvent m_EventFocusOnSlider()
End Sub
#End Region ' Methods
#Region "COMMANDS"
#Region "NextStepToolCommand"
''' <summary>
''' Restituisce funzione per ricalcolo lavorazione.
''' </summary>
Public ReadOnly Property NextStepToolCommand As ICommand
Get
If m_cmdNextStepTool Is Nothing Then
m_cmdNextStepTool = New RelayCommand(AddressOf NextStepTool)
End If
Return m_cmdNextStepTool
End Get
End Property
''' <summary>
''' Ricalcola una lavorazione.
''' </summary>
Public Sub NextStepTool(ByVal param As Object)
If m_bPreviewTool Then
Dim nNextId = EgtPreviewMachiningTool(m_nPtEntId, MCH_PTM.AFTER)
If nNextId <> GDB_ID.NULL Then m_nPtEntId = nNextId
EgtDraw()
End If
End Sub
#End Region ' NextStepToolCommand
#Region "PrevStepToolCommand"
''' <summary>
''' Restituisce funzione per ricalcolo lavorazione.
''' </summary>
Public ReadOnly Property PrevStepToolCommand As ICommand
Get
If m_cmdPrevStepTool Is Nothing Then
m_cmdPrevStepTool = New RelayCommand(AddressOf PrevStepTool)
End If
Return m_cmdPrevStepTool
End Get
End Property
''' <summary>
''' Ricalcola una lavorazione.
''' </summary>
Public Sub PrevStepTool(ByVal param As Object)
If m_bPreviewTool Then
Dim nPrevId = EgtPreviewMachiningTool(m_nPtEntId, MCH_PTM.BEFORE)
If nPrevId <> GDB_ID.NULL Then m_nPtEntId = nPrevId
EgtDraw()
End If
End Sub
#End Region ' PrevStepToolCommand
#Region "UpdateMachiningCommand"
''' <summary>
@@ -349,7 +370,18 @@ Public Class MachiningParameterExpanderVM
MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return
End If
Dim bRecalc As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift)
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
' La modifica di alcuni parametri forza il ricalcolo della geometria
Dim ModifiedGeometry As Boolean = m_CurrOperation.m_IsModifiedSelectedFaceUseType
' aggiorno valori modificati
@@ -428,11 +460,9 @@ Public Class MachiningParameterExpanderVM
End If
End If
' Restart visualizzazione utensile
If m_bPreviewTool Then
EgtPreparePreviewMachiningTool()
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
End If
IsModified(False) ' NotifyPropertyChanged("UpdateMachiningBtn_Background")
SetSliderScale( EgtGetPreviewMachiningToolStepCount())
SetViewTool(True)
IsModified(False)
ErrorOnOperation(False)
EgtDraw()
Map.refProjectVM.EmitTitle()
@@ -488,8 +518,12 @@ Public Class OperationParamVisibilityConverter
Return TMDbParamVisibility.Chiseling(CInt(parameter))
Case MCH_OY.SURFFINISHING
Return TMDbParamVisibility.SurfFinishing(CInt(parameter))
Case MCH_OY.SURFROUGHING
Return TMDbParamVisibility.SurfRoughing(CInt(parameter))
Case MCH_OY.WATERJETTING
Return TMDbParamVisibility.WaterJetting(CInt(parameter))
Case MCH_OY.FIVEAXISMILLING
Return TMDbParamVisibility.FiveAxMachining(CInt(parameter))
Case Else
Return Visibility.Hidden
End Select
@@ -1,10 +1,10 @@
<UserControl x:Class="MortisingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,185 +75,251 @@
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
<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}"/>
<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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</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"
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 StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<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 StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:CheckParamV
ParamTxBl="{Binding InvertToolDirTxBl}"
ParamChBx="{Binding Path=InvertToolDir,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding FaceUseTypeTxBl}"
ParamCmBxList="{Binding Path=FaceUseTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}"
Style="{DynamicResource ComboParamV_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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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:ComboParamV ParamTxBl="{Binding FaceUseTypeTxBl}"
ParamCmBxList="{Binding Path=FaceUseTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}"
Style="{DynamicResource ComboParamV_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>
</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 Header="{Binding LeadInTypeMsg}" Name="LeadInTypeMsg"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding LeadInTypeMsg}" Name="LeadInTypeMsg"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding LeadOutTypeMsg}" Name="LeadOutType"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding LeadOutTypeMsg}" Name="LeadOutType"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class MortisingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class MortisingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class MortisingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class MortisingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,293 +1,354 @@
<UserControl x:Class="PocketingParameterExpanderV"
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">
<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>
<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,
<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}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding EpicyclesRadTxBl}"
ParamTxBx="{Binding Path=EpicyclesRad,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"
Visibility="{Binding Epicycles_Visibility}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding EpicyclesDistTxBl}"
ParamTxBx="{Binding Path=EpicyclesDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"
Visibility="{Binding Epicycles_Visibility}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
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}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EpicyclesRadTxBl}"
ParamTxBx="{Binding Path=EpicyclesRad,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"
Visibility="{Binding Epicycles_Visibility}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EpicyclesDistTxBl}"
ParamTxBx="{Binding Path=EpicyclesDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"
Visibility="{Binding Epicycles_Visibility}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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>
</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>
<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 LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
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}"/>
</StackPanel>
</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 LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
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}"/>
</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 LoTangTxBl}"
ParamTxBx="{Binding Path=LoTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</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 LoTangTxBl}"
ParamTxBx="{Binding Path=LoTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class PocketingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class PocketingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class PocketingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class PocketingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,10 +1,10 @@
<UserControl x:Class="StoneDrillingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -74,141 +74,211 @@
</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,
<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>
<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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</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:StringParamV
ParamTxBl="{Binding ReturnPosTxBl}"
ParamTxBx="{Binding Path=ReturnPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding ThrouAddLenTxBl}"
ParamTxBx="{Binding Path=ThrouAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StartSlowLenTxBl}"
ParamTxBx="{Binding Path=StartSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding EndSlowLenTxBl}"
ParamTxBx="{Binding Path=EndSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<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:StringParamV ParamTxBl="{Binding ReturnPosTxBl}"
ParamTxBx="{Binding Path=ReturnPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ThrouAddLenTxBl}"
ParamTxBx="{Binding Path=ThrouAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartSlowLenTxBl}"
ParamTxBx="{Binding Path=StartSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndSlowLenTxBl}"
ParamTxBx="{Binding Path=EndSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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 SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneDrillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneDrillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneDrillingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class StoneDrillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,218 +1,288 @@
<UserControl x:Class="StoneMillingParameterExpanderV"
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">
<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>
<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,
<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}"/>
<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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</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 LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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"
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 LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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 SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneMillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneMillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneMillingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class StoneMillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,10 +1,10 @@
<UserControl x:Class="StoneSawFinishingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,186 +75,255 @@
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
<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}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
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"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
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:ComboParamV ParamTxBl="{Binding LeadLinkTypeTxBl}"
ParamCmBxList="{Binding Path=LeadLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
</Expander>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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 Header="{Binding StepGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<Expander Header="{Binding StepGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding OffsetGpBxLbl}"/>
</Expander.Header>
<UniformGrid Columns="1">
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding OffsetGpBxLbl}"/>
</Expander.Header>
<UniformGrid Columns="1">
<EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</UniformGrid>
</Expander>
</UniformGrid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding VertFeedTxBl}"
ParamTxBx="{Binding Path=VertFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding VertFeedTxBl}"
ParamTxBx="{Binding Path=VertFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneSawFinishingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneSawFinishingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneSawFinishingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class StoneSawFinishingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,10 +1,10 @@
<UserControl x:Class="StoneSawRoughingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,176 +75,245 @@
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
<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>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
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 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:ComboParamV
ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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 Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</Expander>
<Expander Header="{Binding StepGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding StepGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding OffsetGpBxLbl}"/>
</Expander.Header>
<UniformGrid Columns="1">
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding OffsetGpBxLbl}"/>
</Expander.Header>
<UniformGrid Columns="1">
<EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</UniformGrid>
</Expander>
</UniformGrid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneSawRoughingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneSawRoughingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneSawRoughingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class StoneSawRoughingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,352 +1,405 @@
<UserControl x:Class="StoneSawingParameterExpanderV"
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">
<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>
<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,
<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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid>
</StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding WorkSideTxBl}"
ParamCmBxList="{Binding Path=WorkSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</Expander>
<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:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
ParamCmBxList="{Binding Path=WorkSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</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 LiTangStoneTxBl}"
ParamTxBx="{Binding Path=LiTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding LiElevStoneTxBl}"
ParamTxBx="{Binding Path=LiElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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>
<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}"/>
</StackPanel>
</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 LiTangStoneTxBl}"
ParamTxBx="{Binding Path=LiTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevStoneTxBl}"
ParamTxBx="{Binding Path=LiElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding StepGpBxLbl}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepBackTxBl}"
ParamTxBx="{Binding Path=StepBack,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepSideAngTxBl}"
ParamTxBx="{Binding Path=StepSideAng,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepSideAngBackTxBl}"
ParamTxBx="{Binding Path=StepSideAngBack,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepIntArcTxBl}"
ParamTxBx="{Binding Path=StepIntArc,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepExtArcTxBl}"
ParamTxBx="{Binding Path=StepExtArc,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepLastTxBl}"
ParamTxBx="{Binding Path=StepLast,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</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}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding OffsetGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding StepGpBxLbl}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepBackTxBl}"
ParamTxBx="{Binding Path=StepBack,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepSideAngTxBl}"
ParamTxBx="{Binding Path=StepSideAng,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepSideAngBackTxBl}"
ParamTxBx="{Binding Path=StepSideAngBack,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepIntArcTxBl}"
ParamTxBx="{Binding Path=StepIntArc,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepExtArcTxBl}"
ParamTxBx="{Binding Path=StepExtArc,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepLastTxBl}"
ParamTxBx="{Binding Path=StepLast,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<Expander Header="{Binding OffsetGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding BackFeedTxBl}"
ParamTxBx="{Binding Path=BackFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideAngFeedTxBl}"
ParamTxBx="{Binding Path=SideAngFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BackFeedTxBl}"
ParamTxBx="{Binding Path=BackFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngFeedTxBl}"
ParamTxBx="{Binding Path=SideAngFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneSawingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneSawingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneSawingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class StoneSawingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,286 +1,341 @@
<UserControl x:Class="SurfFinishingParameterExpanderV"
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">
<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>
<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,
<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}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<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}"
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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</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 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,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding ApproxTxBl}"
ParamTxBx="{Binding Path=Approx,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<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}"
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:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ApproxTxBl}"
ParamTxBx="{Binding Path=Approx,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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>
<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 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}"/>
</StackPanel>
</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 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}"/>
</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 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}"/>
</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 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}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class SurfFinishingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class SurfFinishingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class SurfFinishingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class SurfFinishingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -0,0 +1,346 @@
<UserControl x:Class="SurfRoughingParameterExpanderV"
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}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
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"
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:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SubStepTxBl}"
ParamTxBx="{Binding Path=SubStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ApproxTxBl}"
ParamTxBx="{Binding Path=Approx,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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>
<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 LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
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}"/>
</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 LoTangTxBl}"
ParamTxBx="{Binding Path=LoTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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 SurfRoughingParameterExpanderV
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
@@ -1,10 +1,10 @@
<UserControl x:Class="WaterjettingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -74,280 +74,340 @@
</UserControl.Resources>
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<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}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding ForwardAngleTxBl}"
<StackPanel Name="OperationFirstParametersStackPanel">
<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}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ForwardAngleTxBl}"
ParamTxBx="{Binding Path=ForwardAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
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}"
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 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 SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</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:CheckParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding LiHoleTxBl}"
ParamChBx="{Binding Path=LiHole,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0"
ParamTxBl="{Binding LiHoleRadTxBl}"
ParamTxBx="{Binding Path=LiHoleRad,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1"
ParamTxBl="{Binding LpTurnsTxBl}"
ParamTxBx="{Binding Path=LpTurns,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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 Grid.Column="1" Grid.Row="1"
ParamTxBl="{Binding HpTurnsTxBl}"
ParamTxBx="{Binding Path=HpTurns,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiPerpTxBl}"
ParamTxBx="{Binding Path=LiPerp,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<Expander Header="{Binding AnglesGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:CheckParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding LiHoleTxBl}"
ParamChBx="{Binding Path=LiHole,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding ExtCornTypeTxBl}"
ParamCmBxList="{Binding Path=ExtCornTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtCornType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0"
ParamTxBl="{Binding LiHoleRadTxBl}"
ParamTxBx="{Binding Path=LiHoleRad,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding IntCornTypeTxBl}"
ParamCmBxList="{Binding Path=IntCornTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedIntCornType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1"
ParamTxBl="{Binding LpTurnsTxBl}"
ParamTxBx="{Binding Path=LpTurns,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding CornSlowLenTxBl}"
ParamTxBx="{Binding Path=CornSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="1"
ParamTxBl="{Binding HpTurnsTxBl}"
ParamTxBx="{Binding Path=HpTurns,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding CornSlowPercTxBl}"
ParamTxBx="{Binding Path=CornSlowPerc,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</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}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:CheckParamV
ParamTxBl="{Binding ProbingGpBxLbl}"
ParamChBx="{Binding Path=Probing,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
</Expander.Header>
<StackPanel Margin="2">
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0"
ParamTxBl="{Binding ProbingMinDistTxBl}"
ParamTxBx="{Binding Path=ProbingMinDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1"
ParamTxBl="{Binding ProbingMaxDistTxBl}"
ParamTxBx="{Binding Path=ProbingMaxDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AnglesGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtCornTypeTxBl}"
ParamCmBxList="{Binding Path=ExtCornTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtCornType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding IntCornTypeTxBl}"
ParamCmBxList="{Binding Path=IntCornTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedIntCornType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding CornSlowLenTxBl}"
ParamTxBx="{Binding Path=CornSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding CornSlowPercTxBl}"
ParamTxBx="{Binding Path=CornSlowPerc,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding ProbingGpBxLbl}"
ParamChBx="{Binding Path=Probing,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
</Expander.Header>
<StackPanel Margin="2">
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0"
ParamTxBl="{Binding ProbingMinDistTxBl}"
ParamTxBx="{Binding Path=ProbingMinDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1"
ParamTxBl="{Binding ProbingMaxDistTxBl}"
ParamTxBx="{Binding Path=ProbingMaxDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding OffsetGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</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 ThicknessFeedTxBl}"
ParamTxBx="{Binding Path=ThicknessFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
<Expander Header="{Binding OffsetGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</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 ThicknessFeedTxBl}"
ParamTxBx="{Binding Path=ThicknessFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WaterjettingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class WaterjettingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class WaterjettingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class WaterjettingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,10 +1,10 @@
<UserControl x:Class="WoodDrillingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,146 +75,215 @@
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
<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"/>
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:StringParamV
ParamTxBl="{Binding ReturnPosTxBl}"
ParamTxBx="{Binding Path=ReturnPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding ThrouAddLenTxBl}"
ParamTxBx="{Binding Path=ThrouAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StartSlowLenTxBl}"
ParamTxBx="{Binding Path=StartSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding EndSlowLenTxBl}"
ParamTxBx="{Binding Path=EndSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<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:StringParamV ParamTxBl="{Binding ReturnPosTxBl}"
ParamTxBx="{Binding Path=ReturnPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ThrouAddLenTxBl}"
ParamTxBx="{Binding Path=ThrouAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartSlowLenTxBl}"
ParamTxBx="{Binding Path=StartSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndSlowLenTxBl}"
ParamTxBx="{Binding Path=EndSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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 SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WoodDrillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class WoodDrillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class WoodDrillingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class WoodDrillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,10 +1,10 @@
<UserControl x:Class="WoodMillingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,342 +75,385 @@
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
<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}"/>
<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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</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"
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:StringParamV
ParamTxBl="{Binding OverLapTxBl}"
ParamTxBx="{Binding Path=OverLap,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<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:StringParamV ParamTxBl="{Binding OverLapTxBl}"
ParamTxBx="{Binding Path=OverLap,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:CheckParamV
ParamTxBl="{Binding InvertToolDirTxBl}"
ParamChBx="{Binding Path=InvertToolDir,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding FaceUseTypeTxBl}"
ParamCmBxList="{Binding Path=FaceUseTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}"
Style="{DynamicResource ComboParamV_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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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:ComboParamV ParamTxBl="{Binding FaceUseTypeTxBl}"
ParamCmBxList="{Binding Path=FaceUseTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}"
Style="{DynamicResource ComboParamV_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>
</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>
<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}"
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 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}"
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: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}"
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 OscEnableTxBl}"
ParamChBx="{Binding Path=OscEnable,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
</Expander.Header>
<StackPanel Margin="2">
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OscHeightTxBl}"
ParamTxBx="{Binding Path=OscHeight,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OscRampLenTxBl}"
ParamTxBx="{Binding Path=OscRampLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OscFlatLenTxBl}"
ParamTxBx="{Binding Path=OscFlatLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding OscEnableTxBl}"
ParamChBx="{Binding Path=OscEnable,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
</Expander.Header>
<StackPanel Margin="2">
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OscHeightTxBl}"
ParamTxBx="{Binding Path=OscHeight,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OscRampLenTxBl}"
ParamTxBx="{Binding Path=OscRampLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OscFlatLenTxBl}"
ParamTxBx="{Binding Path=OscFlatLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=SpeedErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=SpeedErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WoodMillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class WoodMillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class WoodMillingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class WoodMillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -1,10 +1,10 @@
<UserControl x:Class="WoodSawingParameterExpanderV"
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">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,225 +75,286 @@
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
<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}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding WorkSideTxBl}"
ParamCmBxList="{Binding Path=WorkSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
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"/>
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</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}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
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"
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 StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<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 StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<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>
</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}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
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: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>
</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>
<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}"/>
</StackPanel>
</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}"/>
</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}"/>
</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}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True,
Mode=OneWay}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True,
Mode=OneWay}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV
ParamTxBl="{Binding CurveUseTxBl}"
ParamCmBxList="{Binding Path=CurveUseList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True,
Mode=OneWay}"
ParamCmBxSelIndex="{Binding Path=SelectedCurveUse}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel Margin="2">
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding ApproxTxBl}"
ParamTxBx="{Binding Path=Approx,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding CurveUseTxBl}"
ParamCmBxList="{Binding Path=CurveUseList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True,
Mode=OneWay}"
ParamCmBxSelIndex="{Binding Path=SelectedCurveUse}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel Margin="2">
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ApproxTxBl}"
ParamTxBx="{Binding Path=Approx,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WoodSawingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
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
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class WoodSawingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class WoodSawingParameterExpanderV
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)
@@ -53,7 +54,7 @@ Public Class WoodSawingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
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
@@ -5,26 +5,25 @@ Public Class DispositionOpListBoxItem
Public Property StatusAll As Boolean?
Get
' Recupero gli indici delle operazioni della Disposizione corrente
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).Status
For OpInDispIndex = 1 To OpIndexes.Count - 1
If DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpIndexes(OpInDispIndex)), MachiningOpListBoxItem).Status <> bTemp Then Return Nothing
Next
Return bTemp
' Ottieni gli indici delle operazioni e calcola il valore aggregato
Return GetUnifiedStatus(Function(item) item.Status)
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(StatusAll))
Return
End If
For Each OpInDispIndex In OpIndexes
DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpInDispIndex), MachiningOpListBoxItem).Status = If(IsNothing(value), False, CBool(value))
Next
' Aggiorna lo stato delle operazioni
UpdateAllStatus(value, Sub(item, val) item.Status = CBool(val))
NotifyPropertyChanged(NameOf(StatusAll))
End Set
End Property
Public Property OnOffAll As Boolean?
Get
' Ottieni gli indici delle operazioni e calcola il valore aggregato
Return GetUnifiedStatus(Function(item) item.OnOff)
End Get
Set(value As Boolean?)
' Aggiorna lo stato delle operazioni
UpdateAllStatus(value, Sub(item, val) item.OnOff = val)
NotifyPropertyChanged(NameOf(OnOffAll))
End Set
End Property
@@ -53,6 +52,7 @@ Public Class DispositionOpListBoxItem
Exit For
End If
Next
' Inserisco in una lista gli indici delle operazioni della Disposizione (a partire dunque dall'indice trovato)
Dim OpIndexes As New List(Of Integer)()
Dim OpIndex As Integer = DispIndex + 1
@@ -64,4 +64,28 @@ Public Class DispositionOpListBoxItem
Return OpIndexes
End Function
' Metodo per calcolare il valore aggregato (Checked/Unchecked/Indeterminate)
Private Function GetUnifiedStatus(getStatus As Func(Of MachiningOpListBoxItem, Boolean?)) As Boolean?
Dim OpIndexes As List(Of Integer) = GetOpIndexes()
If OpIndexes.Count = 0 Then Return False
Dim firstStatus = getStatus(DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpIndexes(0)), MachiningOpListBoxItem))
For Each index In OpIndexes.Skip(1)
Dim currentStatus = getStatus(DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(index), MachiningOpListBoxItem))
If currentStatus <> firstStatus Then Return Nothing
Next
Return firstStatus
End Function
' Metodo per aggiornare lo stato di tutte le operazioni
Private Sub UpdateAllStatus(value As Boolean?, updateStatus As Action(Of MachiningOpListBoxItem, Boolean?))
Dim OpIndexes As List(Of Integer) = GetOpIndexes()
If OpIndexes.Count = 0 Then Return
For Each index In OpIndexes
Dim item = DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(index), MachiningOpListBoxItem)
updateStatus(item, If(IsNothing(value), False, CBool(value)))
Next
End Sub
End Class
@@ -1,6 +1,4 @@
Imports System.ComponentModel
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtUILib
Public Class MachiningOpListBoxItem
Inherits OperationListBoxItem
@@ -28,11 +26,29 @@ Public Class MachiningOpListBoxItem
End If
OpIndex += 1
Next
' Se Operazione selezionata metto la lampadina in stato false
For Each tmpItem As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
If tmpItem.Id = Id Then
If tmpItem.OnOff Then
EgtSetStatus(tmpItem.Id, GDB_ST.OFF)
tmpItem.m_bThreeState = False
tmpItem.OnOff = False
Exit For
Else
EgtSetStatus(tmpItem.Id, GDB_ST.ON_)
tmpItem.OnOff = True
Exit For
End If
End If
Next
' Notifico StatusAll per calcolare lo stato della CheckBox della Disposizione
Map.refOperationsListExpanderVM.OperationList(DispIndex).NotifyPropertyChanged(NameOf(DispositionOpListBoxItem.StatusAll))
EgtSetOperationMode(Id, m_Status)
EgtDraw()
End If
Map.refProjectVM.EmitTitle()
NotifyPropertyChanged(NameOf(Status))
End If
End Set
@@ -101,10 +117,10 @@ Public Class MachiningOpListBoxItem
RaiseEvent m_ModifyNameGetFocus()
' se esco da modifica
End If
NotifyPropertyChanged("ModifiedName")
NotifyPropertyChanged("Name")
NotifyPropertyChanged("Name_Visibility")
NotifyPropertyChanged("ModifyName_Visibility")
NotifyPropertyChanged(NameOf(ModifiedName))
NotifyPropertyChanged(NameOf(Name))
NotifyPropertyChanged(NameOf(Name_Visibility))
NotifyPropertyChanged(NameOf(ModifyName_Visibility))
End Set
End Property
@@ -126,6 +142,35 @@ Public Class MachiningOpListBoxItem
End Get
End Property
Public m_bThreeState As Boolean = False
Private m_bOnOff As Boolean? = True
Public Property OnOff As Boolean?
Get
Return m_bOnOff
End Get
Set(value As Boolean?)
' Controllo se la lampadina è messa in stato Nothing e value e false
m_bOnOff = If(m_bThreeState AndAlso Not value, True, value)
Dim bOldEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
' se abilitato, eseguo operazione
Dim status As Integer = GDB_ST.OFF
' Controllo se lo stato della lampadina è true o nullo
If m_bOnOff OrElse IsNothing(m_bOnOff) Then
status = GDB_ST.ON_
End If
' Modifica lo stato della checkbox all delle lampadine
ModifyStatusLamp()
' Setto lo stato della lampadina
EgtSetStatus(Id, status)
If bOldEnMod Then EgtEnableModified()
If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
m_bThreeState = False
Map.refProjectVM.EmitTitle()
NotifyPropertyChanged(NameOf(OnOff))
End Set
End Property
' Definizione comandi
Private m_cmdModifyNameEnter As ICommand
Private m_cmdModifyNameEsc As ICommand
@@ -170,11 +215,28 @@ Public Class MachiningOpListBoxItem
Return ""
Case MCH_OY.CHISELING
Return ""
Case MCH_OY.FIVEAXISMILLING
Return ""
Case Else
Return String.Empty
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"
@@ -209,7 +271,7 @@ Public Class MachiningOpListBoxItem
m_CloseModifyLostFocus = False
MessageBox.Show(EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
m_IsActive_ModifyName = True
NotifyPropertyChanged("ModifyName_Visibility")
NotifyPropertyChanged(NameOf(ModifyName_Visibility))
m_Spy = True
Return
End If
@@ -36,7 +36,7 @@ Public Class OperationListBoxItem
Set(value As Boolean)
If Not IsNothing(value) Then
Dim indexes As List(Of OperationListBoxItem) = New List(Of OperationListBoxItem)
Dim indexes As New List(Of OperationListBoxItem)
Dim Count As Integer = 0
For Each OperationListBoxItem In Map.refOperationsListExpanderVM.OperationList
If OperationListBoxItem.IsSelected And OperationListBoxItem.Id <> m_Id Then
@@ -45,6 +45,23 @@ Public Class OperationListBoxItem
End If
Next
' Se Operazione selezionata metto la lampadina in stato Nothing
For Each tmpItem As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
If tmpItem.Id = Id Then
If IsNothing(tmpItem.OnOff) Then
EgtSetStatus(tmpItem.Id, GDB_ST.OFF)
tmpItem.m_bThreeState = False
tmpItem.OnOff = False
Exit For
ElseIf Not tmpitem.OnOff AndAlso Not m_IsSelected Then
EgtSetStatus(tmpItem.Id, GDB_ST.SEL)
tmpItem.OnOff = Nothing
tmpItem.m_bThreeState = True
Exit For
End If
End If
Next
If indexes.Count > 0 Then
If EgtGetOperationPhase(Id) <> EgtGetOperationPhase(indexes(0).Id) Then
Return
@@ -72,9 +89,9 @@ Public Class OperationListBoxItem
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
NotifyPropertyChanged("IsSelected")
NotifyPropertyChanged(NameOf(IsSelected))
' Aggiorno visualizzazione
EgtDraw()
If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
Return
End If
' Imposto la fase di lavorazione corrente
@@ -106,31 +123,37 @@ Public Class OperationListBoxItem
Dim EntityIndex As Integer = 0
Dim SubEntityIndex As Integer = 0
While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex)
EgtSelectObj( EntityIndex)
If EgtGetType( EntityIndex) = GDB_TY.SRF_MESH Or EgtGetType( EntityIndex) = GDB_TY.SRF_FRGN Then
EgtSelectObj(EntityIndex)
If EgtGetType(EntityIndex) = GDB_TY.SRF_MESH Or EgtGetType(EntityIndex) = GDB_TY.SRF_FRGN Then
SelData.AddIdSub(EntityIndex, SubEntityIndex)
End If
CountIndex += 1
End While
End If
' Notifico al contentcontrol OperationParameter di aggiornarsi
If Not IsNothing( Map.refOperationParametersExpanderVM) Then
If Not IsNothing(Map.refOperationParametersExpanderVM) Then
Map.refOperationParametersExpanderVM.OnPropertyChanged("OperationParameters")
End If
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
' Notifico l'operazione selezionata all'expander con l'albero delle lavorazioni aggiungibili
If Not IsNothing( Map.refMachiningTreeExpanderVM) Then
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then
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
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue()
End If
'OnPropertyChanged("ToolExpanderHeader")
Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled")
Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled")
Map.refOperationsListExpanderVM.OnPropertyChanged("Rename_IsEnabled")
NotifyPropertyChanged("IsSelected")
NotifyPropertyChanged(NameOf(IsSelected))
End Set
End Property
@@ -70,9 +70,10 @@ Public Class OperationParametersExpanderVM
Return m_DispositionParameterExpander
Else
If IsNothing(m_MachiningParameterExpander) Then
m_MachiningParameterExpander = New MachiningParameterExpanderV
m_MachiningParameterExpanderVM = New MachiningParameterExpanderVM()
m_MachiningParameterExpander.DataContext = m_MachiningParameterExpanderVM
m_MachiningParameterExpander = New MachiningParameterExpanderV With {
.DataContext = m_MachiningParameterExpanderVM
}
End If
m_MachiningParameterExpanderVM.NotifyPropertyChanged("ParamExpanderPageV")
Return m_MachiningParameterExpander
@@ -170,11 +171,15 @@ Public Class OperationParametersExpanderVM
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomChiseling
Case MCH_OY.SURFFINISHING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfFinishing
Case MCH_OY.SURFROUGHING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfRoughing
Case MCH_OY.WATERJETTING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomWaterJetting
Case MCH_OY.FIVEAXISMILLING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomFiveAxMilling
End Select
' Imposto visualizzazione utensile
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = True
Map.refMachiningParameterExpanderVM.SetViewTool( True)
End If
OnPropertyChanged("ParametersIsExpanded")
Return True
@@ -204,7 +209,7 @@ Public Class OperationParametersExpanderVM
EgtDraw()
Else
' Nascondo visualizzazione utensile
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = False
Map.refMachiningParameterExpanderVM.SetViewTool( False)
End If
ParametersExpanderName = String.Empty
' Disabilito la selezione delle lavorazioni
@@ -1,10 +1,10 @@
<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}">
@@ -27,9 +27,9 @@
<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">
<!--<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>-->
@@ -38,11 +38,12 @@
<Border Background="Transparent">
<Border.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick"
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
CommandParameter="{Binding Id}"/>
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="Auto"/>
<ColumnDefinition Width="1*"/>
@@ -50,9 +51,13 @@
</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}"
<!--<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"/>-->
<CheckBox Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="1"
IsChecked="{Binding OnOff}" 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="1" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
<TextBox Grid.Column="2" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
Width="150"
x:Name="Box"
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
@@ -63,7 +68,7 @@
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
</TextBox.InputBindings>
</TextBox>
<TextBlock Grid.Column="2" Text="{Binding Info}"/>
<TextBlock Grid.Column="3" Text="{Binding Info}"/>
</Grid>
</Border>
</DataTemplate>
@@ -71,14 +76,17 @@
<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}"/>
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"/>
<CheckBox IsChecked="{Binding OnOffAll}" Style="{StaticResource EgtCAM5_LampToggleButton}" Height="15" Width="15" 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"/>
FontSize="15" FontWeight="SemiBold"/>
</StackPanel>
</Border>
</DataTemplate>
@@ -84,6 +84,7 @@ Public Class OperationsListExpanderVM
Set(value As Boolean)
If value <> m_ListIsExpanded Then
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value)
SetStatusOnLamp()
End If
End Set
End Property
@@ -111,6 +112,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 +290,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
@@ -329,10 +361,11 @@ Public Class OperationsListExpanderVM
' Aggiungo la nuova fase
Dim nPhase As Integer = EgtAddPhase()
Dim nDispId As Integer = EgtGetPhaseDisposition(nPhase)
' Confermo grezzi e bloccaggi sopra salvati
' Confermo grezzi, movimenti assi di disposizione e bloccaggi sopra salvati
For Each nId As Integer In vRawId
EgtKeepRawPart(nId, nLastPhase)
Next
EgtKeepAllDispAxes(nLastPhase)
For Each nId As Integer In vFxtId
EgtKeepFixture(nId, nLastPhase)
Next
@@ -433,6 +466,10 @@ 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.ResetSliderValue()
End If
End If
End Sub
@@ -457,55 +494,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
@@ -532,52 +569,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
@@ -603,6 +640,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
@@ -612,6 +651,7 @@ Public Class OperationsListExpanderVM
Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr)
EgtSetModified()
' Deseleziono l'Operazione selezionata e la de-evidenzio nel Disegno
m_ForceDrawInIsSelected = False
For Each Operation In OperationList
If Operation.IsSelected Then
Operation.IsSelected = False
@@ -619,6 +659,9 @@ Public Class OperationsListExpanderVM
Next
' Ricarico la lista delle Operazioni
LoadOperationList(GDB_ID.NULL)
' Rimetto le lampadine in modo corretto
tmpStatusLamp.UpdateStatusLamp()
m_ForceDrawInIsSelected = True
' Aggiorno visualizzazione e ritorno a cursore standard
EgtDraw()
Application.Current.MainWindow.ForceCursor = False
@@ -829,6 +872,7 @@ Public Class OperationsListExpanderVM
MCH_MP.OFFSET,
MCH_MP.STEPEXTARC,
MCH_MP.STEPINTARC,
MCH_MP.SUBSTEP,
MCH_MP.SIDESTEP,
MCH_MP.VERTFEED,
MCH_MP.STEPSIDEANG,
@@ -993,7 +1037,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
@@ -1006,9 +1052,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
@@ -1250,7 +1301,7 @@ Public Class OperationsListExpanderVM
If m_NewMachining Then EndNewMachining(GDB_ID.NULL)
' Disabilito visualizzazione utensile
If Not IsNothing(m_MachiningParameterExpander) Then
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = False
Map.refMachiningParameterExpanderVM.SetViewTool(False)
End If
' Deseleziono le operazioni correnti per eliminare il mark
For Each Operation In OperationList
@@ -1260,6 +1311,97 @@ 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"
' Id dell'operazione
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
' Stato della lampadina: vero, falso e nullo
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"
''' <summary>
''' Funzione che salva gli stati di tutte le lampadine delle operazioni
''' </summary>
''' <returns></returns>
Public Function LoadStatusLamp() As ObservableCollection(Of StatusLamp)
' Utilizzo di LINQ per creare la lista in modo più conciso, carico gli stati delle lampadine per tenerli salvati
Return New ObservableCollection(Of StatusLamp)(Map.refOperationsListExpanderVM.tmpOperationList.Select(Function(ItemOp) New StatusLamp(ItemOp.Id, ItemOp.OnOff)))
End Function
''' <summary>
''' Funzione che aggiorna lo stato delle lampadine delle operazioni
''' </summary>
Public Sub UpdateStatusLamp()
' Verifica che tmpOperationList non sia nulla
If IsNothing(Map.refOperationsListExpanderVM.tmpOperationList) Then Return
Dim tmpStatusLamp As StatusLamp
For Each ItemOp As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
' Recuero lo stato della lampadina
tmpStatusLamp = Map.refOperationsListExpanderVM.StatusLampList.FirstOrDefault(Function(x) x.nId = ItemOp.Id)
' Controllo se lo stato della lampadina è falso nella lista StatusLampList
If Not tmpStatusLamp.bStatusLamp Then
' Rimetto lo stato della lampadina a falso nella OperationList
EgtSetStatus(ItemOp.Id, GDB_ST.OFF)
ItemOp.OnOff = False
' Controllo se lo stato della lampadina è nullo nella lista StatusLampList
ElseIf IsNothing(tmpStatusLamp.bStatusLamp) Then
' Rimetto lo stato della lampadina a nullo nella OperationList
EgtSetStatus(ItemOp.Id, GDB_ST.SEL)
ItemOp.OnOff = Nothing
End If
Next
End Sub
#End Region ' Methods
End Class
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
@@ -18,6 +17,9 @@ 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()
End If
End Set
End Property
@@ -33,6 +35,17 @@ Public Class SimulationExpanderVM
End Set
End Property
Private m_bOnlySimulation As Boolean = False
Public Property bOnlySimulation As Boolean
Get
Return m_bOnlySimulation
End Get
Set(value As Boolean)
m_bOnlySimulation = value
NotifyPropertyChanged("bOnlySimulation")
End Set
End Property
Public Overrides Property SliderValue As Double
Get
Return m_SliderValue
@@ -90,9 +103,11 @@ Public Class SimulationExpanderVM
If Not GetCncFileName(True, sCncFile, sInfo) Then Return
' Eseguo
If Not EgtGenerate(sCncFile, sInfo) Then
Dim nErr = EgtGetLastMachMgrErrorId()
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
@@ -151,6 +166,14 @@ Public Class SimulationExpanderVM
' disattivo MTable e SpecialPanel se vado in simulazione
Map.refDoorPanelVM.MTableIsEnabled(False)
Map.refSpecialPanelVM.SpecialPanelIsEnabled(False)
If m_bOnlySimulation Then
Map.refTopCommandBarVM.DrawIsEnabled = False
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
Map.refEstimationsExpanderVM.Estimation_IsEnabled =False
Map.refMachGroupPanelVM.SetMachGroupState(False)
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
End If
Return True
End Function
@@ -206,11 +229,16 @@ Public Class SimulationExpanderVM
UpdateUI()
' Messaggio in caso di errore
If Not bOk Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If
End If
' Imposto stato corrente
@@ -244,16 +272,22 @@ Public Class SimulationExpanderVM
Map.refTopCommandBarVM.DrawIsEnabled = False
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
Map.refMachGroupPanelVM.SetMachGroupState(False) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = False
Map.refMachGroupPanelVM.SetMachGroupState(False)
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
m_bStopOnNextCollision = True
If Not EgtSimStart(False) Then
If EgtGetLastMachMgrErrorId() <> 0 Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
End If
Dim nShowDataCounter As Integer = 0
While GetStatus() <> MCH_SIM_ST.UI_STOP
@@ -316,8 +350,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()
@@ -336,10 +372,15 @@ Public Class SimulationExpanderVM
End While
SetSimExecuting(False)
IniFile.m_bSimulExecuting = False
Map.refTopCommandBarVM.DrawIsEnabled = True
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = True
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
Map.refMachGroupPanelVM.SetMachGroupState(True) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = True
If m_bOnlySimulation Then
' Impedisco salvataggio eventuale modifica stato virtual milling
EgtResetModified()
Else
Map.refTopCommandBarVM.DrawIsEnabled = True
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = True
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
Map.refMachGroupPanelVM.SetMachGroupState(True)
End If
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
If IniFile.m_bSimulEndExitApp Then
refMainWindowVM.CloseApplication( Nothing)
+4 -5
View File
@@ -1,10 +1,9 @@
<UserControl x:Class="MachiningOptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<StackPanel Name="ciao" Background="Transparent" Margin="0,0,3.5001,0" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<!--ContentPresenter that contains the OperationsListExpander-->
<ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/>
<!--ContentPresenter that contains the OperationParametersExpander-->
+18 -3
View File
@@ -23,7 +23,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
@@ -53,7 +56,10 @@ Friend Module OptionModule
Friend m_SelGeomGenMachining As SceneSelModeOpt
Friend m_SelGeomChiseling As SceneSelModeOpt
Friend m_SelGeomSurfFinishing As SceneSelModeOpt
Friend m_SelGeomSurfRoughing As SceneSelModeOpt
Friend m_SelGeomWaterJetting As SceneSelModeOpt
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
Friend m_SelVMillQuality 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
@@ -78,7 +84,7 @@ Friend Module OptionModule
End While
If nIndex = 1 Then
EgtOutLog("Error missing languages section in Config.ini")
MessageBox.Show( "Error : missing languages informations", "EgtCAM5", MessageBoxButton.OK, MessageBoxImage.Error)
MessageBox.Show("Error : missing languages informations", "EgtCAM5", MessageBoxButton.OK, MessageBoxImage.Error)
End
End If
' Inizializzo la lingua corrente
@@ -102,9 +108,9 @@ Friend Module OptionModule
GetPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor)
m_GridColor = GridColor
' Inizializzo flag linee ingrossate
m_bThickLine = ( GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1)
m_bThickLine = (GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1)
' Inizializzo flag visualizzazione smussata delle superfici
m_bSmoothTriMesh = ( GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
m_bSmoothTriMesh = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
' Inizio colore di default in disegno
Dim DefColor As New Color3d(0, 0, 0)
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
@@ -114,7 +120,10 @@ Friend Module OptionModule
' 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)
@@ -141,6 +150,12 @@ Friend Module OptionModule
m_SelGeomChiseling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSURFFINISHING, -1)
m_SelGeomSurfFinishing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSURFROUGHING, -1)
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))
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
+215 -126
View File
@@ -1,21 +1,22 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OptionWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
TitleBarBrush="{StaticResource EgaltechBlue1}"
BorderBrush="{StaticResource EgaltechBlue1}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinWidth="400" MinHeight="382"
Width="400" Height="412"
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
TitleBarBrush="{StaticResource EgaltechBlue1}"
BorderBrush="{StaticResource EgaltechBlue1}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinWidth="400" MinHeight="382"
Width="400" Height="575"
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<EgtWPFLib5:EgtCustomWindow.Resources>
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
<local:VMillTypeConverter x:Key="VMillTypeConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources>
<TabControl Margin="5,5,5,5">
<TabItem Header="{Binding GenericMsg}">
<StackPanel Margin="5,5,5,0">
@@ -25,8 +26,9 @@
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
Margin="0,0,0,5"/>
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
TextAlignment="Center"/>
<TextBlock Text="{Binding LanguageAdvertMsg}"
TextWrapping="Wrap"
TextAlignment="Center"/>
</UniformGrid>
</GroupBox>
<UniformGrid Columns="2"
@@ -69,11 +71,11 @@
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
</Grid>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
SelectedItem="{Binding SelectedTextFont}" Height="25"
Margin="10,5,0,0"/>
Margin="0,0,0,5">
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
SelectedItem="{Binding SelectedTextFont}" Height="25"
Margin="10,5,0,0"/>
</UniformGrid>
<Grid Margin="5,5,5,5">
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
@@ -96,99 +98,132 @@
VerticalContentAlignment="Center"
Margin="10,0,0,0"/>
</UniformGrid>
<GroupBox Grid.Column="1" Grid.RowSpan="2"
<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header="{Binding DimensionMsg}"
Margin="0,0,0,5">
<UniformGrid Grid.ColumnSpan="2" Columns="2">
<TextBlock Text="{Binding ExtLineLenMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ExtLineLen}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding ArrowLenMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ArrowLen}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding TextDistMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding TextDist}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding LenIsMMMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedItem="{Binding SelectedUnitMeasure}" Height="25"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding DecDigitMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding DecDigit}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
SelectedItem="{Binding SelectedFont}" Height="25"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding TextHeightMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding TextHeight}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
</UniformGrid>
</GroupBox>
</StackPanel>
<UniformGrid Grid.ColumnSpan="2" Columns="2">
<TextBlock Text="{Binding ExtLineLenMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ExtLineLen}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding ArrowLenMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ArrowLen}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding TextDistMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding TextDist}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding LenIsMMMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedItem="{Binding SelectedUnitMeasure}" Height="25"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding DecDigitMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding DecDigit}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
SelectedItem="{Binding SelectedFont}" Height="25"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding TextHeightMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding TextHeight}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
</UniformGrid>
</GroupBox>
</StackPanel>
</TabItem>
<TabItem Header="{Binding ImportMsg}">
<StackPanel Margin="5,5,5,0">
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<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}" />
<TextBlock Grid.Row="0" Grid.Column="2"
VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding FactorScaleMsg}"/>
<TextBlock Grid.Row="1" Grid.Column="0"
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="1" Grid.Column="1"
<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header=""
Margin="0,0,0,5">
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<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}"/>
<TextBlock Grid.Row="0" Grid.Column="2"
VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding FactorScaleMsg}"/>
<TextBlock Grid.Row="1" Grid.Column="0"
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="1" Grid.Column="1"
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="1" Grid.Column="2"
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"/>
<TextBlock Grid.Row="2" Grid.Column="0"
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="2" Grid.Column="1"
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
Margin="10,5,0,5"/>
<TextBlock Grid.Row="2" Grid.Column="0"
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="2" Grid.Column="1"
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
SelectedItem="{Binding SelectedSTLScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="2" Grid.Column="2"
<TextBox Grid.Row="2" Grid.Column="2"
Text="{Binding StlScaleFactor}" Height="25"
IsEnabled="{Binding STLScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Grid.Row="3" Grid.Column="0"
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="3" Grid.Column="1"
ItemsSource="{Binding ScaleImageList, Mode=OneWay}"
<TextBlock Grid.Row="3" Grid.Column="0"
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>
</StackPanel>
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}">
<StackPanel>
@@ -196,15 +231,15 @@
Header="{Binding ImageMsg}"
Margin="5,5,5,0">
<UniformGrid Grid.ColumnSpan="2" Columns="2">
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ImageWidth}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ImageHeight}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
</UniformGrid>
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ImageWidth}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ImageHeight}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
</UniformGrid>
</GroupBox>
</StackPanel>
</TabItem>
@@ -260,6 +295,15 @@
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeGenMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedGenGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeChiselingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedChiselingGeomType}" Height="25">
@@ -269,35 +313,80 @@
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeSurRoughMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedSurfRoughGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeSurFinishMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedSurfFinishGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!--<TextBlock Text="{Binding GeomTypeWaterJetMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedWaterJetGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>-->
<TextBlock Text="{Binding GeomTypeFiveAxMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedFiveAxGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</UniformGrid>
</GroupBox>
<Grid Margin="5,5,5,0">
<Grid Margin="10,5,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
Grid.Row="0" Margin="0,0,0,5"/>
<CheckBox IsChecked="{Binding NewMachiningIsLastOne}"
Grid.Column="1" Grid.Row="0" Margin="4,0,0,0" VerticalAlignment="Center"/>
<TextBlock Text="{Binding UseDispositionScriptMsg}" VerticalAlignment="Center"
Grid.Row="1" Margin="0,0,0,5"/>
<CheckBox IsChecked="{Binding UseDispositionScript}"
Grid.Column="1" Grid.Row="1" Margin="4,0,0,0" VerticalAlignment="Center"/>
<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">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource VMillTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</UniformGrid>
<TextBlock Grid.Row="1" Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
Margin="0,8,0,5"/>
<CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{Binding NewMachiningIsLastOne}"
Margin="4,8,0,0" VerticalAlignment="Center"/>
<TextBlock Grid.Row="2" Text="{Binding UseDispositionScriptMsg}"
VerticalAlignment="Center" Margin="0,5,0,5"/>
<CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding UseDispositionScript}"
Margin="4,5,0,0" VerticalAlignment="Center"/>
</Grid>
<Grid Margin="5,5,5,0">
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
</Grid>
<Grid Margin="5,5,5,0">
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
</Grid>
<UniformGrid Rows="2">
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,10,100,5"/>
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
</UniformGrid>
</StackPanel>
</TabItem>
@@ -343,9 +432,9 @@
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
</Grid>
</StackPanel>
</StackPanel>
</TabItem>
</TabControl>
</EgtWPFLib5:EgtCustomWindow>
+401 -121
View File
@@ -2,6 +2,7 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
Imports System.Globalization
Public Class OptionWindowVM
Inherits VMBase
@@ -19,6 +20,13 @@ Public Class OptionWindowVM
End Get
End Property
Private m_VMillTypeList As ObservableCollection(Of VMillSelTypeOpt) = New ObservableCollection(Of VMillSelTypeOpt)({VMillSelTypeOpt.LOWER, VMillSelTypeOpt.LOW, VMillSelTypeOpt.STANDARD, VMillSelTypeOpt.HIGH, VMillSelTypeOpt.HIGHER})
Public ReadOnly Property VMillTypeList As ObservableCollection(Of VMillSelTypeOpt)
Get
Return m_VMillTypeList
End Get
End Property
Private m_UnitMeasureList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 45)})
Public ReadOnly Property UnitMeasureList As List(Of String)
Get
@@ -57,6 +65,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
@@ -137,6 +159,72 @@ Public Class OptionWindowVM
End Set
End Property
Public Property SelectedGenGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomGenMachining
End Get
Set(value As SceneSelModeOpt)
If WritePrivateProfileString(S_MACH, K_SELGEOMGENMACHINING, CInt(value).ToString()) Then
OptionModule.m_SelGeomGenMachining = value
End If
End Set
End Property
Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomSurfRoughing
End Get
Set(value As SceneSelModeOpt)
If WritePrivateProfileString(S_MACH, K_SELGEOMSURFROUGHING, CInt(value).ToString()) Then
OptionModule.m_SelGeomSurfRoughing = value
End If
End Set
End Property
Public Property SelectedSurfFinishGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomSurfFinishing
End Get
Set(value As SceneSelModeOpt)
If WritePrivateProfileString(S_MACH, K_SELGEOMSURFFINISHING, CInt(value).ToString()) Then
OptionModule.m_SelGeomSurfFinishing = value
End If
End Set
End Property
'Public Property SelectedWaterJetGeomType As SceneSelModeOpt
' Get
' Return OptionModule.m_SelGeomWaterJetting
' End Get
' Set(value As SceneSelModeOpt)
' If WritePrivateProfileString(S_MACH, K_SELGEOMWATERJETTING, CInt(value).ToString()) Then
' OptionModule.m_SelGeomWaterJetting = value
' End If
' End Set
'End Property
Public Property SelectedFiveAxGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomFiveAxMilling
End Get
Set(value As SceneSelModeOpt)
If WritePrivateProfileString(S_MACH, K_SELGEOMFIVEAXMILLING, CInt(value).ToString()) Then
OptionModule.m_SelGeomFiveAxMilling = value
End If
End Set
End Property
Public Property SelectedVMillTypeType As VMillSelTypeOpt
Get
Return OptionModule.m_SelVMillQuality
End Get
Set(value As VMillSelTypeOpt)
If WritePrivateProfileString(S_MACH, K_SELVMILLQUALITY, CInt(value).ToString()) Then
OptionModule.m_SelVMillQuality = value
End If
End Set
End Property
Public Property GeometryTolerance As String
Get
Return LenToString(OptionModule.m_dGeometryTolerance, 5)
@@ -213,8 +301,8 @@ 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))
WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1"))
EgtSetLineAttribs(If(value, 2, 1))
End Set
End Property
@@ -272,6 +360,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)
@@ -287,6 +405,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()
@@ -386,7 +518,7 @@ Public Class OptionWindowVM
End Get
Set(value As String)
Dim nVal As Integer = 0
If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
If Integer.TryParse(value, nVal) Then
OptionModule.m_nDecDigit = nVal
EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
WritePrivateProfileString(S_DIMENSIONSTYLE, K_DECDIGIT, OptionModule.m_nDecDigit.ToString())
@@ -441,6 +573,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
@@ -502,6 +656,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
@@ -534,7 +738,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bSpecialOn = value
WritePrivateProfileString(S_SPECIAL, K_SPECIALENABLE, If( value, "1", "0"))
WritePrivateProfileString(S_SPECIAL, K_SPECIALENABLE, If(value, "1", "0"))
End Set
End Property
@@ -554,7 +758,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bBeamOn = value
WritePrivateProfileString(S_BEAM, K_BEAMENABLE, If( value, "1", "0"))
WritePrivateProfileString(S_BEAM, K_BEAMENABLE, If(value, "1", "0"))
End Set
End Property
@@ -574,7 +778,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bWallOn = value
WritePrivateProfileString(S_WALL, K_WALLENABLE, If( value, "1", "0"))
WritePrivateProfileString(S_WALL, K_WALLENABLE, If(value, "1", "0"))
End Set
End Property
@@ -589,7 +793,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bDoorsOn = value
WritePrivateProfileString(S_DOORS, K_DDFENABLE, If( value, "1", "0"))
WritePrivateProfileString(S_DOORS, K_DDFENABLE, If(value, "1", "0"))
End Set
End Property
@@ -604,7 +808,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bGunstockOn = value
WritePrivateProfileString(S_GUNSTOCK, K_GUNSTOCKENABLE, If( value, "1", "0"))
WritePrivateProfileString(S_GUNSTOCK, K_GUNSTOCKENABLE, If(value, "1", "0"))
End Set
End Property
@@ -662,17 +866,17 @@ Public Class OptionWindowVM
End Property
Public ReadOnly Property ThickLineMsg As String
Get
Return EgtMsg( 6536) ' Linee spesse
Return EgtMsg(6536) ' Linee spesse
End Get
End Property
Public ReadOnly Property SmoothTriMeshMsg As String
Get
Return EgtMsg( 6518) ' Superfici smussate
Return EgtMsg(6518) ' Superfici smussate
End Get
End Property
Public ReadOnly Property UpdateLicenceMsg As String
Get
Return EgtMsg( 6553) ' Aggiorna licenza
Return EgtMsg(6553) ' Aggiorna licenza
End Get
End Property
@@ -734,28 +938,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
@@ -881,6 +1099,43 @@ Public Class OptionWindowVM
End Get
End Property
Public ReadOnly Property GeomTypeGenMsg As String
Get
Return EgtMsg(6208)
End Get
End Property
Public ReadOnly Property GeomTypeSurFinishMsg As String
Get
Return EgtMsg(6211)
End Get
End Property
Public ReadOnly Property GeomTypeWaterJetMsg As String
Get
Return EgtMsg(6212)
End Get
End Property
Public ReadOnly Property GeomTypeFiveAxMsg As String
Get
Return EgtMsg(31213)
End Get
End Property
Public ReadOnly Property GeomTypeSurRoughMsg As String
Get
Return EgtMsg(31212)
End Get
End Property
Public ReadOnly Property VMillQualityMsg As String
Get
Return EgtMsg(31214)
End Get
End Property
#End Region
#Region "COMMANDS"
@@ -1094,135 +1349,135 @@ 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)
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory( sTempDir)
My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sMachZip)
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Se non è una macchina segnalo il problema ed esco
If Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".ini")) Or
Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".mlde")) Then
If Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".ini")) Or
Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
' Il file {0} non contiene una macchina - Avviso
Dim sOut As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 29), sMachZip)
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Imposto data e ora correnti al file mlde della macchina
Try
File.SetLastWriteTime( Path.Combine( sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
File.SetLastWriteTime(Path.Combine(sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
Catch ex As Exception
End Try
' Verifico esistenza di una macchina con lo stesso nome
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists(sMachDir)
Dim bUpdate As Boolean = True
If bOldExists Then
Dim MachBox As New MachineBox( Application.Current.MainWindow, sMachName)
Select MachBox.ShowDialog()
Case MessageBoxResult.Yes
bUpdate = False
Case MessageBoxResult.No
bUpdate = True
Case MessageBoxResult.Cancel
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
Dim MachBox As New MachineBox(Application.Current.MainWindow, sMachName)
Select Case MachBox.ShowDialog()
Case MessageBoxResult.Yes
bUpdate = False
Case MessageBoxResult.No
bUpdate = True
Case MessageBoxResult.Cancel
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Select
' Faccio una copia di backup della macchina corrente
Dim sBackupDir As String = sMachDir & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
My.Computer.FileSystem.MoveDirectory( sMachDir, sBackupDir, True)
My.Computer.FileSystem.MoveDirectory(sMachDir, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
My.Computer.FileSystem.MoveDirectory( sBackupDir, sMachDir, True)
My.Computer.FileSystem.MoveDirectory(sBackupDir, sMachDir, True)
' L'aggiornamento della macchina "{0}" non è riuscito.
Dim sKo As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 35), sMachName)
EgtOutLog( sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End Try
End If
' Installo la macchina
My.Computer.FileSystem.MoveDirectory( Path.Combine( sTempDir, sMachName), sMachDir, True)
My.Computer.FileSystem.MoveDirectory(Path.Combine(sTempDir, sMachName), sMachDir, True)
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
If bOldExists And bUpdate Then
Dim sBackupDir As String = sMachDir & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Tools") Then
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Tools") Then
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Tools") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Tools") Then
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Tools", sMachDir & "\Tools", True)
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Tools", sMachDir & "\Tools", True)
End If
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Machinings") Then
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Machinings") Then
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Machinings", FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Machinings") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Machinings") Then
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Machinings", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Machinings", sMachDir & "\Machinings", True)
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Machinings", sMachDir & "\Machinings", True)
End If
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\SetUp") Then
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\SetUp") Then
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\SetUp", FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\SetUp") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\SetUp") Then
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\SetUp", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
End If
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Beam") Then
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Beam") Then
' Flag per sovrascrivere vecchio file BeamData.lua con nuovo
Dim bBeamDataExists As Boolean = False
Const sBeamData As String = "\BeamData.lua"
' Flag per sovrascrivere vecchio file MachiningTypes.ini
Dim bMchgTypesExists As Boolean = False
Const sMchgTypes As String = "\MachiningTypes.ini"
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Beam") Then
If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sBeamData) Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Beam") Then
If My.Computer.FileSystem.FileExists(sMachDir & "\Beam" & sBeamData) Then
bBeamDataExists = True
My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
My.Computer.FileSystem.MoveFile(sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
End If
If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sMchgTypes) Then
If My.Computer.FileSystem.FileExists(sMachDir & "\Beam" & sMchgTypes) Then
bMchgTypesExists = True
My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
My.Computer.FileSystem.MoveFile(sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
End If
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Beam", sMachDir & "\Beam", True)
If bBeamDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Beam", sMachDir & "\Beam", True)
If bBeamDataExists Then My.Computer.FileSystem.MoveFile(sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
If bMchgTypesExists Then My.Computer.FileSystem.MoveFile(sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
End If
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Wall") Then
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Wall") Then
' Flag per sovrascrittura vecchio file WallData.lua con nuovo
Dim bWallDataExists As Boolean = False
Const sWallData As String = "\WallData.lua"
' Flag per sovrascrivere vecchio file MachiningTypes.ini
Dim bMchgTypesExists As Boolean = False
Const sMchgTypes As String = "\MachiningTypes.ini"
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Wall") Then
If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sWallData) Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Wall") Then
If My.Computer.FileSystem.FileExists(sMachDir & "\Wall" & sWallData) Then
bWallDataExists = True
My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
My.Computer.FileSystem.MoveFile(sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
End If
If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sMchgTypes) Then
If My.Computer.FileSystem.FileExists(sMachDir & "\Wall" & sMchgTypes) Then
bMchgTypesExists = True
My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
My.Computer.FileSystem.MoveFile(sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
End If
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Wall", sMachDir & "\Wall", True)
If bWallDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Wall", sMachDir & "\Wall", True)
If bWallDataExists Then My.Computer.FileSystem.MoveFile(sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
If bMchgTypesExists Then My.Computer.FileSystem.MoveFile(sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
End If
End If
'La macchina "{0}" è stata aggiornata con successo.
Dim sOk As String = String.Format(EgtMsg(MSG_OPTIONPAGE + 30), sMachName)
EgtOutLog( sOk)
EgtOutLog(sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
' Rimuovo il direttorio temporaneo
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
' Aggiorno la lista delle macchina
Map.refMachinePanelVM.InsertMachine(sMachDir)
End Sub
@@ -1270,7 +1525,7 @@ Public Class OptionWindowVM
' aggiungo i file della Macchina
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sCurrMachineName
If Directory.Exists(sMachineDir) Then
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
zip.AddSelectedFiles("name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
End If
' salvo lo zip
zip.Save()
@@ -1281,7 +1536,7 @@ Public Class OptionWindowVM
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
return
Return
End Try
'La macchina "{0}" è stata esportata con successo.
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
@@ -1306,10 +1561,10 @@ Public Class OptionWindowVM
Dim sExeVer As String = IniFile.GetProgramVersion()
' Verifico presenza di una precedente installazione del Beam
Dim sBeamVer As String = ""
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sBeamVer)
If String.IsNullOrEmpty( sBeamVer) Then
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamDirPath, sBeamVer)
If String.IsNullOrEmpty(sBeamVer) Then
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
Dim sOut As String = String.Format(EgtMsg(6555), "Beam")
Dim sOut As String = String.Format(EgtMsg(6555), "Beam")
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Esco
Return
@@ -1325,26 +1580,26 @@ Public Class OptionWindowVM
Dim sBeamZip As String = BeamDlg.FileName
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Beam")
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory( sTempDir)
My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sBeamZip)
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Recupero i dati del nuovo Beam
Dim sNewName = ""
Dim sNewVer = ""
Dim sNewMinExe = ""
IniFile.GetSpecialLuaData( sTempDir, sNewName, sNewVer, sNewMinExe)
IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
' Verifico che sia veramente il Beam
If String.Compare(sNewName, "Beam") <> 0 Then
' Il file zip non contiene il modulo "{0}". - Avviso
Dim sOut As String = String.Format(EgtMsg(6556), "Beam")
Dim sOut As String = String.Format(EgtMsg(6556), "Beam")
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)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione minima del programma
@@ -1353,42 +1608,42 @@ Public Class OptionWindowVM
Dim sOut As String = String.Format(EgtMsg(6557), "Beam", 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)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione del Beam e se più vecchia chiedo cosa fare
If String.Compare(sNewVer, sBeamVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "Beam")
if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
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)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
End If
' Faccio una copia di backup del Beam corrente
Dim sBackupDir As String = IniFile.m_sBeamDirPath & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
My.Computer.FileSystem.MoveDirectory( IniFile.m_sBeamDirPath, sBackupDir, True)
My.Computer.FileSystem.MoveDirectory(IniFile.m_sBeamDirPath, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
My.Computer.FileSystem.MoveDirectory( sBackupDir, IniFile.m_sBeamDirPath, True)
My.Computer.FileSystem.MoveDirectory(sBackupDir, IniFile.m_sBeamDirPath, True)
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
Dim sOut As String = String.Format(EgtMsg(6559), "Beam")
EgtOutLog( sOut)
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)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Try
' Installo il Beam
My.Computer.FileSystem.MoveDirectory( sTempDir, IniFile.m_sBeamDirPath, True)
My.Computer.FileSystem.MoveDirectory(sTempDir, IniFile.m_sBeamDirPath, True)
' Il modulo "{0}" è stata aggiornato con successo. - Info
Dim sOk As String = String.Format(EgtMsg(6560), "Beam")
EgtOutLog( sOk)
EgtOutLog(sOk)
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
End Sub
@@ -1410,10 +1665,10 @@ Public Class OptionWindowVM
Dim sExeVer As String = IniFile.GetProgramVersion()
' Verifico presenza di una precedente installazione del Wall
Dim sWallVer As String = ""
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sWallVer)
If String.IsNullOrEmpty( sWallVer) Then
IniFile.GetSpecialLuaVersion(IniFile.m_sWallDirPath, sWallVer)
If String.IsNullOrEmpty(sWallVer) Then
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
Dim sOut As String = String.Format(EgtMsg(6555), "Wall")
Dim sOut As String = String.Format(EgtMsg(6555), "Wall")
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Esco
Return
@@ -1429,26 +1684,26 @@ Public Class OptionWindowVM
Dim sWallZip As String = WallDlg.FileName
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Wall")
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory( sTempDir)
My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sWallZip)
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Recupero i dati del nuovo Wall
Dim sNewName = ""
Dim sNewVer = ""
Dim sNewMinExe = ""
IniFile.GetSpecialLuaData( sTempDir, sNewName, sNewVer, sNewMinExe)
IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
' Verifico che sia veramente il Wall
If String.Compare(sNewName, "Wall") <> 0 Then
' Il file zip non contiene il modulo "{0}". - Avviso
Dim sOut As String = String.Format(EgtMsg(6556), "Wall")
Dim sOut As String = String.Format(EgtMsg(6556), "Wall")
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)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione minima del programma
@@ -1457,42 +1712,42 @@ Public Class OptionWindowVM
Dim sOut As String = String.Format(EgtMsg(6557), "Wall", 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)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione del Wall e se più vecchia chiedo cosa fare
If String.Compare(sNewVer, sWallVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "Wall")
if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
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)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
End If
' Faccio una copia di backup del Wall corrente
Dim sBackupDir As String = IniFile.m_sWallDirPath & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
My.Computer.FileSystem.MoveDirectory( IniFile.m_sWallDirPath, sBackupDir, True)
My.Computer.FileSystem.MoveDirectory(IniFile.m_sWallDirPath, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
My.Computer.FileSystem.MoveDirectory( sBackupDir, IniFile.m_sWallDirPath, True)
My.Computer.FileSystem.MoveDirectory(sBackupDir, IniFile.m_sWallDirPath, True)
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
Dim sOut As String = String.Format(EgtMsg(6559), "Wall")
EgtOutLog( sOut)
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)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Try
' Installo il Wall
My.Computer.FileSystem.MoveDirectory( sTempDir, IniFile.m_sWallDirPath, True)
My.Computer.FileSystem.MoveDirectory(sTempDir, IniFile.m_sWallDirPath, True)
' Il modulo "{0}" è stata aggiornato con successo. - Info
Dim sOk As String = String.Format(EgtMsg(6560), "Wall")
EgtOutLog( sOk)
EgtOutLog(sOk)
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
End Sub
@@ -1580,4 +1835,29 @@ Public Class GeomTypeConverter
Throw New NotImplementedException
End Function
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)
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 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
+3
View File
@@ -6,6 +6,9 @@
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
</Button>
+29
View File
@@ -7,6 +7,7 @@ Public Class PopUpGridPanelVM
' Definizione comandi
Private m_cmdCPlaneView As ICommand
Private m_cmdCPlaneInvert As ICommand
Private m_cmdCPlaneRotate As ICommand
Private m_cmdCPlane3P As ICommand
Private m_cmdCPlanePerpObj As ICommand
@@ -19,6 +20,11 @@ Public Class PopUpGridPanelVM
Return EgtMsg(MSG_GRIDVIEWPANEL + 25)
End Get
End Property
Public ReadOnly Property CPlaneInvertToolTip As String
Get
Return EgtMsg(5285)
End Get
End Property
Public ReadOnly Property CPlaneRotateToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 28)
@@ -70,6 +76,29 @@ Public Class PopUpGridPanelVM
#End Region ' CPlaneViewCommand
#Region "CPlaneInvertCommand"
''' <summary>
''' Returns a command that do CPlaneInvert.
''' </summary>
Public ReadOnly Property CPlaneInvertCommand As ICommand
Get
If m_cmdCPlaneInvert Is Nothing Then
m_cmdCPlaneInvert = New RelayCommand(AddressOf CPlaneInvert)
End If
Return m_cmdCPlaneInvert
End Get
End Property
''' <summary>
''' Execute the CPlaneInvert. This method is invoked by the CPlaneInvertCommand.
''' </summary>
Public Sub CPlaneInvert(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_INVERT)
End Sub
#End Region
#Region "CPlaneRotateCommand"
''' <summary>
-3
View File
@@ -12,9 +12,6 @@
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}">
<Image Source="/Resources/GridViewPanel/ZoomSel.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_SEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewSECommand}">
<Image Source="/Resources/GridViewPanel/LookFromISO_SE.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}">
<Image Source="/Resources/GridViewPanel/LookFromISO_NE.png" Stretch="Uniform"/>
</Button>
-30
View File
@@ -9,7 +9,6 @@ Public Class PopUpViewPanelVM
Private m_cmdZoomIn As ICommand
Private m_cmdZoomOut As ICommand
Private m_cmdZoomSel As ICommand
Private m_cmdIsoViewSE As ICommand
Private m_cmdIsoViewNE As ICommand
Private m_cmdIsoViewNW As ICommand
Private m_cmdViewToCPlane As ICommand
@@ -34,12 +33,6 @@ Public Class PopUpViewPanelVM
End Get
End Property
Public ReadOnly Property LookFromIso_SEToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 13)
End Get
End Property
Public ReadOnly Property LookFromIso_NEToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 14)
@@ -133,29 +126,6 @@ Public Class PopUpViewPanelVM
#End Region ' ZoomOutCommand
#Region "IsoViewSECommand"
''' <summary>
''' Returns a command that do IsoViewSE.
''' </summary>
Public ReadOnly Property IsoViewSECommand As ICommand
Get
If m_cmdIsoViewSE Is Nothing Then
m_cmdIsoViewSE = New RelayCommand(AddressOf IsoViewSE)
End If
Return m_cmdIsoViewSE
End Get
End Property
''' <summary>
''' Execute the IsoViewSE. This method is invoked by the IsoViewSECommand.
''' </summary>
Public Sub IsoViewSE(ByVal param As Object)
Map.refProjectVM.GetScene.IsoViewSE()
End Sub
#End Region ' IsoViewSECommand
#Region "IsoViewNECommand"
''' <summary>
+93 -26
View File
@@ -4,7 +4,6 @@ Imports System.IO
Imports System.Globalization
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtWPFLib5.EgtFloating
Public Class ProjectVM
Inherits TabViewModel
@@ -58,11 +57,12 @@ Public Class ProjectVM
End Get
End Property
#End Region
#End Region
#Region "EGTUILIB FIELDS"
Private m_bCPlaneTypePos As Boolean
Private m_bCPlaneTypePos As Boolean
' Variabile per implementazione eventi
Private m_InputText As String
@@ -231,18 +231,33 @@ Public Class ProjectVM
SceneHost.Child = Nothing
' Se manca la chiave
If IniFile.m_nKeyLevel = -1 Or IniFile.m_nKeyLevel = -2 Then
EgtOutLog("Missing Dongle")
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
If Not EgtGetNetHwKey() Then
EgtOutLog("Missing Dongle")
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
Else
EgtOutLog("NetDongle is full")
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
End If
' Se altrimenti manca il collegamento con la chiave di rete
ElseIf IniFile.m_nKeyLevel = -9 Then
EgtOutLog("Missing Link with Net Dongle")
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
' Altrimenti manca la licenza
Else
EgtOutLog("Problems with Licence")
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(10105) & vbCrLf & EgtMsg(10106)
Dim sTitle As String = EgtMsg(10101)
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' Apro dialogo per richiesta file licenza
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
@@ -292,10 +307,13 @@ Public Class ProjectVM
Dim nLineWidth As Integer = 1
nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
m_ProjectScene.SetLineWidth(nLineWidth)
' imposto colore di evidenziazione
' imposto colori di evidenziazione
Dim MarkColor As New Color3d(255, 255, 0)
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
m_ProjectScene.SetMarkMaterial(MarkColor)
Dim Mark2Color As New Color3d(255, 64, 64)
GetPrivateProfileColor(S_SCENE, K_MARK2, Mark2Color)
m_ProjectScene.SetMark2Material(Mark2Color)
' imposto colore per superfici selezionate
Dim SelSurfColor As New Color3d(255, 255, 192)
GetPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
@@ -330,6 +348,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)
@@ -387,6 +406,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)
@@ -521,7 +542,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
@@ -589,7 +616,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)
@@ -602,7 +629,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
@@ -1084,8 +1110,8 @@ Public Class ProjectVM
Select Case m_SceneSelType
Case SceneSelTypeOpt.FIXTURE
Dim nFixtureId As Integer = EgtGetParent(EgtGetParent(nId))
Dim sName As String = ""
EgtGetName(EgtGetParent(nId), sName)
'Dim sName As String = ""
'EgtGetName(EgtGetParent(nId), sName)
If EgtVerifyFixture(nFixtureId) Then
m_SelType = DispositionUtility.SelType.FIXTURE
' Se già selezionato
@@ -1103,14 +1129,12 @@ Public Class ProjectVM
EgtGetPlaneSnapPoint(e.Location, Vector3d.Z_AX, TableRef.z, ptCurr)
DispositionUtility.VtHookFinder(nFixtureId, ptCurr)
Exit While
ElseIf sName.Contains(DispositionUtility.MOBILE) Then
Dim sInfo As String = ""
If EgtGetInfo(EgtGetParent(nId), "MDir", sInfo) Then
m_SelType = DispositionUtility.SelType.BARS
m_nIdToSel = EgtGetParent(nId)
' Drag possibile
m_bDrag = True
End If
ElseIf DispositionUtility.VerifyTableAxis( nFixtureId) Then
m_SelType = DispositionUtility.SelType.BARS
m_nIdToSel = nFixtureId
' Drag possibile
m_bDrag = True
Exit While
End If
Case SceneSelTypeOpt.RAWPART, SceneSelTypeOpt.RAWPARTWITHFIXTURE
Dim nRawPartId As Integer = EgtGetParent(nId)
@@ -1172,7 +1196,6 @@ Public Class ProjectVM
vtMove.z = 0
' Muovo gli oggetti selezionati se consentito
DispositionUtility.MoveRawPartPartAndFixture(nMoveId, vtMove, m_SelType, ptCurr)
'EgtSaveFile("c:\Temp\ProveMovimentoVentose\Prova1.nge", NGE.BIN)
EgtDraw()
' Aggiorno il punto precedente
m_ptPrev = ptCurr
@@ -1204,7 +1227,7 @@ Public Class ProjectVM
m_nIdToDesel = GDB_ID.NULL
EgtDraw()
Return
' altrimenti verifico il tipo del primo oggetto selezionato
' altrimenti verifico il tipo del primo oggetto selezionato
Else
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
' se è un riferimento resetto lo stato di selezione ed esco
@@ -1303,6 +1326,15 @@ Public Class ProjectVM
ElseIf IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHINING And
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
ElseIf Not Keyboard.IsKeyDown(Key.LeftShift) Then
m_Controller.MouseSelectedObj(nId, False)
If EgtIsSelectedObj(nId) Then
' Selezione layer in albero
Map.refManageLayerExpanderVM.UpdateObjInObjTreeNoMark(nId)
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(nId)
Map.refManageLayerExpanderVM.UpdateObjTree()
End If
EgtDraw()
Else
m_Controller.MouseSelectedObj(nId, bLast)
End If
@@ -1375,7 +1407,7 @@ Public Class ProjectVM
If nFac <> -1 Then
' Visualizzo la normale e il contorno della faccia
Analyze.CreateAnalyzeGroup()
Analyze.CreateNormal(nId, nFac)
Analyze.CreateFacetNormal(nId, nFac)
Analyze.CreateFacetLoops(nId, nFac)
' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d
@@ -1390,6 +1422,27 @@ Public Class ProjectVM
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
' Se Regione, visualizzo dati parte toccata
ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then
Dim nChk As Integer = nSub
If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount(nId) Then
' Visualizzo la normale e il contorno della parte
Analyze.CreateAnalyzeGroup()
Analyze.CreateChunkNormal(nId, nChk)
Analyze.CreateChunkLoops(nId, nChk)
' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d
Dim vtN As Vector3d
EgtSurfFrChunkCenter(nId, nChk, If(m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
Dim dLen, dPhi, dTheta As Double
vtN.ToSpherical(dLen, dTheta, dPhi)
' Emetto info sulla barra di stato
Dim sOut As String = "Chunk " + nChk.ToString() +
" : 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)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
End If
' Aggiorno la visualizzazione
EgtDraw()
@@ -1462,6 +1515,15 @@ Public Class ProjectVM
End If
End Sub
Private Sub OnInsertingProject(ByVal sender As Object, nType As Integer, ByRef nFlag As Integer) Handles m_Controller.OnInsertingProject
If 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 = GetMainPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
Else
nFlag = 0
End If
End Sub
Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnInsertedProject
EgtZoom(ZM.ALL)
WritePrivateProfileString(S_GENERAL, K_LASTNGEINSDIR, Path.GetDirectoryName(sFile))
@@ -1502,6 +1564,11 @@ 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
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)
Else
nFlag = 0
End If
Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

+8 -8
View File
@@ -409,18 +409,18 @@ Public Class SetUpVM
' verifico se la testa è diversa
If TempPosition.Head <> sHead Then
' altrimenti la sovrascrivo
TempPosition.Head = sHead
TempPosition.SetHead( sHead)
' la metto anche come testa originale
If bOriginal Then TempPosition.OrigHead = sHead
' e verifico il numero di uscite
For ExitIndex = TempPosition.ExitToolAssociationList.Count + 1 To EgtGetHeadExitCount(sHead)
TempPosition.ExitToolAssociationList.Add(New ExitToolAssociation(ExitIndex.ToString, TempPosition))
Next
For ExitIndex = TempPosition.ExitToolAssociationList.Count - 1 To EgtGetHeadExitCount(sHead) Step -1
TempPosition.ExitToolAssociationList.RemoveAt(ExitIndex)
Next
End If
For ExitIndex = 0 To TempPosition.ExitToolAssociationList.Count - 1
TempPosition.ExitToolAssociationList.Add(New ExitToolAssociation(ExitIndex.ToString, TempPosition))
Next
For ExitIndex = TempPosition.ExitToolAssociationList.Count - 1 To EgtGetHeadExitCount(sHead) Step -1
TempPosition.ExitToolAssociationList.RemoveAt(ExitIndex)
Next
End If
For ExitIndex = 0 To TempPosition.ExitToolAssociationList.Count - 1
Dim CurrExitToolAss As ExitToolAssociation = TempPosition.ExitToolAssociationList(ExitIndex)
If CurrExitToolAss.ExitPar = sExitList(ToolIndex) Then
' vi metto l'utensile e segno l'uscita come occupata
+6
View File
@@ -57,7 +57,13 @@ Module Beam
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
Map.refTopCommandBarVM.SetMachiningMode()
' Se simulazione
If bOk And nFlag = 2 Then
' Se da TS3 e non pezzo da Vista, impedisco di fare altro
If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then
Map.refSimulationExpanderVM.bOnlySimulation = True
End If
' Vado in simulazione
Map.refSimulationExpanderVM.Simulation_IsExpanded = True
End If
End If
+6
View File
@@ -58,7 +58,13 @@ Module Wall
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
Map.refTopCommandBarVM.SetMachiningMode()
' Se simulazione
If bOk And nFlag = 2 Then
' Se da TS3 e non pezzo da Vista, impedisco di fare altro
If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then
Map.refSimulationExpanderVM.bOnlySimulation = True
End If
' Vado in simulazione
Map.refSimulationExpanderVM.Simulation_IsExpanded = True
End If
End If
+270 -242
View File
@@ -139,254 +139,265 @@
<TabControl Grid.Row="1" Margin="5,0,5,5" SelectionChanged="TabControl_SelectionChanged">
<TabItem Header="Association Table">
<TabItem.Content>
<DataGrid Name="AssociationDataGrid"
ItemsSource="{Binding Path=SelectedItem.AssociationList,
ElementName=TablesListBox}"
SelectedItem="{Binding Path=SelectedItem.SelectedAssociation,
ElementName=TablesListBox,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
IsSynchronizedWithCurrentItem="False"
AutoGenerateColumns="False"
CanUserSortColumns="False"
CanUserResizeColumns="False"
CanUserResizeRows="False"
CanUserReorderColumns="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
VirtualizingStackPanel.IsVirtualizing="False">
<Interactivity:Interaction.Behaviors>
<EgtCAM5:ScrollIntoViewForDataGrid/>
</Interactivity:Interaction.Behaviors>
<DataGrid.InputBindings>
<KeyBinding Key="F3" Modifiers="Control" Command="{Binding SearchNextCommand}"/>
<KeyBinding Key="F3" Modifiers="Shift" Command="{Binding SearchPreviousCommand}"/>
</DataGrid.InputBindings>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{x:Static SystemColors.HighlightColor}"/>
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="{x:Static SystemColors.HighlightTextColor}"/>
</Style.Resources>
<Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<EventSetter Event="PreviewMouseDown" Handler="LeftTableMouseDown"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsValidForSearch}" Value="True">
<Setter Property="Background" Value="{StaticResource EgaltechGreen}"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<Grid>
<FrameworkElement x:Name="dummyElement" Visibility="Collapsed"/>
<DataGrid Name="AssociationDataGrid"
ItemsSource="{Binding Path=SelectedItem.AssociationList,
ElementName=TablesListBox}"
EgtCAM5:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding SelectedItem.SelectedAssociations,
ElementName=TablesListBox}"
IsSynchronizedWithCurrentItem="False"
AutoGenerateColumns="False"
CanUserSortColumns="False"
CanUserResizeColumns="False"
CanUserResizeRows="False"
CanUserReorderColumns="False"
SelectionMode="Extended"
PreviewMouseDown="DataGrid_PreviewMouseDown"
PreviewMouseUp="DataGrid_PreviewMouseUp"
PreviewMouseMove="DataGrid_PreviewMouseMove"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
VirtualizingStackPanel.IsVirtualizing="False">
<Interactivity:Interaction.Behaviors>
<EgtCAM5:ScrollIntoViewForDataGrid/>
</Interactivity:Interaction.Behaviors>
<DataGrid.InputBindings>
<KeyBinding Key="F3" Modifiers="Control" Command="{Binding SearchNextCommand}"/>
<KeyBinding Key="F3" Modifiers="Shift" Command="{Binding SearchPreviousCommand}"/>
</DataGrid.InputBindings>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{x:Static SystemColors.HighlightColor}"/>
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="{x:Static SystemColors.HighlightTextColor}"/>
</Style.Resources>
<Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<EventSetter Event="PreviewMouseDown" Handler="LeftTableMouseDown"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsValidForSearch}" Value="True">
<Setter Property="Background" Value="{StaticResource EgaltechGreen}"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<!--Colonna On-->
<DataGridCheckBoxColumn Width="Auto" Binding="{Binding OnPar}">
<DataGridCheckBoxColumn.Header>
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn>
<!--Colonna On-->
<DataGridCheckBoxColumn Width="Auto" Binding="{Binding OnPar}">
<DataGridCheckBoxColumn.Header>
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn>
<!--Colonna Name-->
<DataGridTemplateColumn Width="1*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.GeomNameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=NamesList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding Path=Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Name-->
<DataGridTemplateColumn Width="1*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.GeomNameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=NamesList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding Path=Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Operation-->
<DataGridTemplateColumn Width="0.75*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.OperationHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Oper,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=OperationsList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Oper,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Operation-->
<DataGridTemplateColumn Width="0.75*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.OperationHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Oper,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=OperationsList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Oper,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Machine Id-->
<DataGridTemplateColumn Width="38">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MIdHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding MachId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Source={x:Reference TablesListBox}, Path=SelectedItem.MachIdList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=MachId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Machine Id-->
<DataGridTemplateColumn Width="38">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MIdHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding MachId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Source={x:Reference TablesListBox}, Path=SelectedItem.MachIdList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=MachId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Shift-->
<DataGridTemplateColumn Width="38">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.ShiftHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Shift,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=ShiftList,Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Shift,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Shift-->
<DataGridTemplateColumn Width="38">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.ShiftHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Shift,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=ShiftList,Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Shift,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna MachiningType-->
<DataGridTemplateColumn Width="0.5*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachTypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding SelectedMachType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachTypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="TypeName"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=SelectedMachType.TypeName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna MachiningType-->
<DataGridTemplateColumn Width="0.5*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachTypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding SelectedMachType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachTypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="TypeName"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=SelectedMachType.TypeName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Machining-->
<DataGridTemplateColumn Width="1*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Mach, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Mach, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding Path=Mach, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Machining-->
<DataGridTemplateColumn Width="1*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Mach, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Mach, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding Path=Mach, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna MachiningUpType-->
<DataGridTemplateColumn Width="0.5*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachTypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding SelectedMachUpType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachTypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="TypeName"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=SelectedMachUpType.TypeName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna MachiningUpType-->
<DataGridTemplateColumn Width="0.5*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachTypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding SelectedMachUpType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachTypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="TypeName"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=SelectedMachUpType.TypeName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Machining Up-->
<DataGridTemplateColumn Width="1*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachUpHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding MachUp,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachUpList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=MachUp,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding Path=MachUp,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Machining Up-->
<DataGridTemplateColumn Width="1*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachUpHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding MachUp,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachUpList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=MachUp,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding Path=MachUp,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna MachiningDownType-->
<DataGridTemplateColumn Width="0.5*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachTypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding SelectedMachDownType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachTypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="TypeName"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=SelectedMachDownType.TypeName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna MachiningDownType-->
<DataGridTemplateColumn Width="0.5*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachTypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding SelectedMachDownType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachTypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="TypeName"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=SelectedMachDownType.TypeName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Machining Down-->
<DataGridTemplateColumn Width="1*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachDownHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding MachDw,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachDownList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=MachDw,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding Path=MachDw,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
<!--Colonna Machining Down-->
<DataGridTemplateColumn Width="1*">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MachDownHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding MachDw,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=MachDownList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=MachDw,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding Path=MachDw,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Link"
Binding="{Binding Path=Link}"
Foreground="Black"
IsReadOnly="True"
Visibility="{Binding Path=DataContext.Link_Visibility, Source={x:Reference dummyElement}}"/>
</DataGrid.Columns>
</DataGrid>
</DataGrid>
</Grid>
</TabItem.Content>
</TabItem>
@@ -548,6 +559,18 @@
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition >
<ColumnDefinition.Style>
<Style TargetType="{x:Type ColumnDefinition}">
<Setter Property="Width" Value="1*"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Visibility, ElementName=LinkBtn}" Value="Collapsed">
<Setter Property="Width" Value="Auto"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ColumnDefinition.Style>
</ColumnDefinition>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
@@ -594,20 +617,25 @@
CommandParameter="{Binding Path=SelectedItem, ElementName=TablesListBox}"
IsEnabled="{Binding MoveRow_IsEnabled}"
Grid.Column="4"/>
<Button x:Name="LinkBtn" Content="Link" Command="{Binding LinkCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=TablesListBox}"
IsEnabled="{Binding Link_IsEnabled}"
Visibility="{Binding Link_Visibility}"
Grid.Column="5"/>
<Button Content="Group" Command="{Binding GroupCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=TablesListBox}"
IsEnabled="{Binding Group_IsEnabled}"
Grid.Column="5"/>
Grid.Column="6"/>
<Button Content="Position" Command="{Binding PositionCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=TablesListBox}"
IsEnabled="{Binding Position_IsEnabled}"
Grid.Column="6"/>
Grid.Column="7"/>
<Button Content="{Binding AddMachBtn}" Command="{Binding AddMachCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=TablesListBox}"
Grid.Column="7"/>
CommandParameter="{Binding Path=SelectedItem, ElementName=TablesListBox}"
Grid.Column="8"/>
<Button Content="{Binding RemoveMachBtn}" Command="{Binding RemoveMachCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=TablesListBox}"
Grid.Column="8"/>
CommandParameter="{Binding Path=SelectedItem, ElementName=TablesListBox}"
Grid.Column="9"/>
</Grid>
</Grid>
+28
View File
@@ -1,6 +1,7 @@
Imports System.Windows
Imports System.Windows.Controls.Primitives
Imports EgtWPFLib5
Imports EgtUILib
Public Class MTableDbV
@@ -155,4 +156,31 @@ Public Class MTableDbV
WinPosFromWindowToIni(Me, S_DOORS, K_MTABLEWINPLACE)
End Sub
Public Sub DataGrid_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If e.ChangedButton = MouseButton.Left Then
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
e.Handled = True
End If
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control AndAlso TypeOf sender Is DataGrid AndAlso DirectCast(sender, DataGrid).SelectedItems.Count >= 2 Then
e.Handled = True
End If
End If
End Sub
Public Sub DataGrid_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs)
End Sub
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
Dim Element As Object = e.OriginalSource
While Not IsNothing(Element) AndAlso Not TypeOf Element Is ScrollBar
Element = VisualTreeHelper.GetParent(Element)
End While
' verifico che non sia ScrollBar, di modo che questa continui a funzionare, ma non possa selezionare piu' righe trascinando
If IsNothing(Element) OrElse Not TypeOf Element Is ScrollBar Then
e.Handled = True
End If
End Sub
End Class
+100 -10
View File
@@ -1,7 +1,9 @@
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports System.ComponentModel
Imports System.IO
Imports System.Text.RegularExpressions
Imports System.Windows.Forms.LinkLabel
Imports EgtUILib
Imports EgtWPFLib5
@@ -156,6 +158,24 @@ Public Class MTableDbVM
End Set
End Property
Private m_Link_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property Link_Visibility As Visibility
Get
Return m_Link_Visibility
End Get
End Property
Private m_Link_IsEnabled As Boolean
Public Property Link_IsEnabled As Boolean
Get
Return m_Link_IsEnabled
End Get
Set(value As Boolean)
m_Link_IsEnabled = value
NotifyPropertyChanged(NameOf(Link_IsEnabled))
End Set
End Property
#Region "Messages"
Public ReadOnly Property Title As String
@@ -359,6 +379,7 @@ Public Class MTableDbVM
Private m_cmdMoveRowDown As ICommand
Private m_cmdGroup As ICommand
Private m_cmdPosition As ICommand
Private m_cmdLink As ICommand
Private m_cmdCloseMTableWindow As ICommand
#Region "CONSTRUCTOR"
@@ -385,6 +406,9 @@ Public Class MTableDbVM
' Altrimenti recupero macchina corrente all'apertura della finestra per poterla ripristinare alla fine
EgtGetCurrMachineName(m_sPreviousActiveMachine)
End If
' leggo abilitazione link
m_Link_Visibility = If(GetMainPrivateProfileInt(S_DOORS, K_OPTIMIZEMACHFORLINE, 0) = 1, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(Link_Visibility))
' Azzero indice per nome tabella di default
MTableListBoxItem.NewMTableIndex = 0
' Creo liste operazioni e proprietà
@@ -404,17 +428,29 @@ Public Class MTableDbVM
If EgtVerifyMachinesDir() AndAlso Not bActiveMTableFound AndAlso m_TablesList.Count > 0 Then
m_TablesList(0).IsSelected = True
If Not m_TablesList(0).IsSelected Then
m_TablesList.RemoveAt( 0)
return
End If
m_TablesList.RemoveAt(0)
Return
End If
m_TablesList(0).SelMachine = m_TablesList(0).ActiveMachinesList(0)
End If
For Each Table In TablesList
AddHandler Table.SelectedAssociations.CollectionChanged, AddressOf SelectedAssociations_CollectionChanged
Next
End Sub
#End Region
#Region "METHODS"
Private Sub SelectedAssociations_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
For Each Table In TablesList
If Table.IsSelected Then
AddRemoveRow_IsEnabled = Table.SelectedAssociations.Count = 1
Link_IsEnabled = Table.SelectedAssociations.Count = 2
End If
Next
End Sub
Private Sub UpdateTables()
m_TablesList.Clear()
' se trovo la cartella carico la lista di tabelle
@@ -1220,7 +1256,7 @@ Public Class MTableDbVM
Dim SelectedMTable As MTableListBoxItem = DirectCast(param, MTableListBoxItem)
If Not IsNothing(SelectedMTable) AndAlso Not IsNothing(SelectedMTable.SelectedAssociation) Then
Dim SelectedIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociation)
Dim NewEmptyRow As MTableAssociationGridBoxItem = New MTableAssociationGridBoxItem(False, String.Empty, 1, 0, String.Empty, Nothing, String.Empty, Nothing, String.Empty, Nothing, String.Empty, SelectedMTable.ActiveMachinesList, SelectedMTable.AssociationList)
Dim NewEmptyRow As MTableAssociationGridBoxItem = New MTableAssociationGridBoxItem(False, String.Empty, 1, 0, String.Empty, Nothing, String.Empty, Nothing, String.Empty, Nothing, String.Empty, 0, SelectedMTable.ActiveMachinesList, SelectedMTable.AssociationList)
SelectedMTable.AssociationList.Insert(SelectedIndex + 1, NewEmptyRow)
SelectedMTable.SelectedAssociation = NewEmptyRow
SelectedMTable.NotifyPropertyChanged("SelectedAssociation")
@@ -1319,10 +1355,21 @@ Public Class MTableDbVM
' Left table Movement
Public Sub LeftTableMoveRowUp(SelectedMTable As MTableListBoxItem)
Dim SelectedIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociation)
If SelectedIndex >= 1 Then
SelectedMTable.AssociationList.Move(SelectedIndex, SelectedIndex - 1)
If SelectedMTable.SelectedAssociations.Count < 2 Then
Dim SelectedIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociation)
If SelectedIndex >= 1 Then
SelectedMTable.AssociationList.Move(SelectedIndex, SelectedIndex - 1)
End If
ElseIf SelectedMTable.SelectedAssociations.Count > 2 Then
Return
Else
Dim MoveIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociations(0))
Dim DestinationIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociations(1))
If DestinationIndex >= 0 Then
SelectedMTable.AssociationList.Move(MoveIndex, If(MoveIndex > DestinationIndex, DestinationIndex, Math.Max(0, DestinationIndex - 1)))
End If
End If
End Sub
Public Sub RightTableMoveRowUp(SelectedMTable As MTableListBoxItem)
@@ -1572,9 +1619,19 @@ Public Class MTableDbVM
' Spostamento sulla tabella delle associazioni
Public Sub LeftTableMoveRowDown(SelectedMTable As MTableListBoxItem)
Dim SelectedIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociation)
If SelectedIndex < SelectedMTable.AssociationList.Count - 1 Then
SelectedMTable.AssociationList.Move(SelectedIndex, SelectedIndex + 1)
If SelectedMTable.SelectedAssociations.Count < 2 Then
Dim SelectedIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociation)
If SelectedIndex < SelectedMTable.AssociationList.Count - 1 Then
SelectedMTable.AssociationList.Move(SelectedIndex, SelectedIndex + 1)
End If
ElseIf SelectedMTable.SelectedAssociations.Count > 2 Then
Return
Else
Dim MoveIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociations(0))
Dim DestinationIndex As Integer = SelectedMTable.AssociationList.IndexOf(SelectedMTable.SelectedAssociations(1))
If DestinationIndex < SelectedMTable.AssociationList.Count Then
SelectedMTable.AssociationList.Move(MoveIndex, If(MoveIndex > DestinationIndex, DestinationIndex + 1, DestinationIndex))
End If
End If
End Sub
@@ -1586,6 +1643,39 @@ Public Class MTableDbVM
#End Region ' MoveRowDownCommand
#Region "Link"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property LinkCommand As ICommand
Get
If m_cmdLink Is Nothing Then
m_cmdLink = New Command(AddressOf Link)
End If
Return m_cmdLink
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Link(param As Object)
Dim SelectedMTable As MTableListBoxItem = DirectCast(param, MTableListBoxItem)
If IsNothing(SelectedMTable) OrElse SelectedMTable.SelectedAssociations.Count <> 2 Then Return
'If (SelectedMTable.SelectedAssociations(0).nLink = 0 AndAlso SelectedMTable.SelectedAssociations(1).nLink <> 0) OrElse (SelectedMTable.SelectedAssociations(0).nLink <> 0 AndAlso SelectedMTable.SelectedAssociations(1).nLink = 0) Then Return
If SelectedMTable.SelectedAssociations(0).nLink = 0 AndAlso SelectedMTable.SelectedAssociations(1).nLink = 0 Then
Dim nNewIndex As Integer = SelectedMTable.AssociationList.Max(Function(x) x.nLink) + 1
SelectedMTable.SelectedAssociations(0).SetLink(nNewIndex)
SelectedMTable.SelectedAssociations(1).SetLink(-nNewIndex)
ElseIf SelectedMTable.SelectedAssociations(0).nLink = Math.Abs(SelectedMTable.SelectedAssociations(1).nLink) OrElse SelectedMTable.SelectedAssociations(1).nLink = Math.Abs(SelectedMTable.SelectedAssociations(0).nLink) Then
SelectedMTable.SelectedAssociations(0).SetLink(0)
SelectedMTable.SelectedAssociations(1).SetLink(0)
End If
End Sub
#End Region ' MoveRowDownCommand
#Region "GroupCommand"
''' <summary>

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