Compare commits

...

106 Commits

Author SHA1 Message Date
NicolaP 7ccb7fb96f Correzione Import/Export per utensili e lavorazioni 2021-12-23 12:13:16 +01:00
NicolaP 9a751d0524 Costruzione finestra Import/Export per Machining 2021-12-22 11:11:50 +01:00
NicolaP 58c00878a8 Merge branch 'Features/Comandi_Siemens' 2021-12-15 19:02:10 +01:00
NicolaP 992686a5a2 Correzione funzionamento per macchina Siemens 2021-12-15 19:01:23 +01:00
NicolaP 5b2b39789d Commento esecuzione comando lettura ActiveMode 2021-12-15 12:58:13 +01:00
NicolaP ad74579ee6 Merge branch 'release/AlzatineFrontalini' 2021-12-02 15:50:45 +01:00
NicolaP f3f9db7bb7 Correzione SingleDrill per cambio utensile automatico 2021-12-02 15:46:25 +01:00
NicolaP 2900aa98f8 Merge remote-tracking branch 'origin/develop' into release/AlzatineFrontalini 2021-11-29 15:11:19 +01:00
SaraP 153374cd5d correzione gestione texture alzatine e frontalini 2021-11-29 15:08:55 +01:00
NicolaP 1076abd8de Merge branch 'master' into release/AlzatineFrontalini 2021-11-25 14:33:03 +01:00
NicolaP 0e260a570e Correzione configurazione linea di produzione. 2021-11-24 18:11:38 +01:00
NicolaP 59176a1269 Modifica versione 2.3k5 2021-11-22 19:12:51 +01:00
NicolaP 2e2de2ade4 Correzione aggiuna Incisioni 2021-11-22 19:11:45 +01:00
NicolaP b6f19b04cb GHestione Kerf negativo 2021-11-22 19:11:06 +01:00
NicolaP 7289e84d7b Scrittura dei messaggi nel file dei messaggi 2021-11-18 18:08:35 +01:00
NicolaP c5757cb3c7 Merge commit '311f6fca992ee31e37e2e2771bb2d8a5d64a9c26' into release/AlzatineFrontalini 2021-11-17 10:29:14 +01:00
DarioS 311f6fca99 OmagCUT 2.3k4 :
- cambiata effettivamente la versione del programma.
2021-11-16 13:49:58 +01:00
Emmanuele Sassi 0efe5b51e4 - Gestione casi che davano eccezione su macchina 2021-11-16 13:34:35 +01:00
NicolaP 38bf52893b Merge commit '09e8c0f6b4b124387e0f60f3a8ff67f18b36965e' into release/AlzatineFrontalini 2021-11-11 17:53:47 +01:00
NicolaP d4b49699c8 Migliorato gestione dei lati per alette 2021-11-11 17:53:03 +01:00
SaraP 09e8c0f6b4 - aggiunto disegno 3D piani cucina
- correzione errori nella gestione texture per disegno 3D
- migliorie disegno 3D alette.
2021-11-11 15:07:18 +01:00
NicolaP 03fdc33be0 Merge branch 'master' into develop 2021-11-10 18:59:37 +01:00
NicolaP 50c3eac8fe Merge remote-tracking branch 'origin/master' 2021-11-10 18:51:53 +01:00
NicolaP 004258a469 Gestione delle alzatine come per i tagli inclinati 2021-11-10 18:51:03 +01:00
NicolaP ce83d8ee49 Correzione scrittura variabili per NUM 2021-11-10 18:50:06 +01:00
DarioS 9db1f5085c OmagCUT 2.3j4 :
- aggiunta possibilità di spostare su seconda tavola con rotazione di 180deg (da Ini Macchina [Table] ChangeTabWD=2)
- aggiunto livello di movimento per split automatico da 1 a 5 fino a 3 passo completo poi metà e un quarto (da Ini [Split] MoveLevel=1...5)
2021-10-26 09:56:18 +02:00
DarioS 49435ba828 OmagCUT 2.3j3 :
- modifiche per assegnare il colore delle regioni anche ai relativi layer
- il colore si assegna alle regioni e non ai testi
- migliorato colore standard pezzo se non trovato nel file ini
- sistemazioni costanti per lettura da file ini.
2021-10-19 17:53:58 +02:00
SaraP 6e963ad6a2 Correzione gestione texture per alette in 3D VeinMatch 2021-10-19 12:00:02 +02:00
NicolaP 4d12d4a129 Correzione CN Siemens 2021-10-18 20:38:18 +02:00
NicolaP c46b7d1aa0 Correzzione/modifica comunicazione Siemens (Ampere,Mode) 2021-10-14 18:45:12 +02:00
NicolaP 08d71ecec2 Correzione visualizzazione dato di Amperaggio 2021-10-14 18:39:37 +02:00
NicolaP 9f4448220e Miogliorata gestione spostamenti grezzi e cambio versione 2021-10-14 10:50:52 +02:00
NicolaP 6117963ac1 Valore di spostamento pezzi pari alla dimensione baffo di taglio 2021-10-13 19:40:41 +02:00
NicolaP 941fa96d03 Correzione sfondo Machining 2021-10-11 14:11:01 +02:00
NicolaP 9f995079e2 Aggiunte icone in interfaccia chiara 2021-10-11 13:03:06 +02:00
SaraP 604f0f744c Aggiunto controllo sulla necessità di eseguire comando 3D nel VeinMatch 2021-10-11 12:57:36 +02:00
SaraP 185cfffe71 Correzione errori disegno 3D alette 2021-10-11 11:19:49 +02:00
DarioS 289c58f867 OmagCUT 2.3 j1 :
- promozione modifiche per fiera
- sistemazione VeinMatching con top cucina da componenti
- gestione anima per lame.
2021-10-10 20:08:04 +02:00
NicolaP 8ee25d6883 Inserita nuova versione Alzatine e frontalini 2021-10-08 19:48:11 +02:00
NicolaP cd946a7353 Gestione parametro Anima nel ToolDB 2021-10-08 18:59:59 +02:00
NicolaP bdefedae39 Cambio colore sfondo per i parametri di lavorazione 2021-10-08 18:11:15 +02:00
NicolaP 2a07343685 Merge commit '6507ef0a97449d014fda85ed7171c12a0eeb8f71' into Features/Demo_Fiera 2021-10-08 16:41:10 +02:00
NicolaP b5ed38e20f Inizio gestione dimensioni utensile STEM e CORE 2021-10-08 16:40:37 +02:00
SaraP 6507ef0a97 Nuova implementazione disegno 3D alette (faccia top fissata) 2021-10-07 17:32:48 +02:00
NicolaP ab33dbcc46 Aggiunte icone in tutte le lavorazioni dirette 2021-10-07 12:18:08 +02:00
NicolaP 17f1bc1b20 Correzione colorazione sfondi bottoni disabilitati 2021-10-07 11:31:55 +02:00
NicolaP 97c99d3114 Inserimento nuove icone per interfaccia Dark e gestione colori pezzi 2021-10-07 09:14:09 +02:00
SaraP cecbacd614 Gestione texture disegno 3D alette 2021-09-30 16:40:18 +02:00
NicolaP 7c8dccfa57 Correzione indentazione 2021-09-29 16:58:25 +02:00
NicolaP fb0436d090 Gestione simulazione linea di produzione 2021-09-29 14:49:03 +02:00
SaraP aa83984a15 Correzione comando import in VeinMatch 2021-09-28 17:06:33 +02:00
SaraP 27feb8a7cc Correzione comando import in VeinMatch 2021-09-28 16:31:30 +02:00
NicolaP 0edda465f1 Inizio correzione comando Import in VeinMatch 2021-09-28 15:42:11 +02:00
NicolaP 8bc2076027 Merge branch 'Gestione_colori_pezzi' into Features/Demo_Fiera 2021-09-28 14:16:22 +02:00
NicolaP 174738f252 Migliorata gestione VeinMatch per alette 2021-09-28 14:08:04 +02:00
NicolaP 9112fb5691 Merge remote-tracking branch 'origin/Features/Alzatine_e_Frontalini' into Gestione_colori_pezzi 2021-09-27 19:15:49 +02:00
NicolaP db608e6c0e Gestione dei colori regioni per importazioni e disegni 2021-09-27 19:15:28 +02:00
SaraP 5ce753e4b7 Correzione errore disegno 3D frontalini 2021-09-27 16:38:06 +02:00
SaraP d7445f828a Aggiunto disegno 3D frontalini (prima implementazione) 2021-09-27 14:54:07 +02:00
NicolaP ca4eb016a5 Disabilito la text per la gestione del DeltaAng delle alzatine 2021-09-27 14:42:43 +02:00
NicolaP ea48c05112 Merge branch 'Features/Esporta_utensile' into Features/Demo_Fiera 2021-09-27 14:24:46 +02:00
NicolaP 3f6e8fbbeb Configurato CycleStart da programma 2021-09-27 13:10:12 +02:00
SaraP e52a56a683 Merge commit 'efba122f14782d61996a2671561103ad6da1cdcf' into Features/Demo_Fiera 2021-09-24 16:13:43 +02:00
SaraP 3d44bbaa5c Disegno 3D alzatine nel VeinMatching 2021-09-24 16:08:53 +02:00
DarioS 5d75e658fb OmagCUT 2.3i4 :
- ricompilazione con cambio versione.
2021-09-24 11:50:42 +02:00
NicolaP fc68efd4f4 Correzione Merge 2021-09-23 20:20:23 +02:00
NicolaP 191a973ee3 Merge remote-tracking branch 'origin/master' into Features/Alzatine_e_Frontalini 2021-09-23 19:46:21 +02:00
NicolaP e3f628a07d Controllo e verifica nuova console 2021-09-23 19:31:07 +02:00
NicolaP 8b57174267 Merge branch 'master' into Features/Esporta_utensile 2021-09-22 10:51:59 +02:00
NicolaP 2035c83062 Correzione errore in VeinMatch 2021-09-22 10:00:14 +02:00
NicolaP 3aa9129acc Correzione spessore 3D 2021-09-22 09:31:32 +02:00
NicolaP 8ccfda96f8 Merge branch 'Features/Alzatine_e_Frontalini' of https://gitlab.steamware.net/egaltech/OmagCUT into Features/Alzatine_e_Frontalini 2021-09-22 09:24:00 +02:00
NicolaP 8a67feab0f Aggiunto spessore per generazione 3D 2021-09-22 09:20:15 +02:00
NicolaP f76d91fc20 Merge remote-tracking branch 'origin/HEAD' 2021-09-22 08:35:46 +02:00
SaraP 00f30c943c Traslazioni e rotazioni per 3D VeinMatching 2021-09-21 08:43:08 +02:00
NicolaP c2d150b402 Gestione oggetti per 3D VeinMatching 2021-09-20 14:57:36 +02:00
NicolaP efba122f14 Creazione pagina di ImportExport 2021-09-16 20:32:31 +02:00
NicolaP ed19ade967 Creazione dei comandi per importare ed esportare gli utensili 2021-09-16 14:36:11 +02:00
NicolaP 6a894e9d33 Gestione lavorazione diretta con foretto 2021-09-16 11:42:23 +02:00
NicolaP 97b78f584a Creazione pagina per lavorazione diretta con Foretto 2021-09-15 19:38:56 +02:00
NicolaP 80857bb4e1 Inserito comando £D per gestire l'assemblato del piano cucina 2021-09-15 15:25:37 +02:00
NicolaP 584a635ff4 Merge branch 'master' into Features/Alzatine_e_Frontalini 2021-09-15 15:02:31 +02:00
NicolaP 01e0fa3a9c Inserisco nel VienMath i disegni dei pezzi 2021-09-15 12:46:38 +02:00
NicolaP eb3d3c8af9 Gestione lavorazione arco approssimato 2021-09-09 19:53:35 +02:00
NicolaP 5e0db28b31 Merge commit 'd4141d142378fe0abdfc5a9a8cda9af73563af0d' into Features/Alzatine_e_Frontalini 2021-09-09 15:22:27 +02:00
NicolaP 1af5f6789f Importazione deelle alette nel progetto 2021-09-08 20:03:22 +02:00
NicolaP 403a3ae648 Correzione nuovi avvio programma 2021-09-06 19:55:21 +02:00
NicolaP cc1cd85b58 Merge branch 'master' into Features/Alzatine_e_Frontalini 2021-09-06 11:25:50 +02:00
NicolaP 575ce93877 Inserita costante per gestione ThreadSleep 2021-09-06 10:04:55 +02:00
NicolaP 1ec369dc5f Inserita gestione avvio del programma e immagini 2021-09-06 10:02:10 +02:00
NicolaP 47ab815e80 Aggiunte immagini inviate da OMAG 2021-09-06 10:00:44 +02:00
NicolaP c6482d0f53 Fix: variabili non inizializzate 2021-09-01 16:31:35 +02:00
NicolaP 489b50b45b Merge branch 'Features/Selezione_avvio' into Features/Alzatine_e_Frontalini 2021-09-01 16:30:20 +02:00
NicolaP baa39cf299 Gestione lavorazioni dalla pagina CurrProject 2021-09-01 16:13:38 +02:00
NicolaP 84d10074d0 Merge commit '9e1b7da21effa21289de8025055a6e7e8bff5551' into Features/Alzatine_e_Frontalini 2021-08-11 14:31:46 +02:00
NicolaP 4d09bd0fd5 Merge commit 'ddab78b62054faa02a0bca229322dc903c03dc19' into Features/Alzatine_e_Frontalini 2021-08-09 11:33:38 +02:00
NicolaP 290db84246 Disabilito bottoni per incisini e tagli inclinati 2021-07-19 14:53:25 +02:00
NicolaP 23c14b1bb6 Merge branch 'Features/Semplificazione_selezione_lavorazioni' into Features/Alzatine_e_Frontalini 2021-07-19 12:40:04 +02:00
NicolaP ddb7c9e7f4 Selezione delle lavorazioni dalla pagina progetto 2021-07-19 12:39:33 +02:00
NicolaP c2621a49bb Merge branch 'Features/Svuotature' into Features/Alzatine_e_Frontalini 2021-06-24 13:13:28 +02:00
Nicola Pievani 27015dd589 Correzione comunicazione punto per Test Check Up 2021-05-31 18:50:35 +02:00
Nicola Pievani ff3cac4fe9 Merge branch 'master' into Features/Selezione_avvio 2021-05-27 19:43:12 +02:00
Nicola Pievani 4ded60f9f7 Merge branch 'Features/Conferma_Ciclo_Start' into develop 2021-05-13 17:25:43 +02:00
Nicola Pievani 9e830bf2a5 Finestra conferma Ciclo Start 2021-05-13 17:23:56 +02:00
Nicola Pievani 1c84885a44 Miglioramento grafica 2021-05-13 17:21:53 +02:00
Nicola Pievani f2694511e5 Modalità di avvio in OptioPage 2021-05-13 14:25:20 +02:00
141 changed files with 4575 additions and 690 deletions
+3 -1
View File
@@ -94,7 +94,9 @@ Public Class MoveRawPartPage
End If End If
' Carico i parametri di movimento ' Carico i parametri di movimento
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile()) m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
StepMoveTxBx.Text = LenToString(m_dStep, 3) ' Ricavo la lunghezza del baffo di taglio
m_dStep = SplitAuto.MaxCuttingMustache(m_dStep)
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+1"
m_dRotation = GetPrivateProfileDouble(S_RAWMOVE, K_RAWROTATION, 30, m_MainWindow.GetIniFile()) m_dRotation = GetPrivateProfileDouble(S_RAWMOVE, K_RAWROTATION, 30, m_MainWindow.GetIniFile())
RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3) RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3)
' Se movimento manuale perpendicolare ' Se movimento manuale perpendicolare
+17 -8
View File
@@ -101,16 +101,25 @@
</Button> </Button>
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" > <UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/> <Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/> <Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</UniformGrid> </Button>
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</UniformGrid>
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6" <Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/> <Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" > <UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/> <Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/> <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>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
+72 -13
View File
@@ -56,11 +56,11 @@ Public Class NestPageUC
Private Sub NestPage_Initialized(sender As Object, e As EventArgs) Private Sub NestPage_Initialized(sender As Object, e As EventArgs)
' Imposto i messaggi letti dal file dei messaggi ' Imposto i messaggi letti dal file dei messaggi
InsertPartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo InsertPartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo
StorePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo StorePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo
RemovePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo RemovePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
SelectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
DeselectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
End Sub End Sub
Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs) Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs)
@@ -214,9 +214,9 @@ Public Class NestPageUC
Else Else
' verifico se l'elemento selezionato è il nome della tavola ' verifico se l'elemento selezionato è il nome della tavola
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then
Dim nTab As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable() Dim nRes As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
' se non è stata eseguita nessuna scelta esco dal ciclo ' se non è stata eseguita nessuna scelta esco dal ciclo
If nTab = 0 Then Exit While If nRes = 0 Then Exit While
' imposto l'altra tavola ' imposto l'altra tavola
Dim sOtherTab = If( sNamePartId = MAIN_TAB, SECOND_TAB, MAIN_TAB) Dim sOtherTab = If( sNamePartId = MAIN_TAB, SECOND_TAB, MAIN_TAB)
EgtChangeTable( sOtherTab, True) EgtChangeTable( sOtherTab, True)
@@ -241,6 +241,49 @@ Public Class NestPageUC
PackPartInStore(nPPId) PackPartInStore(nPPId)
nPPId = EgtGetNextPart( nPPId) nPPId = EgtGetNextPart( nPPId)
End While End While
' se prevista rotazione
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 2 Then
' Dati tavola
Dim b3Tab As New BBox3d
EgtGetTableArea( 1, b3Tab)
' Box lastra
Dim b3OrigRaw As New BBox3d
GetRawBox( b3OrigRaw)
' Allargo i limiti della tavola in tutte le fasi
Const TAB_OFFS As Double = 3000
For nI As Integer = 1 To EgtGetPhaseCount()
EgtSetCurrPhase(nI)
EgtSetTableAreaOffset( TAB_OFFS, TAB_OFFS, TAB_OFFS, TAB_OFFS)
Next
EgtSetCurrPhase(1)
' Rotazione
Dim dAngRot As Double = If(sOtherTab = SECOND_TAB, 180, -180)
if Not RotateAllRawParts(dAngRot, False) Then
m_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
End If
' Traslazione per riportare la lastra nella stessa posizione rispetto all'angolo BL che diveta TR e viceversa
Dim b3Raw As New BBox3d
GetRawBox( b3Raw)
Dim vtMove As Vector3d
If sOtherTab = SECOND_TAB Then
Dim vtDiffIni As Vector3d = b3OrigRaw.Min() - b3Tab.Min()
Dim vtDiffFin As Vector3d = b3Tab.Max() - b3Raw.Max()
vtMove = vtDiffFin - vtDiffIni
Else
Dim vtDiffIni As Vector3d = b3Tab.Max() - b3OrigRaw.Max()
Dim vtDiffFin As Vector3d = b3Raw.Min() - b3Tab.Min()
vtMove = -( vtDiffFin - vtDiffIni)
End If
vtMove.z = 0
MoveAllRawParts(vtMove)
' Ripristino i limiti della tavola in tutte le fasi
For nI As Integer = 1 To EgtGetPhaseCount()
EgtSetCurrPhase(nI)
EgtSetTableAreaOffset( 0, 0, 0, 0)
Next
EgtSetCurrPhase(1)
HideAllMachinings()
End If
' visualizzazione ' visualizzazione
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
Exit While Exit While
@@ -669,7 +712,7 @@ Public Class NestPageUC
nId = EgtGetNextSelectedObj() nId = EgtGetNextSelectedObj()
End While End While
Else Else
RotateAllRawParts(m_dRegAngStep) UserRotateAllRawParts(m_dRegAngStep)
EgtDraw() EgtDraw()
End If End If
End Sub End Sub
@@ -687,7 +730,7 @@ Public Class NestPageUC
nId = EgtGetNextSelectedObj() nId = EgtGetNextSelectedObj()
End While End While
Else Else
RotateAllRawParts(-m_dRegAngStep) UserRotateAllRawParts(-m_dRegAngStep)
EgtDraw() EgtDraw()
End If End If
End Sub End Sub
@@ -739,7 +782,7 @@ Public Class NestPageUC
End If End If
End Function End Function
Private Sub RotateAllRawParts(dAngDeg As Double) Private Sub UserRotateAllRawParts(dAngDeg As Double)
' Recupero rotazione totale ' Recupero rotazione totale
Dim dRegRot As Double = GetRegistrationRotation() Dim dRegRot As Double = GetRegistrationRotation()
' Verifico se nuova rotazione totale ammissibile ' Verifico se nuova rotazione totale ammissibile
@@ -748,6 +791,13 @@ Public Class NestPageUC
m_CurrProjPage.SetWarningMessage(EgtMsg(90338)) 'Angolo di registrazione oltre i limiti m_CurrProjPage.SetWarningMessage(EgtMsg(90338)) 'Angolo di registrazione oltre i limiti
Return Return
End If End If
Dim bMoveOk As Boolean = RotateAllRawParts( dAngDeg)
If Not bMoveOk Then m_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
End Sub
Friend Function RotateAllRawParts(dAngDeg As Double, Optional bIsReg As Boolean = True) As Boolean
' Recupero rotazione totale
Dim dRegRot As Double = GetRegistrationRotation()
' Recupero il centro del grezzo iniziale per usarlo come centro della rotazione ' Recupero il centro del grezzo iniziale per usarlo come centro della rotazione
Dim ptCen As New Point3d Dim ptCen As New Point3d
GetRawCenter(ptCen) GetRawCenter(ptCen)
@@ -782,7 +832,6 @@ Public Class NestPageUC
End While End While
' Se rotazione impossibile, ripristino posizione dei grezzi già spostati ' Se rotazione impossibile, ripristino posizione dei grezzi già spostati
If Not bMoveOk Then If Not bMoveOk Then
m_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
Dim nRevPhase As Integer = 1 Dim nRevPhase As Integer = 1
Dim nRevRawId As Integer = GDB_ID.NULL Dim nRevRawId As Integer = GDB_ID.NULL
While nRevPhase <= nPhase While nRevPhase <= nPhase
@@ -865,15 +914,25 @@ Public Class NestPageUC
End If End If
nOpeId = EgtGetNextActiveOperation(nOpeId) nOpeId = EgtGetNextActiveOperation(nOpeId)
End While End While
' Se non è registrazione, ruoto anche l'eventuale foto della lastra
'If Not bIsReg Then
' Dim nPhotoId = m_CurrProjPage.GetPhoto()
' If nPhotoId <> GDB_ID.NULL then EgtRotatePhoto(nPhotoId, ptCen, Vector3d.Z_AX(), dAngDeg)
'End If
' Aggiorno rotazione totale ' Aggiorno rotazione totale
SetRegistrationRotation(dRegRot + dAngDeg) If bIsReg Then
SetRegistrationRotation(dRegRot + dAngDeg)
Else
SetRegistrationRotation(0)
End If
' Dichiaro grezzo per punti ' Dichiaro grezzo per punti
EgtSetInfo(GetCurrentRaw(), KEY_RAWBYPOINTS, 1) EgtSetInfo(GetCurrentRaw(), KEY_RAWBYPOINTS, 1)
End If End If
' Ripristino lo stato iniziale ' Ripristino lo stato iniziale
EgtSetCurrPhase(1) EgtSetCurrPhase(1)
HideAllMachinings() HideAllMachinings()
End Sub Return bMoveOk
End Function
Private Sub InsertPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertPartBtn.Click Private Sub InsertPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertPartBtn.Click
' Se inserimento automatico ' Se inserimento automatico
+63 -12
View File
@@ -5,6 +5,11 @@ Public Module SplitAuto
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow) Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_dLastDT As Double = 0 Private m_dLastDT As Double = 0
Public ReadOnly Property dLastDT As Double
Get
Return m_dLastDT
End Get
End Property
'----------------------------------------------------------------------------------------------- '-----------------------------------------------------------------------------------------------
Friend Class SplitMach Friend Class SplitMach
@@ -737,35 +742,55 @@ Public Module SplitAuto
End Function End Function
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
' Spostamento originale
Dim vtOriMove As New Vector3d( vtMove)
' Livello di movimento
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 ' Se esce dalla tavola, movimento già annullato ed esco con errore
If Not EgtMoveRawPart(nRawId, vtMove) Then Return False If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
' Se interferisce con altri grezzi, annullo movimento ed esco con errore ' Se interferisce con altri grezzi, annullo movimento ed esco con errore
If Not VerifyRawWithOtherRaws(nRawId, dMindist) Then If Not VerifyRawWithOtherRaws(nRawId, dMindist) Then
EgtMoveRawPart(nRawId, -vtMove) EgtMoveRawPart(nRawId, -vtOriMove)
Return False Return False
End If End If
If nMoveLevel < 2 Then Return True
' Provo ad aggiungere un altro movimento ' Provo ad aggiungere un altro movimento
If EgtMoveRawPart(nRawId, vtMove) Then If EgtMoveRawPart(nRawId, vtOriMove) Then
If VerifyRawWithOtherRaws(nRawId, dMindist) Then If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += vtMove vtMove += vtOriMove
nMove += 1
If nMoveLevel = nMove Then Return True
Else Else
EgtMoveRawPart(nRawId, -vtMove) EgtMoveRawPart(nRawId, -vtOriMove)
End If
End If
' Provo ad aggiungere un altro movimento
If EgtMoveRawPart(nRawId, vtOriMove) Then
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += vtOriMove
nMove += 1
If nMoveLevel = nMove Then Return True
Else
EgtMoveRawPart(nRawId, -vtOriMove)
End If End If
End If End If
' Provo ad aggiungere un movimento dimezzato ' Provo ad aggiungere un movimento dimezzato
If EgtMoveRawPart(nRawId, 0.5 * vtMove) Then If EgtMoveRawPart(nRawId, 0.5 * vtOriMove) Then
If VerifyRawWithOtherRaws(nRawId, dMindist) Then If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += 0.5 * vtMove vtMove += 0.5 * vtOriMove
nMove += 1
If nMoveLevel = nMove Then return True
Else Else
EgtMoveRawPart(nRawId, -0.5 * vtMove) EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
End If End If
End If End If
' Provo ad aggiunger un movimento 1/4 ' Provo ad aggiungere un movimento 1/4
If EgtMoveRawPart(nRawId, 0.25 * vtMove) Then If EgtMoveRawPart(nRawId, 0.25 * vtOriMove) Then
If VerifyRawWithOtherRaws(nRawId, dMindist) Then If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += 0.25 * vtMove vtMove += 0.25 * vtOriMove
Else Else
EgtMoveRawPart(nRawId, -0.25 * vtMove) EgtMoveRawPart(nRawId, -0.25 * vtOriMove)
End If End If
End If End If
Return True Return True
@@ -817,4 +842,30 @@ Public Module SplitAuto
Return (Not bInterf) Return (Not bInterf)
End Function End Function
Public Function MaxCuttingMustache(dMustache As Double) As Double
Dim MachSplitList As New List(Of SplitMach)
' Recupero l'indice della fase corrente
Dim nCurrPhase As Integer = EgtGetCurrPhase()
' se non è stata creata nessuna lista allora restituisco il valore di Default
If Not CalculateSplitMachList(nCurrPhase, MachSplitList) Then Return dMustache
Dim NewMustache As Double = 0
Dim ItemMachSplit As SplitMach
For Each ItemMachSplit In MachSplitList
' Recupero lunghezza baffo secondo taglio
Dim nPvId As Integer = GDB_ID.NULL
EgtGetInfo(EgtGetFirstNameInGroup(ItemMachSplit.m_nId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
Dim dDT As Double
If EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT) Then
If NewMustache < dDT Then NewMustache = dDT
End If
Next
Dim dExtraL As Double = 0
EgtMdbGetGeneralParam(MCH_GP.EXTRALONCUTREG, dExtraL)
' se esiste il valore di un baffo allora sovrascrivo il valore di default
If NewMustache > 0 Then
dMustache = Math.Ceiling(NewMustache)
End If
Return dMustache + dExtraL
End Function
End Module End Module
+55 -19
View File
@@ -100,9 +100,15 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> </Button>
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Tutti-ONImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid> </Grid>
@@ -113,11 +119,17 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> </Button>
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid> </Grid>
</Grid> </Grid>
@@ -139,18 +151,42 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Image Source="{DynamicResource Inizio-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> </Button>
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Image Source="{DynamicResource Fine-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> </Button>
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Image Source="{DynamicResource Modifica-InizioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> </Button>
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> <Image Source="{DynamicResource Modifica-FineImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/> </Button>
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource InvertiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Inizio-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Inizio-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Fine-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Fine-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Tutti-allungaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Tutti-accorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid> </Grid>
+18 -18
View File
@@ -29,24 +29,24 @@ Public Class SplitPageUC
' Collego lista di oggetti a ListBox ' Collego lista di oggetti a ListBox
MachiningLsBx.ItemsSource = m_ItemList MachiningLsBx.ItemsSource = m_ItemList
' Assegno testi ' Assegno testi
OnOffBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 1) ' On/Off OnOffBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 1) ' On/Off
AllOnBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 2) ' Tutti On AllOnBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 2) ' Tutti On
AllOffBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 3) ' Tutti Off AllOffBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 3) ' Tutti Off
CutBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 4) ' Allunga/Accorcia CutBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 4) ' Allunga/Accorcia
CutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 5) ' Inizio Allunga/Accorcia CutStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 5) ' Inizio Allunga/Accorcia
CutEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 6) ' Fine Allunga/Accorcia CutEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 6) ' Fine Allunga/Accorcia
OutCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 7) ' Inizio Centro/Fuori OutCenStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 7) ' Inizio Centro/Fuori
OutCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori OutCenEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori
ModifStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 33) ' Inizio Modif. ModifStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 33) ' Inizio Modif.
ModifEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 34) ' Fine Modif. ModifEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 34) ' Fine Modif.
InvertBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 36) ' Inverti InvertBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 36) ' Inverti
PauseBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off PauseBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off
AllOutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 8) ' Inizi Tutti Fuori AllOutStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 8) ' Inizi Tutti Fuori
AllCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 9) ' Inizi Tutti Centro AllCenStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 9) ' Inizi Tutti Centro
AllOutEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 13) ' Fine Tutti Fuori AllOutEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 13) ' Fine Tutti Fuori
AllCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 14) ' Fine Tutti Centro AllCenEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 14) ' Fine Tutti Centro
AllExtendBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 15) ' Allunga Tutti AllExtendBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 15) ' Allunga Tutti
AllReduceBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 16) ' Accorc. Tutti AllReduceBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 16) ' Accorc. Tutti
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) ' Modifica ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) ' Modifica
AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto
RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart
+5
View File
@@ -334,6 +334,8 @@ Module ConstGen
' Nome di pezzo temporaneo che serve per copia dime ' Nome di pezzo temporaneo che serve per copia dime
Public Const NAME_COPYTEMPLATE As String = "CopyTemplate" Public Const NAME_COPYTEMPLATE As String = "CopyTemplate"
' Nome layer solidi per VM
Public Const NAME_VM_SOLID As String = "Solid"
' Chiave per Id originale del pezzo per VeinMatch ' Chiave per Id originale del pezzo per VeinMatch
Public Const KEY_ORI_ID As String = "OriId" Public Const KEY_ORI_ID As String = "OriId"
@@ -343,6 +345,9 @@ Module ConstGen
' Lunghezza libera infinita ' Lunghezza libera infinita
Public Const FREELEN_INF = 9999 Public Const FREELEN_INF = 9999
' Costante per lunghezza gambo di lama
Public Const STEM = 131072
' Colori per lavorazioni ' Colori per lavorazioni
Public Function COL_MCH_CUT() As Color3d Public Function COL_MCH_CUT() As Color3d
Return New Color3d(0, 255, 0) Return New Color3d(0, 255, 0)
+12
View File
@@ -105,6 +105,15 @@ Module ConstIni
Public Const K_TRFDATA As String = "TrfData" Public Const K_TRFDATA As String = "TrfData"
Public Const K_CSVDATA As String = "CsvData" Public Const K_CSVDATA As String = "CsvData"
Public Const K_COMPODIR As String = "CompoDir" Public Const K_COMPODIR As String = "CompoDir"
Public Const K_CMP_COUNT As String = "Count"
Public Const K_LASTCOLOR As String = "LastColor"
Public Const K_COLOR As String = "Color"
Public Const S_EXTCOMPO As String = "Compo"
Public Const S_INTCOMPO As String = "InternalCompo"
Public Const K_INT_COMPODIR As String = "CompoDir"
Public Const K_INT_COUNT As String = "Count"
Public Const S_FLATPARTS As String = "FlatParts" Public Const S_FLATPARTS As String = "FlatParts"
Public Const K_FLPCURRDIR As String = "CurrDir" Public Const K_FLPCURRDIR As String = "CurrDir"
@@ -140,6 +149,9 @@ Module ConstIni
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize" Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime" Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
Public Const S_SPLIT As String = "Split"
Public Const K_MOVE_LEV As String = "MoveLevel"
Public Const S_CSV As String = "Csv" Public Const S_CSV As String = "Csv"
Public Const K_FULL As String = "Full" Public Const K_FULL As String = "Full"
Public Const K_MAXDIMONX As String = "MaxDimOnX" Public Const K_MAXDIMONX As String = "MaxDimOnX"
+3
View File
@@ -37,7 +37,9 @@
Public Const K_PATH_HMI As String = "PathHmi" Public Const K_PATH_HMI As String = "PathHmi"
Public Const K_USENEWMDI As String = "UseNewMDI" Public Const K_USENEWMDI As String = "UseNewMDI"
Public Const K_ISSIEMENSONE As String = "IsSiemensOne" Public Const K_ISSIEMENSONE As String = "IsSiemensOne"
Public Const K_ISACTIVEMODESUBSCR As String = "IsActiveModeSubscr"
Public Const K_DBVARPATH As String = "DBVarPath" Public Const K_DBVARPATH As String = "DBVarPath"
Public Const K_NEWWRITECNCMODE As String = "NewWriteCNCMode"
Public Const S_NCNUM As String = "NcNUM" Public Const S_NCNUM As String = "NcNUM"
Public Const K_RESETSENDDELAY As String = "ResetSendDelay" Public Const K_RESETSENDDELAY As String = "ResetSendDelay"
@@ -46,6 +48,7 @@
Public Const S_NCDATA As String = "NcData" Public Const S_NCDATA As String = "NcData"
Public Const K_NEWVARIABLE As String = "NewVariable" Public Const K_NEWVARIABLE As String = "NewVariable"
Public Const K_NEWCONSOLE As String = "NewConsole" Public Const K_NEWCONSOLE As String = "NewConsole"
Public Const K_WRITECNCMODEVAR As String = "WriteCNCModeVar"
Public Const K_COMM As String = "Comm" Public Const K_COMM As String = "Comm"
Public Const K_REFRESH As String = "Refresh" Public Const K_REFRESH As String = "Refresh"
Public Const K_MODE As String = "Mode" Public Const K_MODE As String = "Mode"
+1 -1
View File
@@ -475,7 +475,7 @@ Public MustInherit Class MachineButton
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
' solo per Flexium ' solo per Flexium
m_CN.DPlcVariables_WriteVariables(ENumber, EValue) m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
If Not IsNothing(ENumber2) And Not IsNothing(EValue2) Then If Not String.IsNullOrEmpty(ENumber2) And Not String.IsNullOrEmpty(EValue2) Then
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2) m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
End If End If
' altrimenti scrittura delle variabili E ' altrimenti scrittura delle variabili E
+20 -13
View File
@@ -35,10 +35,11 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="Point1Btn" Grid.Column="0" <Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowTextButton}"/> <Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid> </Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" <ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0"> Margin="6,0,6,0">
@@ -55,10 +56,12 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Name="LineBtn" Grid.Column="0" <ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
Style="{DynamicResource OmagCut_YellowToggleButton}"/> <Image Source="{DynamicResource LineaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<ToggleButton Name="ArcBtn" Grid.Column="1" </ToggleButton>
Style="{DynamicResource OmagCut_YellowToggleButton}"/> <ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource ArcoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</ToggleButton>
</Grid> </Grid>
@@ -69,14 +72,18 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" <Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" </Button>
Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <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> </Grid>
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource Salva-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}"> <Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
+6 -6
View File
@@ -49,12 +49,12 @@ Public Class CopyTemplateUC
' la associo alla combobox ' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray PointModeCmBx.ItemsSource = m_PointsModeArray
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10) Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
LineBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 50) LineBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
ArcBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 51) ArcBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
RemoveBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 52) RemoveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
CloseBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 53) CloseBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
SaveBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 54) SaveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
End Sub End Sub
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
+125 -22
View File
@@ -28,7 +28,7 @@
<ColumnDefinition Width="7*"/> <ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"> <Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button> </Button>
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"> <Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
@@ -60,24 +60,127 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> <RowDefinition Height="1*"/>
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0" </Grid.RowDefinitions>
Style="{DynamicResource OmagCut_YellowTextButton}"/> <Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
<Button Name="SingleCutBtn" Grid.Row="1" Style="{DynamicResource OmagCut_YellowIconButton}">
Style="{DynamicResource OmagCut_YellowTextButton}"/> <Grid>
<Button Name="MultipleCutBtn" Grid.Row="2" <Grid.ColumnDefinitions>
Style="{DynamicResource OmagCut_YellowTextButton}"/> <ColumnDefinition Width="80"/>
<Button Name="GridCutBtn" Grid.Row="3" <ColumnDefinition Width="140"/>
Style="{DynamicResource OmagCut_YellowTextButton}"/> </Grid.ColumnDefinitions>
<Button Name="FlatteningCutBtn" Grid.Row="4" <Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
Style="{DynamicResource OmagCut_YellowTextButton}"/> <TextBlock Name="ManualTxt" Grid.Column="1"
<Button Name="PolishingBtn" Grid.Row="5" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_YellowTextButton}"/> </Grid>
<Button Name="CopyTemplateBtn" Grid.Row="6" </Button>
Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Button Name="SawTestBtn" Grid.Row="7" <Button Name="SingleCutBtn" Grid.Row="1"
Style="{DynamicResource OmagCut_YellowTextButton}"/> Style="{DynamicResource OmagCut_YellowIconButton}">
</Grid> <Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="SingleCutTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="MultipleCutBtn" Grid.Row="2"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="GridCutBtn" Grid.Row="3"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="GridCutTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="SingleDrillBtn" Grid.Row="4"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="FlatteningCutBtn" Grid.Row="5"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="PolishingBtn" Grid.Row="6"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="PolishingTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="CopyTemplateBtn" Grid.Row="7"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<Button Name="SawTestBtn" Grid.Row="8"
Style="{DynamicResource OmagCut_YellowIconButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
<TextBlock Name="SawTestTxt" Grid.Column="1"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
</Grid>
</Grid> </Grid>
@@ -116,19 +219,19 @@
<!--Comando asse X-Y--> <!--Comando asse X-Y-->
<ToggleButton Name="XYBtn" Grid.Column="2" <ToggleButton Name="XYBtn" Grid.Column="2"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"> Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>--> <Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton> </ToggleButton>
<!--Comando asse Z-C--> <!--Comando asse Z-C-->
<ToggleButton Name="ZCBtn" Grid.Column="3" <ToggleButton Name="ZCBtn" Grid.Column="3"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"> Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>--> <Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton> </ToggleButton>
<!--Comando asse Z-B--> <!--Comando asse Z-B-->
<ToggleButton Name="ZBBtn" Grid.Column="4" <ToggleButton Name="ZBBtn" Grid.Column="4"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"> Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>--> <Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
</ToggleButton> </ToggleButton>
<!--Comando Remote--> <!--Comando Remote-->
+130 -35
View File
@@ -8,6 +8,7 @@ Public Class DirectCutPageUC
Friend m_MachineButtons As MachineButtonsUC Friend m_MachineButtons As MachineButtonsUC
Friend m_ManualAxesMove As ManualAxesMoveUC Friend m_ManualAxesMove As ManualAxesMoveUC
Friend m_SingleCut As SingleCutUC Friend m_SingleCut As SingleCutUC
Friend m_SingleDrill As SingleDrillUC
' nuova finestra per i comandi per il taglio manuale nuovo ' nuova finestra per i comandi per il taglio manuale nuovo
Friend m_SingleCutAuto As SingleCutAuto Friend m_SingleCutAuto As SingleCutAuto
Friend m_MultipleCut As MultipleCut Friend m_MultipleCut As MultipleCut
@@ -18,6 +19,7 @@ Public Class DirectCutPageUC
Friend m_SawTest As SawTestUC Friend m_SawTest As SawTestUC
Friend m_ControlsMachineButton As ControlsMachineButtonUC Friend m_ControlsMachineButton As ControlsMachineButtonUC
Friend m_VacuumMachineButton As VacuumMachineButtonUC Friend m_VacuumMachineButton As VacuumMachineButtonUC
' Stato di visualizzazione della macchina ' Stato di visualizzazione della macchina
Friend m_bShowMachine As Boolean = False Friend m_bShowMachine As Boolean = False
Friend m_nMachLook As Integer = MCH_LOOK.ALL Friend m_nMachLook As Integer = MCH_LOOK.ALL
@@ -50,6 +52,7 @@ Public Class DirectCutPageUC
CopyTemplate CopyTemplate
SawTest SawTest
SingleCutAuto SingleCutAuto
SingleDrill
End Enum End Enum
Private Sub DirectCutPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub DirectCutPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
@@ -60,6 +63,7 @@ Public Class DirectCutPageUC
m_MachineButtons = New MachineButtonsUC m_MachineButtons = New MachineButtonsUC
m_ManualAxesMove = New ManualAxesMoveUC m_ManualAxesMove = New ManualAxesMoveUC
m_SingleCut = New SingleCutUC m_SingleCut = New SingleCutUC
m_SingleDrill = New SingleDrillUC
m_MultipleCut = New MultipleCut m_MultipleCut = New MultipleCut
m_GridCut = New GridCut m_GridCut = New GridCut
m_FlatteningCut = New FlatteningCut m_FlatteningCut = New FlatteningCut
@@ -73,13 +77,14 @@ Public Class DirectCutPageUC
'Posizionemento nella griglia delle Page UserControl 'Posizionemento nella griglia delle Page UserControl
m_MachineButtons.SetValue(Grid.RowProperty, 2) m_MachineButtons.SetValue(Grid.RowProperty, 2)
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 6) m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
m_ManualAxesMove.SetValue(Grid.RowProperty, 1) m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
If m_bManulaCut Then If m_bManulaCut Then
m_SingleCutAuto.SetValue(Grid.RowProperty, 1) m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
Else Else
m_SingleCut.SetValue(Grid.RowProperty, 1) m_SingleCut.SetValue(Grid.RowProperty, 1)
End If End If
m_SingleDrill.SetValue(Grid.RowProperty, 1)
m_MultipleCut.SetValue(Grid.RowProperty, 1) m_MultipleCut.SetValue(Grid.RowProperty, 1)
m_GridCut.SetValue(Grid.RowProperty, 1) m_GridCut.SetValue(Grid.RowProperty, 1)
m_FlatteningCut.SetValue(Grid.RowProperty, 1) m_FlatteningCut.SetValue(Grid.RowProperty, 1)
@@ -89,15 +94,14 @@ Public Class DirectCutPageUC
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1) m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1) m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
Dim bCollapsedNewBottonsConsole As Boolean = False ' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [ControlMachButtons])
Dim bCollapsedNewBottonsConsole As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons("JogButtons", "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile()) m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
If Not m_NewMachineButtonsType Then If Not m_NewMachineButtonsType Then
'Assegno MachineButtons alla pagina 'Assegno MachineButtons alla pagina
LowerButtonGrid.Children.Add(m_MachineButtons) LowerButtonGrid.Children.Add(m_MachineButtons)
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
' per le configurazioni diverse dalla Digitale5
bCollapsedNewBottonsConsole = True
End If End If
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
@@ -105,35 +109,48 @@ Public Class DirectCutPageUC
ManualModeBtn.Visibility = Windows.Visibility.Hidden ManualModeBtn.Visibility = Windows.Visibility.Hidden
End If End If
ManualBtn.Content = EgtMsg(90201) ' ManualBtn.Content = EgtMsg(90201)
SingleCutBtn.Content = EgtMsg(90202) ManualTxt.Text = EgtMsg(90201)
MultipleCutBtn.Content = EgtMsg(90203) 'SingleCutBtn.Content = EgtMsg(90202)
GridCutBtn.Content = EgtMsg(90204) SingleCutTxt.Text = EgtMsg(90202)
FlatteningCutBtn.Content = EgtMsg(90206) 'SingleDrillBtn.Content = "Foro singolo"
PolishingBtn.Content = EgtMsg(90231) SingleDrillTxt.Text = EgtMsg(90258)
CopyTemplateBtn.Content = EgtMsg(90209) 'MultipleCutBtn.Content = EgtMsg(90203)
SawTestBtn.Content = EgtMsg(90207) MultipleCutTxt.Text = EgtMsg(90203)
'GridCutBtn.Content = EgtMsg(90204)
GridCutTxt.Text = EgtMsg(90204)
'FlatteningCutBtn.Content = EgtMsg(90206)
FlatteningCutTxt.Text = EgtMsg(90206)
'PolishingBtn.Content = EgtMsg(90231)
PolishingTxt.Text = EgtMsg(90231)
'CopyTemplateBtn.Content = EgtMsg(90209)
CopyTemplateTxt.Text = EgtMsg(90209)
'SawTestBtn.Content = EgtMsg(90207)
SawTestTxt.text = EgtMsg(90207)
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021 ' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
' leggo il numero di assi attivi nella macchina
Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile()) Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile())
Dim x As Integer = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollapsedNewBottonsConsole Then '' leggo se è stata configurata la nuova conole
XYBtn.Content = "X - Y" 'If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollapsedNewBottonsConsole Then
XYBtn.Foreground = Brushes.White ' XYBtn.Content = "X - Y"
ZCBtn.Content = "Z - C" ' XYBtn.Foreground = Brushes.White
ZCBtn.Foreground = Brushes.White ' ZCBtn.Content = "Z - C"
If AxesNumber < 5 Then ' ZCBtn.Foreground = Brushes.White
ZBBtn.Visibility = Windows.Visibility.Collapsed ' If AxesNumber < 5 Then
End If ' ZBBtn.Visibility = Windows.Visibility.Collapsed
ZBBtn.Content = "Z - B" ' End If
ZBBtn.Foreground = Brushes.White ' ZBBtn.Content = "Z - B"
RemoteBtn.Content = "Remote" ' ZBBtn.Foreground = Brushes.White
RemoteBtn.Foreground = Brushes.White ' RemoteBtn.Content = "Remote"
Else ' RemoteBtn.Foreground = Brushes.White
XYBtn.Visibility = Windows.Visibility.Collapsed 'Else
ZCBtn.Visibility = Windows.Visibility.Collapsed ' XYBtn.Visibility = Windows.Visibility.Collapsed
ZBBtn.Visibility = Windows.Visibility.Collapsed ' ZCBtn.Visibility = Windows.Visibility.Collapsed
End If ' ZBBtn.Visibility = Windows.Visibility.Collapsed
'End If
End Sub End Sub
@@ -173,6 +190,8 @@ Public Class DirectCutPageUC
End If End If
End If End If
End While End While
' attivo la visualizzazione dei comandi
SetVisibilityJogButtuns()
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh) ' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
'----------- FINE NUOVI BOTTONI------------ '----------- FINE NUOVI BOTTONI------------
@@ -198,6 +217,9 @@ Public Class DirectCutPageUC
ElseIf m_ActiveDirectCutPage = DirectCutPages.SawTest Then ElseIf m_ActiveDirectCutPage = DirectCutPages.SawTest Then
LeftButtonGrid.Children.Add(m_SawTest) LeftButtonGrid.Children.Add(m_SawTest)
Return Return
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
LeftButtonGrid.Children.Add(m_SingleDrill)
Return
End If End If
' Caso standard ' Caso standard
@@ -216,6 +238,7 @@ Public Class DirectCutPageUC
End If End If
MultipleCutBtn.IsEnabled = bRawOk MultipleCutBtn.IsEnabled = bRawOk
GridCutBtn.IsEnabled = bRawOk GridCutBtn.IsEnabled = bRawOk
SingleDrillBtn.IsEnabled = bRawOk
FlatteningCutBtn.IsEnabled = bRawOk FlatteningCutBtn.IsEnabled = bRawOk
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing) PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
SawTestBtn.IsEnabled = bRawOk SawTestBtn.IsEnabled = bRawOk
@@ -226,6 +249,35 @@ Public Class DirectCutPageUC
End Sub End Sub
Private Sub SetVisibilityJogButtuns()
XYBtn.Visibility = Visibility.Collapsed
ZCBtn.Visibility = Visibility.Collapsed
ZBBtn.Visibility = Visibility.Collapsed
RemoteBtn.Visibility = Visibility.Collapsed
Dim Item As MachineButton = Nothing
For Each Item In m_ButtonJogList
Select Case Item.StateFlag.Trim
Case K_XYJOG
XYBtn.Visibility = Visibility.Visible
XYBtn.Foreground = Brushes.White
XYBtn.ToolTip = "X - Y"
Case K_ZCJOG
ZCBtn.Visibility = Visibility.Visible
ZCBtn.Foreground = Brushes.White
ZCBtn.ToolTip = "Z - C"
Case K_ZBJOG
ZBBtn.Visibility = Visibility.Visible
ZBBtn.Foreground = Brushes.White
ZBBtn.ToolTip = "Z - B"
Case K_REMOTE
RemoteBtn.Visibility = Visibility.Visible
RemoteBtn.Foreground = Brushes.White
RemoteBtn.Content = "Remote"
End Select
Next
End Sub
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()) EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
' Se macchina fotografica collegata, faccio una foto ' Se macchina fotografica collegata, faccio una foto
@@ -296,6 +348,11 @@ Public Class DirectCutPageUC
m_ActiveDirectCutPage = DirectCutPages.SawTest m_ActiveDirectCutPage = DirectCutPages.SawTest
End Sub End Sub
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
LeftButtonGrid.Children.Add(m_SingleDrill)
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
End Sub
Private Sub ControlsMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles ControlsMachineBtn.Click Private Sub ControlsMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles ControlsMachineBtn.Click
If ControlsMachineBtn.IsChecked Then If ControlsMachineBtn.IsChecked Then
m_ControlsMachineButton = New ControlsMachineButtonUC m_ControlsMachineButton = New ControlsMachineButtonUC
@@ -325,7 +382,16 @@ Public Class DirectCutPageUC
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK------------------------------------------------- '------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click
Dim XYJogButton As MachineButton = m_ButtonJogList(0) ' riverco in elenco il bottone XYJog
Dim XYJogButton As MachineButton = Nothing
Dim ItemButton As MachineButton = Nothing
For Each ItemButton In m_ButtonJogList
If ItemButton.StateFlag = K_XYJOG Then
XYJogButton = ItemButton
Exit For
End If
Next
If IsNothing(XYJogButton) Then Return
' eseguo lo script lua associato ' eseguo lo script lua associato
XYJogButton.ExecuteMDICommand(XYJogButton.TLuaScriptName) XYJogButton.ExecuteMDICommand(XYJogButton.TLuaScriptName)
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed ' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
@@ -348,7 +414,16 @@ Public Class DirectCutPageUC
End Sub End Sub
Private Sub ZCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZCBtn.Click Private Sub ZCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZCBtn.Click
Dim ZJogButton As MachineButton = m_ButtonJogList(1) ' riverco in elenco il bottone ZCYJog
Dim ZJogButton As MachineButton = Nothing
Dim ItemButton As MachineButton = Nothing
For Each ItemButton In m_ButtonJogList
If ItemButton.StateFlag = K_ZCJOG Then
ZJogButton = ItemButton
Exit For
End If
Next
If IsNothing(ZJogButton) Then Return
' eseguo lo script lua associato ' eseguo lo script lua associato
ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName) ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName)
End Sub End Sub
@@ -369,9 +444,18 @@ Public Class DirectCutPageUC
End Sub End Sub
Private Sub ZBBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBBtn.Click Private Sub ZBBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBBtn.Click
Dim BCJogButton As MachineButton = m_ButtonJogList(2) ' riverco in elenco il bottone ZCYJog
Dim ZBJogButton As MachineButton = Nothing
Dim ItemButton As MachineButton = Nothing
For Each ItemButton In m_ButtonJogList
If ItemButton.StateFlag = K_ZBJOG Then
ZBJogButton = ItemButton
Exit For
End If
Next
If IsNothing(ZBJogButton) Then Return
' eseguo lo script lua associato ' eseguo lo script lua associato
BCJogButton.ExecuteMDICommand(BCJogButton.TLuaScriptName) ZBJogButton.ExecuteMDICommand(ZBJogButton.TLuaScriptName)
End Sub End Sub
Friend Sub ZBJogChanged(bBCAxes As Boolean) Friend Sub ZBJogChanged(bBCAxes As Boolean)
@@ -390,10 +474,19 @@ Public Class DirectCutPageUC
End Sub End Sub
Private Sub RemoteBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemoteBtn.Click Private Sub RemoteBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemoteBtn.Click
Dim RemoteButton As MachineButton = m_ButtonJogList(3) Dim RemoteButton As MachineButton = Nothing
Dim ItemButton As MachineButton = Nothing
For Each ItemButton In m_ButtonJogList
If ItemButton.StateFlag = K_REMOTE Then
RemoteButton = ItemButton
Exit For
End If
Next
If IsNothing(RemoteButton) Then Return
' eseguo lo script lua associato ' eseguo lo script lua associato
Dim CurrentBtn As Primitives.ToggleButton = e.Source Dim CurrentBtn As Primitives.ToggleButton = e.Source
Dim sLuaFileName As String = String.Empty Dim sLuaFileName As String = String.Empty
' verifico lo stato del bottone per avviare il giusto script
If CurrentBtn.IsChecked() Then If CurrentBtn.IsChecked() Then
sLuaFileName = RemoteButton.TLuaScriptName sLuaFileName = RemoteButton.TLuaScriptName
Else Else
@@ -455,6 +548,8 @@ Public Class DirectCutPageUC
LeftButtonGrid.Children.Remove(m_CopyTemplate) LeftButtonGrid.Children.Remove(m_CopyTemplate)
Case DirectCutPages.SawTest Case DirectCutPages.SawTest
LeftButtonGrid.Children.Remove(m_SawTest) LeftButtonGrid.Children.Remove(m_SawTest)
Case DirectCutPages.SingleDrill
LeftButtonGrid.Children.Remove(m_SingleDrill)
End Select End Select
If ControlsMachineBtn.IsChecked Then If ControlsMachineBtn.IsChecked Then
MachineButtonGrid.Children.Remove(m_ControlsMachineButton) MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
+20 -11
View File
@@ -38,12 +38,17 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0" <ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowToggleButton}"/> Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<ToggleButton Name="Point2Btn" Grid.Column="1" <Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowToggleButton}"/> </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="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate> <ComboBox.ItemTemplate>
@@ -125,12 +130,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}"> </Button>
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
</Button> <Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Grid> </Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid> </Grid>
+4 -6
View File
@@ -79,8 +79,8 @@ Public Class FlatteningCut
' la associo alla combobox ' la associo alla combobox
TypeCmBx.ItemsSource = m_TypeArray TypeCmBx.ItemsSource = m_TypeArray
' assegno messaggi ' assegno messaggi
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10) Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11) Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13) DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14) LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15) DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
@@ -89,8 +89,8 @@ Public Class FlatteningCut
ZReleasedTxBl.Text = "Z Svincolo" ZReleasedTxBl.Text = "Z Svincolo"
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23) SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29) RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30) OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
' Carico i dati dell'ultimo taglio ' Carico i dati dell'ultimo taglio
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, 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_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
@@ -671,8 +671,6 @@ Public Class FlatteningCut
End If End If
UpdateSimulOkBtn() UpdateSimulOkBtn()
Return m_bCutOk Return m_bCutOk
End Function End Function
+19 -11
View File
@@ -34,12 +34,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0" <ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowToggleButton}"/> Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<ToggleButton Name="Point2Btn" Grid.Column="1" <Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowToggleButton}"/> </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}" <ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0"> Margin="6,0,6,0">
@@ -131,12 +135,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}"> </Button>
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
</Button> <Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Grid> </Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid> </Grid>
+4 -4
View File
@@ -63,8 +63,8 @@ Public Class GridCut
' la associo alla combobox ' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray PointModeCmBx.ItemsSource = m_PointsModeArray
' assegno messaggi ' assegno messaggi
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10) Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11) Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13) DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15) DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16) SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
@@ -73,8 +73,8 @@ Public Class GridCut
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21) NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22) DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23) SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30) OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
' Carico i dati dell'ultimo taglio ' Carico i dati dell'ultimo taglio
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, 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_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
+7 -3
View File
@@ -550,7 +550,11 @@ Public Class MachineButtonsUC
End Sub End Sub
Friend Sub DoorStateChanged(DoorState As Integer) Friend Sub DoorStateChanged(DoorState As Integer)
' recupero le asscociazioni con i bottoni If IsNothing(DoorState) Then
EgtOutLog("Error: door state null!")
Return
End If
' recupero le associazioni con i bottoni
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_OPENED) Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_OPENED)
If nIndex = -1 Then Return If nIndex = -1 Then Return
' bottone di apertura porte ' bottone di apertura porte
@@ -560,7 +564,7 @@ Public Class MachineButtonsUC
' bottone di chiusura porte ' bottone di chiusura porte
Dim DoorClosedButton As Primitives.ToggleButton = GetToggleButton(nIndex + 1) Dim DoorClosedButton As Primitives.ToggleButton = GetToggleButton(nIndex + 1)
' modifico il colore dei bottoni ' modifico il colore dei bottoni
If Not IsNothing(DoorState) Then If Not IsNothing(DoorState) AndAlso Not IsNothing(DoorClosedButton) Then
Select Case DoorState Select Case DoorState
Case 0 Case 0
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red") DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
@@ -568,7 +572,7 @@ Public Class MachineButtonsUC
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray") DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
End Select End Select
End If End If
If Not IsNothing(DoorState) Then If Not IsNothing(DoorState) AndAlso Not IsNothing(DoorOpenedButton) Then
Select Case DoorState Select Case DoorState
Case 0 Case 0
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray") DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
+20 -11
View File
@@ -35,12 +35,17 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0" <ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowToggleButton}"/> Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<ToggleButton Name="Point2Btn" Grid.Column="1" <Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowToggleButton}"/> </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}" <ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0"> Margin="6,0,6,0">
@@ -256,12 +261,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}"> </Button>
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
</Button> <Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Grid> </Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid> </Grid>
+4 -4
View File
@@ -63,8 +63,8 @@ Public Class MultipleCut
' la associo alla combobox ' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray PointModeCmBx.ItemsSource = m_PointsModeArray
' assegno messaggi ' assegno messaggi
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10) Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11) Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13) DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14) LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15) DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
@@ -72,8 +72,8 @@ Public Class MultipleCut
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17) NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18) DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23) SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30) OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
Num1TxBl.Text = "1" Num1TxBl.Text = "1"
Num2TxBl.Text = "2" Num2TxBl.Text = "2"
Num3TxBl.Text = "3" Num3TxBl.Text = "3"
+10 -6
View File
@@ -63,12 +63,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}"> </Button>
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
</Button> <Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Grid> </Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid> </Grid>
+2 -2
View File
@@ -23,8 +23,8 @@ Public Class Polishing
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' assegno messaggi ' assegno messaggi
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30) OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
End Sub End Sub
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
+20 -11
View File
@@ -37,12 +37,17 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0" <ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowToggleButton}"/> Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<ToggleButton Name="Point2Btn" Grid.Column="1" <Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowToggleButton}"/> </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}" <ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0"> Margin="6,0,6,0">
@@ -80,12 +85,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}"> </Button>
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
</Button> <Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Grid> </Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid> </Grid>
+4 -4
View File
@@ -58,14 +58,14 @@ Public Class SawTestUC
' la associo alla combobox ' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray PointModeCmBx.ItemsSource = m_PointsModeArray
' assegno messaggi ' assegno messaggi
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10) Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11) Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13) DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14) LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15) DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28) OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30) OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
' Carico i dati dell'ultimo test ' Carico i dati dell'ultimo test
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_DEPTH, m_dDepth, m_MainWindow.GetIniFile()) 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()) m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_LENGTH, m_dLen, m_MainWindow.GetIniFile())
+16 -7
View File
@@ -38,11 +38,16 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0" <ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowToggleButton}"/> Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<ToggleButton Name="Point2Btn" Grid.Column="1" <Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowToggleButton}"/> </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="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
<ComboBox.ItemTemplate> <ComboBox.ItemTemplate>
@@ -106,10 +111,14 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/> <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}"> <Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button> </Button>
</Grid> </Grid>
+4 -4
View File
@@ -57,16 +57,16 @@ Public Class SingleCutUC
' la associo alla combobox ' la associo alla combobox
PointModeCmBx.ItemsSource = m_PointsModeArray PointModeCmBx.ItemsSource = m_PointsModeArray
' Assegno messaggi ' Assegno messaggi
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10) Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11) Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13) DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14) LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15) DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16) SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28) OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
SawThChBl.Text = EgtMsg(90232) ' Spessore lama SawThChBl.Text = EgtMsg(90232) ' Spessore lama
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30) OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
' Carico i dati dell'ultimo taglio ' Carico i dati dell'ultimo taglio
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile()) 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()) m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
+97
View File
@@ -0,0 +1,97 @@
<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">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
<!-- 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="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>
</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>
<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>
<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>
</Border>
</UserControl>
+495
View File
@@ -0,0 +1,495 @@
Imports EgtUILib
Imports System.Collections.ObjectModel
Public Class SingleDrillUC
' Riferimenti a pagine
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
' Flag di pagina attiva
Private m_bActive As Boolean = False
' Flag di simulazione in corso
Private m_bSimul As Boolean = False
' riferimento alla macchina corrente
Private m_CurrentMachine As CurrentMachine
' --------------------- VARIABILI PRESENTI NEL TAGLIO SINGOLO ---------------------
' Origine tavola e dati grezzo
Private m_bRawOk As Boolean = False
Private m_ptTabOri As Point3d
Private m_ptRawMin As Point3d
Private m_ptRawMax As Point3d
' Parametri P1 acquisito
Private m_bPointP1Ok As Boolean = False
Private m_ptTipP1 As Point3d
Private m_vtToolP1 As Vector3d
' Parametri P2 acquisito
Private m_bPointP2Ok As Boolean = False
Private m_ptTipP2 As Point3d
Private m_vtToolP2 As Vector3d
' Parametri della lavorazione
Private m_bCutOk As Boolean = False
' Array delle modalità di acquisizione dei punti
Private m_PointsModeArray(2) As String
' Punto selezionato nel disegno
Private m_ptPrev As Point3d
' Layer per crocette temporanee
Private m_nTempLay As Integer = GDB_ID.NULL
Private m_dDiameter As Double = 0
Private m_sCurrDrill As String = String.Empty
' Costanti
Private Const MAX_TAB_DEPTH As Double = 10.0
Private Const MIN_CUT_LEN As Double = 10.0
Private Const MAX_SIDE_ANG As Double = 60.0
' Costanti che indicano la modalità di acquisizione dei punti
Private Enum PT_MODE As Integer
DRILL = 0
LASER = 1
DRAW = 2
End Enum
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Variabile che accorcia il riferimento alla macchina corrente
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)
' 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)
End Sub
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
m_sCurrDrill = m_CurrentMachine.sCurrDrill
GetDrillFromDrilling(m_sCurrDrill)
' recupero informazioni del foretto usato
EgtTdbSetCurrTool(m_sCurrDrill)
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
' Attivo la pagina
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
m_bActive = True
' Se rientro da simulazione
If m_bSimul Then
m_bSimul = False
' Disabilito registrazione progetto modificato
EgtDisableModified()
' Aggiorno visualizzazione
SetMachineInCurrPos()
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
EgtDraw()
Return
End If
' Disabilito registrazione progetto modificato
EgtDisableModified()
' Creo layer temporaneo per crocette
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
' Origine tavola
m_bRawOk = True
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
m_bRawOk = False
EgtOutLog("Error on RawBox")
End If
' Reset punto acquisito
m_bPointP1Ok = False
m_bPointP2Ok = False
' Inizializzo primo punto acquisito dal disegno
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)
' Imposto modalità di acquisizione punti
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
SetCoordVisibility(True)
ShowCoord()
' Reset taglio e disabilito bottone esecuzione
m_bCutOk = False
UpdateSimulOkBtn()
' Deseleziono bottone primo punto
Point1Btn.IsChecked = False
' Aggiorno visualizzazione
EgtDraw()
End Sub
' esco dalla pagina di foro diretto
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
' Se non vado in simulazione
If Not m_bSimul Then
' Dichiaro sottopagina da non riattivare
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
' Rimuovo layer temporaneo per crocette
EgtErase(m_nTempLay)
' Rimuovo eventuale pezzo per taglio diretto
EraseDirectCutPart()
' Riattivo eventuali lavorazioni presenti
ActivateAllMachinings()
' Abilito registrazione progetto modificato
EgtEnableModified()
' Nascondo la macchina
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
EgtSetMachineLook(MCH_LOOK.TAB)
EgtDraw()
End If
' Dichiaro pagina non attiva
m_bActive = False
End Sub
Private Sub UpdateSimulOkBtn()
If m_bCutOk Then
SimulBtn.IsEnabled = True
SimulBtn.Foreground = Brushes.Black
OkBtn.IsEnabled = True
OkBtn.Foreground = Brushes.Black
Else
SimulBtn.IsEnabled = False
SimulBtn.Foreground = Brushes.DarkGray
OkBtn.IsEnabled = False
OkBtn.Foreground = Brushes.DarkGray
End If
End Sub
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
' deselezione il bottone per acquisizione
Point1Btn.IsChecked = False
' Verifico di essere il gestore attivo
If Not m_bActive Then Return
' Si può selezionare solo con il tasto sinistro e se stato NULL
If e.Button <> Windows.Forms.MouseButtons.Left Or
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
Return
End If
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
EgtEmptyGroup(m_nTempLay)
' Acquisisco punto da disegno
EgtUnProjectPoint(e.Location, m_ptPrev)
' Aggiusto Z punto acquisito (è in globale)
Dim dPtPrevZ As Double = m_ptPrev.z
m_ptPrev.z = m_ptRawMax.z
' Se direzione di vista calcolabile e da sopra posso aggiustare anche XY
Dim dAngVertDeg, dAngHorizDeg As Double
If EgtGetGenericView(dAngVertDeg, dAngHorizDeg) Then
Dim vtDir As Vector3d = Vector3d.FromSpherical(1, dAngVertDeg, dAngHorizDeg)
If vtDir.z > EPS_SMALL Then
m_ptPrev.z = dPtPrevZ
m_ptPrev += vtDir * (m_ptRawMax.z - m_ptPrev.z) / vtDir.z
End If
End If
' Visualizzo coordinate (rispetto a 0 tavola)
ShowCoord()
' Disegno crocetta che indica il punto acquisito
CreateCross(m_nTempLay, m_ptPrev)
EgtDraw()
End Sub
Private Sub PointModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PointModeCmBx.SelectionChanged
SetCoordVisibility(PointModeCmBx.SelectedIndex = PT_MODE.DRAW)
End Sub
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
EgtEmptyGroup(m_nTempLay)
' Reset punto non acquisito
m_bPointP1Ok = False
' Verifico configurazione tavola e grezzo
If Not m_bRawOk Then Return
' 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 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
' Ora imposto la lama corrente
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
' Altrimenti da lama
Else
' 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
End If
' Calcolo direzione asse lama
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
' Porto il tip nell'origine tavola
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
m_bPointP1Ok = True
' Altrimenti punto da click di mouse
Else
' Assegno punto selezionato nel disegno a m_ptTipP1
m_ptTipP1 = m_ptPrev
' 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
End If
' Disegno il taglio
CreateSingleDrill()
' Disegno la macchina nella sua posizione reale
SetMachineInCurrPos()
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
EgtDraw()
' Seleziono il bottone per indicare che il primo punto è stato acquisito
Point1Btn.IsChecked = True
End Sub
Private Sub GetDrillFromDrilling(ByRef sCurrDrill As String)
If String.IsNullOrEmpty(sCurrDrill) Or String.IsNullOrWhiteSpace(sCurrDrill) Then
' creo l'elenco degli utensili di foratura
Dim sToolName As String = String.Empty
Dim nType As Integer = MCH_TY.NONE
Dim DrillToolList As New ObservableCollection(Of String)
DrillToolList.Clear()
If EgtTdbGetFirstTool(MCH_TF.DRILLBIT, sToolName, nType) Then
DrillToolList.Add(sToolName)
While EgtTdbGetNextTool(MCH_TF.DRILLBIT, sToolName, nType)
DrillToolList.Add(sToolName)
End While
End If
' recupero l'utensile associato alla lavorazione
Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
Dim ToolString As String = String.Empty
EgtMdbSetCurrMachining(sCurrDrilling)
' Recupero nome utensile tramite TUUID
Dim sTuuid As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
EgtTdbGetToolFromUUID(sTuuid, ToolString)
Dim bToolExist As Boolean = False
For Each CurrTool As IEnumerable In DrillToolList
If CurrTool.ToString() = ToolString Then
bToolExist = True
Exit For
End If
Next
If bToolExist Then
sCurrDrill = ToolString
Else
sCurrDrill = String.Empty
End If
End If
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
StringToLen(XcoordTxBx.Text, dXcoord)
XcoordTxBx.Text = LenToString(dXcoord, 2)
' lo assegno al punto corrente (in 0 Macc)
m_ptPrev.x = dXcoord + m_ptTabOri.x
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
EgtEmptyGroup(m_nTempLay)
' Disegno crocetta che indica il punto acquisito
CreateCross(m_nTempLay, m_ptPrev)
EgtDraw()
End Sub
Private Sub YcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles YcoordTxBx.EgtClosed
' Recupero il valore della coordinata (in 0 Tab)
Dim dYcoord As Double = 0
StringToLen(YcoordTxBx.Text, dYcoord)
YcoordTxBx.Text = LenToString(dYcoord, 2)
' lo assegno al punto corrente (in 0 Macc)
m_ptPrev.y = dYcoord + m_ptTabOri.y
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
EgtEmptyGroup(m_nTempLay)
' Disegno crocetta che indica il punto acquisito
CreateCross(m_nTempLay, m_ptPrev)
EgtDraw()
End Sub
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
' Salvo il progetto con le lavorazioni
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
' Predispongo passaggio a simulazione
m_bSimul = True
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
m_MainWindow.m_ActivePage = MainWindow.Pages.Simulation
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
#If TRIAL Then
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
End If
' Verifico ci sia un taglio valido
If Not m_bCutOk Then Return
' Salvo il progetto con le lavorazioni
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
' Genero file CNC (lancio anche se errore in precedenza)
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
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
Return
End If
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
' lancio eventuale lua post-trasmissione
m_MainWindow.ExecSentProgScript(True)
End If
#End If
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
End Sub
Private Function CreateSingleDrill() As Boolean
' Verifico sia definito il punto iniziale e il grezzo
If Not m_bPointP1Ok Or Not m_bRawOk Then
m_bCutOk = False
Return False
End If
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
EgtEmptyGroup(m_nTempLay)
' Spessore grezzo
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
' Recupero spessore lama corrente
Dim sDrill As String = m_sCurrDrill
GetDrillFromDrilling(sDrill)
EgtTdbSetCurrTool(sDrill)
Dim dDiam As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
' 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)
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)
' Aggiungo crocetta/e
If m_bPointP1Ok Then
CreateCross(nCrossLayerId, ptStart)
End If
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
' Calcolo punto di inserimento nel grezzo
Dim ptMin, ptMax As Point3d
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
Dim ptIns As Point3d = ptMin + (m_ptTabOri - m_ptRawMin)
ptIns.z = dRawHeight
' Inserisco il pezzo nel grezzo
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
' Inserisco la lavorazione
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
EgtSetCurrPhase(1)
' Eventuale eliminazione Home finale
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
RemoveFinalHome()
End If
UpdateSimulOkBtn()
Return m_bCutOk
End Function
' crea una croce nel punto indicato e rappresenta il diametro dell'utensile corrente
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
' Aggiungo crocette
ptP += New Vector3d(0, 0, 0.15)
Dim vtCrossX As New Vector3d(20, 0, 0)
Dim vtCrossY As New Vector3d(0, 20, 0)
Dim nCrossId1 = EgtCreateLine(nLayerId, ptP + (-vtCrossX), ptP + vtCrossX)
EgtSetColor(nCrossId1, New Color3d(255, 0, 0))
Dim nCrossId2 = EgtCreateLine(nLayerId, ptP + (-vtCrossY), ptP + vtCrossY)
EgtSetColor(nCrossId2, New Color3d(255, 0, 0))
Dim nPntId = EgtCreateGeoPoint(nLayerId, ptP)
EgtSetColor(nPntId, New Color3d(255, 0, 0))
Dim nCirleId = EgtCreateCircle(nLayerId, ptP, m_dDiameter / 2)
EgtSetColor(nCirleId, New Color3d(0, 255, 0))
Return True
End Function
Private Sub SetCoordVisibility(bShow As Boolean)
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
End Sub
Private Sub ShowCoord()
Dim ptText As Point3d = m_ptPrev
ptText.ToLoc(New Frame3d(m_ptTabOri))
XcoordTxBx.Text = LenToString(ptText.x, 2)
YcoordTxBx.Text = LenToString(ptText.y, 2)
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
End Class
+20 -5
View File
@@ -165,12 +165,13 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="0.55*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<!--<RowDefinition Height="1*"/>-->
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- Altezza delle alette -->
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2" <TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
Text="Offset" Text="Offset"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
@@ -187,12 +188,15 @@
Width="60" Height="30" Margin="0,0,0,0" Width="60" Height="30" Margin="0,0,0,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/> Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<!-- Delta angolo (abilitato solo per i frontalini) -->
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2" <TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
Text="Offset2" Text="Offset2"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/> FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<!-- temporaneamente disabilito la definizione delta angolo per alzatine -->
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx" <EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
IsEnabled="False"
Visibility="Collapsed"
Grid.Column="2" Grid.Row="1" Grid.Column="2" Grid.Row="1"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Width="60" Height="30" Margin="0,0,0,0" Width="60" Height="30" Margin="0,0,0,0"
@@ -203,6 +207,17 @@
Width="60" Height="30" Margin="0,0,0,0" Width="60" Height="30" Margin="0,0,0,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/> Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<!-- 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}"/>
<!--Gestisco nello spazio di una TextBox due TextBoxs--><!-- <!--Gestisco nello spazio di una TextBox due TextBoxs--><!--
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" > <UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx" <EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
@@ -236,7 +251,7 @@
Width="85" Height="30" Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>--> Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="2"> <UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
<!--questo bottone è stato creato solo per garantire il corretto allinaemento--> <!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
<Button Name="Vuoto" Visibility="Hidden"/> <Button Name="Vuoto" Visibility="Hidden"/>
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front--> <!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
+110 -33
View File
@@ -20,6 +20,7 @@ Public Class AlzFrontUC
' nome della info riferita alle alzatine e ai frontalini (1=Alz, 2=Front, 0=niente) ' nome della info riferita alle alzatine e ai frontalini (1=Alz, 2=Front, 0=niente)
Private Const INFO_ALZFRONT As String = "AF" Private Const INFO_ALZFRONT As String = "AF"
Private Const INFO_ENABLE As String = "EnableAF"
' Properties ' Properties
Private m_sCompoDir As String = String.Empty Private m_sCompoDir As String = String.Empty
@@ -46,6 +47,8 @@ Public Class AlzFrontUC
' raggio circoscritto al pezzo ' raggio circoscritto al pezzo
Private m_dBBoxRad As Double Private m_dBBoxRad As Double
' dimensione dei caratteri
Private m_dH As Double
Private Sub AlzFrontPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Private Sub AlzFrontPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -66,16 +69,16 @@ Public Class AlzFrontUC
' nascondo il bottone Back della pagina Draw ' nascondo il bottone Back della pagina Draw
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Visibility.Hidden m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Visibility.Hidden
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Hidden m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Hidden
' Abilito bottoni angoli di fianco e lavorazioni da sotto ' Disabilito bottoni angoli di fianco e lavorazioni da sotto
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = False
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = True m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
' nome dei parametri condivisi ' nome dei parametri condivisi
Parameter1TxBl.Text = "Altezza" Parameter1TxBl.Text = "Altezza"
Parameter2TxBl.Text = "Delta angolo" Parameter2TxBl.Text = "Delta angolo"
Parameter5TxBl.Text = "Spessore"
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
End Sub End Sub
@@ -97,6 +100,7 @@ Public Class AlzFrontUC
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile) GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile) GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile) GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
Parameter5TxBx.Text = Utility.LenToString(m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight, 2)
' Imposto contesto corrente ' Imposto contesto corrente
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx()) EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
@@ -137,30 +141,41 @@ Public Class AlzFrontUC
' inserisco il lato nella lista ' inserisco il lato nella lista
While CurrLine <> GDB_ID.NULL While CurrLine <> GDB_ID.NULL
' escludo tutte le forme che non sono delle linee Dim NextId As Integer = EgtGetNext(CurrLine)
If EgtGetType(CurrLine) = GDB_TY.CRV_LINE Then If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup(LoopId)
' Aggiungo il lato alla lista di quelli su cui è possibile mettere una alzatina o un frontalino If VerifySideAnglePossible(PrevLine, CurrLine, NextId, bOutLoop) Then
Dim sNameCurrLine As String = String.Empty
Dim nInfo As Integer = 0
EgtSetName(CurrLine, "A" & nEntityIndex.ToString)
EgtGetName(CurrLine, sNameCurrLine)
' inserisco la numerazione dei lati della figura
AddTextToLine(sNameCurrLine, LabelId, CurrLine, 20, m_dBBoxRad, True)
' recupero l'informazione
EgtGetInfo(CurrLine, INFO_ALZFRONT, nInfo)
If nInfo = 1 Then
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.ALZATINA))
ElseIf nInfo = 2 Then
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.FRONTALINO))
Else
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine))
End If
nEntityIndex += 1
Else
EgtSetName(CurrLine, "B" & nOtherIndex.ToString)
nOtherIndex = nOtherIndex + 1
End If
If ApprovedSideToAlzFront(CurrLine) Then
' Aggiungo il lato alla lista di quelli su cui è possibile mettere una alzatina o un frontalino
Dim sNameCurrLine As String = String.Empty
Dim nInfo As Integer = 0
Dim dSideAng As Integer = 0
EgtSetName(CurrLine, "A" & nEntityIndex.ToString)
EgtGetName(CurrLine, sNameCurrLine)
' inserisco la numerazione dei lati della figura
AddTextToLine(sNameCurrLine, LabelId, CurrLine, 20, m_dBBoxRad, True)
' recupero l'informazione
EgtGetInfo(CurrLine, INFO_ALZFRONT, nInfo)
If nInfo = 1 Then
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.ALZATINA))
ElseIf nInfo = 2 Then
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.FRONTALINO))
Else
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine))
End If
' inserisco riferimento univoco al lato (solo se non esiste)
Dim sInfoRef As String = String.Empty
EgtGetInfo(CurrLine, "RefAF", sInfoRef)
If String.IsNullOrEmpty(sInfoRef) Then
Dim sRefGUID As String = System.Guid.NewGuid().ToString()
EgtSetInfo(CurrLine, "RefAF", sRefGUID)
End If
nEntityIndex += 1
Else
EgtSetName(CurrLine, "B" & nOtherIndex.ToString)
nOtherIndex = nOtherIndex + 1
End If
End If
PrevLine = CurrLine PrevLine = CurrLine
CurrLine = EgtGetNext(CurrLine) CurrLine = EgtGetNext(CurrLine)
End While End While
@@ -190,8 +205,8 @@ Public Class AlzFrontUC
End If End If
End If End If
End If End If
' aggiungo l'Info che comunica se il lato è stato modificato
InitList()
End Sub End Sub
@@ -264,14 +279,52 @@ Public Class AlzFrontUC
bInternalSelection = False bInternalSelection = False
End Sub End Sub
' restituisce vero se il lato possiede delle info legate al sideangle
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
Dim sInfoSideAngle As String = String.Empty
EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, sInfoSideAngle)
If Not String.IsNullOrWhiteSpace(sInfoSideAngle) Or Not String.IsNullOrEmpty(sInfoSideAngle) Then
' verifico che il dato salvato sia un double
Try
Dim dSideAngle As Double = 0
StringToDouble(sInfoSideAngle, dSideAngle)
If dSideAngle <> 0 Then
Return True
End If
Catch ex As Exception
End Try
End If
Return False
End Function
' restituisce vero se il lato possiede delle info legate alle alette
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
Dim sInfoAlzFront As String = String.Empty
EgtGetInfo(nCurrLine, INFO_ALZFRONT, sInfoAlzFront)
If Not String.IsNullOrWhiteSpace(sInfoAlzFront) Or Not String.IsNullOrEmpty(sInfoAlzFront) Then
If sInfoAlzFront.Trim <> "0" Then
Return True
End If
End If
Return False
End Function
' approvo la costruzione dell'aletta sul lato indicato
Private Function ApprovedSideToAlzFront(nCurrLine As Integer) As Boolean
If VerifyIsThereSideAngle(nCurrLine) And Not VerifyIsThereAlzFront(nCurrLine) Then
' se esiste SideAngle e un'aletta allora NON approvo
Return False
End If
Return True
End Function
' Permette di aggiugere accanto alla linea passata ' Permette di aggiugere accanto alla linea passata
Friend Function AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double, Friend Function AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double,
dBBoxRad As Double, bTextExt As Boolean, Optional bRot As Boolean = False) As Integer dBBoxRad As Double, bTextExt As Boolean, Optional bRot As Boolean = False) As Integer
' Calcolo altezza testo ' Calcolo altezza testo
Dim dH As Double = 0.05 * dBBoxRad m_dH = 0.05 * dBBoxRad
' Creo testo ' Creo testo
Dim nText As Integer = EgtCreateTextAdv(TextLayer, Point3d.ORIG(), 0, sText, "", 500, False, dH, 1, 0, INS_POS.MC) Dim nText As Integer = EgtCreateTextAdv(TextLayer, Point3d.ORIG(), 0, sText, "", 500, False, m_dH, 1, 0, INS_POS.MC)
' Calcolo posizionamento ' Calcolo posizionamento
' BBox del testo e suo centro ' BBox del testo e suo centro
Dim ptMinBBox As Point3d Dim ptMinBBox As Point3d
@@ -612,6 +665,13 @@ Public Class AlzFrontUC
LoadCurrentCompo() LoadCurrentCompo()
End Sub End Sub
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
Dim dValue As Double
StringToDouble(Parameter5TxBx.Text, dValue)
' aggiorno il disegno
LoadCurrentCompo()
End Sub
#End Region ' Altezza, delta angolo di spoglia #End Region ' Altezza, delta angolo di spoglia
#Region "METHODS" #Region "METHODS"
@@ -659,6 +719,13 @@ Public Class AlzFrontUC
Return sSideName Return sSideName
End Function End Function
Private Sub InitList()
' quando avvio la pagina inizializzo tutti i lati comunicando che non sono stati modificati
For j As Integer = 0 To AlzFrontEntityList.Count() - 1
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 0)
Next
End Sub
' aggiorno lo stato della dell'oggetto ' aggiorno lo stato della dell'oggetto
Private Sub RefreshList(sSideName As String, sOppositeNameCheck As String, bIsAlz As Boolean, bIsChecked As Boolean) Private Sub RefreshList(sSideName As String, sOppositeNameCheck As String, bIsAlz As Boolean, bIsChecked As Boolean)
For j As Integer = 0 To AlzFrontEntityList.Count() - 1 For j As Integer = 0 To AlzFrontEntityList.Count() - 1
@@ -668,6 +735,7 @@ Public Class AlzFrontUC
AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.NONE AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.NONE
' insrisco l'informazione nelle info del lato ' insrisco l'informazione nelle info del lato
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 0) EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 0)
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
Exit For Exit For
End If End If
' se selezione di Alz. o Front. ' se selezione di Alz. o Front.
@@ -680,6 +748,7 @@ Public Class AlzFrontUC
End If End If
' insrisco l'informazione nelle info del lato ' insrisco l'informazione nelle info del lato
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 1) EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 1)
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
Else Else
AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.FRONTALINO AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.FRONTALINO
' deseleziono il Check opposto ' deseleziono il Check opposto
@@ -689,6 +758,7 @@ Public Class AlzFrontUC
End If End If
' inserisco l'informazione nelle info del lato ' inserisco l'informazione nelle info del lato
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 2) EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 2)
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
End If End If
' termino il ciclo ' termino il ciclo
Exit For Exit For
@@ -737,6 +807,13 @@ Public Class AlzFrontUC
If StringToLen(Parameter2FTxBx.Text, dVal) Then If StringToLen(Parameter2FTxBx.Text, dVal) Then
EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal) EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal)
End If End If
If StringToLen(Parameter5TxBx.Text, dVal) Then
EgtLuaSetGlobNumVar("CMP.ThicknessRaw", dVal)
End If
' parametri per la scrittura dei caratteri
EgtLuaSetGlobNumVar("CMP.BBoxRad", m_dBBoxRad)
EgtLuaSetGlobNumVar("CMP.HeightText", m_dH)
Dim sMsg As String = String.Empty Dim sMsg As String = String.Empty
' eseguo la funzione per il disegno della componente (CMP_Draw) ' eseguo la funzione per il disegno della componente (CMP_Draw)
+225 -5
View File
@@ -105,6 +105,9 @@ Public Class DrawPageUC
Return m_nSelectedLayer Return m_nSelectedLayer
End Get End Get
End Property End Property
Public Sub SetCurrLayer(ByVal nCurrLayer As Integer)
m_nSelectedLayer = nCurrLayer
End Sub
Enum Pages Enum Pages
MainComponent MainComponent
@@ -212,6 +215,14 @@ Public Class DrawPageUC
Dim DstLnColor As New Color3d(255, 0, 0) Dim DstLnColor As New Color3d(255, 0, 0)
GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor, m_MainWindow.GetIniFile()) GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor, m_MainWindow.GetIniFile())
DrawScene.SetDistLineMaterial(DstLnColor) DrawScene.SetDistLineMaterial(DstLnColor)
'' imposto il colore di sfondo del disegno
'Dim BAckTopColor As New Color3d(192, 192, 192)
'GetPrivateProfileColor(S_SCENE, "BackTop", BAckTopColor, m_MainWindow.GetIniFile())
'Dim BackBottom As New Color3d(192, 192, 192)
'GetPrivateProfileColor(S_SCENE, "BackBottom", BackBottom, m_MainWindow.GetIniFile())
'DrawScene.SetViewBackground(BAckTopColor, BackBottom)
' imposto parametri OpenGL ' imposto parametri OpenGL
Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3, m_MainWindow.GetIniFile()) Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3, m_MainWindow.GetIniFile())
Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1, m_MainWindow.GetIniFile()) <> 0) Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1, m_MainWindow.GetIniFile()) <> 0)
@@ -705,10 +716,6 @@ Public Class DrawPageUC
EgtSetCurrentContext(DrawScene.GetCtx()) EgtSetCurrentContext(DrawScene.GetCtx())
' Cancello layer regioni per selezione buchi ' Cancello layer regioni per selezione buchi
Dim Pz As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT) Dim Pz As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
' ciclo su tutti i pezzi presenti nel file nge
Dim NxtPz As Integer = EgtGetNextGroup(Pz)
Dim SelectRegion As Integer = EgtGetFirstNameInGroup(Pz, "SelectRegion") Dim SelectRegion As Integer = EgtGetFirstNameInGroup(Pz, "SelectRegion")
EgtErase(SelectRegion) EgtErase(SelectRegion)
' Cancello layer etichette, quotatura,ausiliario e box ' Cancello layer etichette, quotatura,ausiliario e box
@@ -873,6 +880,218 @@ Public Class DrawPageUC
Return True Return True
End Function End Function
' permette di inserire più di un part
Private Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
Dim InsertColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
' Imposto il contesto corrente
EgtSetCurrentContext(DrawScene.GetCtx())
Dim Pz As Integer = -1
Dim NxtPz As Integer = -1
' Cancello layer regioni per selezione buchi
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
While Pz <> -1
' imposto il contesto corrente
EgtSetCurrentContext(DrawScene.GetCtx())
' cerco un altro pezzo nell'elenco
NxtPz = EgtGetNextPart(Pz)
Dim SelectRegion As Integer = EgtGetFirstNameInGroup(Pz, "SelectRegion")
EgtErase(SelectRegion)
' Cancello layer etichette, quotatura,ausiliario e box
EgtErase(EgtGetFirstNameInGroup(Pz, "LayAux"))
EgtErase(EgtGetFirstNameInGroup(Pz, "Etichette"))
EgtErase(EgtGetFirstNameInGroup(Pz, "Quotature"))
EgtErase(EgtGetFirstNameInGroup(Pz, "Box"))
' Cancello layer etichette dei componenti interni (buchi)
Dim nHLId As Integer = EgtGetFirstNameInGroup(Pz, "HoleLabels")
While nHLId <> GDB_ID.NULL
EgtErase(nHLId)
nHLId = EgtGetFirstNameInGroup(Pz, "HoleLabels")
End While
' Attivo visualizzazione misura
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(Pz, NAME_REGION)
Dim nId As Integer = EgtGetFirstInGroup(nRegLayId)
While nId <> GDB_ID.NULL
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
EgtSetStatus(nId, GDB_ST.ON_)
End If
nId = EgtGetNext(nId)
End While
' Calcolo dimensione ingombro Pezzo tramite OutLoop
Dim nOutLoopLayer = EgtGetFirstNameInGroup(Pz, NAME_OUTLOOP)
Dim b3Part As New BBox3d
EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, b3Part)
' Muovo la regione in Z per evitare problemi in visualizzazione
EgtMove(nRegLayId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
' Se pezzo con dati TRF
If m_bTrfData Then
' Nome da dati Trf
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
While nTextId <> GDB_ID.NULL
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
Dim sText As String = m_TrfOrderCode & "-" & m_TrfOrderDesc
Dim sText2 As String = m_TrfMatCode & "-" & m_TrfSurfCode
Dim sText3 As String = LenToString(b3Part.DimX(), 0) & " x " & LenToString(b3Part.DimY(), 0) & " x " & LenToString(m_TrfThickness, 0)
Dim dRatio As Double = Math.Max(b3Part.DimX(), b3Part.DimY()) / Math.Min(b3Part.DimX(), b3Part.DimY())
If dRatio < 5 Then
sText = sText & "<br/>" & sText2 & "<br/>" & sText3
Else
sText = sText & " " & sText2 & " " & sText3
End If
EgtModifyText(nTextId, sText)
Dim ptCen As Point3d
EgtCenterPoint(nTextId, ptCen)
Dim b3Text As New BBox3d
EgtGetBBoxGlob(nTextId, GDB_BB.STANDARD, b3Text)
Dim dCoeff As Double = Math.Min(b3Part.DimX() / b3Text.DimX(), b3Part.DimY() / b3Text.DimY()) / 1.25
If dCoeff < 1 Then EgtScale(nTextId, New Frame3d(ptCen), dCoeff, dCoeff, dCoeff)
Exit While
End If
nTextId = EgtGetNext(nTextId)
End While
' Info di pezzo da dati Trf
EgtSetInfo(Pz, "OC", m_TrfOrderCode)
EgtSetInfo(Pz, "OD", m_TrfOrderDesc)
EgtSetInfo(Pz, "PC", m_TrfPartCode)
EgtSetInfo(Pz, "MT", m_TrfMatCode)
EgtSetInfo(Pz, "SRF", m_TrfSurfCode)
EgtSetInfo(Pz, "L", DoubleToString(b3Part.DimX(), 1))
EgtSetInfo(Pz, "W", DoubleToString(b3Part.DimY(), 1))
EgtSetInfo(Pz, "T", m_TrfThickness)
EgtSetInfo(Pz, "V1", DoubleToString(b3Part.DimX(), 1))
EgtSetInfo(Pz, "V2", DoubleToString(b3Part.DimY(), 1))
' Se altrimenti pezzo con dati Csv
ElseIf m_bCsvData Then
' Nome del pezzo
EgtSetName(Pz, m_sCsvName)
' Dati Csv
EgtSetInfo(Pz, INFO_CSV_PART, m_sCsvName)
EgtSetInfo(Pz, INFO_CSV_ORD, m_sCsvOrder)
EgtSetInfo(Pz, INFO_CSV_DIST, m_sCsvList)
EgtSetInfo(Pz, INFO_CSV_MAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
EgtSetInfo(Pz, INFO_CSV_V1, DoubleToString(b3Part.DimX(), 1))
EgtSetInfo(Pz, INFO_CSV_V2, DoubleToString(b3Part.DimY(), 1))
' Se definito nome lo inserisco nel testo
If Not String.IsNullOrWhiteSpace(m_sCsvName) Then
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
While nTextId <> GDB_ID.NULL
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
Dim sText As String = String.Empty
EgtTextGetContent(nTextId, sText)
Dim sNewText = m_sCsvName & "<br/>" & sText
EgtModifyText(nTextId, sNewText)
Exit While
End If
nTextId = EgtGetNext(nTextId)
End While
End If
' Altrimenti pezzo con dati normali
Else
' Se definito nome lo inserisco nel testo
If Not String.IsNullOrWhiteSpace(sName) Then
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
While nTextId <> GDB_ID.NULL
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
Dim sText As String = String.Empty
EgtTextGetContent(nTextId, sText)
Dim sNewText = sName & "<br/>" & sText
EgtModifyText(nTextId, sNewText)
Exit While
End If
nTextId = EgtGetNext(nTextId)
End While
End If
End If
' Eventuale testo per indicare il sopra (solo nel caso di rettangolo)
If TopChBx.IsVisible() And TopChBx.IsChecked() Then
Utility.AddTopToPartRegion(nRegLayId)
End If
' Scrivo testi per nesting
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
' Imposto colore testi
Utility.SetTextColor(nRegLayId)
' Imposto il colore del pezzo inserito nel progetto
EgtSetColor(nRegLayId, InsertColor)
Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
While EntId <> GDB_ID.NULL
If EgtGetType( EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
EntId = EgtGetNext(EntId)
End While
' Esporto il pezzo in un file temporaneo
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPartCompo.Nge"
If Not EgtSaveObjToFile(Pz, sTmpFile, NGE.BIN) Then
Return False
End If
' Passo al contesto principale
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
' Elimino eventuali precedenti pezzi vuoti
EgtEraseEmptyParts()
' Area dei nuovi pezzi
Dim dNewArea As Double = 0
' Se esiste il file del pezzo
If My.Computer.FileSystem.FileExists(sTmpFile) Then
' eseguo inserimento
For i As Integer = 1 To nNbr
' Inserisco il pezzo
EgtInsertFile(sTmpFile)
' Ne recupero l'Id
Dim nId2 As Integer = EgtGetLastPart()
' Aggiusto per lavorazioni
EgtAdjustFlatPart(nId2)
' Se dati Trf assegno nome univoco
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
' Aggiorno l'area dei nuovi pezzi
dNewArea += GeomCalc.GetPartArea(nId2)
' Inserisco in parcheggio
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
' verifico che il pezzo sia un Piano Cucina o un Piano Bagno o un'Aletta
Dim sCMP As String = String.Empty
EgtGetInfo(nId2, "CMP", sCMP)
If sCMP.StartsWith("PCucina") Or sCMP.StartsWith("PBagno") Or sCMP.StartsWith("AlzFront") Then
' Aggiungo riferimento e lo inserisco in VeinMatching
VeinMatching.SetRefOnPart(nId2)
VeinMatching.AddPartFromDraw(nId2)
' Se richiesto posizionamento diretto, lo eseguo
If bDirect Then
If m_MainWindow.m_CadCutPageUC.m_NestPage.InsertOnePart(nId2) Then
' Eventuale notifica al VeinMatching
VeinMatching.OnInsertPartInRaw(nId2)
End If
End If
End If
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
Next
' Cancello il file
My.Computer.FileSystem.DeleteFile(sTmpFile)
End If
' Aggiorno Aree totale
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea(dNewArea)
' passo al pezzo successivo
Pz = NxtPz
End While
' Aggiorno Aree da lavorare dei pezzi
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
' Aggiorno ambiente principale
EgtZoom(ZM.ALL)
Return True
End Function
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
m_bBackFromInternalCompo = False m_bBackFromInternalCompo = False
m_bInternalCompo = False m_bInternalCompo = False
@@ -887,7 +1106,8 @@ Public Class DrawPageUC
' Leggo numero di pezzi da inserire ' Leggo numero di pezzi da inserire
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text) Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
' Passo al contesto principale ' Passo al contesto principale
MakeInsert(InsNbr, sPartName) 'MakeInsert(InsNbr, sPartName)
MakeMultipleInsert(InsNbr, sPartName)
' Aggiorno ambiente principale ' Aggiorno ambiente principale
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
' Elimino nome del componente precedente ' Elimino nome del componente precedente
+36
View File
@@ -576,6 +576,36 @@ Public Class ImportPageUC
End If End If
End Sub End Sub
' metodo utilizzato per definire il colore dei pezzi DXF importati
Private Sub ColorRegion(nCtx As Integer)
' Leggo dati corrispondenza colore
Dim InsertColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
' Imposto contesto corrente
EgtSetCurrentContext(nCtx)
' Ciclo sui pezzi
Dim PartId As Integer = EgtGetFirstPart()
While PartId <> GDB_ID.NULL
' Ciclo sui layer delle regioni
Dim RegionId As Integer = EgtGetFirstNameInGroup(PartId, NAME_REGION)
While RegionId <> GDB_ID.NULL
EgtSetColor(RegionId, InsertColor)
' 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)
EntId = EgtGetNext(EntId)
End While
RegionId = EgtGetNextName(PartId, NAME_REGION)
End While
' passo al pezzo successico
PartId = EgtGetNextPart(PartId)
End While
' Aggiorno scritte per angoli sui lati
WriteSideAngleForNest(nCtx)
End Sub
Private Sub UseLayerBtn_Click(sender As Object, e As RoutedEventArgs) Handles UseLayerBtn.Click Private Sub UseLayerBtn_Click(sender As Object, e As RoutedEventArgs) Handles UseLayerBtn.Click
' Creo i pezzi ' Creo i pezzi
Dim nType As Integer = If(m_nFileType = FT.NGE, FPC_TYPE.NGE, FPC_TYPE.LAYER) Dim nType As Integer = If(m_nFileType = FT.NGE, FPC_TYPE.NGE, FPC_TYPE.LAYER)
@@ -589,6 +619,8 @@ Public Class ImportPageUC
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
Engrave.ColorToEngrave(ImportScene.GetCtx()) Engrave.ColorToEngrave(ImportScene.GetCtx())
End If End If
' gestico il colore degli elementi da importare (devono avere una regione definita!
ColorRegion(ImportScene.GetCtx())
' Eseguo zoom ' Eseguo zoom
ImportScene.ZoomAll() ImportScene.ZoomAll()
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert ' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
@@ -619,6 +651,8 @@ Public Class ImportPageUC
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
Engrave.ColorToEngrave(ImportScene.GetCtx()) Engrave.ColorToEngrave(ImportScene.GetCtx())
End If End If
' gestico il colore degli elementi da importare (devono avere una regione definita!
ColorRegion(ImportScene.GetCtx())
' Eseguo zoom ' Eseguo zoom
ImportScene.ZoomAll() ImportScene.ZoomAll()
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert ' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
@@ -649,6 +683,8 @@ Public Class ImportPageUC
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
Engrave.ColorToEngrave(ImportScene.GetCtx()) Engrave.ColorToEngrave(ImportScene.GetCtx())
End If End If
' gestico il colore degli elementi da importare (devono avere una regione definita!
ColorRegion(ImportScene.GetCtx())
' Eseguo zoom ' Eseguo zoom
ImportScene.ZoomAll() ImportScene.ZoomAll()
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert ' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
+4 -4
View File
@@ -24,7 +24,7 @@ Public Class InternalComponentPageUC
ImageCompo9.Visibility = Windows.Visibility.Hidden ImageCompo9.Visibility = Windows.Visibility.Hidden
LabelCompo9.Visibility = Windows.Visibility.Visible LabelCompo9.Visibility = Windows.Visibility.Visible
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no ' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
Dim nCount As Integer = GetPrivateProfileInt("InternalCompo", "Count", 0, m_MainWindow.GetIniFile()) Dim nCount As Integer = GetPrivateProfileInt(S_INTCOMPO, K_INT_COUNT, 0, m_MainWindow.GetIniFile())
If nCount > 8 Then If nCount > 8 Then
Compo9.Visibility = Windows.Visibility.Visible Compo9.Visibility = Windows.Visibility.Visible
Else Else
@@ -163,10 +163,10 @@ Public Class InternalComponentPageUC
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
CurrentBtn = e.Source CurrentBtn = e.Source
Dim CompoName As String = "InternalCompo" & GetIndexFromButton(CurrentBtn).ToString Dim CompoName As String = S_INTCOMPO & GetIndexFromButton(CurrentBtn).ToString
m_sCurrCompoFam = CompoName m_sCurrCompoFam = CompoName
' m_SecondaryComponentPage.m_sCurrCompo = String.Empty ' m_SecondaryComponentPage.m_sCurrCompo = String.Empty
Dim nCount As Integer = GetPrivateProfileInt(CompoName, "Count", 0, m_MainWindow.GetIniFile()) Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
If nCount > 1 Then If nCount > 1 Then
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me) m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent
@@ -252,7 +252,7 @@ Public Class InternalComponentPageUC
Private Sub LoadPage() Private Sub LoadPage()
Dim nDeltaSecondPage As Integer = 8 Dim nDeltaSecondPage As Integer = 8
' Leggo numero di componenti presenti ' Leggo numero di componenti presenti
Dim nCompoNumber As Integer = GetPrivateProfileInt("InternalCompo", "Count", 0, m_MainWindow.GetIniFile()) Dim nCompoNumber As Integer = GetPrivateProfileInt(S_INTCOMPO, K_INT_COUNT, 0, m_MainWindow.GetIniFile())
' Calcolo indici a seconda della pagina in cui sono ' Calcolo indici a seconda della pagina in cui sono
If m_bIsFirstPage Then If m_bIsFirstPage Then
ClearButton(nCompoNumber) ClearButton(nCompoNumber)
+3 -3
View File
@@ -167,10 +167,10 @@ Public Class MainComponentPageUC
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
CurrentBtn = DirectCast(e.Source, Button) CurrentBtn = DirectCast(e.Source, Button)
Dim CompoName As String = "Compo" & GetIndexFromButton(CurrentBtn).ToString Dim CompoName As String = S_COMPO & GetIndexFromButton(CurrentBtn).ToString
m_sCurrCompoFam = CompoName m_sCurrCompoFam = CompoName
m_SecondaryComponentPage.m_sCurrCompo = String.Empty m_SecondaryComponentPage.m_sCurrCompo = String.Empty
Dim nCount As Integer = GetPrivateProfileInt(CompoName, "Count", 0, m_MainWindow.GetIniFile()) Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
If nCount > 1 Then If nCount > 1 Then
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me) m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent
@@ -253,7 +253,7 @@ Public Class MainComponentPageUC
Private Sub LoadPage() Private Sub LoadPage()
Dim nDeltaSecondPage As Integer = 8 Dim nDeltaSecondPage As Integer = 8
' Leggo numero di componenti presenti ' Leggo numero di componenti presenti
Dim nCompoNumber As Integer = GetPrivateProfileInt("Compo", "Count", 0, m_MainWindow.GetIniFile()) Dim nCompoNumber As Integer = GetPrivateProfileInt(S_COMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
' Calcolo indici a seconda della pagina in cui sono ' Calcolo indici a seconda della pagina in cui sono
If m_bIsFirstPage Then If m_bIsFirstPage Then
ClearButton(nCompoNumber) ClearButton(nCompoNumber)
+4 -4
View File
@@ -26,17 +26,17 @@ Public Class SecondaryComponentPageUC
Dim ImageConverter As New ImageSourceConverter Dim ImageConverter As New ImageSourceConverter
Dim ThicknessConverter As New ThicknessConverter Dim ThicknessConverter As New ThicknessConverter
m_sMainCompoName = m_MainComponentPage.m_sCurrCompoFam '"Compo" & m_MainComponentPage.GetIndexFromButton(CurrentMainBtn) m_sMainCompoName = m_MainComponentPage.m_sCurrCompoFam
'Assegnazione immagine e testo ai Button 'Assegnazione immagine e testo ai Button
Dim nCount As Integer = GetPrivateProfileInt(m_sMainCompoName, "Count", 0, m_MainWindow.GetIniFile()) Dim nCount As Integer = GetPrivateProfileInt(m_sMainCompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
ClearButton(nCount) ClearButton(nCount)
For index As Integer = 1 To nCount For index As Integer = 1 To nCount
Dim CustomThickness As Thickness = ThicknessConverter.ConvertFromString("0") Dim CustomThickness As Thickness = ThicknessConverter.ConvertFromString("0")
Dim nCompoName As Integer = GetPrivateProfileInt(m_sMainCompoName, "Compo" & index, 0, m_MainWindow.GetIniFile()) Dim nCompoName As Integer = GetPrivateProfileInt(m_sMainCompoName, S_EXTCOMPO & index, 0, m_MainWindow.GetIniFile())
Dim sCompo As String = "" Dim sCompo As String = ""
Dim sCompoImage As String = "" Dim sCompoImage As String = ""
m_MainComponentPage.GetPrivateProfileCompo(m_sMainCompoName, "Compo" & index, nCompoName, sCompo, sCompoImage, m_MainWindow.GetIniFile()) m_MainComponentPage.GetPrivateProfileCompo(m_sMainCompoName, S_EXTCOMPO & index, nCompoName, sCompo, sCompoImage, m_MainWindow.GetIniFile())
Dim sCompoImageSource As ImageSource Dim sCompoImageSource As ImageSource
'verifico presenza immagine e la aggiungo 'verifico presenza immagine e la aggiungo
+13 -13
View File
@@ -201,7 +201,7 @@ Module SideAngle
Friend Sub ColorToSideAngle(nCtx As Integer) Friend Sub ColorToSideAngle(nCtx As Integer)
' Leggo dati corrispondenza colore-angolo ' Leggo dati corrispondenza colore-angolo
Dim CurrCSA As New ColorSideAngs Dim CurrCSA As New ColorSideAngs
CurrCSA.Read( m_MainWindow.GetIniFile) CurrCSA.Read(m_MainWindow.GetIniFile)
' Imposto contesto corrente ' Imposto contesto corrente
EgtSetCurrentContext(nCtx) EgtSetCurrentContext(nCtx)
' Ciclo sui pezzi ' Ciclo sui pezzi
@@ -212,27 +212,27 @@ Module SideAngle
Dim LoopId As Integer = EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP) Dim LoopId As Integer = EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP)
While LoopId <> GDB_ID.NULL While LoopId <> GDB_ID.NULL
' Ciclo sulle curve ' Ciclo sulle curve
Dim PrevId As Integer = EgtGetLastInGroup( LoopId) Dim PrevId As Integer = EgtGetLastInGroup(LoopId)
Dim EntId As Integer = EgtGetFirstInGroup( LoopId) Dim EntId As Integer = EgtGetFirstInGroup(LoopId)
While EntId <> GDB_ID.NULL While EntId <> GDB_ID.NULL
Dim NextId As Integer = EgtGetNext( EntId) Dim NextId As Integer = EgtGetNext(EntId)
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup( LoopId) If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup(LoopId)
If VerifySideAnglePossible( PrevId, EntId, NextId, bOutLoop) Then If VerifySideAnglePossible(PrevId, EntId, NextId, bOutLoop) Then
Dim colEnt As Color3d Dim colEnt As Color3d
If EgtGetColor( EntId, colEnt) Then If EgtGetColor(EntId, colEnt) Then
Dim dAng As Double Dim dAng As Double
Dim dHeel As Double Dim dHeel As Double
If CurrCSA.GetSideAngHeel( colEnt, dAng, dHeel) Then If CurrCSA.GetSideAngHeel(colEnt, dAng, dHeel) Then
EgtSetInfo( EntId, INFO_SIDE_ANGLE, dAng) EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
EgtSetInfo( EntId, INFO_ORIG_SIDE_ANGLE, dAng) EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
EgtSetInfo( EntId, INFO_HEEL, dHeel) EgtSetInfo(EntId, INFO_HEEL, dHeel)
End If End If
End If End If
End If End If
PrevId = EntId PrevId = EntId
EntId = EgtGetNext( EntId) EntId = EgtGetNext(EntId)
End While End While
If bOutLoop then If bOutLoop Then
bOutLoop = False bOutLoop = False
LoopId = EgtGetFirstNameInGroup(PartId, NAME_INLOOP) LoopId = EgtGetFirstNameInGroup(PartId, NAME_INLOOP)
Else Else
+25 -8
View File
@@ -75,10 +75,12 @@ Public Class SideAngleUC
' Inizializzo lati per angoli e per gocciolatoi (ne compilo la lista e aggiungo la scritta nel disegno) ' Inizializzo lati per angoli e per gocciolatoi (ne compilo la lista e aggiungo la scritta nel disegno)
InitSides() InitSides()
' Aggiorno testi nel disegno e creo i gocciolatoi '' Aggiorno testi nel disegno e creo i gocciolatoi
RefreshSideAngleText() 'RefreshSideAngleText()
' Aggiorno check e valori ' Aggiorno check e valori
RefreshCheckAndValue() RefreshCheckAndValue()
' Aggiorno testi nel disegno e creo i gocciolatoi
RefreshSideAngleText()
' Gestisco visualizzazione di tutti i parametri ' Gestisco visualizzazione di tutti i parametri
If m_Mode = ModeOpt.SIDEANGLE Then If m_Mode = ModeOpt.SIDEANGLE Then
@@ -179,6 +181,10 @@ Public Class SideAngleUC
' Imposto contesto corrente ' Imposto contesto corrente
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx()) EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
' Ricavo nome primo pezzo e lo sistemo ' Ricavo nome primo pezzo e lo sistemo
If m_Mode = ModeOpt.ENGRAVE And m_MainWindow.m_DrawPageUC.SelectedLayer = GDB_ID.NULL Then
PartId = EgtGetFirstPart()
m_MainWindow.m_DrawPageUC.SetCurrLayer(EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP))
End If
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL) 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 ' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
@@ -275,8 +281,8 @@ Public Class SideAngleUC
' Attualmente il vaore m_nCount è inizializzato ad "1".. ' Attualmente il vaore m_nCount è inizializzato ad "1"..
' Bottoni Prev Next ' Bottoni Prev Next
If m_nCount <= MAX_LINES Then If m_nCount <= MAX_LINES Then
PrevBtn.Visibility = Windows.Visibility.Hidden PrevBtn.Visibility= Windows.Visibility.Hidden
NextBtn.Visibility = Windows.Visibility.Hidden NextBtn.Visibility= Windows.Visibility.Hidden
Else Else
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow) Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
PrevBtn.Visibility = Windows.Visibility.Visible PrevBtn.Visibility = Windows.Visibility.Visible
@@ -497,11 +503,10 @@ Public Class SideAngleUC
If m_CallingPage = MainWindow.Pages.Draw Then If m_CallingPage = MainWindow.Pages.Draw Then
' Imposto contesto corrente ' Imposto contesto corrente
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx()) EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
' Ricavo nome primo pezzo
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL) 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 ' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
ElseIf m_CallingPage = MainWindow.Pages.Import Then ElseIf m_CallingPage = MainWindow.Pages.Import Then
' Imposto contesto corrente ' Imposto contesto corrente
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx()) EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
' Recupero nome pezzo ' Recupero nome pezzo
@@ -568,8 +573,20 @@ Public Class SideAngleUC
' verifico se l'entità ha un gocciolatoio ' verifico se l'entità ha un gocciolatoio
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
' aggiorno i valore delle caselle di testo per le entità caricate (Start/End) ' aggiorno i valore delle caselle di testo per le entità caricate (Start/End)
GetAngleTxBxFromIndex(nChIndex).Text = DoubleToString(Entity.dShortStart, 1) If m_Mode = ModeOpt.ENGRAVE Then
GetHeelTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortStart, 1) Dim dVal As Double = 0
If StringToLen(GetPrivateProfileDouble(S_SIDES, K_ENGRAVESHORT & "A" & nIndex.ToString & "_Start", 0, m_MainWindow.GetIniFile()), dVal) Then
Entity.dShortStart = dVal
End If
If StringToLen(GetPrivateProfileDouble(S_SIDES, K_ENGRAVESHORT & "A" & nIndex.ToString & "_End", 0, m_MainWindow.GetIniFile()), dVal) Then
Entity.dShortEnd = dVal
End If
Else
'GetAngleTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_Start", 0, m_MainWindow.GetIniFile())
'GetHeelTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_End", 0, m_MainWindow.GetIniFile())
End If
GetAngleTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortStart, 1)
GetHeelTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortEnd, 1)
Next Next
End If End If
End Sub End Sub
+10 -3
View File
@@ -78,7 +78,10 @@
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" > <UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
<Button Name="SelSectionBtn" <Button Name="SelSectionBtn"
Style="{DynamicResource OmagCut_YellowTextButton}"/> Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Grid> <Grid>
<Button Name="SelGuideBtn" <Button Name="SelGuideBtn"
Style="{DynamicResource OmagCut_YellowTextButton}"/> Style="{DynamicResource OmagCut_YellowTextButton}"/>
@@ -112,9 +115,13 @@
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" > <UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
<Button Name="MirrorPartBtn" <Button Name="MirrorPartBtn"
Style="{DynamicResource OmagCut_YellowTextButton}"/> Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource SpecchiaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="RemovePartBtn" <Button Name="RemovePartBtn"
Style="{DynamicResource OmagCut_YellowTextButton}"/> Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource Rimuovi_eliminaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</UniformGrid> </UniformGrid>
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3" <!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
+3 -3
View File
@@ -61,12 +61,12 @@ Public Class FrameCutPageUC
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 13)) 'Arco m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 13)) 'Arco
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 14)) 'Guida m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 14)) 'Guida
End If End If
SelSectionBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 15) 'Sezione SelSectionBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 15) 'Sezione
SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida
ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad
ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang
MirrorPartBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice MirrorPartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
RemovePartBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice RemovePartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
+19
View File
@@ -376,6 +376,7 @@ Public Class AlarmsPageUC
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0) CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
End Sub End Sub
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
Private Sub RefreschMachining() Private Sub RefreschMachining()
If m_CurrentMachine.sCurrSawing <> String.Empty Then If m_CurrentMachine.sCurrSawing <> String.Empty Then
CurrSawingTxBx.Text = m_CurrentMachine.sCurrSawing CurrSawingTxBx.Text = m_CurrentMachine.sCurrSawing
@@ -537,6 +538,8 @@ Public Class AlarmsPageUC
End If End If
' Aggiorno utensili per lavoro in corso ' Aggiorno utensili per lavoro in corso
m_MainWindow.m_WorkInProgressPageUC.UpdateTools() m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
' aggiorno la lista delle lavorazioni
RefreschMachining()
End Sub End Sub
' -- DRILL -- ' -- DRILL --
@@ -570,6 +573,8 @@ Public Class AlarmsPageUC
End If End If
' Aggiorno utensili per lavoro in corso ' Aggiorno utensili per lavoro in corso
m_MainWindow.m_WorkInProgressPageUC.UpdateTools() m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
' aggiorno la lista delle lavorazioni
RefreschMachining()
End Sub End Sub
' -- MILL -- ' -- MILL --
@@ -603,6 +608,8 @@ Public Class AlarmsPageUC
End If End If
' Aggiorno utensili per lavoro in corso ' Aggiorno utensili per lavoro in corso
m_MainWindow.m_WorkInProgressPageUC.UpdateTools() m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
' aggiorno la lista delle lavorazioni
RefreschMachining()
End Sub End Sub
' -- CUPWHEEL -- ' -- CUPWHEEL --
@@ -636,6 +643,8 @@ Public Class AlarmsPageUC
End If End If
' Aggiorno utensili per lavoro in corso ' Aggiorno utensili per lavoro in corso
m_MainWindow.m_WorkInProgressPageUC.UpdateTools() m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
' aggiorno la lista delle lavorazioni
RefreschMachining()
End Sub End Sub
' -- WATERJET -- ' -- WATERJET --
@@ -667,6 +676,8 @@ Public Class AlarmsPageUC
End If End If
' Aggiorno utensili per lavoro in corso ' Aggiorno utensili per lavoro in corso
m_MainWindow.m_WorkInProgressPageUC.UpdateTools() m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
' aggiorno la lista delle lavorazioni
RefreschMachining()
End Sub End Sub
#End Region 'Selection: SAW, DRILL, MILL, CUPWHEEL, WATERJET #End Region 'Selection: SAW, DRILL, MILL, CUPWHEEL, WATERJET
@@ -1015,6 +1026,14 @@ Public Class AlarmsPageUC
End Sub End Sub
Private Sub SawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawProbingBtn.Click Private Sub SawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawProbingBtn.Click
' imposto modo automatico
Select Case m_MainWindow.m_CNCommunication.m_nNCType
Case 1, 2
' in attesa di verifica
Case 3
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(0)
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
End Select
' Recupero file LUA ' Recupero file LUA
EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua") EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua")
' Recupero utensile da tastare ' Recupero utensile da tastare
+4 -2
View File
@@ -3,9 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib" xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}" FontFamily="{DynamicResource OmagCut_Font}"
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent"> Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}"> <Border Style="{DynamicResource OmagCut_Border}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/> <ColumnDefinition Width="0.5*"/>
+10
View File
@@ -28,6 +28,9 @@ Public Class CurrentMachine
Private m_nThreadSleep As Integer = 150 Private m_nThreadSleep As Integer = 150
' Dati su linea di produzione ' Dati su linea di produzione
Private m_bDemo As Boolean = False
Public nLastProjSentToViewDEMO As Integer = 0
Private m_bProdLine As Boolean = False Private m_bProdLine As Boolean = False
Private m_sVarProg1 As String = "E80021" Private m_sVarProg1 As String = "E80021"
Private m_nProg1 As Integer = 901 Private m_nProg1 As Integer = 901
@@ -225,6 +228,12 @@ Public Class CurrentMachine
End Get End Get
End Property End Property
Friend ReadOnly Property bDemo As Boolean
Get
Return m_bDemo
End Get
End Property
Friend ReadOnly Property bProdLine As Boolean Friend ReadOnly Property bProdLine As Boolean
Get Get
Return m_bProdLine Return m_bProdLine
@@ -1034,6 +1043,7 @@ Public Class CurrentMachine
m_bProdLine = False m_bProdLine = False
EgtOutLog("Error - Production line requested but not key enabled") EgtOutLog("Error - Production line requested but not key enabled")
End If End If
m_bDemo = (GetPrivateProfileInt(S_PRODUCTIONLINE, "Demo", 0, sMachIniFile) <> 0)
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG1, "", m_sVarProg1, sMachIniFile) GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG1, "", m_sVarProg1, sMachIniFile)
m_nProg1 = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG1, 0, m_MainWindow.GetMachIniFile()) m_nProg1 = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG1, 0, m_MainWindow.GetMachIniFile())
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG2, "", m_sVarProg2, sMachIniFile) GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG2, "", m_sVarProg2, sMachIniFile)
+139
View File
@@ -0,0 +1,139 @@
<Window x:Class="ImportExportMachiningWindowWD"
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:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<ScrollViewer Grid.Row="0" Margin="20">
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningFamily}" ItemsSource="{Binding MachiningList}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
</Grid>
<!-- multibinding quando sono attivi.-->
<HierarchicalDataTemplate.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}" >
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TreeViewItem}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="19" Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="false">
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
</Trigger>
<Trigger Property="HasItems" Value="false">
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
</Trigger>
<!--<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true"/>
<Condition Property="IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</MultiTrigger>-->
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</HierarchicalDataTemplate.ItemContainerStyle>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningItem}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
Margin="-15,0,5,0" VerticalContentAlignment="Center"
IsChecked="{Binding Active}"
Visibility="{Binding Path=DataContext.Active_Visibility,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
<TextBlock Grid.Column="1" Text="{Binding Name}"
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
</Grid>
</DataTemplate>
</TreeView.Resources>
</TreeView>
</ScrollViewer>
<Grid Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
Margin="5,-10,5,15"
Command="{Binding OkCommand}">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
Margin="5,-10,5,15"
IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
@@ -0,0 +1,33 @@
Imports EgtWPFLib5
Public Class ImportExportMachiningWindowWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private WithEvents m_ImportExportMachiningWindowVM As ImportExportMachiningWindowVM
Private m_OkResult As Boolean = False
Public ReadOnly Property OkResult As Boolean
Get
Return m_OkResult
End Get
End Property
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportMachiningWindowVM)
Me.Owner = Owner
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ImportExportToolWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ImportExportMachiningWindowVM = ImportExportToolWindowVM
End Sub
Private Sub OkCloseDialogWD() Handles OkBtn.Click
m_OkResult = True
Me.Close()
End Sub
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
m_OkResult = False
Me.Close()
End Sub
End Class
+138
View File
@@ -0,0 +1,138 @@
<Window x:Class="ImportExportToolWD"
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:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<ScrollViewer Grid.Row="0" Margin="20">
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpToolFamily}" ItemsSource="{Binding ToolList}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
</Grid>
<!-- multibinding quando sono attivi.-->
<HierarchicalDataTemplate.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}" >
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TreeViewItem}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="19" Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="false">
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
</Trigger>
<Trigger Property="HasItems" Value="false">
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
</Trigger>
<!--<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true"/>
<Condition Property="IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</MultiTrigger>-->
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</HierarchicalDataTemplate.ItemContainerStyle>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpToolItem}">
<Grid Height="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
Margin="-15,0,5,0" VerticalContentAlignment="Center"
IsChecked="{Binding Active}"
Visibility="{Binding Path=DataContext.Active_Visibility,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
<TextBlock Grid.Column="1" Text="{Binding Name}"
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
</Grid>
</DataTemplate>
</TreeView.Resources>
</TreeView>
</ScrollViewer>
<Grid Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
Margin="5,-10,5,15"
Command="{Binding OkCommand}">
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
Margin="5,-10,5,15"
IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
+38
View File
@@ -0,0 +1,38 @@
Imports EgtWPFLib5
Public Class ImportExportToolWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private WithEvents m_ImportExportToolWindowVM As ImportExportToolWindowVM
Private m_OkResult As Boolean = False
Public ReadOnly Property OkResult As Boolean
Get
Return m_OkResult
End Get
End Property
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportToolWindowVM)
Me.Owner = Owner
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ImportExportToolWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ImportExportToolWindowVM = ImportExportToolWindowVM
End Sub
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ImportExportToolWindowVM.m_CloseWindow
' Me.DialogResult = bDialogResult
'End Sub
Private Sub OkCloseDialogWD() Handles OkBtn.Click
m_OkResult = True
Me.Close()
End Sub
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
m_OkResult = False
Me.Close()
End Sub
End Class
+18 -6
View File
@@ -29,12 +29,24 @@
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"/> <ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<ToggleButton Name="ToolsDBBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowToggleButton}"/> <Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowToggleButton}"/> </ToggleButton>
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowToggleButton}"/> <ToggleButton Name="ToolsDBBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/> <Image Source="{DynamicResource DB-lavorazioniImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/> </ToggleButton>
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
</ToggleButton>
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}">
</ToggleButton>
</Grid> </Grid>
+4 -4
View File
@@ -43,11 +43,11 @@ Public Class MachinePageUC
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1) m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1) m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
AlarmsBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 5) AlarmsBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 5)
ToolsDBBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 6) ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
MachiningDBBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 7) MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
PolishingsBtn.Content = EgtMsg(91090) PolishingsBtn.Content = EgtMsg(91090)
TestingPageBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 8) TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
StatisticsBtn.Content = EgtMsg(90709) StatisticsBtn.Content = EgtMsg(90709)
' Apro pagina dati macchina ' Apro pagina dati macchina
+2 -2
View File
@@ -423,8 +423,8 @@
<TextBlock Grid.Column="0" Name="ConsumptionNameTxBx" Text="A" <TextBlock Grid.Column="0" Name="ConsumptionNameTxBx" Text="A"
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/> Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
<TextBlock Grid.Column="1" Name="ConsumptionTxBx" Text="25" <TextBlock Grid.Column="1" Name="ConsumptionTxBx" Text="25.00"
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/> Style="{StaticResource OmagCut_LowerBarValueTextBlock}" FontSize="22"/>
</Grid> </Grid>
+4 -2
View File
@@ -931,14 +931,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="11*"/> <ColumnDefinition Width="10*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/> <Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/> <Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/> <Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
<Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
<Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
</Grid> </Grid>
</Grid> </Grid>
+190
View File
@@ -3,6 +3,7 @@ Imports System.ComponentModel
Imports OmagCUT.TreeViewItem Imports OmagCUT.TreeViewItem
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib Imports EgtWPFLib
Imports EgtWPFLib5
Public Class MachiningDbPageUC Public Class MachiningDbPageUC
@@ -78,6 +79,8 @@ Public Class MachiningDbPageUC
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 16) NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 16)
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17) SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18) RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
ExportBtn.Content = "Export"
ImportBtn.Content = "Import"
NameTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 1) NameTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 1)
DepthTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 2) DepthTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 2)
@@ -321,6 +324,193 @@ Public Class MachiningDbPageUC
End If End If
End Sub End Sub
Private Sub ExportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ExportBtn.Click
' contesto corrente
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
' creo lista lavorazioni per esportazione
Dim MachiningToExportList As New ObservableCollection(Of ImpExpMachiningFamily)
Dim Family As CathegoryItem
Dim Machining As CustomItem
For Each Family In MachiningsList
Dim ImpExpMachiningFamily As New ImpExpMachiningFamily(Family.Name, Family.nTType)
For Each Machining In Family.Items
ImpExpMachiningFamily.MachiningList.Add(New ImpExpMachiningItem(Machining.Name, False))
Next
MachiningToExportList.Add(ImpExpMachiningFamily)
Next
Dim ExportWndVM As New ImportExportMachiningWindowVM(MachiningToExportList)
Dim ExportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ExportWndVM)
ExportWnd.ShowDialog()
End Sub
Private Sub ImoportBtn_Click() Handles ImportBtn.Click
' contesto corrente
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
' apro dialogo di scelta file
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
.DefaultExt = ".data",
.Filter = "Machinings (.data)|*.data",
.CheckFileExists = True,
.ValidateNames = True
}
If ImportFileDlg.ShowDialog() <> True Then Return
Dim ImportFilePath As String = ImportFileDlg.FileName
' recupero liste utensili da importare
Dim ImportFileMachiningNameList As String() = Nothing
Dim ImportFileMachiningFamilyList As Integer() = Nothing
If Not EgtMdbToBeImported(ImportFilePath, ImportFileMachiningNameList, ImportFileMachiningFamilyList) Then Return
' li inserisco in lista per finestra di scelta
Dim MachinigToImportList As New ObservableCollection(Of ImpExpMachiningFamily)
' creo famiglie di utensili in base a quelle trovate in lista importata
For MachiningIndex As Integer = 0 To ImportFileMachiningNameList.Count - 1
Dim MachiningName As String = ImportFileMachiningNameList(MachiningIndex)
Dim MachiningFamily As Integer = ImportFileMachiningFamilyList(MachiningIndex)
MachiningFamily = MachiningFamily And
(MCH_MY.DRILLING Or
MCH_MY.SAWING Or
MCH_MY.MILLING Or
MCH_MY.POCKETING Or
MCH_MY.MORTISING Or
MCH_MY.SAWROUGHING Or
MCH_MY.SAWFINISHING Or
MCH_MY.GENMACHINING Or
MCH_MY.CHISELING Or
MCH_MY.SURFROUGHING Or
MCH_MY.SURFFINISHING Or
MCH_MY.WATERJETTING)
Dim bFounded As Boolean = False
Dim MachinigToImportFamily As ImpExpMachiningFamily
For Each MachinigToImportFamily In MachinigToImportList
If (MachiningFamily = MachinigToImportFamily.FamilyType) Then
MachinigToImportFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
bFounded = True
Exit For
End If
Next
If Not bFounded Then
Dim NewFamily As New ImpExpMachiningFamily(GetMachiningFamilyName(MachiningFamily), MachiningFamily)
NewFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
MachinigToImportList.Add(NewFamily)
End If
Next
Dim ImportWndVM As New ImportExportMachiningWindowVM(MachinigToImportList, ImportFilePath, ImportFileMachiningNameList)
Dim ImportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ImportWndVM)
ImportWnd.ShowDialog()
' Aggiungo all'albero visualizzato gli utensili appena importati
If ImportWnd.OkResult Then
LoadImportedMachineMachinings(ImportWndVM.vsImported)
End If
End Sub
Private Function AlreadyExist(MachiningName As String) As Boolean
Dim MachiningFamily As CathegoryItem
For Each MachiningFamily In MachiningsList
Dim MachiningItem As CustomItem
For Each MachiningItem In MachiningFamily.Items
If MachiningName = MachiningItem.Name Then
Return True
End If
Next
Next
Return False
End Function
Private Function GetMachiningFamilyName(NewMachinigFamily As Integer) As String
Dim MachiningFamily As CathegoryItem
For Each MachiningFamily In MachiningsList
If NewMachinigFamily = MachiningFamily.nTType Then
Return MachiningFamily.Name
End If
Next
Return ""
End Function
Private Sub LoadImportedMachineMachinings(vsImportedMachinings As String())
' Leggo tutte le lavorazioni presenti nella Macchina (quindi anche quelli appena importati).
Dim ActiveMachiningsFamilies() As MachiningsType = MyReadMachiningFamilies(m_MainWindow.m_CurrentMachine.sMachIniFile)
Dim MachiningsFamilyIndex As Integer = 0
Dim MachiningsFamilyItem As MachiningsType
For Each MachiningsFamilyItem In ActiveMachiningsFamilies
Dim FamilyTreeView As New CathegoryItem(MachiningsFamilyItem.Name, MachiningsFamilyItem.Id)
Dim MachiningFamilyItem = MachiningsList.FirstOrDefault(Function(MachiningFamily) MachiningsFamilyItem.Id = MachiningFamily.nTType)
If IsNothing(MachiningFamilyItem) Then
MachiningsList.Insert(MachiningsFamilyIndex, FamilyTreeView)
End If
Dim nType As Integer = 0
Dim MachiningName As String = String.Empty
Dim MachiningIndex As Integer = 0
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
Dim bFound As Boolean = EgtMdbGetFirstMachining(MachiningsFamilyItem.Id, MachiningName)
While bFound
Dim MachiningItem = MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName)
Dim bInList As Boolean = vsImportedMachinings.Contains(MachiningName)
If bInList Then
' Se una lavorazione è presente nella MachiningsList visualizzata ma nel contempo è nell'array vsImported
' vuol dire che è stata sovrascritta perciò la rimuovo
MachiningsList(MachiningsFamilyIndex).Items.Remove(MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName))
End If
If bInList OrElse IsNothing(MachiningItem) Then
' recupero tuuid
EgtMdbSetCurrMachining(MachiningName)
Dim sCurrMachTUUID As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sCurrMachTUUID)
' aggiungo la lavorazione importata
MachiningsList(MachiningsFamilyIndex).Items.Insert(MachiningIndex, New CustomItem(MachiningName, MachiningsFamilyItem.Id, ToolDbUtility.IsToolInDb(sCurrMachTUUID)))
' eventualmente evidezio l'ultimo elemento inserito (ERRORE: non espando l'albero)
'MachiningsList(MachiningsFamilyIndex).Items(MachiningIndex).IsSelected = True
End If
MachiningIndex += 1
bFound = EgtMdbGetNextMachining(MachiningsFamilyItem.Id, MachiningName)
End While
MachiningsFamilyIndex += 1
Next
End Sub
Public Function MyReadMachiningFamilies(sMachineIniPath As String) As MachiningsType()
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Foratura e Taglio di lama nelle famiglie di lavorazioni attive è invertito
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWING, .Name = EgtMsg(31200 + 2)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.DRILLING, .Name = EgtMsg(31200 + 1)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MILLING, .Name = EgtMsg(31200 + 3)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.POCKETING, .Name = EgtMsg(31200 + 4)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MORTISING, .Name = EgtMsg(31200 + 5)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWROUGHING, .Name = EgtMsg(31200 + 6)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWFINISHING, .Name = EgtMsg(31200 + 7)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_GENMACHINING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.GENMACHINING, .Name = EgtMsg(31200 + 8)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.CHISELING, .Name = EgtMsg(31200 + 9)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SURFFINISHING, .Name = EgtMsg(31211)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachineIniPath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.WATERJETTING, .Name = EgtMsg(31210)})
End If
Return ActiveMachiningsFamiliesList.ToArray
End Function
Private Sub InitializeMachiningFamily(bEnabled As Boolean, nFType As Integer, sFName As String) Private Sub InitializeMachiningFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
If Not bEnabled Then Return If Not bEnabled Then Return
' Inserisco categoria ed eventuali elementi ' Inserisco categoria ed eventuali elementi
+4 -1
View File
@@ -434,13 +434,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="11*"/> <ColumnDefinition Width="10*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/> <Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/> <Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/> <Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
<Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
<Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
</Grid> </Grid>
+306 -32
View File
@@ -3,6 +3,7 @@ Imports OmagCUT.TreeViewItem
Imports System.ComponentModel Imports System.ComponentModel
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib Imports EgtWPFLib
Imports EgtWPFLib5
Public Class ToolsDbPageUC Public Class ToolsDbPageUC
@@ -16,6 +17,8 @@ Public Class ToolsDbPageUC
Dim ToolsList As New ObservableCollection(Of CathegoryItem) Dim ToolsList As New ObservableCollection(Of CathegoryItem)
' Proprietà ' Proprietà
Private m_bFirst As Boolean = True Private m_bFirst As Boolean = True
' Flag nuova gestione parametri lama in disegno
Private m_bNewSawbladeMaker As Boolean = False
' Stringa identificativa variabile geometrica in modifica ' Stringa identificativa variabile geometrica in modifica
Private m_sCurrVar As String = String.Empty Private m_sCurrVar As String = String.Empty
' Parametri dell'utensile corrente ' Parametri dell'utensile corrente
@@ -53,6 +56,8 @@ Public Class ToolsDbPageUC
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15) NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15)
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17) SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18) RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
ExportBtn.Content = "Export"
ImportBtn.Content = "Import"
NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1) NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1)
TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2) TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2)
@@ -160,16 +165,20 @@ Public Class ToolsDbPageUC
ToolScene.SetStatusNull() ToolScene.SetStatusNull()
' Inizializzo le famiglie di utensili nell'albero ' Inizializzo le famiglie di utensili nell'albero
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()) EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
InitializeToolGroup(m_CurrMachine.bSaw, MCH_TY.SAW_STD, EgtMsg( 90751)) InitializeToolGroup(m_CurrMachine.bSaw, MCH_TY.SAW_STD, EgtMsg(90751))
InitializeToolGroup(m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg( 90752)) InitializeToolGroup(m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg(90752))
InitializeToolGroup(m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg( 90753)) InitializeToolGroup(m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg(90753))
InitializeToolGroup(m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg( 90754)) InitializeToolGroup(m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg(90754))
InitializeToolGroup(m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg( 90756)) InitializeToolGroup(m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg(90756))
InitializeToolGroup(m_CurrMachine.bWaterJet, MCH_TY.WATERJET, EgtMsg( 90755)) InitializeToolGroup(m_CurrMachine.bWaterJet, MCH_TY.WATERJET, EgtMsg(90755))
' Sposto tutti i parametri in su di una riga se testa e uscita sono disattivati ' Sposto tutti i parametri in su di una riga se testa e uscita sono disattivati
If Not m_CurrMachine.bShowHeadExit Then If Not m_CurrMachine.bShowHeadExit Then
MoveParam() MoveParam()
End If End If
' Verifico se macchina con nuovo SawbladeMaker
Dim sSawBladeMaker As String = ""
GetPrivateProfileString(S_TOOLS, K_SAWBLADEMAKER, "", sSawBladeMaker, m_MainWindow.GetIniFile())
m_bNewSawbladeMaker = String.Compare(sSawBladeMaker, "MakeStoneSawBlade.lua", True)
m_bFirst = False m_bFirst = False
Else Else
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()) EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
@@ -239,17 +248,17 @@ Public Class ToolsDbPageUC
Next Next
' Determino il tipo di utensile ' Determino il tipo di utensile
Dim nType As Integer Dim nType As Integer
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType) EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
' Imposto testa e uscita ' Imposto testa e uscita
' Sempre lame su H1.1 e utensili foretto, fresa e mola da scasso su H1.2 ' Sempre lame su H1.1 e utensili foretto, fresa e mola da scasso su H1.2
If ( nType And MCH_TF.WATERJET) = 0 then If (nType And MCH_TF.WATERJET) = 0 Then
Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0) Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0)
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H1") EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H1")
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, If(bSaw, 1, 2)) EgtTdbSetCurrToolParam(MCH_TP.EXIT_, If(bSaw, 1, 2))
' Waterjet sempre su H2.1 ' Waterjet sempre su H2.1
Else Else
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H2") EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H2")
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, 1) EgtTdbSetCurrToolParam(MCH_TP.EXIT_, 1)
End If End If
' Per macchine senza ToolChanger, resetto la posizione su questo ' Per macchine senza ToolChanger, resetto la posizione su questo
If m_CurrMachine.ShowToolChanger = 0 Then If m_CurrMachine.ShowToolChanger = 0 Then
@@ -317,8 +326,8 @@ Public Class ToolsDbPageUC
EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType) EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType)
For Each ToolFamily As CathegoryItem In ToolsList For Each ToolFamily As CathegoryItem In ToolsList
If ToolFamily.nTType = CurrType Then If ToolFamily.nTType = CurrType Then
Dim NewToolItem As New CustomItem( NewName, CurrType) Dim NewToolItem As New CustomItem(NewName, CurrType)
ToolFamily.Items.Add( NewToolItem) ToolFamily.Items.Add(NewToolItem)
NewToolItem.IsSelected = True NewToolItem.IsSelected = True
GetToolParams() GetToolParams()
m_OldItem = ToolTreeView.SelectedItem m_OldItem = ToolTreeView.SelectedItem
@@ -354,15 +363,15 @@ Public Class ToolsDbPageUC
Dim sItems() As String = sUserNotes.Split(";".ToCharArray) Dim sItems() As String = sUserNotes.Split(";".ToCharArray)
For i As Integer = 0 To sItems.Count() - 1 For i As Integer = 0 To sItems.Count() - 1
If sItems(i).Contains("CODE=") Then If sItems(i).Contains("CODE=") Then
CodeTxBx.Text = sItems(i).Substring( 5) CodeTxBx.Text = sItems(i).Substring(5)
ElseIf sItems(i).Contains("SUPPL=") Then ElseIf sItems(i).Contains("SUPPL=") Then
SupplierTxBx.Text = sItems(i).Substring( 6) SupplierTxBx.Text = sItems(i).Substring(6)
ElseIf sItems(i).Contains("S/N=") Then ElseIf sItems(i).Contains("S/N=") Then
SerNbrTxBx.Text = sItems(i).Substring( 4) SerNbrTxBx.Text = sItems(i).Substring(4)
ElseIf sItems(i).Contains("END=") Then ElseIf sItems(i).Contains("END=") Then
EndLifeChBx.IsChecked = True EndLifeChBx.IsChecked = True
m_sEndLife = sItems(i).Substring( 4) m_sEndLife = sItems(i).Substring(4)
ElseIf Not String.IsNullOrWhiteSpace(sItems(i)) ElseIf Not String.IsNullOrWhiteSpace(sItems(i)) Then
sToShow &= sItems(i) & ";" sToShow &= sItems(i) & ";"
End If End If
Next Next
@@ -383,7 +392,7 @@ Public Class ToolsDbPageUC
sUserNotes &= "SUPPL=" & SupplierTxBx.Text & ";" sUserNotes &= "SUPPL=" & SupplierTxBx.Text & ";"
sUserNotes &= "S/N=" & SerNbrTxBx.Text & ";" sUserNotes &= "S/N=" & SerNbrTxBx.Text & ";"
If EndLifeChBx.IsChecked Then If EndLifeChBx.IsChecked Then
If String.IsNullOrWhiteSpace( m_sEndLife) Then If String.IsNullOrWhiteSpace(m_sEndLife) Then
m_sEndLife = My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH:mm:ss") m_sEndLife = My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH:mm:ss")
End If End If
sUserNotes &= "END=" & m_sEndLife & ";" sUserNotes &= "END=" & m_sEndLife & ";"
@@ -479,18 +488,217 @@ Public Class ToolsDbPageUC
End If End If
End Sub End Sub
Private Sub ExportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ExportBtn.Click
' contesto corrente
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
' creo lista utensili per esportazione
Dim ToolToExportList = New ObservableCollection(Of ImpExpToolFamily)
Dim Family As CathegoryItem
Dim Tool As CustomItem
For Each Family In ToolsList
Dim ImpExpToolFamily As New ImpExpToolFamily(Family.Name, Family.nTType)
ImpExpToolFamily.PictureString = "/Resources/ToolsTreeviewImages/Folder.png"
For Each Tool In Family.Items
Dim CurrTool = New ImpExpToolItem(Tool.Name, False)
ImpExpToolFamily.ToolList.Add(CurrTool)
Next
ToolToExportList.Add(ImpExpToolFamily)
Next
Dim ExportWndVM As New ImportExportToolWindowVM(ToolToExportList)
Dim ExportWnd As New ImportExportToolWD(Application.Current.MainWindow, ExportWndVM)
ExportWnd.ShowDialog()
End Sub
Private Sub ImportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
' contesto corrente
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
' apro dialogo di scelta file
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
.DefaultExt = ".data",
.Filter = "Tools (.data)|*.data",
.CheckFileExists = True,
.ValidateNames = True
}
If ImportFileDlg.ShowDialog() <> True Then Return
Dim ImportFilePath As String = ImportFileDlg.FileName
' recupero liste utensili da importare
Dim ImportFileToolNameList As String() = Nothing
Dim ImportFileToolFamilyList As Integer() = Nothing
If Not EgtTdbToBeImported(ImportFilePath, ImportFileToolNameList, ImportFileToolFamilyList) Then Return
' li inserisco in lista per finestra di scelta
Dim ToolToImportList As New ObservableCollection(Of ImpExpToolFamily)
' creo famiglie di utensili in base a quelle trovate in lista importata
For ToolIndex As Integer = 0 To ImportFileToolNameList.Count - 1
Dim ToolName As String = ImportFileToolNameList(ToolIndex)
Dim ToolFamily As Integer = ImportFileToolFamilyList(ToolIndex)
ToolFamily = ToolFamily And
(MCH_TF.DRILLBIT Or
MCH_TF.SAWBLADE Or
MCH_TF.MILL Or
MCH_TF.MORTISE Or
MCH_TF.CHISEL Or
MCH_TF.WATERJET Or
MCH_TF.COMPO)
Dim bFounded As Boolean = False
Dim ToolToImportFamily As ImpExpToolFamily
For Each ToolToImportFamily In ToolToImportList
If (ToolFamily = ToolToImportFamily.FamilyType) Then
ToolToImportFamily.ToolList.Add(New ImpExpToolItem(ToolName, AlreadyExist(ToolName)))
bFounded = True
Exit For
End If
Next
If Not bFounded Then
Dim NewFamily As New ImpExpToolFamily(GetToolFamilyName(ToolFamily), ToolFamily)
NewFamily.ToolList.Add(New ImpExpToolItem(ToolName, AlreadyExist(ToolName)))
ToolToImportList.Add(NewFamily)
End If
Next
Dim ImportWndVM As New ImportExportToolWindowVM(ToolToImportList, ImportFilePath, ImportFileToolNameList)
Dim ImportWnd As New ImportExportToolWD(Application.Current.MainWindow, ImportWndVM)
ImportWnd.ShowDialog()
' Aggiungo all'albero visualizzato gli utensili appena importati
If ImportWnd.OkResult Then
LoadImportedMachineTools(ImportWndVM.vsImported)
End If
End Sub
Private Function AlreadyExist(ToolName As String) As Boolean
Dim ToolFamily As CathegoryItem
For Each ToolFamily In ToolsList
Dim ToolItem As CustomItem
For Each ToolItem In ToolFamily.Items
If ToolName = ToolItem.Name Then
Return True
End If
Next
Next
Return False
End Function
Private Function GetToolFamilyName(NewToolFamily As Integer) As String
Dim ToolFamily As CathegoryItem
For Each ToolFamily In ToolsList
If NewToolFamily = ToolFamily.nTType Then
Return ToolFamily.Name
End If
Next
Return ""
End Function
Private Sub LoadImportedMachineTools(vsImportedTools As String())
' Leggo tutti gli utensili presenti nella Macchina (quindi anche quelli appena importati).
Dim ActiveToolsFamilies() As ToolsFamily = MyReadToolFamilies(m_CurrMachine.sMachIniFile)
Dim ToolsFamilyIndex As Integer = 0
Dim ToolsFamilyItem As ToolsFamily
For Each ToolsFamilyItem In ActiveToolsFamilies
' dalla lista che ho ricavato dalla libreria recupero gli utensili associati
Dim FamilyTreeView As New CathegoryItem(ToolsFamilyItem.Name, ToolsFamilyItem.Id)
Dim ToolFamilyItem = ToolsList.FirstOrDefault(Function(ToolFamily) ToolFamily.nTType = ToolsFamilyItem.Id)
If IsNothing(ToolFamilyItem) Then
ToolsList.Insert(ToolsFamilyIndex, FamilyTreeView)
Else
' ricerco l'indice nella lista Tools
End If
Dim nType As Integer = 0
Dim ToolName As String = String.Empty
Dim ToolIndex As Integer = 0
'EgtSetCurrentContext(ToolScene.GetCtx())
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
If EgtTdbGetFirstTool(ToolsFamilyItem.Id, ToolName, nType) Then
Dim ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
If IsNothing(ToolItem) Then
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
Dim NewToolName As New CustomItem(ToolName, nType)
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
'NewToolName.IsSelected = True
ElseIf vsImportedTools.Contains(ToolName) Then
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
Dim NewToolName As New CustomItem(ToolName, nType)
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
'NewToolName.IsSelected = True
End If
ToolIndex += 1
While EgtTdbGetNextTool(ToolsFamilyItem.Id, ToolName, nType)
ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
If IsNothing(ToolItem) Then
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
Dim NewToolName As New CustomItem(ToolName, nType)
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
'NewToolName.IsSelected = True
ElseIf vsImportedTools.Contains(ToolName) Then
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
Dim NewToolName As New CustomItem(ToolName, nType)
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
'NewToolName.IsSelected = True
End If
ToolIndex += 1
End While
End If
ToolsFamilyIndex += 1
Next
End Sub
Public Function MyReadToolFamilies(sMachineIniPath As String) As ToolsFamily()
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Punta e Lama nelle famiglie di utensili attivi è invertito
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.SAWBLADE, EgtMsg(31000 + 2)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.DRILLBIT, EgtMsg(31000 + 1)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(31000 + 3)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, "CupWheel", 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(90754)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, "PolishingWheel", 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(90756)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MORTISE, EgtMsg(31000 + 4)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_CHISEL, 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.CHISEL, EgtMsg(31000 + 9)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.COMPO, EgtMsg(31000 + 5)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachineIniPath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.WATERJET, EgtMsg(31010)))
End If
Return ActiveToolsFamiliesList.ToArray
End Function
Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String) Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String)
If Not bEnabled Then Return If Not bEnabled Then Return
' Inserisco categoria ed eventuali elementi ' Inserisco categoria ed eventuali elementi
Dim ToolCathegory As New CathegoryItem( sFName, nTType) Dim ToolCathegory As New CathegoryItem(sFName, nTType)
Dim nType As Integer = 0 Dim nType As Integer = 0
Dim ToolName As String = String.Empty Dim ToolName As String = String.Empty
Dim bFound As Boolean = EgtTdbGetFirstTool( nTType, ToolName, nType) Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
While bFound While bFound
If nType = nTType Then ToolCathegory.Items.Add( New CustomItem( ToolName, nType)) If nType = nTType Then ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
bFound = EgtTdbGetNextTool( nTType, ToolName, nType) bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
End While End While
ToolsList.Add( ToolCathegory) ToolsList.Add(ToolCathegory)
End Sub End Sub
Private Sub GetToolParams() Private Sub GetToolParams()
@@ -545,7 +753,7 @@ Public Class ToolsDbPageUC
HeadTxBx.Text = ToolString HeadTxBx.Text = ToolString
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, ToolInt) EgtTdbGetCurrToolParam(MCH_TP.EXIT_, ToolInt)
ExitTxBx.Text = ToolInt.ToString() ExitTxBx.Text = ToolInt.ToString()
if Not GetSpecials() Then If Not GetSpecials() Then
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString) EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString)
UserNotesTxBx.Text = ToolString UserNotesTxBx.Text = ToolString
End If End If
@@ -601,7 +809,7 @@ Public Class ToolsDbPageUC
EgtTdbSetCurrToolParam(MCH_TP.HEAD, HeadTxBx.Text) EgtTdbSetCurrToolParam(MCH_TP.HEAD, HeadTxBx.Text)
Int32.TryParse(ExitTxBx.Text, nTemp) Int32.TryParse(ExitTxBx.Text, nTemp)
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, nTemp) EgtTdbSetCurrToolParam(MCH_TP.EXIT_, nTemp)
if Not SetSpecials() Then If Not SetSpecials() Then
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text) EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text)
End If End If
End Sub End Sub
@@ -708,6 +916,8 @@ Public Class ToolsDbPageUC
' Aggiorno visualizzazione ' Aggiorno visualizzazione
EgtSetCurrentContext(ToolScene.GetCtx()) EgtSetCurrentContext(ToolScene.GetCtx())
EgtSetView(VT.TOP, False) EgtSetView(VT.TOP, False)
'EgtSetGenericView(150, -150)
'EgtSetView(VT.ISO_SE, False)
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
End Sub End Sub
@@ -757,6 +967,10 @@ Public Class ToolsDbPageUC
nMsg = MSG_TOOLSDBPAGEUC + 23 ' Spessore nMsg = MSG_TOOLSDBPAGEUC + 23 ' Spessore
Case MCH_TP.MAXMAT Case MCH_TP.MAXMAT
nMsg = MSG_TOOLSDBPAGEUC + 24 ' Tagliente nMsg = MSG_TOOLSDBPAGEUC + 24 ' Tagliente
Case MCH_TP.CORE
nMsg = 90720 ' Anima
Case STEM
nMsg = 90719 ' Lunghezza portautensile
End Select End Select
' Predispongo calcolatrice (converto sempre in UIUnits perchè tutte lunghezze) ' Predispongo calcolatrice (converto sempre in UIUnits perchè tutte lunghezze)
Dim EgtCalculator As New EgtCalculatorWD(m_MainWindow, EgtToUiUnits(dVal), 300, WidthType.PIXEL, 0, 0, EgtMsg(nMsg)) Dim EgtCalculator As New EgtCalculatorWD(m_MainWindow, EgtToUiUnits(dVal), 300, WidthType.PIXEL, 0, 0, EgtMsg(nMsg))
@@ -774,7 +988,7 @@ Public Class ToolsDbPageUC
Private Sub RecreateToolDraw(ByVal dVal As Double) Private Sub RecreateToolDraw(ByVal dVal As Double)
' Salvo il vecchio valore ' Salvo il vecchio valore
Dim dOldVal As Double Dim dOldVal As Double
GetVariableValue( dOldVal) GetVariableValue(dOldVal)
' Aggiorno dati utensile ' Aggiorno dati utensile
SetVariableValue(dVal) SetVariableValue(dVal)
' Creo utensile ' Creo utensile
@@ -787,7 +1001,20 @@ Public Class ToolsDbPageUC
Private Function GetVariableValue(ByRef dVal As Double) As Boolean Private Function GetVariableValue(ByRef dVal As Double) As Boolean
' Recupero valore variabile ' Recupero valore variabile
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()) EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
Return EgtTdbGetCurrToolParam(GetVariableType(), dVal) Dim nVarType As Integer = GetVariableType()
If m_nToolType <> MCH_TY.SAW_STD OrElse nVarType <> STEM Then
Return EgtTdbGetCurrToolParam(nVarType, dVal)
Else
Dim dL, dCore, dTh As Double
If EgtTdbGetCurrToolParam(MCH_TP.LEN, dL) AndAlso
EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
dVal = Math.Max(dL - (dCore + dTh) / 2, 0.0)
Return True
Else
Return False
End If
End If
End Function End Function
Private Function SetVariableValue(ByVal dVal As Double) As Boolean Private Function SetVariableValue(ByVal dVal As Double) As Boolean
@@ -801,6 +1028,30 @@ Public Class ToolsDbPageUC
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal + 1) EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal + 1)
Case MCH_TP.DIAM Case MCH_TP.DIAM
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal) EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
Case MCH_TP.THICK
If m_bNewSawbladeMaker Then
Dim dTh, dLen As Double
If EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) AndAlso
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen) Then
Dim dNewLen As Double = dLen + ((dVal - dTh) / 2)
EgtTdbSetCurrToolParam(MCH_TP.LEN, dNewLen)
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dNewLen + 1)
Else
Return False
End If
End If
Case MCH_TP.CORE
If m_bNewSawbladeMaker Then
Dim dCore, dLen As Double
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen) Then
Dim dNewLen As Double = dLen + ((dVal - dCore) / 2)
EgtTdbSetCurrToolParam(MCH_TP.LEN, dNewLen)
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dNewLen + 1)
Else
Return False
End If
End If
End Select End Select
ElseIf m_nToolType = MCH_TY.DRILL_STD Then ElseIf m_nToolType = MCH_TY.DRILL_STD Then
Select Case nType Select Case nType
@@ -826,7 +1077,19 @@ Public Class ToolsDbPageUC
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal) EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
End Select End Select
End If End If
Return EgtTdbSetCurrToolParam(nType, dVal) If m_nToolType <> MCH_TY.SAW_STD OrElse nType <> STEM Then
Return EgtTdbSetCurrToolParam(nType, dVal)
Else
Dim dCore, dTh As Double
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
Dim dL As Double = Math.Max(dVal, 0.0) + ((dCore + dTh) / 2)
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dL + 1)
Return EgtTdbSetCurrToolParam(MCH_TP.LEN, dL)
Else
Return False
End If
End If
End Function End Function
Private Function GetVariableType() As Integer Private Function GetVariableType() As Integer
@@ -839,6 +1102,10 @@ Public Class ToolsDbPageUC
nType = MCH_TP.THICK nType = MCH_TP.THICK
ElseIf m_sCurrVar = "MAXMAT" Then ElseIf m_sCurrVar = "MAXMAT" Then
nType = MCH_TP.MAXMAT nType = MCH_TP.MAXMAT
ElseIf m_sCurrVar = "CORE" Then
nType = MCH_TP.CORE
ElseIf m_sCurrVar = "STEM" Then
nType = STEM
End If End If
Return nType Return nType
End Function End Function
@@ -900,6 +1167,13 @@ Public Class ToolsDbPageUC
EgtTdbSetCurrToolParam(MCH_TP.THICK, dToolThick) EgtTdbSetCurrToolParam(MCH_TP.THICK, dToolThick)
EgtOutLog("ToolThick too small ->" & DoubleToString(dToolThick, 1)) EgtOutLog("ToolThick too small ->" & DoubleToString(dToolThick, 1))
End If End If
Dim dToolCore As Double
EgtTdbGetCurrToolParam(MCH_TP.CORE, dToolCore)
If dToolCore < EPS_SMALL Then
dToolCore = If(dToolLen >= dToolThick, dToolThick - 1, 2 * dToolLen - dToolThick)
EgtTdbSetCurrToolParam(MCH_TP.CORE, dToolCore)
EgtOutLog("ToolCore too small ->" & DoubleToString(dToolCore, 1))
End If
Dim dToolMaxMat As Double Dim dToolMaxMat As Double
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dToolMaxMat) EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dToolMaxMat)
If dToolMaxMat < EPS_SMALL Then If dToolMaxMat < EPS_SMALL Then
@@ -1002,7 +1276,7 @@ Public Class ToolsDbPageUC
End Function End Function
Private Function CreateToolDraw() As Boolean Private Function CreateToolDraw() As Boolean
Dim nErr As Integer = EgtTdbCurrToolDraw( m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx(), ToolScene.GetCtx()) Dim nErr As Integer = EgtTdbCurrToolDraw(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx(), ToolScene.GetCtx())
EgtSetCurrentContext(ToolScene.GetCtx()) EgtSetCurrentContext(ToolScene.GetCtx())
Return (nErr = 0) Return (nErr = 0)
End Function End Function
+12 -5
View File
@@ -323,8 +323,8 @@ Class MainWindow
' Verifico abilitazione nesting automatico ' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey) m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave ' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2309, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(9423, 2312, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2309, 1, m_nKeyOptions) EgtGetKeyOptions(9423, 2312, 1, m_nKeyOptions)
' Verifico abilitazione prodotto ' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE) Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
@@ -1094,12 +1094,15 @@ Class MainWindow
If m_bNCLink And m_CurrentMachine.bProdLine Then If m_bNCLink And m_CurrentMachine.bProdLine Then
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000) m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
m_ProdLineTimer.Start() m_ProdLineTimer.Start()
ElseIf m_CurrentMachine.bDemo Then
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
m_ProdLineTimer.Start()
End If End If
' seleziono il tipo di avvio ' seleziono il tipo di avvio
'm_CurrentProjectPageUC.StartProgram() m_CurrentProjectPageUC.StartProgram()
' aggiorno la grafica ' aggiorno la grafica
EgtDraw() EgtZoom(ZM.ALL, True)
End Sub End Sub
Friend Sub EgtWPFInit() Friend Sub EgtWPFInit()
@@ -1194,7 +1197,7 @@ Class MainWindow
nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1) nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1)
nMove = 1 nMove = 1
End If End If
' altrimenti forzo trasmissione ultimo inviato ' altrimenti forzo trasmissione ultimo inviato
Else Else
nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1) nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1)
nMove = 1 nMove = 1
@@ -1223,6 +1226,10 @@ Class MainWindow
Exit For Exit For
End If End If
Next Next
' forzo la variabile CN - aggiornando il valore dell'indice del progetto in elaborazione
If m_CurrentMachine.bDemo Then nVarCopy = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, GetIniFile())
' Leggo variabile con ultimo progetto mandato a OmagView ' Leggo variabile con ultimo progetto mandato a OmagView
Dim nLastCopy As Integer = GetPrivateProfileInt(S_GENERAL, K_LASTPROJTOVIEW, 0, GetIniFile()) Dim nLastCopy As Integer = GetPrivateProfileInt(S_GENERAL, K_LASTPROJTOVIEW, 0, GetIniFile())
' Se non nulla e diversa da ultimo copiato, verifico se eseguire la copia ' Se non nulla e diversa da ultimo copiato, verifico se eseguire la copia
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.9.3")> <Assembly: AssemblyVersion("2.3.12.1")>
<Assembly: AssemblyFileVersion("2.3.9.3")> <Assembly: AssemblyFileVersion("2.3.12.1")>
+30 -16
View File
@@ -11,6 +11,8 @@ Public Class CNCommunication
Private m_AlarmsPage As AlarmsPageUC = m_MainWindow.m_MachinePageUC.m_AlarmsPageUC Private m_AlarmsPage As AlarmsPageUC = m_MainWindow.m_MachinePageUC.m_AlarmsPageUC
Private m_CurrProjPage As CurrentProjectPageUC = m_MainWindow.m_CurrentProjectPageUC Private m_CurrProjPage As CurrentProjectPageUC = m_MainWindow.m_CurrentProjectPageUC
Friend m_nCountRefresh As Integer = 0
' Variabile per tipologia CN ' Variabile per tipologia CN
Friend m_nNCType As Integer Friend m_nNCType As Integer
@@ -225,8 +227,11 @@ Public Class CNCommunication
' definisco il tipo di varibili che devono essere scritte nl plc ' definisco il tipo di varibili che devono essere scritte nl plc
Dim sVal As String = String.Empty Dim sVal As String = String.Empty
GetPrivateProfileString(S_NCDATA, K_NEWVARIABLE, "0", sVal, m_MainWindow.GetMachIniFile()) Dim nVal As Integer = 0
m_CN.m_NewVariable = sVal <> 0 'GetPrivateProfileString(S_NCDATA, K_NEWVARIABLE, "0", sVal, m_MainWindow.GetMachIniFile())
nVal = GetPrivateProfileInt(S_NCDATA, K_NEWVARIABLE, nVal, m_MainWindow.GetMachIniFile())
'm_CN.m_NewVariable = sVal <> "0"
m_CN.m_NewVariable = (nVal <> 0)
EgtOutLog("NewVariable=" & If(m_CN.m_NewVariable, "1", "0")) EgtOutLog("NewVariable=" & If(m_CN.m_NewVariable, "1", "0"))
' Recupero e imposto le variabili per i dati del CN (feed, speed,...) ' Recupero e imposto le variabili per i dati del CN (feed, speed,...)
@@ -326,22 +331,23 @@ Public Class CNCommunication
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal) m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
' nuove variabili: stato dei nuovi pulsanti ' nuove variabili: stato dei nuovi pulsanti
m_IsNewConsole = GetPrivateProfileString(S_NCDATA, K_NEWCONSOLE, "", sVal, m_MainWindow.GetMachIniFile()) nVal = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
m_IsNewConsole = (nVal = 1)
If m_IsNewConsole Then If m_IsNewConsole Then
GetPrivateProfileString(S_NCDATA, K_XYJOG, "", sVal, m_MainWindow.GetMachIniFile()) GetPrivateProfileString(S_NCDATA, K_XYJOG, "", sVal, m_MainWindow.GetMachIniFile())
m_CN.SetCnDataVar(CN_generico.CnData.XYJog, sVal) If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.XYJog, sVal)
GetPrivateProfileString(S_NCDATA, K_ZCJOG, "", sVal, m_MainWindow.GetMachIniFile()) GetPrivateProfileString(S_NCDATA, K_ZCJOG, "", sVal, m_MainWindow.GetMachIniFile())
m_CN.SetCnDataVar(CN_generico.CnData.ZCJog, sVal) If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.ZCJog, sVal)
GetPrivateProfileString(S_NCDATA, K_ZBJOG, "", sVal, m_MainWindow.GetMachIniFile()) GetPrivateProfileString(S_NCDATA, K_ZBJOG, "", sVal, m_MainWindow.GetMachIniFile())
m_CN.SetCnDataVar(CN_generico.CnData.ZBJog, sVal) If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.ZBJog, sVal)
GetPrivateProfileString(S_NCDATA, K_POWERON, "", sVal, m_MainWindow.GetMachIniFile()) GetPrivateProfileString(S_NCDATA, K_POWERON, "", sVal, m_MainWindow.GetMachIniFile())
m_CN.SetCnDataVar(CN_generico.CnData.PowerON, sVal) If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.PowerON, sVal)
GetPrivateProfileString(S_NCDATA, K_REMOTE, "", sVal, m_MainWindow.GetMachIniFile()) GetPrivateProfileString(S_NCDATA, K_REMOTE, "", sVal, m_MainWindow.GetMachIniFile())
m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal) If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal)
End If End If
' Inizializzo la comunicazione ' Inizializzo la comunicazione
m_CN.Init() m_CN.Init()
Catch ex As Exception Catch ex As Exception
' set status to statusbar ' set status to statusbar
@@ -375,6 +381,7 @@ Public Class CNCommunication
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg) EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
Process.Start(m_sCNSiemensHMIPath, sArg) Process.Start(m_sCNSiemensHMIPath, sArg)
m_CN.m_IsSiemensOne = GetPrivateProfileInt(S_NCSIEMENS, K_ISSIEMENSONE, 0, m_MainWindow.GetMachIniFile()) > 0 m_CN.m_IsSiemensOne = GetPrivateProfileInt(S_NCSIEMENS, K_ISSIEMENSONE, 0, m_MainWindow.GetMachIniFile()) > 0
m_CN.m_IsActiveModeSubscription = GetPrivateProfileInt(S_NCSIEMENS, K_ISACTIVEMODESUBSCR, 0, m_MainWindow.GetMachIniFile()) > 0
If m_CN.m_IsSiemensOne Then If m_CN.m_IsSiemensOne Then
' stati bottoni parte 1 ' stati bottoni parte 1
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.Laser), VarType.TInteger, 0) m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.Laser), VarType.TInteger, 0)
@@ -391,6 +398,8 @@ Public Class CNCommunication
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.SpeedOvr), VarType.TDouble, 1) m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.SpeedOvr), VarType.TDouble, 1)
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile) GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile)
ElseIf m_CN.m_IsActiveModeSubscription Then
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.BlowState), VarType.TInteger, 3)
End If End If
Catch ex As Exception Catch ex As Exception
EgtOutLog("Error starting Process -> NcLink=True type=0") EgtOutLog("Error starting Process -> NcLink=True type=0")
@@ -694,12 +703,17 @@ Public Class CNCommunication
m_MachineStatus.DisplayVar() m_MachineStatus.DisplayVar()
'EgtOutLog("Modo attivato: " & m_CN.read_active_mode & " modo attivo: " & m_nCurrMode) 'EgtOutLog("Modo attivato: " & m_CN.read_active_mode & " modo attivo: " & m_nCurrMode)
Dim TempCurrMode As Short = m_CN.read_active_mode() If m_nCountRefresh > 10 Then
'EgtOutLog("Machine status: " & TempCurrMode) Dim TempCurrMode As Short = m_CN.read_active_mode()
If TempCurrMode <> m_nCurrMode Then 'EgtOutLog("Machine status: " & TempCurrMode)
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode) If TempCurrMode <> m_nCurrMode Then
m_nCurrMode = CInt(TempCurrMode) 'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
m_MachineStatus.DisplayActiveMode(m_nCurrMode) m_nCurrMode = CInt(TempCurrMode)
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
End If
m_nCountRefresh = 0
Else
m_nCountRefresh = m_nCountRefresh + 1
End If End If
If m_CN.b_NC_error Then If m_CN.b_NC_error Then
+5 -3
View File
@@ -131,8 +131,7 @@ Public Class CN_Siemens
Public Overrides Function read_active_mode() As Short Public Overrides Function read_active_mode() As Short
'EgtOutLog("Modo attivo: " & M_MMFiles.SiemensRet.n_param2) 'EgtOutLog("Modo attivo: " & M_MMFiles.SiemensRet.n_param2)
'Return M_MMFiles.read_active_mode() If m_IsSiemensOne Or m_IsActiveModeSubscription Then
If m_IsSiemensOne Then
Select Case n_data(3) Select Case n_data(3)
Case 1 Case 1
Return 0 Return 0
@@ -144,7 +143,10 @@ Public Class CN_Siemens
Return 0 Return 0
End Select End Select
Else Else
Return CShort(M_MMFiles.SiemensRet.n_param2) ' per verificare che la comunicazione funzioni correttamente
EgtOutLog("Modo -read_active_mode-: " & M_MMFiles.SiemensRet.n_param2.ToString)
Return M_MMFiles.read_active_mode()
'Return CShort(M_MMFiles.SiemensRet.n_param2)
End If End If
End Function End Function
+2
View File
@@ -88,6 +88,8 @@ Public MustInherit Class CN_generico
#Region " Interface" #Region " Interface"
Friend m_IsSiemensOne As Boolean = False Friend m_IsSiemensOne As Boolean = False
Friend m_IsActiveModeSubscription As Boolean = False
Friend m_DbVarPath As String = "" Friend m_DbVarPath As String = ""
Public IsFlexiumPlus As Boolean = False Public IsFlexiumPlus As Boolean = False
+51 -28
View File
@@ -398,13 +398,35 @@ Module M_MMFiles
End Function End Function
Function WriteCncMode(ByVal nmode As Short) As Short Function WriteCncMode(ByVal nmode As Short) As Short
'EgtOutLog("WriteCncMode start dell'm_mmFiles") Dim nNewWriteCNCMode As Integer = 0
SiemensSend.n_Command = CMD.CMD_WriteCncMode If GetPrivateProfileInt(S_NCSIEMENS, K_NEWWRITECNCMODE, nNewWriteCNCMode, m_MainWindow.GetMachIniFile()) <> 0 Then
SiemensSend.n_param1 = nmode Dim s_var As String = String.Empty
GetPrivateProfileString(S_NCDATA, K_WRITECNCMODEVAR, "db11.dbx0", s_var, m_MainWindow.GetMachIniFile())
execute_command() Select Case nmode
'EgtOutLog("WriteCncMode end dell'm_mmFiles") Case 0
Return SiemensRet.n_result ' Auto
s_var &= ".0"
Case 2
' MDI
s_var &= ".1"
Case 7
' manuale
s_var &= ".2"
Case Else
' manuale
s_var &= ".2"
End Select
EgtOutLog("Nuova scrittura modo: case(" & nmode.ToString & ") -> " & s_var)
Return Write_var(s_var, CShort(1), CInt(1), 0, 0, "")
Else
'EgtOutLog("WriteCncMode start dell'm_mmFiles")
SiemensSend.n_Command = CMD.CMD_WriteCncMode
SiemensSend.n_param1 = nmode
EgtOutLog("Attivata modalità: " & SiemensSend.n_param1.ToString)
execute_command()
'EgtOutLog("WriteCncMode end dell'm_mmFiles")
Return SiemensRet.n_result
End If
End Function End Function
@@ -454,6 +476,7 @@ Module M_MMFiles
SiemensSend.n_param1 = nChannel SiemensSend.n_param1 = nChannel
execute_command() execute_command()
'EgtOutLog("MDI_command end dell'm_mmFiles") 'EgtOutLog("MDI_command end dell'm_mmFiles")
Return SiemensRet.n_result Return SiemensRet.n_result
@@ -592,7 +615,6 @@ Module M_MMFiles
'---------------------------------------------------------------------------------------------------------- '----------------------------------------------------------------------------------------------------------
' '
Sub execute_command() Sub execute_command()
Try Try
' Attesa eventuale busy iniziale ' Attesa eventuale busy iniziale
Dim nCount As Integer = 0 Dim nCount As Integer = 0
@@ -619,25 +641,25 @@ Module M_MMFiles
bEnd = False bEnd = False
While Not bEnd While Not bEnd
Select Case nState Select Case nState
Case State.Command_on ' alzato il comando attendo il busy Case State.Command_on ' alzato il comando attendo il busy
If SiemensRet.b_busy Then If SiemensRet.b_busy Then
nState = State.Busy_On nState = State.Busy_On
Else Else
System.Threading.Thread.Sleep(50) System.Threading.Thread.Sleep(50)
End If End If
Case State.Busy_On ' trovato il busy abbasso il comando Case State.Busy_On ' trovato il busy abbasso il comando
SiemensSend.n_Flag = COMMAND_OFF ' abbasso il comando SiemensSend.n_Flag = COMMAND_OFF ' abbasso il comando
' scrivo !!!!! ' scrivo !!!!!
Marshal.StructureToPtr(SiemensSend, pView, False) Marshal.StructureToPtr(SiemensSend, pView, False)
nState = State.Command_off nState = State.Command_off
Case State.Command_off ' abbassato il comando attendo il busy basso Case State.Command_off ' abbassato il comando attendo il busy basso
If SiemensRet.b_busy Then If SiemensRet.b_busy Then
System.Threading.Thread.Sleep(50) System.Threading.Thread.Sleep(50)
Else Else
nState = State.Busy_Off nState = State.Busy_Off
End If End If
Case State.Busy_Off Case State.Busy_Off
bEnd = True bEnd = True
End Select End Select
' controllo massimo numero di cicli ' controllo massimo numero di cicli
nCount += 1 nCount += 1
@@ -723,7 +745,8 @@ Module M_MMFiles
CurrCN.d_Dvariable_values(n) = SiemensRet.d_interf_variable_values(n) CurrCN.d_Dvariable_values(n) = SiemensRet.d_interf_variable_values(n)
Next Next
' copy spindle current ' copy spindle current: per debuggare errore di comunicazione
'EgtOutLog("Spindle -d_interf_spindle_power-: " & SiemensRet.d_interf_spindle_power.ToString)
CurrCN.d_spindle_power = SiemensRet.d_interf_spindle_power CurrCN.d_spindle_power = SiemensRet.d_interf_spindle_power
CurrCN.n_spindle_override(0) = SiemensRet.n_interf_spindle_override CurrCN.n_spindle_override(0) = SiemensRet.n_interf_spindle_override
+10 -1
View File
@@ -1578,7 +1578,16 @@ Namespace Num
End Sub End Sub
Public Overrides Sub DPlcVariables_WriteVariables(sz_var_names As String, sz_values As String) Public Overrides Sub DPlcVariables_WriteVariables(sz_var_names As String, sz_values As String)
Dim _ret As Short = objDPlcVariables.WriteVariables(sz_var_names, CShort(sz_values)) Dim value As Short = 0
If Not Short.TryParse(sz_values, value) Then
If Not IsNothing( sz_values) then
EgtOutLog("Write variable: " & sz_var_names & ", value:" & sz_values & " failed!")
Else
EgtOutLog("Write variable: " & sz_var_names & ", value:nothing failed!")
End If
Return
End If
Dim _ret As Short = objDPlcVariables.WriteVariables(sz_var_names, value)
If _ret <> 0 Then If _ret <> 0 Then
EgtOutLog("Scrittura " & sz_var_names & " fallita") EgtOutLog("Scrittura " & sz_var_names & " fallita")
Else Else
+198 -1
View File
@@ -173,6 +173,9 @@
<Compile Include="DirectCuts\SingleCutAuto.xaml.vb"> <Compile Include="DirectCuts\SingleCutAuto.xaml.vb">
<DependentUpon>SingleCutAuto.xaml</DependentUpon> <DependentUpon>SingleCutAuto.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="DirectCuts\SingleDrillUC.xaml.vb">
<DependentUpon>SingleDrillUC.xaml</DependentUpon>
</Compile>
<Compile Include="DrawImport\AlzFrontUC.xaml.vb"> <Compile Include="DrawImport\AlzFrontUC.xaml.vb">
<DependentUpon>AlzFrontUC.xaml</DependentUpon> <DependentUpon>AlzFrontUC.xaml</DependentUpon>
</Compile> </Compile>
@@ -193,9 +196,18 @@
<DependentUpon>CadCutPageUC.xaml</DependentUpon> <DependentUpon>CadCutPageUC.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="CAM\CamAuto.vb" /> <Compile Include="CAM\CamAuto.vb" />
<Compile Include="Machine\ImportExportMachiningWindowWD.xaml.vb">
<DependentUpon>ImportExportMachiningWindowWD.xaml</DependentUpon>
</Compile>
<Compile Include="Machine\ImportExportToolWD.xaml.vb">
<DependentUpon>ImportExportToolWD.xaml</DependentUpon>
</Compile>
<Compile Include="Project\StartLauncheWD.xaml.vb"> <Compile Include="Project\StartLauncheWD.xaml.vb">
<DependentUpon>StartLauncheWD.xaml</DependentUpon> <DependentUpon>StartLauncheWD.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Project\CicloStartWD.xaml.vb">
<DependentUpon>CicloStartWD.xaml</DependentUpon>
</Compile>
<Compile Include="RawPhoto\SlabIdWD.xaml.vb"> <Compile Include="RawPhoto\SlabIdWD.xaml.vb">
<DependentUpon>SlabIdWD.xaml</DependentUpon> <DependentUpon>SlabIdWD.xaml</DependentUpon>
</Compile> </Compile>
@@ -397,6 +409,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="DirectCuts\SingleDrillUC.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="DrawImport\AlzFrontUC.xaml"> <Page Include="DrawImport\AlzFrontUC.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -421,7 +437,16 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="Machine\ImportExportMachiningWindowWD.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Machine\ImportExportToolWD.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="Project\StartLauncheWD.xaml"> <Page Include="Project\StartLauncheWD.xaml">
</Page>
<Page Include="Project\CicloStartWD.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
@@ -730,7 +755,6 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\AvantiVeloce.png" /> <Resource Include="Resources\AvantiVeloce.png" />
<Resource Include="Resources\IndietroVeloce.png" /> <Resource Include="Resources\IndietroVeloce.png" />
<Resource Include="Resources\NewIcons\ZCJog.png" />
<Resource Include="Resources\Pause.png" /> <Resource Include="Resources\Pause.png" />
<Resource Include="Resources\Play.png" /> <Resource Include="Resources\Play.png" />
</ItemGroup> </ItemGroup>
@@ -1029,9 +1053,182 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewIcons\SlabId.png" /> <Resource Include="Resources\NewIcons\SlabId.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Nuovo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Carica.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Salva.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Salva-con-nome.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\CSV.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Vein-match.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\DatiMacchina.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\DB-lavorazioni.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\DB-utensili.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Macchina.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Movimento-manuale.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Taglio-singolo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Taglio-multiplo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Taglio-griglia.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Spianatura.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Copia-dima.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Sezione-cornice.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Foro-singolo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Acquisisci-P1_P2.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Esegui.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Simula.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Test-lama.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\File-CSV.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Allunga-o-accorcia.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Inizio-allunga-o-accorcia.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Fine-allunga-o-accorcia.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\ON_OFF-singolo-taglio.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Tutti-ON.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Tutti-OFF.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Inizio-centro-fuori.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Fine-centro-fuori.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Modifica-inizio.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Modifica-fine.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Inverti.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Pausa-ON_OFF.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Inizio-tutti-fuori.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Inizio-tutti-centro.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Fine-tutti-centro.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Fine-tutti-fuori.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Tutti-allunga.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Tutti-accorcia.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Parcheggia-pezzo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Inserisci-pezzo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Elimina-pezzo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Seleziona-tutto.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Deseleziona-tutto.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Arco.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Linea.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Rimuovi-segmento.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Chiudi.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Salva-taglio.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Take-point.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Specchia.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Rimuovi_elimina.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewIcons\XYJog.png" /> <Resource Include="Resources\NewIcons\XYJog.png" />
<Resource Include="Resources\NewIcons\ZBJog.png" /> <Resource Include="Resources\NewIcons\ZBJog.png" />
<Resource Include="Resources\NewIcons\ZCJog.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Lucidatura.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Acquisisci-P1.png" />
<Resource Include="Resources\NewIcons\Acquisisci-P2.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Acquisisci-P.png" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
+143 -4
View File
@@ -88,6 +88,81 @@
<BitmapImage x:Key="StopImg" UriSource="Resources/NewIcons/Stop.png"></BitmapImage> <BitmapImage x:Key="StopImg" UriSource="Resources/NewIcons/Stop.png"></BitmapImage>
<BitmapImage x:Key="VacuumImg" UriSource="Resources/NewIcons/Vacuum.png"></BitmapImage> <BitmapImage x:Key="VacuumImg" UriSource="Resources/NewIcons/Vacuum.png"></BitmapImage>
<!--General-->
<BitmapImage x:Key="EseguiImg" UriSource="Resources/NewIcons/Esegui.png"></BitmapImage>
<BitmapImage x:Key="SimulaImg" UriSource="Resources/NewIcons/Simula.png"></BitmapImage>
<!--ProjectManager-->
<BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
<BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
<BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
<BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/File-CSV.png"></BitmapImage>
<BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
<BitmapImage x:Key="Test-lamaImg" UriSource="Resources/NewIcons/Test-lama.png"></BitmapImage>
<BitmapImage x:Key="Parcheggia-pezzoImg" UriSource="Resources/NewIcons/Parcheggia-pezzo.png"></BitmapImage>
<BitmapImage x:Key="Inserisci-pezzoImg" UriSource="Resources/NewIcons/Inserisci-pezzo.png"></BitmapImage>
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
<!--Machine-->
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
<BitmapImage x:Key="LucidaturaImg" UriSource="Resources/NewIcons/Lucidatura.png"></BitmapImage>
<!--Direct cuts-->
<BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
<BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
<BitmapImage x:Key="Taglio-singoloImg" UriSource="Resources/NewIcons/Taglio-singolo.png"></BitmapImage>
<BitmapImage x:Key="Foro-singoloImg" UriSource="Resources/NewIcons/Foro-singolo.png"></BitmapImage>
<BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
<BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
<BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
<BitmapImage x:Key="Acquisisci-P1_P2Img" UriSource="Resources/NewIcons/Acquisisci-P1_P2.png"></BitmapImage>
<BitmapImage x:Key="Acquisisci-P1Img" UriSource="Resources/NewIcons/Acquisisci-P1.png"></BitmapImage>
<BitmapImage x:Key="Acquisisci-P2Img" UriSource="Resources/NewIcons/Acquisisci-P2.png"></BitmapImage>
<BitmapImage x:Key="Acquisisci-PImg" UriSource="Resources/NewIcons/Acquisisci-P.png"></BitmapImage>
<BitmapImage x:Key="ArcoImg" UriSource="Resources/NewIcons/Arco.png"></BitmapImage>
<BitmapImage x:Key="LineaImg" UriSource="Resources/NewIcons/Linea.png"></BitmapImage>
<BitmapImage x:Key="Rimuovi-segmentoImg" UriSource="Resources/NewIcons/Rimuovi-segmento.png"></BitmapImage>
<BitmapImage x:Key="ChiudiImg" UriSource="Resources/NewIcons/Chiudi.png"></BitmapImage>
<BitmapImage x:Key="Salva-taglioImg" UriSource="Resources/NewIcons/Salva-taglio.png"></BitmapImage>
<BitmapImage x:Key="Take-pointImg" UriSource="Resources/NewIcons/Take-point.png"></BitmapImage>
<BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
<BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
<BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>
<!--Frame-->
<BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
<BitmapImage x:Key="SpecchiaImg" UriSource="Resources/NewIcons/Specchia.png"></BitmapImage>
<BitmapImage x:Key="Rimuovi_eliminaImg" UriSource="Resources/NewIcons/Rimuovi_elimina.png"></BitmapImage>
<!--Machinig-->
<BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
<BitmapImage x:Key="Tutti-OFFImg" UriSource="Resources/NewIcons/Tutti-OFF.png"></BitmapImage>
<BitmapImage x:Key="Inizio-Centro-FuoriImg" UriSource="Resources/NewIcons/Inizio-centro-fuori.png"></BitmapImage>
<BitmapImage x:Key="Fine-Centro-FuoriImg" UriSource="Resources/NewIcons/Fine-centro-fuori.png"></BitmapImage>
<BitmapImage x:Key="Modifica-InizioImg" UriSource="Resources/NewIcons/Modifica-inizio.png"></BitmapImage>
<BitmapImage x:Key="Modifica-FineImg" UriSource="Resources/NewIcons/Modifica-fine.png"></BitmapImage>
<BitmapImage x:Key="InvertiImg" UriSource="Resources/NewIcons/Inverti.png"></BitmapImage>
<BitmapImage x:Key="Pausa-ON_OFFImg" UriSource="Resources/NewIcons/Pausa-ON_OFF.png"></BitmapImage>
<BitmapImage x:Key="Inizio-tutti-fuoriImg" UriSource="Resources/NewIcons/Inizio-tutti-fuori.png"></BitmapImage>
<BitmapImage x:Key="Inizio-tutti-centroImg" UriSource="Resources/NewIcons/Inizio-tutti-centro.png"></BitmapImage>
<BitmapImage x:Key="Fine-tutti-fuoriImg" UriSource="Resources/NewIcons/Fine-tutti-fuori.png"></BitmapImage>
<BitmapImage x:Key="Fine-tutti-centroImg" UriSource="Resources/NewIcons/Fine-tutti-centro.png"></BitmapImage>
<BitmapImage x:Key="Tutti-allungaImg" UriSource="Resources/NewIcons/Tutti-allunga.png"></BitmapImage>
<BitmapImage x:Key="Tutti-accorciaImg" UriSource="Resources/NewIcons/Tutti-accorcia.png"></BitmapImage>
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Roboto</FontFamily> <FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Roboto</FontFamily>
<SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#636974" /> <SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#636974" />
@@ -128,12 +203,19 @@
</Style> </Style>
<Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}"> <Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
<!--<Setter Property="Background" Value="#636974"/> <!--<Setter Property="Background" Value="#636974" #3C3F48/>
<Setter Property="BorderBrush" Value="#636974"/>--> <Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
<Setter Property="Background" Value="#3C3F48"/> <Setter Property="Background" Value="#3C3F48"/>
<Setter Property="BorderBrush" Value="#3C3F48"/> <Setter Property="BorderBrush" Value="#3C3F48"/>
</Style> </Style>
<Style x:Key="OmagCut_MachiningBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
<!--<Setter Property="Background" Value="#636974" #3C3F48/>
<Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
<Setter Property="Background" Value="{StaticResource OmagCut_Blue}"/>
<Setter Property="BorderBrush" Value="#3C3F48"/>
</Style>
<Style x:Key="OmagCut_EmptyBorder" TargetType="{x:Type Border}"> <Style x:Key="OmagCut_EmptyBorder" TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/> <Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
<Setter Property="CornerRadius" Value="{DynamicResource EmptyBorder_CornerRadius}"/> <Setter Property="CornerRadius" Value="{DynamicResource EmptyBorder_CornerRadius}"/>
@@ -251,14 +333,32 @@
</Style> </Style>
<Style x:Key="OmagCut_YellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}"> <Style x:Key="OmagCut_YellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Background" Value="#636974"/> <Setter Property="Background" Value="#636974"/>
<Setter Property="BorderBrush" Value="#636974"/> <Setter Property="BorderBrush" Value="#636974"/>
<Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/> <Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter x:Name="MyContentPresenter"
Content="{TemplateBinding Content}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers> <Style.Triggers>
<Trigger Property="IsChecked" Value="True"> <Trigger Property="IsChecked" Value="True">
<Setter Property="ToggleButton.Background" Value="#145993" /> <Setter Property="ToggleButton.Background" Value="#145993" />
</Trigger> </Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_Blue}"/>
</Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}"> <Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
@@ -438,10 +538,30 @@
</Style> </Style>
<Style x:Key="OmagCut_YellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}"> <Style x:Key="OmagCut_YellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Background" Value="#1C1D22"/> <Setter Property="Background" Value="#1C1D22"/>
<Setter Property="BorderBrush" Value="#1C1D22"/> <Setter Property="BorderBrush" Value="#1C1D22"/>
<!--<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>--> <!--<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>-->
<Setter Property="Foreground" Value="White"/> <Setter Property="Foreground" Value="LightGray"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter x:Name="MyContentPresenter"
Content="{TemplateBinding Content}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_DarkGray}"/>
</Trigger>
</Style.Triggers>
</Style> </Style>
<Style x:Key="OmagCut_RightGrayYellowTextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton_Wrap}"> <Style x:Key="OmagCut_RightGrayYellowTextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton_Wrap}">
@@ -459,10 +579,29 @@
</Style> </Style>
<Style x:Key="OmagCut_GradientBlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}"> <Style x:Key="OmagCut_GradientBlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Background" Value="#2D3036"/> <Setter Property="Background" Value="#2D3036"/>
<Setter Property="BorderBrush" Value="#2D3036"/> <Setter Property="BorderBrush" Value="#2D3036"/>
<!--<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>--> <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter x:Name="MyContentPresenter"
Content="{TemplateBinding Content}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_Blue}"/>
</Trigger>
</Style.Triggers>
</Style> </Style>
<Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}"> <Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
+96 -2
View File
@@ -155,6 +155,83 @@
<BitmapImage x:Key="StopImg" UriSource="Resources/Stop.png"></BitmapImage> <BitmapImage x:Key="StopImg" UriSource="Resources/Stop.png"></BitmapImage>
<BitmapImage x:Key="VacuumImg" UriSource="Resources/Vacuum.png"></BitmapImage> <BitmapImage x:Key="VacuumImg" UriSource="Resources/Vacuum.png"></BitmapImage>
<!--sono le stesse immagini usate per l'interfaccia Dark-->
<!--General-->
<BitmapImage x:Key="EseguiImg" UriSource="Resources/NewIcons/Esegui.png"></BitmapImage>
<BitmapImage x:Key="SimulaImg" UriSource="Resources/NewIcons/Simula.png"></BitmapImage>
<!--ProjectManager-->
<BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
<BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
<BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
<BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/File-CSV.png"></BitmapImage>
<BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
<BitmapImage x:Key="Test-lamaImg" UriSource="Resources/NewIcons/Test-lama.png"></BitmapImage>
<BitmapImage x:Key="Parcheggia-pezzoImg" UriSource="Resources/NewIcons/Parcheggia-pezzo.png"></BitmapImage>
<BitmapImage x:Key="Inserisci-pezzoImg" UriSource="Resources/NewIcons/Inserisci-pezzo.png"></BitmapImage>
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
<!--Machine-->
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
<BitmapImage x:Key="LucidaturaImg" UriSource="Resources/NewIcons/Lucidatura.png"></BitmapImage>
<!--Direct cuts-->
<BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
<BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
<BitmapImage x:Key="Taglio-singoloImg" UriSource="Resources/NewIcons/Taglio-singolo.png"></BitmapImage>
<BitmapImage x:Key="Foro-singoloImg" UriSource="Resources/NewIcons/Foro-singolo.png"></BitmapImage>
<BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
<BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
<BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
<BitmapImage x:Key="Acquisisci-P1_P2Img" UriSource="Resources/NewIcons/Acquisisci-P1_P2.png"></BitmapImage>
<BitmapImage x:Key="Acquisisci-P1Img" UriSource="Resources/NewIcons/Acquisisci-P1.png"></BitmapImage>
<BitmapImage x:Key="Acquisisci-P2Img" UriSource="Resources/NewIcons/Acquisisci-P2.png"></BitmapImage>
<BitmapImage x:Key="Acquisisci-PImg" UriSource="Resources/NewIcons/Acquisisci-P.png"></BitmapImage>
<BitmapImage x:Key="ArcoImg" UriSource="Resources/NewIcons/Arco.png"></BitmapImage>
<BitmapImage x:Key="LineaImg" UriSource="Resources/NewIcons/Linea.png"></BitmapImage>
<BitmapImage x:Key="Rimuovi-segmentoImg" UriSource="Resources/NewIcons/Rimuovi-segmento.png"></BitmapImage>
<BitmapImage x:Key="ChiudiImg" UriSource="Resources/NewIcons/Chiudi.png"></BitmapImage>
<BitmapImage x:Key="Salva-taglioImg" UriSource="Resources/NewIcons/Salva-taglio.png"></BitmapImage>
<BitmapImage x:Key="Take-pointImg" UriSource="Resources/NewIcons/Take-point.png"></BitmapImage>
<BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
<BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
<BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>
<!--Frame-->
<BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
<BitmapImage x:Key="SpecchiaImg" UriSource="Resources/NewIcons/Specchia.png"></BitmapImage>
<BitmapImage x:Key="Rimuovi_eliminaImg" UriSource="Resources/NewIcons/Rimuovi_elimina.png"></BitmapImage>
<!--Machinig-->
<BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
<BitmapImage x:Key="Tutti-OFFImg" UriSource="Resources/NewIcons/Tutti-OFF.png"></BitmapImage>
<BitmapImage x:Key="Inizio-Centro-FuoriImg" UriSource="Resources/NewIcons/Inizio-centro-fuori.png"></BitmapImage>
<BitmapImage x:Key="Fine-Centro-FuoriImg" UriSource="Resources/NewIcons/Fine-centro-fuori.png"></BitmapImage>
<BitmapImage x:Key="Modifica-InizioImg" UriSource="Resources/NewIcons/Modifica-inizio.png"></BitmapImage>
<BitmapImage x:Key="Modifica-FineImg" UriSource="Resources/NewIcons/Modifica-fine.png"></BitmapImage>
<BitmapImage x:Key="InvertiImg" UriSource="Resources/NewIcons/Inverti.png"></BitmapImage>
<BitmapImage x:Key="Pausa-ON_OFFImg" UriSource="Resources/NewIcons/Pausa-ON_OFF.png"></BitmapImage>
<BitmapImage x:Key="Inizio-tutti-fuoriImg" UriSource="Resources/NewIcons/Inizio-tutti-fuori.png"></BitmapImage>
<BitmapImage x:Key="Inizio-tutti-centroImg" UriSource="Resources/NewIcons/Inizio-tutti-centro.png"></BitmapImage>
<BitmapImage x:Key="Fine-tutti-fuoriImg" UriSource="Resources/NewIcons/Fine-tutti-fuori.png"></BitmapImage>
<BitmapImage x:Key="Fine-tutti-centroImg" UriSource="Resources/NewIcons/Fine-tutti-centro.png"></BitmapImage>
<BitmapImage x:Key="Tutti-allungaImg" UriSource="Resources/NewIcons/Tutti-allunga.png"></BitmapImage>
<BitmapImage x:Key="Tutti-accorciaImg" UriSource="Resources/NewIcons/Tutti-accorcia.png"></BitmapImage>
<BitmapImage x:Key="LastProjImg" UriSource="Resources/NewIcons/PlayStep.png"></BitmapImage>
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Century Gothic</FontFamily> <FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Century Gothic</FontFamily>
<SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#FFFFFFFF" />
@@ -173,7 +250,14 @@
<Setter Property="Margin" Value="1" /> <Setter Property="Margin" Value="1" />
</Style> </Style>
<!--Border--> <Style x:Key="OmagCut_MachiningBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
<!--<Setter Property="Background" Value="#636974" #3C3F48/>
<Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
<Setter Property="Background" Value="{StaticResource OmagCut_Yellow}"/>
<Setter Property="BorderBrush" Value="#3C3F48"/>
</Style>
<!--Border-->
<Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}"> <Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/> <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/> <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
@@ -921,7 +1005,16 @@
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" /> <TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" />
</DataTemplate> </DataTemplate>
<!--DataTemplate testo ed immagine--> <DataTemplate x:Key="FileNameLsBxItem">
<DockPanel>
<TextBlock Text="{Binding GraphicName}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
DockPanel.Dock="Left" Width="130"/>
<TextBlock Text="{Binding sDate}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
DockPanel.Dock="Right" />
</DockPanel>
</DataTemplate>
<!--DataTemplate testo ed immagine-->
<DataTemplate x:Key="DataTemplateItem"> <DataTemplate x:Key="DataTemplateItem">
<Grid > <Grid >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -1139,6 +1232,7 @@
<Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}"> <Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/> <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/>
<Setter Property="Background" Value="White"/>
<Setter Property="IsReadOnly" Value="True"/> <Setter Property="IsReadOnly" Value="True"/>
<Setter Property="IsEnabled" Value="False"/> <Setter Property="IsEnabled" Value="False"/>
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" /> <Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
+24 -2
View File
@@ -50,6 +50,7 @@ Namespace TreeViewItem
Private m_sPictureString As String Private m_sPictureString As String
Private m_nTType As Integer Private m_nTType As Integer
Private m_Items As ObservableCollection(Of CustomItem) Private m_Items As ObservableCollection(Of CustomItem)
Friend m_IsValidTool As Boolean
Public ReadOnly Property PictureString As String Public ReadOnly Property PictureString As String
Get Get
@@ -86,12 +87,13 @@ Namespace TreeViewItem
'Private m_sTitle As String 'Private m_sTitle As String
Private m_nType As Integer Private m_nType As Integer
'Private m_sName As String
'Public Property Name As String 'Public Property Name As String
' Get ' Get
' Return m_sTitle ' Return m_sName
' End Get ' End Get
' Set(value As String) ' Set(value As String)
' m_sTitle = value ' m_sName = value
' End Set ' End Set
'End Property 'End Property
@@ -101,11 +103,31 @@ Namespace TreeViewItem
End Get End Get
End Property End Property
Friend m_IsValidTool As Boolean = True
Public Property IsValidTool As Boolean
Get
Return m_IsValidTool
End Get
Set(value As Boolean)
If value <> m_IsValidTool Then
m_IsValidTool = value
NotifyPropertyChanged("ToolColor")
End If
End Set
End Property
Sub New(Title As String, nType As Integer) Sub New(Title As String, nType As Integer)
Me.Name = Title Me.Name = Title
m_nType = nType m_nType = nType
End Sub End Sub
Sub New(sName As String, nType As Integer, bIsValidTool As Boolean)
MyBase.Name = sName
m_nType = nType
m_IsValidTool = bIsValidTool
End Sub
End Class End Class
Public Class PartCathegoryItem Public Class PartCathegoryItem
+43 -17
View File
@@ -537,28 +537,54 @@
</GroupBox> </GroupBox>
<!--Selezione il tipo di avvio del programma-->
<GroupBox Name="StartLauncherGpBx"
Grid.Column="3" Grid.RowSpan="3" Grid.ColumnSpan="1"
Style="{DynamicResource OmagCut_GroupBox}">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
</Grid.RowDefinitions>
<ComboBox Name="StartLauncherCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</GroupBox>
<GroupBox Name="FeedbackGpBx" <GroupBox Name="FeedbackGpBx"
Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="1" Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="1"
Style="{DynamicResource OmagCut_GroupBox}"> Style="{DynamicResource OmagCut_GroupBox}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.25*"/> <ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.25*"/> <ColumnDefinition Width="0.25*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Button Name="FeedbackBtn" <Button Name="FeedbackBtn"
Grid.Row="1" Grid.Column="1" Grid.Row="1" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconButton}"> Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/> <Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button> </Button>
</Grid> </Grid>
</GroupBox> </GroupBox>
+14 -1
View File
@@ -9,6 +9,9 @@ Public Class OptionsPageUC
Private UnitsList() As String = {"inch", "mm"} Private UnitsList() As String = {"inch", "mm"}
Private ThemesList() As String = {"Classic", "Dark"} Private ThemesList() As String = {"Classic", "Dark"}
' "Last Project", "New Project", "Open Folder", "Show Window"
Private StartLauncherList() As String = {EgtMsg(91013), EgtMsg(91014), EgtMsg(91015), EgtMsg(91016)}
Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Associazione della lista linguaggi alla combobox ' Associazione della lista linguaggi alla combobox
@@ -28,6 +31,11 @@ Public Class OptionsPageUC
ThemesCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_THEME, 0, m_MainWindow.GetIniFile()) ThemesCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_THEME, 0, m_MainWindow.GetIniFile())
Themes_StartUp() Themes_StartUp()
' Carico la lista con il tipo di avvio
StartLauncherCmBx.ItemsSource = StartLauncherList
' 0-New, 1-Last, 2-Open, 3-Window
StartLauncherCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile())
' Rendo invisibile il GroupBox dei Temi la versione corrente ' Rendo invisibile il GroupBox dei Temi la versione corrente
' ThemesGpBx.Visibility = Windows.Visibility.Collapsed ' ThemesGpBx.Visibility = Windows.Visibility.Collapsed
@@ -102,7 +110,7 @@ Public Class OptionsPageUC
ToleranceEMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 21) ToleranceEMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 21)
AffondamentoMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 27) AffondamentoMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 27)
LarghezzaMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 28) LarghezzaMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 28)
StartLauncherGpBx.Header = EgtMsg(91009)
End Sub End Sub
Private Sub UpdateSlabDxf() Private Sub UpdateSlabDxf()
@@ -304,6 +312,11 @@ Public Class OptionsPageUC
WritePrivateProfileString(S_GENERAL, K_MESSAGES, m_MainWindow.m_CurrLanguage.LanguageName, m_MainWindow.GetIniFile()) WritePrivateProfileString(S_GENERAL, K_MESSAGES, m_MainWindow.m_CurrLanguage.LanguageName, m_MainWindow.GetIniFile())
End Sub End Sub
Private Sub StartLauncherCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles StartLauncherCmBx.SelectionChanged
Dim nIndex As Integer = StartLauncherCmBx.SelectedIndex
WritePrivateProfileString(S_GENERAL, K_AUTOLOADLASTPROJ, StartLauncherCmBx.SelectedIndex, m_MainWindow.GetIniFile())
End Sub
Private Sub UnitsOfMeasureCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles UnitsOfMeasureCmBx.SelectionChanged Private Sub UnitsOfMeasureCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles UnitsOfMeasureCmBx.SelectionChanged
Dim bMM As Boolean = (UnitsOfMeasureCmBx.SelectedIndex <> 0) Dim bMM As Boolean = (UnitsOfMeasureCmBx.SelectedIndex <> 0)
EgtSetUiUnits(bMM) EgtSetUiUnits(bMM)
+50
View File
@@ -0,0 +1,50 @@
<Window x:Class="CicloStartWD"
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="SaveNameWD" Height="200" 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="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="CicloStartTxbl" Grid.Column="1" Grid.Row="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<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="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
+38
View File
@@ -0,0 +1,38 @@
Imports EgtUILib
Imports EgtWPFLib
Imports System.IO
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Class CicloStartWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Public Sub New(Owner As Window)
Me.Owner = Owner
InitializeComponent()
End Sub
' inizializzo la finestra
Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' posiziono la fistra in centro alla pagina
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
' imopposto il messaggio di avvio
CicloStartTxbl.Text = "Avvio Ciclo-Start"
End Sub
' creo un progetto nuovo
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
Me.Close()
End Sub
' Ultimo progetto
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
' Aspetto e lo avvio
System.Threading.Thread.Sleep(300)
' avvio il ciclo start della macchina
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
Me.Close()
End Sub
End Class
+2 -2
View File
@@ -30,7 +30,7 @@
</Grid> </Grid>
<!-- Definizione della Grid laterale --> <!-- Definizione della Grid laterale -->
<Grid Grid.RowSpan="3"> <Grid Grid.RowSpan="3">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="7*"/> <RowDefinition Height="7*"/>
@@ -38,7 +38,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- Definizione della Grid con le caratteristiche del progetto --> <!-- Definizione della Grid con le caratteristiche del progetto -->
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_Border}" Grid.Row="0" > <Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_MachiningBorder}" Grid.Row="0" >
<Grid > <Grid >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
+109 -52
View File
@@ -93,6 +93,14 @@ Public Class CurrentProjectPageUC
Dim DstLnColor As New Color3d(255, 0, 0) Dim DstLnColor As New Color3d(255, 0, 0)
GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor, m_MainWindow.GetIniFile()) GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor, m_MainWindow.GetIniFile())
CurrentProjectScene.SetDistLineMaterial(DstLnColor) CurrentProjectScene.SetDistLineMaterial(DstLnColor)
''imposto il colore di sfondo del progetto
'Dim BAckTopColor As New Color3d(192, 192, 192)
'GetPrivateProfileColor(S_SCENE, "BackTop", BAckTopColor, m_MainWindow.GetIniFile())
'Dim BackBottom As New Color3d(192, 192, 192)
'GetPrivateProfileColor(S_SCENE, "BackBottom", BackBottom, m_MainWindow.GetIniFile())
'CurrentProjectScene.SetViewBackground(BAckTopColor, BackBottom)
' imposto parametri OpenGL ' imposto parametri OpenGL
Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3, m_MainWindow.GetIniFile()) Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3, m_MainWindow.GetIniFile())
Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1, m_MainWindow.GetIniFile()) <> 0) Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1, m_MainWindow.GetIniFile()) <> 0)
@@ -174,26 +182,27 @@ Public Class CurrentProjectPageUC
m_bFirst = False m_bFirst = False
' ------------------ SELEZIONE AVVIO ----------------------------- ' ------------------ SELEZIONE AVVIO -----------------------------
'' apro la finstra di selezione di avvio del programma ' apro la finstra di selezione di avvio del programma
'StartProgram() 'StartProgram()
' ------------------ SELEZIONE AVVIO ----------------------------- ' ------------------ SELEZIONE AVVIO -----------------------------
' Se richiesto, carico ultimo progetto '' Se richiesto, carico ultimo progetto
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0 'Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
If bAutoLoadLast Then 'If bAutoLoadLast Then
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile()) ' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge" ' Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
If Not LoadProject(sPath, False) Then ' If Not LoadProject(sPath, False) Then
NewProject() ' NewProject()
End If ' End If
EgtResetModified() ' EgtResetModified()
'Altrimenti ne imposto uno nuovo ' 'Altrimenti ne imposto uno nuovo
Else 'Else
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile()) ' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
NewProject() ' NewProject()
End If 'End If
'' creo nuovo progetto ' creo nuovo progetto
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
'NewProject() 'NewProject()
' Nascondo progress per fotografia ' Nascondo progress per fotografia
@@ -227,16 +236,18 @@ Public Class CurrentProjectPageUC
End Sub End Sub
Public Sub StartProgram() Public Sub StartProgram()
' leggo il tipo di avvio del programma: 0-New, 1-Last, 2-Open, 3-Window
Dim nStart As Integer = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile())
Dim MyStartLancherWD As New StartLauncherWD(m_MainWindow) Dim MyStartLancherWD As New StartLauncherWD(m_MainWindow)
MyStartLancherWD.ShowDialog() ' mostro la finestra di avvio solo se configirato (= 3)
If nStart = MODE_LAUNCHER.ShowWindow Then
' Se richiesto, carico ultimo progetto MyStartLancherWD.ShowDialog()
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0 Else
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile()) MyStartLancherWD.CurrSelection = nStart
' se ultimo progetto End If
If MyStartLancherWD.CurrSelection = 2 Then
bAutoLoadLast = True
If MyStartLancherWD.CurrSelection = MODE_LAUNCHER.LastProject Then
' Stampo il numero di progetto con 4 decimali: 12 -> "0012" ' Stampo il numero di progetto con 4 decimali: 12 -> "0012"
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge" Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
' provo ad aprire l'ultimo progetto modificato ' provo ad aprire l'ultimo progetto modificato
@@ -249,35 +260,71 @@ Public Class CurrentProjectPageUC
End If End If
EgtResetModified() EgtResetModified()
' apro il file selezionato all'avvio ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.NewProject Then
ElseIf MyStartLancherWD.CurrSelection = 3 Then
If Not LoadProject(MyStartLancherWD.SelPath, False) Then
' altrimenti apro un nuovo progetto
NewProject()
Else
' salvo il nome del file caricato
m_MruFiles.Add(MyStartLancherWD.SelPath)
End If
EgtResetModified()
' se nuovo progetto o naviga direttorio
ElseIf MyStartLancherWD.CurrSelection = 1 Or MyStartLancherWD.CurrSelection = 0 Then
bAutoLoadLast = False
NewProject() NewProject()
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.OpenFolder Then
NewProject()
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
m_SceneButtons.MeasureBtn.IsChecked = False
' Cancello eventuali messaggi
ClearMessage()
' Imposto la pagina attualmente attiva come Previous
m_MainWindow.m_PrevActivePage = m_MainWindow.m_ActivePage
' Passo alla pagina di apertura con preview
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
' seleziono il file dalla lista della finestra (= 4)
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.SelectedProject Then
NewProject()
Dim sCurrDir As String = Path.GetDirectoryName(MyStartLancherWD.SelPath)
Dim sCurrFile As String = Path.GetFileName(MyStartLancherWD.SelPath)
If Not LoadProject(sCurrDir & "\" & sCurrFile) Then
NewProject()
m_MruFiles.Remove(sCurrDir & "\" & sCurrFile)
Else
' Verifico se file salvato con nome guardando il nome della cartella in cui si trova
Dim sSaveNameDir As String = String.Empty
GetPrivateProfileString(S_GENERAL, K_SAVENAMEDIR, "", sSaveNameDir, m_MainWindow.GetIniFile())
If sCurrDir = sSaveNameDir Then
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, sCurrFile.Substring(0, sCurrFile.Length - 4), m_MainWindow.GetIniFile())
' Salvo equivalente con indice
SetNextProjectIndex()
SaveProject()
Else
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, String.Empty, m_MainWindow.GetIniFile())
End If
' Salvo path di carico del progetto
If sCurrDir <> m_MainWindow.GetSaveDir() And sCurrDir <> sSaveNameDir Then
SetLoadPath(sCurrDir & "\" & sCurrFile)
End If
m_MruFiles.Add(sCurrDir & "\" & sCurrFile)
End If
End If End If
'' Nascondo progress per fotografia End Sub
'PhotoProgress.Visibility = Windows.Visibility.Hidden
'' Carico sottopagina opportuna ' questo metodo è direttamente richiamato in caso di selezione della regione sinistra della pagina
'If GetProjectType() <> PRJ_TYPE.FRAMES Then Private Sub ChooseMachining() Handles CurrProjGrid.MouseDown
' CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC) ' Apro pagina di selezione della lavorazione prima di chiudere il grezzo
' m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut Dim m_ChooseMachiningPage = New ChooseMachining(m_MainWindow)
' m_MainWindow.CadCutBtn.IsChecked = True ' apro la finestra per la selezione delle lavorazioni
'Else m_ChooseMachiningPage.ShowDialog()
' CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC) ' se seleziono "Ok" allora resetto tutte le lavorazioni del progetto
' m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut If m_ChooseMachiningPage.DialogResult Then
' m_MainWindow.FrameCutBtn.IsChecked = True EgtSetCurrentContext(CurrentProjectScene.GetCtx())
'End If ' Cancello eventuali messaggi
ClearMessage()
' Ricalcolo tutte le lavorazioni
Dim nWarn As Integer = 0
ResetAllMachinings(nWarn)
If nWarn = 1 Then SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
' Aggiorno visualizzazione
EgtDraw()
End If
End Sub End Sub
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseDownScene Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseDownScene
@@ -410,6 +457,12 @@ Public Class CurrentProjectPageUC
UpdateContour() UpdateContour()
If EgtGetRawPartCount() > 0 Then If EgtGetRawPartCount() > 0 Then
ShowPhoto(False) ShowPhoto(False)
Dim nRawGrpId As Integer = EgtGetFirstRawPart()
While nRawGrpId <> GDB_ID.NULL
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup( nRawGrpId, NAME_RAW_SOLID)
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName( nRawSolidId, PHOTO_NAME)
nRawGrpId = EgtGetNextRawPart( nRawGrpId)
End While
End If End If
End If End If
End If End If
@@ -500,7 +553,7 @@ Public Class CurrentProjectPageUC
End If End If
' Se la macchina del file è quella impostata ' Se la macchina del file è quella impostata
If String.Compare(sFileMachine, m_MainWindow.GetCurrMachine(), True) = 0 Then If String.Compare(sFileMachine, m_MainWindow.GetCurrMachine(), True) = 0 Then
AdjustAdditionalTable() AdjustAdditionalTable( True)
' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo ' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo
Else Else
' Emetto messaggio ' Emetto messaggio
@@ -575,7 +628,7 @@ Public Class CurrentProjectPageUC
End If End If
' Notifico a foto il cambio di path ' Notifico a foto il cambio di path
EgtChangePhotoPath(nPhotoId, sNewPhoto) EgtChangePhotoPath(nPhotoId, sNewPhoto)
' Altrimenti cancello eventuali file di foto associabili al progetto ' Altrimenti cancello eventuali file di foto associabili al progetto
Else Else
Dim sPhoto1 As String = Path.ChangeExtension(sPath, "jpg") Dim sPhoto1 As String = Path.ChangeExtension(sPath, "jpg")
Dim sPhoto2 As String = Path.ChangeExtension(sPath, "png") Dim sPhoto2 As String = Path.ChangeExtension(sPath, "png")
@@ -600,6 +653,8 @@ Public Class CurrentProjectPageUC
SetProjectMaterial() SetProjectMaterial()
' Eseguo ' Eseguo
If Not SaveFile(sPath) Then Return False If Not SaveFile(sPath) Then Return False
' aggiungo il file all'elenco dei file recenti
m_MruFiles.Add(sPath)
' Dichiaro progetto non modificato ' Dichiaro progetto non modificato
EgtResetModified() EgtResetModified()
' Salvo eventuale VeinMatching ' Salvo eventuale VeinMatching
@@ -653,6 +708,8 @@ Public Class CurrentProjectPageUC
If Not SaveFile(sPath) Then If Not SaveFile(sPath) Then
Return False Return False
End If End If
' aggiungo il file all'elenco dei file recenti
m_MruFiles.Add(sPath)
' Dichiaro progetto non modificato ' Dichiaro progetto non modificato
EgtResetModified() EgtResetModified()
Return True Return True
+37 -19
View File
@@ -15,31 +15,49 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<UniformGrid Name="LowerButtonGrid" Rows="1" > <UniformGrid Name="LowerButtonGrid" Rows="1" >
<Button Name="NewBtn" <Button Name="NewBtn"
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/> Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Button Name="LoadBtn" <Image Source="{DynamicResource NuovoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/> </Button>
<Button Name="SaveBtn" <Button Name="LoadBtn"
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/> Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Button Name="SaveNameBtn" <Image Source="{DynamicResource CaricaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/> </Button>
<Button Name="SaveBtn"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource SalvaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="SaveNameBtn"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource Salva-con-nomeImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="CSVBtn"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource CSVImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="CSVBtn" <ToggleButton Name="VeinMatchingBtn"
Style="{DynamicResource OmagCut_YellowTextButton}"/> Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<ToggleButton Name="VeinMatchingBtn" <Image Source="{DynamicResource Vein-matchImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
Style="{DynamicResource OmagCut_YellowToggleButton}"/> </ToggleButton>
<ToggleButton Name="RegisterBtn"
Style="{DynamicResource OmagCut_YellowToggleButton}"/> <ToggleButton Name="RegisterBtn"
Style="{DynamicResource OmagCut_YellowToggleButton}"></ToggleButton>
<Button Name="ResetCutBtn" <Button Name="ResetCutBtn"
Style="{DynamicResource OmagCut_YellowTextButton}"/> Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
<!--Abilito la selezione delle linee da disegno--> <!--Abilito la selezione delle linee da disegno-->
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_BlueToggleButton}"/> <ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</UniformGrid> </UniformGrid>
<Button Name="SimulateBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButtonPrjMgr}"/> <Button Name="SimulateBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Button Name="WorkBtn" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueTextButtonPrjMgr}"/> <Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="WorkBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</Button>
</Grid> </Grid>
</UserControl> </UserControl>
+40 -26
View File
@@ -14,21 +14,22 @@ Public Class ProjectMgrUC
Private Sub ProjectMgrUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub ProjectMgrUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Imposto i messaggi letti dal file dei messaggi ' Imposto i messaggi letti dal file dei messaggi
NewBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 3) NewBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 3)
LoadBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 4) LoadBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 4)
SaveBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 5) SaveBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 5)
SaveNameBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 6) SaveNameBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 6)
CSVBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 8) CSVBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 8)
VeinMatchingBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 9) VeinMatchingBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 9)
RegisterBtn.Content = "REG" 'Shape Registration RegisterBtn.Content = "REG" 'Shape Registration
ResetCutBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset ResetCutBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
SimulateBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula SimulateBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
WorkBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 10) 'Export - Esporta WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 10) 'Export - Esporta
Else Else
WorkBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora
End If End If
TestBtn.Content = EgtMsg(90255) 'Test TestBtn.ToolTip = EgtMsg(90255) 'Test
End Sub End Sub
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -127,25 +128,20 @@ Public Class ProjectMgrUC
End Function End Function
Friend Function ChangeTable() As Integer Friend Function ChangeTable() As Integer
Dim nTabInd As Integer = 0 Dim nRes As Integer = 0
' se non abilitato esco dalla pagina ' se non abilitato esco dalla pagina
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 0 Then If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 0 Then
Return nTabInd Return nRes
End If End If
Select Case GetTableCount() Select Case GetTableCount()
Case 2 Case 2
' Tavolo da usare ? ' Vuoi cambiare tavola?
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", String.Format(EgtMsg(90968)), EgtMsgBox.Buttons.OK_CANCEL, EgtMsgBox.Icons.NULL) Dim TableToUse As New EgtMsgBox(m_MainWindow, "", String.Format(EgtMsg(90968)), EgtMsgBox.Buttons.OK_CANCEL, EgtMsgBox.Icons.NULL)
Select Case TableToUse.m_nPressedBtn nRes = TableToUse.m_nPressedBtn
Case 1 ' 1
nTabInd = 1
Case 0 ' 2
nTabInd = 2
End Select
Case Else Case Else
' negli altri casi (3 tavole o una tavola non fare nulla) ' negli altri casi (3 tavole o una tavola non fare nulla)
End Select End Select
Return nTabInd Return nRes
End Function End Function
Private Sub LoadBtn_Click(sender As Object, e As RoutedEventArgs) Handles LoadBtn.Click Private Sub LoadBtn_Click(sender As Object, e As RoutedEventArgs) Handles LoadBtn.Click
@@ -175,6 +171,7 @@ Public Class ProjectMgrUC
End Sub End Sub
Friend Sub PostLoad(ByVal sCurrDir As String, sCurrFile As String) Friend Sub PostLoad(ByVal sCurrDir As String, sCurrFile As String)
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx()) EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
If Not m_CurrProjPage.LoadProject(sCurrDir & "\" & sCurrFile) Then If Not m_CurrProjPage.LoadProject(sCurrDir & "\" & sCurrFile) Then
m_CurrProjPage.NewProject() m_CurrProjPage.NewProject()
@@ -322,7 +319,6 @@ Public Class ProjectMgrUC
ptMid -= vtDirT * dThick ptMid -= vtDirT * dThick
'--------------------------- Imposto la posizione della macchina ---------------------------- '--------------------------- Imposto la posizione della macchina ----------------------------
' Recupero la posizione macchina ' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
@@ -461,7 +457,7 @@ Public Class ProjectMgrUC
' Costringo ad aggiornare UI ' Costringo ad aggiornare UI
UpdateUI() UpdateUI()
' Se macchina normale ' Se macchina normale
If Not m_CurrMachine.bProdLine Then If Not (m_CurrMachine.bProdLine Or m_CurrMachine.bDemo) Then
' Download programma (eventuali errori sono segnalati dalla funzione) ' Download programma (eventuali errori sono segnalati dalla funzione)
If m_CurrNcComm.SendProgram(sCncPath, 900) Then If m_CurrNcComm.SendProgram(sCncPath, 900) Then
' copio il progetto corrente come progetto in lavorazione ' copio il progetto corrente come progetto in lavorazione
@@ -470,8 +466,21 @@ Public Class ProjectMgrUC
' se abilitato e non è restart, lancio eventuale lua post-trasmissione ' se abilitato e non è restart, lancio eventuale lua post-trasmissione
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.SIMPLESTATISTICS) And nPhaseRestart = 0 Then If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.SIMPLESTATISTICS) And nPhaseRestart = 0 Then
m_MainWindow.ExecSentProgScript(False) m_MainWindow.ExecSentProgScript(False)
''-------------------Avvio il Ciclo-Start-------------------------
'Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
'MyCicloStartWD.ShowDialog()
''-------------------Avvio il Ciclo-Start-------------------------
End If End If
End If End If
'-------------------Avvio il Ciclo-Start-------------------------
If GetPrivateProfileInt(S_GENERAL, "StartProgram", 0, m_MainWindow.GetIniFile()) <> 0 Then
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
MyCicloStartWD.ShowDialog()
End If
'-------------------Avvio il Ciclo-Start-------------------------
' Altrimenti linea di produzione ' Altrimenti linea di produzione
Else Else
' Verifico non sia già stato trasmesso ' Verifico non sia già stato trasmesso
@@ -514,12 +523,12 @@ Public Class ProjectMgrUC
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0) GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
If bSlabId Then If bSlabId Then
Dim sBlock As String = "" Dim sBlock As String = ""
GetPrivateProfileString( S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile()) GetPrivateProfileString(S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
Dim nSlabNbr As Integer = GetPrivateProfileInt( S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile()) Dim nSlabNbr As Integer = GetPrivateProfileInt(S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
nSlabNbr += 1 nSlabNbr += 1
Dim sSlabNbr As String = nSlabNbr.ToString() Dim sSlabNbr As String = nSlabNbr.ToString()
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile()) WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr) Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
End If End If
' Salvo il progetto ' Salvo il progetto
m_CurrProjPage.SaveProject() m_CurrProjPage.SaveProject()
@@ -547,8 +556,10 @@ Public Class ProjectMgrUC
If AskTransm.m_nPressedBtn <> 1 Then Return If AskTransm.m_nPressedBtn <> 1 Then Return
End If End If
End If End If
' Se non collegato alla macchina ' Se non collegato alla macchina
If Not m_MainWindow.m_bNCLink Then If Not m_MainWindow.m_bNCLink Then
' salvo il progetto corrente incrementando il valore del progetto
m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina
' copio il progetto corrente come progetto in lavorazione ' copio il progetto corrente come progetto in lavorazione
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge" Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
@@ -559,8 +570,10 @@ Public Class ProjectMgrUC
m_CurrProjPage.SaveProject() m_CurrProjPage.SaveProject()
' lancio eventuale lua post-trasmissione ' lancio eventuale lua post-trasmissione
m_MainWindow.ExecSentProgScript(False, bAlreadySent) m_MainWindow.ExecSentProgScript(False, bAlreadySent)
' se in versione demo (per linea di produzione) salvo il file corrente incrementando la numerazione
Return Return
End If End If
' Leggo variabile relativa al programma 1 (standard E80021) ' Leggo variabile relativa al programma 1 (standard E80021)
m_CurrNcComm.m_CN.n_DReadELS_handle = 0 m_CurrNcComm.m_CN.n_DReadELS_handle = 0
m_CurrNcComm.m_CN.ReadEls_Add_Parameter(m_CurrMachine.sVarProg1, 1) m_CurrNcComm.m_CN.ReadEls_Add_Parameter(m_CurrMachine.sVarProg1, 1)
@@ -634,6 +647,7 @@ Public Class ProjectMgrUC
Else Else
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
End If End If
End If End If
#End If #End If
End Sub End Sub
+24 -21
View File
@@ -4,7 +4,7 @@
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib" xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}" FontFamily="{DynamicResource OmagCut_Font}"
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent" ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="SaveNameWD" Height="300" Width="426.5" ShowInTaskbar="False"> Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
<!--Definizione della pagina di scelta del nome con cui salvare il progetto--> <!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
<Border Style="{DynamicResource OmagCut_Border}"> <Border Style="{DynamicResource OmagCut_Border}">
<Grid x:Name="SaveNameGrid"> <Grid x:Name="SaveNameGrid">
@@ -14,19 +14,21 @@
<ColumnDefinition Width="0.5*"/> <ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.2*"/> <RowDefinition Height="0.1*"/>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="0.2*"/> <RowDefinition Height="0.2*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/> <RowDefinition Height="0.2*"/>
<RowDefinition Height="0.4*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="0.2*"/> <RowDefinition Height="0.2*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Messaggio di tipo di avvio--> <!--Messaggio: Selezione modalità di avvio-->
<TextBlock Name="SlectLauncherTxbl" Grid.Column="1" Grid.Row="1" <TextBlock Name="SlectLauncherTxbl" Grid.Column="1" Grid.Row="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/> Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1"> <Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -39,32 +41,33 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--apri folder progetti--> <!--ultimo progetto-->
<Button Name="OpenFolder" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueIconButton}" <Button Name="LastProject" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
ToolTip="OpenFolder"> ToolTip="LastProject">
<Image Source="{DynamicResource ZoomWinImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Image Source="{DynamicResource LastProjImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button> </Button>
<!--nuovo progetto--> <!--nuovo progetto-->
<Button Name="NewProject" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}" <Button Name="NewProject" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
ToolTip="New Project"> ToolTip="New Project">
<Image Source="{DynamicResource CsvNewImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button> </Button>
<!--ultimo progetto--> <!--apri folder progetti-->
<Button Name="LastProject" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}" <Button Name="OpenFolder" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
ToolTip="LastProject"> ToolTip="OpenFolder">
<Image Source="{DynamicResource CsvOpenImg}" Style="{StaticResource OmagCut_ButtonIcon}"/> <Image Source="{DynamicResource CaricaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button> </Button>
</Grid> </Grid>
<UniformGrid Grid.Column="1" Grid.Row="5">
<TextBlock Name="FileName" Grid.Column="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="DataFile" Grid.Column="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
</UniformGrid>
<!--lista degli ultimi file aperti--> <!--lista degli ultimi file aperti-->
<ListBox Name="FilesLsBx" Grid.Column="1" Grid.Row="5" <ListBox Name="FilesLsBx" Grid.Column="1" Grid.Row="7" ItemTemplate="{DynamicResource FileNameLsBxItem}"
SelectionMode="Extended"> SelectionMode="Extended">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
</Style>
</ListBox.ItemContainerStyle>
</ListBox> </ListBox>
+92 -17
View File
@@ -1,21 +1,31 @@
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib Imports EgtWPFLib
Imports System.IO
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Public Enum MODE_LAUNCHER
LastProject
NewProject
OpenFolder
ShowWindow
SelectedProject
End Enum
Public Class StartLauncherWD Public Class StartLauncherWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow) Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
' lista dei file recenti da visualizzare
Public Enum MODE_LAUNCHER As Integer Private m_RecentFileList As New ObservableCollection(Of FileNameLsBxItem)
OpenFolder = 0
NewProject = 1
LastProject = 2
SelectedProject = 3
End Enum
Private m_CurrSelection As MODE_LAUNCHER Private m_CurrSelection As MODE_LAUNCHER
Public ReadOnly Property CurrSelection As MODE_LAUNCHER Public Property CurrSelection As MODE_LAUNCHER
Get Get
Return m_CurrSelection Return m_CurrSelection
End Get End Get
Set(value As MODE_LAUNCHER)
m_CurrSelection = value
End Set
End Property End Property
Private m_SelPath As String = String.Empty Private m_SelPath As String = String.Empty
@@ -30,25 +40,89 @@ Public Class StartLauncherWD
InitializeComponent() InitializeComponent()
End Sub End Sub
'--------------------------- lista dei file recenti -----------------------------------------------------------------------
Private Class FileNameLsBxItem
Implements INotifyPropertyChanged
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Private m_sDate As String
Private m_sName As String
Public Property sDate As String
Get
Return m_sDate
End Get
Set(value As String)
m_sDate = value
End Set
End Property
Public Property Name As String
Get
Return m_sName
End Get
Set(value As String)
If value <> m_sName Then
m_sName = value
NotifyPropertyChanged("Name")
End If
End Set
End Property
Public ReadOnly Property GraphicName As String
Get
' recupero il nome del file con estensione, altrimenti -> Path.GetFileNameWithoutExtension(m_sName)
Return Path.GetFileNameWithoutExtension(m_sName)
End Get
End Property
Sub New(Name As String, dDate As Date)
Me.m_sName = Name
Me.m_sDate = dDate.ToString
End Sub
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class
'--------------------------- lista dei file recenti -----------------------------------------------------------------------
' inizializzo la finestra ' inizializzo la finestra
Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' carico la liste dei file recenti FilesLsBx.ItemsSource = m_RecentFileList
FilesLsBx.ItemsSource = m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames Dim ItemFile As String = String.Empty
'carico la liste dei file recenti
Dim sFileName As String = String.Empty
For Each ItemFile In m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames
sFileName = ItemFile.Replace("__", "_")
If Not String.IsNullOrEmpty(sFileName) Then
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
Else
m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.Remove(ItemFile)
End If
Next
' posiziono la fistra in centro alla pagina ' posiziono la fistra in centro alla pagina
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2 Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2 Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
' imopposto il messaggio di avvio ' imopposto il messaggio di avvio
SlectLauncherTxbl.Text = "Seleziona modalità di avvio" SlectLauncherTxbl.Text = EgtMsg(91010) ' Seleziona modalità di avvio
FileName.Text = EgtMsg(91011) ' Progetti recenti
DataFile.Text = EgtMsg(91012) ' Ultima apertura
LastProject.ToolTip = EgtMsg(91013)
NewProject.ToolTip = EgtMsg(91014)
OpenFolder.ToolTip = EgtMsg(91015)
End Sub End Sub
' lancio l'apertura della pagina dei progetti ' lancio l'apertura della pagina dei progetti
Private Sub OpenFolder_Click(sender As Object, e As RoutedEventArgs) Handles OpenFolder.Click Private Sub OpenFolder_Click(sender As Object, e As RoutedEventArgs) Handles OpenFolder.Click
m_CurrSelection = MODE_LAUNCHER.OpenFolder m_CurrSelection = MODE_LAUNCHER.OpenFolder
m_MainWindow.m_PrevActivePage = m_MainWindow.m_ActivePage EgtZoom(ZM.ALL)
' Passo alla pagina di apertura con preview
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
Me.Close() Me.Close()
End Sub End Sub
@@ -68,7 +142,8 @@ Public Class StartLauncherWD
' quando viene rilasciato il mouse ' quando viene rilasciato il mouse
Private Sub SelectProject_MouseUp(sender As Object, e As RoutedEventArgs) Handles FilesLsBx.MouseDoubleClick, FilesLsBx.TouchUp Private Sub SelectProject_MouseUp(sender As Object, e As RoutedEventArgs) Handles FilesLsBx.MouseDoubleClick, FilesLsBx.TouchUp
m_SelPath = FilesLsBx.SelectedItem ' recupero il nome selezionato
m_SelPath = FilesLsBx.SelectedItem.Name
m_CurrSelection = MODE_LAUNCHER.SelectedProject m_CurrSelection = MODE_LAUNCHER.SelectedProject
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
Me.Close() Me.Close()
+41 -2
View File
@@ -19,10 +19,17 @@ Public Class ChooseMachining
' attulmente questa ComboBox è spenta (ma potrebbe essere richiesta in futuro?) ' attulmente questa ComboBox è spenta (ma potrebbe essere richiesta in futuro?)
Private m_bNotShowAuxilaryCmBx As Boolean = False Private m_bNotShowAuxilaryCmBx As Boolean = False
Private m_MachIsModified As Boolean = False
Public ReadOnly Property MachIsModified As Boolean
Get
Return m_MachIsModified
End Get
End Property
Sub New(Owner As Window) Sub New(Owner As Window)
Me.Owner = Owner Me.Owner = Owner
InitializeComponent() InitializeComponent()
ShowDialog() 'ShowDialog()
End Sub End Sub
Private Sub ChooseMachining_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub ChooseMachining_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
@@ -42,10 +49,12 @@ Public Class ChooseMachining
CurrWJettingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 10) CurrWJettingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 10)
CurrPocketingTxBl.Text = EgtMsg(90550) CurrPocketingTxBl.Text = EgtMsg(90550)
' carico l'elenco delle lavorazioni della pagina (anche senza aver caricato la pagina)
InitializeMachiningLists()
End Sub End Sub
Private Sub ChooseMachining_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Private Sub ChooseMachining_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
InitializeMachiningLists() ' InitializeMachiningLists()
End Sub End Sub
Private Sub InitializeMachiningLists() Private Sub InitializeMachiningLists()
@@ -166,6 +175,14 @@ Public Class ChooseMachining
Else Else
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
End If End If
' se non riesco a fare l'assegnazione della lama allora elimino il nome della lama salvata
If String.IsNullOrEmpty(CurrSawingCmBx.SelectedItem) Then
' verifico che il nome della lama esista
If CurrSawingCmBx.SelectedItem <> m_MainWindow.m_CurrentMachine.sCurrSawing Then
m_MachIsModified = True
End If
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
End If
' definizione della lista delle lavorazioni secondarie -- DA RIMUOVERE COMPLETAMENTE -- ' definizione della lista delle lavorazioni secondarie -- DA RIMUOVERE COMPLETAMENTE --
If m_bNotShowAuxilaryCmBx Then If m_bNotShowAuxilaryCmBx Then
@@ -461,12 +478,19 @@ Public Class ChooseMachining
ChooseMachiningGrid.RowDefinitions.Add(Row) ChooseMachiningGrid.RowDefinitions.Add(Row)
Next Next
m_RowNumber = m_RowNumber + nNewRow m_RowNumber = m_RowNumber + nNewRow
' titolo della ComboBox
CurrDrillingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow) CurrDrillingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
' ComboBox (nella riga successiva al titolo)
CurrDrillingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1) CurrDrillingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
'ButtonsGrid.SetValue(Grid.RowProperty, 5) 'ButtonsGrid.SetValue(Grid.RowProperty, 5)
If m_CurrentMachine.sCurrDrilling <> String.Empty Then If m_CurrentMachine.sCurrDrilling <> String.Empty Then
CurrDrillingCmBx.SelectedItem = m_CurrentMachine.sCurrDrilling CurrDrillingCmBx.SelectedItem = m_CurrentMachine.sCurrDrilling
End If End If
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
If String.IsNullOrEmpty(CurrDrillingCmBx.SelectedItem) Then
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
If CurrDrillingCmBx.SelectedItem <> m_CurrentMachine.sCurrDrilling Then m_MachIsModified = True
End If
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
CurrDrillingCmBx.Visibility = Windows.Visibility.Visible CurrDrillingCmBx.Visibility = Windows.Visibility.Visible
End If End If
@@ -486,6 +510,11 @@ Public Class ChooseMachining
If m_CurrentMachine.sCurrMilling <> String.Empty Then If m_CurrentMachine.sCurrMilling <> String.Empty Then
CurrMillingCmBx.SelectedItem = m_CurrentMachine.sCurrMilling CurrMillingCmBx.SelectedItem = m_CurrentMachine.sCurrMilling
End If End If
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
If String.IsNullOrEmpty(CurrMillingCmBx.SelectedItem) Then
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrMilling Then m_MachIsModified = True
End If
CurrMillingTxBl.Visibility = Windows.Visibility.Visible CurrMillingTxBl.Visibility = Windows.Visibility.Visible
CurrMillingCmBx.Visibility = Windows.Visibility.Visible CurrMillingCmBx.Visibility = Windows.Visibility.Visible
End If End If
@@ -505,6 +534,11 @@ Public Class ChooseMachining
If m_CurrentMachine.sCurrPocketing <> String.Empty Then If m_CurrentMachine.sCurrPocketing <> String.Empty Then
CurrPocketingCmBx.SelectedItem = m_CurrentMachine.sCurrPocketing CurrPocketingCmBx.SelectedItem = m_CurrentMachine.sCurrPocketing
End If End If
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
If String.IsNullOrEmpty(CurrPocketingCmBx.SelectedItem) Then
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrPocketing Then m_MachIsModified = True
End If
CurrPocketingTxBl.Visibility = Windows.Visibility.Visible CurrPocketingTxBl.Visibility = Windows.Visibility.Visible
CurrPocketingCmBx.Visibility = Windows.Visibility.Visible CurrPocketingCmBx.Visibility = Windows.Visibility.Visible
End If End If
@@ -523,6 +557,11 @@ Public Class ChooseMachining
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting
End If End If
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
If String.IsNullOrEmpty(CurrWJettingCmBx.SelectedItem) Then
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrWaterJetting Then m_MachIsModified = True
End If
CurrWJettingTxBl.Visibility = Windows.Visibility.Visible CurrWJettingTxBl.Visibility = Windows.Visibility.Visible
CurrWJettingCmBx.Visibility = Windows.Visibility.Visible CurrWJettingCmBx.Visibility = Windows.Visibility.Visible
End If End If
+189 -69
View File
@@ -41,6 +41,7 @@ Public Class RawPartPageUC
Private m_RawOffsX As Double = 0 Private m_RawOffsX As Double = 0
Private m_RawOffsY As Double = 0 Private m_RawOffsY As Double = 0
Private m_RawKerf As Double = 0 Private m_RawKerf As Double = 0
Private m_PrecKerf As Double = 0
' Layer per crocette temporanee ' Layer per crocette temporanee
Private m_nTempLay As Integer = GDB_ID.NULL Private m_nTempLay As Integer = GDB_ID.NULL
' Definizione lista modalità di definizione grezzo per ComboBox ' Definizione lista modalità di definizione grezzo per ComboBox
@@ -74,6 +75,10 @@ Public Class RawPartPageUC
Private Const SAFE_RAW_DIST As Double = 5 Private Const SAFE_RAW_DIST As Double = 5
' Costante raggio cerchietto ' Costante raggio cerchietto
Private Const RAD_CIRCLE As Double = 30 Private Const RAD_CIRCLE As Double = 30
' mostra la pagina delle lavorazioni
Private m_SmartMachiningPage As Boolean = False
' Costanti modo operazione punti ' Costanti modo operazione punti
Private Enum PTMODE Private Enum PTMODE
MOVE = 0 MOVE = 0
@@ -137,6 +142,8 @@ Public Class RawPartPageUC
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0) GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
SlabIdBtn.Visibility = If( m_bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed) SlabIdBtn.Visibility = If( m_bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
m_SmartMachiningPage = GetPrivateProfileInt(S_GENERAL, "SmartMachiningPage", 0, m_MainWindow.GetIniFile()) <> 0
' Imposto i messaggi letti dal file dei messaggi ' Imposto i messaggi letti dal file dei messaggi
OutlineBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 33) 'Rectangle - Rettangolo OutlineBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 33) 'Rectangle - Rettangolo
DamagedBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 10) 'By points - Per punti DamagedBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 10) 'By points - Per punti
@@ -228,6 +235,7 @@ Public Class RawPartPageUC
m_RawOffsX = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSX, 100, m_MainWindow.GetIniFile()) m_RawOffsX = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSX, 100, m_MainWindow.GetIniFile())
m_RawOffsY = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSY, 100, m_MainWindow.GetIniFile()) m_RawOffsY = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSY, 100, m_MainWindow.GetIniFile())
m_RawKerf = GetPrivateProfileDouble(S_RAWPART, K_RAWKERF, 50, m_MainWindow.GetIniFile()) m_RawKerf = GetPrivateProfileDouble(S_RAWPART, K_RAWKERF, 50, m_MainWindow.GetIniFile())
m_PrecKerf = m_RawKerf
' Richiedo ricalcolo quota eventuale foto ' Richiedo ricalcolo quota eventuale foto
UpdateRawPart(True) UpdateRawPart(True)
' Eventuale gestione dati lastra ' Eventuale gestione dati lastra
@@ -264,7 +272,14 @@ Public Class RawPartPageUC
m_ActiveRawMode = RAWMODE.RECTANGLE m_ActiveRawMode = RAWMODE.RECTANGLE
RawModeCmBx.SelectedIndex = RAWMODE.RECTANGLE RawModeCmBx.SelectedIndex = RAWMODE.RECTANGLE
PointsGpBx.Visibility = Windows.Visibility.Hidden PointsGpBx.Visibility = Windows.Visibility.Hidden
AdjustRawPartPosition() If dInvertKerf < 1 Then
AdjustRawPartPositionNegativeKerf()
' assegno il giosto colore al kerf
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
EgtSetColor(nKerfId, m_KerfCol)
Else
AdjustRawPartPosition()
End If
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
End If End If
' Imposto il materiale corrente nella combobox ' Imposto il materiale corrente nella combobox
@@ -671,66 +686,80 @@ Public Class RawPartPageUC
End If End If
' Apro pagina di selezione della lavorazione prima di chiudere il grezzo ' Apro pagina di selezione della lavorazione prima di chiudere il grezzo
m_ChooseMachiningPage = New ChooseMachining(m_MainWindow) m_ChooseMachiningPage = New ChooseMachining(m_MainWindow)
If m_ChooseMachiningPage.DialogResult Then '--------------------------- SELEZIONE LAVORAZIONI ---------------------------------
' Sistemo il grezzo ' mostro la finestra di selezione delle lavorazioni
AdjustRawPartOnExit() If m_ChooseMachiningPage.MachIsModified OrElse Not m_SmartMachiningPage Then
' Imposto spessore del grezzo m_ChooseMachiningPage.ShowDialog()
m_CurrProjPage.m_dRawHeight = GetRawHeight() '--------------------------- SELEZIONE LAVORAZIONI ---------------------------------
m_CurrProjPage.UpdateHeightTxBx() If m_ChooseMachiningPage.DialogResult Then
' Aggiorno lavorazione in interfaccia Return AdjustRawPartInCurrProject()
m_CurrProjPage.UpdateMachiningTxBx() Else
' Salvo nel file Ini le dimensioni del grezzo (sempre in mm) Return False
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_RawOffsX, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_RawOffsY, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_RawKerf, 2), m_MainWindow.GetIniFile())
' Se ci sono pezzi nel grezzo
If EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId) <> GDB_ID.NULL Then
' Cancello tutte le lavorazioni
EraseMachinings(GDB_ID.NULL)
' Se progetto con pezzi piani
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
' Reinserisco tutte le lavorazioni piane
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
' Aggiorno regioni per nesting
m_MainWindow.m_CadCutPageUC.m_NestPage.UpdateNestRegions()
m_MainWindow.m_CadCutPageUC.m_NestPage.EnableReferenceRegion(False)
' Visualizzo i pezzi parcheggiati (per inserire correttamente in parcheggio i pezzi del grezzo)
ShowParkedParts()
' Verifico ogni singolo pezzo
Dim bReducedCut As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) <> 0)
Dim nPartId As Integer = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
While nPartId <> GDB_ID.NULL
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
If Not EgtVerifyPart(nPartId, bReducedCut) Then
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nPartId)
VeinMatching.OnRemovePartFromRaw(nPartId)
End If
nPartId = nNextPartId
End While
' Nascondo i pezzi parcheggiati
HideParkedParts()
' Aggiusto eventuali solidi per lavorazioni da sotto
nPartId = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
While nPartId <> GDB_ID.NULL
UpdateSolidForDrip(nPartId)
nPartId = EgtGetNextPartInRawPart(nPartId)
End While
' 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)
End If
End If End If
Return True
Else Else
Return False Return AdjustRawPartInCurrProject()
End If End If
' forzo l'uscita dalla pagina
Return True
End Function
Private Function AdjustRawPartInCurrProject() As Boolean
' Sistemo il grezzo
AdjustRawPartOnExit()
' Imposto spessore del grezzo
m_CurrProjPage.m_dRawHeight = GetRawHeight()
m_CurrProjPage.UpdateHeightTxBx()
' Aggiorno lavorazione in interfaccia
m_CurrProjPage.UpdateMachiningTxBx()
' Salvo nel file Ini le dimensioni del grezzo (sempre in mm)
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_RawOffsX, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_RawOffsY, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_RawKerf, 2), m_MainWindow.GetIniFile())
' Se ci sono pezzi nel grezzo
If EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId) <> GDB_ID.NULL Then
' Cancello tutte le lavorazioni
EraseMachinings(GDB_ID.NULL)
' Se progetto con pezzi piani
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
' Reinserisco tutte le lavorazioni piane
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
' Aggiorno regioni per nesting
m_MainWindow.m_CadCutPageUC.m_NestPage.UpdateNestRegions()
m_MainWindow.m_CadCutPageUC.m_NestPage.EnableReferenceRegion(False)
' Visualizzo i pezzi parcheggiati (per inserire correttamente in parcheggio i pezzi del grezzo)
ShowParkedParts()
' Verifico ogni singolo pezzo
Dim bReducedCut As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) <> 0)
Dim nPartId As Integer = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
While nPartId <> GDB_ID.NULL
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
If Not EgtVerifyPart(nPartId, bReducedCut) Then
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nPartId)
VeinMatching.OnRemovePartFromRaw(nPartId)
End If
nPartId = nNextPartId
End While
' Nascondo i pezzi parcheggiati
HideParkedParts()
' Aggiusto eventuali solidi per lavorazioni da sotto
nPartId = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
While nPartId <> GDB_ID.NULL
UpdateSolidForDrip(nPartId)
nPartId = EgtGetNextPartInRawPart(nPartId)
End While
' 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)
End If
End If
Return True
End Function End Function
Private Sub RawModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles RawModeCmBx.SelectionChanged Private Sub RawModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles RawModeCmBx.SelectionChanged
@@ -1151,6 +1180,8 @@ Public Class RawPartPageUC
' box grezzo ' box grezzo
Dim ptMin, ptMax As Point3d Dim ptMin, ptMax As Point3d
GetRawBox(ptMin, ptMax) GetRawBox(ptMin, ptMax)
Dim Lenght As Double = ptMax.x - ptMin.x
Dim Width As Double = ptMax.y - ptMin.y
ptMin.x += m_RawKerf ptMin.x += m_RawKerf
ptMin.y += m_RawKerf ptMin.y += m_RawKerf
ptMin.z = ptMax.z ptMin.z = ptMax.z
@@ -1165,6 +1196,41 @@ Public Class RawPartPageUC
Return True Return True
End Function End Function
#Region "Negative Kerf"
Private Function AdjustRawPartNegativeKerf(Optional NegativeOffset As Boolean = True) As Boolean
' Se non c'è il grezzo, esco
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then Return False
' Cancello eventuale vecchio contorno di kerf
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
Dim nInvert As Double = 1
If Not NegativeOffset Then
nInvert = -1
End If
EgtOffsetCurve(nKerfId, (-m_RawKerf - m_PrecKerf) * nInvert, OFF_TYPE.EXTEND)
EgtSetColor(nKerfId, m_KerfCol)
' Salvo il valore del kerf (sempre in mm)
EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, m_RawKerf)
Return True
End Function
Private Function AdjustRawPartPositionNegativeKerf() As Boolean
' Sistemo la posizione
Dim ptRef As New Point3d(m_RawOffsX, m_RawOffsY, m_CurrentMachine.dAdditionalTable)
If EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL) Then
OkBtn.IsEnabled = True
m_CurrProjPage.ClearMessage()
Else
OkBtn.IsEnabled = False
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 47)) ' Errore nella posizione o dimensione del grezzo
End If
' Aggiorno visualizzazione
EgtZoom(ZM.ALL)
Return True
End Function
#End Region ' Negative Kerf
Private Sub UpdateRawPartHeight() Private Sub UpdateRawPartHeight()
' Se da creare ' Se da creare
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then
@@ -1494,8 +1560,10 @@ Public Class RawPartPageUC
End If End If
Dim dMinOffsetX = m_RawKerf Dim dMinOffsetX = m_RawKerf
If dKerf < 0 And dOffsetX >= 0 Then If dKerf < 0 And dOffsetX >= 0 Then
m_RawOffsX = dOffsetX + m_RawKerf 'm_RawOffsX = dOffsetX + m_RawKerf
UpdateRawPart() 'UpdateRawPart()
m_RawOffsX = dOffsetX
AdjustRawPartPositionNegativeKerf()
ElseIf dKerf >= 0 And dOffsetX >= dMinOffsetX Then ElseIf dKerf >= 0 And dOffsetX >= dMinOffsetX Then
m_RawOffsX = dOffsetX m_RawOffsX = dOffsetX
UpdateRawPart() UpdateRawPart()
@@ -1514,8 +1582,10 @@ Public Class RawPartPageUC
End If End If
Dim dMinOffsetY = m_RawKerf Dim dMinOffsetY = m_RawKerf
If dKerf < 0 And dOffsetY >= 0 Then If dKerf < 0 And dOffsetY >= 0 Then
m_RawOffsY = dOffsetY + m_RawKerf 'm_RawOffsY = dOffsetY + m_RawKerf
UpdateRawPart() 'UpdateRawPart()
m_RawOffsY = dOffsetY
AdjustRawPartPositionNegativeKerf()
ElseIf dKerf >= 0 And dOffsetY >= dMinOffsetY Then ElseIf dKerf >= 0 And dOffsetY >= dMinOffsetY Then
m_RawOffsY = dOffsetY m_RawOffsY = dOffsetY
UpdateRawPart() UpdateRawPart()
@@ -1534,9 +1604,23 @@ Public Class RawPartPageUC
Dim dMaxKerf = Math.Min(Math.Min(m_RawOffsX, m_RawOffsY), Dim dMaxKerf = Math.Min(Math.Min(m_RawOffsX, m_RawOffsY),
Math.Min(m_dTableLength - m_RawLength - m_RawOffsX, m_dTableWidth - m_RawWidth - m_RawOffsY)) Math.Min(m_dTableLength - m_RawLength - m_RawOffsX, m_dTableWidth - m_RawWidth - m_RawOffsY))
Dim dMinKerf = -Math.Min(m_RawLength, m_RawWidth) / 2 Dim dMinKerf = -Math.Min(m_RawLength, m_RawWidth) / 2
' recuper il segno del valore del Kerf precedente
Dim dInvertKerf As Double = 1
EgtGetInfo(EgtGetFirstRawPart(), KEY_INVERT_KERF, dInvertKerf)
m_PrecKerf = Math.Abs(m_RawKerf)
m_PrecKerf = m_PrecKerf * dInvertKerf
' Sostituisco: dKerf >= dMinKerf And dKerf <= dMaxKerf ' Sostituisco: dKerf >= dMinKerf And dKerf <= dMaxKerf
If dKerf >= 0 And dKerf <= dMaxKerf Then If dKerf >= 0 And dKerf <= dMaxKerf Then
m_RawKerf = dKerf m_RawKerf = dKerf
If m_PrecKerf < 0 Then
' definsco la dimensione del grezzo pari a quella del kerf
m_RawKerf = 0
AdjustRawPartNegativeKerf()
UpdateCircles()
UpdateRawPartKerf()
m_RawKerf = dKerf
m_PrecKerf = 0
End If
If m_ActiveRawMode <> RAWMODE.FROM_PHOTO Then If m_ActiveRawMode <> RAWMODE.FROM_PHOTO Then
StringToLen(LengthTxBx.Text, m_RawLength) StringToLen(LengthTxBx.Text, m_RawLength)
StringToLen(WidthTxBx.Text, m_RawWidth) StringToLen(WidthTxBx.Text, m_RawWidth)
@@ -1556,20 +1640,56 @@ Public Class RawPartPageUC
' Ridisegno ' Ridisegno
EgtDraw() EgtDraw()
ElseIf dKerf >= dMinKerf And dKerf < 0 Then ElseIf dKerf >= dMinKerf And dKerf < 0 Then
' aggiorno il valore del Kerf corrente
m_RawKerf = dKerf m_RawKerf = dKerf
If m_ActiveRawMode <> RAWMODE.FROM_PHOTO Then If m_ActiveRawMode <> RAWMODE.FROM_PHOTO Then
' aggiorno dati grezzo ' recupero dati grezzo
StringToLen(LengthTxBx.Text, m_RawLength) StringToLen(LengthTxBx.Text, m_RawLength)
m_RawLength = m_RawLength + 2 * m_RawKerf
StringToLen(WidthTxBx.Text, m_RawWidth) StringToLen(WidthTxBx.Text, m_RawWidth)
m_RawWidth = m_RawWidth + 2 * m_RawKerf
StringToLen(OffsetXTxBx.Text, m_RawOffsX) StringToLen(OffsetXTxBx.Text, m_RawOffsX)
m_RawOffsX = m_RawOffsX - m_RawKerf
StringToLen(OffsetYTxBx.Text, m_RawOffsY) StringToLen(OffsetYTxBx.Text, m_RawOffsY)
m_RawOffsY = m_RawOffsY - m_RawKerf
' UpdateRawPart() If m_PrecKerf >= 0 Then
m_RawLength = m_RawLength + 2 * m_RawKerf
m_RawWidth = m_RawWidth + 2 * m_RawKerf
m_RawOffsX = m_RawOffsX - m_RawKerf
m_RawOffsY = m_RawOffsY - m_RawKerf
End If
m_RawKerf = -m_RawKerf m_RawKerf = -m_RawKerf
UpdateRawPartKerf() ' esegue l'aggiornamento della dimensione del grezzo solo quando passo dal kerf positivo a quello negativo
If m_PrecKerf >= 0 Then
' definsco la dimensione del grezzo pari a quella del kerf
m_RawKerf = 0
AdjustRawPartNegativeKerf(False)
UpdateCircles()
UpdateRawPartKerf()
m_RawKerf = -dKerf
m_PrecKerf = 0
End If
AdjustRawPartNegativeKerf()
UpdateCircles()
'If m_PrecKerf > 0 And m_RawKerf < 0 Then
' m_RawLength = m_RawLength + 2 * m_RawKerf
' m_RawWidth = m_RawWidth + 2 * m_RawKerf
' m_RawOffsX = m_RawOffsX - m_RawKerf - m_PrecKerf
' m_RawOffsY = m_RawOffsY - m_RawKerf - m_PrecKerf
' m_RawKerf = -m_RawKerf
' UpdateRawPartKerf()
'If m_PrecKerf >=0 And m_RawKerf < 0 Then
' m_RawOffsX = m_RawOffsX - m_PrecKerf
' m_RawOffsY = m_RawOffsY - m_PrecKerf
' UpdateNegativeRawPart()
'Else
' UpdateNegativeRawPart()
'End If
'UpdateRawPart()
'UpdateNegativeRawPart()
'm_RawKerf = -m_RawKerf
'UpdateRawPartKerf()
' Recupero id contorno kerf ' Recupero id contorno kerf
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF) Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
' Modifico il colore ' Modifico il colore
Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

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