Compare commits

...

184 Commits

Author SHA1 Message Date
Demetrio Cassarino fa280cb1b4 -piccola correzione 2025-03-24 11:15:36 +01:00
Demetrio Cassarino 901a3a501a -introdotto selezione su albero da provare 2025-03-21 11:10:44 +01:00
Demetrio Cassarino 542699969d -piccola modifca su selezione di più oggetti 2025-03-19 11:26:07 +01:00
Demetrio Cassarino 8a1bba5651 -piccola modifica su selezione 2025-03-17 09:56:22 +01:00
Demetrio Cassarino 1ebebb70ad -sistemato in info invo su inserimento note 2025-03-17 09:36:56 +01:00
Demetrio Cassarino cde28c6611 Merge commit '9e9aad2eedf58f8dc9c14020f37af944aefc2e07' into feature/Controllo_Converter 2025-03-17 09:26:40 +01:00
Demetrio Cassarino f836161ce2 -piccole modifiche, pulizia codice merge 2025-03-17 09:22:43 +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 fcd0573c46 Merge commit 'a2a1b838889165d647b5419e61402291fca887d2' into feature/Controllo_Converter 2025-03-17 08:45:31 +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
Demetrio Cassarino 23028209b8 -aggiornato messaggi 2024-09-26 16:30:07 +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 63efd1e137 Merge branch 'feature/cw_ccw' into feature/Controllo_Converter 2024-09-20 15:44:38 +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
Demetrio Cassarino 53006598c6 -pulizia codice 2024-09-06 17:16:46 +02:00
Demetrio Cassarino a14cc6e80e Merge remote-tracking branch 'origin/master' into feature/Controllo_Converter 2024-09-05 14:50:17 +02:00
Demetrio Cassarino 81acd64fee -aggiornato icona egalware 2024-09-05 11:36:51 +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
Demetrio Cassarino ffb3d81195 Merge remote-tracking branch 'origin/master' into feature/Controllo_Converter 2024-08-07 14:12:50 +02:00
Demetrio Cassarino 9c0be49983 -eliminato warning 2024-08-07 14:11:26 +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
Demetrio Cassarino bcca4468d7 -inserito immagini per messagebox 2024-07-30 10:21:17 +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
Demetrio Cassarino 4b8f4e9679 -aggiunto finestre personalizzate messagebox e colorpicker 2024-07-25 10:12:29 +02:00
Demetrio Cassarino 2cfc921f3c Merge remote-tracking branch 'origin/master' into feature/Controllo_Converter 2024-07-23 10:27:58 +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
Demetrio Cassarino 93c80c98e6 -test da provare 2024-07-22 10:28:30 +02:00
Demetrio Cassarino 1eeea3c2e7 -da testare focus su textbox 2024-07-17 15:00:54 +02:00
Demetrio Cassarino ca9ba68e60 -da testare 2024-07-17 09:41:33 +02:00
Demetrio Cassarino 00f23b1cdd -da testare focus su testo 2024-07-16 13:00:26 +02:00
Dario Sassi 9f33d1b236 Merge commit '24607ec445d01fe6dc9ea817bdc04af3e1200888' 2024-07-16 08:45:33 +02:00
Demetrio Cassarino 23d2c0a57c Merge branch 'feature/Note_Utensile' into feature/Controllo_Converter 2024-07-15 10:47:03 +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
Demetrio Cassarino 8e278abce3 -aggiunto focus su slider 2024-07-12 12:51:19 +02:00
Demetrio Cassarino b047dfb07c Merge remote-tracking branch 'origin/master' into feature/Controllo_Converter 2024-07-11 17:21:13 +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
Demetrio Cassarino 025a508f35 -da testare 2024-07-11 08:56:40 +02:00
Demetrio Cassarino 81c1b3cbb7 -pulizia codice 2024-07-10 16:16:02 +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
Demetrio Cassarino 2ec5866c4a -pulizia codice
-focus oer slider da sistemare
-aggiunto selezione layer in scena che visualizza il layer nell'albero da controllare
2024-07-05 17:11:01 +02:00
Dario Sassi c5e367e41c EgtCAM5 2.6g1 :
- ricompilazione con cambio versione.
2024-07-01 18:07:43 +02:00
Demetrio Cassarino 6cbe8c0683 Merge remote-tracking branch 'origin/master' into feature/Controllo_Converter 2024-06-26 08:29:54 +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
Demetrio Cassarino 55ff27409b -da testare 2024-06-05 17:15:29 +02:00
Dario Sassi ad7b0ed010 EgtCAM5 2.6f1 :
- ricompilazione con cambio versione.
2024-06-05 17:15:14 +02:00
Demetrio Cassarino f25ffc9c02 Merge remote-tracking branch 'origin/master' into feature/Controllo_Converter 2024-05-31 12:39:05 +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
Demetrio Cassarino e17974d262 -ridimensionato finestra db lavorazioni 2024-05-31 08:32:30 +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 495e1b2d23 -test su visibilità parametri lavorazioni 2024-05-30 16:25:12 +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
Demetrio Cassarino 4035e38bac -modificato dimensione finestra db lavorazioni 2024-05-29 12:06:00 +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
188 changed files with 11584 additions and 8162 deletions
+12 -12
View File
@@ -1,8 +1,8 @@
<Window x:Class="AboutBoxWndV" <Window x:Class="AboutBoxWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize" Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"> ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<Border BorderThickness="2" BorderBrush="LightBlue"> <Border BorderThickness="2" BorderBrush="LightBlue">
<Grid > <Grid >
@@ -13,8 +13,8 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1.75*"/>
<RowDefinition Height="0.25*"/> <RowDefinition Height="0.15*"/>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
@@ -31,19 +31,19 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1" Background="White"> <Border Name="LogoBrd" Grid.Column="1" Background="White">
<Image Source="/Resources/AboutBoxImage.png" Stretch="Uniform"/> <Image Source="/Resources/AboutBox/EgalwareLogo.png" Stretch="Uniform"/>
</Border> </Border>
</Grid> </Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center" <TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" /> VerticalAlignment="Center" FontSize="18" />
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" <TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/> VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center" <TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="12" /> VerticalAlignment="Center" FontSize="12" />
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch" <TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/> VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True" <Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Margin="100,0"/> Margin="100,0"/>
</Grid> </Grid>
+13 -1
View File
@@ -14,11 +14,23 @@ Public Class AboutBoxWndV
Dim sLeftDays As String = "" Dim sLeftDays As String = ""
Dim nLeftDays As Integer Dim nLeftDays As Integer
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")" 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 = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName & sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & IniFile.m_nInstance.ToString() & " Inst" & IniFile.m_nInstance.ToString() &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine " Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "SupportPlane " & sAssStatus & Environment.NewLine
sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
@@ -66,7 +78,7 @@ Public Class AboutBoxWndV
End If End If
If Not bExtensions Then sInfo &= Environment.NewLine & "---" If Not bExtensions Then sInfo &= Environment.NewLine & "---"
InfoLbl.Text = sInfo InfoLbl.Text = sInfo
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok ExitBtn.Content = EgtMsg(10104) 'Ok
End Sub End Sub
End Class End Class
+2 -1
View File
@@ -210,7 +210,8 @@ Class Application
Friend Const GUNSTOCKMODIF As String = "GunStockModif" Friend Const GUNSTOCKMODIF As String = "GunStockModif"
Private Sub Application_DispatcherUnhandledException(ByVal sender As System.Object, ByVal e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs) Private Sub Application_DispatcherUnhandledException(ByVal sender As System.Object, ByVal e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs)
MessageBox.Show(e.Exception.Message) 'MessageBox.Show(e.Exception.Message)
EgtMessageBoxV.Show(Application.Current.MainWindow, e.Exception.Message)
e.Handled = True e.Handled = True
End Sub End Sub
@@ -88,49 +88,6 @@ Public Class AutomaticCloseExpander
Exit For Exit For
End If End If
Next Next
'Dim TotalDimension As Double = 0
''Aggiungo la dimensione di tutti gli Header
'For Each Expander In ExpanderList
' If Expander IsNot SelectedExpander Then
' If Not Expander.IsExpanded Then
' TotalDimension += Expander.ActualHeight
' Else
' Dim ExpanderContent As FrameworkElement = DirectCast(Expander.Content, FrameworkElement)
' ExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
' TotalDimension += (Expander.ActualHeight - ExpanderContent.DesiredSize.Height)
' End If
' Else
' TotalDimension += Expander.ActualHeight
' End If
'Next
'' Aggiungo la dimensione dei controlli fissi (non Expander)
'For Each OtherControl In OtherControlList
' TotalDimension += OtherControl.ActualHeight
'Next
'' Aggiungo la dimensione del contenuto dell'expander selezionato
'Dim SelectedContent As FrameworkElement = DirectCast(SelectedExpander.Content, FrameworkElement)
'SelectedContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
'TotalDimension += SelectedContent.DesiredSize.Height
'' Verifico per tutti gli expander (tranne quello selezionato) a partire dal primo se sono espansi e nel caso se la loro dimensione totale li fa stare nello spazio disponibile
'Dim Index As Integer = 0
'For Index = 0 To ExpanderList.Count - 1
' If ExpanderList(Index) IsNot SelectedExpander Then
' If ExpanderList(Index).IsExpanded Then
' Dim ExpanderContent As FrameworkElement = DirectCast(ExpanderList(Index).Content, FrameworkElement)
' TotalDimension += ExpanderContent.ActualHeight
' If TotalDimension > Me.AssociatedObject.MaxHeight Then
' Exit For
' End If
' End If
' End If
'Next
'For CancelIndex = Index To ExpanderList.Count - 1
' If ExpanderList(CancelIndex) IsNot SelectedExpander Then
' ExpanderList(CancelIndex).IsExpanded = False
' End If
'Next
End Sub End Sub
Private Sub HorizontalVerifyDimension(SelectedExpander As Expander) Private Sub HorizontalVerifyDimension(SelectedExpander As Expander)
@@ -58,4 +58,5 @@
binding.UpdateSource() binding.UpdateSource()
End If End If
End Sub End Sub
End Class End Class
+1 -1
View File
@@ -9,7 +9,7 @@
Set(value As String) Set(value As String)
If value <> m_sTabName Then If value <> m_sTabName Then
m_sTabName = value m_sTabName = value
OnPropertyChanged("sTabName") OnPropertyChanged(NameOf(sTabName))
End If End If
End Set End Set
End Property End Property
+38 -16
View File
@@ -1,5 +1,7 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.ComponentModel Imports System.ComponentModel
Imports EgtUILib
Imports EgtUILib.EgtInterface
' Classe che definisce un elemento di base del TreeView ' Classe che definisce un elemento di base del TreeView
Public Class TreeViewItemBase Public Class TreeViewItemBase
@@ -13,7 +15,7 @@ Public Class TreeViewItemBase
Set(value As String) Set(value As String)
If (value <> m_Name) Then If (value <> m_Name) Then
m_Name = value m_Name = value
NotifyPropertyChanged("Name") NotifyPropertyChanged(NameOf(Name))
End If End If
End Set End Set
End Property End Property
@@ -26,12 +28,12 @@ Public Class TreeViewItemBase
Set(value As Boolean) Set(value As Boolean)
If (value <> m_isSelected) Then If (value <> m_isSelected) Then
m_isSelected = value m_isSelected = value
NotifyPropertyChanged("IsSelected") NotifyPropertyChanged(NameOf(IsSelected))
End If End If
End Set End Set
End Property End Property
Private m_isExpanded As Boolean Friend m_isExpanded As Boolean
Public Property IsExpanded As Boolean Public Property IsExpanded As Boolean
Get Get
Return m_isExpanded Return m_isExpanded
@@ -39,7 +41,26 @@ Public Class TreeViewItemBase
Set(value As Boolean) Set(value As Boolean)
If (value <> m_isExpanded) Then If (value <> m_isExpanded) Then
m_isExpanded = value m_isExpanded = value
NotifyPropertyChanged("IsExpanded") If Not Map.refProjectVM.bSelObjOnScene Then
Dim m_onldObjTreeOldId As Integer = Map.refManageLayerExpanderVM.m_nObjTreeOldId
If Not m_isExpanded Then
Else
For Each Item As LayerTreeViewItem In Map.refManageLayerExpanderVM.LayerList
For Each LayerItem As LayerTreeViewItem In Item.Items
If m_isExpanded = LayerItem.m_isExpanded Then
If m_onldObjTreeOldId = LayerItem.Id Then
Map.refProjectVM.SetLastInteger(LayerItem.Id)
'Map.refProjectVM.ExecuteCommand(Controller.CMD.DESELECTPARTLAYEROBJ)
'Else
'Map.refManageLayerExpanderVM.SelectIdInObjTree(LayerItem.Id)
'Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
End If
End If
Next
Next
End If
End If
NotifyPropertyChanged(NameOf(IsExpanded))
End If End If
End Set End Set
End Property End Property
@@ -52,7 +73,7 @@ Public Class TreeViewItemBase
Set(value As Boolean) Set(value As Boolean)
If value <> m_IsActive Then If value <> m_IsActive Then
m_IsActive = value m_IsActive = value
NotifyPropertyChanged("IsActive") NotifyPropertyChanged(NameOf(IsActive))
End If End If
End Set End Set
End Property End Property
@@ -64,7 +85,7 @@ Public Class TreeViewItemBase
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_IsEnabled = value m_IsEnabled = value
NotifyPropertyChanged("IsEnabled") NotifyPropertyChanged(NameOf(IsEnabled))
End Set End Set
End Property End Property
@@ -92,6 +113,7 @@ Public Class InheritableTreeViewItem
Implements INotifyPropertyChanged Implements INotifyPropertyChanged
Friend m_Name As String Friend m_Name As String
Public Property Name As String Public Property Name As String
Get Get
Return m_Name Return m_Name
@@ -99,7 +121,7 @@ Public Class InheritableTreeViewItem
Set(value As String) Set(value As String)
If (value <> m_Name) Then If (value <> m_Name) Then
m_Name = value m_Name = value
NotifyPropertyChanged("Name") NotifyPropertyChanged(NameOf(Name))
End If End If
End Set End Set
End Property End Property
@@ -112,7 +134,7 @@ Public Class InheritableTreeViewItem
Set(value As Boolean) Set(value As Boolean)
If (value <> m_IsSelected) Then If (value <> m_IsSelected) Then
m_IsSelected = value m_IsSelected = value
NotifyPropertyChanged("IsSelected") NotifyPropertyChanged(NameOf(IsSelected))
End If End If
End Set End Set
End Property End Property
@@ -125,7 +147,7 @@ Public Class InheritableTreeViewItem
Set(value As Boolean) Set(value As Boolean)
If (value <> m_isExpanded) Then If (value <> m_isExpanded) Then
m_isExpanded = value m_isExpanded = value
NotifyPropertyChanged("IsExpanded") NotifyPropertyChanged(NameOf(IsExpanded))
End If End If
End Set End Set
End Property End Property
@@ -138,7 +160,7 @@ Public Class InheritableTreeViewItem
Set(value As Boolean) Set(value As Boolean)
If value <> m_IsActive Then If value <> m_IsActive Then
m_IsActive = value m_IsActive = value
NotifyPropertyChanged("IsActive") NotifyPropertyChanged(NameOf(IsActive))
End If End If
End Set End Set
End Property End Property
@@ -150,7 +172,7 @@ Public Class InheritableTreeViewItem
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_IsEnabled = value m_IsEnabled = value
NotifyPropertyChanged("IsEnabled") NotifyPropertyChanged(NameOf(IsEnabled))
End Set End Set
End Property End Property
@@ -162,7 +184,7 @@ Public Class InheritableTreeViewItem
Set(value As String) Set(value As String)
If value <> m_sPictureString Then If value <> m_sPictureString Then
m_sPictureString = value m_sPictureString = value
NotifyPropertyChanged("PictureString") NotifyPropertyChanged(NameOf(PictureString))
End If End If
End Set End Set
End Property End Property
@@ -195,7 +217,6 @@ Public Class ParentItem
Inherits TreeViewItemBase Inherits TreeViewItemBase
Private m_sPictureString As String Private m_sPictureString As String
Private m_Items As ObservableCollection(Of ChildItem)
Public Property PictureString As String Public Property PictureString As String
Get Get
@@ -204,11 +225,12 @@ Public Class ParentItem
Set(value As String) Set(value As String)
If value <> m_sPictureString Then If value <> m_sPictureString Then
m_sPictureString = value m_sPictureString = value
NotifyPropertyChanged("PictureString") NotifyPropertyChanged(NameOf(PictureString))
End If End If
End Set End Set
End Property End Property
Private m_Items As ObservableCollection(Of ChildItem)
Public Property Items As ObservableCollection(Of ChildItem) Public Property Items As ObservableCollection(Of ChildItem)
Get Get
Return m_Items Return m_Items
@@ -242,7 +264,7 @@ Public Class ChildItem
Set(value As String) Set(value As String)
If value <> m_sPictureString Then If value <> m_sPictureString Then
m_sPictureString = value m_sPictureString = value
NotifyPropertyChanged("PictureString") NotifyPropertyChanged(NameOf(PictureString))
End If End If
End Set End Set
End Property End Property
@@ -255,4 +277,4 @@ Public Class ChildItem
MyBase.New(Name, IsSelected, IsExpanded, IsActive) MyBase.New(Name, IsSelected, IsExpanded, IsActive)
End Sub End Sub
End Class End Class
+1 -2
View File
@@ -1,5 +1,4 @@
''' <summary>
''' <summary>
''' A command whose sole purpose is to ''' A command whose sole purpose is to
''' relay its functionality to other ''' relay its functionality to other
''' objects by invoking delegates. The ''' objects by invoking delegates. The
+1 -2
View File
@@ -1,5 +1,4 @@
Module ConstDoors
Module ConstDoors
' File contenente la lista dei nomi di geometria ammessi ' File contenente la lista dei nomi di geometria ammessi
Public Const GEONAMELIST_FILE As String = "GeometryNameList.ini" Public Const GEONAMELIST_FILE As String = "GeometryNameList.ini"
+10 -4
View File
@@ -47,7 +47,6 @@ Module ConstIni
Public Const S_LUA As String = "Lua" Public Const S_LUA As String = "Lua"
Public Const K_LIBSDIR As String = "LibsDir" Public Const K_LIBSDIR As String = "LibsDir"
Public Const K_LIBSDIR64 As String = "LibsDir64"
Public Const K_BASELIB As String = "BaseLib" Public Const K_BASELIB As String = "BaseLib"
Public Const K_BWSIM As String = "BWSim" Public Const K_BWSIM As String = "BWSim"
@@ -70,6 +69,7 @@ Module ConstIni
Public Const K_SHOWGFRAME As String = "ShowGFrame" Public Const K_SHOWGFRAME As String = "ShowGFrame"
Public Const K_LINEWIDTH As String = "LineWidth" Public Const K_LINEWIDTH As String = "LineWidth"
Public Const K_MARK As String = "Mark" Public Const K_MARK As String = "Mark"
Public Const K_MARK2 As String = "Mark2"
Public Const K_SELSURF As String = "SelSurf" Public Const K_SELSURF As String = "SelSurf"
Public Const K_SHOWMODE As String = "ShowMode" Public Const K_SHOWMODE As String = "ShowMode"
Public Const K_CURVEDIR As String = "CurveDir" Public Const K_CURVEDIR As String = "CurveDir"
@@ -105,10 +105,15 @@ Module ConstIni
Public Const S_IMPORT As String = "Import" Public Const S_IMPORT As String = "Import"
Public Const K_DXFSCALE As String = "DxfScale" Public Const K_DXFSCALE As String = "DxfScale"
Public Const K_STLSCALE As String = "StlScale" 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_IMGSCALE As String = "ImgScale"
Public Const K_CNCFLAG As String = "CncFlag" Public Const K_CNCFLAG As String = "CncFlag"
Public Const K_BTLFLAG As String = "BtlFlag" Public Const K_BTLFLAG As String = "BtlFlag"
Public Const K_BTLAUXDIR As String = "BtlAuxDir" 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 S_EXPORT As String = "Export"
Public Const K_DXFFLAG As String = "DxfFlag" Public Const K_DXFFLAG As String = "DxfFlag"
@@ -123,7 +128,6 @@ Module ConstIni
Public Const S_BEAM As String = "Beam" Public Const S_BEAM As String = "Beam"
Public Const K_BEAMENABLE As String = "BtlEnable" Public Const K_BEAMENABLE As String = "BtlEnable"
Public Const K_BEAMBASEDIR As String = "BaseDir" Public Const K_BEAMBASEDIR As String = "BaseDir"
Public Const K_BEAMBASEDIR64 As String = "BaseDir64"
Public Const K_BEAMBTLEXEC As String = "BtlExec" Public Const K_BEAMBTLEXEC As String = "BtlExec"
Public Const K_BEAMBWEEXEC As String = "BweExec" Public Const K_BEAMBWEEXEC As String = "BweExec"
Public Const K_BEAMMACHINES As String = "Machines" Public Const K_BEAMMACHINES As String = "Machines"
@@ -132,7 +136,6 @@ Module ConstIni
Public Const S_WALL As String = "Wall" Public Const S_WALL As String = "Wall"
Public Const K_WALLENABLE As String = "BtlEnable" Public Const K_WALLENABLE As String = "BtlEnable"
Public Const K_WALLBASEDIR As String = "BaseDir" Public Const K_WALLBASEDIR As String = "BaseDir"
Public Const K_WALLBASEDIR64 As String = "BaseDir64"
Public Const K_WALLBTLEXEC As String = "BtlExec" Public Const K_WALLBTLEXEC As String = "BtlExec"
Public Const K_WALLBWEEXEC As String = "BweExec" Public Const K_WALLBWEEXEC As String = "BweExec"
Public Const K_WALLBUTTON As String = "Button" Public Const K_WALLBUTTON As String = "Button"
@@ -156,6 +159,7 @@ Module ConstIni
Public Const K_TABLESDIR As String = "TablesDir" Public Const K_TABLESDIR As String = "TablesDir"
Public Const K_CURRMTABLE As String = "CurrMTable" Public Const K_CURRMTABLE As String = "CurrMTable"
Public Const K_MTABLEWINPLACE As String = "MTableWinPlace" Public Const K_MTABLEWINPLACE As String = "MTableWinPlace"
Public Const K_OPTIMIZEMACHFORLINE As String = "OptimizeMachForLine"
Public Const S_GUNSTOCK As String = "GunStock" Public Const S_GUNSTOCK As String = "GunStock"
Public Const K_GUNSTOCKENABLE As String = "GsEnable" Public Const K_GUNSTOCKENABLE As String = "GsEnable"
@@ -172,7 +176,6 @@ Module ConstIni
Public Const S_MACH As String = "Mach" Public Const S_MACH As String = "Mach"
Public Const K_MACHINESDIR As String = "MachinesDir" Public Const K_MACHINESDIR As String = "MachinesDir"
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir" Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
Public Const K_TOOLMAKERSDIR64 As String = "ToolMakersDir64"
Public Const K_CURRMACH As String = "CurrMach" Public Const K_CURRMACH As String = "CurrMach"
Public Const K_SELGEOMSAWING As String = "SelGeomSawing" Public Const K_SELGEOMSAWING As String = "SelGeomSawing"
Public Const K_SELGEOMDRILLING As String = "SelGeomDrilling" Public Const K_SELGEOMDRILLING As String = "SelGeomDrilling"
@@ -184,6 +187,9 @@ Module ConstIni
Public Const K_SELGEOMGENMACHINING As String = "SelGeomGenMachining" Public Const K_SELGEOMGENMACHINING As String = "SelGeomGenMachining"
Public Const K_SELGEOMCHISELING As String = "SelGeomChiseling" Public Const K_SELGEOMCHISELING As String = "SelGeomChiseling"
Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing" 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_MACHININGGROUP As String = "MachiningGroup"
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable" Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps" 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_CHISELING As String = "Chiseling"
Public Const K_SURFROUGHING As String = "SurfRoughing" Public Const K_SURFROUGHING As String = "SurfRoughing"
Public Const K_SURFFINISHING As String = "SurfFinishing" 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_WATERJETTING As String = "WaterJetting"
Public Const K_SAWINGONARCS As String = "SawingOnArcs" Public Const K_SAWINGONARCS As String = "SawingOnArcs"
-4
View File
@@ -11,8 +11,4 @@
m_CurrSetUpVM = CurrSetUpVM m_CurrSetUpVM = CurrSetUpVM
End Sub End Sub
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.m_CloseWindow
' Me.DialogResult = bDialogResult
'End Sub
End Class End Class
+21 -20
View File
@@ -1,6 +1,4 @@
Imports System.Collections.ObjectModel Imports System.IO
Imports System.ComponentModel
Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
@@ -12,7 +10,7 @@ Public Class CurrSetUpVM
Private m_Title As String Private m_Title As String
Public ReadOnly Property Title As String Public ReadOnly Property Title As String
Get Get
Return EgtMsg(MSG_SETUP + 1) Return EgtMsg(6451) ' SetUp
End Get End Get
End Property End Property
@@ -54,28 +52,28 @@ Public Class CurrSetUpVM
Public ReadOnly Property TitleMsg As String Public ReadOnly Property TitleMsg As String
Get Get
Return EgtMsg(MSG_SETUP + 1) Return EgtMsg(6451) ' SetUp
End Get End Get
End Property End Property
Public ReadOnly Property ApplyMsg As String Public ReadOnly Property ApplyMsg As String
Get Get
Return EgtMsg(MSG_SETUP + 2) Return EgtMsg(6452) ' Applica
End Get End Get
End Property End Property
Public ReadOnly Property SaveMsg As String Public ReadOnly Property SaveMsg As String
Get Get
Return EgtMsg(MSG_SETUP + 3) Return EgtMsg(6453) ' Salva
End Get End Get
End Property End Property
Public ReadOnly Property RetrieveMsg As String Public ReadOnly Property RetrieveMsg As String
Get Get
Return EgtMsg(MSG_SETUP + 4) Return EgtMsg(6454) ' Recupera
End Get End Get
End Property End Property
Public ReadOnly Property AutomaticMsg As String Public ReadOnly Property AutomaticMsg As String
Get Get
Return EgtMsg(MSG_SETUP + 5) Return EgtMsg(6455) ' Auto
End Get End Get
End Property End Property
@@ -100,7 +98,7 @@ Public Class CurrSetUpVM
' Funzione che verifica se ci sono state modifiche all'attrezzaggio corrente e permette di attivare e disattivare il bottone applica ' Funzione che verifica se ci sono state modifiche all'attrezzaggio corrente e permette di attivare e disattivare il bottone applica
Private Sub IsEnabledBtns() Private Sub IsEnabledBtns()
m_Apply_IsEnabled = Not m_SetUpVM.IsAppliedSetUp() m_Apply_IsEnabled = Not m_SetUpVM.IsAppliedSetUp()
NotifyPropertyChanged("Apply_IsEnabled") NotifyPropertyChanged(NameOf(Apply_IsEnabled))
End Sub End Sub
#Region "COMMANDS" #Region "COMMANDS"
@@ -151,7 +149,7 @@ Public Class CurrSetUpVM
Public Sub Save() Public Sub Save()
' chiedo il nome con cui salvare il setup ' chiedo il nome con cui salvare il setup
Dim SaveFileDialogViewVM As New SaveFileDialogWithListVM With { Dim SaveFileDialogViewVM As New SaveFileDialogWithListVM With {
.Title = EgtMsg(MSG_SETUP + 3) & " " & EgtMsg(MSG_SETUP + 1), .Title = EgtMsg(6453) & " " & EgtMsg(6451), ' Salva SetUp
.Extension = ".stu", .Extension = ".stu",
.Filter = "*.stu", .Filter = "*.stu",
.Directory = m_SetUpDir_FilePath, .Directory = m_SetUpDir_FilePath,
@@ -163,7 +161,8 @@ Public Class CurrSetUpVM
sFilePath = SaveFileDialogViewVM.FileName sFilePath = SaveFileDialogViewVM.FileName
If Not m_SetUpVM.Save(sFilePath) Then If Not m_SetUpVM.Save(sFilePath) Then
EgtOutLog("Error in setup saving: can't find the directory") EgtOutLog("Error in setup saving: can't find the directory")
MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Error in saving Setup.", EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore
End If End If
End Sub End Sub
@@ -195,11 +194,12 @@ Public Class CurrSetUpVM
Return Return
End If End If
' Apertura dialogo di salvataggio ' Apertura dialogo di salvataggio
Dim OpenFileDialogView As New EgtWPFLib5.EgtOpenFileDialog Dim OpenFileDialogView As New EgtWPFLib5.EgtOpenFileDialog With {
OpenFileDialogView.Title = EgtMsg(MSG_SETUP + 4) & " " & EgtMsg(MSG_SETUP + 1) .Title = EgtMsg(6454) & " " & EgtMsg(6451), ' Recupera SetUp
OpenFileDialogView.Filter = "*.stu" .Filter = "*.stu",
OpenFileDialogView.Directory = sDir .Directory = sDir,
OpenFileDialogView.FileName = String.Empty .FileName = String.Empty
}
If Not OpenFileDialogView.EgtShowDialog Then If Not OpenFileDialogView.EgtShowDialog Then
Return Return
End If End If
@@ -258,14 +258,15 @@ Public Class CurrSetUpVM
' Verifico se l'attrezzaggio è stato modificato ' Verifico se l'attrezzaggio è stato modificato
If m_SetUpVM.IsAppliedSetUp() Then If m_SetUpVM.IsAppliedSetUp() Then
' se modificato chiedo se salvarlo prima di uscire ' se modificato chiedo se salvarlo prima di uscire
If MessageBox.Show(EgtMsg(MSG_SETUP + 6), EgtMsg(MSG_SETUP + 2), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show(EgtMsg(MSG_SETUP + 6), EgtMsg(MSG_SETUP + 2), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6456), EgtMsg(6452), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then ' Applicare l'attrezzaggio corrente prima di uscire? Applica
' lo salvo ' lo salvo
Apply() Apply()
End If End If
End If End If
' Resetto tutti i delegate usati ' Resetto tutti i delegate usati
ExitToolAssociation.m_delIsModifiedSetUp = Nothing ExitToolAssociation.m_delIsModifiedSetUp = Nothing
' Reset lua ' Reset lua
EgtLuaResetGlobVar("STU") EgtLuaResetGlobVar("STU")
@@ -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
+154 -136
View File
@@ -9,82 +9,92 @@
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}"> <StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Expander Name="Draw2D" Style="{StaticResource ExpanderStyle}" Grid.Row="0" <Expander Name="Draw2D" Style="{StaticResource ExpanderStyle}" Grid.Row="0"
IsExpanded="{Binding Draw2DIsExpanded}"> IsExpanded="{Binding Draw2DIsExpanded}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding Draw2DMsg}"/> <TextBlock Text="{Binding Draw2DMsg}"/>
</Expander.Header> </Expander.Header>
<UniformGrid Columns="3"> <UniformGrid Columns="3">
<Button ToolTip="{Binding PointToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding PointToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding PointCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding PointCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Line2PToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding Line2PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding Line2PCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding Line2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LinePDLToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding LinePDLToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding LinePDLCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding LinePDLCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinePDL.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/LinePDL.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcCSE.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ArcCSE.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Arc3P.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Arc3P.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ArcPDPToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ArcPDPToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Circle3PToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding Circle3PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding Rectangle2PCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding Rectangle2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Rectangle2P.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Rectangle2P.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding PolygonToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding PolygonToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding PolygonCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding PolygonCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Polygon.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Polygon.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding PolygonSideToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding PolygonSideToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/>
</Button> </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}" <Button ToolTip="{Binding LinearDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding LinearDimensionCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding LinearDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinearDimension.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/LinearDimension.png" Stretch="Uniform"/>
</Button> </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>
<Expander Name="Draw3D" Style="{StaticResource ExpanderStyle}" Grid.Row="1" <Expander Name="Draw3D" Style="{StaticResource ExpanderStyle}" Grid.Row="1"
Visibility="{Binding Draw3DVisibility}" IsExpanded="{Binding Draw3DIsExpanded}"> Visibility="{Binding Draw3DVisibility}" IsExpanded="{Binding Draw3DIsExpanded}">
@@ -93,90 +103,95 @@
</Expander.Header> </Expander.Header>
<UniformGrid Columns="3"> <UniformGrid Columns="3">
<Button ToolTip="{Binding PlaneToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding PlaneToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding PlaneCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding PlaneCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Plane.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Plane.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ExtrudeToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExtrudeToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtrudeCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding ExtrudeCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Extrude.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Extrude.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding RevolveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding RevolveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding RevolveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding RevolveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Revolve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Revolve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ScrewToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ScrewToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ScrewCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding ScrewCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Screw.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Screw.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding SweptToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding SweptToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding SweptCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding SweptCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Swept.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Swept.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding RuledToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding RuledToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding RuledCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding RuledCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Ruled.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Ruled.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding SolidAddSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding SolidAddSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding SolidAddSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding SolidAddSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidAddSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/SolidAddSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding SolidSubtractSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding SolidSubtractSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding SolidSubtractSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding SolidSubtractSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidSubtractSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/SolidSubtractSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding SolidIntersectSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding SolidIntersectSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding SolidIntersectSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding SolidIntersectSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidIntersectSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/SolidIntersectSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding IntersectSurfSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding IntersectSurfSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding IntersectSurfSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding IntersectSurfSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/IntersectSurfSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/IntersectSurfSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ExtractLoopsToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExtractLoopsToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractLoopsCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExtractLoopsCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractLoops.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExtractLoops.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ExtractFacetLoopsToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExtractFacetLoopsToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractFacetLoopsCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExtractFacetLoopsCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractFacetLoops.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExtractFacetLoops.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ExplodeSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExplodeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExplodeSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExplodeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ExtractSurfFacetToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExtractSurfFacetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractSurfFacetCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExtractSurfFacetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractSurfFacet.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExtractSurfFacet.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding MergeSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding MergeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding MergeSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding MergeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/MergeSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/MergeSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding InvertSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding InvertSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/InvertSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ApproxSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ApproxSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/>
</Button> </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> </UniformGrid>
</Expander> </Expander>
<Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}"> <Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}">
@@ -185,120 +200,123 @@
</Expander.Header> </Expander.Header>
<UniformGrid Columns="3"> <UniformGrid Columns="3">
<Button ToolTip="{Binding DeleteToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding DeleteToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ChangeLayerToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ChangeLayerToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button> </Button>
<Button Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ChangeStatusToolTip}" Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/> 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}" <Button ToolTip="{Binding ChangeColorToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeColor.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ChangeColor.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ChangeAlphaToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ChangeAlphaToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeAlphaCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ChangeAlphaCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeColorAlpha.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ChangeColorAlpha.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ResetColorToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ResetColorToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ResetColorCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ResetColorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemoveColor.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/RemoveColor.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding InvertCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding InvertCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding InvertCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding InvertCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ChangeStartToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ChangeStartToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeStartCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ChangeStartCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ThickCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ThickCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ExtendCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExtendCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtendCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExtendCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtendCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExtendCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding BreakCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding BreakCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding BreakCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding BreakCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/BreakCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/BreakCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding SplitCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding SplitCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding SplitCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding SplitCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SplitCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/SplitCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ExplodeCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExplodeCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExplodeCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExplodeCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExplodeCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding JoinCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding JoinCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding JoinCurveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding JoinCurveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Offset.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Offset.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding FilletToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding FilletToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding FilletCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding FilletCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Fillet.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Fillet.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ChamferToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ChamferToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ChamferCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ChamferCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ArcFlipToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ArcFlipToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcFlipCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ArcFlipCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ArcFlip.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ArcFlip.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ModifyCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ModifyCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ModifyCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding AddPointCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding AddPointCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding AddPointCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding AddPointCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding RemovePointCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding RemovePointCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding RemovePointCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding RemovePointCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ApproxCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ApproxCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ApproxCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ApproxCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ApproxCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ModifyArcRadiusToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ModifyArcRadiusToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyArcRadiusCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ModifyArcRadiusCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ModifyArcRadius.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ModifyArcRadius.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ModifyTextToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ModifyTextToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyTextCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ModifyTextCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ModifyText.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ModifyText.png" Stretch="Uniform"/>
</Button> </Button>
</UniformGrid> </UniformGrid>
@@ -309,8 +327,8 @@
</Expander.Header> </Expander.Header>
<UniformGrid Columns="3"> <UniformGrid Columns="3">
<Button ToolTip="{Binding MoveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding MoveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding MoveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/>
</Button> </Button>
<Button Style="{StaticResource DrawPanelButton}" <Button Style="{StaticResource DrawPanelButton}"
@@ -318,33 +336,33 @@
<Button Style="{StaticResource DrawPanelButton}" <Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/> Visibility="Hidden"/>
<Button ToolTip="{Binding RotateToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding RotateToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding RotateCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding RotateCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding MirrorToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding MirrorToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding MirrorCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding MirrorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Mirror.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ScaleToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ScaleToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ScaleCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ScaleCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Scale.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Rotate3DToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding Rotate3DToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding Rotate3DCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding Rotate3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Rotate3D.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Rotate3D.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Mirror3DToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding Mirror3DToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding Mirror3DCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding Mirror3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror3D.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Mirror3D.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding Scale3DToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding Scale3DToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding Scale3DCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding Scale3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale3D.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Scale3D.png" Stretch="Uniform"/>
</Button> </Button>
</UniformGrid> </UniformGrid>
+219 -75
View File
@@ -11,22 +11,22 @@ Public Class DrawPanelVM
Public ReadOnly Property Draw2DMsg As String Public ReadOnly Property Draw2DMsg As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 44) Return EgtMsg(5244) ' Disegno 2D
End Get End Get
End Property End Property
Public ReadOnly Property Draw3DMsg As String Public ReadOnly Property Draw3DMsg As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 45) Return EgtMsg(5245) ' Disegno 3D
End Get End Get
End Property End Property
Public ReadOnly Property ModifyMsg As String Public ReadOnly Property ModifyMsg As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 46) Return EgtMsg(5246) ' Modifica
End Get End Get
End Property End Property
Public ReadOnly Property TransformMsg As String Public ReadOnly Property TransformMsg As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 47) Return EgtMsg(5247) ' Trasforma
End Get End Get
End Property End Property
@@ -37,310 +37,331 @@ Public Class DrawPanelVM
'Proprietà ToolTip 'Proprietà ToolTip
Public ReadOnly Property PointToolTip As String Public ReadOnly Property PointToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 1) Return EgtMsg(5201) ' Punto<br/>Vettore (Shift)<br/>Riferimento (Ctrl)
End Get End Get
End Property End Property
Public ReadOnly Property Line2PToolTip As String Public ReadOnly Property Line2PToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 2) Return EgtMsg(5202) ' Linea 2 Punti<br/>Linea 2 Punti con Continuazione (Ctrl)
End Get End Get
End Property End Property
Public ReadOnly Property LinePDLToolTip As String Public ReadOnly Property LinePDLToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 3) Return EgtMsg(5203) ' Linea Punto Direzione Lunghezza<br/>Linea Punto Vettore Direzione Lunghezza (Shift)
End Get End Get
End Property End Property
Public ReadOnly Property CirclePDToolTip As String Public ReadOnly Property CirclePDToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 4) Return EgtMsg(5204) ' Cerchio Centro Punto
End Get End Get
End Property End Property
Public ReadOnly Property CircleCDToolTip As String Public ReadOnly Property CircleCDToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 5) Return EgtMsg(5205) ' Cerchio Centro Diametro
End Get End Get
End Property End Property
Public ReadOnly Property Circle3PToolTip As String Public ReadOnly Property Circle3PToolTip As String
Get Get
Return EgtMsg(5156) Return EgtMsg(5156) ' Cerchio 3 Punti
End Get End Get
End Property End Property
Public ReadOnly Property ArcCSEToolTip As String Public ReadOnly Property ArcCSEToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 6) Return EgtMsg(5206) ' Arco Centro Punti Inizio e Fine
End Get End Get
End Property End Property
Public ReadOnly Property Arc3PToolTip As String Public ReadOnly Property Arc3PToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 7) Return EgtMsg(5207) ' Arco 3 Punti<br/>Arco 2 Punti Raggio (Shift)
End Get End Get
End Property End Property
Public ReadOnly Property ArcPDPToolTip As String Public ReadOnly Property ArcPDPToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 8) Return EgtMsg(5208) ' Arco Punto e Direzione Inizio Punto Fine<br/>Arco Punto e Vettore Direzione Inizio Punto Fine (Shift)<br/>Arco Punto e Direzione Inizio Punto Fine con Continuazione (Ctrl)
End Get End Get
End Property End Property
Public ReadOnly Property Rectangle2PToolTip As String Public ReadOnly Property Rectangle2PToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 11) Return EgtMsg(5211) ' Rettangolo 2 Punti
End Get End Get
End Property End Property
Public ReadOnly Property PolygonToolTip As String Public ReadOnly Property PolygonToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 12) Return EgtMsg(5212) ' Poligono
End Get End Get
End Property End Property
Public ReadOnly Property PolygonSideToolTip As String Public ReadOnly Property PolygonSideToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 13) Return EgtMsg(5213) ' Poligono da Lato
End Get End Get
End Property End Property
Public ReadOnly Property TextToolTip As String Public ReadOnly Property TextToolTip As String
Get Get
Return EgtMsg( 5214) Return EgtMsg(5214) ' Testo<br/>Testo Avanzato (Shift)
End Get End Get
End Property End Property
Public ReadOnly Property LinearDimensionToolTip As String Public ReadOnly Property LinearDimensionToolTip As String
Get 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 Get
End Property End Property
Public ReadOnly Property PlaneToolTip As String Public ReadOnly Property PlaneToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 15) Return EgtMsg(5215) ' Piano contornato<br/>Regione piana (Shift)
End Get End Get
End Property End Property
Public ReadOnly Property ExtrudeToolTip As String Public ReadOnly Property ExtrudeToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 16) Return EgtMsg(5216) ' Estrusione
End Get End Get
End Property End Property
Public ReadOnly Property RevolveToolTip As String Public ReadOnly Property RevolveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 17) Return EgtMsg(5217) ' Rivoluzione
End Get End Get
End Property End Property
Public ReadOnly Property ScrewToolTip As String Public ReadOnly Property ScrewToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 18) Return EgtMsg(5218) ' Avvitamento
End Get End Get
End Property End Property
Public ReadOnly Property SweptToolTip As String Public ReadOnly Property SweptToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 48) Return EgtMsg(5248) ' Swept (Sezione, Guida)
End Get End Get
End Property End Property
Public ReadOnly Property RuledToolTip As String Public ReadOnly Property RuledToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 19) Return EgtMsg(5219) ' Rigata
End Get End Get
End Property End Property
Public ReadOnly Property MergeSurfToolTip As String Public ReadOnly Property MergeSurfToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 20) Return EgtMsg(5220) ' Unisci Superfici
End Get End Get
End Property End Property
Public ReadOnly Property ExplodeSurfToolTip As String Public ReadOnly Property ExplodeSurfToolTip As String
Get Get
Return EgtMsg( 5221) 'Esplodi Superfici e Regioni Piane Return EgtMsg(5221) ' Esplodi Superfici e Regioni Piane
End Get End Get
End Property End Property
Public ReadOnly Property ApproxSurfToolTip As String Public ReadOnly Property ApproxSurfToolTip As String
Get Get
Return EgtMsg( 5165) 'Approssima Superfici e Regioni Piane 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 Get
End Property End Property
Public ReadOnly Property ExtractSurfFacetToolTip As String Public ReadOnly Property ExtractSurfFacetToolTip As String
Get Get
Return EgtMsg( 5158) 'Estrai Faccia da Superficie Return EgtMsg(5158) ' Estrai Faccia da Superficie
End Get End Get
End Property End Property
Public ReadOnly Property InvertSurfToolTip As String Public ReadOnly Property InvertSurfToolTip As String
Get Get
Return EgtMsg( 5222) 'Inverti Superfici e Regioni Piane Return EgtMsg(5222) ' Inverti Superfici e Regioni Piane
End Get End Get
End Property End Property
Public ReadOnly Property ExtractLoopsToolTip As String Public ReadOnly Property ExtractLoopsToolTip As String
Get Get
Return EgtMsg( 5150) 'Estrai Bordi Liberi di Superfici e Regioni Piane Return EgtMsg(5150) ' Estrai Bordi Liberi di Superfici e Regioni Piane
End Get End Get
End Property End Property
Public ReadOnly Property ExtractFacetLoopsToolTip As String Public ReadOnly Property ExtractFacetLoopsToolTip As String
Get Get
Return EgtMsg( 5157) 'Estrai Bordi di Faccia di superficie e di Parti di Regioni Piane Return EgtMsg(5157) ' Estrai Bordi di Faccia di superficie e di Parti di Regioni Piane
End Get End Get
End Property End Property
Public ReadOnly Property SolidAddSurfToolTip As String Public ReadOnly Property SolidAddSurfToolTip As String
Get Get
Return EgtMsg( 5151) 'Unisci Superfici e Regioni Piane Return EgtMsg(5151) ' Unisci Superfici e Regioni Piane
End Get End Get
End Property End Property
Public ReadOnly Property SolidSubtractSurfToolTip As String Public ReadOnly Property SolidSubtractSurfToolTip As String
Get Get
Return EgtMsg( 5152) 'Sottrai Superfici e Regioni Piane Return EgtMsg(5152) ' Sottrai Superfici e Regioni Piane
End Get End Get
End Property End Property
Public ReadOnly Property SolidIntersectSurfToolTip As String Public ReadOnly Property SolidIntersectSurfToolTip As String
Get Get
Return EgtMsg( 5153) 'Interseca Superfici e Regioni Piane Return EgtMsg(5153) ' Interseca Superfici e Regioni Piane
End Get End Get
End Property End Property
Public ReadOnly Property IntersectSurfSurfToolTip As String Public ReadOnly Property IntersectSurfSurfToolTip As String
Get Get
Return EgtMsg( 5154) 'Punti, Curve e Facce di Intersezione Tra Superfici Return EgtMsg(5154) ' Punti, Curve e Facce di Intersezione Tra Superfici
End Get End Get
End Property End Property
Public ReadOnly Property DeleteToolTip As String Public ReadOnly Property DeleteToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 23) Return EgtMsg(5223) ' Cancella
End Get End Get
End Property End Property
Public ReadOnly Property ChangeLayerToolTip As String Public ReadOnly Property ChangeLayerToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 24) Return EgtMsg(5224) ' Cambia Layer<br/>Cambia Layer con Trasformazioni (Shift)
End Get End Get
End Property End Property
Public ReadOnly Property ChangeStatusToolTip As String
Get
Return EgtMsg(5250) ' Nascondi<br/>Visualizza Layer (Shift)<br/>Visualizza Pezzo (Ctrl)
End Get
End Property
Public ReadOnly Property ChangeAlphaToolTip As String Public ReadOnly Property ChangeAlphaToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 25) Return EgtMsg(5225) ' Cambia Trasparenza
End Get End Get
End Property End Property
Public ReadOnly Property ResetColorToolTip As String Public ReadOnly Property ResetColorToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 26) Return EgtMsg(5226) ' Annulla Colore
End Get End Get
End Property End Property
Public ReadOnly Property ChangeColorToolTip As String Public ReadOnly Property ChangeColorToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 27) Return EgtMsg(5227) ' Cambia Colore
End Get End Get
End Property End Property
Public ReadOnly Property InvertCurveToolTip As String Public ReadOnly Property InvertCurveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 28) Return EgtMsg(5228) ' Inverti Curva
End Get End Get
End Property End Property
Public ReadOnly Property ChangeStartToolTip As String Public ReadOnly Property ChangeStartToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 29) Return EgtMsg(5229) ' Cambia Punto Iniziale di Curva Chiusa
End Get End Get
End Property End Property
Public ReadOnly Property ExtendCurveToolTip As String Public ReadOnly Property ExtendCurveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 30) Return EgtMsg(5230) ' Estendi o Accorcia Curva
End Get End Get
End Property End Property
Public ReadOnly Property BreakCurveToolTip As String Public ReadOnly Property BreakCurveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 31) Return EgtMsg(5231) ' Spezza Curva
End Get End Get
End Property End Property
Public ReadOnly Property SplitCurveToolTip As String Public ReadOnly Property SplitCurveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 32) Return EgtMsg(5232) ' Dividi Curva
End Get End Get
End Property End Property
Public ReadOnly Property JoinCurveToolTip As String Public ReadOnly Property JoinCurveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 33) Return EgtMsg(5233) ' Unisci Curve<br/>Unisci Curve creando una Copia (Shift)<br/>Fondi Curve nella Composita (Ctrl)
End Get End Get
End Property End Property
Public ReadOnly Property ExplodeCurveToolTip As String Public ReadOnly Property ExplodeCurveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 34) Return EgtMsg(5234) ' Esplodi Curve e Testi
End Get End Get
End Property End Property
Public ReadOnly Property ThickCurveToolTip As String Public ReadOnly Property ThickCurveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 35) Return EgtMsg(5235) ' Spessore e Estrusione Curva
End Get End Get
End Property End Property
Public ReadOnly Property FilletToolTip As String Public ReadOnly Property FilletToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 9) Return EgtMsg(5209) ' Raccordo
End Get End Get
End Property End Property
Public ReadOnly Property ChamferToolTip As String Public ReadOnly Property ChamferToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 10) Return EgtMsg(5210) ' Smusso
End Get End Get
End Property End Property
Public ReadOnly Property ArcFlipToolTip As String Public ReadOnly Property ArcFlipToolTip As String
Get Get
Return EgtMsg( 5159) Return EgtMsg(5159) ' Arco Capovolto<br/>Arco Esplementare (Shift)
End Get End Get
End Property End Property
Public ReadOnly Property OffsetToolTip As String Public ReadOnly Property OffsetToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 43) Return EgtMsg(5243) ' Offset
End Get End Get
End Property End Property
Public ReadOnly Property ModifyCurveToolTip As String Public ReadOnly Property ModifyCurveToolTip As String
Get Get
Return EgtMsg( 5160) Return EgtMsg(5160) ' Modifica forma
End Get End Get
End Property End Property
Public ReadOnly Property AddPointCurveToolTip As String Public ReadOnly Property AddPointCurveToolTip As String
Get Get
Return EgtMsg( 5161) Return EgtMsg(5161) ' Aggiungi Punto<br/>Trasforma in Arco (Shift)<br/>Chiudi Curva Composita (Ctrl)
End Get End Get
End Property End Property
Public ReadOnly Property RemovePointCurveToolTip As String Public ReadOnly Property RemovePointCurveToolTip As String
Get Get
Return EgtMsg( 5162) Return EgtMsg(5162) ' Rimuovi Punto<br/>Trasforma in Retta (Shift)<br/>Apri Curva Composita (Ctrl)
End Get End Get
End Property End Property
Public ReadOnly Property ApproxCurveToolTip As String Public ReadOnly Property ApproxCurveToolTip As String
Get Get
Return EgtMsg(5163) Return EgtMsg(5163) ' Approssima Curva<br/>Approssima Curva con Linee (Shift)
End Get End Get
End Property End Property
Public ReadOnly Property ModifyArcRadiusToolTip As String Public ReadOnly Property ModifyArcRadiusToolTip As String
Get Get
Return EgtMsg(5164) Return EgtMsg(5164) ' Modifica Raggio di Arco o Circonferenza
End Get End Get
End Property End Property
Public ReadOnly Property ModifyTextToolTip As String Public ReadOnly Property ModifyTextToolTip As String
Get Get
Return EgtMsg(5249) Return EgtMsg(5249) ' Modifica Testo
End Get End Get
End Property End Property
Public ReadOnly Property MoveToolTip As String Public ReadOnly Property MoveToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 36) Return EgtMsg(5236) ' Muovi
End Get End Get
End Property End Property
Public ReadOnly Property RotateToolTip As String Public ReadOnly Property RotateToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 37) Return EgtMsg(5237) ' Ruota
End Get End Get
End Property End Property
Public ReadOnly Property Rotate3DToolTip As String Public ReadOnly Property Rotate3DToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 38) Return EgtMsg(5238) ' Ruota 3D
End Get End Get
End Property End Property
Public ReadOnly Property MirrorToolTip As String Public ReadOnly Property MirrorToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 39) Return EgtMsg(5239) ' Specchia
End Get End Get
End Property End Property
Public ReadOnly Property Mirror3DToolTip As String Public ReadOnly Property Mirror3DToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 40) Return EgtMsg(5240) ' Specchia 3D
End Get End Get
End Property End Property
Public ReadOnly Property ScaleToolTip As String Public ReadOnly Property ScaleToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 41) Return EgtMsg(5241) ' Scala
End Get End Get
End Property End Property
Public ReadOnly Property Scale3DToolTip As String Public ReadOnly Property Scale3DToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 42) Return EgtMsg(5242) ' Scala 3D
End Get End Get
End Property End Property
@@ -404,7 +425,6 @@ Public Class DrawPanelVM
OnPropertyChanged(NameOf(DrawPanel_Visibility)) OnPropertyChanged(NameOf(DrawPanel_Visibility))
End Sub End Sub
#Region "Button state" #Region "Button state"
Private m_bLayerOk As Boolean Private m_bLayerOk As Boolean
@@ -414,7 +434,7 @@ Public Class DrawPanelVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_bLayerOk = value m_bLayerOk = value
OnPropertyChanged("bLayerOk") OnPropertyChanged(NameOf(bLayerOk))
End Set End Set
End Property End Property
Private m_bSelOk As Boolean Private m_bSelOk As Boolean
@@ -424,7 +444,7 @@ Public Class DrawPanelVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_bSelOk = value m_bSelOk = value
OnPropertyChanged("bSelOk") OnPropertyChanged(NameOf(bSelOk))
End Set End Set
End Property End Property
Private m_bLayerOkAndSelOk As Boolean Private m_bLayerOkAndSelOk As Boolean
@@ -434,7 +454,7 @@ Public Class DrawPanelVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_bLayerOkAndSelOk = value m_bLayerOkAndSelOk = value
OnPropertyChanged("bLayerOkAndSelOk") OnPropertyChanged(NameOf(bLayerOkAndSelOk))
End Set End Set
End Property End Property
@@ -455,6 +475,8 @@ Public Class DrawPanelVM
Private m_cmdPolygonSide As ICommand Private m_cmdPolygonSide As ICommand
Private m_cmdText As ICommand Private m_cmdText As ICommand
Private m_cmdLinDim As ICommand Private m_cmdLinDim As ICommand
Private m_cmdAngDim As ICommand
Private m_cmdDiamRadDim As ICommand
Private m_cmdModifyCurve As ICommand Private m_cmdModifyCurve As ICommand
Private m_cmdAddPointCurve As ICommand Private m_cmdAddPointCurve As ICommand
Private m_cmdPlane As ICommand Private m_cmdPlane As ICommand
@@ -466,6 +488,7 @@ Public Class DrawPanelVM
Private m_cmdMergeSurf As ICommand Private m_cmdMergeSurf As ICommand
Private m_cmdExplodeSurf As ICommand Private m_cmdExplodeSurf As ICommand
Private m_cmdApproxSurf As ICommand Private m_cmdApproxSurf As ICommand
Private m_cmdMoveStmVertexFacet As ICommand
Private m_cmdExtractSurfFacet As ICommand Private m_cmdExtractSurfFacet As ICommand
Private m_cmdInvertSurf As ICommand Private m_cmdInvertSurf As ICommand
Private m_cmdExtractLoops As ICommand Private m_cmdExtractLoops As ICommand
@@ -476,6 +499,7 @@ Public Class DrawPanelVM
Private m_cmdIntersectSurfSurf As ICommand Private m_cmdIntersectSurfSurf As ICommand
Private m_cmdDelete As ICommand Private m_cmdDelete As ICommand
Private m_cmdChangeLayer As ICommand Private m_cmdChangeLayer As ICommand
Private m_cmdChangeStatus As ICommand
Private m_cmdChangeAlpha As ICommand Private m_cmdChangeAlpha As ICommand
Private m_cmdResetColor As ICommand Private m_cmdResetColor As ICommand
Private m_cmdChangeColor As ICommand Private m_cmdChangeColor As ICommand
@@ -714,7 +738,11 @@ Public Class DrawPanelVM
''' Execute the Arc3P. This method is invoked by the Arc3PCommand. ''' Execute the Arc3P. This method is invoked by the Arc3PCommand.
''' </summary> ''' </summary>
Public Sub Arc3P(ByVal param As Object) 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 Sub
#End Region ' Arc3PCommand #End Region ' Arc3PCommand
@@ -737,13 +765,13 @@ Public Class DrawPanelVM
''' Execute the ArcPDP. This method is invoked by the ArcPDPCommand. ''' Execute the ArcPDP. This method is invoked by the ArcPDPCommand.
''' </summary> ''' </summary>
Public Sub ArcPDP(ByVal param As Object) Public Sub ArcPDP(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPVP)
Map.refProjectVM.GetController.SetContinue() ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
End If Map.refProjectVM.GetController.SetContinue()
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
Else Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPVP) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
End If End If
End Sub End Sub
@@ -872,6 +900,60 @@ Public Class DrawPanelVM
#End Region ' LinearDimensionCommand #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" #Region "ModifyCurve"
''' <summary> ''' <summary>
@@ -1195,6 +1277,33 @@ Public Class DrawPanelVM
#End Region ' ApproxSurfCommand #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" #Region "ExtractSurfFacetCommand"
''' <summary> ''' <summary>
@@ -1438,6 +1547,41 @@ Public Class DrawPanelVM
#End Region ' ChangeLayerCommand #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" #Region "ChangeAlphaCommand"
''' <summary> ''' <summary>
+96 -1
View File
@@ -161,6 +161,18 @@
<DependentUpon>CurrSetUpV.xaml</DependentUpon> <DependentUpon>CurrSetUpV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="CurrSetUp\CurrSetUpVM.vb" /> <Compile Include="CurrSetUp\CurrSetUpVM.vb" />
<Compile Include="EgtColorPicker\EgtColorPickerV.xaml.vb">
<DependentUpon>EgtColorPickerV.xaml</DependentUpon>
</Compile>
<Compile Include="EgtManageFileDialog\EgtManageFileDialogV.xaml.vb">
<DependentUpon>EgtManageFileDialogV.xaml</DependentUpon>
</Compile>
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
<Compile Include="LeftTray\LeftTrayV.xaml.vb"> <Compile Include="LeftTray\LeftTrayV.xaml.vb">
<DependentUpon>LeftTrayV.xaml</DependentUpon> <DependentUpon>LeftTrayV.xaml</DependentUpon>
</Compile> </Compile>
@@ -170,6 +182,9 @@
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon> <DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpander.vb" /> <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"> <Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfFinishingParameterExpanderV.xaml.vb">
<DependentUpon>SurfFinishingParameterExpanderV.xaml</DependentUpon> <DependentUpon>SurfFinishingParameterExpanderV.xaml</DependentUpon>
</Compile> </Compile>
@@ -188,6 +203,9 @@
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\StoneDrillingParameterExpanderV.xaml.vb"> <Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\StoneDrillingParameterExpanderV.xaml.vb">
<DependentUpon>StoneDrillingParameterExpanderV.xaml</DependentUpon> <DependentUpon>StoneDrillingParameterExpanderV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfRoughingParameterExpanderV.xaml.vb">
<DependentUpon>SurfRoughingParameterExpanderV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml.vb"> <Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml.vb">
<DependentUpon>WoodDrillingParameterExpanderV.xaml</DependentUpon> <DependentUpon>WoodDrillingParameterExpanderV.xaml</DependentUpon>
</Compile> </Compile>
@@ -419,7 +437,6 @@
<DependentUpon>GunStockWndV.xaml</DependentUpon> <DependentUpon>GunStockWndV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Special-GunStock\GunStockWndVM.vb" /> <Compile Include="Special-GunStock\GunStockWndVM.vb" />
<Compile Include="Utility\TMDbParamVisibility.vb" />
<Compile Include="StructureDataForMessenger.vb" /> <Compile Include="StructureDataForMessenger.vb" />
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\DispositionParameterExpander\DispositionUtility.vb" /> <Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\DispositionParameterExpander\DispositionUtility.vb" />
<Compile Include="ToolsDbWindow\ToolsUpdate.vb" /> <Compile Include="ToolsDbWindow\ToolsUpdate.vb" />
@@ -450,6 +467,18 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="EgtColorPicker\EgtColorPickerV.xaml">
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="EgtManageFileDialog\EgtManageFileDialogV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EstimationsDetailsWnd\EstimationsDetailsWndV.xaml"> <Page Include="EstimationsDetailsWnd\EstimationsDetailsWndV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -466,6 +495,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </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"> <Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\SurfFinishingParameterExpanderV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -490,6 +523,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </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"> <Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\WoodDrillingParameterExpanderV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -1002,6 +1039,64 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\EgtCAM5_64.ico" /> <Resource Include="Resources\EgtCAM5_64.ico" />
</ItemGroup> </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\EgtMessageBox\Error.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Information.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Question.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Warning.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtDialog\Folder.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtDialog\New.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtDialog\Restore.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtDialog\Root.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Asterisk.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Exclamation.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Hand.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\AboutBox\EgalwareLogo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Egalware.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
+266
View File
@@ -0,0 +1,266 @@
<EgtWPFLib5:EgtCustomWindow x:Class="EgtColorPickerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding sTitle}"
WindowStartupLocation="CenterOwner"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="32"
IsMinimizable="False" ShowInTaskbar="False"
Width="750" Height="450"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TabControl>
<TabItem Header="{Binding BasicColor_Msg}">
<Grid HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColors}"
SelectedItem="{Binding SelColor}"
HorizontalAlignment="Center"
BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20"
Height="20"
Margin="2"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding Fill}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</TabItem>
<TabItem Header="{Binding ColorPicker_Msg}">
<TabItem.Resources>
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
<Setter Property="BorderThickness" Value="1.5"/>
<Setter Property="BorderBrush" Value="White"/>
</Style>
</TabItem.Resources>
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
SelectedItem="{Binding sHexSelColor}"
Orientation="Vertical"
Margin="2.5"
RowCount="13"
ColumnCount="13"
Height="300"
Width="350"
Style="{StaticResource EgtHexList}">
<EgtWPFLib5:EgtHexList.ItemTemplate>
<DataTemplate/>
</EgtWPFLib5:EgtHexList.ItemTemplate>
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
<Style TargetType="EgtWPFLib5:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
<Setter Property="Background" Value="{Binding Background}"/>
</Style>
</EgtWPFLib5:EgtHexList.ItemContainerStyle>
</EgtWPFLib5:EgtHexList>
</TabItem>
<TabItem Header="{Binding ColorPickerTheme_Msg}">
<Grid HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding BasicColorsTheme}"
SelectedItem="{Binding SelColorTheme}"
BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20"
Height="20"
Margin="2"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding Fill}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Column="1"
Margin="5,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding CustomColor_Msg}"
Margin="5,18,5,10"
Style="{StaticResource DialogWindow_TextBlock}"/>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding CustomColors}"
SelectedItem="{Binding SelCustomColor}"
HorizontalAlignment="Center"
BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="13"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Width="20"
Height="20"
Margin="2"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding Fill}"/>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
<Grid Grid.Row="2"
Margin="0,20,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Margin="0,10,5,0"
HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Width="100"
Height="70"
Stroke="Black"
StrokeThickness="0.5"
Fill="{Binding CurrColor}"/>
<Button x:Name="SaveColor"
Grid.Row="1"
Margin="0,10,0,0"
Content="{Binding AddCColor_Msg}"
Command="{Binding SaveColor_Command}"
Style="{StaticResource LeftPanel_TextButton}"/>
</Grid>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Red_Msg}"
Margin="0,10,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
HorizontalAlignment="Right"
Margin="0,10,5,0"
IsReadOnly="False"
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="1"
Text="{Binding Green_Msg}"
Margin="5,5,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="1"
HorizontalAlignment="Right"
Margin="5,5,5,0"
IsReadOnly="False"
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="2"
Text="{Binding Blu_Msg}"
Margin="5,5,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="2"
HorizontalAlignment="Right"
Margin="5,5,5,0"
IsReadOnly="False"
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ColorPicker_TextBox}"/>
<TextBlock Grid.Row="3"
Text="{Binding Hexadecimal_Msg}"
Margin="5,5,5,0"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Grid.Row="3"
HorizontalAlignment="Right"
Margin="5,5,5,0"
Text="{Binding Hexadecimal}"
Style="{StaticResource ColorPicker_TextBox}"/>
</Grid>
</Grid>
</Grid>
</Grid>
<UniformGrid Grid.Row="2"
Rows="1"
Margin="10,10,10,0">
<Button IsDefault="True"
Content="OK"
Command="{Binding Ok_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
+68
View File
@@ -0,0 +1,68 @@
Imports System.Windows.Forms
Imports EgtWPFLib5
Public Class EgtColorPickerV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
Private Shadows DialogResult As DialogResult
Public Property CustomColors As Integer()
Get
Return m_EgtColorPickerVM.GetCustomColors()
End Get
Set(value As Integer())
m_EgtColorPickerVM.SetCustomColors(value)
End Set
End Property
Public Property Color As System.Drawing.Color
Get
Return System.Drawing.Color.FromArgb(255, CInt(m_EgtColorPickerVM.Red), CInt(m_EgtColorPickerVM.Green), CInt(m_EgtColorPickerVM.Blue))
End Get
Set(value As System.Drawing.Color)
m_EgtColorPickerVM.Red = CStr(value.R)
m_EgtColorPickerVM.Green = CStr(value.G)
m_EgtColorPickerVM.Blue = CStr(value.B)
End Set
End Property
#End Region ' Fields & Properties
#Region "CONTRUCTORS"
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
MyBase.New(Owner)
InitializeComponent()
Me.DataContext = EtgColorPickerVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtColorPickerVM = EtgColorPickerVM
End Sub
#End Region ' Constructors
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
Me.DialogResult = CType(DialogResult, DialogResult)
Me.Close()
End Sub
#End Region ' Events
#Region "METHODS"
''' <summary>
''' Apre una finestra EgtColorPicker
''' </summary>
''' <returns></returns>
Public Overloads Function ShowDialog() As DialogResult
MyBase.ShowDialog()
Return Me.DialogResult
End Function
#End Region ' Methods
End Class
@@ -0,0 +1,400 @@
<EgtWPFLib5:EgtCustomWindow x:Class="EgtManageFileDialogV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding sTitle}"
WindowStartupLocation="CenterOwner"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="32"
IsMinimizable="False" ShowInTaskbar="False"
Height="500" Width="800"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding GoBack_Command}"
Style="{StaticResource RightPanel_Button}">
<Image Source="\Resources\EgtDialog\Restore.png"
Style="{StaticResource Button_Image}"/>
</Button>
<TextBlock Grid.Column="1"
Margin="5"
Text="{Binding sSelPath}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ComboBox Grid.Column="2"
HorizontalAlignment="Right"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding ViewModeList}"
SelectedItem="{Binding SelViewMode}"
Margin="2.5,5,2.5,5"
Style="{StaticResource RightPanel_ComboBox}"/>
</Grid>
<Grid Grid.Row="1"
Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions>
<TreeView x:Name="FileTree"
ItemsSource="{Binding RootList}"
Margin="10"
FontSize="15"
BorderBrush="White">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
ItemsSource="{Binding TreeItemList_View}">
<StackPanel Orientation="Horizontal">
<Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/>
<TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</StackPanel>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
<StackPanel Orientation="Horizontal">
<Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/>
<TextBlock Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</StackPanel>
</DataTemplate>
</TreeView.Resources>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
<TabControl Grid.Column="1"
Background="Transparent"
BorderBrush="White"
BorderThickness="0"
SelectedIndex="{Binding nSelTab}">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="LISTBOX">
<ListBox x:Name="FileList"
Grid.Row="1"
Margin="5,5,5,5"
BorderBrush="White"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
<ListBox.Resources>
<DataTemplate x:Key="ListTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Margin="5,5,5,0"
Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Height="15"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="TilesTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Margin="5,5,5,0"
Height="50"
Width="250">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1"
Rows="3"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
Text="{Binding sName}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding ghTypeItem}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
Text="{Binding sDimension}"
HorizontalAlignment="Left"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>
</DataTemplate>
<DataTemplate x:Key="ContentTemplateView"
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<Grid Margin="5,5,5,0"
Height="50">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Style="{StaticResource Button_Image}"/>
<UniformGrid Grid.Column="1"
Rows="2"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sName}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding ghTypeItem}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
<UniformGrid Grid.Column="2"
Rows="2"
Margin="2.5,0,2.5,5">
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sLastModifyDate}"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBlock TextAlignment="Left"
HorizontalAlignment="Left"
Text="{Binding sDimension}"
Style="{StaticResource DialogWindow_TextBlock}"/>
</UniformGrid>
</Grid>
<Border Grid.Row="1"
BorderThickness="1"
BorderBrush="LightGray"/>
</Grid>
</DataTemplate>
</ListBox.Resources>
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtDirectory}">
<ContentControl Content="{Binding}">
<ContentControl.Style>
<Style TargetType="{x:Type ContentControl}">
<Style.Triggers>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="0">
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
</DataTrigger>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="1">
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
</DataTrigger>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="2">
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick"/>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.Style>
<Style TargetType="{x:Type ListBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
Value="0">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
Value="1">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
Value="2">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"
HorizontalAlignment="Stretch"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</ListBox.Style>
</ListBox>
</TabItem>
<TabItem Header="DATAGRID">
<DataGrid AutoGenerateColumns="False"
IsReadOnly="True"
HeadersVisibility="Column"
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
SelectedItem="{Binding ItemSelected}">
<!-- ColumnHeaderStyle="{StaticResource DataGridColumnHeader}"
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"-->
<DataGrid.Columns>
<DataGridTemplateColumn Width="5*">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Margin="2.5,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding sName}"
VerticalAlignment="Center"
Margin="2.5,0,0,0"/>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
Width="2*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding ghTypeItem}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sDimension}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
HorizontalAlignment="Left"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Right"/>
<Setter Property="Padding" Value="12,6,12,6"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGrid.InputBindings>
</DataGrid>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Row="2"
Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Margin="5,5,5,5"
Text="{Binding FileName_Msg}"
HorizontalAlignment="Right"
Style="{StaticResource DialogWindow_TextBlock}"/>
<TextBox Grid.Column="1"
Margin="2.5,2.5,2.5,5"
TextAlignment="Left"
HorizontalAlignment="Stretch"
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Style="{StaticResource ParameterList_TextBox}"/>
<ComboBox Grid.Column="2"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding FilterList}"
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
DisplayMemberPath="sNameExstension"
HorizontalAlignment="Right"
Margin="10,2.5,2.5,5"
Style="{StaticResource RightPanel_ComboBox}"/>
</Grid>
<UniformGrid Grid.Row="3"
Rows="1"
Margin="2.5,0,2.5,0">
<Button IsDefault="True"
Content="OK"
Command="{Binding Ok_Command}"
HorizontalAlignment="Right"
Margin="15,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,141 @@
Imports System.Windows.Forms
Imports EgtWPFLib5
Public Class EgtManageFileDialogV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
Private Shadows DialogResult As DialogResult
''' <summary>
''' Stringa che specifica il titolo da mostrare
''' </summary>
Public Overloads Property Title As String
Get
Return m_EgtManageFileDialogVM.sTitle
End Get
Set(value As String)
m_EgtManageFileDialogVM.sTitle = value
End Set
End Property
Public Property Filter As String
Get
Return m_EgtManageFileDialogVM.sFilter
End Get
Set(value As String)
m_EgtManageFileDialogVM.sFilter = value
End Set
End Property
Public Property InitialDirectory As String
Get
Return m_EgtManageFileDialogVM.sInitialDirectory
End Get
Set(value As String)
m_EgtManageFileDialogVM.sInitialDirectory = value
End Set
End Property
Public Property SafeFileName As String
Get
Return m_EgtManageFileDialogVM.sSaveFileName
End Get
Set(value As String)
m_EgtManageFileDialogVM.sSaveFileName = value
End Set
End Property
Public Property FileName As String
Get
Return m_EgtManageFileDialogVM.sFileName
End Get
Set(value As String)
m_EgtManageFileDialogVM.sFileName = value
End Set
End Property
Public Property FilterIndex As Integer
Get
Return m_EgtManageFileDialogVM.nFilterIndex
End Get
Set(value As Integer)
m_EgtManageFileDialogVM.nFilterIndex = value
End Set
End Property
Public Property Mode As Integer
Get
Return m_EgtManageFileDialogVM.nMode
End Get
Set(value As Integer)
m_EgtManageFileDialogVM.nMode = value
End Set
End Property
Public Property CheckFileExists As Boolean
Get
Return m_EgtManageFileDialogVM.bCheckFileExists
End Get
Set(value As Boolean)
m_EgtManageFileDialogVM.bCheckFileExists = value
End Set
End Property
Public Property ValidateNames As Boolean
Get
Return m_EgtManageFileDialogVM.bValidateNames
End Get
Set(value As Boolean)
m_EgtManageFileDialogVM.bValidateNames = value
End Set
End Property
Public Property OverwritePrompt As Boolean
Get
Return m_EgtManageFileDialogVM.bOverwritePrompt
End Get
Set(value As Boolean)
m_EgtManageFileDialogVM.bOverwritePrompt = value
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Owner As Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
MyBase.New(Owner)
InitializeComponent()
Me.DataContext = EgtManageFileDialogVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtManageFileDialogVM = EgtManageFileDialogVM
End Sub
#End Region
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
#End Region
#Region "METHODS"
Public Overloads Function ShowDialog() As DialogResult
MyBase.ShowDialog()
Return Me.DialogResult
End Function
Private Sub ListBoxItem_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
m_EgtManageFileDialogVM.MouseDoubleClick()
End Sub
#End Region ' METHODS
End Class
+49
View File
@@ -0,0 +1,49 @@
<EgtWPFLib5:EgtCustomWindow x:Class="EgtMessageBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding sTitle}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="32"
IsMinimizable="False" ShowInTaskbar="False"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="20,20,20,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Margin="0,0,0,0"/>
<TextBlock Grid.Column="1"
Text="{Binding sMessage}"
Margin="5,0,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding ButtonList}"
HorizontalAlignment="Center">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button IsDefault="{Binding bIsDefault}"
Content="{Binding sMessage}"
Command="{Binding Command_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
+109
View File
@@ -0,0 +1,109 @@
Imports EgtWPFLib5
Public Class EgtMessageBoxV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
Private Shadows DialogResult As MessageBoxResult
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = EgtMessageBoxVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtMessageBoxVM = EgtMessageBoxVM
End Sub
#End Region
#Region "METHODS"
''' <summary>
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
#End Region ' METHODS
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
#End Region
End Class
@@ -1,14 +1,14 @@
<EgtWPFLib5:EgtCustomWindow x:Class="EstimationsDetailsWndV" <EgtWPFLib5:EgtCustomWindow x:Class="EstimationsDetailsWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding TitleMsg}" Title="{Binding TitleMsg}"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}" Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="32" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="32"
Width="300" Height="300" Width="300" Height="300"
IsResizable="True" IsResizable="True"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"> IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
<WebBrowser Name="EstimationsWebBrowser" Margin="10"/> <WebBrowser Name="EstimationsWebBrowser" Margin="10"/>
</EgtWPFLib5:EgtCustomWindow> </EgtWPFLib5:EgtCustomWindow>
@@ -16,16 +16,12 @@ Public Class EstimationsDetailsWndVM
Public ReadOnly Property TitleMsg As String Public ReadOnly Property TitleMsg As String
Get Get
Return EgtMsg(MSG_SIMULATION + 44) ' Estimation details Return EgtMsg(5344) ' Estimation details
End Get End Get
End Property End Property
#End Region ' Messages #End Region ' Messages
' Definizione comandi
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
#End Region 'FIELDS & PROPERTIES #End Region 'FIELDS & PROPERTIES
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -36,8 +32,4 @@ Public Class EstimationsDetailsWndVM
#End Region ' CONSTRUCTOR #End Region ' CONSTRUCTOR
#Region "METHODS"
#End Region ' METHODS
End Class End Class
+1 -1
View File
@@ -6,7 +6,7 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}" <Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom"> Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom">
<Button.ContextMenu> <Button.ContextMenu>
<ContextMenu ItemsSource="{Binding MruScriptNames}" ItemContainerStyle="{StaticResource MruScriptItem}"> <ContextMenu ItemsSource="{Binding MruScriptNames}" ItemContainerStyle="{StaticResource MruScriptItem}">
</ContextMenu> </ContextMenu>
+1 -1
View File
@@ -32,7 +32,7 @@ Public Class ExecutePanelVM
Public ReadOnly Property ExecToolTip As String Public ReadOnly Property ExecToolTip As String
Get Get
Return EgtMsg(MSG_TOPCOMMANDBAR + 8) Return EgtMsg(5108) ' Esegui Script<br/>Esegui Script recenti (Tasto Destro)
End Get End Get
End Property End Property
+7 -7
View File
@@ -1,25 +1,25 @@
<UserControl x:Class="GridPanelV" <UserControl x:Class="GridPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel Background="Transparent" Orientation="Horizontal"> <StackPanel Background="Transparent" Orientation="Horizontal">
<Button Command="{Binding CPlaneTopCommand}" ToolTip="{Binding CPlaneTopToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlaneTopCommand}" ToolTip="{Binding CPlaneTopToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneTOP.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneTOP.png" Stretch="Uniform"/>
</Button> </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}"> <Button Command="{Binding CPlaneFrontCommand}" ToolTip="{Binding CPlaneFrontToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneFRONT.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneFRONT.png" Stretch="Uniform"/>
</Button> </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}"> <Button Command="{Binding CPlaneBackCommand}" ToolTip="{Binding CPlaneBackToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneBACK.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneBACK.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding CPlaneLeftCommand}" ToolTip="{Binding CPlaneLeftToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlaneLeftCommand}" ToolTip="{Binding CPlaneLeftToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneLEFT.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneLEFT.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding CPlaneBottomCommand}" ToolTip="{Binding CPlaneBottomToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlaneRightCommand}" ToolTip="{Binding CPlaneRightToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneBOTTOM.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneRIGHT.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding CPlaneElevationCommand}" ToolTip="{Binding CPlaneElevationToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlaneElevationCommand}" ToolTip="{Binding CPlaneElevationToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
+8 -13
View File
@@ -12,54 +12,49 @@ Public Class GridPanelVM
Private m_cmdCPlaneBack As ICommand Private m_cmdCPlaneBack As ICommand
Private m_cmdCPlaneLeft As ICommand Private m_cmdCPlaneLeft As ICommand
Private m_cmdCPlaneBottom As ICommand Private m_cmdCPlaneBottom As ICommand
Private m_cmdCPlaneView As ICommand
Private m_cmdCPlaneElevation As ICommand Private m_cmdCPlaneElevation As ICommand
Private m_cmdCPlaneOrigin 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" #Region "ToolTip"
Public ReadOnly Property CPlaneTopToolTip As String Public ReadOnly Property CPlaneTopToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 19) Return EgtMsg(5269) ' Griglia da Sopra
End Get End Get
End Property End Property
Public ReadOnly Property CPlaneFrontToolTip As String Public ReadOnly Property CPlaneFrontToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 20) Return EgtMsg(5270) ' Griglia di Fronte
End Get End Get
End Property End Property
Public ReadOnly Property CPlaneRightToolTip As String Public ReadOnly Property CPlaneRightToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 21) Return EgtMsg(5271) ' Griglia da Destra
End Get End Get
End Property End Property
Public ReadOnly Property CPlaneBackToolTip As String Public ReadOnly Property CPlaneBackToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 22) Return EgtMsg(5272) ' Griglia da Dietro
End Get End Get
End Property End Property
Public ReadOnly Property CPlaneLeftToolTip As String Public ReadOnly Property CPlaneLeftToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 23) Return EgtMsg(5273) ' Griglia da Sinistra
End Get End Get
End Property End Property
Public ReadOnly Property CPlaneBottomToolTip As String Public ReadOnly Property CPlaneBottomToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 24) Return EgtMsg(5274) ' Griglia da Sotto
End Get End Get
End Property End Property
Public ReadOnly Property CPlaneElevationToolTip As String Public ReadOnly Property CPlaneElevationToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 26) Return EgtMsg(5276) ' Elevazione Griglia
End Get End Get
End Property End Property
Public ReadOnly Property CPlaneOriginToolTip As String Public ReadOnly Property CPlaneOriginToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 27) Return EgtMsg(5277) ' Origine Griglia
End Get End Get
End Property End Property
+11 -13
View File
@@ -1,17 +1,15 @@
<EgtFloating:EgtFloatingPanel x:Class="InstrumentPanelV" <EgtFloating:EgtFloatingPanel x:Class="InstrumentPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False" IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False"
TitleBarOrientation="Horizontal"> TitleBarOrientation="Horizontal">
<!--<StackPanel Background="Transparent" Orientation="Horizontal">--> <ToggleButton ToolTip="{Binding AnalyzeToolTip}" Style="{StaticResource GridViewPanelToggleButton}" IsChecked="{Binding AnalyzeIsChecked}" IsEnabled="{Binding AnalyzeIsEnabled}">
<ToggleButton ToolTip="{Binding AnalyzeToolTip}" Style="{StaticResource GridViewPanelToggleButton}" IsChecked="{Binding AnalyzeIsChecked}" IsEnabled="{Binding AnalyzeIsEnabled}"> <Image Source="/Resources/GridViewPanel/Analyze.png" Stretch="Uniform"/>
<Image Source="/Resources/GridViewPanel/Analyze.png" Stretch="Uniform"/> </ToggleButton>
</ToggleButton> <ToggleButton ToolTip="{Binding GetDistToolTip}" Style="{StaticResource GridViewPanelToggleButton}" IsChecked="{Binding GetDistIsChecked}">
<ToggleButton ToolTip="{Binding GetDistToolTip}" Style="{StaticResource GridViewPanelToggleButton}" IsChecked="{Binding GetDistIsChecked}"> <Image Source="/Resources/GridViewPanel/GetDist.png" Stretch="Uniform"/>
<Image Source="/Resources/GridViewPanel/GetDist.png" Stretch="Uniform"/> </ToggleButton>
</ToggleButton>
<!--</StackPanel>-->
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
+5 -5
View File
@@ -9,12 +9,12 @@ Public Class InstrumentPanelVM
Public ReadOnly Property AnalyzeToolTip As String Public ReadOnly Property AnalyzeToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 17) Return EgtMsg(5267) ' Analizza
End Get End Get
End Property End Property
Public ReadOnly Property GetDistToolTip As String Public ReadOnly Property GetDistToolTip As String
Get Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 18) Return EgtMsg(5268) ' Distanza
End Get End Get
End Property End Property
@@ -37,7 +37,7 @@ Public Class InstrumentPanelVM
Analyze.EraseAnalyzeGroup() Analyze.EraseAnalyzeGroup()
EgtDraw() EgtDraw()
End If End If
OnPropertyChanged("AnalyzeIsChecked") OnPropertyChanged(NameOf(AnalyzeIsChecked))
End If End If
End Set End Set
End Property End Property
@@ -50,7 +50,7 @@ Public Class InstrumentPanelVM
Set(value As Boolean) Set(value As Boolean)
If value <> m_AnalyzeIsEnabled Then If value <> m_AnalyzeIsEnabled Then
m_AnalyzeIsEnabled = value m_AnalyzeIsEnabled = value
OnPropertyChanged("AnalyzeIsEnabled") OnPropertyChanged(NameOf(AnalyzeIsEnabled))
End If End If
End Set End Set
End Property End Property
@@ -70,7 +70,7 @@ Public Class InstrumentPanelVM
Map.refProjectVM.GetScene.ResetStatusGetDistance() Map.refProjectVM.GetScene.ResetStatusGetDistance()
Map.refStatusBarVM.NotifyStatusOutput(String.Empty) Map.refStatusBarVM.NotifyStatusOutput(String.Empty)
End If End If
OnPropertyChanged("GetDistIsChecked") OnPropertyChanged(NameOf(GetDistIsChecked))
End If End If
End Set End Set
End Property End Property
+53 -26
View File
@@ -1,8 +1,4 @@
Imports System.Collections.ObjectModel Imports System.IO
Imports System.IO
Imports EgtCAM5.MyMachinePanelVM
Imports System.Security.Cryptography
Imports System.Windows.Forms.AxHost
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
@@ -72,7 +68,8 @@ Public Class MyMachGroupPanelVM
' se la lista gruppi è vuota creo un nuovo gruppo ' se la lista gruppi è vuota creo un nuovo gruppo
If MachGroupList.Count = 0 Then If MachGroupList.Count = 0 Then
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA ' 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 'If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then ' Vuoi creare un nuovo Gruppo di Lavoro<br/>con i pezzi selezionati ? Sicuro di voler cancellare il Gruppo di Lavorazione?
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1) Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
Else Else
Return -2 Return -2
@@ -96,9 +93,10 @@ Public Class MyMachGroupPanelVM
' altrimenti creo il primo gruppo ' altrimenti creo il primo gruppo
Else Else
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA ' 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 'If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then ' Vuoi creare un nuovo Gruppo di Lavoro<br/>con i pezzi selezionati ? Sicuro di voler cancellare il Gruppo di Lavorazione?
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1) Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
Else Else
Return -2 Return -2
End If End If
End If End If
@@ -106,7 +104,10 @@ Public Class MyMachGroupPanelVM
Else Else
' se ci sono gruppi di lavorazione ' se ci sono gruppi di lavorazione
If bMachGroup Then If bMachGroup Then
nGroupId = EgtGetLastMachGroup() nGroupId = EgtGetCurrMachGroup()
If nGroupId = GDB_ID.NULL Then
nGroupId = EgtGetFirstMachGroup()
End If
Return If(EgtSetCurrMachGroup(nGroupId), 0, 1) Return If(EgtSetCurrMachGroup(nGroupId), 0, 1)
' se altrimenti ammessi gruppi di lavoro vuoti ' se altrimenti ammessi gruppi di lavoro vuoti
ElseIf bAllowEmpty Then ElseIf bAllowEmpty Then
@@ -118,13 +119,16 @@ Public Class MyMachGroupPanelVM
End If End If
End Function 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") EgtLuaCreateGlobTable("DISP")
EgtLuaSetGlobIntVar("DISP.GROUPID", nGroupId) EgtLuaSetGlobIntVar("DISP.GROUPID", nGroupId)
EgtLuaSetGlobIntVar("DISP.PARTID", nPartId) EgtLuaSetGlobIntVar("DISP.PARTID", nPartId)
EgtLuaSetGlobIntVar("DISP.IND", nInd)
EgtLuaSetGlobStringVar("DISP.PARTS", sParts)
If Not EgtLuaExecFile(sScriptPath) Then If Not EgtLuaExecFile(sScriptPath) Then
EgtOutLog("Error executing disposition init script " & sScriptPath) EgtOutLog("Error executing disposition init script " & sScriptPath)
MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 2) & " " & sScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 2) & " " & sScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5462) & " " & sScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore nella esecuzione dello script automatico di disposizione ERRORE DI ESECUZIONE SCRIPT
Return False Return False
End If End If
Dim nErr As Integer = 999 Dim nErr As Integer = 999
@@ -164,10 +168,25 @@ Public Class MyMachGroupPanelVM
If bWithScript Then If bWithScript Then
' Rendo corrente il gruppo di lavoro ' Rendo corrente il gruppo di lavoro
EgtSetCurrMachGroup(nGroupId) 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 Dim bOk As Boolean = True
sParts &= String.Join( ",", PartList)
For Each Part In 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 Next
Return bOk Return bOk
Else Else
@@ -196,14 +215,18 @@ Public Class MyMachGroupPanelVM
Return False Return False
End If End If
If bWithScript Then If bWithScript Then
' Creo grezzo e posiziono i pezzi
Dim bOk As Boolean = True Dim bOk As Boolean = True
For Each Part In PartList ' Creo grezzi e posiziono i pezzi
If Not ExecScript(sInitScriptPath, nGroupId, Part) Then bOk = False If PartList.Count() > 0 then
Next Dim nInd As Integer = 0
' Gestione ingresso senza pezzi Dim sParts As String = String.Join( ",", PartList)
If PartList.Count() = 0 Then For Each Part In PartList
If Not ExecScript(sInitScriptPath, nGroupId, GDB_ID.NULL) Then bOk = False 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 End If
If Not bOk Then If Not bOk Then
EgtResetCurrMachGroup() EgtResetCurrMachGroup()
@@ -282,7 +305,8 @@ Public Class MyMachGroupPanelVM
If Not String.IsNullOrEmpty(sDefaultSetUpName) Then If Not String.IsNullOrEmpty(sDefaultSetUpName) Then
If Not EgtImportSetup(String.Empty) Then If Not EgtImportSetup(String.Empty) Then
EgtOutLog("Error loading default setup " & sDefaultSetUpName) EgtOutLog("Error loading default setup " & sDefaultSetUpName)
MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 9) & " " & sDefaultSetUpName, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 9) & " " & sDefaultSetUpName, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6479) & " " & sDefaultSetUpName, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore nel caricamento del setup Errore
End If End If
End If End If
End Sub End Sub
@@ -305,7 +329,7 @@ Public Class MyMachGroupPanelVM
Case Else Case Else
' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore ' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore
EgtWPFLib5.MachiningTreeViewItem.m_MatType = Nothing EgtWPFLib5.MachiningTreeViewItem.m_MatType = Nothing
MsgBox(EgtMsg(31409), MsgBoxStyle.Exclamation, EgtMsg(31551)) MsgBox(EgtMsg(31409), MsgBoxStyle.Exclamation, EgtMsg(31551)) ' Errore
End Select End Select
End Sub End Sub
@@ -349,7 +373,8 @@ Public Class MyMachGroupPanelVM
Dim nSelectedMachGroupIndex As Integer = MachGroupList.IndexOf(SelectedMachGroup) Dim nSelectedMachGroupIndex As Integer = MachGroupList.IndexOf(SelectedMachGroup)
If nSelectedMachGroupIndex = 0 And MachGroupList.Count = 1 Then If nSelectedMachGroupIndex = 0 And MachGroupList.Count = 1 Then
' chiedo conferma prima di cancellare il gruppo di lavorazione ' chiedo conferma prima di cancellare il gruppo di lavorazione
Select Case MessageBox.Show(EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question) 'Select Case MessageBox.Show(EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5502), "", MessageBoxButton.YesNo, MessageBoxImage.Question) ' Sicuro di voler cancellare il Gruppo di Lavorazione?
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
' cancello il gruppo corrente ' cancello il gruppo corrente
EgtRemoveMachGroup(EgtGetMachGroupId(MachGroupList(nSelectedMachGroupIndex).Name)) EgtRemoveMachGroup(EgtGetMachGroupId(MachGroupList(nSelectedMachGroupIndex).Name))
@@ -362,7 +387,8 @@ Public Class MyMachGroupPanelVM
End Select End Select
Else Else
' chiedo conferma prima di cancellare il gruppo di lavorazione ' chiedo conferma prima di cancellare il gruppo di lavorazione
Select Case MessageBox.Show(EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question) 'Select Case MessageBox.Show(EgtMsg(MSG_MACHGROUP + 2), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5502), "", MessageBoxButton.YesNo, MessageBoxImage.Question) ' Sicuro di voler cancellare il Gruppo di Lavorazione?
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
Dim nNewInd As Integer = -1 Dim nNewInd As Integer = -1
If nSelectedMachGroupIndex = 0 And MachGroupList.Count > 1 Then If nSelectedMachGroupIndex = 0 And MachGroupList.Count > 1 Then
@@ -397,10 +423,11 @@ Public Class MyMachGroupPanelVM
Map.refOperationsListExpanderVM.LoadOperationList(GDB_ID.NULL) Map.refOperationsListExpanderVM.LoadOperationList(GDB_ID.NULL)
Map.refMachinePanelVM.UpdateCurrentMachine() Map.refMachinePanelVM.UpdateCurrentMachine()
Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList() Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
Map.refEstimationsExpanderVM.Estimation_IsEnabled = Map.refEstimationsExpanderVM.Estimation_IsEnabled = (EgtUILib.GetPrivateProfileInt(S_ESTIMATIONS, K_EST_ENABLE, 0, IniFile.m_sCurrMachIniFilePath) <> 0)
(EgtUILib.GetPrivateProfileInt(S_ESTIMATIONS, K_EST_ENABLE, 0, IniFile.m_sCurrMachIniFilePath) <> 0)
' Setto il Materiale in base alla Macchina associata al MachGroup corrente ' Setto il Materiale in base alla Macchina associata al MachGroup corrente
LoadMaterialType() LoadMaterialType()
' Zoom all
EgtZoom( ZM.ALL)
End If End If
Return True Return True
+19 -13
View File
@@ -1,14 +1,14 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MachOptionV" <EgtWPFLib5:EgtCustomWindow x:Class="MachOptionV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5" xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico" Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarBrush="{StaticResource EgaltechBlue1}"
BorderBrush="{StaticResource EgaltechBlue1}" BorderBrush="{StaticResource EgaltechBlue1}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding CloseMachOptionsCommand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" SizeToContent="WidthAndHeight"> CloseCommand="{Binding CloseMachOptionsCommand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" SizeToContent="WidthAndHeight">
<EgtWPFLib5:EgtCustomWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<local:SplitArcTypeConverter x:Key="SplitArcTypeConverter"/> <local:SplitArcTypeConverter x:Key="SplitArcTypeConverter"/>
@@ -27,6 +27,7 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5"> <UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5">
@@ -56,12 +57,17 @@
</ComboBox> </ComboBox>
</UniformGrid> </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"/> <TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0" <ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0"
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/> SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</EgtWPFLib5:EgtCustomWindow> </EgtWPFLib5:EgtCustomWindow>
+33 -9
View File
@@ -48,6 +48,21 @@ Public Class MachOptionVM
End Set End Set
End Property 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}) 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) Public ReadOnly Property SplitArcsList As List(Of MCH_SA)
Get Get
@@ -91,31 +106,36 @@ Public Class MachOptionVM
Public ReadOnly Property SafeZMsg As String Public ReadOnly Property SafeZMsg As String
Get Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 1) Return EgtMsg(6401) ' Z di sicurezza
End Get End Get
End Property End Property
Public ReadOnly Property SafeAggrBottZMsg As String Public ReadOnly Property SafeAggrBottZMsg As String
Get Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 8) Return EgtMsg(6408) ' Sicurezza rinvio da sotto
End Get End Get
End Property End Property
Public ReadOnly Property HolesToleranceMsg As String Public ReadOnly Property HolesToleranceMsg As String
Get Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9) Return EgtMsg(6409) ' Tolleranza fori
End Get
End Property
Public ReadOnly Property ApproxLinTolMsg As String
Get
Return EgtMsg(6410) ' Tolleranza di approssimazione
End Get End Get
End Property End Property
Public ReadOnly Property SplitArcsMsg As String Public ReadOnly Property SplitArcsMsg As String
Get Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 2) Return EgtMsg(6402) ' Spezzatura archi
End Get End Get
End Property End Property
Public ReadOnly Property DefaultSetUpMsg As String Public ReadOnly Property DefaultSetUpMsg As String
Get Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7) Return EgtMsg(6407) ' Attrezzaggio predefinito
End Get End Get
End Property End Property
@@ -141,6 +161,10 @@ Public Class MachOptionVM
Dim nVal As Integer = 0 Dim nVal As Integer = 0
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal) EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA) 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 ' Riempio lista attrezzaggi salvati
m_ArchivedSetUpList.Add(String.Empty) m_ArchivedSetUpList.Add(String.Empty)
If Directory.Exists(IniFile.m_sCurrMachSetUpDirPath) Then If Directory.Exists(IniFile.m_sCurrMachSetUpDirPath) Then
@@ -202,13 +226,13 @@ Public Class SplitArcTypeConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value) Select Case CInt(value)
Case MCH_SA.NEVER Case MCH_SA.NEVER
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 3) Return EgtMsg(6403) ' Mai
Case MCH_SA.GEN_PLANE Case MCH_SA.GEN_PLANE
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 4) Return EgtMsg(6404) ' Piano generico
Case MCH_SA.NO_XY_PLANE Case MCH_SA.NO_XY_PLANE
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 5) Return EgtMsg(6405) ' Piano diverso da XY
Case Else Case Else
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 6) Return EgtMsg(6406) ' Sempre
End Select End Select
End Function End Function
+11 -11
View File
@@ -7,14 +7,14 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<!--Combobox per selezionare la macchina corrente--> <!--Combobox per selezionare la macchina corrente-->
<ComboBox ItemsSource="{Binding Path=MachinesList}" DisplayMemberPath="Name" <ComboBox ItemsSource="{Binding Path=MachinesList}" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name" SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Height="22" Width="150" IsEnabled="{Binding MachineListIsEnabled}" Margin="2,0"/> Height="22" Width="150" IsEnabled="{Binding MachineListIsEnabled}" Margin="2,0"/>
<Button Content="{Binding ToolDBMsg}" <Button Content="{Binding ToolDBMsg}"
Command="{Binding ToolDbCommand}" Command="{Binding ToolDbCommand}"
IsEnabled="{Binding ToolDb_IsEnabled}" IsEnabled="{Binding ToolDb_IsEnabled}"
Width="55" Width="55"
ToolTip="{Binding ToolDBToolTip}" ToolTip="{Binding ToolDBToolTip}"
Style="{StaticResource GridViewPanelButton}"/> Style="{StaticResource GridViewPanelButton}"/>
<Button Content="{Binding MachiningDbMsg}" <Button Content="{Binding MachiningDbMsg}"
Command="{Binding MachDbCommand}" Command="{Binding MachDbCommand}"
IsEnabled="{Binding MachDb_IsEnabled}" IsEnabled="{Binding MachDb_IsEnabled}"
@@ -28,10 +28,10 @@
ToolTip="{Binding SetUpDbToolTip}" ToolTip="{Binding SetUpDbToolTip}"
Style="{StaticResource GridViewPanelButton}"/> Style="{StaticResource GridViewPanelButton}"/>
<Button Command="{Binding MachOptionsCommand}" <Button Command="{Binding MachOptionsCommand}"
ToolTip="{Binding MachOptionsToolTip}"> ToolTip="{Binding MachOptionsToolTip}">
<Image Source="/Resources/MachinePanel/MachineOptions.png" <Image Source="/Resources/MachinePanel/MachineOptions.png"
Height="22" /> Height="22" />
</Button> </Button>
</StackPanel> </StackPanel>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
+32 -43
View File
@@ -64,8 +64,7 @@ Public Class MyMachinePanelVM
IniFile.m_sCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools" IniFile.m_sCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
IniFile.m_sCurrMachSetUpDirPath = m_SelectedMachine.MachineDirPath & "\SetUp" IniFile.m_sCurrMachSetUpDirPath = m_SelectedMachine.MachineDirPath & "\SetUp"
IniFile.m_sCurrMachScriptsDirPath = m_SelectedMachine.MachineDirPath & "\Scripts" IniFile.m_sCurrMachScriptsDirPath = m_SelectedMachine.MachineDirPath & "\Scripts"
UpdateToolAndMachDbParamVisibility() NotifyPropertyChanged(NameOf(SelectedMachine))
NotifyPropertyChanged("SelectedMachine")
End If End If
End If End If
End Set End Set
@@ -78,7 +77,7 @@ Public Class MyMachinePanelVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_MachineListIsEnabled = value m_MachineListIsEnabled = value
NotifyPropertyChanged("MachineListIsEnabled") NotifyPropertyChanged(NameOf(MachineListIsEnabled))
End Set End Set
End Property End Property
@@ -97,17 +96,17 @@ Public Class MyMachinePanelVM
Public ReadOnly Property ToolDBMsg As String Public ReadOnly Property ToolDBMsg As String
Get Get
Return EgtMsg(MSG_MAINWINDOW + 6) Return EgtMsg(5006) ' Db Ut.
End Get End Get
End Property End Property
Public ReadOnly Property MachiningDbMsg As String Public ReadOnly Property MachiningDbMsg As String
Get Get
Return EgtMsg(MSG_MAINWINDOW + 7) Return EgtMsg(5007) ' Db Lav.
End Get End Get
End Property End Property
Public ReadOnly Property SetUpDbMsg As String Public ReadOnly Property SetUpDbMsg As String
Get Get
Return EgtMsg(MSG_MAINWINDOW + 9) Return EgtMsg(5009) ' Db Att.
End Get End Get
End Property End Property
@@ -117,22 +116,22 @@ Public Class MyMachinePanelVM
Public ReadOnly Property ToolDBToolTip As String Public ReadOnly Property ToolDBToolTip As String
Get Get
Return EgtMsg(MSG_MAINWINDOW + 3) Return EgtMsg(5003) ' Db Utensili
End Get End Get
End Property End Property
Public ReadOnly Property MachiningDbToolTip As String Public ReadOnly Property MachiningDbToolTip As String
Get Get
Return EgtMsg(MSG_MAINWINDOW + 4) Return EgtMsg(5004) ' Db Lavorazioni
End Get End Get
End Property End Property
Public ReadOnly Property SetUpDbToolTip As String Public ReadOnly Property SetUpDbToolTip As String
Get Get
Return EgtMsg(MSG_MAINWINDOW + 10) Return EgtMsg(5010) ' Db Attrezzaggio
End Get End Get
End Property End Property
Public ReadOnly Property MachOptionsToolTip As String Public ReadOnly Property MachOptionsToolTip As String
Get Get
Return EgtMsg(MSG_MAINWINDOW + 8) Return EgtMsg(5008) ' Opzioni Macchina
End Get End Get
End Property End Property
@@ -209,7 +208,8 @@ Public Class MyMachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa) ' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtTdbReload() Then If Not EgtTdbReload() Then
EgtOutLog("Impossible reloading tool Db") EgtOutLog("Impossible reloading tool Db")
MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6130), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Impossibile ricaricare il database utensili. Se la cartella delle macchine è su un server, verificare che la connessione sia attiva. Errore
Return Return
End If End If
@@ -232,15 +232,10 @@ Public Class MyMachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa) ' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtTdbReload() Then If Not EgtTdbReload() Then
EgtOutLog("Impossible reloading tool Db") EgtOutLog("Impossible reloading tool Db")
MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6130), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Impossibile ricaricare il database utensili. Se la cartella delle macchine è su un server, verificare che la connessione sia attiva. Errore
Return Return
End If End If
'Dim ToolDbWindow As New ToolsDbV
'ToolDbWindow.Height = 640
'ToolDbWindow.Width = 1024
'ToolDbWindow.DataContext = New ToolsDbVM
'ToolDbWindow.Owner = Application.Current.MainWindow
'ToolDbWindow.ShowDialog()
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & IniFile.m_sMachineName Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & IniFile.m_sMachineName
Dim ToolDbWindowVM As New MyToolDbWindowVM(sMachineDir, IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9) Dim ToolDbWindowVM As New MyToolDbWindowVM(sMachineDir, IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9)
@@ -263,14 +258,15 @@ Public Class MyMachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa) ' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtMdbReload() Then If Not EgtMdbReload() Then
EgtOutLog("Impossible reloading machining Db") EgtOutLog("Impossible reloading machining Db")
MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6377), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Impossibile ricaricare database lavorazioni. Se la cartella delle macchine è su un server, verificare che la connessione sia attiva. Errore
Return Return
End If End If
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True) 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) Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
MachDbWindowV.Height = 794 '674 MachDbWindowV.Height = 800 '674
MachDbWindowV.Width = 1024 MachDbWindowV.Width = 1150 '1024
MachDbWindowV.Owner = Application.Current.MainWindow MachDbWindowV.Owner = Application.Current.MainWindow
MachDbWindowV.ShowDialog() MachDbWindowV.ShowDialog()
End If End If
@@ -284,16 +280,18 @@ Public Class MyMachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa) ' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtMdbReload() Then If Not EgtMdbReload() Then
EgtOutLog("Impossible reloading machining Db") EgtOutLog("Impossible reloading machining Db")
MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6377), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Impossibile ricaricare database lavorazioni. Se la cartella delle macchine è su un server, verificare che la connessione sia attiva. Errore
Return Return
End If End If
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True) 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) Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
MachDbWindowV.Height = 794 '674 MachDbWindowV.Height = 800 '674
MachDbWindowV.Width = 1024 MachDbWindowV.Width = 1150 '1024
MachDbWindowV.Owner = Application.Current.MainWindow MachDbWindowV.Owner = Application.Current.MainWindow
MachDbWindowV.ShowDialog() MachDbWindowV.ShowDialog()
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
End If End If
End Sub End Sub
@@ -308,7 +306,8 @@ Public Class MyMachinePanelVM
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista ' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
If Not File.Exists(IniFile.m_sCurrMachScriptsDirPath & "\" & SETUP_LUA) Then If Not File.Exists(IniFile.m_sCurrMachScriptsDirPath & "\" & SETUP_LUA) Then
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ") EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6477), EgtMsg(6471), MessageBoxButton.OK, MessageBoxImage.Error) ' Il file di configurazione non esiste! Errore
Return Return
End If End If
' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato, ' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato,
@@ -327,7 +326,8 @@ Public Class MyMachinePanelVM
EgtLuaGetGlobIntVar("STU.ERR", nErr) EgtLuaGetGlobIntVar("STU.ERR", nErr)
If nErr = 0 Then If nErr = 0 Then
If EgtGetHeadExitCount(sHead) = 0 Then If EgtGetHeadExitCount(sHead) = 0 Then
MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6478), EgtMsg(6471), MessageBoxButton.OK, MessageBoxImage.Error) ' L'attrezzaggio usa una testa che non esiste sulla macchina! Errore
Return Return
End If End If
End If End If
@@ -357,11 +357,10 @@ Public Class MyMachinePanelVM
''' Execute the Exec. This method is invoked by the ExecCommand. ''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary> ''' </summary>
Public Overrides Sub MachOptions(ByVal param As Object) Public Overrides Sub MachOptions(ByVal param As Object)
Dim MachOptionWindow As New MachOptionV Dim MachOptionWindow As New MachOptionV With {
'MachOptionWindow.Height = 614 .DataContext = New MachOptionVM,
'MachOptionWindow.Width = 256 .Owner = Application.Current.MainWindow
MachOptionWindow.DataContext = New MachOptionVM }
MachOptionWindow.Owner = Application.Current.MainWindow
MachOptionWindow.ShowDialog() MachOptionWindow.ShowDialog()
End Sub End Sub
@@ -379,7 +378,7 @@ Public Class MyMachinePanelVM
If String.IsNullOrWhiteSpace(IniFile.m_sMachinesRoot) OrElse If String.IsNullOrWhiteSpace(IniFile.m_sMachinesRoot) OrElse
Not Directory.Exists(IniFile.m_sMachinesRoot) OrElse Directory.GetDirectories(IniFile.m_sMachinesRoot).Count = 0 Then Not Directory.Exists(IniFile.m_sMachinesRoot) OrElse Directory.GetDirectories(IniFile.m_sMachinesRoot).Count = 0 Then
IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW
EgtOutLog(EgtMsg(MSG_STATUSBAR + 1)) EgtOutLog(EgtMsg(6801)) ' Direttorio Machines non trovato. EgtCAM5 funzionerà in modo solo CAD.
Return Return
End If End If
' Cerco le macchine ' Cerco le macchine
@@ -389,7 +388,7 @@ Public Class MyMachinePanelVM
Next Next
If m_MachinesList.Count = 0 Then If m_MachinesList.Count = 0 Then
IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW
EgtOutLog(EgtMsg(MSG_STATUSBAR + 1)) EgtOutLog(EgtMsg(6801)) ' Direttorio Machines non trovato. EgtCAM5 funzionerà in modo solo CAD.
Return Return
End If End If
End Sub End Sub
@@ -447,14 +446,4 @@ Public Class MyMachinePanelVM
End Class End Class
Private Sub UpdateToolAndMachDbParamVisibility()
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWINGONARCS, 0, IniFile.m_sCurrMachIniFilePath) <> 0 Then
Sawing(39) = Visibility.Visible ' StepExtArc
Sawing(40) = Visibility.Visible ' StepIntArc
Else
Sawing(39) = Visibility.Collapsed ' StepExtArc
Sawing(40) = Visibility.Collapsed ' StepIntArc
End If
End Sub
End Class End Class
+63 -127
View File
@@ -1,85 +1,22 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MyMachiningDbV" <EgtWPFLib5:EgtCustomWindow x:Class="MyMachiningDbV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
xmlns:local="clr-namespace:EgtCAM5" TitleBarBrush="{StaticResource EgaltechBlue1}"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" BorderBrush="{StaticResource EgaltechBlue1}"
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
TitleBarBrush="{StaticResource EgaltechBlue1}" IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
BorderBrush="{StaticResource EgaltechBlue1}" CloseCommand="{Binding CloseMachiningsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False" CloseCommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}">
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
CloseCommand="{Binding CloseMachiningsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}">
<EgtWPFLib5:EgtCustomWindow.InputBindings> <EgtWPFLib5:EgtCustomWindow.InputBindings>
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}" <KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/> CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/>
</EgtWPFLib5:EgtCustomWindow.InputBindings> </EgtWPFLib5:EgtCustomWindow.InputBindings>
<EgtWPFLib5:EgtCustomWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/> <EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
<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="OverLap">47</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SelectedSolChoiceType">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="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>
</EgtWPFLib5:EgtCustomWindow.Resources> </EgtWPFLib5:EgtCustomWindow.Resources>
<Grid> <Grid>
@@ -89,71 +26,70 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="11*"/> <RowDefinition Height="11*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="3"> <UniformGrid Grid.Row="0" Columns="3">
<Button Content="New" Command="{Binding NewCommand}" <Button Content="New" Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"/> IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"/>
<Button Content="Save" Command="{Binding SaveCommand}" <Button Content="Save" Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"/> IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"/>
<Button Content="Remove" Command="{Binding RemoveCommand}" <Button Content="Remove" Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/> IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/>
</UniformGrid> </UniformGrid>
<TreeView Name="MachiningsTreeView" Grid.Row="1" <TreeView Name="MachiningsTreeView" Grid.Row="1"
ItemsSource="{Binding Path=MachiningsList}"> ItemsSource="{Binding Path=MachiningsList}">
<TreeView.ItemContainerStyle> <TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}"> <Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" /> <Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style> </Style>
</TreeView.ItemContainerStyle> </TreeView.ItemContainerStyle>
<TreeView.Resources> <TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}"> <HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}">
<Grid > <Grid >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" /> <Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" /> <TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
</Grid> </Grid>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}"> <DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
<Grid > <Grid >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />--> <TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="18" FontSize="15" Margin="10"/>
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="18" FontSize="15" Margin="10"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</TreeView.Resources> </TreeView.Resources>
</TreeView> </TreeView>
</Grid> </Grid>
<ContentControl Content="{Binding ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
<ContentControl Content="{Binding ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
</Grid> </Grid>
</EgtWPFLib5:EgtCustomWindow> </EgtWPFLib5:EgtCustomWindow>
+12 -12
View File
@@ -1,16 +1,16 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV" <EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:local="clr-namespace:EgtCAM5" xmlns:local="clr-namespace:EgtCAM5"
Title="{Binding Title}" Icon="{Binding IconSource}" Title="{Binding Title}" Icon="{Binding IconSource}"
TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32" TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32"
BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2" BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2"
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize" MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
AboutBoxCommand="{Binding AboutBoxCommand}" AboutBoxCommand="{Binding AboutBoxCommand}"
AllowDrop="True" Drop="MainWindow_Drop" AllowDrop="True" Drop="MainWindow_Drop"
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"> CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<EgtWPFLib5:EgtCustomWindow.TitlePanel> <EgtWPFLib5:EgtCustomWindow.TitlePanel>
<local:TopCommandBarV DataContext="{StaticResource TopCommandBarViewModel}"/> <local:TopCommandBarV DataContext="{StaticResource TopCommandBarViewModel}"/>
</EgtWPFLib5:EgtCustomWindow.TitlePanel> </EgtWPFLib5:EgtCustomWindow.TitlePanel>
+1 -2
View File
@@ -1,5 +1,4 @@
Imports System.ComponentModel Imports EgtWPFLib5
Imports EgtWPFLib5
Class MainWindowV Class MainWindowV
Inherits EgtCustomWindow Inherits EgtCustomWindow
+42 -36
View File
@@ -1,7 +1,4 @@
Imports System.Collections.ObjectModel Imports System.Threading
Imports System.Threading
Imports System.Windows.Threading
Imports System.Runtime.InteropServices
Imports System.Math Imports System.Math
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
@@ -41,7 +38,7 @@ Public Class MainWindowVM
Set(value As String) Set(value As String)
If value <> m_Title Then If value <> m_Title Then
m_Title = value m_Title = value
OnPropertyChanged("Title") OnPropertyChanged(NameOf(Title))
End If End If
End Set End Set
End Property End Property
@@ -61,8 +58,9 @@ Public Class MainWindowVM
Public ReadOnly Property TopCommandBar As TopCommandBarV Public ReadOnly Property TopCommandBar As TopCommandBarV
Get Get
If IsNothing(m_TopCommandBar) Then If IsNothing(m_TopCommandBar) Then
m_TopCommandBar = New TopCommandBarV m_TopCommandBar = New TopCommandBarV With {
m_TopCommandBar.DataContext = New TopCommandBarVM .DataContext = New TopCommandBarVM
}
End If End If
Return m_TopCommandBar Return m_TopCommandBar
End Get End Get
@@ -75,8 +73,9 @@ Public Class MainWindowVM
Get Get
If m_bfirst Then If m_bfirst Then
m_bfirst = False m_bfirst = False
m_StatusBar = New StatusBarV m_StatusBar = New StatusBarV With {
m_StatusBar.DataContext = New MyStatusBarVM .DataContext = New MyStatusBarVM
}
End If End If
Return m_StatusBar Return m_StatusBar
End Get End Get
@@ -88,8 +87,9 @@ Public Class MainWindowVM
Get Get
If m_bFirstProjectPage Then If m_bFirstProjectPage Then
m_bFirstProjectPage = False m_bFirstProjectPage = False
m_ProjectPage = New ProjectV m_ProjectPage = New ProjectV With {
m_ProjectPage.DataContext = New ProjectVM .DataContext = New ProjectVM
}
End If End If
Return m_ProjectPage Return m_ProjectPage
End Get End Get
@@ -97,11 +97,11 @@ Public Class MainWindowVM
Public ReadOnly Property IconSource As String Public ReadOnly Property IconSource As String
Get Get
#If PLATFORM = "x64" Then #If PLATFORM = "x64" Then
Return "/Resources/EgtCAM5_64.ico" Return "/Resources/EgtCAM5_64.ico"
#else #Else
Return "/Resources/EgtCAM5.ico" Return "/Resources/EgtCAM5.ico"
#End If #End If
End Get End Get
End Property End Property
@@ -137,8 +137,9 @@ Public Class MainWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub AboutBox(ByVal param As Object) Public Sub AboutBox(ByVal param As Object)
Dim AboutBoxWindow As New AboutBoxWndV Dim AboutBoxWindow As New AboutBoxWndV With {
AboutBoxWindow.Owner = Application.Current.MainWindow .Owner = Application.Current.MainWindow
}
AboutBoxWindow.ShowDialog() AboutBoxWindow.ShowDialog()
End Sub End Sub
@@ -357,9 +358,6 @@ Public Class MainWindowVM
' Impostazione direttorio toolmakers ' Impostazione direttorio toolmakers
Dim sToolMakersDir As String = String.Empty Dim sToolMakersDir As String = String.Empty
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", sToolMakersDir) 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 If Not String.IsNullOrWhiteSpace(sToolMakersDir) Then
IniFile.m_sToolMakersDir = sToolMakersDir IniFile.m_sToolMakersDir = sToolMakersDir
Else Else
@@ -388,8 +386,8 @@ Public Class MainWindowVM
EgtSetLockId(sLockId) EgtSetLockId(sLockId)
End If End If
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2511, 1, IniFile.m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(3279, 2703, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2511, 1, IniFile.m_nKeyOptions) EgtGetKeyOptions(3279, 2703, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore ' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1)) IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto abilitazione lavorazioni avanzate ' Imposto abilitazione lavorazioni avanzate
@@ -403,7 +401,7 @@ Public Class MainWindowVM
IniFile.m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", IniFile.m_nInstance.ToString()) IniFile.m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", IniFile.m_nInstance.ToString())
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & IniFile.m_nInstance.ToString() & " 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 My.Application.Info.Title.ToString() & " ver. " & m_sVersion
EgtInit(m_nDebug, IniFile.m_sLogFile, sLogMsg) EgtInit(m_nDebug, IniFile.m_sLogFile, sLogMsg)
EgtSetOnTerminateProcess( m_OnTerminateProcessCallback) EgtSetOnTerminateProcess( m_OnTerminateProcessCallback)
@@ -425,7 +423,14 @@ Public Class MainWindowVM
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir) GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", OptionModule.m_sFontText) GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", OptionModule.m_sFontText)
EgtSetFont(sNfeDir, 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 Dim sBtlAuxDir As String = String.Empty
GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir) GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
EgtSetBtlAuxDir(sBtlAuxDir) EgtSetBtlAuxDir(sBtlAuxDir)
@@ -433,16 +438,6 @@ Public Class MainWindowVM
Dim sThreeJSLibDir As String = String.Empty Dim sThreeJSLibDir As String = String.Empty
GetPrivateProfileString(S_EXPORT, K_THREEJSLIBDIR, "", sThreeJSLibDir) GetPrivateProfileString(S_EXPORT, K_THREEJSLIBDIR, "", sThreeJSLibDir)
EgtSetThreeJSLibDir(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 ' Imposto direttorio temporaneo a EgtInterface
EgtSetTempDir(m_sTempDir) EgtSetTempDir(m_sTempDir)
' Imposto IniFile a EgtInterface ' Imposto IniFile a EgtInterface
@@ -603,6 +598,18 @@ Public Class MainWindowVM
' pulisco output ' pulisco output
Map.refStatusBarVM.NotifyStatusOutput("") Map.refStatusBarVM.NotifyStatusOutput("")
Map.refInputExpanderVM.ResetInputBox() 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 If
End Sub End Sub
@@ -615,12 +622,11 @@ Public Class MainWindowVM
''' </summary> ''' </summary>
Private m_allowWindowToClose As Boolean = False Private m_allowWindowToClose As Boolean = False
#End Region #End Region
#Region "MEF Plugin" #Region "MEF Plugin"
Private m_Loader As MEFLoader = New MEFLoader() Private m_Loader As New MEFLoader()
Private Function GetPathByName(ByVal name As String) As String Private Function GetPathByName(ByVal name As String) As String
Dim PluginNameSplit() As String = name.Split("."c) Dim PluginNameSplit() As String = name.Split("."c)
+3 -3
View File
@@ -30,7 +30,7 @@ Imports System.Windows
#End If #End If
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtCAM5")> <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: AssemblyTrademark("")>
<Assembly: ComVisible(false)> <Assembly: ComVisible(false)>
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.11.2")> <Assembly: AssemblyVersion("2.7.3.1")>
<Assembly: AssemblyFileVersion("2.5.11.2")> <Assembly: AssemblyFileVersion("2.7.3.1")>
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}" <Expander IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
Style="{StaticResource ExpanderStyle}"> Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding PropertiesMsg}"/> <TextBlock Text="{Binding PropertiesMsg}"/>
</Expander.Header> </Expander.Header>
@@ -7,7 +7,7 @@ Public Class InfoExpanderVM
Public ReadOnly Property PropertiesMsg As String Public ReadOnly Property PropertiesMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 1) Return EgtMsg(5351) ' Proprietà
End Get End Get
End Property End Property
@@ -21,7 +21,7 @@ Public Class InfoExpanderVM
Set(value As Boolean) Set(value As Boolean)
If value <> m_IsExpanded Then If value <> m_IsExpanded Then
m_IsExpanded = value m_IsExpanded = value
OnPropertyChanged("IsEnabled") OnPropertyChanged(NameOf(IsEnabled))
End If End If
End Set End Set
End Property End Property
@@ -39,7 +39,7 @@ Public Class InfoExpanderVM
Else Else
IsEnabled = False IsEnabled = False
End If End If
OnPropertyChanged("InfoBox") OnPropertyChanged(NameOf(InfoBox))
End If End If
End Set End Set
End Property End Property
@@ -3,9 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}" <Expander Header="{Binding Title}" IsExpanded="{Binding IsExpanded}" IsEnabled="{Binding IsEnabled}"
Style="{StaticResource ExpanderStyle}"> Style="{StaticResource ExpanderStyle}">
<StackPanel> <StackPanel>
<StackPanel.Style> <!--<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}"> <Style TargetType="{x:Type StackPanel}">
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding FocusTextBox}" Value="True"> <DataTrigger Binding="{Binding FocusTextBox}" Value="True">
@@ -13,29 +13,78 @@
</DataTrigger> </DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</StackPanel.Style> </StackPanel.Style>-->
<TextBlock Text="{Binding TextBlock}" <TextBlock Text="{Binding TextBlock}"
Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/> Visibility="{Binding TextVisibility}" Margin="5,5,0,5"/>
<TextBox Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}" <Grid>
Visibility="{Binding TextVisibility}" Margin="5,0,5,5"> <Grid.ColumnDefinitions>
<TextBox.InputBindings> <ColumnDefinition Width="1*"/>
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/> <ColumnDefinition Width="Auto"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/> </Grid.ColumnDefinitions>
</TextBox.InputBindings> <TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
</TextBox> PreviewKeyDown="TextBox_PreviewKeyDown" Height="Auto"
Visibility="{Binding TextVisibility}" Margin="5,0,5,5" IsEnabled="True" Focusable="True" >
<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="Collapsed"
Width="20"
Height="20"
Margin="5,-1,5,0"
VerticalAlignment="Top"/>
<!--Visibility="{Binding ShowInfoItemVisibility}"-->
</Grid>
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}" <CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/> Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}" <ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding ComboVisibility}" Margin="5,0,5,5"/> Visibility="{Binding ComboVisibility}" Margin="5,5,5,5"/>
<ItemsControl ItemsSource="{Binding InfoList}"
Visibility="{Binding InfoVisibility}"
Margin="5,5,0,10">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Key}"
Width="70"
Margin="0,6,-15,0"/>
<TextBox Grid.Column="1"
Text="{Binding Valour, UpdateSourceTrigger=PropertyChanged}"
Margin="0,5,5,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="5,-2,5,5"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Margin="5,0,5,5"> <Grid Margin="5,0,5,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}" <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" <Button Command="{Binding DoneCommand}" Grid.Column="1"
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/> Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
</Expander> </Expander>
@@ -1,3 +1,24 @@
Public Class InputExpanderV Public Class InputExpanderV
Sub New()
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
'TextBoxFocus.Focus()
AddHandler Map.refInputExpanderVM.m_FocusOnTextBox, AddressOf FocusOnText
End Sub
Friend Sub FocusOnText()
Me.Txt.Focus()
End Sub
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If e.Key = Key.Enter And Keyboard.Modifiers = ModifierKeys.Shift Then
Txt.AcceptsReturn = True
Txt.TextWrapping = TextWrapping.Wrap
End If
End Sub
End Class End Class
@@ -1,11 +1,31 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports EgtUILib Imports EgtUILib
Imports MS.Internal
Public Class InputExpanderVM Public Class InputExpanderVM
Inherits ViewModelBase Inherits ViewModelBase
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
Friend Event m_FocusOnTextBox()
' 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("tmpInfoList")
End Set
End Property
' Expander fields ' Expander fields
Private m_IsExpanded As Boolean Private m_IsExpanded As Boolean
Public Property IsExpanded As Boolean Public Property IsExpanded As Boolean
@@ -14,7 +34,7 @@ Public Class InputExpanderVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_IsExpanded = value m_IsExpanded = value
OnPropertyChanged("IsExpanded") OnPropertyChanged(NameOf(IsExpanded))
End Set End Set
End Property End Property
@@ -25,7 +45,7 @@ Public Class InputExpanderVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_IsEnabled = value m_IsEnabled = value
OnPropertyChanged("IsEnabled") OnPropertyChanged(NameOf(IsEnabled))
End Set End Set
End Property End Property
@@ -36,7 +56,7 @@ Public Class InputExpanderVM
End Get End Get
Set(value As String) Set(value As String)
m_Title = value m_Title = value
OnPropertyChanged("Title") OnPropertyChanged(NameOf(Title))
End Set End Set
End Property End Property
@@ -48,7 +68,7 @@ Public Class InputExpanderVM
End Get End Get
Set(value As String) Set(value As String)
m_TextBlock = value m_TextBlock = value
OnPropertyChanged("TextBlock") OnPropertyChanged(NameOf(TextBlock))
End Set End Set
End Property End Property
@@ -61,7 +81,7 @@ Public Class InputExpanderVM
Set(value As String) Set(value As String)
m_TextBox = value m_TextBox = value
Map.refProjectVM.NotifyInputText(value) Map.refProjectVM.NotifyInputText(value)
OnPropertyChanged("TextBox") OnPropertyChanged(NameOf(TextBox))
End Set End Set
End Property End Property
@@ -73,7 +93,7 @@ Public Class InputExpanderVM
Set(value As Visibility) Set(value As Visibility)
If value <> m_TextVisibility Then If value <> m_TextVisibility Then
m_TextVisibility = value m_TextVisibility = value
OnPropertyChanged("TextVisibility") OnPropertyChanged(NameOf(TextVisibility))
End If End If
End Set End Set
End Property End Property
@@ -85,7 +105,7 @@ Public Class InputExpanderVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_FocusTextBox = value m_FocusTextBox = value
OnPropertyChanged("FocusTextBox") OnPropertyChanged(NameOf(FocusTextBox))
End Set End Set
End Property End Property
@@ -97,7 +117,7 @@ Public Class InputExpanderVM
End Get End Get
Set(value As String) Set(value As String)
m_CheckBoxText = value m_CheckBoxText = value
OnPropertyChanged("CheckBoxText") OnPropertyChanged(NameOf(CheckBoxText))
End Set End Set
End Property End Property
@@ -110,7 +130,7 @@ Public Class InputExpanderVM
If value <> m_IsChecked Then If value <> m_IsChecked Then
Map.refProjectVM.SetLastBoolean(value) Map.refProjectVM.SetLastBoolean(value)
m_IsChecked = value m_IsChecked = value
OnPropertyChanged("IsChecked") OnPropertyChanged(NameOf(IsChecked))
End If End If
End Set End Set
End Property End Property
@@ -123,7 +143,7 @@ Public Class InputExpanderVM
Set(value As Visibility) Set(value As Visibility)
If value <> m_CheckVisibility Then If value <> m_CheckVisibility Then
m_CheckVisibility = value m_CheckVisibility = value
OnPropertyChanged("CheckVisibility") OnPropertyChanged(NameOf(CheckVisibility))
End If End If
End Set End Set
End Property End Property
@@ -136,7 +156,21 @@ Public Class InputExpanderVM
End Get End Get
Set(value As ObservableCollection(Of String)) Set(value As ObservableCollection(Of String))
m_ComboItemsList = value m_ComboItemsList = value
OnPropertyChanged("ComboItemsList") OnPropertyChanged(NameOf(ComboItemsList))
End Set
End Property
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("InfoList")
End Set End Set
End Property End Property
@@ -146,9 +180,27 @@ Public Class InputExpanderVM
Return m_ComboSelectedIndex Return m_ComboSelectedIndex
End Get End Get
Set(value As Integer) Set(value As Integer)
Map.refProjectVM.SetLastInteger(value) If m_tmpbShow Then Map.refProjectVM.SetLastInteger(value)
m_ComboSelectedIndex = 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, m_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
OnPropertyChanged(NameOf(ComboSelectedIndex))
OnPropertyChanged("ComboItemsList")
OnPropertyChanged("InfoList")
End Set End Set
End Property End Property
@@ -160,7 +212,7 @@ Public Class InputExpanderVM
Set(value As Visibility) Set(value As Visibility)
If value <> m_ComboVisibility Then If value <> m_ComboVisibility Then
m_ComboVisibility = value m_ComboVisibility = value
OnPropertyChanged("ComboVisibility") OnPropertyChanged(NameOf(ComboVisibility))
End If End If
End Set End Set
End Property End Property
@@ -173,24 +225,58 @@ Public Class InputExpanderVM
End Get End Get
Set(value As Visibility) Set(value As Visibility)
m_ShowBtnVisibility = value 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("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("InfoVisibility")
End If
End Set End Set
End Property End Property
' Commands definition ' Commands definition
Private m_cmdShow As ICommand Private m_cmdShow As ICommand
Private m_cmdDone As ICommand Private m_cmdDone As ICommand
Private m_cmdShowInfoItem As ICommand
Private m_cmdRemoveInfoItem As ICommand
#Region "Messages" #Region "Messages"
Public ReadOnly Property ShowMsg As String Public ReadOnly Property ShowMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 14) Return EgtMsg(5364) ' Mostra
End Get End Get
End Property End Property
Public ReadOnly Property OkMsg As String Public ReadOnly Property OkMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 15) Return EgtMsg(5365) ' Conferma
End Get End Get
End Property End Property
@@ -257,6 +343,15 @@ Public Class InputExpanderVM
''' Execute the Point. This method is invoked by the PointCommand. ''' Execute the Point. This method is invoked by the PointCommand.
''' </summary> ''' </summary>
Public Sub Done(ByVal param As Object) Public Sub Done(ByVal param As Object)
' 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
Map.refProjectVM.Done(m_TextBox) Map.refProjectVM.Done(m_TextBox)
End Sub End Sub
@@ -269,23 +364,75 @@ Public Class InputExpanderVM
#End Region ' DoneCommand #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 #End Region
#Region "METHODS" #Region "METHODS"
Friend Sub FocusText()
RaiseEvent m_FocusOnTextBox()
End Sub
Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam) Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam)
Title = PrepareInputBoxParam.sTitle Title = PrepareInputBoxParam.sTitle
If PrepareInputBoxParam.sLabel <> "" Then If PrepareInputBoxParam.sLabel <> "" Then
TextBlock = PrepareInputBoxParam.sLabel TextBlock = PrepareInputBoxParam.sLabel
TextBox = "" TextBox = ""
TextVisibility = Visibility.Visible 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 il pulsante che mostra la lista delle info
ShowInfoItemVisibility = Visibility.Visible
' 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 ComboItemsList
ComboInfo()
End If
End If End If
If PrepareInputBoxParam.sCheckLabel <> "" Then If PrepareInputBoxParam.sCheckLabel <> "" Then
CheckBoxText = PrepareInputBoxParam.sCheckLabel CheckBoxText = PrepareInputBoxParam.sCheckLabel
CheckVisibility = Visibility.Visible CheckVisibility = Visibility.Visible
End If End If
If PrepareInputBoxParam.bShowCombo Then If PrepareInputBoxParam.bShowCombo Then
' Assegno a tmpbShow PrepareInputBoxParam.bShowCombo
m_tmpbShow = PrepareInputBoxParam.bShowCombo
' Pulisco la lista ComboItemsList
ComboItemsList.Clear() ComboItemsList.Clear()
' Pulisco la lista tmpInfoList
tmpInfoList.Clear()
' Pulisco la lista InfoList
InfoList.Clear()
ComboVisibility = Visibility.Visible ComboVisibility = Visibility.Visible
End If End If
If PrepareInputBoxParam.bShowBtn Then If PrepareInputBoxParam.bShowBtn Then
@@ -294,14 +441,17 @@ Public Class InputExpanderVM
IsEnabled = True IsEnabled = True
IsExpanded = True IsExpanded = True
FocusTextBox = True FocusTextBox = True
FocusText()
End Sub End Sub
Friend Sub ResetInputBox() Friend Sub ResetInputBox()
Title = EgtMsg(MSG_DRAWOPTION + 5) Title = EgtMsg(5355) ' Parametri di disegno
TextVisibility = Visibility.Collapsed TextVisibility = Visibility.Collapsed
CheckVisibility = Visibility.Collapsed CheckVisibility = Visibility.Collapsed
ComboVisibility = Visibility.Collapsed ComboVisibility = Visibility.Collapsed
ShowBtnVisibility = Visibility.Collapsed ShowBtnVisibility = Visibility.Collapsed
ShowInfoItemVisibility = Visibility.Collapsed
InfoVisibility = Visibility.Collapsed
IsExpanded = False IsExpanded = False
IsEnabled = False IsEnabled = False
End Sub End Sub
@@ -309,6 +459,7 @@ Public Class InputExpanderVM
Friend Function SetInputBoxText(ByVal sVal As String) As Boolean Friend Function SetInputBoxText(ByVal sVal As String) As Boolean
TextBox = sVal TextBox = sVal
FocusTextBox = True FocusTextBox = True
FocusText()
Return True Return True
End Function End Function
@@ -329,12 +480,44 @@ Public Class InputExpanderVM
Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean Private Function AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean) As Boolean
ComboItemsList.Add(sText) ComboItemsList.Add(sText)
If bSelected Then If bSelected Then
ComboSelectedIndex = ComboItemsList.Count - 1 ComboSelectedIndex = ComboItemsList.Count - 1
End If End If
Return True Return True
End Function 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)
End Sub
''' <summary>
''' Funzione che popola la lista ComboItemsList
''' </summary>
Private Sub ComboInfo()
'''''''''''''''''''''''''''''' Recuperare funzione egtgetallinfo quando sarà pronta
Dim val As Integer
If Not m_tmpbShow Then
For Ind As Integer = 0 To 6
val += Ind
tmpInfoList.Add(New InfoItem(Ind, "A" & +Ind, val.ToString()))
Next
For Each InfoItem As InfoItem In tmpInfoList
ComboItemsList.Add(InfoItem.sKey)
Next
End If
End Sub
#End Region ' Methods #End Region ' Methods
End Class End Class
@@ -69,7 +69,7 @@ Public Class LayerTreeViewItem
Return m_bOnOff Return m_bOnOff
End Get End Get
Set(value As Boolean) 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 If m_bOnOff <> value Then
m_bOnOff = value m_bOnOff = value
' se abilitato, eseguo operazione ' se abilitato, eseguo operazione
@@ -93,7 +93,7 @@ Public Class LayerTreeViewItem
EgtGetStatus(Node.Id, nStat) EgtGetStatus(Node.Id, nStat)
If value AndAlso nStat <> GDB_ST.ON_ Then If value AndAlso nStat <> GDB_ST.ON_ Then
EgtSetStatus(Node.Id, GDB_ST.ON_) 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) EgtSetStatus(Node.Id, GDB_ST.OFF)
End If End If
End If End If
@@ -115,7 +115,7 @@ Public Class LayerTreeViewItem
Public Sub SetHidden(bVal As Boolean) Public Sub SetHidden(bVal As Boolean)
If bVal <> m_bHidden Then If bVal <> m_bHidden Then
m_bHidden = bVal m_bHidden = bVal
NotifyPropertyChanged("IsHidden") NotifyPropertyChanged(Name(IsHidden))
End If End If
End Sub End Sub
@@ -127,7 +127,7 @@ Public Class LayerTreeViewItem
Set(value As String) Set(value As String)
If value <> m_sPictureString Then If value <> m_sPictureString Then
m_sPictureString = value m_sPictureString = value
NotifyPropertyChanged("PictureString") NotifyPropertyChanged(NameOf(PictureString))
End If End If
End Set End Set
End Property End Property
@@ -1,9 +1,9 @@
<UserControl x:Class="ManageLayerExpanderV" <UserControl x:Class="ManageLayerExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
xmlns:local="clr-namespace:EgtCAM5"> xmlns:local="clr-namespace:EgtCAM5">
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}"> <Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
@@ -20,11 +20,12 @@
<Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/> <Button Content="{Binding NewLayerMsg}" Command="{Binding NewLayerCommand}" Height="30"/>
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/> <Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
</UniformGrid> </UniformGrid>
<TreeView Name="LayerTreeView" MinHeight="150" MaxHeight="250" <TreeView x:Name="LayerTreeView" MinHeight="150" MaxHeight="250"
ItemsSource="{Binding Path=LayerList}" ItemsSource="{Binding Path=LayerList}"
VirtualizingStackPanel.IsVirtualizing = "True" SelectedItemChanged="LayerTreeView_SelectedItemChanged"
VirtualizingStackPanel.VirtualizationMode = "Recycling"> VirtualizingStackPanel.IsVirtualizing = "True"
VirtualizingStackPanel.VirtualizationMode = "Recycling">
<interactivity:Interaction.Triggers> <interactivity:Interaction.Triggers>
<interactivity:EventTrigger EventName="MouseDoubleClick"> <interactivity:EventTrigger EventName="MouseDoubleClick">
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/> <interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}"/>
@@ -50,18 +51,17 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0" <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"/> 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"/> <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"/> <TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0" Name="Pippo"/>
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" /> <Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
</Grid> </Grid>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
</TreeView.Resources> </TreeView.Resources>
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia <!--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> <TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}"> <Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
@@ -1,3 +1,10 @@
Public Class ManageLayerExpanderV Public Class ManageLayerExpanderV
Private Sub LayerTreeView_SelectedItemChanged(sender As Object, e As RoutedPropertyChangedEventArgs(Of Object))
If Not IsNothing(LayerTreeView.SelectedItem) Then
' Metti il focus sul TreeView e sul nodo
LayerTreeView.Focus()
End If
End Sub
End Class End Class
@@ -1,6 +1,6 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.Security.Cryptography
Imports EgtUILib Imports EgtUILib
Imports EgtCAM5.IniFile
Public Class ManageLayerExpanderVM Public Class ManageLayerExpanderVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -15,7 +15,7 @@ Public Class ManageLayerExpanderVM
End Get End Get
Set(value As String) Set(value As String)
m_HeaderName = value m_HeaderName = value
OnPropertyChanged("HeaderName") OnPropertyChanged(NameOf(HeaderName))
End Set End Set
End Property End Property
@@ -26,7 +26,7 @@ Public Class ManageLayerExpanderVM
End Get End Get
Set(value As SolidColorBrush) Set(value As SolidColorBrush)
m_HeaderColor = value m_HeaderColor = value
OnPropertyChanged("HeaderColor") OnPropertyChanged(NameOf(HeaderColor))
End Set End Set
End Property End Property
@@ -75,57 +75,57 @@ Public Class ManageLayerExpanderVM
Public ReadOnly Property NewPartMsg As String Public ReadOnly Property NewPartMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 2) Return EgtMsg(5352) ' Nuovo Pezzo
End Get End Get
End Property End Property
Public ReadOnly Property NewLayerMsg As String Public ReadOnly Property NewLayerMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 3) Return EgtMsg(5353) ' Nuovo Layer
End Get End Get
End Property End Property
Public ReadOnly Property ColorMsg As String Public ReadOnly Property ColorMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 4) Return EgtMsg(5354) ' Colore
End Get End Get
End Property End Property
Public ReadOnly Property SelectMsg As String Public ReadOnly Property SelectMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 6) Return EgtMsg(5356) ' Seleziona
End Get End Get
End Property End Property
Public ReadOnly Property DeselectMsg As String Public ReadOnly Property DeselectMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 7) Return EgtMsg(5357) ' Deseleziona
End Get End Get
End Property End Property
Public ReadOnly Property NameMsg As String Public ReadOnly Property NameMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 8) Return EgtMsg(5358) ' Nome
End Get End Get
End Property End Property
Public ReadOnly Property InfoMsg As String Public ReadOnly Property InfoMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 9) Return EgtMsg(5359) ' Info
End Get End Get
End Property End Property
Public ReadOnly Property RelocateMsg As String Public ReadOnly Property RelocateMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 10) Return EgtMsg(5360) ' Sposta
End Get End Get
End Property End Property
Public ReadOnly Property CopyMsg As String Public ReadOnly Property CopyMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 11) Return EgtMsg(5361) ' Copia
End Get End Get
End Property End Property
Public ReadOnly Property DeleteMsg As String Public ReadOnly Property DeleteMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 12) Return EgtMsg(5362) ' Elimina
End Get End Get
End Property End Property
Public ReadOnly Property SaveMsg As String Public ReadOnly Property SaveMsg As String
Get Get
Return EgtMsg(MSG_DRAWOPTION + 13) Return EgtMsg(5363) ' Salva
End Get End Get
End Property End Property
@@ -480,9 +480,8 @@ Public Class ManageLayerExpanderVM
' Se è un pezzo con lavorazioni, devo chiedere conferma della cancellazione ' Se è un pezzo con lavorazioni, devo chiedere conferma della cancellazione
If EgtIsPart(RightClickedTreeItemId) And EgtExistsInfo(RightClickedTreeItemId, GDB_SI_LIST) Then If EgtIsPart(RightClickedTreeItemId) And EgtExistsInfo(RightClickedTreeItemId, GDB_SI_LIST) Then
' Pezzo in lavorazione, vuoi cancellarlo lo stesso ? - Erase Confirm ' Pezzo in lavorazione, vuoi cancellarlo lo stesso ? - Erase Confirm
If MessageBox.Show(EgtMsg(MSG_DRAWOPTION + 17), EgtMsg(MSG_DRAWOPTION + 16), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then 'If MessageBox.Show(EgtMsg(MSG_DRAWOPTION + 17), EgtMsg(MSG_DRAWOPTION + 16), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then Return
Return If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5367), EgtMsg(5366), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then Return ' Pezzo in lavorazione, vuoi cancellarlo lo stesso ? Conferma Cancellazione
End If
End If End If
' Recupero Id vicino per prossimo selezionato in albero ' Recupero Id vicino per prossimo selezionato in albero
Dim nNewId As Integer = EgtGetNext(RightClickedTreeItemId) Dim nNewId As Integer = EgtGetNext(RightClickedTreeItemId)
@@ -528,7 +527,7 @@ Public Class ManageLayerExpanderVM
#Region "METHODS" #Region "METHODS"
Private WithEvents ObjTreeTimer As New System.Windows.Threading.DispatcherTimer 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_nObjTreeMenuId As Integer = GDB_ID.NULL
Private m_bEnableUpdateObjInObjTree As Boolean = True Private m_bEnableUpdateObjInObjTree As Boolean = True
@@ -679,7 +678,7 @@ Public Class ManageLayerExpanderVM
'se gruppo 'se gruppo
If nType = GDB_TY.GROUP Then If nType = GDB_TY.GROUP Then
AddGroupInObjTree(nId, nLevel, nMode, nDepth + 1, CurrNodColl) AddGroupInObjTree(nId, nLevel, nMode, nDepth + 1, CurrNodColl)
'se oggetto geometrico 'se oggetto geometrico
ElseIf nType >= GDB_TY.GEO_VECTOR Then ElseIf nType >= GDB_TY.GEO_VECTOR Then
Dim sTitle As String = String.Empty Dim sTitle As String = String.Empty
EgtGetTitle(nId, sTitle) EgtGetTitle(nId, sTitle)
@@ -808,7 +807,7 @@ Public Class ManageLayerExpanderVM
If Not IsNothing(tNode) Then If Not IsNothing(tNode) Then
If Not bMark Then LayerTreeViewItem.m_MarkOnSel = False If Not bMark Then LayerTreeViewItem.m_MarkOnSel = False
tNode.IsSelected = True tNode.IsSelected = True
tNode.NotifyPropertyChanged("IsSelected") tNode.NotifyPropertyChanged(NameOf(tNode.IsSelected))
If Not bMark Then LayerTreeViewItem.m_MarkOnSel = True If Not bMark Then LayerTreeViewItem.m_MarkOnSel = True
tNode.IsExpanded = True tNode.IsExpanded = True
m_nObjTreeOldId = nId m_nObjTreeOldId = nId
+4 -5
View File
@@ -1,10 +1,9 @@
<UserControl x:Class="DrawOptionPanelV" <UserControl x:Class="DrawOptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
<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 that contains the ManageLayerExpander-->
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/> <ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
<!--ContentPresenter that contains the InfoExpander--> <!--ContentPresenter that contains the InfoExpander-->
+16 -11
View File
@@ -1,15 +1,16 @@
Imports EgtUILib Public Class DrawOptionPanelVM
Public Class DrawOptionPanelVM
Inherits ViewModelBase Inherits ViewModelBase
Private m_InputExpanderVM As InputExpanderVM
' GRAPHICAL ELEMENTS ' GRAPHICAL ELEMENTS
Private m_ManageLayerExpander As ManageLayerExpanderV Private m_ManageLayerExpander As ManageLayerExpanderV
Public ReadOnly Property ManageLayerExpander As ContentControl Public ReadOnly Property ManageLayerExpander As ContentControl
Get Get
If IsNothing(m_ManageLayerExpander) Then If IsNothing(m_ManageLayerExpander) Then
m_ManageLayerExpander = New ManageLayerExpanderV m_ManageLayerExpander = New ManageLayerExpanderV With {
m_ManageLayerExpander.DataContext = New ManageLayerExpanderVM .DataContext = New ManageLayerExpanderVM
}
End If End If
Return m_ManageLayerExpander Return m_ManageLayerExpander
End Get End Get
@@ -19,8 +20,9 @@ Public Class DrawOptionPanelVM
Public ReadOnly Property InfoExpander As ContentControl Public ReadOnly Property InfoExpander As ContentControl
Get Get
If IsNothing(m_InfoExpander) Then If IsNothing(m_InfoExpander) Then
m_InfoExpander = New InfoExpanderV m_InfoExpander = New InfoExpanderV With {
m_InfoExpander.DataContext = New InfoExpanderVM .DataContext = New InfoExpanderVM
}
End If End If
Return m_InfoExpander Return m_InfoExpander
End Get End Get
@@ -30,8 +32,13 @@ Public Class DrawOptionPanelVM
Public ReadOnly Property InputExpander As ContentControl Public ReadOnly Property InputExpander As ContentControl
Get Get
If IsNothing(m_InputExpander) Then If IsNothing(m_InputExpander) Then
m_InputExpander = New InputExpanderV 'm_InputExpander = New InputExpanderV With {
m_InputExpander.DataContext = New InputExpanderVM ' .DataContext = New InputExpanderVM
'}
m_InputExpanderVM = New InputExpanderVM()
m_InputExpander = New InputExpanderV With {
.DataContext = m_InputExpanderVM
}
End If End If
Return m_InputExpander Return m_InputExpander
End Get End Get
@@ -49,12 +56,10 @@ Public Class DrawOptionPanelVM
#Region "METHODS" #Region "METHODS"
Friend Function InitDrawOptionPanel() As Boolean Friend Function InitDrawOptionPanel() As Boolean
'EgtZoom(ZM.ALL)
Return True Return True
End Function End Function
Friend Function ExitDrawOptionPanel() As Boolean Friend Function ExitDrawOptionPanel() As Boolean
Return True Return True
End Function End Function
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel Imports System.IO
Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
@@ -29,7 +28,7 @@ Public Class EstimationsExpanderVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
m_Estimation_IsEnabled = value m_Estimation_IsEnabled = value
NotifyPropertyChanged("Estimation_IsEnabled") NotifyPropertyChanged(NameOf(Estimation_IsEnabled))
End Set End Set
End Property End Property
@@ -55,7 +54,8 @@ Public Class EstimationsExpanderVM
' Verifico che il file esista ' Verifico che il file esista
If Not File.Exists(sEstFile) Then If Not File.Exists(sEstFile) Then
' File delle stime non trovato ' File delle stime non trovato
MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5318), EgtMsg(5315), MessageBoxButton.OK, MessageBoxImage.Warning) ' File delle stime non trovato AVVERTIMENTO
Return Return
End If End If
' Visualizzazione ' Visualizzazione
@@ -77,14 +77,14 @@ Public Class EstimationsExpanderVM
' Abilito la selezione di tutti i tipi di geometria ' Abilito la selezione di tutti i tipi di geometria
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.PARTCURVESANDSURFACES Map.refProjectVM.SceneSelMode = SceneSelModeOpt.PARTCURVESANDSURFACES
CalcEstimation() CalcEstimation()
NotifyPropertyChanged("Time") NotifyPropertyChanged(NameOf(Time))
NotifyPropertyChanged("CutLen") NotifyPropertyChanged(NameOf(CutLen))
m_Estimation_IsExpanded = True m_Estimation_IsExpanded = True
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
Map.refOperationsListExpanderVM.EstimationExpander_Get_IsExpanded(True) Map.refOperationsListExpanderVM.EstimationExpander_Get_IsExpanded(True)
NotifyPropertyChanged("Estimation_IsExpanded") NotifyPropertyChanged(NameOf(Estimation_IsExpanded))
Map.refMachiningOptionPanelVM.OnPropertyChanged("GenerateIsEnabled") Map.refMachiningOptionPanelVM.OnPropertyChanged(NameOf(Map.refMachiningOptionPanelVM.GenerateIsEnabled))
' disattivo database utensili, lavorazioni e setup se vado in stima ' disattivo database utensili, lavorazioni e setup se vado in stima
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(False, False, False) Map.refMachinePanelVM.ToolMachSetUpIsEnabled(False, False, False)
' disattivo MTable e SpecialPanel se vado in stima ' disattivo MTable e SpecialPanel se vado in stima
@@ -97,8 +97,8 @@ Public Class EstimationsExpanderVM
m_Estimation_IsExpanded = False m_Estimation_IsExpanded = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
Map.refOperationsListExpanderVM.EstimationExpander_Get_IsExpanded(False) Map.refOperationsListExpanderVM.EstimationExpander_Get_IsExpanded(False)
NotifyPropertyChanged("Estimation_IsExpanded") NotifyPropertyChanged(NameOf(Estimation_IsExpanded))
Map.refMachiningOptionPanelVM.OnPropertyChanged("GenerateIsEnabled") Map.refMachiningOptionPanelVM.OnPropertyChanged(NameOf(Map.refMachiningOptionPanelVM.GenerateIsEnabled))
' attivo database utensili, lavorazioni e setup se esco dalla stima ' attivo database utensili, lavorazioni e setup se esco dalla stima
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True) Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
' attivo MTable e SpecialPanel se esco dalla stima ' attivo MTable e SpecialPanel se esco dalla stima
@@ -115,7 +115,8 @@ Public Class EstimationsExpanderVM
If bAskSave Then If bAskSave Then
If String.IsNullOrEmpty(sCurrFilePath) OrElse EgtGetModified() Then If String.IsNullOrEmpty(sCurrFilePath) OrElse EgtGetModified() Then
' Il progetto deve essere salvato prima di poter essere generato. Vuoi farlo ? ' Il progetto deve essere salvato prima di poter essere generato. Vuoi farlo ?
If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then 'If MessageBox.Show(EgtMsg(MSG_SIMULATION + 31), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5331), EgtMsg(5315), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then ' Il progetto deve essere salvato prima della generazione CN. Vuoi farlo ? AVVERTIMENTO
' Abbandono ' Abbandono
bOk = False bOk = False
Else Else
@@ -130,7 +131,8 @@ Public Class EstimationsExpanderVM
Else Else
If String.IsNullOrEmpty(sCurrFilePath) Then If String.IsNullOrEmpty(sCurrFilePath) Then
' File delle stime non trovato ' File delle stime non trovato
MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show(EgtMsg(MSG_SIMULATION + 18), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5318), EgtMsg(5315), MessageBoxButton.OK, MessageBoxImage.Warning) ' File delle stime non trovato AVVERTIMENTO
bOk = False bOk = False
End If End If
End If End If
@@ -177,12 +179,17 @@ Public Class EstimationsExpanderVM
If Not bOk Then Return False If Not bOk Then Return False
' Calcolo della stima ' Calcolo della stima
If Not EgtEstimate(sEstFile, sInfo) Then 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() Dim sErr As String = EgtGetLastMachMgrErrorString()
sErr = sErr.Replace("Cnc", "Est") 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 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 End If
bOk = False bOk = False
End If End If
@@ -1,9 +1,7 @@
<UserControl x:Class="EstimationsExpanderV" <UserControl x:Class="EstimationsExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<StackPanel> <StackPanel>
<Expander Header="{Binding EstimationMsg}" <Expander Header="{Binding EstimationMsg}"
@@ -1,19 +1,13 @@
<UserControl x:Class="MachiningTreeExpanderV" <UserControl x:Class="MachiningTreeExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:local="clr-namespace:EgtCAM5">
xmlns:local="clr-namespace:EgtCAM5">
<Expander Header="{Binding MachListHdr}" IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}" <Expander Header="{Binding MachListHdr}" IsExpanded="{Binding IsEnabled}" IsEnabled="{Binding IsEnabled}"
Style="{StaticResource ExpanderStyle}"> Style="{StaticResource ExpanderStyle}">
<UniformGrid MaxHeight="300"> <UniformGrid MaxHeight="300">
<TreeView Name="MachiningsTreeView" Grid.Row="1" <TreeView Name="MachiningsTreeView" Grid.Row="1"
ItemsSource="{Binding Path=MachiningsList}"> ItemsSource="{Binding Path=MachiningsList}">
<!--<interactivity:Interaction.Triggers>
<interactivity:EventTrigger EventName="MouseDoubleClick">
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}" CommandParameter="{Binding ElementName=MachiningsTreeView,Path=SelectedItem}"/>
</interactivity:EventTrigger>
</interactivity:Interaction.Triggers>-->
<TreeView.InputBindings> <TreeView.InputBindings>
<KeyBinding Key="Escape" Command="{Binding CancelNewCommand}" CommandParameter="Escape"/> <KeyBinding Key="Escape" Command="{Binding CancelNewCommand}" CommandParameter="Escape"/>
</TreeView.InputBindings> </TreeView.InputBindings>
@@ -34,7 +28,7 @@
</Grid> </Grid>
<!--Assegna ai nodi ToolItem lo Style normale dei TreeViewItem, eliminando l'ombra, data dal <!--Assegna ai nodi ToolItem lo Style normale dei TreeViewItem, eliminando l'ombra, data dal
multibinding quando sono attivi.--> multibinding quando sono attivi.-->
<HierarchicalDataTemplate.ItemContainerStyle> <HierarchicalDataTemplate.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}" > <Style TargetType="{x:Type TreeViewItem}" >
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
@@ -2,12 +2,6 @@
' Evento necessario per impedire che venga creata la lavorazione quando si fa doppio click sulla ScrollBar ' Evento necessario per impedire che venga creata la lavorazione quando si fa doppio click sulla ScrollBar
Private Sub MachiningsTreeView_MouseDoubleClick(sender As Object, e As System.Windows.Input.MouseButtonEventArgs) Private Sub MachiningsTreeView_MouseDoubleClick(sender As Object, e As System.Windows.Input.MouseButtonEventArgs)
'Dim src As DependencyObject = VisualTreeHelper.GetParent(DirectCast(e.OriginalSource, DependencyObject))
'' Your logic here
'If TypeOf src Is Control AndAlso src.[GetType]() <> GetType(Grid) Then
' e.Handled = True
'End If
' recupero il viewmodel associato a questa view in cui è presente la funzione che l'evento deve lanciare ' recupero il viewmodel associato a questa view in cui è presente la funzione che l'evento deve lanciare
Dim MachiningTreeExpanderViewModel As MachiningTreeExpanderVM = DirectCast(Me.DataContext, MachiningTreeExpanderVM) Dim MachiningTreeExpanderViewModel As MachiningTreeExpanderVM = DirectCast(Me.DataContext, MachiningTreeExpanderVM)
' recupero il treeviewitem clickato(sorgente dell'evento) ' recupero il treeviewitem clickato(sorgente dell'evento)
@@ -36,7 +36,7 @@ Public Class MachiningTreeExpanderVM
Public ReadOnly Property MachListHdr As String Public ReadOnly Property MachListHdr As String
Get Get
Return EgtMsg(MSG_OPERATION + 12) ' Nuove Lavorazioni Return EgtMsg(5412) ' Nuove Lavorazioni
End Get End Get
End Property End Property
@@ -85,7 +85,8 @@ Public Class MachiningTreeExpanderVM
' Se l'operazione non è andata a buon fine ' Se l'operazione non è andata a buon fine
If MachiningId = GDB_ID.NULL Then If MachiningId = GDB_ID.NULL Then
' Inserimento lavorazione non riuscito ERRORE ' Inserimento lavorazione non riuscito ERRORE
MessageBox.Show(EgtMsg(MSG_OPERATION + 19), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_OPERATION + 19), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5419), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Inserimento lavorazione non riuscito Errore
Map.refOperationsListExpanderVM.CancelOperationCmd() Map.refOperationsListExpanderVM.CancelOperationCmd()
Return Return
End If End If
@@ -127,29 +128,31 @@ Public Class MachiningTreeExpanderVM
Private Function MachiningTypeToString(Type As Integer) As String Private Function MachiningTypeToString(Type As Integer) As String
Select Case Type Select Case Type
Case MCH_MY.DRILLING Case MCH_MY.DRILLING
Return EgtMsg(MSG_MACHININGSDBPAGE + 1) Return EgtMsg(6201) ' Foratura
Case MCH_MY.SAWING Case MCH_MY.SAWING
Return EgtMsg(MSG_MACHININGSDBPAGE + 2) Return EgtMsg(6202) ' Taglio di lama
Case MCH_MY.MILLING Case MCH_MY.MILLING
Return EgtMsg(MSG_MACHININGSDBPAGE + 3) Return EgtMsg(6203) ' Fresatura
Case MCH_MY.POCKETING Case MCH_MY.POCKETING
Return EgtMsg(MSG_MACHININGSDBPAGE + 4) Return EgtMsg(6204) ' Svuotatura
Case MCH_MY.MORTISING Case MCH_MY.MORTISING
Return EgtMsg(MSG_MACHININGSDBPAGE + 5) Return EgtMsg(6205) ' Mortasatura
Case MCH_MY.SAWROUGHING Case MCH_MY.SAWROUGHING
Return EgtMsg(MSG_MACHININGSDBPAGE + 6) Return EgtMsg(6206) ' Sgrossatura con lama
Case MCH_MY.SAWFINISHING Case MCH_MY.SAWFINISHING
Return EgtMsg(MSG_MACHININGSDBPAGE + 7) Return EgtMsg(6207) ' Finitura con lama
Case MCH_MY.GENMACHINING Case MCH_MY.GENMACHINING
Return EgtMsg(MSG_MACHININGSDBPAGE + 8) Return EgtMsg(6208) ' Lav. generica
Case MCH_MY.CHISELING Case MCH_MY.CHISELING
Return EgtMsg(MSG_MACHININGSDBPAGE + 9) Return EgtMsg(6209) ' Scalpellatura
Case MCH_MY.SURFROUGHING Case MCH_MY.SURFROUGHING
Return EgtMsg(MSG_MACHININGSDBPAGE + 10) Return EgtMsg(6210) ' Sgrossatura superfici
Case MCH_MY.SURFFINISHING Case MCH_MY.SURFFINISHING
Return EgtMsg(MSG_MACHININGSDBPAGE + 11) Return EgtMsg(6211) ' Finitura superfici
Case MCH_MY.WATERJETTING Case MCH_MY.WATERJETTING
Return EgtMsg(MSG_MACHININGSDBPAGE + 12) Return EgtMsg(6212) ' WaterJet
Case MCH_MY.FIVEAXISMILLING
Return EgtMsg(31213) ' Lav. 5 assi
Case Else Case Else
Return "Mach" Return "Mach"
End Select End Select
@@ -197,7 +200,7 @@ Public Class MachiningTreeExpanderVM
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
CodeCommand = False CodeCommand = False
OnPropertyChanged("IsEnabled") OnPropertyChanged(NameOf(IsEnabled))
Return True Return True
End Function End Function
@@ -211,11 +214,11 @@ Public Class MachiningTreeExpanderVM
If Not CodeCommand Then If Not CodeCommand Then
Map.refOperationsListExpanderVM.CancelOperationCmd() Map.refOperationsListExpanderVM.CancelOperationCmd()
CodeCommand = False CodeCommand = False
OnPropertyChanged("IsEnabled") OnPropertyChanged(NameOf(IsEnabled))
Return False Return False
End If End If
CodeCommand = False CodeCommand = False
OnPropertyChanged("IsEnabled") OnPropertyChanged(NameOf(IsEnabled))
Return True Return True
End Function End Function
@@ -63,7 +63,6 @@ Public Class MachiningTreeViewExpanderItem
End Class End Class
''' <summary> ''' <summary>
''' Class that represent a FamilyMachining in the treeview. ''' Class that represent a FamilyMachining in the treeview.
''' It's an element in the treeview that represent a folder, but also a machining family ''' It's an element in the treeview that represent a folder, but also a machining family
@@ -1,7 +1,7 @@
<UserControl x:Class="DispositionParameterExpanderV" <UserControl x:Class="DispositionParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"> xmlns:sys="clr-namespace:System;assembly=mscorlib">
<UserControl.Resources> <UserControl.Resources>
<sys:Int32 x:Key="TL">1</sys:Int32> <sys:Int32 x:Key="TL">1</sys:Int32>
@@ -13,28 +13,28 @@
<StackPanel> <StackPanel>
<Expander Header="RawPart" IsExpanded="{Binding RawPartIsExpanded}" <Expander Header="RawPart" IsExpanded="{Binding RawPartIsExpanded}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<ContentPresenter Name="RawPartOptions" Content="{Binding RawPartOptions ,Mode=OneWay}"/> <ContentPresenter Name="RawPartOptions" Content="{Binding RawPartOptions ,Mode=OneWay}"/>
</StackPanel> </StackPanel>
</Expander> </Expander>
<Expander Header="Part" IsExpanded="{Binding PartIsExpanded}" <Expander Header="Part" IsExpanded="{Binding PartIsExpanded}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
</Expander> </Expander>
<Expander Header="Fixture" IsExpanded="{Binding FixtureIsExpanded}" <Expander Header="Fixture" IsExpanded="{Binding FixtureIsExpanded}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<!--ContentPresenter that contains the Fixture options --> <!--ContentPresenter that contains the Fixture options -->
<ContentPresenter Name="FixtureParameters" Content="{Binding FixtureParameters ,Mode=OneWay}"/> <ContentPresenter Name="FixtureParameters" Content="{Binding FixtureParameters ,Mode=OneWay}"/>
</Expander> </Expander>
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<RadioButton Content="Move" IsChecked="{Binding MoveIsChecked}" <RadioButton Content="Move" IsChecked="{Binding MoveIsChecked}"
Style="{StaticResource {x:Type ToggleButton}}" Height="30"/> Style="{StaticResource {x:Type ToggleButton}}" Height="30"/>
<RadioButton Content="Rotate" <RadioButton Content="Rotate"
Style="{StaticResource {x:Type ToggleButton}}" Height="30"/> Style="{StaticResource {x:Type ToggleButton}}" Height="30"/>
</UniformGrid> </UniformGrid>
<Grid Margin="0,5,0,5" Visibility="{Binding RawRefGroupVisibility}"> <Grid Margin="0,5,0,5" Visibility="{Binding RawRefGroupVisibility}">
@@ -52,28 +52,28 @@
<TextBlock Grid.ColumnSpan="4" Text="Move Raw Reference"/> <TextBlock Grid.ColumnSpan="4" Text="Move Raw Reference"/>
<RadioButton Grid.Column="1" Grid.Row="1" Command="{Binding CheckedRawRefCommand}" <RadioButton Grid.Column="1" Grid.Row="1" Command="{Binding CheckedRawRefCommand}"
CommandParameter="{StaticResource TL}" CommandParameter="{StaticResource TL}"
Style="{StaticResource {x:Type ToggleButton}}" Height="40" Width="40"> Style="{StaticResource {x:Type ToggleButton}}" Height="40" Width="40">
<Border BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="5,5,0,0" <Border BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="5,5,0,0"
Height="30" Width="30"/> Height="30" Width="30"/>
</RadioButton> </RadioButton>
<RadioButton Grid.Column="2" Grid.Row="1" Command="{Binding CheckedRawRefCommand}" <RadioButton Grid.Column="2" Grid.Row="1" Command="{Binding CheckedRawRefCommand}"
CommandParameter="{StaticResource TR}" CommandParameter="{StaticResource TR}"
Style="{StaticResource {x:Type ToggleButton}}" Height="40" Width="40"> Style="{StaticResource {x:Type ToggleButton}}" Height="40" Width="40">
<Border BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="0,5,5,0" <Border BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="0,5,5,0"
Height="30" Width="30"/> Height="30" Width="30"/>
</RadioButton> </RadioButton>
<RadioButton Grid.Column="1" Grid.Row="2" Command="{Binding CheckedRawRefCommand}" <RadioButton Grid.Column="1" Grid.Row="2" Command="{Binding CheckedRawRefCommand}"
CommandParameter="{StaticResource BL}" IsChecked="{Binding BLIsChecked,Mode=OneWay}" CommandParameter="{StaticResource BL}" IsChecked="{Binding BLIsChecked,Mode=OneWay}"
Style="{StaticResource {x:Type ToggleButton}}" Height="40" Width="40"> Style="{StaticResource {x:Type ToggleButton}}" Height="40" Width="40">
<Border BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="5,0,0,5" <Border BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="5,0,0,5"
Height="30" Width="30"/> Height="30" Width="30"/>
</RadioButton> </RadioButton>
<RadioButton Grid.Column="2" Grid.Row="2" Command="{Binding CheckedRawRefCommand}" <RadioButton Grid.Column="2" Grid.Row="2" Command="{Binding CheckedRawRefCommand}"
CommandParameter="{StaticResource BR}" CommandParameter="{StaticResource BR}"
Style="{StaticResource {x:Type ToggleButton}}" Height="40" Width="40"> Style="{StaticResource {x:Type ToggleButton}}" Height="40" Width="40">
<Border BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="0,0,5,5" <Border BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="0,0,5,5"
Height="30" Width="30"/> Height="30" Width="30"/>
</RadioButton> </RadioButton>
</Grid> </Grid>
@@ -82,21 +82,18 @@
<TextBox Text="{Binding InputValue,UpdateSourceTrigger=PropertyChanged}" Margin="5,0,5,5"> <TextBox Text="{Binding InputValue,UpdateSourceTrigger=PropertyChanged}" Margin="5,0,5,5">
<TextBox.InputBindings> <TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/> <KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
<!--<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>-->
</TextBox.InputBindings> </TextBox.InputBindings>
</TextBox> </TextBox>
<TextBlock Text="{Binding InputErrorMsg,Mode=OneWay}" Margin="5,5,5,5" <TextBlock Text="{Binding InputErrorMsg,Mode=OneWay}" Margin="5,5,5,5"
Style="{StaticResource ValidationErrorTextBlock}"/> Style="{StaticResource ValidationErrorTextBlock}"/>
<Grid Margin="5,0,5,5"> <Grid Margin="5,0,5,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--<Button Command="{Binding ShowCommand}" Visibility="{Binding ShowBtnVisibility}"
Content="{Binding ShowMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>-->
<Button Command="{Binding DoneCommand}" Grid.Column="1" <Button Command="{Binding DoneCommand}" Grid.Column="1"
Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/> Content="{Binding OkMsg}" Style="{StaticResource EgtCAM5_InputButton}"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
@@ -68,12 +68,12 @@ Public Class DispositionParameterExpanderVM
End If End If
If m_MoveIsChecked Then If m_MoveIsChecked Then
m_RawRefGroupVisibility = Visibility.Visible m_RawRefGroupVisibility = Visibility.Visible
OnPropertyChanged("RawRefGroupVisibility") OnPropertyChanged(NameOf(RawRefGroupVisibility))
End If End If
Else Else
' Nascondo i bottoni per impostare la posizione di riferimento del grezzo ' Nascondo i bottoni per impostare la posizione di riferimento del grezzo
m_RawRefGroupVisibility = Visibility.Collapsed m_RawRefGroupVisibility = Visibility.Collapsed
OnPropertyChanged("RawRefGroupVisibility") OnPropertyChanged(NameOf(RawRefGroupVisibility))
' smarco la prima entità selezionata ' smarco la prima entità selezionata
EgtResetMark(EgtGetFirstSelectedObj) EgtResetMark(EgtGetFirstSelectedObj)
EgtDeselectAll() EgtDeselectAll()
@@ -81,7 +81,7 @@ Public Class DispositionParameterExpanderVM
End If End If
m_RawPartIsExpanded = value m_RawPartIsExpanded = value
ActiveObject = ObjectType.RAWPART ActiveObject = ObjectType.RAWPART
OnPropertyChanged("RawPartIsExpanded") OnPropertyChanged(NameOf(RawPartIsExpanded))
End If End If
End Set End Set
End Property End Property
@@ -105,7 +105,7 @@ Public Class DispositionParameterExpanderVM
End If End If
m_PartIsExpanded = value m_PartIsExpanded = value
ActiveObject = ObjectType.PART ActiveObject = ObjectType.PART
OnPropertyChanged("PartIsExpanded") OnPropertyChanged(NameOf(PartIsExpanded))
End If End If
End Set End Set
End Property End Property
@@ -133,7 +133,7 @@ Public Class DispositionParameterExpanderVM
End If End If
m_FixtureIsExpanded = value m_FixtureIsExpanded = value
ActiveObject = ObjectType.FIXTURE ActiveObject = ObjectType.FIXTURE
OnPropertyChanged("FixtureIsExpanded") OnPropertyChanged(NameOf(FixtureIsExpanded))
End If End If
End Set End Set
End Property End Property
@@ -147,22 +147,22 @@ Public Class DispositionParameterExpanderVM
If value <> m_MoveIsChecked Then If value <> m_MoveIsChecked Then
Map.refProjectVM.SetMoveInDisposition(value) Map.refProjectVM.SetMoveInDisposition(value)
InputValue = String.Empty InputValue = String.Empty
OnPropertyChanged("InputValue") OnPropertyChanged(NameOf(InputValue))
If value Then If value Then
If m_RawPartIsExpanded Then If m_RawPartIsExpanded Then
m_RawRefGroupVisibility = Visibility.Visible m_RawRefGroupVisibility = Visibility.Visible
OnPropertyChanged("RawRefGroupVisibility") OnPropertyChanged(NameOf(RawRefGroupVisibility))
Else Else
m_RawRefGroupVisibility = Visibility.Collapsed m_RawRefGroupVisibility = Visibility.Collapsed
OnPropertyChanged("RawRefGroupVisibility") OnPropertyChanged(NameOf(RawRefGroupVisibility))
End If End If
m_InputMsg = "Move to:" m_InputMsg = "Move to:"
Else Else
m_RawRefGroupVisibility = Visibility.Collapsed m_RawRefGroupVisibility = Visibility.Collapsed
OnPropertyChanged("RawRefGroupVisibility") OnPropertyChanged(NameOf(RawRefGroupVisibility))
m_InputMsg = "Rotate of:" m_InputMsg = "Rotate of:"
End If End If
OnPropertyChanged("InputMsg") OnPropertyChanged(NameOf(InputMsg))
m_MoveIsChecked = value m_MoveIsChecked = value
End If End If
End Set End Set
@@ -176,7 +176,7 @@ Public Class DispositionParameterExpanderVM
Set(value As String) Set(value As String)
If Not String.IsNullOrEmpty(m_InputErrorMsg) Then If Not String.IsNullOrEmpty(m_InputErrorMsg) Then
m_InputErrorMsg = String.Empty m_InputErrorMsg = String.Empty
OnPropertyChanged("InputErrorMsg") OnPropertyChanged(NameOf(InputErrorMsg))
End If End If
m_InputValue = value m_InputValue = value
End Set End Set
@@ -205,8 +205,9 @@ Public Class DispositionParameterExpanderVM
Public ReadOnly Property FixtureParameters As ContentControl Public ReadOnly Property FixtureParameters As ContentControl
Get Get
If IsNothing(m_FixtureParameters) Then If IsNothing(m_FixtureParameters) Then
m_FixtureParameters = New FixtureParametersV m_FixtureParameters = New FixtureParametersV With {
m_FixtureParameters.DataContext = New FixtureParametersVM(m_ExpandFixtureFunction) .DataContext = New FixtureParametersVM(m_ExpandFixtureFunction)
}
End If End If
Return m_FixtureParameters Return m_FixtureParameters
End Get End Get
@@ -216,8 +217,9 @@ Public Class DispositionParameterExpanderVM
Public ReadOnly Property RawPartOptions As ContentControl Public ReadOnly Property RawPartOptions As ContentControl
Get Get
If IsNothing(m_RawPartOptions) Then If IsNothing(m_RawPartOptions) Then
m_RawPartOptions = New RawPartOptionV m_RawPartOptions = New RawPartOptionV With {
m_RawPartOptions.DataContext = New RawPartOptionVM .DataContext = New RawPartOptionVM
}
End If End If
Return m_RawPartOptions Return m_RawPartOptions
End Get End Get
@@ -241,7 +243,7 @@ Public Class DispositionParameterExpanderVM
Public ReadOnly Property OkMsg As String Public ReadOnly Property OkMsg As String
Get Get
Return EgtMsg(MSG_DISPOSITION + 1) Return EgtMsg(5431) ' Ok
End Get End Get
End Property End Property
@@ -257,7 +259,7 @@ Public Class DispositionParameterExpanderVM
OpenDispositionFunction = AddressOf OpenDispositionParameters OpenDispositionFunction = AddressOf OpenDispositionParameters
MoveIsChecked = True MoveIsChecked = True
m_BLIsChecked = True m_BLIsChecked = True
OnPropertyChanged("BLIsChecked") OnPropertyChanged(NameOf(BLIsChecked))
m_RawRefPosition = MCH_CR.BL m_RawRefPosition = MCH_CR.BL
End Sub End Sub
@@ -273,7 +275,7 @@ Public Class DispositionParameterExpanderVM
End If End If
Select Case m_ActiveObject Select Case m_ActiveObject
Case ObjectType.RAWPART Case ObjectType.RAWPART
' Abilito la selezione delle Fixture ' Abilito la selezione dei Grezzi
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
Case ObjectType.FIXTURE Case ObjectType.FIXTURE
' Abilito la selezione delle Fixture ' Abilito la selezione delle Fixture
@@ -281,6 +283,7 @@ Public Class DispositionParameterExpanderVM
End Select End Select
Map.refRawPartOptionVM.SetMoveWithFixture(False) Map.refRawPartOptionVM.SetMoveWithFixture(False)
Map.refFixtureParametersVM.UpdateFixtureTypeList() Map.refFixtureParametersVM.UpdateFixtureTypeList()
DispositionUtility.InitHookData()
End Sub End Sub
#End Region ' METHODS #End Region ' METHODS
@@ -316,7 +319,7 @@ Public Class DispositionParameterExpanderVM
StringToLen(Values(1), InputPoint.y) StringToLen(Values(1), InputPoint.y)
Else Else
m_InputErrorMsg = "Il valore non è una cordinata XY" m_InputErrorMsg = "Il valore non è una cordinata XY"
OnPropertyChanged("InputErrorMsg") OnPropertyChanged(NameOf(InputErrorMsg))
Return Return
End If End If
' Vettore di movimento ' Vettore di movimento
@@ -383,7 +386,7 @@ Public Class DispositionParameterExpanderVM
Dim InputAngle As Double = 0 Dim InputAngle As Double = 0
If Not StringToDouble(sVal, InputAngle) Then If Not StringToDouble(sVal, InputAngle) Then
m_InputErrorMsg = "Il valore non è un angolo valido" m_InputErrorMsg = "Il valore non è un angolo valido"
OnPropertyChanged("InputErrorMsg") OnPropertyChanged(NameOf(InputErrorMsg))
Return Return
End If End If
' eseguo rotazione ' eseguo rotazione
@@ -396,14 +399,14 @@ Public Class DispositionParameterExpanderVM
DispositionUtility.VerifyRawPosition(nSelId, vtOrigMove, vtRefMove) DispositionUtility.VerifyRawPosition(nSelId, vtOrigMove, vtRefMove)
Else Else
m_InputErrorMsg = "Impossibile ruotare il grezzo." m_InputErrorMsg = "Impossibile ruotare il grezzo."
OnPropertyChanged("InputErrorMsg") OnPropertyChanged(NameOf(InputErrorMsg))
End If End If
Case ObjectType.PART Case ObjectType.PART
'EgtMove... 'EgtMove...
Case ObjectType.FIXTURE Case ObjectType.FIXTURE
If Not EgtRotateFixture(nSelId, InputAngle) Then If Not EgtRotateFixture(nSelId, InputAngle) Then
m_InputErrorMsg = "Impossibile ruotare la ventosa" m_InputErrorMsg = "Impossibile ruotare la ventosa"
OnPropertyChanged("InputErrorMsg") OnPropertyChanged(NameOf(InputErrorMsg))
End If End If
End Select End Select
nSelId = EgtGetNextSelectedObj() nSelId = EgtGetNextSelectedObj()
@@ -1,12 +1,12 @@
<UserControl x:Class="FixtureParametersV" <UserControl x:Class="FixtureParametersV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"> xmlns:EgtCAM5="clr-namespace:EgtCAM5">
<StackPanel> <StackPanel>
<ListBox Name="FixtureListBox" ItemsSource="{Binding FixtureTypeList}" <ListBox Name="FixtureListBox" ItemsSource="{Binding FixtureTypeList}"
Height="150" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding SelectedFixtureType}"> Height="150" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding SelectedFixtureType}">
<ListBox.Resources> <ListBox.Resources>
<DataTemplate DataType="{x:Type EgtCAM5:FixtureType}"> <DataTemplate DataType="{x:Type EgtCAM5:FixtureType}">
<Grid> <Grid>
@@ -24,7 +24,7 @@
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}" FocusVisualStyle="{x:Null}"> <Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}" FocusVisualStyle="{x:Null}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" Foreground="White" Margin="5,0,0,0" <TextBlock Text="{Binding Name}" Foreground="White" Margin="5,0,0,0"
FontSize="15" FontWeight="SemiBold"/> FontSize="15" FontWeight="SemiBold"/>
</StackPanel> </StackPanel>
</Border> </Border>
</DataTemplate> </DataTemplate>
@@ -38,15 +38,15 @@
</Style> </Style>
</ListBox.ItemContainerStyle> </ListBox.ItemContainerStyle>
</ListBox> </ListBox>
<TextBlock Text="{Binding FixtureErrorMsg,Mode=OneWay}" Margin="5,5,5,5" <TextBlock Text="{Binding FixtureErrorMsg,Mode=OneWay}" Margin="5,5,5,5"
Style="{StaticResource ValidationErrorTextBlock}"/> Style="{StaticResource ValidationErrorTextBlock}"/>
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<Button Content="Add" Height="30" Command="{Binding AddCommand}" CommandParameter="{Binding Path=SelectedItem, ElementName=FixtureListBox}"/> <Button Content="Add" Height="30" Command="{Binding AddCommand}" CommandParameter="{Binding Path=SelectedItem, ElementName=FixtureListBox}"/>
<Button Content="Remove" Height="30" Command="{Binding RemoveCommand}" CommandParameter="{Binding Path=SelectedItem, ElementName=FixtureListBox}"/> <Button Content="Remove" Height="30" Command="{Binding RemoveCommand}" CommandParameter="{Binding Path=SelectedItem, ElementName=FixtureListBox}"/>
</UniformGrid> </UniformGrid>
</StackPanel> </StackPanel>
</UserControl> </UserControl>
@@ -5,8 +5,6 @@ Imports EgtUILib
Public Class FixtureParametersVM Public Class FixtureParametersVM
Inherits ViewModelBase Inherits ViewModelBase
Friend Const USED As String = "USED"
Private m_FixtureTypeList As ObservableCollection(Of FixtureListItem) Private m_FixtureTypeList As ObservableCollection(Of FixtureListItem)
Public ReadOnly Property FixtureTypeList As ObservableCollection(Of FixtureListItem) Public ReadOnly Property FixtureTypeList As ObservableCollection(Of FixtureListItem)
Get Get
@@ -38,7 +36,7 @@ Public Class FixtureParametersVM
Public ReadOnly Property OkMsg As String Public ReadOnly Property OkMsg As String
Get Get
Return EgtMsg(MSG_DISPOSITION + 1) Return EgtMsg(5431) ' Ok
End Get End Get
End Property End Property
@@ -64,8 +62,8 @@ Public Class FixtureParametersVM
Dim nUsedFixtureId As Integer = EgtGetFirstFixture() Dim nUsedFixtureId As Integer = EgtGetFirstFixture()
While nUsedFixtureId <> GDB_ID.NULL While nUsedFixtureId <> GDB_ID.NULL
Dim sUsedFixtureName As String = String.Empty Dim sUsedFixtureName As String = String.Empty
EgtGetName(nUsedFixtureId, sUsedFixtureName)
For Index = 0 To m_FixtureTypeList.Count - 1 For Index = 0 To m_FixtureTypeList.Count - 1
EgtGetName(nUsedFixtureId, sUsedFixtureName)
If sUsedFixtureName = m_FixtureTypeList(Index).Name Then If sUsedFixtureName = m_FixtureTypeList(Index).Name Then
Dim CurrFixtureType As FixtureType = DirectCast(m_FixtureTypeList(Index), FixtureType) Dim CurrFixtureType As FixtureType = DirectCast(m_FixtureTypeList(Index), FixtureType)
CurrFixtureType.UsedNumber += 1 CurrFixtureType.UsedNumber += 1
@@ -78,7 +76,8 @@ Public Class FixtureParametersVM
Friend Sub UpdateFixtureTypeList() Friend Sub UpdateFixtureTypeList()
m_FixtureTypeList = New ObservableCollection(Of FixtureListItem)(FixtureType.ReadFixtureTypeFromMachIni()) m_FixtureTypeList = New ObservableCollection(Of FixtureListItem)(FixtureType.ReadFixtureTypeFromMachIni())
OnPropertyChanged("FixtureTypeList") UpdateFixtureCount()
OnPropertyChanged(NameOf(FixtureTypeList))
End Sub End Sub
' Definizione comandi ' Definizione comandi
@@ -117,32 +116,41 @@ Public Class FixtureParametersVM
' recupero area della tavola ' recupero area della tavola
Dim ptTableMin As Point3d Dim ptTableMin As Point3d
Dim ptTableMax As Point3d Dim ptTableMax As Point3d
if Not EgtGetTableArea(1, ptTableMin, ptTableMax) Then If Not EgtGetTableArea(1, ptTableMin, ptTableMax) Then
m_FixtureErrorMsg = "Tavola non definita" m_FixtureErrorMsg = "Tavola non definita"
OnPropertyChanged("FixtureErrorMsg") OnPropertyChanged(NameOf(FixtureErrorMsg))
Return Return
End If End If
' dimensioni tavola
Dim vtTabDim As Vector3d = ptTableMax - ptTableMin
' calcolo il centro della tavola ' 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 ' 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 If nAddedFixtureId = GDB_ID.NULL Then
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola" m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
OnPropertyChanged("FixtureErrorMsg") OnPropertyChanged(NameOf(FixtureErrorMsg))
Return Return
End If 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 IsFixtureWithHook(nAddedFixtureId) Then
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo EgtMoveFixture( nAddedFixtureId, 0.2 * vtTabDim.y * Vector3d.Y_AX())
EgtRemoveFixture(nAddedFixtureId) If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
MessageBox.Show("No free hook point!", "ERROR") EgtMoveFixture( nAddedFixtureId, 0.2 * vtTabDim.y * Vector3d.Y_AX())
Return 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 End If
' altrimenti ventosa con movimento continuo
Else Else
' se non ha punti di ancoraggio ' verifico se è in una posizione valida
' verifico se è in una posizione valida If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
' se non trovo una posizione valida, esco ' se non trovo una posizione valida, esco
If Not SearchOkFixturePosition(nAddedFixtureId, ptTableMin, ptTableMax, ptTableMid) Then If Not SearchOkFixturePosition(nAddedFixtureId, ptTableMin, ptTableMax, ptTableMid) Then
Return Return
@@ -152,81 +160,81 @@ Public Class FixtureParametersVM
' sottraggo la ventosa aggiunta dal conto di quelle disponibili ' sottraggo la ventosa aggiunta dal conto di quelle disponibili
SelectedFixture.UsedNumber += 1 SelectedFixture.UsedNumber += 1
EgtDraw() EgtDraw()
OnPropertyChanged("FixtureErrorMsg") OnPropertyChanged(NameOf(FixtureErrorMsg))
End Sub End Sub
' Funzione che cerca una posizione valida per la ventosa libera di muoversi ' 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 Private Function SearchOkFixturePosition(nAddedFixtureId As Integer, ptTableMin As Point3d, ptTableMax As Point3d, ptTableMid As Point3d) As Boolean
' creo un gruppo temporaneo ' creo un gruppo temporaneo
Dim nTempGroupId As Integer = EgtCreateGroup(GDB_ID.ROOT) Dim nTempGroupId As Integer = EgtCreateGroup(GDB_ID.ROOT)
EgtSetLevel(nTempGroupId, GDB_LV.USER) EgtSetLevel(nTempGroupId, GDB_LV.USER)
EgtSetMode(nTempGroupId, GDB_MD.STD) EgtSetMode(nTempGroupId, GDB_MD.STD)
' calcolo ingombro sottopezzo aggiunto ' calcolo ingombro sottopezzo aggiunto
Dim bboxAddedFixture As New BBox3d Dim bboxAddedFixture As New BBox3d
EgtGetBBoxGlob(nAddedFixtureId, GDB_BB.STANDARD, bboxAddedFixture) EgtGetBBoxGlob(nAddedFixtureId, GDB_BB.STANDARD, bboxAddedFixture)
' calcolo bbox tavolo ' calcolo bbox tavolo
Dim bboxTableArea As New BBox3d(ptTableMin, ptTableMax) Dim bboxTableArea As New BBox3d(ptTableMin, ptTableMax)
bboxTableArea.Expand(-bboxAddedFixture.DimX / 2, -bboxAddedFixture.DimY / 2, 0) bboxTableArea.Expand(-bboxAddedFixture.DimX / 2, -bboxAddedFixture.DimY / 2, 0)
' creo superficie delle misure della tavola ' creo superficie delle misure della tavola
Dim nTableFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, bboxTableArea.Min, bboxTableArea.Max) Dim nTableFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, bboxTableArea.Min, bboxTableArea.Max)
' ciclo su tutti i pezzi di questa fase ' ciclo su tutti i pezzi di questa fase
Dim nFixtureId As Integer = EgtGetFirstFixture() Dim nFixtureId As Integer = EgtGetFirstFixture()
While nFixtureId <> GDB_ID.NULL While nFixtureId <> GDB_ID.NULL
' creo il bbox del sottopezzo ' creo il bbox del sottopezzo
Dim bboxFixture As New BBox3d Dim bboxFixture As New BBox3d
EgtGetBBoxGlob(nFixtureId, GDB_BB.STANDARD, bboxFixture) EgtGetBBoxGlob(nFixtureId, GDB_BB.STANDARD, bboxFixture)
' faccio offset del bbox del sottopezzo per includere metà del sottopezzo da aggiungere ' faccio offset del bbox del sottopezzo per includere metà del sottopezzo da aggiungere
bboxFixture.Expand(bboxAddedFixture.DimX / 2, bboxAddedFixture.DimY / 2, 0) bboxFixture.Expand(bboxAddedFixture.DimX / 2, bboxAddedFixture.DimY / 2, 0)
' lo porto all'altezza della tavola ' lo porto all'altezza della tavola
Dim ptMinFixtureFr As New Point3d(bboxFixture.Min) Dim ptMinFixtureFr As New Point3d(bboxFixture.Min)
Dim ptMaxFixtureFr As New Point3d(bboxFixture.Max) Dim ptMaxFixtureFr As New Point3d(bboxFixture.Max)
ptMinFixtureFr.z = ptTableMin.z ptMinFixtureFr.z = ptTableMin.z
ptMaxFixtureFr.z = ptTableMin.z ptMaxFixtureFr.z = ptTableMin.z
' creo la regione occupata dal bbox del sottopezzo ' creo la regione occupata dal bbox del sottopezzo
Dim nFixtureFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, ptMinFixtureFr, ptMaxFixtureFr) Dim nFixtureFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, ptMinFixtureFr, ptMaxFixtureFr)
' sottraggo la regione del sottopezzo da quella della tavola ' sottraggo la regione del sottopezzo da quella della tavola
Dim x = EgtSurfFrSubtract(nTableFrId, nFixtureFrId) Dim x = EgtSurfFrSubtract(nTableFrId, nFixtureFrId)
nFixtureId = EgtGetNextFixture(nFixtureId) nFixtureId = EgtGetNextFixture(nFixtureId)
End While End While
' creo gruppo con i bordi della regione di tavola avanzata ' creo gruppo con i bordi della regione di tavola avanzata
Dim TableFrBorderGroupId As Integer = EgtCreateGroup(nTempGroupId) Dim TableFrBorderGroupId As Integer = EgtCreateGroup(nTempGroupId)
Dim nTableFrBorderCount As Integer = 0 Dim nTableFrBorderCount As Integer = 0
Dim nChunk As Integer = EgtSurfFrChunkCount(nTableFrId) Dim nChunk As Integer = EgtSurfFrChunkCount(nTableFrId)
For Index = 0 To nChunk - 1 For Index = 0 To nChunk - 1
EgtExtractSurfFrChunkLoops(nTableFrId, Index, TableFrBorderGroupId, nTableFrBorderCount) EgtExtractSurfFrChunkLoops(nTableFrId, Index, TableFrBorderGroupId, nTableFrBorderCount)
Next Next
' verifico se c'è almeno un bordo ' verifico se c'è almeno un bordo
If nTableFrBorderCount = 0 Then If nTableFrBorderCount = 0 Then
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola" m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
OnPropertyChanged("FixtureErrorMsg") OnPropertyChanged("FixtureErrorMsg")
Return False 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 End If
' converto il punto medio della tavola in coordinate globali BorderId = EgtGetNext(BorderId)
Dim PtTableRef As Point3d End While
EgtGetTableRef(1, PtTableRef) ' sposto il sottopezzo nel punto trovato
Dim frTableRef As New Frame3d(PtTableRef) Dim vtFixtureMove As Vector3d = ptMinAbs - ptTableMid
ptTableMid.ToGlob(frTableRef) vtFixtureMove.z = 0
' ciclo sui bordi per trovare il punto più vicino EgtMoveFixture(nAddedFixtureId, vtFixtureMove)
Dim dMinDist As Double = (bboxTableArea.Max - bboxTableArea.Min).SqLenXY ' cancello il gruppo temporaneo
Dim ptMinAbs As Point3d EgtErase(nTempGroupId)
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)
Return True Return True
End Function End Function
@@ -239,9 +247,7 @@ Public Class FixtureParametersVM
' leggo tipo ' leggo tipo
Dim sType As String = "" Dim sType As String = ""
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType) EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
If sType.Equals(DispositionUtility.FREE) Then If sType.Equals(DispositionUtility.POINT) Then
Return False
ElseIf sType.Equals(DispositionUtility.POINT) Then
Return True Return True
ElseIf sType.Equals(DispositionUtility.LINE) Then ElseIf sType.Equals(DispositionUtility.LINE) Then
Return True Return True
@@ -250,7 +256,7 @@ Public Class FixtureParametersVM
End If End If
End Function 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 Friend Shared Function PositionFixtureOnNearestHook(nFixtureId As Integer) As Boolean
' cerco punto hook sulla ventosa ' cerco punto hook sulla ventosa
Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID) Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID)
@@ -262,26 +268,21 @@ Public Class FixtureParametersVM
Dim nFixtHookType As DispositionUtility.HOOKTYPE = DispositionUtility.HOOKTYPE.FREE Dim nFixtHookType As DispositionUtility.HOOKTYPE = DispositionUtility.HOOKTYPE.FREE
Dim sType As String = "" Dim sType As String = ""
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType) EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
If sType.Equals(DispositionUtility.FREE) Then If sType.Equals(DispositionUtility.POINT) Then
nFixtHookType = DispositionUtility.HOOKTYPE.FREE
' esco perchè non devo cercare alcun punto
Return True
ElseIf sType.Equals(DispositionUtility.POINT) Then
nFixtHookType = DispositionUtility.HOOKTYPE.POINT nFixtHookType = DispositionUtility.HOOKTYPE.POINT
ElseIf sType.Equals(DispositionUtility.LINE) Then ElseIf sType.Equals(DispositionUtility.LINE) Then
nFixtHookType = DispositionUtility.HOOKTYPE.LINE nFixtHookType = DispositionUtility.HOOKTYPE.LINE
Else Else
nFixtHookType = DispositionUtility.HOOKTYPE.FREE
' esco perchè non devo cercare alcun punto ' esco perchè non devo cercare alcun punto
Return True Return True
End If End If
Dim nFixtHookClass As Integer = 0 Dim nFixtHookClass As Integer = 0
EgtGetInfo(nFixtHookId, DispositionUtility.CLASS_, nFixtHookClass) EgtGetInfo(nFixtHookId, DispositionUtility.CLASS_, nFixtHookClass)
' cerco id tavola ' Recupero Id tavola corrente
Dim sTableName As String = "" Dim sTableName As String = ""
EgtGetTableName(sTableName) EgtGetTableName(sTableName)
Dim nTableId As Integer = EgtGetTableId(sTableName) Dim nTableId As Integer = EgtGetTableId(sTableName)
' cerco hook su tavola macchina ' *** Cerco hook su tavola ***
Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID) Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID)
Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, DispositionUtility.HOOK) Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, DispositionUtility.HOOK)
' Punto di hook a cui spostare la ventosa ' Punto di hook a cui spostare la ventosa
@@ -293,33 +294,23 @@ Public Class FixtureParametersVM
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook) EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida ' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then 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 Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If End If
End If End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While End While
' cerco hook su barra fissa ' *** Cerco hook su barre fisse ***
Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.FIXED) Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.FIXED)
nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, DispositionUtility.HOOK) While nTableFixedId <> GDB_ID.NULL
While nCurrHookId <> GDB_ID.NULL nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, DispositionUtility.HOOK)
' 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 nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
' se punto di aggancio valido ' se punto di aggancio valido
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
@@ -327,46 +318,114 @@ Public Class FixtureParametersVM
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook) EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida ' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then 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 Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If End If
End If End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While End While
nMobileInd += 1 nTableFixedId = EgtGetNextName( nTableFixedId, DispositionUtility.FIXED)
nMobile = EgtGetFirstNameInGroup(nTableId, DispositionUtility.MOBILE & nMobileInd) 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 End While
Return False Return False
End Function End Function
' Funzione che analizza l'hook e se valido ne prestituisce lo posizione(punto) ' 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 Private Shared Function HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer,
' verifico se del tipo giusto ptFixtHook As Point3d, ByRef ptCurrHook As Point3d) As Boolean
' Verifico se del tipo giusto
Dim nTableHookType As GDB_TY = EgtGetType(nCurrHookId) 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 If Not (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = DispositionUtility.HOOKTYPE.POINT) AndAlso
' verifico se della stessa classe Not (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = DispositionUtility.HOOKTYPE.LINE) Then
Dim nTableHookClass As Integer = 0 Return False
EgtGetInfo(nCurrHookId, DispositionUtility.CLASS_, nTableHookClass) End If
If nTableHookClass = nFixtHookClass Then
Dim dDist As Double = 0 ' Verifico se della stessa classe
' punto a distanza minima sull'hook Dim nTableHookClass As Integer = DispositionUtility.GetHookClass( nCurrHookId)
If nTableHookType = GDB_TY.GEO_POINT Then If nTableHookClass <> nFixtHookClass Then
' verifico se utilizzato Return False
Dim nTableHookUsed As Boolean = False End If
If Not EgtGetInfo(nCurrHookId, DispositionUtility.USED, nTableHookUsed) Then
' calcolo distanza punto hook tavola dal punto hook della ventosa Dim dDist As Double = 0
EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook) ' punto a distanza minima sull'hook
Return True If nTableHookType = GDB_TY.GEO_POINT Then
End If ' verifico se utilizzato
ElseIf nTableHookType = GDB_TY.CRV_LINE Then If Not DispositionUtility.GetIsHookUsed( nCurrHookId) Then
' calcolo distanza linea hook tavola dal punto hook della ventosa ' calcolo distanza punto hook tavola dal punto hook della ventosa
Dim nRefId As Integer = 0 EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
Dim dU As Double = 0 Return True
EgtPointCurveDist(ptFixtHook, nCurrHookId, nRefId, dDist, dU)
EgtAtParamPoint(nCurrHookId, dU, GDB_ID.ROOT, ptCurrHook)
Return True
End If
End If 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 End If
Return False Return False
End Function End Function
@@ -396,6 +455,7 @@ Public Class FixtureParametersVM
Dim NextSelectedId As Integer = EgtGetNextSelectedObj() Dim NextSelectedId As Integer = EgtGetNextSelectedObj()
If EgtVerifyFixture(SelectedFixtureId) Then If EgtVerifyFixture(SelectedFixtureId) Then
EgtRemoveFixture(SelectedFixtureId) EgtRemoveFixture(SelectedFixtureId)
DispositionUtility.RemoveFixtureFromHook( SelectedFixtureId)
For Index = 0 To FixtureTypeList.Count - 1 For Index = 0 To FixtureTypeList.Count - 1
Dim SelFixtureName As String = String.Empty Dim SelFixtureName As String = String.Empty
EgtGetName(SelectedFixtureId, SelFixtureName) EgtGetName(SelectedFixtureId, SelFixtureName)
@@ -431,7 +491,7 @@ Public Class FixtureType
Set(value As Integer) Set(value As Integer)
If value <> m_TotalNumber Then If value <> m_TotalNumber Then
m_TotalNumber = value m_TotalNumber = value
NotifyPropertyChanged("UsedTotalRatio") NotifyPropertyChanged(NameOf(UsedTotalRatio))
End If End If
End Set End Set
End Property End Property
@@ -442,15 +502,15 @@ Public Class FixtureType
Set(value As Integer) Set(value As Integer)
If value <> m_UsedNumber Then If value <> m_UsedNumber Then
m_UsedNumber = value m_UsedNumber = value
NotifyPropertyChanged("UsedTotalRatio") NotifyPropertyChanged(NameOf(UsedTotalRatio))
If UsedNumber >= TotalNumber Then If UsedNumber >= TotalNumber Then
m_IsEnabled = False m_IsEnabled = False
m_IsSelected = False m_IsSelected = False
NotifyPropertyChanged("IsSelected") NotifyPropertyChanged(NameOf(IsSelected))
Else Else
m_IsEnabled = True m_IsEnabled = True
End If End If
NotifyPropertyChanged("IsEnabled") NotifyPropertyChanged(NameOf(IsEnabled))
End If End If
End Set End Set
End Property End Property
@@ -7,7 +7,7 @@
<CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/> <CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/>
<UniformGrid Columns="2" Margin="0,5,0,0"> <UniformGrid Columns="2" Margin="0,5,0,0">
<Button Content="New" Command="{Binding NewRawPartCommand}"/> <Button Content="New" Command="{Binding NewRawPartCommand}"/>
<Button Content="Remove"/> <!--Command="{Binding RemoveRawPartCommand}"--> <Button Content="Remove" Command="{Binding RemoveRawPartCommand}"/>
</UniformGrid> </UniformGrid>
<Grid Visibility="{Binding RawPartParamVisibility, Mode=OneWay}"> <Grid Visibility="{Binding RawPartParamVisibility, Mode=OneWay}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -1,5 +1,4 @@
Imports System.ComponentModel Imports EgtUILib
Imports EgtUILib
Public Class RawPartOptionVM Public Class RawPartOptionVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -35,7 +34,7 @@ Public Class RawPartOptionVM
End If End If
EgtDraw() EgtDraw()
m_MoveWithFixture = value m_MoveWithFixture = value
OnPropertyChanged("MoveWithFixture") OnPropertyChanged(NameOf(MoveWithFixture))
End If End If
End Set End Set
End Property End Property
@@ -56,32 +55,32 @@ Public Class RawPartOptionVM
Public ReadOnly Property NewMsg As String Public ReadOnly Property NewMsg As String
Get Get
Return EgtMsg(MSG_DISPOSITION + 3) Return EgtMsg(5433) ' Nuovo
End Get End Get
End Property End Property
Public ReadOnly Property RemoveMsg As String Public ReadOnly Property RemoveMsg As String
Get Get
Return EgtMsg(MSG_DISPOSITION + 4) Return EgtMsg(5434) ' Rimuovi
End Get End Get
End Property End Property
Public ReadOnly Property LenghtMsg As String Public ReadOnly Property LenghtMsg As String
Get Get
Return EgtMsg(MSG_DISPOSITION + 5) Return EgtMsg(5435) ' Lunghezza
End Get End Get
End Property End Property
Public ReadOnly Property WidthMsg As String Public ReadOnly Property WidthMsg As String
Get Get
Return EgtMsg(MSG_DISPOSITION + 6) Return EgtMsg(5436) ' Larghezza
End Get End Get
End Property End Property
Public ReadOnly Property HeightMsg As String Public ReadOnly Property HeightMsg As String
Get Get
Return EgtMsg(MSG_DISPOSITION + 7) Return EgtMsg(5437) ' Altezza
End Get End Get
End Property End Property
Public ReadOnly Property PositionMsg As String Public ReadOnly Property PositionMsg As String
Get Get
Return EgtMsg(MSG_DISPOSITION + 8) Return EgtMsg(5438) ' Posizione
End Get End Get
End Property End Property
@@ -117,16 +116,46 @@ Public Class RawPartOptionVM
End Property End Property
''' <summary> ''' <summary>
''' Execute the Point. This method is invoked by the DoneCommand. ''' Execute NewRawPart. This method is invoked by the DoneCommand.
''' </summary> ''' </summary>
Public Sub NewRawPart() Public Sub NewRawPart()
DispositionUtility.ShowParts() DispositionUtility.ShowParts()
m_bRawPartParamVisibility = Visibility.Visible m_bRawPartParamVisibility = Visibility.Visible
OnPropertyChanged("RawPartParamVisibility") OnPropertyChanged(NameOf(RawPartParamVisibility))
End Sub End Sub
#End Region ' NewRawPartCommand #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 Region ' Commands
End Class End Class
@@ -1,384 +1,368 @@
<UserControl x:Class="BeamMillingParameterExpanderV" <UserControl x:Class="BeamMillingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/> <EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> </UserControl.Resources>
<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="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> 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> </UniformGrid>
</StackPanel> <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
<StackPanel Name="AutomaticCloseExpanderStackPanel"> ParamChBx="{Binding Path=Invert,
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" UpdateSourceTrigger=PropertyChanged,
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> ValidatesOnDataErrors=True}"
<StackPanel> Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
ParamTxBl="{Binding StartPosTxBl}" ParamCmBxList="{Binding Path=WorkSideList,
ParamTxBx="{Binding Path=StartPos, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV <UniformGrid Columns="2">
ParamTxBl="{Binding OverLapTxBl}" <TextBlock Text="{Binding UserNotesTxBl}"
ParamTxBx="{Binding Path=OverLap, Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
ValidatesOnDataErrors=True}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:EgtTextBox.ToolTip>
<EgtWPFLib5:ComboParamV <TextBlock Text="{Binding UserNotesTooltip}"/>
ParamTxBl="{Binding StepTypeTxBl}" </EgtWPFLib5:EgtTextBox.ToolTip>
ParamCmBxList="{Binding Path=StepTypeList, </EgtWPFLib5:EgtTextBox>
UpdateSourceTrigger=PropertyChanged, <TextBlock Text="{Binding SystemNotesTxBl}"
ValidatesOnDataErrors=True}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}" Visibility="{Binding SysNotes_Visibility}"/>
Style="{DynamicResource ComboParamV_Margin}"/> <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:StringParamV Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
ParamTxBl="{Binding StepParTxBl}" Visibility="{Binding SysNotes_Visibility}"
ParamTxBx="{Binding Path=StepPar, IsReadOnly="True"/>
UpdateSourceTrigger=PropertyChanged, </UniformGrid>
ValidatesOnDataErrors=True}" </StackPanel>
Style="{DynamicResource StringParamV_Margin}"/> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<EgtWPFLib5:StringParamV <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
ParamTxBl="{Binding OffsetSrTxBl}" Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
ParamTxBx="{Binding Path=OffSr, <StackPanel>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=StartPos,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding OffsetSlTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=OffSl, <EgtWPFLib5:StringParamV ParamTxBl="{Binding OverLapTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=OverLap,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
</StackPanel> Style="{DynamicResource StringParamV_Margin}"/>
</Expander> <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" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:CheckParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InvertToolDirTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamChBx="{Binding Path=InvertToolDir, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource CheckParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
<EgtWPFLib5:ComboParamV ToolTip="{Binding ShowNoteToolTip}"
ParamTxBl="{Binding FaceUseTypeTxBl}" Grid.Column="1"
ParamCmBxList="{Binding Path=FaceUseTypeList, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}" <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Button>
<EgtWPFLib5:StringParamV </UniformGrid>
ParamTxBl="{Binding InitAngsTxBl}" </Expander.Header>
ParamTxBx="{Binding Path=InitAngs, <Grid>
UpdateSourceTrigger=PropertyChanged, <Grid.RowDefinitions>
ValidatesOnDataErrors=True}" <RowDefinition Height="1*"/>
Style="{DynamicResource StringParamV_Margin}"/> <RowDefinition Height="Auto"/>
<EgtWPFLib5:StringParamV </Grid.RowDefinitions>
ParamTxBl="{Binding BlockedAxisTxBl}" <StackPanel>
ParamTxBx="{Binding Path=BlockedAxis, <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamChBx="{Binding Path=InvertToolDir,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:ComboParamV Style="{DynamicResource CheckParamV_Margin}"/>
ParamTxBl="{Binding SolChoiceTypeTxBl}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding FaceUseTypeTxBl}"
ParamCmBxList="{Binding Path=SolChoiceTypeList, ParamCmBxList="{Binding Path=FaceUseTypeList,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True, ValidatesOnDataErrors=True}"
Mode=OneWay}" ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}"
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
</StackPanel> ParamTxBx="{Binding Path=InitAngs,
</Expander> 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 Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamTxBl="{Binding LeadInTypeTxBl}" ParamCmBxList="{Binding Path=LeadInTypeList,
ParamCmBxList="{Binding Path=LeadInTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel>
<StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=StartAddLen,
ParamTxBl="{Binding StartAddLenTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=StartAddLen, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=LiTang,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding LiTangTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=LiTang, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiPerpTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=LiPerp,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding LiPerpTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=LiPerp, <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=LiElev,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding LiElevTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiCompLenTxBl}"
ParamTxBx="{Binding Path=LiElev, ParamTxBx="{Binding Path=LiCompLen,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV </StackPanel>
ParamTxBl="{Binding LiCompLenTxBl}" </Expander>
ParamTxBx="{Binding Path=LiCompLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamTxBl="{Binding LeadOutTypeTxBl}" ParamCmBxList="{Binding Path=LeadOutTypeList,
ParamCmBxList="{Binding Path=LeadOutTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel>
<StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=EndAddLen,
ParamTxBl="{Binding EndAddLenTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=EndAddLen, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=LoTang,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding LoTangTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=LoTang, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding LoPerpTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=LoPerp,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding LoPerpTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=LoPerp, <EgtWPFLib5:StringParamV ParamTxBl="{Binding LoElevTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=LoElev,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding LoElevTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LoCompLenTxBl}"
ParamTxBx="{Binding Path=LoElev, ParamTxBx="{Binding Path=LoCompLen,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV </StackPanel>
ParamTxBl="{Binding LoCompLenTxBl}" </Expander>
ParamTxBx="{Binding Path=LoCompLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding LeaveTabTxBl}"
ParamTxBl="{Binding LeaveTabTxBl}" ParamChBx="{Binding Path=LeaveTab,
ParamChBx="{Binding Path=LeaveTab, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource CheckParamV_Margin}"/>
Style="{DynamicResource CheckParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel Margin="2">
<StackPanel Margin="2"> <EgtWPFLib5:StringParamV ParamTxBl="{Binding TabLenTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=TabLen,
ParamTxBl="{Binding TabLenTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=TabLen, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, ParamErrorMsg="{Binding Path=TabLenErrorMsg}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
ParamErrorMsg="{Binding Path=TabLenErrorMsg}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TabHeightTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=TabHeight,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding TabHeightTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=TabHeight, ParamErrorMsg="{Binding Path=TabHeightErrorMsg}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TabAngleTxBl}"
ParamErrorMsg="{Binding Path=TabHeightErrorMsg}" ParamTxBx="{Binding Path=TabAngle,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding TabAngleTxBl}" ParamErrorMsg="{Binding Path=TabAngleErrorMsg}"
ParamTxBx="{Binding Path=TabAngle, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding TabDistTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=TabDist,
ParamErrorMsg="{Binding Path=TabAngleErrorMsg}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV ParamErrorMsg="{Binding Path=TabDistErrorMsg}"
ParamTxBl="{Binding TabDistTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=TabDist, <EgtWPFLib5:StringParamV ParamTxBl="{Binding TabMinTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=TabMin,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
ParamErrorMsg="{Binding Path=TabDistErrorMsg}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> ParamErrorMsg="{Binding Path=TabMinErrorMsg}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding TabMinTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TabMaxTxBl}"
ParamTxBx="{Binding Path=TabMin, ParamTxBx="{Binding Path=TabMax,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabMinErrorMsg}" ParamErrorMsg="{Binding Path=TabMaxErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV </StackPanel>
ParamTxBl="{Binding TabMaxTxBl}" </Expander>
ParamTxBx="{Binding Path=TabMax,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabMaxErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header> </Expander.Header>
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBl="{Binding SpeedTxBl}" ParamTxBx="{Binding Path=Speed,
ParamTxBx="{Binding Path=Speed, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=Feed,
ParamTxBl="{Binding FeedTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=Feed, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=TipFeed,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding TipFeedTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=TipFeed, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=StartFeed,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding StartFeedTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=StartFeed, <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=EndFeed,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding EndFeedTxBl}" </StackPanel>
ParamTxBx="{Binding Path=EndFeed, </Expander>
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" <Interactivity:Interaction.Behaviors>
Style="{DynamicResource StringParamV_Margin}"/> <EgtCAM5:AutomaticCloseExpander/>
</StackPanel> </Interactivity:Interaction.Behaviors>
</Expander> </StackPanel>
<Interactivity:Interaction.Behaviors> </StackPanel>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class BeamMillingParameterExpanderV Public Class BeamMillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class BeamMillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class BeamMillingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class BeamMillingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,239 +1,243 @@
<UserControl x:Class="ChiselingParameterExpanderV" <UserControl x:Class="ChiselingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"> xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <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>
<StackPanel Name="OperationParametersStackPanel"> <StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamTxBl="{Binding InvertTxBl}" ParamChBx="{Binding Path=Invert,
ParamChBx="{Binding Path=Invert, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource CheckParamV_Margin}"/>
Style="{DynamicResource CheckParamV_Margin}"/> <EgtWPFLib5:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
<EgtWPFLib5:ComboParamV ParamCmBxList="{Binding Path=WorkSideList,
ParamTxBl="{Binding WorkSideTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxList="{Binding Path=WorkSideList, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
ValidatesOnDataErrors=True}" Style="{DynamicResource ComboParamV_Margin}"/>
ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}" <UniformGrid Columns="2">
Style="{DynamicResource ComboParamV_Margin}"/> <TextBlock Text="{Binding UserNotesTxBl}"
<UniformGrid Columns="2"> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<TextBlock Text="{Binding UserNotesTxBl}" <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" <EgtWPFLib5:EgtTextBox.ToolTip>
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> <TextBlock Text="{Binding UserNotesTooltip}"/>
<EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/> </EgtWPFLib5:EgtTextBox>
</EgtWPFLib5:EgtTextBox.ToolTip> <TextBlock Text="{Binding SystemNotesTxBl}"
</EgtWPFLib5:EgtTextBox> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
<TextBlock Text="{Binding SystemNotesTxBl}" Visibility="{Binding SysNotes_Visibility}"/>
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding SysNotes_Visibility}"/> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding SysNotes_Visibility}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}" IsReadOnly="True"/>
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid> </UniformGrid>
</StackPanel> </StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBl="{Binding StartPosTxBl}" ParamTxBx="{Binding Path=StartPos,
ParamTxBx="{Binding Path=StartPos, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding ReturnPosTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=ReturnPos,
ParamTxBl="{Binding ReturnPosTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=ReturnPos, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=StepPar,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding StepParTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=StepPar, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=OffSr,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding OffsetSrTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=OffSr, <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=OffSl,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding OffsetSlTxBl}" </StackPanel>
ParamTxBx="{Binding Path=OffSl, </Expander>
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:CheckParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InvertToolDirTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamChBx="{Binding Path=InvertToolDir, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" ToolTip="{Binding ShowNoteToolTip}"
Style="{DynamicResource CheckParamV_Margin}"/> IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
<EgtWPFLib5:StringParamV Visibility="{Binding ShowNoteListCombo_Visibility}"
ParamTxBl="{Binding InitAngsTxBl}" Grid.Column="1"
ParamTxBx="{Binding Path=InitAngs, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
Style="{DynamicResource StringParamV_Margin}"/> <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
<EgtWPFLib5:StringParamV </Button>
ParamTxBl="{Binding BlockedAxisTxBl}" </UniformGrid>
ParamTxBx="{Binding Path=BlockedAxis, </Expander.Header>
UpdateSourceTrigger=PropertyChanged, <Grid>
ValidatesOnDataErrors=True}" <Grid.RowDefinitions>
Style="{DynamicResource StringParamV_Margin}"/> <RowDefinition Height="1*"/>
<EgtWPFLib5:ComboParamV <RowDefinition Height="Auto"/>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </Grid.RowDefinitions>
ParamCmBxList="{Binding Path=SolChoiceTypeList, <StackPanel>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
ValidatesOnDataErrors=True, ParamChBx="{Binding Path=InvertToolDir,
Mode=OneWay}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" ValidatesOnDataErrors=True}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource CheckParamV_Margin}"/>
</StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
</Expander> 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" <Expander Header="{Binding LeadOutTypeMsg}" Name="LeadOutType"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBl="{Binding EndAddLenTxBl}" ParamTxBx="{Binding Path=EndAddLen,
ParamTxBx="{Binding Path=EndAddLen, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> </StackPanel>
</StackPanel> </Expander>
</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> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class ChiselingParameterExpanderV Public Class ChiselingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class ChiselingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class ChiselingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class ChiselingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -0,0 +1,222 @@
<UserControl x:Class="FiveAxisMachinigParameterExpanderV"
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:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
</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,216 +1,222 @@
<UserControl x:Class="GenMachiningParameterExpanderV" <UserControl x:Class="GenMachiningParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <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>
<StackPanel Name="OperationParametersStackPanel"> <StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamTxBl="{Binding InvertTxBl}" ParamChBx="{Binding Path=Invert,
ParamChBx="{Binding Path=Invert, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource CheckParamV_Margin}"/>
Style="{DynamicResource CheckParamV_Margin}"/> <UniformGrid Columns="2">
<UniformGrid Columns="2"> <TextBlock Text="{Binding UserNotesTxBl}"
<TextBlock Text="{Binding UserNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> <EgtWPFLib5:EgtTextBox.ToolTip>
<EgtWPFLib5:EgtTextBox.ToolTip> <TextBlock Text="{Binding UserNotesTooltip}"/>
<TextBlock Text="{Binding UserNotesTooltip}"/> </EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox>
</EgtWPFLib5:EgtTextBox> <TextBlock Text="{Binding SystemNotesTxBl}"
<TextBlock Text="{Binding SystemNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" Visibility="{Binding SysNotes_Visibility}"/>
Visibility="{Binding SysNotes_Visibility}"/> <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}" Visibility="{Binding SysNotes_Visibility}"
Visibility="{Binding SysNotes_Visibility}" IsReadOnly="True"/>
IsReadOnly="True"/>
</UniformGrid> </UniformGrid>
</StackPanel> </StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBl="{Binding StartPosTxBl}" ParamTxBx="{Binding Path=StartPos,
ParamTxBx="{Binding Path=StartPos, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
<EgtWPFLib5:ComboParamV ParamCmBxList="{Binding Path=SubTypeList,
ParamTxBl="{Binding SubTypeTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxList="{Binding Path=SubTypeList, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
ValidatesOnDataErrors=True}" Style="{DynamicResource ComboParamV_Margin}"/>
ParamCmBxSelIndex="{Binding Path=SelectedSubType}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
Style="{DynamicResource ComboParamV_Margin}"/> ParamTxBx="{Binding Path=OffSr,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding OffsetSrTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=OffSr, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=OffSl,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding OffsetSlTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=OffSl, </StackPanel>
UpdateSourceTrigger=PropertyChanged, </Expander>
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:CheckParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InvertToolDirTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamChBx="{Binding Path=InvertToolDir, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" ToolTip="{Binding ShowNoteToolTip}"
Style="{DynamicResource CheckParamV_Margin}"/> IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
<EgtWPFLib5:StringParamV Visibility="{Binding ShowNoteListCombo_Visibility}"
ParamTxBl="{Binding InitAngsTxBl}" Grid.Column="1"
ParamTxBx="{Binding Path=InitAngs, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
Style="{DynamicResource StringParamV_Margin}"/> <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
<EgtWPFLib5:StringParamV </Button>
ParamTxBl="{Binding BlockedAxisTxBl}" </UniformGrid>
ParamTxBx="{Binding Path=BlockedAxis, </Expander.Header>
UpdateSourceTrigger=PropertyChanged, <Grid>
ValidatesOnDataErrors=True}" <Grid.RowDefinitions>
Style="{DynamicResource StringParamV_Margin}"/> <RowDefinition Height="1*"/>
<EgtWPFLib5:ComboParamV <RowDefinition Height="Auto"/>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </Grid.RowDefinitions>
ParamCmBxList="{Binding Path=SolChoiceTypeList, <StackPanel>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
ValidatesOnDataErrors=True, ParamChBx="{Binding Path=InvertToolDir,
Mode=OneWay}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" ValidatesOnDataErrors=True}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource CheckParamV_Margin}"/>
</StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
</Expander> 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> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class GenMachiningParameterExpanderV Public Class GenMachiningParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class GenMachiningParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class GenMachiningParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class GenMachiningParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,98 +1,42 @@
<UserControl x:Class="MachiningParameterExpanderV" <UserControl x:Class="MachiningParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:EgtCAM5="clr-namespace:EgtCAM5">
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> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<sys:Int32 x:Key="Invert">0</sys:Int32> </UserControl.Resources>
<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>
<sys:Int32 x:Key="TabMax">62</sys:Int32>
<sys:Int32 x:Key="TabMin">63</sys:Int32>
</UserControl.Resources>
<StackPanel> <StackPanel>
<ContentControl Content="{Binding Path=ParamExpanderPageV}" /> <ContentControl Content="{Binding Path=ParamExpanderPageV}" />
<Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}" <Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}"
Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/> Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.RowDefinitions>
<ColumnDefinition Width="2*"/> <RowDefinition Height="1*"/>
<ColumnDefinition Width="1*"/> <RowDefinition Height="Auto"/>
<ColumnDefinition Width="1*"/> </Grid.RowDefinitions>
</Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ToggleButton Name="ViewToolBtn" Grid.Column="0" Height="30" Content="{Binding ViewToolBtnMsg}" <ColumnDefinition Width="1*"/>
IsChecked="{Binding ViewTool}" /> </Grid.ColumnDefinitions>
<Button Name="NextStepToolBtn" Grid.Column="1" Height="30" Content="{Binding NextStepToolBtnMsg}"
Command="{Binding NextStepToolCommand}" IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"/> <CheckBox Name="ViewToolBtn"
<Button Name="PrevStepToolBtn" Grid.Column="2" Height="30" Content="{Binding PrevStepToolBtnMsg}" Content="{Binding ViewToolBtnMsg}"
Command="{Binding PrevStepToolCommand}" IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"/> IsChecked="{Binding ViewTool}"
</Grid> Style="{StaticResource ViewTool_CheckBox}"/>
</StackPanel>
<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> </UserControl>
@@ -1,83 +1,21 @@
Imports EgtWPFLib5
Imports EgtWPFLib5.EgtFloating
Public Class MachiningParameterExpanderV Public Class MachiningParameterExpanderV
'Private EgtFloatingTray As EgtFloatingTray Sub New()
'Private EgtFloatingPanel As EgtFloatingPanel
'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 ' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
' 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
'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) ''' <summary>
' If m_bSizeChanging Then Return ''' Funzione che mette il focus allo slider
' m_bSizeChanging = True ''' </summary>
' CalculateOperationParametersStackPanelMaxHeight() Friend Sub FocusOnSlider()
' m_bSizeChanging = False Me.SliderV.Focus()
'End Sub 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
End Class End Class
@@ -1,11 +1,14 @@
Imports System.ComponentModel Imports EgtUILib
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Public Class MachiningParameterExpanderVM Public Class MachiningParameterExpanderVM
Inherits VMBase Inherits VMBase
''' <summary>
''' Evento che permette di mettere il focus sullo slider
''' </summary>
Friend Event m_EventFocusOnSlider()
Private WithEvents m_CurrOperation As MachiningTreeViewItem Private WithEvents m_CurrOperation As MachiningTreeViewItem
Public Property CurrOperation As MachiningTreeViewItem Public Property CurrOperation As MachiningTreeViewItem
Get Get
@@ -50,7 +53,6 @@ Public Class MachiningParameterExpanderVM
End Property End Property
Private m_bPreviewTool As Boolean = False Private m_bPreviewTool As Boolean = False
Private m_nPtEntId As Integer = GDB_ID.NULL
Public Property ViewTool As Boolean Public Property ViewTool As Boolean
Get Get
Return m_bPreviewTool Return m_bPreviewTool
@@ -58,16 +60,80 @@ Public Class MachiningParameterExpanderVM
Set(value As Boolean) Set(value As Boolean)
If value Then If value Then
EgtPreparePreviewMachiningTool() EgtPreparePreviewMachiningTool()
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
m_bPreviewTool = True m_bPreviewTool = True
ResetSliderValue()
Else Else
EgtRemovePreviewMachiningTool() EgtRemovePreviewMachiningTool()
m_bPreviewTool = False m_bPreviewTool = False
ResetSliderValue()
End If End If
EgtDraw() EgtDraw()
NotifyPropertyChanged("ViewTool")
End Set End Set
End Property End Property
Friend Sub SetViewTool(value As Boolean)
ViewTool = value
NotifyPropertyChanged(NameOf(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 WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
@@ -84,6 +150,8 @@ Public Class MachiningParameterExpanderVM
Dim StoneDrillParamExpanderV As StoneDrillingParameterExpanderV Dim StoneDrillParamExpanderV As StoneDrillingParameterExpanderV
Dim SurfFinishParamExpanderV As SurfFinishingParameterExpanderV Dim SurfFinishParamExpanderV As SurfFinishingParameterExpanderV
Dim WjParamExpanderV As WaterjettingParameterExpanderV Dim WjParamExpanderV As WaterjettingParameterExpanderV
Dim FiveAxExpanderV As FiveAxisMachinigParameterExpanderV
Dim SurfRoughExpanderV As SurfRoughingParameterExpanderV
Private Sub Dummy() Private Sub Dummy()
@@ -106,24 +174,11 @@ Public Class MachiningParameterExpanderVM
EgtGetMachiningParam(MCH_MP.TYPE, nType) EgtGetMachiningParam(MCH_MP.TYPE, nType)
m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY)) 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() m_CurrOperation.ReadOperationParam()
' Riferimento a operazione selezionata
EgtWPFLib5.MachiningTreeViewItem.sh_SelMach = m_CurrOperation
IsModified(False) IsModified(False)
ErrorOnOperation(False) ErrorOnOperation(False)
@@ -136,35 +191,44 @@ Public Class MachiningParameterExpanderVM
Select Case nType Select Case nType
Case MCH_OY.DRILLING Case MCH_OY.DRILLING
If MatType = MaterialType.STONE Then If MatType = MaterialType.STONE Then
If IsNothing(StoneDrillParamExpanderV) Then StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
StoneDrillParamExpanderV.DataContext = m_CurrOperation StoneDrillParamExpanderV.DataContext = m_CurrOperation
Return StoneDrillParamExpanderV Return StoneDrillParamExpanderV
Else Else
If IsNothing(WoodDrillParamExpanderV) Then WoodDrillParamExpanderV = New WoodDrillingParameterExpanderV
WoodDrillParamExpanderV.DataContext = m_CurrOperation WoodDrillParamExpanderV.DataContext = m_CurrOperation
Return WoodDrillParamExpanderV Return WoodDrillParamExpanderV
End If End If
Case MCH_OY.SAWING Case MCH_OY.SAWING
If MatType = MaterialType.STONE Then If MatType = MaterialType.STONE Then
If IsNothing(StoneSawParamExpanderV) Then StoneSawParamExpanderV = New StoneSawingParameterExpanderV
StoneSawParamExpanderV.DataContext = m_CurrOperation StoneSawParamExpanderV.DataContext = m_CurrOperation
Return StoneSawParamExpanderV Return StoneSawParamExpanderV
Else Else
If IsNothing(WoodSawParamExpanderV) Then WoodSawParamExpanderV = New WoodSawingParameterExpanderV
WoodSawParamExpanderV.DataContext = m_CurrOperation WoodSawParamExpanderV.DataContext = m_CurrOperation
Return WoodSawParamExpanderV Return WoodSawParamExpanderV
End If End If
Case MCH_OY.MILLING Case MCH_OY.MILLING
If MatType = MaterialType.BEAM Then If MatType = MaterialType.BEAM Then
If IsNothing(BeamMillParamExpanderV) Then BeamMillParamExpanderV = New BeamMillingParameterExpanderV
BeamMillParamExpanderV.DataContext = m_CurrOperation BeamMillParamExpanderV.DataContext = m_CurrOperation
Return BeamMillParamExpanderV Return BeamMillParamExpanderV
ElseIf MatType = MaterialType.STONE Then ElseIf MatType = MaterialType.STONE Then
If IsNothing(StoneMillParamExpanderV) Then StoneMillParamExpanderV = New StoneMillingParameterExpanderV
StoneMillParamExpanderV.DataContext = m_CurrOperation StoneMillParamExpanderV.DataContext = m_CurrOperation
Return StoneMillParamExpanderV Return StoneMillParamExpanderV
Else Else
If IsNothing(WoodMillParamExpanderV) Then WoodMillParamExpanderV = New WoodMillingParameterExpanderV
WoodMillParamExpanderV.DataContext = m_CurrOperation WoodMillParamExpanderV.DataContext = m_CurrOperation
Return WoodMillParamExpanderV Return WoodMillParamExpanderV
End If End If
Case MCH_OY.SAWROUGHING Case MCH_OY.SAWROUGHING
If IsNothing(StoneSawRoughParamExpanderV) Then StoneSawRoughParamExpanderV = New StoneSawRoughingParameterExpanderV
StoneSawRoughParamExpanderV.DataContext = m_CurrOperation StoneSawRoughParamExpanderV.DataContext = m_CurrOperation
Return StoneSawRoughParamExpanderV Return StoneSawRoughParamExpanderV
Case MCH_OY.SAWFINISHING Case MCH_OY.SAWFINISHING
If IsNothing(StoneSawFinishParamExpanderV) Then StoneSawFinishParamExpanderV = New StoneSawFinishingParameterExpanderV
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
Return StoneSawFinishParamExpanderV Return StoneSawFinishParamExpanderV
Case MCH_OY.POCKETING Case MCH_OY.POCKETING
@@ -180,27 +244,38 @@ Public Class MachiningParameterExpanderVM
' se utensile di tipo POLISHING rendo visibili i campi sugli epicicli ' se utensile di tipo POLISHING rendo visibili i campi sugli epicicli
If nToolType = MCH_TY.MILL_POLISHING Then m_CurrOperation.Epicycles_Visibility = Visibility.Visible If nToolType = MCH_TY.MILL_POLISHING Then m_CurrOperation.Epicycles_Visibility = Visibility.Visible
End If End If
If IsNothing(PocketParamExpanderV) Then PocketParamExpanderV = New PocketingParameterExpanderV
PocketParamExpanderV.DataContext = m_CurrOperation PocketParamExpanderV.DataContext = m_CurrOperation
Return PocketParamExpanderV Return PocketParamExpanderV
Case MCH_OY.MORTISING Case MCH_OY.MORTISING
If IsNothing(MortiseParamExpanderV) Then MortiseParamExpanderV = New MortisingParameterExpanderV
MortiseParamExpanderV.DataContext = m_CurrOperation MortiseParamExpanderV.DataContext = m_CurrOperation
Return MortiseParamExpanderV Return MortiseParamExpanderV
Case MCH_OY.GENMACHINING Case MCH_OY.GENMACHINING
If IsNothing(GenMachinParamExpanderV) Then GenMachinParamExpanderV = New GenMachiningParameterExpanderV
GenMachinParamExpanderV.DataContext = m_CurrOperation GenMachinParamExpanderV.DataContext = m_CurrOperation
Return GenMachinParamExpanderV Return GenMachinParamExpanderV
Case MCH_OY.CHISELING Case MCH_OY.CHISELING
If IsNothing(ChiselParamExpanderV) Then ChiselParamExpanderV = New ChiselingParameterExpanderV
ChiselParamExpanderV.DataContext = m_CurrOperation ChiselParamExpanderV.DataContext = m_CurrOperation
Return ChiselParamExpanderV Return ChiselParamExpanderV
Case MCH_OY.SURFFINISHING Case MCH_OY.SURFFINISHING
If IsNothing(SurfFinishParamExpanderV) Then SurfFinishParamExpanderV = New SurfFinishingParameterExpanderV
SurfFinishParamExpanderV.DataContext = m_CurrOperation SurfFinishParamExpanderV.DataContext = m_CurrOperation
Return SurfFinishParamExpanderV Return SurfFinishParamExpanderV
Case MCH_OY.WATERJETTING Case MCH_OY.WATERJETTING
If IsNothing(WjParamExpanderV) Then WjParamExpanderV = New WaterjettingParameterExpanderV
WjParamExpanderV.DataContext = m_CurrOperation WjParamExpanderV.DataContext = m_CurrOperation
Return WjParamExpanderV 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 End Select
'MachiningParameterExpanderItem.ReadOperationParam()
Return Nothing Return Nothing
End Get End Get
End Property End Property
@@ -209,25 +284,25 @@ Public Class MachiningParameterExpanderVM
Public ReadOnly Property UpdateMachiningBtnMsg As String Public ReadOnly Property UpdateMachiningBtnMsg As String
Get Get
Return EgtMsg(MSG_OPERATION + 3) 'Applica Lavorazione Return EgtMsg(5403) ' Applica Lavorazione
End Get End Get
End Property End Property
Public ReadOnly Property ViewToolBtnMsg As String Public ReadOnly Property ViewToolBtnMsg As String
Get Get
Return EgtMsg(MSG_OPERATION + 13) 'Anteprima Utensile Return EgtMsg(5413) ' Anteprima Utensile
End Get End Get
End Property End Property
Public ReadOnly Property NextStepToolBtnMsg As String Public ReadOnly Property NextStepToolBtnMsg As String
Get Get
Return EgtMsg(MSG_OPERATION + 14) 'Avanti Return EgtMsg(5414) ' Avanti
End Get End Get
End Property End Property
Public ReadOnly Property PrevStepToolBtnMsg As String Public ReadOnly Property PrevStepToolBtnMsg As String
Get Get
Return EgtMsg(MSG_OPERATION + 15) 'Indietro Return EgtMsg(5415) ' Indietro
End Get End Get
End Property End Property
@@ -242,84 +317,25 @@ Public Class MachiningParameterExpanderVM
Sub New() Sub New()
EgtWPFLib5.MachiningDbWindowVM.m_sMachineIniPath = IniFile.m_sCurrMachIniFilePath EgtWPFLib5.MachiningDbWindowVM.m_sMachineIniPath = IniFile.m_sCurrMachIniFilePath
Map.SetRefMachiningParameterExpanderVM(Me)
WoodDrillParamExpanderV = New WoodDrillingParameterExpanderV NotifyPropertyChanged(NameOf(ParamExpanderPageV))
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
NotifyPropertyChanged("ParamExpanderPageV")
End Sub End Sub
#End Region ' Constructor #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 "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" #Region "UpdateMachiningCommand"
''' <summary> ''' <summary>
@@ -346,10 +362,22 @@ Public Class MachiningParameterExpanderVM
sErrorList += Environment.NewLine + " - " + m_CurrOperation.GetErrorString([property]) sErrorList += Environment.NewLine + " - " + m_CurrOperation.GetErrorString([property])
End If End If
Next [property] Next [property]
MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation) 'MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation) ' La lavorazione non può essere applicata per i seguenti motivi: ATTENZIONE
Return Return
End If 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 ' La modifica di alcuni parametri forza il ricalcolo della geometria
Dim ModifiedGeometry As Boolean = m_CurrOperation.m_IsModifiedSelectedFaceUseType Dim ModifiedGeometry As Boolean = m_CurrOperation.m_IsModifiedSelectedFaceUseType
' aggiorno valori modificati ' aggiorno valori modificati
@@ -414,10 +442,12 @@ Public Class MachiningParameterExpanderVM
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
EgtGetOutstrokeInfo(sInfo) EgtGetOutstrokeInfo(sInfo)
If Not String.IsNullOrEmpty(sInfo) Then sErr &= " " & sInfo If Not String.IsNullOrEmpty(sInfo) Then sErr &= " " & sInfo
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) 'MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) ' ERRORE
Else Else
' Errore nel calcolo della lavorazione! ' Errore nel calcolo della lavorazione!
MessageBox.Show(EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore nel calcolo della lavorazione! ERRORE
End If End If
Else Else
If EgtGetMachMgrWarningId(0) <> 0 Then If EgtGetMachMgrWarningId(0) <> 0 Then
@@ -428,11 +458,9 @@ Public Class MachiningParameterExpanderVM
End If End If
End If End If
' Restart visualizzazione utensile ' Restart visualizzazione utensile
If m_bPreviewTool Then SetSliderScale( EgtGetPreviewMachiningToolStepCount())
EgtPreparePreviewMachiningTool() SetViewTool(True)
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER) IsModified(False)
End If
IsModified(False) ' NotifyPropertyChanged("UpdateMachiningBtn_Background")
ErrorOnOperation(False) ErrorOnOperation(False)
EgtDraw() EgtDraw()
Map.refProjectVM.EmitTitle() Map.refProjectVM.EmitTitle()
@@ -444,63 +472,16 @@ Public Class MachiningParameterExpanderVM
Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified
m_CurrOperation_IsModified = IsModified m_CurrOperation_IsModified = IsModified
' NotifyPropertyChanged("CurrOperation_IsModified") NotifyPropertyChanged(NameOf(UpdateMachiningBtn_Background))
NotifyPropertyChanged("UpdateMachiningBtn_Background")
End Sub End Sub
Private Sub ErrorOnOperation(ErrorOnOperation As Boolean) Handles m_CurrOperation.m_ErrorOnOperation Private Sub ErrorOnOperation(ErrorOnOperation As Boolean) Handles m_CurrOperation.m_ErrorOnOperation
m_CurrOperation_ErrorOnOperation = ErrorOnOperation m_CurrOperation_ErrorOnOperation = ErrorOnOperation
' NotifyPropertyChanged("CurrOperation_ErrorOnOperation") NotifyPropertyChanged(NameOf(UpdateMachiningBtn_Background))
NotifyPropertyChanged("UpdateMachiningBtn_Background")
End Sub End Sub
End Class End Class
''' <summary>
''' Class that represent a Converter that use machining type and param type, to set the visibility state of the param type.
''' </summary>
Public Class OperationParamVisibilityConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value)
Case MCH_OY.NONE
Return Visibility.Hidden
Case MCH_OY.DISP
Return TMDbParamVisibility.OperationDisposition(CInt(parameter))
Case MCH_OY.DRILLING
Return TMDbParamVisibility.Drilling(CInt(parameter))
Case MCH_OY.SAWING
Return TMDbParamVisibility.Sawing(CInt(parameter))
Case MCH_OY.MILLING
Return TMDbParamVisibility.Milling(CInt(parameter))
Case MCH_OY.POCKETING
Return TMDbParamVisibility.Pocketing(CInt(parameter))
Case MCH_OY.MORTISING
Return TMDbParamVisibility.Mortising(CInt(parameter))
Case MCH_OY.SAWROUGHING
Return TMDbParamVisibility.Sawroughing(CInt(parameter))
Case MCH_OY.SAWFINISHING
Return TMDbParamVisibility.Sawfinishing(CInt(parameter))
Case MCH_OY.GENMACHINING
Return TMDbParamVisibility.GenMachining(CInt(parameter))
Case MCH_OY.CHISELING
Return TMDbParamVisibility.Chiseling(CInt(parameter))
Case MCH_OY.SURFFINISHING
Return TMDbParamVisibility.SurfFinishing(CInt(parameter))
Case MCH_OY.WATERJETTING
Return TMDbParamVisibility.WaterJetting(CInt(parameter))
Case Else
Return Visibility.Hidden
End Select
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException
End Function
End Class
''' <summary> ''' <summary>
''' Class that represent a Converter that convert mm in inch if necessary for the param depth. ''' Class that represent a Converter that convert mm in inch if necessary for the param depth.
''' </summary> ''' </summary>
@@ -1,259 +1,261 @@
<UserControl x:Class="MortisingParameterExpanderV" <UserControl x:Class="MortisingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <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>
<StackPanel Name="OperationParametersStackPanel"> <StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}"
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamTxBl="{Binding InvertTxBl}" ParamChBx="{Binding Path=Invert,
ParamChBx="{Binding Path=Invert, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource CheckParamV_Margin}"/>
Style="{DynamicResource CheckParamV_Margin}"/> <EgtWPFLib5:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
<EgtWPFLib5:ComboParamV ParamCmBxList="{Binding Path=WorkSideList,
ParamTxBl="{Binding WorkSideTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxList="{Binding Path=WorkSideList, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
ValidatesOnDataErrors=True}" Style="{DynamicResource ComboParamV_Margin}"/>
ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}" <UniformGrid Columns="2">
Style="{DynamicResource ComboParamV_Margin}"/> <TextBlock Text="{Binding UserNotesTxBl}"
<UniformGrid Columns="2"> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<TextBlock Text="{Binding UserNotesTxBl}" <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" <EgtWPFLib5:EgtTextBox.ToolTip>
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> <TextBlock Text="{Binding UserNotesTooltip}"/>
<EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/> </EgtWPFLib5:EgtTextBox>
</EgtWPFLib5:EgtTextBox.ToolTip> <TextBlock Text="{Binding SystemNotesTxBl}"
</EgtWPFLib5:EgtTextBox> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
<TextBlock Text="{Binding SystemNotesTxBl}" Visibility="{Binding SysNotes_Visibility}"/>
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding SysNotes_Visibility}"/> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding SysNotes_Visibility}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}" IsReadOnly="True"/>
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid> </UniformGrid>
</StackPanel> </StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBl="{Binding StartPosTxBl}" ParamTxBx="{Binding Path=StartPos,
ParamTxBx="{Binding Path=StartPos, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
<EgtWPFLib5:ComboParamV ParamCmBxList="{Binding Path=StepTypeList,
ParamTxBl="{Binding StepTypeTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxList="{Binding Path=StepTypeList, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
ValidatesOnDataErrors=True}" Style="{DynamicResource ComboParamV_Margin}"/>
ParamCmBxSelIndex="{Binding Path=SelectedStepType}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
Style="{DynamicResource ComboParamV_Margin}"/> ParamTxBx="{Binding Path=StepPar,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding StepParTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=StepPar, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=OffSr,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding OffsetSrTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=OffSr, <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=OffSl,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding OffsetSlTxBl}" </StackPanel>
ParamTxBx="{Binding Path=OffSl, </Expander>
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:CheckParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InvertToolDirTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamChBx="{Binding Path=InvertToolDir, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource CheckParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
<EgtWPFLib5:ComboParamV ToolTip="{Binding ShowNoteToolTip}"
ParamTxBl="{Binding FaceUseTypeTxBl}" Grid.Column="1"
ParamCmBxList="{Binding Path=FaceUseTypeList, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}" <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Button>
<EgtWPFLib5:StringParamV </UniformGrid>
ParamTxBl="{Binding InitAngsTxBl}" </Expander.Header>
ParamTxBx="{Binding Path=InitAngs, <Grid>
UpdateSourceTrigger=PropertyChanged, <Grid.RowDefinitions>
ValidatesOnDataErrors=True}" <RowDefinition Height="1*"/>
Style="{DynamicResource StringParamV_Margin}"/> <RowDefinition Height="Auto"/>
<EgtWPFLib5:StringParamV </Grid.RowDefinitions>
ParamTxBl="{Binding BlockedAxisTxBl}" <StackPanel>
ParamTxBx="{Binding Path=BlockedAxis, <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamChBx="{Binding Path=InvertToolDir,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:ComboParamV Style="{DynamicResource CheckParamV_Margin}"/>
ParamTxBl="{Binding SolChoiceTypeTxBl}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding FaceUseTypeTxBl}"
ParamCmBxList="{Binding Path=SolChoiceTypeList, ParamCmBxList="{Binding Path=FaceUseTypeList,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True, ValidatesOnDataErrors=True}"
Mode=OneWay}" ParamCmBxSelIndex="{Binding Path=SelectedFaceUseType}"
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
</StackPanel> ParamTxBx="{Binding Path=InitAngs,
</Expander> 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" <Expander Header="{Binding LeadInTypeMsg}" Name="LeadInTypeMsg"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBl="{Binding StartAddLenTxBl}" ParamTxBx="{Binding Path=StartAddLen,
ParamTxBx="{Binding Path=StartAddLen, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> </StackPanel>
</StackPanel> </Expander>
</Expander>
<Expander Header="{Binding LeadOutTypeMsg}" Name="LeadOutType" <Expander Header="{Binding LeadOutTypeMsg}" Name="LeadOutType"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBl="{Binding EndAddLenTxBl}" ParamTxBx="{Binding Path=EndAddLen,
ParamTxBx="{Binding Path=EndAddLen, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> </StackPanel>
</StackPanel> </Expander>
</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> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class MortisingParameterExpanderV Public Class MortisingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class MortisingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class MortisingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class MortisingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,293 +1,290 @@
<UserControl x:Class="PocketingParameterExpanderV" <UserControl x:Class="PocketingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/> <EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> </UserControl.Resources>
<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="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamTxBl="{Binding InvertTxBl}" ParamChBx="{Binding Path=Invert,
ParamChBx="{Binding Path=Invert, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource CheckParamV_Margin}"/>
Style="{DynamicResource CheckParamV_Margin}"/> <UniformGrid Columns="2">
<UniformGrid Columns="2"> <TextBlock Text="{Binding UserNotesTxBl}"
<TextBlock Text="{Binding UserNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> <EgtWPFLib5:EgtTextBox.ToolTip>
<EgtWPFLib5:EgtTextBox.ToolTip> <TextBlock Text="{Binding UserNotesTooltip}"/>
<TextBlock Text="{Binding UserNotesTooltip}"/> </EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox>
</EgtWPFLib5:EgtTextBox> <TextBlock Text="{Binding SystemNotesTxBl}"
<TextBlock Text="{Binding SystemNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" Visibility="{Binding SysNotes_Visibility}"/>
Visibility="{Binding SysNotes_Visibility}"/> <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}" Visibility="{Binding SysNotes_Visibility}"
Visibility="{Binding SysNotes_Visibility}" IsReadOnly="True"/>
IsReadOnly="True"/> </UniformGrid>
</UniformGrid> </StackPanel>
</StackPanel> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> <StackPanel>
<StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=StartPos,
ParamTxBl="{Binding StartPosTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=StartPos, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamCmBxList="{Binding Path=SubTypeList,
<EgtWPFLib5:ComboParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding SubTypeTxBl}" ValidatesOnDataErrors=True}"
ParamCmBxList="{Binding Path=SubTypeList, ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource ComboParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}" ParamTxBx="{Binding Path=StepPar,
Style="{DynamicResource ComboParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding StepParTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=StepPar, <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=SideStep,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding SideStepTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=SideStep, ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBl="{Binding OffsetSlTxBl}" ParamTxBx="{Binding Path=OffSl,
ParamTxBx="{Binding Path=OffSl, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding EpicyclesRadTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=EpicyclesRad,
ParamTxBl="{Binding OffsetSrTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=OffSr, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"
ValidatesOnDataErrors=True}" Visibility="{Binding Epicycles_Visibility}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding EpicyclesDistTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=EpicyclesDist,
ParamTxBl="{Binding EpicyclesRadTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=EpicyclesRad, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"
ValidatesOnDataErrors=True}" Visibility="{Binding Epicycles_Visibility}"/>
Style="{DynamicResource StringParamV_Margin}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
Visibility="{Binding Epicycles_Visibility}"/> ParamTxBx="{Binding Path=SideAngle,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding EpicyclesDistTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=EpicyclesDist, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" </Expander>
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" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:CheckParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InvertToolDirTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamChBx="{Binding Path=InvertToolDir, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource CheckParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
<EgtWPFLib5:StringParamV ToolTip="{Binding ShowNoteToolTip}"
ParamTxBl="{Binding InitAngsTxBl}" Grid.Column="1"
ParamTxBx="{Binding Path=InitAngs, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
Style="{DynamicResource StringParamV_Margin}"/> <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
<EgtWPFLib5:StringParamV </Button>
ParamTxBl="{Binding BlockedAxisTxBl}" </UniformGrid>
ParamTxBx="{Binding Path=BlockedAxis, </Expander.Header>
UpdateSourceTrigger=PropertyChanged, <Grid>
ValidatesOnDataErrors=True}" <Grid.RowDefinitions>
Style="{DynamicResource StringParamV_Margin}"/> <RowDefinition Height="1*"/>
<EgtWPFLib5:ComboParamV <RowDefinition Height="Auto"/>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </Grid.RowDefinitions>
ParamCmBxList="{Binding Path=SolChoiceTypeList, <StackPanel>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
ValidatesOnDataErrors=True, ParamChBx="{Binding Path=InvertToolDir,
Mode=OneWay}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" ValidatesOnDataErrors=True}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource CheckParamV_Margin}"/>
</StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
</Expander> 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 Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamTxBl="{Binding LeadInTypeTxBl}" ParamCmBxList="{Binding Path=LeadInTypeList,
ParamCmBxList="{Binding Path=LeadInTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel>
<StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=LiTang,
ParamTxBl="{Binding LiTangTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=LiTang, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=LiElev,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding LiElevTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=LiElev, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" </Expander>
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamTxBl="{Binding LeadOutTypeTxBl}" ParamCmBxList="{Binding Path=LeadOutTypeList,
ParamCmBxList="{Binding Path=LeadOutTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel>
<StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=LoTang,
ParamTxBl="{Binding LoTangTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=LoTang, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" </StackPanel>
Style="{DynamicResource StringParamV_Margin}"/> </Expander>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header> </Expander.Header>
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBl="{Binding SpeedTxBl}" ParamTxBx="{Binding Path=Speed,
ParamTxBx="{Binding Path=Speed, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=Feed,
ParamTxBl="{Binding FeedTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=Feed, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=TipFeed,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding TipFeedTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=TipFeed, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=StartFeed,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding StartFeedTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=StartFeed, <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=EndFeed,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding EndFeedTxBl}" </StackPanel>
ParamTxBx="{Binding Path=EndFeed, </Expander>
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" <Interactivity:Interaction.Behaviors>
Style="{DynamicResource StringParamV_Margin}"/> <EgtCAM5:AutomaticCloseExpander/>
</StackPanel> </Interactivity:Interaction.Behaviors>
</Expander> </StackPanel>
<Interactivity:Interaction.Behaviors> </StackPanel>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class PocketingParameterExpanderV Public Class PocketingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class PocketingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class PocketingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class PocketingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,214 +1,220 @@
<UserControl x:Class="StoneDrillingParameterExpanderV" <UserControl x:Class="StoneDrillingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <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>
<StackPanel Name="OperationParametersStackPanel"> <StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> 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"/>
</UniformGrid> </UniformGrid>
</StackPanel> <UniformGrid Columns="2">
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <TextBlock Text="{Binding UserNotesTxBl}"
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
<StackPanel> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:StringParamV <EgtWPFLib5:EgtTextBox.ToolTip>
ParamTxBl="{Binding StartPosTxBl}" <TextBlock Text="{Binding UserNotesTooltip}"/>
ParamTxBx="{Binding Path=StartPos, </EgtWPFLib5:EgtTextBox.ToolTip>
UpdateSourceTrigger=PropertyChanged, </EgtWPFLib5:EgtTextBox>
ValidatesOnDataErrors=True}" <TextBlock Text="{Binding SystemNotesTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
<EgtWPFLib5:StringParamV Visibility="{Binding SysNotes_Visibility}"/>
ParamTxBl="{Binding ReturnPosTxBl}" <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
ParamTxBx="{Binding Path=ReturnPos, Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
UpdateSourceTrigger=PropertyChanged, Visibility="{Binding SysNotes_Visibility}"
ValidatesOnDataErrors=True}" IsReadOnly="True"/>
Style="{DynamicResource StringParamV_Margin}"/> </UniformGrid>
<EgtWPFLib5:StringParamV </StackPanel>
ParamTxBl="{Binding ThrouAddLenTxBl}" <StackPanel Name="AutomaticCloseExpanderStackPanel">
ParamTxBx="{Binding Path=ThrouAddLen, <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
UpdateSourceTrigger=PropertyChanged, Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
ValidatesOnDataErrors=True}" <StackPanel>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=StartPos,
ParamTxBl="{Binding StepParTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=StepPar, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding ReturnPosTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=ReturnPos,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding StartSlowLenTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=StartSlowLen, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding ThrouAddLenTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=ThrouAddLen,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding EndSlowLenTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=EndSlowLen, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=StepPar,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
</StackPanel> Style="{DynamicResource StringParamV_Margin}"/>
</Expander> <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" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:StringParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InitAngsTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamTxBx="{Binding Path=InitAngs, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource StringParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
<EgtWPFLib5:StringParamV ToolTip="{Binding ShowNoteToolTip}"
ParamTxBl="{Binding BlockedAxisTxBl}" Grid.Column="1"
ParamTxBx="{Binding Path=BlockedAxis, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
Style="{DynamicResource StringParamV_Margin}"/> <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
<EgtWPFLib5:ComboParamV </Button>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </UniformGrid>
ParamCmBxList="{Binding Path=SolChoiceTypeList, </Expander.Header>
UpdateSourceTrigger=PropertyChanged, <Grid>
ValidatesOnDataErrors=True, <Grid.RowDefinitions>
Mode=OneWay}" <RowDefinition Height="1*"/>
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" <RowDefinition Height="Auto"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Grid.RowDefinitions>
</StackPanel> <StackPanel>
</Expander> <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> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class StoneDrillingParameterExpanderV Public Class StoneDrillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class StoneDrillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class StoneDrillingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class StoneDrillingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,218 +1,224 @@
<UserControl x:Class="StoneMillingParameterExpanderV" <UserControl x:Class="StoneMillingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/> <EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> </UserControl.Resources>
<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="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> 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> </UniformGrid>
</StackPanel> <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
<StackPanel Name="AutomaticCloseExpanderStackPanel"> ParamChBx="{Binding Path=Invert,
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" UpdateSourceTrigger=PropertyChanged,
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> ValidatesOnDataErrors=True}"
<StackPanel> Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
ParamTxBl="{Binding StartPosTxBl}" ParamCmBxList="{Binding Path=WorkSideList,
ParamTxBx="{Binding Path=StartPos, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV <UniformGrid Columns="2">
ParamTxBl="{Binding LeadInTypeTxBl}" <TextBlock Text="{Binding UserNotesTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList, Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
ValidatesOnDataErrors=True}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}" <EgtWPFLib5:EgtTextBox.ToolTip>
Style="{DynamicResource ComboParamV_Margin}"/> <TextBlock Text="{Binding UserNotesTooltip}"/>
<EgtWPFLib5:ComboParamV </EgtWPFLib5:EgtTextBox.ToolTip>
ParamTxBl="{Binding LeadOutTypeTxBl}" </EgtWPFLib5:EgtTextBox>
ParamCmBxList="{Binding Path=LeadOutTypeList, <TextBlock Text="{Binding SystemNotesTxBl}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
ValidatesOnDataErrors=True}" Visibility="{Binding SysNotes_Visibility}"/>
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}" <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
<EgtWPFLib5:StringParamV Visibility="{Binding SysNotes_Visibility}"
ParamTxBl="{Binding StepParTxBl}" IsReadOnly="True"/>
ParamTxBx="{Binding Path=StepPar, </UniformGrid>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" <StackPanel Name="AutomaticCloseExpanderStackPanel">
Style="{DynamicResource StringParamV_Margin}"/> <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> </StackPanel>
</Expander> </Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:StringParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InitAngsTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamTxBx="{Binding Path=InitAngs, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource StringParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
<EgtWPFLib5:StringParamV ToolTip="{Binding ShowNoteToolTip}"
ParamTxBl="{Binding BlockedAxisTxBl}" Grid.Column="1"
ParamTxBx="{Binding Path=BlockedAxis, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
Style="{DynamicResource StringParamV_Margin}"/> <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
<EgtWPFLib5:ComboParamV </Button>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </UniformGrid>
ParamCmBxList="{Binding Path=SolChoiceTypeList, </Expander.Header>
UpdateSourceTrigger=PropertyChanged, <Grid>
ValidatesOnDataErrors=True, <Grid.RowDefinitions>
Mode=OneWay}" <RowDefinition Height="1*"/>
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" <RowDefinition Height="Auto"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Grid.RowDefinitions>
</StackPanel> <StackPanel>
</Expander> <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 Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header> </Expander.Header>
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBl="{Binding SpeedTxBl}" ParamTxBx="{Binding Path=Speed,
ParamTxBx="{Binding Path=Speed, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=Feed,
ParamTxBl="{Binding FeedTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=Feed, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=TipFeed,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding TipFeedTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=TipFeed, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=StartFeed,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding StartFeedTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=StartFeed, <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=EndFeed,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding EndFeedTxBl}" </StackPanel>
ParamTxBx="{Binding Path=EndFeed, </Expander>
UpdateSourceTrigger=PropertyChanged, <Interactivity:Interaction.Behaviors>
ValidatesOnDataErrors=True}" <EgtCAM5:AutomaticCloseExpander/>
Style="{DynamicResource StringParamV_Margin}"/> </Interactivity:Interaction.Behaviors>
</StackPanel> </StackPanel>
</Expander> </StackPanel>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class StoneMillingParameterExpanderV Public Class StoneMillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class StoneMillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class StoneMillingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class StoneMillingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,260 +1,265 @@
<UserControl x:Class="StoneSawFinishingParameterExpanderV" <UserControl x:Class="StoneSawFinishingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <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>
<StackPanel Name="OperationParametersStackPanel"> <StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamTxBl="{Binding InvertTxBl}" ParamChBx="{Binding Path=Invert,
ParamChBx="{Binding Path=Invert, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource CheckParamV_Margin}"/>
Style="{DynamicResource CheckParamV_Margin}"/> <EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
<EgtWPFLib5:ComboParamV ParamCmBxList="{Binding Path=SubTypeList,
ParamTxBl="{Binding SubTypeTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxList="{Binding Path=SubTypeList, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
ValidatesOnDataErrors=True}" Style="{DynamicResource ComboParamV_Margin}"/>
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
<UniformGrid Columns="2"> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<TextBlock Text="{Binding UserNotesTxBl}" <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" <EgtWPFLib5:EgtTextBox.ToolTip>
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> <TextBlock Text="{Binding UserNotesTooltip}"/>
<EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/> </EgtWPFLib5:EgtTextBox>
</EgtWPFLib5:EgtTextBox.ToolTip> <TextBlock Text="{Binding SystemNotesTxBl}"
</EgtWPFLib5:EgtTextBox> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
<TextBlock Text="{Binding SystemNotesTxBl}" Visibility="{Binding SysNotes_Visibility}"/>
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding SysNotes_Visibility}"/> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding SysNotes_Visibility}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}" IsReadOnly="True"/>
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid> </UniformGrid>
</StackPanel> </StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0" <EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding StartPosTxBl}" ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos, ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadLinkTypeTxBl}"
ParamTxBl="{Binding LeadLinkTypeTxBl}" ParamCmBxList="{Binding Path=LeadLinkTypeList,
ParamCmBxList="{Binding Path=LeadLinkTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel> </StackPanel>
</Expander> </Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:StringParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InitAngsTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamTxBx="{Binding Path=InitAngs, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource StringParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
<EgtWPFLib5:StringParamV ToolTip="{Binding ShowNoteToolTip}"
ParamTxBl="{Binding BlockedAxisTxBl}" Grid.Column="1"
ParamTxBx="{Binding Path=BlockedAxis, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
Style="{DynamicResource StringParamV_Margin}"/> <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
<EgtWPFLib5:ComboParamV </Button>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </UniformGrid>
ParamCmBxList="{Binding Path=SolChoiceTypeList, </Expander.Header>
UpdateSourceTrigger=PropertyChanged, <Grid>
ValidatesOnDataErrors=True, <Grid.RowDefinitions>
Mode=OneWay}" <RowDefinition Height="1*"/>
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" <RowDefinition Height="Auto"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Grid.RowDefinitions>
</StackPanel> <StackPanel>
</Expander> <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}" <Expander Header="{Binding StepGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamTxBl="{Binding StepTypeTxBl}" ParamCmBxList="{Binding Path=StepTypeList,
ParamCmBxList="{Binding Path=StepTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBl="{Binding StepParTxBl}" ParamTxBx="{Binding Path=StepPar,
ParamTxBx="{Binding Path=StepPar, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
ParamTxBl="{Binding SideStepTxBl}" ParamTxBx="{Binding Path=SideStep,
ParamTxBx="{Binding Path=SideStep, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel> </StackPanel>
</Expander> </Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding OffsetGpBxLbl}"/> <TextBlock Text="{Binding OffsetGpBxLbl}"/>
</Expander.Header> </Expander.Header>
<UniformGrid Columns="1"> <UniformGrid Columns="1">
<EgtWPFLib5:StringParamV Grid.Row="0" <EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSrTxBl}" ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr, ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
</UniformGrid> </UniformGrid>
</Expander> </Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header> </Expander.Header>
<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>
<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> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class StoneSawFinishingParameterExpanderV Public Class StoneSawFinishingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class StoneSawFinishingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class StoneSawFinishingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class StoneSawFinishingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,250 +1,255 @@
<UserControl x:Class="StoneSawRoughingParameterExpanderV" <UserControl x:Class="StoneSawRoughingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <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>
<StackPanel Name="OperationParametersStackPanel"> <StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamTxBl="{Binding StepTypeTxBl}" ParamCmBxList="{Binding Path=StepTypeList,
ParamCmBxList="{Binding Path=StepTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<UniformGrid Columns="2"> <TextBlock Text="{Binding UserNotesTxBl}"
<TextBlock Text="{Binding UserNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> <EgtWPFLib5:EgtTextBox.ToolTip>
<EgtWPFLib5:EgtTextBox.ToolTip> <TextBlock Text="{Binding UserNotesTooltip}"/>
<TextBlock Text="{Binding UserNotesTooltip}"/> </EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox>
</EgtWPFLib5:EgtTextBox> <TextBlock Text="{Binding SystemNotesTxBl}"
<TextBlock Text="{Binding SystemNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" Visibility="{Binding SysNotes_Visibility}"/>
Visibility="{Binding SysNotes_Visibility}"/> <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}" Visibility="{Binding SysNotes_Visibility}"
Visibility="{Binding SysNotes_Visibility}" IsReadOnly="True"/>
IsReadOnly="True"/>
</UniformGrid> </UniformGrid>
</StackPanel> </StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamTxBl="{Binding HeadSideTxBl}" ParamCmBxList="{Binding Path=HeadSideList,
ParamCmBxList="{Binding Path=HeadSideList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> <EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0"
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0" ParamTxBl="{Binding StartPosTxBl}"
ParamTxBl="{Binding StartPosTxBl}" ParamTxBx="{Binding Path=StartPos,
ParamTxBx="{Binding Path=StartPos, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
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 <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
ParamTxBl="{Binding ExtLinkTypeTxBl}" Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
ParamCmBxList="{Binding Path=ExtLinkTypeList, <Expander.Header>
UpdateSourceTrigger=PropertyChanged, <UniformGrid Columns="2">
ValidatesOnDataErrors=True}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}" Margin="2.5"/>
Style="{DynamicResource ComboParamV_Margin}"/> <Button Command="{Binding ShowNoteListComboCommand}"
</StackPanel> IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
</Expander> 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" <Expander Header="{Binding StepGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBl="{Binding InitAngsTxBl}" ParamTxBx="{Binding Path=StepPar,
ParamTxBx="{Binding Path=InitAngs, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=SideStep,
ParamTxBl="{Binding BlockedAxisTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=BlockedAxis, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" </StackPanel>
Style="{DynamicResource StringParamV_Margin}"/> </Expander>
<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}" <Expander Style="{StaticResource ExpanderStyle}">
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> <Expander.Header>
<StackPanel> <TextBlock Text="{Binding OffsetGpBxLbl}"/>
<EgtWPFLib5:StringParamV </Expander.Header>
ParamTxBl="{Binding StepParTxBl}" <UniformGrid Columns="1">
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}"> <EgtWPFLib5:StringParamV Grid.Row="0"
<Expander.Header> ParamTxBl="{Binding OffSrTxBl}"
<TextBlock Text="{Binding OffsetGpBxLbl}"/> ParamTxBx="{Binding Path=OffSr,
</Expander.Header> UpdateSourceTrigger=PropertyChanged,
<UniformGrid Columns="1"> ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Row="0" <EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSrTxBl}" ParamTxBl="{Binding OffSlTxBl}"
ParamTxBx="{Binding Path=OffSr, ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Row="0" </UniformGrid>
ParamTxBl="{Binding OffSlTxBl}" </Expander>
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged, <Expander Style="{StaticResource ExpanderStyle}">
ValidatesOnDataErrors=True}" <Expander.Header>
Style="{DynamicResource StringParamV_Margin}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
</UniformGrid> <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}"/>
</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> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class StoneSawRoughingParameterExpanderV Public Class StoneSawRoughingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class StoneSawRoughingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class StoneSawRoughingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class StoneSawRoughingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,352 +1,341 @@
<UserControl x:Class="StoneSawingParameterExpanderV" <UserControl x:Class="StoneSawingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/> <EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> </UserControl.Resources>
<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="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> 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> </UniformGrid>
</StackPanel> <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
<StackPanel Name="AutomaticCloseExpanderStackPanel"> ParamChBx="{Binding Path=Invert,
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" UpdateSourceTrigger=PropertyChanged,
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> ValidatesOnDataErrors=True}"
<StackPanel> 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}"/>
<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 Header="{Binding AdvancedParamMsg}" Name="AdvancedParam" <UniformGrid Columns="2">
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> <TextBlock Text="{Binding UserNotesTxBl}"
<StackPanel> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
ParamTxBl="{Binding InitAngsTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
ParamTxBx="{Binding Path=InitAngs, <EgtWPFLib5:EgtTextBox.ToolTip>
UpdateSourceTrigger=PropertyChanged, <TextBlock Text="{Binding UserNotesTooltip}"/>
ValidatesOnDataErrors=True}" </EgtWPFLib5:EgtTextBox.ToolTip>
Style="{DynamicResource StringParamV_Margin}"/> </EgtWPFLib5:EgtTextBox>
<EgtWPFLib5:StringParamV <TextBlock Text="{Binding SystemNotesTxBl}"
ParamTxBl="{Binding BlockedAxisTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
ParamTxBx="{Binding Path=BlockedAxis, Visibility="{Binding SysNotes_Visibility}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
ValidatesOnDataErrors=True}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Style="{DynamicResource StringParamV_Margin}"/> Visibility="{Binding SysNotes_Visibility}"
<EgtWPFLib5:ComboParamV IsReadOnly="True"/>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </UniformGrid>
ParamCmBxList="{Binding Path=SolChoiceTypeList, </StackPanel>
UpdateSourceTrigger=PropertyChanged, <StackPanel Name="AutomaticCloseExpanderStackPanel">
ValidatesOnDataErrors=True, <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Mode=OneWay}" Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" <StackPanel>
Style="{DynamicResource ComboParamV_Margin}"/> <EgtWPFLib5:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
</StackPanel> ParamCmBxList="{Binding Path=WorkSideList,
</Expander> 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 Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
<Expander.Header> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<EgtWPFLib5:ComboParamV <Expander.Header>
ParamTxBl="{Binding LeadInTypeTxBl}" <UniformGrid Columns="2">
ParamCmBxList="{Binding Path=LeadInTypeList, <TextBlock Text="{Binding AdvancedParamMsg}"
UpdateSourceTrigger=PropertyChanged, Margin="2.5"/>
ValidatesOnDataErrors=True}" <Button Command="{Binding ShowNoteListComboCommand}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource ComboParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
</Expander.Header> ToolTip="{Binding ShowNoteToolTip}"
<StackPanel> Grid.Column="1"
<EgtWPFLib5:StringParamV HorizontalAlignment="Right"
ParamTxBl="{Binding StartAddLenTxBl}" Margin="2.5,2.5,7,2.5"
ParamTxBx="{Binding Path=StartAddLen, Width="20">
UpdateSourceTrigger=PropertyChanged, <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
ValidatesOnDataErrors=True}" </Button>
Style="{DynamicResource StringParamV_Margin}"/> </UniformGrid>
<EgtWPFLib5:StringParamV </Expander.Header>
ParamTxBl="{Binding LiTangStoneTxBl}" <Grid>
ParamTxBx="{Binding Path=LiTang, <Grid.RowDefinitions>
UpdateSourceTrigger=PropertyChanged, <RowDefinition Height="1*"/>
ValidatesOnDataErrors=True}" <RowDefinition Height="Auto"/>
Style="{DynamicResource StringParamV_Margin}"/> </Grid.RowDefinitions>
<EgtWPFLib5:StringParamV <StackPanel>
ParamTxBl="{Binding LiElevStoneTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
ParamTxBx="{Binding Path=LiElev, ParamTxBx="{Binding Path=InitAngs,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
</Expander> 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 Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamTxBl="{Binding LeadOutTypeTxBl}" ParamCmBxList="{Binding Path=LeadInTypeList,
ParamCmBxList="{Binding Path=LeadOutTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel>
<StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=StartAddLen,
ParamTxBl="{Binding EndAddLenTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=EndAddLen, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangStoneTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=LiTang,
</StackPanel> UpdateSourceTrigger=PropertyChanged,
</Expander> 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 Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding StepGpBxLbl}"/> <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
</Expander.Header> ParamCmBxList="{Binding Path=LeadOutTypeList,
<StackPanel> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:ComboParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding StepTypeTxBl}" ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
ParamCmBxList="{Binding Path=StepTypeList, Style="{DynamicResource ComboParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, </Expander.Header>
ValidatesOnDataErrors=True}" <StackPanel>
ParamCmBxSelIndex="{Binding Path=SelectedStepType}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
Style="{DynamicResource ComboParamV_Margin}"/> ParamTxBx="{Binding Path=EndAddLen,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding StepParTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=StepPar, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" </Expander>
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 Header="{Binding OffsetGpBxLbl}" <Expander Style="{StaticResource ExpanderStyle}">
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> <Expander.Header>
<StackPanel> <TextBlock Text="{Binding StepGpBxLbl}"/>
<EgtWPFLib5:StringParamV </Expander.Header>
ParamTxBl="{Binding OffsetSlTxBl}" <StackPanel>
ParamTxBx="{Binding Path=OffSl, <EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxList="{Binding Path=StepTypeList,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
</StackPanel> ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
</Expander> 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="{Binding OffsetGpBxLbl}"
<Expander.Header> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<TextBlock Text="{Binding ToolExpanderHeader}"/> <StackPanel>
</Expander.Header> <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
<StackPanel> ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:StringParamV <Expander Style="{StaticResource ExpanderStyle}">
ParamTxBl="{Binding SpeedTxBl}" <Expander.Header>
ParamTxBx="{Binding Path=Speed, <TextBlock Text="{Binding ToolExpanderHeader}"/>
UpdateSourceTrigger=PropertyChanged, </Expander.Header>
ValidatesOnDataErrors=True}" <StackPanel>
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBl="{Binding FeedTxBl}" ParamTxBx="{Binding Path=Speed,
ParamTxBx="{Binding Path=Feed, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=Feed,
ParamTxBl="{Binding TipFeedTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=TipFeed, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=TipFeed,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding StartFeedTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=StartFeed, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=StartFeed,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding EndFeedTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=EndFeed, <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=EndFeed,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding BackFeedTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding BackFeedTxBl}"
ParamTxBx="{Binding Path=BackFeed, ParamTxBx="{Binding Path=BackFeed,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngFeedTxBl}"
ParamTxBl="{Binding SideAngFeedTxBl}" ParamTxBx="{Binding Path=SideAngFeed,
ParamTxBx="{Binding Path=SideAngFeed, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> </StackPanel>
</StackPanel> </Expander>
</Expander> <Interactivity:Interaction.Behaviors>
<Interactivity:Interaction.Behaviors> <EgtCAM5:AutomaticCloseExpander/>
<EgtCAM5:AutomaticCloseExpander/> </Interactivity:Interaction.Behaviors>
</Interactivity:Interaction.Behaviors> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel>
</UserControl> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class StoneSawingParameterExpanderV Public Class StoneSawingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class StoneSawingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class StoneSawingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class StoneSawingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,286 +1,277 @@
<UserControl x:Class="SurfFinishingParameterExpanderV" <UserControl x:Class="SurfFinishingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/> <EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> </UserControl.Resources>
<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="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> 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"/>
</UniformGrid> </UniformGrid>
</StackPanel> <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
<StackPanel Name="AutomaticCloseExpanderStackPanel"> ParamChBx="{Binding Path=Invert,
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" UpdateSourceTrigger=PropertyChanged,
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> ValidatesOnDataErrors=True}"
<StackPanel> Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
ParamTxBl="{Binding StartPosTxBl}" ParamCmBxList="{Binding Path=SubTypeList,
ParamTxBx="{Binding Path=StartPos, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding OverLapTxBl}"
ParamTxBl="{Binding LeadLinkTypeTxBl}" ParamTxBx="{Binding Path=OverLap,
ParamCmBxList="{Binding Path=LeadLinkTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}" <UniformGrid Columns="2">
Style="{DynamicResource ComboParamV_Margin}"/> <TextBlock Text="{Binding UserNotesTxBl}"
<EgtWPFLib5:StringParamV Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
ParamTxBl="{Binding SideAngleTxBl}" <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
ParamTxBx="{Binding Path=SideAngle, Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox.ToolTip>
ValidatesOnDataErrors=True}" <TextBlock Text="{Binding UserNotesTooltip}"/>
Style="{DynamicResource StringParamV_Margin}"/> </EgtWPFLib5:EgtTextBox.ToolTip>
<EgtWPFLib5:StringParamV </EgtWPFLib5:EgtTextBox>
ParamTxBl="{Binding SideStepTxBl}" <TextBlock Text="{Binding SystemNotesTxBl}"
ParamTxBx="{Binding Path=SideStep, Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
UpdateSourceTrigger=PropertyChanged, Visibility="{Binding SysNotes_Visibility}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
<EgtWPFLib5:StringParamV Visibility="{Binding SysNotes_Visibility}"
ParamTxBl="{Binding OffsetSrTxBl}" IsReadOnly="True"/>
ParamTxBx="{Binding Path=OffSr, </UniformGrid>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" <StackPanel Name="AutomaticCloseExpanderStackPanel">
Style="{DynamicResource StringParamV_Margin}"/> <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
<EgtWPFLib5:StringParamV Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
ParamTxBl="{Binding ApproxTxBl}" <StackPanel>
ParamTxBx="{Binding Path=Approx, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=StartPos,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
</StackPanel> Style="{DynamicResource StringParamV_Margin}"/>
</Expander> <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" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:StringParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InitAngsTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamTxBx="{Binding Path=InitAngs, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource StringParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
<EgtWPFLib5:StringParamV ToolTip="{Binding ShowNoteToolTip}"
ParamTxBl="{Binding BlockedAxisTxBl}" Grid.Column="1"
ParamTxBx="{Binding Path=BlockedAxis, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
Style="{DynamicResource StringParamV_Margin}"/> <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
<EgtWPFLib5:ComboParamV </Button>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </UniformGrid>
ParamCmBxList="{Binding Path=SolChoiceTypeList, </Expander.Header>
UpdateSourceTrigger=PropertyChanged, <Grid>
ValidatesOnDataErrors=True, <Grid.RowDefinitions>
Mode=OneWay}" <RowDefinition Height="1*"/>
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" <RowDefinition Height="Auto"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Grid.RowDefinitions>
</StackPanel> <StackPanel>
</Expander> <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 Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamTxBl="{Binding LeadInTypeTxBl}" ParamCmBxList="{Binding Path=LeadInTypeList,
ParamCmBxList="{Binding Path=LeadInTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel>
<StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=LiTang,
ParamTxBl="{Binding LiTangTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=LiTang, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiPerpTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=LiPerp,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding LiPerpTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=LiPerp, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" </Expander>
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamTxBl="{Binding LeadOutTypeTxBl}" ParamCmBxList="{Binding Path=LeadOutTypeList,
ParamCmBxList="{Binding Path=LeadOutTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel>
<StackPanel> <EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=LoTang,
ParamTxBl="{Binding LoTangTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=LoTang, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LoPerpTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=LoPerp,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding LoPerpTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=LoPerp, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" </Expander>
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header> </Expander.Header>
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBl="{Binding SpeedTxBl}" ParamTxBx="{Binding Path=Speed,
ParamTxBx="{Binding Path=Speed, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=Feed,
ParamTxBl="{Binding FeedTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=Feed, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=TipFeed,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding TipFeedTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=TipFeed, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=StartFeed,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding StartFeedTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=StartFeed, <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=EndFeed,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding EndFeedTxBl}" </StackPanel>
ParamTxBx="{Binding Path=EndFeed, </Expander>
UpdateSourceTrigger=PropertyChanged, <Interactivity:Interaction.Behaviors>
ValidatesOnDataErrors=True}" <EgtCAM5:AutomaticCloseExpander/>
Style="{DynamicResource StringParamV_Margin}"/> </Interactivity:Interaction.Behaviors>
</StackPanel> </StackPanel>
</Expander> </StackPanel>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class SurfFinishingParameterExpanderV Public Class SurfFinishingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class SurfFinishingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class SurfFinishingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class SurfFinishingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -0,0 +1,282 @@
<UserControl x:Class="SurfRoughingParameterExpanderV"
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:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
</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,353 +1,349 @@
<UserControl x:Class="WaterjettingParameterExpanderV" <UserControl x:Class="WaterjettingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <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>
<StackPanel Name="OperationParametersStackPanel"> <StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamTxBl="{Binding InvertTxBl}" ParamChBx="{Binding Path=Invert,
ParamChBx="{Binding Path=Invert, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource CheckParamV_Margin}"/>
Style="{DynamicResource CheckParamV_Margin}"/> <EgtWPFLib5:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
<EgtWPFLib5:ComboParamV ParamCmBxList="{Binding Path=WorkSideList,
ParamTxBl="{Binding WorkSideTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamCmBxList="{Binding Path=WorkSideList, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
ValidatesOnDataErrors=True}" Style="{DynamicResource ComboParamV_Margin}"/>
ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding ForwardAngleTxBl}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV
ParamTxBl="{Binding ForwardAngleTxBl}"
ParamTxBx="{Binding Path=ForwardAngle, ParamTxBx="{Binding Path=ForwardAngle,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}" <TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox.ToolTip> <EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/> <TextBlock Text="{Binding UserNotesTooltip}"/>
</EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox> </EgtWPFLib5:EgtTextBox>
<TextBlock Text="{Binding SystemNotesTxBl}" <TextBlock Text="{Binding SystemNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Visibility="{Binding SysNotes_Visibility}"/> Visibility="{Binding SysNotes_Visibility}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Visibility="{Binding SysNotes_Visibility}" Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/> IsReadOnly="True"/>
</UniformGrid> </UniformGrid>
</StackPanel> </StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBl="{Binding SideAngleTxBl}" ParamTxBx="{Binding Path=SideAngle,
ParamTxBx="{Binding Path=SideAngle, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> </StackPanel>
</StackPanel> </Expander>
</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}"/>
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
ParamTxBl="{Binding LiHoleRadTxBl}" Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
ParamTxBx="{Binding Path=LiHoleRad, <Expander.Header>
UpdateSourceTrigger=PropertyChanged, <UniformGrid Columns="2">
ValidatesOnDataErrors=True}" <TextBlock Text="{Binding AdvancedParamMsg}"
Style="{DynamicResource StringParamV_Margin}"/> 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" <Expander Style="{StaticResource ExpanderStyle}">
ParamTxBl="{Binding LpTurnsTxBl}" <Expander.Header>
ParamTxBx="{Binding Path=LpTurns, <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxList="{Binding Path=LeadInTypeList,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> 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" <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
ParamTxBl="{Binding HpTurnsTxBl}" ParamTxBx="{Binding Path=LiTang,
ParamTxBx="{Binding Path=HpTurns, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiPerpTxBl}"
<Expander.Header> ParamTxBx="{Binding Path=LiPerp,
<EgtWPFLib5:ComboParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding LeadOutTypeTxBl}" ValidatesOnDataErrors=True}"
ParamCmBxList="{Binding Path=LeadOutTypeList, Style="{DynamicResource StringParamV_Margin}"/>
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 Header="{Binding AnglesGpBxLbl}" <EgtWPFLib5:CheckParamV Grid.Column="0" Grid.Row="0"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> ParamTxBl="{Binding LiHoleTxBl}"
<StackPanel> ParamChBx="{Binding Path=LiHole,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0"
ParamTxBl="{Binding ExtCornTypeTxBl}" ParamTxBl="{Binding LiHoleRadTxBl}"
ParamCmBxList="{Binding Path=ExtCornTypeList, ParamTxBx="{Binding Path=LiHoleRad,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtCornType}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1"
ParamTxBl="{Binding IntCornTypeTxBl}" ParamTxBl="{Binding LpTurnsTxBl}"
ParamCmBxList="{Binding Path=IntCornTypeList, ParamTxBx="{Binding Path=LpTurns,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedIntCornType}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="1"
ParamTxBl="{Binding CornSlowLenTxBl}" ParamTxBl="{Binding HpTurnsTxBl}"
ParamTxBx="{Binding Path=CornSlowLen, ParamTxBx="{Binding Path=HpTurns,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<EgtWPFLib5:StringParamV <Expander Style="{StaticResource ExpanderStyle}">
ParamTxBl="{Binding CornSlowPercTxBl}" <Expander.Header>
ParamTxBx="{Binding Path=CornSlowPerc, <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxList="{Binding Path=LeadOutTypeList,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
</StackPanel> ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
</Expander> 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="{Binding AnglesGpBxLbl}"
<Expander.Header> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<EgtWPFLib5:CheckParamV <StackPanel>
ParamTxBl="{Binding ProbingGpBxLbl}"
ParamChBx="{Binding Path=Probing, <EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtCornTypeTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamCmBxList="{Binding Path=ExtCornTypeList,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource CheckParamV_Margin}"/> ValidatesOnDataErrors=True}"
</Expander.Header> ParamCmBxSelIndex="{Binding Path=SelectedExtCornType}"
<StackPanel Margin="2"> Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0"
ParamTxBl="{Binding ProbingMinDistTxBl}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding IntCornTypeTxBl}"
ParamTxBx="{Binding Path=ProbingMinDist, ParamCmBxList="{Binding Path=IntCornTypeList,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> ParamCmBxSelIndex="{Binding Path=SelectedIntCornType}"
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1" Style="{DynamicResource ComboParamV_Margin}"/>
ParamTxBl="{Binding ProbingMaxDistTxBl}"
ParamTxBx="{Binding Path=ProbingMaxDist, <EgtWPFLib5:StringParamV ParamTxBl="{Binding CornSlowLenTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=CornSlowLen,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
</StackPanel> Style="{DynamicResource StringParamV_Margin}"/>
</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: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> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class WaterjettingParameterExpanderV Public Class WaterjettingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class WaterjettingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class WaterjettingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class WaterjettingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -1,220 +1,225 @@
<UserControl x:Class="WoodDrillingParameterExpanderV" <UserControl x:Class="WoodDrillingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources> <UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/> <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>
<StackPanel Name="OperationParametersStackPanel"> <StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel"> <StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/> <TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}" Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamTxBl="{Binding InvertTxBl}" ParamChBx="{Binding Path=Invert,
ParamChBx="{Binding Path=Invert, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource CheckParamV_Margin}"/>
Style="{DynamicResource CheckParamV_Margin}"/> <UniformGrid Columns="2">
<UniformGrid Columns="2"> <TextBlock Text="{Binding UserNotesTxBl}"
<TextBlock Text="{Binding UserNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> <EgtWPFLib5:EgtTextBox.ToolTip>
<EgtWPFLib5:EgtTextBox.ToolTip> <TextBlock Text="{Binding UserNotesTooltip}"/>
<TextBlock Text="{Binding UserNotesTooltip}"/> </EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox>
</EgtWPFLib5:EgtTextBox> <TextBlock Text="{Binding SystemNotesTxBl}"
<TextBlock Text="{Binding SystemNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" Visibility="{Binding SysNotes_Visibility}"/>
Visibility="{Binding SysNotes_Visibility}"/> <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}" Visibility="{Binding SysNotes_Visibility}"
Visibility="{Binding SysNotes_Visibility}" IsReadOnly="True"/>
IsReadOnly="True"/>
</UniformGrid> </UniformGrid>
</StackPanel> </StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBl="{Binding StartPosTxBl}" ParamTxBx="{Binding Path=StartPos,
ParamTxBx="{Binding Path=StartPos, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding ReturnPosTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=ReturnPos,
ParamTxBl="{Binding ReturnPosTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=ReturnPos, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding ThrouAddLenTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=ThrouAddLen,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding ThrouAddLenTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=ThrouAddLen, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=StepPar,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding StepParTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=StepPar, <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartSlowLenTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=StartSlowLen,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding StartSlowLenTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndSlowLenTxBl}"
ParamTxBx="{Binding Path=StartSlowLen, ParamTxBx="{Binding Path=EndSlowLen,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV </StackPanel>
ParamTxBl="{Binding EndSlowLenTxBl}" </Expander>
ParamTxBx="{Binding Path=EndSlowLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AdvancedParamMsg}" Name="AdvancedParam" <Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <Expander.Header>
<EgtWPFLib5:StringParamV <UniformGrid Columns="2">
ParamTxBl="{Binding InitAngsTxBl}" <TextBlock Text="{Binding AdvancedParamMsg}"
ParamTxBx="{Binding Path=InitAngs, Margin="2.5"/>
UpdateSourceTrigger=PropertyChanged, <Button Command="{Binding ShowNoteListComboCommand}"
ValidatesOnDataErrors=True}" IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Style="{DynamicResource StringParamV_Margin}"/> Visibility="{Binding ShowNoteListCombo_Visibility}"
<EgtWPFLib5:StringParamV ToolTip="{Binding ShowNoteToolTip}"
ParamTxBl="{Binding BlockedAxisTxBl}" Grid.Column="1"
ParamTxBx="{Binding Path=BlockedAxis, HorizontalAlignment="Right"
UpdateSourceTrigger=PropertyChanged, Margin="2.5,2.5,7,2.5"
ValidatesOnDataErrors=True}" Width="20">
Style="{DynamicResource StringParamV_Margin}"/> <Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
<EgtWPFLib5:ComboParamV </Button>
ParamTxBl="{Binding SolChoiceTypeTxBl}" </UniformGrid>
ParamCmBxList="{Binding Path=SolChoiceTypeList, </Expander.Header>
UpdateSourceTrigger=PropertyChanged, <Grid>
ValidatesOnDataErrors=True, <Grid.RowDefinitions>
Mode=OneWay}" <RowDefinition Height="1*"/>
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}" <RowDefinition Height="Auto"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Grid.RowDefinitions>
</StackPanel> <StackPanel>
</Expander> <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> </UserControl>
@@ -1,19 +1,18 @@
Imports EgtWPFLib5 Imports EgtWPFLib5.EgtFloating
Imports EgtWPFLib5.EgtFloating
Public Class WoodDrillingParameterExpanderV Public Class WoodDrillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me) m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me) EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False m_bFirst = False
End If End If
@@ -22,7 +21,7 @@ Public Class WoodDrillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False 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 If m_bSizeChanging Then Return
m_bSizeChanging = True m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight() CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +31,7 @@ Public Class WoodDrillingParameterExpanderV
Dim PanelHeight As Double = 0 Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight() Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0 Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean) Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +53,7 @@ Public Class WoodDrillingParameterExpanderV
OpenedExpanderList.Add(False) OpenedExpanderList.Add(False)
End If End If
Next Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1 For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then

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