Compare commits

...

325 Commits

Author SHA1 Message Date
Dario Sassi ab283a3efa OmagCUT 3.1e2 :
- correzioni al polishing (oar si notifica che è un taglio diretto e si controlla meglio l'utensile)
- varie migliorie nei tagli diretti.
2026-05-10 11:12:38 +02:00
Dario Sassi 45948e7004 OmagCUT 3.1e1 :
- aggiunta modalità trasmissione del programma CN a step per debug con Siemens One (in Ini di OmagCUT [General] StepByStepSend=1).
2026-05-05 19:14:33 +02:00
Dario Sassi e710c55c2c OmagCUT :
- aggiunta gestione SpecialSend con copia file per Effector.
2026-05-04 08:39:42 +02:00
Dario Sassi dbcd4ca7a0 OmagCUT :
- aggiunto flag opzionale Blocco Asse B (da Ini macchina [Nest] UseBAxisLock=0/1).
2026-05-04 06:39:46 +02:00
Dario Sassi 88ff42a8c6 OmagCUT :
- aggiunta gestione lavorazione di taglio anche con lama manuale (ovviamente non si cambia lama).
2026-04-30 16:25:43 +02:00
Dario Sassi daeaec3b6b OmagCUT :
- correzioni a spianature con fresa (tagli diretti)
- migliorie a foro singolo (tagli diretti).
2026-04-23 16:53:43 +02:00
Dario Sassi 6173e1dc15 OmagCUT :
- correzione per gestione ponticelli per WJ tra pezzi standard e con buchi
- aggiunta possibilità di ponticelli tra pezzi in buchi e contorno del relativo buco.
2026-04-22 08:24:48 +02:00
Dario Sassi 70177a4a0e OmagCUT 3.1d2 :
- piccola miglioria decisione visualizzazione finestra lavorazioni all'uscita della pagina del grezzo.
2026-04-21 08:45:35 +02:00
Dario Sassi b6f4e0e2d7 OmagCUT 3.1d1 :
- corretta scrittura elevazione di lato in taglio singolo di cornice.
2026-04-15 19:07:16 +02:00
Dario Sassi 34fe2b1810 OmagCUT 3.1d1 :
- ricompilazione con cambio versione.
2026-04-15 13:27:05 +02:00
Dario Sassi 0e42d59e21 OmagCUT 3.1c4 :
- correzione in SplitCurve per Waterjet.
2026-03-27 13:17:02 +01:00
Dario Sassi d962c43e0c OmagCUT :
- correzione scrittura variabili booleane su Fanuc
- modificata gestione Power per Fanuc (ora gestisce anche Short senza segno fino a 65535 quindi 65.535 Ampere).
2026-03-27 11:12:11 +01:00
Dario Sassi 55bb27e40f OmagCUT :
- corretta gestione visualizzazione Inizio e Spezza per WJ (dipendono dal fatto che la macchina abbia Wj, non che ce ne sia uno correntemente definito).
2026-03-26 12:25:56 +01:00
Dario Sassi eed9b0a81d OmagCUT 3.1c3 :
- ricompilazione con cambio versione.
2026-03-24 10:03:12 +01:00
Dario Sassi 1dba739917 OmagCUT :
- in nesting manuale per waterjet sistemata gestione ponticelli.
2026-03-23 08:26:49 +01:00
Dario Sassi 283dc6d188 OmagCUT 3.1c2 :
- ricompilazione con cambio versione.
2026-03-17 12:55:56 +01:00
Dario Sassi 325cecf91b OmagCUT :
- in gestione Cornici correzione numero di messaggio per Guida.
2026-03-16 15:35:08 +01:00
Dario Sassi 5e3fbbaaaa OmagCUT :
- in SplitPage ulteriori correzioni a Modifica con lavorazioni Waterjetting.
2026-03-16 12:56:44 +01:00
Dario Sassi fc7edae5f8 OmagCUT :
- in SpliPage Modifica faceva solo ricalcolare lavorazioni Waterjetting, ora anche li riordina.
2026-03-16 12:35:38 +01:00
Dario Sassi 4277434fce OmagCUT :
- aggiunta gestione parametri generali per WaterJet (ottimizza e lavora interni)
- sistemazione nomi costanti, variabili e funzioni
- semplificazione in Wj gestione scelta punto iniziale e separazione lato.
2026-03-15 18:37:10 +01:00
Dario Sassi c0e8838394 OmagCUT :
- aggiustamenti per lama manuale con TC+SAW
- vari altri aggiustamenti per scelta utensili e lavorazioni.
2026-03-10 12:37:47 +01:00
Dario Sassi bd006a197f OmagCUT 3.1c1 :
- sistemata scrittura e lettura nomi utensili e lavorazioni in ini di macchina come UTF8
- sistemazione scelta lavorazioni in Split anche per lama fissa
- eliminati parametri WaterJet non usati
- sistemazioni varie.
2026-03-09 17:47:57 +01:00
SaraP 82a99ff2b0 OmagCUT :
- esclusi i talloni dalla creazione dei ponticelli.
2026-03-06 11:47:25 +01:00
Dario Sassi 21f7f23c3f OmagCUT :
- aggiungo file dimenticato.
2026-03-04 08:24:22 +01:00
Dario Sassi 3c2c0a48ff OmagCUT 3.1b2 :
- razionalizzazione e correzioni a gestione comandi diretti tramite script lua.
2026-02-28 19:24:10 +01:00
Dario Sassi fadb601732 OmagCUT :
- drag rettangoli rimesso in funzione
- corretto controllo extra-corse in spostamento pezzi con ventose
- sistemati alcuni nomi.
2026-02-26 16:23:06 +01:00
Dario Sassi 2d385229d2 OmagCUT :
- piccole modifiche per scelta inizio e stacco lato per Waterjet.
2026-02-24 08:43:01 +01:00
Dario Sassi cfcde65bd7 OmagCUT :
- migliorata gestione in interfaccia dei parametri ExtArcMinRad e IntArcMaxSideAng.
2026-02-23 08:51:07 +01:00
Dario Sassi 6c72457108 EgtOmagCUT :
- correzione apertura progetto con parcheggi con gestione parcheggi disabilitata da Ini( [General] EnableDXFPark=0).
2026-02-18 17:13:38 +01:00
Dario Sassi a7d89047bd OmagCUT 3.1b1 :
- piccoli aggiustamenti estetici.
2026-02-18 10:54:30 +01:00
Dario Sassi 6c7d27d9e9 OmagCUT :
- in gestione Split semplificata gestione FinalCut (IdTwinCut)
- in gestione Split estesa possibilità di allungare attacchi e uscite dei tagli.
2026-02-16 08:03:17 +01:00
Dario Sassi 95bfb04511 OmagCUT 3.1a1 :
- aggiornamento annuale versione
- prima di chiudere CameraMng con Kill si invia il comando di preavviso 8.
2026-01-09 15:51:39 +01:00
Dario Sassi faddb8bbad OmagCUT 2.7l2 :
- correzioni al salvataggio del setup stile CAM5.
2025-12-11 08:53:51 +01:00
Dario Sassi be97eb2b80 OmagCUT 2.7l1 :
- allungato tempo massimo di attesa tastatura utensile a 4 minuti
- aggiunta gestione lama con montaggio manuale nel caso TOOLCHANGERWITHSAW
- razionalizzato salvataggio dati in gruppo speciale OmagCut del progetto.
2025-12-02 18:50:57 +01:00
Dario Sassi e06e721c65 OmagCUT 2.7k3 :
- modifiche, semplificazioni e correzioni a Registration.
2025-11-27 19:49:30 +01:00
Dario Sassi f51b990674 OmagCUT :
- il parametro da Ini macchina per gestione al precednte commit è [Table] AllTabOrigTab1=1.
2025-11-19 13:34:58 +01:00
Dario Sassi f79cffb414 OmagCUT :
- aggiunta gestione DeltaXY su OffsetXY di grezzo in tavola se richiesto riferimento sempre su tavola 1 (#
2025-11-19 13:16:45 +01:00
Dario Sassi 76f4ef1732 OmagCUT :
- al cambio tavola si verifica che il pezzo stia dentro la tavola e se necessario lo si sposta.
2025-11-19 09:53:09 +01:00
Dario Sassi 79eddf4628 OmagCUT :
- aggiunta possibilità di invertire lavorazione waterjet inclinata
- in elenco lavorazioni aggiunto angolo di fianco anche per waterjet
- migliorie nella visualizzazione versi durante inversione.
2025-11-19 08:47:51 +01:00
Dario Sassi ae2e64bcb0 OmagCUT 2.7k2 :
- migliorie nella verifica sovrapposizione grezzi quando si spostano.
2025-11-18 08:20:27 +01:00
Dario Sassi 7a1cbbeb82 OmagCUT :
- correzioni a test lavorazione specie con laser.
2025-11-07 18:02:39 +01:00
Dario Sassi 7d647fd1c4 OmagCUT :
- in SplitPage reset indici inizio e fine di selezionati quando si mettono o tolgon ponticelli in waterjet (altrimenti crash all'uscita).
2025-11-05 09:28:51 +01:00
Dario Sassi 97836125a7 OmagCUT 2.7k1 :
- in tastatura utensile corretta assegnazione flag CMD.ISSAW
- in trasmissione part-program a Fanuc non si eliminano più le linee con M98<...>
- all'avvio programma non si scrivono più nelle note della lama corrente i valori appena letti da queste.
2025-11-04 13:26:06 +01:00
Dario Sassi 908cc381db OmagCUT :
- con Fanuc SpecialSend aggiunta possibilità di configurazione del direttorio destinazione da INI macchina.
2025-10-29 12:23:09 +01:00
Dario Sassi 8436250574 OmagCUT :
- piccola correzione in registration.
2025-10-27 11:28:11 +01:00
Dario Sassi 7d0c63e92b OmagCUT 2.7j2 :
- piccole modifiche.
2025-10-27 10:19:24 +01:00
Dario Sassi 0569f3b0ad OmagCUT :
- modifiche e correzioni per cambio lama in pagina Split.
2025-10-24 19:57:05 +02:00
Dario Sassi e01b93a76b OmagCUT :
- modifiche e correzioni per colori associati a lame e loro lavorazioni.
2025-10-21 08:38:25 +02:00
Dario Sassi f0f6c4484e OmagCUT 2.7j1 :
- correzione per Feed letta da Fanuc quando in inches.
2025-10-13 09:50:30 +02:00
Dario Sassi 3740ec6de7 OmagCUT :
- eliminato parametro FinalDepth da config. macchina (ora viene preso dalla lavorazione "Ultimo Taglio").
2025-10-06 14:50:45 +02:00
Dario Sassi 6feae32493 OmagCUT :
- per Fanuc la Feed letta da CN ora viene corretta a seconda delle unità dell'interfaccia CN (da variabile F2.2).
2025-10-06 11:20:35 +02:00
Dario Sassi 1ca93f2943 OmagCUT :
- migliorata gestione visualizzazione pareti limitanti posizione ammessa grezzi (Weldon)
- migliorato controllo altezza massima grezzo considerando anche sopratavola (Weldon).
2025-10-06 11:02:56 +02:00
Dario Sassi bcba126741 OmagCUT :
- miglioria in importazione per assegnazione angoli di fianco tutti uguali (check).
2025-10-02 12:53:08 +02:00
Dario Sassi 7c9a26b3af OmagCUT 2.7i5 :
- corretta impostazione livello temporaneo a possibile errato gruppo in grezzo che poteva provocare mancato salvataggio foto (cliente Mega5-F).
2025-09-26 17:36:47 +02:00
Dario Sassi 5263813253 OmagCUT :
- inserimento nuovo logo Omag
- aggiunto nascondimento pezzi in parcheggio all'entrata in simulazione
- piccoli ritocchi estetici o quasi.
2025-09-22 19:03:24 +02:00
Dario Sassi 7182059818 OmagCUT :
- sistemazione nomi immagini per logo.
2025-09-19 19:59:28 +02:00
Dario Sassi 09f3b0b534 OmagCUT 2.7i4 :
- con SpecialSend di Fanuc c'è la possibilità di definire da ini macchina il numero di aree di memoria in cui scrivere (max 16)
- piccole sistemazioni di icone Omag e Egalware.
2025-09-12 11:43:53 +02:00
Dario Sassi 37adc352a1 OmagCUT 2.7h3 :
- aggiunta gestione SpecialSend per macchine multitavola (Mega5) con controllo FANUC.
2025-09-03 19:51:43 +02:00
Dario Sassi 2708670d9a OmagCUT 2.7i2 :
- corretto ordinamento tagli finali di lama in griglia (quando abilitati).
2025-09-02 17:13:19 +02:00
Dario Sassi 737366ba27 OmagCut :
- modifiche per prima istanza CameraMng (associata a tavola 1) senza il numero 1 nella path (come era nelle versioni vecchie).
2025-09-01 18:27:02 +02:00
Nicola Pievani d10588867f Aggiornamento KeyOpt 2025-08-29 11:25:51 +02:00
Nicola Pievani 54158406b7 Aggiornamento versione 2.7i1 2025-08-29 10:44:13 +02:00
Nicola Pievani 5c3c231729 Merge branch 'develop' 2025-08-29 10:30:17 +02:00
Nicola Pievani d3c0b1c2c6 Merge branch 'Menage_Final_Cut' into develop 2025-08-28 19:22:46 +02:00
Nicola Pievani ad04e5d916 Correzione messaggio salvattaggio lavorazione 2025-08-28 19:22:41 +02:00
Nicola Pievani db623544e9 Gestione Split per tagli finali 2025-08-28 19:12:46 +02:00
Nicola Pievani 3075c2f4af Migliorata gestione avvio programma CameraMng 2025-08-27 16:03:31 +02:00
Nicola Pievani 045e7cba61 Gestione spostame tagli finali 2025-08-27 15:54:55 +02:00
Nicola Pievani 57d4a29b74 Gestione configurazione dei comandi RESET, milgiorata funzione ResetFEED 2025-08-27 14:30:14 +02:00
Nicola Pievani b045f0ce7b Gestione aggiornamento lavorazioni inclinate 2025-08-26 11:19:32 +02:00
Nicola Pievani 41767f4f3a Merge branch 'develop' of https://gitlab.steamware.net/egaltech/OmagCUT into develop 2025-08-25 18:56:41 +02:00
Nicola Pievani 85f05f280f Corretta gestione selezione lavorazione inclianata senza cmabio lama 2025-08-25 18:56:06 +02:00
Demetrio Cassarino b4338ef88e -migliorata gestione pagina sideangleUC 2025-08-25 16:12:13 +02:00
Nicola Pievani 9d6236b767 Gestione Assi lineare in pollici e migliorata SawTilted 2025-08-25 09:44:02 +02:00
Nicola Pievani d946c39a9d Cambio versione 2.8h1 2025-08-07 15:08:06 +02:00
Nicola Pievani 55bd41ca4c Modifica messaggio per connessione a camera 2025-08-07 13:00:35 +02:00
Nicola Pievani 5e6208a9c4 Merge branch 'Features/Manage_Process_Camera' into develop 2025-08-07 12:18:57 +02:00
Nicola Pievani 29ecd7c780 Merge branch 'Features/New_Disp_Allarms_Pages' into develop 2025-08-07 12:18:39 +02:00
Nicola Pievani 6ca56d3a12 FIXED gestione movimento ventose con asse W 2025-07-28 17:22:45 +02:00
Nicola Pievani 92196b99e6 Gestione ventosa asse W e gestione foto per tutte le tavole 2025-07-28 17:13:20 +02:00
Nicola Pievani a3d40c5bc1 Gestione CameraHq (1 tavola e 2 camere) 2025-07-23 12:15:39 +02:00
Nicola Pievani e25bbc9216 Gestione BackImage da Process 2025-07-18 15:49:27 +02:00
Demetrio Cassarino b4ef388603 -nuova grafica per la gestione delle pagine allarms 2025-07-15 16:53:59 +02:00
Nicola Pievani aebfb05b94 Merge commit '04a7c05e99315e8fc0fa6187eec91ba68cf7ab20' into develop 2025-07-15 11:03:25 +02:00
Nicola Pievani a2b561e944 Inizio gestione BackImage 2025-07-15 11:03:05 +02:00
Nicola Pievani 04a7c05e99 Nuove immagini per pagine Allarm 2025-07-15 09:08:30 +02:00
Nicola Pievani 8cc0d88600 Merge branch 'develop' 2025-07-14 15:42:35 +02:00
Demetrio Cassarino 5bc49d30b9 -aggiornato messaggi di errore su camera 2025-07-14 14:49:12 +02:00
Demetrio Cassarino c30ecc0574 -aggiunto messaggi di errore su fotocamera 2025-07-14 14:38:23 +02:00
Demetrio Cassarino f7e9401e15 Merge branch 'Features/Manage_Process_Camera' of https://gitlab.steamware.net/egalware-cadcam/interfacce/OmagCUT into Features/Manage_Process_Camera 2025-07-14 14:28:56 +02:00
Demetrio Cassarino 9a48c3beb3 -aggiunto controllo su processo vuoto 2025-07-14 14:28:52 +02:00
Nicola Pievani 5032ba4b0b Correzione posizionamento scena nel programma 2025-07-14 09:51:12 +02:00
Demetrio Cassarino 8724afe392 -sistemato currentprojectpage 2025-07-14 09:13:33 +02:00
Nicola Pievani 4fc97ddf4f Merge commit '8443739a70a1b015e2c506e936f56210ae0eb51d' into Features/Manage_Process_Camera 2025-07-14 09:02:41 +02:00
Nicola Pievani 8443739a70 Merge commit '88c674df06a42d5a43e3c8301e1747ad8237d2b6' into develop 2025-07-14 08:55:31 +02:00
Demetrio Cassarino 5145accc39 -aggiornato messggi 2025-07-14 08:41:49 +02:00
Dario Sassi 88c674df06 OmagCUT :
- aggiornati versione e controllo mensile al dichiarato.
2025-07-09 12:23:20 +02:00
Demetrio Cassarino fb4cb7d26b -riportato m_nCameraCount al numero di tavole corrente 2025-07-02 16:44:37 +02:00
Nicola Pievani 083d278283 Merge branch 'Features/New_Allarms_Pages' into develop 2025-07-02 16:38:53 +02:00
Demetrio Cassarino bcfe9f3258 -aggiunto nuovo tab final cut in machining 2025-07-02 16:32:40 +02:00
Demetrio Cassarino 5cdf63a1a3 -aggiunto titolo a lista customgrid 2025-07-02 12:18:07 +02:00
Demetrio Cassarino 1c9601c1e6 -nuova gestione grafica customgrid 2025-07-02 11:40:34 +02:00
Nicola Pievani 18c50aa482 Merge branch 'Features/Final_Saw_Cut' into develop 2025-07-01 16:07:47 +02:00
Nicola Pievani 85bd57b7ff Merge branch 'Features/New_Grid_In_DirectCut' into develop 2025-07-01 16:07:17 +02:00
Nicola Pievani 60570863a3 Merge branch 'master' into Features/New_Grid_In_DirectCut 2025-07-01 16:06:58 +02:00
Nicola Pievani 74013dbd94 Merge commit '9c8971f52bbc98683b1385192a10a736078e18d9' into Features/Final_Saw_Cut 2025-07-01 16:01:55 +02:00
Nicola Pievani 9c8971f52b Merge remote-tracking branch 'origin/Features/New_Manage_Side_Angle' 2025-07-01 15:44:54 +02:00
Nicola Pievani 8d020eeea8 Aggiunto commento per spiegare come gestione scrittura CNCMode per flexium prima versione 2025-06-30 18:15:42 +02:00
Demetrio Cassarino d0672157a8 -rinumerati processo a partire da 1 2025-06-30 15:56:27 +02:00
Demetrio Cassarino 340276e11c -nuova gestione ottimizzata sideang 2025-06-27 15:50:42 +02:00
Demetrio Cassarino 87a24adaa3 -aggiunto chechi in sideangle da sistemare 2025-06-26 14:49:39 +02:00
Demetrio Cassarino 0195d19884 -aggiunto text su progressbar 2025-06-24 10:26:25 +02:00
Demetrio Cassarino c24bb386fc -gestione al momento 1 solo processo 2025-06-20 13:04:44 +02:00
Nicola Pievani 02a9f450fb Merge commit '7caca4f961ee6d7772816231a2370c4a160f97e8' 2025-06-20 10:58:08 +02:00
Nicola Pievani 7caca4f961 Aggiunta descrizione di altri tagli diretti 2025-06-20 10:48:58 +02:00
Nicola Pievani a23b18e5cb Aggiunto un flag per specificare il tipo di taglio diretto 2025-06-20 10:32:38 +02:00
Nicola Pievani ba0987ba3e -gestione progressbar e caricamento foto 2025-06-18 18:40:05 +02:00
Demetrio Cassarino ac809502ed -migliorata gestione camera 2025-06-18 16:57:20 +02:00
Nicola Pievani eb1f776ed7 Migliorata gestione tagli con tallonamento 2025-06-17 16:17:23 +02:00
Demetrio Cassarino 69b3db94f5 Merge branch 'Features/Manage_Process_Camera' of https://gitlab.steamware.net/egalware-cadcam/interfacce/OmagCUT into Features/Manage_Process_Camera 2025-06-17 10:52:39 +02:00
Demetrio Cassarino 67da8aa6ed -gestito apertura più processi cameramanager 2025-06-17 10:52:34 +02:00
Nicola Pievani 451dbed3b3 Gestione seleziona 3 tavole 2025-06-16 12:18:19 +02:00
Nicola Pievani 697807dd79 Merge commit '8f8f781dee62e5be89bb8051c0a6fda0ebb0d3a8' 2025-06-11 12:59:52 +02:00
Nicola Pievani 90676d05ea Gestione cambio tavola con 3 tavole 2025-06-11 12:58:57 +02:00
Demetrio Cassarino 8f8f781dee Merge commit '01ced18fad0b4863f565dae8c01f195aebae3968' into Features/Manage_Msg 2025-06-11 12:56:33 +02:00
Demetrio Cassarino 01ced18fad -aggiornato messaggi 2025-06-11 12:47:23 +02:00
Nicola Pievani 3057c511ed Merge commit '07abfa9b8bc196e18cc8d95c7f52f4b4379a25d8' 2025-06-10 14:57:31 +02:00
Nicola Pievani 6fef662ce9 Migliorato codice e verifiche 2025-06-10 14:57:13 +02:00
Demetrio Cassarino 5ab9204cda -inserito avvio nuovo processo non funzionante 2025-06-10 09:31:50 +02:00
Nicola Pievani c577ad9272 Correzione lettura MountedTool 2025-06-09 18:20:50 +02:00
Nicola Pievani 07abfa9b8b Cambio versione 2.7f1 2025-06-05 09:29:23 +02:00
Nicola Pievani fd6018c2e6 Gestione tallonatura e ponticelli per waterjet 2025-06-03 11:21:42 +02:00
Nicola Pievani 62475adcc1 Gestione nuovo flusso sabbia in WJ database 2025-05-20 18:08:13 +02:00
Nicola Pievani e08c196c54 Nuova gestione selezione tavola corrente 2025-05-20 12:46:07 +02:00
Nicola Pievani 0081855b8c Migliorata gestione caricamento progetto senza parcheggi attivi 2025-05-12 17:32:40 +02:00
Nicola Pievani f7ee580d1f Visualizzo con nome specifico i tagli finali 2025-05-12 17:10:08 +02:00
Nicola Pievani a74e6a0f8b Gestione tagli a griglia custom, da migliorare interfaccia 2025-05-08 12:21:06 +02:00
Nicola Pievani 7e3b85f7a2 Migliorata visualizzazione finestra Selezione lavorazione 2025-05-06 17:32:49 +02:00
Nicola Pievani 8b9c462814 Merge branch 'Features/Set_Machining' 2025-05-06 16:08:46 +02:00
Nicola Pievani ab8051275b Aggiornamento versione 2025-05-06 16:08:30 +02:00
Nicola Pievani 18edeb5ee0 Merge branch 'master' into Features/Set_Machining 2025-05-06 16:02:58 +02:00
Nicola Pievani 471ba49732 Gestione speciale tagli inclinati e cambio lama 2025-05-06 16:02:38 +02:00
Nicola Pievani fd6e15be1e Migliorata gestione uscita simulazione 2025-04-18 13:00:27 +02:00
Nicola Pievani a2bb9e250c Correzione uscita dalla seconda pagina dei tagli diretti 2025-04-08 14:50:30 +02:00
Nicola Pievani 2673d51008 Merge commit '1d5cce387f5490da659622b259ebba41287839a0' 2025-04-04 12:44:34 +02:00
Nicola Pievani 1d5cce387f Ottiimizzata disposizione pezzi DXF in parcheggio 2025-04-04 12:44:10 +02:00
Nicola Pievani 07e5756793 Merge branch 'master' into develop 2025-04-04 11:34:23 +02:00
Nicola Pievani e5e80e9a55 Correzione/miglioramento gestione offset spostamento 2025-04-02 16:09:35 +02:00
Nicola Pievani 233a63b95b Correzione avvio gestione simulazione 2025-04-02 14:49:36 +02:00
Nicola Pievani cd0388b970 Merge commit '135be5f104c891b92201b98e3855117851ed42d5' into develop 2025-03-26 11:26:41 +01:00
Nicola Pievani 135be5f104 Modifica lettura Feed per controllo FANUC 2025-03-24 19:14:54 +01:00
Nicola Pievani 2f116ba3fe Gestione più di un riferimento del grezzo 2025-03-24 15:01:43 +01:00
Nicola Pievani 96ee5b5172 Correzione gestione lama test 2025-03-19 18:32:45 +01:00
Nicola Pievani b1367d543f Merge branch 'develop' into Features/Set_Machining 2025-03-18 18:12:21 +01:00
Nicola Pievani 484f7eb410 Merge branch 'develop' 2025-03-13 17:58:13 +01:00
Nicola Pievani c1eb839fe8 Nascondo le pareti dell'area sicura quando esco dal grezzo 2025-03-13 17:58:01 +01:00
Nicola Pievani f3b1d80de7 Merge branch 'master' into develop 2025-03-13 11:18:49 +01:00
Nicola Pievani 14b4897575 Migliorata gestione movimento grezzo nell'area sicura 2025-03-12 17:29:04 +01:00
Nicola Pievani 213a66d916 Migliorata gestione grezzo per tagli OverZ 2025-03-12 14:45:19 +01:00
Nicola Pievani c9c7aeafae Gestione Warning da CamAuto 2025-03-11 12:09:26 +01:00
Nicola Pievani 07d54499b7 Correzione gestione cambio modo da pagina Grezzo 2025-03-10 17:58:42 +01:00
Nicola Pievani 9f266f1c56 Correzione gestione comando Manual da pagina tagli diretti 2025-03-10 16:13:36 +01:00
Nicola Pievani 0362f77f23 Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egaltech/OmagCUT into Features/Set_Machining 2025-03-10 14:47:03 +01:00
Nicola Pievani fd28e2f971 Creazione file setup per programmi OFFICE e CAM5 della macchina corrente 2025-03-10 14:46:54 +01:00
Demetrio Cassarino 31264a20a0 -recuperati messagi da file messages 2025-03-07 16:28:30 +01:00
Nicola Pievani bee2c44ba7 Aggiunto un commento all'avvio della simulazione 2025-03-07 16:01:51 +01:00
Demetrio Cassarino 65652f468c -aggiunto colore lavorazione in ChangeWD 2025-03-06 16:16:11 +01:00
Demetrio Cassarino 2236eb12c7 -aggiunto tasto destro su lista apertura ChangeWD 2025-03-06 12:38:51 +01:00
Demetrio Cassarino e48837836b Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egalware-cadcam/interfacce/OmagCUT into Features/Set_Machining 2025-03-06 11:35:18 +01:00
Demetrio Cassarino d05fe9c6b2 -aggiunto messaggio di errore
-aggiunto tooltip
2025-03-06 11:34:40 +01:00
Nicola Pievani 8c8a26b692 Pulizia codice 2025-03-06 10:24:45 +01:00
Nicola Pievani 0b1a39704c Riordinate alcune funzioni 2025-03-05 15:39:35 +01:00
Nicola Pievani 8d1b1adaa9 Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egaltech/OmagCUT into Features/Set_Machining 2025-03-05 11:39:27 +01:00
Nicola Pievani eb881155d9 Migliorata gestione colorazione lavorazione 2025-03-05 11:39:07 +01:00
Demetrio Cassarino 8c0d5a651d Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egalware-cadcam/interfacce/OmagCUT into Features/Set_Machining 2025-03-05 11:38:11 +01:00
Demetrio Cassarino 10655893e4 -introdotto gestione visibilità rettangolo colore lavorazione 2025-03-05 11:38:09 +01:00
Nicola Pievani ec1af67d5b Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egaltech/OmagCUT into Features/Set_Machining 2025-03-05 10:27:55 +01:00
Nicola Pievani e103aa753f Aggiorno il valore di numerazione del taglio 2025-03-05 10:27:50 +01:00
Demetrio Cassarino ecacf89e93 -gestione visibilità pulsante colore lavorazioni 2025-03-05 10:07:08 +01:00
Demetrio Cassarino 7e5b813df1 -gestione pulsante color visibilità 2025-03-05 10:01:11 +01:00
Demetrio Cassarino 108048b559 Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egalware-cadcam/interfacce/OmagCUT into Features/Set_Machining 2025-03-05 09:38:24 +01:00
Demetrio Cassarino 0086345f64 -cambio label con rettangolo per lavorazioni 2025-03-05 09:38:22 +01:00
Nicola Pievani a5cc976810 Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egaltech/OmagCUT into Features/Set_Machining 2025-03-04 17:18:17 +01:00
Nicola Pievani 5bdc4c46bc Gestione colore da lama lavorazioni 2025-03-04 17:18:00 +01:00
Demetrio Cassarino 6e8154d29a -piccola modifica a MachiningLsBx 2025-03-04 17:10:22 +01:00
Demetrio Cassarino c8614fe52d -aggiunto label colore lavorazione 2025-03-04 16:54:25 +01:00
Demetrio Cassarino f420926e3e Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egalware-cadcam/interfacce/OmagCUT into Features/Set_Machining 2025-03-04 15:52:57 +01:00
Demetrio Cassarino 794c5da9e6 -sistemata grafica grid machining 2025-03-04 15:52:54 +01:00
Nicola Pievani 9d58cec30e Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egaltech/OmagCUT into Features/Set_Machining 2025-03-04 15:47:28 +01:00
Nicola Pievani e54c5f006e Migliorate alcune funzioni 2025-03-04 15:47:07 +01:00
Demetrio Cassarino 4a0a398e9f -funzione per la visualizzazione delle lavorazioni 2025-03-04 15:30:25 +01:00
Demetrio Cassarino 778219da1e -gestione colore lavorazione tooldb 2025-03-04 12:28:05 +01:00
Demetrio Cassarino 4ac506fbf0 Merge branch 'Features/Set_Machining' of https://gitlab.steamware.net/egalware-cadcam/interfacce/OmagCUT into Features/Set_Machining 2025-03-04 11:20:50 +01:00
Demetrio Cassarino 9616e211e5 -aggiunto seleziona colore lavorazione 2025-03-04 11:20:46 +01:00
Nicola Pievani 61b16af746 Lettura colore lavorazione da SystemNotes 2025-03-04 11:19:42 +01:00
Nicola Pievani 7d010be835 Prima gestione cambio lavorazione in Splitting 2025-03-04 09:44:18 +01:00
Nicola Pievani 48e523ce26 Merge commit 'a73b45d23ec23ddf0120a92ec35d85440229ffd0' 2025-02-24 15:33:53 +01:00
Nicola Pievani a73b45d23e Nuova gestione interasse cornici 2025-02-24 15:33:09 +01:00
Nicola Pievani 8ea607611c Gestione attesa per scatto fotografia (EnableGoHome) 2025-02-17 15:01:33 +01:00
Nicola Pievani bdf0971c20 Gestione apertura/salvataggio porgetti con multiparcheggio 2025-02-17 13:10:30 +01:00
Nicola Pievani 7d77297695 Merge branch 'develop' 2025-02-13 11:10:48 +01:00
Nicola Pievani bdcdcaecf0 Gestione sfondo dinamico PopUp viste 2025-02-12 17:51:09 +01:00
Nicola Pievani 44011c5775 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/OmagCUT into develop 2025-02-12 17:39:10 +01:00
Nicola Pievani cba095188e Migliorata gestione parcheggi in fase creazione nuovo progetto 2025-02-12 17:37:54 +01:00
Demetrio Cassarino ebedccf46a Aggiunto popup viste 2025-02-12 12:33:18 +01:00
Nicola Pievani 8bd7d9e3fa Merge branch 'develop' 2025-02-06 16:14:46 +01:00
Nicola Pievani 8dfa932bd7 Gestione SQUARING con lama 2025-02-06 16:13:33 +01:00
Nicola Pievani 5422e905e7 Aggiornamento lista materiali da DB waterjet 2025-02-06 15:59:03 +01:00
Nicola Pievani da396cc82e Merge branch 'Features/Read_C_Step' into develop 2025-02-06 15:01:08 +01:00
Nicola Pievani da8e7a9e42 Aggiornamento logo 2.7 2025-02-06 15:00:57 +01:00
Nicola Pievani d8cbe1a2c6 Aggiunto comando diretto per selezione modalità Manual 2025-02-03 11:23:40 +01:00
Nicola Pievani 79c2c17d6b Gestione taglio speciali per pezzi oltre il limite corsa in Z 2025-01-31 17:37:05 +01:00
Nicola Pievani ccb8945a4f Lettura posizione asse C da variabile PLC 2025-01-22 15:07:12 +01:00
Nicola Pievani 842ab19e8b Merge commit '5cfc72be27681812199b9ba326f0b285d6d93906' into develop 2025-01-17 16:55:55 +01:00
Nicola Pievani 5cfc72be27 Gestione PNG/SVG da variabile MainWindow 2025-01-17 16:25:51 +01:00
Nicola Pievani 45d3f5c7d8 Gestione lista dei parcheggi con file SVG 2025-01-16 17:48:05 +01:00
Nicola Pievani ac67a14fea Gestione lista parcheggi come UserControl 2025-01-14 14:29:23 +01:00
Nicola Pievani 1df823cdec Gestione estesa dei pezzi in parcheggio 2025-01-10 20:46:47 +01:00
Nicola Pievani be29ea050d Gestione visualizzazione di pezzi sovrapposti 2025-01-02 19:26:45 +01:00
Nicola Pievani cd4d2b1ccb Merge branch 'master' into Features/Import_DXF_In_Parck 2025-01-02 10:17:47 +01:00
Nicola Pievani c730513f27 Configurazione finestra licenza 2024-12-30 09:02:50 +01:00
Nicola Pievani 9f3920a2b2 Nuova gestione visualizzazione layer info lavorazioni 2024-12-24 14:39:09 +01:00
Nicola Pievani f388dc0c50 Merge commit '6613b3d551b2f06a1940fcd7b1c2dd9ca6743bd5' 2024-12-23 13:28:25 +01:00
Nicola Pievani 6613b3d551 Nuovi messaggi per assistenza 2024-12-23 12:33:19 +01:00
Nicola Pievani 615d6d2652 Nuova gestione tagli parziali Saw&Waterjet 2024-12-23 11:23:53 +01:00
Nicola Pievani 3ea8335357 Gestione parcheggio per scatto foto 2024-12-16 15:40:03 +01:00
Nicola Pievani bbdac91894 Migliorata gestione tempi comunicazione NUM_old 2024-12-13 17:04:55 +01:00
Nicola Pievani c424ff6661 Migliorata gestione tempi comunicazione NUM_old 2024-12-13 17:04:37 +01:00
Nicola Pievani 4d64328b1b Merge commit '10c4c7ecc1ba0521ad4c251fce28268d7f0dd6e8' into Features/Import_DXF_In_Parck 2024-11-28 08:38:56 +01:00
Nicola Pievani 10c4c7ecc1 Reimpostato logo OmagCut 2024-11-11 11:51:07 +01:00
Nicola Pievani 03def4b530 Merge commit '4ab7811b50e72cb716abfca74c60e4f3c586d6f5' into develop 2024-11-11 11:45:00 +01:00
Nicola Pievani a3b56444f6 Correzione altezza posizionamento per Test taglio 2024-11-11 11:40:05 +01:00
Nicola Pievani 837380226a Merge commit 'f15935ecbc2c3b1994f8684ea5511d32382fefde' into develop 2024-11-04 15:12:09 +01:00
Dario Sassi f15935ecbc OmagCUT 2.6k1 :
- piccola modifica di testa per tagli di separazione lastra prolungabili da un solo lato.
2024-11-04 08:38:45 +01:00
Nicola Pievani 00360013e3 Merge commit '9c267aacf77c6517f98ba584c5d945bae21bc656' into develop 2024-10-30 11:25:34 +01:00
Nicola Pievani 0010deb7fc Inizio gestione disoposizione DXF in parcheggio 2024-10-29 15:23:57 +01:00
Demetrio Cassarino 9c267aacf7 -modifica grafica treeview cvs 2024-10-29 11:57:05 +01:00
Nicola Pievani 311cf40a8e Allungo lato libero di tagli ridotti 2024-10-29 11:52:44 +01:00
Nicola Pievani 4c34b62e65 Inserito comando Righello nella pagina VeinMatch 2024-10-29 09:54:01 +01:00
Nicola Pievani 87037b6c6a Migliorata gestione selezione OnOff da lista lavorazioni 2024-10-28 12:09:15 +01:00
Nicola Pievani 74c479d17d Gestione attivazione comando modifica 2024-10-28 11:23:53 +01:00
Nicola Pievani ee6c0ad146 Merge branch 'develop' 2024-10-09 16:34:24 +02:00
Nicola Pievani ead6bcec6d Gestione deselezione tagli in pagina split 2024-10-09 16:33:45 +02:00
Nicola Pievani a1ad658f27 Correzione DoubleClick OnOff scena 2024-10-09 15:54:47 +02:00
Nicola Pievani 4ab7811b50 Correzione DoubleClick OnOff scena 2024-10-08 18:28:48 +02:00
Nicola Pievani 1899c9a735 Merge branch 'develop' into Features/Dimostration_Program 2024-09-27 10:54:06 +02:00
Nicola Pievani 3f769c49da Correzione visualizzazione pezzi in parcheggio dopo reset in VeinMatch3D 2024-09-25 12:25:34 +02:00
Nicola Pievani da4ddb2a7f Inserito valore default in configurazione parametri booleani SiemensOne 2024-09-12 16:47:36 +02:00
Nicola Pievani 3667ecb3b7 KeyDown Cancel per rimozione pezzi in RawMove 2024-09-05 19:33:04 +02:00
Nicola Pievani 206af48539 Correzione corse asse Z laser 2024-09-05 11:35:48 +02:00
Nicola Pievani 253e92b111 Aggiorno disegno della fase corrente nella pagina Vacuum 2024-09-04 16:12:12 +02:00
Nicola Pievani 123d6118e9 Correzione gestion uscita in caso di errore 2024-08-21 16:11:33 +02:00
Nicola Pievani a2104eaa03 Nuovi messaggi e CMD.TABLE in lua script 2024-08-19 10:21:01 +02:00
Nicola Pievani 65b9bfdcdb Migliorati messaggi comunicazione CN 2024-08-06 15:48:49 +02:00
Nicola Pievani 004591896c Messaggio di Kill Process per SiemensComm 2024-08-01 10:57:59 +02:00
Nicola Pievani 02af01052b Gestione invio programmi doppia tavola 2024-07-31 18:31:32 +02:00
Nicola Pievani 2bc386807f Merge branch 'master' into develop 2024-07-31 10:25:02 +02:00
Nicola Pievani 82af1baae3 Merge branch 'develop' 2024-07-31 10:24:33 +02:00
Nicola Pievani 68b4dfed80 Correzzione numero di versione 2.6g7 2024-07-31 10:24:20 +02:00
Nicola Pievani ffc7536177 Merge branch 'master' into develop 2024-07-31 10:08:29 +02:00
Nicola Pievani 70368b73be Aggiornamento versione 2.6h1 2024-07-31 10:08:05 +02:00
Nicola Pievani 05b4e2e95a Merge branch 'develop' 2024-07-30 14:31:20 +02:00
Nicola Pievani 1d7cdf8fa0 Merge branch 'Features/Manage_SimensOne' into develop 2024-07-30 14:31:09 +02:00
Nicola Pievani 5190a41470 Lettura degli interi Bit a Bit 2024-07-30 14:30:53 +02:00
Nicola Pievani 3afe6bb35b Migliorata stampa dei messaggi OutLog comunicazione 2024-07-29 13:54:57 +02:00
Nicola Pievani c546df45ca Aggiornamento versione 2.6g6 (nuove DLL) 2024-07-29 11:11:42 +02:00
Nicola Pievani 554ae16e48 Merge branch 'develop' into Features/Manage_SimensOne 2024-07-26 18:35:54 +02:00
Nicola Pievani 1b4d239202 OnOff lavorazioni elezione lavorazioni con DoppioClick 2024-07-26 14:30:35 +02:00
Nicola Pievani 3b2d15703a Lettura bit a bit Siemens 2024-07-25 15:20:47 +02:00
Nicola Pievani 8e5a4d4ac5 Merge branch 'develop' into Features/Manage_SimensOne 2024-07-24 08:51:27 +02:00
Nicola Pievani ef621a340a Merge branch 'develop' 2024-07-17 13:03:04 +02:00
Nicola Pievani f2ce55ff27 Nuova versione programma ver 2.6g1 2024-07-17 13:01:48 +02:00
Nicola Pievani ae3b16b715 Merge branch 'Features/Imports_Engrave_Btn' into develop 2024-07-17 12:32:39 +02:00
Nicola Pievani 8ff4b74725 Nuovo parametro MachDb Waterjet (Full Slow) 2024-07-17 12:32:25 +02:00
Nicola Pievani 18fb37b497 Inserito comando per gestione Engrave nella pagina IMPORT 2024-06-26 12:30:04 +02:00
Nicola Pievani 246e55f733 Gestione comandi di taglio in SplitPage per tagli piccoli 2024-06-24 16:10:33 +02:00
Nicola Pievani e7e1946230 Cambio versione 2.6f3 2024-06-18 18:06:24 +02:00
Nicola Pievani 8dc6b63801 Merge branch 'develop' 2024-06-18 18:05:23 +02:00
Nicola Pievani 9b29b16a33 Merge branch 'Features/ZigZan_In_XY_Plane' into develop 2024-06-18 18:05:01 +02:00
Nicola Pievani 1debeab653 Gestione spianatura con fresa e lama 2024-06-18 18:04:44 +02:00
Nicola Pievani 63c3a4e085 Inizio spianatura a ZigZag in XY 2024-06-13 18:32:09 +02:00
Nicola Pievani 7830105bc4 Merge branch 'Features/Raw_From_Diagonal' into develop 2024-06-13 16:20:09 +02:00
Nicola Pievani 8a11051575 Gestione grezzo definito con due punti 2024-06-13 16:18:10 +02:00
Nicola Pievani 0b50832b4e Correzione gestione StepType in spianatura 2024-06-13 10:09:29 +02:00
Nicola Pievani 7f548e5ba6 Merge branch 'develop' 2024-06-11 17:35:07 +02:00
Nicola Pievani 40bdcec46e Miglioramenti genarali programma 2024-06-11 17:34:13 +02:00
Nicola Pievani 2cf1be7348 Aggiornate info copyright 2024-06-03 18:08:15 +02:00
Nicola Pievani bb932788f9 Aggiornamento versione 2.6f1 2024-06-03 13:11:25 +02:00
Nicola Pievani 4c0da9af53 Merge branch 'develop' 2024-06-03 13:00:43 +02:00
Nicola Pievani 9eaca47566 Merge branch 'Features/Select_Test_Work_Tool' into develop 2024-06-03 12:45:45 +02:00
Nicola Pievani 7c53ecceb4 Correzione lettura punto da laser/lama SingleCut 2024-06-03 12:44:47 +02:00
Nicola Pievani 9a6f6ad37e Migliorata grafica per utensile/lavorazione corrente 2024-05-16 15:17:14 +02:00
Nicola Pievani 8174c6137a Visualizzazione aggiornata utesnile selezionato 2024-05-16 12:52:11 +02:00
Nicola Pievani b84699e3c1 Selezione utensile eseguire posizionamento di test 2024-05-15 17:23:07 +02:00
Nicola Pievani 5101c1cca9 Migliorata comunizione Fanuc per AxisMove 2024-05-10 17:22:42 +02:00
Nicola Pievani 3ad3694454 Migliorata gestione lettura chiave di protezione 2024-05-09 15:41:28 +02:00
Nicola Pievani 9d9e184efa Modifiche per lettura variabili Sinumerik 2024-05-09 14:43:43 +02:00
Nicola Pievani cf3f756683 Inizio nuova gestione controllo Sinumerik 2024-05-07 16:15:14 +02:00
Nicola Pievani 72544190cc Inserito logo Egalware nelle risosre 2024-04-23 10:07:03 +02:00
Nicola Pievani 2ce454ad0a Merge commit '5a3ad4356f966042e7a5de83531dc52ab1e18135' 2024-04-12 16:04:48 +02:00
Nicola Pievani 5a3ad4356f Correzione lettura data progetti 2024-04-12 16:04:19 +02:00
Nicola Pievani ba4414c9f6 Migliorata gestione tagli diretti da posizione Lama 2024-04-02 15:48:37 +02:00
Nicola Pievani aa29e4106d Cambio versione 2.6d1 2024-04-02 14:08:19 +02:00
Nicola Pievani 76eb17868c Gestione 3 assi rotanti nei tagli diretti 2024-04-02 10:01:58 +02:00
Nicola Pievani 829b58a0e5 Gestione fotocamera HQ per macchine MultiCut 2024-04-02 09:23:59 +02:00
Nicola Pievani 79847e3cce Migliorata gestione REG 2024-03-28 17:38:57 +01:00
Nicola Pievani 59be071d12 Merge Manuale! 2024-03-28 17:13:38 +01:00
Nicola Pievani d9150c75f4 Merge commit 'e12a310010d820b98d9c610696393b0cea72477a' into develop 2024-03-28 17:08:54 +01:00
Nicola Pievani 00088315cd Inseriti commenti in MMFile 2024-03-28 17:06:47 +01:00
Dario Sassi e12a310010 OmagCUT :
- modifica a taglio singolo per acquisizione punto da macchina tipo MultiCut.
2024-03-27 16:44:43 +01:00
Nicola Pievani 449fe3ad57 Taglio diretto macchina con tavola rotante 2024-03-25 11:29:23 +01:00
Nicola Pievani e8d8637832 Gestione avvio finestra VeinMatch 2024-03-13 17:52:51 +01:00
Nicola Pievani 6671f2269e Nuova gestione verifica interferenze MoveRaw 2024-03-13 13:31:46 +01:00
Nicola Pievani 26ef6b2d3b Migliorata gestione SiemensCommand 2024-03-13 11:26:33 +01:00
Nicola Pievani b5e9686da2 Merge commit 'f57410dffbe15412a836ca2e69677386dc887aff' into develop 2024-03-12 12:20:14 +01:00
Nicola Pievani f57410dffb Correzione gestione chiave Omag_LIGHT 2024-03-12 12:19:53 +01:00
Nicola Pievani 346c452546 Merge commit '2eff34e8b63ed82995a0aeb88bb86f88da218f93' 2024-03-04 09:41:27 +01:00
Nicola Pievani 2eff34e8b6 Correzione gestione uscita pagina DrawPage 2024-03-04 09:41:06 +01:00
Nicola Pievani 7c3a107c31 Merge commit 'e119e9673af709d2122dad70a6838a7d1f05dd94' 2024-03-01 13:01:18 +01:00
Nicola Pievani e119e9673a Aggiornamento versione e logo 2024-03-01 13:01:01 +01:00
Nicola Pievani 2407d3a0ae Merge commit 'fd32ba3ea1abfbb6c7518448ce3aa0d91b5a9ccc' 2024-02-23 16:37:30 +01:00
Nicola Pievani fd32ba3ea1 Gestione risoluzione immagini VeinMatch 2024-02-23 14:57:21 +01:00
Nicola Pievani 9045469c0d Merge commit '10972a466df3452dcb100da879c9214262a5dd44' 2024-02-20 17:21:27 +01:00
Nicola Pievani 10972a466d Correzione gestione visualizzazione Tool Probe 2024-02-20 17:21:11 +01:00
Nicola Pievani 529fb6d3a6 Inserito Logo Egalware nel programma 2023-10-10 11:26:03 +02:00
214 changed files with 20411 additions and 12430 deletions
+18 -18
View File
@@ -1,9 +1,9 @@
<Window x:Class="AboutBoxWD"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
FontFamily="{DynamicResource OmagCut_Font}"
Title="AboutBoxWD" Height="469.15" Width="511.8" WindowStyle="None" ResizeMode="NoResize"
AllowsTransparency="True" Background="Transparent" ShowInTaskbar="False">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
FontFamily="{DynamicResource OmagCut_Font}"
Title="AboutBoxWD" Height="469.15" Width="511.8" WindowStyle="None" ResizeMode="NoResize"
AllowsTransparency="True" Background="Transparent" ShowInTaskbar="False">
<!-- Definizione dell'AboutBox -->
<Border Style="{DynamicResource OmagCut_WindowBorder}">
@@ -23,8 +23,8 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
</Grid.RowDefinitions>
@@ -36,27 +36,27 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1">
<Image Source="../Resources/AboutBoxImage.png" Stretch="Uniform"/>
<Image Source="../Resources/NewIcons/Logo-Egalware.png" Stretch="Uniform"/>
</Border>
</Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" />
VerticalAlignment="Center" FontSize="18" />
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="AssStatusLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="AssStatusLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="9" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="15" />
VerticalAlignment="Center" FontSize="15" />
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="11" IsCancel="True"
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
</Grid>
+1 -1
View File
@@ -49,7 +49,7 @@ Public Class AboutBoxWD
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
ExitBtn.Content = EgtMsg(10104) 'Ok
End Sub
End Class
+308 -63
View File
@@ -1,5 +1,4 @@
Imports System.Windows.Forms.Integration
Imports EgtUILib
Imports EgtUILib
Friend Module CamAuto
@@ -22,11 +21,51 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91017))
End If
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
Return bOk
End Function
Friend Function UpdateSawing(nOperId As Integer, ByRef nNewOperation As Integer) As Boolean
EgtLuaCreateGlobTable("CAM")
SetLuaStandardCamParams()
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
Dim nErr As Integer = 999
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateSawing")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaGetGlobIntVar("CAM.NEW_OPERATION", nNewOperation)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
End If
Return bOk
End Function
Friend Function ChangePvColor(nOperId As Integer, colCut As Color3d)
EgtLuaCreateGlobTable("CAM")
SetLuaStandardCamParams()
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
Dim nErr As Integer = 999
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
bOk = bOk AndAlso EgtLuaExecLine("CAM.ChangePvColor( " & nOperId.ToString & ",Color3d(" & colCut.R.ToString & "," & colCut.G.ToString & "," & colCut.B.ToString & "))")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
End If
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
Return bOk
End Function
@@ -40,9 +79,33 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
Friend Function AddWaterJetMachining(LocaList As List(Of Integer), ByRef nWarn As Integer) As Boolean
EgtLuaCreateGlobTable("CAM")
SetLuaStandardCamParams()
For i As Integer = 0 To LocaList.Count - 1
EgtLuaSetGlobIntVar("CAM.TAB_OPERID." & (i + 1).ToString, LocaList(i))
Next
Dim nErr As Integer = 999
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJets")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -56,9 +119,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
@@ -74,9 +139,29 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
Friend Function InvertWaterjet(nOperId As Integer) As Boolean
EgtLuaCreateGlobTable("CAM")
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
Dim nErr As Integer = 999
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertWaterjet")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -86,6 +171,7 @@ Friend Module CamAuto
Return ResetAllMachinings(nWarn)
End Function
' Ricalcola tutte le lavorazioni
Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean
' Cancello tutte le lavorazioni
EraseMachinings(GDB_ID.NULL)
@@ -94,7 +180,7 @@ Friend Module CamAuto
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
' Reinserisco tutte le lavorazioni piane
AddMachinings(GDB_ID.NULL, nWarn)
' Se altrimenti progetto con cornici
' Se altrimenti progetto con cornici
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
' Reinserisco tutte le lavorazioni delle cornici
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
@@ -102,12 +188,74 @@ Friend Module CamAuto
Return True
End Function
' Elimina da ogni entità il nome della lavorazione asseganta
Friend Function RestoreDef_Machinig(Optional bOnlySideAng As Boolean = True)
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
Dim bApplySawingTilted As Boolean = m_MainWindow.m_CurrentMachine.bApplySawingTilted
' Controllo le geometrie dei pezzi in parcheggio
Dim nIdPart As Integer = EgtGetFirstPart()
While nIdPart <> GDB_ID.NULL
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
RestoreDefaultTiltedSawing(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
nIdPart = EgtGetNextPart(nIdPart)
End While
' Controllo le geometrie dei pezzi inseriti nei grezzi
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
nIdPart = EgtGetFirstPartInRawPart(nRawId)
While nIdPart <> GDB_ID.NULL
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
RestoreDefaultTiltedSawing(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
nIdLayerOutLoop = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP & ".orig")
If nIdLayerOutLoop <> GDB_ID.NULL Then
nEntId = EgtGetFirstInGroup(nIdLayerOutLoop)
RestoreDefaultTiltedSawing(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
End If
nIdPart = EgtGetNextPartInRawPart(nIdPart)
End While
Return True
End Function
' ripristina la lavorazone indicata di default per i tagli inclinati
Private Sub RestoreDefaultTiltedSawing(nEntId As Integer, sSawingTilted As String, bApply As Boolean, bOnlySideAng As Boolean)
While nEntId <> GDB_ID.NULL
Dim dOrigSideAng As Double = 0
EgtGetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, dOrigSideAng)
' Se è un'entità con lavorazione inclinata
If Math.Abs( dOrigSideAng) > EPS_ANG_SMALL Then
' Se richiesta applicazione
If bApply Then
' Se non definita lavorazione specifica applico qualla standard
If String.IsNullOrEmpty(sSawingTilted) Then
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
' altrimenti applico quella specifica
Else
EgtSetInfo(nEntId, DEF_MACHINING_TILTED, sSawingTilted)
End If
' altrimenti rimuovo la lavorazione specifica (verrà poi applicata quella standard)
Else
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
End If
' altrimenti se richiesta modifica anche delle altre
ElseIf Not bOnlySideAng Then
Dim sInfo As String = String.Empty
EgtGetInfo(nEntId, DEF_MACHINING, sInfo)
' se esiste una lavorazione specificata allora la rimuovo
If Not String.IsNullOrEmpty(sInfo) Then
EgtRemoveInfo(nEntId, DEF_MACHINING)
End If
End If
nEntId = EgtGetNext(nEntId)
End While
End Sub
Friend Function ResetAllSplitCurv() As Boolean
Dim bOk As Boolean = True
Dim nIdPart As Integer = EgtGetFirstPart()
While nIdPart <> GDB_ID.NULL
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, LAY_AUX_SPLIT_WJ)
EgtErase(IdAuxLayer)
' accedo al Layer OutLoop
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
@@ -122,7 +270,7 @@ Friend Module CamAuto
nIdPart = EgtGetFirstPartInRawPart(nRawId)
While nIdPart <> GDB_ID.NULL
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, LAY_AUX_SPLIT_WJ)
EgtErase(IdAuxLayer)
' accedo al Layer OutLoop
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
@@ -156,12 +304,9 @@ Friend Module CamAuto
Return bOk
End Function
Friend Function ResetAllBRidges() As Boolean
Dim bOk As Boolean = True
Dim nMachGroup As Integer = EgtGetCurrMachGroup()
Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges")
bOk = EgtErase(nBridgesGroup)
Return bOk
Friend Function ResetAllBridges() As Boolean
Dim nBridgesGroupId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Bridges")
Return EgtErase(nBridgesGroupId)
End Function
Friend Function ResetAllSplitCut() As Boolean
@@ -180,7 +325,7 @@ Friend Module CamAuto
Dim nNextParId As Integer = EgtGetNextPartInRawPart(nParId)
' verifico se il pezzo passato è un taglio di sepatazione (il nome deve contenere "SpliCut")
Dim sName As String = String.Empty
If EgtGetName(nParId, sName) AndAlso sName.Contains(SPLIT_CUT) Then
If EgtGetName(nParId, sName) AndAlso sName.Contains(NAME_SPLIT_CUT) Then
' Rimuovo il pezzo dal grezzo
If EgtRemovePartFromRawPart(nParId) Then
' Salvo l'indice del pezzo se non è stato già inserito
@@ -271,9 +416,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -287,9 +434,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
Return bOk
End Function
@@ -304,9 +453,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp")
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then
If nErr > 0 Then
bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If
If ResetOrderMachiningFlag Then
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
@@ -322,7 +473,7 @@ Friend Module CamAuto
EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_UNDERDRILL)) = 0 Then
Return True
End If
' Se tutti i pezzi
' Se tutti i pezzi
Else
' Salvo fase attualmente corrente
Dim nOriPhase As Integer = EgtGetCurrPhase()
@@ -449,28 +600,32 @@ Friend Module CamAuto
Return EgtRemoveOperationHome(nId)
End Function
' Verifico che per tutte le lavorazioni sia attrezzato l'utensile
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
Dim bOk As Boolean = True
Dim CurrMachine As CurrentMachine = m_MainWindow.m_CurrentMachine
sMissingTools = ""
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
sMissingTools = String.Empty
Dim nId As Integer = EgtGetFirstOperation()
While nId <> GDB_ID.NULL
If IsValidMachining(nId) Then
Dim nType As Integer = MCH_OY.NONE
EgtGetMachiningParam(MCH_MP.TYPE, nType)
Dim sTuuid As String = String.Empty
Dim sTool As String = String.Empty
Dim sTool2 As String = String.Empty
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
Dim sTool As String = String.Empty
EgtTdbGetToolFromUUID(sTuuid, sTool)
If String.IsNullOrWhiteSpace( sTool) Then
Dim nToolType As Integer = MCH_TY.NONE
if EgtTdbSetCurrTool( sTool) Then EgtTdbGetCurrToolParam( MCH_TP.TYPE, nToolType)
If String.IsNullOrWhiteSpace(sTool) Then
Dim sMchTool As String = ""
EgtGetMachiningParam( MCH_MP.TOOL, sMchTool)
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
bOk = False
If sMissingTools.IndexOf(sMchTool) = -1 Then
sMissingTools = sMissingTools & sMchTool & ", "
End If
ElseIf nType = MCH_OY.SAWING Or nType = MCH_OY.SAWROUGHING Or nType = MCH_OY.SAWFINISHING Then
Dim sTool2 As String = String.Empty
If bIsMultiCut Then
' L'utensile sulla seconda testa ha lo stesso nome di quello sulla prima con suffisso "-2"
If sTool.Substring(sTool.Length() - 2) = "-2" Then
@@ -478,17 +633,25 @@ Friend Module CamAuto
End If
sTool2 = sTool & "-2"
End If
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 AndAlso
( String.IsNullOrWhiteSpace( sTool2) OrElse String.Compare(sTool2, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0) AndAlso
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripSaw) <> 0 Then
If CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
Dim bOnTC As Boolean = FindToolOnChanger( sTool)
If Not bOnTC Then
bOk = False
If sMissingTools.IndexOf(sTool) = -1 Then
sMissingTools = sMissingTools & sTool & ", "
End If
End If
ElseIf String.Compare(sTool, CurrMachine.sCurrSaw) <> 0 AndAlso
(String.IsNullOrWhiteSpace(sTool2) OrElse String.Compare(sTool2, CurrMachine.sCurrSaw) <> 0) AndAlso
String.Compare(sTool, CurrMachine.sCurrDripSaw) <> 0 Then
bOk = False
If sMissingTools.IndexOf(sTool) = -1 Then
sMissingTools = sMissingTools & sTool & ", "
End If
End If
ElseIf nType = MCH_OY.DRILLING Then
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDrill) <> 0 And
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripDrill) <> 0 And
If String.Compare(sTool, CurrMachine.sCurrDrill) <> 0 And
String.Compare(sTool, CurrMachine.sCurrDripDrill) <> 0 And
Not FindToolOnChanger(sTool) Then
bOk = False
If sMissingTools.IndexOf(sTool) = -1 Then
@@ -496,17 +659,56 @@ Friend Module CamAuto
End If
End If
ElseIf nType = MCH_OY.MILLING Then
' Verifico anche le lame perchè il taglio di lama singolo sulle cornici è una lavorazione di fresatura
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrMill) <> 0 And
Not FindToolOnChanger(sTool) And
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 Then
' Se lucidatura e frese manuali, non deve essere attrezzato l'utensile ausiliario
If nToolType = MCH_TY.MILL_POLISHING AndAlso
( CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Or
CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER) Then
If Not String.IsNullOrWhiteSpace(CurrMachine.sCurrDrill) OrElse
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMill) OrElse
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMillNoTip) Then
bOk = False
If sMissingTools.IndexOf(sTool) = -1 Then
sMissingTools = sMissingTools & sTool & ", "
EgtOutLog("-->Remove Auxiliary Tool (Polishing needs None)")
End If
End If
' Verifico sia la fresa corrente, oppure sia attrezzato oppure la lama corrente
' Accetto comunque le mole per lucidatura (al momento non vengono attrezzate)
ElseIf String.Compare(sTool, CurrMachine.sCurrMill) <> 0 AndAlso
Not FindToolOnChanger(sTool) AndAlso
String.Compare(sTool, CurrMachine.sCurrSaw) <> 0 AndAlso
nToolType <> MCH_TY.MILL_POLISHING Then
bOk = False
If sMissingTools.IndexOf(sTool) = -1 Then
sMissingTools = sMissingTools & sTool & ", "
End If
End If
ElseIf nType = MCH_OY.POCKETING Then
' Se lucidatura e frese manuali, non deve essere attrezzato l'utensile ausiliario
If nToolType = MCH_TY.MILL_POLISHING AndAlso
( CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Or
CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER) Then
If Not String.IsNullOrWhiteSpace(CurrMachine.sCurrDrill) OrElse
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMill) OrElse
Not String.IsNullOrWhiteSpace(CurrMachine.sCurrMillNoTip) Then
bOk = False
If sMissingTools.IndexOf(sTool) = -1 Then
sMissingTools = sMissingTools & sTool & ", "
EgtOutLog("-->Remove Auxiliary Tool (Polishing needs None)")
End If
End If
' Verifico sia la mola da scasso corrente, oppure sia attrezzato
' Accetto comunque le mole per lucidatura (al momento non vengono attrezzate)
ElseIf String.Compare(sTool, CurrMachine.sCurrMillNoTip) <> 0 AndAlso
Not FindToolOnChanger(sTool) AndAlso
nToolType <> MCH_TY.MILL_POLISHING Then
bOk = False
If sMissingTools.IndexOf(sTool) = -1 Then
sMissingTools = sMissingTools & sTool & ", "
End If
End If
ElseIf nType = MCH_OY.WATERJETTING Then
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrWaterJet) <> 0 And
If String.Compare(sTool, CurrMachine.sCurrWaterJet) <> 0 And
Not FindToolOnChanger(sTool) Then
bOk = False
If sMissingTools.IndexOf(sTool) = -1 Then
@@ -517,6 +719,8 @@ Friend Module CamAuto
End If
nId = EgtGetNextOperation(nId)
End While
Dim index As Integer = sMissingTools.LastIndexOf(","c)
sMissingTools = If(index >= 0, sMissingTools.Remove(index, 1), sMissingTools)
Return bOk
End Function
@@ -537,15 +741,44 @@ Friend Module CamAuto
Return False
End Function
Friend Function CanChangeSaw() As Boolean
' Se non è TC anche per lama, non è possibile
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
Return False
End If
' Se è nei TC manuali con posizione T0, non è possibile
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
If m_MainWindow.m_CurrentMachine.sCurrSaw = ToolPosition.sTool And ToolPosition.sName = "T0" Then
Return False
End If
Next
' Si può cambiare
Return True
End Function
Friend Function CanChangeTool() As Boolean
' Se solo lama, non è possibile
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAW Then
Return False
End If
' Se non è TC anche per lama, sempre possibile
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
Return True
End If
' Altrimenti possibile solo se si può cambiare lama
Return CanChangeSaw()
End Function
Friend Function TestAllMachiningsForStrict() As Boolean
Dim bModified As Boolean = False
' Affondamento ridotto
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
' Ciclo sulle lavorazioni
Dim nOperId As Integer = EgtGetFirstOperation()
Dim LocalListOperId As New List(Of Integer)
While nOperId <> GDB_ID.NULL
' verifico sia una lavorazione valida di taglio con lama
If IsValidMachining( nOperId) And EgtGetOperationType( nOperId) = MCH_OY.SAWING Then
If IsValidMachining(nOperId) And EgtGetOperationType(nOperId) = MCH_OY.SAWING Then
' verifica interferenza
Dim nFlag As Integer = FMI_TYPE.NONE
If Not VerifyComposedMachining(nOperId, nFlag) Then
@@ -557,12 +790,14 @@ Friend Module CamAuto
' se abilitato e attivo waterjet, lo aggiungo per completare il taglio
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
Dim nWarn As Integer = 0
AddWaterJetMachining(nOperId, nWarn)
LocalListOperId.Add(nOperId)
'AddWaterJetMachining(nOperId, nWarn)
End If
End If
End If
nOperId = EgtGetNextOperation(nOperId)
End While
If LocalListOperId.Count > 0 Then AddWaterJetMachining(LocalListOperId, 0)
Return bModified
End Function
@@ -666,8 +901,8 @@ Friend Module CamAuto
If nOriLeadIn <> MCH_SAW_LI.STRICT Then
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.STRICT)
Dim dUserAddLen As Double = 0
EgtGetInfo( nMchId, INFO_MCH_USER_SAL, dUserAddLen)
EgtRemoveInfo( nMchId, INFO_MCH_USER_SAL)
EgtGetInfo(nMchId, INFO_MCH_USER_SAL, dUserAddLen)
EgtRemoveInfo(nMchId, INFO_MCH_USER_SAL)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen - dUserAddLen - dSafeLen)
@@ -686,8 +921,8 @@ Friend Module CamAuto
If nOriLeadOut <> MCH_SAW_LO.STRICT Then
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.STRICT)
Dim dUserAddLen As Double = 0
EgtGetInfo( nMchId, INFO_MCH_USER_EAL, dUserAddLen)
EgtRemoveInfo( nMchId, INFO_MCH_USER_EAL)
EgtGetInfo(nMchId, INFO_MCH_USER_EAL, dUserAddLen)
EgtRemoveInfo(nMchId, INFO_MCH_USER_EAL)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen - dUserAddLen - dSafeLen)
@@ -844,9 +1079,9 @@ Friend Module CamAuto
Friend Function RemoveAllExitPreCuts() As Boolean
Dim nOperId As Integer = EgtGetFirstOperation()
While nOperId <> GDB_ID.NULL
Dim nNextOperId As Integer = EgtGetNextOperation( nOperId)
If EgtGetType( nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
EgtRemoveOperation( nOperId)
Dim nNextOperId As Integer = EgtGetNextOperation(nOperId)
If EgtGetType(nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
EgtRemoveOperation(nOperId)
End If
nOperId = nNextOperId
End While
@@ -856,6 +1091,7 @@ Friend Module CamAuto
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
Dim sSawTiltedMch As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
@@ -872,8 +1108,11 @@ Friend Module CamAuto
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
Dim bWaterjetOptimize As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_WATERJET_OPTIMIZE, 0, m_MainWindow.GetMachIniFile()) <> 0)
Dim bWaterjetOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_WATERJET_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
EgtLuaSetGlobStringVar("CAM.SAWTILTEDMCH", sSawTiltedMch)
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
@@ -890,6 +1129,8 @@ Friend Module CamAuto
EgtLuaSetGlobBoolVar("CAM.MILLINGONCORNERS", bMillingOnCorners)
EgtLuaSetGlobBoolVar("CAM.MILLINGONSINKS", bMillingOnSinks)
EgtLuaSetGlobNumVar("CAM.MILLINGSHORT", dMillingShort)
EgtLuaSetGlobBoolVar("CAM.WATERJETOPTIMIZE", bWaterjetOptimize)
EgtLuaSetGlobBoolVar("CAM.WATERJETONSINKS", bWaterjetOnSinks)
EgtLuaSetGlobNumVar("CAM.RAWHEIGHT", GetRawHeight())
EgtLuaSetGlobNumVar("CAM.REGROT", GetRegistrationRotation())
Return True
@@ -899,20 +1140,24 @@ Friend Module CamAuto
If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0
If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1
If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2
Return 3
If EgtGetTableId(FORTH_TAB) = GDB_ID.NULL Then Return 3
Return 4
End Function
Friend Function GetTableName(nInd As Integer) As String
If nInd = 1 Then Return MAIN_TAB
If nInd = 2 Then Return SECOND_TAB
If nInd = 3 Then Return THIRD_TAB
If nInd = 4 Then Return FORTH_TAB
Return ""
End Function
Friend Function GetCurrentTable() As Integer
Dim sTabName As String = MAIN_TAB
EgtGetTableName(sTabName)
If sTabName = THIRD_TAB Then
If sTabName = FORTH_TAB Then
Return 4
ElseIf sTabName = THIRD_TAB Then
Return 3
ElseIf sTabName = SECOND_TAB Then
Return 2
@@ -1033,13 +1278,13 @@ Friend Module CamAuto
Dim nRawId As Integer = GetCurrentRaw()
If nRawId = GDB_ID.NULL Then Return False
' Se non ci sono pezzi, esco
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
If nPart1Id = GDB_ID.NULL Then Return True
' Verifico se cornice curva
Dim nDir As Integer = 0
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
Dim bSwap As Boolean = ( nDir = 0)
Dim bCurved As Boolean = ( nDir >= 2)
Dim bSwap As Boolean = (nDir = 0)
Dim bCurved As Boolean = (nDir >= 2)
' Recupero la lavorazione corrente di sgrossatura con lama
Dim sCurrSawRoughing = m_MainWindow.m_CurrentMachine.sCurrSawRoughing
If String.IsNullOrEmpty(sCurrSawRoughing) Then Return True
@@ -1066,8 +1311,8 @@ Friend Module CamAuto
' Imposto la geometria
EgtSetMachiningGeometry(vId)
' Imposto trim iniziale e finale
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
' Se cornice curva, imposto SCC
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
' Applico la lavorazione
@@ -1082,13 +1327,13 @@ Friend Module CamAuto
Dim nRawId As Integer = GetCurrentRaw()
If nRawId = GDB_ID.NULL Then Return False
' Se non ci sono pezzi, esco
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
If nPart1Id = GDB_ID.NULL Then Return True
' Verifico se cornice curva
Dim nDir As Integer = 0
EgtGetInfo( nPart1Id, INFO_FRAME_DIR, nDir)
Dim bSwap As Boolean = ( nDir = 0)
Dim bCurved As Boolean = ( nDir >= 2)
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
Dim bSwap As Boolean = (nDir = 0)
Dim bCurved As Boolean = (nDir >= 2)
' Recupero la lavorazione corrente di finitura con lama
Dim sCurrSawFinishing = m_MainWindow.m_CurrentMachine.sCurrSawFinishing
If String.IsNullOrEmpty(sCurrSawFinishing) Then Return True
@@ -1125,8 +1370,8 @@ Friend Module CamAuto
' Imposto la geometria
EgtSetMachiningGeometry(vId)
' Imposto trim iniziale e finale
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
' Se cornice curva, imposto SCC
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
' Applico la lavorazione
@@ -1141,13 +1386,13 @@ Friend Module CamAuto
Dim nRawId As Integer = GetCurrentRaw()
If nRawId = GDB_ID.NULL Then Return False
' Se non ci sono pezzi, esco
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
If nPart1Id = GDB_ID.NULL Then Return True
' Verifico se cornice curva
Dim nDir As Integer = 0
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
Dim bSwap As Boolean = ( nDir = 0)
Dim bCurved As Boolean = ( nDir >= 2)
Dim bSwap As Boolean = (nDir = 0)
Dim bCurved As Boolean = (nDir >= 2)
' Recupero la lavorazione corrente di spatolatura con lama
Dim sCurrSawSideFinishing = m_MainWindow.m_CurrentMachine.sCurrSawSideFinishing
If String.IsNullOrEmpty(sCurrSawSideFinishing) Then Return True
@@ -1168,8 +1413,8 @@ Friend Module CamAuto
' Imposto la geometria
EgtSetMachiningGeometry(vId)
' Imposto trim iniziale e finale
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
' Se cornice curva, imposto SCC
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
' Applico la lavorazione
@@ -1378,7 +1623,7 @@ Friend Module CamAuto
EgtSetMachiningParam(MCH_MP.STEPTYPE, If(nStepType = MCH_SAW_ST.ONEWAY, MCH_MIL_ST.ONEWAY, MCH_MIL_ST.ZIGZAG))
If dStep >= EPS_SMALL And dStep < dElev Then
EgtSetMachiningParam(MCH_MP.STEP_, dStep)
EgtSetMachiningParam(MCH_MP.USERNOTES, "SideElev=" & dElev.ToString() & ";")
EgtSetMachiningParam(MCH_MP.USERNOTES, "SideElev=" & DoubleToString( dElev, 1) & ";")
End If
' Recupero la distanza di sicurezza
Dim dSafeZ As Double = m_MainWindow.m_CurrentMachine.dSafeZ()
+31 -24
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="CSVPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:self="clr-namespace:OmagCUT.TreeViewItem"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:self="clr-namespace:OmagCUT.TreeViewItem"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280">
<!-- Definizione della SplitPage -->
<Grid Name="SplitPageGrid" >
@@ -27,7 +27,7 @@
</Grid.ColumnDefinitions>
<!--Griglia per oscurare i bottoni della pagina sottostante-->
<Grid Background="{DynamicResource OmagCut_Gray}">
<Grid Background="{DynamicResource OmagCut_Gray}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
@@ -49,7 +49,7 @@
<Label Name="CsvPathTxBl" Grid.Row="1" Background="White" FontSize="16" VerticalAlignment="Center" Padding="2,5,0,5"/>
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{StaticResource OmagCut_TreeViewGradientGray}">
<TreeView.Resources>
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
<!--renderlo apribile con un solo click -->
@@ -62,7 +62,7 @@
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" Foreground="Black" />
</Grid>
@@ -123,7 +123,10 @@
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding bIsActive}" Value="False">
<Setter Property="Foreground" Value="{StaticResource OmagCut_LightGray}"/>
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
</DataTrigger>
<DataTrigger Binding="{Binding bIsActive}" Value="True">
<Setter Property="Foreground" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
@@ -131,18 +134,25 @@
</HierarchicalDataTemplate>
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
<DataTemplate DataType="{x:Type self:PartCustomItem}">
<Grid Width="246" Margin="0,5,0,5" HorizontalAlignment="Right">
<Grid Width="234.8" Margin="0,5,0,5" HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
<TextBlock Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
<TextBlock x:Name="TbName" Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
<TextBlock x:Name="TbText1" Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
<TextBlock x:Name="TbText2" Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding bIsActive}" Value="False">
<Setter TargetName="TbName" Property="TextDecorations" Value="Strikethrough" />
<Setter TargetName="TbText1" Property="TextDecorations" Value="Strikethrough" />
<Setter TargetName="TbText2" Property="TextDecorations" Value="Strikethrough" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</TreeView.Resources>
@@ -218,15 +228,15 @@
</Grid.ColumnDefinitions>
<Button Name="NewBtn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource CsvNewImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Button>
<Button Name="OpenBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource CsvOpenImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Button>
<Button Name="RuinedPartsBtn" Grid.Column="2"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource CsvRuinedPartsImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Button>
@@ -247,22 +257,19 @@
</Grid.ColumnDefinitions>
<ToggleButton Name="PlusBtn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource CsvPlusImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
</ToggleButton>
<ToggleButton Name="MinusBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource CsvMinusImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
</ToggleButton>
<Button Name="InsertBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" />
<Button Name="RemoveBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" />
<Button Name="OkBtn" Grid.Column="6" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}" />
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}" />
</Button>
</Grid>
</Grid>
+6 -6
View File
@@ -36,8 +36,8 @@ Public Class CSVPage
' Assegno la lista dei pezzi Csv come sorgente del treeview
PartsTreeView.ItemsSource = m_ItemsList
' Messaggi
InsertBtn.Content = EgtMsg(MSG_CSVPAGEUC + 2) ' Inserisci
RemoveBtn.Content = EgtMsg(MSG_CSVPAGEUC + 4) ' Rimuovi
InsertBtn.Content = EgtMsg(91202) ' Inserisci
RemoveBtn.Content = EgtMsg(91204) ' Rimuovi
' Determino se versione semplificata
m_bFull = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CSV_AUTO) And
(GetPrivateProfileInt(S_CSV, K_FULL, 1, m_MainWindow.GetIniFile()) <> 0)
@@ -149,13 +149,13 @@ Public Class CSVPage
Dim sRefGroup As String = String.Empty
EgtGetInfo(m_nIdToSel, INFO_REFGROUP, sRefGroup)
' deseleziono il pezzo corrente
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectPartInFaimily(sRefGroup)
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectPartInFamily(sRefGroup)
Select Case SelectWD.NumberOfSelection
Case 0 ' Annulla
' continuo senza eseguire niente
Case Else
' seleziono il numero di pezzi indicati
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectPartInFaimily(sRefGroup, SelectWD.NumberOfSelection)
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectPartInFamily(sRefGroup, SelectWD.NumberOfSelection)
End Select
m_bIsCounterLy = False
' disassegno il riferimento all'oggetto appena creato
@@ -748,10 +748,10 @@ Public Class CSVPage
' Eventuale messaggi di pezzi liberi o da altre liste
If bOther Then
' Pezzi non rimossi perché liberi
Dim sOut As String = EgtMsg(MSG_EGTMSGBOX + 13)
Dim sOut As String = EgtMsg(91113)
If Not String.IsNullOrWhiteSpace(sOtherCsv) Then
' o di altre liste Csv
sOut &= EgtMsg(MSG_EGTMSGBOX + 14) & " (" & sOtherCsv.TrimEnd(", ".ToCharArray()) & ")"
sOut &= EgtMsg(91114) & " (" & sOtherCsv.TrimEnd(", ".ToCharArray()) & ")"
End If
Dim WarnMsg As New EgtMsgBox(m_MainWindow, "", sOut, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 0, 1)
End If
+11 -10
View File
@@ -7,7 +7,7 @@
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="CadCutPage_Initialized" Loaded="CadCutPage_Loaded" Unloaded="CadCutPage_Unloaded">
<!-- Definizione della CadCutPage -->
<Grid Name="CadCutPageGrid" >
<Grid Name="CadCutPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
@@ -30,24 +30,25 @@
</Grid.ColumnDefinitions>
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Name="PhotoIMG" Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Name="PhotoIMG" Source="{DynamicResource PhotoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource RawPartImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="DrawBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource DrawImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="DrawBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ImportBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ImportImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ImportBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ImportImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="SplitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Name="SplitImage" Width="65" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Name="SplitImage" Width="65" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<!-- Definizione della Grid inferiore --><!--
<!-- Definizione della Grid inferiore -->
<!--
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
+10 -8
View File
@@ -2,6 +2,8 @@
Imports EgtWPFLib
Imports System.Reflection
Imports System.Globalization
Imports EgtWPFLib5
Imports System.Windows.Forms
Public Class CadCutPageUC
@@ -107,7 +109,7 @@ Public Class CadCutPageUC
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
m_MainWindow.TestOff()
m_MainWindow.DragRettangleOff()
m_MainWindow.DragRectangleOff()
m_MainWindow.SplitCurvWJOff()
m_MainWindow.StartCurvWJOff()
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
@@ -143,7 +145,7 @@ Public Class CadCutPageUC
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
m_MainWindow.TestOff()
m_MainWindow.DragRettangleOff()
m_MainWindow.DragRectangleOff()
m_MainWindow.SplitCurvWJOff()
m_MainWindow.StartCurvWJOff()
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
@@ -154,9 +156,9 @@ Public Class CadCutPageUC
' Se modalità fast grid, elimino tutti i pezzi
If m_CadCutMode = CadCutModes.FastGrid Then
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
Dim nPartId As Integer = EgtGetFirstPartInRawPart( nRawId)
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawId)
While nPartId <> GDB_ID.NULL
Dim nNextPartId = EgtGetNextPartInRawPart( nPartId)
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
' Rimuovo dal grezzo
EgtRemovePartFromRawPart(nPartId)
' Rimuovo le lavorazioni
@@ -171,7 +173,7 @@ Public Class CadCutPageUC
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
m_MainWindow.TestOff()
m_MainWindow.DragRettangleOff()
m_MainWindow.DragRectangleOff()
m_MainWindow.SplitCurvWJOff()
m_MainWindow.StartCurvWJOff()
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
@@ -181,7 +183,7 @@ Public Class CadCutPageUC
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
m_MainWindow.TestOff()
m_MainWindow.DragRettangleOff()
m_MainWindow.DragRectangleOff()
m_MainWindow.SplitCurvWJOff()
m_MainWindow.StartCurvWJOff()
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
@@ -205,7 +207,7 @@ Public Class CadCutPageUC
End Sub
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
m_MainWindow.DragRettangleOff()
m_MainWindow.DragRectangleOff()
m_MainWindow.SplitCurvWJOff()
m_MainWindow.StartCurvWJOff()
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
@@ -242,7 +244,7 @@ Public Class CadCutPageUC
' Reinserisco tutte le lavorazioni
Dim nWarn As Integer = 0
AddMachinings(GDB_ID.NULL, nWarn)
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
' Imposto flag di modifica
m_SplitPage.m_bShow = False
End If
+92
View File
@@ -0,0 +1,92 @@
<Window x:Class="ChangeToolWD"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Title="ChooseTool" Height="382.6" Width="426.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.15*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.15*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
<!--TextAlignment="Center"
FontSize="20"
VerticalAlignment="Center"-->
<Grid Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.7*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="MACHINING" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
<TextBlock Grid.Column="1" Text="TOOL" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
<TextBlock Grid.Column="2" Text="TC" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Margin="10,0,0,0"/>
</Grid>
<ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
ItemsSource="{Binding ItemList}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth, ElementName=SetUpToolListBox}" Margin="0,0,-40,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.4*"/>
<ColumnDefinition Width="0.0*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Machining}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
<TextBlock Grid.Column="1" Text="{Binding ToolName}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
<TextBlock Grid.Column="2" Text="{Binding ToolPos}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
<Rectangle Grid.Column="2" Style="{DynamicResource Rect_SplitPage}" Margin="15,0,0,0"/>
<Grid.ToolTip>
<StackPanel>
<TextBlock Text="{Binding Machining}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
<TextBlock Text="{Binding ToolName}" Style="{DynamicResource OmagCut_ListBoxTextBlock}" />
<TextBlock Text="{Binding ToolPos}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
</StackPanel>
</Grid.ToolTip>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock Name="ErrorTxBl" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_ErrorTextBlock}"/>
<Grid Grid.Column="1" Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
+371
View File
@@ -0,0 +1,371 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Public Class ChangeToolWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_MachiningList As New ObservableCollection(Of ItemMachining)
Sub New(Owner As Window)
Me.Owner = Owner
InitializeComponent()
End Sub
' Parametri della lama impostata correntemente in macchina
Private m_DefaultSaw_Name As String = String.Empty
Private m_DefaultSaw_Diam As Double = 0
Private m_DefaultSaw_Thick As Double = 0
Private m_DefaultSaw_Exists As Boolean = False
' Il nome della lavorazione restituito dalla selezione
Private m_NewSawing As String = String.Empty
Public ReadOnly Property NewSawing As String
Get
Return m_NewSawing
End Get
End Property
' Il colore della lavorazione
Private m_EgtColor As New Color3d
Public ReadOnly Property EgtColor As Color3d
Get
Return m_EgtColor
End Get
End Property
' Il nome della posizione sulla rulliera
Private m_TCPos As String = String.Empty
Public ReadOnly Property TCPos As String
Get
Return m_TCPos
End Get
End Property
' Nome della lavorazione corrente
Private m_CurrSawing As String = String.Empty
Public Property CurrSawing As String
Get
Return m_CurrSawing
End Get
Set(value As String)
m_CurrSawing = value
End Set
End Property
Private Sub GetDiamAndThickDefaultSaw()
m_DefaultSaw_Name = m_MainWindow.m_CurrentMachine.sCurrSaw
' Dalla lavorazione corrente recupero il nome della lama
If EgtMdbSetCurrMachining(m_CurrSawing) Then
Dim sNameTool As String = String.Empty
If EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool) Then m_DefaultSaw_Name = sNameTool
End If
If EgtTdbSetCurrTool(m_DefaultSaw_Name) Then
' Diametro lama lavorazione
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_DefaultSaw_Diam)
' Spessore lama corrente
EgtTdbGetCurrToolParam(MCH_TP.THICK, m_DefaultSaw_Thick)
m_DefaultSaw_Exists = True
End If
End Sub
Private Sub ChangeToolWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Posizione finestra
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
' Definizione del collegamento tra ItemList e ListBox1
SetUpToolListBox.ItemsSource = m_MachiningList
' Seleziona lavorazione
FilePathTxBl.Text = EgtMsg(90378)
End Sub
Private Sub ChangeToolWD_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
If String.IsNullOrEmpty(m_CurrSawing) Then
m_CurrSawing = m_MainWindow.m_CurrentMachine.sCurrSawing
End If
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
LoadSetUpMachining()
' ricerco la lavorazione corrente
Dim Item As ItemMachining = m_MachiningList.FirstOrDefault(Function(x) x.Machining = m_CurrSawing)
Dim Index As Integer = m_MachiningList.IndexOf(Item)
If Index < 0 Then
' Imposto lavorazione di default
EgtMdbSetCurrMachining(m_CurrSawing)
Dim sTool As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sTool)
' ⚠️ Utensile {0} non attrezzato
ErrorTxBl.Text = String.Format(EgtMsg(90377), sTool)
Index = 0
End If
' se presente seleziono il primo elemento
If m_MachiningList.Count > 0 Then
SetUpToolListBox.SelectedItem = m_MachiningList(Index)
OkBtn.IsEnabled = True
Else
OkBtn.IsEnabled = False
End If
End Sub
#Region "SET UP MACHINING"
' Creo le liste da mostrare nella lista
Private Function LoadSetUpMachining() As Boolean
' Pulisco la lista delle lavorazioni di lama
m_MachiningList.Clear()
' Imposto il contesto corrente
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
' Recupero la lista di tutte le lavorazioni di lama
Dim SawingList As List(Of String) = GetAllSawing()
' Se non ci sono lavorazioni di lama allora esco
If SawingList.Count() = 0 Then Return False
' Carico le lavorazioni di lama compatibili
CreateSawingList(SawingList)
Return True
End Function
' Creo la lista delle delle lavorazioni di lama da proporre
Private Sub CreateSawingList(SawingList As List(Of String))
' Recupero le info della lama montata di default
GetDiamAndThickDefaultSaw()
' Verifico se lama fissa
Dim bFixedSaw As Boolean = Not CamAuto.CanChangeSaw()
' recupero la prima lavorazione
For Each sSawingName As String In SawingList
Dim sToolName As String = ""
' Imposto la lavorazione corrente
EgtMdbSetCurrMachining(sSawingName)
' Recupero il nome dell'utensile della lavorazione
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sToolName)
If String.IsNullOrWhiteSpace( sToolName) Then Continue For
' Se lama fissa
If bFixedSaw Then
' Sono ammesse solo altre lavorazioni con la stessa lama
If sToolName = m_DefaultSaw_Name AndAlso VerifyCurrMachiningMaterial() Then
' recupero eventuale posizione
EgtTdbSetCurrTool(sToolName)
Dim sTCPos As String = ""
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
' inserisco in lista
m_MachiningList.Add(New ItemMachining(sSawingName, sToolName, sTCPos, New Color3d(0, 0, 0, 100)))
End If
' altrimenti (ammessa solo se da TC)
Else
' Verifico compatibilità nelle dimensioni lama e nei materiali ammessi dalla lavorazione
If Not( VerifyCurrSawTolerance(sToolName) AndAlso VerifyCurrMachiningMaterial()) Then Continue For
' Cerco la lama nel TC
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
If sToolName = ToolPosition.sTool Then
m_MachiningList.Add(New ItemMachining(sSawingName, sToolName, ToolPosition.sName, Utility.GetColorPV()))
Exit For
End If
Next
End If
Next
' reimposto la lavorazione di lama e la lama impostate in macchina
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
EgtMdbSetCurrMachining(m_MainWindow.m_CurrentMachine.sCurrSawing)
End Sub
' Verifico se la lavorazione impostata nella chiamante e quindi corrente può lavorare il grezzo corrente
Private Function VerifyCurrMachiningMaterial() As Boolean
' Stringa identificativa del materiale corrente
Dim sCurrMatId As String = m_MainWindow.m_CurrentMachine.CurrMat.nId.ToString()
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
sCurrMatId &= "." & m_MainWindow.m_CurrentMachine.CurrMat.SubId.ToString()
End If
' Recupero elenco materiali della lavorazione
Dim sSysNotes As String = ""
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, sSysNotes)
If String.IsNullOrWhiteSpace( sSysNotes) Then Return False
' Cerco un materiale compatibile con il corrente
Dim sItems() As String = sSysNotes.Split(";".ToCharArray)
For Ind As Integer = 0 To sItems.Count() - 1
' Divido il materiale nei suoi parametri
Dim sParams() = sItems(Ind).Split(",".ToCharArray)
' Se è il materiale del grezzo corrente
If sParams.Count() >= 3 AndAlso Trim(sParams(0)) = sCurrMatId Then
' Verifico rientri nello spessore ammesso
Dim dMinTh As Double = 0
Dim dMaxTh As Double = 0
StringToDouble(sParams(1), dMinTh)
StringToDouble(sParams(2), dMaxTh)
If dMinTh < dMaxTh - 10 * EPS_SMALL And
m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight >= dMinTh And
m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight <= dMaxTh Then
Return True
Else
Return False
End If
End If
Next
' Non ho trovato niente
Return False
End Function
' verifico l'utensile corrente (impostato nella funzione chiamante) se ha le stesse dimensioni della lama di default
Private Function VerifyCurrSawTolerance(sNameTool As String) As Boolean
If m_DefaultSaw_Exists Then
If EgtTdbSetCurrTool(sNameTool) Then
' Diametro nuova lama
Dim NewDiam As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.DIAM, NewDiam)
' Spessore lama
Dim NewThick As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.THICK, NewThick)
' Verifico che la nuova lama possa essere applicata: diametro max 1.25*prec, uguale spessore
Dim Delta_Diam As Double = NewDiam - m_DefaultSaw_Diam
Dim Delta_Thick As Double = Math.Abs(NewThick - m_DefaultSaw_Thick)
If Delta_Diam < 0.25 * m_DefaultSaw_Diam And Delta_Thick < EPS_SMALL Then
Return True
Else
EgtOutLog(String.Format("New saw {0} can not replace the current {1}; Delta_Diam={2}, |Delta_Thick|={3} ", sNameTool, m_DefaultSaw_Name, Delta_Diam, Delta_Thick))
End If
Else
EgtOutLog("Impossible to find in toolDB saw: " & sNameTool)
End If
Else
If String.IsNullOrEmpty(m_DefaultSaw_Name) Then
EgtOutLog("There is no machine CurrSaw!")
Else
EgtOutLog("Impossible to find in toolDB machine CurrSaw: " & m_DefaultSaw_Name)
End If
End If
Return False
End Function
' Restituisce tutto l'elenco delle lavorazioni di taglio di lama disponibili in macchina
Private Function GetAllSawing() As List(Of String)
Dim sFName As String = EgtMsg(90771) ' Uscita
If Not m_MainWindow.m_CurrentMachine.bSawing Then Return Nothing
' Inserisco categoria ed eventuali elementi
Dim SawingList As New List(Of String)
Dim nFType As Integer = MCH_MY.SAWING
Dim MachiningName As String = String.Empty
Dim bFound As Boolean = EgtMdbGetFirstMachining(nFType, MachiningName)
While bFound
SawingList.Add( MachiningName)
bFound = EgtMdbGetNextMachining(nFType, MachiningName)
End While
Return SawingList
End Function
#End Region ' Set up machinining
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
' Disabilito Ok
OkBtn.IsEnabled = False
' Recupero item selezionato
If SetUpToolListBox.SelectedItems.Count() = 0 Then
Return
Else
m_NewSawing = m_MachiningList(SetUpToolListBox.SelectedIndex).Machining
m_EgtColor = m_MachiningList(SetUpToolListBox.SelectedIndex).FootprintToolColor
m_TCPos = m_MachiningList(SetUpToolListBox.SelectedIndex).ToolPos
OkBtn.IsEnabled = True
End If
End Sub
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
' Disabilito Ok
OkBtn.IsEnabled = False
' Recupero item selezionato
If SetUpToolListBox.SelectedItems.Count() = 0 Then
Return
Else
m_NewSawing = m_MachiningList(SetUpToolListBox.SelectedIndex).Machining
m_EgtColor = m_MachiningList(SetUpToolListBox.SelectedIndex).FootprintToolColor
m_TCPos = m_MachiningList(SetUpToolListBox.SelectedIndex).ToolPos
OkBtn.IsEnabled = True
End If
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
DialogResult = True
End Sub
End Class
Public Class ItemMachining
Private m_ToolPos As String = String.Empty
Private m_ToolName As String = String.Empty
Private m_Machining As String = String.Empty
Private m_ToolExit As Integer = 1
Private m_ToolType As Integer = -1
Private m_FootprintToolColor As New Color3d(0, 255, 0, 100)
Private m_cSawColor As SolidColorBrush
' Posizione porta utensile
Public Property ToolPos As String
Get
Return m_ToolPos
End Get
Set(value As String)
m_ToolPos = value
End Set
End Property
' Nome utensile
Public Property ToolName As String
Get
Return m_ToolName
End Get
Set(value As String)
m_ToolName = value
End Set
End Property
' Nome della lavorazione
Public Property Machining As String
Get
Return m_Machining
End Get
Set(value As String)
m_Machining = value
End Set
End Property
Public Property ToolExit As Integer
Get
Return m_ToolExit
End Get
Set(value As Integer)
m_ToolExit = value
End Set
End Property
Public Property ToolType As Integer
Get
Return m_ToolType
End Get
Set(value As Integer)
m_ToolType = value
End Set
End Property
Public Property FootprintToolColor As Color3d
Get
Return m_FootprintToolColor
End Get
Set(value As Color3d)
m_FootprintToolColor = value
End Set
End Property
Public Property SawColor As SolidColorBrush
Get
Return m_cSawColor
End Get
Set(value As SolidColorBrush)
m_cSawColor = value
End Set
End Property
Sub New(sMachining As String, sToolName As String, sToolPos As String, cColor As Color3d)
m_Machining = sMachining
m_ToolPos = sToolPos
m_ToolName = sToolName
m_FootprintToolColor = cColor
m_cSawColor = New SolidColorBrush(Color.FromRgb(m_FootprintToolColor.R, m_FootprintToolColor.G, m_FootprintToolColor.B))
End Sub
End Class
+61
View File
@@ -0,0 +1,61 @@
<Window x:Class="ChooseTestToolWD"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Title="OpenFile" Height="382.6" Width="426.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
<!--TextAlignment="Center"
FontSize="20"
VerticalAlignment="Center"-->
<ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
ItemsSource="{Binding ItemList}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding ToolAlias}" Style="{DynamicResource OmagCut_ListBoxTextBlock}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Grid Grid.Column="1" Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
+289
View File
@@ -0,0 +1,289 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Public Class ChooseTestToolWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_SetUpToolList As New ObservableCollection(Of TestTool)
Sub New(Owner As Window)
Me.Owner = Owner
InitializeComponent()
End Sub
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Posizione finestra
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
' Definizione del collegamento tra ItemList e ListBox1
SetUpToolListBox.ItemsSource = m_SetUpToolList
FilePathTxBl.Text = EgtMsg(90945) ' Selezionare l'utensile da tastare
End Sub
Private Sub OpenFile_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
LoadSetUpTool()
' ricerco l'utensile della lavorazione indicata
Dim Item As TestTool = m_SetUpToolList.FirstOrDefault(Function(x) x.ToolName = m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrToolFromSelectedSawCurv)
Dim Index As Integer = m_SetUpToolList.IndexOf(Item)
If Index < 0 Then
Index = 0
End If
' se presente seleziono il primo elemento
If m_SetUpToolList.Count > 0 Then
SetUpToolListBox.SelectedItem = m_SetUpToolList(Index)
OkBtn.IsEnabled = True
Else
OkBtn.IsEnabled = False
End If
End Sub
Private Function LoadSetUpTool() As Boolean
Dim sNameTool As String = String.Empty
sNameTool = "Laser point"
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto laser di puntamento
m_SetUpToolList.Add(New TestTool(sNameTool, ""))
End If
sNameTool = m_MainWindow.m_CurrentMachine.sCurrWaterJet
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto WJ
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
Select Case m_MainWindow.m_CurrentMachine.MountedToolConfig
Case CurrentMachine.MountedToolConfigs.SAW
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
Return True
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la fresa
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto il foretto
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
Return True
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
sNameTool = ToolChangerPos.sTool
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
Next
Return True
Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
sNameTool = ToolChangerPos.sTool
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
End If
Next
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
sNameTool = ToolChangerPos.sTool
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
End If
Next
Return True
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
sNameTool = ToolChangerPos.sTool
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
End If
Next
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
sNameTool = ToolChangerPos.sTool
If Not String.IsNullOrEmpty(sNameTool) Then
' Imposto la lama
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
End If
End If
Next
Return True
Case Else
Return False
End Select
Return True
End Function
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
' Disabilito Ok
OkBtn.IsEnabled = False
' Recupero item selezionato
If SetUpToolListBox.SelectedItems.Count() = 0 Then
Return
End If
' A seconda del tipo
OkBtn.IsEnabled = True
End Sub
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
' Disabilito Ok
OkBtn.IsEnabled = False
' Recupero item selezionato
If SetUpToolListBox.SelectedItems.Count() = 0 Then
Return
Else
OkBtn.IsEnabled = True
End If
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
DialogResult = True
End Sub
' restituisce l'oggetto selezionato in elenco e lo imposta come attivo
Friend Function GetSelectedTool() As TestTool
Dim SelTestTool As TestTool = DirectCast(SetUpToolListBox.SelectedItem, TestTool)
If SelTestTool.ToolAlias = "Laser point" Then
SelTestTool.ToolHead = "H3"
SelTestTool.ToolExit = 1
SelTestTool.ToolIsSaw = False
SelTestTool.ToolIsLaser = True
Else
EgtTdbSetCurrTool(SelTestTool.ToolName)
Dim sHeadTool As String = String.Empty
Dim nExitTool As Integer = 0
Dim sTypeTool As String = String.Empty
Dim nTypeTool As Integer
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nTypeTool)
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHeadTool)
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExitTool)
EgtTdbGetCurrToolParam(MCH_TP.TYPE, sTypeTool)
SelTestTool.ToolHead = sHeadTool
SelTestTool.ToolExit = nExitTool
SelTestTool.ToolType = nTypeTool
SelTestTool.ToolIsSaw = (nTypeTool = MCH_TY.SAW_STD)
SelTestTool.ToolIsLaser = False
End If
Return SelTestTool
End Function
End Class
Public Class TestTool
Private m_ToolAlias As String = String.Empty
Private m_ToolName As String = String.Empty
Private m_ToolHead As String = "H1"
Private m_ToolExit As Integer = 1
Private m_ToolIsSaw As Boolean = False
Private m_ToolIsLaser As Boolean = False
Private m_ToolType As Integer = -1
Public Property ToolAlias As String
Get
Return m_ToolAlias
End Get
Set(value As String)
m_ToolAlias = value
End Set
End Property
Public Property ToolName As String
Get
Return m_ToolName
End Get
Set(value As String)
m_ToolName = value
End Set
End Property
Public Property ToolHead As String
Get
Return m_ToolHead
End Get
Set(value As String)
m_ToolHead = value
End Set
End Property
Public Property ToolExit As Integer
Get
Return m_ToolExit
End Get
Set(value As Integer)
m_ToolExit = value
End Set
End Property
Public Property ToolType As Integer
Get
Return m_ToolType
End Get
Set(value As Integer)
m_ToolType = value
End Set
End Property
Public Property ToolIsSaw As Boolean
Get
Return m_ToolIsSaw
End Get
Set(value As Boolean)
m_ToolIsSaw = value
End Set
End Property
Public Property ToolIsLaser As Boolean
Get
Return m_ToolIsLaser
End Get
Set(value As Boolean)
m_ToolIsLaser = value
End Set
End Property
Sub New(sToolAlias As String, sToolName As String)
m_ToolAlias = sToolAlias
m_ToolName = sToolName
End Sub
End Class
+10 -10
View File
@@ -1,10 +1,10 @@
<Window x:Class="EditValueWD"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="EditValueWD" Height="255.9" Width="426.5" ShowInTaskbar="False">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="EditValueWD" Height="255.9" Width="426.5" ShowInTaskbar="False">
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
<Border Style="{DynamicResource OmagCut_Border}">
@@ -23,9 +23,9 @@
</Grid.RowDefinitions>
<TextBlock Name="ValueTxbl" Grid.Column="1" Grid.Row="0"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<ComboBox Name="ValueCmBx" Grid.Column="1" Grid.Row="1">
<ComboBox.ItemTemplate>
@@ -47,12 +47,12 @@
<Button Name="OkBtn" Grid.Column="1"
IsDefault="True"
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3"
IsCancel="True"
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
+1 -4
View File
@@ -1,7 +1,4 @@
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib
Imports System.Collections.ObjectModel
Imports System.Collections.ObjectModel
Public Class EditValueWD
+11 -12
View File
@@ -7,7 +7,6 @@
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280">
<!-- Definizione della NestPage -->
<Grid Name="FastGridSlabGrid" >
<Grid.ColumnDefinitions>
@@ -46,7 +45,7 @@
Grid.Row="0" Grid.Column="0"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OrderTxBx"
Grid.Row="0" Grid.Column="1"
Grid.Row="0" Grid.Column="1"
Margin="13,0,6,0"
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
@@ -67,11 +66,11 @@
<UniformGrid Columns="3" >
<ToggleButton Name="Type1Btn"
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
<ToggleButton Name="Type2Btn"
Style="{StaticResource OmagCut_DisabledYellowToggleButton}" />
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}" />
<ToggleButton Name="Type3Btn"
Style="{StaticResource OmagCut_DisabledYellowToggleButton}" />
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}" />
</UniformGrid>
<Grid>
@@ -82,11 +81,11 @@
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="Type4Btn"
Grid.Column="1"
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
Grid.Column="1"
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
<ToggleButton Name="Type5Btn"
Grid.Column="2"
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
Grid.Column="2"
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
</Grid>
</UniformGrid>
@@ -94,13 +93,13 @@
<Button Name="ConfirmOrderBtn"
Grid.Row="3"
Style="{StaticResource OmagCut_YellowTextButton}" />
Style="{DynamicResource OmagCut_YellowTextButton}" />
<UniformGrid Grid.Row="4" Columns="2" >
<Button Name="InsertPiecesBtn"
Style="{StaticResource OmagCut_YellowTextButton}" />
Style="{DynamicResource OmagCut_YellowTextButton}" />
<ToggleButton Name="LastSlabBtn"
Style="{StaticResource OmagCut_YellowToggleButton}" />
Style="{DynamicResource OmagCut_YellowToggleButton}" />
</UniformGrid>
</Grid>
+6 -6
View File
@@ -19,12 +19,12 @@ Public Class FastGridSlabManager
Private Sub FastGridSlabManager_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Imposto i messaggi letti dal file dei messaggi
OrderTxBl.Text = EgtMsg(MSG_FASTGRIDPAGEUC) 'Order name - Nome ordine
CurrSlabTxBl.Text = EgtMsg(MSG_FASTGRIDPAGEUC + 1) 'Curr slab - Lastra corrente
PieceTypeGpBx.Header = EgtMsg(MSG_FASTGRIDPAGEUC + 3) 'Piece type - Tipo pezzo
ConfirmOrderBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 5) 'Confirm order - Conferma ordine
InsertPiecesBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 4) 'Insert pieces - Inserisci pezzi
LastSlabBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 2) 'Last slab - Ultima lastra
OrderTxBl.Text = EgtMsg(90480) ' Order name - Nome ordine
CurrSlabTxBl.Text = EgtMsg(90481) ' Curr slab - Lastra corrente
PieceTypeGpBx.Header = EgtMsg(90483) ' Piece type - Tipo pezzo
ConfirmOrderBtn.Content = EgtMsg(90485) ' Confirm order - Conferma ordine
InsertPiecesBtn.Content = EgtMsg(90484) ' Insert pieces - Inserisci pezzi
LastSlabBtn.Content = EgtMsg(90482) ' Last slab - Ultima lastra
' Leggo dati da ini
GetPrivateProfileString(S_FASTGRID, K_FG_ORDER, "", OrderTxBx.Text, m_MainWindow.GetIniFile())
m_nCurrSlab = GetPrivateProfileInt(S_FASTGRID, K_FG_CURRSLAB, 0, m_MainWindow.GetIniFile())
+75 -75
View File
@@ -1,100 +1,100 @@
<Window x:Class="ModifStartEndWD"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="ModifStartEndWD" Height="405.9" Width="426.5" ShowInTaskbar="False">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="ModifStartEndWD" Height="405.9" Width="426.5" ShowInTaskbar="False">
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
<Border Style="{DynamicResource OmagCut_Border}">
<Grid x:Name="SaveNameGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<!--<RowDefinition Height="0.5*"/>
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
<Border Style="{DynamicResource OmagCut_Border}">
<Grid x:Name="SaveNameGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<!--<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>-->
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="TitleTxbl" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="TitleTxbl" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="HoleTxbl" Grid.Column="1" Grid.Row="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="HoleChBx" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center"
Style="{DynamicResource OmagCut_CheckBox}"/>
<TextBlock Name="HoleTxbl" Grid.Column="1" Grid.Row="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="HoleChBx" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center"
Style="{DynamicResource OmagCut_CheckBox}"/>
<TextBlock Name="ElongationTxbl" Grid.Column="1" Grid.Row="2"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="ElongationTxBx" Grid.Column="2" Grid.Row="2"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="ElongationTxbl" Grid.Column="1" Grid.Row="2"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="ElongationTxBx" Grid.Column="2" Grid.Row="2"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="LeadInTxbl" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<ComboBox Name="LeadInCmBx" Grid.Column="2" Grid.Row="3"
Style="{DynamicResource OmagCut_ComboBox}"/>
<TextBlock Name="LeadInTxbl" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<ComboBox Name="LeadInCmBx" Grid.Column="2" Grid.Row="3"
Style="{DynamicResource OmagCut_ComboBox}"/>
<TextBlock Name="LeadOutTxbl" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<ComboBox Name="LeadOutCmBx" Grid.Column="2" Grid.Row="3"
Style="{DynamicResource OmagCut_ComboBox}"/>
<TextBlock Name="LeadOutTxbl" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<ComboBox Name="LeadOutCmBx" Grid.Column="2" Grid.Row="3"
Style="{DynamicResource OmagCut_ComboBox}"/>
<TextBlock Name="TangDistTxbl" Grid.Column="1" Grid.Row="4"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LiTangDistTxBx" Grid.Column="2" Grid.Row="4"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="TangDistTxbl" Grid.Column="1" Grid.Row="4"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LiTangDistTxBx" Grid.Column="2" Grid.Row="4"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="PerpDistTxbl" Grid.Column="1" Grid.Row="5"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LiPerpDistTxBx" Grid.Column="2" Grid.Row="5"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="PerpDistTxbl" Grid.Column="1" Grid.Row="5"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LiPerpDistTxBx" Grid.Column="2" Grid.Row="5"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="LoTangDistTxBx" Grid.Column="2" Grid.Row="4"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="LoTangDistTxBx" Grid.Column="2" Grid.Row="4"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="LoPerpDistTxBx" Grid.Column="2" Grid.Row="5"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="LoPerpDistTxBx" Grid.Column="2" Grid.Row="5"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Grid.RowSpan="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Grid.RowSpan="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1"
<Button Name="OkBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3"
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3"
IsCancel="True"
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Grid>
</Grid>
</Border>
</Border>
</Window>
</Window>
+16 -18
View File
@@ -1,7 +1,5 @@
Imports System.IO
Imports System.Collections.ObjectModel
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib
Public Class ModifStartEndWD
@@ -47,16 +45,16 @@ Public Class ModifStartEndWD
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
' Imposto i messaggi letti dal file dei messaggi
ElongationTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 35)
HoleTxbl.Text = EgtMsg(90875)
LeadInTxbl.Text = EgtMsg(90769)
LeadOutTxbl.Text = EgtMsg(90771)
TangDistTxbl.Text = EgtMsg(90890)
PerpDistTxbl.Text = EgtMsg(90891)
ElongationTxbl.Text = EgtMsg(90375) ' Allungamento
HoleTxbl.Text = EgtMsg(90875) ' Foro di attacco
LeadInTxbl.Text = EgtMsg(90769) ' Attacco
LeadOutTxbl.Text = EgtMsg(90771) ' Uscita
TangDistTxbl.Text = EgtMsg(90890) ' Dist. tang.
PerpDistTxbl.Text = EgtMsg(90891) ' Dist. perp.
' Mostro/Nascondo elementi in base a Inizio/Fine Modif.
If bIsLeadIn Then
TitleTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 33)
TitleTxbl.Text = EgtMsg(90373) ' Inizio Modif.
HoleTxbl.Visibility = Windows.Visibility.Visible
HoleChBx.Visibility = Windows.Visibility.Visible
LeadInTxbl.Visibility = Windows.Visibility.Visible
@@ -64,16 +62,16 @@ Public Class ModifStartEndWD
LeadOutTxbl.Visibility = Windows.Visibility.Hidden
LeadOutCmBx.Visibility = Windows.Visibility.Hidden
LeadInType = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(MSG_COMBOBOXPARAM + 46)),
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(MSG_COMBOBOXPARAM + 47))})
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(90842)), ' Nessuno
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(90846)), ' Lineare
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(90847))}) ' Tangente
LeadInCmBx.ItemsSource = LeadInType
LiTangDistTxBx.Visibility = Windows.Visibility.Visible
LiPerpDistTxBx.Visibility = Windows.Visibility.Visible
LoTangDistTxBx.Visibility = Windows.Visibility.Hidden
LoPerpDistTxBx.Visibility = Windows.Visibility.Hidden
Else
TitleTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 34)
TitleTxbl.Text = EgtMsg(90374) ' Fine Modif.
HoleTxbl.Visibility = Windows.Visibility.Hidden
HoleChBx.Visibility = Windows.Visibility.Hidden
LeadInTxbl.Visibility = Windows.Visibility.Hidden
@@ -81,10 +79,10 @@ Public Class ModifStartEndWD
LeadOutTxbl.Visibility = Windows.Visibility.Visible
LeadOutCmBx.Visibility = Windows.Visibility.Visible
LeadOutType = New ObservableCollection(Of IdNameStruct)(
{New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(MSG_COMBOBOXPARAM + 46)),
New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(MSG_COMBOBOXPARAM + 47)),
New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(MSG_COMBOBOXPARAM + 50))})
{New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(90842)), ' Nessuno
New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(90846)), ' Lineare
New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(90847)), ' Tangente
New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(90850))}) ' Come attacco
LeadOutCmBx.ItemsSource = LeadOutType
LiTangDistTxBx.Visibility = Windows.Visibility.Hidden
LiPerpDistTxBx.Visibility = Windows.Visibility.Hidden
+153 -153
View File
@@ -1,173 +1,173 @@
<UserControl x:Class="MoveRawPartPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280">
<!-- Definizione della SplitPage -->
<Grid Name="SplitPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<!-- Definizione della SplitPage -->
<Grid Name="SplitPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--Upper button grid-->
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="8*"/>
</Grid.ColumnDefinitions>
<!--Griglia per oscurare i bottoni della pagina sottostante-->
<Grid Background="{DynamicResource OmagCut_Gray}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<TransformGroup>
<RotateTransform Angle="180"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
</Button>
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
</Grid>
</Grid>
<!--Left Button Grid-->
<Grid Grid.RowSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--Upper button grid-->
<Grid Grid.Column="1">
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
<Image Source="{DynamicResource TopLeftImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
<Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
<Image Source="{DynamicResource TopRightImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
<Image Source="{DynamicResource LeftArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
Style="{DynamicResource OmagCut_YellowTextButton}">
</Button>
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource RightArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
<Image Source="{DynamicResource BottomLeftImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="8*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
Text="°"/>
</Grid>
<!--Griglia per oscurare i bottoni della pagina sottostante-->
<Grid Background="{DynamicResource OmagCut_Gray}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<TransformGroup>
<RotateTransform Angle="180"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
</Button>
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
</Grid>
</Grid>
<!--Left Button Grid-->
<Grid Grid.RowSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
<Image Source="{DynamicResource TopLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
<Image Source="{DynamicResource TopRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
<Image Source="{DynamicResource LeftArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
Style="{DynamicResource OmagCut_YellowTextButton}">
</Button>
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource RightArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
<Image Source="{DynamicResource BottomLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
Text="°"/>
</Grid>
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<!--Gestione sfridi-->
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
<!--Gestione sfridi-->
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Button Name="ScrapsBtn" Grid.Column="3" Grid.Row="6"
<Button Name="ScrapsBtn" Grid.Column="3" Grid.Row="6"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
<!--Gestione scarico pezzi-->
<Button Name="UnloadPartsBtn" Grid.ColumnSpan="2" Grid.Row="7"
<!--Gestione scarico pezzi-->
<Button Name="UnloadPartsBtn" Grid.ColumnSpan="2" Grid.Row="7"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Grid Grid.Row="7" Grid.ColumnSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
</Grid>
</Grid>
<!--Lower button grid, sfondo grigio per coprire i bottoni della pagina sottostante-->
<Grid Grid.Column="1" Grid.Row="2" Background="{DynamicResource OmagCut_Gray}">
<Grid Grid.Row="7" Grid.ColumnSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Grid>
</Grid>
<!--Lower button grid, sfondo grigio per coprire i bottoni della pagina sottostante-->
<Grid Grid.Column="1" Grid.Row="2" Background="{DynamicResource OmagCut_Gray}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
</Grid>
</UserControl>
+147 -64
View File
@@ -1,5 +1,4 @@
Imports System.Windows.Forms.Integration
Imports EgtUILib
Imports EgtUILib
Public Class MoveRawPartPage
' Riferimento alla MainWindow
@@ -41,11 +40,11 @@ Public Class MoveRawPartPage
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Assegno testi
RemovePartBtn.Content = EgtMsg(MSG_MOVERAWPAGEUC + 1) 'Rimuovi
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) 'Modifica
ResetBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
ScrapsBtn.Content = "Add Scraps"
UnloadPartsBtn.Content = "Move part"
RemovePartBtn.Content = EgtMsg(90361) ' Rimuovi
ModifyBtn.Content = EgtMsg(90357) ' Modifica
ResetBtn.Content = EgtMsg(90336) ' Reset
ScrapsBtn.Content = EgtMsg(90366) ' Add Scraps
UnloadPartsBtn.Content = EgtMsg(90367) ' Move part
End Sub
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
@@ -61,7 +60,7 @@ Public Class MoveRawPartPage
' Se movimento con ventosa, verifico se lama troppo grande
If Not m_bByHand And Not m_MainWindow.m_CurrentMachine.IsVacuumMovePossible() Then
m_bByHand = True
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
m_CurrProjPage.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
End If
' Deseleziono tutto
EgtDeselectAll()
@@ -124,19 +123,26 @@ Public Class MoveRawPartPage
If m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
' assegnazione delle info tavola ausiliaria alla dispozione corrente (Spostato nella funzione Refresh)
SetAuxTabInCurrDisposition()
UnloadPartsBtn.Content = "Go to MOVE part"
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
' altrimenti, aggiorno visualizzazione
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
EgtDraw()
UnloadPartsBtn.Content = "Go to UNLOAD part"
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
End If
'---------------------------- AUX TABLE ----------------------------
EgtDraw()
' Carico i parametri di movimento
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
' Carico il valore ci
Dim ExtraStep As Double = GetPrivateProfileDouble(S_RAWMOVE, K_EXTRASTEP, 1, m_MainWindow.GetIniFile())
' Ricavo la lunghezza del baffo di taglio
m_dStep = SplitAuto.MaxCuttingMustache(m_dStep)
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+1"
If ExtraStep < EPS_SMALL Then
StepMoveTxBx.Text = LenToString(m_dStep, 1)
Else
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+" & LenToString(ExtraStep, 1)
' Aggiorno il valore sommando l'extra
m_dStep = m_dStep + ExtraStep
End If
m_dRotation = GetPrivateProfileDouble(S_RAWMOVE, K_RAWROTATION, 30, m_MainWindow.GetIniFile())
RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3)
' Se movimento manuale perpendicolare
@@ -208,10 +214,10 @@ Public Class MoveRawPartPage
Else
UnloadPartsBtn.Visibility = Visibility.Visible
If m_SplitPage.m_bOnAuxTab Then
UnloadPartsBtn.Content = "Go to MOVE part"
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
' altrimenti, aggiorno visualizzazione
Else
UnloadPartsBtn.Content = "Go to UNLOAD part"
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
End If
End If
' Aggiorno interfaccia per taglio perpendicolare
@@ -335,18 +341,26 @@ Public Class MoveRawPartPage
If VerifyCollisionWithOtherRawPart(nId) Then
' mantengo la selezione del pezzo
EgtSetStatus(nId, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
Else
' Se con ventose, le nascondo
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
End If
Else
' verifico che il pezzo precedente possa essere depositato correttamente
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
' mantengo la selezione del pezzo
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
EgtDraw()
' esco dal ciclo, prima devo depositare correttamente il pezzo
Exit While
End If
' Verifico che il pezzo corrente sia prelevabile - versione 2.6c3 -
If VerifyCollisionWithOtherRawPart(nId, True) Then
' mantengo la selezione del pezzo
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
EgtDraw()
' esco dal ciclo, prima devo depositare correttamente il pezzo
Exit While
@@ -391,13 +405,13 @@ Public Class MoveRawPartPage
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
' Aggiorno i dati
m_bRawWithCups = False
If VacuumCups.bOverWeight Then
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 4)) 'Pezzo troppo pesante : non si può muovere
ElseIf VacuumCups.bExtraStroke Then
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 5)) 'Pezzo oltre le corse : non si può muovere
If VacuumCups.m_bOverWeight Then
m_CurrProjPage.SetWarningMessage(EgtMsg(90364)) ' Pezzo troppo pesante : non si può muovere
ElseIf VacuumCups.m_bExtraStroke Then
m_CurrProjPage.SetWarningMessage(EgtMsg(90365)) ' Pezzo oltre le corse : non si può muovere
Else
' Messaggio di avvertimento
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
End If
End If
@@ -421,7 +435,7 @@ Public Class MoveRawPartPage
End Sub
' Veririfica che il grezzo non entri in colliosione con altri pezzi
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
Private Function VerifyCollisionWithOtherRawPart_0(nIdOnVacumm As Integer) As Boolean
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
If m_SplitPage.m_bOnAuxTab Then Return False
If nIdOnVacumm = GDB_ID.NULL Then Return False
@@ -455,23 +469,85 @@ Public Class MoveRawPartPage
Return False
End Function
' Verifica che il grezzo non entri in collisione con altri pezzi - versione 2.6c3 -
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer, Optional IsTaking As Boolean = False) As Boolean
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalare errori per pezzi ricavati interni al grezzo...)
If m_SplitPage.m_bOnAuxTab Then Return False
If nIdOnVacumm = GDB_ID.NULL Then Return False
' Creo gruppo temporaneo in cui generare le superfici per la verifica di collisione
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
If m_nTempId = GDB_ID.NULL Then Return False
EgtSetName(m_nTempId, "RawTemp")
' recupero le regioni del grezzo attaccato alle ventose e da questo genero una superficie
Dim nIdUpRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawUpReg")
Dim nIdDwnRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawDwnReg")
' recupero gli ID di tutti i grezzi della fase corrente
Dim nCurrPhase As Integer = EgtGetCurrPhase()
Dim nRawGroupId = EgtGetParent(EgtGetFirstRawPart())
Dim nIdRaw As Integer = EgtGetFirstRawPart()
' ciclo su tutti i grezzi per veririficare eventuali collisioni
While nIdRaw <> GDB_ID.NULL
' verifico la fase del grezzo
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
' recupero le regioni del grezzo
Dim nIdUpRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawUpReg")
Dim nIdDwnRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawDwnReg")
' creo la copia delle regioni
Dim nCopy_IdDwnRegionOnVac As Integer = EgtCopyGlob(nIdDwnRegionOnVac, m_nTempId)
' PRELIEVO
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nIdUpRegion) Then
' se esiste la regione risultato, allora c'è intersezione
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
EgtErase(m_nTempId)
' Esco: Intersezione TROVATA -> true
Return True
End If
End If
' DEPOSITO : devono essere eseguiti due controlli ulteriori
If Not IsTaking Then
nCopy_IdDwnRegionOnVac = EgtCopyGlob(nIdDwnRegionOnVac, m_nTempId)
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nIdDwnRegion) Then
' se esiste la regione risultato, allora c'è intersezione
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
EgtErase(m_nTempId)
' Esco: Intersezione TROVATA -> true
Return True
End If
End If
Dim nCopy_IdUpRegionOnVac As Integer = EgtCopyGlob(nIdUpRegionOnVac, m_nTempId)
If EgtSurfFrIntersect(nCopy_IdUpRegionOnVac, nIdUpRegion) Then
' se esiste la regione risultato, allora c'è intersezione
If EgtExistsObj(nCopy_IdUpRegionOnVac) Then
EgtErase(m_nTempId)
' Esco: Intersezione TROVATA -> true
Return True
End If
End If
End If
End If
nIdRaw = EgtGetNextRawPart(nIdRaw)
End While
EgtErase(m_nTempId)
Return False
End Function
Private Function VerifyIsNewScrap(nMyId As Integer) As Boolean
Dim nVal As Integer = 0
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
If nVal = 1 Or nVal = 2 Then
' 1 → è stato definito come nuovo grezzo oppure, 2 → è stato definito come nuovo grezzo ed è stato inserito nel DB delle lastre
ScrapsBtn.Content = "Remove Scrap"
' 1 -> definito come nuovo grezzo oppure, 2 -> definito come nuovo grezzo ed inserito nel DB delle lastre
ScrapsBtn.Content = EgtMsg(91228) ' Remove Scrap
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
Return True
ElseIf nVal = 3 Then
' non è possibile rimuovere il grezzo in questa fase
ScrapsBtn.Content = "Defined as Scrap"
ScrapsBtn.Content = EgtMsg(91229) ' Defined as Scrap
ScrapsBtn.IsEnabled = False
Return True
End If
End If
' non è un nuovo grezzo
ScrapsBtn.Content = "Add Scrap"
ScrapsBtn.Content = EgtMsg(91230) ' Add Scrap
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
Return False
End Function
@@ -502,16 +578,16 @@ Public Class MoveRawPartPage
Dim vtMove As New Vector3d(0, m_dStep, 0)
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
m_CurrProjPage.ClearMessage()
VerifyReleasdPositionIsValid(vtMove)
VerifyReleasePositionIsValid(vtMove)
' ----------- FINE verifica di essere entro i limiti macchina -----------
If EgtMoveRawPart(nRawId, vtMove) Then
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
Else
VacuumCups.ptStartPointLift.y -= vtMove.y
VacuumCups.m_ptStartPointLift.y -= vtMove.y
End If
Else
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
End If
End If
nRawId = EgtGetNextSelectedObj()
@@ -545,16 +621,16 @@ Public Class MoveRawPartPage
Dim vtMove As New Vector3d(0, -m_dStep, 0)
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
m_CurrProjPage.ClearMessage()
VerifyReleasdPositionIsValid(vtMove)
VerifyReleasePositionIsValid(vtMove)
' ----------- FINE verifica di essere entro i limiti macchina -----------
If EgtMoveRawPart(nRawId, vtMove) Then
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
Else
VacuumCups.ptStartPointLift.y -= vtMove.y
VacuumCups.m_ptStartPointLift.y -= vtMove.y
End If
Else
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
End If
End If
nRawId = EgtGetNextSelectedObj()
@@ -571,16 +647,16 @@ Public Class MoveRawPartPage
Dim vtMove As New Vector3d(m_dStep, 0, 0)
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
m_CurrProjPage.ClearMessage()
VerifyReleasdPositionIsValid(vtMove)
VerifyReleasePositionIsValid(vtMove)
' ----------- FINE verifica di essere entro i limiti macchina -----------
If EgtMoveRawPart(nRawId, vtMove) Then
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
Else
VacuumCups.ptStartPointLift.x -= vtMove.x
VacuumCups.m_ptStartPointLift.x -= vtMove.x
End If
Else
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
End If
nRawId = EgtGetNextSelectedObj()
End While
@@ -596,16 +672,16 @@ Public Class MoveRawPartPage
Dim vtMove As New Vector3d(-m_dStep, 0, 0)
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
m_CurrProjPage.ClearMessage()
VerifyReleasdPositionIsValid(vtMove)
VerifyReleasePositionIsValid(vtMove)
' ----------- FINE verifica di essere entro i limiti macchina -----------
If EgtMoveRawPart(nRawId, vtMove) Then
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
Else
VacuumCups.ptStartPointLift.x -= vtMove.x
VacuumCups.m_ptStartPointLift.x -= vtMove.x
End If
Else
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
End If
nRawId = EgtGetNextSelectedObj()
End While
@@ -614,19 +690,19 @@ Public Class MoveRawPartPage
#End Region 'Move Up/Down/Left/Right
' verifica che la poszione da raggiungere sia nei limiti delle corse
Private Function VerifyReleasdPositionIsValid(ByRef vtMove As Vector3d) As Boolean
' verifica che la posizione da raggiungere sia nei limiti delle corse
Private Function VerifyReleasePositionIsValid(ByRef vtMove As Vector3d) As Boolean
Dim bOk As Boolean = True
' determino il punto finale dello spostamento
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
Dim ptEndPointLift As Point3d = VacuumCups.m_ptStartPointLift
ptEndPointLift.x += vtMove.x
ptEndPointLift.y += vtMove.y
Dim sInfo As String = String.Empty
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, VacuumCups.dDegRotStartAng)
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, VacuumCups.m_dDegRotStartAng)
Case 1
' extra corsa sulla x-: devo ridurre del valore di extra corsa
EgtGetOutstrokeInfo(sInfo)
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
ptEndPointLift.x -= vtMove.x
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
@@ -639,7 +715,7 @@ Public Class MoveRawPartPage
Case 2
' extra corsa sulla x+: devo ridurre del valore di extra corsa
EgtGetOutstrokeInfo(sInfo)
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
ptEndPointLift.x -= vtMove.x
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
@@ -652,7 +728,7 @@ Public Class MoveRawPartPage
Case 4
' extra corsa sulla y-
EgtGetOutstrokeInfo(sInfo)
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
ptEndPointLift.y -= vtMove.y
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
@@ -665,7 +741,7 @@ Public Class MoveRawPartPage
Case 8
' extra corsa sulla y+
EgtGetOutstrokeInfo(sInfo)
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
ptEndPointLift.y -= vtMove.y
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
@@ -677,7 +753,7 @@ Public Class MoveRawPartPage
bOk = False
End Select
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
VacuumCups.ptStartPointLift = ptEndPointLift
VacuumCups.m_ptStartPointLift = ptEndPointLift
Return bOk
End Function
@@ -706,11 +782,11 @@ Public Class MoveRawPartPage
' Memorizzo
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
Else
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
VacuumCups.dDegRotStartAng -= dAng
VacuumCups.m_ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
VacuumCups.m_dDegRotStartAng -= dAng
End If
Else
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
End If
nRawId = EgtGetNextSelectedObj()
End While
@@ -740,11 +816,11 @@ Public Class MoveRawPartPage
' Memorizzo
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
Else
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
VacuumCups.dDegRotStartAng -= dAng
VacuumCups.m_ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
VacuumCups.m_dDegRotStartAng -= dAng
End If
Else
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
End If
nRawId = EgtGetNextSelectedObj()
End While
@@ -757,15 +833,15 @@ Public Class MoveRawPartPage
Private Function VerifyReleasdAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean
Dim bOk As Boolean = True
' determino il punto finale dello spostamento
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
Dim dDegRotEndAng As Double = VacuumCups.dDegRotStartAng + dAngDeg
Dim ptEndPointLift As Point3d = VacuumCups.m_ptStartPointLift
Dim dDegRotEndAng As Double = VacuumCups.m_dDegRotStartAng + dAngDeg
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
Dim sInfo As String = String.Empty
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, dDegRotEndAng)
Case 16
' extra corsa sulla c-
EgtGetOutstrokeInfo(sInfo)
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
dDegRotEndAng -= dAngDeg
dAngDeg += VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
@@ -775,7 +851,7 @@ Public Class MoveRawPartPage
Case 34
' extra corsa sulla c+
EgtGetOutstrokeInfo(sInfo)
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
dDegRotEndAng -= dAngDeg
dAngDeg -= VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
@@ -784,11 +860,17 @@ Public Class MoveRawPartPage
bOk = False
End Select
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
VacuumCups.ptStartPointLift = ptEndPointLift
VacuumCups.dDegRotStartAng = dDegRotEndAng
VacuumCups.m_ptStartPointLift = ptEndPointLift
VacuumCups.m_dDegRotStartAng = dDegRotEndAng
Return bOk
End Function
Private Sub RemovePart_KeyCancel(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles m_CurrProjPage.OnKeyCancelDownScene
If e.KeyCode = System.Windows.Forms.Keys.Delete Then
RemovePartBtn_Click(Nothing, Nothing)
End If
End Sub
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
Dim nRawId As Integer = EgtGetFirstSelectedObj()
While nRawId <> GDB_ID.NULL
@@ -856,6 +938,7 @@ Public Class MoveRawPartPage
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
RefreshVisibility()
EgtZoom(ZM.ALL, True)
End Sub
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
@@ -946,7 +1029,7 @@ Public Class MoveRawPartPage
Next
If Not bOkRotate Then Return
Else
' sposto il pezzo in centro tavola perchè tutti i movimenti sono fatti ruotando il pezzo in centro tavola!
' sposto il pezzo in centro tavola, perchè tutti i movimenti sono fatti ruotando il pezzo in centro tavola!
Dim b3Area As New BBox3d
EgtGetTableArea(1, b3Area)
Dim b3RawTemp As New BBox3d
@@ -1003,7 +1086,7 @@ Public Class MoveRawPartPage
Else
EgtMoveRawPart(nRawId, ptRawCen - ptNewRawCen)
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 3)) ' Posizione scelta già occupata
m_CurrProjPage.SetWarningMessage(EgtMsg(90363)) ' Posizione scelta già occupata
End If
' Disabilito pezzo e nascondo le ventose
EgtSetStatus(nRawId, GDB_ST.ON_)
@@ -1291,7 +1374,7 @@ Public Class MoveRawPartPage
Return
End If
' ------- VISUALIZZAZIONE -------
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
If m_SplitPage.m_bShow Then
' verifico se la fase successiva è uno scarico frontale
If NextOperationIsUnloading(m_nCurrDisposition) Then
+77 -81
View File
@@ -1,12 +1,12 @@
<UserControl x:Class="NestPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
<!-- Definizione della NestPage -->
<Grid Name="NestPageGrid">
<Grid.ColumnDefinitions>
@@ -38,39 +38,39 @@
</Grid.RowDefinitions>
<Button Name="PartRotOnBtn" Grid.Column="0" Grid.Row="1"
Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
<Image Source="{DynamicResource PartRotOnImg}" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Name="PartRotOffBtn" Grid.Column="2" Grid.Row="1"
Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
<Image Source="{DynamicResource PartRotOffImg}" HorizontalAlignment="Center"
VerticalAlignment="Center" />
VerticalAlignment="Center" />
</Button>
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
<Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
<Image Source="{DynamicResource LeftArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="MaximizeMoveBtn" Grid.Column="1" Grid.Row="2"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="../Resources/MaxMove.png" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton>
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource RightArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="0" Grid.Row="3" Width="50"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Grid Grid.Column="2" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
@@ -79,83 +79,80 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
Text="°"/>
Text="°"/>
</Grid>
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
VerticalAlignment="Center" />
</Button>
<ToggleButton Name="MagneticPiecesBtn" Grid.Column="1" Grid.Row="4"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource AlignPiecesImg}" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
VerticalAlignment="Center" />
</ToggleButton>
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
VerticalAlignment="Center" />
</Button>
<!--Comandi attivi solo in madalità REG-->
<UniformGrid Name ="UG0_Reg" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" Visibility="Hidden">
<ToggleButton Name="AddPointRegBtn" Visibility="Hidden"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="ModPointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Move-Spot-RegImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="RemovePointRegBtn" Visibility="Hidden"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3">
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource StartWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
<!--Comandi attivi solo in madalità REG-->
<UniformGrid Name ="UG1_Reg" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" Visibility="Hidden">
<Button Name="AdjustPointRegBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Muovi-grezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="ActivatePointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource ON_OFF-REGImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
<!--Comandi attivi solo in madalità REG-->
<UniformGrid Name ="UG0_Reg" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" Visibility="Hidden">
<Button Name="AdjustPointRegBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Muovi-grezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="ActivatePointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource ON_OFF-REGImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3">
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource StartWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource SplitWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="DragRectangleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Drag_RectangleImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource SplitWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<!--Comandi attivi solo in madalità REG-->
<UniformGrid Name ="UG1_Reg" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" Visibility="Hidden">
<Button Visibility="Hidden"/>
<ToggleButton Name="ModPointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Move-Spot-RegImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<Button Visibility="Hidden"/>
</UniformGrid>
<UniformGrid Name ="UG2" Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="3" >
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="ParkIndBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Name="ParkIndImg" Source="{DynamicResource ParkingImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</UniformGrid>
</Grid>
@@ -171,7 +168,6 @@
</Grid.ColumnDefinitions>
</Grid>
</Grid>
</UserControl>
+1031 -918
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -1,9 +1,9 @@
<Window x:Class="OpenFileWD"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
@@ -23,7 +23,7 @@
<Label Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Foreground="White" FontSize="20" VerticalAlignment="Center"/>
<ListBox Name="FileListBox" Grid.Column="1" Grid.Row="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
ItemsSource="{Binding ItemList}"/>
<Grid Grid.Column="1" Grid.Row="4">
<Grid.ColumnDefinitions>
@@ -35,10 +35,10 @@
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
+95
View File
@@ -0,0 +1,95 @@
<UserControl x:Class="SelParkIndWD"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.1*"/>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="0.1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.0*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.0*"/>
</Grid.RowDefinitions>
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
Visibility="Collapsed"/>
<!--TextAlignment="Center"
FontSize="20"
VerticalAlignment="Center"-->
<ListBox Name="ParkIndListBox" Grid.Column="1" Grid.Row="2"
ItemsSource="{Binding ItemList}" ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical" >
<UniformGrid Columns="2" Visibility="{Binding TitleVisibility}">
<StackPanel Orientation="Horizontal">
<Image Source="{Binding ImgTab}" Height="20" Stretch="Uniform"/>
<TextBlock Text="{Binding CountInTab}" Height="20" Width="30">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_ListBoxTextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsStatusON}" Value="False">
<Setter Property="FontStyle" Value="Oblique"/>
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsStatusON}" Value="True">
<Setter Property="Foreground" Value="black"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Image Source="{Binding ImgPark}" Height="20" Stretch="Uniform"/>
<TextBlock Text="{Binding CountInPark}" Height="20" Width="30">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_ListBoxTextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsStatusON}" Value="False">
<Setter Property="FontStyle" Value="Oblique"/>
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsStatusON}" Value="True">
<Setter Property="Foreground" Value="black"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</UniformGrid>
<Image Source="{Binding Img}" Width="120" Stretch="Uniform" Visibility="{Binding MyVisibilityImg}"/>
<Viewbox Name="ViewBoxPark" Visibility="{Binding MyVisibilitySvg}">
<ContentPresenter Content="{Binding LocalMyCanvas.CurrCanvas}"/>
</Viewbox>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Grid Grid.Column="1" Grid.Row="4" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</UserControl>
+918
View File
@@ -0,0 +1,918 @@
Imports System.ComponentModel
Imports System.Globalization
Imports System.Xml
Imports EgtUILib
Imports OmagCUT.NestPageUC
Public Class SelParkIndWD
Private Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_nCtx As Integer = -1
Public Const nIndAllOff As Integer = 999
Public Shared sActualProj As String = String.Empty
Private m_ParkIndList As New List(Of ParkInd)
Public Property ParkIndList As List(Of ParkInd)
Get
Return m_ParkIndList
End Get
Set(value As List(Of ParkInd))
m_ParkIndList = value
End Set
End Property
Sub New(Owner As Window, Optional nCtx As Integer = -1)
'Me.Owner = Owner
InitializeComponent()
If nCtx > -1 Then m_nCtx = nCtx
End Sub
Public Sub Me_Laoded() Handles Me.Loaded
' Aggiorno la lista
UpdateList()
' Imposto la selezione del primo parcheggio disponibile
UpdateDefaultSelection()
End Sub
Public Sub UpdateList()
' Carico lista dei pezzi
LoadParkInd(m_ParkIndList, m_nCtx)
ParkIndListBox.ItemsSource = m_ParkIndList
UpdateDefaultSelection()
' Forzo l'aggiornamento della grafica
ParkIndListBox.Items.Refresh()
End Sub
Public Sub UpdateDefaultSelection()
' Procedo a selezionare il primo (E FORSE ANCHE L'UNICO?) parcheggio attivo
Dim bFound As Boolean = False
For Each ItemPark As ParkInd In m_ParkIndList
If ItemPark.IsStatusON Then
ParkIndListBox.SelectedItem = ItemPark
bFound = True
Exit For
End If
Next
If Not bFound And m_ParkIndList.Count > 0 Then
m_ParkIndList(0).Status = GDB_ST.ON_
ParkIndListBox.SelectedItem = m_ParkIndList(0)
End If
'' Provedo a spegnere tutti gli altri parcheggi
'For Each ItemParkInd As ParkInd In m_ParkIndList
' If ParkIndListBox.SelectedItem.Ind <> ItemParkInd.Ind Then
' ItemParkInd.Status = GDB_ST.OFF
' SetStatusPartInParkInd(ItemParkInd)
' End If
'Next
End Sub
Private Sub ParkIndListBox_SelectionChanged() Handles ParkIndListBox.MouseLeftButtonUp
' Non so se il click sta accendeno o spegnendo quinid faccio una verifica dello stato attuale del parcheggio
Dim localParkInd As ParkInd = ParkIndListBox.SelectedItem
' Se l'elemento selezionato è attivo allora esco (perchè altrimenti lo spegnerei)
If localParkInd.IsStatusON Then Return
Dim bFound As Boolean = False
If localParkInd.Ind = nIndAllOff Then
localParkInd.Status = GDB_ST.ON_
bFound = True
End If
Dim nPartId As Integer = EgtGetFirstPart()
' Cerco il primo pezzo del parcheggio indicato
While nPartId <> GDB_ID.NULL And Not bFound
Dim sInfoParkInd As String = String.Empty
' Se i pezzi non hanno un indice di parcheggio di default vale "0"
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
If localParkInd.Ind.ToString = sInfoParkInd Then
' Determino lo stato da assegnare al parcheggio (prendo il primo pezzo del parcheggio come riferimento)
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
localParkInd.Status = OppositStat
bFound = True
' termino la ricerca
Exit While
End If
nPartId = EgtGetNextPart(nPartId)
End While
' Assegno lo stato del parcheggio a tutti i pezzi i parcheggio
If bFound Then
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
Else
' Significa che i pezzi sono tutti in macchina: quindi i pezzi sono (SICURAMENTE?) accesi
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
localParkInd.Status = OppositStat
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
End If
' Se accendo un parcheggio procedo a spegnere tutto gli atri
If localParkInd.Status = GDB_ST.ON_ Then
For Each ItemParkInd As ParkInd In m_ParkIndList
If localParkInd.Ind <> ItemParkInd.Ind Then
ItemParkInd.Status = GDB_ST.OFF
SetStatusPartInParkInd(ItemParkInd, True, m_nCtx)
End If
Next
End If
EgtZoom(ZM.ALL)
End Sub
#Region "METODI SHARED per gestione della lista parcheggi"
' Restituisce il primo indice di parcheggio libero
Public Shared Function NewParkInd(Optional nCtx As Integer = -1) As Integer
' recupero il contesto corrente
Dim CurrCtx As Integer = EgtGetCurrentContext()
' recupero il contesto del progetto
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
If nCtx > -1 Then ProjCtx = nCtx
EgtSetCurrentContext(ProjCtx)
Dim LastParkInd As Integer = 0
Dim nRawId As Integer = GetCurrentRaw()
' Leggo l'indice di parcheggio dei pezzi in tavola
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
While nPartId <> GDB_ID.NULL
' Se i pezzi non hanno un indice di parcheggio
Dim sInfoParkInd As String = String.Empty
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
If IsNumeric(sInfoParkInd) Then
Dim nInfoParkIndn As Integer = CInt(sInfoParkInd)
LastParkInd = Math.Max(LastParkInd, nInfoParkIndn)
End If
End If
nPartId = EgtGetNextGroup(nPartId)
End While
' Leggo l'indice di parcheggio dei pezzi in parcheggio
nPartId = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
' Se i pezzi non hanno un indice di parcheggio (COPIA della funzione sopra)
Dim sInfoParkInd As String = String.Empty
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
If IsNumeric(sInfoParkInd) Then
Dim nInfoParkIndn As Integer = CInt(sInfoParkInd)
LastParkInd = Math.Max(LastParkInd, nInfoParkIndn)
End If
End If
nPartId = EgtGetNextPart(nPartId)
End While
' Ripristino il contesto corrente
EgtSetCurrentContext(CurrCtx)
Return LastParkInd + 1
End Function
' Gestisce lo stato dei pezzi associati al parcheggio indicato
Public Shared Sub SetStatusPartInParkInd(localParkInd As ParkInd, Optional bDraw As Boolean = True, Optional nCtx As Integer = -1)
If IsNothing(localParkInd) Then Return
' recupero il contesto corrente
Dim CurrCtx As Integer = EgtGetCurrentContext()
' recupero il contesto del progetto
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
If nCtx > -1 Then ProjCtx = nCtx
EgtSetCurrentContext(ProjCtx)
Dim nRawId As Integer = GetCurrentRaw()
' Pezzi in tavola
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
While nPartId <> GDB_ID.NULL
Dim sInfoParkInd As String = String.Empty
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
If localParkInd.Ind.ToString = sInfoParkInd Then
' Salvo lo stato del parcheggio (per gestire la navigazione) ANCHE SE I PEZZI SONO ACCESI
EgtSetInfo(nPartId, INFO_PARKSTATUS, localParkInd.Status)
End If
nPartId = EgtGetNextGroup(nPartId)
End While
' Pezzi in parcheggio
nPartId = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
Dim sInfoParkInd As String = String.Empty
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
If localParkInd.Ind.ToString = sInfoParkInd Then
' Setto lo stato
EgtSetStatus(nPartId, localParkInd.Status)
' Salvo lo stato (per gestire la navigazione)
EgtSetInfo(nPartId, INFO_PARKSTATUS, localParkInd.Status)
End If
nPartId = EgtGetNextPart(nPartId)
End While
If bDraw Then EgtDraw()
' Ripristino il contesto corrente
EgtSetCurrentContext(CurrCtx)
End Sub
' Restituuisce la lista dei parcheggi del progetto corrente
Public Shared Sub LoadParkInd(P_List As List(Of ParkInd), Optional nCtx As Integer = -1)
If IsNothing(P_List) Then Return
P_List.Clear()
P_List.Add(New ParkInd(nIndAllOff, "All off", 0))
' recupero il contesto corrente
Dim CurrCtx As Integer = EgtGetCurrentContext()
' recupero il contesto del progetto
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
If nCtx > -1 Then ProjCtx = nCtx
EgtSetCurrentContext(ProjCtx)
Dim nRawId As Integer = GetCurrentRaw()
' Pezzi in tavola
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
While nPartId <> GDB_ID.NULL
Dim sInfoParkInd As String = String.Empty
Dim nInfoParkInd As Integer = -1
' Recupero l'indice del parcheggio
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
Else
nInfoParkInd = 0
End If
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
If nInfoParkInd > -1 Then
' Verifico se nella lista dei parcheggi è già presente l'indice indicato
Dim localParkInd As ParkInd = P_List.Find(Function(x) x.Ind = nInfoParkInd)
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
If IsNothing(localParkInd) Then
Dim nStatus As Integer
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
' EgtGetStatus(nPartId, nStatus)
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
End If
End If
nPartId = EgtGetNextGroup(nPartId)
End While
' Pezzi in parcheggio
nPartId = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
Dim sInfoParkInd As String = String.Empty
Dim nInfoParkInd As Integer = -1
' Recupero l'indice del parcheggio
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
Else
nInfoParkInd = 0
End If
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
If nInfoParkInd > -1 Then
' Verifico se nella lista dei parcheggi è già presente l'indice indicato
Dim localParkInd As ParkInd = P_List.Find(Function(x) x.Ind = nInfoParkInd)
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
If IsNothing(localParkInd) Then
Dim nStatus As Integer
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
' EgtGetStatus(nPartId, nStatus)
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
End If
End If
nPartId = EgtGetNextPart(nPartId)
End While
EgtSetCurrentContext(CurrCtx)
End Sub
' Aggiorna la lista dei parcheggi, se "bDraw=true" aggiorno la scena
Public Shared Sub UpdateViewOnParkInd(Optional bDraw As Boolean = True)
' Ricarico la lista dei parcheggi
Dim ListParkInd As New List(Of ParkInd)
SelParkIndWD.LoadParkInd(ListParkInd)
' Aggiorna la vista dei parcheggi
For Each Item As ParkInd In ListParkInd
SelParkIndWD.SetStatusPartInParkInd(Item, bDraw)
Next
End Sub
' Restituisce il primo parcheggio attivo (
Public Shared Function GetCurrentParkIndSelected() As ParkInd
Dim ListParkInd As New List(Of ParkInd)
SelParkIndWD.LoadParkInd(ListParkInd)
' Procedo a selezionare il primo (E ANCHE UNICO?..a volte no..) parcheggio attivo -> guarda funzione UpdateList <-
For Each ItemPark As ParkInd In ListParkInd
If ItemPark.IsStatusON Then
Return ItemPark
End If
Next
Return Nothing
End Function
' Restitusice il nome del file immagine del parcheggio (manance solo dell'Indice di parcheggio e dell'esetensione png)
Public Shared Function GetPathCurrProj() As String
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
Dim sParkPath As String = m_MainWindow.GetSaveDir() & "\" & Math.Abs(nProj).ToString("D4") & "_ParkInd_"
If Not String.IsNullOrEmpty(sActualProj) Then
Dim sDir As String = System.IO.Path.GetDirectoryName(sActualProj)
Dim sFile As String = System.IO.Path.GetFileNameWithoutExtension(sActualProj)
sParkPath = sDir & "\" & sFile & "_ParkInd_"
End If
Return sParkPath
End Function
Public Shared Sub CopyImgSvg(sNewFileName As String, Optional nCtx As Integer = -1)
If sNewFileName.EndsWith(".nge") Then
sNewFileName = sNewFileName.Remove(sNewFileName.Length - 4, 4) & "_ParkInd_"
End If
Dim Extension As String = ".svg"
If Not MainWindow.m_bShowSVGParkInd Then Extension = ".png"
Dim ListParkInd As New List(Of ParkInd)
' ricarico la lista
SelParkIndWD.LoadParkInd(ListParkInd, nCtx)
'SelParkIndWD.sActualProj = Path.GetFileNameWithoutExtension(sPath)
For Each ItemParkInd As ParkInd In ListParkInd
If ItemParkInd.Ind <> 0 And ItemParkInd.Ind <> 999 And ItemParkInd.nPartInPark > 0 Then
Try
Dim sNewFile As String = sNewFileName & ItemParkInd.Ind.ToString & Extension
If MainWindow.m_bShowSVGParkInd Then
WriteMyXML(sNewFile, ItemParkInd.LocalMyCanvas)
Else
If System.IO.File.Exists(sNewFile) Then
System.IO.File.Delete(sNewFile)
End If
System.IO.File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
End If
Catch ex As Exception
EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non riuscita")
End Try
End If
Next
End Sub
#End Region ' Metodi Shared
End Class
Public Class ParkInd
Implements INotifyPropertyChanged
Private m_VisbilityAllOff As Visibility = Visibility.Hidden
Private m_Ind As Integer
Public Property Ind As Integer
Get
Return m_Ind
End Get
Set(value As Integer)
m_Ind = value
End Set
End Property
Private m_Name As String
Public Property Name As String
Get
Return m_Name
End Get
Set(value As String)
m_Name = value
End Set
End Property
Private m_Img As String = String.Empty
Public Property Img As String
Get
Return m_Img
End Get
Set(value As String)
m_Img = value
NotifyPropertyChanged("MyVisibilityImg")
End Set
End Property
Private m_Svg As String = String.Empty
Public Property Svg As String
Get
Return m_Svg
End Get
Set(value As String)
m_Svg = value
NotifyPropertyChanged("MyVisibilitySvg")
End Set
End Property
Private m_nPartInTable As Integer = 0
Public Property nPartInTable As Integer
Get
Return m_nPartInTable
End Get
Set(value As Integer)
m_nPartInTable = value
NotifyPropertyChanged(NameOf(nPartInTable))
End Set
End Property
Private m_nPartInPark As Integer = GDB_ST.ON_
Public Property nPartInPark As Integer
Get
Return m_nPartInPark
End Get
Set(value As Integer)
m_nPartInPark = value
NotifyPropertyChanged(NameOf(nPartInPark))
End Set
End Property
Public ReadOnly Property CountInTab As String
Get
Return m_nPartInTable.ToString
End Get
End Property
Public ReadOnly Property ImgTab As String
Get
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\table.png"
End Get
End Property
Public ReadOnly Property CountInPark As String
Get
Return m_nPartInPark.ToString
End Get
End Property
Public ReadOnly Property ImgPark As String
Get
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park.png"
End Get
End Property
Private m_Status As Integer
Public Property Status As Integer
Get
Return m_Status
End Get
Set(value As Integer)
m_Status = value
NotifyPropertyChanged(NameOf(IsStatusON))
End Set
End Property
Public ReadOnly Property IsStatusON As Boolean
Get
Return (m_Status = GDB_ST.ON_)
End Get
End Property
Public ReadOnly Property MyVisibilityTmg As Visibility
Get
Return If(Not System.IO.File.Exists(m_Img), Visibility.Collapsed, Visibility.Visible)
End Get
End Property
Public ReadOnly Property MyVisibilitySvg As Visibility
Get
Return If(Not System.IO.File.Exists(m_Svg), Visibility.Collapsed, Visibility.Visible)
End Get
End Property
Public ReadOnly Property TitleVisibility As Visibility
Get
Return If(m_Ind = 999, m_VisbilityAllOff, Visibility.Visible)
End Get
End Property
Private m_LocalMyCanvas As MyCanvas
Public ReadOnly Property LocalMyCanvas As MyCanvas
Get
Return m_LocalMyCanvas
End Get
End Property
Sub New(Ind As Integer, Name As String, Stat As Integer)
m_Ind = Ind
m_Name = Name
m_Status = Stat
Dim MyMainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
' Costruisco il percorso immagine
If m_Ind = 0 Then
m_Img = MyMainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.png"
m_Svg = MyMainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.svg"
ElseIf m_Ind = 999 Then
m_Img = MyMainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.png"
m_Svg = MyMainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.svg"
Else
m_Img = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".png"
m_Svg = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".svg"
End If
If MainWindow.m_bShowSVGParkInd Then
Dim CanvWidth As Integer = 145
Dim CanvHeight As Integer = CInt(CanvWidth / 1.4)
m_LocalMyCanvas = New MyCanvas(CanvWidth, CanvHeight)
If System.IO.File.Exists(m_Svg) Then
ReadMyXML(m_Svg, m_LocalMyCanvas)
m_Img = ""
End If
Else
m_Svg = ""
End If
' Conto il numero di pezzi in Tavola
CountPartInTable()
' Conto il numero di pezzi in parcheggio
CountPartInPark()
End Sub
' Conta in numero di pezzi di questo parcheggio in Tavola
Private Sub CountPartInTable()
Dim nCount As Integer = 0
Dim nRawId As Integer = GetCurrentRaw()
' Leggo l'indice di parcheggio dei pezzi in tavola
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
While nPartId <> GDB_ID.NULL
' Aggiorno il valore del contatore
If IncreaseCounterPart(nPartId, nCount) Then
UpdateEntInCanvas(nPartId, 0.2)
End If
nPartId = EgtGetNextGroup(nPartId)
End While
m_nPartInTable = nCount
End Sub
' Conta il numero di pezzi di questo parcheggio in Parcheggio
Private Sub CountPartInPark()
Dim nCount As Integer = 0
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
' Aggiorno il valore del contatore
If IncreaseCounterPart(nPartId, nCount) Then
UpdateEntInCanvas(nPartId, 1)
End If
nPartId = EgtGetNextPart(nPartId)
End While
m_nPartInPark = nCount
End Sub
Private Sub UpdateEntInCanvas(nPartId, dOpacity)
If Not IsNothing(m_LocalMyCanvas) Then
' modifico il colore del pezzo nel SVG
Dim nIdRegion As Integer = EgtGetFirstNameInGroup(nPartId, "Region")
If nIdRegion <> GDB_ID.NULL Then
Dim nIdEnt As Integer = EgtGetFirstInGroup(nIdRegion)
While nIdEnt <> GDB_ID.NULL
If EgtGetType(nIdEnt) = GDB_TY.SRF_FRGN Then
Exit While
End If
End While
If nIdEnt <> GDB_ID.NULL Then
Dim sName As String = ""
EgtGetName(nIdEnt, sName)
Dim Idpath As MyPath = m_LocalMyCanvas.ListPath.Find(Function(x) x.id = sName)
If Not IsNothing(Idpath) Then
Idpath.fill_opacity = dOpacity
m_LocalMyCanvas.UpdateMyPath(Idpath)
Idpath.LoadPath()
NotifyPropertyChanged(NameOf(LocalMyCanvas))
End If
End If
End If
End If
End Sub
' Verifica se il pezzo passato (da parcheggio o tavola) appartiene al ParkInd corrente e quindi aggiorna il valore di nCount+=1
Private Function IncreaseCounterPart(nPartId As Integer, ByRef nCount As Integer) As Boolean
Dim bOk As Boolean = False
' Se i pezzi non hanno un indice di parcheggio
Dim sInfoParkInd As String = String.Empty
Dim nInfoParkInd As Integer = -1
' Recupero l'indice del parcheggio
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
Else
nInfoParkInd = 0
End If
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
If nInfoParkInd > -1 Then
' e uguale a quallo del parcheggio correntemente selezionato
If nInfoParkInd = m_Ind Then
nCount = nCount + 1
bOk = True
End If
End If
Return bOk
End Function
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class
#Region "ELEMENTI PER LA GESTIONE SVG"
Public Class MyCanvas
Private m_CurrCanvas As New Canvas
Public Property CurrCanvas As Canvas
Get
Return m_CurrCanvas
End Get
Set(value As Canvas)
m_CurrCanvas = value
End Set
End Property
Private m_ListPath As New List(Of MyPath)
Public Property ListPath As List(Of MyPath)
Get
Return m_ListPath
End Get
Set(value As List(Of MyPath))
m_ListPath = value
End Set
End Property
Private m_ViewBoxDim As String
Public Property ViewBoxDim As String
Get
Return m_ViewBoxDim
End Get
Set(value As String)
m_ViewBoxDim = value
End Set
End Property
Sub New(Width As Integer, Height As Integer)
m_CurrCanvas.Width = Width
m_CurrCanvas.Height = Height
m_CurrCanvas.ClipToBounds = True
End Sub
Public Sub LoadCanvas()
For Each ItemPath As MyPath In m_ListPath
m_CurrCanvas.Children.Add(ItemPath.CurrPath)
Next
End Sub
Public Sub UpdateMyPath(CurrPath As MyPath)
m_CurrCanvas.Children.Remove(CurrPath.CurrPath)
m_CurrCanvas.Children.Add(CurrPath.CurrPath)
End Sub
End Class
Public Class MyPath
Private m_CurrPath As New System.Windows.Shapes.Path
Public Property CurrPath As System.Windows.Shapes.Path
Get
Return m_CurrPath
End Get
Set(value As System.Windows.Shapes.Path)
m_CurrPath = value
End Set
End Property
Private m_CanvX As Double
Public ReadOnly Property CanvX As Double
Get
Return m_CanvX
End Get
End Property
Private m_CanvY As Double
Public ReadOnly Property CanvY As Double
Get
Return m_CanvY
End Get
End Property
Private m_DimX As Double
Public ReadOnly Property DimX As Double
Get
Return m_DimX
End Get
End Property
Private m_DimY As Double
Public ReadOnly Property DimY As Double
Get
Return m_DimY
End Get
End Property
Private m_id As String
Public ReadOnly Property id As String
Get
Return m_id
End Get
End Property
Private m_d As String
Public ReadOnly Property d As String
Get
Return m_d
End Get
End Property
Private m_fill As String
Public Property fill As String
Get
Return m_fill
End Get
Set(value As String)
m_fill = value
End Set
End Property
Private m_fill_opacity As Double
Public Property fill_opacity As Double
Get
Return m_fill_opacity
End Get
Set(value As Double)
m_fill_opacity = value
End Set
End Property
Private m_stroke As String
Public Property stroke As String
Get
Return m_stroke
End Get
Set(value As String)
m_stroke = value
End Set
End Property
Private m_stroke_opacity As Double
Public Property stroke_opacity As Double
Get
Return m_stroke_opacity
End Get
Set(value As Double)
m_stroke_opacity = value
End Set
End Property
Private m_stroke_width As Double
Public Property stroke_width As Double
Get
Return m_stroke_width
End Get
Set(value As Double)
m_stroke_width = value
End Set
End Property
Sub New(Id As String, D As String, CanvX As Double, CanvY As Double, DimX As Double, DimY As Double, Fill As String, FillOpacity As Double, Stroke As String, StrokeOpacity As Double)
m_id = Id
m_d = D
m_CanvX = CanvX
m_CanvY = CanvY
m_DimX = DimX
m_DimY = DimY
m_fill = Fill
m_fill_opacity = FillOpacity
m_stroke = Stroke
m_stroke_opacity = StrokeOpacity
LoadPath()
End Sub
Public Sub LoadPath()
' Carico la geometria
m_CurrPath.Data = Geometry.Parse(d)
' Carico il colore di sfondo
SetBrushFromRGBString(m_fill, m_CurrPath.Fill)
' Applico l'opacità della superificie
m_CurrPath.Opacity = m_fill_opacity
' Calcolo e applico la traslazione e la scalatura
Dim myTransformGroup As New TransformGroup()
Dim ScaleX As Double = m_CanvX / DimX
Dim ScaleY As Double = m_CanvY / DimY
Dim OffX As Double = (m_CanvX - Math.Min(ScaleX, ScaleY) * DimX) / 2
Dim OffY As Double = (m_CanvY - Math.Min(ScaleX, ScaleY) * DimY) / 2
myTransformGroup.Children.Add(New ScaleTransform(Math.Min(ScaleX, ScaleY), Math.Min(ScaleX, ScaleY)))
myTransformGroup.Children.Add(New TranslateTransform(OffX, OffY))
m_CurrPath.RenderTransform = myTransformGroup
End Sub
Private Sub SetBrushFromRGBString(sFill As String, ByRef brFill As Brush)
If String.IsNullOrEmpty(sFill) Then
brFill = Brushes.DarkRed
Return
End If
Dim s1 As String = sFill
If s1.Contains("rgb") Then
s1 = s1.Replace("rgb(", "")
s1 = s1.Replace(")", "")
Dim s2 As String = ""
For Each s As String In s1.Split(",")
s2 &= CInt(s).ToString("x2")
Next
brFill = New BrushConverter().ConvertFrom("#" & s2)
End If
End Sub
End Class
Public Module XMLReader
Public Sub ReadMyXML(FilePath As String, Canv As MyCanvas)
'Create the XML Reader
Dim m_xmlr As XmlTextReader = New XmlTextReader(FilePath)
'Disable whitespace so that you don't have to read over whitespaces
m_xmlr.WhitespaceHandling = WhitespaceHandling.None
' Leggo la prima riga: '?xml' tag
m_xmlr.Read()
' Passo a leggere la successiva: 'svg' tag
m_xmlr.Read()
' Leggo gli attributi di questo tag (dimensioni)
Dim ViewBoxDim = m_xmlr.GetAttribute("viewBox")
Canv.ViewBoxDim = ViewBoxDim
' Elaboro i dati per avere la scalatura del disegno
Dim DimViewBox As String() = ViewBoxDim.ToString.Split(" ")
Dim DimX As Integer = Math.Abs(CInt(DimViewBox(2))) + Math.Abs(CInt(DimViewBox(0)))
Dim DimY As Integer = Math.Abs(CInt(DimViewBox(3))) + Math.Abs(CInt(DimViewBox(1)))
' Leggo in loop i tag: 'path'
While Not m_xmlr.EOF
m_xmlr.Read()
If Not m_xmlr.IsStartElement() Then
Continue While
End If
' recupero il valore dell'attributo 'id'
Dim idAttribute = m_xmlr.GetAttribute("id")
' recupero il valore dell'attributo 'd'
Dim dAttribute = m_xmlr.GetAttribute("d")
' recupero il valore dell'attributo 'fill'
Dim fillAttribute = m_xmlr.GetAttribute("fill")
' recupero il valore dell'attributo 'fill-opacity'
Dim fillOpacityAttribute = m_xmlr.GetAttribute("fill-opacity")
' recupero il valore dell'attributo 'stroke'
Dim strokeAttribute = m_xmlr.GetAttribute("stroke")
' recupero il valore dell'attributo 'stroke-opacity'
Dim strokeOpacityAttribute = m_xmlr.GetAttribute("stroke-opacity")
' recupero il valore dell'attributo 'stroke - Width'
Dim strokeWidthAttribute = m_xmlr.GetAttribute("stroke-width")
' carico l'elemento in lista solo se esiste un'immagine
If Not String.IsNullOrEmpty(idAttribute) And Not String.IsNullOrEmpty(dAttribute) Then
Dim fillOpacity As Double = 1 ' CDbl(fillOpacityAttribute)
StringToDouble(fillOpacityAttribute, fillOpacity)
Dim strokeOpacity As Double = 1 ' CDbl(strokeOpacityAttribute)
StringToDouble(strokeOpacityAttribute, strokeOpacity)
Canv.ListPath.Add(New MyPath(idAttribute, dAttribute, Canv.CurrCanvas.Width, Canv.CurrCanvas.Height, DimX, DimY, fillAttribute, fillOpacity, strokeAttribute, strokeOpacity))
End If
End While
' Libero il file dalla lettura
m_xmlr.Close()
' popolo la canvas con le Path che ho caricato
Canv.LoadCanvas()
End Sub
Public Sub WriteMyXML(FilePath As String, Canv As MyCanvas)
Dim _namespaceDefault As String = "http://www.w3.org/2000/svg"
Dim doc As New Xml.XmlDocument
Dim elm As System.Xml.XmlNode
Dim elmSub As System.Xml.XmlNode
Dim elmMain As Xml.XmlNode
doc = New Xml.XmlDocument
elmMain = doc.CreateElement("svg")
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("viewBox"))
elmSub.Value = Canv.ViewBoxDim
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("xmlns"))
elmSub.Value = _namespaceDefault
For Each itemPath As MyPath In Canv.ListPath
elm = elmMain.AppendChild(doc.CreateElement("path"))
elmSub = elm.Attributes.Append(doc.CreateAttribute("id"))
elmSub.Value = itemPath.id
elmSub = elm.Attributes.Append(doc.CreateAttribute("d"))
elmSub.Value = itemPath.d
If Not String.IsNullOrEmpty(itemPath.fill) Then
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill"))
elmSub.Value = itemPath.fill
End If
If Not String.IsNullOrEmpty(itemPath.fill_opacity) Then
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill-opacity"))
elmSub.Value = itemPath.fill_opacity.ToString(CultureInfo.InvariantCulture)
End If
If Not String.IsNullOrEmpty(itemPath.stroke) Then
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke"))
elmSub.Value = itemPath.stroke
End If
If Not String.IsNullOrEmpty(itemPath.stroke_opacity) Then
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-opacity"))
elmSub.Value = itemPath.stroke_opacity.ToString(CultureInfo.InvariantCulture)
End If
If Not String.IsNullOrEmpty(itemPath.stroke_width) Then
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-width"))
elmSub.Value = itemPath.stroke_width.ToString(CultureInfo.InvariantCulture)
End If
Next
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "UTF-8", ""))
doc.AppendChild(elmMain)
doc.Save(FilePath)
End Sub
End Module
#End Region ' Elementi per la gestione SVG
+54 -53
View File
@@ -5,68 +5,69 @@
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="SaveNameWD" Height="200" Width="400" ShowInTaskbar="False">
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
<Border Style="{DynamicResource OmagCut_Border}">
<Grid x:Name="SaveNameGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.3*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/>
</Grid.RowDefinitions>
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
<Border Style="{DynamicResource OmagCut_Border}">
<Grid x:Name="SaveNameGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.3*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/>
<!--Messaggio: Seleziona il numero di pezzi-->
<TextBlock Name="TitleWDTxbl" Grid.Column="1" Grid.Row="1"
</Grid.RowDefinitions>
<!--Messaggio: Seleziona il numero di pezzi-->
<TextBlock Name="TitleWDTxbl" Grid.Column="1" Grid.Row="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<UniformGrid Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Columns="2">
<TextBlock Name="NbrOfPartsMsg"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="NbrOfParts"
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
</UniformGrid>
<UniformGrid Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Columns="2">
<TextBlock Name="NbrOfPartsMsg"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="NbrOfParts"
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
</UniformGrid>
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
<Grid.ColumnDefinitions>
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<!--ultimo progetto-->
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
<!--ultimo progetto-->
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
ToolTip="Confirm">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<!--nuovo progetto-->
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
ToolTip="Select all" Visibility="Collapsed">
<Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<!--apri folder progetti-->
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
ToolTip="Cancel">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<!--nuovo progetto-->
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
ToolTip="Select all" Visibility="Collapsed">
<Image Source="{DynamicResource NuovoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<!--apri folder progetti-->
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
ToolTip="Cancel">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Grid>
</Grid>
</Border>
</Border>
</Window>
+2 -2
View File
@@ -33,8 +33,8 @@
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
TitleWDTxbl.Text = "Selection parts"
NbrOfPartsMsg.Text = "Number of parts"
TitleWDTxbl.Text = EgtUILib.EgtMsg(91232) ' Selection parts
NbrOfPartsMsg.Text = EgtUILib.EgtMsg(91233) ' Number of parts
NbrOfParts.Text = m_NumberOfParts.ToString
End Sub
+82
View File
@@ -0,0 +1,82 @@
<Window x:Class="SelectTableWD"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Title="ChooseTool" Height="282.6" Width="326.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="1.0*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="TableListMsg" Grid.Row="1" Grid.Column="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<ItemsControl Name="TableList"
Grid.Row="2" Grid.Column="1">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="TabGrp"
IsChecked="{Binding IsActive}"
Width="60" Height="60">
<RadioButton.Style>
<Style TargetType="ToggleButton" BasedOn="{StaticResource OmagCut_ToggleButton}">
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Foreground" Value="white"/>
<Setter Property="Background" Value="{StaticResource OmagCut_Blue}"/>
</Trigger>
</Style.Triggers>
</Style>
</RadioButton.Style>
<Grid>
<TextBlock Text="{Binding sName}" Background="Transparent"/>
<Image Source="{Binding ImgTab}" Margin="0,10,0,0"
Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Grid>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Grid.Column="1" Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
+96
View File
@@ -0,0 +1,96 @@
Imports System.ComponentModel
Public Class SelectTableWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_nSelectedTable As Integer = 0
Public ReadOnly Property nSelectedTable As Integer
Get
Return m_nSelectedTable
End Get
End Property
Sub New(Owner As Window)
Me.Owner = Owner
Me.WindowStartupLocation = WindowStartupLocation.CenterOwner
InitializeComponent()
End Sub
Public CurrTableList As New List(Of TableToChange)
Private Sub ChangeTable_Initialized() Handles Me.Initialized
TableListMsg.Text = EgtUILib.EgtMsg(91234) ' Seleziona la tavola da usare
' recuepero l'inidce della tavola corrente
Dim nIndeXCurrTab As Integer = GetCurrentTable()
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
For nInd As Integer = 0 To GetTableCount() - 1
CurrTableList.Add(New TableToChange("Tab", (nInd + 1).ToString, ((nInd + 1) = nIndeXCurrTab)))
Next
End Sub
Private Sub ChangeTable_Loaded() Handles Me.Loaded
TableList.ItemsSource = CurrTableList
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
' recupero l'indice della tavola impostata
For Each ItemTab As TableToChange In CurrTableList
If ItemTab.IsActive Then
m_nSelectedTable = ItemTab.nIndex
Exit For
End If
Next
DialogResult = True
End Sub
End Class
Public Class TableToChange
Implements INotifyPropertyChanged
Private Property m_sName As String = "Tab"
Public ReadOnly Property sName As String
Get
Return m_sName
End Get
End Property
Public ReadOnly Property ImgTab As String
Get
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\table.png"
End Get
End Property
Private Property m_nIndex As Integer = 3
Public ReadOnly Property nIndex As Integer
Get
Return m_nIndex
End Get
End Property
Private m_bIsActive As Boolean = False
Public Property IsActive As Boolean
Get
Return m_bIsActive
End Get
Set(value As Boolean)
m_bIsActive = value
NotifyPropertyChanged("IsActive")
End Set
End Property
Public Sub New(Name As String, Ind As Integer, IsCurrent As Boolean)
m_sName = Name & " " & Ind.ToString
m_nIndex = Ind
m_bIsActive = IsCurrent
NotifyPropertyChanged("IsActive")
End Sub
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class
+197 -129
View File
@@ -1,6 +1,4 @@
Imports System.Net
Imports System.Windows.Forms.Integration
Imports EgtUILib
Imports EgtUILib
Public Module SplitAuto
@@ -38,6 +36,10 @@ Public Module SplitAuto
Public m_dStartFreeLen As Double
Public m_dEndFreeLen As Double
Public m_vtDir As Vector3d
' ver 2.6f4: tagli corti gestiti con LeadIn.OUT/LeadOut.OUT
Public m_bMngLeadInOnIntCorner As Boolean
' ver 2.7e1: tagli finali
Public m_bFinalCut As Boolean
End Class
'-----------------------------------------------------------------------------------------------
@@ -49,128 +51,178 @@ Public Module SplitAuto
While nOperId <> GDB_ID.NULL
' verifico sia una lavorazione valida della fase corrente
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
' se appartiene ad un grezzo attivo la inserisco in lista
If IsMachiningInActiveRaw(nOperId) Then
Dim Mach As New SplitMach
Mach.m_nEntId = GDB_ID.NULL
' identificativo
Mach.m_nId = nOperId
' eventuali lavorazioni inglobate
Dim sInfo As String = String.Empty
If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
Dim sItems() As String = sInfo.Split(",".ToCharArray)
For Each sId As String In sItems
Dim nId As Integer = 0
StringToInt(sId, nId)
If nId > 0 Then Mach.m_vOthId.Add(nId)
Next
End If
' tipo
Mach.m_nType = EgtGetOperationType(nOperId)
' layer di origine
EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
' se taglio con lama
If Mach.m_nType = MCH_OY.SAWING Then
' verifica interferenza
If Mach.m_sLay = NAME_OUTLOOP Then
EgtVerifyMachining(nOperId, Mach.m_nInterf)
For Each nId As Integer In Mach.m_vOthId
Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
EgtVerifyMachining(nId, nRes)
Mach.m_nInterf = Mach.m_nInterf Or nRes
Next
Else
Mach.m_nInterf = FMI_TYPE.NONE
End If
' la imposto come lavorazione corrente
EgtSetCurrMachining(nOperId)
' inversione
EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
' recupero l'angolo di fianco
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
Dim dStartAddLen As Double = -10
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
Dim dEndAddLen As Double = -10
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
Mach.m_bIsLine = True
Mach.m_dPrevAng = 0
Mach.m_dNextAng = 0
Mach.m_dStartFreeLen = FREELEN_INF + 1
Mach.m_dEndFreeLen = FREELEN_INF + 1
Dim nEntId, nSub As Integer
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
Mach.m_nEntId = nEntId
End If
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL) And
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL And (nRes And CAR_RES.LI_OK) <> 0) And
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL And (nRes And CAR_RES.LO_OK) <> 0) And
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine
If nRes = 0 Then
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
End If
End If
' se trasformabile in taglio di separazione, verifico se lo è
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
EgtSetCurrMachining(nOperId)
Dim nLiType As Integer
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
Dim nLoType As Integer
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
Else
Mach.m_bStartAll = False
Mach.m_bEndAll = False
End If
' Waterjet
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
Mach.m_nInterf = FMI_TYPE.NONE
' recupero l'angolo di fianco
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
Mach.m_bCanStartAll = False
Mach.m_bCanEndAll = False
Mach.m_bStartAll = False
Mach.m_bEndAll = False
' Forature e fresature
Else
Mach.m_nInterf = FMI_TYPE.NONE
Mach.m_dSideAng = 0
Mach.m_bCanStartAll = False
Mach.m_bCanEndAll = False
Mach.m_bStartAll = False
Mach.m_bEndAll = False
End If
' abilitazione
Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
' pausa
Mach.m_bPause = GetPause(nOperId)
' inserisco in lista
MachSplitList.Add(Mach)
' altrimenti la disattivo
Else
EgtSetOperationMode(nOperId, False)
End If
Dim Mach As New SplitMach
If CreateMach(nOperId, Mach) Then MachSplitList.Add(Mach)
End If
nOperId = EgtGetNextOperation(nOperId)
End While
Return True
End Function
Friend Function CreateMach(nOperId As Integer, ByRef Mach As SplitMach) As Boolean
Dim bOk As Boolean = True
' se appartiene ad un grezzo attivo la inserisco in lista
If IsMachiningInActiveRaw(nOperId) Then
Mach.m_nEntId = GDB_ID.NULL
' identificativo
Mach.m_nId = nOperId
' eventuali lavorazioni inglobate
Dim sInfo As String = String.Empty
If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
Dim sItems() As String = sInfo.Split(",".ToCharArray)
For Each sId As String In sItems
Dim nId As Integer = 0
StringToInt(sId, nId)
If nId > 0 Then Mach.m_vOthId.Add(nId)
Next
End If
' tipo
Mach.m_nType = EgtGetOperationType(nOperId)
' layer di origine
EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
' se taglio con lama
If Mach.m_nType = MCH_OY.SAWING Then
' verifica interferenza
If Mach.m_sLay = NAME_OUTLOOP Then
EgtVerifyMachining(nOperId, Mach.m_nInterf)
For Each nId As Integer In Mach.m_vOthId
Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
EgtVerifyMachining(nId, nRes)
Mach.m_nInterf = Mach.m_nInterf Or nRes
Next
Else
Mach.m_nInterf = FMI_TYPE.NONE
End If
' la imposto come lavorazione corrente
EgtSetCurrMachining(nOperId)
' inversione
EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
' recupero l'angolo di fianco
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
Dim dStartAddLen As Double = -10
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
Dim dEndAddLen As Double = -10
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
Mach.m_bIsLine = True
Mach.m_dPrevAng = 0
Mach.m_dNextAng = 0
Mach.m_dStartFreeLen = FREELEN_INF + 1
Mach.m_dEndFreeLen = FREELEN_INF + 1
Dim nEntId, nSub As Integer
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
Mach.m_nEntId = nEntId
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
End If
Mach.m_bFinalCut = False
EgtGetInfo(nOperId, "FinalCut", Mach.m_bFinalCut)
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
Mach.m_sLay = NAME_OUTLOOP And (Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
Dim bIn As Boolean = False
Dim bOut As Boolean = False
CanExtendSides(Mach, bIn, bOut)
Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
If nRes = 0 Then
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
End If
ElseIf (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
Mach.m_sLay = NAME_OUTLOOP And
(Mach.m_nInterf = FMI_TYPE.LI Or Mach.m_nInterf = FMI_TYPE.LO Or Mach.m_nInterf = FMI_TYPE.RM) Then
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
Dim bIn As Boolean = False
Dim bOut As Boolean = False
CanExtendSides(Mach, bIn, bOut)
' And (nRes And CAR_RES.LI_OK) <> 0 : da aggiungere
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn And
Mach.m_nInterf <> FMI_TYPE.LI
' And (nRes And CAR_RES.LO_OK) <> 0 : da aggiungere come sopra
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut And
Mach.m_nInterf <> FMI_TYPE.LO
If nRes = 0 Then
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
End If
End If
' se trasformabile in taglio di separazione, verifico se lo è
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
EgtSetCurrMachining(nOperId)
Dim nLiType As Integer
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
Dim nLoType As Integer
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
Else
Mach.m_bStartAll = False
Mach.m_bEndAll = False
End If
' Waterjet
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
Mach.m_nInterf = FMI_TYPE.NONE
' recupero l'angolo di fianco
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
Mach.m_bCanStartAll = False
Mach.m_bCanEndAll = False
Mach.m_bStartAll = False
Mach.m_bEndAll = False
' Forature e fresature
Else
Mach.m_nInterf = FMI_TYPE.NONE
Mach.m_dSideAng = 0
Mach.m_bCanStartAll = False
Mach.m_bCanEndAll = False
Mach.m_bStartAll = False
Mach.m_bEndAll = False
End If
' abilitazione
Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
' pausa
Mach.m_bPause = GetPause(nOperId)
Else
' altrimenti la disattivo
EgtSetOperationMode(nOperId, False)
bOk = False
End If
Return bOk
End Function
Private Function CanExtendSides(CurrMach As SplitMach, ByRef bIn As Boolean, ByRef bOut As Boolean) As Boolean
If CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng > EPS_ANG_SMALL Then
' Posso estendere SOLO l'uscita
bOut = True
bIn = False
ElseIf CurrMach.m_dPrevAng > EPS_ANG_SMALL And CurrMach.m_dNextAng < -EPS_ANG_SMALL Then
' Posso estendere SOLO l'ingresso
bIn = True
bOut = False
ElseIf CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng < -EPS_ANG_SMALL Then
' NON Posso estendere
bIn = False
bOut = False
Else
bIn = True
bOut = True
End If
Return True
End Function
'-----------------------------------------------------------------------------------------------
' calcolo il numero di tipi di lavorazioni
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
@@ -189,18 +241,20 @@ Public Module SplitAuto
Dim bEnabled As Boolean = MachSplit.m_bEnabled
Dim nInterf As Integer = If(bReset, FMI_TYPE.NONE, MachSplit.m_nInterf)
' Colore della lavorazione principale
ColorSingleMachining(MachSplit.m_nId, MachSplit.m_sLay, MachSplit.m_dSideAng, bEnabled, nInterf)
ColorSingleMachining(MachSplit.m_nId, MachSplit.m_nType, MachSplit.m_sLay, MachSplit.m_dSideAng, bEnabled, nInterf)
' Colore delle lavorazioni inglobate
For Each nId As Integer In MachSplit.m_vOthId
ColorSingleMachining(nId, MachSplit.m_sLay, MachSplit.m_dSideAng, bEnabled, nInterf)
ColorSingleMachining(nId, MachSplit.m_nType, MachSplit.m_sLay, MachSplit.m_dSideAng, bEnabled, nInterf)
Next
EgtEnableModified()
End Sub
Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
Private Sub ColorSingleMachining(nOperId As Integer, nOperType As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
' Verifico se è un taglio da sopra o da sotto
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or (sLay = NAME_INLOOP AndAlso EgtExistsInfo(nOperId, INFO_FILOTOP)))
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
' Verifico se macchina con cambio utensile per lama
Dim bSawTc As Boolean = ( m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW)
' Recupero il preview della lavorazione
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
@@ -235,11 +289,25 @@ Public Module SplitAuto
colCut = COL_MCH_ONCUT()
ElseIf bDrip Then
colCut = COL_MCH_DRIPCUT()
ElseIf Math.Abs(dSideAng) > EPS_ANG_SMALL Then
ElseIf nOperType = MCH_OY.WATERJETTING Then
If Math.Abs(dSideAng) > EPS_ANG_SMALL then
colCut = COL_MCH_WJ_ANG()
Else
colCut = COL_MCH_WJ()
End If
ElseIf nOperType = MCH_OY.SAWING AndAlso bSawTc Then
Dim sSawing As String = String.Empty, sSaw As String = String.Empty
m_MainWindow.m_CadCutPageUC.m_SplitPage.GetMachiningAndTool(nOperId, sSawing, sSaw)
' Setto l'utensile corrente
EgtTdbSetCurrTool(sSaw)
' recupero il colore della lavorazione direttamente dall'utensile
colCut = Utility.GetColorPV()
ElseIf nOperType = MCH_OY.SAWING AndAlso Math.Abs(dSideAng) > EPS_ANG_SMALL Then
colCut = COL_MCH_CUT_ANG()
Else
colCut = COL_MCH_CUT()
End If
For Each nId In vCutId
EgtSetColor(nId, colCut)
Next
@@ -485,7 +553,7 @@ Public Module SplitAuto
' Reinserisco tutte le lavorazioni
Dim nWarn As Integer = 0
AddMachinings(GDB_ID.NULL, nWarn)
If nWarn = 1 Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
If nWarn = 1 Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
' Carico ventose
LoadVacuumCups()
' Lancio calcolo separazione
@@ -799,13 +867,13 @@ Public Module SplitAuto
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
vtMove As Vector3d, dMinMove As Double) As Boolean
Dim bTwoHeadVac As Boolean = ( EgtGetHeadId( VACUUM_HEAD_2) <> GDB_ID.NULL)
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
Dim rmData As New RawMoveData
Dim vtMove2 As Vector3d = -vtMove
VacuumCups.ResetHeadName()
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
If Not bPutVacuum And bTwoHeadVac Then bPutVacuum= PutVacuumCupsOnRaw(vNewRaws(1), rmData)
If Not bPutVacuum And bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
If bPutVacuum AndAlso SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
rmData.m_vtRawMove = vtMove
SaveOneMoveInfoInDisposition(nDispId, rmData)
@@ -826,9 +894,9 @@ Public Module SplitAuto
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
' Spostamento originale
Dim vtOriMove As New Vector3d( vtMove)
Dim vtOriMove As New Vector3d(vtMove)
' Livello di movimento
Dim nMoveLevel As Integer = GetPrivateProfileInt( S_SPLIT, K_MOVE_LEV, 5, m_MainWindow.GetIniFile())
Dim nMoveLevel As Integer = GetPrivateProfileInt(S_SPLIT, K_MOVE_LEV, 5, m_MainWindow.GetIniFile())
Dim nMove As Integer = 1
' Se esce dalla tavola, movimento già annullato ed esco con errore
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
@@ -863,7 +931,7 @@ Public Module SplitAuto
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += 0.5 * vtOriMove
nMove += 1
If nMoveLevel = nMove Then return True
If nMoveLevel = nMove Then Return True
Else
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
End If
+70 -39
View File
@@ -1,10 +1,10 @@
<UserControl x:Class="SplitPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SplitPageUC_Initialized">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SplitPageUC_Initialized">
<!-- Definizione della SplitPage -->
<Grid Name="SplitPageGrid" >
@@ -35,10 +35,10 @@
</Grid.ColumnDefinitions>
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<TransformGroup>
<RotateTransform Angle="180"/>
@@ -64,24 +64,49 @@
</Grid.RowDefinitions>
<ListBox Name="MachiningLsBx" Grid.Row="1"
SelectionMode="Extended">
SelectionMode="Extended">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding bIsActive}" Value="False">
<Setter Property="TextDecorations" Value="Strikethrough"/>
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
</DataTrigger>
<DataTrigger Binding="{Binding bIsActive}" Value="True">
<Setter Property="Foreground" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<Grid Width="210">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2.8*"/>
<ColumnDefinition Width="1.2*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Name}">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding bIsActive}" Value="False">
<Setter Property="TextDecorations" Value="Strikethrough"/>
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
</DataTrigger>
<DataTrigger Binding="{Binding bIsActive}" Value="True">
<Setter Property="Foreground" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Grid.Column="1" Text="{Binding TCPos}">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding bIsActive}" Value="False">
<Setter Property="TextDecorations" Value="Strikethrough"/>
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
</DataTrigger>
<DataTrigger Binding="{Binding bIsActive}" Value="True">
<Setter Property="Foreground" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<Rectangle Grid.Column="2"
Visibility="{Binding MachiningTCPosVisibility}"
Style="{DynamicResource Rect_SplitPage}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@@ -95,11 +120,17 @@
</Grid.ColumnDefinitions>
<Button Name="MoveUpBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="MoveDownBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<ToggleButton Name="LayNbArrTgBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}"
Height="25" Width="25">
<Image Name="LayNbArrImg"
HorizontalAlignment="Center"
VerticalAlignment="Center" Stretch="Uniform"/>
</ToggleButton>
</Grid>
@@ -111,13 +142,13 @@
</Grid.ColumnDefinitions>
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Tutti-ONImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource Tutti-ONImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
@@ -130,33 +161,33 @@
</Grid.ColumnDefinitions>
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<!-- solo per macchine con lavorazioni Waterjet -->
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource PonticelliWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<!--solo per macchine con lavorazioni Waterjet-->
<!--solo per macchine con lavorazioni Waterjet-->
<Button Name="QualityWJBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource QualityWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource QualityWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<!-- solo per macchine con lavorazioni Waterjet -->
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</Grid>
File diff suppressed because it is too large Load Diff
+28 -22
View File
@@ -1,6 +1,4 @@
Imports EgtUILib
Imports System.Text.RegularExpressions
Imports System.Threading
Module VacuumCups
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
@@ -20,14 +18,14 @@ Module VacuumCups
Private m_RawWeight As Double = 0
Private m_MaxWeightSinglePlugger As Double = 250
Private m_MaxWeightDoublePlugger As Double = 750
Public bOverWeight As Boolean = False
' dati per rotazione ventose vicono al fine corsa Y e X
Private bRotateVacuumNearExtraStrokeY As Boolean = False
Private bRotateVacuumNearExtraStrokeX As Boolean = False
Public m_bOverWeight As Boolean = False
' dati per rotazione ventose vicino al fine corsa Y e X
Private m_bRotateVacuumNearExtraStrokeY As Boolean = False
Private m_bRotateVacuumNearExtraStrokeX As Boolean = False
' dati stroke
Public bExtraStroke As Boolean = False
Public ptStartPointLift As Point3d
Public dDegRotStartAng As Double
Public m_bExtraStroke As Boolean = False
Public m_ptStartPointLift As Point3d
Public m_dDegRotStartAng As Double
' Nome del gruppo temporaneo per le ventose
Private Const VACTMP_GRP As String = "VacTmp"
@@ -87,12 +85,12 @@ Module VacuumCups
m_MaxWeightDoublePlugger = MaxDouble
End Sub
Friend Sub SetRotationForExtraStrokeY(Rotate As Boolean)
bRotateVacuumNearExtraStrokeY = Rotate
Friend Sub SetRotationForExtraStrokeY(bRotate As Boolean)
m_bRotateVacuumNearExtraStrokeY = bRotate
End Sub
Friend Sub SetRotationForExtraStrokeX(Rotate As Boolean)
bRotateVacuumNearExtraStrokeX = Rotate
Friend Sub SetRotationForExtraStrokeX(bRotate As Boolean)
m_bRotateVacuumNearExtraStrokeX = bRotate
End Sub
Friend Function GetVacuumId() As Integer
Return m_nVacId
@@ -330,7 +328,7 @@ Module VacuumCups
Dim sCups() As String = Nothing
Dim sCups2() As String = Nothing
If Not GetVacuumCupSelection(nI, sCups, sCups2) Then Return False
bExtraStroke = False
m_bExtraStroke = False
' Determino validità soluzioni della configurazione
Dim vtMove As New Vector3d
Dim ptRotCen As New Point3d
@@ -339,6 +337,8 @@ Module VacuumCups
Dim ptRotCen2 As New Point3d
Dim dRotAngDeg2 As Double = 0
Dim dDist = TestVacuumCupSelection(sCups, b3Kerf, ptKerfCen, nOutlineId, nRKerfId, vtMove, ptRotCen, dRotAngDeg)
Dim ptStartPointLift_1 As New Point3d( m_ptStartPointLift)
Dim dDegRotStartAng_1 As Double = m_dDegRotStartAng
Dim dDist2 = TestVacuumCupSelection(sCups2, b3Kerf, ptKerfCen, nOutlineId, nRKerfId, vtMove2, ptRotCen2, dRotAngDeg2)
If dDist > INFINITO - 1 And dDist2 > INFINITO - 1 Then Continue For
If dDist2 < dDist Then
@@ -346,6 +346,9 @@ Module VacuumCups
vtMove = vtMove2
ptRotCen = ptRotCen2
dRotAngDeg = dRotAngDeg2
Else
m_ptStartPointLift = ptStartPointLift_1
m_dDegRotStartAng = dDegRotStartAng_1
End If
' Eseguo il movimento
EgtMove(m_nVacId, vtMove, GDB_RT.GLOB)
@@ -435,18 +438,18 @@ Module VacuumCups
' Se box maggiore di quello del pezzo, scarto soluzione
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
'-------------------- INIZIO VERIFICA PESO --------------------
bOverWeight = False
m_bOverWeight = False
Select Case GetPluggerFromCameras(sCups)
Case 2
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
If m_RawWeight > m_MaxWeightDoublePlugger Then
bOverWeight = True
m_bOverWeight = True
Return INFINITO
End If
Case 1
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
If m_RawWeight > m_MaxWeightSinglePlugger Then
bOverWeight = True
m_bOverWeight = True
Return INFINITO
End If
End Select
@@ -468,14 +471,14 @@ Module VacuumCups
Dim dPreferredRot As Double = m_dPreferredRot
' -------------------- INIZIO GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
' verifico l'orientamento del pezzo
If bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
If m_bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
' se l'orientamento è verticale
If frMinRect.Orig().x < b3Tab.Center().x Then
dPreferredRot = m_dPrefVertRotXMinus
Else
dPreferredRot = m_dPrefVertRotXPlus
End If
ElseIf bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
ElseIf m_bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
' se l'orientemanto è orizzontale e la macchina è stata abilitata
If frMinRect.Orig().y < b3Tab.Center().y Then
dPreferredRot = m_dPrefVertRotYPlus
@@ -543,12 +546,12 @@ Module VacuumCups
' -------------- INIZIO verifica di essere nel limite delle corse macchina --------------
If VerifyOutOfStrokes(ptRef, dRotAngDeg) <> 0 Then
bExtraStroke = True
m_bExtraStroke = True
Return INFINITO
End If
' se la posizione è accettbaile allora salvo i dati
ptStartPointLift = ptRef
dDegRotStartAng = dRotAngDeg
m_ptStartPointLift = ptRef
m_dDegRotStartAng = dRotAngDeg
' -------------- FINE verifica di essere nel limite delle corse macchina --------------
' Ne calcolo la distanza dal centro della tavola
@@ -565,6 +568,9 @@ Module VacuumCups
' assegnate le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
' Se macchina con ventosa dietro (VacType=1) non eseguo nessun controllo
If GetVacuumType() = 1 Then Return 0
' Verifico se usare l'asse W per la gestione delle ventose
Dim sAxisName As String = "C"
' verifico che il nome dell'asse impostato sia corretto
If EgtGetAxisId(sAxisName) = GDB_ID.NULL Then
+30 -4
View File
@@ -112,6 +112,7 @@ Module ConstGen
Public Const MAIN_TAB As String = "MainTab"
Public Const SECOND_TAB As String = "2ndTab"
Public Const THIRD_TAB As String = "3rdTab"
Public Const FORTH_TAB As String = "4thTab"
' Nome tavola ausiliaria per spostamento finale pezzi
Public Const AUX_TAB As String = "AuxTab"
@@ -157,6 +158,8 @@ Module ConstGen
' Info per identificazione gruppo pezzi
Public Const INFO_REFGROUP As String = "RefGroup"
Public Const INFO_COUNTERLY As String = "CounterPz"
Public Const INFO_PARKIND As String = "ParkInd"
Public Const INFO_PARKSTATUS As String = "ParkStatus"
' Contrassegno di progetto OmagCut
Public Const NAME_PROJMARK As String = "OmagCut"
@@ -223,6 +226,9 @@ Module ConstGen
Public Const INFO_DEPTH2 As String = "Depth2"
Public Const INFO_AGG2 As String = "Agg2"
Public Const INFO_ROUNDOFF As String = "RoundOff"
Public Const INFO_DIRECTCUT As String = "DirectCut"
Public Const INFO_STEP_TYPE As String = "StepType"
Public Const INFO_ENGR_MILL As String = "EngravingWithMill"
' Info in entità da tagliare per taglio ristretto
Public Const INFO_STRICT As String = "Strict"
' Info in entità da tagliare per angolo di lato e tallone
@@ -314,12 +320,16 @@ Module ConstGen
Public Const INFO_PARTROT As String = "ROT"
' Info in entità in OutLoop per indicare se è separata WaterJet
Public Const INFO_JOINENTITY As String = "JoinEntity"
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
' Info in OutLoop per punto inzio lavorazione WaterJet
' Nome layer per "*" indicanti un lato separato nel taglio WaterJet
Public Const LAY_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
' Info in OutLoop per punto inizio lavorazione WaterJet
Public Const INFO_START As String = "Start"
' Nome dei tagli diretti inseriti in fase di Splitting
Public Const SPLIT_CUT As String = "SplitCut"
Public Const NAME_SPLIT_CUT As String = "SplitCut"
' Forzo specifica lavorazione
Public Const DEF_MACHINING As String = "Def_Machining"
' Forzo specifica lavorazione solo per tagli con inclinazione
Public Const DEF_MACHINING_TILTED As String = "Def_Machining_Tilted"
' Nome di pezzo che è una cornice
Public Const NAME_FRAME As String = "Frame"
@@ -356,6 +366,16 @@ Module ConstGen
Public Const BRIDGES As String = "Bridges"
' Nome dell'entità ponticello contenuta nel gruppo BRIDGES
Public Const BRIDGELINE As String = "BridgeLine"
' Info dell'Id pezzo di partenza del ponticello
Public Const INFO_BRIDGE_PARTSTART As String = "PartStart"
' Info dell'Id entita' di partenza del ponticello
Public Const INFO_BRIDGE_ENTSTART As String = "EntStart"
' Info dell'Id pezzo di arrivo del ponticello
Public Const INFO_BRIDGE_PARTEND As String = "PartEnd"
' Info dell'Id entita' di arrivo del ponticello
Public Const INFO_BRIDGE_ENTEND As String = "EntEnd"
' Info con la fase di appartenenza del ponticello
Public Const INFO_BRIDGE_PHASE As String = "Ph"
' utensile per le lavorazioni manuali
Public Const DUMMY_SAW As String = "DummySAW"
@@ -397,6 +417,12 @@ Module ConstGen
Public Function COL_MCH_ONFREE() As Color3d
Return New Color3d(192, 128, 0)
End Function
Public Function COL_MCH_WJ() As Color3d
Return New Color3d(0, 128, 128)
End Function
Public Function COL_MCH_WJ_ANG() As Color3d
Return New Color3d(255, 0, 255)
End Function
Public Function COL_MCH_DRIPCUT() As Color3d
Return New Color3d(255, 0, 165)
End Function
+18 -8
View File
@@ -35,6 +35,7 @@ Module ConstIni
Public Const K_IMAGEDIR As String = "ImageDir"
Public Const K_CAMERALINK As String = "CameraLink"
Public Const K_CNLINK As String = "CNLink"
Public Const K_STEPBYSTEPSEND As String = "StepByStepSend"
Public Const K_TESTINGPAGE As String = "TestingPage"
Public Const K_SHOWTIPAXES As String = "ShowTipAxes"
Public Const K_LASTPROJFINISHED As String = "LastProjFinished"
@@ -48,12 +49,16 @@ Module ConstIni
Public Const K_THEME As String = "Theme"
Public Const K_MANUAL_CUT As String = "ManualCut"
Public Const K_TEST As String = "Test"
Public Const K_ADD_TAB_BY_PROJ As String = "AdditionalTableByProj"
Public Const K_SMARTMACHININGPAGE As String = "SmartMachiningPage"
Public Const K_STARTPROGRAM As String = "StartProgram"
Public Const K_GENERATECN As String = "GenerateCN"
Public Const K_FRACTIONPATTERN As String = "FractionPattern"
Public Const K_PRECISION As String = "Precision"
Public Const K_QUITDRAWPAGE As String = "QuitDrawPage"
Public Const K_SHOWNBARROW As String = "ShowNbArrow"
Public Const K_SHOWEXPIREASSITANCE As String = "ShowExpireAssistance"
Public Const K_ENABLEDXFPARK As String = "EnableDXFPark"
Public Const S_LANGUAGES As String = "Languages"
Public Const K_LANGUAGE As String = "Language"
@@ -87,6 +92,7 @@ Module ConstIni
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
Public Const K_ZOOMWIN As String = "ZoomWin"
Public Const K_DISTLINE As String = "DistLine"
Public Const K_ORTOGRAPHIC As String = "OrtoGraphic"
Public Const S_ALZFRONT As String = "Alz&Front"
Public Const K_ALZFRONT As String = "Alz&Front"
@@ -161,7 +167,7 @@ Module ConstIni
Public Const K_TEXTCOLOR As String = "TextColor"
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
Public Const K_DRAG_RETTANGLE As String = "DragRectangle"
Public Const K_DRAG_RECTANGLE As String = "DragRectangle"
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
Public Const S_SPLIT As String = "Split"
@@ -208,6 +214,7 @@ Module ConstIni
Public Const K_OFFSXY As String = "OffsXY"
Public Const K_OFFSYY As String = "OffsYY"
Public Const K_OFFSXINTERY As String = "OffsYInterY"
Public Const K_OFFSXINTERYSAWTH As String = "OffsYInterYSawTh"
Public Const K_STARTTRIM As String = "StartTrim"
Public Const K_ENDTRIM As String = "EndTrim"
Public Const K_OTHERSIDE As String = "OtherSide"
@@ -232,10 +239,12 @@ Module ConstIni
Public Const K_OTHERREFTABX As String = "OtherRefTabX"
Public Const K_OTHERREFTABY As String = "OtherRefTabY"
Public Const K_OTHERREFTABPOS As String = "OtherRefTabPos"
Public Const K_REFTAB As String = "RefTab"
Public Const K_CURRENTREFTAB As String = "CurrRefTab"
Public Const S_RAWMOVE As String = "RawMove"
Public Const K_RAWSTEP As String = "Step"
Public Const K_EXTRASTEP As String = "ExtraStep"
Public Const K_RAWROTATION As String = "Rotation"
Public Const K_PERPENDICULAR As String = "Perpendicular"
@@ -253,17 +262,11 @@ Module ConstIni
Public Const K_REGANGSTEP As String = "AngStep"
Public Const S_CAMERA As String = "Camera"
Public Const K_CAM_COUNT As String = "Count"
Public Const K_CAM_EXEPATH As String = "ExePath"
Public Const K_CAM_IMAGE As String = "Image"
Public Const K_CAM_INFO As String = "Info"
Public Const K_CAM_RESULT As String = "Result"
Public Const K_CAM_CONTOUR As String = "Contour"
Public Const K_CAM_EXEPATH2 As String = "ExePath2"
Public Const K_CAM_IMAGE2 As String = "Image2"
Public Const K_CAM_INFO2 As String = "Info2"
Public Const K_CAM_RESULT2 As String = "Result2"
Public Const K_CAM_CONTOUR2 As String = "Contour2"
Public Const K_CAM_THRESHOLD As String = "Threshold"
Public Const K_CAM_TOLERANCE As String = "Tolerance"
Public Const K_CAM_TIMEOUT As String = "Timeout"
@@ -276,6 +279,7 @@ Module ConstIni
Public Const K_MACHINESDIR As String = "MachinesDir"
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
Public Const K_CURRMACH As String = "CurrMach"
Public Const K_ENABLEFINALSAWCUT As String = "EnableFinalSawCut"
Public Const S_SIMUL As String = "Simul"
Public Const K_SLIDERX As String = "SliderX"
@@ -287,6 +291,8 @@ Module ConstIni
Public Const S_VEINMATCHING As String = "VeinMatching"
Public Const K_VEINMA_ENABLE As String = "Enable"
Public Const K_VEINMA_PLACE As String = "WinPlace"
Public Const K_VEINMA_WIDTH As String = "Width"
Public Const K_VEINMA_HEIGHT As String = "Height"
Public Const S_FASTGRID As String = "FastGrid"
Public Const K_FG_ENABLE As String = "FGEnable"
@@ -333,6 +339,7 @@ Module ConstIni
Public Const K_DC_FLATT_HEADSIDE As String = "FlattHeadSide"
Public Const K_DC_FLATT_MACHTYPE As String = "FlattMachType"
Public Const K_DC_FLATT_ROTLOCK As String = "FlattRotLock"
Public Const K_DC_FLAT_CHAINEDPATH As String = "ChainedPath"
Public Const K_DC_FLATT_POSX As String = "FlattPosX"
Public Const K_DC_FLATT_POSY As String = "FlattPosY"
Public Const K_DC_POLISH_NAME As String = "PolishName"
@@ -343,6 +350,9 @@ Module ConstIni
Public Const K_DC_OFFSET_SQUARING As String = "OffsetSquaring"
Public Const K_DC_EXTRA_LEN_SQUARING As String = "ExtraLenSquaring"
Public Const K_ENABLEINVERT As String = "EnableInvert"
Public Const K_ENABLECUSTOMGRID As String = "EnableCustomGrid"
Public Const K_GRIDNUMDIMXCUSTOM As String = "GridNumDimXCustom"
Public Const K_GRIDNUMDIMYCUSTOM As String = "GridNumDimYCustom"
Public Const S_STATDATA As String = "StatData"
Public Const K_SD_DAY As String = "Day"
+41 -11
View File
@@ -2,6 +2,10 @@
Public Const S_NUMERICALCONTROL As String = "NumericalControl"
Public Const K_TYPE As String = "Type"
Public Const K_SPECIALSEND As String = "SpecialSend"
Public Const K_SPECIALAREAS As String = "SpecialAreas"
Public Const K_SPECIALDEST As String = "SpecialDest"
Public Const K_SPECIALEXEC As String = "SpecialExec"
Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const K_EXTENSION As String = "Extension"
@@ -12,26 +16,37 @@
Public Const K_SIMULATIONAXESNUM As String = "SimulationAxesNum"
Public Const K_L1NAME As String = "L1Name"
Public Const K_L1ID As String = "L1Id"
Public Const K_L1TYPE As String = "L1Type"
Public Const K_L2NAME As String = "L2Name"
Public Const K_L2ID As String = "L2Id"
Public Const K_L2TYPE As String = "L2Type"
Public Const K_L3NAME As String = "L3Name"
Public Const K_L3ID As String = "L3Id"
Public Const K_L3TYPE As String = "L3Type"
Public Const K_R1NAME As String = "R1Name"
Public Const K_R1ID As String = "R1Id"
Public Const K_R1TYPE As String = "R1Type"
Public Const K_R2NAME As String = "R2Name"
Public Const K_R2ID As String = "R2Id"
Public Const K_R2TYPE As String = "R2Type"
Public Const K_A6NAME As String = "A6Name"
Public Const K_A6ID As String = "A6Id"
Public Const K_A6TYPE As String = "A6Type"
Public Const K_A7NAME As String = "A7Name"
Public Const K_A7ID As String = "A7Id"
Public Const K_A7TYPE As String = "A7Type"
Public Const K_A8NAME As String = "A8Name"
Public Const K_A8ID As String = "A8Id"
Public Const K_A8TYPE As String = "A8Type"
Public Const K_A9NAME As String = "A9Name"
Public Const K_A9ID As String = "A9Id"
Public Const K_A9TYPE As String = "A9Type"
Public Const K_A10NAME As String = "A10Name"
Public Const K_A10ID As String = "A10Id"
Public Const K_A10TYPE As String = "A10Type"
Public Const K_DELTA_C As String = "DeltaC"
Public Const K_ININCHES As String = "InInches"
Public Const K_CPOS As String = "CPos"
Public Const S_NCSIEMENS As String = "NcSiemens"
Public Const K_COMM_NAME As String = "CommName"
@@ -126,9 +141,11 @@
Public Const K_VACUUMOFF As String = "VacuumOff"
Public Const K_BYPASSTATE As String = "BypassState"
Public Const K_FEEDHOLD As String = "FeedHold"
Public Const K_SPOTLIGHT As String = "SpotLight"
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
Public Const K_NAXES As String = "nAxes"
Public Const K_RESETSTATUS As String = "ResetStatus"
' Nuove variabili
Public Const K_SPEEDHOLD As String = "SpeedHold"
Public Const K_XYJOG As String = "XYJog"
@@ -171,14 +188,30 @@
Public Const K_ADDITIONALTABLE As String = "AdditionalTable"
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
Public Const K_TAB4_ADDITIONALTABLE As String = "Tab4AdditionalTable"
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
Public Const K_CHANGETABWD As String = "ChangeTabWD"
Public Const K_ALLTABORIGTAB1 As String = "AllTabOrigTab1"
Public Const K_TABX As String = "TabX"
Public Const K_TABY As String = "TabY"
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
Public Const S_PHOTO As String = "Photo"
Public Const K_PHOTO_CAMERACOUNTER As String = "CameraCounter"
Public Const K_PHOTO_OFFSETX As String = "OffsetX"
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
Public Const K_PHOTO_TAB3_OFFSETX As String = "Tab3OffsetX"
Public Const K_PHOTO_TAB3_OFFSETY As String = "Tab3OffsetY"
Public Const K_PHOTO_TAB4_OFFSETX As String = "Tab4OffsetX"
Public Const K_PHOTO_TAB4_OFFSETY As String = "Tab4OffsetY"
Public Const K_PHOTO_HQ_OFFSETX As String = "HQOffsetX"
Public Const K_PHOTO_HQ_OFFSETY As String = "HQOffsetY"
Public Const K_CAMERA_DIRECT_CMD As String = "CameraDirectCmd"
Public Const K_CAMERA_STATE_VAR As String = "CameraStateVar"
Public Const K_ENABLE_GOHOME_FOR_PHOTO As String = "EnableGoHomeForPhoto"
Public Const K_PENDIG_TIME_FOR_PHOTO As String = "PendigTimeForPhoto"
Public Const S_TOOLS As String = "Tools"
Public Const K_DRILLBIT As String = "Drillbit"
@@ -228,8 +261,11 @@
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
Public Const K_MACH_STARTCENTERTOOLPATH As String = "StartCenterToolPath"
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
Public Const K_MACH_WATERJET_OPTIMIZE As String = "WjOptimize"
Public Const K_MACH_WATERJET_ON_SINKS As String = "WjOnSinks"
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
Public Const K_MACH_NEST_GHIGLIOTTINA As String = "Guillotine"
Public Const K_MACH_WASHING As String = "Washing"
@@ -239,17 +275,8 @@
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
Public Const K_HOLES_DIAMITERWJ As String = "HolesDiameterWJ"
Public Const K_HOLES_OFFSETWJ As String = "HolesOffsetWJ"
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
Public Const K_MACH_RECTIFICATION_ON_SUBSQUARE As String = "RectificationSubSqWJ"
' DrillMillC90
' CutLongDxSx
' AngRotMultiCut
' MinDistHeadsMultiCut
' MinSawRbHeight
Public Const K_MACH_DRILL_MILL_C90 As String = "DrillMillC90"
Public Const K_USEBAXISLOCK As String = "UseBAxisLock"
Public Const S_MACH_FRAME As String = "Frame"
Public Const K_MACH_PAUSE As String = "Pause"
@@ -304,6 +331,7 @@
Public Const S_MACH_MACH As String = "Mach"
Public Const K_CURRSAW As String = "CurrSaw"
Public Const K_CURRSAWTILTED As String = "CurrSawTilted"
Public Const K_CURRDRILL As String = "CurrDrill"
Public Const K_CURRMILL As String = "CurrMill"
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
@@ -311,6 +339,8 @@
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
Public Const K_CURRWATERJET As String = "CurrWaterJet"
Public Const K_CURRSAWING As String = "CurrSawing"
Public Const K_CURRSAWINGTILTED As String = "CurrSawingTilted"
Public Const K_APPLYSAWINGTILTED As String = "ApplySawingTilted"
Public Const K_CURRDRILLING As String = "CurrDrilling"
Public Const K_CURRMILLING As String = "CurrMilling"
Public Const K_CURRPOCKETING As String = "CurrPocketing"
+15 -15
View File
@@ -29,7 +29,7 @@
<!--<RowDefinition Height="1*"/>-->
</Grid.RowDefinitions>
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -37,12 +37,12 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="ManualTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="SingleCutBtn" Grid.Row="1"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -50,12 +50,12 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="SingleCutTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="MultipleCutBtn" Grid.Row="2"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -63,12 +63,12 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="GridCutBtn" Grid.Row="3"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -76,13 +76,13 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="GridCutTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="SingleDrillBtn" Grid.Row="4"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -90,12 +90,12 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="FlatteningCutBtn" Grid.Row="5"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -103,7 +103,7 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -134,7 +134,7 @@
</Button>-->
<Button Name="SquaringBtn" Grid.Row="6"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -142,7 +142,7 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="SquaringTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -167,7 +167,7 @@
<Button Name="ChangeUCBtn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<!--<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />-->
<TextBlock Name="ChangeUCTxBl" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
<TextBlock Name="ChangeUCTxBl" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
</Grid>
+25 -32
View File
@@ -1,13 +1,12 @@
Imports EgtUILib
Public Class ControlsDirectCutUC
' Dichiarazione delle Page UserControl
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
' ---- MAI USATA ---- nuova finestra per i comandi per il taglio manuale nuovo
Friend m_SingleCutAuto As SingleCutAuto
' ---- MAI USATA ----
Friend m_MachineButtons As MachineButtonsUC
Friend m_ManualAxesMove As ManualAxesMoveUC
Friend m_SingleCutAuto As SingleCutAuto
Friend m_SingleCut As SingleCutUC
Friend m_SingleDrill As SingleDrillUC
Friend m_MultipleCut As MultipleCut
@@ -35,7 +34,7 @@ Public Class ControlsDirectCutUC
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
Friend m_NewMachineButtonsType As Boolean
' Indica che la finestra del talio Singolo deve essere di tipo manuale
Friend m_bManulaCut As Boolean = False
Friend m_bManualCut As Boolean = False
' elenco dei nuovi bottoni
Private m_ButtonJogList As New List(Of MachineButton)
@@ -53,20 +52,21 @@ Public Class ControlsDirectCutUC
FlatteningCut
Polishing
CopyTemplate
SawTest
SingleCutAuto
SingleDrill
Squaring
End Enum
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' leggo la configurazione del programma per i nuovi tagli manuali
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
'Creazione delle Page UserControl
' leggo la configurazione del programma per i nuovi tagli manuali
m_bManualCut = ( GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0)
' Creazione delle Page UserControl
m_MachineButtons = New MachineButtonsUC
m_ManualAxesMove = New ManualAxesMoveUC
m_SingleCut = New SingleCutUC
m_SingleCutAuto = New SingleCutAuto
m_SingleDrill = New SingleDrillUC
m_MultipleCut = New MultipleCut
m_GridCut = New GridCut
@@ -74,16 +74,14 @@ Public Class ControlsDirectCutUC
m_Squaring = New SquaringUC
m_ControlsMachineButton = New ControlsMachineButtonUC
m_VacuumMachineButton = New VacuumMachineButtonUC
' reiferimento alla pagina succesiva
' Riferimento alla pagina succesiva
m_ControlDirectCutPage1 = New ControlsDirectCutUC1
' Costruisco la finestra per il nuovo tipo di taglio manuale
m_SingleCutAuto = New SingleCutAuto
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
' Posizionemento nella griglia delle Page UserControl DirectCutPageUC
m_MachineButtons.SetValue(Grid.RowProperty, 2)
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
If m_bManulaCut Then
If m_bManualCut Then
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
Else
m_SingleCut.SetValue(Grid.RowProperty, 1)
@@ -96,22 +94,14 @@ Public Class ControlsDirectCutUC
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
' ManualBtn.Content = EgtMsg(90201)
ManualTxt.Text = EgtMsg(90201)
'SingleCutBtn.Content = EgtMsg(90202)
SingleCutTxt.Text = EgtMsg(90202)
'SingleDrillBtn.Content = "Foro singolo"
SingleDrillTxt.Text = EgtMsg(90258)
'MultipleCutBtn.Content = EgtMsg(90203)
MultipleCutTxt.Text = EgtMsg(90203)
'GridCutBtn.Content = EgtMsg(90204)
GridCutTxt.Text = EgtMsg(90204)
'FlatteningCutBtn.Content = EgtMsg(90206)
FlatteningCutTxt.Text = EgtMsg(90206)
' 90261=Squaring
SquaringTxt.Text = EgtMsg(90261)
' 90409=Others
ChangeUCTxBl.Text = EgtMsg(90409)
ManualTxt.Text = EgtMsg(90201) ' Movimento manuale
SingleCutTxt.Text = EgtMsg(90202) ' Taglio singolo
SingleDrillTxt.Text = EgtMsg(90258) ' Foro singolo
MultipleCutTxt.Text = EgtMsg(90203) ' Taglio multiplo
GridCutTxt.Text = EgtMsg(90204) ' Taglio griglia
FlatteningCutTxt.Text = EgtMsg(90206) ' Spianatura
SquaringTxt.Text = EgtMsg(90261) ' Squadratura
ChangeUCTxBl.Text = EgtMsg(90409) ' Altri
End Sub
@@ -148,11 +138,11 @@ Public Class ControlsDirectCutUC
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
Dim bH1Exists As Boolean = m_MainWindow.m_CurrentMachine.ExistsSawHead()
ManualBtn.IsEnabled = bH1Exists
' sviluppo rimasto in sospeso
If m_bManulaCut Then
If m_bManualCut Then
' anche se non è presente un grezzo mantengo abilitato il bottone
SingleCutBtn.IsEnabled = True
Else
@@ -183,6 +173,9 @@ Public Class ControlsDirectCutUC
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
End If
If Not bSaw Then
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
End If
m_SingleCut.SetEnableParam(bSaw)
m_MultipleCut.SetEnableParam(bSaw)
m_GridCut.SetEnableParam(bSaw)
@@ -196,7 +189,7 @@ Public Class ControlsDirectCutUC
End Sub
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
If m_bManulaCut Then
If m_bManualCut Then
LeftButtonGrid.Children.Add(m_SingleCutAuto)
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
Else
+5 -5
View File
@@ -30,7 +30,7 @@
</Grid.RowDefinitions>
<Button Name="SawTestBtn" Grid.Row="0"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -38,12 +38,12 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="SawTestTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="PolishingBtn" Grid.Row="1"
Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -51,7 +51,7 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="PolishingTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -64,7 +64,7 @@
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
+8 -4
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Public Class ControlsDirectCutUC1
' Dichiarazione delle Page UserControl
@@ -72,13 +73,13 @@ Public Class ControlsDirectCutUC1
' Caso standard
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa per lama (H1)
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
Dim bSawHeadOk As Boolean = m_MainWindow.m_CurrentMachine.ExistsSawHead()
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
CopyTemplateBtn.IsEnabled = bH1Exists
SawTestBtn.IsEnabled = (bRawOk And bSawHeadOk)
CopyTemplateBtn.IsEnabled = bSawHeadOk
' aggiorno la visualizzazione dei parametri
ReloadParam()
@@ -99,6 +100,9 @@ Public Class ControlsDirectCutUC1
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
End If
If Not bSaw Then
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
End If
'm_SingleCut.SetEnableParam(bSaw)
'm_MultipleCut.SetEnableParam(bSaw)
'm_GridCut.SetEnableParam(bSaw)
+15 -15
View File
@@ -1,13 +1,13 @@
<UserControl x:Class="ControlsMachineButtonUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="Self"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:OmagCUT="clr-namespace:OmagCUT"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="Self"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:OmagCUT="clr-namespace:OmagCUT"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
<Border Style="{DynamicResource OmagCut_Page2Border}">
@@ -16,33 +16,33 @@
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
<ToggleButton IsChecked="{Binding IsChecked}"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:NoStateButton}">
<Button Command="{Binding ExecuteCommand}"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
<Button Command="{Binding ExecuteCommand}"
Background="{Binding Background}"
Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
<ToggleButton IsChecked="{Binding IsChecked}"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
<Button Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</DataTemplate>
</ItemsControl.Resources>
@@ -60,7 +60,7 @@
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Border>
</UserControl>
+39 -242
View File
@@ -1,7 +1,6 @@
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Imports EgtUILib
Imports EgtWPFLib
Public Class ControlsMachineButtonUC
Implements INotifyPropertyChanged
@@ -23,6 +22,9 @@ Public Class ControlsMachineButtonUC
Friend m_CN As CN_generico
Private m_bFirst As Boolean = True
' visualizzo l'elenco degli elementi della pagina sono al primo avvio
Friend Shared m_OutLogTypeButton As Boolean = True
' Creazione converter da String a ImageSource
Dim ImageConverter As New ImageSourceConverter
@@ -72,6 +74,12 @@ Public Class ControlsMachineButtonUC
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
End If
End While
For Each MachineButton As MachineButton In m_ButtonList
GetTypeButton(MachineButton)
Next
m_OutLogTypeButton = False
NotifyPropertyChanged("ButtonList")
End If
End Sub
@@ -81,6 +89,22 @@ Public Class ControlsMachineButtonUC
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
'-------------------------------------------------------------------------------
Friend Sub GetTypeButton(CurrMachineButton As MachineButton)
If Not m_OutLogTypeButton Then Return
Dim BtnType As Type = CurrMachineButton.GetType
If BtnType Is GetType(NoStateButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
ElseIf BtnType Is GetType(TwoStateButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
ElseIf BtnType Is GetType(ThreeStateButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
ElseIf BtnType Is GetType(DoubleCommandButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
ElseIf BtnType Is GetType(PressedCommandButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
End If
End Sub
Friend Sub SpindleStateChanged(SpindleState As Boolean)
Dim SpindleButton As TwoStateButton = Nothing
For Each MachineButton As MachineButton In m_ButtonList
@@ -527,247 +551,6 @@ Public MustInherit Class MachineButton
m_StateFlag = StateFlag
End Sub
#Region "METHODS"
Friend Sub ExecuteMDICommand(sLuaFileName As String)
If String.IsNullOrWhiteSpace(sLuaFileName) Then Return
Dim CmdString As String = String.Empty
Dim b2Start As Boolean = False
Dim EActive As Boolean = False
Dim ENumber As String = String.Empty
Dim EValue As String = String.Empty
Dim EType As String = 0
Dim ENumber2 As String = String.Empty
Dim EValue2 As String = String.Empty
Dim EType2 As String = 0
' eseguo la lettura del file .lua associato al comando
ExecuteDirectCmdLua(sLuaFileName, CmdString, b2Start, EActive, ENumber, EValue, EType, ENumber2, EValue2, EType2)
'--------------------------------------------------------- PLC ---------------------------------------------------------
If EActive Then
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2
' se scrittura delle varibili PLC
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
' solo per Flexium
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
If Not String.IsNullOrEmpty(ENumber2) And Not String.IsNullOrEmpty(EValue2) Then
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
End If
' altrimenti scrittura delle variabili E
Else
m_CN.DVariables_WriteVariables2(ENumber, EValue)
End If
Return
Case 3
' scrivo prima variabile
Select Case CShort(EType)
Case 1
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), CInt(EValue), 0, 0, "")
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & CInt(EValue))
Case 2
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, CLng(EValue), 0, "")
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & CLng(EValue))
Case 3
Dim d As Double = 0
StringToDouble(EValue, d)
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, 0, d, "")
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & d)
Case 4
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, 0, 0, EValue)
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & EValue)
End Select
EgtOutLog("dopo scrittura prima variabile")
If Not IsNothing(EType2) AndAlso CShort(EType) > 0 Then
System.Threading.Thread.Sleep(100)
' scrivo seconda variabile
Select Case CShort(EType2)
Case 1
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), CInt(EValue2), 0, 0, "")
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & CInt(EValue2))
Case 2
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, CLng(EValue2), 0, "")
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & CLng(EValue2))
Case 3
Dim d As Double = 0
StringToDouble(EValue2, d)
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, 0, d, "")
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & d)
Case 4
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, 0, 0, EValue2)
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & EValue2)
End Select
EgtOutLog("dopo scrittura seconda variabile")
End If
Return
Case 4
' ------------------------------------ FANUC ------------------------------------
' eventuale scrittura di linea di comando MDI
If Not String.IsNullOrEmpty(CmdString) Then
' attivo mpdalità MDI
m_CN.DGeneralFunctions_WriteCncMode(2)
System.Threading.Thread.Sleep(100)
' salvo la stringa di comando ricevuta dal file lua
m_CN.sz_ManualDataInput = CmdString
' esguo la funzione che ha il compito di scrivere il comando MDI
m_CN.MDI_command()
End If
' attivo modalità AUTO
m_CN.DGeneralFunctions_WriteCncMode(7)
System.Threading.Thread.Sleep(100)
If String.IsNullOrEmpty(EValue) Then
' EActive: impulsivo "D#####"
m_CN.NC_pulse_bit(ENumber)
EgtOutLog("Fanuc_DNumber= " & ENumber)
Else
' EActive + EValue: scrittura comando invariabile Short oppure Bit
If ENumber.Contains(".") Then
' D#####.#
Dim bEValue As Boolean
If EValue.Trim = "1" Then bEValue = True
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
Else
' D#####
m_CN.NC_write_var_short(ENumber, CShort(EValue))
End If
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
End If
' eventale caricamento seconda variabile
If String.IsNullOrEmpty(EValue2) Then
' EActive: impulsivo "D#####"
m_CN.NC_pulse_bit(ENumber2)
EgtOutLog("Fanuc_DNumber= " & ENumber2)
Else
' EActive + EValue: scrittura comando invariabile Short oppure Bit
If ENumber2.Contains(".") Then
' D#####.#
Dim bEValue2 As Boolean
If EValue2.Trim = "1" Then bEValue2 = True
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
Else
' D#####
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
End If
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
End If
Return
End Select
End If
'--------------------------------------------------------- MDI ---------------------------------------------------------
Dim nResult As Short
' assegno la modalità di funzionamento
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2, 4
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
Case 3
'Per il siemens non devo fare nulla
End Select
' salvo la stringa di comando ricevuta dal file lua
m_CN.sz_ManualDataInput = CmdString
' esguo la funzione che ha il compito di scrivere il comando MDI
m_CN.MDI_command()
' avvio l'esecuzione del comando
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2
System.Threading.Thread.Sleep(500)
m_CN.DGeneralFunctions_CycleStart()
Case 3
'Per il siemens non devo fare nulla
End Select
' se richiesto ripeto l'operazione
If b2Start Then
EgtOutLog("Avvio secondo cliclo start")
System.Threading.Thread.Sleep(800)
m_CN.DGeneralFunctions_CycleStart()
End If
System.Threading.Thread.Sleep(300)
' ripristino la modalità manuale..?? siucuri ??
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
End Sub
' lettura delle variavili scritte nel file Lua
Friend Sub ExecuteDirectCmdLua(LuaFileName As String, ByRef CmdString As String, ByRef b2Start As Boolean, ByRef EActive As Boolean, ByRef ENumber As String, ByRef EValue As String, ByRef EType As String, ByRef ENumber2 As String, ByRef EValue2 As String, ByRef EType2 As String)
Dim sBaseDir As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
If EgtLuaExecFile(sBaseDir & LuaFileName) Then
EgtOutLog("Lua " & sBaseDir & LuaFileName & " eseguito")
Else
EgtOutLog("Lua " & sBaseDir & LuaFileName & " non eseguito")
End If
Dim dFeed As Double = 0
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text) Then
StringToLen(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text, dFeed)
Else
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
End If
EgtLuaSetGlobNumVar("CMD.F", dFeed)
Dim dSpeed As Double = 0
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
Else
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
End If
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
' versione 2.5e1
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
Dim sToolPos As String = String.Empty
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
End If
Dim dToolDiam As Double = 0
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
End If
Dim dL1, dL2, dL3, dR1, dR2 As Double
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
EgtLuaSetGlobNumVar("CMD.L1", dL1)
EgtLuaSetGlobNumVar("CMD.L2", dL2)
EgtLuaSetGlobNumVar("CMD.L3", dL3)
EgtLuaSetGlobNumVar("CMD.R1", dR1)
EgtLuaSetGlobNumVar("CMD.R2", dR2)
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
EgtLuaCallFunction("CmdString")
' Leggo variabili
CmdString = String.Empty
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
b2Start = False
EgtLuaGetGlobBoolVar("CMD.DOUBLESTART", b2Start)
EActive = False
EgtLuaGetGlobBoolVar("CMD.EACTIVE", EActive)
ENumber = String.Empty
EgtLuaGetGlobStringVar("CMD.ENUMBER", ENumber)
EValue = String.Empty
EgtLuaGetGlobStringVar("CMD.EVALUE", EValue)
EType = String.Empty
EgtLuaGetGlobStringVar("CMD.ETYPE", EType)
EgtOutLog("ENUMBER: " & ENumber & " EVALUE: " & EValue & " ETYPE: " & EType)
ENumber2 = String.Empty
EgtLuaGetGlobStringVar("CMD.ENUMBER2", ENumber2)
EValue2 = String.Empty
EgtLuaGetGlobStringVar("CMD.EVALUE2", EValue2)
EType2 = String.Empty
EgtLuaGetGlobStringVar("CMD.ETYPE2", EType2)
EgtOutLog("ENUMBER2: " & ENumber2 & " EVALUE2: " & EValue2 & " ETYPE2: " & EType2)
' Reset lua
EgtLuaResetGlobVar("CmdString")
EgtLuaResetGlobVar("CMD")
' Log del comando
EgtOutLog("CmdString=" & If(Not String.IsNullOrEmpty(CmdString), CmdString, "") &
" b2Start=" & b2Start.ToString() &
" EActive=" & EActive.ToString &
" ENumber=" & If(Not String.IsNullOrEmpty(ENumber), ENumber, "") &
" EValue=" & If(Not String.IsNullOrEmpty(EValue), EValue, "") &
" EType=" & If(Not String.IsNullOrEmpty(EType), CInt(EType).ToString, "") &
" ENumber2=" & If(Not String.IsNullOrEmpty(ENumber2), ENumber2, "") &
" EValue2=" & If(Not String.IsNullOrEmpty(EValue2), EValue2, "") &
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
End Sub
#End Region ' METHODS
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
@@ -788,11 +571,25 @@ Public Class TwoStateButton
Set(value As Boolean)
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
m_IsChecked = value
Dim sLuaScriptFile As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
If value Then
sLuaScriptFile &= TLuaScriptName
ExecuteMDICommand(TLuaScriptName)
Else
sLuaScriptFile &= FLuaScriptName
ExecuteMDICommand(FLuaScriptName)
End If
Dim IsPressedShiftKey As Boolean = False
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 AndAlso m_MainWindow.GetDebug() > 4 Then IsPressedShiftKey = True
' procedo all'apertura del file CadCut1 appena generato (solo se generazione corretta)
If IsPressedShiftKey Then
Try
Process.Start("Notepad.exe", sLuaScriptFile)
Catch ex As Exception
EgtOutLog(ex.ToString)
End Try
End If
End Set
End Property
Friend Sub SetIsChecked(value As Boolean)
+35 -35
View File
@@ -1,14 +1,14 @@
<UserControl x:Class="CopyTemplateUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
<!-- Definizione della Grid SingleCut -->
<Grid Name="SingleCutGrid" >
<Grid.ColumnDefinitions>
@@ -35,17 +35,17 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
</Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0">
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
@@ -56,12 +56,12 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource LineaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource ArcoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource LineaImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource ArcoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</Grid>
@@ -72,21 +72,21 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource ChiudiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource Salva-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource ChiudiImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Grid>
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource Salva-taglioImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
+27 -15
View File
@@ -45,18 +45,18 @@ Public Class CopyTemplateUC
Private Sub CopyTemplate_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo lista modalità di acquisizione punto
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
LineBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
ArcBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
RemoveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
CloseBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
SaveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
LineBtn.ToolTip = EgtMsg(90250) ' Linea
ArcBtn.ToolTip = EgtMsg(90251) ' Arco
RemoveBtn.ToolTip = EgtMsg(90252) ' Rimuovi
CloseBtn.ToolTip = EgtMsg(90253) ' Chiudi
SaveBtn.ToolTip = EgtMsg(90254) ' Salva
End Sub
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -166,6 +166,15 @@ Public Class CopyTemplateUC
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
' Verifico configurazione tavola e grezzo
If Not m_bTabOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
If bIsMultiCut Then
EgtSetCalcTool(sSaw, "H1", 1)
End If
' Se acquisizione lama o laser
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Recupero la posizione macchina
@@ -173,14 +182,19 @@ Public Class CopyTemplateUC
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
Return
End If
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Se punto da laser
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
' Ora imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
' Altrimenti da lama
@@ -188,7 +202,7 @@ Public Class CopyTemplateUC
' Imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
End If
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
@@ -196,8 +210,6 @@ Public Class CopyTemplateUC
Else
' Verifico presenza punto da mouse
If Not m_bMouseOk Then Return
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
' Assegno punto selezionato nel disegno a m_ptTipP1
+80
View File
@@ -0,0 +1,80 @@
<UserControl x:Class="CustomGridUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Background="#636974">
<Grid Name ="CustomGrid" Grid.Row="5" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="2.5*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<UniformGrid Grid.Row="0"
Grid.ColumnSpan="2"
Columns="4"
Margin="2,2,0,2">
<Button Name="AddCutBtn" Content="+"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<Button Name="RemoveCutBtn" Content="-"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<ToggleButton Name="Cut_XTgBtn" Content="X"
Style="{DynamicResource OmagCut_YellowToggleButton}"
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<ToggleButton Name="Cut_YTgBtn" Content="Y"
Style="{DynamicResource OmagCut_YellowToggleButton}"
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
</UniformGrid>
<TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="DimPzXTxBl" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<ScrollViewer Background="Transparent" Grid.Row="2"
Grid.ColumnSpan="2"
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<ListBox Name="CustomGridLstBx" ScrollViewer.CanContentScroll="False">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Width="210">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Text="{Binding sNumber}" Grid.Column="0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Text="{Binding sInteraxis}" Grid.Column="2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
</ScrollViewer>
<UniformGrid Grid.Row="3"
Grid.ColumnSpan="2"
Columns="2"
Margin="0,2,0,2">
<Button Name="UpdateBtn"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Button Name="ExitBtn" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</UniformGrid>
</Grid>
</UserControl>
+81
View File
@@ -0,0 +1,81 @@
Imports EgtUILib
Public Class CustomGridUC
#Region "FIELDS & PROPERTIES"
' Riferimento a GridCut
Private m_refGridCut As GridCut
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(GC As GridCut)
InitializeComponent()
m_refGridCut = GC
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_X
Cut_XTgBtn.IsChecked = True
NumPzXTxBl.Text = EgtMsg(90217) ' Numero
DimPzXTxBl.Text = EgtMsg(90218) ' Dimensione
UpdateBtn.Content = EgtMsg(90265) ' Aggiorna
End Sub
#End Region ' Constructor
#Region "EVENTS"
Private Sub CutX_Selected() Handles Cut_XTgBtn.Click
If Cut_XTgBtn.IsChecked Then
Cut_YTgBtn.IsChecked = False
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_X
CustomGridLstBx.UpdateLayout()
End If
End Sub
Private Sub CutY_Selected() Handles Cut_YTgBtn.Click
If Cut_YTgBtn.IsChecked Then
Cut_XTgBtn.IsChecked = False
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_Y
CustomGridLstBx.UpdateLayout()
End If
End Sub
Private Sub AddCut_Click(sender As Object, e As EventArgs) Handles AddCutBtn.Click
If Cut_XTgBtn.IsChecked Then
m_refGridCut.m_ListOfCut_X.Add(New Cut_Axis(0, 0))
ElseIf Cut_YTgBtn.IsChecked Then
m_refGridCut.m_ListOfCut_Y.Add(New Cut_Axis(0, 0))
End If
CustomGridLstBx.UpdateLayout()
End Sub
Private Sub RemoveCut_Click(sender As Object, e As EventArgs) Handles RemoveCutBtn.Click
Dim CurrIndexListSelected As Integer = -1
CurrIndexListSelected = CustomGridLstBx.SelectedIndex
If Cut_XTgBtn.IsChecked Then
If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_refGridCut.m_ListOfCut_X.Count - 1 Then
CurrIndexListSelected = m_refGridCut.m_ListOfCut_X.Count - 1
End If
m_refGridCut.m_ListOfCut_X.RemoveAt(CurrIndexListSelected)
ElseIf Cut_YTgBtn.IsChecked Then
If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_refGridCut.m_ListOfCut_Y.Count - 1 Then
CurrIndexListSelected = m_refGridCut.m_ListOfCut_Y.Count - 1
End If
m_refGridCut.m_ListOfCut_Y.RemoveAt(CurrIndexListSelected)
End If
CustomGridLstBx.UpdateLayout()
End Sub
Public Sub Update_Click() Handles UpdateBtn.Click
m_refGridCut.CreateGridCut()
EgtDraw()
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
m_refGridCut.SingleCutGrid.Children.Remove(Me)
End Sub
#End Region ' Events
End Class
+7
View File
@@ -4,6 +4,9 @@ Module DirectCut
' Riferimenti a pagine
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
' Polishing attivo
Friend m_bPolishingOn As Boolean = False
Friend Function CreateDirectCutPart() As Integer
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nPartId, NAME_DIRECTCUT)
@@ -27,4 +30,8 @@ Module DirectCut
Return EgtGetFirstNameInGroup(m_MainWindow.m_CurrentProjectPageUC.m_nRawId, NAME_DIRECTCUT)
End Function
Friend Function IsDirectCutOn() As Boolean
Return ( GetDirectCutPart() <> GDB_ID.NULL OrElse m_bPolishingOn)
End Function
End Module
+17 -18
View File
@@ -1,10 +1,9 @@
<UserControl x:Class="DirectCutPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" d:DesignHeight="853.3" d:DesignWidth="1280">
<!-- Definizione della DirectCutPage -->
<Grid Name="DirectCutPageGrid" >
@@ -29,15 +28,15 @@
</Grid.ColumnDefinitions>
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource PhotoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource RawPartImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="MachViewModeBtn" Grid.Column="3"
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource MHTImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
<Image Source="{DynamicResource MHTImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</Button>
</Grid>
@@ -229,30 +228,30 @@
<ToggleButton Name="ControlsMachineBtn" Grid.Column="0"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
<Image Source="{DynamicResource ManualImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="VacuumMachineBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
<Image Source="{DynamicResource VacuumImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton>
<!--Comando asse X-Y-->
<ToggleButton Name="XYBtn" Grid.Column="2"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
<Image Source="{DynamicResource XYJogImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton>
<!--Comando asse Z-C-->
<ToggleButton Name="ZCBtn" Grid.Column="3"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
<Image Source="{DynamicResource ZCJogImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton>
<!--Comando asse Z-B-->
<ToggleButton Name="ZBBtn" Grid.Column="4"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
<Image Source="{DynamicResource ZBJogImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton>
<!--Comando Remote-->
@@ -264,15 +263,15 @@
<!--Parking-->
<ToggleButton Name="ParkingBtn" Grid.Column="6"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
<Image Source="{DynamicResource ParkingImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton>
<!--Comando Manula/MDI-->
<Button Name="ManualModeBtn" Grid.Column="11"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
<Image Source="{DynamicResource ManualImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
</Button>
</Grid>
+11 -9
View File
@@ -1,5 +1,4 @@
Imports EgtUILib
Imports EgtWPFLib
Public Class DirectCutPageUC
@@ -146,6 +145,9 @@ Public Class DirectCutPageUC
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
End If
If Not bSaw Then
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
End If
m_ControlsDirectCutUC.m_SingleCut.SetEnableParam(bSaw)
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
@@ -176,11 +178,11 @@ Public Class DirectCutPageUC
Case K_REMOTE
RemoteBtn.Visibility = Visibility.Visible
RemoteBtn.Foreground = Brushes.White
RemoteBtn.Content = "Remote"
RemoteBtn.Content = EgtMsg(90262) 'Remote
Case K_PARKING
ParkingBtn.Visibility = Visibility.Visible
ParkingBtn.Foreground = Brushes.White
ParkingBtn.ToolTip = "Parking"
ParkingBtn.ToolTip = EgtMsg(90263) 'Parking
End Select
Next
End Sub
@@ -265,7 +267,7 @@ Public Class DirectCutPageUC
Next
If IsNothing(XYJogButton) Then Return
' eseguo lo script lua associato
XYJogButton.ExecuteMDICommand(XYJogButton.TLuaScriptName)
VarMdiCommand.ExecuteMDICommand(XYJogButton.TLuaScriptName)
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
End Sub
@@ -297,7 +299,7 @@ Public Class DirectCutPageUC
Next
If IsNothing(ZJogButton) Then Return
' eseguo lo script lua associato
ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName)
VarMdiCommand.ExecuteMDICommand(ZJogButton.TLuaScriptName)
End Sub
Friend Sub ZCJogChanged(bZAxes As Boolean)
@@ -327,7 +329,7 @@ Public Class DirectCutPageUC
Next
If IsNothing(ZBJogButton) Then Return
' eseguo lo script lua associato
ZBJogButton.ExecuteMDICommand(ZBJogButton.TLuaScriptName)
VarMdiCommand.ExecuteMDICommand(ZBJogButton.TLuaScriptName)
End Sub
Friend Sub ZBJogChanged(bBCAxes As Boolean)
@@ -364,7 +366,7 @@ Public Class DirectCutPageUC
Else
sLuaFileName = RemoteButton.FLuaScriptName
End If
RemoteButton.ExecuteMDICommand(sLuaFileName)
VarMdiCommand.ExecuteMDICommand(sLuaFileName)
End Sub
Friend Sub RemoteChanged(bRemote As Boolean)
@@ -401,7 +403,7 @@ Public Class DirectCutPageUC
Else
sLuaFileName = ParkingButton.FLuaScriptName
End If
ParkingButton.ExecuteMDICommand(sLuaFileName)
VarMdiCommand.ExecuteMDICommand(sLuaFileName)
End Sub
Friend Sub ParkingStateChanged(bParkingState As Boolean)
@@ -479,7 +481,7 @@ Public Class DirectCutPageUC
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
' Imposto modalità manuale della macchina
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
Dim nResult As Short = m_MainWindow.m_DirectCutPageUC.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
End Sub
+144 -99
View File
@@ -1,11 +1,10 @@
<UserControl x:Class="FlatteningCut"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
@@ -28,7 +27,7 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
@@ -38,90 +37,136 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
<ScrollViewer VerticalScrollBarVisibility="Visible" Visibility="Visible"
Grid.Row="1" Grid.RowSpan="11" Grid.ColumnSpan="2">
<Grid Name="DatiTaglioGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.1"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="0.1"/>
</Grid.RowDefinitions>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<TextBlock Name="ChainedPathTxBl" Grid.Row="11" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="ChainedPathChBx" Grid.Row="11" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<ComboBox Name="SelToolCmBx" Grid.Row="12" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Grid Grid.Row="13" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
</Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<Grid Grid.Row="11" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
</ScrollViewer>
<Grid Grid.Row="12" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
@@ -130,16 +175,16 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
+231 -127
View File
@@ -1,4 +1,6 @@
Imports EgtUILib
Imports EgtUILib.EgtInterface
Imports OmagCUT.MainWindow
Public Class FlatteningCut
@@ -9,6 +11,8 @@ Public Class FlatteningCut
Private m_bActive As Boolean = False
' Flag di simulazione in corso
Private m_bSimul As Boolean = False
' Definizione del taglio diretto di questa pagina
Private Const FLATTENING As String = "Flattening"
' Origine tavola e dati grezzo
Private m_bRawOk As Boolean = False
@@ -35,14 +39,18 @@ Public Class FlatteningCut
Private m_bHeadSide As Boolean = False
Private m_nMachType As Integer = 1
Private m_bRotLock As Boolean = False
Private m_bChainedPath As Boolean = True
Private m_nTool As Integer = 0
' Array delle modalità di acquisizione dei punti
Private m_PointsModeArray(2) As String
' Array delle tipologia di lavorazione della spianatura
Private m_TypeArray(1) As String
Private m_TypeArray(2) As String
' Punto selezionato nel disegno
Private m_ptPrev As Point3d
' Layer per crocette temporanee
Private m_nTempLay As Integer = GDB_ID.NULL
' Array degliutensili disponibili (lama e fresa)
Private m_ToolsArray(1) As String
' Costanti
Private Const MAX_TAB_DEPTH As Double = 10.0
@@ -57,8 +65,9 @@ Public Class FlatteningCut
End Enum
' Costanti che indicano la tipologia di lavorazione della spianatura
Private Enum MACH_TYPE As Integer
ONEWAY = 0
ZIGZAG = 1
ZIGZAG = 0
ONEWAY = 1
SPIRAL = 2
End Enum
'Costante che indica il lato in cui posizionare i tagli
Private Enum CutSide As Integer
@@ -66,43 +75,56 @@ Public Class FlatteningCut
Right
End Enum
Private Enum TOOL As Integer
SAW = 0
MILL = 1
End Enum
' Per abilitare la spianatura con la FRESA deve essere imposatato a TRUE il flag "Usa Fresa" nella pagina MACCHINA (campo INCISIONI)
Private Sub FlatteningCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo lista modalità di acquisizione punto
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray
' Creo lista tipo lavorazione
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(MSG_COMBOBOXPARAM + 39)
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(MSG_COMBOBOXPARAM + 38)
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(90838) ' ZigZag
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(90839) ' OneWay
m_TypeArray(MACH_TYPE.SPIRAL) = EgtMsg(90851) ' Spirale
' la associo alla combobox
TypeCmBx.ItemsSource = m_TypeArray
' assegno messaggi
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
WidthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 26)
OverlapTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 27)
ZReleasedTxBl.Text = "Z Svincolo"
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
WidthTxBl.Text = EgtMsg(90226) ' Larghezza
OverlapTxBl.Text = EgtMsg(90227) ' Sovrapposizione
ZReleasedTxBl.Text = EgtMsg(91235) ' Z Svincolo
SideTxBl.Text = EgtMsg(90223) ' Tagli lato motore
RotLockTxBl.Text = EgtMsg(90229) ' Blocca Asse C
ChainedPathTxBl.Text = EgtMsg(91236) ' Chained path
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
' tipo di utensile in uso per la lavorazione
m_ToolsArray(TOOL.SAW) = EgtMsg(90224) ' Lama
m_ToolsArray(TOOL.MILL) = EgtMsg(91237) ' Fresa
SelToolCmBx.ItemsSource = m_ToolsArray
' Carico i dati dell'ultimo taglio
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_LENGTH, m_dLen, m_MainWindow.GetIniFile())
m_dWid = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_WIDTH, m_dWid, m_MainWindow.GetIniFile())
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dLen = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_LENGTH, m_dLen, m_MainWindow.GetIniFile())
m_dWid = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_WIDTH, m_dWid, m_MainWindow.GetIniFile())
m_dOverlap = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, m_dOverlap, m_MainWindow.GetIniFile())
m_dZReleased = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, m_dZReleased, m_MainWindow.GetIniFile())
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
m_nMachType = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType, m_MainWindow.GetIniFile())
m_bRotLock = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, 0, m_MainWindow.GetIniFile()) <> 0)
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
m_nMachType = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType, m_MainWindow.GetIniFile())
m_bRotLock = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, 0, m_MainWindow.GetIniFile()) <> 0)
m_bChainedPath = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLAT_CHAINEDPATH, 0, m_MainWindow.GetIniFile()) <> 0)
m_nTool = GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile())
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
End Sub
@@ -125,16 +147,16 @@ Public Class FlatteningCut
' Disabilito registrazione progetto modificato
EgtDisableModified()
' Creo layer temporaneo per crocette
m_nTempLay = EgtCreateGroup( GDB_ID.ROOT)
EgtSetLevel( m_nTempLay, GDB_LV.TEMP)
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
' Origine tavola
m_bRawOk = True
If Not EgtGetTableRef( 1, m_ptTabOri) Then
If Not EgtGetTableRef(1, m_ptTabOri) Then
m_bRawOk = False
EgtOutLog("Error on TableRef1")
End If
' Dati del grezzo
If Not GetRawBox( m_ptRawMin, m_ptRawMax) Then
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
m_bRawOk = False
EgtOutLog("Error on RawBox")
End If
@@ -142,7 +164,7 @@ Public Class FlatteningCut
m_bPointP1Ok = False
m_bPointP2Ok = False
' Inizializzo primo punto acquisito dal disegno
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
m_ptPrev.z = m_ptRawMax.z
' Disegno crocetta che indica il punto acquisito
CreateCross(m_nTempLay, m_ptPrev)
@@ -151,10 +173,10 @@ Public Class FlatteningCut
SetCoordVisibility(True)
ShowCoord()
' Assegno parametri di lavorazione già definiti
DepthTxBx.Text = LenToString( m_dDepth, 1)
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
LenghtTxBx.Text = LenToString( m_dLen, 1)
WidthTxBx.Text = LenToString( m_dWid, 2)
DepthTxBx.Text = LenToString(m_dDepth, 1)
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
LenghtTxBx.Text = LenToString(m_dLen, 1)
WidthTxBx.Text = LenToString(m_dWid, 2)
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
ZReleasedTxBx.Text = LenToString(m_dZReleased, 2)
' carico la quota di svincolo per la spianatura
@@ -163,6 +185,9 @@ Public Class FlatteningCut
SideChBx.IsChecked = m_bHeadSide
TypeCmBx.SelectedIndex = m_nMachType
RotLockChBx.IsChecked = m_bRotLock
ChainedPathChBx.IsChecked = m_bChainedPath
' Assegno l'utensile definito in macchina per la fresatura
SelToolCmBx.SelectedIndex = m_nTool
' Reset taglio e disabilito bottone esecuzione
m_bCutOk = False
UpdateSimulOkBtn()
@@ -176,16 +201,16 @@ Public Class FlatteningCut
Friend Sub FlatteningCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
' Salvo i dati correnti
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_LENGTH, DoubleToString( m_dLen, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_WIDTH, DoubleToString( m_dWid, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_OVERLAP, DoubleToString(m_dOverlap, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, DoubleToString(m_dZReleased, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, If( m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If( m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_LENGTH, DoubleToString(m_dLen, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_WIDTH, DoubleToString(m_dWid, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, DoubleToString(m_dOverlap, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, DoubleToString(m_dZReleased, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, If(m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If(m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
' Se non vado in simulazione
If Not m_bSimul Then
@@ -268,30 +293,43 @@ Public Class FlatteningCut
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
If bIsMultiCut Then
EgtSetCalcTool(sSaw, "H1", 1)
End If
' Se acquisizone lama o laser
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Se punto da laser
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
' Ora imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
' Altrimenti da lama
' Altrimenti da lama
Else
' Imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
@@ -308,8 +346,6 @@ Public Class FlatteningCut
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
End If
@@ -339,27 +375,40 @@ Public Class FlatteningCut
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
If bIsMultiCut Then
EgtSetCalcTool(sSaw, "H1", 1)
End If
' Se acquisizone lama o laser
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Se punto da laser
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
' Ora imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
' Altrimenti da lama
' Altrimenti da lama
Else
' Imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
@@ -367,15 +416,13 @@ Public Class FlatteningCut
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP2Ok = True
' Altrimenti da disegno
' Altrimenti da disegno
Else
' Assegno punto selezionato nel disegno a m_ptTipP2
m_ptTipP2 = m_ptPrev
' Porto il tip nell'origine tavola
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP2Ok = True
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Imposto la lama corrente
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
End If
@@ -446,11 +493,9 @@ Public Class FlatteningCut
' Recupero il valore di larghezza impostato
Dim dWidth As Double = 0
StringToLen(WidthTxBx.Text, dWidth)
' Recupero lo spessore della lama corrente
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
Dim dThick As Double = GetFootPrintTool()
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
' Recupero l'impronta dell'utensile corrente
Dim dThick As Double = GetToolFootprint()
' La larghezza della spianatura non può essere inferiore all'impronta dell'utensile (spessore per lama, diametro per fresa)
m_dWid = Math.Max(dWidth, dThick)
WidthTxBx.Text = LenToString(m_dWid, 2)
' Disegno il taglio
@@ -476,8 +521,7 @@ Public Class FlatteningCut
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
' Recupero spessore della lama correntemente attiva
Dim dThick As Double = GetFootPrintTool()
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
Dim dThick As Double = GetToolFootprint()
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
Dim dOverlap As Double = 0
Const MIN_OFFSET As Double = 1.0
@@ -524,6 +568,16 @@ Public Class FlatteningCut
EgtDraw()
End Sub
Private Sub SelToolCmBx_SelectionChanged(sender As Object, e As EventArgs) Handles SelToolCmBx.SelectionChanged
m_nTool = SelToolCmBx.SelectedIndex
' Disabilito il concatenamento
ChainedPathChBx.IsEnabled = (m_nTool = TOOL.MILL)
' Disegno il taglio
CreateFlatteningCut()
SetMachineInCurrPos()
EgtDraw()
End Sub
Private Sub RotLockChBx_Click(sender As Object, e As EventArgs) Handles RotLockChBx.Click
m_bRotLock = RotLockChBx.IsChecked
' Disegno il taglio
@@ -532,6 +586,14 @@ Public Class FlatteningCut
EgtDraw()
End Sub
Private Sub ChainedPathChBx_Click(sender As Object, e As EventArgs) Handles ChainedPathChBx.Click
m_bChainedPath = ChainedPathChBx.IsChecked
' Disegno il taglio
CreateFlatteningCut()
SetMachineInCurrPos()
EgtDraw()
End Sub
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
' Recupero il valore della coordinata (in 0 Tab)
Dim dXcoord As Double = 0
@@ -583,9 +645,9 @@ Public Class FlatteningCut
m_CurrProjPage.SetWarningMessage("Trial Version")
#Else
' Verifico non sia versione Ufficio
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
m_CurrProjPage.SetWarningMessage( "Office Version")
Return
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
m_CurrProjPage.SetWarningMessage("Office Version")
Return
End If
' Verifico ci sia un taglio valido
If Not m_bCutOk Then Return
@@ -619,21 +681,26 @@ Public Class FlatteningCut
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
End Sub
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
Private Function GetFootPrintTool() As Double
' vedere nella pagina Allarm il capito "Incisioni"
Dim bForceUseMill As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
' ricavo impronta di lavorazione (in larghezza) in funzione dell'utensile selezionato
Private Function GetToolFootprint() As Double
Dim dFootPrint As Double = 0
' verifico quale lavorazione è attiva
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
' se richiesta lama
If m_nTool <> TOOL.MILL Then
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) Then
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
Else
EgtOutLog("In ToolDB missing saw " & m_MainWindow.m_CurrentMachine.sCurrSaw)
End If
' altrimenti è richiesta fresa
Else
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
'GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
GetMillFromMilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
If String.IsNullOrWhiteSpace( sCurrMill) Then sCurrMill = GetMillFromMilling(m_MainWindow.m_CurrentMachine.sCurrMilling)
' recupero informazioni della fresa in uso
EgtTdbSetCurrTool(sCurrMill)
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
If EgtTdbSetCurrTool(sCurrMill) Then
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
Else
EgtOutLog("In ToolDB missing mill " & m_MainWindow.m_CurrentMachine.sCurrSaw)
End If
End If
Return dFootPrint
End Function
@@ -651,28 +718,39 @@ Public Class FlatteningCut
' Disattivo eventuali lavorazioni presenti
DeactivateAllMachinings()
' Creo nuovo pezzo per il taglio diretto
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nPartId, NAME_DIRECTCUT)
Dim nLayerId = EgtCreateGroup(nPartId)
' EgtSetName(nLayerId, NAME_OUTLOOP)
Dim nPartId As Integer = CreateDirectCutPart()
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nLayerId, NAME_ONPATH)
' Creo il taglio
Dim ptStart As Point3d = m_ptTipP1
ptStart.z = 0
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
Dim nCutId As Integer = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
' Indico che è un taglio Diretto di tipo Flattening
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
EgtSetInfo(nCutId, INFO_ENGR_MILL, m_nTool)
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
If (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0) Then
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
End If
Dim dThick As Double = GetToolFootprint()
EgtSetInfo(nCutId, INFO_WIDTH, dThick)
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
' Imposto prima direzione
EgtSetInfo(nCutId, INFO_DIR, 1)
' Eventuale riduzione lavorazione
Dim bReducePath As Boolean = ( GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENTERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) = 0)
' Per fresatura eventuale riduzione della geometria
If m_nTool = TOOL.MILL Then
If bReducePath Then ExtendLenghtMillPath(nCutId, -dThick / 2)
EgtSetInfo(nCutId, INFO_STRICT, 0)
' per tagli con lama eventuale riduzione della lavorazione
Else
EgtSetInfo(nCutId, INFO_STRICT, If( bReducePath, 3, 0))
End If
' Eventuale bloccaggio rotazione asse C tra le passate
If RotLockChBx.IsChecked Then
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
End If
' Funzione che crea i tagli successivi al primo
EgtSetInfo(nCutId, INFO_STEP_TYPE, m_nMachType)
' Funzione che crea eventuali tagli successivi al primo
MultiplyCut(nLayerId, nCutId)
' Creo layer per crocetta di riferimento
Dim nCrossLayerId = EgtCreateGroup(nPartId)
@@ -704,54 +782,80 @@ Public Class FlatteningCut
End Function
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
' Recupero spessore della lama (utensile) correntemente attiva
Dim dThick As Double = GetFootPrintTool()
' Recupero impronta della lama o fresa utilizzata
Dim dThick As Double = GetToolFootprint()
If dThick = 0 Then Return False
' Salvo la curva originale nella lista dei percorsi da concatenare
Dim CutsList As New List(Of Integer)
CutsList.Add(nCutId)
' Imposto angolo di rotazione a seconda del lato dei tagli
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
' Definisco vettore di spostamento
Dim vtDelta As Vector3d
vtDelta = Vector3d.FromPolar(1, m_dAngO)
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
Dim nStepNum As Integer
Dim dDelta As Double
Dim dWidth As Double = m_dWid
dDelta = dThick - m_dOverlap
dWidth -= dThick
nStepNum = CInt(Math.Ceiling(dWidth / dDelta)) + 1
If nStepNum > 1 Then
dDelta = dWidth / (nStepNum - 1)
End If
EgtSetInfo(nCutId, INFO_WIDTH, dThick)
' Creo vettore delta
vtDelta *= dDelta
' Creo indice per impostare info che indica tipologia di spianatura
Dim nTypeIndex As Integer = 1
' Calcolo numero di passate necessarie a coprire l'area impostata e lunghezza vettore delta
Dim dDelta As Double = dThick - m_dOverlap
Dim dWidth As Double = m_dWid - dThick
Dim nStepNum As Integer = CInt(Math.Ceiling(dWidth / dDelta)) + 1
If nStepNum > 1 Then dDelta = dWidth / (nStepNum - 1)
' Definisco vettore di spostamento
Dim vtDelta As Vector3d = Vector3d.FromPolar(dDelta, m_dAngO)
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
' Creo le ripetizioni
For Index As Integer = 1 To nStepNum - 1
Dim vtPerpMove As Vector3d = Index * vtDelta
' Creo copie
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
EgtSetInfo(nCut2Id, INFO_WIDTH, dThick)
' Assegno info direzione a seconda del tipo di spianatura
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
If nTypeIndex = 1 Then
EgtSetInfo(nCut2Id, INFO_DIR, 2)
nTypeIndex = 2
Else
EgtSetInfo(nCut2Id, INFO_DIR, 1)
nTypeIndex = 1
End If
Else
EgtSetInfo(nCut2Id, INFO_DIR, 1)
End If
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
' Assegno info direzione a seconda del tipo di spianatura
Dim nDir As Integer = 1
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG And Index Mod 2 <> 0 Then nDir = 2
EgtSetInfo(nCut2Id, INFO_DIR, nDir)
' Inserisco nell'elenco delle curve eventualmente da concatenare
CutsList.Add(nCut2Id)
Next
' Se fresatura e richiesto percorso concatenato
If m_nTool = TOOL.MILL And m_bChainedPath Then
' Trasformo la prima curva in composita (copiando tutte le info)
Dim vsInfo As String() = Nothing
EgtGetAllInfo( CutsList(0), vsInfo)
Dim nCompoCrv As Integer = EgtCreateCurveCompo(nLayerId, CutsList(0), True)
For Each sInfo As String In vsInfo
Dim KeyAndVal As String() = sInfo.Split( "=".ToCharArray)
If KeyAndVal.Count() >= 2 Then EgtSetInfo( nCompoCrv, KeyAndVal(0), KeyAndVal(1))
Next
' Accodo opportunamente le curve successive
For Index As Integer = 1 To CutsList.Count - 1
' Inverto le curve di ritorno (di indice dispari in lista)
If Index Mod 2 <> 0 Then EgtInvertCurve( CutsList(Index))
' Aggiungo il collegamento
Dim ptStart As Point3d
EgtStartPoint(CutsList(Index), CutsList(Index), ptStart)
EgtAddCurveCompoLine( nCompoCrv, ptStart)
' Aggiungo la curva
EgtAddCurveCompoCurve( nCompoCrv, CutsList(Index), true)
Next
End If
Return True
End Function
Private Sub ExtendLenghtMillPath(IdCurv As Integer, dExtend As Double,
Optional bStart As Boolean = True, Optional bEnd As Boolean = True)
If bStart Then
Dim ptStart As Point3d
EgtStartPoint(IdCurv, IdCurv, ptStart)
EgtTrimExtendCurveByLen(IdCurv, dExtend, ptStart)
End If
If bEnd Then
Dim ptEnd As Point3d
EgtEndPoint(IdCurv, IdCurv, ptEnd)
EgtTrimExtendCurveByLen(IdCurv, dExtend, ptEnd)
End If
End Sub
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
' Aggiungo crocette
Dim vtCrossX As New Vector3d(20, 0, 0)
+120 -54
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="GridCut"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
@@ -34,42 +34,43 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0">
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Row="5" Grid.ColumnSpan="2">
<!-- STANDARD -->
<Grid Name ="StandardGrid" Grid.Row="5" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="2"/>
@@ -85,31 +86,98 @@
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" Background="Black" />
<TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="0"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}" />
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
<TextBlock Name="NumPzYTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}" />
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
</Grid>
<Button Name="CustomGridBtn" Grid.Row="5" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}"
Margin="10,30,10,30">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" Height="90" Width="90" />
<TextBlock Name="GridCutTxt" Grid.Column="1"
HorizontalAlignment="Left"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<!-- SPECIALE -->
<!--<Grid Name ="CustomGrid" Grid.Row="5" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="2.5*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0">
<Button Name="AddCutBtn" Content="+"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="35" Height="35" HorizontalAlignment="Left"/>
<Button Name="RemoveCutBtn" Content="-"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<ToggleButton Name="Cut_XTgBtn" Content="X"
Style="{DynamicResource OmagCut_YellowToggleButton}"
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<ToggleButton Name="Cut_YTgBtn" Content="Y"
Style="{DynamicResource OmagCut_YellowToggleButton}"
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<Button Name="UpdateBtn" Content="Update"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="85" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
</StackPanel>
<ScrollViewer Background="Transparent" Grid.Row="1"
Margin="0,5,0,0"
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<ListBox Name="CustomGridLstBx" ScrollViewer.CanContentScroll="False">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Width="210">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Text="{Binding sNumber}" Grid.Column="0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Text="{Binding sInteraxis}" Grid.Column="2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
</ScrollViewer>
</Grid>-->
<TextBlock Name="SideTxBl" Grid.Row="6" Grid.ColumnSpan="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<Grid Grid.Row="7" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
@@ -119,13 +187,13 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Grid Grid.Row="11" Grid.ColumnSpan="2">
@@ -135,19 +203,17 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</UserControl>
+425 -63
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Imports System.Collections.ObjectModel
Public Class GridCut
' Riferimenti a pagine
@@ -41,6 +42,12 @@ Public Class GridCut
' Gestione spessore lama
Private m_bSawTh As Boolean = False
' Gestione griglia Custom
Dim m_bCustomGrid As Boolean = False
Public m_ListOfCut_X As New ObservableCollection(Of Cut_Axis)
Public m_ListOfCut_Y As New ObservableCollection(Of Cut_Axis)
Friend m_CustomGrid As CustomGridUC
' Costanti
Private Const MAX_TAB_DEPTH As Double = 10.0
Private Const MIN_CUT_LEN As Double = 10.0
@@ -59,40 +66,77 @@ Public Class GridCut
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo lista modalità di acquisizione punto
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray
' assegno messaggi
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
NumPzXTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 19)
DimPzXTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 20)
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
NumPzXTxBl.Text = EgtMsg(90219) ' Numero X
DimPzXTxBl.Text = EgtMsg(90220) ' Dimensioni X
NumPzYTxBl.Text = EgtMsg(90221) ' Numero Y
DimPzYTxBl.Text = EgtMsg(90222) ' Dimensioni Y
SideTxBl.Text = EgtMsg(90223) ' Taglia lato motore
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
GridCutTxt.Text = EgtMsg(90264) ' Custom Grid
' Carico i dati dell'ultimo taglio
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
m_nNumX = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
m_dDimX = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
m_nNumY = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
m_nNumX = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
m_nNumY = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
m_nNumX = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
m_nNumY = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
' Carico i dati per i tagli di griglia Custom
m_bCustomGrid = (GetPrivateProfileInt(S_DIRECTCUTS, K_ENABLECUSTOMGRID, 0, m_MainWindow.GetIniFile()) <> 0)
If m_bCustomGrid Then
LoadCustomData(K_GRIDNUMDIMXCUSTOM, m_ListOfCut_X)
LoadCustomData(K_GRIDNUMDIMYCUSTOM, m_ListOfCut_Y)
End If
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
End Sub
' Lettura dei dati della griglia Custom
Private Sub LoadCustomData(sIpKeyName As String, LocalList As ObservableCollection(Of Cut_Axis))
Dim dVal As Double = 0
Dim nVal As Integer = 0
Dim sVal As String = String.Empty
GetPrivateProfileString(S_DIRECTCUTS, sIpKeyName, sVal, sVal, m_MainWindow.GetIniFile())
Dim sItems As String() = sVal.Split(";"c)
If sItems.Count > 0 Then
For Each Item As String In sItems
Dim sSubItems As String() = Item.Split(",")
If sSubItems.Count = 2 Then
If IsNumeric(sSubItems(0)) And IsNumeric(sSubItems(1)) Then
nVal = CInt(sSubItems(0))
StringToDouble(sSubItems(1), dVal)
LocalList.Add(New Cut_Axis(nVal, dVal))
End If
End If
Next
End If
End Sub
Private Sub GridCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -131,7 +175,8 @@ Public Class GridCut
m_bPointP1Ok = False
m_bPointP2Ok = False
' Inizializzo primo punto acquisito dal disegno
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
m_ptPrev.z = m_ptRawMax.z
' Disegno crocetta che indica il punto acquisito
CreateCross(m_nTempLay, m_ptPrev)
@@ -140,13 +185,18 @@ Public Class GridCut
SetCoordVisibility(True)
ShowCoord()
' Assegno parametri di lavorazione
DepthTxBx.Text = LenToString( m_dDepth, 1)
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
SideAngleTxBx.Text = DoubleToString( m_dAngV, 2)
DepthTxBx.Text = LenToString(m_dDepth, 1)
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
DepthTxBx.Text = LenToString(m_dDepth, 1)
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
NumPzXTxBx.Text = m_nNumX.ToString()
DimPzXTxBx.Text = LenToString( m_dDimX, 1)
DimPzXTxBx.Text = LenToString(m_dDimX, 1)
DimPzXTxBx.Text = LenToString(m_dDimX, 1)
NumPzYTxBx.Text = m_nNumY.ToString()
DimPzYTxBx.Text = LenToString( m_dDimY, 1)
DimPzYTxBx.Text = LenToString(m_dDimY, 1)
DimPzYTxBx.Text = LenToString(m_dDimY, 1)
SideChBx.IsChecked = m_bHeadSide
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
@@ -162,21 +212,51 @@ Public Class GridCut
Point1Btn.IsChecked = False
' Aggiorno visualizzazione
EgtDraw()
If m_bCustomGrid Then
StandardGrid.Visibility = Visibility.Hidden
CustomGridBtn.Visibility = Visibility.Visible
m_CustomGrid = New CustomGridUC(Me)
'CustomGrid.Visibility = Visibility.Visible
'Cut_XTgBtn.IsChecked = True
'CustomGridLstBx.ItemsSource = m_ListOfCut_X
Else
StandardGrid.Visibility = Visibility.Visible
CustomGridBtn.Visibility = Visibility.Hidden
'CustomGrid.Visibility = Visibility.Hidden
End If
End Sub
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
' Salvo i dati correnti
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_ANGV, DoubleToString( m_dAngV, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DIMX, DoubleToString( m_dDimX, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DIMY, DoubleToString( m_dDimY, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, If( m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_POSY, DoubleToString( m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_ANGV, DoubleToString(m_dAngV, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DIMX, DoubleToString(m_dDimX, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DIMY, DoubleToString(m_dDimY, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_HEADSIDE, If(m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
If m_bCustomGrid Then
Dim sGridNumDimXCustom As String = ""
For Index_X As Integer = 0 To m_ListOfCut_X.Count - 1
sGridNumDimXCustom &= m_ListOfCut_X(Index_X).sNumber & "," & DoubleToString(m_ListOfCut_X(Index_X).dInteraxis, 2) & ";"
Next
If sGridNumDimXCustom <> "" Then sGridNumDimXCustom = sGridNumDimXCustom.Remove(sGridNumDimXCustom.Count - 1)
WritePrivateProfileString(S_DIRECTCUTS, "GridNumDimXCustom", sGridNumDimXCustom, m_MainWindow.GetIniFile())
Dim sGridNumDimYCustom As String = ""
For Index_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
sGridNumDimYCustom &= m_ListOfCut_Y(Index_Y).sNumber & "," & DoubleToString(m_ListOfCut_Y(Index_Y).dInteraxis, 2) & ";"
Next
If sGridNumDimYCustom <> "" Then sGridNumDimYCustom = sGridNumDimYCustom.Remove(sGridNumDimYCustom.Count - 1)
WritePrivateProfileString(S_DIRECTCUTS, "GridNumDimYCustom", sGridNumDimYCustom, m_MainWindow.GetIniFile())
End If
' Se non vado in simulazione
If Not m_bSimul Then
' Dichiaro sottopagina da non riattivare
@@ -187,6 +267,7 @@ Public Class GridCut
EraseDirectCutPart()
' Riattivo eventuali lavorazioni presenti
ActivateAllMachinings()
EgtSetCurrPhase(1)
' Abilito registrazione progetto modificato
EgtEnableModified()
' Nascondo la macchina
@@ -260,6 +341,12 @@ Public Class GridCut
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
If bIsMultiCut Then
m_MainWindow.m_DirectCutPageUC.ReloadParam()
End If
' Recupero dati utensile e testa corrente
Dim sTool As String = ""
Dim sHead As String = ""
@@ -272,6 +359,13 @@ Public Class GridCut
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se punto da laser
@@ -279,7 +373,7 @@ Public Class GridCut
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Altrimenti da lama
@@ -287,10 +381,10 @@ Public Class GridCut
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
@@ -302,7 +396,7 @@ Public Class GridCut
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
' Altrimenti punto da click di mouse
' Altrimenti punto da click di mouse
Else
' Assegno punto selezionato nel disegno a m_ptTipP1
m_ptTipP1 = m_ptPrev
@@ -339,6 +433,12 @@ Public Class GridCut
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
If bIsMultiCut Then
m_MainWindow.m_DirectCutPageUC.ReloadParam()
End If
' Recupero dati utensile e testa corrente
Dim sTool As String = ""
Dim sHead As String = ""
@@ -351,6 +451,13 @@ Public Class GridCut
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se punto da laser
@@ -358,7 +465,7 @@ Public Class GridCut
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Altrimenti da lama
@@ -366,10 +473,10 @@ Public Class GridCut
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
' Porto il tip nell'origine tavola
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP2Ok = True
@@ -379,7 +486,7 @@ Public Class GridCut
m_dAngV = 90 - dTAngV
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
' Altrimenti punto da click di mouse
' Altrimenti punto da click di mouse
Else
' Assegno punto selezionato nel disegno a m_ptTipP2
m_ptTipP2 = m_ptPrev
@@ -495,6 +602,64 @@ Public Class GridCut
EgtDraw()
End Sub
Private Sub CustomGridBtn_Click(sender As Object, e As RoutedEventArgs) Handles CustomGridBtn.Click
m_CustomGrid.SetValue(Grid.RowProperty, 1)
m_CustomGrid.SetValue(Grid.RowSpanProperty, 6)
m_CustomGrid.SetValue(Grid.ColumnSpanProperty, 2)
SingleCutGrid.Children.Add(m_CustomGrid)
End Sub
'#Region "CUSTOM LIST GRID"
' Private Sub CutX_Selected() Handles Cut_XTgBtn.Click
' If Cut_XTgBtn.IsChecked Then
' Cut_YTgBtn.IsChecked = False
' CustomGridLstBx.ItemsSource = m_ListOfCut_X
' CustomGridLstBx.UpdateLayout()
' End If
' End Sub
' Private Sub CutY_Selected() Handles Cut_YTgBtn.Click
' If Cut_YTgBtn.IsChecked Then
' Cut_XTgBtn.IsChecked = False
' CustomGridLstBx.ItemsSource = m_ListOfCut_Y
' CustomGridLstBx.UpdateLayout()
' End If
' End Sub
' Private Sub AddCut_Click(sender As Object, e As EventArgs) Handles AddCutBtn.Click
' If Cut_XTgBtn.IsChecked Then
' m_ListOfCut_X.Add(New Cut_Axis(0, 0))
' ElseIf Cut_YTgBtn.IsChecked Then
' m_ListOfCut_Y.Add(New Cut_Axis(0, 0))
' End If
' CustomGridLstBx.UpdateLayout()
' End Sub
' Private Sub RemoveCut_Click(sender As Object, e As EventArgs) Handles RemoveCutBtn.Click
' Dim CurrIndexListSelected As Integer = -1
' CurrIndexListSelected = CustomGridLstBx.SelectedIndex
' If Cut_XTgBtn.IsChecked Then
' If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_ListOfCut_X.Count - 1 Then
' CurrIndexListSelected = m_ListOfCut_X.Count - 1
' End If
' m_ListOfCut_X.RemoveAt(CurrIndexListSelected)
' ElseIf Cut_YTgBtn.IsChecked Then
' If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_ListOfCut_Y.Count - 1 Then
' CurrIndexListSelected = m_ListOfCut_Y.Count - 1
' End If
' m_ListOfCut_Y.RemoveAt(CurrIndexListSelected)
' End If
' CustomGridLstBx.UpdateLayout()
' End Sub
' Public Sub Update_Click() Handles UpdateBtn.Click
' CreateGridCut()
' EgtDraw()
' End Sub
'#End Region ' Custom Grid
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
' Verifico ci sia un taglio valido
If Not m_bCutOk Then Return
@@ -518,9 +683,9 @@ Public Class GridCut
m_CurrProjPage.SetWarningMessage("Trial Version")
#Else
' Verifico non sia versione Ufficio
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
m_CurrProjPage.SetWarningMessage( "Office Version")
Return
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
m_CurrProjPage.SetWarningMessage("Office Version")
Return
End If
' Verifico ci sia un taglio valido
If Not m_bCutOk Then Return
@@ -552,7 +717,7 @@ Public Class GridCut
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
End Sub
Private Function CreateGridCut() As Boolean
Friend Function CreateGridCut() As Boolean
' Verifico sia definito il punto iniziale e il grezzo
If Not m_bPointP1Ok Or Not m_bRawOk Then
m_bCutOk = False
@@ -565,9 +730,8 @@ Public Class GridCut
' Disattivo eventuali lavorazioni presenti
DeactivateAllMachinings()
' Creo nuovo pezzo per il taglio diretto
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nPartId, NAME_DIRECTCUT)
Dim nLayerId = EgtCreateGroup(nPartId)
Dim nPartId As Integer = CreateDirectCutPart()
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nLayerId, NAME_OUTLOOP)
' Creo il taglio parallelo alla lama
Dim ptStart As Point3d = m_ptTipP1
@@ -599,16 +763,50 @@ Public Class GridCut
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
RemoveFinalHome()
End If
' Se richiesta gestione tagli finali
OrderFinalSawCuts()
' Aggiorno stato bottoni
UpdateSimulOkBtn()
Return m_bCutOk
End Function
Private Function OrderFinalSawCuts() As Boolean
' Se gestione tagli finali non richiesta, esco
If Not m_MainWindow.m_CurrentMachine.bEnableFinalSawCut Then Return False
' Sposto i tagli finali alla fine, conservando l'ordine relativo
Dim nFirstMovedId As Integer = GDB_ID.NULL
Dim nRefId As Integer = EgtGetLastActiveOperation()
Dim nOpeId As Integer = EgtGetFirstActiveOperation()
While nOpeId <> GDB_ID.NULL
If nOpeId = nFirstMovedId Then Exit While
Dim nNextOpeId As Integer = EgtGetNextActiveOperation( nOpeId)
If EgtGetOperationType( nOpeId) = MCH_OY.SAWING Then
Dim bFinalCut As Boolean = False
IF EgtGetInfo( nOpeId, "FinalCut", bFinalCut) AndAlso bFinalCut Then
EgtRelocateGlob( nOpeId, nRefId, GDB_POS.AFTER)
nRefId = nOpeId
If nFirstMovedId = GDB_ID.NULL Then nFirstMovedId = nOpeId
End If
End If
nOpeId = nNextOpeId
End While
' Esco
Return True
End Function
Private Function MultiplyCut(nLayerId As Integer) As Boolean
If m_bCustomGrid Then
Return MultiplyCut_1(nLayerId)
End If
Return MultiplyCut_0(nLayerId)
End Function
Private Function MultiplyCut_0(nLayerId As Integer) As Boolean
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
Dim nType As Integer = 0
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
Dim dThick As Double = 0
EgtTdbGetCurrToolParam( If( nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
' Ricalcolo lo spessore in base all'inclinazione
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
@@ -630,7 +828,8 @@ Public Class GridCut
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
' Inidico che è un taglio Diretto di tipo GridCut
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, MainWindow.FlagDirectCuts.GridCut)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
' Recupero spessore lama corrente
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
@@ -657,7 +856,8 @@ Public Class GridCut
' Arretro il punto di partenza di uno spessore lama
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
' Inidico che è un taglio Diretto di tipo GridCut
EgtSetInfo(nCutPerpId, INFO_DIRECTCUT, MainWindow.FlagDirectCuts.GridCut)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutPerpId, -dThick, OFF_TYPE.EXTEND)
@@ -685,6 +885,116 @@ Public Class GridCut
Return True
End Function
Private Function MultiplyCut_1(nLayerId As Integer) As Boolean
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
Dim nType As Integer = 0
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
Dim dThick As Double = 0
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
' Ricalcolo lo spessore in base all'inclinazione
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
Dim dRotAngOX As Double = If(SideChBx.IsChecked(), -90, 90)
' Recupero dati da interfaccia
Dim dDimPzX As Double = If(m_ListOfCut_X.Count = 0, 0.0, m_ListOfCut_X(0).dInteraxis)
Dim nNumPzX As Integer = If(m_ListOfCut_X.Count = 0, 0, m_ListOfCut_X(0).nNumber)
Dim dDimPzY As Double = If(m_ListOfCut_Y.Count = 0, 0.0, m_ListOfCut_Y(0).dInteraxis)
Dim nNumPzY As Integer = If(m_ListOfCut_Y.Count = 0, 0, m_ListOfCut_Y(0).nNumber)
Dim TotLenX As Double = 0
For Ind_X As Integer = 0 To m_ListOfCut_X.Count - 1
TotLenX = TotLenX + (m_ListOfCut_X(Ind_X).dInteraxis + dThick) * m_ListOfCut_X(Ind_X).nNumber
Next
Dim TotLenY As Double = 0
For Ind_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
TotLenY = TotLenY + (m_ListOfCut_Y(Ind_Y).dInteraxis + dThick) * m_ListOfCut_Y(Ind_Y).nNumber
Next
' Definisco vettore di spostamento
Dim vtDelta As Vector3d
' Calcolo primo taglio parallelo
Dim ptStart As Point3d = m_ptTipP1
ptStart.z = 0
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
' -------------- TAGLI PARALLELI ASSE Y --------------
Dim dLenX As Double = dThick + TotLenX
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
' Recupero spessore lama corrente
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutParaId, -dThick, OFF_TYPE.EXTEND)
End If
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
For IndexList_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
Dim nCut2Id As Integer = GDB_ID.NULL
dDimPzY = m_ListOfCut_Y(IndexList_Y).dInteraxis
nNumPzY = m_ListOfCut_Y(IndexList_Y).nNumber
' Calcolo vettore di spostamento
vtDelta = Vector3d.FromPolar((dDimPzY + dThick), m_dAngO)
' Ruoto il vettore di traslazione
vtDelta.Rotate(Vector3d.Z_AX, dRotAngOX)
For Index As Integer = 1 To nNumPzY
Dim vtPerpMove As Vector3d = Index * vtDelta
' Creo copie
nCut2Id = EgtCopyGlob(nCutParaId, nLayerId)
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
Next
nCutParaId = nCut2Id
Next
' -------------- TAGLI PARALLELI ASSE X --------------
' Calcolo primo taglio perpendicolare
Dim dLenY As Double = dThick + TotLenY
' Arretro il punto di partenza di uno spessore lama
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutPerpId, -dThick, OFF_TYPE.EXTEND)
End If
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Specchio se è attivo il flag che cambia lato di disegno
If SideChBx.IsChecked() Then
Dim vtRot As Vector3d = Vector3d.FromPolar(1, m_dAngO + 90)
EgtMirror(nCutPerpId, ptStart + Vector3d.FromPolar(dThick / 2, m_dAngO - 90), vtRot, GDB_RT.GLOB)
EgtInvertCurve(nCutPerpId)
End If
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutPerpId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutPerpId, INFO_SIDE_ANGLE, m_dAngV)
For IndexList_X As Integer = 0 To m_ListOfCut_X.Count - 1
Dim nCut3Id As Integer = GDB_ID.NULL
dDimPzX = m_ListOfCut_X(IndexList_X).dInteraxis
nNumPzX = m_ListOfCut_X(IndexList_X).nNumber
' Calcolo secondo vettore di spostamento
vtDelta = Vector3d.FromPolar((dDimPzX + dThick), m_dAngO)
For Index As Integer = 1 To nNumPzX
Dim vtPerpMove As Vector3d = vtDelta * Index
' Creo copie
nCut3Id = EgtCopyGlob(nCutPerpId, nLayerId)
EgtMove(nCut3Id, vtPerpMove, GDB_RT.GLOB)
Next
nCutPerpId = nCut3Id
Next
End If
Return True
End Function
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
ptP += New Vector3d(0, 0, 0.15)
' Aggiungo crocette
@@ -699,10 +1009,10 @@ Public Class GridCut
Private Sub NumPzsTxBx_EgtClosed(sender As Object, e As EventArgs) Handles NumPzXTxBx.EgtClosed, NumPzYTxBx.EgtClosed,
DimPzXTxBx.EgtClosed, DimPzYTxBx.EgtClosed, SideChBx.Click
StringToInt( NumPzXTxBx.Text, m_nNumX)
StringToLen( DimPzXTxBx.Text, m_dDimX)
StringToInt( NumPzYTxBx.Text, m_nNumY)
StringToLen( DimPzYTxBx.Text, m_dDimY)
StringToInt(NumPzXTxBx.Text, m_nNumX)
StringToLen(DimPzXTxBx.Text, m_dDimX)
StringToInt(NumPzYTxBx.Text, m_nNumY)
StringToLen(DimPzYTxBx.Text, m_dDimY)
m_bHeadSide = SideChBx.IsChecked
' Disegno il taglio
CreateGridCut()
@@ -744,4 +1054,56 @@ Public Class GridCut
Return True
End Function
End Class
Public Class Cut_Axis
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
' Numero di tagli con questo interasse
Private m_nNumber As Integer = 0
Public Property sNumber As String
Get
Return m_nNumber.ToString
End Get
Set(value As String)
If IsNumeric(value) Then
m_nNumber = CInt(value)
End If
End Set
End Property
Public ReadOnly Property nNumber As Double
Get
Return m_nNumber
End Get
End Property
' Distanza dal taglio precedente
Private m_dInteraxis As Double = 0.0
Public Property sInteraxis As String
Get
Return LenToString(m_dInteraxis, 2)
End Get
Set(value As String)
Dim PrevValue As Double = m_dInteraxis
If Not StringToLen(value, m_dInteraxis) Then m_dInteraxis = PrevValue
End Set
End Property
Public ReadOnly Property dInteraxis As Double
Get
Return m_dInteraxis
End Get
End Property
'Public ReadOnly Property UpdateSub As Boolean
' Get
' m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_CustomGrid.Update_Click()
' Return True
' End Get
'End Property
Sub New(nNumb As Integer, dInter As Double)
m_nNumber = nNumb
m_dInteraxis = dInter
End Sub
End Class
+30 -30
View File
@@ -1,10 +1,10 @@
<UserControl x:Class="MachineButtonsUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="85.3" d:DesignWidth="853" Loaded="MachineButtons_Loaded">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="85.3" d:DesignWidth="853" Loaded="MachineButtons_Loaded">
<!-- Definizione del controllo MachineButton -->
<Grid Name="MachineButtonsGrid">
@@ -20,52 +20,52 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<ToggleButton Name="MachineButton1" Grid.Column="0" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton1" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Name="ImageButton1" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton2" Grid.Column="1" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton2" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton2" Grid.Column="1" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton2" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton3" Grid.Column="2" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton3" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton3" Grid.Column="2" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton3" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton4" Grid.Column="3" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton4" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton4" Grid.Column="3" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton4" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton5" Grid.Column="4" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton5" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton5" Grid.Column="4" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton5" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton6" Grid.Column="5" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton6" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton6" Grid.Column="5" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton6" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton7" Grid.Column="6" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton7" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton7" Grid.Column="6" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton7" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton8" Grid.Column="7" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton8" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton8" Grid.Column="7" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton8" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton9" Grid.Column="8" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton9" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton9" Grid.Column="8" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton9" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton10" Grid.Column="9" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton10" Style="{StaticResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachineButton10" Grid.Column="9" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton10" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton11" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
<Image Name="ImageButton11" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
</Grid>
</UserControl>
+11 -253
View File
@@ -136,7 +136,7 @@ Public Class MachineButtonsUC
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
CurrToggleBtn.Content = "Z - B"
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
CurrToggleBtn.Content = "Remote"
CurrToggleBtn.Content = EgtMsg(90262) 'Remote
End If
Catch ex As Exception
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
@@ -154,46 +154,39 @@ Public Class MachineButtonsUC
' recupero l'inidce del bottone selezionato
Dim nIndex As Integer = GetToggleButtonIndex(CurrentBtn) - 1
Dim sBaseDir As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
Dim sLuaFileName As String = String.Empty
' Se il bottone chiamantè quello delle porte allora devo eseguire due comandi MDI
' Se il bottone chiamante è quello delle porte allora devo eseguire due comandi MDI
If nIndex = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_OPENED) OrElse
nIndex = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_CLOSED) Then
Dim sTLuaFile As String = sBaseDir & CommandArrayY(nIndex)
Dim sFLuaFile As String = sBaseDir & CommandArrayN(nIndex)
ExecuteMDICommand(CurrentBtn, sTLuaFile)
ExecuteMDICommand(CurrentBtn, sFLuaFile)
VarMdiCommand.ExecuteMDICommand(CommandArrayY(nIndex))
VarMdiCommand.ExecuteMDICommand(CommandArrayN(nIndex))
CurrentBtn.IsChecked = False
Return
End If
' Se il bottone chiamantè quello per la selezione del pannello di controllo
' Se il bottone chiamante è quello per la selezione del pannello di controllo
If nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC) Then
Dim sTLuaFile As String = sBaseDir & CommandArrayY(nIndex)
Dim sFLuaFile As String = sBaseDir & CommandArrayN(nIndex)
If m_CN.nEnablePc = 1 Then
ExecuteMDICommand(CurrentBtn, sTLuaFile)
VarMdiCommand.ExecuteMDICommand(CommandArrayY(nIndex))
ElseIf m_CN.nEnablePc = 2 Then
ExecuteMDICommand(CurrentBtn, sFLuaFile)
VarMdiCommand.ExecuteMDICommand(CommandArrayN(nIndex))
End If
Return
End If
Dim sLuaFileName As String = ""
If CurrentBtn.IsChecked() Then
'EgtLuaExecFile(sBaseDir & CommandArrayY(nIndex))
sLuaFileName = sBaseDir & CommandArrayY(nIndex)
sLuaFileName = CommandArrayY(nIndex)
Else
If Not (StateFlagArray(nIndex) = BTN_STATE_THREEAXIS Or
StateFlagArray(nIndex) = BTN_STATE_FIVEAXIS) Then
'EgtLuaExecFile(sBaseDir & CommandArrayN(nIndex))
sLuaFileName = sBaseDir & CommandArrayN(nIndex)
sLuaFileName = CommandArrayN(nIndex)
Else
Return
End If
End If
ExecuteMDICommand(CurrentBtn, sLuaFileName)
VarMdiCommand.ExecuteMDICommand(sLuaFileName)
' se non ha stato e quindi è un bottone normale, tolgo il check
If StateFlagArray(nIndex) = BTN_STATE_NOTHING Then
@@ -202,241 +195,6 @@ Public Class MachineButtonsUC
End Sub
Friend Sub ExecuteMDICommand(CurrentBtn As Primitives.ToggleButton, sLuaFileName As String)
If String.IsNullOrWhiteSpace(sLuaFileName) Then Return
Dim CmdString As String = String.Empty
Dim b2Start As Boolean = False
Dim EActive As Boolean = False
Dim ENumber As String = String.Empty
Dim EValue As String = String.Empty
Dim EType As String = 0
Dim ENumber2 As String = String.Empty
Dim EValue2 As String = String.Empty
Dim EType2 As String = 0
' eseguo la lettura del file .lua associato al comando
ExecuteDirectCmdLua(sLuaFileName, CmdString, b2Start, EActive, ENumber, EValue, EType, ENumber2, EValue2, EType2)
' comunico i dati calcolati al PLC (quidni ignoro eventuali comandi MDI), scrivo messaggio MDI
If EActive Then
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
' solo per Flexium
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
If Not IsNothing(ENumber2) And Not IsNothing(EValue2) Then
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
End If
' altrimenti scrittura delle variabili E
Else
m_CN.DVariables_WriteVariables2(ENumber, EValue)
End If
Return
Case 3
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
' scrivo prima variabile
Select Case CShort(EType)
Case 1
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), CInt(EValue), 0, 0, "")
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & CInt(EValue))
Case 2
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, CLng(EValue), 0, "")
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & CLng(EValue))
Case 3
Dim d As Double = 0
StringToDouble(EValue, d)
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, 0, d, "")
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & d)
Case 4
m_CN.DVariables_WriteVariables3(ENumber, CShort(EType), 0, 0, 0, EValue)
EgtOutLog("ENumber= " & ENumber & "EType= " & CShort(EType) & "EValue= " & EValue)
End Select
EgtOutLog("dopo scrittura prima variabile")
If Not IsNothing(EType2) AndAlso CShort(EType) > 0 Then
System.Threading.Thread.Sleep(100)
' scrivo seconda variabile
Select Case CShort(EType2)
Case 1
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), CInt(EValue2), 0, 0, "")
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & CInt(EValue2))
Case 2
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, CLng(EValue2), 0, "")
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & CLng(EValue2))
Case 3
Dim d As Double = 0
StringToDouble(EValue2, d)
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, 0, d, "")
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & d)
Case 4
m_CN.DVariables_WriteVariables3(ENumber2, CShort(EType2), 0, 0, 0, EValue2)
EgtOutLog("ENumber2= " & ENumber2 & "EType2= " & CShort(EType2) & "EValue2= " & EValue2)
End Select
EgtOutLog("dopo scrittura seconda variabile")
End If
Return
End If
' CONTROLLO FANUC
Case 4
' ------------------------------------ FANUC ------------------------------------
' eventuale scrittura di linea di comando MDI
If Not String.IsNullOrEmpty(CmdString) Then
' attivo mpdalità MDI
m_CN.DGeneralFunctions_WriteCncMode(2)
System.Threading.Thread.Sleep(100)
' salvo la stringa di comando ricevuta dal file lua
m_CN.sz_ManualDataInput = CmdString
' esguo la funzione che ha il compito di scrivere il comando MDI
m_CN.MDI_command()
End If
' attivo modalità AUTO
m_CN.DGeneralFunctions_WriteCncMode(7)
System.Threading.Thread.Sleep(100)
If String.IsNullOrEmpty(EValue) Then
' EActive: impulsivo "D#####"
m_CN.NC_pulse_bit(ENumber)
EgtOutLog("Fanuc_DNumber= " & ENumber)
Else
' EActive + EValue: scrittura comando invariabile Short oppure Bit
If ENumber.Contains(".") Then
' D#####.#
Dim bEValue As Boolean
If EValue.Trim = "1" Then bEValue = True
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
Else
' D#####
m_CN.NC_write_var_short(ENumber, CShort(EValue))
End If
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
End If
' eventale caricamento seconda variabile
If String.IsNullOrEmpty(EValue2) Then
' EActive: impulsivo "D#####"
m_CN.NC_pulse_bit(ENumber2)
EgtOutLog("Fanuc_DNumber= " & ENumber2)
Else
' EActive + EValue: scrittura comando invariabile Short oppure Bit
If ENumber2.Contains(".") Then
' D#####.#
Dim bEValue2 As Boolean
If EValue2.Trim = "1" Then bEValue2 = True
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
Else
' D#####
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
End If
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
End If
Return
End Select
End If
Dim nResult As Short
' Imposto modalità MDI per controlli num
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2
nResult = m_CN.DGeneralFunctions_WriteCncMode(2)
Case 3
'Per il siemens non devo fare nulla
End Select
m_CN.sz_ManualDataInput = CmdString
m_CN.MDI_command()
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2
System.Threading.Thread.Sleep(300)
m_CN.DGeneralFunctions_CycleStart()
Case 3
'Per il siemens non devo fare nulla
Case 4
' Nicola: 27/03/2023 attivazione della funzione M# indicata?
End Select
If b2Start Then
System.Threading.Thread.Sleep(800)
m_CN.DGeneralFunctions_CycleStart()
End If
System.Threading.Thread.Sleep(300)
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
End Sub
' questa è una copia della funzione presente nel codice ControlsMachineButtonUC.xaml.vb
Friend Sub ExecuteDirectCmdLua(LuaFileName As String, ByRef CmdString As String, ByRef b2Start As Boolean, ByRef EActive As Boolean, ByRef ENumber As String, ByRef EValue As String, ByRef EType As String, ByRef ENumber2 As String, ByRef EValue2 As String, ByRef EType2 As String)
'Dim sBaseDir As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
If EgtLuaExecFile(LuaFileName) Then
EgtOutLog("Lua " & LuaFileName & " eseguito")
Else
EgtOutLog("Lua " & LuaFileName & " non eseguito")
End If
Dim dFeed As Double = 0
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text) Then
StringToLen(m_DirectCutPage.m_ManualAxesMove.FeedTxBx.Text, dFeed)
Else
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
End If
EgtLuaSetGlobNumVar("CMD.F", dFeed)
Dim dSpeed As Double = 0
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
Else
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
End If
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
' versione 2.5e1
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
Dim sToolPos As String = String.Empty
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
End If
Dim dToolDiam As Double = 0
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
End If
Dim dL1, dL2, dL3, dR1, dR2 As Double
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
EgtLuaSetGlobNumVar("CMD.L1", dL1)
EgtLuaSetGlobNumVar("CMD.L2", dL2)
EgtLuaSetGlobNumVar("CMD.L3", dL3)
EgtLuaSetGlobNumVar("CMD.R1", dR1)
EgtLuaSetGlobNumVar("CMD.R2", dR2)
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
EgtLuaCallFunction("CmdString")
' Leggo variabili
CmdString = String.Empty
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
b2Start = False
EgtLuaGetGlobBoolVar("CMD.DOUBLESTART", b2Start)
EActive = False
EgtLuaGetGlobBoolVar("CMD.EACTIVE", EActive)
ENumber = String.Empty
EgtLuaGetGlobStringVar("CMD.ENUMBER", ENumber)
EValue = String.Empty
EgtLuaGetGlobStringVar("CMD.EVALUE", EValue)
EType = String.Empty
EgtLuaGetGlobStringVar("CMD.ETYPE", EType)
EgtOutLog("ENUMBER: " & ENumber & " EVALUE: " & EValue & " ETYPE: " & EType)
ENumber2 = String.Empty
EgtLuaGetGlobStringVar("CMD.ENUMBER2", ENumber2)
EValue2 = String.Empty
EgtLuaGetGlobStringVar("CMD.EVALUE2", EValue2)
EType2 = String.Empty
EgtLuaGetGlobStringVar("CMD.ETYPE2", EType2)
EgtOutLog("ENUMBER2: " & ENumber2 & " EVALUE2: " & EValue2 & " ETYPE2: " & EType2)
' Reset lua
EgtLuaResetGlobVar("CmdString")
EgtLuaResetGlobVar("CMD")
' Log del comando
EgtOutLog("CmdString=" & If(Not String.IsNullOrEmpty(CmdString), CmdString, "") &
" b2Start=" & b2Start.ToString() &
" EActive=" & EActive.ToString &
" ENumber=" & If(Not String.IsNullOrEmpty(ENumber), ENumber, "") &
" EValue=" & If(Not String.IsNullOrEmpty(EValue), EValue, "") &
" EType=" & If(Not String.IsNullOrEmpty(EType), CInt(EType).ToString, "") &
" ENumber2=" & If(Not String.IsNullOrEmpty(ENumber2), ENumber2, "") &
" EValue2=" & If(Not String.IsNullOrEmpty(EValue2), EValue2, "") &
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
End Sub
#Region "STATE CHANGED"
Friend Sub SpindleStateChanged(SpindleState As Boolean)
+40 -32
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="ManualAxesMoveUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
<Border Style="{DynamicResource OmagCut_Page2Border}">
@@ -26,7 +26,7 @@
</Grid.RowDefinitions>
<ToggleButton x:Name="G0Btn" Grid.Row="0" Height="60" Width="60"
Style="{StaticResource OmagCut_BlueIconToggleButton}">
Style="{DynamicResource OmagCut_BlueIconToggleButton}">
<TextBlock Name="G0TxBl" Text="G0" FontSize="29"/>
</ToggleButton>
@@ -41,52 +41,60 @@
</Grid.RowDefinitions>
<TextBlock x:Name="FeedTxBl" Grid.Column="0" Grid.Row="0"
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
Style="{DynamicResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
<EgtWPFLib:EgtTextBox Name="FeedTxBx" Grid.Column="1" Margin="6,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock x:Name="SpeedTxBl" Grid.Column="0" Grid.Row="1"
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
Style="{DynamicResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" Grid.Row="1" Margin="6,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Button x:Name="L1Btn" Grid.Row="1" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<Button x:Name="L1Btn" Grid.Row="1" Height="60" Width="60"
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<UniformGrid Rows="2" Grid.Column="1" Grid.Row="1">
<EgtWPFLib:EgtTextBox Name="L1TxBx" Margin="0,4,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<CheckBox Name="L1SawThChBx" Height="20" Width="142" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<CheckBox Name="L1SawThChBx" Height="20" Width="142"
Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
</UniformGrid>
<Button x:Name="L2Btn" Grid.Row="2" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<Button x:Name="L2Btn" Grid.Row="2" Height="60" Width="60"
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<UniformGrid Rows="2" Grid.Column="1" Grid.Row="2">
<EgtWPFLib:EgtTextBox x:Name="L2TxBx" Margin="0,4,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<CheckBox Name="L2SawThChBx" Height="20" Width="142" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<CheckBox Name="L2SawThChBx" Height="20" Width="142"
Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
</UniformGrid>
<Button x:Name="L3Btn" Grid.Row="3" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<Button x:Name="L3Btn" Grid.Row="3" Height="60" Width="60"
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="L3TxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="R1Btn" Grid.Row="4" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="R1Btn" Grid.Row="4" Height="60" Width="60"
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="R2Btn" Grid.Row="5" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Button x:Name="R2Btn" Grid.Row="5" Height="60" Width="60"
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="R2TxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Row="7" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="BackBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
+35
View File
@@ -53,14 +53,43 @@ Public Class ManualAxesMoveUC
' Imposto check per considerare spessore lama
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
' Aggiorno visualizzazione
SetMachineInCurrPos()
EgtDraw()
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
End Sub
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
m_Timer.Stop()
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
' Nascondo la macchina
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
EgtSetMachineLook(MCH_LOOK.TAB)
EgtDraw()
End Sub
Private Function SetMachineInCurrPos() As Boolean
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
' Recupero il nome degli assi macchina
Dim sL1 As String = String.Empty
Dim sL2 As String = String.Empty
Dim sL3 As String = String.Empty
Dim sR1 As String = String.Empty
Dim sR2 As String = String.Empty
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
' Visualizzo macchina in posizione
EgtSetAxisPos(sL1, dL1)
EgtSetAxisPos(sL2, dL2)
EgtSetAxisPos(sL3, dL3)
EgtSetAxisPos(sR1, dR1)
EgtSetAxisPos(sR2, dR2)
Return True
End Function
Private Sub UpdateAxesNames()
Dim sL1 As String = String.Empty
Dim sL2 As String = String.Empty
@@ -125,11 +154,16 @@ Public Class ManualAxesMoveUC
Private Sub Timer_tick()
UpdateAxesNames()
UpdateUseSawThickness()
' Aggiorno posizione macchina in disegno
SetMachineInCurrPos()
' Aggiorno il disegno
EgtDraw()
End Sub
Private m_MoveClicked As Boolean = False
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
If e.ClickCount > 1 OrElse m_MoveClicked Then
EgtOutLog(" -> Hold on! Do not click compulsively.")
Return
End If
m_MoveClicked = True
@@ -216,6 +250,7 @@ Public Class ManualAxesMoveUC
Private Sub SiemensMoveAxis(CurrentBtn As Button)
' leggo se stato reset
If Not m_CN.bResetState Then
EgtOutLog("Reset status is 'False', is denied to execute file '\DirectCmd\AxesMove.lua'.")
m_MoveClicked = False
Return
End If
+136 -136
View File
@@ -1,11 +1,10 @@
<UserControl x:Class="MultipleCut"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
@@ -35,164 +34,164 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
</Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0">
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="10" Background="Black" />
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="10" Background="Black" />
<TextBlock Name="NumPzTxBl" Grid.Column="2" Grid.Row="0"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="DimPzTxBl" Grid.Column="4" Grid.Row="0"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="NumPzTxBl" Grid.Column="2" Grid.Row="0"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="DimPzTxBl" Grid.Column="4" Grid.Row="0"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<Border Grid.Column="3" Grid.Row="0" Grid.RowSpan="10" Background="Black" />
<Border Grid.Column="3" Grid.Row="0" Grid.RowSpan="10" Background="Black" />
<ScrollViewer VerticalScrollBarVisibility="Visible" Grid.Row="6" Grid.ColumnSpan="6" Visibility="Visible">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="2"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
</Grid.RowDefinitions>
<ScrollViewer VerticalScrollBarVisibility="Visible" Grid.Row="6" Grid.ColumnSpan="6" Visibility="Visible">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="2"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
</Grid.RowDefinitions>
<Border Grid.Column="2" Grid.Row="0" Grid.RowSpan="10" Background="Black" Visibility="Hidden"/>
<Border Grid.Column="2" Grid.Row="0" Grid.RowSpan="10" Background="Black" Visibility="Hidden"/>
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
</ScrollViewer>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
</ScrollViewer>
</Grid>
<!--<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
@@ -233,9 +232,10 @@
</Grid>-->
<TextBlock Name="SideTxBl" Grid.Row="7" Grid.ColumnSpan="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<Grid Grid.Row="8" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
@@ -245,13 +245,13 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Grid Grid.Row="9" Grid.ColumnSpan="2">
@@ -261,16 +261,16 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
+48 -24
View File
@@ -58,23 +58,23 @@ Public Class MultipleCut
Private Sub MultipleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo lista modalità di acquisizione punto
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray
' assegno messaggi
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
NumPzTxBl.Text = EgtMsg(90217) ' Numero
DimPzTxBl.Text = EgtMsg(90218) ' Dimensioni
SideTxBl.Text = EgtMsg(90223) ' Tagli lato motore
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
Num1TxBl.Text = "1"
Num2TxBl.Text = "2"
Num3TxBl.Text = "3"
@@ -285,6 +285,12 @@ Public Class MultipleCut
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
If bIsMultiCut Then
m_MainWindow.m_DirectCutPageUC.ReloadParam()
End If
' Recupero dati utensile e testa corrente
Dim sTool As String = ""
Dim sHead As String = ""
@@ -297,6 +303,13 @@ Public Class MultipleCut
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se punto da laser
@@ -304,7 +317,7 @@ Public Class MultipleCut
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
@@ -314,10 +327,10 @@ Public Class MultipleCut
EgtSetCalcTool(sTool, sHead, nExit)
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
@@ -365,6 +378,12 @@ Public Class MultipleCut
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
If bIsMultiCut Then
m_MainWindow.m_DirectCutPageUC.ReloadParam()
End If
' Recupero dati utensile e testa corrente
Dim sTool As String = ""
Dim sHead As String = ""
@@ -377,6 +396,13 @@ Public Class MultipleCut
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se punto da laser
@@ -384,7 +410,7 @@ Public Class MultipleCut
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Altrimenti da lama
@@ -392,10 +418,10 @@ Public Class MultipleCut
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
' Porto il tip nell'origine tavola
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP2Ok = True
@@ -610,10 +636,8 @@ Public Class MultipleCut
' Disattivo eventuali lavorazioni presenti
DeactivateAllMachinings()
' Creo nuovo pezzo per il taglio diretto
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nPartId, NAME_DIRECTCUT)
' Creo layer di taglio
Dim nLayerId = EgtCreateGroup(nPartId)
Dim nPartId As Integer = CreateDirectCutPart()
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nLayerId, NAME_OUTLOOP)
' Creo il taglio
Dim ptStart As Point3d = m_ptTipP1
+18 -20
View File
@@ -1,11 +1,10 @@
<UserControl x:Class="Polishing"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
@@ -36,13 +35,12 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
</Grid>
<ComboBox Name="PolishingCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox Name="PolishingCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
@@ -63,16 +61,16 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
+8 -4
View File
@@ -25,8 +25,8 @@ Public Class Polishing
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' assegno messaggi
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
End Sub
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -78,16 +78,18 @@ Public Class Polishing
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut
' Cancello eventuali lucidature
RemovePolishings()
' Dichiaro polishing non più attivo
DirectCut.m_bPolishingOn = False
' Riattivo eventuali lavorazioni presenti
ActivateAllMachinings()
' Abilito registrazione progetto modificato
EgtEnableModified()
' Nascondo la macchina
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
EgtSetMachineLook(MCH_LOOK.TAB)
' Ripristino opacità del grezzo
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
EgtSetAlpha( nRawSolidId, 100)
' Abilito registrazione progetto modificato
EgtEnableModified()
' Aggiorno visualizzazione
EgtDraw()
End If
@@ -211,6 +213,8 @@ Public Class Polishing
Dim nKerfId As Integer = EgtGetFirstNameInGroup( m_CurrProjPage.m_nRawId, NAME_KERF)
m_bPoliOk = AddPolishings( sKitName, nKerfId)
EgtSetCurrPhase( 1)
' Dichiaro polishing attivo
DirectCut.m_bPolishingOn = True
Return m_bPoliOk
End Function
+39 -40
View File
@@ -1,12 +1,11 @@
<UserControl x:Class="SawTestUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
@@ -37,46 +36,46 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
</Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0">
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="5"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Row="11" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
@@ -85,17 +84,17 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
+49 -20
View File
@@ -53,20 +53,20 @@ Public Class SawTestUC
Private Sub SawTest_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo lista modalità di acquisizione punto
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray
' assegno messaggi
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisci P1
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisici P2
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
OffsetTxBl.Text = EgtMsg(90228) ' Offset
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
' Carico i dati dell'ultimo test
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_LENGTH, m_dLen, m_MainWindow.GetIniFile())
@@ -210,17 +210,30 @@ Public Class SawTestUC
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
If bIsMultiCut Then
EgtSetCalcTool(m_sSaw, "H1", 1)
End If
' Se acquisizone lama o laser
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Se punto da laser
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
' Ora imposto la lama corrente
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
' Altrimenti da lama
@@ -228,10 +241,10 @@ Public Class SawTestUC
' Imposto la lama corrente
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
@@ -280,17 +293,30 @@ Public Class SawTestUC
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
If bIsMultiCut Then
EgtSetCalcTool(m_sSaw, "H1", 1)
End If
' Se acquisizone lama o laser
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Se punto da laser
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
' Ora imposto la lama corrente
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
' Altrimenti da lama
@@ -298,10 +324,10 @@ Public Class SawTestUC
' Imposto la lama corrente
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
' Porto il tip nell'origine tavola
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP2Ok = True
@@ -488,9 +514,8 @@ Public Class SawTestUC
' Disattivo eventuali lavorazioni presenti
DeactivateAllMachinings()
' Creo nuovo pezzo per il taglio diretto
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nPartId, NAME_DIRECTCUT)
Dim nLayerId = EgtCreateGroup(nPartId)
Dim nPartId As Integer = CreateDirectCutPart()
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nLayerId, NAME_OUTLOOP)
' Creo il taglio
Dim ptStart As Point3d = m_ptTipP1
@@ -504,6 +529,10 @@ Public Class SawTestUC
ElseIf nWSide = MCH_SAW_WS.LEFT Then
vtPerp = vtDir
vtPerp.Rotate(Vector3d.Z_AX, +90)
Else
m_CurrProjPage.ClearMessage()
' 91143 = Set machining side: right or left.
m_CurrProjPage.SetInfoMessage(EgtMsg(91143))
End If
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
Dim dLen2 As Double = m_dLen / 2
+15 -14
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Public Class SingleCutAuto
' Riferimenti a pagine
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
@@ -86,19 +87,19 @@ Public Class SingleCutAuto
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo lista modalità di acquisizione punto
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray
' Assegno messaggi
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DiamLamaTxBl.Text = "Diamtero lama"
ThickLamaTxBl.Text = "Spessore lama"
ThickMatTxBl.Text = "Spessore materiale"
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
Point1Btn.Content = EgtMsg(90210) ' Acquisci P1
Point2Btn.Content = EgtMsg(90211) ' Acquisci P2
DiamLamaTxBl.Text = EgtMsg(90266) ' Diamtero lama
ThickLamaTxBl.Text = EgtMsg(90267) ' Spessore lama
ThickMatTxBl.Text = EgtMsg(90268) ' Spessore materiale
SimulBtn.Content = EgtMsg(90301) ' Simula
OkBtn.Content = EgtMsg(90230) ' Esegui
m_RawHeight = GetPrivateProfileDouble(S_RAWPART, K_RAWHEIGHT, 30, m_MainWindow.GetIniFile())
ThickMatTxBx.Text = LenToString(m_RawHeight, 2)
@@ -345,7 +346,7 @@ Public Class SingleCutAuto
m_CurrProjPage.ClearMessage()
Else
OkBtn.IsEnabled = False
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 47)) ' Errore nella posizione o dimensione del grezzo
m_CurrProjPage.SetErrorMessage(EgtMsg(90547)) ' Errore nella posizione o dimensione del grezzo
End If
Return True
End Function
@@ -741,7 +742,7 @@ Public Class SingleCutAuto
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion())
' Se errore in generazione, segnalo l'errore ed esco
If Not bOk Then
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) ' Errore nella generazione del programma CN
Return
End If
' Download programma (eventuali errori sono segnalati dalla funzione)
@@ -782,8 +783,8 @@ Public Class SingleCutAuto
' Disattivo eventuali lavorazioni presenti
DeactivateAllMachinings()
' Creo nuovo pezzo per il taglio diretto
Dim nPartId = CreateDirectCutPart()
Dim nLayerId = EgtCreateGroup(nPartId)
Dim nPartId As Integer = CreateDirectCutPart()
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nLayerId, NAME_OUTLOOP)
' Creo il taglio
Dim ptStart As Point3d = m_ptTipP1
+40 -38
View File
@@ -1,14 +1,14 @@
<UserControl x:Class="SingleCutUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
<!-- Definizione della Grid SingleCut -->
<Grid Name="SingleCutGrid" >
@@ -38,54 +38,56 @@
</Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}"
Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
</Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="6"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="SawThChBl" Grid.Row="7" Grid.ColumnSpan="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SawThChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SawThChBx" Grid.Row="7" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<Grid Grid.Row="9" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
@@ -95,13 +97,13 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Grid Grid.Row="11" Grid.ColumnSpan="2">
@@ -112,13 +114,13 @@
</Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
+58 -24
View File
@@ -1,5 +1,6 @@
Imports System.Windows.Threading
Imports EgtUILib
Imports OmagCUT.MainWindow
Public Class SingleCutUC
@@ -56,22 +57,22 @@ Public Class SingleCutUC
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo lista modalità di acquisizione punto
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray
' Assegno messaggi
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisci P1
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisci P2
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
OffsetTxBl.Text = EgtMsg(90228) ' Offset
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
' Carico i dati dell'ultimo taglio
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dLen = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
@@ -147,6 +148,8 @@ Public Class SingleCutUC
' Deseleziono bottone primo punto
Point1Btn.IsChecked = False
' forzo la verifica dell'affondamento in relazione allo spessore del pezzo
DepthTxBx_EgtClosed(Nothing, Nothing)
' la visualizzazione dei comandi è gestita dalla DirectCutPageUC richiamando la funzione ReloadParam
' forzo la macchina ad essere visibile fin da subito
@@ -159,7 +162,7 @@ Public Class SingleCutUC
' Aggiorno visualizzazione
EgtDraw()
' Avvi il timer
' Avvio il timer
m_RefreshTimer.Start()
End Sub
@@ -268,6 +271,12 @@ Public Class SingleCutUC
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
If bIsMultiCut Then
m_MainWindow.m_DirectCutPageUC.ReloadParam()
End If
' Recupero dati utensile e testa corrente
Dim sTool As String = ""
Dim sHead As String = ""
@@ -279,6 +288,13 @@ Public Class SingleCutUC
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se punto da laser
@@ -286,7 +302,8 @@ Public Class SingleCutUC
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
EgtOutLog("Coordinate punto 1 da H3: " & m_ptTipP1.x.ToString & " ," & m_ptTipP1.y.ToString)
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Altrimenti da lama
@@ -294,10 +311,11 @@ Public Class SingleCutUC
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
EgtOutLog("Coordinate punto 1 da H1: " & m_ptTipP1.x.ToString & " ," & m_ptTipP1.y.ToString)
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
@@ -318,7 +336,6 @@ Public Class SingleCutUC
m_bPointP1Ok = True
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
End If
' Disegno il taglio
@@ -348,6 +365,12 @@ Public Class SingleCutUC
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
If bIsMultiCut Then
m_MainWindow.m_DirectCutPageUC.ReloadParam()
End If
' Recupero dati utensile e testa corrente
Dim sTool As String = ""
Dim sHead As String = ""
@@ -359,6 +382,13 @@ Public Class SingleCutUC
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Ricavo dati lama corrente
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
' Se punto da laser
@@ -366,20 +396,20 @@ Public Class SingleCutUC
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
EgtOutLog("Coordinate punto 2 da H3: " & m_ptTipP2.x.ToString & " ," & m_ptTipP2.y.ToString)
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Altrimenti da lama
Else
' Reimposto eventuale precedente utensile
EgtSetCalcTool(sTool, sHead, nExit)
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
' Porto il tip nell'origine tavola
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP2Ok = True
@@ -412,6 +442,7 @@ Public Class SingleCutUC
m_dAngO = dAngOrizzDeg
LenghtTxBx.Text = LenToString(m_dLen, 1)
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
EgtOutLog("Lunghezza taglio: " & dLen.ToString & "Angolo: " & dAngOrizzDeg.ToString)
CreateSingleCut()
' Disegno la macchina nella sua posizione reale
SetMachineInCurrPos()
@@ -604,6 +635,7 @@ Public Class SingleCutUC
Private Function CreateSingleCut() As Boolean
' Verifico sia definito il punto iniziale e il grezzo
If Not m_bPointP1Ok Or Not m_bRawOk Then
EgtOutLog("Primo punto non valido")
m_bCutOk = False
Return False
End If
@@ -625,8 +657,8 @@ Public Class SingleCutUC
' Disattivo eventuali lavorazioni presenti
DeactivateAllMachinings()
' Creo nuovo pezzo per il taglio diretto
Dim nPartId = CreateDirectCutPart()
Dim nLayerId = EgtCreateGroup(nPartId)
Dim nPartId As Integer = CreateDirectCutPart()
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nLayerId, NAME_OUTLOOP)
' Creo il taglio
Dim ptStart As Point3d = m_ptTipP1
@@ -643,6 +675,8 @@ Public Class SingleCutUC
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
' Inidico che è un taglio Diretto di tipo SingleCut
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleCut)
' Imposto se disabilitare l'inversine di direzione del taglio
If Not m_MainWindow.m_CurrentMachine.bEnableInvert Then EgtSetInfo(nCutId, INFO_ENABLE_INVERT, 0)
' Creo layer per crocetta di riferimento
+78 -79
View File
@@ -1,97 +1,96 @@
<UserControl x:Class="SingleDrillUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
<!-- Definizione della Grid SingleCut -->
<Grid Name="SingleCutGrid" >
<!-- Definizione della Grid SingleCut -->
<Grid Name="SingleCutGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
</Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Grid Grid.Row="9" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Grid Grid.Row="11" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="9" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Grid Grid.Row="11" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
</Grid>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Border>
</Grid>
</Border>
</UserControl>
+43 -27
View File
@@ -1,5 +1,6 @@
Imports EgtUILib
Imports System.Collections.ObjectModel
Imports OmagCUT.MainWindow
Public Class SingleDrillUC
' Riferimenti a pagine
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
@@ -57,24 +58,28 @@ Public Class SingleDrillUC
m_CurrentMachine = m_MainWindow.m_CurrentMachine
' Creo lista modalità di acquisizione punto
m_PointsModeArray(PT_MODE.DRILL) = EgtMsg(90752)
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
m_PointsModeArray(PT_MODE.DRILL) = EgtMsg(90752) ' Foretto
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray
' Assegno messaggi
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisici P1
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
End Sub
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
m_sCurrDrill = m_CurrentMachine.sCurrDrill
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
If String.IsNullOrWhiteSpace(m_sCurrDrill) Then m_sCurrDrill = GetDrillFromDrilling(m_CurrentMachine.sCurrDrilling)
' rimuovo utensile su uscite 1
EgtSetCalcTool("", "H1", 1)
' imposto utensile su uscita 2
EgtSetCalcTool(m_sCurrDrill, "H1", 2)
' recupero informazioni del foretto usato
EgtTdbSetCurrTool(m_sCurrDrill)
m_dDiameter = 0
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
' Attivo la pagina
@@ -213,21 +218,33 @@ Public Class SingleDrillUC
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' forzo utilizzo testa H1 solo per macchina con 2 teste
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
' Ricavo dati lama corrente
Dim sDrill As String = m_sCurrDrill
If bIsMultiCut Then
EgtSetCalcTool(sDrill, "H1", 2)
End If
' Se acquisizione lama o laser
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
' Ricavo dati Foretto corrente
Dim sDrill As String = m_sCurrDrill
' Se macchina multicut il primo asse rotante restituito è quello della tavola
Dim vAng() As Double = {dR1, dR2, 0}
If bIsMultiCut Then
vAng(0) = 0
vAng(1) = dR1
vAng(2) = dR2
End If
' Se punto da laser
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
' Imposto come testa corrente il laser (senza utensile ovviamente)
If Not EgtSetCalcTool("", "H3", 1) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
' Ora imposto la lama corrente
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
' Altrimenti da lama
@@ -235,10 +252,10 @@ Public Class SingleDrillUC
' Imposto la lama corrente
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
' Trasformo in posizione punta utensile in basso
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
@@ -250,10 +267,8 @@ Public Class SingleDrillUC
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
' Ricavo dati lama corrente
Dim sDrill As String = m_sCurrDrill
' Imposto la lama corrente
If Not EgtSetCalcTool(sDrill, "H1", 1) Then Return
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
End If
' Disegno il taglio
@@ -398,34 +413,35 @@ Public Class SingleDrillUC
EgtEmptyGroup(m_nTempLay)
' Spessore grezzo
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
' Recupero spessore lama corrente
' Recupero diametro foretto corrente
Dim sDrill As String = m_sCurrDrill
GetDrillFromDrilling(sDrill, m_MainWindow.m_CurrentMachine.sCurrDrilling)
If String.IsNullOrWhiteSpace( sDrill) Then sDrill = GetDrillFromDrilling(m_MainWindow.m_CurrentMachine.sCurrDrilling)
EgtTdbSetCurrTool(sDrill)
Dim dDiam As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
m_dDiameter = 0
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
' Rimuovo eventuale vecchio pezzo per taglio diretto
EraseDirectCutPart()
' Disattivo eventuali lavorazioni presenti
DeactivateAllMachinings()
' Creo nuovo pezzo per il taglio diretto
Dim nPartId = CreateDirectCutPart()
Dim nLayerId = EgtCreateGroup(nPartId)
Dim nPartId As Integer = CreateDirectCutPart()
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nLayerId, NAME_INLOOP)
' Creo il Drill
Dim ptStart As Point3d = m_ptTipP1
ptStart.z = 0
' Creo layer per crocetta di riferimento
Dim nCrossLayerId = EgtCreateGroup(nPartId)
Dim nCrossLayerId As Integer = EgtCreateGroup(nPartId)
' Aggiungo crocetta/e
If m_bPointP1Ok Then
CreateCross(nCrossLayerId, ptStart)
End If
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
' Indico che è un taglio Diretto di tipo SingleDrill
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleDrill)
' Calcolo punto di inserimento nel grezzo
Dim ptMin, ptMax As Point3d
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
@@ -433,9 +449,9 @@ Public Class SingleDrillUC
ptIns.z = dRawHeight
' Inserisco il pezzo nel grezzo
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
EgtSetCurrPhase(1)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
EgtSetCurrPhase(1)
' Eventuale eliminazione Home finale
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
RemoveFinalHome()
+17 -18
View File
@@ -1,11 +1,10 @@
<UserControl x:Class="SquaringUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
@@ -60,14 +59,14 @@
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="ExtraLenTxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="ExtraLenTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<!--<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
@@ -129,13 +128,13 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Grid Grid.Row="11" Grid.ColumnSpan="2">
@@ -146,13 +145,13 @@
</Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
+16 -11
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Imports OmagCUT.MainWindow
Public Class SquaringUC
@@ -51,11 +52,10 @@ Public Class SquaringUC
End Enum
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
' 90260=Extra length
ExtraLenTxBl.Text = EgtMsg(90260)
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
OffsetTxBl.Text = EgtMsg(90228) ' Offset
ExtraLenTxBl.Text = EgtMsg(90260) ' Extra length
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
' Carico i dati dell'ultimo taglio
m_dOffsetSquaring = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, m_dOffsetSquaring, m_MainWindow.GetIniFile())
@@ -317,9 +317,8 @@ Public Class SquaringUC
' Disattivo eventuali lavorazioni presenti
DeactivateAllMachinings()
' Creo nuovo pezzo per il taglio diretto
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nPartId, NAME_DIRECTCUT)
Dim nLayerId = EgtCreateGroup(nPartId)
Dim nPartId As Integer = CreateDirectCutPart()
Dim nLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nLayerId, NAME_OUTLOOP)
' Creo il taglio parallelo alla lama
Dim ptStart As Point3d = m_ptTipP1
@@ -350,6 +349,7 @@ Public Class SquaringUC
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
Dim dThick As Double = 0
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
EgtOutLog("Curr tool type in use for squaring: " & If(nType = MCH_TY.SAW_STD, "SAW_STD", "NOT 'SAW_STD'"))
' Ricalcolo lo spessore in base all'inclinazione
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
@@ -367,9 +367,14 @@ Public Class SquaringUC
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
' Inidico che è un taglio Diretto di tipo Squaring
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, FlagDirectCuts.Squaring)
' Imposto affondamento e angolo di fianco sul taglio (solo se non lama STD)
If Not nType = MCH_TY.SAW_STD Then
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
EgtOutLog("Curr tool in use is not of type SAW_STD: Depth is limited to raw thickness")
End If
' Allungo la geometria
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
+18 -18
View File
@@ -1,13 +1,13 @@
<UserControl x:Class="VacuumMachineButtonUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="Self"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:OmagCUT="clr-namespace:OmagCUT"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="Self"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:OmagCUT="clr-namespace:OmagCUT"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
<Border Style="{DynamicResource OmagCut_Page2Border}">
@@ -15,28 +15,28 @@
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
<ToggleButton IsChecked="{Binding IsChecked}"
Style="{StaticResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
<Button Command="{Binding ExecuteCommand}"
Background="{Binding Background}"
Style="{StaticResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
<ToggleButton IsChecked="{Binding IsChecked}"
Style="{StaticResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
<Button Style="{StaticResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
<Button Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</DataTemplate>
</ItemsControl.Resources>
@@ -54,7 +54,7 @@
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Border>
</UserControl>
+32
View File
@@ -22,6 +22,9 @@ Public Class VacuumMachineButtonUC
Friend m_CN As CN_generico
Private m_bFirst As Boolean = True
' visualizzo l'elenco degli elementi della pagina sono al primo avvio
Friend m_OutLogTypeButton As Boolean = True
' Creazione converter da String a ImageSource
Dim ImageConverter As New ImageSourceConverter
@@ -71,10 +74,37 @@ Public Class VacuumMachineButtonUC
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
End If
End While
For Each MachineButton As MachineButton In m_ButtonList
OutLogTypeButton(MachineButton)
Next
m_OutLogTypeButton = False
NotifyPropertyChanged("ButtonList")
End If
End Sub
#Region "STATE CHANGED"
' ------------------------------------------------------------------------------
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
'-------------------------------------------------------------------------------
Friend Sub OutLogTypeButton(CurrMachineButton As MachineButton)
If Not m_OutLogTypeButton Then Return
Dim BtnType As Type = CurrMachineButton.GetType
If BtnType Is GetType(NoStateButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
ElseIf BtnType Is GetType(TwoStateButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
ElseIf BtnType Is GetType(ThreeStateButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
ElseIf BtnType Is GetType(DoubleCommandButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
ElseIf BtnType Is GetType(PressedCommandButton) Then
EgtOutLog("" & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
End If
End Sub
Friend Sub VacuumUpChanged(VacuumUpState As Boolean)
Dim VacuumUpButton As TwoStateButton = Nothing
For Each MachineButton As MachineButton In m_ButtonList
@@ -371,6 +401,8 @@ Public Class VacuumMachineButtonUC
Next
End Sub
#End Region ' State Range
Public Function GetPrivateProfileMachineButtons(
ByVal lpAppName As String,
ByVal lpKeyName As String,
+294
View File
@@ -0,0 +1,294 @@
Imports EgtUILib.EgtInterface
Module VarMdiCommand
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Public Sub ExecuteMDICommand(sLuaFileName As String)
' Verifica esistenza pagina DirectCut e ne recupero CN corrente
If IsNothing( m_MainWindow.m_DirectCutPageUC) Then Return
Dim CurrCN As CN_generico = m_MainWindow.m_DirectCutPageUC.m_CN
' Verifico esistenza nome script lua
If String.IsNullOrWhiteSpace(sLuaFileName) Then Return
' Eseguo script
Dim CmdString As String = String.Empty
Dim b2Start As Boolean = False
Dim bEActive As Boolean = False
Dim sENumber As String = String.Empty
Dim sEValue As String = String.Empty
Dim sEType As String = 0
Dim sENumber2 As String = String.Empty
Dim sEValue2 As String = String.Empty
Dim sEType2 As String = 0
If Not ExecDirectCmdLua(sLuaFileName, CmdString, b2Start, bEActive, sENumber, sEValue, sEType, sENumber2, sEValue2, sEType2) Then
Return
End If
' Se richiesta scrittura variabili
If bEActive Then
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2 ' Num Axium e Flexium
' se Flexium e abilitata scrittura variabili PLC
If m_MainWindow.m_CNCommunication.m_nNCType = 2 And CurrCN.m_NewVariable Then
CurrCN.DPlcVariables_WriteVariables(sENumber, sEValue)
If Not String.IsNullOrWhiteSpace(sENumber2) AndAlso Not String.IsNullOrWhiteSpace(sEValue2) Then
CurrCN.DPlcVariables_WriteVariables(sENumber2, sEValue2)
End If
' altrimenti scrittura della variabile E
Else
CurrCN.DVariables_WriteVariables2(sENumber, sEValue)
End If
Return
Case 3 ' Siemens
' Scrivo prima variabile
Dim nEType As Integer = 0
StringToInt( sEType, nEType)
Select Case nEType
Case 1
Dim nEvalue As Integer = 0
StringToInt( sEvalue, nEvalue)
CurrCN.DVariables_WriteVariables3(sENumber, 1, nEValue, 0, 0, "")
EgtOutLog("ENumber=" & sENumber & " EType=1 " & " EValue=" & nEValue.ToString())
Case 2
Dim lEvalue As Long = 0
Long.TryParse(sEValue, lEvalue)
CurrCN.DVariables_WriteVariables3(sENumber, 2, 0, lEvalue, 0, "")
EgtOutLog("ENumber=" & sENumber & " EType=2 " & " EValue=" & lEvalue.ToString())
Case 3
Dim dEValue As Double = 0
StringToDouble(sEValue, dEValue)
CurrCN.DVariables_WriteVariables3(sENumber, 3, 0, 0, dEValue, "")
EgtOutLog("ENumber=" & sENumber & " EType=3 " & " EValue=" & dEValue.ToString())
Case 4
CurrCN.DVariables_WriteVariables3(sENumber, 4, 0, 0, 0, sEValue)
EgtOutLog("ENumber=" & sENumber & " EType=4 " & " EValue=" & sEValue)
Case Else
EgtOutLog("EType wrong : ENumber=" & sENumber & " EType=" & sEType & " EValue= " & sEValue)
End Select
If Not String.IsNullOrWhiteSpace(sEType2) AndAlso sEType2 <> "0" Then
' Pausa
System.Threading.Thread.Sleep(100)
' Scrivo seconda variabile
Dim nEType2 As Integer = 0
StringToInt( sEType2, nEType2)
Select Case nEType2
Case 1
Dim nEvalue2 As Integer = 0
StringToInt( sEvalue2, nEvalue2)
CurrCN.DVariables_WriteVariables3(sENumber2, 1, nEValue2, 0, 0, "")
EgtOutLog("ENumber2=" & sENumber2 & " EType2=1" & " EValue2=" & nEValue2.ToString())
Case 2
Dim lEvalue2 As Long = 0
Long.TryParse(sEValue2, lEvalue2)
CurrCN.DVariables_WriteVariables3(sENumber2, 2, 0, lEValue2, 0, "")
EgtOutLog("ENumber2=" & sENumber2 & " EType2=2" & " EValue2=" & lEValue2.ToString())
Case 3
Dim dEValue2 As Double = 0
StringToDouble(sEValue2, dEValue2)
CurrCN.DVariables_WriteVariables3(sENumber2, 3, 0, 0, dEValue2, "")
EgtOutLog("ENumber2=" & sENumber2 & " EType2=3" & " EValue2=" & dEValue2.ToString())
Case 4
CurrCN.DVariables_WriteVariables3(sENumber2, 4, 0, 0, 0, sEValue2)
EgtOutLog("ENumber2=" & sENumber2 & " EType2=4" & " EValue2=" & sEValue2)
Case Else
EgtOutLog("EType2 wrong : ENumber2=" & sENumber2 & " EType2=" & sEType2 & " EValue2=" & sEValue2)
End Select
End If
Return
Case 4 ' Fanuc
' eventuale scrittura di linea di comando MDI
If Not String.IsNullOrWhiteSpace(CmdString) Then
' attivo mpdalità MDI
CurrCN.DGeneralFunctions_WriteCncMode(2)
System.Threading.Thread.Sleep(100)
' salvo la stringa di comando ricevuta dal file lua
CurrCN.sz_ManualDataInput = CmdString
' eseguo la funzione che ha il compito di scrivere il comando MDI
CurrCN.MDI_command()
End If
' attivo modalità Manuale
CurrCN.DGeneralFunctions_WriteCncMode(7)
System.Threading.Thread.Sleep(100)
' eventuale caricamento prima variabile
If Not String.IsNullOrEmpty(sENumber) Then
If String.IsNullOrWhiteSpace(sEValue) Then
' EActive: impulsivo "D#####"
CurrCN.NC_pulse_bit(sENumber)
EgtOutLog("Fanuc : DNumber=" & sENumber)
Else
' EActive + EValue: scrittura comando invariabile Short oppure Bit
If sENumber.Contains(".") Then
' D#####.#
Dim bEValue As Boolean = ( sEValue.Trim <> "0")
CurrCN.NC_write_var_bit(sENumber, bEValue)
Else
' D#####
CurrCN.NC_write_var_short(sENumber, CShort(sEValue))
End If
EgtOutLog("Fanuc : DNumber=" & sENumber & " DValue=" & sEValue)
End If
Else
EgtOutLog("Fanuc : DNumber=NullOrEmpty")
End If
' eventale caricamento seconda variabile
If Not String.IsNullOrEmpty(sENumber2) Then
If String.IsNullOrWhiteSpace(sEValue2) Then
' EActive: impulsivo "D#####"
CurrCN.NC_pulse_bit(sENumber2)
EgtOutLog("Fanuc : DNumber2=" & sENumber2)
Else
' EActive + EValue: scrittura comando invariabile Short oppure Bit
If sENumber2.Contains(".") Then
' D#####.#
Dim bEValue2 As Boolean = ( sEValue2.Trim <> "0")
CurrCN.NC_write_var_bit(sENumber2, bEValue2)
Else
' D#####
CurrCN.NC_write_var_short(sENumber2, CShort(sEValue2))
End If
EgtOutLog("Fanuc : DNumber2=" & sENumber2 & " DValue2=" & sEValue2)
End If
Else
EgtOutLog("Fanuc : DNumber2=NullOrEmpty")
End If
Return
Case Else ' Demo
EgtOutLog("Demo : ENumber=" & sENumber & " EType=" & sEType & " EValue=" & sEValue)
EgtOutLog("Demo : ENumber2=" & sENumber2 & " EType2=" & sEType2 & " EValue2=" & sEValue2)
Return
End Select
End If
' Esecuzione comando MDI
Dim nResult As Short
' assegno la modalità di funzionamento
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2, 4
nResult = CurrCN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
Case 3
'Per Siemens non devo fare nulla
End Select
' salvo la stringa di comando ricevuta dal file lua
CurrCN.sz_ManualDataInput = CmdString
' esguo la funzione che ha il compito di scrivere il comando MDI
CurrCN.MDI_command()
' avvio l'esecuzione del comando
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2
System.Threading.Thread.Sleep(500)
CurrCN.DGeneralFunctions_CycleStart()
Case 3, 4
'Per Siemens e Fanuc non devo fare nulla
End Select
' se richiesto ripeto l'operazione
If b2Start Then
EgtOutLog("Avvio secondo cliclo start")
System.Threading.Thread.Sleep(800)
CurrCN.DGeneralFunctions_CycleStart()
End If
System.Threading.Thread.Sleep(300)
' ripristino la modalità Manuale
nResult = CurrCN.DGeneralFunctions_WriteCncMode(7)
End Sub
' Esecuzione dello script lua per impostazione dati del comando diretto
Private Function ExecDirectCmdLua(sLuaFileName As String,
ByRef CmdString As String, ByRef b2Start As Boolean, ByRef bEActive As Boolean,
ByRef sENumber As String, ByRef sEValue As String, ByRef sEType As String,
ByRef sENumber2 As String, ByRef sEValue2 As String, ByRef sEType2 As String) As Boolean
' Esecuzione script
Dim sLuaPath As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\" & sLuaFileName
Dim bOk As Boolean = EgtLuaExecFile(sLuaPath)
EgtOutLog("DirectCmd Script " & sLuaPath & If(bOk, " completed", " stopped with errors"))
If Not bOk Then Return False
' Assegnazione valori a variabili lua
Dim ManualAxesMove As ManualAxesMoveUC = m_MainWindow.m_DirectCutPageUC.m_ManualAxesMove
Dim dFeed As Double = 0
If Not String.IsNullOrWhiteSpace(ManualAxesMove.FeedTxBx.Text) Then
StringToLen(ManualAxesMove.FeedTxBx.Text, dFeed)
Else
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
End If
EgtLuaSetGlobNumVar("CMD.F", dFeed)
Dim dSpeed As Double = 0
If Not String.IsNullOrWhiteSpace(ManualAxesMove.SpeedTxBx.Text) Then
StringToDouble(ManualAxesMove.SpeedTxBx.Text, dSpeed)
Else
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
End If
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
Dim sToolPos As String = String.Empty
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
End If
Dim dToolDiam As Double = 0
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
End If
Dim dL1, dL2, dL3, dR1, dR2 As Double
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
EgtLuaSetGlobNumVar("CMD.L1", dL1)
EgtLuaSetGlobNumVar("CMD.L2", dL2)
EgtLuaSetGlobNumVar("CMD.L3", dL3)
EgtLuaSetGlobNumVar("CMD.R1", dR1)
EgtLuaSetGlobNumVar("CMD.R2", dR2)
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
Dim sCurrTable As String = String.Empty
Dim nCurrTable As Integer = 1
EgtGetTableName(sCurrTable)
If sCurrTable <> "MainTab" Then nCurrTable = 2
EgtLuaSetGlobIntVar("CMD.TABLE", nCurrTable)
' Esecuzione funzione
bOk = EgtLuaCallFunction("CmdString")
EgtOutLog(" CmdString function" & If(bOk, " completed", " stopped with errors"))
If Not bOk Then Return False
' Leggo variabili da file Lua
CmdString = String.Empty
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
b2Start = False
EgtLuaGetGlobBoolVar("CMD.DOUBLESTART", b2Start)
bEActive = False
EgtLuaGetGlobBoolVar("CMD.EACTIVE", bEActive)
sENumber = String.Empty
EgtLuaGetGlobStringVar("CMD.ENUMBER", sENumber)
sEValue = String.Empty
EgtLuaGetGlobStringVar("CMD.EVALUE", sEValue)
sEType = String.Empty
EgtLuaGetGlobStringVar("CMD.ETYPE", sEType)
sENumber2 = String.Empty
EgtLuaGetGlobStringVar("CMD.ENUMBER2", sENumber2)
sEValue2 = String.Empty
EgtLuaGetGlobStringVar("CMD.EVALUE2", sEValue2)
sEType2 = String.Empty
EgtLuaGetGlobStringVar("CMD.ETYPE2", sEType2)
' Reset variabili lua
EgtLuaResetGlobVar("CmdString")
EgtLuaResetGlobVar("CMD")
' Log del comando
EgtOutLog(" CmdString=" & If(Not String.IsNullOrEmpty(CmdString), CmdString, "") &
" DOUBLESTART=" & b2Start.ToString() &
" EActive=" & bEActive.ToString() &
" ENumber=" & If(Not String.IsNullOrEmpty(sENumber), sENumber, "") &
" EValue=" & If(Not String.IsNullOrEmpty(sEValue), sEValue, "") &
" EType=" & If(Not String.IsNullOrEmpty(sEType), sEType, "") &
" ENumber2=" & If(Not String.IsNullOrEmpty(sENumber2), sENumber2, "") &
" EValue2=" & If(Not String.IsNullOrEmpty(sEValue2), sEValue2, "") &
" EType2=" & If(Not String.IsNullOrEmpty(sEType2), sEType2, ""))
Return True
End Function
End Module
+183 -182
View File
@@ -1,224 +1,225 @@
<UserControl x:Class="AlzFrontUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256">
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="4*"/>
<!--<RowDefinition Height="0.5*"/>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256">
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="4*"/>
<!--<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>-->
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!--Titolo della colonna della ALZATINE-->
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="Alz."
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<!--Titolo della colonna della ALZATINE-->
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="Alz."
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<!--Titolo della colonna dei FRONTALINI-->
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="Front."
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<!--Titolo della colonna dei FRONTALINI-->
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="Front."
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A1" Grid.Column="2" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-10,0,0,0"/>
<CheckBox Name="F1" Grid.Column="3" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-10,0,0,0"/>
<TextBlock Name="Entity1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A1" Grid.Column="2" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-10,0,0,0"/>
<CheckBox Name="F1" Grid.Column="3" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-10,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60"
<!--<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A2" Grid.Column="2" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F2" Grid.Column="3" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60"
<TextBlock Name="Entity2" Grid.Row="2" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A2" Grid.Column="2" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F2" Grid.Column="3" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A3" Grid.Column="2" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F3" Grid.Column="3" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60"
<TextBlock Name="Entity3" Grid.Row="3" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A3" Grid.Column="2" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F3" Grid.Column="3" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A4" Grid.Column="2" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F4" Grid.Column="3" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60"
<TextBlock Name="Entity4" Grid.Row="4" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A4" Grid.Column="2" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F4" Grid.Column="3" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A5" Grid.Column="2" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F5" Grid.Column="3" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60"
<TextBlock Name="Entity5" Grid.Row="5" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A5" Grid.Column="2" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F5" Grid.Column="3" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A6" Grid.Column="2" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F6" Grid.Column="3" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60"
<TextBlock Name="Entity6" Grid.Row="6" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A6" Grid.Column="2" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F6" Grid.Column="3" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A7" Grid.Column="2" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F7" Grid.Column="3" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60"
<TextBlock Name="Entity7" Grid.Row="7" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A7" Grid.Column="2" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F7" Grid.Column="3" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A8" Grid.Column="2" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F8" Grid.Column="3" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60"
<TextBlock Name="Entity8" Grid.Row="8" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A8" Grid.Column="2" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F8" Grid.Column="3" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A9" Grid.Column="2" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F9" Grid.Column="3" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60"
<TextBlock Name="Entity9" Grid.Row="9" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A9" Grid.Column="2" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F9" Grid.Column="3" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A10" Grid.Column="2" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<TextBlock Name="Entity10" Grid.Row="10" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A10" Grid.Column="2" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F10" Grid.Column="3" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<CheckBox Name="F10" Grid.Column="3" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<!--<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60"
<!--<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60"
Margin="0,0,0,-2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
Margin="0,0,0,-2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Altezza delle alette -->
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
Text="Offset"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1ATxBx"
Grid.Column="2" Grid.Row="0"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1FTxBx"
Grid.Column="3" Grid.Row="0"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<!-- Delta angolo (abilitato solo per i frontalini) -->
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
Text="Offset2"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<!-- temporaneamente disabilito la definizione delta angolo per alzatine -->
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
IsEnabled="False"
Visibility="Collapsed"
Grid.Column="2" Grid.Row="1"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2FTxBx"
Grid.Column="3" Grid.Row="1"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<!-- Altezza delle alette -->
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
Text="Offset"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<!-- Spessore aletta -->
<TextBlock Name="Parameter5TxBl" Grid.Row="2" Grid.ColumnSpan="2"
Text="Offset2"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
Grid.Column="2" Grid.Row="2"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1ATxBx"
Grid.Column="2" Grid.Row="0"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1FTxBx"
Grid.Column="3" Grid.Row="0"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<!--Gestisco nello spazio di una TextBox due TextBoxs--><!--
<!-- Delta angolo (abilitato solo per i frontalini) -->
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
Text="Offset2"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<!-- temporaneamente disabilito la definizione delta angolo per alzatine -->
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
IsEnabled="False"
Visibility="Collapsed"
Grid.Column="2" Grid.Row="1"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2FTxBx"
Grid.Column="3" Grid.Row="1"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<!-- Spessore aletta -->
<TextBlock Name="Parameter5TxBl" Grid.Row="2" Grid.ColumnSpan="2"
Text="Offset2"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
Grid.Column="2" Grid.Row="2"
HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<!--Gestisco nello spazio di una TextBox due TextBoxs-->
<!--
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
Grid.Column="2" Grid.Row="12"
@@ -231,7 +232,7 @@
</UniformGrid>-->
<!--<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
<!--<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
Text="Affondamento"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
@@ -241,7 +242,7 @@
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<!--<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
<!--<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
Text="Accorciamento"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
@@ -250,22 +251,22 @@
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
<Button Name="Vuoto" Visibility="Hidden"/>
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
<Button Name="BackBtn"
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
<Button Name="Vuoto" Visibility="Hidden"/>
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
<Button Name="BackBtn"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</UniformGrid>
</Grid>
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</UniformGrid>
</Grid>
</Grid>
</Grid>
</UserControl>
+6 -8
View File
@@ -1,6 +1,4 @@
Imports System.Globalization
Imports EgtUILib
Imports EgtWPFLib
Imports EgtUILib
Public Class AlzFrontUC
Private Const NUM_VAR As Integer = 10
@@ -76,9 +74,9 @@ Public Class AlzFrontUC
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
' nome dei parametri condivisi
Parameter1TxBl.Text = EgtMsg(91134)
Parameter2TxBl.Text = EgtMsg(91135)
Parameter5TxBl.Text = EgtMsg(91136)
Parameter1TxBl.Text = EgtMsg(91134) ' Altezza
Parameter2TxBl.Text = EgtMsg(91135) ' Delta angolo
Parameter5TxBl.Text = EgtMsg(91136) ' Spessore
EgtZoom(ZM.ALL)
End Sub
@@ -195,10 +193,10 @@ Public Class AlzFrontUC
If LoopId <> GDB_ID.NULL Then
If m_nCount = 0 Then
If m_CallingPage = MainWindow.Pages.Draw Then
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(90387) ' Non ci sono lati modificabili
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
Else
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(90387) ' Non ci sono lati modificabili
m_MainWindow.m_ImportPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
End If
Else
+22 -20
View File
@@ -1,13 +1,13 @@
<Window x:Class="CompoCsvData"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="ChooseMachining" Height="276.5" Width="426.5">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="CompoCsvData" Height="276.5" Width="426.5">
<!--Definizione della pagina di impostazione dati Trf su componenti-->
<Border Style="{DynamicResource OmagCut_Border}">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid Name="CompoCsvDataGrid">
<Grid.ColumnDefinitions>
@@ -27,19 +27,19 @@
</Grid.RowDefinitions>
<TextBlock Name="OrderTxBl" Grid.Column="1" Grid.Row="1"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="OrderTxBx" Grid.Column="2" Grid.Row="1"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<TextBlock Name="ListTxBl" Grid.Column="1" Grid.Row="2"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="ListTxBx" Grid.Column="2" Grid.Row="2"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<TextBlock Name="NameTxBl" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="NameTxBx" Grid.Column="2" Grid.Row="3"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<Grid Name="ButtonsGrid" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
@@ -50,13 +50,15 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="OkBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ExitBtn" Grid.Column="3"
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
+1 -2
View File
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtUILib
Public Class CompoCsvData
+31 -31
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="CompoDimensionUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.1" d:DesignWidth="255.9">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.1" d:DesignWidth="255.9">
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
@@ -26,54 +26,54 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<TextBlock Name="Label1" Grid.Row="0"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox1" Grid.Column="1" Grid.Row="0" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label2" Grid.Row="1"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox2" Grid.Column="1" Grid.Row="1" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label3" Grid.Row="2"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox3" Grid.Column="1" Grid.Row="2" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label4" Grid.Row="3"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox4" Grid.Column="1" Grid.Row="3" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label5" Grid.Row="4"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox5" Grid.Column="1" Grid.Row="4" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label6" Grid.Row="5"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox6" Grid.Column="1" Grid.Row="5" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label7" Grid.Row="6"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox7" Grid.Column="1" Grid.Row="6" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label8" Grid.Row="7"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox8" Grid.Column="1" Grid.Row="7" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label9" Grid.Row="8"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox9" Grid.Column="1" Grid.Row="8" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label10" Grid.Row="9"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox10" Grid.Column="1" Grid.Row="9" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<!--Per confermare l'inserimento CompoInterno-->
<!--Per confermare l'inserimento CompoInterno-->
<Button Name="AddBtn" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Button Name="CancelBtn" Grid.Column="1" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
<!--Selezione delle componenti interne-->
<!--Selezione delle componenti interne-->
<Button Name="InternComponentBtn" Grid.Row="10" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
@@ -81,6 +81,6 @@
<Button Name="AlzFrontBtn" Grid.Row="11" Grid.ColumnSpan="2"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
</Grid>
</Grid>
</UserControl>
+3 -3
View File
@@ -34,7 +34,7 @@ Public Class CompoDimensionUC
Dim sCompoDir As String = String.Empty
GetPrivateProfileString(S_ALZFRONT, K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
' definisco il nome dei comandi presenti nella pagine
InternComponentBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 47) ' Componenti interni
InternComponentBtn.Content = EgtMsg(90447) ' Componenti interni
If Not String.IsNullOrEmpty(sCompoDir) Then
bEnableAlzFront = True
AlzFrontBtn.Content = EgtMsg(91137)
@@ -42,8 +42,8 @@ Public Class CompoDimensionUC
AlzFrontBtn.Visibility = Visibility.Collapsed
End If
AddBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 48) ' Aggiungi
CancelBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 49) ' Rimuovi
AddBtn.Content = EgtMsg(90448) ' Aggiungi
CancelBtn.Content = EgtMsg(90449) ' Rimuovi
End Sub
Private Sub CompoDimensionUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
+28 -26
View File
@@ -1,13 +1,13 @@
<Window x:Class="CompoTrfData"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="ChooseMachining" Height="426.5" Width="426.5">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="CompoTrfData" Height="426.5" Width="426.5">
<!--Definizione della pagina di impostazione dati Trf su componenti-->
<Border Style="{DynamicResource OmagCut_Border}">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid Name="CompoTrfDataGrid">
<Grid.ColumnDefinitions>
@@ -30,34 +30,34 @@
</Grid.RowDefinitions>
<TextBlock Name="OrdCodeTxBl" Grid.Column="1" Grid.Row="1"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="OrdCodeTxBx" Grid.Column="2" Grid.Row="1"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<TextBlock Name="OrdDescTxBl" Grid.Column="1" Grid.Row="2"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="OrdDescTxBx" Grid.Column="2" Grid.Row="2"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<TextBlock Name="PartCodeTxBl" Grid.Column="1" Grid.Row="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="PartCodeTxBx" Grid.Column="2" Grid.Row="3"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<TextBlock Name="MatCodeTxBl" Grid.Column="1" Grid.Row="4"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="MatCodeTxBx" Grid.Column="2" Grid.Row="4"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<TextBlock Name="SurfCodeTxBl" Grid.Column="1" Grid.Row="5"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="SurfCodeTxBx" Grid.Column="2" Grid.Row="5"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<TextBlock Name="ThicknessTxBl" Grid.Column="1" Grid.Row="6"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
<EgtWPFLib:EgtTextBox Name="ThicknessTxBx" Grid.Column="2" Grid.Row="6"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Name="ButtonsGrid" Grid.Column="0" Grid.Row="8" Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
@@ -68,13 +68,15 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="OkBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ExitBtn" Grid.Column="3"
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
+7 -8
View File
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtUILib
Public Class CompoTrfData
@@ -14,12 +13,12 @@ Public Class CompoTrfData
Private Sub CompoTrfData_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
OrdCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 10) 'Order Code
OrdDescTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 11) 'Order Description
PartCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 16) 'Part Code
MatCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 12) 'Material Code
SurfCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 13) 'Surface Code
ThicknessTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 14) 'Thickness
OrdCodeTxBl.Text = EgtMsg(90390) ' Order Code
OrdDescTxBl.Text = EgtMsg(90391) ' Order Description
PartCodeTxBl.Text = EgtMsg(90396) ' Part Code
MatCodeTxBl.Text = EgtMsg(90392) ' Material Code
SurfCodeTxBl.Text = EgtMsg(90393) ' Surface Code
ThicknessTxBl.Text = EgtMsg(90394) ' Thickness
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
+38 -35
View File
@@ -1,18 +1,18 @@
<UserControl x:Class="DrawPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="DrawPage_Initialized" Loaded="DrawPage_Loaded" Unloaded="DrawPage_Unloaded">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="DrawPage_Initialized" Loaded="DrawPage_Loaded" Unloaded="DrawPage_Unloaded">
<!-- Definizione della DrawPage -->
<Border >
<Grid Name="DrawPageGrd" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="12*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
@@ -32,13 +32,13 @@
</Grid.ColumnDefinitions>
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
<ToggleButton Name="EngraveBtn" Grid.Column="2"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
<ToggleButton Name="DripCutBtn" Grid.Column="3" Padding="0"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
</Grid>
@@ -65,21 +65,21 @@
</Grid>
<Grid Name="VariablesGrd" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
<Grid Name="MessageGrid" Grid.Row="2" Grid.ColumnSpan="2">
<TextBlock Name="MessageTxBl" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="MessageTxBl" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
</Grid>
<Button Name="BackBtn" Grid.Column="1" Grid.Row="14"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Border>
<!-- Definizione della Grid Inferiore per i Button V e X -->
@@ -95,9 +95,10 @@
<Grid Name="TopGrd">
<TextBlock Name="TopTxBl"
Style="{StaticResource OmagCut_ToolsDBTextBlock}" />
<CheckBox Name="TopChBx" Style="{StaticResource OmagCut_CheckBox}"
HorizontalAlignment="Right" Margin="6,0,6,0"/>
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
<CheckBox Name="TopChBx"
Style="{DynamicResource OmagCut_CheckBox}"
HorizontalAlignment="Right" Margin="6,0,6,0"/>
</Grid>
@@ -107,12 +108,13 @@
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="PartNameTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
TextAlignment="Right"/>
<TextBlock Name="PartNameTxBl" Grid.Column="0"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
TextAlignment="Right"/>
<EgtWPFLib:EgtTextBox Name="PartNameTxBx" Grid.Column="1" Width="130"
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
<Button Name="TrfDataBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
Style="{DynamicResource OmagCut_YellowTextButton}"/>
</Grid>
@@ -122,24 +124,25 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
TextAlignment="Right"/>
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="PartNumTxBl" Grid.Column="0"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
TextAlignment="Right"/>
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Button Name="OkBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</UserControl>
+35 -10
View File
@@ -1,5 +1,4 @@
Imports System.Globalization
Imports EgtUILib
Imports EgtUILib
Imports EgtWPFLib
Public Class DrawPageUC
@@ -411,7 +410,7 @@ Public Class DrawPageUC
m_nSelectedLayer = GDB_ID.NULL
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
' Messaggio di selezione da effettuare
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
Else
Dim nLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
@@ -1185,12 +1184,14 @@ Public Class DrawPageUC
Else
MakeMultipleInsert(InsNbr, sPartName)
End If
' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena)
ActivateParkIndZero()
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
' Se Shift premuto eseguo il contrario
If Keyboard.Modifiers And ModifierKeys.Shift Then
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
bExitPage = Not bExitPage
End If
If bExitPage And m_MainWindow.FrameCutBtn.IsChecked Then
If bExitPage Then
' Aggiorno ambiente principale
EgtZoom(ZM.ALL)
' Elimino nome del componente precedente
@@ -1217,6 +1218,7 @@ Public Class DrawPageUC
Else
LoadSecondaryPage()
End If
End If
End Sub
@@ -1238,6 +1240,24 @@ Public Class DrawPageUC
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
End Sub
Private Sub ActivateParkIndZero()
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello dei pezzi disegnati "0"
Dim ListParkInd As New List(Of ParkInd)
SelParkIndWD.LoadParkInd(ListParkInd)
For Each ItemParkInd As ParkInd In ListParkInd
If ItemParkInd.Ind = 0 Then
ItemParkInd.Status = GDB_ST.ON_
Else
ItemParkInd.Status = GDB_ST.OFF
End If
Next
' Aggiorno lo stato dei pezzi
For Each Item As ParkInd In ListParkInd
SelParkIndWD.SetStatusPartInParkInd(Item, False)
Next
End Sub
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
@@ -1283,7 +1303,7 @@ Public Class DrawPageUC
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
Else
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
' Aggiungo testi su lati già inclinati
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
@@ -1349,7 +1369,7 @@ Public Class DrawPageUC
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
Else
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
End If
' In ogni caso, nascondo layer delle misure
@@ -1411,7 +1431,7 @@ Public Class DrawPageUC
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
Else
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
End If
' In ogni caso, nascondo layer delle misure
@@ -1469,7 +1489,7 @@ Public Class DrawPageUC
DripCutBtn.IsEnabled = False
MessageGrid.Visibility = Windows.Visibility.Hidden
BackBtn.Visibility = Windows.Visibility.Hidden
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
' In ogni caso, nascondo layer delle misure
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
@@ -1543,10 +1563,15 @@ Public Class DrawPageUC
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
End Select
' Pulisco l'ambiente lua
ResetLuaVariables()
Try
VariablesGrd.Children.Remove(m_CompoDimension)
Catch ex As Exception
Dim x As Boolean = True
End Try
End Sub
Private Class CompoVar
+19 -18
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="FiloTopUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.1" d:DesignWidth="255.9">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.1" d:DesignWidth="255.9">
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
@@ -32,20 +32,21 @@
<TextBlock Name="ParameterTxBl" Grid.Row="10" Text="Offset"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="ParameterTxBx" Grid.Column="1" Grid.Row="10" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter2TxBl" Grid.Row="11" Text="Affondamento"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter3TxBl" Grid.Row="12" Text="Arrotonda"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<CheckBox Name="Parameter3ChBx" Grid.Row="12" Grid.Column="1" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Center" Margin="0,0,6,0"/>
</Grid>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<CheckBox Name="Parameter3ChBx" Grid.Row="12" Grid.Column="1"
Style="{DynamicResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Center" Margin="0,0,6,0"/>
</Grid>
</UserControl>
+3 -3
View File
@@ -38,9 +38,9 @@ Public Class FiloTopUC
m_CallingPage = m_MainWindow.m_ActivePage
' Imposto messaggi
ParameterTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
Parameter3TxBl.Text = EgtMsg(91138)
ParameterTxBl.Text = EgtMsg(90460) ' Offset
Parameter2TxBl.Text = EgtMsg(90461) ' Affondamento
Parameter3TxBl.Text = EgtMsg(91138) ' Arrotonda
If m_CallingPage = MainWindow.Pages.Draw Then
' Imposto questa come pagina correntemente visualizzata nella drawpage
+41 -37
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="ImportPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
<!-- Definizione della ImportPage -->
<Border>
@@ -20,7 +20,7 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid superiore per Button -->
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
<Grid.ColumnDefinitions>
@@ -33,15 +33,17 @@
</Grid.ColumnDefinitions>
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
<ToggleButton Name="EngraveBtn" Grid.Column="2"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
<ToggleButton Name="DripDrillBtn" Grid.Column="3" Padding="0"
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
Style="{DynamicResource OmagCut_YellowTextButton}"/>
</Grid>
<!-- Definizione della Grid laterale -->
@@ -54,25 +56,26 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
<TextBlock Name="FilePathTxBl" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2"
ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
</Button>
</Grid>
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Width="30" />
</Button>
</Grid>
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Border>
</Grid>
@@ -112,24 +115,25 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
TextAlignment="Right"/>
<TextBlock Name="PartNumTxBl" Grid.Column="0"
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
TextAlignment="Right"/>
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</UserControl>
+325 -97
View File
@@ -1,7 +1,5 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.IO
Imports EgtUILib
Imports System.Runtime.InteropServices
Public Class ImportPageUC
@@ -38,6 +36,8 @@ Public Class ImportPageUC
Private Const FT_TRF As Integer = 51
' Costante per formato CUT
Private Const FT_CUT As Integer = 52
' Indice del parcheggio corrente
Private NewParkInd As Integer = 0
' Indentificativo del pezzo selezionato
Private m_nSelectedPart As Integer = GDB_ID.NULL
@@ -76,19 +76,20 @@ Public Class ImportPageUC
Me.ImportPageGrid.Children.Add(ImportSceneHost)
'Imposto i messaggi letti dal file dei messaggi
UseLayerBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 1) 'Usa layer - Use layers
UseRegionBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 2) 'Usa regioni - Use regions
UseClosedCurveBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 6) 'Usa curve chiuse - Use closed curves
ResetBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 3) 'Reset
mmBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 4) 'mm
inchBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 5) 'inch
OrderListBtn.Content = EgtMsg( 90398) 'Dati Csv
TopBtn.Content = EgtMsg( 90384) 'Indica Lato Sopra
PartNumTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 15) 'Numero
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
UseLayerBtn.Content = EgtMsg(90451) ' Usa layer - Use layers
UseRegionBtn.Content = EgtMsg(90452) ' Usa regioni - Use regions
UseClosedCurveBtn.Content = EgtMsg(90456) ' Usa curve chiuse - Use closed curves
ResetBtn.Content = EgtMsg(90453) ' Reset
mmBtn.Content = EgtMsg(90454) ' mm
inchBtn.Content = EgtMsg(90455) ' inch
OrderListBtn.Content = EgtMsg(90398) ' Dati Csv
TopBtn.Content = EgtMsg(90384) ' Indica Lato Sopra
PartNumTxBl.Text = EgtMsg(90465) ' Quantità
SideAngleBtn.Content = EgtMsg(90457) ' Inclina lati
FiloTopBtn.Content = EgtMsg(90400) ' Filo Top
DripCutBtn.Content = EgtMsg(90458) ' Incidi da sotto
EngraveBtn.Content = EgtMsg(91238) ' Engrave
DripDrillBtn.Content = EgtMsg(90464) ' Foro da sotto
Cad2dBtn.Content = "Cad 2d"
'Definizione del collegamento tra ItemList e ListBox1
@@ -97,7 +98,6 @@ Public Class ImportPageUC
End Sub
Private Sub ImportPage_Loaded(sender As Object, e As RoutedEventArgs)
' abilitazione importazione TRF
m_bEnableTrf = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.TRF_IMPORT))
@@ -159,10 +159,14 @@ Public Class ImportPageUC
' Verifico esistenza Cad 2d
GetPrivateProfileString(S_CAD2D, K_CAD2D_NAME, "", m_sCad2dName, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_CAD2D, K_CAD2D_EXEPATH, "", m_sCad2dPath, m_MainWindow.GetIniFile())
Cad2dBtn.IsEnabled = My.Computer.FileSystem.FileExists( m_sCad2dPath)
Cad2dBtn.IsEnabled = My.Computer.FileSystem.FileExists(m_sCad2dPath)
' Pulisco tutto
ClearView()
' Definizione di quale comando deve essere visualizzato
DripCutBtn.Visibility = If(String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw), Visibility.Hidden, Visibility.Visible)
EngraveBtn.Visibility = If(DripCutBtn.Visibility <> Visibility.Visible, Visibility.Visible, Visibility.Hidden)
FileListBox.UnselectAll()
' inibisco selezione diretta da Scene
ImportScene.SetStatusNull()
@@ -174,7 +178,7 @@ Public Class ImportPageUC
UseClosedCurveBtn.Visibility = Windows.Visibility.Visible
ResetBtn.Visibility = Windows.Visibility.Visible
SideAngleBtn.Visibility = Windows.Visibility.Visible
OrderListBtn.Visibility = If( m_bEnableOrderList, Windows.Visibility.Visible, Windows.Visibility.Hidden)
OrderListBtn.Visibility = If(m_bEnableOrderList, Windows.Visibility.Visible, Windows.Visibility.Hidden)
TopBtn.Visibility = Windows.Visibility.Visible
PartNumberGrd.Visibility = Windows.Visibility.Visible
Else
@@ -184,7 +188,7 @@ Public Class ImportPageUC
ResetBtn.Visibility = Windows.Visibility.Hidden
SideAngleBtn.Visibility = Windows.Visibility.Hidden
OrderListBtn.Visibility = Windows.Visibility.Hidden
TopBtn.Visibility = Windows.Visibility.Hidden
TopBtn.Visibility = Windows.Visibility.Hidden
PartNumberGrd.Visibility = Windows.Visibility.Hidden
End If
mmBtn.IsEnabled = True
@@ -201,6 +205,8 @@ Public Class ImportPageUC
PartNumTxBx.Text = "1"
' disabilito ok
OkBtn.IsEnabled = False
' Azzero l'idice di parcheggio
NewParkInd = 0
End Sub
Private Sub LoadGridData()
@@ -343,7 +349,12 @@ Public Class ImportPageUC
ResetBtn.IsEnabled = False
SideAngleBtn.IsEnabled = False
FiloTopBtn.IsEnabled = False
DripCutBtn.IsEnabled = False
' Evito di settare le proprietà di oggeti che sono con visibilità Hidden
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = False
Else
EngraveBtn.IsEnabled = False
End If
DripDrillBtn.IsEnabled = False
Return True
End Function
@@ -404,7 +415,11 @@ Public Class ImportPageUC
OkBtn.IsEnabled = False
SideAngleBtn.IsEnabled = False
FiloTopBtn.IsEnabled = False
DripCutBtn.IsEnabled = False
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = False
Else
EngraveBtn.IsEnabled = False
End If
DripDrillBtn.IsEnabled = False
ElseIf m_nFileType = FT_TRF Or m_nFileType = FT_CUT Then
' abilito bottone Insert, disabilito bottoni UseLayer, UseClosedCurve, UseRegion e Reset
@@ -420,7 +435,11 @@ Public Class ImportPageUC
OkBtn.IsEnabled = True
SideAngleBtn.IsEnabled = False
FiloTopBtn.IsEnabled = False
DripCutBtn.IsEnabled = False
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = False
Else
EngraveBtn.IsEnabled = False
End If
DripDrillBtn.IsEnabled = False
End If
' altrimenti import per cornici
@@ -433,12 +452,12 @@ Public Class ImportPageUC
End Function
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
OnMouseDownSceneSideAngle( e)
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked Then
OnMouseDownSceneSideAngle(e)
ElseIf DripDrillBtn.IsChecked() Then
OnMouseDownSceneUnderDrill( e)
OnMouseDownSceneUnderDrill(e)
ElseIf FiloTopBtn.IsChecked() Then
OnMouseDownSceneFiloTop( e)
OnMouseDownSceneFiloTop(e)
End If
End Sub
@@ -568,14 +587,14 @@ Public Class ImportPageUC
EgtDeselectObj(nId)
EgtDeselectObj(nLayId)
Dim sLayName As String = ""
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
EgtRemoveInfo( nLayId, INFO_FILOTOP)
EgtRemoveInfo( nLayId, INFO_OFFSET)
EgtRemoveInfo( nLayId, INFO_DEPTH)
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
EgtRemoveInfo(nLayId, INFO_FILOTOP)
EgtRemoveInfo(nLayId, INFO_OFFSET)
EgtRemoveInfo(nLayId, INFO_DEPTH)
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
While nEntId <> GDB_ID.NULL
EgtSetColor(nEntId, New Color3d(127, 63, 0))
nEntId = EgtGetNext( nEntId)
nEntId = EgtGetNext(nEntId)
End While
m_DeselectListHole.Add(nLayId)
m_SelListHole.Remove(nLayId)
@@ -584,16 +603,16 @@ Public Class ImportPageUC
Dim nLayId As Integer = GDB_ID.NULL
EgtGetInfo(nId, "ID", nLayId)
Dim sLayName As String = ""
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
EgtSelectObj( nId)
EgtSelectObj( nLayId)
EgtSetInfo( nLayId, INFO_FILOTOP, 1)
EgtSetInfo( nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
EgtSetInfo( nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
EgtSelectObj(nId)
EgtSelectObj(nLayId)
EgtSetInfo(nLayId, INFO_FILOTOP, 1)
EgtSetInfo(nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
EgtSetInfo(nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
While nEntId <> GDB_ID.NULL
EgtSetColor(nEntId, New Color3d(255, 255, 255))
nEntId = EgtGetNext( nEntId)
nEntId = EgtGetNext(nEntId)
End While
m_SelListHole.Add(nLayId)
m_DeselectListHole.Remove(nLayId)
@@ -619,7 +638,7 @@ Public Class ImportPageUC
Private Sub SelectedPartChanged()
' Se sono in modalità inclinazioni o gocciolatoio calcolo lati inclinabili e creo testi
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked() Then
m_SideAngleUC.ReLoadSideAnglePage()
End If
End Sub
@@ -642,7 +661,7 @@ Public Class ImportPageUC
' Ciclo sulle regioni
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
While EntId <> GDB_ID.NULL
If EgtGetType( EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
EntId = EgtGetNext(EntId)
End While
RegionId = EgtGetNextName(PartId, NAME_REGION)
@@ -680,8 +699,12 @@ Public Class ImportPageUC
' abilito bottone angoli su lati esterni
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
Else
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
End If
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
End Sub
@@ -712,8 +735,12 @@ Public Class ImportPageUC
' abilito bottone angoli su lati esterni
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
Else
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
End If
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
End Sub
@@ -744,8 +771,12 @@ Public Class ImportPageUC
' abilito bottone angoli su lati esterni
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
Else
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
End If
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
End Sub
@@ -826,19 +857,36 @@ Public Class ImportPageUC
End Sub
Private Sub OrderListBtn_Click(sender As Object, e As RoutedEventArgs) Handles OrderListBtn.Click
Dim DlgOrderList As New CompoCsvData( m_MainWindow)
DlgOrderList.SetData( m_sOrder, m_sList)
Dim DlgOrderList As New CompoCsvData(m_MainWindow)
DlgOrderList.SetData(m_sOrder, m_sList)
If DlgOrderList.ShowDialog() Then
DlgOrderList.GetData( m_sOrder, m_sList)
DlgOrderList.GetData(m_sOrder, m_sList)
End If
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
m_SceneButtons.MeasureBtn.IsChecked = False
' Genero l'immagine solo se è abilitata la modalità
If m_MainWindow.EnabledDxfPark() Then Print()
' Se import per pezzi piatti
If m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut Then
' Eseguo importazione pezzi piatti
LoadFlatParts()
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello indicato
Dim ListParkInd As New List(Of ParkInd)
SelParkIndWD.LoadParkInd(ListParkInd)
For Each ItemParkInd As ParkInd In ListParkInd
If ItemParkInd.Ind = NewParkInd Then
ItemParkInd.Status = GDB_ST.ON_
Else
ItemParkInd.Status = GDB_ST.OFF
End If
Next
' Aggiorno lo stato dei pezzi
For Each Item As ParkInd In ListParkInd
SelParkIndWD.SetStatusPartInParkInd(Item, False)
Next
' altrimenti import per cornici
Else
LoadFrame()
@@ -849,6 +897,74 @@ Public Class ImportPageUC
m_MainWindow.m_ActivePage = m_MainWindow.m_PrevActivePage
End Sub
' Creo una immagine del progetto da importare salvato nel percorso di progetto "..\(#ProjInd)_ParkInd_(#ParkInd).png"
Public Sub Print()
' recupero la lista degli indici di parcheggio
NewParkInd = SelParkIndWD.NewParkInd()
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
Dim sPath As String = SelParkIndWD.GetPathCurrProj() & NewParkInd.ToString & ".png"
' Recupero le dimensioni dell'area di stampa
Dim dW As Integer = 120
Dim dH As Integer = 120
If Not MainWindow.m_bShowSVGParkInd Then
Try
' Prendo l'immagine corrente per la stampa
Dim colBackTopColor As Color3d = GetBackTopColor()
Dim colBackBottomColor As Color3d = GetBackBottomColor()
' Recupero le dimensioni correnti della pagina di disegno
Dim nImgW As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualWidth()
Dim nImgH As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualHeight()
If Not EgtGetImage(SM.SHADING, colBackTopColor, colBackBottomColor, nImgW, nImgH, sPath) Then
' Error in creating the print image
EgtOutLog(EgtMsg(50181))
Return
End If
'Metodo complesso di stampa che permette di rilasciare il file :
'carico la bitmap e la metto in uno stream in memoria
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(sPath)
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Png)
bitmap.Dispose()
' la sposto in una BitmapImage
Dim bitImage As New System.Windows.Media.Imaging.BitmapImage()
bitImage.BeginInit()
bitImage.StreamSource = stream
bitImage.EndInit()
' la sposto in un Visual Control
Dim tmpImg As New Image
tmpImg.BeginInit()
tmpImg.Source = bitImage
tmpImg.Stretch = Stretch.Uniform
tmpImg.EndInit()
Catch
' Error in executing print
EgtOutLog(EgtMsg(50182))
End Try
Else
' Assegno dei nomi ai pezzi (Da controllare bene se funzione sempre)...riassegno i nomi dopo?
Dim nIdPart As Integer = EgtGetFirstPart()
Dim nIndex As Integer = 0
While nIdPart <> GDB_ID.NULL
' recupero il primo layer del part
Dim nIdLay As Integer = EgtGetFirstLayer(nIdPart)
While nIdLay <> GDB_ID.NULL
Dim nIdEnt As Integer = EgtGetFirstInGroup(nIdLay)
While nIdEnt <> GDB_ID.NULL
EgtSetName(nIdEnt, nIndex.ToString)
nIdEnt = EgtGetNext(nIdEnt)
nIndex = nIndex + 1
End While
nIdLay = EgtGetNextLayer(nIdLay)
End While
nIdPart = EgtGetNextPart(nIdPart)
End While
EgtExportSvg(GDB_ID.ROOT, SelParkIndWD.GetPathCurrProj() & NewParkInd.ToString & ".svg")
End If
End Sub
Private Sub LoadFlatParts()
' Cancello regioni di selezione dai pezzi
Dim PartId As Integer = EgtGetFirstPart()
@@ -921,21 +1037,37 @@ Public Class ImportPageUC
If My.Computer.FileSystem.FileExists(sTmpFile) Then
My.Computer.FileSystem.DeleteFile(sTmpFile)
End If
' Calcolo l'area dei pezzi inseriti
Dim dNewArea As Double = 0
Dim nId As Integer = nFirstId
While nId <> GDB_ID.NULL
' Definisco l'indice di parcheggio assegnato al pezzo
If m_MainWindow.EnabledDxfPark() Then
EgtSetInfo(nId, INFO_PARKIND, NewParkInd.ToString)
' Imposto lo stato
EgtSetStatus(nId, GDB_ST.ON_)
' Salvo lo stato (per gestire la navigazione)
EgtSetInfo(nId, INFO_PARKSTATUS, GDB_ST.ON_)
End If
dNewArea += GeomCalc.GetPartArea(nId)
' Passo al pezzo successivo
nId = EgtGetNextPart(nId)
End While
' Nascondo tutti i pezzi inseriti (per evitare interferenze con pezzi in fase di parcheggio)
nId = nFirstId
Dim GlobBBox As New BBox3d
While nId <> GDB_ID.NULL
Dim bboxTemp As New BBox3d
EgtGetBBox(nId, 0, bboxTemp)
GlobBBox.Add(bboxTemp)
EgtSetStatus(nId, GDB_ST.OFF)
' Passo al pezzo successivo
nId = EgtGetNextPart(nId)
End While
Dim DimX As Double = GlobBBox.DimX
Dim DimY As Double = GlobBBox.DimY
Dim BBoxMaxPt As Point3d = GlobBBox.Max
' Ciclo sui pezzi inseriti
nId = nFirstId
@@ -972,7 +1104,12 @@ Public Class ImportPageUC
' Imposto path di provenienza
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
' Inserisco in parcheggio
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
If m_MainWindow.EnabledDxfPark() Then
' Mantengo la posizione relativa tra i pezzi
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePartDXF(nId, DimX, DimY, BBoxMaxPt)
Else
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
End If
' Recupero Id di pezzo successivo
Dim nNextId As Integer = EgtGetNextPart(nId)
' Se richiesto posizionamento diretto, lo eseguo
@@ -1029,22 +1166,24 @@ Public Class ImportPageUC
' Salvo direttorio corrente
WritePrivateProfileString(S_FLATPARTS, K_FLPCURRDIR, m_sCurrDir, m_MainWindow.GetIniFile())
' Tolgo pagina inclinazioni/gocciolatoi se attiva
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked() Then
FilePathTxBl.Visibility = Windows.Visibility.Visible
FileListBox.Visibility = Windows.Visibility.Visible
LeftGrid.Children.Remove(m_SideAngleUC)
If SideAngleBtn.IsChecked() Then
SideAngleBtn.IsChecked = False
ElseIf EngraveBtn.IsChecked() Then
EngraveBtn.IsChecked = False
Else
DripCutBtn.IsChecked() = False
End If
' Tolgo pagina fori da sotto se attiva
' Tolgo pagina fori da sotto se attiva
ElseIf DripDrillBtn.IsChecked() Then
FilePathTxBl.Visibility = Windows.Visibility.Visible
FileListBox.Visibility = Windows.Visibility.Visible
LeftGrid.Children.Remove(m_UnderDrillUC)
DripDrillBtn.IsChecked() = False
' Tolgo pagina Filo Top se attiva
' Tolgo pagina Filo Top se attiva
ElseIf FiloTopBtn.IsChecked() Then
FilePathTxBl.Visibility = Windows.Visibility.Visible
FileListBox.Visibility = Windows.Visibility.Visible
@@ -1071,7 +1210,11 @@ Public Class ImportPageUC
FileListBox.Visibility = Windows.Visibility.Hidden
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
FiloTopBtn.IsEnabled = False
DripCutBtn.IsEnabled = False
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = False
Else
EngraveBtn.IsEnabled = False
End If
DripDrillBtn.IsEnabled = False
mmBtn.IsEnabled = False
inchBtn.IsEnabled = False
@@ -1093,8 +1236,72 @@ Public Class ImportPageUC
EgtDeselectAll()
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
Else
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
End If
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
mmBtn.IsEnabled = True
inchBtn.IsEnabled = True
' Elimino scritte angoli per input e inserisco quelle definitive
SideAngle.WriteSideAngleForNest(ImportScene.GetCtx())
' Riabilito bottone reset
ResetBtn.IsEnabled = True
' Pulisco area messaggi
MessageTxBx.Text = ""
MessageBrd.Background = Brushes.Transparent
End If
EgtZoom(ZM.ALL)
End Sub
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
If EngraveBtn.IsChecked() Then
FinderGrd.Visibility = Visibility.Hidden
' Aggiungo regioni per percorsi interni
AdjustSelectRegions()
' Dichiaro nessuna selezione
m_nSelectedPart = GDB_ID.NULL
m_nSelectedLayer = GDB_ID.NULL
' Imposto modalità sideangle
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
LeftGrid.Children.Add(m_SideAngleUC)
FilePathTxBl.Visibility = Windows.Visibility.Hidden
FileListBox.Visibility = Windows.Visibility.Hidden
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
SideAngleBtn.IsEnabled = False
FiloTopBtn.IsEnabled = False
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = False
End If
DripDrillBtn.IsEnabled = False
mmBtn.IsEnabled = False
inchBtn.IsEnabled = False
' Disabilito bottone reset
ResetBtn.IsEnabled = False
' Messaggio di selezione da effettuare
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
Else
FinderGrd.Visibility = Visibility.Visible
' Rimuovo regioni per percorsi interni
RemoveSelectRegions()
FilePathTxBl.Visibility = Windows.Visibility.Visible
FileListBox.Visibility = Windows.Visibility.Visible
LeftGrid.Children.Remove(m_SideAngleUC)
' Deseleziono eventuali pezzi rimasti selezionati
m_nSelectedPart = GDB_ID.NULL
m_nSelectedLayer = GDB_ID.NULL
EgtDeselectAll()
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
End If
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
mmBtn.IsEnabled = True
@@ -1124,6 +1331,9 @@ Public Class ImportPageUC
' Disabilito SideAngleBtn,FiloTop, DripDrillBtn e unità di misura
SideAngleBtn.IsEnabled = False
FiloTopBtn.IsEnabled = False
If DripCutBtn.Visibility <> Visibility.Visible Then
EngraveBtn.IsEnabled = False
End If
DripDrillBtn.IsEnabled = False
mmBtn.IsEnabled = False
inchBtn.IsEnabled = False
@@ -1144,8 +1354,9 @@ Public Class ImportPageUC
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
If DripCutBtn.Visibility <> Visibility.Visible Then
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
End If
mmBtn.IsEnabled = True
inchBtn.IsEnabled = True
' Elimino scritte angoli per input e inserisco quelle definitive
@@ -1174,7 +1385,11 @@ Public Class ImportPageUC
' Disabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
SideAngleBtn.IsEnabled = False
FiloTopBtn.IsEnabled = False
DripCutBtn.IsEnabled = False
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = False
Else
EngraveBtn.IsEnabled = False
End If
mmBtn.IsEnabled = False
inchBtn.IsEnabled = False
' Disabilito bottone reset
@@ -1196,8 +1411,12 @@ Public Class ImportPageUC
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
Else
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
End If
mmBtn.IsEnabled = True
inchBtn.IsEnabled = True
' Riabilito bottone reset
@@ -1223,7 +1442,11 @@ Public Class ImportPageUC
FileListBox.Visibility = Windows.Visibility.Hidden
' Disabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
SideAngleBtn.IsEnabled = False
DripCutBtn.IsEnabled = False
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = False
Else
EngraveBtn.IsEnabled = False
End If
DripDrillBtn.IsEnabled = False
mmBtn.IsEnabled = False
inchBtn.IsEnabled = False
@@ -1245,8 +1468,12 @@ Public Class ImportPageUC
EgtDeselectAll()
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
If DripCutBtn.Visibility = Visibility.Visible Then
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
Else
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
End If
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
mmBtn.IsEnabled = True
@@ -1305,8 +1532,9 @@ Public Class ImportPageUC
If nType = GDB_TY.CRV_LINE Or nType = GDB_TY.CRV_ARC Or nType = GDB_TY.CRV_COMPO Then
vCrvId.Add(nCrvId)
End If
ElseIf DripDrillBtn.IsChecked
if nType = GDB_TY.CRV_ARC
ElseIf DripDrillBtn.IsChecked Then
If nType = GDB_TY.CRV_ARC Then
vCrvId.Add(nCrvId)
End If
End If
@@ -1332,11 +1560,11 @@ Public Class ImportPageUC
Private Sub Cad2dBtn_Click(sender As Object, e As RoutedEventArgs) Handles Cad2dBtn.Click
Dim ProcsCad2d As Process() = Process.GetProcessesByName( m_sCad2dName)
Dim ProcsCad2d As Process() = Process.GetProcessesByName(m_sCad2dName)
If ProcsCad2d.Length() > 0 Then
ShowWindow( ProcsCad2d(0).MainWindowHandle, 3)
ShowWindow(ProcsCad2d(0).MainWindowHandle, 3)
Else
Process.Start( m_sCad2dPath)
Process.Start(m_sCad2dPath)
End If
End Sub
@@ -1345,42 +1573,42 @@ End Class
Public Class IconListBoxItem
Private m_iPictureID As Integer
Private m_sName As String
Private m_iPictureID As Integer
Private m_sName As String
Public Property PictureID() As Integer
Get
Return m_iPictureID
End Get
Set(value As Integer)
m_iPictureID = value
End Set
End Property
Public Property PictureID() As Integer
Get
Return m_iPictureID
End Get
Set(value As Integer)
m_iPictureID = value
End Set
End Property
Public Property Name() As String
Get
Return m_sName
End Get
Set(value As String)
m_sName = value
End Set
End Property
Public Property Name() As String
Get
Return m_sName
End Get
Set(value As String)
m_sName = value
End Set
End Property
Public ReadOnly Property PictureString() As String
Get
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
End Get
End Property
Public ReadOnly Property PictureString() As String
Get
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
End Get
End Property
Sub New()
Me.Name = String.Empty
Me.PictureID = 0
End Sub
Sub New()
Me.Name = String.Empty
Me.PictureID = 0
End Sub
Sub New(Name As String, PictureID As Integer)
Me.Name = Name
Me.PictureID = PictureID
End Sub
Sub New(Name As String, PictureID As Integer)
Me.Name = Name
Me.PictureID = PictureID
End Sub
End Class
+38 -37
View File
@@ -1,10 +1,10 @@
<UserControl x:Class="InternalComponentPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256">
<!-- Definizione della MainComponentPage -->
<Grid Name="MainComponentPageGrid" Background="{DynamicResource OmagCut_Gray}">
@@ -30,7 +30,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo1" Grid.Column="0" />
<TextBlock Name="LabelCompo1" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -42,11 +42,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo2" Grid.Column="0" />
<TextBlock Name="LabelCompo2" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -54,11 +54,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo3" Grid.Column="0" />
<TextBlock Name="LabelCompo3" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -66,11 +66,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo4" Grid.Column="0" />
<TextBlock Name="LabelCompo4" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -78,11 +78,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo5" Grid.Column="0" />
<TextBlock Name="LabelCompo5" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -90,11 +90,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo6" Grid.Column="0" />
<TextBlock Name="LabelCompo6" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -102,11 +102,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo7" Grid.Column="0" />
<TextBlock Name="LabelCompo7" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -114,29 +114,30 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo8" Grid.Column="0" />
<TextBlock Name="LabelCompo8" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo9" Grid.Row="8" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
<!--"/Resources/NumericKeyboardArrow.png"/>-->
<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo9" Grid.Row="8" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
<!--"/Resources/NumericKeyboardArrow.png"/>-->
<TextBlock Name="LabelCompo9"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Grid Grid.Row="9">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="9">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
+1 -1
View File
@@ -21,7 +21,7 @@ Public Class InternalComponentPageUC
' bottone per selezionare la seconda pagina di componenti interni
Compo9.SetValue(Grid.ColumnProperty, 0)
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
LabelCompo9.Text = EgtMsg(MSG_COMPONENTPAGEUC + 9) ' Altri
LabelCompo9.Text = EgtMsg(90409) ' Altri
ImageCompo9.Visibility = Windows.Visibility.Hidden
LabelCompo9.Visibility = Windows.Visibility.Visible
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
+33 -32
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="MainComponentPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256">
<!-- Definizione della MainComponentPage -->
<Grid Name="MainComponentPageGrid">
<Grid.RowDefinitions>
@@ -20,9 +20,9 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
<Button Name="Compo1" Grid.Row="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo1" Grid.Row="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -30,11 +30,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo1" Grid.Column="0" />
<TextBlock Name="LabelCompo1" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo2" Grid.Row="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo2" Grid.Row="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -42,11 +42,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo2" Grid.Column="0" />
<TextBlock Name="LabelCompo2" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -54,23 +54,23 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo3" Grid.Column="0" />
<TextBlock Name="LabelCompo3" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Name="ImageCompo4" Grid.Column="0" />
<TextBlock Name="LabelCompo4" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -78,11 +78,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo5" Grid.Column="0" />
<TextBlock Name="LabelCompo5" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -90,11 +90,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo6" Grid.Column="0" />
<TextBlock Name="LabelCompo6" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -102,11 +102,11 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo7" Grid.Column="0" />
<TextBlock Name="LabelCompo7" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
@@ -114,7 +114,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo8" Grid.Column="0" />
<TextBlock Name="LabelCompo8" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -123,15 +123,16 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="Compo9" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="Compo9" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
<!--Source="/Resources/NumericKeyboardArrow.png"/>-->
<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
<!--Source="/Resources/NumericKeyboardArrow.png"/>-->
<TextBlock Name="LabelCompo9"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
</Grid>
</Grid>
</UserControl>
+3 -3
View File
@@ -25,7 +25,7 @@ Public Class MainComponentPageUC
m_SecondaryComponentPage.SetValue(Grid.RowSpanProperty, 4)
' Leggo messaggi da file ini
LabelCompo9.Text = EgtMsg(MSG_COMPONENTPAGEUC + 9)
LabelCompo9.Text = EgtMsg(90409) ' Altri
End Sub
@@ -319,7 +319,7 @@ Public Class MainComponentPageUC
'verifico presenza testo
If nCompoName > 0 Then
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
Dim sCompoName As String = EgtMsg(90400 + nCompoName)
'verifico presenza immagine
If sCompoImage.Length > 0 Then
'se la lunghezza del testo è maggiore di 15 lo taglio
@@ -394,7 +394,7 @@ Public Class MainComponentPageUC
'verifico presenza testo
If nCompoName > 0 Then
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
Dim sCompoName As String = EgtMsg(90400 + nCompoName)
'verifico presenza immagine
If sCompoImage.Length > 0 Then
'se la lunghezza del testo è maggiore di 15 lo taglio
+22 -22
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="SecondaryComponentPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256" Loaded="SecondaryComponentPage_Loaded">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="256" Loaded="SecondaryComponentPage_Loaded">
<!-- Definizione della SecondaryComponentPage -->
<Grid Name="SecondaryComponentPageGrid">
<Grid.RowDefinitions>
@@ -20,7 +20,7 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
<Button Name="Compo1" Grid.Row="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
@@ -30,7 +30,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo1" Grid.Column="0" />
<TextBlock Name="LabelCompo1" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -43,7 +43,7 @@
<Image Name="ImageCompo2" Grid.Column="0" />
<TextBlock Name="LabelCompo2" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -55,7 +55,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo3" Grid.Column="0" />
<TextBlock Name="LabelCompo3" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -67,7 +67,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo4" Grid.Column="0" />
<TextBlock Name="LabelCompo4" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -79,7 +79,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo5" Grid.Column="0" />
<TextBlock Name="LabelCompo5" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -91,7 +91,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo6" Grid.Column="0" />
<TextBlock Name="LabelCompo6" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -103,7 +103,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo7" Grid.Column="0" />
<TextBlock Name="LabelCompo7" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -115,7 +115,7 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo8" Grid.Column="0" />
<TextBlock Name="LabelCompo8" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
@@ -127,10 +127,10 @@
</Grid.ColumnDefinitions>
<Image Name="ImageCompo9" Grid.Column="0" />
<TextBlock Name="LabelCompo9" Grid.Column="1"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Grid Grid.Row="9">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
@@ -138,11 +138,11 @@
</Grid.ColumnDefinitions>
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</UserControl>
+2 -2
View File
@@ -68,7 +68,7 @@ Public Class SecondaryComponentPageUC
'verifico presenza testo
If nCompoName > 0 Then
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
Dim sCompoName As String = EgtMsg(90400 + nCompoName)
'verifico presenza immagine
If sCompoImage.Length > 0 Then
'se la lunghezza del testo è maggiore di 20 lo taglio
@@ -248,5 +248,5 @@ Public Class SecondaryComponentPageUC
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Add(m_MainComponentPage)
End Sub
End Class
+4
View File
@@ -226,6 +226,10 @@ Module SideAngle
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
EgtSetInfo(EntId, INFO_HEEL, dHeel)
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
If Not String.IsNullOrWhiteSpace(sSawingTilted) Then
EgtSetInfo(EntId, DEF_MACHINING_TILTED, sSawingTilted)
End If
End If
End If
End If
+83
View File
@@ -0,0 +1,83 @@
<Window x:Class="SideAngleOneForAllWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Title="ChooseTool" Height="255.9" Width="426.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.7*"/>
<RowDefinition Height="0.3*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="TitleTxBl"
Grid.ColumnSpan="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<Grid Grid.Row="1"
Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="A °"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<TextBlock Grid.Column="1"
Text="T"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<ComboBox Grid.Row="1"
Name="SideAngleOneForAllCBx"
Margin="10,0,10,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="20"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox Grid.Row="1"
Grid.Column="1"
Name="SideHeelOneForAllCBx"
Margin="10,0,10,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="20"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
@@ -0,0 +1,20 @@
Public Class SideAngleOneForAllWindow
Sub New()
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
TitleTxBl.Text = EgtUILib.EgtMsg(91253) ' Seleziona Angolo e Tallone
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
DialogResult = True
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
DialogResult = False
End Sub
End Class
+135 -126
View File
@@ -1,17 +1,17 @@
<UserControl x:Class="SideAngleUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="636.9" d:DesignWidth="255.9">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="636.9" d:DesignWidth="255.9">
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.2*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
@@ -34,182 +34,191 @@
<RowDefinition Height="0.5*"/>-->
</Grid.RowDefinitions>
<Grid>
<Grid Name="SideAngleGrid" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.4*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.4*"/>
<!--<ColumnDefinition Width="0.4*"/>-->
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.8*"/>
</Grid.ColumnDefinitions>
<Button Name="PrevBtn" Grid.Column="1" Margin="4,0,4,0" Padding="0" Content="&lt;" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="NextBtn" Grid.Column="2" Margin="4,0,4,0" Padding="0" Content="&gt;" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="PrevBtn" Grid.Column="0" Margin="2,0,2,0" Padding="0" Content="&lt;" Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Button Name="NextBtn" Grid.Column="1" Margin="2,0,2,0" Padding="0" Content="&gt;" Style="{DynamicResource OmagCut_YellowTextButton}"/>
<CheckBox Name="SideAngleChBx" Grid.Column="2" Margin="2,0,0,0" Padding="0"/>
</Grid>
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="A °"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="T"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="NewEntity" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="NewA1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="NewA1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="NewH1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity2" Grid.Row="2" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A2" Grid.Column="1" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity3" Grid.Row="3" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A3" Grid.Column="1" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity4" Grid.Row="4" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A4" Grid.Column="1" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity5" Grid.Row="5" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A5" Grid.Column="1" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity6" Grid.Row="6" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A6" Grid.Column="1" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity7" Grid.Row="7" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A7" Grid.Column="1" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity8" Grid.Row="8" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A8" Grid.Column="1" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity9" Grid.Row="9" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A9" Grid.Column="1" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity10" Grid.Row="10" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A10" Grid.Column="1" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60" IsLength="False"
Margin="0,0,0,-2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
Margin="0,0,0,-2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.6*"/>
<ColumnDefinition Width="0.6*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.6*"/>
<ColumnDefinition Width="0.6*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
</Grid.RowDefinitions>
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
Text="Offset"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
Text="Offset"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
Width="85" Height="30"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
Text="Offset2"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
Grid.Column="2" Grid.Row="12"
Width="40" Height="30" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
Grid.Column="3" Grid.Row="12"
Width="40" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</UniformGrid>
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
Text="Offset2"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
Grid.Column="2" Grid.Row="12"
Width="40" Height="30" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
Grid.Column="3" Grid.Row="12"
Width="40" Height="30"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</UniformGrid>
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
Text="Affondamento"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
Text="Affondamento"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
Text="Accorciamento"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
Text="Angolo"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
Margin="0,0,0,-2"
Width="85" Height="30" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
Text="Accorciamento"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
Text="Angolo"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
Margin="0,0,0,-2"
Width="85" Height="30" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
</Grid>
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="11" Width="90"
+252 -44
View File
@@ -51,10 +51,10 @@ Public Class SideAngleUC
' Imposto messaggi a fondo pagina
If m_Mode <> ModeOpt.SIDEANGLE Then
Parameter1TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset2
Parameter3TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
Parameter4TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 12) ' Accorciamento
Parameter1TxBl.Text = EgtMsg(90460) ' Offset
Parameter2TxBl.Text = EgtMsg(90466) ' Offset2
Parameter3TxBl.Text = EgtMsg(90461) ' Affondamento
Parameter4TxBl.Text = EgtMsg(90462) ' Accorciamento
End If
If m_CallingPage = MainWindow.Pages.Draw Then
@@ -145,7 +145,7 @@ Public Class SideAngleUC
' Accorciamento
If m_Mode = ModeOpt.ENGRAVE Then
' modifico il nome del messaggio
Parameter4TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2" ' Affondamento2
Parameter4TxBl.Text = EgtMsg(90461) & "2" ' Affondamento2
Parameter4TxBl.Visibility = Windows.Visibility.Visible
Parameter4TxBx.Visibility = Windows.Visibility.Visible
Else
@@ -156,7 +156,7 @@ Public Class SideAngleUC
' Angolo
If m_Mode = ModeOpt.ENGRAVE Then
' modifico il nome del messaggio
Parameter5TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
Parameter5TxBl.Text = EgtMsg(90459) ' Angolo
Parameter5TxBl.Visibility = Windows.Visibility.Visible
Parameter5TxBx.Visibility = Windows.Visibility.Visible
Else
@@ -167,29 +167,65 @@ Public Class SideAngleUC
End If
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
TxBlChBxView()
' Controllo se la checkbox SideAngle è attiva
If SideAngleChBx.IsChecked Then
Dim dSideAngle As Double = 0
Dim dHell As Double = 0
' Controllo se l'angolo della nuova entità non è nullo
If Not String.IsNullOrEmpty(NewA1TxBx.Text) Then
StringToDouble(NewA1TxBx.Text, dSideAngle)
' Controllo se l'angolo è diverso da 0
If dSideAngle <> 0 Then
' Aggiorno l'angolo delle entità
UpdateSideAngleAllEntities()
End If
End If
' Controllo se il tallone della nuova entità non è nullo
If Not String.IsNullOrEmpty(NewH1TxBx.Text) Then
StringToDouble(NewH1TxBx.Text, dHell)
' Controllo se il tallone è maggiore di 0
If dHell > 0 Then
' Aggiorno il tallone delle entità
UpdateHeelAllEntities()
End If
End If
' Elimino le righe per riposizionarle
Dim nMyShow = Math.Max( m_nShow, 1)
Grid.SetRow(NewEntity, MAX_LINES - nMyShow + 1)
Grid.SetRow(NewA1TxBx, MAX_LINES - nMyShow + 1)
Grid.SetRow(NewH1TxBx, MAX_LINES - nMyShow + 1)
Grid.SetRow(SideAngleBl, MAX_LINES - nMyShow)
Grid.SetRow(HeelBl, MAX_LINES - nMyShow)
Grid.SetRow(SideAngleGrid, MAX_LINES - nMyShow)
' Rendo visibile solo la nuova entità
CollapsedCheckAllTextSideAng()
Else
' Altrimenti eseguo impaginazione classica
TxBlChBxView()
End If
' Aggiorno valori
If m_Mode = ModeOpt.DRIP Then
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
m_dDripShort = GetPrivateProfileDouble( S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
Parameter2TxBx.Text = LenToString( m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
Parameter4TxBx.Text = LenToString( m_dDripShort, 3)
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
m_dDripOffset2 = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
m_dDripShort = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
Parameter2TxBx.Text = LenToString(m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
Parameter4TxBx.Text = LenToString(m_dDripShort, 3)
ElseIf m_Mode = ModeOpt.ENGRAVE Then
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET, 20, m_MainWindow.GetIniFile())
m_nEngrNbr2 = GetPrivateProfileInt( S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEOFFSET, 20, m_MainWindow.GetIniFile())
m_nEngrNbr2 = GetPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
m_dDripOffset2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, m_MainWindow.GetIniFile())
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
Parameter2bTxBx.Text = LenToString(m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
End If
@@ -288,10 +324,10 @@ Public Class SideAngleUC
If LoopId <> GDB_ID.NULL Then
If m_nCount = 0 Then
If m_CallingPage = MainWindow.Pages.Draw Then
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(90387) ' Non ci sono lati modificabili
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
Else
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(90387) ' Non ci sono lati modificabili
m_MainWindow.m_ImportPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
End If
Else
@@ -311,8 +347,14 @@ Public Class SideAngleUC
' Attualmente il vaore m_nCount è inizializzato ad "1"..
' Bottoni Prev Next
If m_nCount <= MAX_LINES Then
PrevBtn.Visibility= Windows.Visibility.Hidden
NextBtn.Visibility= Windows.Visibility.Hidden
PrevBtn.Visibility = Windows.Visibility.Hidden
NextBtn.Visibility = Windows.Visibility.Hidden
SideAngleChBx.Visibility = Windows.Visibility.Hidden
NewEntity.Visibility = Windows.Visibility.Hidden
NewA1.Visibility = Windows.Visibility.Hidden
NewA1TxBx.Visibility = Windows.Visibility.Hidden
NewH1TxBx.Visibility = Windows.Visibility.Hidden
Else
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
PrevBtn.Visibility = Windows.Visibility.Visible
@@ -320,6 +362,8 @@ Public Class SideAngleUC
Grid.SetRow(NextBtn, MAX_LINES - m_nShow)
NextBtn.Visibility = Windows.Visibility.Visible
NextBtn.IsEnabled = (m_nCount > m_nCurrPage * MAX_LINES)
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
SideAngleChBx.Visibility = Windows.Visibility.Visible
End If
' Intestazione per angoli di lato
@@ -335,6 +379,8 @@ Public Class SideAngleUC
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
HeelBl.Text = EgtMsg(91654) ' T
HeelBl.Visibility = Windows.Visibility.Visible
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
SideAngleChBx.Visibility = Windows.Visibility.Visible
End If
Else
If m_nCount = 0 Then
@@ -371,7 +417,7 @@ Public Class SideAngleUC
GetHeelTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_End", 0, m_MainWindow.GetIniFile())
End If
End If
Dim TxBlIndex As Integer = (m_nCurrPage - 1) * MAX_LINES + nI - 1
Dim TxBlIndex As Integer = (m_nCurrPage - 1) * MAX_LINES + nI - 1
GetTxBlFromIndex(Index).Text = If(m_Mode = ModeOpt.SIDEANGLE,
m_SideAngleEntityList(TxBlIndex).sEntityName,
m_DripEntityList(TxBlIndex).sEntityName)
@@ -391,6 +437,151 @@ Public Class SideAngleUC
Next
End Sub
Private Sub CheckedSideAngle() Handles SideAngleChBx.Checked
Grid.SetRow(NewEntity, MAX_LINES - m_nShow + 1)
Grid.SetRow(NewA1TxBx, MAX_LINES - m_nShow + 1)
Grid.SetRow(NewH1TxBx, MAX_LINES - m_nShow + 1)
' Se interrompo la creazione di un unico SideAng
If Not GetSideAngleFromAllEntities() Then Return
CollapsedCheckAllTextSideAng()
End Sub
' Rende visibile NewEntity quando si attiva la spunta sulla checkbox
Private Sub CollapsedCheckAllTextSideAng()
NewEntity.Text = "A#"
PrevBtn.Visibility = Visibility.Collapsed
NextBtn.Visibility = Visibility.Collapsed
NewEntity.Visibility = Visibility.Visible
NewA1TxBx.Visibility = Visibility.Visible
NewH1TxBx.Visibility = Visibility.Visible
Entity1.Visibility = Visibility.Collapsed
A1TxBx.Visibility = Visibility.Collapsed
H1TxBx.Visibility = Visibility.Collapsed
Entity2.Visibility = Visibility.Collapsed
A2TxBx.Visibility = Visibility.Collapsed
H2TxBx.Visibility = Visibility.Collapsed
Entity3.Visibility = Visibility.Collapsed
A3TxBx.Visibility = Visibility.Collapsed
H3TxBx.Visibility = Visibility.Collapsed
Entity4.Visibility = Visibility.Collapsed
A4TxBx.Visibility = Visibility.Collapsed
H4TxBx.Visibility = Visibility.Collapsed
Entity5.Visibility = Visibility.Collapsed
A5TxBx.Visibility = Visibility.Collapsed
H5TxBx.Visibility = Visibility.Collapsed
Entity6.Visibility = Visibility.Collapsed
A6TxBx.Visibility = Visibility.Collapsed
H6TxBx.Visibility = Visibility.Collapsed
Entity7.Visibility = Visibility.Collapsed
A7TxBx.Visibility = Visibility.Collapsed
H7TxBx.Visibility = Visibility.Collapsed
Entity8.Visibility = Visibility.Collapsed
A8TxBx.Visibility = Visibility.Collapsed
H8TxBx.Visibility = Visibility.Collapsed
Entity9.Visibility = Visibility.Collapsed
A9TxBx.Visibility = Visibility.Collapsed
H9TxBx.Visibility = Visibility.Collapsed
Entity10.Visibility = Visibility.Collapsed
A10TxBx.Visibility = Visibility.Collapsed
H10TxBx.Visibility = Visibility.Collapsed
End Sub
Private Sub UnCheckSideAngle() Handles SideAngleChBx.Unchecked
NewEntity.Visibility = Visibility.Collapsed
NewA1TxBx.Visibility = Visibility.Collapsed
NewH1TxBx.Visibility = Visibility.Collapsed
TxBlChBxView()
RefreshCheckAndValue()
End Sub
Private Function GetSideAngleFromAllEntities() As Boolean
Dim tmpSideAngleList As New List(Of Double)
tmpSideAngleList.Clear()
Dim tmpSideHeelList As New List(Of Double)
tmpSideHeelList.Clear()
Dim m_SideAngleOneForAllWindow As New SideAngleOneForAllWindow
For i As Integer = 0 To m_SideAngleEntityList.Count - 1
If Not tmpSideAngleList.Contains(m_SideAngleEntityList(i).dSideAngle) Then
tmpSideAngleList.Add(m_SideAngleEntityList(i).dSideAngle)
End If
If Not tmpSideHeelList.Contains(m_SideAngleEntityList(i).dSideHeel) Then
tmpSideHeelList.Add(m_SideAngleEntityList(i).dSideHeel)
End If
Next
NewA1TxBx.Text = DoubleToString(tmpSideAngleList(0), 2)
NewH1TxBx.Text = LenToString(tmpSideHeelList(0), 2)
If tmpSideAngleList.Count > 1 Or tmpSideHeelList.Count > 1 Then
m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.ItemsSource = tmpSideAngleList
m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.SelectedIndex = 0
m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.ItemsSource = tmpSideHeelList
m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.SelectedIndex = 0
m_SideAngleOneForAllWindow.ShowDialog()
If m_SideAngleOneForAllWindow.DialogResult Then
NewA1TxBx.Text = DoubleToString(m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.SelectedItem, 2)
NewH1TxBx.Text = LenToString(m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.SelectedItem, 2)
UpdateSideAngleAllEntities()
UpdateHeelAllEntities()
Else
SideAngleChBx.IsChecked = False
Return False
End If
End If
Return True
End Function
Private Sub UpdateHeelAllEntities()
' Nuovo tallone
Dim dSideHeel As Double
StringToLen(NewH1TxBx.Text, dSideHeel)
' Verifico stia nei limiti
If dSideHeel < 0 Then
dSideHeel = 0
NewH1TxBx.Text = "0"
End If
For Each Entity As SideAngleEntity In m_SideAngleEntityList
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideHeel(Entity.sEntityName, dSideHeel)
' Aggiorno tutti i testi
RefreshSideAngleText()
Next
End Sub
Private Sub UpdateSideAngleAllEntities()
' Nuovo angolo di inclinazione
Dim dSideAngle As Double
StringToDouble(NewA1TxBx.Text, dSideAngle)
' Verifico stia nei limiti
If dSideAngle < -m_dMaxSideAng Then
dSideAngle = -m_dMaxSideAng
NewA1TxBx.Text = DoubleToString(dSideAngle, 2)
ElseIf dSideAngle > m_dMaxSideAng Then
dSideAngle = m_dMaxSideAng
NewA1TxBx.Text = DoubleToString(dSideAngle, 2)
End If
For Each Entity As SideAngleEntity In m_SideAngleEntityList
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideAngle(Entity.sEntityName, dSideAngle)
' Aggiorno tutti i testi
RefreshSideAngleText()
Next
End Sub
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
Private Function GetChBxFromIndex(Index As Integer) As CheckBox
@@ -495,15 +686,15 @@ Public Class SideAngleUC
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
' quando esco salvo nel file l'ultima configurazione per le incisioni
Private Sub SideAngleUC_Unloaded( sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
Private Sub SideAngleUC_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
If m_CallingPage = MainWindow.Pages.Draw Then
' Ricavo nome pezzo
Dim PartId As Integer = EgtGetFirstInGroup( GDB_ID.ROOT)
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
' Svuoto layer in cui sono presenti i testi con le inclinazioni dei lati
If m_Mode = ModeOpt.SIDEANGLE Then
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
Else
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
End If
ElseIf m_CallingPage = MainWindow.Pages.Import Then
' Nessuna azione necessaria
@@ -516,7 +707,7 @@ Public Class SideAngleUC
'WritePrivateProfileString( S_SIDES, K_DRIPSHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
ElseIf m_Mode = ModeOpt.ENGRAVE Then
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
@@ -527,7 +718,6 @@ Public Class SideAngleUC
EgtDraw()
End Sub
' aggiunge il messaggio nel disegno, se DripGeom creo la geometria
Private Sub RefreshSideAngleText()
Dim PartId As Integer = GDB_ID.NULL
@@ -538,7 +728,7 @@ Public Class SideAngleUC
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
ElseIf m_CallingPage = MainWindow.Pages.Import Then
ElseIf m_CallingPage = MainWindow.Pages.Import Then
' Imposto contesto corrente
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
' Recupero nome pezzo
@@ -600,7 +790,7 @@ Public Class SideAngleUC
For nIndex As Integer = 1 To m_nCount
Dim Entity As DripEntity = m_DripEntityList(nIndex - 1)
' Imposto check box (se sono stati definiti il numero corretto di CheckBox
If nIndex < ( m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
If nIndex < (m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
Dim nChIndex As Integer = nIndex - (m_nCurrPage - 1) * MAX_LINES + MAX_LINES - m_nShow
' verifico se l'entità ha un gocciolatoio
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
@@ -759,7 +949,7 @@ Public Class SideAngleUC
End If
End Sub
' nuova funzione per gestire l'accorcaimento dei segmenti
' nuova funzione per gestire l'accorciamento dei segmenti
Friend Sub CreateDripGeom(nPartId As Integer)
' Recupero Id layer di contorno esterno
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
@@ -956,7 +1146,7 @@ Public Class SideAngleUC
EgtStartVector(nCrvId, vtAux)
Dim vtExtrusion As Vector3d
EgtCurveExtrusion(nCrvId, vtExtrusion)
' ruoto il vetottore nella nuova direzione
' ruoto il vettore nella nuova direzione
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
@@ -973,15 +1163,15 @@ Public Class SideAngleUC
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
If m_nCurrPage = 1 Then Return
m_nCurrPage -= 1
m_nShow = Math.Min( m_nCount - ( m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
m_nShow = Math.Min(m_nCount - (m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
TxBlChBxView()
RefreshCheckAndValue()
End Sub
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
If m_nCount <= ( m_nCurrPage - 1) * MAX_LINES Then Return
If m_nCount <= (m_nCurrPage - 1) * MAX_LINES Then Return
m_nCurrPage += 1
m_nShow = Math.Min( m_nCount - ( m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
m_nShow = Math.Min(m_nCount - (m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
TxBlChBxView()
RefreshCheckAndValue()
End Sub
@@ -993,7 +1183,7 @@ Public Class SideAngleUC
Dim bVal As Boolean = CurrCheckBox.IsChecked()
Dim SideIndex As Integer = CInt(CurrCheckBox.Name.Substring(1))
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
Dim sCurrSide As String = m_DripEntityList(nCurrSide - 1).sEntityName
' aggiorno l'entità con i valori scritti nel campo di testo
Dim CurrEntity As DripEntity = DripEntity.FindEntity(sCurrSide)
@@ -1179,6 +1369,19 @@ Public Class SideAngleUC
End If
End Sub
'-------> riga nuova
Private Sub NewA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles NewA1TxBx.EgtClosed
If m_Mode = ModeOpt.SIDEANGLE Then
UpdateSideAngleAllEntities()
End If
End Sub
Private Sub NewH1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles NewH1TxBx.EgtClosed
If m_Mode = ModeOpt.SIDEANGLE Then
UpdateHeelAllEntities()
End If
End Sub
Private Sub SetSideAngleFromTxBx(SideIndex As Integer, AngleTxBx As EgtWPFLib.EgtTextBox)
' Nuovo angolo di inclinazione
Dim dSideAngle As Double
@@ -1192,7 +1395,7 @@ Public Class SideAngleUC
AngleTxBx.Text = DoubleToString(dSideAngle, 2)
End If
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideAngle(sCurrSide, dSideAngle)
@@ -1262,7 +1465,7 @@ Public Class SideAngleUC
HeelTxBx.Text = "0"
End If
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideHeel(sCurrSide, dSideHeel)
@@ -1303,10 +1506,15 @@ Public Class SideAngleUC
If dSideAngle <> 0 Then
EgtSetInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE, dSideAngle)
EgtSetInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE, dSideAngle)
' Cancello inclinazione nell'apposito campo info
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
If Not String.IsNullOrEmpty(sSawingTilted) And m_MainWindow.m_CurrentMachine.bApplySawingTilted Then
EgtSetInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED, sSawingTilted)
End If
' Cancello inclinazione nell'apposito campo info
Else
EgtRemoveInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE)
EgtRemoveInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE)
EgtRemoveInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED)
End If
' Aggiorno lista entità con nuova inclinazione
CurrEntity.dSideAngle = dSideAngle
@@ -1324,7 +1532,7 @@ Public Class SideAngleUC
' Scrivo nuovo tallone nelle info
If dSideHeel > 10 * EPS_SMALL Then
EgtSetInfo(CurrEntity.nGeomId, INFO_HEEL, dSideHeel)
' Cancello inclinazione nell'apposito campo info
' Cancello inclinazione nell'apposito campo info
Else
EgtRemoveInfo(CurrEntity.nGeomId, INFO_HEEL)
End If
+10 -10
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="UnderDrillUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.1" d:DesignWidth="255.9">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="597.1" d:DesignWidth="255.9">
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
@@ -31,10 +31,10 @@
</Grid.RowDefinitions>
<TextBlock Name="Parameter2TxBl" Grid.Row="11" Text="Affondamento"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
+1 -1
View File
@@ -21,7 +21,7 @@ Public Class UnderDrillUC
m_CallingPage = m_MainWindow.m_ActivePage
' Imposto messaggi
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
Parameter2TxBl.Text = EgtMsg(90461) ' Affondamento
' Imposto contesto corrente
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
+136 -137
View File
@@ -7,41 +7,41 @@
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
<!--Colori predefiniti-->
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
<!--Colori predefiniti-->
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
<!--Template che permette di andare a capo-->
<!--Template che permette di andare a capo-->
<DataTemplate x:Key="Button_DataTemplate_Wrap">
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
</DataTemplate>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- Button Style -->
<!-- Button Style -->
<Style TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle">
@@ -69,10 +69,10 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}" >
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Project:ButtonExtensions.CornerRadius)}"
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="True">
@@ -103,44 +103,44 @@
</Setter>
</Style>
<!--Template che permette di andare a capo-->
<DataTemplate x:Key="WrapButton_DataTemplate">
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
</DataTemplate>
<!--Template che permette di andare a capo-->
<DataTemplate x:Key="WrapButton_DataTemplate">
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
</DataTemplate>
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
</Style>
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="80"/>
</Style>
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="60"/>
<Setter Property="Width" Value="60"/>
</Style>
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
</Style>
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
<Setter Property="Height" Value="45"/>
</Style>
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="60"/>
<Setter Property="Width" Value="60"/>
</Style>
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="40"/>
</Style>
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="60"/>
</Style>
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
</Style>
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="80"/>
</Style>
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="60"/>
<Setter Property="Width" Value="60"/>
</Style>
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
</Style>
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
<Setter Property="Height" Value="45"/>
</Style>
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="60"/>
<Setter Property="Width" Value="60"/>
</Style>
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="40"/>
</Style>
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="60"/>
</Style>
<!-- ______________________________________________________________________________________________________________________ -->
<!-- ______________________________________________________________________________________________________________________ -->
<!--Template che permette di andare a capo-->
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
@@ -178,10 +178,10 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="checkBoxBorder" Height="{Binding Path=ActualHeight, ElementName=templateRoot}" Width="{Binding Path=ActualHeight, ElementName=templateRoot}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid x:Name="markGrid">
<Path x:Name="optionMark" Data="F1M9.97498,1.22334L4.6983,9.09834 4.52164,9.09834 0,5.19331 1.27664,3.52165 4.255,6.08833 8.33331,1.52588E-05 9.97498,1.22334z" Fill="#FF212121" Margin="1" Opacity="0" Stretch="None"
RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform>
@@ -194,7 +194,6 @@
<ScaleTransform.ScaleY>
<MultiBinding Converter="{StaticResource converter}">
<Binding ElementName="templateRoot" Path="ActualHeight"/>
<Binding ElementName="optionMark" Path="ActualHeight"/>
</MultiBinding>
</ScaleTransform.ScaleY>
@@ -206,7 +205,7 @@
</Grid>
</Border>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasContent" Value="True">
@@ -412,7 +411,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(ControlExtensions:ToggleButtonExtensions.CornerRadius)}"
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
@@ -428,7 +427,7 @@
<Setter Property="Background" TargetName="border" Value="#FFC4E5F6"/>
<Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
</Trigger>-->
<!--Commentato per poter gestire il colore di evidenziazione direttamente nello Style del ToggleButton-->
<!--Commentato per poter gestire il colore di evidenziazione direttamente nello Style del ToggleButton-->
<!--<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
<Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
@@ -444,59 +443,59 @@
</Setter>
</Style>
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
</Style>
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
</Style>
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="70"/>
</Style>
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="70"/>
</Style>
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
</Style>
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
</Style>
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="60"/>
<Setter Property="Width" Value="60"/>
</Style>
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="60"/>
<Setter Property="Width" Value="60"/>
</Style>
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="40"/>
</Style>
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="40"/>
</Style>
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="Height" Value="40"/>
</Style>
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="Height" Value="40"/>
</Style>
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFB8C3CD"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="OpacityMask" Value="#33FF0000"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter Property="Background" Value="Transparent"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#FFF4F4F4"/>
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFB8C3CD"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="OpacityMask" Value="#33FF0000"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter Property="Background" Value="Transparent"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#FFF4F4F4"/>
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- ______________________________________________________________________________________________________________________ -->
<!-- ______________________________________________________________________________________________________________________ -->
<!--TreeViewBase-->
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
@@ -552,32 +551,32 @@
</Setter>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- EgtCustomWindow -->
<!-- EgtCustomWindow -->
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
<Setter Property="TitleBarHeight" Value="32"/>
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
</Style>
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
<Setter Property="TitleBarHeight" Value="32"/>
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- EgtFloatingPanel -->
<!-- EgtFloatingPanel -->
<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
</Style>
<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
</Style>
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
<Setter Property="IsToolBar" Value="False"/>
<Setter Property="TitleBarOrientation" Value="Vertical"/>
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
</Style>
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
<Setter Property="IsToolBar" Value="False"/>
<Setter Property="TitleBarOrientation" Value="Vertical"/>
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
</Style>
<!-- ______________________________________________________________________________________________________________________ -->
<!-- ______________________________________________________________________________________________________________________ -->
</ResourceDictionary>

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