Compare commits

...

89 Commits

Author SHA1 Message Date
Demetrio Cassarino e2e365765d -migliorata gestione griglia dinamica 2026-03-18 09:22:27 +01:00
Demetrio Cassarino e88e19ed3f -migliorata gestione griglia dinamica chiusura expander 2026-03-13 09:48:53 +01:00
Demetrio Cassarino 87fba7e739 Merge commit '92a6cefe6762d632438a17ce7c29f07ec82361f9' into features/ButtonPreview 2026-03-13 09:09:37 +01:00
Dario Sassi 92a6cefe67 EgtCAM5 3.1c2 :
- ricompilazione con cambio versione.
2026-03-12 19:18:23 +01:00
Dario Sassi 9193518d4f Merge commit 'dda46787db9dbbb232e2c81b4ef093fba7036ec3' 2026-03-12 18:27:27 +01:00
Daniele Bariletti 6e06d76a7c - modificata la funzione EgtSurfBezParamsFromPoint 2026-03-12 18:15:59 +01:00
Demetrio Cassarino dda46787db -introdotto griglia dinamica per gestire spostamento colonne 2026-03-12 11:31:10 +01:00
Daniele Bariletti ca2144f058 - miglioria all'analisi di una surf di bezier. 2026-03-11 16:12:15 +01:00
Daniele Bariletti e0ea153122 - aggiunta funzione per tagliare una trimesh con una curva chiusa. 2026-03-11 13:13:25 +01:00
Daniele Bariletti 0b471786cc - aggiunta funzione analizza per le superfici di bezier. 2026-03-10 17:41:01 +01:00
Dario Sassi ece48a6523 Merge commit '5e151fd7ec16aba3cacac08b98ec3cfd04521f8a' 2026-03-06 12:25:55 +01:00
Demetrio Cassarino 5e151fd7ec -gestito in modo corretto la visualizzazione del tool tramite tasti su/giù da tastiera 2026-03-06 12:13:12 +01:00
Dario Sassi ade3d5c1aa Merge commit 'b3db41c0ae4c74d40e57806c3ef462c4462985ba' 2026-03-06 11:31:58 +01:00
Demetrio Cassarino b3db41c0ae -modificata gestione tasti su slider ora solo con destra/sinistra mentre su/giù mette il focus sul bottone preview 2026-03-06 11:24:11 +01:00
Dario Sassi ad21ccf4d8 Merge commit '29dd3ca6d42fd61a1f8315615a14181412dfc4b2' 2026-03-05 16:07:55 +01:00
Demetrio Cassarino 29dd3ca6d4 -piccola modifica al bottone previewtool 2026-03-05 16:06:54 +01:00
Demetrio Cassarino 2174bdfd20 Merge commit 'd28ac71a5e79d7c5038e4ffb7e402ee7fc0a549b' into features/ButtonPreview 2026-03-05 16:02:22 +01:00
Dario Sassi d28ac71a5e EgtCAM5 :
- piccoli ritocchi ai disegni per MachiningToolPreview.
2026-03-05 15:52:09 +01:00
Dario Sassi 1f92a28e44 Merge commit '3944eb085fcaae0278ab3c3a951045e997808361' 2026-03-05 15:26:36 +01:00
Demetrio Cassarino 3944eb085f -aggiornato pulsante visualizzazione tool con immagini 2026-03-05 12:19:21 +01:00
Dario Sassi 30b436c33b Merge commit 'd2f947b9b18849e47b5b77c015fea225e59f7aa9' 2026-03-05 12:12:48 +01:00
Demetrio Cassarino d2f947b9b1 -aggiornato in updatemachine visualizzazione corretta tool 2026-03-05 11:35:17 +01:00
Demetrio Cassarino 50c06fee70 Merge commit '265938c37f9b9a5c61da5157f5f60c9f74d0ac52' into features/ButtonPreview 2026-03-05 11:32:43 +01:00
Dario Sassi 265938c37f EgtCAM5 :
- correzione a MachiningPrevieTool nel caso di Update/Apply.
2026-03-05 11:17:45 +01:00
Dario Sassi 3d4cfc0eb8 Merge commit 'c5ddcff63f810dedc6fe57acfd64edac298f4f4a' 2026-03-05 10:08:30 +01:00
Demetrio Cassarino c5ddcff63f -sistemato errore su aggiorna macchina 2026-03-05 09:00:14 +01:00
Demetrio Cassarino dc7a3b78cd Merge commit '4147457b7d66c393119cab246288fa2cbbbf6457' into features/ButtonPreview 2026-03-05 08:42:21 +01:00
Dario Sassi 4147457b7d EgtCAM5 :
- correzione nel passaggio da Machining a Draw.
2026-03-05 08:11:40 +01:00
Dario Sassi f2d465ff14 Merge commit '3cac37cb0da6c974ca32899dadb544fc34b2609c' 2026-03-04 17:21:19 +01:00
Demetrio Cassarino 3cac37cb0d -aggiunto pulsante a 3 step per visualizzare l'utensile e la testa 2026-03-04 17:02:20 +01:00
Dario Sassi ffa0ce03bb EgtCAM5 3.1c1 :
- ricompilazione con cambio versione.
2026-03-03 18:37:24 +01:00
Dario Sassi 68063e5b39 EgtCAM5 :
- correzioni per visibilità di ReversePost toolbar.
2026-02-22 16:28:30 +01:00
Dario Sassi 18505bfa5d EgtCAM5 3.1b1 :
- correzioni a recupero nome da nota NcName di Gruppo di Lavoro per file di generazione e stima.
2026-02-19 11:30:36 +01:00
Dario Sassi a7999c4182 EgtCAM5 3.1a4 :
- ricompilazione con cambio versione.
2026-02-10 09:43:11 +01:00
Dario Sassi b0186d096f EgtCAM5 :
- miglioria nella gestione del rilascio istanza all'uscita.
2026-01-27 16:23:27 +01:00
Dario Sassi 6e5f917d6f EgtCAM5 :
- piccola miglioria nel log per indicare tutte le estensioni presenti.
2026-01-23 19:19:26 +01:00
Dario Sassi 5819bc4bf8 EgtCAM5 :
- in lavorazioni anteprima utensile migliorata gestione frecce avanti/indietro.
2026-01-21 16:00:10 +01:00
Dario Sassi dee67518e7 EgtCAM5 :
- correzione in gestione geometria selezionata per lavorazioni.
2026-01-21 13:28:39 +01:00
Dario Sassi 50f5e0528f Merge commit '08ea864a5e0a20abacc061e8ec962b9d42797da1' 2026-01-16 14:46:30 +01:00
Demetrio Cassarino 08ea864a5e EgtCAM5 3.1a3:
- sistemato grafica pulsanti special
- sistemato sfondo pulsanti popup
2026-01-16 14:44:14 +01:00
Dario Sassi 7a25e8d634 EgtCAM5 3.1a2 :
- aggiunta toolbar per ReversePost
- gestione protezione da licenza di Trimming e ReversePost
- aggiunte info su Window, Trimming e ReversePost in AboutBox.
2026-01-14 11:38:24 +01:00
Dario Sassi f4163dc818 EgtCAM5 :
- aggiunte toolbar per Window e per Trimming.
2026-01-13 20:19:02 +01:00
Dario Sassi 7beff98f1c EgtCAM5 :
- non viene inserito negli MRU degli script lua il file temporaneo ImmExecN.lua per esecuzione speciale con edit.
2026-01-08 10:41:04 +01:00
Dario Sassi 4a2928192d EgtCAM5 3.1a1 :
- ripristino versione nuova con correzione estensione CN (problema con disabilitazione più gruppi di lavoro).
2026-01-07 11:29:02 +01:00
Dario Sassi 1d32d9b634 EgtCAM5 2.7l3 :
- versione patch per COMI-ABB con correzione assegnazione estensione partprogram in generazione.
2026-01-07 11:24:22 +01:00
Dario Sassi 4a7f552db6 EgtCAM5 :
- piccola correzione in messaggio di AboutBox.
2026-01-02 19:16:19 +01:00
Dario Sassi f456fedda8 EgtCAM5 3.1a1 :
- ricompilazione con cambio major version.
2026-01-02 18:30:26 +01:00
Dario Sassi 084c4e01ed EgtCAM5 :
- modifiche per gestione selezione per colore.
2025-12-15 16:54:30 +01:00
Dario Sassi 8d20d1d071 EgtCAM5 2.7l2 :
- corretta assegnazione materiale per macchine marmo (STONE5)
- ora si controlla STONE5 e non più STONE.
2025-12-11 18:17:15 +01:00
Dario Sassi a3eae73a52 EgtCAM5 :
- migliorie e correzioni a Combo per Info.
2025-12-05 10:33:24 +01:00
Dario Sassi a821341706 EgtCAM5 :
- eliminato enorme rallentamento con selezione a Finestra da popup menù (con Shift era già veloce).
2025-12-04 17:51:21 +01:00
Dario Sassi 9946b15588 EgtCAM5 :
- correzione gestione ComboBox in input/modifica dati di entità.
2025-12-04 16:06:30 +01:00
Dario Sassi 4d610cea8b EgtCAM5 :
- sulla status bar in modalità Disegna aggiunta indicazione numero di entità selezionate (Sel : NNN)
- migliorie e correzioni a ExecuteWindow per caso di passaggio a Lavorazioni.
2025-12-03 18:45:00 +01:00
Dario Sassi 2648b704cc EgtCAM5 2.7l1 :
- piccoli aggiustamenti a ExecuteWindow.
2025-12-03 15:04:07 +01:00
Dario Sassi e59e8a051a Merge commit '9d8188521ee7a863e3b03c70b946db435c667e6b' 2025-12-03 11:40:55 +01:00
Demetrio Cassarino 9d8188521e -aggiunto finestra per esecuzione script lua 2025-12-02 12:36:00 +01:00
Dario Sassi 18de1a1ab7 Merge commit '0a7f87291265ab5ce05d06d9a6d2a7cfd999331f' 2025-11-24 14:33:30 +01:00
Demetrio Cassarino 0a7f872912 -aggiunto focus quando viene mostrata la textbox per inserire la info 2025-11-24 10:13:20 +01:00
Dario Sassi 84b2edd17a EgtCAM5 :
- piccola modifica in simulazione per gestire Flag=12 quasi come 11 (pausa richiesta da sotto).
2025-11-17 14:46:28 +01:00
Dario Sassi 7a8c883259 Merge commit '4f06a19553216a32731114b29b8f7ea5e61d9b22' 2025-11-10 12:15:01 +01:00
Demetrio Cassarino 4f06a19553 -aggiunto controllo su textbox e combobox su stessa info 2025-11-10 12:14:14 +01:00
Dario Sassi 3a7152066b Merge commit '2ce61cd5abfa06958f356ccea4ffad624acd7b8c' 2025-11-10 11:53:54 +01:00
Demetrio Cassarino 2ce61cd5ab -inserito controllo su terminazione stringa 2025-11-10 11:50:33 +01:00
Demetrio Cassarino 50ad698187 -implementato a capo quando viene inserito un testo oltre al valore della combobox 2025-11-10 11:46:04 +01:00
Dario Sassi 85591b39a7 Merge commit '18be9679c5562c309852bfeac06670dea4dfec66' 2025-11-10 11:22:14 +01:00
Demetrio Cassarino 18be9679c5 -sistemata gestione combobox info
-camboata visualizzazione info combobox
2025-11-10 10:26:28 +01:00
Demetrio Cassarino 2c9061619a Merge commit '575bcc02d0c676f3cb82f6b4f7694e03a59f7ac2' into features/AddGetAllInfo 2025-11-10 08:06:52 +01:00
Dario Sassi 575bcc02d0 EgtCAM5 :
- gestione metacomando da Info in PrepareInputBox.
2025-11-09 22:56:01 +01:00
Dario Sassi e965ceb26c EgtCAM5 :
- aggiunto controllo su vettore Info già presenti introdotto in precedente modifica.
2025-11-08 12:17:31 +01:00
Dario Sassi 0c18c822f1 Merge commit 'e6d85c573af905010347a23c874351c984d03529' 2025-11-07 17:01:36 +01:00
Demetrio Cassarino e6d85c573a -aggiornamento versione 2025-11-07 14:34:03 +01:00
Demetrio Cassarino 592e7161ce EgtCAM5 2.7k2
-aggiunto in inputexpander possibilità di visualizzare tutte le info presenti una combobox
2025-11-07 14:29:27 +01:00
Dario Sassi 08c4d9c7b9 EgtCAM5 :
- nell'ordine del TopTray il gruppo di bottoni Special è stato portato alla fine.
2025-11-02 11:10:41 +01:00
Dario Sassi 4ae5efb94b EgtCAM5 2.7k1 :
- possibilità di comandi speciali con indice non consecutivo (1-99 standard, 101-199 avanzati solo per utenti interni).
2025-10-31 15:32:00 +01:00
Dario Sassi 69261c7c73 EgtCAM5 2.7j2 :
- ricompilazione con cambio versione.
2025-10-31 09:19:58 +01:00
Dario Sassi 361dc20f9b EgtCAM5 :
- tolto import inutile.
2025-10-27 17:24:55 +01:00
Dario Sassi 95d1e4b5ac EgtCAM5 :
- in disposizione possibilità di modificare altezza sottopezzo (parametro Z di movimento grezzo).
2025-10-27 17:15:49 +01:00
Dario Sassi 621a31931c EgtCAM5 :
- piccole migliorie in dialogo disposizione.
2025-10-26 19:26:00 +01:00
Dario Sassi 4f7dd6ef17 EgtCAM5 :
- in ProcessEvents quando nPause vale -1 si forza un ridisegno.
2025-10-13 08:51:05 +02:00
Dario Sassi 722e0c243d EgtCAM5 2.7j1 :
- ricompilazione con cambio versione.
2025-10-11 12:41:47 +02:00
Dario Sassi 921e681759 EgtCAM5 :
- correzione gestione LinkType per sgrossature con lama.
2025-09-30 08:30:21 +02:00
Dario Sassi d065c0beeb EgtCAM5 2.7i2 :
- se macchina di tipo Stone ora possibile modifica in configurazione di parametri per archi con lama.
2025-09-29 10:54:12 +02:00
Dario Sassi f8ea19537a EgtCAM5 :
- gestione opzioni visualizzazione Zmap da interfaccia (solo per utenti interni ovvero UserLevel > 5).
2025-09-19 18:54:45 +02:00
Daniele Bariletti 289a6b1608 EgtCAM5 :
- aggiunta modalità bonus per analizza su una trimesh: visualizzazione del triangolo selezionato e del suo id.
2025-09-17 11:26:12 +02:00
Dario Sassi f6baeb6afc EgtCAM5 2.7i1 :
- piccola semplificazione per cambio font di default.
2025-09-11 15:24:19 +02:00
Dario Sassi 9fa231f68a EgtCAM5 :
- corretta impostazione all'avvio dello spessore delle linee.
2025-08-28 09:56:21 +02:00
Dario Sassi bba92a4980 EgtCAM5 :
- modifiche per impostazione qualità di visualizzazione superfici (con eliminazione SmoothTriMesh/ShowTriaAdv).
2025-08-24 19:18:58 +02:00
Dario Sassi cfaf513a91 EgtCAM5 2.7h1 :
- ricompilazione con cambio versione.
2025-08-01 09:56:27 +02:00
Dario Sassi 8d33111af2 Merge commit 'fd565e96cc9495985b0cb8fe57700b6f924c18da' 2025-08-01 08:32:05 +02:00
93 changed files with 2660 additions and 1077 deletions
+19 -1
View File
@@ -30,7 +30,7 @@ Public Class AboutBoxWndV
" Inst" & IniFile.m_nInstance.ToString() & " Inst" & IniFile.m_nInstance.ToString() &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine " Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "SupportPlane " & sAssStatus & Environment.NewLine sInfo &= "SupportPlan " & sAssStatus & Environment.NewLine
sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
@@ -70,6 +70,24 @@ Public Class AboutBoxWndV
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion) IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
End If End If
If IniFile.IsActiveWindow() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sWindowDirPath, sVersion)
sInfo &= Environment.NewLine & "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
End If
If IniFile.IsActiveTrimming() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sTrimmingDirPath, sVersion)
sInfo &= Environment.NewLine & "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
End If
If IniFile.IsActiveReversePost() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sReversePostDirPath, sVersion)
sInfo &= Environment.NewLine & "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
End If
If IniFile.IsActiveGunStock() Then If IniFile.IsActiveGunStock() Then
bExtensions = True bExtensions = True
Dim sVersion As String = "---" Dim sVersion As String = "---"
+1 -3
View File
@@ -1,7 +1,5 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.ComponentModel Imports System.ComponentModel
Imports EgtUILib
Imports EgtUILib.EgtInterface
' Classe che definisce un elemento di base del TreeView ' Classe che definisce un elemento di base del TreeView
Public Class TreeViewItemBase Public Class TreeViewItemBase
@@ -34,7 +32,7 @@ Public Class TreeViewItemBase
End Property End Property
Friend m_isExpanded As Boolean Friend m_isExpanded As Boolean
Public Property IsExpanded As Boolean Public Property IsExpanded As Boolean
Get Get
Return m_isExpanded Return m_isExpanded
End Get End Get
@@ -13,7 +13,7 @@ Public Class BeamMachiningsWindowV
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
End Sub End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.m_CloseWindow Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.OnCloseWindow
Me.DialogResult = bDialogResult Me.DialogResult = bDialogResult
End Sub End Sub
+3
View File
@@ -51,6 +51,9 @@ Module ConstGen
' Chiave di Info in gruppo di lavoro per none part-program ' Chiave di Info in gruppo di lavoro per none part-program
Public Const KEY_MCHGRP_NCNAME As String = "NcName" Public Const KEY_MCHGRP_NCNAME As String = "NcName"
' File Dimensioni Griglia CAM5
Public Const DIMENSION_FILE_NAME As String = "Dimension.ini"
' Costante per flag di BBox ' Costante per flag di BBox
Public Const BBFLAG As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM Public Const BBFLAG As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
+17 -6
View File
@@ -73,7 +73,7 @@ Module ConstIni
Public Const K_SELSURF As String = "SelSurf" Public Const K_SELSURF As String = "SelSurf"
Public Const K_SHOWMODE As String = "ShowMode" Public Const K_SHOWMODE As String = "ShowMode"
Public Const K_CURVEDIR As String = "CurveDir" Public Const K_CURVEDIR As String = "CurveDir"
Public Const K_SHOWTRIAADV As String = "ShowTriaAdv" Public Const K_SHOWSURFQUALITY As String = "ShowSurfQuality"
Public Const K_SHOWZMAP As String = "ShowZmap" Public Const K_SHOWZMAP As String = "ShowZmap"
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels" Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
Public Const K_ZOOMWIN As String = "ZoomWin" Public Const K_ZOOMWIN As String = "ZoomWin"
@@ -144,10 +144,6 @@ Module ConstIni
Public Const K_BEAMWALLBASEDIR As String = "BaseDir" Public Const K_BEAMWALLBASEDIR As String = "BaseDir"
Public Const K_BEAMWALLBUTTON As String = "Button" Public Const K_BEAMWALLBUTTON As String = "Button"
Public Const S_PRINTING3D As String = "3dPrinting"
Public Const K_ENABLE As String = "Enable"
Public Const K_3PRNBASEDIR As String = "BaseDir"
Public Const S_DOORS As String = "Doors" Public Const S_DOORS As String = "Doors"
Public Const K_DDFENABLE As String = "DdfEnable" Public Const K_DDFENABLE As String = "DdfEnable"
Public Const K_BASEDIR As String = "BaseDir" Public Const K_BASEDIR As String = "BaseDir"
@@ -161,6 +157,21 @@ Module ConstIni
Public Const K_MTABLEWINPLACE As String = "MTableWinPlace" Public Const K_MTABLEWINPLACE As String = "MTableWinPlace"
Public Const K_OPTIMIZEMACHFORLINE As String = "OptimizeMachForLine" Public Const K_OPTIMIZEMACHFORLINE As String = "OptimizeMachForLine"
Public Const S_WINDOW As String = "Window"
Public Const K_WINDOWENABLE As String = "JwdEnable"
Public Const K_WINDOWBASEDIR As String = "BaseDir"
Public Const K_WINDOWBUTTON As String = "Button"
Public Const S_TRIMMING As String = "Trimming"
Public Const K_TRIMMINGENABLE As String = "TrimEnable"
Public Const K_TRIMMINGBASEDIR As String = "BaseDir"
Public Const K_TRIMMINGBUTTON As String = "Button"
Public Const S_REVERSEPOST As String = "ReversePost"
Public Const K_REVERSEPOSTENABLE As String = "RevEnable"
Public Const K_REVERSEPOSTBASEDIR As String = "BaseDir"
Public Const K_REVERSEPOSTBUTTON As String = "Button"
Public Const S_GUNSTOCK As String = "GunStock" Public Const S_GUNSTOCK As String = "GunStock"
Public Const K_GUNSTOCKENABLE As String = "GsEnable" Public Const K_GUNSTOCKENABLE As String = "GsEnable"
Public Const K_GUNSTOCKEXEC As String = "GsExec" Public Const K_GUNSTOCKEXEC As String = "GsExec"
@@ -190,7 +201,7 @@ Module ConstIni
Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing" Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing"
Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling" Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling"
Public Const K_SELGEOMPROBING As String = "SelGeomProbing" Public Const K_SELGEOMPROBING As String = "SelGeomProbing"
Public Const K_SELVMILLQUALITY As String = "VMillQuality" Public Const K_VMILLQUALITY As String = "VMillQuality"
Public Const K_MACHININGGROUP As String = "MachiningGroup" Public Const K_MACHININGGROUP As String = "MachiningGroup"
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable" Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps" Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
+9
View File
@@ -1,5 +1,8 @@
Module ConstMachIni Module ConstMachIni
Public Const S_MCH_GENERAL As String = "General"
Public Const K_MATERIAL As String = "Material"
Public Const S_PARTPROGRAM As String = "PartProgram" Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const K_EXTENSION As String = "Extension" Public Const K_EXTENSION As String = "Extension"
@@ -67,4 +70,10 @@
Public Const S_ESTIMATIONS As String = "Estimations" Public Const S_ESTIMATIONS As String = "Estimations"
Public Const K_EST_ENABLE As String = "Enable" Public Const K_EST_ENABLE As String = "Enable"
' Tipi di materiali previsti attualmente per le macchine
Public Const MCH_MAT_STONE As String = "Stone"
Public Const MCH_MAT_WOOD As String = "Wood"
Public Const MCH_MAT_BEAM As String = "Beam"
Public Const MCH_MAT_ADDITIVE As String = "Additive"
End Module End Module
+1 -1
View File
@@ -11,7 +11,7 @@
m_CurrSetUpVM = CurrSetUpVM m_CurrSetUpVM = CurrSetUpVM
End Sub End Sub
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.m_CloseWindow 'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.OnCloseWindow
' Me.DialogResult = bDialogResult ' Me.DialogResult = bDialogResult
'End Sub 'End Sub
+3
View File
@@ -1530,6 +1530,8 @@ Public Class DrawPanelVM
Public Sub SolidIntersectSurf(ByVal param As Object) Public Sub SolidIntersectSurf(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CUTSURFSURF) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CUTSURFSURF)
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.TRIMSURFTMWITHCURVE)
Else Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SOLIDINTERSECTSURF) Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SOLIDINTERSECTSURF)
End If End If
@@ -2219,6 +2221,7 @@ Public Class DrawPanelVM
If Not IniFile.m_ProjectSceneContext = 0 Then If Not IniFile.m_ProjectSceneContext = 0 Then
bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL
bLayerOkAndSelOk = m_bLayerOk And m_bSelOk bLayerOkAndSelOk = m_bLayerOk And m_bSelOk
Map.refStatusBarVM.UpdateSelectedCount()
End If End If
If Application.m_UpdateLayerTree Then If Application.m_UpdateLayerTree Then
+46 -1
View File
@@ -164,6 +164,10 @@
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" /> <Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" /> <Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" /> <Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
<Compile Include="ExecuteWindow\ExecuteWindowV.xaml.vb">
<DependentUpon>ExecuteWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="ExecuteWindow\ExecuteWindowVM.vb" />
<Compile Include="LeftTray\LeftTrayV.xaml.vb"> <Compile Include="LeftTray\LeftTrayV.xaml.vb">
<DependentUpon>LeftTrayV.xaml</DependentUpon> <DependentUpon>LeftTrayV.xaml</DependentUpon>
</Compile> </Compile>
@@ -289,8 +293,20 @@
<Compile Include="Special-BeamWall\WallPanelV.xaml.vb"> <Compile Include="Special-BeamWall\WallPanelV.xaml.vb">
<DependentUpon>WallPanelV.xaml</DependentUpon> <DependentUpon>WallPanelV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
<Compile Include="Special-BeamWall\Wall.vb" /> <Compile Include="Special-BeamWall\Wall.vb" />
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
<Compile Include="Special-ReversePost\ReversePostPanelV.xaml.vb">
<DependentUpon>ReversePostPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-ReversePost\ReversePostPanelVM.vb" />
<Compile Include="Special-Trimming\TrimmingPanelV.xaml.vb">
<DependentUpon>TrimmingPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-Trimming\TrimmingPanelVM.vb" />
<Compile Include="Special-Window\WindowPanelV.xaml.vb">
<DependentUpon>WindowPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-Window\WindowPanelVM.vb" />
<Compile Include="SpecialPanel\SpecialPanelV.xaml.vb"> <Compile Include="SpecialPanel\SpecialPanelV.xaml.vb">
<DependentUpon>SpecialPanelV.xaml</DependentUpon> <DependentUpon>SpecialPanelV.xaml</DependentUpon>
</Compile> </Compile>
@@ -306,6 +322,7 @@
<Compile Include="Utility\Analyze.vb" /> <Compile Include="Utility\Analyze.vb" />
<Compile Include="Utility\BasePanelVM.vb" /> <Compile Include="Utility\BasePanelVM.vb" />
<Compile Include="Utility\BindingProxy.vb" /> <Compile Include="Utility\BindingProxy.vb" />
<Compile Include="Utility\DynamicGridModule.vb" />
<Compile Include="Utility\Map.vb" /> <Compile Include="Utility\Map.vb" />
<Compile Include="Internals\MruList.vb" /> <Compile Include="Internals\MruList.vb" />
<Compile Include="Utility\MachineModel.vb" /> <Compile Include="Utility\MachineModel.vb" />
@@ -466,6 +483,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="ExecuteWindow\ExecuteWindowV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LeftTray\LeftTrayV.xaml"> <Page Include="LeftTray\LeftTrayV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -634,6 +655,18 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Special-ReversePost\ReversePostPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-Trimming\TrimmingPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-Window\WindowPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SpecialPanel\SpecialPanelV.xaml"> <Page Include="SpecialPanel\SpecialPanelV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -1051,6 +1084,18 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\DrawPanel\BiArc.png" /> <Resource Include="Resources\DrawPanel\BiArc.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\ExecuteWindow\reload.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ToolPreview\Head.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ToolPreview\Tool.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ToolPreview\Delete.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
+1 -1
View File
@@ -6,7 +6,7 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}" <Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom"> Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom">
<Button.ContextMenu> <Button.ContextMenu>
<ContextMenu ItemsSource="{Binding MruScriptNames}" ItemContainerStyle="{StaticResource MruScriptItem}"> <ContextMenu ItemsSource="{Binding MruScriptNames}" ItemContainerStyle="{StaticResource MruScriptItem}">
</ContextMenu> </ContextMenu>
+7 -2
View File
@@ -65,8 +65,13 @@ Public Class ExecutePanelVM
''' Execute the Exec. This method is invoked by the ExecCommand. ''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary> ''' </summary>
Public Sub Exec(ByVal param As Object) Public Sub Exec(ByVal param As Object)
Map.refProjectVM.PreExecScript(True) If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.ExecScript(String.Empty) Dim ExecuteWindow As New ExecuteWindowV(Application.Current.MainWindow, New ExecuteWindowVM)
ExecuteWindow.ShowDialog()
Else
Map.refProjectVM.PreExecScript(True)
Map.refProjectVM.ExecScript(String.Empty)
End If
End Sub End Sub
#End Region ' ExecCommand #End Region ' ExecCommand
+39
View File
@@ -0,0 +1,39 @@
<EgtWPFLib5:EgtCustomWindow x:Class="ExecuteWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="Execute Window"
Height="500" Width="400"
IsResizable="True"
IsMinimizable="False"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
TitleBarHeight="32"
PreviewKeyDown="EgtCustomWindow_PreviewKeyDown"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding sScriptText}"
Style="{StaticResource ExecuteWindow_TextBox}"/>
<Button Grid.Row="1"
Grid.ColumnSpan="2"
Content="{Binding OkMsg}"
Command="{Binding Ok_Command}"
Style="{StaticResource EgtCAM5_InputButton}"/>
<Button Grid.Column="1"
Command="{Binding Reload_Command}"
IsEnabled="{Binding bReload_IsEnable}"
Style="{StaticResource ExecuteWindow_Button}">
<Image Source="/Resources/ExecuteWindow/reload.png" Stretch="Uniform"/>
</Button>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
+32
View File
@@ -0,0 +1,32 @@
Public Class ExecuteWindowV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_ExecuteWindowVM As ExecuteWindowVM
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(Owner As Window, ExecuteWindowVM As ExecuteWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ExecuteWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ExecuteWindowVM = ExecuteWindowVM
End Sub
#End Region ' Constructor
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ExecuteWindowVM.OnCloseWindow
Me.DialogResult = bDialogResult
End Sub
Private Sub EgtCustomWindow_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If e.Key = Key.Escape Then
Me.Close()
End If
End Sub
End Class
+130
View File
@@ -0,0 +1,130 @@
Imports System.Text
Imports EgtUILib
Imports System.IO
Public Class ExecuteWindowVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
' Evento per chiusura finestra
Friend Event OnCloseWindow(bDialogResult As Boolean)
Private ReadOnly sScriptFilePath As String = Path.Combine(IniFile.m_sTempDir, "ImmExec" & IniFile.m_nInstance.ToString() & ".lua")
Private m_sScriptText As String
Public Property sScriptText As String
Get
Return m_sScriptText
End Get
Set(value As String)
m_sScriptText = value
NotifyPropertyChanged(NameOf(sScriptText))
End Set
End Property
Private Sub SetScriptFile(value As String)
m_sScriptText = value
NotifyPropertyChanged(NameOf(sScriptText))
End Sub
Private m_bReload_IsEnable As Boolean = File.Exists(sScriptFilePath)
Public ReadOnly Property bReload_IsEnable As Boolean
Get
Return m_bReload_IsEnable
End Get
End Property
#Region "Messages"
Public ReadOnly Property OkMsg As String
Get
Return EgtMsg(20041)
End Get
End Property
Public ReadOnly Property SaveMsg As String
Get
Return EgtMsg(6453)
End Get
End Property
#End Region ' Messages
' Definizione Comandi
Private m_cmdOk As ICommand
Private m_cmdReload As ICommand
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
End Sub
#End Region ' Constructor
#Region "METHODS"
Private Sub SaveScript(sPathFileScript As String, sScriptText As String)
If String.IsNullOrWhiteSpace(sPathFileScript) OrElse String.IsNullOrWhiteSpace(sScriptText) Then Return
File.WriteAllText(sPathFileScript, sScriptText, Encoding.UTF8)
End Sub
Private Function ReadScript(sPathFileScript As String) As String
If String.IsNullOrWhiteSpace(sPathFileScript) Then Return String.Empty
Return File.ReadAllText(sPathFileScript)
End Function
#End Region ' Methods
#Region "COMMANDS"
#Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
' Verifico ci sia del testo
If String.IsNullOrWhiteSpace(m_sScriptText) Then Return
' Salva il file script
SaveScript(sScriptFilePath, m_sScriptText)
' Esegue il file script
Map.refProjectVM.PreExecScript(False)
Map.refProjectVM.ExecScript(sScriptFilePath)
' Se non passato a lavorazione, aggiornamento visualizzazione
If IniFile.m_ProjectMode <> ProjectModeOpt.MACHINING Then EgtDraw()
' Chiudo finestra
RaiseEvent OnCloseWindow(True)
End Sub
#End Region ' Ok_Command
#Region "Reload_Command"
Public ReadOnly Property Reload_Command As ICommand
Get
If m_cmdReload Is Nothing Then
m_cmdReload = New Command(AddressOf Reload)
End If
Return m_cmdReload
End Get
End Property
Public Sub Reload()
If File.Exists(sScriptFilePath) Then
SetScriptFile(ReadScript(sScriptFilePath))
End If
End Sub
#End Region ' Reload_Command
#End Region ' Commands
End Class
+7 -7
View File
@@ -311,19 +311,19 @@ Public Class MyMachGroupPanelVM
End Sub End Sub
Private Sub LoadMaterialType() Private Sub LoadMaterialType()
Dim sMatType As String = "Wood" Dim sMatType As String = MCH_MAT_WOOD
' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name ' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name
' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini" ' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini"
Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath
EgtUILib.GetPrivateProfileString(S_GENERAL, EgtWPFLib5.EstConstMachIni.K_MATERIAL, sMatType, sMatType, sMachineIniPath) EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, sMatType, sMatType, sMachineIniPath)
Select Case sMatType Select Case sMatType
Case "Stone" Case MCH_MAT_STONE
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE5
Case "Wood" Case MCH_MAT_WOOD
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
Case "Beam" Case MCH_MAT_BEAM
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM
Case "Additive" Case MCH_MAT_ADDITIVE
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
Case Else Case Else
' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore ' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore
+18 -6
View File
@@ -16,10 +16,8 @@
<Grid Margin="10"> <Grid Margin="10">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="40*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="20*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -28,6 +26,8 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5"> <UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5">
@@ -57,12 +57,24 @@
</ComboBox> </ComboBox>
</UniformGrid> </UniformGrid>
<UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5"> <UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5"
Visibility="{Binding StoneVisibility}">
<TextBlock Text="{Binding ExtSawArcMinRadMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ExtSawArcMinRad}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="5" Columns="2" Margin="0,0,0,5"
Visibility="{Binding StoneVisibility}">
<TextBlock Text="{Binding IntSawArcMaxSideAngMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding IntSawArcMaxSideAng}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="6" Columns="2" Margin="0,0,0,5">
<TextBlock Text="{Binding ApproxLinTolMsg}" VerticalAlignment="Center"/> <TextBlock Text="{Binding ApproxLinTolMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ApproxLinTol}" Height="25" Margin="10,0,0,0"/> <TextBox Text="{Binding ApproxLinTol}" Height="25" Margin="10,0,0,0"/>
</UniformGrid> </UniformGrid>
<UniformGrid Grid.Row="5" Columns="2"> <UniformGrid Grid.Row="7" Columns="2">
<TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/> <TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0" <ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0"
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/> SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
+83 -20
View File
@@ -1,5 +1,6 @@
Imports System.IO Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5
Public Class MachOptionVM Public Class MachOptionVM
@@ -48,21 +49,6 @@ Public Class MachOptionVM
End Set End Set
End Property End Property
Private m_sApproxLinTol As String
Public Property ApproxLinTol As String
Get
Return m_sApproxLinTol
End Get
Set(value As String)
Dim dApproxLinTol As Double = 0
If StringToLen(value, dApproxLinTol) Then
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
EgtMdbSave()
m_sApproxLinTol = value
End If
End Set
End Property
Private m_SplitArcsList As New List(Of MCH_SA)({MCH_SA.NEVER, MCH_SA.GEN_PLANE, MCH_SA.NO_XY_PLANE, MCH_SA.ALWAYS}) Private m_SplitArcsList As New List(Of MCH_SA)({MCH_SA.NEVER, MCH_SA.GEN_PLANE, MCH_SA.NO_XY_PLANE, MCH_SA.ALWAYS})
Public ReadOnly Property SplitArcsList As List(Of MCH_SA) Public ReadOnly Property SplitArcsList As List(Of MCH_SA)
Get Get
@@ -82,6 +68,51 @@ Public Class MachOptionVM
End Set End Set
End Property End Property
Private m_sExtSawArcMinRad As String
Public Property ExtSawArcMinRad As String
Get
Return m_sExtSawArcMinRad
End Get
Set(value As String)
Dim dExtSawArcMinRad As Double = 0
If StringToLen(value, dExtSawArcMinRad) Then
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dExtSawArcMinRad)
EgtMdbSave()
m_sExtSawArcMinRad = value
End If
End Set
End Property
Private m_sIntSawArcMaxSideAng As String
Public Property IntSawArcMaxSideAng As String
Get
Return m_sIntSawArcMaxSideAng
End Get
Set(value As String)
Dim dIntSawArcMaxSideAng As Double = 0
If StringToLen(value, dIntSawArcMaxSideAng) Then
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dIntSawArcMaxSideAng)
EgtMdbSave()
m_sIntSawArcMaxSideAng = value
End If
End Set
End Property
Private m_sApproxLinTol As String
Public Property ApproxLinTol As String
Get
Return m_sApproxLinTol
End Get
Set(value As String)
Dim dApproxLinTol As Double = 0
If StringToLen(value, dApproxLinTol) Then
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
EgtMdbSave()
m_sApproxLinTol = value
End If
End Set
End Property
Private m_ArchivedSetUpList As New List(Of String) Private m_ArchivedSetUpList As New List(Of String)
Public Property ArchivedSetUpList As List(Of String) Public Property ArchivedSetUpList As List(Of String)
Get Get
@@ -121,11 +152,6 @@ Public Class MachOptionVM
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9) Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9)
End Get End Get
End Property End Property
Public ReadOnly Property ApproxLinTolMsg As String
Get
Return EgtMsg(6410) ' Tolleranza di approssimazione
End Get
End Property
Public ReadOnly Property SplitArcsMsg As String Public ReadOnly Property SplitArcsMsg As String
Get Get
@@ -133,6 +159,24 @@ Public Class MachOptionVM
End Get End Get
End Property End Property
Public ReadOnly Property ExtSawArcMinRadMsg As String
Get
Return EgtMsg(6411) ' Minimo raggio arco esterno con lama
End Get
End Property
Public ReadOnly Property IntSawArcMaxSideAngMsg As String
Get
Return EgtMsg(6412) ' Massima inclinazione arco interno con lama
End Get
End Property
Public ReadOnly Property ApproxLinTolMsg As String
Get
Return EgtMsg(6410) ' Tolleranza di approssimazione
End Get
End Property
Public ReadOnly Property DefaultSetUpMsg As String Public ReadOnly Property DefaultSetUpMsg As String
Get Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7) Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
@@ -161,6 +205,14 @@ Public Class MachOptionVM
Dim nVal As Integer = 0 Dim nVal As Integer = 0
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal) EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA) m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
' Leggo minimo raggio arco esterno lavorabile con lama
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
m_sExtSawArcMinRad = LenToString(dVal, 4)
' Leggo massima inclinazione lama per lavorare archi interni
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
m_sIntSawArcMaxSideAng = LenToString(dVal, 4)
' Leggo tolleranza lineare di approssimazione ' Leggo tolleranza lineare di approssimazione
dVal = 0 dVal = 0
EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal) EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal)
@@ -185,6 +237,17 @@ Public Class MachOptionVM
End If End If
End Sub End Sub
#Region "Visibility"
Public ReadOnly Property StoneVisibility As Visibility
Get
Dim sGenMat As String = ""
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, MCH_MAT_WOOD, sGenMat, IniFile.m_sCurrMachIniFilePath)
Return If( sGenMat = MCH_MAT_STONE, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#End Region
#Region "COMMANDS" #Region "COMMANDS"
#Region "CloseMachOptionsCommand" #Region "CloseMachOptionsCommand"
+42 -30
View File
@@ -46,6 +46,13 @@ Public Class MainWindowVM
End Set End Set
End Property End Property
Private m_sDimensionDir As String = String.Empty
Public ReadOnly Property DimensionDir As String
Get
Return m_sDimensionDir
End Get
End Property
Private m_cmdMainWindow_ContentRendered As ICommand Private m_cmdMainWindow_ContentRendered As ICommand
Private m_cmdAboutBox As ICommand Private m_cmdAboutBox As ICommand
' MainWindow Activated Event ' MainWindow Activated Event
@@ -97,11 +104,11 @@ Public Class MainWindowVM
Public ReadOnly Property IconSource As String Public ReadOnly Property IconSource As String
Get Get
#If PLATFORM = "x64" Then #If PLATFORM = "x64" Then
Return "/Resources/EgtCAM5_64.ico" Return "/Resources/EgtCAM5_64.ico"
#else #Else
Return "/Resources/EgtCAM5.ico" Return "/Resources/EgtCAM5.ico"
#End If #End If
End Get End Get
End Property End Property
@@ -189,13 +196,7 @@ Public Class MainWindowVM
' Salvo impostazione macchina corrente ' Salvo impostazione macchina corrente
Map.refMachinePanelVM.SaveCurrentMachine() Map.refMachinePanelVM.SaveCurrentMachine()
' Aggiorno istanze usate ' Aggiorno istanze usate
m_objMutex.WaitOne(1000) ReleaseInstance()
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
' Chiudo la finestra principale del programma ' Chiudo la finestra principale del programma
Application.Current.MainWindow.Close() Application.Current.MainWindow.Close()
Else Else
@@ -203,15 +204,9 @@ Public Class MainWindowVM
End If End If
End Sub End Sub
Private Function OnTerminateProcess( nExitCode As Integer) As Boolean Private Function OnTerminateProcess(nExitCode As Integer) As Boolean
' Aggiorno istanze usate ' Aggiorno istanze usate
m_objMutex.WaitOne(1000) ReleaseInstance()
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
' Dichiaro di procedere con la terminazione del programma ' Dichiaro di procedere con la terminazione del programma
Return True Return True
End Function End Function
@@ -306,12 +301,9 @@ Public Class MainWindowVM
Map.refMainWindowVM.ManageClosingApplication() Map.refMainWindowVM.ManageClosingApplication()
' Terminazione generale di EgtInterface ' Terminazione generale di EgtInterface
EgtExit() EgtExit()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
' Aggiorno istanze usate ' Aggiorno istanze usate
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0) ReleaseInstance()
nTmp -= (1 << (IniFile.m_nInstance - 1)) ' Termino
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
Application.Current.Shutdown() Application.Current.Shutdown()
End Sub End Sub
@@ -362,6 +354,8 @@ Public Class MainWindowVM
Else Else
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
End If End If
' Recupero percorso file Dimension
m_sDimensionDir = m_sConfigDir & "\" & DIMENSION_FILE_NAME
' Verifico indice di istanza ' Verifico indice di istanza
ManageInstance() ManageInstance()
' Imposto tipo di chiave ' Imposto tipo di chiave
@@ -385,8 +379,8 @@ Public Class MainWindowVM
EgtSetLockId(sLockId) EgtSetLockId(sLockId)
End If End If
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2707, 1, IniFile.m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(3279, 3103, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2707, 1, IniFile.m_nKeyOptions) EgtGetKeyOptions(3279, 3103, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore ' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1)) IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto abilitazione lavorazioni avanzate ' Imposto abilitazione lavorazioni avanzate
@@ -529,6 +523,17 @@ Public Class MainWindowVM
End If End If
End If End If
End Sub End Sub
Private Sub ReleaseInstance()
' Aggiorno istanze usate
Dim bOk As Boolean = m_objMutex.WaitOne(1000)
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
If bOk Then m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
End Sub
Friend Sub NotifyMainWindow_ContentRendered() Friend Sub NotifyMainWindow_ContentRendered()
' Notifico ProjectVM ' Notifico ProjectVM
@@ -597,18 +602,25 @@ Public Class MainWindowVM
' pulisco output ' pulisco output
Map.refStatusBarVM.NotifyStatusOutput("") Map.refStatusBarVM.NotifyStatusOutput("")
Map.refInputExpanderVM.ResetInputBox() Map.refInputExpanderVM.ResetInputBox()
If not IsNothing( Map.refMachiningParameterExpanderVM) Then If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
' Nascondo la combobox delle usernotes ' Nascondo la combobox delle usernotes
Map.refMachiningParameterExpanderVM.CurrOperation.SetComboAddVisibility(Visibility.Collapsed) Map.refMachiningParameterExpanderVM.CurrOperation.SetComboAddVisibility(Visibility.Collapsed)
'riattivo il pulsante per visualizzare la combobox delle note 'riattivo il pulsante per visualizzare la combobox delle note
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_IsEnable(True) Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_IsEnable(True)
End If End If
ElseIf e.Key = Key.Left OrElse e.Key = Key.Right OrElse e.Key = Key.Up OrElse e.Key = Key.Down AndAlso ElseIf (e.Key = Key.Left OrElse e.Key = Key.Right) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
Map.refMachiningParameterExpanderVM.FocusSlider() Map.refMachiningParameterExpanderVM.FocusSlider()
Dim nStep As Integer = If(e.Key = Key.Right OrElse e.Key = Key.Up, 1, -1) Dim nStep As Integer = If(e.Key = Key.Right, 1, -1)
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep) Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
e.Handled = True e.Handled = True
ElseIf (e.Key = Key.Up OrElse e.Key = Key.Down) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
Map.refMachiningParameterExpanderVM.FocusButtonPreview()
If e.Key = Key.Down Then
Map.refMachiningParameterExpanderVM.RevertPreviewMachiningTool()
Else
Map.refMachiningParameterExpanderVM.PreviewMachiningTool()
End If
e.Handled = True
End If End If
End Sub End Sub
+3 -3
View File
@@ -30,7 +30,7 @@ Imports System.Windows
#End If #End If
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtCAM5")> <Assembly: AssemblyProduct("EgtCAM5")>
<Assembly: AssemblyCopyright("Copyright © 2016-2025 by Egalware s.r.l.")> <Assembly: AssemblyCopyright("Copyright © 2016-2026 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)> <Assembly: ComVisible(false)>
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.7.2")> <Assembly: AssemblyVersion("3.1.3.2")>
<Assembly: AssemblyFileVersion("2.7.7.2")> <Assembly: AssemblyFileVersion("3.1.3.2")>
+2 -2
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' This code was generated by a tool.
' Runtime Version:4.0.30319.34209 ' Runtime Version:4.0.30319.42000
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated. ' the code is regenerated.
@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc. ''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
+22 -20
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' This code was generated by a tool.
' Runtime Version:4.0.30319.34209 ' Runtime Version:4.0.30319.42000
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated. ' the code is regenerated.
@@ -12,15 +12,16 @@ Option Strict On
Option Explicit On Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality" #Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then #If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean Private Shared addedHandler As Boolean
@@ -28,17 +29,17 @@ Partial Friend NotInheritable Class MySettings
Private Shared addedHandlerLockObject As New Object Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then If My.Application.SaveMySettingsOnExit Then
My.Settings.Save() My.Settings.Save()
End If End If
End Sub End Sub
#End If #End If
#End Region #End Region
Public Shared ReadOnly Property [Default]() As MySettings Public Shared ReadOnly Property [Default]() As MySettings
Get Get
#If _MyType = "WindowsForms" Then #If _MyType = "WindowsForms" Then
If Not addedHandler Then If Not addedHandler Then
SyncLock addedHandlerLockObject SyncLock addedHandlerLockObject
@@ -49,10 +50,11 @@ Partial Friend NotInheritable Class MySettings
End SyncLock End SyncLock
End If End If
#End If #End If
Return defaultInstance Return defaultInstance
End Get End Get
End Property End Property
End Class End Class
End Namespace
Namespace My Namespace My
@@ -62,9 +64,9 @@ Namespace My
Friend Module MySettingsProperty Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.EgtCAM5.MySettings Friend ReadOnly Property Settings() As Global.EgtCAM5.My.MySettings
Get Get
Return Global.EgtCAM5.MySettings.Default Return Global.EgtCAM5.My.MySettings.Default
End Get End Get
End Property End Property
End Module End Module
@@ -7,10 +7,8 @@
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding PropertiesMsg}"/> <TextBlock Text="{Binding PropertiesMsg}"/>
</Expander.Header> </Expander.Header>
<UniformGrid> <TextBox Text="{Binding InfoBox, Mode=OneWay}" IsReadOnly="True"
<TextBox Text="{Binding InfoBox, Mode=OneWay}" MaxHeight="100" IsReadOnly="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
</UniformGrid>
</Expander> </Expander>
</UserControl> </UserControl>
@@ -21,6 +21,7 @@ Public Class InfoExpanderVM
Set(value As Boolean) Set(value As Boolean)
If value <> m_IsExpanded Then If value <> m_IsExpanded Then
m_IsExpanded = value m_IsExpanded = value
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(m_IsExpanded)
OnPropertyChanged("IsEnabled") OnPropertyChanged("IsEnabled")
End If End If
End Set End Set
@@ -23,9 +23,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}" <TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
PreviewKeyDown="TextBox_PreviewKeyDown" Height="Auto" PreviewKeyDown="TextBox_PreviewKeyDown" IsVisibleChanged="Txt_IsVisibleChanged"
Visibility="{Binding TextVisibility}" Margin="5,0,5,5" > Visibility="{Binding TextVisibility}" Height="Auto" Margin="5,0,5,5" >
<TextBox.InputBindings> <TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/> <KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/> <KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
@@ -34,50 +34,17 @@
<Button Grid.Column="1" <Button Grid.Column="1"
Content="+" Content="+"
Command="{Binding ShowInfoItemCommand}" Command="{Binding ShowInfoItemCommand}"
Visibility="Collapsed" Visibility="{Binding ShowInfoItemVisibility}"
Width="20" Width="20"
Height="20" Height="20"
Margin="5,-1,5,0" Margin="5,-1,5,0"
VerticalAlignment="Top"/> VerticalAlignment="Top"/>
<!--Visibility="{Binding ShowInfoItemVisibility}"-->
</Grid> </Grid>
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}" <CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/> Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}" <ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding ComboVisibility}" Margin="5,5,5,5"/> Visibility="{Binding ComboVisibility}" Margin="5,5,5,5"/>
<ItemsControl ItemsSource="{Binding InfoList}"
Visibility="{Binding InfoVisibility}"
Margin="5,5,0,10">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Key}"
Width="70"
Margin="0,6,-15,0"/>
<TextBox Grid.Column="1"
Text="{Binding Valour, UpdateSourceTrigger=PropertyChanged}"
Margin="0,5,5,10">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneInfoCommand}"/>
</TextBox.InputBindings>
</TextBox>
<Button Grid.Column="2"
Content="-"
Command="{Binding RemoveInfoItemCommand}"
Width="20"
Height="20"
Margin="5,-2,5,5"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Margin="5,0,5,5"> <Grid Margin="5,0,5,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@@ -1,11 +1,17 @@
Public Class InputExpanderV Public Class InputExpanderV
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs) Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift)= ModifierKeys.Shift) Or If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) Or
(e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then (e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then
Txt.AcceptsReturn = True Txt.AcceptsReturn = True
Txt.TextWrapping = TextWrapping.Wrap Txt.TextWrapping = TextWrapping.Wrap
End If End If
End Sub End Sub
Private Sub Txt_IsVisibleChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
If Txt.IsVisible Then
Txt.Focus()
End If
End Sub
End Class End Class
@@ -8,21 +8,10 @@ Public Class InputExpanderVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
' Variabile temporanea per salvare bShow ' Variabile temporanea per salvare bShow
Private m_tmpbShow As Boolean Private m_bTempShow As Boolean
Private m_tmpInfoList As New ObservableCollection(Of InfoItem) ' Lista temporanea delle Info
''' <summary> Private m_TempInfoList As New List(Of InfoItem)
''' Lista temporanea delle info
''' </summary>
Private Property tmpInfoList As ObservableCollection(Of InfoItem)
Get
Return m_tmpInfoList
End Get
Set(value As ObservableCollection(Of InfoItem))
m_tmpInfoList = value
OnPropertyChanged("tmpInfoList")
End Set
End Property
' Expander fields ' Expander fields
Private m_IsExpanded As Boolean Private m_IsExpanded As Boolean
@@ -158,47 +147,32 @@ Public Class InputExpanderVM
End Set End Set
End Property End Property
Private m_InfoList As New ObservableCollection(Of InfoItem)
''' <summary>
''' Lista delle info modificate
''' </summary>
Public Property InfoList As ObservableCollection(Of InfoItem)
Get
Return m_InfoList
End Get
Set(value As ObservableCollection(Of InfoItem))
m_InfoList = value
OnPropertyChanged("InfoList")
End Set
End Property
Private m_ComboSelectedIndex As Integer Private m_ComboSelectedIndex As Integer
Public Property ComboSelectedIndex As Integer Public Property ComboSelectedIndex As Integer
Get Get
Return m_ComboSelectedIndex Return m_ComboSelectedIndex
End Get End Get
Set(value As Integer) Set(value As Integer)
If m_tmpbShow Then Map.refProjectVM.SetLastInteger(value) If m_bTempShow Then Map.refProjectVM.SetLastInteger(value)
m_ComboSelectedIndex = value m_ComboSelectedIndex = value
' Assegno l'indice selezionato ad una variabile temporanea per utilizzarlo quando rimuovo l'info dalla lista ' se la combo è di Info ed è valida, la aggiungo alla textbox
Dim tmpComboSelectedIndex As Integer = ComboSelectedIndex If m_ComboSelectedIndex >= 0 AndAlso m_TempInfoList.Count() > 0 Then
' Controllo se l'indice è maggiore o uguale a zero e la lista tmp contiene valori Dim CurrItem As InfoItem = m_TempInfoList(m_ComboSelectedIndex)
If m_ComboSelectedIndex >= 0 AndAlso tmpInfoList.Count > 0 Then If String.IsNullOrEmpty(m_TextBox) Then
' Controllo se la info è contenuta nella lista ComboItemsList m_TextBox = CurrItem.sKey & "=" & CurrItem.sValue
If ComboItemsList.Contains(tmpInfoList(m_ComboSelectedIndex).sKey) Then Else
' Aggiungo la info alla lista per visualizzarla If Not m_TextBox.EndsWith(vbCrLf) Then m_TextBox &= vbCrLf
InfoList.Add(New InfoItem(tmpInfoList(m_ComboSelectedIndex).nId, tmpInfoList(m_ComboSelectedIndex).sKey, m_tmpInfoList(m_ComboSelectedIndex).sValour)) m_TextBox &= CurrItem.sKey & "=" & CurrItem.sValue
' Nascondo la combobox
ComboVisibility = Visibility.Collapsed
' Rimuovo la info dalla ComboItemsList
ComboItemsList.Remove(tmpInfoList(m_ComboSelectedIndex).sKey)
End If End If
' Rimuovo la info dalla tmpInfoList ComboVisibility = Visibility.Collapsed
tmpInfoList.Remove(tmpInfoList(tmpComboSelectedIndex)) ComboItemsList.RemoveAt(m_ComboSelectedIndex)
m_TempInfoList.RemoveAt(m_ComboSelectedIndex)
m_ComboSelectedIndex = -1
If ComboItemsList.Count <= 0 Then ShowInfoItemVisibility = Visibility.Collapsed
End If End If
OnPropertyChanged("ComboSelectedIndex") OnPropertyChanged("ComboSelectedIndex")
OnPropertyChanged("ComboItemsList") OnPropertyChanged("ComboItemsList")
OnPropertyChanged("InfoList") OnPropertyChanged("TextBox")
End Set End Set
End Property End Property
@@ -243,27 +217,10 @@ Public Class InputExpanderVM
End Set End Set
End Property End Property
Private m_InfoVisibility As Visibility
''' <summary>
''' Propietà visibilità lista info modificate
''' </summary>
Public Property InfoVisibility As Visibility
Get
Return m_InfoVisibility
End Get
Set(value As Visibility)
If value <> m_InfoVisibility Then
m_InfoVisibility = value
OnPropertyChanged("InfoVisibility")
End If
End Set
End Property
' Commands definition ' Commands definition
Private m_cmdShow As ICommand Private m_cmdShow As ICommand
Private m_cmdDone As ICommand Private m_cmdDone As ICommand
Private m_cmdShowInfoItem As ICommand Private m_cmdShowInfoItem As ICommand
Private m_cmdRemoveInfoItem As ICommand
#Region "Messages" #Region "Messages"
@@ -287,6 +244,7 @@ Public Class InputExpanderVM
Sub New() Sub New()
' Creo riferimento a questa classe in EgtCAM5Map ' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefInputExpanderVM(Me) Map.SetRefInputExpanderVM(Me)
ComboSelectedIndex = -1
End Sub End Sub
#End Region ' Constructor #End Region ' Constructor
@@ -341,15 +299,6 @@ Public Class InputExpanderVM
''' Execute the Point. This method is invoked by the PointCommand. ''' Execute the Point. This method is invoked by the PointCommand.
''' </summary> ''' </summary>
Public Sub Done(ByVal param As Object) Public Sub Done(ByVal param As Object)
' Controllo se la lista contenente la info modificata sia presente
If InfoList.Count > 0 Then
' Ciclo sulla lista
For Each Item As InfoItem In InfoList
Map.refProjectVM.NotifyInputText((Item.Key & "=" & Item.Valour).Trim())
' Assegno a m_TextBox la info modificata
m_TextBox &= vbCrLf & (Item.Key & "=" & Item.Valour).Trim() & vbCrLf
Next
End If
Map.refProjectVM.Done(m_TextBox) Map.refProjectVM.Done(m_TextBox)
End Sub End Sub
@@ -381,6 +330,18 @@ Public Class InputExpanderVM
''' </summary> ''' </summary>
''' <param name="param"></param> ''' <param name="param"></param>
Public Sub ShowInfoItem(ByVal param As Object) Public Sub ShowInfoItem(ByVal param As Object)
' Se presente info inserita in textbox
If Not String.IsNullOrWhiteSpace( m_TextBox) Then
Dim vLines As String() = m_TextBox.Split( vbCrLf.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
For Each sLine As String In vLines
Dim vKeyVal As String() = sLine.Split("="c)
Dim nInd As Integer = m_TempInfoList.FindIndex( Function(x) x.sKey = vKeyVal(0))
If nInd <> -1 Then
ComboItemsList.RemoveAt( nInd)
m_TempInfoList.RemoveAt( nInd)
End If
Next
End If
ComboVisibility = Visibility.Visible ComboVisibility = Visibility.Visible
End Sub End Sub
@@ -391,27 +352,18 @@ Public Class InputExpanderVM
#Region "METHODS" #Region "METHODS"
Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam) Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam)
Title = PrepareInputBoxParam.sTitle ' Divido il titolo che può contenere comandi dopo il ';'
Dim vsSplitTitle As String() = PrepareInputBoxParam.sTitle.Split(";"c)
Title = vsSplitTitle(0)
If PrepareInputBoxParam.sLabel <> "" Then If PrepareInputBoxParam.sLabel <> "" Then
TextBlock = PrepareInputBoxParam.sLabel TextBlock = PrepareInputBoxParam.sLabel
TextBox = "" TextBox = ""
TextVisibility = Visibility.Visible TextVisibility = Visibility.Visible
' Controllo se il titolo è uguale a INFO se si ' Se presente il comando "Sic=1"
If Title = EgtMsg(5359).ToUpper() Then If vsSplitTitle.Count() > 1 AndAlso vsSplitTitle(1) = "Sic=1" Then
' Metto tmpbShow a false m_bTempShow = False
m_tmpbShow = False
' Rendo visibile il pulsante che mostra la lista delle info
ShowInfoItemVisibility = Visibility.Visible
' Rendo visibile la lista delle info selezionate
InfoVisibility = Visibility.Visible
' Pulisco la lista tmpInfoList
tmpInfoList.Clear()
' Pulisco la lista InfoList
InfoList.Clear()
' Pulisco la lista ComboItemsList
ComboItemsList.Clear()
' Popolo la lista ComboItemsList
ComboInfo() ComboInfo()
If ComboItemsList.Count > 0 Then ShowInfoItemVisibility = Visibility.Visible
End If End If
End If End If
If PrepareInputBoxParam.sCheckLabel <> "" Then If PrepareInputBoxParam.sCheckLabel <> "" Then
@@ -419,14 +371,9 @@ Public Class InputExpanderVM
CheckVisibility = Visibility.Visible CheckVisibility = Visibility.Visible
End If End If
If PrepareInputBoxParam.bShowCombo Then If PrepareInputBoxParam.bShowCombo Then
' Assegno a tmpbShow PrepareInputBoxParam.bShowCombo m_bTempShow = PrepareInputBoxParam.bShowCombo
m_tmpbShow = PrepareInputBoxParam.bShowCombo
' Pulisco la lista ComboItemsList
ComboItemsList.Clear() ComboItemsList.Clear()
' Pulisco la lista tmpInfoList m_TempInfoList.Clear()
tmpInfoList.Clear()
' Pulisco la lista InfoList
InfoList.Clear()
ComboVisibility = Visibility.Visible ComboVisibility = Visibility.Visible
End If End If
If PrepareInputBoxParam.bShowBtn Then If PrepareInputBoxParam.bShowBtn Then
@@ -444,7 +391,6 @@ Public Class InputExpanderVM
ComboVisibility = Visibility.Collapsed ComboVisibility = Visibility.Collapsed
ShowBtnVisibility = Visibility.Collapsed ShowBtnVisibility = Visibility.Collapsed
ShowInfoItemVisibility = Visibility.Collapsed ShowInfoItemVisibility = Visibility.Collapsed
InfoVisibility = Visibility.Collapsed
IsExpanded = False IsExpanded = False
IsEnabled = False IsEnabled = False
End Sub End Sub
@@ -479,33 +425,22 @@ Public Class InputExpanderVM
Return True Return True
End Function End Function
''' <summary>
''' Rimovi nota da info lista
''' </summary>
''' <param name="InfoItem">Informazione da eliminare</param>
Friend Sub RemoveItemInfo(InfoItem As InfoItem)
' Rimuovo info da lista modifica
InfoList.Remove(InfoItem)
' Riaggiungo la info eliminata
ComboItemsList.Add(InfoItem.sKey)
' Riaggiungo la info eliminata
tmpInfoList.Add(InfoItem)
End Sub
''' <summary> ''' <summary>
''' Funzione che popola la lista ComboItemsList ''' Funzione che popola la lista ComboItemsList
''' </summary> ''' </summary>
Private Sub ComboInfo() Private Sub ComboInfo()
'''''''''''''''''''''''''''''' Recuperare funzione egtgetallinfo quando sarà pronta
Dim val As Integer
If Not m_tmpbShow Then
For Ind As Integer = 0 To 6
val += Ind
tmpInfoList.Add(New InfoItem(Ind, "A" & +Ind, val.ToString()))
Next
For Each InfoItem As InfoItem In tmpInfoList m_TempInfoList.Clear()
ComboItemsList.Add(InfoItem.sKey) ComboItemsList.Clear()
Dim vsInfo As String() = Nothing
EgtGetAllInfo( Map.refManageLayerExpanderVM.RightClickedTreeItemId, vsInfo)
If Not m_bTempShow And Not IsNothing( vsInfo) Then
For nInd As Integer = 0 To vsInfo.Count() - 1
Dim vKeyVal As String() = vsInfo( nInd).Split("="c)
m_TempInfoList.Add(New InfoItem( nInd, vKeyVal(0), vKeyVal(1)))
ComboItemsList.Add( vsInfo( nInd))
Next Next
End If End If
End Sub End Sub
@@ -19,11 +19,12 @@ Public Class LayerTreeViewItem
''' </summary> ''' </summary>
Public Overrides Property IsSelected As Boolean Public Overrides Property IsSelected As Boolean
Get Get
Return m_IsSelected Return m_isSelected
End Get End Get
Set(value As Boolean) Set(value As Boolean)
If (value <> m_IsSelected) Then If (value <> m_isSelected) Then
m_IsSelected = value m_isSelected = value
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(value)
If value Then If value Then
' recupero l'Id del nuovo oggetto selezionato ' recupero l'Id del nuovo oggetto selezionato
Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False) Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False)
@@ -5,7 +5,7 @@
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
xmlns:local="clr-namespace:EgtCAM5"> xmlns:local="clr-namespace:EgtCAM5">
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}"> <Expander IsExpanded="{Binding ManageLayerIsExpanded}" Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding HeaderName}" Margin="0,0,5,0"/> <TextBlock Text="{Binding HeaderName}" Margin="0,0,5,0"/>
@@ -13,7 +13,11 @@
</StackPanel> </StackPanel>
</Expander.Header> </Expander.Header>
<StackPanel> <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<UniformGrid Rows="1"> <UniformGrid Rows="1">
<Button Content="{Binding NewPartMsg}" Command="{Binding NewPartCommand}" Height="30"/> <Button Content="{Binding NewPartMsg}" Command="{Binding NewPartCommand}" Height="30"/>
@@ -21,7 +25,7 @@
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/> <Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
</UniformGrid> </UniformGrid>
<TreeView x:Name="LayerTreeView" MinHeight="300" MaxHeight="400" <TreeView Grid.Row="1" x:Name="LayerTreeView"
ItemsSource="{Binding Path=LayerList}" ItemsSource="{Binding Path=LayerList}"
VirtualizingStackPanel.IsVirtualizing = "True" VirtualizingStackPanel.IsVirtualizing = "True"
VirtualizingStackPanel.VirtualizationMode = "Recycling"> VirtualizingStackPanel.VirtualizationMode = "Recycling">
@@ -116,6 +120,6 @@
</ContextMenu> </ContextMenu>
</TreeView.ContextMenu> </TreeView.ContextMenu>
</TreeView> </TreeView>
</StackPanel> </Grid>
</Expander> </Expander>
</UserControl> </UserControl>
@@ -1,6 +1,5 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports EgtUILib Imports EgtUILib
Imports EgtCAM5.IniFile
Public Class ManageLayerExpanderVM Public Class ManageLayerExpanderVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -30,22 +29,6 @@ Public Class ManageLayerExpanderVM
End Set End Set
End Property End Property
' Definizione comandi
Private m_cmdNewPart As ICommand
Private m_cmdNewLayer As ICommand
Private m_cmdLayerColor As ICommand
Private m_cmdTreeViewDoubleClick As ICommand
Private m_cmdTreeViewMouseUp As ICommand
Private m_cmdTreeViewMouseRightButton As ICommand
Private m_cmdSelect As ICommand
Private m_cmdDeselect As ICommand
Private m_cmdName As ICommand
Private m_cmdInfo As ICommand
Private m_cmdRelocate As ICommand
Private m_cmdCopy As ICommand
Private m_cmdDelete As ICommand
Private m_cmdSave As ICommand
' Lista dei layer ' Lista dei layer
Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem) Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem)
Public Property LayerList As ObservableCollection(Of LayerTreeViewItem) Public Property LayerList As ObservableCollection(Of LayerTreeViewItem)
@@ -54,6 +37,7 @@ Public Class ManageLayerExpanderVM
End Get End Get
Set(value As ObservableCollection(Of LayerTreeViewItem)) Set(value As ObservableCollection(Of LayerTreeViewItem))
m_LayerList = value m_LayerList = value
OnPropertyChanged("LayerList")
End Set End Set
End Property End Property
@@ -71,6 +55,22 @@ Public Class ManageLayerExpanderVM
End Get End Get
End Property End Property
Private m_ManageLayerIsExpanded As Boolean
Public Property ManageLayerIsExpanded As Boolean
Get
Return m_ManageLayerIsExpanded
End Get
Set(value As Boolean)
m_ManageLayerIsExpanded = value
Map.refDrawOptionPanelVM.SetManageLayerRowIsExpanded(m_ManageLayerIsExpanded)
OnPropertyChanged("ManageLayerIsExpanded")
End Set
End Property
Friend Sub SetManageLayerIsExpanded(value As Boolean)
m_ManageLayerIsExpanded = value
OnPropertyChanged("ManageLayerIsExpanded")
End Sub
#Region "Messages" #Region "Messages"
Public ReadOnly Property NewPartMsg As String Public ReadOnly Property NewPartMsg As String
@@ -131,6 +131,22 @@ Public Class ManageLayerExpanderVM
#End Region #End Region
' Definizione comandi
Private m_cmdNewPart As ICommand
Private m_cmdNewLayer As ICommand
Private m_cmdLayerColor As ICommand
Private m_cmdTreeViewDoubleClick As ICommand
Private m_cmdTreeViewMouseUp As ICommand
Private m_cmdTreeViewMouseRightButton As ICommand
Private m_cmdSelect As ICommand
Private m_cmdDeselect As ICommand
Private m_cmdName As ICommand
Private m_cmdInfo As ICommand
Private m_cmdRelocate As ICommand
Private m_cmdCopy As ICommand
Private m_cmdDelete As ICommand
Private m_cmdSave As ICommand
#End Region #End Region
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -140,6 +156,7 @@ Public Class ManageLayerExpanderVM
Map.SetRefManageLayerExpanderVM(Me) Map.SetRefManageLayerExpanderVM(Me)
'Imposto tempo di evidenziazione delle entità clickate 'Imposto tempo di evidenziazione delle entità clickate
ObjTreeTimer.Interval = TimeSpan.FromMilliseconds(1000) ObjTreeTimer.Interval = TimeSpan.FromMilliseconds(1000)
SetManageLayerIsExpanded(True)
End Sub End Sub
#End Region ' Constructor #End Region ' Constructor
@@ -241,6 +258,7 @@ Public Class ManageLayerExpanderVM
If m_nObjTreeOldId <> GDB_ID.NULL Then If m_nObjTreeOldId <> GDB_ID.NULL Then
Map.refProjectVM.SetLastInteger(m_nObjTreeOldId) Map.refProjectVM.SetLastInteger(m_nObjTreeOldId)
Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER) Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(True)
End If End If
End Sub End Sub
+20 -6
View File
@@ -1,15 +1,29 @@
<UserControl x:Class="DrawOptionPanelV" <UserControl x:Class="DrawOptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"> xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<StackPanel Name="ciao" Background="Transparent" Margin="0,0,3.5001,0" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}"> <Grid x:Name="DrawGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid.RowDefinitions>
<RowDefinition MinHeight="100" MaxHeight="800"
EgtCAM5:DrawOptionPanelVM.RowId="ManageLayer"
EgtCAM5:DrawOptionPanelVM.IsExpanded="{Binding ManageLayerRowIsExpanded}"
EgtCAM5:DrawOptionPanelVM.TargetSplitter="{Binding ElementName=ManagerLayerGridSplitter}"/>
<RowDefinition MinHeight="100" MaxHeight="400"
EgtCAM5:DrawOptionPanelVM.RowId="Info"
EgtCAM5:DrawOptionPanelVM.IsExpanded="{Binding InfoRowIsExpanded}"
EgtCAM5:DrawOptionPanelVM.TargetSplitter="{Binding ElementName=InfoGridSplitter}"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--ContentPresenter that contains the ManageLayerExpander--> <!--ContentPresenter that contains the ManageLayerExpander-->
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/> <ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
<GridSplitter x:Name="ManagerLayerGridSplitter" Style="{StaticResource General_GridSplitter}"/>
<!--ContentPresenter that contains the InfoExpander--> <!--ContentPresenter that contains the InfoExpander-->
<ContentPresenter Content="{Binding InfoExpander}"/> <ContentPresenter Grid.Row="1" Content="{Binding InfoExpander}"/>
<GridSplitter x:Name="InfoGridSplitter" Grid.Row="1" Style="{StaticResource General_GridSplitter}"/>
<!--ContentPresenter that contains the InputExpander--> <!--ContentPresenter that contains the InputExpander-->
<ContentPresenter Content="{Binding InputExpander}"/> <ContentPresenter Grid.Row="2" Content="{Binding InputExpander}"/>
</StackPanel> </Grid>
</UserControl> </UserControl>
+25 -2
View File
@@ -1,7 +1,30 @@
Public Class DrawOptionPanelV Public Class DrawOptionPanelV
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Sub New()
Dim x = ciao.MaxHeight
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Map.SetRefDrawOptionPanelV(Me)
If Not IsActivePlugin() Then
AddHandler DrawGrid.Loaded,
Sub()
DynamicGridModule.RestoreDrawGridLayout(DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DynamicGridModule.RestoreDrawGridLayout(DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DrawGrid.UpdateLayout()
End Sub
AddHandler ManagerLayerGridSplitter.DragCompleted,
Sub()
DynamicGridModule.SaveDrawGridLayout(DrawGrid, "ManageLayer", If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
End Sub
AddHandler InfoGridSplitter.DragCompleted,
Sub()
DynamicGridModule.SaveDrawGridLayout(DrawGrid, "Info", If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
End Sub
End If
End Sub End Sub
End Class End Class
+112 -1
View File
@@ -1,4 +1,4 @@
Imports EgtUILib Imports System.IO
Public Class DrawOptionPanelVM Public Class DrawOptionPanelVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -37,6 +37,28 @@ Public Class DrawOptionPanelVM
End Get End Get
End Property End Property
Private m_ManageLayerRowIsExpanded As Boolean = True
Public ReadOnly Property ManageLayerRowIsExpanded As Boolean
Get
Return m_ManageLayerRowIsExpanded
End Get
End Property
Friend Sub SetManageLayerRowIsExpanded(value As Boolean)
m_ManageLayerRowIsExpanded = value
OnPropertyChanged("ManageLayerRowIsExpanded")
End Sub
Private m_InfoRowIsExpanded As Boolean = True
Public ReadOnly Property InfoRowIsExpanded As Boolean
Get
Return m_InfoRowIsExpanded
End Get
End Property
Friend Sub SetInfoRowIsExpanded(value As Boolean)
m_InfoRowIsExpanded = value
OnPropertyChanged("InfoRowIsExpanded")
End Sub
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
Sub New() Sub New()
@@ -60,4 +82,93 @@ Public Class DrawOptionPanelVM
#End Region ' METHODS #End Region ' METHODS
#Region "DEPENCY PROPERTY"
Public Shared ReadOnly RowIdProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"RowId",
GetType(String),
GetType(DrawOptionPanelVM),
New PropertyMetadata(Nothing)
)
Public Shared Sub SetRowId(element As DependencyObject, value As String)
element.SetValue(RowIdProperty, value)
End Sub
Public Shared Function GetRowId(element As DependencyObject) As String
Return CType(element.GetValue(RowIdProperty), String)
End Function
Public Shared ReadOnly IsExpandedProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"IsExpanded",
GetType(Boolean),
GetType(DrawOptionPanelVM),
New PropertyMetadata(True, AddressOf OnIsExpandedChanged)
)
Public Shared Sub SetIsExpanded(element As DependencyObject, value As Boolean)
element.SetValue(IsExpandedProperty, value)
End Sub
Public Shared Function GetIsExpanded(element As DependencyObject) As Boolean
Return CType(element.GetValue(IsExpandedProperty), Boolean)
End Function
Public Shared Function GetTargetSplitter(d As DependencyObject) As GridSplitter
Return CType(d.GetValue(TargetSplitterProperty), GridSplitter)
End Function
Public Shared Sub SetTargetSplitter(d As DependencyObject, value As GridSplitter)
d.SetValue(TargetSplitterProperty, value)
End Sub
Public Shared ReadOnly TargetSplitterProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"TargetSplitter",
GetType(GridSplitter),
GetType(DrawOptionPanelVM),
New PropertyMetadata(Nothing)
)
Private Shared Sub OnIsExpandedChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim row As RowDefinition = TryCast(d, RowDefinition)
If IsNothing(row) Then Return
Dim isExpanded As Boolean = CBool(e.NewValue)
Dim splitter = DrawOptionPanelVM.GetTargetSplitter(row)
If splitter IsNot Nothing Then
splitter.IsEnabled = isExpanded
splitter.Visibility = If(isExpanded, Visibility.Visible, Visibility.Collapsed)
End If
Dim rowId As String = GetRowId(row)
Dim rowHeight As Double = 0
If rowId = "ManageLayer" Then
rowHeight = 400
ElseIf rowId = "Info" Then
rowHeight = 150
End If
If Not isExpanded Then
row.ClearValue(RowDefinition.HeightProperty)
row.Height = New GridLength(1, GridUnitType.Auto)
row.MinHeight = 0
Else
If File.Exists(Map.refMainWindowVM.DimensionDir) Then
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
Map.refDrawOptionPanelV.DrawGrid.UpdateLayout()
Else
row.Height = New GridLength(rowHeight)
End If
End If
End Sub
#End Region ' Depency Property
End Class End Class
@@ -18,6 +18,7 @@ Public Class EstimationsExpanderVM
Set(value As Boolean) Set(value As Boolean)
If value <> m_Estimation_IsExpanded Then If value <> m_Estimation_IsExpanded Then
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.ESTIMATIONS, value) Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.ESTIMATIONS, value)
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
End If End If
End Set End Set
End Property End Property
@@ -138,7 +139,7 @@ Public Class EstimationsExpanderVM
If Not String.IsNullOrEmpty(sCurrFilePath) Then If Not String.IsNullOrEmpty(sCurrFilePath) Then
sInfo = "EgtCAM5 - " & sCurrFilePath sInfo = "EgtCAM5 - " & sCurrFilePath
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sEstFile) AndAlso Not String.IsNullOrWhiteSpace(sEstFile) Then If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sEstFile) AndAlso Not String.IsNullOrWhiteSpace(sEstFile) Then
sEstFile = Path.ChangeExtension(Path.GetDirectoryName(sCurrFilePath) & "\" & sEstFile, ".html") sEstFile = Path.ChangeExtension(Path.GetDirectoryName(sCurrFilePath) & "\" & Path.GetFileName( sEstFile), ".html")
Else Else
sEstFile = Path.ChangeExtension(sCurrFilePath, Nothing) sEstFile = Path.ChangeExtension(sCurrFilePath, Nothing)
If IniFile.m_bMachiningGroup Then If IniFile.m_bMachiningGroup Then
@@ -94,26 +94,18 @@ Public Class MachiningTreeExpanderVM
' Sposto la lavorazione aggiunta subito dopo quella appena selezionata ' Sposto la lavorazione aggiunta subito dopo quella appena selezionata
EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER) EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER)
End If End If
' Recupero geometria correntemente selezionata e la metto in un vettore ' Imposto geometria da lavorare (tutta quella selezionata)
Dim SelectedEntities As New List(Of Integer) Dim vId(EgtGetSelectedObjCount() - 1) As Integer
Dim EntityId As Integer = EgtGetFirstSelectedObj() Dim vSub(EgtGetSelectedObjCount() - 1) As Integer
While EntityId <> GDB_ID.NULL Dim nInd As Integer = 0
SelectedEntities.Add(EntityId) Dim EntId As Integer = EgtGetFirstSelectedObj()
EntityId = EgtGetNextSelectedObj() While EntId <> GDB_ID.NULL
vId(nInd) = EntId
SelData.GetSubFromId( EntId, vSub(nInd))
nInd += 1
EntId = EgtGetNextSelectedObj()
End While End While
' Imposto l'operazione appena creata come corrente EgtSetMachiningGeometry(vId, vSub)
EgtSetCurrMachining(MachiningId)
' Gestione speciale per superfici ( si aggiunge l'identificazione della faccia)
If SelectedEntities.Count() > 0 AndAlso EgtGetType(SelectedEntities(0)) = GDB_TY.SRF_MESH Then
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllIdSub(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
' Gestione standard per altre entità (curve, regioni, ...)
Else
' Imposto il vettore come geometria di lavorazione
EgtSetMachiningGeometry(SelectedEntities.ToArray)
End If
' Calcolo la lavorazione con la nuova geometria ' Calcolo la lavorazione con la nuova geometria
EgtApplyMachining(True) EgtApplyMachining(True)
EgtDraw() EgtDraw()
@@ -313,12 +313,16 @@ Public Class DispositionParameterExpanderVM
' se movimento di traslazione ' se movimento di traslazione
If m_MoveIsChecked Then If m_MoveIsChecked Then
Dim InputPoint As New Point3d(0, 0, 0) Dim InputPoint As New Point3d(0, 0, 0)
Dim dSupp As Double = -1
Dim Values() As String = m_InputValue.Split(","c) Dim Values() As String = m_InputValue.Split(","c)
If Values.Count = 2 Then If Values.Count >= 2 Then
StringToLen(Values(0), InputPoint.x) StringToLen(Values(0), InputPoint.x)
StringToLen(Values(1), InputPoint.y) StringToLen(Values(1), InputPoint.y)
If Values.Count >= 3 Then
StringToLen(Values(2), dSupp)
End If
Else Else
m_InputErrorMsg = "Il valore non è una cordinata XY" m_InputErrorMsg = "Il valore non è un punto X,Y"
OnPropertyChanged("InputErrorMsg") OnPropertyChanged("InputErrorMsg")
Return Return
End If End If
@@ -338,8 +342,38 @@ Public Class DispositionParameterExpanderVM
TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef)) TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef))
' calcolo il vettore di spostamento del grezzo ' calcolo il vettore di spostamento del grezzo
vtMove = TableRefInputPoint - ptRawRefPoint vtMove = TableRefInputPoint - ptRawRefPoint
vtMove.z = 0 vtMove.z = 0
' se è una ventosa ' verifico ed aggiusto eventuale supporto
Dim dOldSupp As Double = 0
Dim nOldSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
If nOldSuppId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nOldSuppId, GDB_BB.STANDARD, bboxSupport)
dOldSupp = bboxSupport.DimZ()
End If
If dSupp > -EPS_SMALL AndAlso Math.Abs( dSupp - dOldSupp) > EPS_SMALL Then
' da cancellare
If dSupp < EPS_SMALL Then
EgtErase( nOldSuppId)
vtMove.z = dSupp - dOldSupp
' da creare o modificare
Else
EgtErase( nOldSuppId)
Dim nNewSuppId As Integer = GDB_ID.NULL
Dim nRawOutLnId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, RAWOUTLINE)
If nRawOutLnId <> GDB_ID.NULL Then
Dim vtExtr As New Vector3d( 0, 0, -dSupp)
nNewSuppId = EgtCreateSurfTmByRegionExtrusion( nFirstSelectedId, 1, {nRawOutLnId}, vtExtr, 0.05, GDB_RT.GLOB)
End If
If nNewSuppId <> GDB_ID.NULL Then
EgtSetName( nNewSuppId, SUPPORT)
EgtSetColor( nNewSuppId, New Color3d(150, 75, 0))
If nOldSuppId <> GDB_ID.NULL Then EgtChangeId( nNewSuppId, nOldSuppId)
vtMove.z = dSupp - dOldSupp
End If
End If
End If
' se è una ventosa
ElseIf EgtVerifyFixture(nFirstSelectedId) Then ElseIf EgtVerifyFixture(nFirstSelectedId) Then
Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB) Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB)
EgtGetGroupGlobFrame(nFirstSelectedId, SelObjFrame3d) EgtGetGroupGlobFrame(nFirstSelectedId, SelObjFrame3d)
@@ -364,7 +398,7 @@ vtMove.z = 0
DispositionUtility.MoveRawPartPartAndFixture(GDB_ID.SEL, New Vector3d(0, vtRemainingMove.y, 0), DispositionUtility.SelType.NULL) DispositionUtility.MoveRawPartPartAndFixture(GDB_ID.SEL, New Vector3d(0, vtRemainingMove.y, 0), DispositionUtility.SelType.NULL)
End If End If
End If End If
' se rotazione ' se rotazione
Else Else
Dim nSelId As Integer = EgtGetFirstSelectedObj() Dim nSelId As Integer = EgtGetFirstSelectedObj()
If nSelId = GDB_ID.NULL Then Return If nSelId = GDB_ID.NULL Then Return
@@ -374,7 +408,7 @@ vtMove.z = 0
If EgtVerifyRawPartCurrPhase(nSelId) Then If EgtVerifyRawPartCurrPhase(nSelId) Then
' Se primo carattere è nome asse ' Se primo carattere è nome asse
If sVal(0) = "X"c Then If sVal(0) = "X"c Then
sVal = sVal.Remove( 0, 1) sVal = sVal.Remove( 0, 1)
vtRotAx = Vector3d.X_AX() vtRotAx = Vector3d.X_AX()
ElseIf sVal(0) = "Y"c Then ElseIf sVal(0) = "Y"c Then
sVal = sVal.Remove( 0, 1) sVal = sVal.Remove( 0, 1)
@@ -444,7 +478,15 @@ sVal = sVal.Remove( 0, 1)
Dim nFirstSelectedId As Integer = EgtGetFirstSelectedObj() Dim nFirstSelectedId As Integer = EgtGetFirstSelectedObj()
If EgtVerifyRawPartCurrPhase(nFirstSelectedId) Then If EgtVerifyRawPartCurrPhase(nFirstSelectedId) Then
Dim ptR As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition) Dim ptR As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
m_InputValue = ptR.x.ToString("F1", CultureInfo.InvariantCulture) & "," & ptR.y.ToString("F1", CultureInfo.InvariantCulture) Dim sSupp As String = ""
Dim nSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
If nSuppId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nSuppId, GDB_BB.STANDARD, bboxSupport)
Dim dSupp As Double = bboxSupport.DimZ()
sSupp = "," & LenToString( dSupp, 2)
End If
m_InputValue = LenToString( ptR.x, 2) & "," & LenToString( ptR.y, 2) & sSupp
OnPropertyChanged( "InputValue") OnPropertyChanged( "InputValue")
End If End If
End Sub End Sub
@@ -80,28 +80,25 @@
<Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}" <Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}"
Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/> Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/>
<Grid> <Grid Margin="0,2.5,0,2.5">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox Name="ViewToolBtn" <Button Command="{Binding PreviewMachiningTool_Command}"
Content="{Binding ViewToolBtnMsg}" x:Name="ButtonPreview"
IsChecked="{Binding ViewTool}" Style="{StaticResource PreviewTool_Button}">
Style="{StaticResource ViewTool_CheckBox}"/> <Image Source="{Binding sToolPreview_Image}" Stretch="Uniform"/>
</Button>
<Slider Grid.Row="1" <Slider Grid.Column="1"
x:Name="SliderV" x:Name="SliderV"
Value="{Binding SliderValue}" Value="{Binding SliderValue}"
IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}" IsEnabled="{Binding Slider_IsEnable}"
TickFrequency="{Binding SliderTick}" TickFrequency="{Binding SliderTick}"
Minimum="1" Minimum="1"
Maximum="{Binding SliderScale}" Maximum="{Binding SliderScale}"
IsSnapToTickEnabled="False"
Style="{StaticResource SliderValue_Slider}"/> Style="{StaticResource SliderValue_Slider}"/>
</Grid> </Grid>
@@ -1,5 +1,5 @@
Imports EgtWPFLib5 Imports EgtCAM5.MachiningParameterExpanderVM
Imports EgtWPFLib5.EgtFloating Imports EgtUILib
Public Class MachiningParameterExpanderV Public Class MachiningParameterExpanderV
@@ -9,9 +9,12 @@ Public Class MachiningParameterExpanderV
InitializeComponent() InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent(). ' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
Me.SliderV.Focusable = False
' Associo il gestore evento m_EventFocusOnSlider all'evento generato da FocusOnSlider ' Associo il gestore evento m_EventFocusOnSlider all'evento generato da FocusOnSlider
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnSlider, AddressOf FocusOnSlider AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnSlider, AddressOf FocusOnSlider
' Associo il gestore evento m_EventFocusOnButtonPreview all'evento generato da FocusOnButtonPreview
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnButtonPreview, AddressOf FocusOnButtonPreview
End Sub End Sub
''' <summary> ''' <summary>
@@ -21,4 +24,11 @@ Public Class MachiningParameterExpanderV
Me.SliderV.Focus() Me.SliderV.Focus()
End Sub End Sub
''' <summary>
''' Funzione che mette il focus sul bottone
''' </summary>
Friend Sub FocusOnButtonPreview()
Me.ButtonPreview.Focus()
End Sub
End Class End Class
@@ -1,6 +1,4 @@
Imports System.ComponentModel Imports EgtUILib
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Public Class MachiningParameterExpanderVM Public Class MachiningParameterExpanderVM
@@ -10,6 +8,32 @@ Public Class MachiningParameterExpanderVM
''' Evento che permette di mettere il focus sullo slider ''' Evento che permette di mettere il focus sullo slider
''' </summary> ''' </summary>
Friend Event m_EventFocusOnSlider() Friend Event m_EventFocusOnSlider()
''' <summary>
''' Evento che permette di mettere il focus sul bottone
''' </summary>
Friend Event m_EventFocusOnButtonPreview()
Private m_nPreviewMachiningTool As Integer
Public ReadOnly Property nPreviewMachiningTool As Integer
Get
Return m_nPreviewMachiningTool
End Get
End Property
Friend Sub SetPreviewMachiningTool(value As MCH_LOOK)
m_nPreviewMachiningTool = value
NotifyPropertyChanged(NameOf(nPreviewMachiningTool))
End Sub
Private m_sToolPreview_Image As String
Public ReadOnly Property sToolPreview_Image As String
Get
Return m_sToolPreview_Image
End Get
End Property
Friend Sub SetToolPreview_Image(value As String)
m_sToolPreview_Image = value
NotifyPropertyChanged(NameOf(sToolPreview_Image))
End Sub
Private WithEvents m_CurrOperation As MachiningTreeViewItem Private WithEvents m_CurrOperation As MachiningTreeViewItem
Public Property CurrOperation As MachiningTreeViewItem Public Property CurrOperation As MachiningTreeViewItem
@@ -54,29 +78,6 @@ Public Class MachiningParameterExpanderVM
End Get End Get
End Property End Property
Private m_bPreviewTool As Boolean = False
Public Property ViewTool As Boolean
Get
Return m_bPreviewTool
End Get
Set(value As Boolean)
If value Then
EgtPreparePreviewMachiningTool()
m_bPreviewTool = True
ResetSliderValue()
Else
EgtRemovePreviewMachiningTool()
m_bPreviewTool = False
ResetSliderValue()
End If
EgtDraw()
End Set
End Property
Friend Sub SetViewTool(value As Boolean)
ViewTool = value
NotifyPropertyChanged("ViewTool")
End Sub
' Slider per muovere l'utensile in aggiunta ai pulsanti indietro e avanti ' Slider per muovere l'utensile in aggiunta ai pulsanti indietro e avanti
Private m_SliderScale As Integer = 100 Private m_SliderScale As Integer = 100
Public ReadOnly Property SliderScale As Integer Public ReadOnly Property SliderScale As Integer
@@ -85,15 +86,15 @@ Public Class MachiningParameterExpanderVM
End Get End Get
End Property End Property
Friend Sub SetSliderScale(value As Integer) Friend Sub SetSliderScale(value As Integer)
m_SliderScale = Math.Max( value, 1) m_SliderScale = Math.Max(value, 1)
If m_SliderScale <= 10 Then If m_SliderScale <= 10 Then
m_SliderTick = 1 m_SliderTick = 1
Else Else
m_SliderTick = CInt( m_SliderScale / 10) m_SliderTick = CInt(m_SliderScale / 10)
End If End If
NotifyPropertyChanged( NameOf(SliderScale)) NotifyPropertyChanged(NameOf(SliderScale))
NotifyPropertyChanged( NameOf(SliderTick)) NotifyPropertyChanged(NameOf(SliderTick))
End Sub End Sub
Private m_SliderTick As Integer = 10 Private m_SliderTick As Integer = 10
Public ReadOnly Property SliderTick As Integer Public ReadOnly Property SliderTick As Integer
@@ -109,7 +110,7 @@ Public Class MachiningParameterExpanderVM
Return m_SliderValue Return m_SliderValue
End Get End Get
Set(value As Integer) Set(value As Integer)
If m_bPreviewTool Then If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, value - m_SliderValue) Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, value - m_SliderValue)
If nId <> GDB_ID.NULL Then m_nPtEntId = nId If nId <> GDB_ID.NULL Then m_nPtEntId = nId
EgtDraw() EgtDraw()
@@ -118,7 +119,7 @@ Public Class MachiningParameterExpanderVM
End Set End Set
End Property End Property
Friend Sub ResetSliderValue() Friend Sub ResetSliderValue()
If m_bPreviewTool Then If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER) m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
Else Else
m_nPtEntId = GDB_ID.NULL m_nPtEntId = GDB_ID.NULL
@@ -127,8 +128,9 @@ Public Class MachiningParameterExpanderVM
NotifyPropertyChanged(NameOf(SliderValue)) NotifyPropertyChanged(NameOf(SliderValue))
End Sub End Sub
Friend Sub SetSliderValue(value As Integer) Friend Sub SetSliderValue(value As Integer)
If m_nPreviewMachiningTool = MCH_LOOK.NONE Then Return
Dim nOldSliderValue As Integer = m_SliderValue Dim nOldSliderValue As Integer = m_SliderValue
m_SliderValue = Math.Min( Math.Max( m_SliderValue + value, 1), m_SliderScale) m_SliderValue = Math.Min(Math.Max(m_SliderValue + value, 1), m_SliderScale)
Dim nStep As Integer = m_SliderValue - nOldSliderValue Dim nStep As Integer = m_SliderValue - nOldSliderValue
If nStep = 0 Then Return If nStep = 0 Then Return
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, nStep) Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, nStep)
@@ -137,6 +139,17 @@ Public Class MachiningParameterExpanderVM
NotifyPropertyChanged(NameOf(SliderValue)) NotifyPropertyChanged(NameOf(SliderValue))
End Sub End Sub
Private m_Slider_IsEnable As Boolean
Public ReadOnly Property Slider_IsEnable As Boolean
Get
Return m_Slider_IsEnable
End Get
End Property
Friend Sub SetSlider_IsEnable(value As Boolean)
m_Slider_IsEnable = value
NotifyPropertyChanged(NameOf(Slider_IsEnable))
End Sub
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
Dim WoodMillParamExpanderV As WoodMillingParameterExpanderV Dim WoodMillParamExpanderV As WoodMillingParameterExpanderV
@@ -193,7 +206,7 @@ Public Class MachiningParameterExpanderVM
Select Case nType Select Case nType
Case MCH_OY.DRILLING Case MCH_OY.DRILLING
If MatType = MaterialType.STONE Then If MatType = MaterialType.STONE5 Then
If IsNothing(StoneDrillParamExpanderV) Then StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV If IsNothing(StoneDrillParamExpanderV) Then StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
StoneDrillParamExpanderV.DataContext = m_CurrOperation StoneDrillParamExpanderV.DataContext = m_CurrOperation
Return StoneDrillParamExpanderV Return StoneDrillParamExpanderV
@@ -203,7 +216,7 @@ Public Class MachiningParameterExpanderVM
Return WoodDrillParamExpanderV Return WoodDrillParamExpanderV
End If End If
Case MCH_OY.SAWING Case MCH_OY.SAWING
If MatType = MaterialType.STONE Then If MatType = MaterialType.STONE5 Then
If IsNothing(StoneSawParamExpanderV) Then StoneSawParamExpanderV = New StoneSawingParameterExpanderV If IsNothing(StoneSawParamExpanderV) Then StoneSawParamExpanderV = New StoneSawingParameterExpanderV
StoneSawParamExpanderV.DataContext = m_CurrOperation StoneSawParamExpanderV.DataContext = m_CurrOperation
Return StoneSawParamExpanderV Return StoneSawParamExpanderV
@@ -217,7 +230,7 @@ Public Class MachiningParameterExpanderVM
If IsNothing(BeamMillParamExpanderV) Then BeamMillParamExpanderV = New BeamMillingParameterExpanderV If IsNothing(BeamMillParamExpanderV) Then BeamMillParamExpanderV = New BeamMillingParameterExpanderV
BeamMillParamExpanderV.DataContext = m_CurrOperation BeamMillParamExpanderV.DataContext = m_CurrOperation
Return BeamMillParamExpanderV Return BeamMillParamExpanderV
ElseIf MatType = MaterialType.STONE Then ElseIf MatType = MaterialType.STONE5 Then
If IsNothing(StoneMillParamExpanderV) Then StoneMillParamExpanderV = New StoneMillingParameterExpanderV If IsNothing(StoneMillParamExpanderV) Then StoneMillParamExpanderV = New StoneMillingParameterExpanderV
StoneMillParamExpanderV.DataContext = m_CurrOperation StoneMillParamExpanderV.DataContext = m_CurrOperation
Return StoneMillParamExpanderV Return StoneMillParamExpanderV
@@ -235,7 +248,7 @@ Public Class MachiningParameterExpanderVM
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
Return StoneSawFinishParamExpanderV Return StoneSawFinishParamExpanderV
Case MCH_OY.POCKETING Case MCH_OY.POCKETING
If MatType = MaterialType.STONE Or MatType = MaterialType.STONE5 Then If MatType = MaterialType.STONE5 Then
' se macchina di tipo STONE ricavo il tipo di utensile ' se macchina di tipo STONE ricavo il tipo di utensile
Dim sMachiningToolName = String.Empty Dim sMachiningToolName = String.Empty
EgtMdbSetCurrMachining(sName) EgtMdbSetCurrMachining(sName)
@@ -319,9 +332,8 @@ Public Class MachiningParameterExpanderVM
#End Region ' Messages #End Region ' Messages
' Definizione comando ' Definizione comando
Private m_cmdNextStepTool As ICommand
Private m_cmdPrevStepTool As ICommand
Private m_cmdUpdateMachining As ICommand Private m_cmdUpdateMachining As ICommand
Private m_cmdPreviewMachiningTool As ICommand
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -342,6 +354,51 @@ Public Class MachiningParameterExpanderVM
RaiseEvent m_EventFocusOnSlider() RaiseEvent m_EventFocusOnSlider()
End Sub End Sub
''' <summary>
''' Funzione che attiva l'evento che mette il focus sul bottone
''' </summary>
Public Sub FocusButtonPreview()
RaiseEvent m_EventFocusOnButtonPreview()
End Sub
Friend Sub PreviewMachiningTool()
Select Case nPreviewMachiningTool
Case MCH_LOOK.NONE
SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
SetSlider_IsEnable(True)
Case MCH_LOOK.TAB_TOOL
SetPreviewMachiningTool(MCH_LOOK.TAB_HEAD)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Head.png")
SetSlider_IsEnable(True)
Case MCH_LOOK.TAB_HEAD
SetPreviewMachiningTool(MCH_LOOK.NONE)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Delete.png")
SetSlider_IsEnable(False)
End Select
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
EgtDraw()
End Sub
Friend Sub RevertPreviewMachiningTool()
Select Case nPreviewMachiningTool
Case MCH_LOOK.NONE
SetPreviewMachiningTool(MCH_LOOK.TAB_HEAD)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Head.png")
SetSlider_IsEnable(True)
Case MCH_LOOK.TAB_TOOL
SetPreviewMachiningTool(MCH_LOOK.NONE)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Delete.png")
SetSlider_IsEnable(False)
Case MCH_LOOK.TAB_HEAD
SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
SetSlider_IsEnable(True)
End Select
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
EgtDraw()
End Sub
#End Region ' Methods #End Region ' Methods
#Region "COMMANDS" #Region "COMMANDS"
@@ -382,28 +439,18 @@ Public Class MachiningParameterExpanderVM
' Aggiorno parametri di lavorazione ' Aggiorno parametri di lavorazione
m_CurrOperation.WriteOperationParam() m_CurrOperation.WriteOperationParam()
' Carico tutta la geometria selezionata in una lista ' Imposto geometria da lavorare (tutta quella selezionata)
Dim SelectedGeometry As New List(Of Integer) Dim vId(EgtGetSelectedObjCount() - 1) As Integer
Dim EntityIndex As Integer = EgtGetFirstSelectedObj() Dim vSub(EgtGetSelectedObjCount() - 1) As Integer
While EntityIndex <> GDB_ID.NULL Dim nInd As Integer = 0
SelectedGeometry.Add(EntityIndex) Dim EntId As Integer = EgtGetFirstSelectedObj()
EntityIndex = EgtGetNextSelectedObj() While EntId <> GDB_ID.NULL
vId(nInd) = EntId
SelData.GetSubFromId(EntId, vSub(nInd))
nInd += 1
EntId = EgtGetNextSelectedObj()
End While End While
' Gestione speciale per superfici ( si aggiunge l'identificazione della faccia) EgtSetMachiningGeometry(vId, vSub)
If SelectedGeometry.Count() > 0 AndAlso
(EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_MESH Or EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_FRGN) Then
' Aggiorno lista speciale con facce
SelData.VerifyIdSub()
' Imposto geometria
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllIdSub(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
' Gestione standard per altre entità (curve, testi, ...)
Else
' Imposto geometria
EgtSetMachiningGeometry(SelectedGeometry.ToArray)
End If
' Rigenero la lavorazione ' Rigenero la lavorazione
If Not EgtApplyMachining(bRecalc) Then If Not EgtApplyMachining(bRecalc) Then
@@ -427,8 +474,11 @@ Public Class MachiningParameterExpanderVM
End If End If
' Restart visualizzazione utensile ' Restart visualizzazione utensile
SetSliderScale( EgtGetPreviewMachiningToolStepCount()) EgtPreparePreviewMachiningTool()
SetViewTool(True) EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
SetSliderScale(EgtGetPreviewMachiningToolStepCount())
SetSlider_IsEnable(True)
ResetSliderValue()
IsModified(False) IsModified(False)
ErrorOnOperation(False) ErrorOnOperation(False)
EgtDraw() EgtDraw()
@@ -437,6 +487,23 @@ Public Class MachiningParameterExpanderVM
#End Region ' UpdateMachiningCommand #End Region ' UpdateMachiningCommand
#Region "PreviewMachiningTool_Command"
Public ReadOnly Property PreviewMachiningTool_Command As ICommand
Get
If m_cmdPreviewMachiningTool Is Nothing Then
m_cmdPreviewMachiningTool = New RelayCommand(AddressOf PreviewMachiningTool)
End If
Return m_cmdPreviewMachiningTool
End Get
End Property
Public Sub PreviewMachiningTool(ByVal param As Object)
PreviewMachiningTool()
End Sub
#End Region ' PreviewMachiningTool_Command
#End Region ' Commands #End Region ' Commands
Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified
@@ -124,10 +124,10 @@
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList, ParamCmBxList="{Binding Path=LeadLinkTypeList,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}" ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel> </StackPanel>
</Expander> </Expander>
@@ -1,7 +1,4 @@
Imports System.Collections.ObjectModel Imports EgtUILib
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Public Class OperationParametersExpanderVM Public Class OperationParametersExpanderVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -32,6 +29,7 @@ Public Class OperationParametersExpanderVM
' disattivo MTable e SpecialPanel se vado sulla modifica di una lavorazione ' disattivo MTable e SpecialPanel se vado sulla modifica di una lavorazione
Map.refDoorPanelVM.MTableIsEnabled(Not m_ParametersIsExpanded) Map.refDoorPanelVM.MTableIsEnabled(Not m_ParametersIsExpanded)
Map.refSpecialPanelVM.SpecialPanelIsEnabled(Not m_ParametersIsExpanded) Map.refSpecialPanelVM.SpecialPanelIsEnabled(Not m_ParametersIsExpanded)
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
End Set End Set
End Property End Property
@@ -181,7 +179,11 @@ Public Class OperationParametersExpanderVM
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing
End Select End Select
' Imposto visualizzazione utensile ' Imposto visualizzazione utensile
Map.refMachiningParameterExpanderVM.SetViewTool( True) Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
Map.refMachiningParameterExpanderVM.SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(True)
EgtPreparePreviewMachiningTool()
EgtDraw()
End If End If
OnPropertyChanged("ParametersIsExpanded") OnPropertyChanged("ParametersIsExpanded")
Return True Return True
@@ -211,7 +213,10 @@ Public Class OperationParametersExpanderVM
EgtDraw() EgtDraw()
Else Else
' Nascondo visualizzazione utensile ' Nascondo visualizzazione utensile
Map.refMachiningParameterExpanderVM.SetViewTool( False) Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.NONE)
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(False)
Map.refMachiningParameterExpanderVM.ResetSliderValue()
EgtRemovePreviewMachiningTool()
End If End If
ParametersExpanderName = String.Empty ParametersExpanderName = String.Empty
' Disabilito la selezione delle lavorazioni ' Disabilito la selezione delle lavorazioni
@@ -1,177 +1,176 @@
<UserControl x:Class="OperationsListExpanderV" <UserControl x:Class="OperationsListExpanderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"> xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<StackPanel Name="OperationsListExpanderViewStackPanel" IsEnabled="{Binding OpersListViewIsEnabled}"> <Expander Header="{Binding OperationListHeader}"
IsEnabled="{Binding OpersListViewIsEnabled}"
IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
Style="{StaticResource ExpanderStyle}">
<Expander.InputBindings>
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
</Expander.InputBindings>
<Expander Header="{Binding OperationListHeader}" IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander" <Grid>
Style="{StaticResource ExpanderStyle}"> <Grid.RowDefinitions>
<Expander.InputBindings> <RowDefinition Height="Auto"/>
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/> <RowDefinition Height="1*"/>
</Expander.InputBindings> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel> <UniformGrid Rows="1">
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/>
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/>
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/>
</UniformGrid>
<UniformGrid Rows="1"> <ListBox Grid.Row="1"
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/> IsSynchronizedWithCurrentItem="False"
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/> ItemsSource="{Binding OperationList}"
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/> x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended">
</UniformGrid> <ListBox.Resources>
<ListBox IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding OperationList}" <DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
Height="200" x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended"> <DataTemplate.Resources>
<ListBox.Resources> <Style x:Key="LayoutRoot" TargetType="Grid"/>
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}"> </DataTemplate.Resources>
<DataTemplate.Resources> <Border Background="Transparent">
<Style x:Key="LayoutRoot" TargetType="Grid"> <Border.InputBindings>
<!--<Style.Triggers> <MouseBinding MouseAction="LeftDoubleClick"
--><!--these are the triggers that make the code cursor jump from box 1 to box 2 to box 3.--><!--
<DataTrigger Binding="{Binding ElementName=Box, Path=Visibility}" Value="Visible">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=Box}"/>
</DataTrigger>
</Style.Triggers>-->
</Style>
</DataTemplate.Resources>
<Border Background="Transparent">
<Border.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick"
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}" Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
CommandParameter="{Binding Id}"/> CommandParameter="{Binding Id}"/>
</Border.InputBindings> </Border.InputBindings>
<Grid Style="{StaticResource LayoutRoot}"> <Grid Style="{StaticResource LayoutRoot}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/> <CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/> <Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="1" <ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="1"
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/> IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="2" Text="{Binding Name}" <TextBlock Grid.Column="2" Text="{Binding Name}"
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/> Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
<TextBox Grid.Column="2" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}" <TextBox Grid.Column="2" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
Width="150" Width="150"
x:Name="Box" x:Name="Box"
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0"> Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
<!--IsVisibleChanged="MachiningOpListBoxItem_IsVisibleChanged" <!--IsVisibleChanged="MachiningOpListBoxItem_IsVisibleChanged"
LostKeyboardFocus="MachiningOpListBoxItem_LostKeyboardFocus">--> LostKeyboardFocus="MachiningOpListBoxItem_LostKeyboardFocus">-->
<TextBox.InputBindings> <TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/> <KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/>
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/> <KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
</TextBox.InputBindings> </TextBox.InputBindings>
</TextBox> </TextBox>
<TextBlock Grid.Column="3" Text="{Binding Info}"/> <TextBlock Grid.Column="3" Text="{Binding Info}"/>
</Grid> </Grid>
</Border> </Border>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}"> <DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}">
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}"> <Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}">
<Border.InputBindings> <Border.InputBindings>
<MouseBinding MouseAction="LeftDoubleClick" <MouseBinding MouseAction="LeftDoubleClick"
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}" Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
CommandParameter="{Binding Id}"/> CommandParameter="{Binding Id}"/>
</Border.InputBindings> </Border.InputBindings>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/> <CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
<CheckBox IsChecked="{Binding OnOffAll}" VerticalAlignment="Center" Margin="0,0,5,0"/> <CheckBox IsChecked="{Binding OnOffAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
<!--<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" <!--<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}"
IsChecked="{Binding OnOffAll}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>--> IsChecked="{Binding OnOffAll}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>-->
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/> <Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
<TextBlock Text="{Binding Name}" Foreground="White" <TextBlock Text="{Binding Name}" Foreground="White"
FontSize="15" FontWeight="SemiBold"/> FontSize="15" FontWeight="SemiBold"/>
</StackPanel> </StackPanel>
</Border> </Border>
</DataTemplate> </DataTemplate>
</ListBox.Resources> </ListBox.Resources>
<ListBox.ItemsPanel> <!--<ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/> <StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ListBox.ItemsPanel> </ListBox.ItemsPanel>-->
<!--<Interactivity:Interaction.Triggers> <!--<Interactivity:Interaction.Triggers>
<Interactivity:EventTrigger EventName="MouseDoubleClick"> <Interactivity:EventTrigger EventName="MouseDoubleClick">
<Interactivity:InvokeCommandAction Command="{Binding OperationListDoubleClickCommand}"/> <Interactivity:InvokeCommandAction Command="{Binding OperationListDoubleClickCommand}"/>
</Interactivity:EventTrigger> </Interactivity:EventTrigger>
</Interactivity:Interaction.Triggers>--> </Interactivity:Interaction.Triggers>-->
<!--<Interactivity:Interaction.Behaviors> <!--<Interactivity:Interaction.Behaviors>
<EgtCAM5:ScrollIntoViewForListBox/> <EgtCAM5:ScrollIntoViewForListBox/>
</Interactivity:Interaction.Behaviors>--> </Interactivity:Interaction.Behaviors>-->
<ListBox.InputBindings> <ListBox.InputBindings>
<KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/> <KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/>
</ListBox.InputBindings> </ListBox.InputBindings>
<ListBox.ItemContainerStyle> <ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem"> <Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="IsSelected" Value="{Binding IsSelected}" /> <Setter Property="IsSelected" Value="{Binding IsSelected}" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}"> <ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<MultiTrigger> <MultiTrigger>
<MultiTrigger.Conditions> <MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="False"/> <Condition Property="Selector.IsSelectionActive" Value="False"/>
<Condition Property="IsSelected" Value="True"/> <Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions> </MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/> <Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/> <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
</MultiTrigger> </MultiTrigger>
<MultiTrigger> <MultiTrigger>
<MultiTrigger.Conditions> <MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="True"/> <Condition Property="Selector.IsSelectionActive" Value="True"/>
<Condition Property="IsSelected" Value="True"/> <Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions> </MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/> <Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/> <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
</MultiTrigger> </MultiTrigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
</ListBox.ItemContainerStyle> </ListBox.ItemContainerStyle>
<ListBox.ContextMenu> <ListBox.ContextMenu>
<ContextMenu> <ContextMenu>
<MenuItem Header="{Binding DuplicateMachMsg}" <MenuItem Header="{Binding DuplicateMachMsg}"
Command="{Binding DuplicateMachCommand}" Command="{Binding DuplicateMachCommand}"
IsEnabled="{Binding DuplicateCmd_IsEnabled}"> IsEnabled="{Binding DuplicateCmd_IsEnabled}">
</MenuItem> </MenuItem>
<MenuItem Header="{Binding MachToDbMsg}" <MenuItem Header="{Binding MachToDbMsg}"
Command="{Binding MachToDbCommand}" Command="{Binding MachToDbCommand}"
IsEnabled="{Binding MachToDb_IsEnabled}"> IsEnabled="{Binding MachToDb_IsEnabled}">
</MenuItem> </MenuItem>
<MenuItem Header="{Binding RenameMsg}" <MenuItem Header="{Binding RenameMsg}"
Command="{Binding RenameCommand}" Command="{Binding RenameCommand}"
IsEnabled="{Binding Rename_IsEnabled}"> IsEnabled="{Binding Rename_IsEnabled}">
</MenuItem> </MenuItem>
</ContextMenu> </ContextMenu>
</ListBox.ContextMenu> </ListBox.ContextMenu>
<ListBox.Style> <ListBox.Style>
<Style TargetType="ListBox"> <Style TargetType="ListBox">
<EventSetter Event="SelectionChanged" Handler="ItemsControl_SelectionChanged"/> <EventSetter Event="SelectionChanged" Handler="ItemsControl_SelectionChanged"/>
</Style> </Style>
</ListBox.Style> </ListBox.Style>
</ListBox> </ListBox>
<UniformGrid Rows="1"> <UniformGrid Grid.Row="2" Rows="1">
<Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30" IsEnabled="{Binding MoveUp_IsEnabled}" /> <Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30" IsEnabled="{Binding MoveUp_IsEnabled}" />
<Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30" IsEnabled="{Binding MoveDown_IsEnabled}"/> <Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30" IsEnabled="{Binding MoveDown_IsEnabled}"/>
<Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/> <Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/>
<Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/> <Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/>
</UniformGrid> </UniformGrid>
</StackPanel> </Grid>
</Expander> </Expander>
</StackPanel>
</UserControl> </UserControl>
@@ -85,6 +85,7 @@ Public Class OperationsListExpanderVM
If value <> m_ListIsExpanded Then If value <> m_ListIsExpanded Then
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value) Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value)
SetStatusOnLamp() SetStatusOnLamp()
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(value)
End If End If
End Set End Set
End Property End Property
@@ -469,8 +470,11 @@ Public Class OperationsListExpanderVM
If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount()) Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue() Map.refMachiningParameterExpanderVM.ResetSliderValue()
EgtDraw()
End If End If
End If End If
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
End Sub End Sub
#End Region ' OperationListDoubleClickCommand #End Region ' OperationListDoubleClickCommand
@@ -1301,8 +1305,11 @@ Public Class OperationsListExpanderVM
' Annullo creazione nuova lavorazione ' Annullo creazione nuova lavorazione
If m_NewMachining Then EndNewMachining(GDB_ID.NULL) If m_NewMachining Then EndNewMachining(GDB_ID.NULL)
' Disabilito visualizzazione utensile ' Disabilito visualizzazione utensile
If Not IsNothing(m_MachiningParameterExpander) Then If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
Map.refMachiningParameterExpanderVM.SetViewTool(False) Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.NONE)
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(False)
Map.refMachiningParameterExpanderVM.ResetSliderValue()
EgtRemovePreviewMachiningTool()
End If End If
' Deseleziono le operazioni correnti per eliminare il mark ' Deseleziono le operazioni correnti per eliminare il mark
For Each Operation In OperationList For Each Operation In OperationList
@@ -20,6 +20,7 @@ Public Class SimulationExpanderVM
Map.refOperationsListExpanderVM.StatusLampList.Clear() Map.refOperationsListExpanderVM.StatusLampList.Clear()
Dim tmpStatusLamp As New StatusLamp() Dim tmpStatusLamp As New StatusLamp()
Map.refOperationsListExpanderVM.StatusLampList = tmpStatusLamp.LoadStatusLamp() Map.refOperationsListExpanderVM.StatusLampList = tmpStatusLamp.LoadStatusLamp()
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
End If End If
End Set End Set
End Property End Property
@@ -448,19 +449,19 @@ Public Class SimulationExpanderVM
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
#End If #End If
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & sCncFile sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & Path.GetFileName(sCncFile)
Else Else
sCncFile = Path.ChangeExtension(sCurrFilePath, Nothing) sCncFile = Path.ChangeExtension(sCurrFilePath, Nothing)
Dim sExt As String = ".cnc"
EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath)
If IniFile.m_bMachiningGroup Then If IniFile.m_bMachiningGroup Then
Dim sMGrpName As String = String.Empty Dim sMGrpName As String = String.Empty
If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then
sCncFile &= "_" & sMGrpName sCncFile &= "_" & sMGrpName
sInfo &= "-" & sMGrpName sInfo &= "-" & sMGrpName
End If End If
sCncFile = Path.ChangeExtension(sCncFile, sExt)
End If End If
Dim sExt As String = ".cnc"
EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath)
sCncFile = Path.ChangeExtension(sCncFile, sExt)
End If End If
Return True Return True
End Function End Function
@@ -468,16 +469,16 @@ Public Class SimulationExpanderVM
Friend Sub SimulationExpander_Update_CncData( nFlag As Integer) Friend Sub SimulationExpander_Update_CncData( nFlag As Integer)
If Simulation_IsExpanded Then If Simulation_IsExpanded Then
ShowCncData() ShowCncData()
' Se fermo per Collisione rilevata da script Lua ' Se fermo per Collisione rilevata da script Lua o per altra richiesta
If nFlag = 11 Then If nFlag = 11 Or nFlag = 12 Then
' Imposto stato Pausa ' Imposto stato Pausa
SetSimulationStatus(MCH_SIM_ST.UI_PAUSE) SetSimulationStatus(MCH_SIM_ST.UI_PAUSE)
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause ' Aggiornamenti per bottone Play/Pause
SetShowPlay(True) SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage") NotifyPropertyChanged("PlayPauseImage")
' Dichiaro di non arrestarsi alla successiva notifica di collisione ' Se fermo per Collisione, dichiaro di non arrestarsi alla successiva notifica di collisione
m_bStopOnNextCollision = False If nFlag = 11 Then m_bStopOnNextCollision = False
End If End If
End If End If
End Sub End Sub
+21 -8
View File
@@ -1,24 +1,37 @@
<UserControl x:Class="MachiningOptionPanelV" <UserControl x:Class="MachiningOptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"> xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<StackPanel Name="ciao" Background="Transparent" Margin="0,0,3.5001,0" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}"> <Grid x:Name="MachiningGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid.RowDefinitions>
<RowDefinition MinHeight="100" Height="400" MaxHeight="800"
EgtCAM5:MachiningOptionPanelVM.IsExpanded="{Binding OperationsListRowIsExpanded}"
EgtCAM5:MachiningOptionPanelVM.TargetSplitter="{Binding ElementName=MachiningGridSplitter}"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--ContentPresenter that contains the OperationsListExpander--> <!--ContentPresenter that contains the OperationsListExpander-->
<ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/> <ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/>
<GridSplitter Name="MachiningGridSplitter" Style="{StaticResource General_GridSplitter}"/>
<!--ContentPresenter that contains the OperationParametersExpander--> <!--ContentPresenter that contains the OperationParametersExpander-->
<ContentPresenter Content="{Binding OperationParametersExpander,Mode=OneWay}"/> <ContentPresenter Grid.Row="1" Content="{Binding OperationParametersExpander,Mode=OneWay}"/>
<!--ContentPresenter that contains the MachiningsTreeExpander--> <!--ContentPresenter that contains the MachiningsTreeExpander-->
<ContentPresenter Content="{Binding MachiningsTreeExpander}"/> <ContentPresenter Grid.Row="2" Content="{Binding MachiningsTreeExpander}"/>
<!--ContentPresenter that contains the SimulationExpander--> <!--ContentPresenter that contains the SimulationExpander-->
<ContentPresenter Content="{Binding SimulationExpander}"/> <ContentPresenter Grid.Row="3" Content="{Binding SimulationExpander}"/>
<!--ContentPresenter that contains the EstimationsExpander--> <!--ContentPresenter that contains the EstimationsExpander-->
<ContentPresenter Content="{Binding EstimationsExpander}"/> <ContentPresenter Grid.Row="4" Content="{Binding EstimationsExpander}"/>
<Button Content="{Binding GenerateMsg}" Height="30" <Button Grid.Row="5"
Content="{Binding GenerateMsg}" Height="30"
IsEnabled="{Binding GenerateIsEnabled}" IsEnabled="{Binding GenerateIsEnabled}"
Command="{Binding GenerateCommand}"/> Command="{Binding GenerateCommand}"/>
</StackPanel> </Grid>
</UserControl> </UserControl>
+20 -2
View File
@@ -1,7 +1,25 @@
Public Class MachiningOptionPanelV Public Class MachiningOptionPanelV
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded Sub New()
Dim x = ciao.MaxHeight
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Map.SetRefMachiningOptionPanelV(Me)
If Not IsActivePlugin() Then
AddHandler MachiningGrid.Loaded,
Sub()
DynamicGridModule.RestoreMachiningGridLayout(MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
MachiningGrid.UpdateLayout()
End Sub
AddHandler MachiningGridSplitter.DragCompleted,
Sub()
DynamicGridModule.SaveMachiningGridLayout(MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
End Sub
End If
End Sub End Sub
End Class End Class
+75
View File
@@ -1,4 +1,5 @@
Imports EgtUILib Imports EgtUILib
Imports System.IO
Public Class MachiningOptionPanelVM Public Class MachiningOptionPanelVM
Inherits ViewModelBase Inherits ViewModelBase
@@ -132,6 +133,17 @@ Public Class MachiningOptionPanelVM
End Get End Get
End Property End Property
Private m_OperationsListRowIsExpanded As Boolean = True
Public ReadOnly Property OperationsListRowIsExpanded As Boolean
Get
Return m_OperationsListRowIsExpanded
End Get
End Property
Friend Sub SetOperationsListRowIsExpanded(value As Boolean)
m_OperationsListRowIsExpanded = value
OnPropertyChanged("OperationsListRowIsExpanded")
End Sub
#Region "Messages" #Region "Messages"
Public ReadOnly Property GenerateMsg As String Public ReadOnly Property GenerateMsg As String
@@ -195,4 +207,67 @@ Public Class MachiningOptionPanelVM
#End Region ' COMMANDS #End Region ' COMMANDS
#Region "DEPENCY PROPERTY"
Public Shared ReadOnly IsExpandedProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"IsExpanded",
GetType(Boolean),
GetType(MachiningOptionPanelVM),
New PropertyMetadata(True, AddressOf OnIsExpandedChanged)
)
Public Shared Sub SetIsExpanded(element As DependencyObject, value As Boolean)
element.SetValue(IsExpandedProperty, value)
End Sub
Public Shared Function GetIsExpanded(element As DependencyObject) As Boolean
Return CType(element.GetValue(IsExpandedProperty), Boolean)
End Function
Public Shared Function GetTargetSplitter(d As DependencyObject) As GridSplitter
Return CType(d.GetValue(TargetSplitterProperty), GridSplitter)
End Function
Public Shared Sub SetTargetSplitter(d As DependencyObject, value As GridSplitter)
d.SetValue(TargetSplitterProperty, value)
End Sub
Public Shared ReadOnly TargetSplitterProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"TargetSplitter",
GetType(GridSplitter),
GetType(MachiningOptionPanelVM),
New PropertyMetadata(Nothing)
)
Private Shared Sub OnIsExpandedChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim row As RowDefinition = TryCast(d, RowDefinition)
If IsNothing(row) Then Return
Dim isExpanded As Boolean = CBool(e.NewValue)
Dim splitter = MachiningOptionPanelVM.GetTargetSplitter(row)
If Not IsNothing(splitter) Then
splitter.IsEnabled = isExpanded
splitter.Visibility = If(isExpanded, Visibility.Visible, Visibility.Collapsed)
End If
If Not isExpanded Then
row.ClearValue(RowDefinition.HeightProperty)
row.Height = New GridLength(1, GridUnitType.Auto)
row.MinHeight = 0
Else
If File.Exists(Map.refMainWindowVM.DimensionDir) Then
DynamicGridModule.RestoreMachiningGridLayout(Map.refMachiningOptionPanelV.MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
Map.refMachiningOptionPanelV.MachiningGrid.UpdateLayout()
Else
row.Height = New GridLength(350)
End If
End If
End Sub
#End Region ' Depency Property
End Class End Class
+1 -1
View File
@@ -1,6 +1,6 @@
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV" <EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
TitleBarOrientation="Vertical" TitleBarOrientation="Vertical"
Visibility="{Binding Panel_Visibility}"> Visibility="{Binding Panel_Visibility}">
+1
View File
@@ -60,6 +60,7 @@ Public Class OptionPanelVM
Map.refSimulationExpanderVM.Simulation_IsExpanded = False Map.refSimulationExpanderVM.Simulation_IsExpanded = False
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
End If End If
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SetManageLayerIsExpanded(True)
NotifyPropertyChanged("ModePanel") NotifyPropertyChanged("ModePanel")
End Sub End Sub
+57 -6
View File
@@ -12,8 +12,10 @@ Friend Module OptionModule
Friend m_GridColor As Color3d Friend m_GridColor As Color3d
' Flag per visualizzazione spessa delle linee ' Flag per visualizzazione spessa delle linee
Friend m_bThickLine As Boolean Friend m_bThickLine As Boolean
' Flag per visualizzazione smussata delle superfici ' Qualità di visualizzazione delle superfici
Friend m_bSmoothTriMesh As Boolean Friend m_ShowSurfQuality As SceneSurfQualityOpt
' Tipo di visualizzazione delle Zmap
Friend m_nShowZmapType As Integer
' Colore di default in disegno ' Colore di default in disegno
Friend m_DefMaterialColor As Color3d Friend m_DefMaterialColor As Color3d
@@ -60,7 +62,8 @@ Friend Module OptionModule
Friend m_SelGeomWaterJetting As SceneSelModeOpt Friend m_SelGeomWaterJetting As SceneSelModeOpt
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
Friend m_SelGeomProbing As SceneSelModeOpt Friend m_SelGeomProbing As SceneSelModeOpt
Friend m_SelVMillQuality As VMillSelTypeOpt ' Qualità di calcolo del virtual milling
Friend m_VMillQuality As VMillSelTypeOpt
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata ' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
Friend m_bNewMachiningIsLastOne As Boolean Friend m_bNewMachiningIsLastOne As Boolean
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione ' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
@@ -71,6 +74,9 @@ Friend Module OptionModule
Friend m_bBeamOn As Boolean Friend m_bBeamOn As Boolean
Friend m_bWallOn As Boolean Friend m_bWallOn As Boolean
Friend m_bDoorsOn As Boolean Friend m_bDoorsOn As Boolean
Friend m_bWindowOn As Boolean
Friend m_bTrimmingOn As Boolean
Friend m_bReversePostOn As Boolean
Friend m_bGunstockOn As Boolean Friend m_bGunstockOn As Boolean
' inizializzazione lettura variabili ad inizio programma ' inizializzazione lettura variabili ad inizio programma
@@ -111,13 +117,24 @@ Friend Module OptionModule
' Inizializzo flag linee ingrossate ' Inizializzo flag linee ingrossate
m_bThickLine = (GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1) m_bThickLine = (GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1)
' Inizializzo flag visualizzazione smussata delle superfici ' Inizializzo flag visualizzazione smussata delle superfici
m_bSmoothTriMesh = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0) Dim nSSQ As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWSURFQUALITY, 0)
m_ShowSurfQuality = DirectCast( Math.Min( Math.Max( nSSQ, -2), 2), SceneSurfQualityOpt)
' Inizializzo tipo di visualizzazione Zmap
m_nShowZmapType = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 9)
' Inizio colore di default in disegno ' Inizio colore di default in disegno
Dim DefColor As New Color3d(0, 0, 0) Dim DefColor As New Color3d(0, 0, 0)
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor) GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
m_DefMaterialColor = DefColor m_DefMaterialColor = DefColor
' Inizializzo tolleranza geometrica ' Inizializzo tolleranza geometrica
m_dGeometryTolerance = GetPrivateProfileDouble(S_GEOMDB, K_SURFTMTOLER, 0.05) m_dGeometryTolerance = GetPrivateProfileDouble(S_GEOMDB, K_SURFTMTOLER, 0.05)
' Inizializzo stile corrente delle quotature
m_dExtLineLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
m_dArrowLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
m_dTextDist = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
m_nLenIsMM = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
m_nDecDigit = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
m_sFont = "" : GetPrivateProfileStringUtf8(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", m_sFont)
m_dTextHeight = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
' Inizializzo variabili per import ' Inizializzo variabili per import
m_dDxfScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1) m_dDxfScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
m_dStlScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1) m_dStlScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
@@ -157,9 +174,10 @@ Friend Module OptionModule
m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt)) m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMPROBING, -1) Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMPROBING, -1)
m_SelGeomProbing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt)) m_SelGeomProbing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELVMILLQUALITY, 0)
m_SelVMillQuality = If(Temp < -2 Or Temp > 2, VMillSelTypeOpt.HIGHER, DirectCast(Temp, VMillSelTypeOpt))
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
' Inizializzo qualità di virtual milling
Temp = GetPrivateProfileInt(S_MACH, K_VMILLQUALITY, 0)
m_VMillQuality = DirectCast(Math.Min( Math.Max( Temp, -2), 2), VMillSelTypeOpt)
' Inizializzo variabile che indica posizione nuova operazione di lavorazione ' Inizializzo variabile che indica posizione nuova operazione di lavorazione
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0) m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
' Inizializzo variabile che indica se usare script di disposizione ' Inizializzo variabile che indica se usare script di disposizione
@@ -169,9 +187,42 @@ Friend Module OptionModule
m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0) m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0) m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0) m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
m_bWindowOn = (GetPrivateProfileInt(S_WINDOW, K_WINDOWENABLE, 0) <> 0)
m_bTrimmingOn = (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
m_bReversePostOn = (GetPrivateProfileInt(S_REVERSEPOST, K_REVERSEPOSTENABLE, 0) <> 0)
m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0) m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
End Sub End Sub
' restituisco spessore linee
Friend Function GetLineWidth() As Integer
Return If( m_bThickLine, 2, 1)
End Function
' imposto stato visualizzazione superfici
Friend Sub SetShowSurfQuality( bRedraw As Boolean)
Dim bSmoothTriMesh As Boolean = True
Dim dSrfBezShowTol As Double = 0.2
Select m_ShowSurfQuality
Case SceneSurfQualityOpt.LOWER
bSmoothTriMesh = False
dSrfBezShowTol = 4
Case SceneSurfQualityOpt.LOW
bSmoothTriMesh = False
dSrfBezShowTol = 1
Case SceneSurfQualityOpt.STANDARD
bSmoothTriMesh = True
dSrfBezShowTol = 0.2
Case SceneSurfQualityOpt.HIGH
bSmoothTriMesh = True
dSrfBezShowTol = 0.05
Case SceneSurfQualityOpt.HIGHER
bSmoothTriMesh = True
dSrfBezShowTol = 0.01
End Select
EgtSetShowTriaAdv(bSmoothTriMesh, false)
EgtSetShowSurfBezierTol(dSrfBezShowTol, bRedraw)
End Sub
End Module End Module
' Classe che identifica una lingua del programma con nome e path del file dei messaggi ' Classe che identifica una lingua del programma con nome e path del file dei messaggi
+67 -20
View File
@@ -14,6 +14,7 @@
<EgtWPFLib5:EgtCustomWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<local:GeomTypeConverter x:Key="GeomTypeConverter"/> <local:GeomTypeConverter x:Key="GeomTypeConverter"/>
<local:SceneSurfQualityOptConverter x:Key="SceneSurfQualityOptConverter"/>
<local:VMillTypeConverter x:Key="VMillTypeConverter"/> <local:VMillTypeConverter x:Key="VMillTypeConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources> </EgtWPFLib5:EgtCustomWindow.Resources>
@@ -65,10 +66,17 @@
Grid.Row="0" Margin="0,5,0,5"/> Grid.Row="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding ThickLine}" <CheckBox IsChecked="{Binding ThickLine}"
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/> Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SmoothTriMeshMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding SceneSurfQualityMsg}" VerticalAlignment="Center"
Grid.Row="1" Margin="0,5,0,5"/> Grid.Row="1" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SmoothTriMesh}" <ComboBox ItemsSource="{Binding SceneSurfQualityOptList, Mode=OneWay}"
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/> SelectedItem="{Binding SelectedSceneSurfQualityOpt}"
Grid.Column="1" Grid.Row="1" Height="25" Margin="0,5,0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource SceneSurfQualityOptConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid> </Grid>
<UniformGrid Columns="2" <UniformGrid Columns="2"
Margin="0,0,0,5"> Margin="0,0,0,5">
@@ -77,7 +85,31 @@
SelectedItem="{Binding SelectedTextFont}" Height="25" SelectedItem="{Binding SelectedTextFont}" Height="25"
Margin="10,5,0,0"/> Margin="10,5,0,0"/>
</UniformGrid> </UniformGrid>
<Grid Margin="5,5,5,5"> <GroupBox Header="ShowZmap"
Visibility="{Binding ShowZmapVisibility}"
Margin="0,0,0,5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding ShowZmapSurf}"
Content="Surfaces" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="0" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapLines}"
Content="Lines" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="1" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapNormals}"
Content="Normals" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="2" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapBiColor}"
Content="BiColor" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="3" Margin="5,5,10,5" VerticalAlignment="Center"/>
</Grid>
</GroupBox>
<Grid Margin="5,100,5,5">
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/> <Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
@@ -374,7 +406,7 @@
<UniformGrid Columns="2" Grid.ColumnSpan="2" Margin="0,5,0,0"> <UniformGrid Columns="2" Grid.ColumnSpan="2" Margin="0,5,0,0">
<TextBlock Text="{Binding VMillQualityMsg}" VerticalAlignment="Center"/> <TextBlock Text="{Binding VMillQualityMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding VMillTypeList, Mode=OneWay}" <ComboBox ItemsSource="{Binding VMillTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedVMillTypeType}" Height="25"> SelectedItem="{Binding SelectedVMillQualityType}" Height="25">
<ComboBox.ItemTemplate> <ComboBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource VMillTypeConverter}}"/> <TextBlock Text="{Binding Converter={StaticResource VMillTypeConverter}}"/>
@@ -413,36 +445,51 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding SpecialMsg}"
Grid.Row="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}"
Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding BeamMsg}" <TextBlock Text="{Binding BeamMsg}"
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding BeamOn}" IsEnabled="{Binding BeamEnabled}" <CheckBox IsChecked="{Binding BeamOn}" IsEnabled="{Binding BeamEnabled}"
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}" <Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}"
Command="{Binding UpdateBeam_Command}" Command="{Binding UpdateBeam_Command}"
Grid.Row="1" Grid.Column="2" Height="26"/> Grid.Row="0" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WallMsg}" <TextBlock Text="{Binding WallMsg}"
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}" <CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}" <Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}"
Command="{Binding UpdateWall_Command}" Command="{Binding UpdateWall_Command}"
Grid.Row="2" Grid.Column="2" Height="26"/> Grid.Row="1" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center"
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}" <CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}"
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}" <Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}"
Command="{Binding UpdateDoors_Command}" Command="{Binding UpdateDoors_Command}"
Grid.Row="3" Grid.Column="2" Height="26"/> Grid.Row="2" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding WindowMsg}" VerticalAlignment="Center"
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WindowOn}" IsEnabled="{Binding WindowEnabled}"
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding TrimmingMsg}" VerticalAlignment="Center"
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}" <CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}"
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center"
Grid.Row="5" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}"
Grid.Row="5" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
Grid.Row="6" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
Grid.Row="6" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SpecialMsg}"
Grid.Row="7" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}"
Grid.Row="7" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
</TabItem> </TabItem>
+197 -41
View File
@@ -34,6 +34,13 @@ Public Class OptionWindowVM
End Get End Get
End Property End Property
Private m_SceneSurfQualityOptList As ObservableCollection(Of SceneSurfQualityOpt) = New ObservableCollection(Of SceneSurfQualityOpt)({SceneSurfQualityOpt.LOWER, SceneSurfQualityOpt.LOW, SceneSurfQualityOpt.STANDARD, SceneSurfQualityOpt.HIGH, SceneSurfQualityOpt.HIGHER})
Public ReadOnly Property SceneSurfQualityOptList As ObservableCollection(Of SceneSurfQualityOpt)
Get
Return m_SceneSurfQualityOptList
End Get
End Property
Private m_FontList As New ObservableCollection(Of String) Private m_FontList As New ObservableCollection(Of String)
Public ReadOnly Property FontList As ObservableCollection(Of String) Public ReadOnly Property FontList As ObservableCollection(Of String)
Get Get
@@ -98,6 +105,18 @@ Public Class OptionWindowVM
End Set End Set
End Property End Property
Public Property SelectedSceneSurfQualityOpt As SceneSurfQualityOpt
Get
Return OptionModule.m_ShowSurfQuality
End Get
Set(value As SceneSurfQualityOpt)
If WritePrivateProfileString(S_SCENE, K_SHOWSURFQUALITY, CInt(value).ToString()) Then
OptionModule.m_ShowSurfQuality = value
OptionModule.SetShowSurfQuality( true)
End If
End Set
End Property
Public Property SelectedMillingGeomType As SceneSelModeOpt Public Property SelectedMillingGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomMilling Return OptionModule.m_SelGeomMilling
@@ -158,8 +177,7 @@ Public Class OptionWindowVM
End If End If
End Set End Set
End Property End Property
Public Property SelectedGenGeomType As SceneSelModeOpt
Public Property SelectedGenGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomGenMachining Return OptionModule.m_SelGeomGenMachining
End Get End Get
@@ -169,8 +187,7 @@ Public Class OptionWindowVM
End If End If
End Set End Set
End Property End Property
Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomSurfRoughing Return OptionModule.m_SelGeomSurfRoughing
End Get End Get
@@ -180,7 +197,6 @@ Public Class OptionWindowVM
End If End If
End Set End Set
End Property End Property
Public Property SelectedSurfFinishGeomType As SceneSelModeOpt Public Property SelectedSurfFinishGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomSurfFinishing Return OptionModule.m_SelGeomSurfFinishing
@@ -202,7 +218,6 @@ Public Class OptionWindowVM
' End If ' End If
' End Set ' End Set
'End Property 'End Property
Public Property SelectedFiveAxGeomType As SceneSelModeOpt Public Property SelectedFiveAxGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomFiveAxMilling Return OptionModule.m_SelGeomFiveAxMilling
@@ -213,7 +228,6 @@ Public Class OptionWindowVM
End If End If
End Set End Set
End Property End Property
Public Property SelectedProbingGeomType As SceneSelModeOpt Public Property SelectedProbingGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomProbing Return OptionModule.m_SelGeomProbing
@@ -225,13 +239,13 @@ Public Class OptionWindowVM
End Set End Set
End Property End Property
Public Property SelectedVMillTypeType As VMillSelTypeOpt Public Property SelectedVMillQualityType As VMillSelTypeOpt
Get Get
Return OptionModule.m_SelVMillQuality Return OptionModule.m_VMillQuality
End Get End Get
Set(value As VMillSelTypeOpt) Set(value As VMillSelTypeOpt)
If WritePrivateProfileString(S_MACH, K_SELVMILLQUALITY, CInt(value).ToString()) Then If WritePrivateProfileString(S_MACH, K_VMILLQUALITY, CInt(value).ToString()) Then
OptionModule.m_SelVMillQuality = value OptionModule.m_VMillQuality = value
End If End If
End Set End Set
End Property End Property
@@ -312,19 +326,10 @@ Public Class OptionWindowVM
End Get End Get
Set(value As Boolean) Set(value As Boolean)
OptionModule.m_bThickLine = value OptionModule.m_bThickLine = value
WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1")) Dim nThickLine As Integer = OptionModule.GetLineWidth()
EgtSetLineAttribs(If(value, 2, 1)) WritePrivateProfileString(S_SCENE, K_LINEWIDTH, nThickLine.ToString())
End Set EgtSetLineAttribs(nThickLine)
End Property EgtDraw()
Public Property SmoothTriMesh As Boolean
Get
Return OptionModule.m_bSmoothTriMesh
End Get
Set(value As Boolean)
OptionModule.m_bSmoothTriMesh = value
WritePrivateProfileString(S_SCENE, K_SHOWTRIAADV, If(value, "1", "0"))
EgtSetShowTriaAdv(value)
End Set End Set
End Property End Property
@@ -334,13 +339,68 @@ Public Class OptionWindowVM
End Get End Get
Set(value As String) Set(value As String)
OptionModule.m_sFontText = value OptionModule.m_sFontText = value
Dim sNfeDir As String = String.Empty EgtSetFont("", OptionModule.m_sFontText)
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
EgtSetFont(sNfeDir, OptionModule.m_sFontText)
WritePrivateProfileString(S_GEOMDB, K_DEFAULTFONT, OptionModule.m_sFontText) WritePrivateProfileString(S_GEOMDB, K_DEFAULTFONT, OptionModule.m_sFontText)
End Set End Set
End Property End Property
Public Property ShowZmapSurf As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 1) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 1)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 1)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapLines As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 2) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 2)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 2)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapNormals As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 4) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 4)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 4)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapBiColor As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 8) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 8)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 8)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property DxfScaleFactor As String Public Property DxfScaleFactor As String
Get Get
Return LenToString(OptionModule.m_dDxfScaleFactor, 5) Return LenToString(OptionModule.m_dDxfScaleFactor, 5)
@@ -813,6 +873,51 @@ Public Class OptionWindowVM
End Set End Set
End Property End Property
Public ReadOnly Property WindowEnabled As Boolean
Get
Return (IniFile.m_nKeyOptions And KEY_OPT.WINDOW) <> 0
End Get
End Property
Public Property WindowOn As Boolean
Get
Return OptionModule.m_bWindowOn
End Get
Set(value As Boolean)
OptionModule.m_bWindowOn = value
WritePrivateProfileString(S_WINDOW, K_WINDOWENABLE, If(value, "1", "0"))
End Set
End Property
Public ReadOnly Property TrimmingEnabled As Boolean
Get
Return (IniFile.m_nKeyOptions And KEY_OPT.TRIMMING) <> 0
End Get
End Property
Public Property TrimmingOn As Boolean
Get
Return OptionModule.m_bTrimmingOn
End Get
Set(value As Boolean)
OptionModule.m_bTrimmingOn = value
WritePrivateProfileString(S_TRIMMING, K_TRIMMINGENABLE, If(value, "1", "0"))
End Set
End Property
Public ReadOnly Property ReversePostEnabled As Boolean
Get
Return (IniFile.m_nKeyOptions And KEY_OPT.REVERSEPOST) <> 0
End Get
End Property
Public Property ReversePostOn As Boolean
Get
Return OptionModule.m_bReversePostOn
End Get
Set(value As Boolean)
OptionModule.m_bReversePostOn = value
WritePrivateProfileString(S_REVERSEPOST, K_REVERSEPOSTENABLE, If(value, "1", "0"))
End Set
End Property
Public ReadOnly Property GunstockEnabled As Boolean Public ReadOnly Property GunstockEnabled As Boolean
Get Get
Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0
@@ -886,9 +991,9 @@ Public Class OptionWindowVM
Return EgtMsg(6536) ' Linee spesse Return EgtMsg(6536) ' Linee spesse
End Get End Get
End Property End Property
Public ReadOnly Property SmoothTriMeshMsg As String Public ReadOnly Property SceneSurfQualityMsg As String
Get Get
Return EgtMsg(6518) ' Superfici smussate Return EgtMsg(6518) ' Qualità visualizzazione superfici
End Get End Get
End Property End Property
Public ReadOnly Property UpdateLicenceMsg As String Public ReadOnly Property UpdateLicenceMsg As String
@@ -1105,6 +1210,21 @@ Public Class OptionWindowVM
Return "Doors (" & Path.GetFileName( IniFile.m_sDoorsDirPath) & ")" Return "Doors (" & Path.GetFileName( IniFile.m_sDoorsDirPath) & ")"
End Get End Get
End Property End Property
Public ReadOnly Property WindowMsg As String
Get
Return "Window"
End Get
End Property
Public ReadOnly Property TrimmingMsg As String
Get
Return "Trimming"
End Get
End Property
Public ReadOnly Property ReversePostMsg As String
Get
Return "ReversePost"
End Get
End Property
Public ReadOnly Property GunstockMsg As String Public ReadOnly Property GunstockMsg As String
Get Get
Return "Gunstock" Return "Gunstock"
@@ -1161,6 +1281,17 @@ Public Class OptionWindowVM
#End Region #End Region
#Region "Visibility"
Public ReadOnly Property ShowZmapVisibility As Visibility
Get
Return If( (IniFile.m_nUserLevel > 5), Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#End Region
#Region "COMMANDS" #Region "COMMANDS"
#Region "TopSceneBackground" #Region "TopSceneBackground"
@@ -1978,21 +2109,21 @@ Public Class GeomTypeConverter
End Class End Class
Public Class VMillTypeConverter Public Class SceneSurfQualityOptConverter
Implements IValueConverter Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value) Select Case CInt(value)
Case VMillSelTypeOpt.LOWER Case SceneSurfQualityOpt.LOWER
Return EgtMsg(31215) Return EgtMsg(31215) ' Inferiore
Case VMillSelTypeOpt.LOW Case SceneSurfQualityOpt.LOW
Return EgtMsg(31216) Return EgtMsg(31216) ' Bassa
Case VMillSelTypeOpt.STANDARD Case SceneSurfQualityOpt.STANDARD
Return EgtMsg(31217) Return EgtMsg(31217) ' Media
Case VMillSelTypeOpt.HIGH Case SceneSurfQualityOpt.HIGH
Return EgtMsg(31218) Return EgtMsg(31218) ' Alta
Case VMillSelTypeOpt.HIGHER Case SceneSurfQualityOpt.HIGHER
Return EgtMsg(31219) Return EgtMsg(31219) ' Superiore
Case Else Case Else
Return "" Return ""
End Select End Select
@@ -2001,4 +2132,29 @@ Public Class VMillTypeConverter
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException() Throw New NotImplementedException()
End Function End Function
End Class End Class
Public Class VMillTypeConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value)
Case VMillSelTypeOpt.LOWER
Return EgtMsg(31215) ' Inferiore
Case VMillSelTypeOpt.LOW
Return EgtMsg(31216) ' Bassa
Case VMillSelTypeOpt.STANDARD
Return EgtMsg(31217) ' Media
Case VMillSelTypeOpt.HIGH
Return EgtMsg(31218) ' Alta
Case VMillSelTypeOpt.HIGHER
Return EgtMsg(31219) ' Superiore
Case Else
Return ""
End Select
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
+9 -9
View File
@@ -1,24 +1,24 @@
<UserControl x:Class="PopUpGridPanelV" <UserControl x:Class="PopUpGridPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel Background="Transparent" Orientation="Horizontal"> <StackPanel Background="#93D5F4" Orientation="Horizontal">
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="3,3,1,3">
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/CplaneInvert.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneInvert.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding CPlane3PCommand}" ToolTip="{Binding CPlane3PointsToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlane3PCommand}" ToolTip="{Binding CPlane3PointsToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/Cplane3POINTS.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/Cplane3POINTS.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding CPlanePerpObjCommand}" ToolTip="{Binding CPlanePerpCurveToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlanePerpObjCommand}" ToolTip="{Binding CPlanePerpCurveToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/CplanePERPCURVE.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplanePERPCURVE.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding CPlaneObjCommand}" ToolTip="{Binding CPlaneObjectToolTip}" Style="{StaticResource GridViewPanelButton}"> <Button Command="{Binding CPlaneObjCommand}" ToolTip="{Binding CPlaneObjectToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,3,3">
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
+9 -9
View File
@@ -1,24 +1,24 @@
<UserControl x:Class="PopUpViewPanelV" <UserControl x:Class="PopUpViewPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel Background="Transparent" Orientation="Horizontal"> <StackPanel Background="#93D5F4" Orientation="Horizontal">
<Button ToolTip="{Binding ZoomInToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomInCommand}"> <Button ToolTip="{Binding ZoomInToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomInCommand}" Margin="3,3,1,3">
<Image Source="/Resources/GridViewPanel/ZoomIn.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/ZoomIn.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ZoomOutToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomOutCommand}"> <Button ToolTip="{Binding ZoomOutToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomOutCommand}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/ZoomOut.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/ZoomOut.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}"> <Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/ZoomSel.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/ZoomSel.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}"> <Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/LookFromISO_NE.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/LookFromISO_NE.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding LookFromIso_NWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNWCommand}"> <Button ToolTip="{Binding LookFromIso_NWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNWCommand}" Margin="1,3,1,3">
<Image Source="/Resources/GridViewPanel/LookFromISO_NW.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/LookFromISO_NW.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="{Binding ViewToCPlaneToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ViewToCPlaneCommand}"> <Button ToolTip="{Binding ViewToCPlaneToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ViewToCPlaneCommand}" Margin="1,3,3,3">
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/> <Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
</Button> </Button>
</StackPanel> </StackPanel>
+1 -1
View File
@@ -13,7 +13,7 @@
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle> <ItemsControl.ItemContainerStyle>
<Style> <Style>
<Setter Property="DockPanel.Dock" Value="{Binding}" /> <Setter Property="DockPanel.Dock" Value="{Binding}"/>
</Style> </Style>
</ItemsControl.ItemContainerStyle> </ItemsControl.ItemContainerStyle>
-7
View File
@@ -11,13 +11,6 @@ Public Class ProjectV
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo riferimento a questa classe in Map ' Creo riferimento a questa classe in Map
Map.SetRefProjectV(Me) Map.SetRefProjectV(Me)
'SpecialPanel.Visibility = Visibility.Collapsed
'BeamPanel.Visibility = Visibility.Collapsed
'WallPanel.Visibility = Visibility.Collapsed
'DoorsPanel.Visibility = Visibility.Collapsed
'GunStockPanel.Visibility = Visibility.Collapsed
'PrintingPanel.Visibility = Visibility.Collapsed
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
End Sub End Sub
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
+140 -51
View File
@@ -1,8 +1,10 @@
Imports System.Windows.Forms.Integration Imports System.Globalization
Imports System.Windows.Interop
Imports System.IO Imports System.IO
Imports System.Globalization Imports System.Windows.Forms.Integration
Imports System.Windows.Interop
Imports System.Windows.Threading
Imports EgtUILib Imports EgtUILib
Imports EgtUILib.EgtInterface
Imports EgtWPFLib5 Imports EgtWPFLib5
Public Class ProjectVM Public Class ProjectVM
@@ -57,9 +59,15 @@ Public Class ProjectVM
End Get End Get
End Property End Property
Private m_DynamicGrid As New Grid()
Public ReadOnly Property DynamicGrid As Grid
Get
Return m_DynamicGrid
End Get
End Property
#End Region #End Region
#Region "EGTUILIB FIELDS" #Region "EGTUILIB FIELDS"
Private m_bCPlaneTypePos As Boolean Private m_bCPlaneTypePos As Boolean
@@ -79,6 +87,17 @@ Public Class ProjectVM
TMDbParamVisibility.bFirst = True TMDbParamVisibility.bFirst = True
' Inizializza i parametri della scena ' Inizializza i parametri della scena
'InitializeEgtProject() 'InitializeEgtProject()
Dim m_TopTrayV As New TopTrayV
Dim m_LeftTrayV As New LeftTrayV
Dim m_RightTrayV As New RightTrayV
Dim m_BottomTrayV As New BottomTrayV
Dim m_SceneContentControlV As New SceneContentControlV
DynamicGridModule.CreateDynamicGrid()
Dim gridSplitter As GridSplitter = DynamicGridModule.CreateGridSplitter()
' aggiungo componenti interfaccia ' aggiungo componenti interfaccia
Dim bPlugin As Boolean = False Dim bPlugin As Boolean = False
Dim PluginDirNameList() As String = {} Dim PluginDirNameList() As String = {}
@@ -105,12 +124,17 @@ Public Class ProjectVM
Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData") Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData")
If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then
For Each Element In ConfigurationData.ControlList For Each Element In ConfigurationData.ControlList
PopolateGridWithPlugIn(m_TopTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
Select Case Element.Name Select Case Element.Name
Case PLUGIN_RIGHT_TRAY Case PLUGIN_RIGHT_TRAY
m_PanelList.Add(New RightTrayV) 'm_PanelList.Add(New RightTrayV)
'aggiungo RightTrayV alla griglia
m_DynamicGrid.Children.Add(m_RightTrayV)
Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState) Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState)
Case PLUGIN_LEFT_TRAY Case PLUGIN_LEFT_TRAY
m_PanelList.Add(New LeftTrayV) 'm_PanelList.Add(New LeftTrayV)
' aggiungo LeftTrayV alla griglia
m_DynamicGrid.Children.Add(m_LeftTrayV)
Case Else Case Else
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element)) m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
End Select End Select
@@ -118,17 +142,43 @@ Public Class ProjectVM
End If End If
End If End If
Next Next
m_PanelList.Add(New BottomTrayV) 'm_PanelList.Add(New BottomTrayV)
m_PanelList.Add(New TopTrayV) 'm_PanelList.Add(New TopTrayV)
' aggiungo gridSplitter alla griglia
m_DynamicGrid.Children.Add(gridSplitter)
' aggiungo BottomTrayV alla griglia
m_DynamicGrid.Children.Add(m_BottomTrayV)
' aggiungo TopTrayV alla griglia
m_DynamicGrid.Children.Add(m_TopTrayV)
' nascondo tasti gestione progetto se attivo plugin ' nascondo tasti gestione progetto se attivo plugin
Map.refTopCommandBarVM.SetProjectManagerVisibility(False) Map.refTopCommandBarVM.SetProjectManagerVisibility(False)
Else Else
m_PanelList.Add(New TopTrayV) 'm_PanelList.Add(New TopTrayV)
m_PanelList.Add(New LeftTrayV) 'm_PanelList.Add(New LeftTrayV)
m_PanelList.Add(New RightTrayV) 'm_PanelList.Add(New RightTrayV)
m_PanelList.Add(New BottomTrayV) 'm_PanelList.Add(New BottomTrayV)
DynamicGridModule.PopulateGrid(m_TopTrayV, m_LeftTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
' aggiungo TopTrayV alla griglia
m_DynamicGrid.Children.Add(m_TopTrayV)
' aggiungo LeftTrayV alla griglia
m_DynamicGrid.Children.Add(m_LeftTrayV)
' aggiungo gridSplitter alla griglia
m_DynamicGrid.Children.Add(gridSplitter)
' aggiungo RightTrayV alla griglia
m_DynamicGrid.Children.Add(m_RightTrayV)
' aggiungo BottomTrayV alla griglia
m_DynamicGrid.Children.Add(m_BottomTrayV)
End If End If
m_PanelList.Add(New SceneContentControlV) 'm_PanelList.Add(New SceneContentControlV)
' aggiungo SceneContentControlV alla griglia
m_DynamicGrid.Children.Add(m_SceneContentControlV)
' Carico le dimensioni salvate su ini se presenti
AddHandler m_DynamicGrid.Loaded,
Sub()
DynamicGridModule.RestoreGridLayout(If(IsActivePlugin(), DynamicGridModule.PROJECT_EGTCAM5_PLUGIN, DynamicGridModule.PROJECT_EGTCAM5))
m_DynamicGrid.UpdateLayout()
End Sub
m_PanelList.Add(m_DynamicGrid)
End Sub End Sub
#End Region #End Region
@@ -212,6 +262,27 @@ Public Class ProjectVM
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
EgtOutLog(sOut) EgtOutLog(sOut)
End If End If
If IniFile.IsActiveWindow() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion(IniFile.m_sWindowDirPath, sVersion)
Dim sOut As String = "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveTrimming() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion(IniFile.m_sTrimmingDirPath, sVersion)
Dim sOut As String = "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveReversePost() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion(IniFile.m_sReversePostDirPath, sVersion)
Dim sOut As String = "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveGunStock() Then If IniFile.IsActiveGunStock() Then
bExtensions = True bExtensions = True
Dim sVersion As String = "---" Dim sVersion As String = "---"
@@ -294,19 +365,9 @@ Public Class ProjectVM
Private Sub PreInitializeScene() Private Sub PreInitializeScene()
' imposto colore di default ' imposto colore di default
Dim DefColor As New Color3d(0, 0, 0) m_ProjectScene.SetDefaultMaterial(OptionModule.m_DefMaterialColor)
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
m_ProjectScene.SetDefaultMaterial(DefColor)
' imposto colori sfondo ' imposto colori sfondo
Dim BackTopColor As New Color3d(192, 192, 192) m_ProjectScene.SetViewBackground(OptionModule.m_TopSceneBackground, OptionModule.m_BotSceneBackground)
GetPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
Dim BackBotColor As New Color3d(BackTopColor)
GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
m_ProjectScene.SetViewBackground(BackTopColor, BackBotColor)
' imposto spessore linee
Dim nLineWidth As Integer = 1
nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
m_ProjectScene.SetLineWidth(nLineWidth)
' imposto colori di evidenziazione ' imposto colori di evidenziazione
Dim MarkColor As New Color3d(255, 255, 0) Dim MarkColor As New Color3d(255, 255, 0)
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor) GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
@@ -370,27 +431,21 @@ Public Class ProjectVM
' modo di visualizzazione ' modo di visualizzazione
Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING) Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
Map.refShowPanelVM.ShowModeState(nShowMode) Map.refShowPanelVM.ShowModeState(nShowMode)
' imposto spessore curve
EgtSetLineAttribs(OptionModule.GetLineWidth())
' visualizzazione direzione curve ' visualizzazione direzione curve
Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0) Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0)
Map.refShowPanelVM.ShowCurveDir(nShowCurveDir) Map.refShowPanelVM.ShowCurveDir(nShowCurveDir)
' visualizzazione avanzata dei triangoli costituenti le superfici ' qualità di visualizzazione delle superfici
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0) OptionModule.SetShowSurfQuality(False)
EgtSetShowTriaAdv(bShowTriaAdv)
' tipo visualizzazione per Zmap ' tipo visualizzazione per Zmap
Dim nShowZmap As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1) EgtSetShowZmap(OptionModule.m_nShowZmapType, False)
EgtSetShowZmap(nShowZmap, False)
' dimensione lineare max in pixel delle textures ' dimensione lineare max in pixel delle textures
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096) Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
EgtSetTextureMaxLinPixels(nTxrMaxLinPix) EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
' stile corrente delle quotature ' stile corrente delle quotature
OptionModule.m_dExtLineLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5) EgtSetCurrDimensionStyle(OptionModule.m_dExtLineLen, OptionModule.m_dArrowLen, OptionModule.m_dTextDist,
OptionModule.m_dArrowLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5) OptionModule.m_nLenIsMM, OptionModule.m_nDecDigit, OptionModule.m_sFont, OptionModule.m_dTextHeight)
OptionModule.m_dTextDist = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
OptionModule.m_nLenIsMM = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
OptionModule.m_nDecDigit = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
OptionModule.m_sFont = "" : GetPrivateProfileStringUtf8(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", m_sFont)
OptionModule.m_dTextHeight = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
' lettura da ini della variabile che abilita i gruppi di lavorazione ' lettura da ini della variabile che abilita i gruppi di lavorazione
IniFile.m_bMachiningGroup = (GetPrivateProfileInt(S_MACH, K_MACHININGGROUP, 0) <> 0) IniFile.m_bMachiningGroup = (GetPrivateProfileInt(S_MACH, K_MACHININGGROUP, 0) <> 0)
Map.refTopCommandBarVM.DrawMode_IsChecked() Map.refTopCommandBarVM.DrawMode_IsChecked()
@@ -1129,7 +1184,7 @@ Public Class ProjectVM
EgtGetPlaneSnapPoint(e.Location, Vector3d.Z_AX, TableRef.z, ptCurr) EgtGetPlaneSnapPoint(e.Location, Vector3d.Z_AX, TableRef.z, ptCurr)
DispositionUtility.VtHookFinder(nFixtureId, ptCurr) DispositionUtility.VtHookFinder(nFixtureId, ptCurr)
Exit While Exit While
ElseIf DispositionUtility.VerifyTableAxis( nFixtureId) Then ElseIf DispositionUtility.VerifyTableAxis(nFixtureId) Then
m_SelType = DispositionUtility.SelType.BARS m_SelType = DispositionUtility.SelType.BARS
m_nIdToSel = nFixtureId m_nIdToSel = nFixtureId
' Drag possibile ' Drag possibile
@@ -1227,7 +1282,7 @@ Public Class ProjectVM
m_nIdToDesel = GDB_ID.NULL m_nIdToDesel = GDB_ID.NULL
EgtDraw() EgtDraw()
Return Return
' altrimenti verifico il tipo del primo oggetto selezionato ' altrimenti verifico il tipo del primo oggetto selezionato
Else Else
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj() Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
' se è un riferimento resetto lo stato di selezione ed esco ' se è un riferimento resetto lo stato di selezione ed esco
@@ -1326,18 +1381,29 @@ Public Class ProjectVM
ElseIf IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHINING And ElseIf IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHINING And
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then (EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast) If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
ElseIf Not Keyboard.IsKeyDown(Key.LeftShift) Then
m_Controller.MouseSelectedObj(nId, False)
If EgtIsSelectedObj(nId) Then
' Selezione layer in albero
Map.refManageLayerExpanderVM.UpdateObjInObjTreeNoMark(nId)
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(nId)
Map.refManageLayerExpanderVM.UpdateObjTree()
End If
EgtDraw()
Else Else
m_Controller.MouseSelectedObj(nId, bLast) m_Controller.MouseSelectedObj(nId, False)
If bLast Then
If EgtIsSelectedObj(nId) Then
' Selezione layer in albero
Map.refManageLayerExpanderVM.UpdateObjInObjTreeNoMark(nId)
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(nId)
Map.refManageLayerExpanderVM.UpdateObjTree()
End If
EgtDraw()
End If
End If End If
' Carico se presenti le dimensioni della griglia
Application.Current.Dispatcher.BeginInvoke(
Sub()
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
End Sub,
DispatcherPriority.Render)
End Sub
Private Sub OnMouseSelectedColor(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedColor
m_Controller.MouseSelectedColor(nId)
End Sub End Sub
Private Sub OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPart Private Sub OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPart
@@ -1409,6 +1475,11 @@ Public Class ProjectVM
Analyze.CreateAnalyzeGroup() Analyze.CreateAnalyzeGroup()
Analyze.CreateFacetNormal(nId, nFac) Analyze.CreateFacetNormal(nId, nFac)
Analyze.CreateFacetLoops(nId, nFac) Analyze.CreateFacetLoops(nId, nFac)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Analyze.CreateTriaLoop(nId, nSub)
End If
' Recupero i dati (in globale o griglia a seconda della impostazione) ' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d Dim ptC As Point3d
Dim vtN As Vector3d Dim vtN As Vector3d
@@ -1420,6 +1491,10 @@ Public Class ProjectVM
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" + " : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" + " N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2) " / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
sOut &= ", Triangle " + nSub.ToString()
End If
Map.refStatusBarVM.NotifyStatusOutput(sOut) Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If End If
' Se Regione, visualizzo dati parte toccata ' Se Regione, visualizzo dati parte toccata
@@ -1443,6 +1518,20 @@ Public Class ProjectVM
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2) " / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut) Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If End If
ElseIf EgtGetType(nId) = GDB_TY.SRF_BEZ Then
' Visualizzo il punto selezionato, la normale e le tangenti nelle direzioni dei parametri
Analyze.CreateAnalyzeGroup()
Dim dU As Double
Dim dV As Double
If Analyze.CreateSBzPointNormalAndTangents(nId, ptSel, dU, dV) Then
Dim sOut As String = "U = " + dU.ToString("F3") +
"; V = " + dV.ToString("F3")
Map.refStatusBarVM.NotifyStatusOutput(sOut)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Analyze.CreateSBzIsoParam(nId, dU, dV)
End If
End If
End If End If
' Aggiorno la visualizzazione ' Aggiorno la visualizzazione
EgtDraw() EgtDraw()
@@ -1564,7 +1653,7 @@ Public Class ProjectVM
nFlag = GetPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE) nFlag = GetPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
ElseIf nType = FT.BTL Or nType = FT.BTLX Then ElseIf nType = FT.BTL Or nType = FT.BTLX Then
nFlag = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE) nFlag = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
ElseIf nType = FT._3MF ElseIf nType = FT._3MF Then
nFlag = GetPrivateProfileInt(S_IMPORT, K_3MFFLAG, EI3_FL.NONE) nFlag = GetPrivateProfileInt(S_IMPORT, K_3MFFLAG, EI3_FL.NONE)
ElseIf nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or ElseIf nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or
nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

+2 -1
View File
@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5" xmlns:local="clr-namespace:EgtCAM5"
DockPanel.Dock="Right"> DockPanel.Dock="Right"
Margin="1,0,0,0">
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/> <local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
</Grid> </Grid>
+1 -1
View File
@@ -11,7 +11,7 @@
m_SetUpDbVM = SetUpDbVM m_SetUpDbVM = SetUpDbVM
End Sub End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.m_CloseWindow Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.OnCloseWindow
Me.DialogResult = bDialogResult Me.DialogResult = bDialogResult
End Sub End Sub
+2 -2
View File
@@ -10,7 +10,7 @@ Public Class SetUpDbVM
Private Const SETUP_FILEEXTENSION As String = ".stu" Private Const SETUP_FILEEXTENSION As String = ".stu"
Friend Event m_CloseWindow(bDialogResult As Boolean) Friend Event OnCloseWindow(bDialogResult As Boolean)
Private m_SetUpList As New ObservableCollection(Of String) Private m_SetUpList As New ObservableCollection(Of String)
Public ReadOnly Property SetUpList As ObservableCollection(Of String) Public ReadOnly Property SetUpList As ObservableCollection(Of String)
@@ -263,7 +263,7 @@ Public Class SetUpDbVM
Return Return
End Select End Select
End If End If
RaiseEvent m_CloseWindow(True) RaiseEvent OnCloseWindow(True)
End Sub End Sub
#End Region ' Close #End Region ' Close
+9 -3
View File
@@ -1,6 +1,7 @@
<EgtFloating:EgtFloatingPanel x:Class="BeamPanelV" <EgtFloating:EgtFloatingPanel x:Class="BeamPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding BeamPanel_Visibility}"> Visibility="{Binding BeamPanel_Visibility}">
@@ -10,13 +11,18 @@
<StackPanel Orientation="Horizontal"/> <StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.Resources>
<DataTemplate> <DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}"> <Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/> <Image Source="{Binding ImagePath}"/>
</Button> </Button>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl> </ItemsControl>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
+4 -7
View File
@@ -1,14 +1,11 @@
Imports System.IO Public Class BeamPanelVM
Imports EgtUILib
Public Class BeamPanelVM
Inherits VMBase Inherits VMBase
Friend Const BEAM_PROCESS As String = "Beam\Process.lua" Friend Const BEAM_PROCESS As String = "Beam\Process.lua"
Friend Const BEAM_MACHININGS As String = "BeamMachinings" Friend Const BEAM_MACHININGS As String = "BeamMachinings"
Private m_ButtonList As New List(Of ButtonItem) Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonItem) Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get Get
Return m_ButtonList Return m_ButtonList
End Get End Get
@@ -32,7 +29,7 @@ Public Class BeamPanelVM
If IniFile.IsActiveBeam() Then If IniFile.IsActiveBeam() Then
' Inizializzo i bottoni leggendoli da file ini ' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1 Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonItem = Nothing Dim CurrBtn As ButtonListItem = Nothing
While GetPrivateProfileButton(S_BEAM, K_BEAMBUTTON & BtnIndex, IniFile.m_sBeamDirPath, CurrBtn) While GetPrivateProfileButton(S_BEAM, K_BEAMBUTTON & BtnIndex, IniFile.m_sBeamDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn) m_ButtonList.Add(CurrBtn)
BtnIndex += 1 BtnIndex += 1
+9 -3
View File
@@ -1,6 +1,7 @@
<EgtFloating:EgtFloatingPanel x:Class="BeamWallPanelV" <EgtFloating:EgtFloatingPanel x:Class="BeamWallPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding BeamWallPanel_Visibility}"> Visibility="{Binding BeamWallPanel_Visibility}">
@@ -10,13 +11,18 @@
<StackPanel Orientation="Horizontal"/> <StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.Resources>
<DataTemplate> <DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}"> <Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/> <Image Source="{Binding ImagePath}"/>
</Button> </Button>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl> </ItemsControl>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
+4 -7
View File
@@ -1,11 +1,8 @@
Imports System.IO Public Class BeamWallPanelVM
Imports EgtUILib
Public Class BeamWallPanelVM
Inherits VMBase Inherits VMBase
Private m_ButtonList As New List(Of ButtonItem) Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonItem) Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get Get
Return m_ButtonList Return m_ButtonList
End Get End Get
@@ -30,7 +27,7 @@ Public Class BeamWallPanelVM
GetPrivateProfileString(S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath) GetPrivateProfileString(S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
' Inizializzo i bottoni leggendoli da file ini ' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1 Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonItem = Nothing Dim CurrBtn As ButtonListItem = Nothing
While GetPrivateProfileButton(S_BEAMWALL, K_BEAMWALLBUTTON & BtnIndex, IniFile.m_sBeamWallDirPath, CurrBtn) While GetPrivateProfileButton(S_BEAMWALL, K_BEAMWALLBUTTON & BtnIndex, IniFile.m_sBeamWallDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn) m_ButtonList.Add(CurrBtn)
BtnIndex += 1 BtnIndex += 1
+9 -3
View File
@@ -1,6 +1,7 @@
<EgtFloating:EgtFloatingPanel x:Class="WallPanelV" <EgtFloating:EgtFloatingPanel x:Class="WallPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding WallPanel_Visibility}"> Visibility="{Binding WallPanel_Visibility}">
@@ -10,13 +11,18 @@
<StackPanel Orientation="Horizontal"/> <StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.Resources>
<DataTemplate> <DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}"> <Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/> <Image Source="{Binding ImagePath}"/>
</Button> </Button>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl> </ItemsControl>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
+4 -7
View File
@@ -1,13 +1,10 @@
Imports System.IO Public Class WallPanelVM
Imports EgtUILib
Public Class WallPanelVM
Inherits VMBase Inherits VMBase
Friend Const WALL_MACHININGS As String = "WallMachinings" Friend Const WALL_MACHININGS As String = "WallMachinings"
Private m_ButtonList As New List(Of ButtonItem) Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonItem) Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get Get
Return m_ButtonList Return m_ButtonList
End Get End Get
@@ -31,7 +28,7 @@ Public Class WallPanelVM
If IniFile.IsActiveWall() Then If IniFile.IsActiveWall() Then
' Inizializzo i bottoni leggendoli da file ini ' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1 Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonItem = Nothing Dim CurrBtn As ButtonListItem = Nothing
While GetPrivateProfileButton(S_WALL, K_WALLBUTTON & BtnIndex, IniFile.m_sWallDirPath, CurrBtn) While GetPrivateProfileButton(S_WALL, K_WALLBUTTON & BtnIndex, IniFile.m_sWallDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn) m_ButtonList.Add(CurrBtn)
BtnIndex += 1 BtnIndex += 1
+1 -1
View File
@@ -175,7 +175,7 @@ Public Class MTableDbV
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs) Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
Dim Element As Object = e.OriginalSource Dim Element As Object = e.OriginalSource
While Not IsNothing(Element) AndAlso Not TypeOf Element Is ScrollBar While Not IsNothing(Element) AndAlso Not TypeOf Element Is ScrollBar
Element = VisualTreeHelper.GetParent(Element) Element = VisualTreeHelper.GetParent(CType(Element, DependencyObject))
End While End While
' verifico che non sia ScrollBar, di modo che questa continui a funzionare, ma non possa selezionare piu' righe trascinando ' verifico che non sia ScrollBar, di modo che questa continui a funzionare, ma non possa selezionare piu' righe trascinando
If IsNothing(Element) OrElse Not TypeOf Element Is ScrollBar Then If IsNothing(Element) OrElse Not TypeOf Element Is ScrollBar Then
@@ -0,0 +1,28 @@
<EgtFloating:EgtFloatingPanel x:Class="ReversePostPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding ReversePostPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
</EgtFloating:EgtFloatingPanel>
@@ -0,0 +1,3 @@
Public Class ReversePostPanelV
End Class
+37
View File
@@ -0,0 +1,37 @@
Public Class ReversePostPanelVM
Inherits VMBase
Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get
Return m_ButtonList
End Get
End Property
Private m_ReversePostPanel_Visibility As Visibility
Public ReadOnly Property ReversePostPanel_Visibility As Visibility
Get
Return m_ReversePostPanel_Visibility
End Get
End Property
Friend Sub SetReversePostPanelVisibility(bValue As Boolean)
m_ReversePostPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(ReversePostPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefReversePostPanelVM(Me)
' Se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveReversePost() Then
' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonListItem = Nothing
While GetPrivateProfileButton(S_REVERSEPOST, K_REVERSEPOSTBUTTON & BtnIndex, IniFile.m_sReversePostDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn)
BtnIndex += 1
End While
End If
End Sub
End Class
+28
View File
@@ -0,0 +1,28 @@
<EgtFloating:EgtFloatingPanel x:Class="TrimmingPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding TrimmingPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
</EgtFloating:EgtFloatingPanel>
+3
View File
@@ -0,0 +1,3 @@
Public Class TrimmingPanelV
End Class
+37
View File
@@ -0,0 +1,37 @@
Public Class TrimmingPanelVM
Inherits VMBase
Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get
Return m_ButtonList
End Get
End Property
Private m_TrimmingPanel_Visibility As Visibility
Public ReadOnly Property TrimmingPanel_Visibility As Visibility
Get
Return m_TrimmingPanel_Visibility
End Get
End Property
Friend Sub SetTrimmingPanelVisibility(bValue As Boolean)
m_TrimmingPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(TrimmingPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefTrimmingPanelVM(Me)
' Se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveTrimming() Then
' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonListItem = Nothing
While GetPrivateProfileButton(S_TRIMMING, K_TRIMMINGBUTTON & BtnIndex, IniFile.m_sTrimmingDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn)
BtnIndex += 1
End While
End If
End Sub
End Class
+28
View File
@@ -0,0 +1,28 @@
<EgtFloating:EgtFloatingPanel x:Class="WindowPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding WindowPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
</EgtFloating:EgtFloatingPanel>
+3
View File
@@ -0,0 +1,3 @@
Public Class WindowPanelV
End Class
+37
View File
@@ -0,0 +1,37 @@
Public Class WindowPanelVM
Inherits VMBase
Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get
Return m_ButtonList
End Get
End Property
Private m_WindowPanel_Visibility As Visibility
Public ReadOnly Property WindowPanel_Visibility As Visibility
Get
Return m_WindowPanel_Visibility
End Get
End Property
Friend Sub SetWindowPanelVisibility(bValue As Boolean)
m_WindowPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(WindowPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefWindowPanelVM(Me)
' Se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveWindow() Then
' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonListItem = Nothing
While GetPrivateProfileButton(S_WINDOW, K_WINDOWBUTTON & BtnIndex, IniFile.m_sWindowDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn)
BtnIndex += 1
End While
End If
End Sub
End Class
+9 -3
View File
@@ -1,6 +1,7 @@
<EgtFloating:EgtFloatingPanel x:Class="SpecialPanelV" <EgtFloating:EgtFloatingPanel x:Class="SpecialPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding SpecialPanel_Visibility}"> Visibility="{Binding SpecialPanel_Visibility}">
@@ -10,14 +11,19 @@
<StackPanel Orientation="Horizontal"/> <StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.Resources>
<DataTemplate> <DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}"
Visibility="{Binding Btn_Visibility}" IsEnabled="{Binding Btn_IsEnabled}"> Visibility="{Binding Btn_Visibility}" IsEnabled="{Binding Btn_IsEnabled}">
<Image Source="{Binding ImagePath}"/> <Image Source="{Binding ImagePath}"/>
</Button> </Button>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl> </ItemsControl>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
+92 -37
View File
@@ -1,15 +1,21 @@
Imports System.IO Imports System.IO
Imports System.Windows.Threading
Imports EgtUILib Imports EgtUILib
Public Class SpecialPanelVM Public Class SpecialPanelVM
Inherits VMBase Inherits VMBase
Private m_ButtonList As New List(Of ButtonItem) Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonItem) Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get Get
Return m_ButtonList Return m_ButtonList
End Get End Get
End Property End Property
Public ReadOnly Property ButtonCount As Integer
Get
Return m_ButtonList.Count()
End Get
End Property
Private m_SpecialPanel_Visibility As Visibility Private m_SpecialPanel_Visibility As Visibility
Public ReadOnly Property SpecialPanel_Visibility As Visibility Public ReadOnly Property SpecialPanel_Visibility As Visibility
@@ -26,13 +32,14 @@ Public Class SpecialPanelVM
' Creo riferimento a questa classe in Map ' Creo riferimento a questa classe in Map
Map.SetRefSpecialPanelVM(Me) Map.SetRefSpecialPanelVM(Me)
' se attivo, inizializzo i bottoni leggendoli da file ini ' se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveSpecialPanel Then If IniFile.IsActiveSpecialPanel(False) Then
Dim BtnIndex As Integer = 1 Dim BtlIndexMax As Integer = If(IniFile.m_nUserLevel > 5, 199, 99)
Dim CurrBtn As ButtonItem = Nothing For BtnIndex As Integer = 1 To BtlIndexMax
While GetPrivateProfileButton(S_SPECIAL, K_BUTTON & BtnIndex, "", CurrBtn) Dim CurrBtn As ButtonListItem = Nothing
m_ButtonList.Add(CurrBtn) If GetPrivateProfileButton(S_SPECIAL, K_BUTTON & BtnIndex, "", CurrBtn) Then
BtnIndex += 1 m_ButtonList.Add(CurrBtn)
End While End If
Next
End If End If
End Sub End Sub
@@ -40,29 +47,35 @@ Public Class SpecialPanelVM
Public Function SetSpecialPanelButtonsVisibility(IsMachMode As Boolean) As Boolean Public Function SetSpecialPanelButtonsVisibility(IsMachMode As Boolean) As Boolean
Dim bSpecialPanel_Visible As Boolean = False Dim bSpecialPanel_Visible As Boolean = False
For Each BtnItem In m_ButtonList For Each BtnItemList In m_ButtonList
' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList If BtnItemList.Type = ButtonListItem.ButtonListItemTypes.BUTTON Then
Select Case BtnItem.nDrawMachOrBoth Dim BtnItem As ButtonItem = DirectCast(BtnItemList, ButtonItem)
Case 0 ' bottone nascosto ' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList
BtnItem.m_Btn_Visibility = Visibility.Collapsed Select Case BtnItem.nDrawMachOrBoth
Case 1 ' bottone visibile solo in Draw Case 0 ' bottone nascosto
BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed) BtnItem.m_Btn_Visibility = Visibility.Collapsed
Case 2 ' bottone visibile solo in Machining Case 1 ' bottone visibile solo in Draw
BtnItem.m_Btn_Visibility = If(IsMachMode, Visibility.Visible, Visibility.Collapsed) BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed)
Case 3 ' bottone visibile sia in Draw che in Machining Case 2 ' bottone visibile solo in Machining
BtnItem.m_Btn_Visibility = Visibility.Visible BtnItem.m_Btn_Visibility = If(IsMachMode, Visibility.Visible, Visibility.Collapsed)
End Select Case 3 ' bottone visibile sia in Draw che in Machining
' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo BtnItem.m_Btn_Visibility = Visibility.Visible
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True End Select
BtnItem.OnPropertyChanged(NameOf(BtnItem.Btn_Visibility)) ' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True
BtnItem.NotifyPropertyChanged(NameOf(BtnItem.Btn_Visibility))
End If
Next Next
Return bSpecialPanel_Visible Return bSpecialPanel_Visible
End Function End Function
Friend Sub SpecialPanelIsEnabled(SpecialPanelBtn_IsEnabled As Boolean) Friend Sub SpecialPanelIsEnabled(SpecialPanelBtn_IsEnabled As Boolean)
For Each BtnItem In m_ButtonList For Each BtnItemList In m_ButtonList
BtnItem.m_Btn_IsEnabled = SpecialPanelBtn_IsEnabled If BtnItemList.Type = ButtonListItem.ButtonListItemTypes.BUTTON Then
BtnItem.OnPropertyChanged(NameOf(BtnItem.Btn_IsEnabled)) Dim BtnItem As ButtonItem = DirectCast(BtnItemList, ButtonItem)
BtnItem.m_Btn_IsEnabled = SpecialPanelBtn_IsEnabled
BtnItem.NotifyPropertyChanged(NameOf(BtnItem.Btn_IsEnabled))
End If
Next Next
End Sub End Sub
@@ -71,7 +84,7 @@ Public Class SpecialPanelVM
End Class End Class
Public Class ButtonItem Public Class ButtonItem
Inherits ViewModelBase Inherits ButtonListItem
Friend Shared WithEvents m_ProjectVM As ProjectVM Friend Shared WithEvents m_ProjectVM As ProjectVM
Private Shared m_sCurrBarName As String Private Shared m_sCurrBarName As String
@@ -84,6 +97,11 @@ Public Class ButtonItem
End Get End Get
End Property End Property
Private m_sLuaCmdPath As String Private m_sLuaCmdPath As String
Public ReadOnly Property sLuaCmdPath As String
Get
Return m_sLuaCmdPath
End Get
End Property
Private m_sToolTip As String Private m_sToolTip As String
Public ReadOnly Property ToolTip As String Public ReadOnly Property ToolTip As String
Get Get
@@ -104,22 +122,26 @@ Public Class ButtonItem
End Property End Property
Friend m_Btn_IsEnabled As Boolean = True Friend m_Btn_IsEnabled As Boolean = True
Public ReadOnly Property Btn_IsEnabled As Boolean Public Property Btn_IsEnabled As Boolean
Get Get
Return m_Btn_IsEnabled Return m_Btn_IsEnabled
End Get End Get
Set(value As Boolean)
m_Btn_IsEnabled = value
End Set
End Property End Property
' Definizione comandi ' Definizione comandi
Private m_cmdLuaExec As ICommand Private m_cmdLuaExec As ICommand
Sub New( sBarName As String, sLuaCmdPath As String, sImagePath As String, sToolTip As String, sDrawMachOrBoth As String) Sub New(sBarName As String, sLuaCmdPath As String, sImagePath As String, sToolTip As String, sDrawMachOrBoth As String)
MyBase.New(ButtonListItemTypes.BUTTON)
m_sBarName = sBarName m_sBarName = sBarName
If File.Exists(sImagePath) Then If File.Exists(sImagePath) Then
' per lasciare libere le immagini le copio (potrebbe fallire perchè bloccate da altro eseguibile) ' per lasciare libere le immagini le copio (potrebbe fallire perchè bloccate da altro eseguibile)
Dim sNewPath As String = Path.Combine(IniFile.m_sResourcesRoot, sBarName & "_" & Path.GetFileName( sImagePath)) Dim sNewPath As String = Path.Combine(IniFile.m_sResourcesRoot, sBarName & "_" & Path.GetFileName(sImagePath))
Try Try
File.Copy( sImagePath, sNewPath, True) File.Copy(sImagePath, sNewPath, True)
Catch ex As Exception Catch ex As Exception
End Try End Try
m_sImagePath = sNewPath m_sImagePath = sNewPath
@@ -156,31 +178,34 @@ Public Class ButtonItem
If m_sLuaCmdPath = BeamPanelVM.BEAM_MACHININGS Then If m_sLuaCmdPath = BeamPanelVM.BEAM_MACHININGS Then
Beam.BeamMachDb() Beam.BeamMachDb()
Return Return
' se altrimenti per pareti ' se altrimenti per pareti
ElseIf m_sLuaCmdPath = WallPanelVM.WALL_MACHININGS Then ElseIf m_sLuaCmdPath = WallPanelVM.WALL_MACHININGS Then
Wall.WallMachDb() Wall.WallMachDb()
Return Return
End If End If
If Not File.Exists(m_sLuaCmdPath) Then Return If Not File.Exists(m_sLuaCmdPath) Then Return
If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return
' Abilito eventi se comando lua termina con Beam\Process.lua ' Abilito eventi se comando lua lanciato da Beam o Wall
m_sCurrBarName = m_sBarName m_sCurrBarName = m_sBarName
Dim bRaiseEvent As Boolean = ( m_sBarName = "Beam" OrElse m_sBarName = "Wall") Dim bRaiseEvent As Boolean = (m_sBarName = "Beam" OrElse m_sBarName = "Wall")
' eseguo file Lua ' eseguo file Lua
Map.refProjectVM.PreExecScript(False) Map.refProjectVM.PreExecScript(False)
Map.refProjectVM.ExecScript(m_sLuaCmdPath, bRaiseEvent) Map.refProjectVM.ExecScript(m_sLuaCmdPath, bRaiseEvent)
m_sCurrBarName = Nothing m_sCurrBarName = Nothing
' Carico se presenti le dimensioni della griglia
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
End Sub End Sub
Private Shared Sub OnPreControllerExec(sFilePath As String) Handles m_ProjectVM.OnPreControllerExec Private Shared Sub OnPreControllerExec(sFilePath As String) Handles m_ProjectVM.OnPreControllerExec
If m_sCurrBarName = "Beam" Then If m_sCurrBarName = "Beam" Then
EgtLuaCreateGlobTable("BEAM") EgtLuaCreateGlobTable("BEAM")
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath) EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath)
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 then EgtLuaSetGlobBoolVar("BEAM.BW", true) If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 Then EgtLuaSetGlobBoolVar("BEAM.BW", True)
ElseIf m_sCurrBarName = "Wall" Then ElseIf m_sCurrBarName = "Wall" Then
EgtLuaCreateGlobTable("WALL") EgtLuaCreateGlobTable("WALL")
EgtLuaSetGlobStringVar("WALL.BASEDIR", IniFile.m_sWallDirPath) EgtLuaSetGlobStringVar("WALL.BASEDIR", IniFile.m_sWallDirPath)
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 then EgtLuaSetGlobBoolVar("WALL.BW", true) If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 Then EgtLuaSetGlobBoolVar("WALL.BW", True)
End If End If
End Sub End Sub
@@ -196,4 +221,34 @@ Public Class ButtonItem
#End Region ' Commands #End Region ' Commands
End Class
Public Class ButtonListItem
Inherits VMBase
Public Enum ButtonListItemTypes As Integer
BUTTON = 1
SEPARATOR = 2
End Enum
Private m_Type As ButtonListItemTypes
Public ReadOnly Property Type As ButtonListItemTypes
Get
Return m_Type
End Get
End Property
Sub New(Type As ButtonListItemTypes)
m_Type = Type
End Sub
End Class
Public Class SeparatorItem
Inherits ButtonListItem
Sub New()
MyBase.New(ButtonListItemTypes.SEPARATOR)
End Sub
End Class End Class
+33 -213
View File
@@ -14,51 +14,6 @@ Public Class MyStatusBarVM
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents) Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
Private m_OutTextCallback As New OutTextCallback(AddressOf OutText) Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
' GRAPHICAL ELEMENTS
'Private m_StatusOutput As String
'Public Property StatusOutput As String
' Get
' Return m_StatusOutput
' End Get
' Set(value As String)
' m_StatusOutput = value
' NotifyPropertyChanged("StatusOutput")
' End Set
'End Property
'Private m_StatusCurrPos As String
'Public Property StatusCurrPos As String
' Get
' Return m_StatusCurrPos
' End Get
' Set(value As String)
' m_StatusCurrPos = value
' NotifyPropertyChanged("StatusCurrPos")
' End Set
'End Property
'Private m_StatusProgress As Integer
'Public Property StatusProgress As Integer
' Get
' Return m_StatusProgress
' End Get
' Set(value As Integer)
' m_StatusProgress = value
' NotifyPropertyChanged("StatusProgress")
' End Set
'End Property
'Private m_StatusStopIsEnabled As Boolean
'Public Property StatusStopIsEnabled As Boolean
' Get
' Return m_StatusStopIsEnabled
' End Get
' Set(value As Boolean)
' m_StatusStopIsEnabled = value
' NotifyPropertyChanged("StatusStopIsEnabled")
' End Set
'End Property
Private m_GridDimensionText As String Private m_GridDimensionText As String
Public Property GridDimensionText As String Public Property GridDimensionText As String
Get Get
@@ -92,84 +47,32 @@ Public Class MyStatusBarVM
End Set End Set
End Property End Property
'Private m_StatusUnitsText As String Private m_nSelCount As Integer = 0
'Public Property StatusUnitsText As String Public ReadOnly Property SelCount As String
' Get Get
' Return m_StatusUnitsText Return "Sel : " & m_nSelCount.ToString()
' End Get End Get
' Set(value As String) End Property
' m_StatusUnitsText = value Public Sub UpdateSelectedCount()
' NotifyPropertyChanged("StatusUnitsText") Dim nSelCnt As Integer = EgtGetSelectedObjCount()
' End Set If nSelCnt <> m_nSelCount Then
'End Property m_nSelCount = nSelCnt
NotifyPropertyChanged("SelCount")
End If
End Sub
'Private m_SnapPointTypeText As String Public ReadOnly Property SelCountVisibility As Visibility
'Public Property SnapPointTypeText As String Get
' Get If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then
' Return m_SnapPointTypeText Return Visibility.Visible
' End Get Else
' Set(value As String) Return Visibility.Hidden
' m_SnapPointTypeText = value End If
' NotifyPropertyChanged("SnapPointTypeText") End Get
' End Set End Property
'End Property Friend Sub UpdateSelCountVisibility()
NotifyPropertyChanged("SelCountVisibility")
'Private m_SnapPointTypeBackground As SolidColorBrush End Sub
'Public Property SnapPointTypeBackground As SolidColorBrush
' Get
' Return m_SnapPointTypeBackground
' End Get
' Set(value As SolidColorBrush)
' m_SnapPointTypeBackground = value
' NotifyPropertyChanged("SnapPointTypeBackground")
' End Set
'End Property
'' Lista delle macchine disponibili nel programma
'Private m_MachinesList As New ObservableCollection(Of Machine)
'Public Property MachinesList As ObservableCollection(Of Machine)
' Get
' Return m_MachinesList
' End Get
' Set(value As ObservableCollection(Of Machine))
' m_MachinesList = value
' End Set
'End Property
'' Macchina correntemente selezionata e quindi attiva
'Private m_SelectedMachine As Machine
'Public Property SelectedMachine As Machine
' Get
' Return m_SelectedMachine
' End Get
' Set(value As Machine)
' If IsNothing(value) Then
' m_SelectedMachine = Nothing
' ElseIf value IsNot m_SelectedMachine Then
' EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
' If EgtSetCurrMachine(value.Name) Then
' m_SelectedMachine = value
' IniFile.m_sMachineName = m_SelectedMachine.Name
' IniFile.m_sCurrMachIniFilePath = m_SelectedMachine.MachineDirPath & "\" & m_SelectedMachine.Name & ".ini"
' IniFile.m_sCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
' IniFile.m_sCurrMachSetUpDirPath = m_SelectedMachine.MachineDirPath & "\SetUp"
' IniFile.m_sCurrMachScriptsDirPath = m_SelectedMachine.MachineDirPath & "\Scripts"
' UpdateToolAndMachDbParamVisibility()
' NotifyPropertyChanged("SelectedMachine")
' End If
' End If
' End Set
'End Property
'Private m_MachineListIsEnabled As Boolean
'Public Property MachineListIsEnabled As Boolean
' Get
' Return m_MachineListIsEnabled
' End Get
' Set(value As Boolean)
' m_MachineListIsEnabled = value
' NotifyPropertyChanged("MachineListIsEnabled")
' End Set
'End Property
' Commands definition ' Commands definition
Private m_cmdGridDimension As ICommand Private m_cmdGridDimension As ICommand
@@ -434,94 +337,6 @@ Public Class MyStatusBarVM
EgtSetGridShow(bShowGrid, bShowGrid And bShowGridFrame) EgtSetGridShow(bShowGrid, bShowGrid And bShowGridFrame)
End Sub End Sub
'''' <summary>
'''' Method that search the machines in the correct folder and add to the MachinesList those valid.
'''' </summary>
'Private Sub SearchMachines()
' ' Svuoto la lista delle macchine
' m_MachinesList.Clear()
' ' Se direttorio base macchine non definito o non esiste, ritorno
' If String.IsNullOrWhiteSpace(IniFile.m_sMachinesRoot) OrElse
' Not Directory.Exists(IniFile.m_sMachinesRoot) OrElse Directory.GetDirectories(IniFile.m_sMachinesRoot).Count = 0 Then
' IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW
' EgtOutLog(EgtMsg(MSG_STATUSBAR + 1))
' Return
' End If
' ' Cerco le macchine
' Dim TempArray As String() = Directory.GetDirectories(IniFile.m_sMachinesRoot)
' For i As Integer = 0 To TempArray.Count - 1
' AddMachine(TempArray(i))
' Next
' If m_MachinesList.Count = 0 Then
' IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW
' EgtOutLog(EgtMsg(MSG_STATUSBAR + 1))
' Return
' End If
'End Sub
'Private Function AddMachine(sPath As String) As Boolean
' ' Verifico presenza file caratteristici
' Dim sName As String = Path.GetFileName(sPath)
' Dim MachineIniPath As String = sPath & "\" & sName & ".ini"
' Dim MachineMldePath As String = sPath & "\" & sName & ".mlde"
' If Not File.Exists(MachineIniPath) Or Not File.Exists(MachineMldePath) Then Return False
' ' Aggiungo alla lista
' m_MachinesList.Add(New Machine With {.Name = sName, .MachineDirPath = sPath})
' Return True
'End Function
'Friend Function InsertMachine(sPath As String) As Boolean
' ' Verifico presenza file caratteristici
' Dim sName As String = Path.GetFileName(sPath)
' Dim MachineIniPath As String = sPath & "\" & sName & ".ini"
' Dim MachineMldePath As String = sPath & "\" & sName & ".mlde"
' If Not File.Exists(MachineIniPath) Or Not File.Exists(MachineMldePath) Then Return False
' ' Cerco la posizione di inserimento
' Dim nPos As Integer = 0
' For nI As Integer = 0 To m_MachinesList.Count() - 1
' Dim nRes As Integer = String.Compare(sName, m_MachinesList(nI).Name, True)
' If nRes = 0 Then
' Return True
' ElseIf nRes < 0 Then
' Exit For
' Else
' nPos += 1
' End If
' Next
' ' Inserisco nella lista
' m_MachinesList.Insert(nPos, New Machine With {.Name = sName, .MachineDirPath = sPath})
' Return True
'End Function
'''' <summary>
'''' Class that create the association Name/IniPath for the machine's
'''' </summary>
'Class Machine
' Private m_sName As String
' Public Property Name As String
' Get
' Return m_sName
' End Get
' Set(value As String)
' m_sName = value
' End Set
' End Property
' Friend MachineDirPath As String
'End Class
'Private Sub UpdateToolAndMachDbParamVisibility()
' If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWINGONARCS, 0, IniFile.m_sCurrMachIniFilePath) <> 0 Then
' Sawing(39) = Visibility.Visible ' StepExtArc
' Sawing(40) = Visibility.Visible ' StepIntArc
' Else
' Sawing(39) = Visibility.Collapsed ' StepExtArc
' Sawing(40) = Visibility.Collapsed ' StepIntArc
' End If
'End Sub
Public Function OutText(ByRef psText As IntPtr) As Boolean Public Function OutText(ByRef psText As IntPtr) As Boolean
' Assegno stringa ' Assegno stringa
OutputMessage = (Marshal.PtrToStringUni(psText)) OutputMessage = (Marshal.PtrToStringUni(psText))
@@ -533,7 +348,7 @@ Public Class MyStatusBarVM
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
' Se previsto, imposto progress ' Se previsto, imposto progress
If nProg > 0 Then SetLoadingProgress(Math.Min(nProg, 100)) If nProg > 0 Then SetLoadingProgress(Math.Min(nProg, 100))
' Notifico a simulazione aggiornamento dati ' Se simulazione attiva, notifico aggiornamento dati
If Not IsNothing( Map.refSimulationExpanderVM) Then If Not IsNothing( Map.refSimulationExpanderVM) Then
' Uso i valori negativi del primo parametro come flag per la Simulazione ' Uso i valori negativi del primo parametro come flag per la Simulazione
Dim nFlag As Integer = If( nProg < 0, -nProg, 0) Dim nFlag As Integer = If( nProg < 0, -nProg, 0)
@@ -541,8 +356,13 @@ Public Class MyStatusBarVM
End If End If
' Costringo ad aggiornare ' Costringo ad aggiornare
UpdateUI() UpdateUI()
' Eventuale attesa ' Se richiesta pausa
Thread.Sleep(nPause) If nPause >= 0 Then
Thread.Sleep(nPause)
' se altrimenti richiesto aggiornamento visualizzazione
ElseIf nPause = -1
EgtDraw()
End If
' Ritorno eventuale stop ' Ritorno eventuale stop
If m_bStopScript Then If m_bStopScript Then
m_bStopScript = False m_bStopScript = False
+5
View File
@@ -67,6 +67,11 @@
<TextBlock Text="{Binding CurrPos}" Foreground="{StaticResource EgaltechWhite}"/> <TextBlock Text="{Binding CurrPos}" Foreground="{StaticResource EgaltechWhite}"/>
</StatusBarItem> </StatusBarItem>
<StatusBarItem Grid.Column="8"> <StatusBarItem Grid.Column="8">
<!-- Indica il numero di entità selezionate -->
<TextBlock Text="{Binding SelCount}" Foreground="{StaticResource EgaltechWhite}"
Visibility="{Binding SelCountVisibility}" Margin="5,0,5,0" />
</StatusBarItem>
<StatusBarItem Grid.Column="9">
<Button Command="{Binding StatusUnitsCommand}" Content="{Binding MeasureUnit}" Width="35"/> <Button Command="{Binding StatusUnitsCommand}" Content="{Binding MeasureUnit}" Width="35"/>
</StatusBarItem> </StatusBarItem>
</StatusBar> </StatusBar>
+6 -31
View File
@@ -91,24 +91,23 @@ Public Class InfoItem
End Get End Get
End Property End Property
Friend sValour As String Friend sValue As String
''' <summary> ''' <summary>
''' Valore lista info note ''' Valore lista info note
''' </summary> ''' </summary>
Public Property Valour As String Public Property Value As String
Get Get
Return sValour Return sValue
End Get End Get
Set(value As String) Set(value As String)
sValour = value sValue = value
NotifyPropertyChanged(NameOf(Valour)) NotifyPropertyChanged(NameOf(Value))
End Set End Set
End Property End Property
#End Region ' Fields & Properties #End Region ' Fields & Properties
' Comandi ' Comandi
Private m_cmdRemoveInfoItem As ICommand
Private m_cmdDoneInfo As ICommand Private m_cmdDoneInfo As ICommand
#Region "CONSTRUCTORS" #Region "CONSTRUCTORS"
@@ -116,37 +115,13 @@ Public Class InfoItem
Sub New(nId As Integer, sKey As String, sValue As String) Sub New(nId As Integer, sKey As String, sValue As String)
Me.nId = nId Me.nId = nId
Me.sKey = sKey Me.sKey = sKey
Me.sValour = sValue Me.sValue = sValue
End Sub End Sub
#End Region ' Constructors #End Region ' Constructors
#Region "COMMANDS" #Region "COMMANDS"
#Region "RemoveItemNoteCommand"
''' <summary>
''' Comando per rimuovere l'informazione selezionata dalla combobox
''' </summary>
Public ReadOnly Property RemoveInfoItemCommand As ICommand
Get
If m_cmdRemoveInfoItem Is Nothing Then
m_cmdRemoveInfoItem = New Command(AddressOf RemoveInfoItem)
End If
Return m_cmdRemoveInfoItem
End Get
End Property
''' <summary>
''' Rimuove l'informazione selezionata dalla combobox
''' </summary>
''' <param name="param"></param>
Public Sub RemoveInfoItem(ByVal param As Object)
Map.refInputExpanderVM.RemoveItemInfo(Me)
End Sub
#End Region ' RemoveItemNoteCommand
#Region "DoneInfoCommand" #Region "DoneInfoCommand"
''' <summary> ''' <summary>
+1 -1
View File
@@ -99,7 +99,7 @@ Public Class MyToolDbWindowVM
End Sub End Sub
Public Overrides Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String) 'Handles m_ToolScene.OnCursorPos Public Overrides Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String)
Map.refStatusBarVM.NotifyCurrPos(sCursorPos) Map.refStatusBarVM.NotifyCurrPos(sCursorPos)
End Sub End Sub
+13 -1
View File
@@ -210,6 +210,10 @@ Public Class TopCommandBarVM
If Not IsNothing(Map.refSpecialPanelVM) Then If Not IsNothing(Map.refSpecialPanelVM) Then
Map.refSpecialPanelVM.SpecialPanelIsEnabled(value) Map.refSpecialPanelVM.SpecialPanelIsEnabled(value)
End If End If
' aggiorno visibilità indicatore numero di entità selezionate
If Not IsNothing(Map.refStatusBarVM) Then
Map.refStatusBarVM.UpdateSelCountVisibility()
End If
End If End If
End Sub End Sub
@@ -236,7 +240,7 @@ Public Class TopCommandBarVM
If EgtGetCurrMachGroup() = GDB_ID.NULL Then If EgtGetCurrMachGroup() = GDB_ID.NULL Then
ExecExitMachScript() ExecExitMachScript()
EgtDraw() EgtDraw()
' altrimenti, aggiusto... ' altrimenti, aggiusto...
Else Else
' se parametri di una lavorazione aperti, disattivo database utensili, lavorazioni e setup ' se parametri di una lavorazione aperti, disattivo database utensili, lavorazioni e setup
Dim bIsEnabled As Boolean = Not IsNothing(Map.refOperationParametersExpanderVM) AndAlso Not Map.refOperationParametersExpanderVM.ParametersIsExpanded Dim bIsEnabled As Boolean = Not IsNothing(Map.refOperationParametersExpanderVM) AndAlso Not Map.refOperationParametersExpanderVM.ParametersIsExpanded
@@ -244,6 +248,8 @@ Public Class TopCommandBarVM
' se parametri di una lavorazione aperti, disattivo MTable e SpecialPanel ' se parametri di una lavorazione aperti, disattivo MTable e SpecialPanel
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled) If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled) If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
' aggiorno visibilità indicatore numero di entità selezionate
If Not IsNothing(Map.refStatusBarVM) Then Map.refStatusBarVM.UpdateSelCountVisibility()
End If End If
Else Else
' Deseleziono tutto ' Deseleziono tutto
@@ -803,6 +809,9 @@ Public Class TopCommandBarVM
Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall()) Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall())
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeam() Or IniFile.IsActiveWall()) Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeam() Or IniFile.IsActiveWall())
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors()) Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refWindowPanelVM.SetWindowPanelVisibility(IniFile.IsActiveWindow())
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(IniFile.IsActiveTrimming())
Map.refReversePostPanelVM.SetReversePostPanelVisibility(IniFile.IsActiveReversePost())
Map.refGunStockPanelVM.SetGunStockPanelVisibility(IniFile.IsActiveGunStock()) Map.refGunStockPanelVM.SetGunStockPanelVisibility(IniFile.IsActiveGunStock())
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(True) If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(True)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False)
@@ -851,6 +860,9 @@ Public Class TopCommandBarVM
Map.refWallPanelVM.SetWallPanelVisibility(False) Map.refWallPanelVM.SetWallPanelVisibility(False)
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False) Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False)
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors()) Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refWindowPanelVM.SetWindowPanelVisibility(False)
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(False)
Map.refReversePostPanelVM.SetReversePostPanelVisibility(False)
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False) Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False) If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup) Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
+9 -6
View File
@@ -5,13 +5,13 @@
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
DockPanel.Dock="Top" DockPanel.Dock="Top"
Orientation="Horizontal"> Orientation="Horizontal">
<EgtFloating:EgtFloatingPanel Name="ShowPanel" <EgtFloating:EgtFloatingPanel Name="ShowPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False"> IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:ShowPanelV DataContext="{StaticResource ShowPanelViewModel}"/> <local:ShowPanelV DataContext="{StaticResource ShowPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="ViewPanel" <EgtFloating:EgtFloatingPanel Name="ViewPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False"> IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/> <local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/>
<local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/> <local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
@@ -20,17 +20,20 @@
<local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/> <local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/>
<!--</EgtFloating:EgtFloatingPanel>--> <!--</EgtFloating:EgtFloatingPanel>-->
<EgtFloating:EgtFloatingPanel Name="GridPanel" <EgtFloating:EgtFloatingPanel Name="GridPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False"> IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/> <local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/>
<local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/> <local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/> <local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/> <local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/> <local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/> <local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/> <local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/> <local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
<local:WindowPanelV DataContext="{StaticResource WindowPanelViewModel}"/>
<local:TrimmingPanelV DataContext="{StaticResource TrimmingPanelViewModel}"/>
<local:ReversePostPanelV DataContext="{StaticResource ReversePostPanelViewModel}"/>
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/> <local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
</WrapPanel> </WrapPanel>
+50
View File
@@ -66,6 +66,30 @@ Module Analyze
Return True Return True
End Function End Function
Function CreateTriaLoop( nId As Integer, nT As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim nCrvId As Integer = EgtExtractSurfTmTriaLoop( nId, nT, m_AnaGrpId)
EgtSetColor( nCrvId, New Color3d( 255, 255,0))
If bEnMod Then EgtEnableModified()
Return True
End Function
Function CreateTriaNormal( nId As Integer, nT As Integer) As Boolean
'If m_AnaGrpId = GDB_ID.NULL Then Return False
'Dim bEnMod As Boolean = EgtGetEnableModified()
'EgtDisableModified()
'Dim ptC As Point3d
'Dim vtN As Vector3d
'If EgtSurfTmTriangleNormVersor( nId, nT, GDB_ID.ROOT, ptC, vtN) Then
' Dim nNormId As Integer = EgtCreateGeoVector( m_AnaGrpId, 50 * vtN, ptC, GDB_RT.GLOB)
' EgtSetColor( nNormId, New Color3d( 255, 0,0))
'End If
'If bEnMod Then EgtEnableModified()
Return True
End Function
Function CreateChunkNormal( nId As Integer, nChk As Integer) As Boolean Function CreateChunkNormal( nId As Integer, nChk As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified() Dim bEnMod As Boolean = EgtGetEnableModified()
@@ -139,4 +163,30 @@ Module Analyze
Return True Return True
End Function End Function
Function CreateSBzPointNormalAndTangents( nId As Integer, ptBez As Point3d, ByRef dU As Double, ByRef dV As Double) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim bOk As Boolean = EgtSurfBezParamsFromPoint( nId, ptBez, m_AnaGrpId, dU, dV)
If bEnMod Then EgtEnableModified()
Return bOk
End Function
Function CreateSBzIsoParam( nId As Integer, ByRef dU As Double, ByRef dV As Double) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim nIdCrv As Integer = EgtSurfBezierGetCurveU( nId, dV, m_AnaGrpId)
EgtSetColor( nIdCrv, New Color3d(128,128,255))
Dim bOk As Boolean = nIdCrv <> GDB_ID.NULL
nIdCrv = EgtSurfBezierGetCurveV( nId, dU, m_AnaGrpId)
bOk = bOk And nIdCrv <> GDB_ID.NULL
EgtSetColor( nIdCrv, New Color3d(255,128,128))
If bEnMod Then EgtEnableModified()
Return bOk
End Function
End Module End Module
+65 -3
View File
@@ -36,10 +36,11 @@
<EgtCAM5:WallPanelVM x:Key="WallPanelViewModel"/> <EgtCAM5:WallPanelVM x:Key="WallPanelViewModel"/>
<EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/> <EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/>
<EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/> <EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/>
<EgtCAM5:WindowPanelVM x:Key="WindowPanelViewModel"/>
<EgtCAM5:TrimmingPanelVM x:Key="TrimmingPanelViewModel"/>
<EgtCAM5:ReversePostPanelVM x:Key="ReversePostPanelViewModel"/>
<EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/> <EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/>
<EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/> <EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/>
<!--<EgtCAM5:MachGroupPanelVM x:Key="MachGroupPanelViewModel"/>-->
<!--<EgtCAM5:OperationExpanderVM x:Key="OperationExpanderViewModel"/>-->
<!-- <!--
This template applies a StatusBarView to an instance This template applies a StatusBarView to an instance
@@ -141,6 +142,13 @@
</Setter> </Setter>
</Style> </Style>
<Style x:Key="PreviewTool_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Width" Value="30"/>
<Setter Property="Height" Value="30"/>
<Setter Property="IsDefault" Value="True"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ --> <!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- Expander Style --> <!-- Expander Style -->
@@ -600,6 +608,19 @@
<Setter Property="Width" Value="30"/> <Setter Property="Width" Value="30"/>
</Style> </Style>
<Style x:Key="ExecuteOkWindow_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="60"/>
<Setter Property="Margin" Value="0,5,0,5"/>
</Style>
<Style x:Key="ExecuteWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
<Setter Property="Margin" Value="2,5,5,5"/>
</Style>
<Style x:Key="DrawOptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}"> <Style x:Key="DrawOptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
</Style> </Style>
@@ -770,6 +791,12 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<Style x:Key="ExecuteWindow_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="AcceptsReturn" Value="True"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Margin" Value="5"/>
</Style>
<Style x:Key="ToggleButtonTabStyle" TargetType="{x:Type ToggleButton}"> <Style x:Key="ToggleButtonTabStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/> <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/> <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
@@ -1248,9 +1275,12 @@
<!-- Style Slider --> <!-- Style Slider -->
<Style x:Key="SliderValue_Slider" TargetType="{x:Type Slider}"> <Style x:Key="SliderValue_Slider" TargetType="{x:Type Slider}">
<Setter Property="Width" Value="235"/> <Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Width" Value="Auto"/>
<Setter Property="SmallChange" Value="1"/> <Setter Property="SmallChange" Value="1"/>
<Setter Property="TickPlacement" Value="TopLeft"/> <Setter Property="TickPlacement" Value="TopLeft"/>
<Setter Property="Margin" Value="1,2,0,2"/>
<Setter Property="IsSnapToTickEnabled" Value="False"/>
<Style.Triggers> <Style.Triggers>
<Trigger Property="IsEnabled" Value="False"> <Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5"/> <Setter Property="Opacity" Value="0.5"/>
@@ -1272,4 +1302,36 @@
</Style.Triggers>--> </Style.Triggers>-->
</Style> </Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- Style Border-->
<Style x:Key="Trimming_Border" TargetType="{x:Type Border}">
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Margin" Value="1"/>
<Setter Property="Padding" Value="0,2,0,2"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="8"/>
<Setter Property="CornerRadius" Value="1"/>
</Style>
<Style x:Key="Separator_Border" TargetType="{x:Type Border}">
<Setter Property="Background" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="Width" Value="1"/>
<Setter Property="CornerRadius" Value="1"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- Style GridSplitter-->
<Style x:Key="General_GridSplitter" TargetType="{x:Type GridSplitter}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Height" Value="5"/>
</Style>
</ResourceDictionary> </ResourceDictionary>
+244
View File
@@ -0,0 +1,244 @@
Imports EgtWPFLib5
Module DynamicGridModule
Friend Const PROJECT_EGTCAM5 As String = "Project_EgtCAM5"
Friend Const PROJECT_EGTCAM5_PLUGIN As String = "Project_EgtCAM5_PlugIn"
Friend Const PROJECT_MACHINING As String = "Project_Machinig"
Friend Const PROJECT_MACHINING_PLUGIN As String = "Project_Machinig_PlugIn"
Friend Const PROJECT_DRAW As String = "Project_Draw"
Friend Const PROJECT_DRAW_PLUGIN As String = "Project_Draw_PlugIn"
''' <summary>
''' Funzione per popolare la griglia
''' </summary>
''' <param name="m_TopTrayV"></param>
''' <param name="m_LeftTrayV"></param>
''' <param name="m_RightTrayV"></param>
''' <param name="m_BottomTrayV"></param>
''' <param name="m_SceneContentControlV"></param>
''' <param name="gridSplitter"></param>
Friend Sub PopulateGrid(m_TopTrayV As TopTrayV, m_LeftTrayV As LeftTrayV, m_RightTrayV As RightTrayV, m_BottomTrayV As BottomTrayV, m_SceneContentControlV As SceneContentControlV, gridSplitter As GridSplitter)
' aggiungo TopTrayV
Grid.SetRow(m_TopTrayV, 0)
Grid.SetColumnSpan(m_TopTrayV, 3)
' aggiungo LeftTrayV
Grid.SetRow(m_LeftTrayV, 1)
Grid.SetColumn(m_LeftTrayV, 0)
' aggiungo RightTrayV
Grid.SetRow(m_RightTrayV, 1)
Grid.SetColumn(m_RightTrayV, 2)
'aggiungo gridSplitter
Grid.SetRow(gridSplitter, 1)
Grid.SetColumn(gridSplitter, 2)
' aggiungo BottomTrayV
Grid.SetRow(m_BottomTrayV, 2)
Grid.SetColumn(m_BottomTrayV, 1)
' aggiungo Scena
Grid.SetRow(m_SceneContentControlV, 1)
Grid.SetColumn(m_SceneContentControlV, 1)
End Sub
''' <summary>
''' Funzione per popolare la griglia con PlugIn
''' </summary>
''' <param name="m_TopTrayV"></param>
''' <param name="m_RightTrayV"></param>
''' <param name="m_BottomTrayV"></param>
''' <param name="m_SceneContentControlV"></param>
''' <param name="gridSplitter"></param>
Friend Sub PopolateGridWithPlugIn(m_TopTrayV As TopTrayV, m_RightTrayV As RightTrayV, m_BottomTrayV As BottomTrayV, m_SceneContentControlV As SceneContentControlV, gridSplitter As GridSplitter)
' aggiungo TopTrayV
Grid.SetRow(m_TopTrayV, 0)
Grid.SetColumn(m_TopTrayV, 1)
' aggiungo RightTrayV
Grid.SetRow(m_RightTrayV, 0)
Grid.SetColumn(m_RightTrayV, 2)
'aggiungo gridSplitter
Grid.SetRow(gridSplitter, 0)
Grid.SetColumn(gridSplitter, 2)
' aggiungo BottomTrayV
Grid.SetRow(m_BottomTrayV, 2)
Grid.SetColumn(m_BottomTrayV, 1)
' aggiungo Scena
Grid.SetRow(m_SceneContentControlV, 1)
Grid.SetColumn(m_SceneContentControlV, 1)
End Sub
''' <summary>
''' Creazione GridSplitter
''' </summary>
''' <returns></returns>
Friend Function CreateGridSplitter() As GridSplitter
' creo gridsplitter
Dim gridSplitter As New GridSplitter With {
.Width = 30,
.HorizontalAlignment = HorizontalAlignment.Left,
.VerticalAlignment = VerticalAlignment.Stretch,
.Background = Brushes.Transparent
}
AddHandler gridSplitter.DragCompleted,
Sub()
SaveGridLayout(If(IsActivePlugin(), PROJECT_EGTCAM5_PLUGIN, PROJECT_EGTCAM5))
End Sub
Return gridSplitter
End Function
''' <summary>
''' Creazione Griglia Dinamica
''' </summary>
Friend Sub CreateDynamicGrid()
' creo colonne griglia dinamica
Dim gridCol1 As New ColumnDefinition With {
.Width = New GridLength(1, GridUnitType.Auto)
}
Dim gridCol2 As New ColumnDefinition With {
.Width = New GridLength(1, GridUnitType.Star)
}
Dim gridCol3 As New ColumnDefinition With {
.Width = New GridLength(250),
.MinWidth = 150
}
' aggiungo le colonne alla griglia
Map.refProjectVM.DynamicGrid.ColumnDefinitions.Add(gridCol1)
Map.refProjectVM.DynamicGrid.ColumnDefinitions.Add(gridCol2)
Map.refProjectVM.DynamicGrid.ColumnDefinitions.Add(gridCol3)
' creo righe griglia dinamica
Dim gridRow1 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Auto)
}
Dim gridRow2 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Star)
}
Dim gridRow3 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Auto)
}
' aggiungo righe alla griglia
Map.refProjectVM.DynamicGrid.RowDefinitions.Add(gridRow1)
Map.refProjectVM.DynamicGrid.RowDefinitions.Add(gridRow2)
Map.refProjectVM.DynamicGrid.RowDefinitions.Add(gridRow3)
End Sub
Friend Sub SaveGridLayout(GridTitle As String)
Dim Index As Integer = 0
' Salvo colonna 2
Dim valueCol2 As String = 0 & "," & 0 & "," & Map.refProjectVM.DynamicGrid.ColumnDefinitions(2).ActualWidth.ToString()
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), valueCol2, Map.refMainWindowVM.DimensionDir)
Index = 1
For i As Integer = 1 To Map.refProjectVM.DynamicGrid.RowDefinitions.Count - 1
Dim row = Map.refProjectVM.DynamicGrid.RowDefinitions(i)
Dim value As String = i.ToString() & "," & 1 & "," & row.ActualHeight.ToString()
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), value, Map.refMainWindowVM.DimensionDir)
Index += 1
Next
End Sub
Friend Sub RestoreGridLayout(GridTitle As String)
Dim Index As Integer = 0
Dim IndexRow As Integer = 1
Dim sValue = String.Empty
While EgtUILib.GetPrivateProfileString(GridTitle, Index.ToString(), String.Empty, sValue, Map.refMainWindowVM.DimensionDir) > 0
Dim sValueParams() As String = sValue.Split(","c)
If sValueParams.Count >= 3 Then
' cancello spazi
For I As Integer = 0 To sValueParams.Count - 1
sValueParams(I) = sValueParams(I).Trim()
Next
' creo valore
Dim nDimType As Integer
Dim GridLenValue As Double
Integer.TryParse(sValueParams(1), nDimType)
StringToDoubleAdv(sValueParams(2), GridLenValue)
If nDimType = 0 Then
Map.refProjectVM.DynamicGrid.ColumnDefinitions(2).Width = New GridLength(GridLenValue, GridUnitType.Pixel)
Else
Map.refProjectVM.DynamicGrid.RowDefinitions(IndexRow).Height = If(GridLenValue = 0, New GridLength(1, GridUnitType.Auto), New GridLength(GridLenValue, GridUnitType.Star))
IndexRow += 1
End If
End If
Index += 1
End While
End Sub
Friend Sub SaveMachiningGridLayout(MachGrid As Grid, GridTitle As String)
Dim Index As Integer = 0
' Salvo riga 0
Dim valueRow As String = Index & "," & Index & "," & MachGrid.RowDefinitions(Index).ActualHeight.ToString()
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), valueRow, Map.refMainWindowVM.DimensionDir)
End Sub
Friend Sub RestoreMachiningGridLayout(MachGrid As Grid, GridTitle As String)
Dim Index As Integer = 0
Dim sValue = String.Empty
While EgtUILib.GetPrivateProfileString(GridTitle, Index.ToString(), String.Empty, sValue, Map.refMainWindowVM.DimensionDir) > 0
Dim sValueParams() As String = sValue.Split(","c)
If sValueParams.Count >= 3 Then
' cancello spazi
For I As Integer = 0 To sValueParams.Count - 1
sValueParams(I) = sValueParams(I).Trim()
Next
' creo valore
Dim GridLenValue As Double
StringToDoubleAdv(sValueParams(2), GridLenValue)
MachGrid.RowDefinitions(0).Height = New GridLength(GridLenValue)
End If
Index += 1
End While
End Sub
Friend Sub SaveDrawGridLayout(MachGrid As Grid, RowId As String, GridTitle As String)
Dim Index As Integer = 0
Dim valueRow As String = String.Empty
' Salvo riga 0
If RowId = "ManageLayer" Then
valueRow = Index & "," & Index & "," & MachGrid.RowDefinitions(Index).ActualHeight.ToString()
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), valueRow, Map.refMainWindowVM.DimensionDir)
Else
Index = 1
valueRow = Index & "," & 0 & "," & MachGrid.RowDefinitions(Index).ActualHeight.ToString()
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), valueRow, Map.refMainWindowVM.DimensionDir)
End If
End Sub
Friend Sub RestoreDrawGridLayout(MachGrid As Grid, RowId As String, Index As Integer, GridTitle As String)
Dim sValue = String.Empty
EgtUILib.GetPrivateProfileString(GridTitle, Index.ToString(), String.Empty, sValue, Map.refMainWindowVM.DimensionDir)
Dim sValueParams() As String = sValue.Split(","c)
If sValueParams.Count >= 3 Then
' cancello spazi
For I As Integer = 0 To sValueParams.Count - 1
sValueParams(I) = sValueParams(I).Trim()
Next
' creo valore
Dim GridLenValue As Double
StringToDoubleAdv(sValueParams(2), GridLenValue)
If RowId = "ManageLayer" Then
MachGrid.RowDefinitions(0).Height = New GridLength(GridLenValue)
Else
MachGrid.RowDefinitions(1).Height = New GridLength(GridLenValue)
End If
Else
If RowId = "ManageLayer" Then
MachGrid.RowDefinitions(0).Height = New GridLength(400)
Else
MachGrid.RowDefinitions(1).Height = New GridLength(150)
End If
End If
End Sub
End Module
+70 -18
View File
@@ -17,6 +17,14 @@ Public Module IniFile
ONLYDRAW = 3 ONLYDRAW = 3
End Enum End Enum
Public Enum SceneSurfQualityOpt As Integer
LOWER = -2
LOW = -1
STANDARD = 0
HIGH = 1
HIGHER = 2
End Enum
Public Enum SceneSelModeOpt As Integer Public Enum SceneSelModeOpt As Integer
NULL = 0 NULL = 0
PARTCURVES = 1 PARTCURVES = 1
@@ -60,6 +68,9 @@ Public Module IniFile
WALL = 512 WALL = 512
PLUGIN = 1024 PLUGIN = 1024
ADVMACHINING = 2048 ADVMACHINING = 2048
WINDOW = 4096
TRIMMING = 8192
REVERSEPOST = 16384
End Enum End Enum
Friend m_sDataRoot As String Friend m_sDataRoot As String
Friend m_sConfigDir As String Friend m_sConfigDir As String
@@ -77,6 +88,12 @@ Public Module IniFile
Friend m_sBeamWallDirPath As String Friend m_sBeamWallDirPath As String
' path della cartella DOORS ' path della cartella DOORS
Friend m_sDoorsDirPath As String Friend m_sDoorsDirPath As String
' path della cartella WINDOW
Friend m_sWindowDirPath As String
' path della cartella TRIMMING
Friend m_sTrimmingDirPath As String
' path della cartella REVERSEPOST
Friend m_sReversePostDirPath As String
' path della cartella GUNSTOCK ' path della cartella GUNSTOCK
Friend m_sGunstockDirPath As String Friend m_sGunstockDirPath As String
' path della cartella Printing3d ' path della cartella Printing3d
@@ -221,11 +238,15 @@ Public Module IniFile
Return False Return False
End Function End Function
Public Function GetPrivateProfileButton(sSection As String, sKey As String, sBaseDir As String, ByRef ReadButtonItem As ButtonItem) As Boolean Public Function GetPrivateProfileButton(sSection As String, sKey As String, sBaseDir As String, ByRef ReadButtonItem As ButtonListItem) As Boolean
ReadButtonItem = Nothing ReadButtonItem = Nothing
Dim sVal As String = String.Empty Dim sVal As String = String.Empty
GetPrivateProfileString(sSection, sKey, "", sVal) GetPrivateProfileString(sSection, sKey, "", sVal)
If String.IsNullOrWhiteSpace(sVal) Then Return False If String.IsNullOrWhiteSpace(sVal) Then Return False
If sVal = "Separator" Then
ReadButtonItem = New SeparatorItem()
Return True
End If
Dim sItems() As String = sVal.Split(","c) Dim sItems() As String = sVal.Split(","c)
If sItems.Count() >= 1 Then If sItems.Count() >= 1 Then
Dim sLuaPath As String = sItems(0) Dim sLuaPath As String = sItems(0)
@@ -269,9 +290,9 @@ Public Module IniFile
Friend Function IsActiveBeam() As Boolean Friend Function IsActiveBeam() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 And (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0) Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 And (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
If bIsActive Then If bIsActive Then
Dim sTemp As String = "" Dim sTemp As String = ""
GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sTemp) GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sTemp)
m_sBeamDirPath = sTemp.TrimEnd( "\"c) m_sBeamDirPath = sTemp.TrimEnd("\"c)
End If End If
Return bIsActive Return bIsActive
End Function End Function
@@ -279,9 +300,9 @@ Public Module IniFile
Friend Function IsActiveWall() As Boolean Friend Function IsActiveWall() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 And (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0) Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 And (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
If bIsActive Then If bIsActive Then
Dim sTemp As String = "" Dim sTemp As String = ""
GetPrivateProfileString(S_WALL, K_WALLBASEDIR, "", sTemp) GetPrivateProfileString(S_WALL, K_WALLBASEDIR, "", sTemp)
m_sWallDirPath = sTemp.TrimEnd( "\"c) m_sWallDirPath = sTemp.TrimEnd("\"c)
End If End If
Return bIsActive Return bIsActive
End Function End Function
@@ -289,9 +310,39 @@ Public Module IniFile
Friend Function IsActiveDoors() As Boolean Friend Function IsActiveDoors() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.DOORS) <> 0 And (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0) Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.DOORS) <> 0 And (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
If bIsActive Then If bIsActive Then
Dim sTemp As String = "" Dim sTemp As String = ""
GetPrivateProfileString(S_DOORS, K_BASEDIR, "", sTemp) GetPrivateProfileString(S_DOORS, K_BASEDIR, "", sTemp)
m_sDoorsDirPath = sTemp.TrimEnd( "\"c) m_sDoorsDirPath = sTemp.TrimEnd("\"c)
End If
Return bIsActive
End Function
Friend Function IsActiveWindow() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WINDOW) <> 0 And (GetPrivateProfileInt(S_WINDOW, K_WINDOWENABLE, 0) <> 0)
If bIsActive Then
Dim sTemp As String = ""
GetPrivateProfileString(S_WINDOW, K_WINDOWBASEDIR, "", sTemp)
m_sWindowDirPath = sTemp.TrimEnd("\"c)
End If
Return bIsActive
End Function
Friend Function IsActiveTrimming() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.TRIMMING) <> 0 And (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
If bIsActive Then
Dim sTemp As String = ""
GetPrivateProfileString(S_TRIMMING, K_TRIMMINGBASEDIR, "", sTemp)
m_sTrimmingDirPath = sTemp.TrimEnd("\"c)
End If
Return bIsActive
End Function
Friend Function IsActiveReversePost() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.REVERSEPOST) <> 0 And (GetPrivateProfileInt(S_REVERSEPOST, K_REVERSEPOSTENABLE, 0) <> 0)
If bIsActive Then
Dim sTemp As String = ""
GetPrivateProfileString(S_REVERSEPOST, K_REVERSEPOSTBASEDIR, "", sTemp)
m_sReversePostDirPath = sTemp.TrimEnd("\"c)
End If End If
Return bIsActive Return bIsActive
End Function End Function
@@ -299,9 +350,9 @@ Public Module IniFile
Friend Function IsActiveGunStock() As Boolean Friend Function IsActiveGunStock() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0) Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
If bIsActive Then If bIsActive Then
Dim sTemp As String = "" Dim sTemp As String = ""
GetPrivateProfileString(S_GUNSTOCK, K_GUNSTOCKEXEC, "", sTemp) GetPrivateProfileString(S_GUNSTOCK, K_GUNSTOCKEXEC, "", sTemp)
m_sGunstockDirPath = Path.GetDirectoryName( sTemp) m_sGunstockDirPath = Path.GetDirectoryName(sTemp)
End If End If
Return bIsActive Return bIsActive
End Function End Function
@@ -320,12 +371,13 @@ Public Module IniFile
Return (IniFile.m_nKeyOptions And KEY_OPT.ADVMACHINING) <> 0 Return (IniFile.m_nKeyOptions And KEY_OPT.ADVMACHINING) <> 0
End Function End Function
Friend Function IsActiveSpecialPanel() As Boolean Friend Function IsActiveSpecialPanel(Optional bTestButton As Boolean = True) As Boolean
Dim btDummy As ButtonItem = Nothing If GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) = 0 Then Return False
Return GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0 AndAlso GetPrivateProfileButton(S_SPECIAL, K_BUTTON & "1", "", btDummy) If Not bTestButton Then Return True
Return (Not IsNothing(Map.refSpecialPanelVM) AndAlso Map.refSpecialPanelVM.ButtonCount > 0)
End Function End Function
Friend Function GetSpecialLuaVersion( sSpecialLuaDir As String, ByRef sVersion As String) As Boolean Friend Function GetSpecialLuaVersion(sSpecialLuaDir As String, ByRef sVersion As String) As Boolean
Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua") Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua")
If Not EgtLuaExecFile(sExecPath, False) Then Return False If Not EgtLuaExecFile(sExecPath, False) Then Return False
If Not EgtLuaGetGlobStringVar("VERSION", sVersion) Then Return False If Not EgtLuaGetGlobStringVar("VERSION", sVersion) Then Return False
@@ -333,7 +385,7 @@ Public Module IniFile
Return True Return True
End Function End Function
Friend Function GetSpecialLuaData( sSpecialLuaDir As String, Friend Function GetSpecialLuaData(sSpecialLuaDir As String,
ByRef sName As String, ByRef sVersion As String, ByRef sMinExe As String) As Boolean ByRef sName As String, ByRef sVersion As String, ByRef sMinExe As String) As Boolean
Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua") Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua")
If Not EgtLuaExecFile(sExecPath, False) Then Return False If Not EgtLuaExecFile(sExecPath, False) Then Return False
+50
View File
@@ -33,8 +33,13 @@ Module Map
Private m_refBeamPanelVM As BeamPanelVM Private m_refBeamPanelVM As BeamPanelVM
Private m_refWallPanelVM As WallPanelVM Private m_refWallPanelVM As WallPanelVM
Private m_refBeamWallPanelVM As BeamWallPanelVM Private m_refBeamWallPanelVM As BeamWallPanelVM
Private m_refWindowPanelVM As WindowPanelVM
Private m_refTrimmingPanelVM As TrimmingPanelVM
Private m_refReversePostPanelVM As ReversePostPanelVM
Private m_refGunStockPanelVM As GunStockPanelVM Private m_refGunStockPanelVM As GunStockPanelVM
Private m_refMachiningParameterExpanderVM As MachiningParameterExpanderVM Private m_refMachiningParameterExpanderVM As MachiningParameterExpanderVM
Private m_refMachiningOptionPanelV As MachiningOptionPanelV
Private m_refDrawOptionPanelV As DrawOptionPanelV
#Region "Get" #Region "Get"
@@ -158,6 +163,21 @@ Module Map
Return m_refDoorPanelVM Return m_refDoorPanelVM
End Get End Get
End Property End Property
Public ReadOnly Property refWindowPanelVM As WindowPanelVM
Get
Return m_refWindowPanelVM
End Get
End Property
Public ReadOnly Property refTrimmingPanelVM As TrimmingPanelVM
Get
Return m_refTrimmingPanelVM
End Get
End Property
Public ReadOnly Property refReversePostPanelVM As ReversePostPanelVM
Get
Return m_refReversePostPanelVM
End Get
End Property
Public ReadOnly Property refSpecialPanelVM As SpecialPanelVM Public ReadOnly Property refSpecialPanelVM As SpecialPanelVM
Get Get
Return m_refSpecialPanelVM Return m_refSpecialPanelVM
@@ -193,6 +213,16 @@ Module Map
Return m_refMachiningParameterExpanderVM Return m_refMachiningParameterExpanderVM
End Get End Get
End Property End Property
Public ReadOnly Property refMachiningOptionPanelV As MachiningOptionPanelV
Get
Return m_refMachiningOptionPanelV
End Get
End Property
Public ReadOnly Property refDrawOptionPanelV As DrawOptionPanelV
Get
Return m_refDrawOptionPanelV
End Get
End Property
#End Region ' Get #End Region ' Get
@@ -311,6 +341,18 @@ Module Map
m_refBeamWallPanelVM = BeamWallPanelVM m_refBeamWallPanelVM = BeamWallPanelVM
Return Not IsNothing(m_refBeamWallPanelVM) Return Not IsNothing(m_refBeamWallPanelVM)
End Function End Function
Friend Function SetRefWindowPanelVM(WindowPanelVM As WindowPanelVM) As Boolean
m_refWindowPanelVM = WindowPanelVM
Return Not IsNothing(m_refWindowPanelVM)
End Function
Friend Function SetRefTrimmingPanelVM(TrimmingPanelVM As TrimmingPanelVM) As Boolean
m_refTrimmingPanelVM = TrimmingPanelVM
Return Not IsNothing(m_refTrimmingPanelVM)
End Function
Friend Function SetRefReversePostPanelVM(ReversePostPanelVM As ReversePostPanelVM) As Boolean
m_refReversePostPanelVM = ReversePostPanelVM
Return Not IsNothing(m_refReversePostPanelVM)
End Function
Friend Function SetRefGunStockPanelVM(GunStockPanelVM As GunStockPanelVM) As Boolean Friend Function SetRefGunStockPanelVM(GunStockPanelVM As GunStockPanelVM) As Boolean
m_refGunStockPanelVM = GunStockPanelVM m_refGunStockPanelVM = GunStockPanelVM
Return Not IsNothing(m_refGunStockPanelVM) Return Not IsNothing(m_refGunStockPanelVM)
@@ -319,6 +361,14 @@ Module Map
m_refMachiningParameterExpanderVM = MachiningParameterExpanderVM m_refMachiningParameterExpanderVM = MachiningParameterExpanderVM
Return Not IsNothing(m_refMachiningParameterExpanderVM) Return Not IsNothing(m_refMachiningParameterExpanderVM)
End Function End Function
Friend Function SetRefMachiningOptionPanelV(MachiningOptionPanelV As MachiningOptionPanelV) As Boolean
m_refMachiningOptionPanelV = MachiningOptionPanelV
Return Not IsNothing(m_refMachiningOptionPanelV)
End Function
Friend Function SetRefDrawOptionPanelV(DrawOptionPanelV As DrawOptionPanelV) As Boolean
m_refDrawOptionPanelV = DrawOptionPanelV
Return Not IsNothing(m_refDrawOptionPanelV)
End Function
#End Region ' Set #End Region ' Set
+11
View File
@@ -122,6 +122,17 @@ Module SelData
Return True Return True
End Function End Function
Friend Function GetSubFromId( nId As Integer, ByRef nSub As Integer) As Boolean
For i As Integer = 0 To m_IdSub.Count() - 1
If m_IdSub(i).m_nId = nId Then
nSub = m_IdSub(i).m_nSub
Return True
End If
Next
nSub = -1
Return False
End Function
Private Function VerifySelGroup() As Boolean Private Function VerifySelGroup() As Boolean
If m_SelGrpId <> GDB_ID.NULL Then Return True If m_SelGrpId <> GDB_ID.NULL Then Return True
Dim bEnMod As Boolean = EgtGetEnableModified() Dim bEnMod As Boolean = EgtGetEnableModified()