Compare commits

..

332 Commits

Author SHA1 Message Date
Demetrio Cassarino 9d8188521e -aggiunto finestra per esecuzione script lua 2025-12-02 12:36:00 +01:00
Dario Sassi 18de1a1ab7 Merge commit '0a7f87291265ab5ce05d06d9a6d2a7cfd999331f' 2025-11-24 14:33:30 +01:00
Demetrio Cassarino 0a7f872912 -aggiunto focus quando viene mostrata la textbox per inserire la info 2025-11-24 10:13:20 +01:00
Dario Sassi 84b2edd17a EgtCAM5 :
- piccola modifica in simulazione per gestire Flag=12 quasi come 11 (pausa richiesta da sotto).
2025-11-17 14:46:28 +01:00
Dario Sassi 7a8c883259 Merge commit '4f06a19553216a32731114b29b8f7ea5e61d9b22' 2025-11-10 12:15:01 +01:00
Demetrio Cassarino 4f06a19553 -aggiunto controllo su textbox e combobox su stessa info 2025-11-10 12:14:14 +01:00
Dario Sassi 3a7152066b Merge commit '2ce61cd5abfa06958f356ccea4ffad624acd7b8c' 2025-11-10 11:53:54 +01:00
Demetrio Cassarino 2ce61cd5ab -inserito controllo su terminazione stringa 2025-11-10 11:50:33 +01:00
Demetrio Cassarino 50ad698187 -implementato a capo quando viene inserito un testo oltre al valore della combobox 2025-11-10 11:46:04 +01:00
Dario Sassi 85591b39a7 Merge commit '18be9679c5562c309852bfeac06670dea4dfec66' 2025-11-10 11:22:14 +01:00
Demetrio Cassarino 18be9679c5 -sistemata gestione combobox info
-camboata visualizzazione info combobox
2025-11-10 10:26:28 +01:00
Demetrio Cassarino 2c9061619a Merge commit '575bcc02d0c676f3cb82f6b4f7694e03a59f7ac2' into features/AddGetAllInfo 2025-11-10 08:06:52 +01:00
Dario Sassi 575bcc02d0 EgtCAM5 :
- gestione metacomando da Info in PrepareInputBox.
2025-11-09 22:56:01 +01:00
Dario Sassi e965ceb26c EgtCAM5 :
- aggiunto controllo su vettore Info già presenti introdotto in precedente modifica.
2025-11-08 12:17:31 +01:00
Dario Sassi 0c18c822f1 Merge commit 'e6d85c573af905010347a23c874351c984d03529' 2025-11-07 17:01:36 +01:00
Demetrio Cassarino e6d85c573a -aggiornamento versione 2025-11-07 14:34:03 +01:00
Demetrio Cassarino 592e7161ce EgtCAM5 2.7k2
-aggiunto in inputexpander possibilità di visualizzare tutte le info presenti una combobox
2025-11-07 14:29:27 +01:00
Dario Sassi 08c4d9c7b9 EgtCAM5 :
- nell'ordine del TopTray il gruppo di bottoni Special è stato portato alla fine.
2025-11-02 11:10:41 +01:00
Dario Sassi 4ae5efb94b EgtCAM5 2.7k1 :
- possibilità di comandi speciali con indice non consecutivo (1-99 standard, 101-199 avanzati solo per utenti interni).
2025-10-31 15:32:00 +01:00
Dario Sassi 69261c7c73 EgtCAM5 2.7j2 :
- ricompilazione con cambio versione.
2025-10-31 09:19:58 +01:00
Dario Sassi 361dc20f9b EgtCAM5 :
- tolto import inutile.
2025-10-27 17:24:55 +01:00
Dario Sassi 95d1e4b5ac EgtCAM5 :
- in disposizione possibilità di modificare altezza sottopezzo (parametro Z di movimento grezzo).
2025-10-27 17:15:49 +01:00
Dario Sassi 621a31931c EgtCAM5 :
- piccole migliorie in dialogo disposizione.
2025-10-26 19:26:00 +01:00
Dario Sassi 4f7dd6ef17 EgtCAM5 :
- in ProcessEvents quando nPause vale -1 si forza un ridisegno.
2025-10-13 08:51:05 +02:00
Dario Sassi 722e0c243d EgtCAM5 2.7j1 :
- ricompilazione con cambio versione.
2025-10-11 12:41:47 +02:00
Dario Sassi 921e681759 EgtCAM5 :
- correzione gestione LinkType per sgrossature con lama.
2025-09-30 08:30:21 +02:00
Dario Sassi d065c0beeb EgtCAM5 2.7i2 :
- se macchina di tipo Stone ora possibile modifica in configurazione di parametri per archi con lama.
2025-09-29 10:54:12 +02:00
Dario Sassi f8ea19537a EgtCAM5 :
- gestione opzioni visualizzazione Zmap da interfaccia (solo per utenti interni ovvero UserLevel > 5).
2025-09-19 18:54:45 +02:00
Daniele Bariletti 289a6b1608 EgtCAM5 :
- aggiunta modalità bonus per analizza su una trimesh: visualizzazione del triangolo selezionato e del suo id.
2025-09-17 11:26:12 +02:00
Dario Sassi f6baeb6afc EgtCAM5 2.7i1 :
- piccola semplificazione per cambio font di default.
2025-09-11 15:24:19 +02:00
Dario Sassi 9fa231f68a EgtCAM5 :
- corretta impostazione all'avvio dello spessore delle linee.
2025-08-28 09:56:21 +02:00
Dario Sassi bba92a4980 EgtCAM5 :
- modifiche per impostazione qualità di visualizzazione superfici (con eliminazione SmoothTriMesh/ShowTriaAdv).
2025-08-24 19:18:58 +02:00
Dario Sassi cfaf513a91 EgtCAM5 2.7h1 :
- ricompilazione con cambio versione.
2025-08-01 09:56:27 +02:00
Dario Sassi 8d33111af2 Merge commit 'fd565e96cc9495985b0cb8fe57700b6f924c18da' 2025-08-01 08:32:05 +02:00
Demetrio Cassarino fd565e96cc -aggiunto campo combobox in note lavorazione 2025-07-31 15:32:38 +02:00
Dario Sassi b7628fff66 EgtCAM5 2.7g2 :
- aggiunto comando per creare curve di Bezier polinomiali di grado 3 con modalità simili ai BiArchi.
2025-07-21 13:12:35 +02:00
Dario Sassi cd3c90764e EgtCAM5 :
- in comandi disegno 2d separati bottoni Arc3R e Arc2PR e aggiunto bottone BiArc.
2025-07-18 18:46:23 +02:00
Dario Sassi 0db2ce6b91 EgtCAM5 2.7g1 :
- piccola correzione in simulazione per Trace.
2025-07-14 15:11:17 +02:00
Dario Sassi 993e7e86a2 EgtCAM5 2.7f2 :
- modifiche per aggiunta utensile di tipo Probe e lavorazione Probing.
2025-06-10 18:38:46 +02:00
Dario Sassi e335308709 EgtCAM5 2.7f1 :
- aggiunta in simulazione eventuale check per traccia utensile.
2025-06-08 19:26:48 +02:00
Dario Sassi 4c13cdb8f4 EgtCAM5 2.7e4 :
- sistemato messaggio segnalazione problema generico in aggiornamento lavorazioni.
2025-05-30 08:23:40 +02:00
Dario Sassi 9b06802cf9 EgtCAM5 2.7e3 :
- ricompilazione con cambio versione.
2025-05-25 18:51:56 +02:00
Demetrio Cassarino caf4fbcff9 -aggiunto flag 8 2025-05-22 15:13:09 +02:00
Demetrio Cassarino 218eeaffe8 -aggiunto flag 8 CheckNoSim per beamwall 2025-05-22 12:08:36 +02:00
Dario Sassi 03509c7022 EgtCAM5 2.7e2 :
- ricompilazione con cambio versione.
2025-05-21 18:51:05 +02:00
Dario Sassi 6a600e632d EgtCAM5 2.7e1 :
- gestione di un eventuale supporto del pezzo in disposizione.
2025-05-05 08:05:13 +02:00
Dario Sassi b866cd273e EgtCAM5 2.7d2 :
- aggiunti maggiori controlli in aggiornamento macchine.
2025-04-24 07:47:58 +02:00
Dario Sassi 7be4dd9c75 EgtCAM5 :
- aggiunta gestione estensione partprogram da file Ini di macchina ([PartProgram] Extension=.XXX).
2025-04-15 16:27:16 +02:00
Dario Sassi 1d156eddc1 EgtCAM5 :
- in lavorazioni quando si seleziona una faccia oltre al contorno in rosso si visualizza una sferetta sulla curva di indice 0
- eliminata gestione tipi "dr", "lr" e "sr" da Parametri Avanzati in UserNotes perchè inutili
- semplificato lancio Aggiornamento Lavorazioni tenendo conto delle modifiche fatte alle librerie sottostanti.
2025-04-07 12:01:25 +02:00
Dario Sassi 726afaa58d EgtCAM5 2.7d1 :
- in Finestra Opzioni aggiunto bottone aggiorna per Doors.
2025-04-03 16:05:59 +02:00
Dario Sassi d1592cce43 Merge commit 'dc6c075508ba6d26d04fa2c34a14364e73b8ac62' 2025-03-27 16:25:18 +01:00
Demetrio Cassarino dc6c075508 -sistemato accensione lampade su pulsante aggiorna 2025-03-27 16:20:24 +01:00
Dario Sassi f126f72c3b Merge commit '2735c66b11e13c5d7e7edd4fbdd5ce951ed20588' 2025-03-26 15:32:15 +01:00
Demetrio Cassarino 2735c66b11 -sistemato gestione lampadina da simulazione a operazioni 2025-03-26 15:05:43 +01:00
Dario Sassi a4b48377c7 Merge commit 'bc22e32821b4c425a30cca48868e20d88a0b554c' 2025-03-26 08:48:06 +01:00
Demetrio Cassarino bc22e32821 -aggiunto lampadina per lavorazioni per permettere la possbilità di spegnere la lavorazione 2025-03-26 08:24:39 +01:00
Dario Sassi 5624f05ad6 EgtCAM5 :
- eliminato Imports System.Windows.Forms.AxHost inutili (impedisce il riconoscimento della pressione del tasto CTRL in OnMouseSelectedPoint)
- corretta gestione marcatura oggetti su espansione albero entità.
2025-03-22 15:15:03 +01:00
Dario Sassi 0c68d8c142 EgtCAM5 :
- correzioni per ripristinare la selezione multipla di oggetti.
2025-03-22 11:03:11 +01:00
Dario Sassi e2480dcf1d EgtCAM5 2.7c2 :
- ricompilazione con cambio versione.
2025-03-21 19:06:29 +01:00
Dario Sassi cc63f278c6 Merge commit '54360bbccfcda35fbd2251b3ef6f2e3844d3cce4' 2025-03-21 18:55:50 +01:00
Demetrio Cassarino 54360bbccf -piccola modifca su inserimento note aggiunto ctrl+v 2025-03-21 11:15:44 +01:00
Demetrio Cassarino c71d7c84f7 Merge commit '9e9aad2eedf58f8dc9c14020f37af944aefc2e07' into feature/cw_ccw 2025-03-21 11:11:17 +01:00
Dario Sassi 9e9aad2eed EgtCAM5 :
- sistemata dipendenza nuova lavorazione 5assi da opzione chiave AdvancedMachinings.
2025-03-17 08:47:28 +01:00
Demetrio Cassarino a2a1b83888 Merge commit 'f44ae792c680605815a4359a0f9f3875e46ecda4' into feature/cw_ccw 2025-03-17 08:13:20 +01:00
Dario Sassi f44ae792c6 EgtCAM5 2.7c1 :
- modifica per esecuzione da Door con calcolo lavorazioni, simulazione e generazione CN (ora va in modalità Lavora).
2025-03-09 23:16:13 +01:00
Dario Sassi 4692bd0308 EgtCAM5 2.7b3 :
- modifiche varie per gestione import/insert del formato PLY.
2025-03-02 19:48:58 +01:00
Demetrio Cassarino 2e863c0ce2 Merge commit '34fa0909ab04096a26a602142ebd8b6bd6da80e5' into feature/cw_ccw 2025-02-10 12:49:54 +01:00
Emmanuele Sassi 1735e281e5 Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2025-02-06 10:42:57 +01:00
Emmanuele Sassi 125e7346d4 EgtCAM5 2.7b1 :
- Modifiche ad MTable
2025-02-06 10:42:23 +01:00
Emmanuele Sassi bd3cdf7ea0 - aggiunta selezione multipla su MTable
- aggiunto bottone link in MTable
- aggiunto sposta con salto in MTable
2025-02-06 10:38:07 +01:00
Dario Sassi d90a49248f EgtCAM5 :
-in disposizione attivato comando cancella grezzo.
2025-02-03 08:19:18 +01:00
Dario Sassi 3833b7c7c5 EgtCAM5 :
- in simulazione se programma minimizzato per velocizzare non si fa eseguire aggiornamento scena
- in disposizione sistemato conteggio bloccaggi utilizzati all'ingresso.
2025-02-02 13:05:31 +01:00
Dario Sassi 89b063b92f EgtCAM5 2.7a3 :
- in Disposizione modifiche per impostazione eventuale asse di tavola cui è agganciato il bloccaggio.
2025-01-31 16:15:20 +01:00
Dario Sassi df26bef2aa EgtCAM5 2.7a2 :
- piccola modifica per consentire di importare BTL con feature Variant definite tramite script lua.
2025-01-22 12:19:33 +01:00
Emmanuele Sassi 5cddbffb45 - aggiunta colonna link in Mtable 2025-01-20 10:31:02 +01:00
Dario Sassi 2daa33ba91 EgtCAM5 :
- aggiunto controllo validità oggetto nella gestione del tasto ESC.
2025-01-13 08:47:19 +01:00
Dario Sassi f83e8294bc EgtCAM5 2.7a1 :
- ricompilazione con cambio versione.
2025-01-10 17:30:29 +01:00
Dario Sassi 1dfc46e6ce Merge commit 'd7df513bf73ef06753dcb395cab2c2f1ff3b579f' 2025-01-10 16:46:11 +01:00
Demetrio Cassarino d7df513bf7 -aggiunto su selezione escape la possibilità di nascondere combobox note 2025-01-08 11:16:34 +01:00
Demetrio Cassarino 8aac3ea989 -aggiunto in errore macchina immagine di errrore 2024-12-19 11:52:20 +01:00
Demetrio Cassarino a514a70b5b Merge commit 'cf86b93725eb304415c0c3cd7ade9d2f6c8e404f' into feature/cw_ccw 2024-12-19 11:37:12 +01:00
Dario Sassi cf86b93725 EgtCAM5 2.6l3 :
- aggiunta gestione flag in import 3MF per mantenere la struttura gerarchica dei pezzi nel file (1) oppure no (0).
2024-12-17 10:27:24 +01:00
Dario Sassi fef104b371 EgtCAM5 2.6l1 :
- aggiunta gestione importazione formato OFF.
2024-11-29 19:00:25 +01:00
Dario Sassi afe756aada EgtCAM5 2.6k2 :
- ora al passaggio a LAVORA se c'è già un gruppo corrente si attiva quello, altrimenti il primo.
2024-11-20 19:56:07 +01:00
Demetrio Cassarino 34fa0909ab -aggiunto pulsante per info già presenti
-aggiunto selezione in scena e apertura in albero
-sitemato accensione luce
2024-11-20 08:10:50 +01:00
Dario Sassi 7954077676 EgtCAM5 :
- entrando in LAVORA si rende corrente la prima macchinata (anziché l'ultima).
2024-11-18 19:18:53 +01:00
Dario Sassi 60673cd9e3 EgtCAM5 2.6k1 :
- ricompilazione con cambio versione.
2024-11-16 11:16:28 +01:00
Dario Sassi 9d62cf6b99 EgtCAM5 :
- miglioramenti spostamento grezzi con morse.
2024-10-31 18:34:30 +01:00
Dario Sassi 6e2c4d8b35 EgtCAM5 2.6j3 :
- migliorie e correzioni per disposizioni con pianetti di lavoro.
2024-10-31 11:42:46 +01:00
Dario Sassi d8bff8ac9e EgtCAM5 :
- migliorie e correzioni per disposizione con piani di lavoro (bancaletti).
2024-10-20 22:29:57 +02:00
Dario Sassi 0926456513 EgtCAM5 :
- in nuova fase si conserva anche la posizione assi di disposizione della fase precedente.
2024-10-16 19:52:44 +02:00
Dario Sassi bf424a49e1 EgtCAM5 :
- ulteriori modifiche in disposizione con piani di lavoro (bancaletti).
2024-10-16 14:56:05 +02:00
Dario Sassi be4bc812da EgtCAM5 :
- in disposizione modificata gestione punti di aggancio (HOOK) e aggiunta gestione movimento barre e carrelli con memoria.
2024-10-15 17:39:55 +02:00
Dario Sassi ce18ea3ade EgtCAM5 2.6j2 :
- aggiustamenti in Disposizione per posizionamento Fixtures su tavole a bancaletti.
2024-10-15 10:54:02 +02:00
Dario Sassi 931c96a587 EgtCAM5 2.6j1 :
- ricompilazione con cambio versione.
2024-10-10 15:48:25 +02:00
Demetrio Cassarino a662d1dca2 -aggiunto multi riga su info 2024-10-09 14:42:27 +02:00
Demetrio Cassarino e5a32f9c21 Merge remote-tracking branch 'origin/master' into feature/cw_ccw 2024-10-01 14:13:55 +02:00
Dario Sassi 5e53f20fec EgtCAM5 :
- aggiunta gestione messaggi lavorazioni avanzate non abilitate in simulazione, stima e generazione
- piccola miglioria in default VMillQuality se non trovata in Ini file.
2024-10-01 13:10:43 +02:00
Dario Sassi 44e919c134 Merge commit '52c4b2c4240e62fc5e4c57e01bb8939f7fcdf7c1' 2024-09-30 19:41:34 +02:00
Demetrio Cassarino 52c4b2c424 -rinominato valori qualità 2024-09-30 16:10:01 +02:00
Demetrio Cassarino 53fb9b3416 -piccola modifica su finestra vm 2024-09-30 16:03:36 +02:00
Dario Sassi 0c7718d91d Merge commit '0fed5c356f0762f8c61271748f9146fc85dfb228' 2024-09-30 15:42:50 +02:00
Demetrio Cassarino 0fed5c356f -piccola modifica al vm 2024-09-30 15:31:21 +02:00
Demetrio Cassarino 2b6e4c36df Merge remote-tracking branch 'origin/master' into feature/cw_ccw 2024-09-30 15:13:23 +02:00
Dario Sassi cdc9caf4ee EgtCAM5 :
- piccole modifiche in Opzioni per qualità VM.
2024-09-30 15:10:26 +02:00
Dario Sassi 5970a97c15 Merge commit 'bfc4af4c1eb5995199fc32960aacf8c918aea468' 2024-09-30 14:52:56 +02:00
Demetrio Cassarino bfc4af4c1e -aggiunto in opzioni virtualmillingquality 2024-09-30 10:08:44 +02:00
Demetrio Cassarino 07f51ed6cd Merge remote-tracking branch 'origin/master' into feature/cw_ccw 2024-09-30 08:40:55 +02:00
Dario Sassi 5490884eb4 EgtCAM5 :
- migliorata gestione anteprima utensile in lavorazione con frecce senza focus.
2024-09-25 09:23:02 +02:00
Dario Sassi 62803684c4 Merge commit '99333a0bbe9034cc37571f5594aec375fb26162d' 2024-09-23 08:31:37 +02:00
Dario Sassi 11316a5a5c EgtCAM5 2.6i1 :
- ricompilazione con cambio versione.
2024-09-21 11:54:28 +02:00
Demetrio Cassarino 99333a0bbe -aggiunto spostamento slider quando gli viene settato il focus 2024-09-20 14:42:04 +02:00
Demetrio Cassarino 3446cbd3c9 -aggiunto reset slider alla selezione singola della lavorazione 2024-09-17 15:21:13 +02:00
Dario Sassi c5fe1bc7b9 EgtCAM5 :
- modifiche per poter impostare da INI colore di Mark tipo 2.
2024-08-22 09:23:32 +02:00
Dario Sassi a1569b4cd8 EgtCAM5 2.6h2 :
- aggiunta gestione Analisi anche per superfici di tipo Region.
2024-08-21 14:42:18 +02:00
Dario Sassi 5f669acc74 EgtCAM5 2.6h1 :
- ricompilazione con cambio versione.
2024-08-07 09:48:49 +02:00
Dario Sassi e0b69567e3 EgtCAM5 2.6g7 :
- modifica per entrare da TS3 modalità Vista con Simulazione non bloccata anche per pareti (precedente era valida solo per travi).
2024-07-31 20:31:39 +02:00
Dario Sassi 8c45250a6f EgtCAM5 2.6g6 :
- modifiche per consentire feedback anche in Simulazione (solo se progetto non è da salvare)
- modifica per entrare da TS3 modalità Vista con Simulazione non bloccata.
2024-07-29 11:52:20 +02:00
Dario Sassi ef4ad38d23 EgtCAM5 :
- se lanciato in modalità Simulazione da TS3 ora si può solo simulare ed uscire dal programma.
2024-07-22 20:15:24 +02:00
Dario Sassi 85de8e95a5 EgtCAM5 2.6g5 :
- ricompilazione con cambio versione.
2024-07-22 18:13:57 +02:00
Dario Sassi 4387d75ee7 Merge commit 'ddf1f320c5462e921bc269593eb58484c80d418a' 2024-07-22 17:39:27 +02:00
Demetrio Cassarino ddf1f320c5 -riferimento a lavorazione 2024-07-22 17:24:53 +02:00
Dario Sassi 9f33d1b236 Merge commit '24607ec445d01fe6dc9ea817bdc04af3e1200888' 2024-07-16 08:45:33 +02:00
Demetrio Cassarino 60f035991d -rivisto evento per mettere il focus sullo slider 2024-07-15 10:44:25 +02:00
Demetrio Cassarino 24607ec445 -aggiunto possibilita' di portare il focus sullo slider con tutte e 4 le frecce 2024-07-12 15:30:25 +02:00
Demetrio Cassarino d75250d5f9 Merge remote-tracking branch 'origin/master' into feature/Note_Utensile 2024-07-12 15:23:00 +02:00
Dario Sassi be5985cfcd EgtCAM5 :
- aggiunto Zoom All passando da un gruppo di lavoro all'altro.
2024-07-12 15:16:16 +02:00
Dario Sassi 6aa7e850e8 Merge commit '9833802aedba444d8e92c257f303c6458f012c2f' 2024-07-12 15:07:31 +02:00
Demetrio Cassarino 9833802aed -aggiunto focus su slider 2024-07-12 12:56:27 +02:00
Dario Sassi 47aacebd3a Merge commit '62a9dd20488474796a33ff9b77ecab41294db8ba' 2024-07-11 17:17:06 +02:00
Demetrio Cassarino 62a9dd2048 -aggiunto al checkbox note updatesurcetrigger 2024-07-11 17:15:05 +02:00
Demetrio Cassarino 220d70013f Merge remote-tracking branch 'origin/master' into feature/Note_Utensile 2024-07-11 08:57:04 +02:00
Emmanuele Sassi 1633ed140d Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2024-07-09 14:42:25 +02:00
Emmanuele Sassi 07634b79b4 - correzione funzionamento MTable con due macchine 2024-07-09 14:41:29 +02:00
Dario Sassi c5e367e41c EgtCAM5 2.6g1 :
- ricompilazione con cambio versione.
2024-07-01 18:07:43 +02:00
Dario Sassi 3f487c7328 EgtCAM5 2.6f4 :
- ricompilazione con cambio versione.
2024-06-24 16:15:45 +02:00
Dario Sassi 639834d797 Merge commit '7a0a5048765a1371f8ef3914b79829173dacaf4b' 2024-06-24 16:10:09 +02:00
Demetrio Cassarino 7a0a504876 -aggiunto controllo su recalc per valori note ricalcolo 2024-06-24 15:59:19 +02:00
Dario Sassi 3253b7b8d4 EgtCAM5 :
- sistemazione parametri lavorazione sgrossatura superfici.
2024-06-06 12:23:46 +02:00
Dario Sassi a4b3fa8c28 Merge commit '841dce8d7291fb90f3cab903463f8680942a69f0' 2024-06-06 11:45:22 +02:00
Demetrio Cassarino 841dce8d72 -aggiunto parametro substep 2024-06-06 10:15:09 +02:00
Demetrio Cassarino e62b6aaccc Merge remote-tracking branch 'origin/master' into feature/Lavorazione_5_assi 2024-06-05 17:15:46 +02:00
Dario Sassi ad7b0ed010 EgtCAM5 2.6f1 :
- ricompilazione con cambio versione.
2024-06-05 17:15:14 +02:00
Dario Sassi b3d113e4f3 EgtCAM5 :
- corretta partenza disegno continuo (Ctrl) su Arco con punto, direzione e punto.
2024-05-31 12:29:06 +02:00
Dario Sassi f506ce9c64 EgtCAM5 :
- piccola ottimazione in MachiningToolSlider.
2024-05-31 12:13:21 +02:00
Dario Sassi 459d6f6739 EgtCAM5 :
- piccola miglioria a SliderThick di MachiningToolPreviw.
2024-05-31 12:03:17 +02:00
Dario Sassi 469037e3d8 Merge commit '0a4a7c4efad1d4bde9e7d23e4d9a90fd73626ef3' 2024-05-31 11:42:06 +02:00
Demetrio Cassarino 0a4a7c4efa -rimosso pulsanti indietro e avanti
-cambiato pulsante anteprima utensile con checkbox
2024-05-31 11:34:27 +02:00
Demetrio Cassarino 69ba413d31 Merge remote-tracking branch 'origin/master' into feature/Lavorazione_5_assi 2024-05-31 08:32:52 +02:00
Dario Sassi 8164b2e654 EgtCAM5 :
- modifiche per ToolPreview con slider.
2024-05-31 07:59:02 +02:00
Dario Sassi 514b8a7bb9 Merge commit 'cfa709fb40fdef6115d43d4678414d9f9da0cf4b' 2024-05-30 16:31:44 +02:00
Demetrio Cassarino cfa709fb40 -aggiunto slider da completare 2024-05-30 12:14:23 +02:00
Dario Sassi 0936baf254 Merge commit 'd328fbb186627fa1d15414bb1518b77052b1b4af' 2024-05-29 15:22:45 +02:00
Demetrio Cassarino d328fbb186 -ripristinato dimensione pagina db lavorazioni 2024-05-29 14:57:49 +02:00
Dario Sassi fcc36d7b44 Merge commit '3ebba7cb81ba17c58d5fa0295dca5178bab1dde7' 2024-05-29 12:26:05 +02:00
Demetrio Cassarino 3ebba7cb81 -rimossa variabile tipo approccio da finitura superficie e sgrossatura 2024-05-29 12:15:13 +02:00
Dario Sassi 88be7fa40d Merge remote-tracking branch 'origin/feature/Lavorazione_5_assi' 2024-05-29 09:32:21 +02:00
Demetrio Cassarino 033d76b4fb Merge remote-tracking branch 'origin/master' into feature/Lavorazione_5_assi 2024-05-29 09:16:14 +02:00
Demetrio Cassarino 3f2b8eaf08 -aggiornato ordine offset radiale e longitudinale 2024-05-29 09:16:02 +02:00
Dario Sassi 42348e6ca0 EgtCAM5 2.6e6 :
- ricompilazione con cambio versione.
2024-05-28 17:36:18 +02:00
Dario Sassi e1f0e122ec Merge commit '21c0a8cad7f61e2d05b3edb70e90344673707423' 2024-05-28 17:27:50 +02:00
Demetrio Cassarino 21c0a8cad7 -rimosso da sgrossatura sovrapposizione, aggiunto offset longitudinale e passo 2024-05-28 17:25:44 +02:00
Dario Sassi afe5dc58b1 EgtCAM5 2.6e5 :
- ricompilazione con cambio versione.
2024-05-27 17:27:47 +02:00
Dario Sassi 2beb910d2c Merge commit '31ce0ca0e0be420206122568f6e2ad4c02f7998b' 2024-05-27 17:01:59 +02:00
Demetrio Cassarino 31ce0ca0e0 -cambio nome costante 5axMachining in 5AxMilling 2024-05-27 15:31:34 +02:00
Demetrio Cassarino f7b92d1537 -aggiunto sgrossatura superfici in nuove lavorazioni
-aggiunto sgrossatura superfici in opzioni cam5
2024-05-27 14:14:01 +02:00
Demetrio Cassarino fe2dd7f9ce -rinominato SelGeomFiveAxMachining in SelGeomFiveAxMilling nel progetto e nel file in
- aggiunto in impostazioni sezione CAM le lavorazioni
2024-05-24 15:08:06 +02:00
Dario Sassi 1099a25b59 Merge remote-tracking branch 'origin/feature/Lavorazione_5_assi' 2024-05-24 10:43:39 +02:00
Demetrio Cassarino 22e329c74e -aggiunto paragrafo per lavorazioni 5 assi 2024-05-24 10:34:31 +02:00
Dario Sassi 2e5b87d38c EgtCAM5 2.6e2 :
- ricompilazione con cambio versione.
2024-05-14 09:23:08 +02:00
Dario Sassi d2886ec79b Merge commit '85f22f9978277cce16167bd2dcb4bfdd0d727725' 2024-05-07 12:10:49 +02:00
Demetrio Cassarino 85f22f9978 Merge remote-tracking branch 'origin/master' into feature/ManageNote 2024-05-06 16:12:13 +02:00
Dario Sassi 9eea6f220d EgtCAM5 2.6e1 :
- ricompilazione con cambio versione.
2024-05-03 15:03:29 +02:00
Dario Sassi 23820e3ed8 EgtCAM5 :
- aggiunto bottone per comando GRID_INVERT.
2024-04-26 17:52:37 +02:00
Dario Sassi e2d1231ea2 EgtCAM5 :
- aggiunta gestione disegno arco per due punti e raggio.
2024-04-19 17:57:22 +02:00
Dario Sassi b7b824ab8a EgtCAM5 :
- aggiunto bottone per comando Nascondi, Visualizza Layer (Shift) e Visualizza Pezzo (Ctrl)
- nell'albero entità corretto visualizza/nascondi Layer con tutte le sue entità (Shift su Lampadina).
2024-04-19 11:28:50 +02:00
Dario Sassi 14ed0480cd EgtCAM5 :
- corretto errore feedback non creato quando progetto contiene più macchinate con la stessa macchina.
2024-04-16 20:54:04 +02:00
Dario Sassi 928b8f679e EgtCAM5 :
- aggiunta gestione evento OnInsertingProject per poter passare AdvFlag a EgtController.
2024-04-13 18:42:47 +02:00
Demetrio Cassarino 919767fe34 Merge remote-tracking branch 'origin/master' into feature/ManageNote 2024-04-12 12:29:15 +02:00
Demetrio Cassarino 87507c60d8 -aggiornato grafica note 2024-04-12 12:28:46 +02:00
Dario Sassi a0c93477a1 EgtCAM5 :
- aggiunta gestione AdvFlag=0/1 della sezione [Import] nel file INI per Flag importatore formati avanzati.
2024-04-11 00:29:12 +02:00
Dario Sassi 62758acbeb EgtCAM5 2.6d2 :
- eliminata distinzione tra 32 e 64 per le diverse librerie lua (da tempo non serve più)
- modifiche per meglio gestire i problemi con la eventuale chiave di rete (errore di collegamento o capacità esaurita).
2024-04-09 14:54:19 +02:00
Dario Sassi 05d1602c2e EgtCAM5 2.6d1 :
- in Opzioni Macchina aggiunto parametro Tolleranza Lineare di Approssimazione.
2024-04-02 15:40:44 +02:00
Demetrio Cassarino 20a153a0ea -cambio lista con itemscontrol nel paragrafo note 2024-03-29 16:09:27 +01:00
Demetrio Cassarino 2febe6fb5b -migliorie grafica paragrafo note 2024-03-26 17:19:25 +01:00
Demetrio Cassarino a414b7a3e6 -pulizia codice 2024-03-15 14:46:12 +01:00
Demetrio Cassarino fe05264a7d Merge remote-tracking branch 'origin/master' into feature/ManageNote 2024-03-15 14:13:21 +01:00
Demetrio Cassarino ee17b9dfbc -modificato grafica selecteditem list 2024-03-15 12:47:05 +01:00
Dario Sassi 2a056bc9be EgtCAM5 :
- aggiunti bottoni toolbar per quotature angolari e diametrali/radiali
- corretta gestione DecDigit di quotature in pagina Opzioni (valore può essere negativo).
2024-03-14 20:08:31 +01:00
Demetrio Cassarino 5fdec18828 -aggiunto controllo su pulsante rimuovi nota 2024-03-14 09:53:54 +01:00
Demetrio Cassarino e3c84cdf05 -aggiunto immagini pulsanti 2024-03-13 17:21:45 +01:00
Demetrio Cassarino 0fb560a33b -sistemato merge errato 2024-03-13 16:50:40 +01:00
Dario Sassi 82c40a5b41 EgtCAM5 2.6c2 :
- aggiunto bottone per comandi movimento vertice e movimento faccia di superficie trimesh.
2024-03-13 09:29:04 +01:00
Demetrio Cassarino fdacf0f958 -aggiornato grafica paragrafo note 2024-03-12 17:01:42 +01:00
Dario Sassi 0c4daf8ecb EgtCAM5 2.6c2 :
- aggiunti due nuovi parametri a InitDisp.
2024-03-11 14:18:51 +01:00
Demetrio Cassarino 3588c3d511 -aggiunto tab control per visualizzazione valore in base al tipo 2024-03-08 16:57:53 +01:00
Demetrio Cassarino 5142d2a2e9 .aggiunto combo aggiunti nota, pulizia codice 2024-03-06 16:14:10 +01:00
Demetrio Cassarino 17dbfe6163 -creazione paragrafo note,
-correzione codice
2024-03-01 16:42:44 +01:00
Dario Sassi a7dc65f10e EgtCAM5 2.6b4 :
- in simulazione migliorata gestione errori dopo EgtSimulStart
- nella toolbar di Vista aggiunto anche comando IsoViewSE.
2024-02-19 14:58:17 +01:00
Dario Sassi be256404ff EgtCAM5 2.6b1 :
- corretto falso rilevamento modifica testa usata da posizione in attrezzaggio.
2024-02-02 17:02:37 +01:00
Emmanuele Sassi efe74f470c Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2024-02-02 16:17:00 +01:00
Emmanuele Sassi 3b49b58783 - Ripristinato bottone MTable in modalita' lavorazione 2024-02-02 16:16:56 +01:00
Dario Sassi d6b61e8633 EgtCAM5 :
- in about aggiunto messaggio con indicazione stato piano di manutenzione.
2024-01-25 18:23:31 +01:00
Dario Sassi 9bb0558370 EgtCAM5 2.6a1 :
- ricompilazione con cambio versione.
2024-01-23 17:26:02 +01:00
Emmanuele Sassi f58322e131 EgtCAM5 2.5l4:
- ricompilazione con cambio versione.
2024-01-15 09:09:51 +01:00
Emmanuele Sassi fd7dbaed88 Merge branch 'hotfix/OperationParamError' 2024-01-15 09:07:12 +01:00
Emmanuele Sassi 5b41936ecb - correzione per apertura parametri di lavorazione 2024-01-15 09:06:56 +01:00
Dario Sassi 14d92c0a2d - modificati riferimenti a EgtTray che è stata rimossa 2024-01-08 16:33:23 +01:00
Emmanuele Sassi 7639de860f Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2024-01-08 11:22:39 +01:00
Emmanuele Sassi 786362b31e - aggiunto flag per plugin
- aggiunto flag per eseguire script Lua
2024-01-08 11:08:41 +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
Emmanuele Sassi 423a88b049 Merge remote-tracking branch 'origin/master' into feature/DynamicDllForCustomControls 2023-12-27 11:46:33 +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
Dario Sassi 64867f25dc EgtCAM5 :
- aggiunta funzione di callback OnTerminateProcess che viene chiamata prima di terminare con comando lua EgtCloseExe per permettere di sistemare lo stato.
2023-11-23 10:52:43 +01:00
Emmanuele Sassi 78a9b32973 - gestiti eventi del plugin
- gestita visibility del right panel tra draw e machining
- gestita assenza cartella plugin o nomi sbagliati
- gestita visibility dei comandi principali della TopCommandBar
2023-11-21 12:56:33 +01:00
Dario Sassi d210f63296 EgtCAM5 :
- differenziata icona per 64 bit da quella per 32 bit
- per il feedback migliorata selezione dei file con nome del progetto corrente o similare
- eliminata configurazione packages non utilizzata.
2023-11-13 16:35:51 +01:00
Dario Sassi 1273279c1f EgtCAM5 2.5j2 :
- aggiunti file 3dm a gestione drag.
2023-11-12 19:32:09 +01:00
Dario Sassi 978de597ad EgtCAM5 2.5k1 :
- ricompilazione con cambio versione e aggiornamento protezione mensile.
2023-11-06 19:51:12 +01:00
Emmanuele Sassi 75d05a8b31 - create tray top, bottom, left e right
- gestiti panel con Visibility
- gestiti elementi grafici in ProjectV con ItemsControl
- eliminato pannello Printing3d
- aggiunta gestione Plugin
- verifica bit per Plugin
2023-11-03 11:20:13 +01:00
Dario Sassi 045a7fa731 EgtCAM5 :
- modifiche a bottoni SpecialPanel per visualizzazione in Disegna/Lavora.
2023-10-09 13:08:46 +02:00
Dario Sassi 29b2b495c3 EgtCAM5 2.5j1 :
- aggiunta memorizzazione ultimo direttorio per progetti inseriti.
2023-10-02 16:08:55 +02:00
Dario Sassi 89a73457c7 EgtCAM5 2.5i6 :
- ricompilazione con cambio versione.
2023-09-27 23:41:19 +02:00
Dario Sassi 5f2b1adf98 EgtCAM5 2.5i5 :
- ricompilazione per cambio versione.
2023-09-21 16:15:34 +02:00
Dario Sassi ab11f069e9 EgtCAM5 :
- impostata creazione zip con encoding UTF8.
2023-09-14 18:33:36 +02:00
Dario Sassi 880dbeb7b9 EgtCAM5 :
- gestione abilitazione da bit di licenza delle lavorazioni avanzate (Sgrossature e Finiture Superfici, Lavorazioni 5 assi)
- gestione marcatura geometria mirror di lavorazioni in doppio.
2023-09-11 10:56:58 +02:00
Dario Sassi 6090527b2a EgtCAM5 2.5i1 :
- sostituita Ionic.Zip.dll con DotNetZip.dll (perchè precedente dll era ormai deprecata).
2023-09-05 17:08:13 +02:00
Dario Sassi 6dc81030c9 EgtCAM5 2.5h3 :
- in Modo Lavora (quando abilitati più gruppi di lavoro) con [+] nuovo gruppo vuoto e con Shift + [+] nuovo gruppo come copia del corrente.
2023-08-27 18:36:28 +02:00
Dario Sassi b889f75963 EgtCAM5 2.5h1 :
- ricompilazione con cambio versione.
2023-08-07 19:32:08 +02:00
DarioS ffd1c3d437 EgtCAM5 :
- aggiunta disabilitazione UpdateAllMachinings prima di Simulazione, Stima e Generazione da Ini ([Mach] AutoUpdateAllMachinings=0) da usare solo internamente per ripetere esattamente situazioni di clienti.
2023-07-19 09:56:25 +02:00
DarioS 87ddc23ecc EgtCAM5 2.5g1 :
- ricompilazione con cambio versione.
2023-07-07 17:09:26 +02:00
DarioS 6b9808027f EgtCAM5 2.5f2 :
- ricompilazione con cambio versione.
2023-06-19 08:27:56 +02:00
DarioS e9570187bb EgtCAM5 :
- aggiornato codice controllo mensile.
2023-06-12 09:19:51 +02:00
DarioS cfdf3b392e EgtCAM5 :
- in aggiungi o aggiorna una macchina ora nello zip di macchina è ammessa una parte aggiuntiva tra punti con la versione (tipo Macchina.25f1.zip).
2023-06-12 08:04:43 +02:00
DarioS c256a49bb2 EgtCAM5 :
- modificata OnMouseSelectingObj per selezione lavorazione da toolpath evitando entità multiple di una stessa lavorazione.
2023-06-05 17:08:10 +02:00
DarioS 3e50c6151b EgtCAM5 2.5f1 :
- eliminata doppia selezione in MachiningMode_IsChecked
- corretta gestione movimento grezzo insieme con ventose.
2023-06-05 14:31:05 +02:00
DarioS b8c1368154 EgtCAM5 2.5e3 :
- aggiunta gestione chiave di rete.
2023-05-30 17:10:34 +02:00
DarioS 3f2888f5d3 EgtCAM5 :
- aggiornato codice di protezione mensile.
2023-05-17 08:53:20 +02:00
DarioS 17e8be7ab4 EgtCAM5 2.5e2 :
- ricompilazione con cambio versione.
2023-05-17 08:49:35 +02:00
DarioS 958a2f005f EgtCAM5 2.5d3 :
- ricompilazione con cambio versione.
2023-04-11 19:39:42 +02:00
DarioS 3f02f139fa EgtCAM5 2.5d1 :
- ricompilazione con cambio versione.
2023-04-05 12:02:13 +02:00
DarioS f8291c6da0 EgtCAM5 :
- corretta modifica precedente su immagini bottoni per estensioni.
2023-03-22 08:32:58 +01:00
DarioS dc9dc9a916 EgtCAM5 :
- aggiunta abilitazione utente e aggiornamento per le estensioni permesse dai codici chiave.
2023-03-21 10:24:57 +01:00
DarioS 562497bfe7 EgtCAM5 2.5c1 :
- ricompilazione con cambio versione.
2023-03-13 08:19:45 +01:00
DarioS f3eb475348 EgtCAM5 :
- aggiunta visualizzazione Estensioni caricate (Beam, Wall, Doors, Gunstock) con versione e direttorio di installazione.
2023-02-27 17:26:16 +01:00
DarioS b428469294 EgtCAM5 :
- esportazione macchine non salvano i file di git.
2023-02-27 09:24:20 +01:00
DarioS 9bd1da86b6 EgtCAM5 2.5b3 :
- ricompilazione con cambio versione.
2023-02-23 15:27:58 +01:00
Emmanuele Sassi 495a8a9f66 - adattamento per cambiamento assi in simulazione 2023-02-23 10:49:43 +01:00
DarioS cbd4f6c810 EgtCAM5 2.5b2 :
- a stampa si associa per UI il testo EgtCAM5-Print.
2023-02-20 15:39:43 +01:00
DarioS e72d30c392 EgtCAM5 :
- aggiunto comando stampa.
2023-02-13 08:20:56 +01:00
DarioS 82a8ee2230 EgtCAM5 2.5b1 :
- ricompilazione con cambio versione.
2023-02-09 10:43:11 +01:00
DarioS ccf74a8644 EgtCAM5 2.5a4 :
- ricompilazione con cambio versione.
2023-02-01 11:54:30 +01:00
DarioS f0e95a97d7 EgtCAM5 2.5a3 :
- ricompilazione con cambio versione.
2023-01-26 11:56:28 +01:00
DarioS 4fc98f419b EgtCAM5 2.5a2 :
- ricompilazione con cambio versione.
2023-01-17 11:34:04 +01:00
DarioS 6123aced14 EgtCAM5 :
- in Hide/Show ora si garantisce la congruenza tra stato dell'albero e stato del progetto.
2023-01-11 17:44:45 +01:00
DarioS bec2d24aac EgtCAM5 :
- velocizzato comando spegni/accendi gruppo e tutti i suoi discendenti individualmente (Shift su lampadina in TreeView).
2023-01-11 16:10:26 +01:00
DarioS 3b73ee84fd EgtCAM5 2.5a1 :
- ricompilazione con cambio versione.
2023-01-03 08:52:26 +01:00
DarioS a019f5cce4 EgtCAM5 2.4l2 :
- ricompilazione con cambio versione.
2022-12-22 15:25:10 +01:00
DarioS 9d420795d8 EgtCAM5 2.4l1 :
- in ingresso simulazione spostata prima visualizzazione dopo EgtSimInit e EgtSimStart.
2022-12-07 08:17:51 +01:00
DarioS 5c0a68bfcc EgtCAM5 2.4k6 :
- ricompilazione con cambio versione.
2022-12-01 07:49:13 +01:00
DarioS a7c8701512 EgtCAM5 2.4k5 :
- ricompilazione con cambio versione.
2022-11-30 09:50:26 +01:00
DarioS 67a769e1fb EgtCAM5 2.4k4 :
- ricompilazione con cambio versione.
2022-11-22 08:48:18 +01:00
DarioS da7d6da74c EgtCAM5 2.4k3 :
- ricompilazione con cambio versione.
2022-11-12 07:58:17 +01:00
DarioS 3ed56120e2 EgtCAM5 2.4k2 :
- per la chiamata a DMACH si imposta DGD.BASEDIR.
2022-11-07 19:01:16 +01:00
DarioS c6aba04921 EgtCAM5 2.4k1 :
- aggiunto bottone e comando ApproxSurf
- aggiunto comando SurfTmToTriangles come Shift di ExplodeSurf.
2022-11-04 19:26:31 +01:00
Emmanuele Sassi fabfdf026a EgtCAM5 2.4j4 : - ricompilazione con cambio versione 2022-10-24 20:27:48 +02:00
Emmanuele Sassi 954ea2f120 Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2022-10-24 12:14:08 +02:00
Emmanuele Sassi 18883cdbb3 - Modifica per file Lua compilati 2022-10-24 12:14:06 +02:00
DarioS 5ecfb960b5 EgtCAM5 2.4j3 :
- aggiunta gestione sThreeJSLibDir da INI.
2022-10-24 08:47:36 +02:00
DarioS 6caf32aa67 EgtCAM5 2.4j2 :
- ricompilazione con cambio versione.
2022-10-20 10:20:39 +02:00
DarioS 0125a5b7c7 EgtCAM5 2.4j1 :
- ricompilazione con cambio versione.
2022-10-18 07:07:37 +02:00
DarioS 35735866a6 EgtCAM5 2.4i2 :
- eliminato modulo MachineAxis.vb già presente in EgtWPFLib5.
2022-09-24 18:55:06 +02:00
DarioS cf13d51a84 EgtCAM5 :
- piccola correzione per caso di caricamento gruppo di lavoro non riuscito.
2022-09-13 09:00:33 +02:00
DarioS 173145ade7 EgtCAM5 2.4i1 :
- miglioria per lancio script InitMach della macchina corretta.
2022-09-12 10:08:30 +02:00
DarioS 07b9ff800d EgtCAM5 2.4h3 :
- modifiche per entrare in modalità LAVORA senza pezzi in modo corretto
2022-08-29 07:29:31 +02:00
DarioS 9e2a9fa1ec EgtCAM5 2.4h2 :
- aggiunto comando Modifica Raggio di Arco o di Circonferenza.
2022-08-21 16:27:04 +02:00
DarioS ef0c2b1f74 EgtCAM5 2.4h1 :
- ricompilazione con cambio versione
- piccola modifica in deseleziona tutto (per evitare di deselezionare oggetti in modifica).
2022-08-17 19:10:51 +02:00
DarioS f42b9c5399 EgtCAM5 2.4g7 :
- ricompilazione con cambio versione.
2022-08-09 18:35:21 +02:00
DarioS 827871073b EgtCAM5 2.4g6 :
- ricompilazione con cambio versione.
2022-08-03 10:28:31 +02:00
DarioS 53ace07386 EgtCAM5 2.4g5 :
- ricompilazione con cambio versione.
2022-08-01 14:49:40 +02:00
DarioS f24c18d0c2 EgtAM5 2.4g4 :
- ricompilazione con cambio versione.
2022-07-29 15:11:45 +02:00
DarioS 1f1e7d6d70 EgtCAM5 2.4g3 :
- ricompilazione con cambio versione.
2022-07-15 07:40:56 +02:00
DarioS 797d1dd70f EgtCAM5 2.4g2 :
- ricompilazione con cambio versione.
2022-07-14 06:39:19 +02:00
DarioS e2a14a746a EgtCAM5 2.4g1 :
- ricompilazione con cambio versione.
2022-07-05 15:18:09 +02:00
DarioS be6eea1054 EgtCAM5 2.4f6 :
- aggiunta possibilità di comando Copia a GunStock.
2022-07-03 18:59:10 +02:00
DarioS 2e70a7c944 EgtCAM5 2.4f5 :
- ricompilazione con cambio versione.
2022-06-27 09:55:59 +02:00
DarioS 6a9885d365 EgtCAM5 2.4f4 :
- ricopilazione e aggiustamenti per nuget.
2022-06-19 12:34:20 +02:00
DarioS 52b08d92b2 EgtCAM5 2.4f3 :
- ricompilazione con cambio versione.
2022-06-17 07:40:11 +02:00
DarioS 2ca14c2fce EgtCAM5 2.4f2 :
- ricompilazione con cambio versione.
2022-06-13 16:31:16 +02:00
Emmanuele Sassi 1c870d55d7 - Modifica per scroll posizioni con tante uscite in SetUp 2022-06-06 19:28:31 +02:00
DarioS 2dd55286c1 EgtCAM5 2.4f1 :
- quando si apre una lavorazione per modificarne i parametri si imposta sempre anche la sua fase.
2022-06-06 07:05:36 +02:00
DarioS 55aca03daa EgtCAM5 :
- non si possono selezionare con mouse oggetti in modo Locked
- aggiunta gestione materiale Additive come Wood.
2022-05-30 07:31:14 +02:00
DarioS 3fa1c51129 EgtCAM5 2.4e4 :
- ricompilazione con cambio versione.
2022-05-21 10:26:21 +02:00
DarioS 455f3c6949 EgtCAM5 2.4e3 :
- ricompilazione con cambio di versione.
2022-05-20 15:54:27 +02:00
DarioS 3ed7a3593c EgtCAM5 2.4e2 :
- modifiche per lancio script Beam e Wall con parametro BW (per ottimizzazioni)
- modifiche per passare agli stessi script il direttorio di esecuzione
- possibilità di settare direttori a parte per 64 bit per esecuzione script Beam e Wall (solo uso interno).
2022-05-09 19:38:25 +02:00
DarioS f9d459134a EgtCAM5 2.4e1 :
- nelle info di generazione CN indico anche se programma a 64 bit.
2022-04-30 11:13:13 +02:00
Emmanuele Sassi 00d2054cd3 - Modifica per segnalare a LUA travi e pareti che comando arriva da BeamWall 2022-04-29 19:09:50 +02:00
DarioS 2b6a9d49ff EgtCAM5 2.4d4 :
- ricompilazione per nuova versione
- aggiunto bit di controllo a chiave per 3dPrinting.
2022-04-27 00:14:39 +02:00
DarioS ac8577206e EgtCAM5 2.4d3 :
- ricompilazione con cambio versione.
2022-04-22 08:54:59 +02:00
DarioS d6395f6b9b EgtCAM5 :
- ricompilazione con cambio versione.
2022-04-19 11:25:10 +02:00
DarioS 3c96fec59b EgtCAM5 2.4d1 :
- ricompilazione con cambio versione.
2022-04-07 11:07:59 +02:00
Emmanuele Sassi 320c5ab1c6 - Introduzione barra per stampa 3d 2022-03-26 14:36:38 +01:00
DarioS 3bf58d9069 EgtCam5 2.4c3 :
- ricompilazione con cambio versione.
2022-03-26 11:30:49 +01:00
DarioS 4ad745b7ce EgtCAM5 :
- corretto errore comando Aggiorna Macchina introdotto aggiungendo comando Aggiorna Licenza in Opzioni.
2022-03-21 09:47:28 +01:00
DarioS 86e30a0cc0 EgtCAM5 2.4c2 :
- ricompilazione con cambio versione.
2022-03-20 18:31:07 +01:00
DarioS f1096b3f15 EgtCAM5 2.4c1 :
- versione 2403
- aggiunto comando per aggiornare licenza in Opzioni-Generale.
2022-03-08 15:07:23 +01:00
DarioS bc2603436f EgtCAM5 2.4b6 :
- aggiunte info su User Level e Debug Level in AboutBox e Log.
2022-02-26 17:54:21 +01:00
DarioS 65b01a750b EgtCAM5 2.4b5 :
- ricompilazione con cambio versione.
2022-02-23 10:54:31 +01:00
DarioS f607d7e12c EgtCAM5 2.4b4 :
- ricompilazione con cambio versione.
2022-02-17 22:29:58 +01:00
DarioS 534fa33a09 EgtCAM5 2.3b3 :
- ricompilazione con cambio versione.
2022-02-15 08:21:00 +01:00
DarioS 9dbd69b0bd Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2022-02-14 17:48:40 +01:00
DarioS d0412f4e07 EgtCAM5 2.4b2 :
- ricompilazione con cambio versione.
2022-02-14 17:47:01 +01:00
RenzoL 8b9c4c63c3 Merge remote-tracking branch 'origin/RenzoL' 2022-02-09 09:42:55 +01:00
RenzoL 687933571d - Aggiunti i campi Raggio Epicicli e Distanza Epicicli al MachiningParameterExpander, visibili per Pocketing nel caso di Macchina Stone e utensile Polishing 2022-02-09 09:41:43 +01:00
DarioS 5b01e4ebfe EgtCAM5 2.4b1 :
- ricompilazione con cambio versione.
2022-02-03 21:45:32 +01:00
DarioS 211eb17c49 EgtCAM5 2.4a4 :
- quando si sposta una lavorazione da una fase all'altra si aggiorna la fase corrente.
2022-01-26 08:55:32 +01:00
Emmanuele Sassi 4d898e6423 - Ripristinata generazione cnc per ddf con flag opportuno
- Aggiornata versione
2022-01-20 20:02:35 +01:00
RenzoL bc97e3599f Merge branch 'RenzoL' 2022-01-20 14:39:54 +01:00
RenzoL 8eae142985 - VM della Tabella delle lavorazioni delle travi spostato in EgtWPFLib5 2022-01-20 14:38:10 +01:00
DarioS 921996c39c EgtCAM5 2.4a2 :
- aggiunta gestione file OBJ (Alias-Wavefront).
2022-01-14 18:57:26 +01:00
DarioS 747a34d443 EgtCAM5 2.4a1 :
- ricompilazione per cambio versione.
2022-01-04 08:20:06 +01:00
DarioS e338d3d9ea EgtCAM5 2.3l2 :
- ricompilazione per cambio versione.
2021-12-21 05:36:17 +01:00
DarioS 12c65ff40c EgtCAM5 2.3l1 :
- ricompilazione per cambio versione.
2021-12-08 16:47:23 +01:00
DarioS 672686978d EgtCAM5 2.3k5:
- ricompilazione per cambio versione.
2021-11-22 22:58:43 +01:00
RenzoL dca32c5dcc Merge branch 'develop' 2021-11-17 12:14:53 +01:00
DarioS bc7b5d1da3 EgtCAM5 2.3k4 :
- ricompilazione per cambio versione.
2021-11-15 09:56:24 +01:00
DarioS 908d0bf187 EgtCAM5 2.3k3 :
- ricompilazione per cambio versione.
2021-11-08 19:00:45 +01:00
DarioS fee8a11358 EgtCAM5 2.3k2 :
- ricompilazione per cambio versione.
2021-11-04 10:02:53 +01:00
DarioS 8cbb54a541 EgtCAM5 2.3k1 :
- ricompilazione con cambio versione.
2021-11-03 13:26:30 +01:00
DarioS fdf1661f78 EgtCAM5 2.3j7 :
- ricompilazione per cambio versione.
2021-11-02 08:24:51 +01:00
NicolaP 63a7ea25ba Merge branch 'develop' 2021-10-27 19:34:33 +02:00
Emmanuele Sassi 00b02e3a6b Merge branch 'develop' 2021-10-25 19:21:57 +02:00
178 changed files with 12811 additions and 6555 deletions
+1
View File
@@ -16,3 +16,4 @@
/bin /bin
/obj /obj
/.vs /.vs
/packages
+43 -6
View File
@@ -4,10 +4,7 @@ Public Class AboutBoxWndV
Private Sub AboutBoxWD_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Private Sub AboutBoxWD_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
DescriptionLbl.Text = My.Application.Info.Description.ToString() DescriptionLbl.Text = My.Application.Info.Description.ToString()
VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() & VersionLbl.Text = "Version : " & GetProgramVersion()
"." & My.Application.Info.Version.Minor.ToString() &
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString()
CopyrightLbl.Text = My.Application.Info.Copyright.ToString() CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
Dim sKey As String = String.Empty Dim sKey As String = String.Empty
@@ -17,17 +14,29 @@ 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 &
" (" & IniFile.m_nInstance.ToString() & ")" & Environment.NewLine " Inst" & IniFile.m_nInstance.ToString() &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine sInfo &= 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
Else Else
sInfo &= "Only Draw Mode" & Environment.NewLine sInfo &= "Only Draw Mode" & Environment.NewLine
End If End If
If IniFile.IsActiveDoors() Then sInfo &= "Doors " & IniFile.m_sDoorsDirPath & Environment.NewLine
Dim sOpSys As String = String.Empty Dim sOpSys As String = String.Empty
EgtGetOsInfo( sOpSys) EgtGetOsInfo( sOpSys)
sInfo &= sOpSys & Environment.NewLine sInfo &= sOpSys & Environment.NewLine
@@ -40,6 +49,34 @@ Public Class AboutBoxWndV
Dim sScene As String = String.Empty Dim sScene As String = String.Empty
EgtGetSceneInfo(sScene) EgtGetSceneInfo(sScene)
sInfo &= sScene sInfo &= sScene
' Extensions
sInfo &= Environment.NewLine & "Extensions :"
Dim bExtensions As Boolean = False
If IniFile.IsActiveBeam() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sVersion)
sInfo &= Environment.NewLine & "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
End If
If IniFile.IsActiveWall() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sVersion)
sInfo &= Environment.NewLine & "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
End If
If IniFile.IsActiveDoors() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
End If
If IniFile.IsActiveGunStock() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sGunstockDirPath, sVersion)
sInfo &= Environment.NewLine & "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
End If
If Not bExtensions Then sInfo &= Environment.NewLine & "---"
InfoLbl.Text = sInfo InfoLbl.Text = sInfo
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
End Sub End Sub
+1
View File
@@ -107,6 +107,7 @@ Class Application
Friend Const SWEPT As String = "Swept" Friend Const SWEPT As String = "Swept"
Friend Const MERGESURF As String = "MergeSurf" Friend Const MERGESURF As String = "MergeSurf"
Friend Const EXPLODESURF As String = "ExplodeSurf" Friend Const EXPLODESURF As String = "ExplodeSurf"
Friend Const APPROXSURF As String = "ApproxSurf"
Friend Const INVERTSURF As String = "InvertSurf" Friend Const INVERTSURF As String = "InvertSurf"
Friend Const DELETE As String = "Delete" Friend Const DELETE As String = "Delete"
Friend Const CHANGELAYER As String = "ChangeLayer" Friend Const CHANGELAYER As String = "ChangeLayer"
+4 -3
View File
@@ -31,8 +31,8 @@ Public Class TreeViewItemBase
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
End Get End Get
@@ -92,6 +92,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
@@ -195,7 +196,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
@@ -209,6 +209,7 @@ Public Class ParentItem
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
@@ -1,4 +1,6 @@
Public Class BeamMachiningsWindowV Imports EgtWPFLib5
Public Class BeamMachiningsWindowV
Private WithEvents m_BeamMachiningsWindowVM As BeamMachiningsWindowVM Private WithEvents m_BeamMachiningsWindowVM As BeamMachiningsWindowVM
@@ -1,543 +0,0 @@
Imports System.IO
Imports System.Collections.ObjectModel
Imports EgtUILib
Public Class BeamMachiningsWindowVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private Const MACH_CUT As String = "Cut"
Private Const MACH_DRILL As String = "Drill"
Private Const MACH_MILLING As String = "Milling"
Private Const MACH_POCKETING As String = "Pocketing"
Private Const MACH_SAWING As String = "Sawing"
Private Const MACH_SURFACING As String = "Surfacing"
Private Const ONCONST As String = "On"
Private Const NAME As String = "Name"
Private Const TYPE As String = "Type"
Private Const DATETIME As String = "%DATE_TIME%"
Private Const TABLENAME As String = "%TABLE_NAME%"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_MachiningList As New ObservableCollection(Of String)({MACH_CUT, MACH_DRILL, MACH_MILLING, MACH_POCKETING, MACH_SAWING})
Public ReadOnly Property MachiningList As ObservableCollection(Of String)
Get
Return m_MachiningList
End Get
End Property
Private m_SelMachining As String
Public Property SelMachining As String
Get
Return m_SelMachining
End Get
Set(value As String)
' verifico se pagina precedente modificata
Dim TableModified As Boolean = False
For Each Line In m_TableRowList
If Line.IsModified Then
TableModified = True
Exit For
End If
Next
' se modificata, chiedo se salvare
If TableModified Then
' Salvare le modifiche apportate? - Salva
Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Save()
Case MessageBoxResult.No
' non devo fare nulla
End Select
End If
m_SelMachining = value
LoadMachiningList()
LoadTypeList()
ReadTableFile()
NotifyPropertyChanged("SelMachining")
End Set
End Property
Private Sub SetSelMachining(value As String)
m_SelMachining = value
LoadMachiningList()
LoadTypeList()
ReadTableFile()
NotifyPropertyChanged("SelMachining")
End Sub
Private m_TableRowList As ObservableCollection(Of GridLine)
Public Property TableRowList As ObservableCollection(Of GridLine)
Get
Return m_TableRowList
End Get
Set(value As ObservableCollection(Of GridLine))
m_TableRowList = value
End Set
End Property
Private m_SelRowIndex As Integer = -1
Public Property SelRowIndex As Integer
Get
Return m_SelRowIndex
End Get
Set(value As Integer)
m_SelRowIndex = value
End Set
End Property
Private m_sTitle As String
Private m_BaseDir As String
Private m_MachTypeFilePath As String
Private m_TableTemplateFilePath As String
Private m_IsBeam As Boolean = True
#Region "Messages"
Public ReadOnly Property Title As String
Get
Return m_sTitle
End Get
End Property
Public ReadOnly Property OnHdr As String
Get
Return EgtMsg( 9001) 'On
End Get
End Property
Public ReadOnly Property NameHdr As String
Get
Return EgtMsg( 9002) 'Nome
End Get
End Property
Public ReadOnly Property TypeHdr As String
Get
Return EgtMsg( 9003) 'Tipo
End Get
End Property
Public ReadOnly Property AddRowMsg As String
Get
Return EgtMsg( 9004) 'Aggiungi
End Get
End Property
Public ReadOnly Property DeleteRowMsg As String
Get
Return EgtMsg( 9005) 'Elimina
End Get
End Property
Public ReadOnly Property SaveMsg As String
Get
Return EgtMsg( 9006) 'Salva
End Get
End Property
#End Region ' Messages
' Definizione comandi
Private m_cmdMoveRowUp As ICommand
Private m_cmdMoveRowDown As ICommand
Private m_cmdAddRow As ICommand
Private m_cmdDeleteRow As ICommand
Private m_cmdSave As ICommand
Private m_cmdClose As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New( sTitle As String, sBaseDir As String, sMachTypePath As String, sTabTemplPath As String, Optional bIsBeam As Boolean = True)
' Titolo del dialogo
m_sTitle = sTitle
' Imposto direttorio base e nomi dei file
m_BaseDir = sBaseDir
m_MachTypeFilePath = sMachTypePath
m_TableTemplateFilePath = sTabTemplPath
' Imposto se per travi o pareti
m_IsBeam = bIsBeam
' Se previste, aggiungo lavorazioni di superfici
Dim sDummy As String = ""
If EgtUILib.GetPrivateProfileString( MACH_SURFACING, "1", "", sDummy, m_MachTypeFilePath) > 0 Then
m_MachiningList.Add(MACH_SURFACING)
End If
' Seleziono la prima lavorazione
If m_MachiningList.Count > 0 Then
SetSelMachining( m_MachiningList(0))
End If
NotifyPropertyChanged( "MachiningList")
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Private Function LoadMachiningList() As Boolean
Dim MachiningList As New List(Of String)
Select Case SelMachining
Case MACH_CUT
If m_IsBeam Then
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.SAWBLADE)
Else
LoadMachiningListByType(MachiningList, MCH_MY.SAWING, 0)
End If
Case MACH_DRILL
LoadMachiningListByType(MachiningList, MCH_MY.DRILLING, 0)
LoadMachiningListByType(MachiningList, MCH_MY.POCKETING, 0, False)
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.MILL, False)
Case MACH_MILLING
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.MILL)
Case MACH_POCKETING
LoadMachiningListByType(MachiningList, MCH_MY.POCKETING, 0)
Case MACH_SAWING
LoadMachiningListByType(MachiningList, MCH_MY.MORTISING, 0)
Case MACH_SURFACING
LoadMachiningListByType(MachiningList, MCH_MY.SURFROUGHING, 0)
LoadMachiningListByType(MachiningList, MCH_MY.SURFFINISHING, 0, False)
End Select
GridLine.SetNamesList(New ObservableCollection(Of String)(MachiningList))
Return True
End Function
Private Function LoadTypeList() As Boolean
Dim TypeList As New List(Of String)
Dim Index As Integer = 1
Dim Type As String = ""
While EgtUILib.GetPrivateProfileString( SelMachining, Index.ToString, "", Type, m_MachTypeFilePath) > 0
TypeList.Add(Type)
Index += 1
End While
GridLine.SetTypeList( New ObservableCollection(Of String)( TypeList))
Return True
End Function
Private Function ReadTableFile() As Boolean
' svuoto la lista
m_TableRowList = New ObservableCollection(Of GridLine)
Dim FilePath As String = m_BaseDir & "\" & SelMachining & "Data.lua"
If Not File.Exists(FilePath) Then Return False
Dim FileContent As String() = File.ReadAllLines(FilePath)
Dim FoundTableName As Boolean = False
For LineIndex As Integer = 0 To FileContent.Count - 1
If FileContent(LineIndex).Contains(SelMachining & "Data") Then
FoundTableName = True
End If
Dim Open As Integer = CountCharacter(FileContent(LineIndex), "{"c)
Dim Close As Integer = CountCharacter(FileContent(LineIndex), "}"c)
If Close > Open Then
If FoundTableName Then
FoundTableName = False
End If
End If
If FoundTableName Then
Dim sOn As String = SearchKey(FileContent(LineIndex), ONCONST)
Dim sName As String = SearchKey(FileContent(LineIndex), NAME)
Dim sType As String = SearchKey(FileContent(LineIndex), TYPE)
If Not String.IsNullOrWhiteSpace(sOn) AndAlso Not String.IsNullOrWhiteSpace(sName) AndAlso Not String.IsNullOrWhiteSpace(sType) Then
If String.Compare(sOn, "true", True) = 0 Then
TableRowList.Add(New GridLine(True, sName, sType))
ElseIf String.Compare(sOn, "false", True) = 0 Then
TableRowList.Add(New GridLine(False, sName, sType))
Else
Continue For
End If
End If
End If
Next
NotifyPropertyChanged("TableRowList")
Return True
End Function
Private Function WriteTableFile() As Boolean
' inizio routine di scrittura
Dim FileContent As String() = File.ReadAllLines(m_TableTemplateFilePath)
Dim NewTableFileContent As New List(Of String)
Dim bBeamTable As Boolean = False
For LineIndex As Integer = 0 To FileContent.Count - 1
Dim sCurrLine As String = FileContent(LineIndex)
sCurrLine = sCurrLine.Replace(DATETIME, System.DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"))
sCurrLine = sCurrLine.Replace(TABLENAME, SelMachining & "Data")
If sCurrLine.Contains(SelMachining & "Data") AndAlso sCurrLine.Contains("=") Then
bBeamTable = True
NewTableFileContent.Add(sCurrLine)
PrintActiveMachiningList(NewTableFileContent)
End If
If Not bBeamTable Then
NewTableFileContent.Add(sCurrLine)
Else
bBeamTable = False
End If
Next
Dim FilePath As String = m_BaseDir & "\" & SelMachining & "Data.lua"
File.WriteAllLines(FilePath, NewTableFileContent, Text.Encoding.UTF8)
Return True
End Function
Private Sub PrintActiveMachiningList(NewTableFileContent As List(Of String))
For Index As Integer = 0 To m_TableRowList.Count - 1
If String.IsNullOrEmpty(m_TableRowList(Index).Name) Then Continue For
Dim CurrentLine As String = " { On = " & If(m_TableRowList(Index).OnPar, "true", "false") & ", Name = '" & m_TableRowList(Index).Name & "', Type = '" & m_TableRowList(Index).Type & "'}"
If Index < m_TableRowList.Count - 1 Then
CurrentLine &= ","
End If
NewTableFileContent.Add(CurrentLine)
Next
End Sub
#End Region ' METHODS
#Region "COMMANDS"
#Region "MoveRowUp"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property MoveRowUp_Command As ICommand
Get
If m_cmdMoveRowUp Is Nothing Then
m_cmdMoveRowUp = New Command(AddressOf MoveRowUp)
End If
Return m_cmdMoveRowUp
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub MoveRowUp()
If SelRowIndex > 0 Then
m_TableRowList.Move(SelRowIndex, SelRowIndex - 1)
End If
End Sub
#End Region ' MoveRowUp
#Region "MoveRowDown"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property MoveRowDown_Command As ICommand
Get
If m_cmdMoveRowDown Is Nothing Then
m_cmdMoveRowDown = New Command(AddressOf MoveRowDown)
End If
Return m_cmdMoveRowDown
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub MoveRowDown()
If SelRowIndex < m_TableRowList.Count - 1 Then
m_TableRowList.Move(SelRowIndex, SelRowIndex + 1)
End If
End Sub
#End Region ' MoveRowDown
#Region "AddRow"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property AddRow_Command As ICommand
Get
If m_cmdAddRow Is Nothing Then
m_cmdAddRow = New Command(AddressOf AddRow)
End If
Return m_cmdAddRow
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub AddRow()
m_TableRowList.Insert(SelRowIndex + 1, New GridLine(False, "", ""))
End Sub
#End Region ' AddRow
#Region "DeleteRow"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property DeleteRow_Command As ICommand
Get
If m_cmdDeleteRow Is Nothing Then
m_cmdDeleteRow = New Command(AddressOf DeleteRow)
End If
Return m_cmdDeleteRow
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub DeleteRow()
m_TableRowList.RemoveAt(SelRowIndex)
End Sub
#End Region ' DeleteRow
#Region "Save"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property Save_Command As ICommand
Get
If m_cmdSave Is Nothing Then
m_cmdSave = New Command(AddressOf Save)
End If
Return m_cmdSave
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Save()
' scrivo il file
WriteTableFile()
' resetto le modifiche
For Each Line In m_TableRowList
Line.ResetIsModified()
Next
End Sub
#End Region ' Save
#Region "Close"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property Close_Command As ICommand
Get
If m_cmdClose Is Nothing Then
m_cmdClose = New Command(AddressOf Close)
End If
Return m_cmdClose
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub Close()
' verifico se pagina precedente modificata
Dim TableModified As Boolean = False
For Each Line In m_TableRowList
If Line.IsModified Then
TableModified = True
Exit For
End If
Next
' se modificata, chiedo se salvare
If TableModified Then
' Salvare le modifiche apportate? - Salva
Select Case MessageBox.Show( EgtMsg( 9007), EgtMsg( 9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Save()
Case MessageBoxResult.No
' non devo fare nulla
End Select
End If
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Close
#End Region ' COMMANDS
End Class
Public Class GridLine
Inherits VMBase
Friend ReadOnly Property IsModified As Boolean
Get
Return m_IsOnModified Or m_IsNameModified Or m_IsTypeModified
End Get
End Property
Friend Sub ResetIsModified()
m_IsOnModified = False
m_IsNameModified = False
m_IsTypeModified = False
End Sub
Private m_IsOnModified As Boolean = False
Private m_On As Boolean
Public Property OnPar As Boolean
Get
Return m_On
End Get
Set(value As Boolean)
m_On = value
m_IsOnModified = True
End Set
End Property
Private Shared m_NamesList As ObservableCollection(Of String)
Public ReadOnly Property NamesList As ObservableCollection(Of String)
Get
Return m_NamesList
End Get
End Property
Friend Shared Sub SetNamesList(NamesList As ObservableCollection(Of String))
m_NamesList = NamesList
End Sub
Private m_IsNameModified As Boolean = False
Private m_Name As String
Public Property Name As String
Get
Return m_Name
End Get
Set(value As String)
m_Name = value
m_IsNameModified = True
End Set
End Property
Private Shared m_TypeList As ObservableCollection(Of String)
Public ReadOnly Property TypeList As ObservableCollection(Of String)
Get
Return m_TypeList
End Get
End Property
Friend Shared Sub SetTypeList(TypeList As ObservableCollection(Of String))
m_TypeList = TypeList
End Sub
Private m_IsTypeModified As Boolean = False
Private m_Type As String
Public Property Type As String
Get
Return m_Type
End Get
Set(value As String)
m_Type = value
m_IsTypeModified = True
End Set
End Property
Sub New(bOnPar As Boolean, sName As String, sType As String)
m_On = bOnPar
m_Name = sName
m_Type = sType
End Sub
End Class
+12
View File
@@ -0,0 +1,12 @@
<Grid x:Class="BottomTrayV"
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"
DockPanel.Dock="Bottom">
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
IsToolBar="False"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False"
IsRightDockable="False" />
</Grid>
+3
View File
@@ -0,0 +1,3 @@
Public Class BottomTrayV
End Class
+1
View File
@@ -22,6 +22,7 @@ Module ConstGen
' File con dati di licenza ' File con dati di licenza
Public Const LIC_FILE_NAME As String = "EgtCAM5.lic" Public Const LIC_FILE_NAME As String = "EgtCAM5.lic"
Public Const S_LICENCE As String = "Licence" Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key" Public Const K_KEY As String = "Key"
Public Const K_NESTKEY As String = "NestKey" Public Const K_NESTKEY As String = "NestKey"
+26 -4
View File
@@ -18,6 +18,7 @@ Module ConstIni
Public Const S_GENERAL As String = "General" Public Const S_GENERAL As String = "General"
Public Const K_DEBUG As String = "Debug" Public Const K_DEBUG As String = "Debug"
Public Const K_LICENCE As String = "Licence" Public Const K_LICENCE As String = "Licence"
Public Const K_NETKEY As String = "NetKey"
Public Const K_USERLEVEL As String = "UserLevel" Public Const K_USERLEVEL As String = "UserLevel"
Public Const K_MAXINST As String = "MaxInstances" Public Const K_MAXINST As String = "MaxInstances"
Public Const K_INSTANCES As String = "Instances" Public Const K_INSTANCES As String = "Instances"
@@ -28,6 +29,7 @@ Module ConstIni
Public Const K_HIDEPLACE As String = "HidePlace" Public Const K_HIDEPLACE As String = "HidePlace"
Public Const K_LASTNGEDIR As String = "LastNgeDir" Public Const K_LASTNGEDIR As String = "LastNgeDir"
Public Const K_LASTNGEOBJDIR As String = "LastNgeObjDir" Public Const K_LASTNGEOBJDIR As String = "LastNgeObjDir"
Public Const K_LASTNGEINSDIR As String = "LastNgeInsDir"
Public Const K_LASTLUADIR As String = "LastLuaDir" Public Const K_LASTLUADIR As String = "LastLuaDir"
Public Const K_LASTIMPDIR As String = "LastImpDir" Public Const K_LASTIMPDIR As String = "LastImpDir"
Public Const K_LASTEXPDIR As String = "LastExpDir" Public Const K_LASTEXPDIR As String = "LastExpDir"
@@ -37,14 +39,16 @@ Module ConstIni
Public Const K_TRANSFORM As String = "Transform" Public Const K_TRANSFORM As String = "Transform"
Public Const K_ONLYDRAW As String = "OnlyDraw" Public Const K_ONLYDRAW As String = "OnlyDraw"
Public Const K_SUPPORT As String = "Support" Public Const K_SUPPORT As String = "Support"
Public Const K_PLUGIN As String = "Plugin"
Public Const K_EXECUTE As String = "Execute"
Public Const S_LANGUAGES As String = "Languages" Public Const S_LANGUAGES As String = "Languages"
Public Const K_LANGUAGE As String = "Language" Public Const K_LANGUAGE As String = "Language"
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 S_GEOMDB As String = "GeomDB" Public Const S_GEOMDB As String = "GeomDB"
Public Const K_DEFAULTFONT As String = "DefaultFont" Public Const K_DEFAULTFONT As String = "DefaultFont"
@@ -65,10 +69,11 @@ 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"
Public Const K_SHOWTRIAADV As String = "ShowTriaAdv" Public Const K_SHOWSURFQUALITY As String = "ShowSurfQuality"
Public Const K_SHOWZMAP As String = "ShowZmap" Public Const K_SHOWZMAP As String = "ShowZmap"
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels" Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
Public Const K_ZOOMWIN As String = "ZoomWin" Public Const K_ZOOMWIN As String = "ZoomWin"
@@ -100,15 +105,21 @@ 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"
Public Const K_IMGWIDTH As String = "ImgWidth" Public Const K_IMGWIDTH As String = "ImgWidth"
Public Const K_IMGHEIGHT As String = "ImgHeight" Public Const K_IMGHEIGHT As String = "ImgHeight"
Public Const K_THREEJSLIBDIR As String = "ThreeJSLibDir"
Public Const S_SPECIAL As String = "Special" Public Const S_SPECIAL As String = "Special"
Public Const K_SPECIALENABLE As String = "SpecialEnable" Public Const K_SPECIALENABLE As String = "SpecialEnable"
@@ -130,10 +141,13 @@ Module ConstIni
Public Const K_WALLBUTTON As String = "Button" Public Const K_WALLBUTTON As String = "Button"
Public Const S_BEAMWALL As String = "BeamWall" Public Const S_BEAMWALL As String = "BeamWall"
Public Const K_BEAMWALLENABLE As String = "BtlEnable"
Public Const K_BEAMWALLBASEDIR As String = "BaseDir" Public Const K_BEAMWALLBASEDIR As String = "BaseDir"
Public Const K_BEAMWALLBUTTON As String = "Button" Public Const K_BEAMWALLBUTTON As String = "Button"
Public Const S_PRINTING3D As String = "3dPrinting"
Public Const K_ENABLE As String = "Enable"
Public Const K_3PRNBASEDIR As String = "BaseDir"
Public Const S_DOORS As String = "Doors" Public Const S_DOORS As String = "Doors"
Public Const K_DDFENABLE As String = "DdfEnable" Public Const K_DDFENABLE As String = "DdfEnable"
Public Const K_BASEDIR As String = "BaseDir" Public Const K_BASEDIR As String = "BaseDir"
@@ -145,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"
@@ -153,13 +168,14 @@ Module ConstIni
Public Const K_WRITEPEZFUNCTION As String = "WritePezFun" Public Const K_WRITEPEZFUNCTION As String = "WritePezFun"
Public Const K_READPEZFUNCTION As String = "ReadPezFun" Public Const K_READPEZFUNCTION As String = "ReadPezFun"
Public Const K_CREATEFUNCTION As String = "CreateFun" Public Const K_CREATEFUNCTION As String = "CreateFun"
Public Const K_COPYFUNCTION As String = "CopyFun"
Public Const K_MODDIR As String = "ModDir" Public Const K_MODDIR As String = "ModDir"
Public Const K_PEZDIR As String = "PezDir" Public Const K_PEZDIR As String = "PezDir"
Public Const K_COPYDIR As String = "CopyDir"
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"
@@ -171,13 +187,19 @@ 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_SELGEOMPROBING As String = "SelGeomProbing"
Public Const K_VMILLQUALITY 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"
Public Const K_AUTOUPDATEALLMACHININGS As String = "AutoUpdateAllMachinings"
Public Const S_SIMUL As String = "Simul" Public Const S_SIMUL As String = "Simul"
Public Const K_SLIDERX As String = "SliderX" Public Const K_SLIDERX As String = "SliderX"
Public Const K_SLIDERVAL As String = "SliderVal" Public Const K_SLIDERVAL As String = "SliderVal"
Public Const K_TRACEENABLE As String = "TraceEnable"
Public Const S_OPTIONS As String = "Options" Public Const S_OPTIONS As String = "Options"
Public Const K_NEWMACHININGISLASTONE As String = "NewMachiningIsLastOne" Public Const K_NEWMACHININGISLASTONE As String = "NewMachiningIsLastOne"
+21 -14
View File
@@ -1,6 +1,13 @@
Module ConstMachIni Module ConstMachIni
Public Const S_MCH_GENERAL As String = "General"
Public Const K_MATERIAL As String = "Material"
Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const K_EXTENSION As String = "Extension"
Public Const S_TOOLS As String = "Tools" Public Const S_TOOLS As String = "Tools"
Public Const K_PROBE As String = "Probe"
Public Const K_DRILLBIT As String = "Drillbit" Public Const K_DRILLBIT As String = "Drillbit"
Public Const K_SAWBLADE As String = "Sawblade" Public Const K_SAWBLADE As String = "Sawblade"
Public Const K_MILL As String = "Mill" Public Const K_MILL As String = "Mill"
@@ -8,22 +15,17 @@
Public Const K_CHISEL As String = "Chisel" Public Const K_CHISEL As String = "Chisel"
Public Const K_WATERJET As String = "WaterJet" Public Const K_WATERJET As String = "WaterJet"
Public Const K_COMPO As String = "Compo" Public Const K_COMPO As String = "Compo"
Public Const K_SHOWTOOLCHANGER As String = "ShowToolChanger"
Public Const K_SHOWHEADEXIT As String = "ShowHeadExit"
Public Const K_DRILLHOLDER As String = "DrillHolder"
Public Const K_SAWBLADEHOLDER As String = "SawBladeHolder"
Public Const K_MILLHOLDER As String = "MillHolder"
Public Const K_DRILLMAKER As String = "DrillMaker" Public Const K_DRILLMAKER As String = "DrillMaker"
Public Const K_SAWBLADEMAKER As String = "SawbladeMaker" Public Const K_SAWBLADEMAKER As String = "SawbladeMaker"
Public Const K_MILLMAKER As String = "MillMaker" Public Const K_MILLMAKER As String = "MillMaker"
Public Const K_MORTISEMAKER As String = "MortiseMaker" Public Const K_MORTISEMAKER As String = "MortiseMaker"
Public Const K_CHISELMAKER As String = "ChiselMaker" Public Const K_CHISELMAKER As String = "ChiselMaker"
Public Const K_MOUNTEDTOOLCONFIG As String = "MountedToolConfig"
Public Const K_ACTIVE As String = "Active" Public Const K_ACTIVE As String = "Active"
Public Const S_TOOLHOLDER As String = "ToolHolder" Public Const S_TOOLHOLDER As String = "ToolHolder"
Public Const S_MACHININGS As String = "Machinings" Public Const S_MACHININGS As String = "Machinings"
Public Const K_PROBING As String = "Probing"
Public Const K_SAWING As String = "Sawing" Public Const K_SAWING As String = "Sawing"
Public Const K_DRILLING As String = "Drilling" Public Const K_DRILLING As String = "Drilling"
Public Const K_MILLING As String = "Milling" Public Const K_MILLING As String = "Milling"
@@ -33,20 +35,16 @@
Public Const K_SAWFINISHING As String = "SawFinishing" Public Const K_SAWFINISHING As String = "SawFinishing"
Public Const K_GENMACHINING As String = "GenMachining" Public Const K_GENMACHINING As String = "GenMachining"
Public Const K_CHISELING As String = "Chiseling" Public Const K_CHISELING As String = "Chiseling"
Public Const K_SURFROUGHING As String = "SurfRoughing"
Public Const K_SURFFINISHING As String = "SurfFinishing" Public Const K_SURFFINISHING As String = "SurfFinishing"
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 S_GENMACHINING As String = "GenMachining" Public Const S_GENMACHINING As String = "GenMachining"
Public Const K_GENSCRIPT As String = "GenScript" Public Const K_GENSCRIPT As String = "GenScript"
Public Const S_TOOLCHANGER As String = "ToolChanger" Public Const S_5AXMILLING As String = "5AxMilling"
Public Const K_NUMBER As String = "Number" Public Const K_5AXSCRIPT As String = "5AxScript"
Public Const K_POS As String = "Pos"
Public Const K_NAME As String = "Name"
Public Const K_MANUALNUMBER As String = "ManualNumber"
Public Const K_MANUALPOS As String = "ManualPos"
Public Const K_MANUALNAME As String = "ManualName"
Public Const S_DISPOSITION As String = "Disposition" Public Const S_DISPOSITION As String = "Disposition"
Public Const K_DISP_INITSCRIPT As String = "InitScript" Public Const K_DISP_INITSCRIPT As String = "InitScript"
@@ -66,7 +64,16 @@
Public Const S_VMILL As String = "VMill" Public Const S_VMILL As String = "VMill"
Public Const K_VM_ENABLE As String = "Enable" Public Const K_VM_ENABLE As String = "Enable"
Public Const S_TOOLTRACE As String = "ToolTrace"
Public Const K_TT_ENABLE As String = "Enable"
Public Const S_ESTIMATIONS As String = "Estimations" Public Const S_ESTIMATIONS As String = "Estimations"
Public Const K_EST_ENABLE As String = "Enable" Public Const K_EST_ENABLE As String = "Enable"
' Tipi di materiali previsti attualmente per le macchine
Public Const MCH_MAT_STONE As String = "Stone"
Public Const MCH_MAT_WOOD As String = "Wood"
Public Const MCH_MAT_BEAM As String = "Beam"
Public Const MCH_MAT_ADDITIVE As String = "Additive"
End Module End Module
@@ -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
+63 -21
View File
@@ -1,9 +1,11 @@
<UserControl x:Class="DrawPanelV" <EgtFloating:EgtFloatingPanel x:Class="DrawPanelV"
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:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"> xmlns:EgtCAM5="clr-namespace:EgtCAM5"
TitleBarOrientation="Vertical"
Visibility="{Binding DrawPanel_Visibility}">
<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"
@@ -32,6 +34,11 @@
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 Arc2PRToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Arc2PRCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Arc2PR.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}" <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}">
@@ -42,21 +49,28 @@
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 BiArcToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding BiArcCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/BiArc.png" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/>
<Button ToolTip="{Binding CircleCPToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" 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}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}" <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 Circle3PToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding Circle3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Circle3P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}" <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}">
@@ -72,17 +86,27 @@
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}">
@@ -170,6 +194,16 @@
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}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding StmMoveVertexFacetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveStmVertexFacetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/StmMoveVertex.png" Stretch="Uniform"/>
</Button>
</UniformGrid> </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}">
@@ -187,8 +221,11 @@
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}">
@@ -284,6 +321,11 @@
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}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyArcRadiusCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ModifyArcRadius.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ModifyTextToolTip}" Style="{StaticResource DrawPanelButton}" <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}">
@@ -342,4 +384,4 @@
</Interactivity:Interaction.Behaviors> </Interactivity:Interaction.Behaviors>
</StackPanel> </StackPanel>
</UserControl> </EgtFloating:EgtFloatingPanel>
+292 -14
View File
@@ -50,7 +50,7 @@ Public Class DrawPanelVM
Return EgtMsg(MSG_DRAWPANEL + 3) Return EgtMsg(MSG_DRAWPANEL + 3)
End Get End Get
End Property End Property
Public ReadOnly Property CirclePDToolTip As String Public ReadOnly Property CircleCPToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 4) Return EgtMsg(MSG_DRAWPANEL + 4)
End Get End Get
@@ -72,7 +72,12 @@ Public Class DrawPanelVM
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)
End Get
End Property
Public ReadOnly Property Arc2PRToolTip As String
Get
Return EgtMsg(5169)
End Get End Get
End Property End Property
Public ReadOnly Property ArcPDPToolTip As String Public ReadOnly Property ArcPDPToolTip As String
@@ -80,6 +85,12 @@ Public Class DrawPanelVM
Return EgtMsg(MSG_DRAWPANEL + 8) Return EgtMsg(MSG_DRAWPANEL + 8)
End Get End Get
End Property End Property
Public ReadOnly Property BiArcToolTip As String
Get
Return EgtMsg(5170)
End Get
End Property
Public ReadOnly Property Rectangle2PToolTip As String Public ReadOnly Property Rectangle2PToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 11) Return EgtMsg(MSG_DRAWPANEL + 11)
@@ -97,12 +108,22 @@ Public Class DrawPanelVM
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
@@ -146,6 +167,16 @@ Public Class DrawPanelVM
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
Get
Return EgtMsg( 5165) 'Approssima Superfici e Regioni Piane
End Get
End Property
Public ReadOnly Property StmMoveVertexFacetToolTip As String
Get
Return EgtMsg( 5166) 'Muovi Vertice di Superficie<br/>Muovi Faccia di Superficie (Shift)
End Get
End Property
Public ReadOnly Property ExtractSurfFacetToolTip As String Public ReadOnly Property ExtractSurfFacetToolTip As String
Get Get
Return EgtMsg( 5158) 'Estrai Faccia da Superficie Return EgtMsg( 5158) 'Estrai Faccia da Superficie
@@ -197,6 +228,12 @@ Public Class DrawPanelVM
Return EgtMsg(MSG_DRAWPANEL + 24) Return EgtMsg(MSG_DRAWPANEL + 24)
End Get End Get
End Property End Property
Public ReadOnly Property ChangeStatusToolTip As String
Get
Return EgtMsg(5250)
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(MSG_DRAWPANEL + 25)
@@ -289,12 +326,17 @@ Public Class DrawPanelVM
End Property End Property
Public ReadOnly Property ApproxCurveToolTip As String Public ReadOnly Property ApproxCurveToolTip As String
Get Get
Return EgtMsg( 5163) Return EgtMsg(5163)
End Get
End Property
Public ReadOnly Property ModifyArcRadiusToolTip As String
Get
Return EgtMsg(5164)
End Get End Get
End Property End Property
Public ReadOnly Property ModifyTextToolTip As String Public ReadOnly Property ModifyTextToolTip As String
Get Get
Return EgtMsg(MSG_DRAWPANEL + 49) Return EgtMsg(5249)
End Get End Get
End Property End Property
@@ -383,6 +425,18 @@ Public Class DrawPanelVM
End Set End Set
End Property End Property
Private m_DrawPanel_Visibility As Visibility
Public ReadOnly Property DrawPanel_Visibility As Visibility
Get
Return m_DrawPanel_Visibility
End Get
End Property
Friend Sub SetDrawPanelVisibility(bValue As Boolean)
m_DrawPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
OnPropertyChanged(NameOf(DrawPanel_Visibility))
End Sub
#Region "Button state" #Region "Button state"
Private m_bLayerOk As Boolean Private m_bLayerOk As Boolean
@@ -427,12 +481,16 @@ Public Class DrawPanelVM
Private m_cmdCircle3P As ICommand Private m_cmdCircle3P As ICommand
Private m_cmdArcCSE As ICommand Private m_cmdArcCSE As ICommand
Private m_cmdArc3P As ICommand Private m_cmdArc3P As ICommand
Private m_cmdArc2PR As ICommand
Private m_cmdArcPDP As ICommand Private m_cmdArcPDP As ICommand
Private m_cmdBiArc As ICommand
Private m_cmdRectangle2P As ICommand Private m_cmdRectangle2P As ICommand
Private m_cmdPolygon As ICommand Private m_cmdPolygon As ICommand
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
@@ -443,6 +501,8 @@ Public Class DrawPanelVM
Private m_cmdRuled As ICommand Private m_cmdRuled As ICommand
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_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
@@ -453,6 +513,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
@@ -467,6 +528,7 @@ Public Class DrawPanelVM
Private m_cmdFillet As ICommand Private m_cmdFillet As ICommand
Private m_cmdChamfer As ICommand Private m_cmdChamfer As ICommand
Private m_cmdArcFlip As ICommand Private m_cmdArcFlip As ICommand
Private m_cmdModifyArcRadius As ICommand
Private m_cmdModifyText As ICommand Private m_cmdModifyText As ICommand
Private m_cmdMove As ICommand Private m_cmdMove As ICommand
Private m_cmdRotate As ICommand Private m_cmdRotate As ICommand
@@ -690,11 +752,38 @@ 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
#Region "Arc2PRCommand"
''' <summary>
''' Returns a command that do Arc2PR.
''' </summary>
Public ReadOnly Property Arc2PRCommand As ICommand
Get
If m_cmdArc2PR Is Nothing Then
m_cmdArc2PR = New RelayCommand(AddressOf Arc2PR)
End If
Return m_cmdArc2PR
End Get
End Property
''' <summary>
''' Execute the Arc2PR. This method is invoked by the Arc2PRCommand.
''' </summary>
Public Sub Arc2PR(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC2PR)
End Sub
#End Region ' Arc2PRCommand
#Region "ArcPDPCommand" #Region "ArcPDPCommand"
''' <summary> ''' <summary>
@@ -713,18 +802,45 @@ 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
#End Region ' ArcPDPCommand #End Region ' ArcPDPCommand
#Region "BiArcCommand"
''' <summary>
''' Returns a command that do BiArc.
''' </summary>
Public ReadOnly Property BiArcCommand As ICommand
Get
If m_cmdBiArc Is Nothing Then
m_cmdBiArc = New RelayCommand(AddressOf BiArc)
End If
Return m_cmdBiArc
End Get
End Property
''' <summary>
''' Execute the BiArc. This method is invoked by the BiArcCommand.
''' </summary>
Public Sub BiArc(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.BIARC)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CURVEBEZIER)
End If
End Sub
#End Region ' BiArcCommand
#Region "Rectangle2PCommand" #Region "Rectangle2PCommand"
''' <summary> ''' <summary>
@@ -848,6 +964,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>
@@ -1140,7 +1310,7 @@ Public Class DrawPanelVM
''' </summary> ''' </summary>
Public Sub ExplodeSurf(ByVal param As Object) Public Sub ExplodeSurf(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SURFTMTOTRIANGLES)
Else Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXPLODESURF) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXPLODESURF)
End If End If
@@ -1148,6 +1318,56 @@ Public Class DrawPanelVM
#End Region ' ExplodeSurfCommand #End Region ' ExplodeSurfCommand
#Region "ApproxSurfCommand"
''' <summary>
''' Returns a command that do ApproxSurf.
''' </summary>
Public ReadOnly Property ApproxSurfCommand As ICommand
Get
If m_cmdApproxSurf Is Nothing Then
m_cmdApproxSurf = New RelayCommand(AddressOf ApproxSurf)
End If
Return m_cmdApproxSurf
End Get
End Property
''' <summary>
''' Execute the ApproxSurf. This method is invoked by the ApproxSurfCommand.
''' </summary>
Public Sub ApproxSurf(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.APPROXSURF)
End Sub
#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>
@@ -1169,7 +1389,7 @@ Public Class DrawPanelVM
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET)
End Sub End Sub
#End Region ' ExplodeSurfCommand #End Region ' ExtractSurfFacetCommand
#Region "InvertSurfCommand" #Region "InvertSurfCommand"
@@ -1391,6 +1611,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>
@@ -1726,6 +1981,29 @@ Public Class DrawPanelVM
#End Region ' ArcFlipCommand #End Region ' ArcFlipCommand
#Region "ModifyArcRadiusCommand"
''' <summary>
''' Returns a command that do ModifyArcRadius.
''' </summary>
Public ReadOnly Property ModifyArcRadiusCommand As ICommand
Get
If m_cmdModifyArcRadius Is Nothing Then
m_cmdModifyArcRadius = New RelayCommand(AddressOf ModifyArcRadius)
End If
Return m_cmdModifyArcRadius
End Get
End Property
''' <summary>
''' Execute the ModifyArcRadius. This method is invoked by the ModifyArcRadiusCommand.
''' </summary>
Public Sub ModifyArcRadius(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MODIFYARCRADIUS)
End Sub
#End Region ' ModifyTextCommand
#Region "ModifyTextCommand" #Region "ModifyTextCommand"
''' <summary> ''' <summary>
+130 -11
View File
@@ -97,27 +97,31 @@
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="EgtUILib"> <Reference Include="DotNetZip">
<HintPath>..\..\EgtProg\EgtCAM5\DotNetZip.dll</HintPath>
</Reference>
<Reference Include="EgtUILib, Version=2.4.6.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath> <HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="EgtWPFLib5"> <Reference Include="EgtWPFLib, Version=2.4.5.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib.dll</HintPath>
</Reference>
<Reference Include="EgtWPFLib5, Version=2.4.6.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath> <HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Ionic.Zip">
<HintPath>..\..\EgtProg\EgtCAM5\Ionic.Zip.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\EgtCAM5\Microsoft.Expression.Interactions.dll</HintPath> <HintPath>..\..\EgtProg\EgtCAM5\Microsoft.Expression.Interactions.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>packages\EgtWPFLib5.2.4.6.1\lib\System.Windows.Interactivity.dll</HintPath>
<HintPath>..\..\EgtProg\EgtCAM5\System.Windows.Interactivity.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
@@ -150,16 +154,35 @@
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb"> <Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb">
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon> <DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowVM.vb" /> <Compile Include="BottomTray\BottomTrayV.xaml.vb">
<DependentUpon>BottomTrayV.xaml</DependentUpon>
</Compile>
<Compile Include="CurrSetUp\CurrSetUpV.xaml.vb"> <Compile Include="CurrSetUp\CurrSetUpV.xaml.vb">
<DependentUpon>CurrSetUpV.xaml</DependentUpon> <DependentUpon>CurrSetUpV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="CurrSetUp\CurrSetUpVM.vb" /> <Compile Include="CurrSetUp\CurrSetUpVM.vb" />
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
<Compile Include="ExecuteWindow\ExecuteWindowV.xaml.vb">
<DependentUpon>ExecuteWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="ExecuteWindow\ExecuteWindowVM.vb" />
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
<DependentUpon>LeftTrayV.xaml</DependentUpon>
</Compile>
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" /> <Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
<Compile Include="MEFPlugin\MefPlugin.vb" />
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpanderV.xaml.vb"> <Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpanderV.xaml.vb">
<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\ProbingParameterExpanderV.xaml.vb">
<DependentUpon>ProbingParameterExpanderV.xaml</DependentUpon>
</Compile>
<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>
@@ -178,6 +201,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>
@@ -225,6 +251,12 @@
<Compile Include="OptionsWindow\MachineBox.xaml.vb"> <Compile Include="OptionsWindow\MachineBox.xaml.vb">
<DependentUpon>MachineBox.xaml</DependentUpon> <DependentUpon>MachineBox.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="RightTray\RightTrayV.xaml.vb">
<DependentUpon>RightTrayV.xaml</DependentUpon>
</Compile>
<Compile Include="SceneContentControl\SceneContentControlV.xaml.vb">
<DependentUpon>SceneContentControlV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUpDb\SetUpDbV.xaml.vb"> <Compile Include="SetUpDb\SetUpDbV.xaml.vb">
<DependentUpon>SetUpDbV.xaml</DependentUpon> <DependentUpon>SetUpDbV.xaml</DependentUpon>
</Compile> </Compile>
@@ -272,7 +304,11 @@
</Compile> </Compile>
<Compile Include="StatusBar\MyStatusBarVM.vb" /> <Compile Include="StatusBar\MyStatusBarVM.vb" />
<Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" /> <Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" />
<Compile Include="TopTray\TopTrayV.xaml.vb">
<DependentUpon>TopTrayV.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Analyze.vb" /> <Compile Include="Utility\Analyze.vb" />
<Compile Include="Utility\BasePanelVM.vb" />
<Compile Include="Utility\BindingProxy.vb" /> <Compile Include="Utility\BindingProxy.vb" />
<Compile Include="Utility\Map.vb" /> <Compile Include="Utility\Map.vb" />
<Compile Include="Internals\MruList.vb" /> <Compile Include="Internals\MruList.vb" />
@@ -344,7 +380,6 @@
<DependentUpon>MachiningParameterExpanderV.xaml</DependentUpon> <DependentUpon>MachiningParameterExpanderV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\OperationListBoxItem\OperationListBoxItem.vb" /> <Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\OperationListBoxItem\OperationListBoxItem.vb" />
<Compile Include="OptionPanel\MachiningOptionPanel\SimulationExpander\MachineAxis.vb" />
<Compile Include="PopUpGridPanel\PopUpGridPanelV.xaml.vb"> <Compile Include="PopUpGridPanel\PopUpGridPanelV.xaml.vb">
<DependentUpon>PopUpGridPanelV.xaml</DependentUpon> <DependentUpon>PopUpGridPanelV.xaml</DependentUpon>
</Compile> </Compile>
@@ -411,6 +446,10 @@
<Compile Include="Utility\Utility.vb" /> <Compile Include="Utility\Utility.vb" />
<Compile Include="Utility\VMBase.vb" /> <Compile Include="Utility\VMBase.vb" />
<Compile Include="ValidationGroup.vb" /> <Compile Include="ValidationGroup.vb" />
<Compile Include="WinFormPluginControl\WinFormPluginControlVM.vb" />
<Compile Include="WinFormPluginControl\WinFormPluginControlV.xaml.vb">
<DependentUpon>WinFormPluginControlV.xaml</DependentUpon>
</Compile>
<Page Include="AboutBoxWindow\AboutBoxView.xaml"> <Page Include="AboutBoxWindow\AboutBoxView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -419,6 +458,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="BottomTray\BottomTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="CurrSetUp\CurrSetUpV.xaml"> <Page Include="CurrSetUp\CurrSetUpV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -427,6 +470,14 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="ExecuteWindow\ExecuteWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LeftTray\LeftTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MachOptionsWindow\MachOptionV.xaml"> <Page Include="MachOptionsWindow\MachOptionV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -435,6 +486,14 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\ProbingParameterExpanderV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptionPanel\MachiningOptionPanel\OperationExpander\MachiningParameterExpander\FiveAxisMachinigParameterExpanderV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</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>
@@ -459,6 +518,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>
@@ -515,6 +578,14 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="RightTray\RightTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SceneContentControl\SceneContentControlV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SetUpDb\SetUpDbV.xaml"> <Page Include="SetUpDb\SetUpDbV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -579,6 +650,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator> <Generator>XamlIntelliSenseFileGenerator</Generator>
</Page> </Page>
<Page Include="TopTray\TopTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Utility\Dictionary.xaml"> <Page Include="Utility\Dictionary.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -671,6 +746,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="WinFormPluginControl\WinFormPluginControlV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="System.Linq" /> <Import Include="System.Linq" />
@@ -943,6 +1022,46 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\DrawPanel\ApproxCurve.png" /> <Resource Include="Resources\DrawPanel\ApproxCurve.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ModifyArcRadius.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ApproxSurf.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TopCommandBar\Print.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtCAM5_64.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Note\+.png" />
<Resource Include="Resources\Note\-.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\AngularDimension.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\DiametralDimension.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ChangeStatus.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\GridViewPanel\CplaneINVERT.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\StmMoveVertex.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Arc2PR.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\BiArc.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ExecuteWindow\reload.png" />
</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
+7 -5
View File
@@ -1,10 +1,12 @@
<UserControl x:Class="ExecutePanelV" <EgtFloating:EgtFloatingPanel x:Class="ExecutePanelV"
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"
Visibility="{Binding ExecutePanel_Visibility}">
<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>
@@ -13,4 +15,4 @@
</Button> </Button>
</StackPanel> </StackPanel>
</UserControl> </EgtFloating:EgtFloatingPanel>
+24 -2
View File
@@ -12,6 +12,18 @@ Public Class ExecutePanelVM
End Get End Get
End Property End Property
Private m_ExecutePanel_Visibility As Visibility
Public ReadOnly Property ExecutePanel_Visibility As Visibility
Get
Return m_ExecutePanel_Visibility
End Get
End Property
Friend Sub SetExecutePanelVisibility(bValue As Boolean)
m_ExecutePanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
OnPropertyChanged(NameOf(ExecutePanel_Visibility))
End Sub
' Definizione comandi ' Definizione comandi
Private m_cmdExec As ICommand Private m_cmdExec As ICommand
Private Shared m_cmdOpenMruScript As ICommand Private Shared m_cmdOpenMruScript As ICommand
@@ -28,6 +40,11 @@ Public Class ExecutePanelVM
#End Region ' FIELDS & PROPERTIES #End Region ' FIELDS & PROPERTIES
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefExecutePanelVM(Me)
End Sub
#Region "COMMANDS" #Region "COMMANDS"
#Region "ExecCommand" #Region "ExecCommand"
@@ -48,8 +65,13 @@ Public Class ExecutePanelVM
''' Execute the Exec. This method is invoked by the ExecCommand. ''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary> ''' </summary>
Public Sub Exec(ByVal param As Object) Public Sub Exec(ByVal param As Object)
Map.refProjectVM.PreExecScript(True) If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.ExecScript(String.Empty) Dim ExecuteWindow As New ExecuteWindowV(Application.Current.MainWindow, New ExecuteWindowVM)
ExecuteWindow.ShowDialog()
Else
Map.refProjectVM.PreExecScript(True)
Map.refProjectVM.ExecScript(String.Empty)
End If
End Sub End Sub
#End Region ' ExecCommand #End Region ' ExecCommand
+39
View File
@@ -0,0 +1,39 @@
<EgtWPFLib5:EgtCustomWindow x:Class="ExecuteWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="Execute Window"
Height="500" Width="400"
IsResizable="True"
IsMinimizable="True"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
TitleBarHeight="32"
PreviewKeyDown="EgtCustomWindow_PreviewKeyDown"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding sScriptText}"
Style="{StaticResource ExecuteWindow_TextBox}"/>
<Button Grid.Row="1"
Grid.ColumnSpan="2"
Content="{Binding OkMsg}"
Command="{Binding Ok_Command}"
Style="{StaticResource EgtCAM5_InputButton}"/>
<Button Grid.Column="1"
Command="{Binding Reload_Command}"
IsEnabled="{Binding bReload_IsEnable}"
Style="{StaticResource ExecuteWindow_Button}">
<Image Source="/Resources/ExecuteWindow/reload.png" Stretch="Uniform"/>
</Button>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
+32
View File
@@ -0,0 +1,32 @@
Public Class ExecuteWindowV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_ExecuteWindowVM As ExecuteWindowVM
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(Owner As Window, ExecuteWindowVM As ExecuteWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ExecuteWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ExecuteWindowVM = ExecuteWindowVM
End Sub
#End Region ' Constructor
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ExecuteWindowVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
Private Sub EgtCustomWindow_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If e.Key = Key.Escape Then
Me.Close()
End If
End Sub
End Class
+125
View File
@@ -0,0 +1,125 @@
Imports System.Text
Imports EgtUILib
Imports System.IO
Public Class ExecuteWindowVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
' Evento per chiusura finestra
Public Event m_CloseWindow(bDialogResult As Boolean)
Private ReadOnly scriptFilePath As String = IO.Path.Combine(IniFile.m_sTempDir, $"tmpLua.lua")
Private m_sScriptText As String
Public Property sScriptText As String
Get
Return m_sScriptText
End Get
Set(value As String)
m_sScriptText = value
NotifyPropertyChanged(NameOf(sScriptText))
End Set
End Property
Private Sub SetScriptFile(value As String)
m_sScriptText = value
NotifyPropertyChanged(NameOf(sScriptText))
End Sub
Private m_bReload_IsEnable As Boolean = File.Exists(scriptFilePath)
Public ReadOnly Property bReload_IsEnable As Boolean
Get
Return m_bReload_IsEnable
End Get
End Property
#Region "Messages"
Public ReadOnly Property OkMsg As String
Get
Return EgtMsg(20041)
End Get
End Property
Public ReadOnly Property SaveMsg As String
Get
Return EgtMsg(6453)
End Get
End Property
#End Region ' Messages
' Definizione Comandi
Private m_cmdOk As ICommand
Private m_cmdReload As ICommand
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
End Sub
#End Region ' Constructor
#Region "METHODS"
Private Sub SaveScript(sPathFileScript As String, sScriptText As String)
If String.IsNullOrWhiteSpace(sPathFileScript) OrElse String.IsNullOrWhiteSpace(sScriptText) Then Return
File.WriteAllText(sPathFileScript, sScriptText, Encoding.UTF8)
End Sub
Private Function ReadScript(sPathFileScript As String) As String
If String.IsNullOrWhiteSpace(sPathFileScript) Then Return String.Empty
Return File.ReadAllText(sPathFileScript)
End Function
#End Region ' Methods
#Region "COMMANDS"
#Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
' Salva il file script
SaveScript(scriptFilePath, m_sScriptText)
' Esegue il file script
EgtLuaExecFile(scriptFilePath)
' Chiudo finestra
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Ok_Command
#Region "Reload_Command"
Public ReadOnly Property Reload_Command As ICommand
Get
If m_cmdReload Is Nothing Then
m_cmdReload = New Command(AddressOf Reload)
End If
Return m_cmdReload
End Get
End Property
Public Sub Reload()
If File.Exists(scriptFilePath) Then
SetScriptFile(ReadScript(scriptFilePath))
End If
End Sub
#End Region ' Reload_Command
#End Region ' Commands
End Class
+5 -5
View File
@@ -6,20 +6,20 @@
<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"/>
-5
View File
@@ -12,13 +12,8 @@ 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"
+5 -5
View File
@@ -59,7 +59,7 @@ Public Class MruList
End Sub End Sub
'--------------------------------------------------------------------------- '---------------------------------------------------------------------------
Public Sub Add(ByVal sFileName As String) Public Sub Add(sFileName As String)
' Gestione '_' ' Gestione '_'
Dim sMyFileName As String = sFileName.Replace("_", "__") Dim sMyFileName As String = sFileName.Replace("_", "__")
' Se stringa vuota, esco subito ' Se stringa vuota, esco subito
@@ -84,7 +84,7 @@ Public Class MruList
End Sub End Sub
'--------------------------------------------------------------------------- '---------------------------------------------------------------------------
Private Function FileNameIndex(ByVal sFileName As String) As Integer Private Function FileNameIndex(sFileName As String) As Integer
For i As Integer = 0 To m_FileNames.Count - 1 For i As Integer = 0 To m_FileNames.Count - 1
If String.Compare(m_FileNames(i).ToString, sFileName, True) = 0 Then If String.Compare(m_FileNames(i).ToString, sFileName, True) = 0 Then
Return i Return i
@@ -94,7 +94,7 @@ Public Class MruList
End Function End Function
'--------------------------------------------------------------------------- '---------------------------------------------------------------------------
Public Sub Remove(ByVal sFileName As String) Public Sub Remove(sFileName As String)
' Gestione '_' ' Gestione '_'
Dim sMyFileName As String = sFileName.Replace("_", "__") Dim sMyFileName As String = sFileName.Replace("_", "__")
' Rimozione ' Rimozione
@@ -108,8 +108,8 @@ Public Class MruList
End Sub End Sub
'--------------------------------------------------------------------------- '---------------------------------------------------------------------------
Public Function GetFileName(ByVal nInd As Integer, ByRef sFileName As String) As Boolean Public Function GetFileName(nInd As Integer, ByRef sFileName As String) As Boolean
If nInd > 0 And nInd <= m_FileNames.Count() Then If nInd >= 0 And nInd < m_FileNames.Count() Then
' Gestione '_' ' Gestione '_'
sFileName = m_FileNames(nInd).ToString().Replace("__", "_") sFileName = m_FileNames(nInd).ToString().Replace("__", "_")
Return True Return True
+9
View File
@@ -0,0 +1,9 @@
<Grid x:Class="LeftTrayV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
DockPanel.Dock="Left">
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
</Grid>
+3
View File
@@ -0,0 +1,3 @@
Public Class LeftTrayV
End Class
+74
View File
@@ -0,0 +1,74 @@
Imports System.ComponentModel.Composition
Imports System.ComponentModel.Composition.hosting
Public Class MEFLoader
Private importers As Dictionary(Of String, List(Of Object)) = New Dictionary(Of String, List(Of Object))()
Public Overridable Function LoadByTag(Of T)(ByVal path As String, ByVal tag As String) As ICollection(Of T)
Dim importer = GetImporter(Of T)(path)
Return importer.LoadByMEF(path, tag)
End Function
Protected Function GetImporter(Of T)(ByVal path As String) As MEFImporter(Of T)
Dim importerList = GetImporterList(path)
Dim importer = importerList.OfType(Of MEFImporter(Of T))().FirstOrDefault()
If importer Is Nothing Then
importer = New MEFImporter(Of T)(path)
importerList.Add(importer)
End If
Return importer
End Function
Protected Function GetImporterList(ByVal path As String) As List(Of Object)
If importers.ContainsKey(path) = False Then importers.Add(path, New List(Of Object)())
Return importers(path)
End Function
Public Overridable Function LoadByType(Of T)(ByVal path As String) As ICollection(Of T)
Return LoadByTag(Of T)(path, String.Empty)
End Function
End Class
Public Interface IMetadata
ReadOnly Property Name As String
End Interface
Public Class MEFImporter(Of T)
<ImportMany(AllowRecomposition:=True)>
Public Property [imports] As IEnumerable(Of Lazy(Of T, IMetadata))
Private Sub New()
End Sub
Public Sub New(ByVal path As String)
Me.New()
directoryCatalog = New DirectoryCatalog(path)
End Sub
Protected directoryCatalog As DirectoryCatalog = Nothing
Protected Sub DoImport(ByVal path As String)
Dim catalog = New AggregateCatalog()
catalog.Catalogs.Add(directoryCatalog)
Dim container As CompositionContainer = New CompositionContainer(catalog)
container.ComposeParts(Me)
End Sub
Public Function LoadByMEF(ByVal path As String, ByVal name As String) As ICollection(Of T)
Dim res = New List(Of T)()
DoImport(path)
For Each [module] As Lazy(Of T, IMetadata) In [imports]
If [module].Metadata.Name = name OrElse String.IsNullOrEmpty(name) Then
res.Add([module].Value)
End If
Next
Return res
End Function
End Class
+84 -26
View File
@@ -1,5 +1,7 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.IO Imports System.IO
Imports EgtCAM5.MyMachinePanelVM
Imports System.Security.Cryptography
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
@@ -103,7 +105,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
@@ -115,10 +120,12 @@ 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)
@@ -161,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
@@ -193,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()
@@ -208,6 +234,13 @@ Public Class MyMachGroupPanelVM
EgtOutLog("Errore nel posizionamento dei pezzi") EgtOutLog("Errore nel posizionamento dei pezzi")
Return False Return False
End If End If
Else
Dim sTabNames As String = ""
EgtGetAllTablesNames(sTabNames)
Dim sItems() As String = sTabNames.Split(","c).ToArray
If sItems.Count() > 0 Then
EgtSetTable( sItems(0))
End If
End If End If
Else Else
EgtOutLog("Machine without InitDisp script.") EgtOutLog("Machine without InitDisp script.")
@@ -278,20 +311,22 @@ Public Class MyMachGroupPanelVM
End Sub End Sub
Private Sub LoadMaterialType() Private Sub LoadMaterialType()
Dim sMatType As String = "Wood" Dim sMatType As String = MCH_MAT_WOOD
' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name ' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name
' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini" ' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini"
Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath
EgtUILib.GetPrivateProfileString(S_GENERAL, EgtWPFLib5.EstConstMachIni.K_MATERIAL, sMatType, sMatType, sMachineIniPath) EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, sMatType, sMatType, sMachineIniPath)
Select Case sMatType Select Case sMatType
Case "Stone" Case MCH_MAT_STONE
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE
Case "Wood" Case MCH_MAT_WOOD
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
Case "Beam" Case MCH_MAT_BEAM
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM
Case MCH_MAT_ADDITIVE
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
Case Else Case Else
' Se il materiale spcificato nel file INI della macchina non corrisponde ai 2 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))
End Select End Select
@@ -300,15 +335,36 @@ Public Class MyMachGroupPanelVM
#End Region #End Region
Public Overrides Sub AddMachGroup() Public Overrides Sub AddMachGroup()
'If AddNewMachGroup() Then
' Dim sMachName As String = String.Empty Dim nNewMachGrpId As Integer = GDB_ID.NULL
' EgtGetMachGroupName(EgtGetCurrMachGroup(), sMachName) Dim sNewMachGrpName As String = ""
' MachGroupList.Add(sMachName)
' SelectedMachGroup = sMachName ' Se premuto Shift, copio il gruppo corrente
' EgtDraw() If (Keyboard.Modifiers And Input.ModifierKeys.Shift) = Input.ModifierKeys.Shift Then
' Map.refOperationsListExpanderVM.LoadOperationList(GDB_ID.NULL) ' Eseguo una copia del gruppo corrente
' Map.refOperationsListExpanderVM.UpdateCurrentMachine() Dim sMachGrpName As String = ""
'End If If Not EgtGetMachGroupName(EgtGetCurrMachGroup(), sMachGrpName) Then Return
sNewMachGrpName = "Mach_1"
EgtGetMachGroupNewName(sNewMachGrpName)
nNewMachGrpId = EgtCopyMachGroup(sMachGrpName, sNewMachGrpName)
' altrimenti ne aggiungo uno vuoto
Else
Dim vPart As New List(Of Integer)
AddNewMachGroup(nNewMachGrpId, vPart)
EgtGetMachGroupName(nNewMachGrpId, sNewMachGrpName)
End If
' Se creazione non riuscita, esco subito
If nNewMachGrpId = GDB_ID.NULL Then Return
' altrimenti sistemo interfaccia
Dim sMachine As String = String.Empty
EgtGetMachGroupMachineName(nNewMachGrpId, sMachine)
Dim machGroup As New MachGroup(nNewMachGrpId, sNewMachGrpName, sMachine)
MachGroupList.Add(machGroup)
SelectedMachGroup = machGroup
Map.refMachGroupPanelVM.SetMachGroupState(True)
EgtZoom(ZM.ALL)
End Sub End Sub
Public Overrides Sub RemoveMachGroup() Public Overrides Sub RemoveMachGroup()
@@ -368,6 +424,8 @@ Public Class MyMachGroupPanelVM
(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
+23 -5
View File
@@ -16,10 +16,8 @@
<Grid Margin="10"> <Grid Margin="10">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="40*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="20*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -27,6 +25,9 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<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,7 +57,24 @@
</ComboBox> </ComboBox>
</UniformGrid> </UniformGrid>
<UniformGrid Grid.Row="4" Columns="2"> <UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5"
Visibility="{Binding StoneVisibility}">
<TextBlock Text="{Binding ExtSawArcMinRadMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ExtSawArcMinRad}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="5" Columns="2" Margin="0,0,0,5"
Visibility="{Binding StoneVisibility}">
<TextBlock Text="{Binding IntSawArcMaxSideAngMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding IntSawArcMaxSideAng}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="6" Columns="2" Margin="0,0,0,5">
<TextBlock Text="{Binding ApproxLinTolMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ApproxLinTol}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="7" 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}"/>
+87
View File
@@ -1,5 +1,6 @@
Imports System.IO Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5
Public Class MachOptionVM Public Class MachOptionVM
@@ -67,6 +68,51 @@ Public Class MachOptionVM
End Set End Set
End Property End Property
Private m_sExtSawArcMinRad As String
Public Property ExtSawArcMinRad As String
Get
Return m_sExtSawArcMinRad
End Get
Set(value As String)
Dim dExtSawArcMinRad As Double = 0
If StringToLen(value, dExtSawArcMinRad) Then
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dExtSawArcMinRad)
EgtMdbSave()
m_sExtSawArcMinRad = value
End If
End Set
End Property
Private m_sIntSawArcMaxSideAng As String
Public Property IntSawArcMaxSideAng As String
Get
Return m_sIntSawArcMaxSideAng
End Get
Set(value As String)
Dim dIntSawArcMaxSideAng As Double = 0
If StringToLen(value, dIntSawArcMaxSideAng) Then
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dIntSawArcMaxSideAng)
EgtMdbSave()
m_sIntSawArcMaxSideAng = value
End If
End Set
End Property
Private m_sApproxLinTol As String
Public Property ApproxLinTol As String
Get
Return m_sApproxLinTol
End Get
Set(value As String)
Dim dApproxLinTol As Double = 0
If StringToLen(value, dApproxLinTol) Then
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
EgtMdbSave()
m_sApproxLinTol = value
End If
End Set
End Property
Private m_ArchivedSetUpList As New List(Of String) Private m_ArchivedSetUpList As New List(Of String)
Public Property ArchivedSetUpList As List(Of String) Public Property ArchivedSetUpList As List(Of String)
Get Get
@@ -113,6 +159,24 @@ Public Class MachOptionVM
End Get End Get
End Property End Property
Public ReadOnly Property ExtSawArcMinRadMsg As String
Get
Return EgtMsg(6411) ' Minimo raggio arco esterno con lama
End Get
End Property
Public ReadOnly Property IntSawArcMaxSideAngMsg As String
Get
Return EgtMsg(6412) ' Massima inclinazione arco interno con lama
End Get
End Property
Public ReadOnly Property ApproxLinTolMsg As String
Get
Return EgtMsg(6410) ' Tolleranza di approssimazione
End Get
End Property
Public ReadOnly Property DefaultSetUpMsg As String Public ReadOnly Property DefaultSetUpMsg As String
Get Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7) Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
@@ -141,6 +205,18 @@ 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 minimo raggio arco esterno lavorabile con lama
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
m_sExtSawArcMinRad = LenToString(dVal, 4)
' Leggo massima inclinazione lama per lavorare archi interni
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
m_sIntSawArcMaxSideAng = LenToString(dVal, 4)
' Leggo tolleranza lineare di approssimazione
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal)
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
@@ -161,6 +237,17 @@ Public Class MachOptionVM
End If End If
End Sub End Sub
#Region "Visibility"
Public ReadOnly Property StoneVisibility As Visibility
Get
Dim sGenMat As String = ""
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, MCH_MAT_WOOD, sGenMat, IniFile.m_sCurrMachIniFilePath)
Return If( sGenMat = MCH_MAT_STONE, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#End Region
#Region "COMMANDS" #Region "COMMANDS"
#Region "CloseMachOptionsCommand" #Region "CloseMachOptionsCommand"
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="MachinePanelV" <EgtFloating:EgtFloatingPanel x:Class="MachinePanelV"
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"
Visibility="{Binding MachinePanel_Visibility}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<!--Combobox per selezionare la macchina corrente--> <!--Combobox per selezionare la macchina corrente-->
@@ -32,4 +34,4 @@
</Button> </Button>
</StackPanel> </StackPanel>
</UserControl> </EgtFloating:EgtFloatingPanel>
+14 -2
View File
@@ -82,6 +82,17 @@ Public Class MyMachinePanelVM
End Set End Set
End Property End Property
Private m_MachinePanel_Visibility As Visibility
Public ReadOnly Property MachinePanel_Visibility As Visibility
Get
Return m_MachinePanel_Visibility
End Get
End Property
Friend Sub SetMachinePanelVisibility(bValue As Boolean)
m_MachinePanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(MachinePanel_Visibility))
End Sub
#Region "Messages" #Region "Messages"
Public ReadOnly Property ToolDBMsg As String Public ReadOnly Property ToolDBMsg As String
@@ -258,7 +269,7 @@ Public Class MyMachinePanelVM
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True) Dim 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 = 1024
MachDbWindowV.Owner = Application.Current.MainWindow MachDbWindowV.Owner = Application.Current.MainWindow
MachDbWindowV.ShowDialog() MachDbWindowV.ShowDialog()
@@ -279,10 +290,11 @@ Public Class MyMachinePanelVM
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9, True) Dim 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 = 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
+1 -1
View File
@@ -4,7 +4,7 @@
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="/Resources/EgtCAM5.ico" 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"
+133 -34
View File
@@ -4,6 +4,7 @@ Imports System.Windows.Threading
Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices
Imports System.Math Imports System.Math
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5
Public Class MainWindowVM Public Class MainWindowVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -14,13 +15,16 @@ Public Class MainWindowVM
Private m_objMutex As Mutex Private m_objMutex As Mutex
Private m_sDataRoot As String = String.Empty Private m_sDataRoot As String = String.Empty
Private m_sConfigDir As String = String.Empty Private m_sConfigDir As String = String.Empty
Private m_nDebug As Integer = 0 Private m_OnTerminateProcessCallback As New OnTerminateProcessCallback(AddressOf OnTerminateProcess)
' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY ' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY
' GRAPHICAL FIELDS Private m_nDebug As Integer = 0
' Event commands Public ReadOnly Property DebugLevel As Integer
' MainWindow ContentRendered Event Get
Return m_nDebug
End Get
End Property
Private m_sVersion As String = "1.1a1" Private m_sVersion As String = "1.1a1"
Public ReadOnly Property Version As String Public ReadOnly Property Version As String
@@ -65,7 +69,6 @@ Public Class MainWindowVM
End Property End Property
' GRAPHICAL FIELDS WITH PROPERTY ' GRAPHICAL FIELDS WITH PROPERTY
Private m_StatusBar As StatusBarV Private m_StatusBar As StatusBarV
Private m_bfirst As Boolean = True Private m_bfirst As Boolean = True
Public ReadOnly Property StatusBar As StatusBarV Public ReadOnly Property StatusBar As StatusBarV
@@ -92,6 +95,16 @@ Public Class MainWindowVM
End Get End Get
End Property End Property
Public ReadOnly Property IconSource As String
Get
#If PLATFORM = "x64" Then
Return "/Resources/EgtCAM5_64.ico"
#else
Return "/Resources/EgtCAM5.ico"
#End If
End Get
End Property
#End Region #End Region
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -190,6 +203,19 @@ Public Class MainWindowVM
End If End If
End Sub End Sub
Private Function OnTerminateProcess( nExitCode As Integer) As Boolean
' Aggiorno istanze usate
m_objMutex.WaitOne(1000)
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
' Dichiaro di procedere con la terminazione del programma
Return True
End Function
#End Region ' CloseApplicationCommand #End Region ' CloseApplicationCommand
#Region "cmdMainWindow_ContentRendered" #Region "cmdMainWindow_ContentRendered"
@@ -331,10 +357,7 @@ 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 If Not String.IsNullOrWhiteSpace(sToolMakersDir) Then
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR64, sToolMakersDir, sToolMakersDir)
#End If
If Not String.IsNullOrWhiteSpace( sToolMakersDir) Then
IniFile.m_sToolMakersDir = sToolMakersDir IniFile.m_sToolMakersDir = sToolMakersDir
Else Else
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
@@ -345,17 +368,29 @@ Public Class MainWindowVM
EgtSetLockType(KEY_TYPE.HW) EgtSetLockType(KEY_TYPE.HW)
' Leggo e imposto chiave di protezione ed eventuale chiave nesting ' Leggo e imposto chiave di protezione ed eventuale chiave nesting
Dim sLicFileName As String = "" Dim sLicFileName As String = ""
GetPrivateProfileString( S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName) GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
Dim sKey As String = "" Dim sKey As String = ""
EgtUILib.GetPrivateProfileString( S_LICENCE, K_KEY, "", sKey, sLicFile) EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey( sKey) EgtSetKey(sKey)
Dim sNestKey As String = "" Dim sNestKey As String = ""
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile) EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNestKey( sNestKey) EgtSetNestKey(sNestKey)
' Impostazioni per chiave di rete
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
EgtSetNetHwKey(bNetKey)
Dim sLockId As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
If Not String.IsNullOrEmpty(sLockId) Then
EgtSetLockId(sLockId)
End If
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2310, 1, IniFile.m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(3279, 2711, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2310, 1, IniFile.m_nKeyOptions) EgtGetKeyOptions(3279, 2711, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto abilitazione lavorazioni avanzate
MachineUtility.EnableAdvMachinings = IniFile.IsKeyEnabledAdvancedMachining()
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sVersion = My.Application.Info.Version.Major.ToString() & "." & m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
@@ -363,9 +398,13 @@ Public Class MainWindowVM
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() & (ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
My.Application.Info.Version.Revision.ToString() My.Application.Info.Version.Revision.ToString()
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 & " (" & IniFile.m_nInstance.ToString() & ")" & vbLf & Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & IniFile.m_nInstance.ToString() &
" 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)
EgtSetUserLevel( IniFile.m_nUserLevel)
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione) ' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
Dim sMsgDir As String = String.Empty Dim sMsgDir As String = String.Empty
If GetPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then If GetPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
@@ -378,32 +417,31 @@ Public Class MainWindowVM
If Not EgtLoadMessages(sMsgFilePath) Then If Not EgtLoadMessages(sMsgFilePath) Then
EgtOutLog("Error in EgtLoadMessages") EgtOutLog("Error in EgtLoadMessages")
End If End If
' Leggo e imposto livello utilizzatore ' Imposto dir font Nfe e font default
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' imposto dir font Nfe e font default
Dim sNfeDir As String = String.Empty Dim sNfeDir As String = String.Empty
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 sBtlAuxDir As String = String.Empty
GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
EgtSetBtlAuxDir(sBtlAuxDir)
' imposto dir di default per libreria Lua e lancio libreria di base
Dim sLuaLibsDir As String = String.Empty Dim sLuaLibsDir As String = String.Empty
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir) GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
#If PLATFORM = "x64" Then
GetPrivateProfileString(S_LUA, K_LIBSDIR64, sLuaLibsDir, sLuaLibsDir)
#End If
EgtSetLuaLibs(sLuaLibsDir) EgtSetLuaLibs(sLuaLibsDir)
Dim sLuaBaseLib As String = String.Empty Dim sLuaBaseLib As String = String.Empty
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib) GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
EgtLuaRequire(sLuaBaseLib) EgtLuaRequire(sLuaBaseLib)
' imposto direttorio temporaneo a EgtInterface ' Imposto direttorio ausiliario per import/gestione BTL (sempre dopo impostazioni lua)
Dim sBtlAuxDir As String = String.Empty
GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
EgtSetBtlAuxDir(sBtlAuxDir)
' Imposto direttorio libreria per export ThreeJs
Dim sThreeJSLibDir As String = String.Empty
GetPrivateProfileString(S_EXPORT, K_THREEJSLIBDIR, "", sThreeJSLibDir)
EgtSetThreeJSLibDir(sThreeJSLibDir)
' Imposto direttorio temporaneo a EgtInterface
EgtSetTempDir(m_sTempDir) EgtSetTempDir(m_sTempDir)
' imposto IniFile a EgtInterface ' Imposto IniFile a EgtInterface
EgtSetIniFile(m_sIniFile) EgtSetIniFile(m_sIniFile)
' verifico se avviare programma in modalità CAD-ONLY ' Verifico se avviare programma in modalità CAD-ONLY
IniFile.m_ProjectMode = If(GetPrivateProfileInt(S_GENERAL, K_ONLYDRAW, 0) = 0, ProjectModeOpt.DRAW, ProjectModeOpt.ONLYDRAW) IniFile.m_ProjectMode = If(GetPrivateProfileInt(S_GENERAL, K_ONLYDRAW, 0) = 0, ProjectModeOpt.DRAW, ProjectModeOpt.ONLYDRAW)
' Impostazioni MruLists ' Impostazioni MruLists
m_MruFiles.Init(S_MRUFILES, 8) m_MruFiles.Init(S_MRUFILES, 8)
@@ -448,7 +486,7 @@ Public Class MainWindowVM
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0) Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
IniFile.m_nInstance = 1 IniFile.m_nInstance = 1
Dim nMask As Integer = 1 Dim nMask As Integer = 1
While (nTmp And nMask) <> 0 And IniFile.m_nInstance < MAX_INST While (nTmp And nMask) <> 0 And IniFile.m_nInstance <= MAX_INST
IniFile.m_nInstance += 1 IniFile.m_nInstance += 1
nMask *= 2 nMask *= 2
End While End While
@@ -536,7 +574,7 @@ Public Class MainWindowVM
WritePrivateProfileString(S_GRID, K_SNAPSTEPINCH, DoubleToString(IniFile.dSnapStepInch, 4)) WritePrivateProfileString(S_GRID, K_SNAPSTEPINCH, DoubleToString(IniFile.dSnapStepInch, 4))
End If End If
' gestisco la chiusura di DrawPanelVM ' gestisco la chiusura di DrawPanelVM
If Not IniFile.m_bFailedRun Then If Not IniFile.m_bFailedRun AndAlso Not IsNothing(Map.refDrawPanelVM) Then
WritePrivateProfileString(S_GENERAL, K_DRAW2D, If(Map.refDrawPanelVM.Draw2DIsExpanded, "1", "0")) WritePrivateProfileString(S_GENERAL, K_DRAW2D, If(Map.refDrawPanelVM.Draw2DIsExpanded, "1", "0"))
WritePrivateProfileString(S_GENERAL, K_DRAW3D, If(Map.refDrawPanelVM.Draw3DIsExpanded, "1", "0")) WritePrivateProfileString(S_GENERAL, K_DRAW3D, If(Map.refDrawPanelVM.Draw3DIsExpanded, "1", "0"))
WritePrivateProfileString(S_GENERAL, K_MODIFY, If(Map.refDrawPanelVM.ModifyIsExpanded, "1", "0")) WritePrivateProfileString(S_GENERAL, K_MODIFY, If(Map.refDrawPanelVM.ModifyIsExpanded, "1", "0"))
@@ -548,7 +586,7 @@ Public Class MainWindowVM
#Region "Events" #Region "Events"
Private Sub MainWindow_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs) Private Sub MainWindow_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
' Con ESC esco dall'azione corrente ' Con ESC esco dall'azione corrente
If e.Key = Key.Escape Then If e.Key = Key.Escape Then
' reset Azione corrente ' reset Azione corrente
@@ -559,6 +597,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
@@ -574,4 +624,53 @@ Public Class MainWindowVM
#End Region #End Region
#Region "MEF Plugin"
Private m_Loader As MEFLoader = New MEFLoader()
Private Function GetPathByName(ByVal name As String) As String
Dim PluginNameSplit() As String = name.Split("."c)
Dim res = Map.refMainWindowVM.m_sDataRoot & "\Plugin\" & PluginNameSplit(0)
Return res
End Function
Friend Function GetControlByName(Of T)(Element As PluginControl) As Panel
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(Element.Name), Element.Name).FirstOrDefault()
Dim PluginPanel As Panel = Nothing
Select Case PlugInControl.GetType().BaseType.FullName
Case GetType(Panel).FullName, GetType(Grid).FullName
PluginPanel = TryCast(PlugInControl, Panel)
Case GetType(Forms.UserControl).FullName
Dim PluginUserControl As Forms.UserControl = TryCast(PlugInControl, Forms.UserControl)
Dim PluginControlInterface As IPluginControl = TryCast(PlugInControl, IPluginControl)
If Not IsNothing(PluginControlInterface) Then
AddHandler PluginControlInterface.UpdateProjectName, AddressOf UpdateProjectName
AddHandler PluginControlInterface.UpdateUI, AddressOf UpdateUI
End If
PluginPanel = New WinFormPluginControlV(New WinFormPluginControlVM(PluginUserControl, Element.ViewPanelState))
End Select
Return PluginPanel
End Function
Friend Function GetConfigData(Of T)(ByVal name As String) As IPluginConfigData
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(name), name).FirstOrDefault()
Dim PluginConfigData As IPluginConfigData = Nothing
Dim v = PlugInControl.GetType()
If PlugInControl.GetType().Name = PLUGIN_CONFIGURATION_DATA Then
Return TryCast(PlugInControl, IPluginConfigData)
Else
Return Nothing
End If
End Function
Private Sub UpdateProjectName(ProjectName As String)
Map.refMainWindowVM.Title = ProjectName & " - EgtCAM5"
End Sub
Private Sub UpdateUI()
Map.refProjectVM.UpdateProjectUI(True)
End Sub
#End Region ' MEF Plugin
End Class End Class
+4 -4
View File
@@ -28,9 +28,9 @@ Imports System.Windows
<Assembly: AssemblyDescription("EgtCAM5 32 bit")> <Assembly: AssemblyDescription("EgtCAM5 32 bit")>
#End If #End If
#End If #End If
<Assembly: AssemblyCompany("EgalTech s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtCAM5")> <Assembly: AssemblyProduct("EgtCAM5")>
<Assembly: AssemblyCopyright("Copyright © 2016-2021 by EgalTech 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.3.10.6")> <Assembly: AssemblyVersion("2.7.11.3")>
<Assembly: AssemblyFileVersion("2.3.10.6")> <Assembly: AssemblyFileVersion("2.7.11.3")>
+2 -2
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' This code was generated by a tool.
' Runtime Version:4.0.30319.34209 ' Runtime Version:4.0.30319.42000
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated. ' the code is regenerated.
@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc. ''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
+18 -16
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' This code was generated by a tool.
' Runtime Version:4.0.30319.34209 ' Runtime Version:4.0.30319.42000
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated. ' the code is regenerated.
@@ -12,14 +12,15 @@ Option Strict On
Option Explicit On Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality" #Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then #If _MyType = "WindowsForms" Then
@@ -28,7 +29,7 @@ Partial Friend NotInheritable Class MySettings
Private Shared addedHandlerLockObject As New Object Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then If My.Application.SaveMySettingsOnExit Then
My.Settings.Save() My.Settings.Save()
End If End If
@@ -36,8 +37,8 @@ Partial Friend NotInheritable Class MySettings
#End If #End If
#End Region #End Region
Public Shared ReadOnly Property [Default]() As MySettings Public Shared ReadOnly Property [Default]() As MySettings
Get Get
#If _MyType = "WindowsForms" Then #If _MyType = "WindowsForms" Then
If Not addedHandler Then If Not addedHandler Then
@@ -49,10 +50,11 @@ Partial Friend NotInheritable Class MySettings
End SyncLock End SyncLock
End If End If
#End If #End If
Return defaultInstance Return defaultInstance
End Get End Get
End Property End Property
End Class End Class
End Namespace
Namespace My Namespace My
@@ -62,9 +64,9 @@ Namespace My
Friend Module MySettingsProperty Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.EgtCAM5.MySettings Friend ReadOnly Property Settings() As Global.EgtCAM5.My.MySettings
Get Get
Return Global.EgtCAM5.MySettings.Default Return Global.EgtCAM5.My.MySettings.Default
End Get End Get
End Property End Property
End Module End Module
@@ -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>
@@ -1,9 +1,11 @@
<UserControl x:Class="InputExpanderV" <UserControl x:Class="InputExpanderV"
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:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<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}">
@@ -16,26 +18,42 @@
</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" IsVisibleChanged="Txt_IsVisibleChanged"
Visibility="{Binding TextVisibility}" Height="Auto" Margin="5,0,5,5" >
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
</TextBox.InputBindings>
</TextBox>
<Button Grid.Column="1"
Content="+"
Command="{Binding ShowInfoItemCommand}"
Visibility="{Binding ShowInfoItemVisibility}"
Width="20"
Height="20"
Margin="5,-1,5,0"
VerticalAlignment="Top"/>
</Grid>
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}" <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"/>
<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,17 @@
Public Class InputExpanderV Public Class InputExpanderV
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) Or
(e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then
Txt.AcceptsReturn = True
Txt.TextWrapping = TextWrapping.Wrap
End If
End Sub
Private Sub Txt_IsVisibleChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
If Txt.IsVisible Then
Txt.Focus()
End If
End Sub
End Class End Class
@@ -1,11 +1,29 @@
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"
' Variabile temporanea per salvare bShow
Private m_bTempShow 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
@@ -146,9 +164,26 @@ 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_bTempShow Then Map.refProjectVM.SetLastInteger(value)
m_ComboSelectedIndex = value m_ComboSelectedIndex = value
Dim tmpComboSelectedIndex As Integer = ComboSelectedIndex
If m_ComboSelectedIndex >= 0 AndAlso tmpInfoList.Count > 0 Then
' se la info è presente la aggiungo alla textbox per modificarla
If m_TextBox IsNot String.Empty Then
If Not m_TextBox.EndsWith(vbCrLf) Then m_TextBox &= vbCrLf
m_TextBox &= (tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim()
ElseIf m_TextBox Is String.Empty Then
m_TextBox &= (tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim() & vbCrLf
End If
ComboVisibility = Visibility.Collapsed
ComboItemsList.Remove((tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim())
tmpInfoList.Remove(tmpInfoList(tmpComboSelectedIndex))
End If
m_ComboSelectedIndex = -1
If ComboItemsList.Count <= 0 Then ShowInfoItemVisibility = Visibility.Collapsed
OnPropertyChanged("ComboSelectedIndex") OnPropertyChanged("ComboSelectedIndex")
OnPropertyChanged("ComboItemsList")
OnPropertyChanged("TextBox")
End Set End Set
End Property End Property
@@ -177,9 +212,26 @@ Public Class InputExpanderVM
End Set End Set
End Property End Property
Private m_ShowInfoItemVisibility As Visibility
''' <summary>
''' Propietà visibilità bottone +
''' </summary>
Public Property ShowInfoItemVisibility As Visibility
Get
Return m_ShowInfoItemVisibility
End Get
Set(value As Visibility)
If value <> m_ShowInfoItemVisibility Then
m_ShowInfoItemVisibility = value
OnPropertyChanged("ShowInfoItemVisibility")
End If
End Set
End Property
' Commands definition ' 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
#Region "Messages" #Region "Messages"
@@ -203,6 +255,7 @@ Public Class InputExpanderVM
Sub New() Sub New()
' Creo riferimento a questa classe in EgtCAM5Map ' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefInputExpanderVM(Me) Map.SetRefInputExpanderVM(Me)
ComboSelectedIndex = -1
End Sub End Sub
#End Region ' Constructor #End Region ' Constructor
@@ -269,23 +322,66 @@ 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)
' Se presente info inserita in textbox
If m_TextBox IsNot String.Empty Then
Dim sSplitItem As String() = m_TextBox.Split("="c)
Dim ItemCombo As InfoItem = tmpInfoList.FirstOrDefault(Function(x) x.sKey = sSplitItem(0))
If Not IsNothing(ItemCombo) Then
ComboItemsList.Remove((ItemCombo.sKey & "=" & ItemCombo.sValour).Trim())
tmpInfoList.Remove(ItemCombo)
End If
End If
ComboVisibility = Visibility.Visible
End Sub
#End Region ' ShowInfoItemCommand
#End Region #End Region
#Region "METHODS" #Region "METHODS"
Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam) Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam)
Title = PrepareInputBoxParam.sTitle ' Divido il titolo che può contenere comandi dopo il ';'
Dim vsSplitTitle As String() = PrepareInputBoxParam.sTitle.Split(";"c)
Title = vsSplitTitle(0)
If PrepareInputBoxParam.sLabel <> "" Then If PrepareInputBoxParam.sLabel <> "" Then
TextBlock = PrepareInputBoxParam.sLabel TextBlock = PrepareInputBoxParam.sLabel
TextBox = "" TextBox = ""
TextVisibility = Visibility.Visible TextVisibility = Visibility.Visible
' Se presente il comando "Sic=1"
If vsSplitTitle.Count() > 1 AndAlso vsSplitTitle(1) = "Sic=1" Then
m_bTempShow = False
ComboInfo()
If ComboItemsList.Count > 0 Then ShowInfoItemVisibility = Visibility.Visible
End If
End If 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
m_bTempShow = PrepareInputBoxParam.bShowCombo
ComboItemsList.Clear() ComboItemsList.Clear()
tmpInfoList.Clear()
ComboVisibility = Visibility.Visible ComboVisibility = Visibility.Visible
End If End If
If PrepareInputBoxParam.bShowBtn Then If PrepareInputBoxParam.bShowBtn Then
@@ -302,6 +398,7 @@ Public Class InputExpanderVM
CheckVisibility = Visibility.Collapsed CheckVisibility = Visibility.Collapsed
ComboVisibility = Visibility.Collapsed ComboVisibility = Visibility.Collapsed
ShowBtnVisibility = Visibility.Collapsed ShowBtnVisibility = Visibility.Collapsed
ShowInfoItemVisibility = Visibility.Collapsed
IsExpanded = False IsExpanded = False
IsEnabled = False IsEnabled = False
End Sub End Sub
@@ -329,12 +426,37 @@ 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>
''' Funzione che popola la lista ComboItemsList
''' </summary>
Private Sub ComboInfo()
tmpInfoList.Clear()
ComboItemsList.Clear()
Dim vsVal As String() = Nothing
EgtGetAllInfo(Map.refManageLayerExpanderVM.RightClickedTreeItemId, vsVal)
If Not m_bTempShow And Not IsNothing(vsVal) Then
Dim Ind As Integer = 0
For Each Item As String In vsVal
Dim sSplitItem As String() = Item.Split("="c)
tmpInfoList.Add(New InfoItem(Ind, sSplitItem(0), sSplitItem(1)))
Ind += 1
Next
For Each InfoItem As InfoItem In tmpInfoList
ComboItemsList.Add((InfoItem.sKey & "=" & InfoItem.sValour).Trim())
Next
End If
End Sub
#End Region ' Methods #End Region ' Methods
End Class End Class
@@ -19,11 +19,11 @@ Public Class LayerTreeViewItem
''' </summary> ''' </summary>
Public Overrides Property IsSelected As Boolean Public Overrides Property IsSelected As Boolean
Get Get
Return m_IsSelected Return m_isSelected
End Get End Get
Set(value As Boolean) Set(value As Boolean)
If (value <> m_IsSelected) Then If (value <> m_isSelected) Then
m_IsSelected = value m_isSelected = value
If value Then If value Then
' recupero l'Id del nuovo oggetto selezionato ' recupero l'Id del nuovo oggetto selezionato
Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False) Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False)
@@ -69,33 +69,38 @@ 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 m_bOnOff <> value Then If m_bOnOff <> value Then
m_bOnOff = value m_bOnOff = value
' se abilitato, eseguo operazione ' se abilitato, eseguo operazione
If m_SendCmd Then If m_SendCmd Then
Map.refProjectVM.SetLastInteger(Id)
If value Then If value Then
Map.refProjectVM.ExecuteCommand(Controller.CMD.SHOW) EgtSetStatus(Id, GDB_ST.ON_)
Else Else
Map.refProjectVM.ExecuteCommand(Controller.CMD.HIDE) EgtSetStatus(Id, GDB_ST.OFF)
End If End If
EgtDraw()
End If End If
Dim bOnOffGroup As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) AndAlso Items.Count > 0 Dim bOnOffGroup As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) AndAlso Items.Count > 0
If bOnOffGroup Then If bOnOffGroup Then
EgtEnableCommandLogger()
' abilito/disabilito tutti i nodi del livello sotto di esso (e non oltre) ' abilito/disabilito tutti i nodi del livello sotto di esso (e non oltre)
For Each Node In Items For Each Node In Items
Node.m_bOnOff = value Node.m_bOnOff = value
' se abilitato, eseguo operazione ' se abilitato, eseguo operazione
If m_SendCmd Then If m_SendCmd Then
Map.refProjectVM.SetLastInteger(Node.Id) Dim nStat As Integer
If value Then EgtGetStatus(Node.Id, nStat)
Map.refProjectVM.ExecuteCommand(Controller.CMD.SHOW) If value AndAlso nStat <> GDB_ST.ON_ Then
Else EgtSetStatus(Node.Id, GDB_ST.ON_)
Map.refProjectVM.ExecuteCommand(Controller.CMD.HIDE) ElseIf Not value AndAlso nStat <> GDB_ST.OFF Then
EgtSetStatus(Node.Id, GDB_ST.OFF)
End If End If
End If End If
Node.NotifyPropertyChanged(NameOf(OnOff)) Node.NotifyPropertyChanged(NameOf(OnOff))
Next Next
EgtDisableCommandLogger()
EgtDraw()
End If End If
End If End If
End Set End Set
@@ -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>
@@ -21,10 +21,10 @@
<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="300" MaxHeight="400"
ItemsSource="{Binding Path=LayerList}" ItemsSource="{Binding Path=LayerList}"
VirtualizingStackPanel.IsVirtualizing = "True" VirtualizingStackPanel.IsVirtualizing = "True"
VirtualizingStackPanel.VirtualizationMode = "Recycling"> 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}"/>
@@ -51,7 +51,7 @@
</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"/>
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" /> <Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
@@ -1,6 +1,5 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports EgtUILib Imports EgtUILib
Imports EgtCAM5.IniFile
Public Class ManageLayerExpanderVM Public Class ManageLayerExpanderVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -30,22 +29,6 @@ Public Class ManageLayerExpanderVM
End Set End Set
End Property End Property
' Definizione comandi
Private m_cmdNewPart As ICommand
Private m_cmdNewLayer As ICommand
Private m_cmdLayerColor As ICommand
Private m_cmdTreeViewDoubleClick As ICommand
Private m_cmdTreeViewMouseUp As ICommand
Private m_cmdTreeViewMouseRightButton As ICommand
Private m_cmdSelect As ICommand
Private m_cmdDeselect As ICommand
Private m_cmdName As ICommand
Private m_cmdInfo As ICommand
Private m_cmdRelocate As ICommand
Private m_cmdCopy As ICommand
Private m_cmdDelete As ICommand
Private m_cmdSave As ICommand
' Lista dei layer ' Lista dei layer
Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem) Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem)
Public Property LayerList As ObservableCollection(Of LayerTreeViewItem) Public Property LayerList As ObservableCollection(Of LayerTreeViewItem)
@@ -54,6 +37,7 @@ Public Class ManageLayerExpanderVM
End Get End Get
Set(value As ObservableCollection(Of LayerTreeViewItem)) Set(value As ObservableCollection(Of LayerTreeViewItem))
m_LayerList = value m_LayerList = value
OnPropertyChanged("LayerList")
End Set End Set
End Property End Property
@@ -131,6 +115,22 @@ Public Class ManageLayerExpanderVM
#End Region #End Region
' Definizione comandi
Private m_cmdNewPart As ICommand
Private m_cmdNewLayer As ICommand
Private m_cmdLayerColor As ICommand
Private m_cmdTreeViewDoubleClick As ICommand
Private m_cmdTreeViewMouseUp As ICommand
Private m_cmdTreeViewMouseRightButton As ICommand
Private m_cmdSelect As ICommand
Private m_cmdDeselect As ICommand
Private m_cmdName As ICommand
Private m_cmdInfo As ICommand
Private m_cmdRelocate As ICommand
Private m_cmdCopy As ICommand
Private m_cmdDelete As ICommand
Private m_cmdSave As ICommand
#End Region #End Region
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -166,7 +166,7 @@ Public Class ManageLayerExpanderVM
Public Sub NewPart(ByVal param As Object) Public Sub NewPart(ByVal param As Object)
Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWPART) Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWPART)
' Seleziono nell'albero il layer del pezzo appena creato ' Seleziono nell'albero il layer del pezzo appena creato
SelectIdInObjTree(EgtGetCurrLayer(), False) SelectIdInObjTreeNoMark(EgtGetCurrLayer())
End Sub End Sub
#End Region ' NewPartCommand #End Region ' NewPartCommand
@@ -191,7 +191,7 @@ Public Class ManageLayerExpanderVM
Public Sub NewLayer(ByVal param As Object) Public Sub NewLayer(ByVal param As Object)
Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWLAYER) Map.refProjectVM.ExecuteCommand(Controller.CMD.NEWLAYER)
' Seleziono nell'albero il layer appena creato ' Seleziono nell'albero il layer appena creato
SelectIdInObjTree(EgtGetCurrLayer(), False) SelectIdInObjTreeNoMark(EgtGetCurrLayer())
End Sub End Sub
#End Region ' NewLayerCommand #End Region ' NewLayerCommand
@@ -492,7 +492,7 @@ Public Class ManageLayerExpanderVM
Map.refProjectVM.SetLastInteger(RightClickedTreeItemId) Map.refProjectVM.SetLastInteger(RightClickedTreeItemId)
Map.refProjectVM.ExecuteCommand(Controller.CMD.DELETE) Map.refProjectVM.ExecuteCommand(Controller.CMD.DELETE)
' Seleziono prossimo ' Seleziono prossimo
SelectIdInObjTree(nNewId, False) SelectIdInObjTreeNoMark(nNewId)
End Sub End Sub
#End Region ' DeleteCommand #End Region ' DeleteCommand
@@ -528,16 +528,18 @@ 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
Friend Sub SelectIdInObjTreeNoMark(nId As Integer) Friend Sub SelectIdInObjTreeNoMark(nId As Integer)
SelectIdInObjTree(nId, False) LayerTreeViewItem.m_MarkOnSel = False
MySelectIdInObjTree(nId)
LayerTreeViewItem.m_MarkOnSel = True
End Sub End Sub
Friend Sub SelectIdInObjTree(nId As Integer) Friend Sub SelectIdInObjTree(nId As Integer)
SelectIdInObjTree(nId, True) MySelectIdInObjTree(nId)
End Sub End Sub
Friend Sub UpdateObjTreeOldId(ObjTreeOldId As Integer) Friend Sub UpdateObjTreeOldId(ObjTreeOldId As Integer)
@@ -581,7 +583,7 @@ Public Class ManageLayerExpanderVM
AddGroupInObjTree(GDB_ID.ROOT, GDB_LV.USER, GDB_MD.STD, 0, LayerList) AddGroupInObjTree(GDB_ID.ROOT, GDB_LV.USER, GDB_MD.STD, 0, LayerList)
If nOldId <> GDB_ID.NULL Then If nOldId <> GDB_ID.NULL Then
m_bEnableUpdateObjInObjTree = False m_bEnableUpdateObjInObjTree = False
If Not SelectIdInObjTree(nOldId, True) Then If Not MySelectIdInObjTree(nOldId) Then
Map.refInfoExpanderVM.SetInfoBox(String.Empty) Map.refInfoExpanderVM.SetInfoBox(String.Empty)
End If End If
m_bEnableUpdateObjInObjTree = True m_bEnableUpdateObjInObjTree = True
@@ -803,14 +805,11 @@ Public Class ManageLayerExpanderVM
Return nOldId Return nOldId
End Function End Function
Private Function SelectIdInObjTree(nId As Integer, bMark As Boolean) As Boolean Private Function MySelectIdInObjTree(nId As Integer) As Boolean
Dim tNode As LayerTreeViewItem = SearchIdInLayerList(LayerList, nId, True) Dim tNode As LayerTreeViewItem = SearchIdInLayerList(LayerList, nId, True)
If Not IsNothing(tNode) Then If Not IsNothing(tNode) Then
If Not bMark Then LayerTreeViewItem.m_MarkOnSel = False
tNode.IsSelected = True tNode.IsSelected = True
tNode.NotifyPropertyChanged("IsSelected") tNode.NotifyPropertyChanged("IsSelected")
If Not bMark Then LayerTreeViewItem.m_MarkOnSel = True
tNode.IsExpanded = True
m_nObjTreeOldId = nId m_nObjTreeOldId = nId
Return True Return True
Else Else
+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-->
@@ -107,24 +107,6 @@ Public Class EstimationsExpanderVM
Return True Return True
End Function End Function
Private Function UpdateAllMachinings() As Boolean
' Eseguo ricalcolo
Dim bModified As Boolean = EgtGetModified()
Dim sErr As String = String.Empty
Dim bOk As Boolean = EgtApplyAllMachinings(False, False, sErr)
' In caso di errori, li segnalo
If Not bOk Then
If Not String.IsNullOrEmpty(sErr) Then
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If
If Not bModified Then EgtResetModified()
Return bOk
End Function
Public Overrides Function GetEstimationFileName(bAskSave As Boolean, ByRef sEstFile As String, ByRef sInfo As String) As Boolean Public Overrides Function GetEstimationFileName(bAskSave As Boolean, ByRef sEstFile As String, ByRef sInfo As String) As Boolean
Dim bOk As Boolean = True Dim bOk As Boolean = True
' Recupero e verifico la path del progetto corrente ' Recupero e verifico la path del progetto corrente
@@ -177,7 +159,7 @@ Public Class EstimationsExpanderVM
' Recupero la fase corrente ' Recupero la fase corrente
Dim nPhase As Integer = EgtGetCurrPhase() Dim nPhase As Integer = EgtGetCurrPhase()
' Aggiorno le lavorazioni ' Aggiorno le lavorazioni
If Not UpdateAllMachinings() Then If Not Map.refSimulationExpanderVM.UpdateAllMachinings() Then
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True) EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
Return False Return False
End If End If
@@ -195,12 +177,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
@@ -150,6 +150,10 @@ Public Class MachiningTreeExpanderVM
Return EgtMsg(MSG_MACHININGSDBPAGE + 11) Return EgtMsg(MSG_MACHININGSDBPAGE + 11)
Case MCH_MY.WATERJETTING Case MCH_MY.WATERJETTING
Return EgtMsg(MSG_MACHININGSDBPAGE + 12) Return EgtMsg(MSG_MACHININGSDBPAGE + 12)
Case MCH_MY.FIVEAXISMILLING
Return EgtMsg(31213)
Case MCH_MY.PROBING
Return EgtMsg(31220)
Case Else Case Else
Return "Mach" Return "Mach"
End Select End Select
@@ -15,8 +15,6 @@
<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>
<!--<CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/>-->
<!--ContentPresenter that contains the RawPart options -->
<ContentPresenter Name="RawPartOptions" Content="{Binding RawPartOptions ,Mode=OneWay}"/> <ContentPresenter Name="RawPartOptions" Content="{Binding RawPartOptions ,Mode=OneWay}"/>
</StackPanel> </StackPanel>
</Expander> </Expander>
@@ -1,4 +1,6 @@
Imports EgtUILib Imports System.ComponentModel
Imports System.Globalization
Imports EgtUILib
Public Class DispositionParameterExpanderVM Public Class DispositionParameterExpanderVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -59,7 +61,7 @@ Public Class DispositionParameterExpanderVM
PartIsExpanded = False PartIsExpanded = False
FixtureIsExpanded = False FixtureIsExpanded = False
' verifico se è attiva l'opzione muovi con ventose ' verifico se è attiva l'opzione muovi con ventose
If m_MoveWithFixture Then If Map.refRawPartOptionVM.MoveWithFixture() Then
' Abilito la selezione dei RawPart con ventose ' Abilito la selezione dei RawPart con ventose
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
Else Else
@@ -168,42 +170,6 @@ Public Class DispositionParameterExpanderVM
End Set End Set
End Property End Property
Private m_MoveWithFixture As Boolean = False
Public Property MoveWithFixture As Boolean
Get
Return m_MoveWithFixture
End Get
Set(value As Boolean)
If value <> m_MoveWithFixture Then
If value Then
' Abilito la selezione di RawPart con autoselezione delle sue ventose
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
' Seleziono le ventose associate ad uno dei grezzi selezionati
' ciclo sui grezzi selezionati
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
While nSelRawPartId <> GDB_ID.NULL
' seleziono i sottopezzi del grezzo
DispositionUtility.SelectRawPartFixture(nSelRawPartId)
nSelRawPartId = EgtGetNextSelectedObj()
End While
Else
' Abilito la selezione di RawPart
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
' ciclo sui grezzi selezionati
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
While nSelRawPartId <> GDB_ID.NULL
' deseleziono i sottopezzi del grezzo
DispositionUtility.DeselectRawPartFixture(nSelRawPartId)
nSelRawPartId = EgtGetNextSelectedObj()
End While
End If
EgtDraw()
m_MoveWithFixture = value
OnPropertyChanged("MoveWithFixture")
End If
End Set
End Property
Private m_InputValue As String Private m_InputValue As String
Public Property InputValue As String Public Property InputValue As String
Get Get
@@ -309,15 +275,15 @@ 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
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.FIXTURE Map.refProjectVM.SceneSelType = SceneSelTypeOpt.FIXTURE
End Select End Select
m_MoveWithFixture = False Map.refRawPartOptionVM.SetMoveWithFixture(False)
OnPropertyChanged("MoveWithFixture")
Map.refFixtureParametersVM.UpdateFixtureTypeList() Map.refFixtureParametersVM.UpdateFixtureTypeList()
DispositionUtility.InitHookData()
End Sub End Sub
#End Region ' METHODS #End Region ' METHODS
@@ -347,12 +313,16 @@ Public Class DispositionParameterExpanderVM
' se movimento di traslazione ' se movimento di traslazione
If m_MoveIsChecked Then If m_MoveIsChecked Then
Dim InputPoint As New Point3d(0, 0, 0) Dim InputPoint As New Point3d(0, 0, 0)
Dim dSupp As Double = -1
Dim Values() As String = m_InputValue.Split(","c) Dim Values() As String = m_InputValue.Split(","c)
If Values.Count = 2 Then If Values.Count >= 2 Then
StringToLen(Values(0), InputPoint.x) StringToLen(Values(0), InputPoint.x)
StringToLen(Values(1), InputPoint.y) StringToLen(Values(1), InputPoint.y)
If Values.Count >= 3 Then
StringToLen(Values(2), dSupp)
End If
Else Else
m_InputErrorMsg = "Il valore non è una cordinata XY" m_InputErrorMsg = "Il valore non è un punto X,Y"
OnPropertyChanged("InputErrorMsg") OnPropertyChanged("InputErrorMsg")
Return Return
End If End If
@@ -365,13 +335,44 @@ Public Class DispositionParameterExpanderVM
' imposto il riferimento della tavola ' imposto il riferimento della tavola
Dim ptTableRef As Point3d Dim ptTableRef As Point3d
EgtGetTableRef(1, ptTableRef) EgtGetTableRef(1, ptTableRef)
' calcolo il punto del grezzo da posizionar nelle coordinate di input ' calcolo il punto del grezzo da posizionare nelle coordinate di input
Dim ptRawRefPoint As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition) Dim ptRawRefPoint As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
' creo un punto con le coordinate di input espresse rispetto alla tavola ' creo un punto con le coordinate di input espresse rispetto alla tavola
Dim TableRefInputPoint As New Point3d(InputPoint) Dim TableRefInputPoint As New Point3d(InputPoint)
TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef)) TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef))
' calcolo il vettore di spostamento del grezzo ' calcolo il vettore di spostamento del grezzo
vtMove = TableRefInputPoint - ptRawRefPoint vtMove = TableRefInputPoint - ptRawRefPoint
vtMove.z = 0
' verifico ed aggiusto eventuale supporto
Dim dOldSupp As Double = 0
Dim nOldSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
If nOldSuppId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nOldSuppId, GDB_BB.STANDARD, bboxSupport)
dOldSupp = bboxSupport.DimZ()
End If
If dSupp > -EPS_SMALL AndAlso Math.Abs( dSupp - dOldSupp) > EPS_SMALL Then
' da cancellare
If dSupp < EPS_SMALL Then
EgtErase( nOldSuppId)
vtMove.z = dSupp - dOldSupp
' da creare o modificare
Else
EgtErase( nOldSuppId)
Dim nNewSuppId As Integer = GDB_ID.NULL
Dim nRawOutLnId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, RAWOUTLINE)
If nRawOutLnId <> GDB_ID.NULL Then
Dim vtExtr As New Vector3d( 0, 0, -dSupp)
nNewSuppId = EgtCreateSurfTmByRegionExtrusion( nFirstSelectedId, 1, {nRawOutLnId}, vtExtr, 0.05, GDB_RT.GLOB)
End If
If nNewSuppId <> GDB_ID.NULL Then
EgtSetName( nNewSuppId, SUPPORT)
EgtSetColor( nNewSuppId, New Color3d(150, 75, 0))
If nOldSuppId <> GDB_ID.NULL Then EgtChangeId( nNewSuppId, nOldSuppId)
vtMove.z = dSupp - dOldSupp
End If
End If
End If
' se è una ventosa ' se è una ventosa
ElseIf EgtVerifyFixture(nFirstSelectedId) Then ElseIf EgtVerifyFixture(nFirstSelectedId) Then
Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB) Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB)
@@ -470,8 +471,24 @@ Public Class DispositionParameterExpanderVM
''' Execute the Point. This method is invoked by the DoneCommand. ''' Execute the Point. This method is invoked by the DoneCommand.
''' </summary> ''' </summary>
Public Sub CheckedRawRef(ByVal param As Object) Public Sub CheckedRawRef(ByVal param As Object)
' Assegno corner di riferimento
Dim nRawRef As MCH_CR = DirectCast(param, MCH_CR) Dim nRawRef As MCH_CR = DirectCast(param, MCH_CR)
m_RawRefPosition = nRawRef m_RawRefPosition = nRawRef
' Se grezzo selezionato, visualizzo sua posizione
Dim nFirstSelectedId As Integer = EgtGetFirstSelectedObj()
If EgtVerifyRawPartCurrPhase(nFirstSelectedId) Then
Dim ptR As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
Dim sSupp As String = ""
Dim nSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
If nSuppId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nSuppId, GDB_BB.STANDARD, bboxSupport)
Dim dSupp As Double = bboxSupport.DimZ()
sSupp = "," & LenToString( dSupp, 2)
End If
m_InputValue = LenToString( ptR.x, 2) & "," & LenToString( ptR.y, 2) & sSupp
OnPropertyChanged( "InputValue")
End If
End Sub End Sub
#End Region ' CheckedRawRefCommand #End Region ' CheckedRawRefCommand
@@ -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
@@ -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,6 +76,7 @@ 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())
UpdateFixtureCount()
OnPropertyChanged("FixtureTypeList") OnPropertyChanged("FixtureTypeList")
End Sub End Sub
@@ -122,27 +121,36 @@ Public Class FixtureParametersVM
OnPropertyChanged("FixtureErrorMsg") OnPropertyChanged("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("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
@@ -157,76 +165,76 @@ Public Class FixtureParametersVM
' 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)
@@ -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,4 +1,5 @@
Imports EgtUILib Imports System.ComponentModel
Imports EgtUILib
Public Class RawPartOptionVM Public Class RawPartOptionVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -38,6 +39,11 @@ Public Class RawPartOptionVM
End If End If
End Set End Set
End Property End Property
friend Sub SetMoveWithFixture(value As Boolean)
m_MoveWithFixture=value
OnPropertyChanged(NameOf(MoveWithFixture))
End Sub
Private m_bRawPartParamVisibility As Visibility Private m_bRawPartParamVisibility As Visibility
Public ReadOnly Property RawPartParamVisibility As Visibility Public ReadOnly Property RawPartParamVisibility As Visibility
@@ -86,6 +92,7 @@ Public Class RawPartOptionVM
Private m_cmdRemoveRawPart As ICommand Private m_cmdRemoveRawPart As ICommand
Sub New() Sub New()
Map.SetRefRawPartOptionVM(Me)
If EgtGetFirstSelectedObj() <> GDB_ID.NULL Then If EgtGetFirstSelectedObj() <> GDB_ID.NULL Then
m_bRawPartParamVisibility = Visibility.Visible m_bRawPartParamVisibility = Visibility.Visible
Else Else
@@ -110,7 +117,7 @@ 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()
@@ -120,6 +127,36 @@ Public Class RawPartOptionVM
#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,437 @@
<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: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: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="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32> <sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32> <sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32> <sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32> <sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32> <sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32> <sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32> <sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32> <sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32> <sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32> <sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32> <sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32> <sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32> <sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32> <sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32> <sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32> <sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32> <sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32> <sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32> <sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32> <sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32> <sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32> <sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32> <sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32> <sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32> <sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32> <sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32> <sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32> <sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32> <sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32> <sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32> <sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32> <sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32> <sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32> <sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32> <sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32> <sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32> <sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32> <sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32> <sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32> <sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32> <sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32> <sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32> <sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32> <sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32> <sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32> <sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32> <sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32> <sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32> <sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32> <sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32> <sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32> <sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32> <sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32> <sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32> <sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32> <sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32> <sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32> <sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32> <sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32> <sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</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>
<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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,10 +1,10 @@
<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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,165 +75,237 @@
<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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander 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 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,291 @@
<UserControl x:Class="FiveAxisMachiningParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<sys:Int32 x:Key="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
</UserControl.Resources>
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/>
</EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox>
<TextBlock Text="{Binding SystemNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Visibility="{Binding SysNotes_Visibility}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid>
</StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<Expander.Header>
<UniformGrid Columns="2">
<TextBlock Text="{Binding AdvancedParamMsg}"
Margin="2.5"/>
<Button Command="{Binding ShowNoteListComboCommand}"
ToolTip="{Binding ShowNoteToolTip}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
Grid.Column="1"
HorizontalAlignment="Right"
Margin="2.5,2.5,7,2.5"
Width="20">
<Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
ParamChBx="{Binding Path=InvertToolDir,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
ParamTxBx="{Binding Path=InitAngs,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
ParamTxBx="{Binding Path=BlockedAxis,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SolChoiceTypeTxBl}"
ParamCmBxList="{Binding Path=SolChoiceTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True,
Mode=OneWay}"
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
<Grid Grid.Row="1" Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ItemsControl ItemsSource="{Binding NotesList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Description}"
Margin="0,5.5,29,0"
Width="82"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<TabControl SelectedIndex="{Binding SelTypeValue}"
Grid.Column="1"
Background="Transparent"
BorderBrush="Transparent">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="TEXT">
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding 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 FiveAxisMachiningParameterExpanderV
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
CalculateOperationParametersStackPanelMaxHeight()
End Sub
Dim m_bSizeChanging As Boolean = False
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
m_bSizeChanging = False
End Sub
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
If IndexedExpander.IsExpanded Then
OpenedExpanderList.Add(True)
IndexedExpander.IsExpanded = False
Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
' Sottraggo anche i padding
AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
Else
OpenedExpanderList.Add(False)
End If
Else
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
If OpenedExpanderList(Index) Then
IndexedExpander.IsExpanded = True
End If
End If
Next
End Sub
' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
Dim target As DependencyObject = dependencyObject
Do
target = LogicalTreeHelper.GetParent(target)
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
If IsNothing(target) Then
target = dependencyObject
Do
target = VisualTreeHelper.GetParent(target)
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
End If
Return TryCast(target, T)
End Function
End Class
@@ -1,10 +1,10 @@
<UserControl x:Class="GenMachiningParameterExpanderV" <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: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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,142 +75,217 @@
<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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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}" ParamErrorMsg="{Binding Path=SpeedErrorMsg}"
ParamErrorMsg="{Binding Path=SpeedErrorMsg}" 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,10 +1,10 @@
<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: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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -73,26 +73,38 @@
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32> <sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
<sys:Int32 x:Key="TabMax">62</sys:Int32> <sys:Int32 x:Key="TabMax">62</sys:Int32>
<sys:Int32 x:Key="TabMin">63</sys:Int32> <sys:Int32 x:Key="TabMin">63</sys:Int32>
</UserControl.Resources> </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>
@@ -3,81 +3,22 @@ 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
@@ -6,6 +6,11 @@ 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 +55,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 +62,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("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 +152,9 @@ 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 FiveAxisMachiningParameterExpanderV
Dim SurfRoughExpanderV As SurfRoughingParameterExpanderV
Dim ProbExpanderV As ProbingParameterExpanderV
Private Sub Dummy() Private Sub Dummy()
@@ -106,24 +177,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,55 +194,94 @@ 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
If MatType = MaterialType.STONE Or MatType = MaterialType.STONE5 Then
' se macchina di tipo STONE ricavo il tipo di utensile
Dim sMachiningToolName = String.Empty
EgtMdbSetCurrMachining(sName)
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sMachiningToolName)
EgtTdbSetCurrTool(sMachiningToolName)
Dim dValue As Double = 0
Dim nToolType As Integer
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nToolType)
' se utensile di tipo POLISHING rendo visibili i campi sugli epicicli
If nToolType = MCH_TY.MILL_POLISHING Then m_CurrOperation.Epicycles_Visibility = Visibility.Visible
End If
If IsNothing(PocketParamExpanderV) Then PocketParamExpanderV = New PocketingParameterExpanderV
PocketParamExpanderV.DataContext = m_CurrOperation 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 FiveAxisMachiningParameterExpanderV
FiveAxExpanderV.DataContext = m_CurrOperation
Return FiveAxExpanderV
Case MCH_OY.SURFROUGHING
If IsNothing(SurfRoughExpanderV) Then SurfRoughExpanderV = New SurfRoughingParameterExpanderV
SurfRoughExpanderV.DataContext = m_CurrOperation
Return SurfRoughExpanderV
Case MCH_OY.PROBING
If IsNothing(ProbExpanderV) Then ProbExpanderV = New ProbingParameterExpanderV
ProbExpanderV.DataContext = m_CurrOperation
Return ProbExpanderV
End Select End Select
'MachiningParameterExpanderItem.ReadOperationParam() 'MachiningParameterExpanderItem.ReadOperationParam()
@@ -230,84 +327,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
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") 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>
@@ -337,11 +375,13 @@ Public Class MachiningParameterExpanderVM
MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return Return
End If End If
Dim bRecalc As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift)
' La modifica di alcuni parametri forza il ricalcolo della geometria ' Verifico se forzato ricalcolo da interfaccia
Dim ModifiedGeometry As Boolean = m_CurrOperation.m_IsModifiedSelectedFaceUseType Dim bRecalc As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) <> 0)
' aggiorno valori modificati
' Aggiorno parametri di lavorazione
m_CurrOperation.WriteOperationParam() m_CurrOperation.WriteOperationParam()
' Carico tutta la geometria selezionata in una lista ' Carico tutta la geometria selezionata in una lista
Dim SelectedGeometry As New List(Of Integer) Dim SelectedGeometry As New List(Of Integer)
Dim EntityIndex As Integer = EgtGetFirstSelectedObj() Dim EntityIndex As Integer = EgtGetFirstSelectedObj()
@@ -354,57 +394,28 @@ Public Class MachiningParameterExpanderVM
(EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_MESH Or EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_FRGN) Then (EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_MESH Or EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_FRGN) Then
' Aggiorno lista speciale con facce ' Aggiorno lista speciale con facce
SelData.VerifyIdSub() SelData.VerifyIdSub()
' Verifico se geometria cambiata, confrontando selezione attuale con facet con geometria di lavorazione ' Imposto geometria
Dim nInd As Integer = 0 Dim vId() As Integer = Nothing
Dim nMchId, nMchSub As Integer Dim vSub() As Integer = Nothing
EgtGetMachiningGeometry(nInd, nMchId, nMchSub) SelData.GetAllIdSub(vId, vSub)
Dim nSelId, nSelSub As Integer EgtSetMachiningGeometry(vId, vSub)
SelData.GetIdSub(nInd, nSelId, nSelSub) ' Gestione standard per altre entità (curve, testi, ...)
While Not ModifiedGeometry And (nMchId <> GDB_ID.NULL Or nSelId <> GDB_ID.NULL)
' Controllo uguaglianza
If nMchId <> nSelId Or nMchSub <> nSelSub Then ModifiedGeometry = True
' Passo al successivo
nInd += 1
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
SelData.GetIdSub(nInd, nSelId, nSelSub)
End While
If ModifiedGeometry Then
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllIdSub(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
End If
' Gestione standard per altre entità (curve, testi, ...)
Else Else
' Verifico se geometria cambiata, confrontando selezione attuale con geometria di lavorazione ' Imposto geometria
Dim nInd As Integer = 0 EgtSetMachiningGeometry(SelectedGeometry.ToArray)
Dim nMchId, nMchSub As Integer
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
Dim nSelId As Integer
nSelId = If(nInd < SelectedGeometry.Count(), SelectedGeometry(nInd), GDB_ID.NULL)
While Not ModifiedGeometry And (nMchId <> GDB_ID.NULL Or nSelId <> GDB_ID.NULL)
' Controllo uguaglianza
If nMchId <> nSelId Then ModifiedGeometry = True
' Passo al successivo
nInd += 1
EgtGetMachiningGeometry(nInd, nMchId, nMchSub)
nSelId = If(nInd < SelectedGeometry.Count(), SelectedGeometry(nInd), GDB_ID.NULL)
End While
' Imposto geometria selezionata come geometria di lavorazione
If ModifiedGeometry Then
EgtSetMachiningGeometry(SelectedGeometry.ToArray)
End If
End If End If
' Ricalcolo la lavorazione
If Not EgtApplyMachining(bRecalc Or ModifiedGeometry) Then ' Rigenero la lavorazione
If Not EgtApplyMachining(bRecalc) Then
If EgtGetLastMachMgrErrorId() <> 0 Then If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString() Dim sErr As String = EgtGetLastMachMgrErrorString()
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(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else Else
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore nel calcolo della lavorazione!
MessageBox.Show(EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Else Else
If EgtGetMachMgrWarningId(0) <> 0 Then If EgtGetMachMgrWarningId(0) <> 0 Then
@@ -414,12 +425,11 @@ Public Class MachiningParameterExpanderVM
Map.refStatusBarVM.NotifyStatusOutput("") Map.refStatusBarVM.NotifyStatusOutput("")
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()
@@ -475,8 +485,12 @@ Public Class OperationParamVisibilityConverter
Return TMDbParamVisibility.Chiseling(CInt(parameter)) Return TMDbParamVisibility.Chiseling(CInt(parameter))
Case MCH_OY.SURFFINISHING Case MCH_OY.SURFFINISHING
Return TMDbParamVisibility.SurfFinishing(CInt(parameter)) Return TMDbParamVisibility.SurfFinishing(CInt(parameter))
Case MCH_OY.SURFROUGHING
Return TMDbParamVisibility.SurfRoughing(CInt(parameter))
Case MCH_OY.WATERJETTING Case MCH_OY.WATERJETTING
Return TMDbParamVisibility.WaterJetting(CInt(parameter)) Return TMDbParamVisibility.WaterJetting(CInt(parameter))
Case MCH_OY.FIVEAXISMILLING
Return TMDbParamVisibility.FiveAxMachining(CInt(parameter))
Case Else Case Else
Return Visibility.Hidden Return Visibility.Hidden
End Select End Select
@@ -1,10 +1,10 @@
<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: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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,185 +75,256 @@
<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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander 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 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,279 +1,359 @@
<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: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: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="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32> <sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32> <sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32> <sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32> <sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32> <sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32> <sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32> <sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32> <sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32> <sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32> <sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32> <sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32> <sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32> <sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32> <sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32> <sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32> <sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32> <sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32> <sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32> <sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32> <sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32> <sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32> <sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32> <sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32> <sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32> <sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32> <sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32> <sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32> <sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32> <sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32> <sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32> <sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32> <sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32> <sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32> <sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32> <sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32> <sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32> <sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32> <sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32> <sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32> <sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32> <sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32> <sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32> <sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32> <sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32> <sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32> <sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32> <sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32> <sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32> <sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32> <sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32> <sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32> <sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32> <sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32> <sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32> <sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32> <sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32> <sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32> <sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32> <sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32> <sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</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 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 SideAngleTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=SideAngle, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"
ValidatesOnDataErrors=True}" Visibility="{Binding Epicycles_Visibility}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
</StackPanel> ParamTxBx="{Binding Path=SideAngle,
</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: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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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
@@ -0,0 +1,275 @@
<UserControl x:Class="ProbingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<sys:Int32 x:Key="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
</UserControl.Resources>
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/>
</EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox>
<TextBlock Text="{Binding SystemNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Visibility="{Binding SysNotes_Visibility}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid>
</StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<Expander.Header>
<UniformGrid Columns="2">
<TextBlock Text="{Binding AdvancedParamMsg}"
Margin="2.5"/>
<Button Command="{Binding ShowNoteListComboCommand}"
ToolTip="{Binding ShowNoteToolTip}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
Grid.Column="1"
HorizontalAlignment="Right"
Margin="2.5,2.5,7,2.5"
Width="20">
<Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertToolDirTxBl}"
ParamChBx="{Binding Path=InvertToolDir,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
ParamTxBx="{Binding Path=InitAngs,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
ParamTxBx="{Binding Path=BlockedAxis,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SolChoiceTypeTxBl}"
ParamCmBxList="{Binding Path=SolChoiceTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True,
Mode=OneWay}"
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
<Grid Grid.Row="1" Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ItemsControl ItemsSource="{Binding NotesList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Description}"
Margin="0,5.5,29,0"
Width="82"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<TabControl SelectedIndex="{Binding SelTypeValue}"
Grid.Column="1"
Background="Transparent"
BorderBrush="Transparent">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="TEXT">
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
ParamTxBx="{Binding Path=Feed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
ParamTxBx="{Binding Path=TipFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ParamTxBx="{Binding Path=StartFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
ParamTxBx="{Binding Path=EndFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl>
@@ -0,0 +1,83 @@
Imports EgtWPFLib5.EgtFloating
Public Class ProbingParameterExpanderV
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
CalculateOperationParametersStackPanelMaxHeight()
End Sub
Dim m_bSizeChanging As Boolean = False
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
m_bSizeChanging = False
End Sub
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
If IndexedExpander.IsExpanded Then
OpenedExpanderList.Add(True)
IndexedExpander.IsExpanded = False
Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
' Sottraggo anche i padding
AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
Else
OpenedExpanderList.Add(False)
End If
Else
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
If OpenedExpanderList(Index) Then
IndexedExpander.IsExpanded = True
End If
End If
Next
End Sub
' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
Dim target As DependencyObject = dependencyObject
Do
target = LogicalTreeHelper.GetParent(target)
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
If IsNothing(target) Then
target = dependencyObject
Do
target = VisualTreeHelper.GetParent(target)
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
End If
Return TryCast(target, T)
End Function
End Class
@@ -1,10 +1,10 @@
<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: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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -74,141 +74,216 @@
</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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,293 @@
<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: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: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="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32> <sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32> <sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32> <sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32> <sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32> <sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32> <sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32> <sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32> <sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32> <sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32> <sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32> <sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32> <sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32> <sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32> <sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32> <sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32> <sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32> <sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32> <sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32> <sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32> <sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32> <sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32> <sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32> <sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32> <sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32> <sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32> <sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32> <sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32> <sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32> <sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32> <sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32> <sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32> <sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32> <sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32> <sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32> <sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32> <sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32> <sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32> <sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32> <sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32> <sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32> <sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32> <sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32> <sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32> <sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32> <sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32> <sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32> <sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32> <sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32> <sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32> <sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32> <sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32> <sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32> <sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32> <sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32> <sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32> <sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32> <sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32> <sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32> <sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32> <sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</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>
<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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,10 +1,10 @@
<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: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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,186 +75,260 @@
<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"> <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 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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander 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 <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}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding VertFeedTxBl}"
ParamTxBx="{Binding Path=EndFeed, ParamTxBx="{Binding Path=VertFeed,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV </StackPanel>
ParamTxBl="{Binding VertFeedTxBl}" </Expander>
ParamTxBx="{Binding Path=VertFeed, <Interactivity:Interaction.Behaviors>
UpdateSourceTrigger=PropertyChanged, <EgtCAM5:AutomaticCloseExpander/>
ValidatesOnDataErrors=True}" </Interactivity:Interaction.Behaviors>
Style="{DynamicResource StringParamV_Margin}"/> </StackPanel>
</StackPanel> </StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl> </UserControl>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,10 +1,10 @@
<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: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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,176 +75,250 @@
<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=LeadLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander 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,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</UniformGrid> <Expander Style="{StaticResource ExpanderStyle}">
</Expander> <Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
<Expander Style="{StaticResource ExpanderStyle}"> </Expander.Header>
<Expander.Header> <StackPanel>
<TextBlock Text="{Binding ToolExpanderHeader}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
</Expander.Header> ParamTxBx="{Binding Path=Speed,
<StackPanel> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding SpeedTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=Speed, <EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=Feed,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding FeedTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
ParamTxBx="{Binding Path=Feed, ParamTxBx="{Binding Path=TipFeed,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ParamTxBl="{Binding TipFeedTxBl}" ParamTxBx="{Binding Path=StartFeed,
ParamTxBx="{Binding Path=TipFeed, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=EndFeed,
ParamTxBl="{Binding StartFeedTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=StartFeed, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" </StackPanel>
Style="{DynamicResource StringParamV_Margin}"/> </Expander>
<EgtWPFLib5:StringParamV <Interactivity:Interaction.Behaviors>
ParamTxBl="{Binding EndFeedTxBl}" <EgtCAM5:AutomaticCloseExpander/>
ParamTxBx="{Binding Path=EndFeed, </Interactivity:Interaction.Behaviors>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" </StackPanel>
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl> </UserControl>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,410 @@
<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: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: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="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32> <sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32> <sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32> <sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32> <sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32> <sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32> <sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32> <sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32> <sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32> <sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32> <sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32> <sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32> <sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32> <sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32> <sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32> <sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32> <sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32> <sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32> <sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32> <sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32> <sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32> <sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32> <sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32> <sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32> <sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32> <sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32> <sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32> <sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32> <sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32> <sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32> <sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32> <sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32> <sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32> <sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32> <sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32> <sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32> <sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32> <sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32> <sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32> <sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32> <sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32> <sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32> <sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32> <sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32> <sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32> <sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32> <sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32> <sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32> <sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32> <sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32> <sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32> <sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32> <sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32> <sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32> <sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32> <sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32> <sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32> <sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32> <sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32> <sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32> <sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</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>
<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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,346 @@
<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: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: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="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32> <sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32> <sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32> <sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32> <sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32> <sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32> <sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32> <sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32> <sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32> <sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32> <sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32> <sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32> <sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32> <sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32> <sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32> <sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32> <sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32> <sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32> <sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32> <sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32> <sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32> <sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32> <sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32> <sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32> <sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32> <sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32> <sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32> <sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32> <sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32> <sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32> <sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32> <sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32> <sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32> <sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32> <sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32> <sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32> <sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32> <sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32> <sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32> <sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32> <sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32> <sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32> <sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32> <sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32> <sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32> <sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32> <sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32> <sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32> <sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32> <sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32> <sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32> <sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32> <sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32> <sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32> <sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32> <sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32> <sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32> <sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32> <sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32> <sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32> <sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</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>
<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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,351 @@
<UserControl x:Class="SurfRoughingParameterExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<UserControl.Resources>
<EgtCAM5:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
<EgtCAM5:DepthUnitConverter x:Key="DepthUnitConverter"/>
<sys:Int32 x:Key="Invert">0</sys:Int32>
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
<sys:Int32 x:Key="StepType">8</sys:Int32>
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
<sys:Int32 x:Key="Speed">10</sys:Int32>
<sys:Int32 x:Key="Feed">11</sys:Int32>
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
<sys:Int32 x:Key="OffSr">15</sys:Int32>
<sys:Int32 x:Key="OffSl">16</sys:Int32>
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
<sys:Int32 x:Key="Approx">18</sys:Int32>
<sys:Int32 x:Key="StartPos">19</sys:Int32>
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
<sys:Int32 x:Key="StepPar">23</sys:Int32>
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
<sys:Int32 x:Key="TabLen">25</sys:Int32>
<sys:Int32 x:Key="TabDist">26</sys:Int32>
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
<sys:Int32 x:Key="LiTang">29</sys:Int32>
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
<sys:Int32 x:Key="LiElev">31</sys:Int32>
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
<sys:Int32 x:Key="LoTang">33</sys:Int32>
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
<sys:Int32 x:Key="LoElev">35</sys:Int32>
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
<sys:Int32 x:Key="SideStep">41</sys:Int32>
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
<sys:Int32 x:Key="NamePar">43</sys:Int32>
<sys:Int32 x:Key="Tool">44</sys:Int32>
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
<sys:Int32 x:Key="OverLapStr">47</sys:Int32>
<sys:Int32 x:Key="OffsetStr">48</sys:Int32>
<sys:Int32 x:Key="SubType">49</sys:Int32>
<sys:Int32 x:Key="SolChoiceType">50</sys:Int32>
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadIn">55</sys:Int32>
<sys:Int32 x:Key="ExpanderLeadOut">56</sys:Int32>
<sys:Int32 x:Key="ApproxGen">57</sys:Int32>
<sys:Int32 x:Key="OscEnable">58</sys:Int32>
<sys:Int32 x:Key="OscHeight">59</sys:Int32>
<sys:Int32 x:Key="OscRampLen">60</sys:Int32>
<sys:Int32 x:Key="OscFlatLen">61</sys:Int32>
</UserControl.Resources>
<StackPanel Name="OperationParametersStackPanel">
<StackPanel Name="OperationFirstParametersStackPanel">
<UniformGrid Columns="2">
<TextBlock Text="{Binding DepthStrTxBl}" Style="{DynamicResource MPExpander_DepthTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding DepthStr, UpdateSourceTrigger=PropertyChanged,
Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SubTypeTxBl}"
ParamCmBxList="{Binding Path=SubTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/>
</EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox>
<TextBlock Text="{Binding SystemNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Visibility="{Binding SysNotes_Visibility}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid>
</StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SubStepTxBl}"
ParamTxBx="{Binding Path=SubStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideStepTxBl}"
ParamTxBx="{Binding Path=SideStep,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding ApproxTxBl}"
ParamTxBx="{Binding Path=Approx,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Name="AdvancedParam" IsExpanded="{Binding AdvancedParamIsExpander}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<Expander.Header>
<UniformGrid Columns="2">
<TextBlock Text="{Binding AdvancedParamMsg}"
Margin="2.5"/>
<Button Command="{Binding ShowNoteListComboCommand}"
IsEnabled="{Binding ShowNoteListCombo_IsEnable}"
Visibility="{Binding ShowNoteListCombo_Visibility}"
ToolTip="{Binding ShowNoteToolTip}"
Grid.Column="1"
HorizontalAlignment="Right"
Margin="2.5,2.5,7,2.5"
Width="20">
<Image Source="/Resources/Note/+.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding InitAngsTxBl}"
ParamTxBx="{Binding Path=InitAngs,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding BlockedAxisTxBl}"
ParamTxBx="{Binding Path=BlockedAxis,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding SolChoiceTypeTxBl}"
ParamCmBxList="{Binding Path=SolChoiceTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True,
Mode=OneWay}"
ParamCmBxSelIndex="{Binding Path=SelectedSolChoiceType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
<Grid Grid.Row="1" Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ItemsControl ItemsSource="{Binding NotesList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Description}"
Margin="0,5.5,29,0"
Width="82"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<TabControl SelectedIndex="{Binding SelTypeValue}"
Grid.Column="1"
Background="Transparent"
BorderBrush="Transparent">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="TEXT">
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="False"/>
</TabItem>
<TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
ParamTxBx="{Binding Path=LiElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
ParamTxBx="{Binding Path=LoTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SpeedTxBl}"
ParamTxBx="{Binding Path=Speed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
ParamTxBx="{Binding Path=Feed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
ParamTxBx="{Binding Path=TipFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartFeedTxBl}"
ParamTxBx="{Binding Path=StartFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndFeedTxBl}"
ParamTxBx="{Binding Path=EndFeed,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Interactivity:Interaction.Behaviors>
<EgtCAM5:AutomaticCloseExpander/>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl>
@@ -0,0 +1,83 @@
Imports EgtWPFLib5.EgtFloating
Public Class SurfRoughingParameterExpanderV
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
CalculateOperationParametersStackPanelMaxHeight()
End Sub
Dim m_bSizeChanging As Boolean = False
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
m_bSizeChanging = False
End Sub
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
For Index = 0 To AutomaticCloseExpanderStackPanel.Children.Count - 1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
If IndexedExpander.IsExpanded Then
OpenedExpanderList.Add(True)
IndexedExpander.IsExpanded = False
Dim CurrExpanderContent As FrameworkElement = DirectCast(IndexedExpander.Content, FrameworkElement)
CurrExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
AutomaticCloseExpanderStackPanelHeight -= CurrExpanderContent.DesiredSize.Height
' Sottraggo anche i padding
AutomaticCloseExpanderStackPanelHeight -= (IndexedExpander.Padding.Top + IndexedExpander.Padding.Bottom)
Else
OpenedExpanderList.Add(False)
End If
Else
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
Dim IndexedExpander As Expander = DirectCast(AutomaticCloseExpanderStackPanel.Children(Index), Expander)
If OpenedExpanderList(Index) Then
IndexedExpander.IsExpanded = True
End If
End If
Next
End Sub
' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
Dim target As DependencyObject = dependencyObject
Do
target = LogicalTreeHelper.GetParent(target)
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
If IsNothing(target) Then
target = dependencyObject
Do
target = VisualTreeHelper.GetParent(target)
Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
End If
Return TryCast(target, T)
End Function
End Class
@@ -1,10 +1,10 @@
<UserControl x:Class="WaterjettingParameterExpanderV" <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: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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -74,280 +74,345 @@
</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" <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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
ParamTxBl="{Binding LiTangTxBl}" ParamTxBx="{Binding Path=LiTang,
ParamTxBx="{Binding Path=LiTang, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding LiPerpTxBl}"
ParamTxBl="{Binding LiPerpTxBl}" ParamTxBx="{Binding Path=LiPerp,
ParamTxBx="{Binding Path=LiPerp, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:CheckParamV Grid.Column="0" Grid.Row="0" <EgtWPFLib5:CheckParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding LiHoleTxBl}" ParamTxBl="{Binding LiHoleTxBl}"
ParamChBx="{Binding Path=LiHole, ParamChBx="{Binding Path=LiHole,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/> Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0" <EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0"
ParamTxBl="{Binding LiHoleRadTxBl}" ParamTxBl="{Binding LiHoleRadTxBl}"
ParamTxBx="{Binding Path=LiHoleRad, ParamTxBx="{Binding Path=LiHoleRad,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1" <EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1"
ParamTxBl="{Binding LpTurnsTxBl}" ParamTxBl="{Binding LpTurnsTxBl}"
ParamTxBx="{Binding Path=LpTurns, ParamTxBx="{Binding Path=LpTurns,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="1" <EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="1"
ParamTxBl="{Binding HpTurnsTxBl}" ParamTxBl="{Binding HpTurnsTxBl}"
ParamTxBx="{Binding Path=HpTurns, ParamTxBx="{Binding Path=HpTurns,
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>
<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, </StackPanel>
UpdateSourceTrigger=PropertyChanged, </Expander>
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Header="{Binding AnglesGpBxLbl}" <Expander Header="{Binding AnglesGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtCornTypeTxBl}"
ParamTxBl="{Binding ExtCornTypeTxBl}" ParamCmBxList="{Binding Path=ExtCornTypeList,
ParamCmBxList="{Binding Path=ExtCornTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedExtCornType}"
ParamCmBxSelIndex="{Binding Path=SelectedExtCornType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding IntCornTypeTxBl}"
ParamTxBl="{Binding IntCornTypeTxBl}" ParamCmBxList="{Binding Path=IntCornTypeList,
ParamCmBxList="{Binding Path=IntCornTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" ParamCmBxSelIndex="{Binding Path=SelectedIntCornType}"
ParamCmBxSelIndex="{Binding Path=SelectedIntCornType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding CornSlowLenTxBl}"
ParamTxBl="{Binding CornSlowLenTxBl}" ParamTxBx="{Binding Path=CornSlowLen,
ParamTxBx="{Binding Path=CornSlowLen, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding CornSlowPercTxBl}"
ParamTxBl="{Binding CornSlowPercTxBl}" ParamTxBx="{Binding Path=CornSlowPerc,
ParamTxBx="{Binding Path=CornSlowPerc, 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>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding ProbingGpBxLbl}"
ParamTxBl="{Binding ProbingGpBxLbl}" ParamChBx="{Binding Path=Probing,
ParamChBx="{Binding Path=Probing, 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 Grid.Column="1" Grid.Row="0"
<EgtWPFLib5:StringParamV Grid.Column="1" Grid.Row="0" ParamTxBl="{Binding ProbingMinDistTxBl}"
ParamTxBl="{Binding ProbingMinDistTxBl}" ParamTxBx="{Binding Path=ProbingMinDist,
ParamTxBx="{Binding Path=ProbingMinDist, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1"
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="1" ParamTxBl="{Binding ProbingMaxDistTxBl}"
ParamTxBl="{Binding ProbingMaxDistTxBl}" ParamTxBx="{Binding Path=ProbingMaxDist,
ParamTxBx="{Binding Path=ProbingMaxDist, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> </StackPanel>
</StackPanel> </Expander>
</Expander>
<Expander Header="{Binding OffsetGpBxLbl}" <Expander Header="{Binding OffsetGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBl="{Binding OffsetSrTxBl}" ParamTxBx="{Binding Path=OffSr,
ParamTxBx="{Binding Path=OffSr, 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 ToolExpanderHeader}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
</Expander.Header> </Expander.Header>
<StackPanel> <StackPanel>
<EgtWPFLib5:StringParamV <EgtWPFLib5:StringParamV ParamTxBl="{Binding FeedTxBl}"
ParamTxBl="{Binding FeedTxBl}" ParamTxBx="{Binding Path=Feed,
ParamTxBx="{Binding Path=Feed, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
ValidatesOnDataErrors=True}" Style="{DynamicResource StringParamV_Margin}"/>
Style="{DynamicResource StringParamV_Margin}"/> <EgtWPFLib5:StringParamV ParamTxBl="{Binding TipFeedTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=TipFeed,
ParamTxBl="{Binding TipFeedTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=TipFeed, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding ThicknessFeedTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=ThicknessFeed,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding ThicknessFeedTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=ThicknessFeed, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, </StackPanel>
ValidatesOnDataErrors=True}" </Expander>
Style="{DynamicResource StringParamV_Margin}"/> <Interactivity:Interaction.Behaviors>
</StackPanel> <EgtCAM5:AutomaticCloseExpander/>
</Expander> </Interactivity:Interaction.Behaviors>
<Interactivity:Interaction.Behaviors> </StackPanel>
<EgtCAM5:AutomaticCloseExpander/> </StackPanel>
</Interactivity:Interaction.Behaviors>
</StackPanel>
</StackPanel>
</UserControl> </UserControl>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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,10 +1,10 @@
<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: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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,146 +75,220 @@
<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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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>
@@ -3,17 +3,17 @@ 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 +22,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 +32,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 +54,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
@@ -1,10 +1,10 @@
<UserControl x:Class="WoodMillingParameterExpanderV" <UserControl x:Class="WoodMillingParameterExpanderV"
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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,342 +75,390 @@
<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 OverLapTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=OverLap,
ParamTxBl="{Binding OverLapTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=OverLap, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamCmBxList="{Binding Path=StepTypeList,
<EgtWPFLib5:ComboParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding StepTypeTxBl}" ValidatesOnDataErrors=True}"
ParamCmBxList="{Binding Path=StepTypeList, ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource ComboParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}" 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 OffsetSrTxBl}"
UpdateSourceTrigger=PropertyChanged, ParamTxBx="{Binding Path=OffSr,
ValidatesOnDataErrors=True}" UpdateSourceTrigger=PropertyChanged,
Style="{DynamicResource StringParamV_Margin}"/> ValidatesOnDataErrors=True}"
<EgtWPFLib5:StringParamV Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBl="{Binding OffsetSrTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
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 </StackPanel>
ParamTxBl="{Binding OffsetSlTxBl}" </Expander>
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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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>
<EgtWPFLib5:CheckParamV <EgtWPFLib5:CheckParamV ParamTxBl="{Binding OscEnableTxBl}"
ParamTxBl="{Binding OscEnableTxBl}" ParamChBx="{Binding Path=OscEnable,
ParamChBx="{Binding Path=OscEnable, 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 OscHeightTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=OscHeight,
ParamTxBl="{Binding OscHeightTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=OscHeight, ValidatesOnDataErrors=True}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource StringParamV_Margin}"/>
ValidatesOnDataErrors=True}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding OscRampLenTxBl}"
Style="{DynamicResource StringParamV_Margin}"/> ParamTxBx="{Binding Path=OscRampLen,
<EgtWPFLib5:StringParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding OscRampLenTxBl}" ValidatesOnDataErrors=True}"
ParamTxBx="{Binding Path=OscRampLen, Style="{DynamicResource StringParamV_Margin}"/>
UpdateSourceTrigger=PropertyChanged, <EgtWPFLib5:StringParamV ParamTxBl="{Binding OscFlatLenTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=OscFlatLen,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding OscFlatLenTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=OscFlatLen, </StackPanel>
UpdateSourceTrigger=PropertyChanged, </Expander>
ValidatesOnDataErrors=True}"
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}" ParamErrorMsg="{Binding Path=SpeedErrorMsg}"
ParamErrorMsg="{Binding Path=SpeedErrorMsg}" 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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WoodMillingParameterExpanderV Public Class WoodMillingParameterExpanderV
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 +22,7 @@ Public Class WoodMillingParameterExpanderV
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 +32,7 @@ Public Class WoodMillingParameterExpanderV
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 +54,7 @@ Public Class WoodMillingParameterExpanderV
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,10 +1,10 @@
<UserControl x:Class="WoodSawingParameterExpanderV" <UserControl x:Class="WoodSawingParameterExpanderV"
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:OperationParamVisibilityConverter x:Key="OperationParamVisibilityConverter"/>
@@ -75,225 +75,291 @@
<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}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
Style="{DynamicResource ComboParamV_Margin}"/> ParamCmBxList="{Binding Path=HeadSideList,
<EgtWPFLib5:ComboParamV UpdateSourceTrigger=PropertyChanged,
ParamTxBl="{Binding HeadSideTxBl}" ValidatesOnDataErrors=True}"
ParamCmBxList="{Binding Path=HeadSideList, ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
UpdateSourceTrigger=PropertyChanged, Style="{DynamicResource ComboParamV_Margin}"/>
ValidatesOnDataErrors=True}" <UniformGrid Columns="2">
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}" <TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<UniformGrid Columns="2"> <EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
<TextBlock Text="{Binding UserNotesTxBl}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/> <EgtWPFLib5:EgtTextBox.ToolTip>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}" <TextBlock Text="{Binding UserNotesTooltip}"/>
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"> </EgtWPFLib5:EgtTextBox.ToolTip>
<EgtWPFLib5:EgtTextBox.ToolTip> </EgtWPFLib5:EgtTextBox>
<TextBlock Text="{Binding UserNotesTooltip}"/> <TextBlock Text="{Binding SystemNotesTxBl}"
</EgtWPFLib5:EgtTextBox.ToolTip> Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
</EgtWPFLib5:EgtTextBox> Visibility="{Binding SysNotes_Visibility}"/>
<TextBlock Text="{Binding SystemNotesTxBl}" <EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}" Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Visibility="{Binding SysNotes_Visibility}"/> Visibility="{Binding SysNotes_Visibility}"
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True"/>
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
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 SideAngleTxBl}"
ValidatesOnDataErrors=True}" ParamTxBx="{Binding Path=SideAngle,
Style="{DynamicResource StringParamV_Margin}"/> UpdateSourceTrigger=PropertyChanged,
<EgtWPFLib5:StringParamV ValidatesOnDataErrors=True}"
ParamTxBl="{Binding SideAngleTxBl}" Style="{DynamicResource StringParamV_Margin}"/>
ParamTxBx="{Binding Path=SideAngle, <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: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>
<TabItem Header="COMBOBOX">
<ComboBox ItemsSource="{Binding ListKeyValue}"
SelectedItem="{Binding SelKeyValue, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="KeyValue"/>
</TabItem>
</TabControl>
<Button Command="{Binding RemoveItemNoteCommand}"
Grid.Column="2"
Width="20"
Height="20"
Margin="5,0,0,0">
<Image Source="/Resources/Note/-.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ComboBox ItemsSource="{Binding NotesListCombo}"
SelectedItem="{Binding SelNoteItemCombo}"
Grid.Row="1"
Grid.ColumnSpan="1"
Visibility="{Binding ComboAddVisibility}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}"
Margin="2.5"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander 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}" </StackPanel>
Style="{DynamicResource StringParamV_Margin}"/> </Expander>
</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}" </StackPanel>
Style="{DynamicResource StringParamV_Margin}"/> </Expander>
</StackPanel>
</Expander>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamTxBl="{Binding ExtLinkTypeTxBl}" ParamCmBxList="{Binding Path=ExtLinkTypeList,
ParamCmBxList="{Binding Path=ExtLinkTypeList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True,
ValidatesOnDataErrors=True, Mode=OneWay}"
Mode=OneWay}" ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV <EgtWPFLib5:ComboParamV ParamTxBl="{Binding CurveUseTxBl}"
ParamTxBl="{Binding CurveUseTxBl}" ParamCmBxList="{Binding Path=CurveUseList,
ParamCmBxList="{Binding Path=CurveUseList, UpdateSourceTrigger=PropertyChanged,
UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True,
ValidatesOnDataErrors=True, Mode=OneWay}"
Mode=OneWay}" ParamCmBxSelIndex="{Binding Path=SelectedCurveUse}"
ParamCmBxSelIndex="{Binding Path=SelectedCurveUse}" Style="{DynamicResource ComboParamV_Margin}"/>
Style="{DynamicResource ComboParamV_Margin}"/> </Expander.Header>
</Expander.Header> <StackPanel Margin="2">
<StackPanel Margin="2"> <EgtWPFLib5:StringParamV ParamTxBl="{Binding ApproxTxBl}"
<EgtWPFLib5:StringParamV ParamTxBx="{Binding Path=Approx,
ParamTxBl="{Binding ApproxTxBl}" UpdateSourceTrigger=PropertyChanged,
ParamTxBx="{Binding Path=Approx, 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, <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>
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WoodSawingParameterExpanderV Public Class WoodSawingParameterExpanderV
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 +22,7 @@ Public Class WoodSawingParameterExpanderV
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 +32,7 @@ Public Class WoodSawingParameterExpanderV
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 +54,7 @@ Public Class WoodSawingParameterExpanderV
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
@@ -28,6 +28,31 @@ Public Class DispositionOpListBoxItem
End Set End Set
End Property End Property
Public Property OnOffAll As Boolean?
Get
Dim OpIndexes As List(Of Integer) = GetOpIndexes()
' Ritorno il valore specificato in base agli stati delle operazioni di cui abbiamo raccolto gli indici
If OpIndexes.Count = 0 Then Return False
Dim bTemp As Boolean = DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpIndexes(0)), MachiningOpListBoxItem).OnOff
For OpInDispIndex = 1 To OpIndexes.Count - 1
If DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpIndexes(OpInDispIndex)), MachiningOpListBoxItem).OnOff <> bTemp Then Return Nothing
Next
Return bTemp
End Get
Set(value As Boolean?)
' Recupero gli indici delle operazioni della Disposizione corrente
Dim OpIndexes As List(Of Integer) = GetOpIndexes()
If OpIndexes.Count = 0 Then
NotifyPropertyChanged(NameOf(OnOffAll))
Return
End If
For Each OpInDispIndex In OpIndexes
DirectCast(Map.refOperationsListExpanderVM.OperationList.Item(OpInDispIndex), MachiningOpListBoxItem).OnOff = If(IsNothing(value), False, CBool(value))
Next
End Set
End Property
Private m_Image As String = String.Empty Private m_Image As String = String.Empty
Public Property Image As String Public Property Image As String
Get Get
@@ -1,5 +1,4 @@
Imports System.ComponentModel Imports System.Collections.ObjectModel
Imports System.Collections.ObjectModel
Imports EgtUILib Imports EgtUILib
Public Class MachiningOpListBoxItem Public Class MachiningOpListBoxItem
@@ -126,6 +125,31 @@ Public Class MachiningOpListBoxItem
End Get End Get
End Property End Property
Private m_bOnOff As Boolean = True
Public Property OnOff As Boolean
Get
Return m_bOnOff
End Get
Set(value As Boolean)
If m_bOnOff <> value Then
m_bOnOff = value
Dim bOldEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
' se abilitato, eseguo operazione
Dim status As Integer = GDB_ST.OFF
If value Then
status = GDB_ST.ON_
End If
ModifyStatusLamp()
EgtSetStatus(Id, status)
If bOldEnMod Then EgtEnableModified()
EgtDraw()
End If
NotifyPropertyChanged(NameOf(OnOff))
End Set
End Property
' Definizione comandi ' Definizione comandi
Private m_cmdModifyNameEnter As ICommand Private m_cmdModifyNameEnter As ICommand
Private m_cmdModifyNameEsc As ICommand Private m_cmdModifyNameEsc As ICommand
@@ -170,11 +194,28 @@ Public Class MachiningOpListBoxItem
Return "" Return ""
Case MCH_OY.CHISELING Case MCH_OY.CHISELING
Return "" Return ""
Case MCH_OY.FIVEAXISMILLING
Return ""
Case Else Case Else
Return String.Empty Return String.Empty
End Select End Select
End Function End Function
Private Sub ModifyStatusLamp()
' Recupero l'indice dell'operazione a cui abbiamo appena modificato lo Status e l'indice della Disposizione che la contiene
Dim DispIndex As Integer = 0
Dim OpIndex As Integer = 0
For Each OpItem In Map.refOperationsListExpanderVM.OperationList
If EgtGetOperationType(OpItem.Id) = MCH_OY.DISP Then DispIndex = OpIndex
If OpItem.Id = Id Then
Exit For
End If
OpIndex += 1
Next
' Notifico StatusAll per calcolare lo stato della CheckBox della Disposizione
Map.refOperationsListExpanderVM.OperationList(DispIndex).NotifyPropertyChanged(NameOf(DispositionOpListBoxItem.OnOffAll))
End Sub
#Region "COMMANDS" #Region "COMMANDS"
#Region "ModifyNameEnterCommand" #Region "ModifyNameEnterCommand"
@@ -63,6 +63,7 @@ Public Class OperationListBoxItem
Dim bEnabModif As Boolean = EgtGetEnableModified() Dim bEnabModif As Boolean = EgtGetEnableModified()
EgtDisableModified() EgtDisableModified()
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL)) EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_DBL))
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.OFF) EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
SelData.ClearIdSub() SelData.ClearIdSub()
If bEnabModif Then EgtEnableModified() If bEnabModif Then EgtEnableModified()
@@ -73,7 +74,7 @@ Public Class OperationListBoxItem
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled") Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
NotifyPropertyChanged("IsSelected") NotifyPropertyChanged("IsSelected")
' Aggiorno visualizzazione ' Aggiorno visualizzazione
EgtDraw() If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
Return Return
End If End If
' Imposto la fase di lavorazione corrente ' Imposto la fase di lavorazione corrente
@@ -96,6 +97,7 @@ Public Class OperationListBoxItem
Dim bEnabModif As Boolean = EgtGetEnableModified() Dim bEnabModif As Boolean = EgtGetEnableModified()
EgtDisableModified() EgtDisableModified()
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL)) EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_DBL))
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.ON_) EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.ON_)
If bEnabModif Then EgtEnableModified() If bEnabModif Then EgtEnableModified()
' Seleziono la geometria della lavorazione ' Seleziono la geometria della lavorazione
@@ -104,26 +106,32 @@ Public Class OperationListBoxItem
Dim EntityIndex As Integer = 0 Dim EntityIndex As Integer = 0
Dim SubEntityIndex As Integer = 0 Dim SubEntityIndex As Integer = 0
While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex) While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex)
EgtSelectObj( EntityIndex) EgtSelectObj(EntityIndex)
If EgtGetType( EntityIndex) = GDB_TY.SRF_MESH Or EgtGetType( EntityIndex) = GDB_TY.SRF_FRGN Then If EgtGetType(EntityIndex) = GDB_TY.SRF_MESH Or EgtGetType(EntityIndex) = GDB_TY.SRF_FRGN Then
SelData.AddIdSub(EntityIndex, SubEntityIndex) SelData.AddIdSub(EntityIndex, SubEntityIndex)
End If End If
CountIndex += 1 CountIndex += 1
End While End While
End If End If
' Notifico al contentcontrol OperationParameter di aggiornarsi ' Notifico al contentcontrol OperationParameter di aggiornarsi
If Not IsNothing( Map.refOperationParametersExpanderVM) Then If Not IsNothing(Map.refOperationParametersExpanderVM) Then
Map.refOperationParametersExpanderVM.OnPropertyChanged("OperationParameters") Map.refOperationParametersExpanderVM.OnPropertyChanged("OperationParameters")
End If End If
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled") Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled") Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
' Notifico l'operazione selezionata all'expander con l'albero delle lavorazioni aggiungibili ' Notifico l'operazione selezionata all'expander con l'albero delle lavorazioni aggiungibili
If Not IsNothing( Map.refMachiningTreeExpanderVM) Then If Not IsNothing(Map.refMachiningTreeExpanderVM) Then
Map.refMachiningTreeExpanderVM.nSelectedOperationId = Me.Id Map.refMachiningTreeExpanderVM.nSelectedOperationId = Me.Id
End If End If
' Aggiorno visualizzazione ' Aggiorno visualizzazione
EgtDraw() If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
End If End If
' Resetto valori slider
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue()
End If
'OnPropertyChanged("ToolExpanderHeader") 'OnPropertyChanged("ToolExpanderHeader")
Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled") Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled")
Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled") Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled")
@@ -70,9 +70,10 @@ Public Class OperationParametersExpanderVM
Return m_DispositionParameterExpander Return m_DispositionParameterExpander
Else Else
If IsNothing(m_MachiningParameterExpander) Then If IsNothing(m_MachiningParameterExpander) Then
m_MachiningParameterExpander = New MachiningParameterExpanderV
m_MachiningParameterExpanderVM = New MachiningParameterExpanderVM() m_MachiningParameterExpanderVM = New MachiningParameterExpanderVM()
m_MachiningParameterExpander.DataContext = m_MachiningParameterExpanderVM m_MachiningParameterExpander = New MachiningParameterExpanderV With {
.DataContext = m_MachiningParameterExpanderVM
}
End If End If
m_MachiningParameterExpanderVM.NotifyPropertyChanged("ParamExpanderPageV") m_MachiningParameterExpanderVM.NotifyPropertyChanged("ParamExpanderPageV")
Return m_MachiningParameterExpander Return m_MachiningParameterExpander
@@ -109,6 +110,7 @@ Public Class OperationParametersExpanderVM
Exit For Exit For
End If End If
Next Next
If IsNothing(selOperation) Then Return False
If IsValidDispositionType(selOperation.m_Type) Then If IsValidDispositionType(selOperation.m_Type) Then
ParametersExpanderName = selOperation.Name ParametersExpanderName = selOperation.Name
@@ -136,6 +138,8 @@ Public Class OperationParametersExpanderVM
End While End While
EgtDraw() EgtDraw()
ElseIf IsValidMachiningType(selOperation.m_Type) Then ElseIf IsValidMachiningType(selOperation.m_Type) Then
' Imposto la fase di lavorazione corrente
EgtSetCurrPhase(EgtGetOperationPhase(selOperation.m_Id))
' Leggo il tipo di operazione per impostare il tipo di selezione ' Leggo il tipo di operazione per impostare il tipo di selezione
EgtSetCurrMachining(selOperation.m_Id) EgtSetCurrMachining(selOperation.m_Id)
Dim sOpMach As String = String.Empty Dim sOpMach As String = String.Empty
@@ -167,11 +171,17 @@ Public Class OperationParametersExpanderVM
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomChiseling Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomChiseling
Case MCH_OY.SURFFINISHING Case MCH_OY.SURFFINISHING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfFinishing Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfFinishing
Case MCH_OY.SURFROUGHING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomSurfRoughing
Case MCH_OY.WATERJETTING Case MCH_OY.WATERJETTING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomWaterJetting Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomWaterJetting
Case MCH_OY.FIVEAXISMILLING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomFiveAxMilling
Case MCH_OY.PROBING
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing
End Select End Select
' Imposto visualizzazione utensile ' Imposto visualizzazione utensile
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = True Map.refMachiningParameterExpanderVM.SetViewTool( True)
End If End If
OnPropertyChanged("ParametersIsExpanded") OnPropertyChanged("ParametersIsExpanded")
Return True Return True
@@ -201,7 +211,7 @@ Public Class OperationParametersExpanderVM
EgtDraw() EgtDraw()
Else Else
' Nascondo visualizzazione utensile ' Nascondo visualizzazione utensile
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = False Map.refMachiningParameterExpanderVM.SetViewTool( False)
End If End If
ParametersExpanderName = String.Empty ParametersExpanderName = String.Empty
' Disabilito la selezione delle lavorazioni ' Disabilito la selezione delle lavorazioni
@@ -43,6 +43,7 @@
</Border.InputBindings> </Border.InputBindings>
<Grid Style="{StaticResource LayoutRoot}"> <Grid Style="{StaticResource LayoutRoot}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -50,9 +51,12 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/> <CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/> <Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="1" Text="{Binding Name}" <ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="1"
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="2" Text="{Binding Name}"
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/> Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
<TextBox Grid.Column="1" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}" <TextBox Grid.Column="2" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
Width="150" Width="150"
x:Name="Box" x:Name="Box"
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0"> Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
@@ -63,7 +67,7 @@
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/> <KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
</TextBox.InputBindings> </TextBox.InputBindings>
</TextBox> </TextBox>
<TextBlock Grid.Column="2" Text="{Binding Info}"/> <TextBlock Grid.Column="3" Text="{Binding Info}"/>
</Grid> </Grid>
</Border> </Border>
</DataTemplate> </DataTemplate>
@@ -76,6 +80,9 @@
</Border.InputBindings> </Border.InputBindings>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/> <CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
<CheckBox IsChecked="{Binding OnOffAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
<!--<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}"
IsChecked="{Binding OnOffAll}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>-->
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/> <Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
<TextBlock Text="{Binding Name}" Foreground="White" <TextBlock Text="{Binding Name}" Foreground="White"
FontSize="15" FontWeight="SemiBold"/> FontSize="15" FontWeight="SemiBold"/>
@@ -84,6 +84,7 @@ Public Class OperationsListExpanderVM
Set(value As Boolean) Set(value As Boolean)
If value <> m_ListIsExpanded Then If value <> m_ListIsExpanded Then
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value) Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value)
SetStatusOnLamp()
End If End If
End Set End Set
End Property End Property
@@ -111,6 +112,37 @@ Public Class OperationsListExpanderVM
End Set End Set
End Property End Property
Private m_tmpOperationList As New ObservableCollection(Of MachiningOpListBoxItem)
Public Property tmpOperationList As ObservableCollection(Of MachiningOpListBoxItem)
Get
Return m_tmpOperationList
End Get
Set(value As ObservableCollection(Of MachiningOpListBoxItem))
m_tmpOperationList = value
End Set
End Property
Private m_StatusLampList As New ObservableCollection(Of StatusLamp)
Public Property StatusLampList As ObservableCollection(Of StatusLamp)
Get
Return m_StatusLampList
End Get
Set(value As ObservableCollection(Of StatusLamp))
m_StatusLampList = value
End Set
End Property
' Forza il disegno quando seleziono la lampadina
Private m_ForceDrawInIsSelected As Boolean = True
Public Property ForceDrawInIsSelected As Boolean
Get
Return m_ForceDrawInIsSelected
End Get
Set(value As Boolean)
m_ForceDrawInIsSelected = value
End Set
End Property
Public ReadOnly Property DuplicateCmd_IsEnabled As Boolean Public ReadOnly Property DuplicateCmd_IsEnabled As Boolean
Get Get
Dim SelType As Integer = MCH_OY.NONE Dim SelType As Integer = MCH_OY.NONE
@@ -258,7 +290,7 @@ Public Class OperationsListExpanderVM
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
Sub New() Sub New()
m_bMoveThroughDisps = ( GetPrivateProfileInt( S_MACH, K_MOVETHROUGHDISPS, 0) <> 0) m_bMoveThroughDisps = (GetPrivateProfileInt(S_MACH, K_MOVETHROUGHDISPS, 0) <> 0)
' Creo riferimento a questa classe in Map ' Creo riferimento a questa classe in Map
Map.SetRefOperationsListExpanderVM(Me) Map.SetRefOperationsListExpanderVM(Me)
Me.ListIsExpanded = True Me.ListIsExpanded = True
@@ -329,10 +361,11 @@ Public Class OperationsListExpanderVM
' Aggiungo la nuova fase ' Aggiungo la nuova fase
Dim nPhase As Integer = EgtAddPhase() Dim nPhase As Integer = EgtAddPhase()
Dim nDispId As Integer = EgtGetPhaseDisposition(nPhase) Dim nDispId As Integer = EgtGetPhaseDisposition(nPhase)
' Confermo grezzi e bloccaggi sopra salvati ' Confermo grezzi, movimenti assi di disposizione e bloccaggi sopra salvati
For Each nId As Integer In vRawId For Each nId As Integer In vRawId
EgtKeepRawPart(nId, nLastPhase) EgtKeepRawPart(nId, nLastPhase)
Next Next
EgtKeepAllDispAxes(nLastPhase)
For Each nId As Integer In vFxtId For Each nId As Integer In vFxtId
EgtKeepFixture(nId, nLastPhase) EgtKeepFixture(nId, nLastPhase)
Next Next
@@ -433,6 +466,10 @@ Public Class OperationsListExpanderVM
If EgtGetOperationMode(selOperation.Id) Then If EgtGetOperationMode(selOperation.Id) Then
Map.refOperationParametersExpanderVM.ParametersIsExpanded = True Map.refOperationParametersExpanderVM.ParametersIsExpanded = True
If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue()
End If
End If End If
End Sub End Sub
@@ -457,52 +494,55 @@ Public Class OperationsListExpanderVM
''' </summary> ''' </summary>
Public Sub MoveUp() Public Sub MoveUp()
' Verifico il numero di elementi selezionati ' Verifico il numero di elementi selezionati
Dim indexes As New List( Of Integer)() Dim indexes As New List(Of Integer)()
For index As Integer = 0 To OperationList.Count - 1 For index As Integer = 0 To OperationList.Count - 1
' Verifico gli elementi selezionati ' Verifico gli elementi selezionati
If OperationList.Item( index).IsSelected Then If OperationList.Item(index).IsSelected Then
' Se presente una disposizione esco ' Se presente una disposizione esco
If EgtGetOperationType( OperationList.Item( index).Id) = MCH_OY.DISP Then Return If EgtGetOperationType(OperationList.Item(index).Id) = MCH_OY.DISP Then Return
' Aggiungo l'operazione ' Aggiungo l'operazione
indexes.Add( index) indexes.Add(index)
End If End If
Next Next
Dim lenIndexes As Integer = indexes.Count Dim lenIndexes As Integer = indexes.Count
' Recupero Id ultima entità selezionata e precedente a quelle selezionate ' Recupero Id ultima entità selezionata e precedente a quelle selezionate
Dim LastSelectedId As Integer = OperationList( indexes( lenIndexes - 1)).Id Dim LastSelectedId As Integer = OperationList(indexes(lenIndexes - 1)).Id
Dim PreviousId As Integer = OperationList( indexes( 0) - 1).Id Dim PreviousId As Integer = OperationList(indexes(0) - 1).Id
' Sposto l'operazione precedente a quelle selezionate nell'ambiente Egt ' Sposto l'operazione precedente a quelle selezionate nell'ambiente Egt
If EgtRelocate( PreviousId, LastSelectedId, GDB_POS.AFTER) Then If EgtRelocate(PreviousId, LastSelectedId, GDB_POS.AFTER) Then
' Sposto l'operazione precedente a quelle selezionate nella grafica ' Sposto l'operazione precedente a quelle selezionate nella grafica
OperationList.Move( indexes(0) - 1, indexes( lenIndexes - 1)) ' + 1) OperationList.Move(indexes(0) - 1, indexes(lenIndexes - 1)) ' + 1)
' Ricalcolo le lavorazioni selezionate e quella che era precedente (e ora è seguente) ' Ricalcolo le lavorazioni selezionate e quella che era precedente (e ora è seguente)
If Not m_bMoveThroughDisps Then If Not m_bMoveThroughDisps Then
For index As Integer = 0 To indexes.Count - 1 For index As Integer = 0 To indexes.Count - 1
EgtSetCurrMachining( OperationList( indexes( index)).Id) EgtSetCurrMachining(OperationList(indexes(index)).Id)
EgtApplyMachining( False) EgtApplyMachining(False)
Next Next
EgtSetCurrMachining( PreviousId) EgtSetCurrMachining(PreviousId)
EgtApplyMachining( False) EgtApplyMachining(False)
EgtDraw() EgtDraw()
OnPropertyChanged( "MoveUp_IsEnabled") OnPropertyChanged("MoveUp_IsEnabled")
OnPropertyChanged( "MoveDown_IsEnabled") OnPropertyChanged("MoveDown_IsEnabled")
Map.refProjectVM.EmitTitle() Map.refProjectVM.EmitTitle()
Else Else
Dim nCurrPhase As Integer = EgtGetOperationPhase(LastSelectedId)
For index As Integer = 0 To indexes.Count - 1 For index As Integer = 0 To indexes.Count - 1
Dim nOpeId As Integer = OperationList( indexes( index) - 1).Id Dim nOpeId As Integer = OperationList(indexes(index) - 1).Id
If EgtGetOperationType( nOpeId) <> MCH_OY.DISP Then If EgtGetOperationType(nOpeId) <> MCH_OY.DISP Then
EgtAdjustOperationPhase( nOpeId) EgtAdjustOperationPhase(nOpeId)
EgtSetCurrMachining( nOpeId) EgtSetCurrMachining(nOpeId)
EgtApplyMachining( False) EgtApplyMachining(False)
End If End If
Next Next
If EgtGetOperationType( PreviousId) <> MCH_OY.DISP Then If EgtGetOperationType(PreviousId) <> MCH_OY.DISP Then
EgtSetCurrMachining( PreviousId) EgtSetCurrMachining(PreviousId)
EgtApplyMachining( False) EgtApplyMachining(False)
End If End If
Dim nNewPhase As Integer = EgtGetOperationPhase(LastSelectedId)
If nNewPhase <> nCurrPhase Then EgtSetCurrPhase(nNewPhase)
EgtDraw() EgtDraw()
OnPropertyChanged( NameOf(MoveUp_IsEnabled)) OnPropertyChanged(NameOf(MoveUp_IsEnabled))
OnPropertyChanged( NameOf(MoveDown_IsEnabled)) OnPropertyChanged(NameOf(MoveDown_IsEnabled))
Map.refProjectVM.EmitTitle() Map.refProjectVM.EmitTitle()
End If End If
End If End If
@@ -529,52 +569,52 @@ Public Class OperationsListExpanderVM
''' </summary> ''' </summary>
Public Sub MoveDown() Public Sub MoveDown()
' Verifico il numero di elementi selezionati ' Verifico il numero di elementi selezionati
Dim indexes As New List( Of Integer)() Dim indexes As New List(Of Integer)()
For index As Integer = 0 To OperationList.Count - 1 For index As Integer = 0 To OperationList.Count - 1
' Verifico gli elementi selezionati ' Verifico gli elementi selezionati
If OperationList.Item( index).IsSelected Then If OperationList.Item(index).IsSelected Then
' Se presente una disposizione esco ' Se presente una disposizione esco
If EgtGetOperationType( OperationList.Item( index).Id) = MCH_OY.DISP Then Return If EgtGetOperationType(OperationList.Item(index).Id) = MCH_OY.DISP Then Return
' Aggiungo l'operazione ' Aggiungo l'operazione
indexes.Add( index) indexes.Add(index)
End If End If
Next Next
Dim lenIndexes As Integer = indexes.Count Dim lenIndexes As Integer = indexes.Count
' Recupero Id prima entità selezionata e successiva a quelle selezionate ' Recupero Id prima entità selezionata e successiva a quelle selezionate
Dim FirstSelectedId As Integer = OperationList( indexes( 0)).Id Dim FirstSelectedId As Integer = OperationList(indexes(0)).Id
Dim NextId As Integer = OperationList( indexes( lenIndexes - 1) + 1).Id Dim NextId As Integer = OperationList(indexes(lenIndexes - 1) + 1).Id
' Sposto l'operazione successiva a quelle selezionate nell'ambiente Egt ' Sposto l'operazione successiva a quelle selezionate nell'ambiente Egt
If EgtRelocate( NextId, FirstSelectedId, GDB_POS.BEFORE) Then If EgtRelocate(NextId, FirstSelectedId, GDB_POS.BEFORE) Then
' Sposto l'operazione successiva a quelle selezionate nella grafica ' Sposto l'operazione successiva a quelle selezionate nella grafica
OperationList.Move( indexes( lenIndexes - 1) + 1, indexes( 0)) OperationList.Move(indexes(lenIndexes - 1) + 1, indexes(0))
' Ricalcolo la lavorazioni selezionate e quella che era seguente (e ora è precedente) ' Ricalcolo la lavorazioni selezionate e quella che era seguente (e ora è precedente)
If Not m_bMoveThroughDisps Then If Not m_bMoveThroughDisps Then
EgtSetCurrMachining( NextId) EgtSetCurrMachining(NextId)
EgtApplyMachining( False) EgtApplyMachining(False)
For index As Integer = 0 To indexes.Count - 1 For index As Integer = 0 To indexes.Count - 1
EgtSetCurrMachining( OperationList( indexes( index)).Id) EgtSetCurrMachining(OperationList(indexes(index)).Id)
EgtApplyMachining( False) EgtApplyMachining(False)
Next Next
EgtDraw() EgtDraw()
OnPropertyChanged( "MoveUp_IsEnabled") OnPropertyChanged("MoveUp_IsEnabled")
OnPropertyChanged( "MoveDown_IsEnabled") OnPropertyChanged("MoveDown_IsEnabled")
Map.refProjectVM.EmitTitle() Map.refProjectVM.EmitTitle()
Else Else
If EgtGetOperationType( NextId) <> MCH_OY.DISP Then If EgtGetOperationType(NextId) <> MCH_OY.DISP Then
EgtSetCurrMachining( NextId) EgtSetCurrMachining(NextId)
EgtApplyMachining( False) EgtApplyMachining(False)
End If End If
For index As Integer = 0 To indexes.Count - 1 For index As Integer = 0 To indexes.Count - 1
Dim nOpeId As Integer = OperationList( indexes( index) + 1).Id Dim nOpeId As Integer = OperationList(indexes(index) + 1).Id
If EgtGetOperationType( nOpeId) <> MCH_OY.DISP Then If EgtGetOperationType(nOpeId) <> MCH_OY.DISP Then
EgtAdjustOperationPhase( nOpeId) EgtAdjustOperationPhase(nOpeId)
EgtSetCurrMachining( nOpeId) EgtSetCurrMachining(nOpeId)
EgtApplyMachining( False) EgtApplyMachining(False)
End If End If
Next Next
EgtDraw() EgtDraw()
OnPropertyChanged( NameOf( MoveUp_IsEnabled)) OnPropertyChanged(NameOf(MoveUp_IsEnabled))
OnPropertyChanged( NameOf( MoveDown_IsEnabled)) OnPropertyChanged(NameOf(MoveDown_IsEnabled))
Map.refProjectVM.EmitTitle() Map.refProjectVM.EmitTitle()
End If End If
End If End If
@@ -600,6 +640,8 @@ Public Class OperationsListExpanderVM
''' Execute the Point. This method is invoked by the PointCommand. ''' Execute the Point. This method is invoked by the PointCommand.
''' </summary> ''' </summary>
Public Sub Update() Public Sub Update()
Dim tmpStatusLamp As New StatusLamp()
Map.refOperationsListExpanderVM.StatusLampList = tmpStatusLamp.LoadStatusLamp()
' Cursore di attesa ' Cursore di attesa
Application.Current.MainWindow.ForceCursor = True Application.Current.MainWindow.ForceCursor = True
Application.Current.MainWindow.Cursor = Cursors.Wait Application.Current.MainWindow.Cursor = Cursors.Wait
@@ -609,6 +651,7 @@ Public Class OperationsListExpanderVM
Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr) Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr)
EgtSetModified() EgtSetModified()
' Deseleziono l'Operazione selezionata e la de-evidenzio nel Disegno ' Deseleziono l'Operazione selezionata e la de-evidenzio nel Disegno
m_ForceDrawInIsSelected = False
For Each Operation In OperationList For Each Operation In OperationList
If Operation.IsSelected Then If Operation.IsSelected Then
Operation.IsSelected = False Operation.IsSelected = False
@@ -616,6 +659,9 @@ Public Class OperationsListExpanderVM
Next Next
' Ricarico la lista delle Operazioni ' Ricarico la lista delle Operazioni
LoadOperationList(GDB_ID.NULL) LoadOperationList(GDB_ID.NULL)
' Rimetto le lampadine in modo corretto
tmpStatusLamp.UpdateStatusLamp()
m_ForceDrawInIsSelected = True
' Aggiorno visualizzazione e ritorno a cursore standard ' Aggiorno visualizzazione e ritorno a cursore standard
EgtDraw() EgtDraw()
Application.Current.MainWindow.ForceCursor = False Application.Current.MainWindow.ForceCursor = False
@@ -625,7 +671,8 @@ Public Class OperationsListExpanderVM
If Not String.IsNullOrEmpty(sErr) Then If Not String.IsNullOrEmpty(sErr) Then
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else Else
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) ' Errore nell'aggiornamento delle lavorazioni!
MessageBox.Show(EgtMsg(5346), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Else Else
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(MSG_OPERATION + 11)) Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(MSG_OPERATION + 11))
@@ -720,6 +767,7 @@ Public Class OperationsListExpanderVM
selOperation.m_Type = MCH_OY.DISP Then Return selOperation.m_Type = MCH_OY.DISP Then Return
' Tolgo Mark da lavorazione originale ' Tolgo Mark da lavorazione originale
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_CL)) EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_CL))
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_DBL))
EgtSetStatus(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_AUXVIEW), GDB_ST.OFF) EgtSetStatus(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
SelData.ClearIdSub() SelData.ClearIdSub()
' Eseguo la copia ' Eseguo la copia
@@ -825,6 +873,7 @@ Public Class OperationsListExpanderVM
MCH_MP.OFFSET, MCH_MP.OFFSET,
MCH_MP.STEPEXTARC, MCH_MP.STEPEXTARC,
MCH_MP.STEPINTARC, MCH_MP.STEPINTARC,
MCH_MP.SUBSTEP,
MCH_MP.SIDESTEP, MCH_MP.SIDESTEP,
MCH_MP.VERTFEED, MCH_MP.VERTFEED,
MCH_MP.STEPSIDEANG, MCH_MP.STEPSIDEANG,
@@ -967,8 +1016,8 @@ Public Class OperationsListExpanderVM
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
OnPropertyChanged("ListIsExpanded") OnPropertyChanged("ListIsExpanded")
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True) Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
Map.refDoorPanelVM.MTableIsEnabled(True) If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(True)
Map.refSpecialPanelVM.SpecialPanelIsEnabled(True) If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(True)
Return True Return True
End Function End Function
@@ -989,7 +1038,9 @@ Public Class OperationsListExpanderVM
Private Sub LoadOperationList() Private Sub LoadOperationList()
OperationList.Clear() OperationList.Clear()
tmpOperationList.Clear()
Dim Id As Integer Dim Id As Integer
Dim OpStatusOnOff As Integer
Dim OpStatus As Boolean = True Dim OpStatus As Boolean = True
Dim OpName As String = String.Empty Dim OpName As String = String.Empty
Dim OpType As Integer = 0 Dim OpType As Integer = 0
@@ -1002,9 +1053,14 @@ Public Class OperationsListExpanderVM
If IsValidMachiningType(OpType) Then If IsValidMachiningType(OpType) Then
EgtSetCurrMachining(Id) EgtSetCurrMachining(Id)
OpStatus = EgtGetOperationMode(Id) OpStatus = EgtGetOperationMode(Id)
EgtGetStatus(Id, OpStatusOnOff)
EgtGetMachiningParam(MCH_MP.TOOL, OpTool) EgtGetMachiningParam(MCH_MP.TOOL, OpTool)
EgtGetMachiningParam(MCH_MP.NAME, OpMach) EgtGetMachiningParam(MCH_MP.NAME, OpMach)
OperationList.Add(New MachiningOpListBoxItem(Id, OpStatus, OpName, OpType, OpTool, OpMach)) ' Dichiarato per far si che le due liste operino in contemporaneo
Dim local_MachiningOpListBoxItem As New MachiningOpListBoxItem(Id, OpStatus, OpName, OpType, OpTool, OpMach)
OperationList.Add(local_MachiningOpListBoxItem)
' Lista creata per lavorare solo su le operazioni di macchina, utilizzata per la gestione dello spegnimento e accensione delle lamp
tmpOperationList.Add(local_MachiningOpListBoxItem)
ElseIf IsValidDispositionType(OpType) Then ElseIf IsValidDispositionType(OpType) Then
OpStatus = True OpStatus = True
OpTool = String.Empty OpTool = String.Empty
@@ -1184,15 +1240,15 @@ Public Class OperationsListExpanderVM
Next Next
End Sub End Sub
Friend Function IsInOperationList(nId As Integer) As Boolean Friend Function GetOperationId(nId As Integer) As Integer
Dim nOpId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nId))) Dim nOpeId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nId)))
For Index = 0 To OperationList.Count - 1 For Index = 0 To OperationList.Count - 1
Dim nOpType As Integer = EgtGetOperationType(nOpId) Dim nOpeType As Integer = EgtGetOperationType(nOpeId)
If OperationList(Index).Id = nOpId And nOpType <> MCH_OY.NONE And nOpType <> MCH_OY.DISP Then If OperationList(Index).Id = nOpeId And nOpeType <> MCH_OY.NONE And nOpeType <> MCH_OY.DISP Then
Return True Return nOpeId
End If End If
Next Next
Return False Return GDB_ID.NULL
End Function End Function
Friend Sub DeselOperationFromId() Friend Sub DeselOperationFromId()
@@ -1246,7 +1302,7 @@ Public Class OperationsListExpanderVM
If m_NewMachining Then EndNewMachining(GDB_ID.NULL) If m_NewMachining Then EndNewMachining(GDB_ID.NULL)
' Disabilito visualizzazione utensile ' Disabilito visualizzazione utensile
If Not IsNothing(m_MachiningParameterExpander) Then If Not IsNothing(m_MachiningParameterExpander) Then
DirectCast(m_MachiningParameterExpander.DataContext, MachiningParameterExpanderVM).ViewTool = False Map.refMachiningParameterExpanderVM.SetViewTool(False)
End If End If
' Deseleziono le operazioni correnti per eliminare il mark ' Deseleziono le operazioni correnti per eliminare il mark
For Each Operation In OperationList For Each Operation In OperationList
@@ -1256,6 +1312,83 @@ Public Class OperationsListExpanderVM
Next Next
End Sub End Sub
Private Sub SetStatusOnLamp()
If Not IsNothing(m_tmpOperationList) Then
For Each ItemOp As MachiningOpListBoxItem In m_tmpOperationList
If Not ItemOp.OnOff Then
EgtSetStatus(ItemOp.Id, GDB_ST.OFF)
End If
Next
End If
EgtDraw()
End Sub
#End Region ' Methods
End Class
Public Class StatusLamp
#Region "FIELDS & PROPERTIES"
Private m_nId As Integer
Public Property nId As Integer
Get
Return m_nId
End Get
Set(value As Integer)
m_nId = value
End Set
End Property
Private m_bStatusLamp As Boolean
Public Property bStatusLamp As Boolean
Get
Return m_bStatusLamp
End Get
Set(value As Boolean)
m_bStatusLamp = value
End Set
End Property
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(nId As Integer, bStatusLamp As Boolean)
m_nId = nId
m_bStatusLamp = bStatusLamp
End Sub
Sub New()
End Sub
#End Region ' Constructor
#Region "METHODS"
Public Function LoadStatusLamp() As ObservableCollection(Of StatusLamp)
Dim tmpStatusLampList As New ObservableCollection(Of StatusLamp)
For Each ItemOp As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
tmpStatusLampList.Add(New StatusLamp(ItemOp.Id, ItemOp.OnOff))
Next
Return tmpStatusLampList
End Function
Public Sub UpdateStatusLamp()
Dim tmpStatusLamp As StatusLamp
If Not IsNothing(Map.refOperationsListExpanderVM.tmpOperationList) Then
For Each ItemOp As MachiningOpListBoxItem In Map.refOperationsListExpanderVM.tmpOperationList
tmpStatusLamp = Map.refOperationsListExpanderVM.StatusLampList.FirstOrDefault(Function(x) x.nId = ItemOp.Id)
If Not tmpStatusLamp.bStatusLamp Then
EgtSetStatus(ItemOp.Id, GDB_ST.OFF)
ItemOp.OnOff = False
End If
Next
End If
End Sub
#End Region ' Methods #End Region ' Methods
End Class End Class
@@ -1,129 +0,0 @@
Imports System.ComponentModel
Imports EgtUILib
Public Class MachineAxis
Implements INotifyPropertyChanged
Private m_IsReadOnlyAxesValue As Boolean
Public Property IsReadOnlyAxesValue As Boolean
Get
Return m_IsReadOnlyAxesValue
End Get
Set(value As Boolean)
If value <> m_IsReadOnlyAxesValue Then
m_IsReadOnlyAxesValue = value
NotifyPropertyChanged("IsReadOnlyAxesValue")
NotifyPropertyChanged("IsEnabledAxesValue")
End If
End Set
End Property
Public ReadOnly Property IsEnabledAxesValue As Boolean
Get
Return Not m_IsReadOnlyAxesValue
End Get
End Property
' Definizione comandi
Private m_cmdManualAxisModify As ICommand
Private m_Name As String
Public Property Name As String
Get
Return m_Name
End Get
Set(value As String)
m_Name = value
UpdateInvert()
End Set
End Property
Private m_Token As String
Public Property Token As String
Get
Return m_Token
End Get
Set(value As String)
If value <> m_Token Then
m_Token = value
NotifyPropertyChanged("Token")
End If
End Set
End Property
Private m_bLinear As Boolean = True
Public WriteOnly Property Linear As Boolean
Set(value As Boolean)
m_bLinear = value
End Set
End Property
Private m_bInvert As Boolean = False
Private Function UpdateInvert() As Boolean
Return EgtGetAxisInvert(m_Name, m_bInvert)
End Function
Private m_Value As String
Public Property Value As String
Get
Return m_Value
End Get
Set(value As String)
m_Value = value
NotifyPropertyChanged("Value")
End Set
End Property
Sub New()
IsReadOnlyAxesValue = True
End Sub
#Region "COMMANDS"
#Region "ManualAxisModifyCommand"
''' <summary>
''' Returns a command that create a new tool.
''' </summary>
Public ReadOnly Property ManualAxisModifyCommand As ICommand
Get
If m_cmdManualAxisModify Is Nothing Then
m_cmdManualAxisModify = New Command(AddressOf ManualAxisModify)
End If
Return m_cmdManualAxisModify
End Get
End Property
''' <summary>
''' Creata the new tool. This method is invoked by the NewCommand.
''' </summary>
Public Sub ManualAxisModify(ByVal param As Object)
Dim dVal As Double
If m_bLinear Then
StringToLen(m_Value, dVal)
Else
StringToDouble(m_Value, dVal)
End If
If m_bInvert Then dVal = -dVal
EgtSetAxisPos(m_Name, dVal)
EgtGetAxisPos(m_Name, dVal)
If m_bInvert Then dVal = -dVal
If m_bLinear Then
Value = LenToString(dVal, -3)
Else
Value = DoubleToString(dVal, -3)
End If
EgtDraw()
End Sub
#End Region ' ManualAxisModifyCommand
#End Region
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class

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