Compare commits

...

50 Commits

Author SHA1 Message Date
Dario Sassi 23820e3ed8 EgtCAM5 :
- aggiunto bottone per comando GRID_INVERT.
2024-04-26 17:52:37 +02:00
Dario Sassi e2d1231ea2 EgtCAM5 :
- aggiunta gestione disegno arco per due punti e raggio.
2024-04-19 17:57:22 +02:00
Dario Sassi b7b824ab8a EgtCAM5 :
- aggiunto bottone per comando Nascondi, Visualizza Layer (Shift) e Visualizza Pezzo (Ctrl)
- nell'albero entità corretto visualizza/nascondi Layer con tutte le sue entità (Shift su Lampadina).
2024-04-19 11:28:50 +02:00
Dario Sassi 14ed0480cd EgtCAM5 :
- corretto errore feedback non creato quando progetto contiene più macchinate con la stessa macchina.
2024-04-16 20:54:04 +02:00
Dario Sassi 928b8f679e EgtCAM5 :
- aggiunta gestione evento OnInsertingProject per poter passare AdvFlag a EgtController.
2024-04-13 18:42:47 +02:00
Dario Sassi a0c93477a1 EgtCAM5 :
- aggiunta gestione AdvFlag=0/1 della sezione [Import] nel file INI per Flag importatore formati avanzati.
2024-04-11 00:29:12 +02:00
Dario Sassi 62758acbeb EgtCAM5 2.6d2 :
- eliminata distinzione tra 32 e 64 per le diverse librerie lua (da tempo non serve più)
- modifiche per meglio gestire i problemi con la eventuale chiave di rete (errore di collegamento o capacità esaurita).
2024-04-09 14:54:19 +02:00
Dario Sassi 05d1602c2e EgtCAM5 2.6d1 :
- in Opzioni Macchina aggiunto parametro Tolleranza Lineare di Approssimazione.
2024-04-02 15:40:44 +02:00
Dario Sassi 2a056bc9be EgtCAM5 :
- aggiunti bottoni toolbar per quotature angolari e diametrali/radiali
- corretta gestione DecDigit di quotature in pagina Opzioni (valore può essere negativo).
2024-03-14 20:08:31 +01:00
Dario Sassi 82c40a5b41 EgtCAM5 2.6c2 :
- aggiunto bottone per comandi movimento vertice e movimento faccia di superficie trimesh.
2024-03-13 09:29:04 +01:00
Dario Sassi 0c4daf8ecb EgtCAM5 2.6c2 :
- aggiunti due nuovi parametri a InitDisp.
2024-03-11 14:18:51 +01:00
Dario Sassi a7dc65f10e EgtCAM5 2.6b4 :
- in simulazione migliorata gestione errori dopo EgtSimulStart
- nella toolbar di Vista aggiunto anche comando IsoViewSE.
2024-02-19 14:58:17 +01:00
Dario Sassi be256404ff EgtCAM5 2.6b1 :
- corretto falso rilevamento modifica testa usata da posizione in attrezzaggio.
2024-02-02 17:02:37 +01:00
Emmanuele Sassi efe74f470c Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2024-02-02 16:17:00 +01:00
Emmanuele Sassi 3b49b58783 - Ripristinato bottone MTable in modalita' lavorazione 2024-02-02 16:16:56 +01:00
Dario Sassi d6b61e8633 EgtCAM5 :
- in about aggiunto messaggio con indicazione stato piano di manutenzione.
2024-01-25 18:23:31 +01:00
Dario Sassi 9bb0558370 EgtCAM5 2.6a1 :
- ricompilazione con cambio versione.
2024-01-23 17:26:02 +01:00
Emmanuele Sassi f58322e131 EgtCAM5 2.5l4:
- ricompilazione con cambio versione.
2024-01-15 09:09:51 +01:00
Emmanuele Sassi fd7dbaed88 Merge branch 'hotfix/OperationParamError' 2024-01-15 09:07:12 +01:00
Emmanuele Sassi 5b41936ecb - correzione per apertura parametri di lavorazione 2024-01-15 09:06:56 +01:00
Dario Sassi 14d92c0a2d - modificati riferimenti a EgtTray che è stata rimossa 2024-01-08 16:33:23 +01:00
Emmanuele Sassi 7639de860f Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2024-01-08 11:22:39 +01:00
Emmanuele Sassi 786362b31e - aggiunto flag per plugin
- aggiunto flag per eseguire script Lua
2024-01-08 11:08:41 +01:00
Dario Sassi 3154944f94 EgtCAM5 2.5l3 :
- aggiunta vista da sotto e riordinati bottoni per comandi vista in toolbar
- riordinati bottoni per comandi griglia in toolbar.
2023-12-29 13:22:26 +01:00
Emmanuele Sassi 423a88b049 Merge remote-tracking branch 'origin/master' into feature/DynamicDllForCustomControls 2023-12-27 11:46:33 +01:00
Dario Sassi 7dc34348ed EgtCAM5 2.5l2 :
- all'uscita dal DB lavorazioni se in modalità lavora si aggiorna subito la lista delle lavorazioni inseribili.
2023-12-18 10:33:10 +01:00
Dario Sassi bee06b1999 EgtCAM5 2.5l1 :
- ricompilazione con cambio versione.
2023-12-01 16:53:08 +01:00
Dario Sassi 64867f25dc EgtCAM5 :
- aggiunta funzione di callback OnTerminateProcess che viene chiamata prima di terminare con comando lua EgtCloseExe per permettere di sistemare lo stato.
2023-11-23 10:52:43 +01:00
Emmanuele Sassi 78a9b32973 - gestiti eventi del plugin
- gestita visibility del right panel tra draw e machining
- gestita assenza cartella plugin o nomi sbagliati
- gestita visibility dei comandi principali della TopCommandBar
2023-11-21 12:56:33 +01:00
Dario Sassi d210f63296 EgtCAM5 :
- differenziata icona per 64 bit da quella per 32 bit
- per il feedback migliorata selezione dei file con nome del progetto corrente o similare
- eliminata configurazione packages non utilizzata.
2023-11-13 16:35:51 +01:00
Dario Sassi 1273279c1f EgtCAM5 2.5j2 :
- aggiunti file 3dm a gestione drag.
2023-11-12 19:32:09 +01:00
Dario Sassi 978de597ad EgtCAM5 2.5k1 :
- ricompilazione con cambio versione e aggiornamento protezione mensile.
2023-11-06 19:51:12 +01:00
Emmanuele Sassi 75d05a8b31 - create tray top, bottom, left e right
- gestiti panel con Visibility
- gestiti elementi grafici in ProjectV con ItemsControl
- eliminato pannello Printing3d
- aggiunta gestione Plugin
- verifica bit per Plugin
2023-11-03 11:20:13 +01:00
Dario Sassi 045a7fa731 EgtCAM5 :
- modifiche a bottoni SpecialPanel per visualizzazione in Disegna/Lavora.
2023-10-09 13:08:46 +02:00
Dario Sassi 29b2b495c3 EgtCAM5 2.5j1 :
- aggiunta memorizzazione ultimo direttorio per progetti inseriti.
2023-10-02 16:08:55 +02:00
Dario Sassi 89a73457c7 EgtCAM5 2.5i6 :
- ricompilazione con cambio versione.
2023-09-27 23:41:19 +02:00
Dario Sassi 5f2b1adf98 EgtCAM5 2.5i5 :
- ricompilazione per cambio versione.
2023-09-21 16:15:34 +02:00
Dario Sassi ab11f069e9 EgtCAM5 :
- impostata creazione zip con encoding UTF8.
2023-09-14 18:33:36 +02:00
Dario Sassi 880dbeb7b9 EgtCAM5 :
- gestione abilitazione da bit di licenza delle lavorazioni avanzate (Sgrossature e Finiture Superfici, Lavorazioni 5 assi)
- gestione marcatura geometria mirror di lavorazioni in doppio.
2023-09-11 10:56:58 +02:00
Dario Sassi 6090527b2a EgtCAM5 2.5i1 :
- sostituita Ionic.Zip.dll con DotNetZip.dll (perchè precedente dll era ormai deprecata).
2023-09-05 17:08:13 +02:00
Dario Sassi 6dc81030c9 EgtCAM5 2.5h3 :
- in Modo Lavora (quando abilitati più gruppi di lavoro) con [+] nuovo gruppo vuoto e con Shift + [+] nuovo gruppo come copia del corrente.
2023-08-27 18:36:28 +02:00
Dario Sassi b889f75963 EgtCAM5 2.5h1 :
- ricompilazione con cambio versione.
2023-08-07 19:32:08 +02:00
DarioS ffd1c3d437 EgtCAM5 :
- aggiunta disabilitazione UpdateAllMachinings prima di Simulazione, Stima e Generazione da Ini ([Mach] AutoUpdateAllMachinings=0) da usare solo internamente per ripetere esattamente situazioni di clienti.
2023-07-19 09:56:25 +02:00
DarioS 87ddc23ecc EgtCAM5 2.5g1 :
- ricompilazione con cambio versione.
2023-07-07 17:09:26 +02:00
DarioS 6b9808027f EgtCAM5 2.5f2 :
- ricompilazione con cambio versione.
2023-06-19 08:27:56 +02:00
DarioS e9570187bb EgtCAM5 :
- aggiornato codice controllo mensile.
2023-06-12 09:19:51 +02:00
DarioS cfdf3b392e EgtCAM5 :
- in aggiungi o aggiorna una macchina ora nello zip di macchina è ammessa una parte aggiuntiva tra punti con la versione (tipo Macchina.25f1.zip).
2023-06-12 08:04:43 +02:00
DarioS c256a49bb2 EgtCAM5 :
- modificata OnMouseSelectingObj per selezione lavorazione da toolpath evitando entità multiple di una stessa lavorazione.
2023-06-05 17:08:10 +02:00
DarioS 3e50c6151b EgtCAM5 2.5f1 :
- eliminata doppia selezione in MachiningMode_IsChecked
- corretta gestione movimento grezzo insieme con ventose.
2023-06-05 14:31:05 +02:00
DarioS b8c1368154 EgtCAM5 2.5e3 :
- aggiunta gestione chiave di rete.
2023-05-30 17:10:34 +02:00
99 changed files with 1699 additions and 763 deletions
+12
View File
@@ -14,11 +14,23 @@ Public Class AboutBoxWndV
Dim sLeftDays As String = ""
Dim nLeftDays As Integer
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
Dim sAssStatus As String = " discontinued"
Dim nAssLeftDays As Integer
If EgtGetKeyAssLeftDays( nAssLeftDays) And nAssLeftDays >= 0 Then
If nAssLeftDays > 30 then
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
Else If nAssLeftDays > 0 then
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
Else
sAssStatus = "to be renewed by today"
End If
End If
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & IniFile.m_nInstance.ToString() &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "SupportPlane " & sAssStatus & Environment.NewLine
sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
+12
View File
@@ -0,0 +1,12 @@
<Grid x:Class="BottomTrayV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
DockPanel.Dock="Bottom">
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
IsToolBar="False"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False"
IsRightDockable="False" />
</Grid>
+3
View File
@@ -0,0 +1,3 @@
Public Class BottomTrayV
End Class
+1
View File
@@ -22,6 +22,7 @@ Module ConstGen
' File con dati di licenza
Public Const LIC_FILE_NAME As String = "EgtCAM5.lic"
Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key"
Public Const K_NESTKEY As String = "NestKey"
+6 -4
View File
@@ -18,6 +18,7 @@ Module ConstIni
Public Const S_GENERAL As String = "General"
Public Const K_DEBUG As String = "Debug"
Public Const K_LICENCE As String = "Licence"
Public Const K_NETKEY As String = "NetKey"
Public Const K_USERLEVEL As String = "UserLevel"
Public Const K_MAXINST As String = "MaxInstances"
Public Const K_INSTANCES As String = "Instances"
@@ -28,6 +29,7 @@ Module ConstIni
Public Const K_HIDEPLACE As String = "HidePlace"
Public Const K_LASTNGEDIR As String = "LastNgeDir"
Public Const K_LASTNGEOBJDIR As String = "LastNgeObjDir"
Public Const K_LASTNGEINSDIR As String = "LastNgeInsDir"
Public Const K_LASTLUADIR As String = "LastLuaDir"
Public Const K_LASTIMPDIR As String = "LastImpDir"
Public Const K_LASTEXPDIR As String = "LastExpDir"
@@ -37,13 +39,14 @@ Module ConstIni
Public Const K_TRANSFORM As String = "Transform"
Public Const K_ONLYDRAW As String = "OnlyDraw"
Public Const K_SUPPORT As String = "Support"
Public Const K_PLUGIN As String = "Plugin"
Public Const K_EXECUTE As String = "Execute"
Public Const S_LANGUAGES As String = "Languages"
Public Const K_LANGUAGE As String = "Language"
Public Const S_LUA As String = "Lua"
Public Const K_LIBSDIR As String = "LibsDir"
Public Const K_LIBSDIR64 As String = "LibsDir64"
Public Const K_BASELIB As String = "BaseLib"
Public Const K_BWSIM As String = "BWSim"
@@ -105,6 +108,7 @@ Module ConstIni
Public Const K_CNCFLAG As String = "CncFlag"
Public Const K_BTLFLAG As String = "BtlFlag"
Public Const K_BTLAUXDIR As String = "BtlAuxDir"
Public Const K_ADVFLAG As String = "AdvFlag"
Public Const S_EXPORT As String = "Export"
Public Const K_DXFFLAG As String = "DxfFlag"
@@ -119,7 +123,6 @@ Module ConstIni
Public Const S_BEAM As String = "Beam"
Public Const K_BEAMENABLE As String = "BtlEnable"
Public Const K_BEAMBASEDIR As String = "BaseDir"
Public Const K_BEAMBASEDIR64 As String = "BaseDir64"
Public Const K_BEAMBTLEXEC As String = "BtlExec"
Public Const K_BEAMBWEEXEC As String = "BweExec"
Public Const K_BEAMMACHINES As String = "Machines"
@@ -128,7 +131,6 @@ Module ConstIni
Public Const S_WALL As String = "Wall"
Public Const K_WALLENABLE As String = "BtlEnable"
Public Const K_WALLBASEDIR As String = "BaseDir"
Public Const K_WALLBASEDIR64 As String = "BaseDir64"
Public Const K_WALLBTLEXEC As String = "BtlExec"
Public Const K_WALLBWEEXEC As String = "BweExec"
Public Const K_WALLBUTTON As String = "Button"
@@ -168,7 +170,6 @@ Module ConstIni
Public Const S_MACH As String = "Mach"
Public Const K_MACHINESDIR As String = "MachinesDir"
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
Public Const K_TOOLMAKERSDIR64 As String = "ToolMakersDir64"
Public Const K_CURRMACH As String = "CurrMach"
Public Const K_SELGEOMSAWING As String = "SelGeomSawing"
Public Const K_SELGEOMDRILLING As String = "SelGeomDrilling"
@@ -183,6 +184,7 @@ Module ConstIni
Public Const K_MACHININGGROUP As String = "MachiningGroup"
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
Public Const K_AUTOUPDATEALLMACHININGS As String = "AutoUpdateAllMachinings"
Public Const S_SIMUL As String = "Simul"
Public Const K_SLIDERX As String = "SliderX"
+2
View File
@@ -33,7 +33,9 @@
Public Const K_SAWFINISHING As String = "SawFinishing"
Public Const K_GENMACHINING As String = "GenMachining"
Public Const K_CHISELING As String = "Chiseling"
Public Const K_SURFROUGHING As String = "SurfRoughing"
Public Const K_SURFFINISHING As String = "SurfFinishing"
Public Const K_5AXMACHINING As String = "5axMachining"
Public Const K_WATERJETTING As String = "WaterJetting"
Public Const K_SAWINGONARCS As String = "SawingOnArcs"
+35 -15
View File
@@ -1,9 +1,11 @@
<UserControl x:Class="DrawPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5">
<EgtFloating:EgtFloatingPanel x:Class="DrawPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
TitleBarOrientation="Vertical"
Visibility="{Binding DrawPanel_Visibility}">
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Expander Name="Draw2D" Style="{StaticResource ExpanderStyle}" Grid.Row="0"
@@ -72,17 +74,27 @@
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding TextToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding TextCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LinearDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding LinearDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinearDimension.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
<Button ToolTip="{Binding AngularDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding AngularDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/AngularDimension.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding DiamRadDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding DiamRadDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/DiametralDimension.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding TextToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding TextCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Expander Name="Draw3D" Style="{StaticResource ExpanderStyle}" Grid.Row="1"
Visibility="{Binding Draw3DVisibility}" IsExpanded="{Binding Draw3DIsExpanded}">
@@ -175,6 +187,11 @@
Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding StmMoveVertexFacetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveStmVertexFacetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/StmMoveVertex.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}">
@@ -192,8 +209,11 @@
Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button>
<Button Style="{StaticResource DrawPanelButton}"
Visibility="Hidden"/>
<Button ToolTip="{Binding ChangeStatusToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeStatusCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeStatus.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeColorToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}">
@@ -352,4 +372,4 @@
</Interactivity:Interaction.Behaviors>
</StackPanel>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+165 -9
View File
@@ -97,12 +97,22 @@ Public Class DrawPanelVM
End Property
Public ReadOnly Property TextToolTip As String
Get
Return EgtMsg( 5214)
Return EgtMsg( 5214) ' Testo<br/>Testo Avanzato (Shift)
End Get
End Property
Public ReadOnly Property LinearDimensionToolTip As String
Get
Return EgtMsg( 5155)
Return EgtMsg( 5155) ' Quota Lineare<br/>Quota Allineata (Shift)
End Get
End Property
Public ReadOnly Property AngularDimensionToolTip As String
Get
Return EgtMsg( 5167) ' Quota Angolare<br/>Quota Angolare Avanzata (Shift)
End Get
End Property
Public ReadOnly Property DiamRadDimensionToolTip As String
Get
Return EgtMsg( 5168) ' Quota Diametrale<br/>Quota Radiale (Shift)
End Get
End Property
@@ -151,6 +161,11 @@ Public Class DrawPanelVM
Return EgtMsg( 5165) 'Approssima Superfici e Regioni Piane
End Get
End Property
Public ReadOnly Property StmMoveVertexFacetToolTip As String
Get
Return EgtMsg( 5166) 'Muovi Vertice di Superficie<br/>Muovi Faccia di Superficie (Shift)
End Get
End Property
Public ReadOnly Property ExtractSurfFacetToolTip As String
Get
Return EgtMsg( 5158) 'Estrai Faccia da Superficie
@@ -202,6 +217,12 @@ Public Class DrawPanelVM
Return EgtMsg(MSG_DRAWPANEL + 24)
End Get
End Property
Public ReadOnly Property ChangeStatusToolTip As String
Get
Return EgtMsg(5250)
End Get
End Property
Public ReadOnly Property ChangeAlphaToolTip As String
Get
Return EgtMsg(MSG_DRAWPANEL + 25)
@@ -393,6 +414,18 @@ Public Class DrawPanelVM
End Set
End Property
Private m_DrawPanel_Visibility As Visibility
Public ReadOnly Property DrawPanel_Visibility As Visibility
Get
Return m_DrawPanel_Visibility
End Get
End Property
Friend Sub SetDrawPanelVisibility(bValue As Boolean)
m_DrawPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
OnPropertyChanged(NameOf(DrawPanel_Visibility))
End Sub
#Region "Button state"
Private m_bLayerOk As Boolean
@@ -443,6 +476,8 @@ Public Class DrawPanelVM
Private m_cmdPolygonSide As ICommand
Private m_cmdText As ICommand
Private m_cmdLinDim As ICommand
Private m_cmdAngDim As ICommand
Private m_cmdDiamRadDim As ICommand
Private m_cmdModifyCurve As ICommand
Private m_cmdAddPointCurve As ICommand
Private m_cmdPlane As ICommand
@@ -454,6 +489,7 @@ Public Class DrawPanelVM
Private m_cmdMergeSurf As ICommand
Private m_cmdExplodeSurf As ICommand
Private m_cmdApproxSurf As ICommand
Private m_cmdMoveStmVertexFacet As ICommand
Private m_cmdExtractSurfFacet As ICommand
Private m_cmdInvertSurf As ICommand
Private m_cmdExtractLoops As ICommand
@@ -464,6 +500,7 @@ Public Class DrawPanelVM
Private m_cmdIntersectSurfSurf As ICommand
Private m_cmdDelete As ICommand
Private m_cmdChangeLayer As ICommand
Private m_cmdChangeStatus As ICommand
Private m_cmdChangeAlpha As ICommand
Private m_cmdResetColor As ICommand
Private m_cmdChangeColor As ICommand
@@ -702,7 +739,11 @@ Public Class DrawPanelVM
''' Execute the Arc3P. This method is invoked by the Arc3PCommand.
''' </summary>
Public Sub Arc3P(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC3P)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC2PR)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC3P)
End If
End Sub
#End Region ' Arc3PCommand
@@ -725,13 +766,12 @@ Public Class DrawPanelVM
''' Execute the ArcPDP. This method is invoked by the ArcPDPCommand.
''' </summary>
Public Sub ArcPDP(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Map.refProjectVM.GetController.SetContinue()
End If
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
Else
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPVP)
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Map.refProjectVM.GetController.SetContinue()
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
End If
End Sub
@@ -860,6 +900,60 @@ Public Class DrawPanelVM
#End Region ' LinearDimensionCommand
#Region "AngularDimensionCommand"
''' <summary>
''' Returns a command that do Angular Dimension.
''' </summary>
Public ReadOnly Property AngularDimensionCommand As ICommand
Get
If m_cmdAngDim Is Nothing Then
m_cmdAngDim = New RelayCommand(AddressOf AngularDimension)
End If
Return m_cmdAngDim
End Get
End Property
''' <summary>
''' Execute the AngularDimension. This method is invoked by the AngDimCommand.
''' </summary>
Public Sub AngularDimension(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ANGULARDIMENSIONPLUS)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ANGULARDIMENSION)
End If
End Sub
#End Region ' AngularDimensionCommand
#Region "DiamRadDimensionCommand"
''' <summary>
''' Returns a command that do DiamRad Dimension.
''' </summary>
Public ReadOnly Property DiamRadDimensionCommand As ICommand
Get
If m_cmdDiamRadDim Is Nothing Then
m_cmdDiamRadDim = New RelayCommand(AddressOf DiamRadDimension)
End If
Return m_cmdDiamRadDim
End Get
End Property
''' <summary>
''' Execute the DiamRadDimension. This method is invoked by the DiamRadDimCommand.
''' </summary>
Public Sub DiamRadDimension(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.RADIALDIMENSION)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.DIAMETRALDIMENSION)
End If
End Sub
#End Region ' DiamRadDimensionCommand
#Region "ModifyCurve"
''' <summary>
@@ -1183,6 +1277,33 @@ Public Class DrawPanelVM
#End Region ' ApproxSurfCommand
#Region "MoveStmVertexFacetCommand"
''' <summary>
''' Returns a command that do MoveStmVertex.
''' </summary>
Public ReadOnly Property MoveStmVertexFacetCommand As ICommand
Get
If m_cmdMoveStmVertexFacet Is Nothing Then
m_cmdMoveStmVertexFacet = New RelayCommand(AddressOf MoveStmVertexFacet)
End If
Return m_cmdMoveStmVertexFacet
End Get
End Property
''' <summary>
''' Execute the MoveStmVertexFacet. This method is invoked by the MoveStmVertexFacetCommand.
''' </summary>
Public Sub MoveStmVertexFacet(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MOVESURFFACET)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MOVESURFVERTEX)
End If
End Sub
#End Region ' MoveStmVertexFacetCommand
#Region "ExtractSurfFacetCommand"
''' <summary>
@@ -1426,6 +1547,41 @@ Public Class DrawPanelVM
#End Region ' ChangeLayerCommand
#Region "ChangeStatusCommand"
''' <summary>
''' Returns a command that do ChangeStatus.
''' </summary>
Public ReadOnly Property ChangeStatusCommand As ICommand
Get
If m_cmdChangeStatus Is Nothing Then
m_cmdChangeStatus = New RelayCommand(AddressOf ChangeStatus)
End If
Return m_cmdChangeStatus
End Get
End Property
''' <summary>
''' Execute the ChangeStatus. This method is invoked by the ChangeStatusCommand.
''' </summary>
Public Sub ChangeStatus(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SELPART)
Map.refProjectVM.GetController.SetLastBoolean( True)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
ElseIf (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SELLAYER)
Map.refProjectVM.GetController.SetLastBoolean( True)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
Else
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SEL)
Map.refProjectVM.GetController.SetLastBoolean( False)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
End If
End Sub
#End Region ' ChangeStatusCommand
#Region "ChangeAlphaCommand"
''' <summary>
+67 -12
View File
@@ -97,6 +97,9 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="DotNetZip">
<HintPath>..\..\EgtProg\EgtCAM5\DotNetZip.dll</HintPath>
</Reference>
<Reference Include="EgtUILib, Version=2.4.6.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
@@ -109,13 +112,11 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
</Reference>
<Reference Include="Ionic.Zip">
<HintPath>..\..\EgtProg\EgtCAM5\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\EgtCAM5\Microsoft.Expression.Interactions.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
@@ -153,11 +154,18 @@
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb">
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="BottomTray\BottomTrayV.xaml.vb">
<DependentUpon>BottomTrayV.xaml</DependentUpon>
</Compile>
<Compile Include="CurrSetUp\CurrSetUpV.xaml.vb">
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
</Compile>
<Compile Include="CurrSetUp\CurrSetUpVM.vb" />
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
<DependentUpon>LeftTrayV.xaml</DependentUpon>
</Compile>
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
<Compile Include="MEFPlugin\MefPlugin.vb" />
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpanderV.xaml.vb">
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
</Compile>
@@ -227,6 +235,12 @@
<Compile Include="OptionsWindow\MachineBox.xaml.vb">
<DependentUpon>MachineBox.xaml</DependentUpon>
</Compile>
<Compile Include="RightTray\RightTrayV.xaml.vb">
<DependentUpon>RightTrayV.xaml</DependentUpon>
</Compile>
<Compile Include="SceneContentControl\SceneContentControlV.xaml.vb">
<DependentUpon>SceneContentControlV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUpDb\SetUpDbV.xaml.vb">
<DependentUpon>SetUpDbV.xaml</DependentUpon>
</Compile>
@@ -236,10 +250,6 @@
<DependentUpon>SetUpV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUp\SetUpVM.vb" />
<Compile Include="Special-3dPrinting\Printing3DPanelV.xaml.vb">
<DependentUpon>Printing3DPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-3dPrinting\Printing3DPanelVM.vb" />
<Compile Include="Special-BeamWall\Beam.vb" />
<Compile Include="Command\Command.vb" />
<Compile Include="Command\RelayCommand.vb" />
@@ -278,7 +288,11 @@
</Compile>
<Compile Include="StatusBar\MyStatusBarVM.vb" />
<Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" />
<Compile Include="TopTray\TopTrayV.xaml.vb">
<DependentUpon>TopTrayV.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Analyze.vb" />
<Compile Include="Utility\BasePanelVM.vb" />
<Compile Include="Utility\BindingProxy.vb" />
<Compile Include="Utility\Map.vb" />
<Compile Include="Internals\MruList.vb" />
@@ -416,6 +430,10 @@
<Compile Include="Utility\Utility.vb" />
<Compile Include="Utility\VMBase.vb" />
<Compile Include="ValidationGroup.vb" />
<Compile Include="WinFormPluginControl\WinFormPluginControlVM.vb" />
<Compile Include="WinFormPluginControl\WinFormPluginControlV.xaml.vb">
<DependentUpon>WinFormPluginControlV.xaml</DependentUpon>
</Compile>
<Page Include="AboutBoxWindow\AboutBoxView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -424,6 +442,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="BottomTray\BottomTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="CurrSetUp\CurrSetUpV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -432,6 +454,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LeftTray\LeftTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MachOptionsWindow\MachOptionV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -520,6 +546,14 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="RightTray\RightTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SceneContentControl\SceneContentControlV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SetUpDb\SetUpDbV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -528,10 +562,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-3dPrinting\Printing3DPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Special-BeamWall\BeamWallPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -588,6 +618,10 @@
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="TopTray\TopTrayV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Utility\Dictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -680,6 +714,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WinFormPluginControl\WinFormPluginControlV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Import Include="System.Linq" />
@@ -729,7 +767,6 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<AppDesigner Include="My Project\" />
<None Include="packages.config" />
<Resource Include="Resources\Fonts\gothic.ttf" />
</ItemGroup>
<ItemGroup>
@@ -962,6 +999,24 @@
<ItemGroup>
<Resource Include="Resources\TopCommandBar\Print.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtCAM5_64.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\StmMoveVertex.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\AngularDimension.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\DiametralDimension.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ChangeStatus.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\GridViewPanel\CplaneINVERT.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="ExecutePanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<EgtFloating:EgtFloatingPanel x:Class="ExecutePanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding ExecutePanel_Visibility}">
<StackPanel Orientation="Horizontal">
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
@@ -13,4 +15,4 @@
</Button>
</StackPanel>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+17
View File
@@ -12,6 +12,18 @@ Public Class ExecutePanelVM
End Get
End Property
Private m_ExecutePanel_Visibility As Visibility
Public ReadOnly Property ExecutePanel_Visibility As Visibility
Get
Return m_ExecutePanel_Visibility
End Get
End Property
Friend Sub SetExecutePanelVisibility(bValue As Boolean)
m_ExecutePanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
OnPropertyChanged(NameOf(ExecutePanel_Visibility))
End Sub
' Definizione comandi
Private m_cmdExec As ICommand
Private Shared m_cmdOpenMruScript As ICommand
@@ -28,6 +40,11 @@ Public Class ExecutePanelVM
#End Region ' FIELDS & PROPERTIES
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefExecutePanelVM(Me)
End Sub
#Region "COMMANDS"
#Region "ExecCommand"
+5 -5
View File
@@ -6,20 +6,20 @@
<Button Command="{Binding CPlaneTopCommand}" ToolTip="{Binding CPlaneTopToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneTOP.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneBottomCommand}" ToolTip="{Binding CPlaneBottomToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneBOTTOM.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneFrontCommand}" ToolTip="{Binding CPlaneFrontToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneFRONT.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneRightCommand}" ToolTip="{Binding CPlaneRightToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneRIGHT.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneBackCommand}" ToolTip="{Binding CPlaneBackToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneBACK.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneLeftCommand}" ToolTip="{Binding CPlaneLeftToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneLEFT.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneBottomCommand}" ToolTip="{Binding CPlaneBottomToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneBOTTOM.png" Stretch="Uniform"/>
<Button Command="{Binding CPlaneRightCommand}" ToolTip="{Binding CPlaneRightToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneRIGHT.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneElevationCommand}" ToolTip="{Binding CPlaneElevationToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
-5
View File
@@ -12,13 +12,8 @@ Public Class GridPanelVM
Private m_cmdCPlaneBack As ICommand
Private m_cmdCPlaneLeft As ICommand
Private m_cmdCPlaneBottom As ICommand
Private m_cmdCPlaneView As ICommand
Private m_cmdCPlaneElevation As ICommand
Private m_cmdCPlaneOrigin As ICommand
Private m_cmdCPlaneRotate As ICommand
Private m_cmdCPlane3P As ICommand
Private m_cmdCPlanePerpObj As ICommand
Private m_cmdCPlaneObj As ICommand
#Region "ToolTip"
+9
View File
@@ -0,0 +1,9 @@
<Grid x:Class="LeftTrayV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
DockPanel.Dock="Left">
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
</Grid>
+3
View File
@@ -0,0 +1,3 @@
Public Class LeftTrayV
End Class
+74
View File
@@ -0,0 +1,74 @@
Imports System.ComponentModel.Composition
Imports System.ComponentModel.Composition.hosting
Public Class MEFLoader
Private importers As Dictionary(Of String, List(Of Object)) = New Dictionary(Of String, List(Of Object))()
Public Overridable Function LoadByTag(Of T)(ByVal path As String, ByVal tag As String) As ICollection(Of T)
Dim importer = GetImporter(Of T)(path)
Return importer.LoadByMEF(path, tag)
End Function
Protected Function GetImporter(Of T)(ByVal path As String) As MEFImporter(Of T)
Dim importerList = GetImporterList(path)
Dim importer = importerList.OfType(Of MEFImporter(Of T))().FirstOrDefault()
If importer Is Nothing Then
importer = New MEFImporter(Of T)(path)
importerList.Add(importer)
End If
Return importer
End Function
Protected Function GetImporterList(ByVal path As String) As List(Of Object)
If importers.ContainsKey(path) = False Then importers.Add(path, New List(Of Object)())
Return importers(path)
End Function
Public Overridable Function LoadByType(Of T)(ByVal path As String) As ICollection(Of T)
Return LoadByTag(Of T)(path, String.Empty)
End Function
End Class
Public Interface IMetadata
ReadOnly Property Name As String
End Interface
Public Class MEFImporter(Of T)
<ImportMany(AllowRecomposition:=True)>
Public Property [imports] As IEnumerable(Of Lazy(Of T, IMetadata))
Private Sub New()
End Sub
Public Sub New(ByVal path As String)
Me.New()
directoryCatalog = New DirectoryCatalog(path)
End Sub
Protected directoryCatalog As DirectoryCatalog = Nothing
Protected Sub DoImport(ByVal path As String)
Dim catalog = New AggregateCatalog()
catalog.Catalogs.Add(directoryCatalog)
Dim container As CompositionContainer = New CompositionContainer(catalog)
container.ComposeParts(Me)
End Sub
Public Function LoadByMEF(ByVal path As String, ByVal name As String) As ICollection(Of T)
Dim res = New List(Of T)()
DoImport(path)
For Each [module] As Lazy(Of T, IMetadata) In [imports]
If [module].Metadata.Name = name OrElse String.IsNullOrEmpty(name) Then
res.Add([module].Value)
End If
Next
Return res
End Function
End Class
+65 -20
View File
@@ -1,5 +1,8 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtCAM5.MyMachinePanelVM
Imports System.Security.Cryptography
Imports System.Windows.Forms.AxHost
Imports EgtUILib
Imports EgtWPFLib5
@@ -95,7 +98,7 @@ Public Class MyMachGroupPanelVM
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
Else
Else
Return -2
End If
End If
@@ -115,10 +118,12 @@ Public Class MyMachGroupPanelVM
End If
End Function
Private Function ExecScript(sScriptPath As String, nGroupId As Integer, nPartId As Integer) As Boolean
Private Function ExecScript(sScriptPath As String, nGroupId As Integer, nPartId As Integer, nInd As Integer, sParts As String) As Boolean
EgtLuaCreateGlobTable("DISP")
EgtLuaSetGlobIntVar("DISP.GROUPID", nGroupId)
EgtLuaSetGlobIntVar("DISP.PARTID", nPartId)
EgtLuaSetGlobIntVar("DISP.IND", nInd)
EgtLuaSetGlobStringVar("DISP.PARTS", sParts)
If Not EgtLuaExecFile(sScriptPath) Then
EgtOutLog("Error executing disposition init script " & sScriptPath)
MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 2) & " " & sScriptPath, EgtMsg(MSG_DISPOSITIONERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
@@ -161,10 +166,25 @@ Public Class MyMachGroupPanelVM
If bWithScript Then
' Rendo corrente il gruppo di lavoro
EgtSetCurrMachGroup(nGroupId)
' Creo grezzo e posiziono i pezzi
' Recupero i pezzi già inseriti
Dim sParts As String = ""
Dim nInd As Integer = 0
Dim nRawId As Integer = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
Dim nPartId As Integer = EgtGetFirstPartInRawPart( nRawId)
While nPartId <> GDB_ID.NULL
nInd += 1
sParts &= nInd.ToString() & ","
nPartId = EgtGetNextPartInRawPart( nPartId)
End While
nRawId = EgtGetNextRawPart( nRawId)
End While
' Creo grezzi e posiziono i pezzi
Dim bOk As Boolean = True
sParts &= String.Join( ",", PartList)
For Each Part In PartList
If Not ExecScript(sInitScriptPath, nGroupId, Part) Then bOk = False
nInd += 1
If Not ExecScript(sInitScriptPath, nGroupId, Part, nInd, sParts) Then bOk = False
Next
Return bOk
Else
@@ -193,14 +213,18 @@ Public Class MyMachGroupPanelVM
Return False
End If
If bWithScript Then
' Creo grezzo e posiziono i pezzi
Dim bOk As Boolean = True
For Each Part In PartList
If Not ExecScript(sInitScriptPath, nGroupId, Part) Then bOk = False
Next
' Gestione ingresso senza pezzi
If PartList.Count() = 0 Then
If Not ExecScript(sInitScriptPath, nGroupId, GDB_ID.NULL) Then bOk = False
' Creo grezzi e posiziono i pezzi
If PartList.Count() > 0 then
Dim nInd As Integer = 0
Dim sParts As String = String.Join( ",", PartList)
For Each Part In PartList
nInd += 1
If Not ExecScript(sInitScriptPath, nGroupId, Part, nInd, sParts) Then bOk = False
Next
' altrimenti, ingresso senza pezzi
Else
If Not ExecScript(sInitScriptPath, nGroupId, GDB_ID.NULL, 0, "") Then bOk = False
End If
If Not bOk Then
EgtResetCurrMachGroup()
@@ -309,15 +333,36 @@ Public Class MyMachGroupPanelVM
#End Region
Public Overrides Sub AddMachGroup()
'If AddNewMachGroup() Then
' Dim sMachName As String = String.Empty
' EgtGetMachGroupName(EgtGetCurrMachGroup(), sMachName)
' MachGroupList.Add(sMachName)
' SelectedMachGroup = sMachName
' EgtDraw()
' Map.refOperationsListExpanderVM.LoadOperationList(GDB_ID.NULL)
' Map.refOperationsListExpanderVM.UpdateCurrentMachine()
'End If
Dim nNewMachGrpId As Integer = GDB_ID.NULL
Dim sNewMachGrpName As String = ""
' Se premuto Shift, copio il gruppo corrente
If (Keyboard.Modifiers And Input.ModifierKeys.Shift) = Input.ModifierKeys.Shift Then
' Eseguo una copia del gruppo corrente
Dim sMachGrpName As String = ""
If Not EgtGetMachGroupName(EgtGetCurrMachGroup(), sMachGrpName) Then Return
sNewMachGrpName = "Mach_1"
EgtGetMachGroupNewName(sNewMachGrpName)
nNewMachGrpId = EgtCopyMachGroup(sMachGrpName, sNewMachGrpName)
' altrimenti ne aggiungo uno vuoto
Else
Dim vPart As New List(Of Integer)
AddNewMachGroup(nNewMachGrpId, vPart)
EgtGetMachGroupName(nNewMachGrpId, sNewMachGrpName)
End If
' Se creazione non riuscita, esco subito
If nNewMachGrpId = GDB_ID.NULL Then Return
' altrimenti sistemo interfaccia
Dim sMachine As String = String.Empty
EgtGetMachGroupMachineName(nNewMachGrpId, sMachine)
Dim machGroup As New MachGroup(nNewMachGrpId, sNewMachGrpName, sMachine)
MachGroupList.Add(machGroup)
SelectedMachGroup = machGroup
Map.refMachGroupPanelVM.SetMachGroupState(True)
EgtZoom(ZM.ALL)
End Sub
Public Overrides Sub RemoveMachGroup()
+8 -2
View File
@@ -15,7 +15,7 @@
</EgtWPFLib5:EgtCustomWindow.Resources>
<Grid Margin="10">
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
@@ -27,6 +27,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5">
@@ -56,7 +57,12 @@
</ComboBox>
</UniformGrid>
<UniformGrid Grid.Row="4" Columns="2">
<UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5">
<TextBlock Text="{Binding ApproxLinTolMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ApproxLinTol}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="5" Columns="2">
<TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0"
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
+24
View File
@@ -48,6 +48,21 @@ Public Class MachOptionVM
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_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)
Get
@@ -106,6 +121,11 @@ Public Class MachOptionVM
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9)
End Get
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
Get
@@ -141,6 +161,10 @@ Public Class MachOptionVM
Dim nVal As Integer = 0
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
' Leggo tolleranza lineare di approssimazione
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal)
m_sApproxLinTol = LenToString(dVal, 4)
' Riempio lista attrezzaggi salvati
m_ArchivedSetUpList.Add(String.Empty)
If Directory.Exists(IniFile.m_sCurrMachSetUpDirPath) Then
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="MachinePanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<EgtFloating:EgtFloatingPanel x:Class="MachinePanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding MachinePanel_Visibility}">
<StackPanel Orientation="Horizontal">
<!--Combobox per selezionare la macchina corrente-->
@@ -32,4 +34,4 @@
</Button>
</StackPanel>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+12
View File
@@ -82,6 +82,17 @@ Public Class MyMachinePanelVM
End Set
End Property
Private m_MachinePanel_Visibility As Visibility
Public ReadOnly Property MachinePanel_Visibility As Visibility
Get
Return m_MachinePanel_Visibility
End Get
End Property
Friend Sub SetMachinePanelVisibility(bValue As Boolean)
m_MachinePanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(MachinePanel_Visibility))
End Sub
#Region "Messages"
Public ReadOnly Property ToolDBMsg As String
@@ -283,6 +294,7 @@ Public Class MyMachinePanelVM
MachDbWindowV.Width = 1024
MachDbWindowV.Owner = Application.Current.MainWindow
MachDbWindowV.ShowDialog()
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
End If
End Sub
+1 -1
View File
@@ -4,7 +4,7 @@
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:local="clr-namespace:EgtCAM5"
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
Title="{Binding Title}" Icon="{Binding IconSource}"
TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32"
BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2"
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
+97 -18
View File
@@ -4,6 +4,7 @@ Imports System.Windows.Threading
Imports System.Runtime.InteropServices
Imports System.Math
Imports EgtUILib
Imports EgtWPFLib5
Public Class MainWindowVM
Inherits ViewModelBase
@@ -14,6 +15,7 @@ Public Class MainWindowVM
Private m_objMutex As Mutex
Private m_sDataRoot As String = String.Empty
Private m_sConfigDir As String = String.Empty
Private m_OnTerminateProcessCallback As New OnTerminateProcessCallback(AddressOf OnTerminateProcess)
' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY
@@ -93,6 +95,16 @@ Public Class MainWindowVM
End Get
End Property
Public ReadOnly Property IconSource As String
Get
#If PLATFORM = "x64" Then
Return "/Resources/EgtCAM5_64.ico"
#else
Return "/Resources/EgtCAM5.ico"
#End If
End Get
End Property
#End Region
#Region "CONSTRUCTOR"
@@ -191,6 +203,19 @@ Public Class MainWindowVM
End If
End Sub
Private Function OnTerminateProcess( nExitCode As Integer) As Boolean
' Aggiorno istanze usate
m_objMutex.WaitOne(1000)
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
nTmp -= (1 << (IniFile.m_nInstance - 1))
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
m_objMutex.ReleaseMutex()
' Rilascio mutex
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
' Dichiaro di procedere con la terminazione del programma
Return True
End Function
#End Region ' CloseApplicationCommand
#Region "cmdMainWindow_ContentRendered"
@@ -332,33 +357,40 @@ Public Class MainWindowVM
' Impostazione direttorio toolmakers
Dim sToolMakersDir As String = String.Empty
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", sToolMakersDir)
#If PLATFORM = "x64" Then
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR64, sToolMakersDir, sToolMakersDir)
#End If
If Not String.IsNullOrWhiteSpace( sToolMakersDir) Then
If Not String.IsNullOrWhiteSpace(sToolMakersDir) Then
IniFile.m_sToolMakersDir = sToolMakersDir
Else
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
End If
End If
' Verifico indice di istanza
ManageInstance()
' Imposto tipo di chiave
EgtSetLockType(KEY_TYPE.HW)
' Leggo e imposto chiave di protezione ed eventuale chiave nesting
Dim sLicFileName As String = ""
GetPrivateProfileString( S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
Dim sKey As String = ""
EgtUILib.GetPrivateProfileString( S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey( sKey)
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
Dim sNestKey As String = ""
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNestKey( sNestKey)
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNestKey(sNestKey)
' Impostazioni per chiave di rete
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
EgtSetNetHwKey(bNetKey)
Dim sLockId As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
If Not String.IsNullOrEmpty(sLockId) Then
EgtSetLockId(sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2505, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2505, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2604, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2604, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto abilitazione lavorazioni avanzate
MachineUtility.EnableAdvMachinings = IniFile.IsKeyEnabledAdvancedMachining()
' Inizializzazione generale di EgtInterface
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
@@ -368,9 +400,10 @@ Public Class MainWindowVM
IniFile.m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", IniFile.m_nInstance.ToString())
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & IniFile.m_nInstance.ToString() &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & DebugLevel().ToString() & vbLf &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & DebugLevel().ToString() & vbLf &
My.Application.Info.Title.ToString() & " ver. " & m_sVersion
EgtInit(m_nDebug, IniFile.m_sLogFile, sLogMsg)
EgtSetOnTerminateProcess( m_OnTerminateProcessCallback)
EgtSetUserLevel( IniFile.m_nUserLevel)
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
Dim sMsgDir As String = String.Empty
@@ -400,9 +433,6 @@ Public Class MainWindowVM
' Imposto dir di default per libreria Lua e lancio libreria di base
Dim sLuaLibsDir As String = String.Empty
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
#If PLATFORM = "x64" Then
GetPrivateProfileString(S_LUA, K_LIBSDIR64, sLuaLibsDir, sLuaLibsDir)
#End If
EgtSetLuaLibs(sLuaLibsDir)
Dim sLuaBaseLib As String = String.Empty
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
@@ -544,7 +574,7 @@ Public Class MainWindowVM
WritePrivateProfileString(S_GRID, K_SNAPSTEPINCH, DoubleToString(IniFile.dSnapStepInch, 4))
End If
' gestisco la chiusura di DrawPanelVM
If Not IniFile.m_bFailedRun Then
If Not IniFile.m_bFailedRun AndAlso Not IsNothing(Map.refDrawPanelVM) Then
WritePrivateProfileString(S_GENERAL, K_DRAW2D, If(Map.refDrawPanelVM.Draw2DIsExpanded, "1", "0"))
WritePrivateProfileString(S_GENERAL, K_DRAW3D, If(Map.refDrawPanelVM.Draw3DIsExpanded, "1", "0"))
WritePrivateProfileString(S_GENERAL, K_MODIFY, If(Map.refDrawPanelVM.ModifyIsExpanded, "1", "0"))
@@ -556,7 +586,7 @@ Public Class MainWindowVM
#Region "Events"
Private Sub MainWindow_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs)
Private Sub MainWindow_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
' Con ESC esco dall'azione corrente
If e.Key = Key.Escape Then
' reset Azione corrente
@@ -582,4 +612,53 @@ Public Class MainWindowVM
#End Region
#Region "MEF Plugin"
Private m_Loader As MEFLoader = New MEFLoader()
Private Function GetPathByName(ByVal name As String) As String
Dim PluginNameSplit() As String = name.Split("."c)
Dim res = Map.refMainWindowVM.m_sDataRoot & "\Plugin\" & PluginNameSplit(0)
Return res
End Function
Friend Function GetControlByName(Of T)(Element As PluginControl) As Panel
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(Element.Name), Element.Name).FirstOrDefault()
Dim PluginPanel As Panel = Nothing
Select Case PlugInControl.GetType().BaseType.FullName
Case GetType(Panel).FullName, GetType(Grid).FullName
PluginPanel = TryCast(PlugInControl, Panel)
Case GetType(Forms.UserControl).FullName
Dim PluginUserControl As Forms.UserControl = TryCast(PlugInControl, Forms.UserControl)
Dim PluginControlInterface As IPluginControl = TryCast(PlugInControl, IPluginControl)
If Not IsNothing(PluginControlInterface) Then
AddHandler PluginControlInterface.UpdateProjectName, AddressOf UpdateProjectName
AddHandler PluginControlInterface.UpdateUI, AddressOf UpdateUI
End If
PluginPanel = New WinFormPluginControlV(New WinFormPluginControlVM(PluginUserControl, Element.ViewPanelState))
End Select
Return PluginPanel
End Function
Friend Function GetConfigData(Of T)(ByVal name As String) As IPluginConfigData
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(name), name).FirstOrDefault()
Dim PluginConfigData As IPluginConfigData = Nothing
Dim v = PlugInControl.GetType()
If PlugInControl.GetType().Name = PLUGIN_CONFIGURATION_DATA Then
Return TryCast(PlugInControl, IPluginConfigData)
Else
Return Nothing
End If
End Function
Private Sub UpdateProjectName(ProjectName As String)
Map.refMainWindowVM.Title = ProjectName & " - EgtCAM5"
End Sub
Private Sub UpdateUI()
Map.refProjectVM.UpdateProjectUI(True)
End Sub
#End Region ' MEF Plugin
End Class
+3 -3
View File
@@ -30,7 +30,7 @@ Imports System.Windows
#End If
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtCAM5")>
<Assembly: AssemblyCopyright("Copyright © 2016-2023 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2016-2024 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.5.2")>
<Assembly: AssemblyFileVersion("2.5.5.2")>
<Assembly: AssemblyVersion("2.6.4.2")>
<Assembly: AssemblyFileVersion("2.6.4.2")>
@@ -93,7 +93,7 @@ Public Class LayerTreeViewItem
EgtGetStatus(Node.Id, nStat)
If value AndAlso nStat <> GDB_ST.ON_ Then
EgtSetStatus(Node.Id, GDB_ST.ON_)
ElseIf nStat <> GDB_ST.OFF Then
ElseIf Not value AndAlso nStat <> GDB_ST.OFF Then
EgtSetStatus(Node.Id, GDB_ST.OFF)
End If
End If
@@ -107,24 +107,6 @@ Public Class EstimationsExpanderVM
Return True
End Function
Private Function UpdateAllMachinings() As Boolean
' Eseguo ricalcolo
Dim bModified As Boolean = EgtGetModified()
Dim sErr As String = String.Empty
Dim bOk As Boolean = EgtApplyAllMachinings(False, False, sErr)
' In caso di errori, li segnalo
If Not bOk Then
If Not String.IsNullOrEmpty(sErr) Then
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If
If Not bModified Then EgtResetModified()
Return bOk
End Function
Public Overrides Function GetEstimationFileName(bAskSave As Boolean, ByRef sEstFile As String, ByRef sInfo As String) As Boolean
Dim bOk As Boolean = True
' Recupero e verifico la path del progetto corrente
@@ -177,7 +159,7 @@ Public Class EstimationsExpanderVM
' Recupero la fase corrente
Dim nPhase As Integer = EgtGetCurrPhase()
' Aggiorno le lavorazioni
If Not UpdateAllMachinings() Then
If Not Map.refSimulationExpanderVM.UpdateAllMachinings() Then
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
Return False
End If
@@ -15,8 +15,6 @@
<Expander Header="RawPart" IsExpanded="{Binding RawPartIsExpanded}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<!--<CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/>-->
<!--ContentPresenter that contains the RawPart options -->
<ContentPresenter Name="RawPartOptions" Content="{Binding RawPartOptions ,Mode=OneWay}"/>
</StackPanel>
</Expander>
@@ -59,7 +59,7 @@ Public Class DispositionParameterExpanderVM
PartIsExpanded = False
FixtureIsExpanded = False
' verifico se è attiva l'opzione muovi con ventose
If m_MoveWithFixture Then
If Map.refRawPartOptionVM.MoveWithFixture() Then
' Abilito la selezione dei RawPart con ventose
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
Else
@@ -168,42 +168,6 @@ Public Class DispositionParameterExpanderVM
End Set
End Property
Private m_MoveWithFixture As Boolean = False
Public Property MoveWithFixture As Boolean
Get
Return m_MoveWithFixture
End Get
Set(value As Boolean)
If value <> m_MoveWithFixture Then
If value Then
' Abilito la selezione di RawPart con autoselezione delle sue ventose
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
' Seleziono le ventose associate ad uno dei grezzi selezionati
' ciclo sui grezzi selezionati
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
While nSelRawPartId <> GDB_ID.NULL
' seleziono i sottopezzi del grezzo
DispositionUtility.SelectRawPartFixture(nSelRawPartId)
nSelRawPartId = EgtGetNextSelectedObj()
End While
Else
' Abilito la selezione di RawPart
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
' ciclo sui grezzi selezionati
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
While nSelRawPartId <> GDB_ID.NULL
' deseleziono i sottopezzi del grezzo
DispositionUtility.DeselectRawPartFixture(nSelRawPartId)
nSelRawPartId = EgtGetNextSelectedObj()
End While
End If
EgtDraw()
m_MoveWithFixture = value
OnPropertyChanged("MoveWithFixture")
End If
End Set
End Property
Private m_InputValue As String
Public Property InputValue As String
Get
@@ -315,8 +279,7 @@ Public Class DispositionParameterExpanderVM
' Abilito la selezione delle Fixture
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.FIXTURE
End Select
m_MoveWithFixture = False
OnPropertyChanged("MoveWithFixture")
Map.refRawPartOptionVM.SetMoveWithFixture(False)
Map.refFixtureParametersVM.UpdateFixtureTypeList()
End Sub
@@ -1,4 +1,5 @@
Imports EgtUILib
Imports System.ComponentModel
Imports EgtUILib
Public Class RawPartOptionVM
Inherits ViewModelBase
@@ -38,6 +39,11 @@ Public Class RawPartOptionVM
End If
End Set
End Property
friend Sub SetMoveWithFixture(value As Boolean)
m_MoveWithFixture=value
OnPropertyChanged(NameOf(MoveWithFixture))
End Sub
Private m_bRawPartParamVisibility As Visibility
Public ReadOnly Property RawPartParamVisibility As Visibility
@@ -86,6 +92,7 @@ Public Class RawPartOptionVM
Private m_cmdRemoveRawPart As ICommand
Sub New()
Map.SetRefRawPartOptionVM(Me)
If EgtGetFirstSelectedObj() <> GDB_ID.NULL Then
m_bRawPartParamVisibility = Visibility.Visible
Else
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class BeamMillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class BeamMillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class BeamMillingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class BeamMillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class ChiselingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class ChiselingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class ChiselingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class ChiselingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class GenMachiningParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class GenMachiningParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class GenMachiningParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class GenMachiningParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class MortisingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class MortisingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class MortisingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class MortisingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class PocketingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class PocketingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class PocketingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class PocketingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneDrillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneDrillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneDrillingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class StoneDrillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneMillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneMillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneMillingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class StoneMillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneSawFinishingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneSawFinishingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneSawFinishingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class StoneSawFinishingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneSawRoughingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneSawRoughingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneSawRoughingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class StoneSawRoughingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class StoneSawingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class StoneSawingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class StoneSawingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class StoneSawingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class SurfFinishingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class SurfFinishingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class SurfFinishingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class SurfFinishingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WaterjettingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class WaterjettingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class WaterjettingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class WaterjettingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WoodDrillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class WoodDrillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class WoodDrillingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class WoodDrillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WoodMillingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class WoodMillingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class WoodMillingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class WoodMillingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -3,17 +3,17 @@ Imports EgtWPFLib5.EgtFloating
Public Class WoodSawingParameterExpanderV
Private EgtFloatingTray As EgtFloatingTray
Private m_RightTrayV As RightTrayV
Private EgtFloatingPanel As EgtFloatingPanel
Private m_bFirst As Boolean = True
Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
If m_bFirst Then
EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
m_RightTrayV = FindAncestor(Of RightTrayV)(Me)
EgtFloatingPanel = FindAncestor(Of EgtFloatingPanel)(Me)
AddHandler EgtFloatingTray.SizeChanged, AddressOf EgtFloatingTray_SizeChanged
PanelHeight = EgtFloatingPanel.ActualHeight
AddHandler m_RightTrayV.SizeChanged, AddressOf RightTrayV_SizeChanged
PanelHeight = EgtFloatingPanel.DesiredSize.Height
Me.AutomaticCloseExpanderStackPanelHeight = AutomaticCloseExpanderStackPanel.ActualHeight
m_bFirst = False
End If
@@ -22,7 +22,7 @@ Public Class WoodSawingParameterExpanderV
Dim m_bSizeChanging As Boolean = False
Private Sub EgtFloatingTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
Private Sub RightTrayV_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
If m_bSizeChanging Then Return
m_bSizeChanging = True
CalculateOperationParametersStackPanelMaxHeight()
@@ -32,6 +32,7 @@ Public Class WoodSawingParameterExpanderV
Dim PanelHeight As Double = 0
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
' ricalcola spazio utilizzabile quando modificata dimensione finestra e quindi dimensione della tray
Private Sub CalculateOperationParametersStackPanelMaxHeight()
Dim AutomaticCloseExpanderStackPanelHeight As Double = 0
Dim OpenedExpanderList As New List(Of Boolean)
@@ -53,7 +54,7 @@ Public Class WoodSawingParameterExpanderV
OpenedExpanderList.Add(False)
End If
Next
Dim RemainingHeight As Double = EgtFloatingTray.ActualHeight - PanelHeight
Dim RemainingHeight As Double = m_RightTrayV.ActualHeight - PanelHeight
AutomaticCloseExpanderStackPanel.MaxHeight = Me.AutomaticCloseExpanderStackPanelHeight + RemainingHeight
For Index = AutomaticCloseExpanderStackPanel.Children.Count - 1 To 0 Step -1
If TypeOf AutomaticCloseExpanderStackPanel.Children(Index) Is Expander Then
@@ -63,6 +63,7 @@ Public Class OperationListBoxItem
Dim bEnabModif As Boolean = EgtGetEnableModified()
EgtDisableModified()
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_DBL))
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
SelData.ClearIdSub()
If bEnabModif Then EgtEnableModified()
@@ -96,6 +97,7 @@ Public Class OperationListBoxItem
Dim bEnabModif As Boolean = EgtGetEnableModified()
EgtDisableModified()
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_DBL))
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.ON_)
If bEnabModif Then EgtEnableModified()
' Seleziono la geometria della lavorazione
@@ -723,6 +723,7 @@ Public Class OperationsListExpanderVM
selOperation.m_Type = MCH_OY.DISP Then Return
' Tolgo Mark da lavorazione originale
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_CL))
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_DBL))
EgtSetStatus(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
SelData.ClearIdSub()
' Eseguo la copia
@@ -970,8 +971,8 @@ Public Class OperationsListExpanderVM
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
OnPropertyChanged("ListIsExpanded")
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
Map.refDoorPanelVM.MTableIsEnabled(True)
Map.refSpecialPanelVM.SpecialPanelIsEnabled(True)
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(True)
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(True)
Return True
End Function
@@ -1187,15 +1188,15 @@ Public Class OperationsListExpanderVM
Next
End Sub
Friend Function IsInOperationList(nId As Integer) As Boolean
Dim nOpId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nId)))
Friend Function GetOperationId(nId As Integer) As Integer
Dim nOpeId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nId)))
For Index = 0 To OperationList.Count - 1
Dim nOpType As Integer = EgtGetOperationType(nOpId)
If OperationList(Index).Id = nOpId And nOpType <> MCH_OY.NONE And nOpType <> MCH_OY.DISP Then
Return True
Dim nOpeType As Integer = EgtGetOperationType(nOpeId)
If OperationList(Index).Id = nOpeId And nOpeType <> MCH_OY.NONE And nOpeType <> MCH_OY.DISP Then
Return nOpeId
End If
Next
Return False
Return GDB_ID.NULL
End Function
Friend Sub DeselOperationFromId()
@@ -176,7 +176,9 @@ Public Class SimulationExpanderVM
Return True
End Function
Private Function UpdateAllMachinings() As Boolean
Friend Function UpdateAllMachinings() As Boolean
' Se disabilitato, esco
If GetPrivateProfileInt( S_MACH, K_AUTOUPDATEALLMACHININGS, 1) = 0 Then Return True
' Eseguo ricalcolo
Dim bModified As Boolean = EgtGetModified()
Dim sErr As String = String.Empty
@@ -252,6 +254,7 @@ Public Class SimulationExpanderVM
Else
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
End If
Dim nShowDataCounter As Integer = 0
While GetStatus() <> MCH_SIM_ST.UI_STOP
+8 -7
View File
@@ -1,13 +1,14 @@
<UserControl x:Class="OptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
TitleBarOrientation="Vertical"
Visibility="{Binding Panel_Visibility}">
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<!--ContentPresenter that contains the ModePanel-->
<ContentPresenter Content="{Binding ModePanel}"/>
</StackPanel>
</UserControl>
</EgtFloating:EgtFloatingPanel>
-4
View File
@@ -1,7 +1,3 @@
Public Class OptionPanelV
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
Dim x = ciao.MaxHeight
End Sub
End Class
+22 -18
View File
@@ -1,20 +1,12 @@
Imports EgtUILib
Public Class OptionPanelVM
Inherits ViewModelBase
Inherits BasePanelVM
Private m_DrawIsChecked As Boolean = True
Private m_MachiningIsChecked As Boolean = False
Sub New()
Map.SetRefOptionPanelVM(Me)
DrawOptPanelV = New DrawOptionPanelV
MachOptPanelV = New MachiningOptionPanelV
End Sub
Dim DrawOptPanelV As DrawOptionPanelV
Dim MachOptPanelV As MachiningOptionPanelV
@@ -23,31 +15,43 @@ Public Class OptionPanelVM
Public ReadOnly Property ModePanel As ContentControl
Get
DrawOptPanelV.DataContext = Nothing
MachOptPanelV.DataContext = Nothing
If Not IsNothing(Map.refDrawOptionPanelVM) And Not IsNothing(Map.refMachiningOptionPanelVM) Then
If m_DrawIsChecked And Not m_MachiningIsChecked Then
Map.refMachiningOptionPanelVM.ExitMachiningOptionPanel()
Map.refDrawOptionPanelVM.InitDrawOptionPanel()
DrawOptPanelV.DataContext = Map.refDrawOptionPanelVM
If DrawOptPanelV.DataContext IsNot Map.refDrawOptionPanelVM Then
DrawOptPanelV.DataContext = Map.refDrawOptionPanelVM
End If
Return DrawOptPanelV
End If
If m_MachiningIsChecked And Not m_DrawIsChecked Then
Map.refDrawOptionPanelVM.ExitDrawOptionPanel()
Map.refMachiningOptionPanelVM.InitMachiningOptionPanel()
MachOptPanelV.DataContext = Map.refMachiningOptionPanelVM
If MachOptPanelV.DataContext IsNot Map.refMachiningOptionPanelVM Then
MachOptPanelV.DataContext = Map.refMachiningOptionPanelVM
End If
Return MachOptPanelV
End If
End If
DrawOptPanelV.DataContext = Nothing
MachOptPanelV.DataContext = Nothing
Return Nothing
End Get
End Property
Sub New()
Map.SetRefOptionPanelVM(Me)
SetPanelViewState(ViewPanelStates.ALWAYS)
DrawOptPanelV = New DrawOptionPanelV
MachOptPanelV = New MachiningOptionPanelV
End Sub
Friend Sub DrawMode_IsChecked()
m_DrawIsChecked = True
m_MachiningIsChecked = False
@@ -56,14 +60,14 @@ Public Class OptionPanelVM
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
End If
OnPropertyChanged("ModePanel")
NotifyPropertyChanged("ModePanel")
End Sub
Friend Sub MachiningMode_IsChecked()
m_DrawIsChecked = False
m_MachiningIsChecked = True
EgtZoom(ZM.ALL, False)
OnPropertyChanged("ModePanel")
NotifyPropertyChanged("ModePanel")
End Sub
End Class
+4 -2
View File
@@ -386,7 +386,7 @@ Public Class OptionWindowVM
End Get
Set(value As String)
Dim nVal As Integer = 0
If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
If Integer.TryParse(value, nVal) Then
OptionModule.m_nDecDigit = nVal
EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
WritePrivateProfileString(S_DIMENSIONSTYLE, K_DECDIGIT, OptionModule.m_nDecDigit.ToString())
@@ -1090,7 +1090,7 @@ Public Class OptionWindowVM
}
If MachDlg.ShowDialog() <> True Then Return
Dim sMachZip As String = MachDlg.FileName
Dim sMachName As String = Path.GetFileNameWithoutExtension(sMachZip)
Dim sMachName As String = Path.GetFileNameWithoutExtension(Path.GetFileNameWithoutExtension(sMachZip))
Dim sMachDir As String = Path.Combine(IniFile.m_sMachinesRoot, sMachName)
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sMachinesRoot, "Temp")
@@ -1265,6 +1265,8 @@ Public Class OptionWindowVM
End If
Try
Using zip As New Ionic.Zip.ZipFile(sZipToCreate)
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
zip.AlternateEncoding = Text.Encoding.UTF8
' aggiungo i file della Macchina
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sCurrMachineName
If Directory.Exists(sMachineDir) Then
+3
View File
@@ -6,6 +6,9 @@
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}">
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
</Button>
+29
View File
@@ -7,6 +7,7 @@ Public Class PopUpGridPanelVM
' Definizione comandi
Private m_cmdCPlaneView As ICommand
Private m_cmdCPlaneInvert As ICommand
Private m_cmdCPlaneRotate As ICommand
Private m_cmdCPlane3P As ICommand
Private m_cmdCPlanePerpObj As ICommand
@@ -19,6 +20,11 @@ Public Class PopUpGridPanelVM
Return EgtMsg(MSG_GRIDVIEWPANEL + 25)
End Get
End Property
Public ReadOnly Property CPlaneInvertToolTip As String
Get
Return EgtMsg(5285)
End Get
End Property
Public ReadOnly Property CPlaneRotateToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 28)
@@ -70,6 +76,29 @@ Public Class PopUpGridPanelVM
#End Region ' CPlaneViewCommand
#Region "CPlaneInvertCommand"
''' <summary>
''' Returns a command that do CPlaneInvert.
''' </summary>
Public ReadOnly Property CPlaneInvertCommand As ICommand
Get
If m_cmdCPlaneInvert Is Nothing Then
m_cmdCPlaneInvert = New RelayCommand(AddressOf CPlaneInvert)
End If
Return m_cmdCPlaneInvert
End Get
End Property
''' <summary>
''' Execute the CPlaneInvert. This method is invoked by the CPlaneInvertCommand.
''' </summary>
Public Sub CPlaneInvert(ByVal param As Object)
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.GRID_INVERT)
End Sub
#End Region
#Region "CPlaneRotateCommand"
''' <summary>
-3
View File
@@ -12,9 +12,6 @@
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}">
<Image Source="/Resources/GridViewPanel/ZoomSel.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_SEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewSECommand}">
<Image Source="/Resources/GridViewPanel/LookFromISO_SE.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}">
<Image Source="/Resources/GridViewPanel/LookFromISO_NE.png" Stretch="Uniform"/>
</Button>
-30
View File
@@ -9,7 +9,6 @@ Public Class PopUpViewPanelVM
Private m_cmdZoomIn As ICommand
Private m_cmdZoomOut As ICommand
Private m_cmdZoomSel As ICommand
Private m_cmdIsoViewSE As ICommand
Private m_cmdIsoViewNE As ICommand
Private m_cmdIsoViewNW As ICommand
Private m_cmdViewToCPlane As ICommand
@@ -34,12 +33,6 @@ Public Class PopUpViewPanelVM
End Get
End Property
Public ReadOnly Property LookFromIso_SEToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 13)
End Get
End Property
Public ReadOnly Property LookFromIso_NEToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 14)
@@ -133,29 +126,6 @@ Public Class PopUpViewPanelVM
#End Region ' ZoomOutCommand
#Region "IsoViewSECommand"
''' <summary>
''' Returns a command that do IsoViewSE.
''' </summary>
Public ReadOnly Property IsoViewSECommand As ICommand
Get
If m_cmdIsoViewSE Is Nothing Then
m_cmdIsoViewSE = New RelayCommand(AddressOf IsoViewSE)
End If
Return m_cmdIsoViewSE
End Get
End Property
''' <summary>
''' Execute the IsoViewSE. This method is invoked by the IsoViewSECommand.
''' </summary>
Public Sub IsoViewSE(ByVal param As Object)
Map.refProjectVM.GetScene.IsoViewSE()
End Sub
#End Region ' IsoViewSECommand
#Region "IsoViewNECommand"
''' <summary>
+20 -102
View File
@@ -1,108 +1,26 @@
<UserControl x:Class="ProjectV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
<ItemsControl x:Class="ProjectV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
ItemsSource="{Binding PanelList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<DockPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style>
<Setter Property="DockPanel.Dock" Value="{Binding}" />
</Style>
</ItemsControl.ItemContainerStyle>
<interactivity:Interaction.Triggers>
<interactivity:EventTrigger EventName="Loaded">
<interactivity:InvokeCommandAction Command="{Binding LoadedCommand}"/>
</interactivity:EventTrigger>
</interactivity:Interaction.Triggers>
<EgtFloating:EgtFloatingManager>
<EgtFloating:EgtFloatingTray x:Name="TOPTRAY" DockPanel.Dock="Top">
<WrapPanel Orientation="Horizontal" Width="{Binding ActualWidth, ElementName=TOPTRAY}">
<EgtFloating:EgtFloatingPanel Name="ShowPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:ShowPanelV DataContext="{StaticResource ShowPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="ViewPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/>
<local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
</EgtFloating:EgtFloatingPanel>
<!--<EgtFloating:EgtFloatingPanel Name="InstrumentPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">-->
<local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/>
<!--</EgtFloating:EgtFloatingPanel>-->
<EgtFloating:EgtFloatingPanel Name="GridPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/>
<local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="DbPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="ExecutePanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="SpecialPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="BeamPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="WallPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="BeamWallPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="DoorsPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="GunStockPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="PrintingPanel"
IsTopDockable="True"
IsBottomDockable="True"
IsLeftDockable="False"
IsRightDockable="False">
<local:Printing3DPanelV DataContext="{StaticResource Printing3DPanelVM}"/>
</EgtFloating:EgtFloatingPanel>
</WrapPanel>
</EgtFloating:EgtFloatingTray>
<EgtFloating:EgtFloatingTray x:Name="LEFTTRAY" DockPanel.Dock="Left">
<EgtFloating:EgtFloatingPanel Name="DrawPanel" TitleBarOrientation="Vertical"
IsTopDockable="False" IsBottomDockable="False" IsLeftDockable="True" IsRightDockable="True">
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
</EgtFloating:EgtFloatingTray>
<EgtFloating:EgtFloatingTray x:Name="RIGHTTRAY" DockPanel.Dock="Right">
<EgtFloating:EgtFloatingPanel Name="OptionPanel" TitleBarOrientation="Vertical"
IsTopDockable="False" IsBottomDockable="False" IsLeftDockable="True" IsRightDockable="True">
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
</EgtFloating:EgtFloatingTray>
<!--<EgtFloating:EgtFloatingTray x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom">
<EgtFloating:EgtFloatingPanel Name="MachGroupPanel"
IsToolBar="False"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:MachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
</EgtFloating:EgtFloatingTray>-->
<EgtFloating:EgtFloatingTray x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom">
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
IsToolBar="False"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False"
IsRightDockable="False" />
</EgtFloating:EgtFloatingTray>
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
<ContentControl Content="{Binding ProjectSceneHost}"/>
</EgtFloating:EgtFloatingManager>
</UserControl>
</ItemsControl>
+40 -42
View File
@@ -7,18 +7,17 @@ Public Class ProjectV
Private m_bWall As Boolean = False
Private m_bDoors As Boolean = False
Private m_bGunStock As Boolean = False
Private m_bPrinting3d As Boolean = False
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Creo riferimento a questa classe in Map
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
'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
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -48,7 +47,6 @@ Public Class ProjectV
m_bWall = IniFile.IsActiveWall()
m_bDoors = IniFile.IsActiveDoors()
m_bGunStock = IniFile.IsActiveGunStock()
m_bPrinting3d = IniFile.IsActivePrinting3d()
End Sub
Private Sub PanelPositioning(FloatingPanel As EgtFloatingPanel, sState As String, nIndex As Integer, nLeft As Integer, nTop As Integer)
@@ -67,47 +65,47 @@ Public Class ProjectV
End Sub
Friend Sub SetDbPanelVisibility()
DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
End Sub
Friend Sub MachiningMode_IsChecked()
'ShowPanel.Visibility = Visibility.Visible
ViewPanel.Visibility = Visibility.Visible
'InstrumentPanel.Visibility = Visibility.Visible
GridPanel.Visibility = Visibility.Visible
DbPanel.Visibility = Visibility.Visible
ExecutePanel.Visibility = Visibility.Collapsed
SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True), Visibility.Visible, Visibility.Collapsed)
BeamPanel.Visibility = Visibility.Collapsed
WallPanel.Visibility = Visibility.Collapsed
BeamWallPanel.Visibility = Visibility.Collapsed
DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
PrintingPanel.Visibility = Visibility.Collapsed
GunStockPanel.Visibility = Visibility.Collapsed
DrawPanel.Visibility = Visibility.Collapsed
OptionPanel.Visibility = Visibility.Visible
''ShowPanel.Visibility = Visibility.Visible
'ViewPanel.Visibility = Visibility.Visible
''InstrumentPanel.Visibility = Visibility.Visible
'GridPanel.Visibility = Visibility.Visible
'DbPanel.Visibility = Visibility.Visible
'ExecutePanel.Visibility = Visibility.Collapsed
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True), Visibility.Visible, Visibility.Collapsed)
'BeamPanel.Visibility = Visibility.Collapsed
'WallPanel.Visibility = Visibility.Collapsed
'BeamWallPanel.Visibility = Visibility.Collapsed
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
'PrintingPanel.Visibility = Visibility.Collapsed
'GunStockPanel.Visibility = Visibility.Collapsed
'DrawPanel.Visibility = Visibility.Collapsed
'OptionPanel.Visibility = Visibility.Visible
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup) ' MachGroupPanel.Visibility = If(IniFile.m_bMachiningGroup, Visibility.Visible, Visibility.Collapsed)
If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
End Sub
Friend Sub DrawMode_IsChecked()
'ShowPanel.Visibility = Visibility.Visible
ViewPanel.Visibility = Visibility.Visible
'InstrumentPanel.Visibility = Visibility.Visible
GridPanel.Visibility = Visibility.Visible
DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
ExecutePanel.Visibility = Visibility.Visible
SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False), Visibility.Visible, Visibility.Collapsed)
BeamPanel.Visibility = If(m_bBeam, Visibility.Visible, Visibility.Collapsed)
WallPanel.Visibility = If(m_bWall, Visibility.Visible, Visibility.Collapsed)
BeamWallPanel.Visibility = If(m_bBeam Or m_bWall, Visibility.Visible, Visibility.Collapsed)
DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
PrintingPanel.Visibility = If(m_bPrinting3d, Visibility.Visible, Visibility.Collapsed)
GunStockPanel.Visibility = If(m_bGunStock, Visibility.Visible, Visibility.Collapsed)
DrawPanel.Visibility = Visibility.Visible
OptionPanel.Visibility = Visibility.Visible
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
''ShowPanel.Visibility = Visibility.Visible
'ViewPanel.Visibility = Visibility.Visible
''InstrumentPanel.Visibility = Visibility.Visible
'GridPanel.Visibility = Visibility.Visible
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
'ExecutePanel.Visibility = Visibility.Visible
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False), Visibility.Visible, Visibility.Collapsed)
'BeamPanel.Visibility = If(m_bBeam, Visibility.Visible, Visibility.Collapsed)
'WallPanel.Visibility = If(m_bWall, Visibility.Visible, Visibility.Collapsed)
'BeamWallPanel.Visibility = If(m_bBeam Or m_bWall, Visibility.Visible, Visibility.Collapsed)
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
'PrintingPanel.Visibility = If(m_bPrinting3d, Visibility.Visible, Visibility.Collapsed)
'GunStockPanel.Visibility = If(m_bGunStock, Visibility.Visible, Visibility.Collapsed)
'DrawPanel.Visibility = Visibility.Visible
'OptionPanel.Visibility = Visibility.Visible
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
' If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
End Sub
Private Sub UserControl_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
+229 -136
View File
@@ -7,86 +7,141 @@ Imports EgtWPFLib5
Imports EgtWPFLib5.EgtFloating
Public Class ProjectVM
Inherits TabViewModel
Inherits TabViewModel
#Region "FIELDS"
Friend Event OnPreControllerExec(sFilePath As String)
Friend Event OnPostControllerExec()
Friend Event OnPreControllerExec(sFilePath As String)
Friend Event OnPostControllerExec()
' Variabili in cui salvo i filtri di selezione della modalità Draw e che poi ripristino all'uscita dalla modalità Machining
Private m_bSelZeroDim As Boolean = True
Private m_bSelCurve As Boolean = True
Private m_bSelSurf As Boolean = True
Private m_bSelVolume As Boolean = True
Private m_bSelExtra As Boolean = True
' Variabili in cui salvo i filtri di selezione della modalità Draw e che poi ripristino all'uscita dalla modalità Machining
Private m_bSelZeroDim As Boolean = True
Private m_bSelCurve As Boolean = True
Private m_bSelSurf As Boolean = True
Private m_bSelVolume As Boolean = True
Private m_bSelExtra As Boolean = True
Private m_bLoaded As Boolean = False
Private m_bLoaded As Boolean = False
' Variabile che contiene il Frame di disegno per poterlo ripristinare dopo essere passato dalla lavorazioneù
Private m_GridDrawFrame3d As Frame3d = New Frame3d(New Point3d(0, 0, 0))
' Variabile che contiene il Frame di disegno per poterlo ripristinare dopo essere passato dalla lavorazioneù
Private m_GridDrawFrame3d As Frame3d = New Frame3d(New Point3d(0, 0, 0))
'PROJECT PAGE'S SCENE FIELDS AND PROPERTIES
' Reference to the ProjectScene
Private WithEvents m_ProjectScene As New Scene
' Reference to the ProjectSceneHost
Private SceneHost As WindowsFormsHost
' Property used to bind the scene to the WindowsFormsHost in XAML
Private m_bfirst As Boolean = True
Public ReadOnly Property ProjectSceneHost As WindowsFormsHost
Get
If m_bfirst Then
SceneHost = New WindowsFormsHost() With {.Child = m_ProjectScene}
m_bfirst = False
End If
Return SceneHost
End Get
End Property
' Scene controller
Private WithEvents m_Controller As New Controller
'PROJECT PAGE'S SCENE FIELDS AND PROPERTIES
' Reference to the ProjectScene
Private WithEvents m_ProjectScene As New Scene
' Reference to the ProjectSceneHost
Private SceneHost As WindowsFormsHost
' Property used to bind the scene to the WindowsFormsHost in XAML
Private m_bfirst As Boolean = True
Public ReadOnly Property ProjectSceneHost As WindowsFormsHost
Get
If m_bfirst Then
SceneHost = New WindowsFormsHost() With {.Child = m_ProjectScene}
m_bfirst = False
End If
Return SceneHost
End Get
End Property
' Scene controller
Private WithEvents m_Controller As New Controller
' Definizione comandi
Private m_cmdLoaded As ICommand
' Definizione comandi
Private m_cmdLoaded As ICommand
' Flag per non salvare Script appena eseguito in elenco MruScript
Private m_bScriptInMru As Boolean = True
' Flag per non salvare Script appena eseguito in elenco MruScript
Private m_bScriptInMru As Boolean = True
Private m_PanelList As New List(Of Panel)
Public ReadOnly Property PanelList As List(Of Panel)
Get
Return m_PanelList
End Get
End Property
#End Region
#Region "EGTUILIB FIELDS"
Private m_bCPlaneTypePos As Boolean
'Private m_bStopExec As Boolean = False
'Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
'Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
' Variabile per implementazione eventi
Private m_InputText As String
' Variabile per implementazione eventi
Private m_InputText As String
#End Region
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map e in ButtonItem
Map.SetRefProjectVM(Me)
ButtonItem.m_ProjectVM = Me
' Creo classe di supporto per la visualizzazione dei parametri utensile e di lavorazione per Db e operazioni
TMDbParamVisibility.bFirst = True
' Inizializza i parametri della scena
'InitializeEgtProject()
End Sub
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map e in ButtonItem
Map.SetRefProjectVM(Me)
ButtonItem.m_ProjectVM = Me
' Creo classe di supporto per la visualizzazione dei parametri utensile e di lavorazione per Db e operazioni
TMDbParamVisibility.bFirst = True
' Inizializza i parametri della scena
'InitializeEgtProject()
' aggiungo componenti interfaccia
Dim bPlugin As Boolean = False
Dim PluginDirNameList() As String = {}
If IsActivePlugin() Then
Dim sPluginDirPath As String = IniFile.m_sDataRoot & "\Plugin"
If Directory.Exists(sPluginDirPath) Then
' recupero nome del plugin
PluginDirNameList = Directory.GetDirectories(IniFile.m_sDataRoot & "\Plugin")
' verifico che il nome delle cartelle corrisponda al nome delle dll
For PluginDirIndex As Integer = 0 To PluginDirNameList.Count - 1
Dim sPluginDirName As String = Path.GetFileName(PluginDirNameList(PluginDirIndex))
Dim sPluginFileNameList() As String = Directory.GetFiles(PluginDirNameList(PluginDirIndex))
If sPluginFileNameList.Count = 0 OrElse Not sPluginFileNameList.Any(Function(x) Path.GetFileNameWithoutExtension(x) = sPluginDirName) Then
PluginDirNameList(PluginDirIndex) = ""
End If
Next
bPlugin = PluginDirNameList.Count(Function(x) Not String.IsNullOrWhiteSpace(x)) > 0
End If
End If
If bPlugin Then
For Each PluginDirName In PluginDirNameList
If Not String.IsNullOrWhiteSpace(PluginDirName) Then
Dim PluginName As String = Path.GetFileName(PluginDirName)
Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData")
If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then
For Each Element In ConfigurationData.ControlList
Select Case Element.Name
Case PLUGIN_RIGHT_TRAY
m_PanelList.Add(New RightTrayV)
Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState)
Case PLUGIN_LEFT_TRAY
m_PanelList.Add(New LeftTrayV)
Case Else
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
End Select
Next
End If
End If
Next
m_PanelList.Add(New BottomTrayV)
m_PanelList.Add(New TopTrayV)
' nascondo tasti gestione progetto se attivo plugin
Map.refTopCommandBarVM.SetProjectManagerVisibility(False)
Else
m_PanelList.Add(New TopTrayV)
m_PanelList.Add(New LeftTrayV)
m_PanelList.Add(New RightTrayV)
m_PanelList.Add(New BottomTrayV)
End If
m_PanelList.Add(New SceneContentControlV)
End Sub
#End Region
#Region "Get & Set"
Friend Function GetScene() As Scene
Return m_ProjectScene
End Function
Friend Function GetScene() As Scene
Return m_ProjectScene
End Function
Friend Function GetController() As Controller
Return m_Controller
End Function
Friend Function GetController() As Controller
Return m_Controller
End Function
#End Region ' Get & Set
@@ -100,7 +155,7 @@ Public Class ProjectVM
Public ReadOnly Property LoadedCommand As ICommand
Get
If m_cmdLoaded Is Nothing Then
m_cmdLoaded = New RelayCommand(AddressOf Loaded)
m_cmdLoaded = New RelayCommand(AddressOf Loaded)
End If
Return m_cmdLoaded
End Get
@@ -129,42 +184,42 @@ Public Class ProjectVM
Map.refProjectV.SetDbPanelVisibility()
End If
' Inizializzo gestore travi e pareti
If ( IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 Or ( IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 Then
Dim nFlag As Integer = GetPrivateProfileInt( S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
EgtInitBeamMgr( nFlag)
If (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 Or (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 Then
Dim nFlag As Integer = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
EgtInitBeamMgr(nFlag)
End If
' Log di eventuali estensioni
EgtOutLog( "Extensions :")
EgtOutLog("Extensions :")
Dim bExtensions As Boolean = False
If IniFile.IsActiveBeam() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sVersion)
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamDirPath, sVersion)
Dim sOut As String = "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
EgtOutLog( sOut)
EgtOutLog(sOut)
End If
If IniFile.IsActiveWall() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sVersion)
IniFile.GetSpecialLuaVersion(IniFile.m_sWallDirPath, sVersion)
Dim sOut As String = "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
EgtOutLog( sOut)
EgtOutLog(sOut)
End If
If IniFile.IsActiveDoors() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
IniFile.GetSpecialLuaVersion(IniFile.m_sDoorsDirPath, sVersion)
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
EgtOutLog( sOut)
EgtOutLog(sOut)
End If
If IniFile.IsActiveGunStock() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sGunstockDirPath, sVersion)
IniFile.GetSpecialLuaVersion(IniFile.m_sGunstockDirPath, sVersion)
Dim sOut As String = "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
EgtOutLog( sOut)
EgtOutLog(sOut)
End If
If Not bExtensions Then EgtOutLog( "---")
If Not bExtensions Then EgtOutLog("---")
' Apro progetto vuoto
Map.refTopCommandBarVM.NewCmd()
' Seleziono la macchina impostata nel file ini
@@ -176,18 +231,33 @@ Public Class ProjectVM
SceneHost.Child = Nothing
' Se manca la chiave
If IniFile.m_nKeyLevel = -1 Or IniFile.m_nKeyLevel = -2 Then
EgtOutLog("Missing Dongle")
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
If Not EgtGetNetHwKey() Then
EgtOutLog("Missing Dongle")
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
Else
EgtOutLog("NetDongle is full")
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
End If
' Se altrimenti manca il collegamento con la chiave di rete
ElseIf IniFile.m_nKeyLevel = -9 Then
EgtOutLog("Missing Link with Net Dongle")
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
' Altrimenti manca la licenza
' Altrimenti manca la licenza
Else
EgtOutLog("Problems with Licence")
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(10105) & vbCrLf & EgtMsg(10106)
Dim sTitle As String = EgtMsg(10101)
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' Apro dialogo per richiesta file licenza
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
@@ -270,8 +340,8 @@ Public Class ProjectVM
If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
EgtOutLog("Command log not started")
If Environment.GetCommandLineArgs.Count() <= 1 Then
MessageBox.Show("Command log not started", "EgtCAM5 Warning",
MessageBoxButton.OK, MessageBoxImage.Warning)
MessageBox.Show("Command log not started", "EgtCAM5 Warning",
MessageBoxButton.OK, MessageBoxImage.Warning)
End If
End If
m_Controller.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
@@ -323,9 +393,9 @@ Public Class ProjectVM
' lettura flag visualizzazione solo tavola in definizione lavorazioni
IniFile.m_bShowOnlyTable = (GetPrivateProfileInt(S_MACH, K_SHOWONLYTABLE, 1) <> 0)
' ObjTree non selezionato
Map.refManageLayerExpanderVM.UpdateObjTreeOldId(GDB_ID.NULL)
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateObjTreeOldId(GDB_ID.NULL)
' nascondo input box
Map.refInputExpanderVM.ResetInputBox()
If Not IsNothing(Map.refInputExpanderVM) Then Map.refInputExpanderVM.ResetInputBox()
' Imposto stato filtro selezione
m_ProjectScene.GetObjFilterForSel(m_bSelZeroDim, m_bSelCurve, m_bSelSurf, m_bSelVolume, m_bSelExtra)
m_Controller.MouseSetObjFilterForSelect(m_bSelZeroDim, m_bSelCurve, m_bSelSurf, m_bSelVolume, m_bSelExtra)
@@ -412,8 +482,8 @@ Public Class ProjectVM
Return
End If
' Esecuzione
bOk = ExecBeam(sFile, sMachine, nFlag, true)
' altrimenti pareti
bOk = ExecBeam(sFile, sMachine, nFlag, True)
' altrimenti pareti
Else
' Verifica abilitazione elaborazione pareti
If Not VerifyWall(sFile, sMachine, nFlag) Then
@@ -421,18 +491,18 @@ Public Class ProjectVM
Return
End If
' Esecuzione
bOk = ExecWall(sFile, sMachine, nFlag, true)
bOk = ExecWall(sFile, sMachine, nFlag, True)
End If
' Se richiesta uscita immediata
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
Map.refMachinePanelVM.SaveCurrentMachine()
Map.refMainWindowVM.CloseApplicationCmd()
' Altrimenti se richiesta visualizzazione DB utensili
' Altrimenti se richiesta visualizzazione DB utensili
ElseIf nFlag = 11 And bOk Then
MyMachinePanelVM.ToolDb()
Map.refMachinePanelVM.SaveCurrentMachine()
Map.refMainWindowVM.CloseApplicationCmd()
' Altrimenti se richiesta visualizzazione DB lavorazioni
' Altrimenti se richiesta visualizzazione DB lavorazioni
ElseIf nFlag = 12 And bOk Then
MyMachinePanelVM.MachDb()
If bBeam Then
@@ -442,7 +512,7 @@ Public Class ProjectVM
End If
Map.refMachinePanelVM.SaveCurrentMachine()
Map.refMainWindowVM.CloseApplicationCmd()
' Altrimenti se errore
' Altrimenti se errore
ElseIf Not bOk Then
EgtZoom(ZM.ALL)
End If
@@ -503,8 +573,8 @@ Public Class ProjectVM
Return
End If
' Esecuzione
bOk = ExecBeam(sFile, sMachine, nFlag, false)
' altrimenti pareti
bOk = ExecBeam(sFile, sMachine, nFlag, False)
' altrimenti pareti
ElseIf nBWType = 2 Then
' Verifica abilitazione elaborazione pareti
If Not VerifyWall(sFile, sMachine, nFlag) Then
@@ -512,13 +582,13 @@ Public Class ProjectVM
Return
End If
' Esecuzione
bOk = ExecWall(sFile, sMachine, nFlag, false)
bOk = ExecWall(sFile, sMachine, nFlag, False)
End If
' Se richiesta uscita immediata
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
Map.refMachinePanelVM.SaveCurrentMachine()
Map.refMainWindowVM.CloseApplicationCmd()
' Altrimenti se errore
' Altrimenti se errore
ElseIf Not bOk Then
EgtZoom(ZM.ALL)
End If
@@ -534,7 +604,7 @@ Public Class ProjectVM
Select Case nFileType
Case FT.NGE, FT.NFE
Return m_Controller.OpenProject(sFile, False)
Case FT.DXF, FT.STL, FT._3MF, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
Case FT.DXF, FT.STL, FT._3MF, FT._3DM, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
Return m_Controller.ImportProject(sFile, False)
Case FT.TSC, FT.LUA
Return m_Controller.Exec(sFile, False)
@@ -660,7 +730,7 @@ Public Class ProjectVM
Friend Sub InsertProject()
' eseguo
Dim sDir As String = String.Empty
GetPrivateProfileString(S_GENERAL, K_LASTNGEDIR, "", sDir)
GetPrivateProfileString(S_GENERAL, K_LASTNGEINSDIR, "", sDir)
m_Controller.InsertProject(sDir)
End Sub
@@ -685,7 +755,7 @@ Public Class ProjectVM
GetPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
m_Controller.Exec(sDir)
Else
If bRaiseEvent Then RaiseEvent OnPreControllerExec( sFilePath)
If bRaiseEvent Then RaiseEvent OnPreControllerExec(sFilePath)
m_Controller.Exec(sFilePath, False)
If bRaiseEvent Then RaiseEvent OnPostControllerExec()
End If
@@ -809,7 +879,7 @@ Public Class ProjectVM
' Copia dei file terminata con successo ...
Dim sMsg As String = EgtMsg(8216) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
MessageBox.Show(sMsg, EgtMsg(8214), MessageBoxButton.OK, MessageBoxImage.Information)
else
Else
' Errore nella copia dei file ...
Dim sMsg As String = EgtMsg(8255) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
MessageBox.Show(sMsg, EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
@@ -995,7 +1065,7 @@ Public Class ProjectVM
Private m_nIdToSel As Integer = GDB_ID.NULL
Private m_SelType As DispositionUtility.SelType = DispositionUtility.SelType.NULL
Private m_nIdToDesel As Integer = GDB_ID.NULL
'Private m_nFirstRawPartId As Integer = GDB_ID.NULL
Private m_nSelOpeId As Integer = GDB_ID.NULL
' Dati per Drag
Private m_nRestRadius As Integer = 3
@@ -1005,14 +1075,18 @@ Public Class ProjectVM
Private m_locPrev As System.Drawing.Point
Private m_ptPrev As Point3d
Private Sub OnMouseDown(ByVal sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_ProjectScene.OnMouseDownScene
Private Sub OnStartingMouseDown(ByVal sender As Object, e As System.Windows.Forms.MouseEventArgs, ByRef bContinue As Boolean) Handles m_ProjectScene.OnStartingMouseDownScene
' Se in modalità Draw accetto tutto
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then Return
' Sono in modalità Machining
' se non posso selezionare nulla o in lavorazione esco
If m_SceneSelType = SceneSelTypeOpt.NULL OrElse m_SceneSelType = SceneSelTypeOpt.MACHINING Then Return
If m_SceneSelType = SceneSelTypeOpt.NULL OrElse
m_SceneSelType = SceneSelTypeOpt.MACHINING OrElse
m_SceneSelType = SceneSelTypeOpt.MACHPATH Then Return
' Si può selezionare solo con il tasto sinistro
If e.Button <> Forms.MouseButtons.Left Then Return
' Si Sostituisce completamente la gestione dell'evento chiamante
bContinue = False
' Dati per drag
Dim TableRef As Point3d
EgtGetTableRef(1, TableRef)
@@ -1130,22 +1204,22 @@ Public Class ProjectVM
' Se eseguito drag
If Not m_bDragToStart Then
' Basta reset alla fine
' se sono in modalità movimento barre
' se sono in modalità movimento barre
ElseIf m_SelType = DispositionUtility.SelType.BARS Then
' Basta reset alla fine
' Se selezione da eseguire
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
' se sono in modalità sottopezzi
If m_SceneSelType = SceneSelTypeOpt.FIXTURE Then
' se il sottopezzo da selezionare è un riferimento e ci sono altri oggetti selezionati resetto lo stato di selezione ed esco
If DispositionUtility.FixtureType(m_nIdToSel) = DispositionUtility.FIX_TYPE.REFERENCE AndAlso
If DispositionUtility.FixtureType(m_nIdToSel) = DispositionUtility.FIX_TYPE.REFERENCE AndAlso
EgtGetSelectedObjCount() > 0 Then
m_bDrag = False
m_nIdToSel = GDB_ID.NULL
m_nIdToDesel = GDB_ID.NULL
EgtDraw()
Return
' altrimenti verifico il tipo del primo oggetto selezionato
' altrimenti verifico il tipo del primo oggetto selezionato
Else
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
' se è un riferimento resetto lo stato di selezione ed esco
@@ -1171,7 +1245,7 @@ Public Class ProjectVM
End If
' Eseguo la selezione
EgtSelectObj(m_nIdToSel)
' Se deselezione da eseguire
' Se deselezione da eseguire
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
' se l'elemento da deselezionare è marcato
Dim bMarked As Boolean = False
@@ -1204,14 +1278,18 @@ Public Class ProjectVM
EgtDraw()
End Sub
Private Sub OnStartingMouseSelectingObj(ByVal sender As Object) Handles m_ProjectScene.OnStartingMouseSelectingObj
m_nSelOpeId = GDB_ID.NULL
End Sub
Private Sub OnMouseSelectingObj(ByVal sender As Object, ByVal nId As Integer, ByRef bOk As Boolean) Handles m_ProjectScene.OnMouseSelectingObj
' Se oggetto già rifiutato non faccio le verifiche
If Not bOk Then Return
' Impedisco la selezione di oggetti in modo Locked o Hidden
Dim nMode As Integer = GDB_MD.STD
EgtGetCalcMode( nId, nMode)
EgtGetCalcMode(nId, nMode)
If nMode <> GDB_MD.STD Then
bOk = False
bOk = False
Return
End If
' Se in modalità Draw accetto tutto
@@ -1226,7 +1304,9 @@ Public Class ProjectVM
bOk = False
End If
Case SceneSelTypeOpt.MACHPATH
bOk = Map.refOperationsListExpanderVM.IsInOperationList(nId)
Dim nCurrOpeId As Integer = Map.refOperationsListExpanderVM.GetOperationId(nId)
bOk = (nCurrOpeId <> GDB_ID.NULL AndAlso nCurrOpeId <> m_nSelOpeId)
If m_nSelOpeId = GDB_ID.NULL Then m_nSelOpeId = nCurrOpeId
Case Else
bOk = False
End Select
@@ -1258,15 +1338,15 @@ Public Class ProjectVM
Private Sub OnMousePointFromSelection(ByVal sender As Object, ByVal nId As Integer, ByVal PtP As Point3d, ByVal nAux As Integer) Handles m_ProjectScene.OnMousePointFromSelection
m_Controller.SetPointFromSelection(nId, PtP, nAux)
If 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
If EgtIsSelectedObj( nId) Then
Dim nFac As Integer = If( EgtGetType( nId) = GDB_TY.SRF_MESH, Math.Max( EgtSurfTmFacetFromTria( nId, nAux), 0), nAux)
If Not SelData.FindIdSub( nId, nFac) Then
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
If EgtIsSelectedObj(nId) Then
Dim nFac As Integer = If(EgtGetType(nId) = GDB_TY.SRF_MESH, Math.Max(EgtSurfTmFacetFromTria(nId, nAux), 0), nAux)
If Not SelData.FindIdSub(nId, nFac) Then
SelData.AddIdSub(nId, nFac)
Else
SelData.RemoveIdSub(nId, nFac)
If Not SelData.FindId( nId) Then
EgtDeselectObj( nId)
If Not SelData.FindId(nId) Then
EgtDeselectObj(nId)
End If
End If
Else
@@ -1300,29 +1380,29 @@ Public Class ProjectVM
Analyze.ClearAnalyzeGroup()
Map.refStatusBarVM.NotifyStatusOutput("")
' Se curva composita, visualizzo numerazione curve semplici
If EgtGetType( nId) = GDB_TY.CRV_COMPO Then
If EgtGetType(nId) = GDB_TY.CRV_COMPO Then
' Visualizzo numerazione
Analyze.CreateAnalyzeGroup()
Analyze.CreateCurveCompoPntNbrs( nId)
' Se superficie trimesh, visualizzo dati faccetta toccata
ElseIf EgtGetType( nId) = GDB_TY.SRF_MESH Then
Dim nFac As Integer = EgtSurfTmFacetFromTria( nId, nSub)
Analyze.CreateCurveCompoPntNbrs(nId)
' Se superficie trimesh, visualizzo dati faccetta toccata
ElseIf EgtGetType(nId) = GDB_TY.SRF_MESH Then
Dim nFac As Integer = EgtSurfTmFacetFromTria(nId, nSub)
If nFac <> -1 Then
' Visualizzo la normale e il contorno della faccia
Analyze.CreateAnalyzeGroup()
Analyze.CreateNormal( nId, nFac)
Analyze.CreateFacetLoops( nId, nFac)
Analyze.CreateNormal(nId, nFac)
Analyze.CreateFacetLoops(nId, nFac)
' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d
Dim vtN As Vector3d
EgtSurfTmFacetCenter( nId, nFac, If( m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
EgtSurfTmFacetCenter(nId, nFac, If(m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
Dim dLen, dPhi, dTheta As Double
vtN.ToSpherical( dLen, dTheta, dPhi)
vtN.ToSpherical(dLen, dTheta, dPhi)
' Emetto info sulla barra di stato
Dim sOut As String = "Facet " + nFac.ToString() +
" : 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) + ")" +
" / φ=" + DoubleToString( dPhi, 2) + " θ=" + DoubleToString( dTheta, 2)
" : 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) + ")" +
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
End If
@@ -1339,19 +1419,19 @@ Public Class ProjectVM
If e.KeyData = System.Windows.Forms.Keys.Delete AndAlso Map.refTopCommandBarVM.DrawIsChecked Then
m_Controller.SetLastInteger(GDB_ID.SEL)
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
' Con END eseguo deselezione di tutto
' Con END eseguo deselezione di tutto
ElseIf e.KeyData = System.Windows.Forms.Keys.End Then
m_Controller.MouseDeselectedAll( True)
' Con SPAZIO ripeto l'ultimo comando
m_Controller.MouseDeselectedAll(True)
' Con SPAZIO ripeto l'ultimo comando
ElseIf e.KeyData = System.Windows.Forms.Keys.Space Then
m_Controller.RepeatLastCommand()
' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
ElseIf e.KeyData = System.Windows.Forms.Keys.A AndAlso m_Controller.GetContinue() Then
m_Controller.ContinueArcPDP()
' Con 'L' e in modalità continuazione, forzo il passaggio a retta
' Con 'L' e in modalità continuazione, forzo il passaggio a retta
ElseIf e.KeyData = System.Windows.Forms.Keys.L AndAlso m_Controller.GetContinue() Then
m_Controller.ContinueLine2P()
' Con 'V' cambio lo stato del check
' Con 'V' cambio lo stato del check
ElseIf e.KeyData = System.Windows.Forms.Keys.V Then
Map.refInputExpanderVM.ChangeInputBoxCheck()
End If
@@ -1377,7 +1457,7 @@ Public Class ProjectVM
End Sub
Private Sub OnOpeningProject(ByVal sender As Object) Handles m_Controller.OnOpeningProject
Map.refManageLayerExpanderVM.ClearObjTree()
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.ClearObjTree()
End Sub
Private Sub OnOpenProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnOpenProject
@@ -1388,7 +1468,7 @@ Public Class ProjectVM
Else
IniFile.m_MruFiles.Remove(sFile)
Dim sMsg As String
If My.Computer.FileSystem.FileExists( sFile) Then
If My.Computer.FileSystem.FileExists(sFile) Then
sMsg = EgtMsg(10003) & " '" & sFile & "'" 'Error opening file
Else
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
@@ -1397,8 +1477,18 @@ Public Class ProjectVM
End If
End Sub
Private Sub OnInsertingProject(ByVal sender As Object, nType As Integer, ByRef nFlag As Integer) Handles m_Controller.OnInsertingProject
If 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
nFlag = GetMainPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
Else
nFlag = 0
End If
End Sub
Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnInsertedProject
EgtZoom(ZM.ALL)
WritePrivateProfileString(S_GENERAL, K_LASTNGEINSDIR, Path.GetDirectoryName(sFile))
End Sub
Private Sub OnSavingProject(ByVal sender As Object, ByVal sFile As String) Handles m_Controller.OnSavingProject
@@ -1436,6 +1526,9 @@ Public Class ProjectVM
nFlag = GetPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
ElseIf nType = FT.BTL Or nType = FT.BTLX Then
nFlag = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
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
nFlag = GetPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
Else
nFlag = 0
End If
@@ -1489,7 +1582,7 @@ Public Class ProjectVM
End If
Else
If m_bScriptInMru Then
If File.Exists( sFile) Then
If File.Exists(sFile) Then
IniFile.m_MruScripts.Add(sFile)
WritePrivateProfileString(S_GENERAL, K_LASTLUADIR, Path.GetDirectoryName(sFile))
Else
@@ -1524,7 +1617,7 @@ Public Class ProjectVM
Private Sub OnUpdateUI(ByVal sender As Object, ByVal bReloadUI As Boolean) Handles m_Controller.UpdateUI
' pulisco input e relativi messaggi
Map.refInputExpanderVM.ResetInputBox()
If Not IsNothing(Map.refInputExpanderVM) Then Map.refInputExpanderVM.ResetInputBox()
If m_Controller.GetContinue() Then
Map.refStatusBarVM.NotifyStatusOutput((EgtMsg(399))) ' Continue : 'L' with line, 'A' with arc
Else
@@ -1534,9 +1627,9 @@ Public Class ProjectVM
EmitTitle()
EmitCurrPartLayer()
If bReloadUI Then
Map.refManageLayerExpanderVM.LoadObjTree()
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.LoadObjTree()
Else
Map.refManageLayerExpanderVM.UpdateObjTree()
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateObjTree()
End If
' aggiorno macchina corrente
Map.refMachinePanelVM.UpdateCurrentMachine()
@@ -1611,9 +1704,9 @@ Public Class ProjectVM
EgtGetCalcColor(nCurrLayer, colObj)
End If
End If
Map.refManageLayerExpanderVM.UpdateHeaderName(sText)
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateHeaderName(sText)
colObj.A = 100
Map.refManageLayerExpanderVM.UpdateHeaderColor(colObj)
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateHeaderColor(colObj)
End Sub
#End Region 'DrawOptionPanel
Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

+7
View File
@@ -0,0 +1,7 @@
<Grid x:Class="RightTrayV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
DockPanel.Dock="Right">
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
</Grid>
+3
View File
@@ -0,0 +1,3 @@
Public Class RightTrayV
End Class
@@ -0,0 +1,8 @@
<Grid x:Class="SceneContentControlV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
<ContentControl Content="{Binding ProjectSceneHost}"/>
</Grid>
@@ -0,0 +1,3 @@
Public Class SceneContentControlV
End Class
+8 -8
View File
@@ -409,18 +409,18 @@ Public Class SetUpVM
' verifico se la testa è diversa
If TempPosition.Head <> sHead Then
' altrimenti la sovrascrivo
TempPosition.Head = sHead
TempPosition.SetHead( sHead)
' la metto anche come testa originale
If bOriginal Then TempPosition.OrigHead = sHead
' e verifico il numero di uscite
For ExitIndex = TempPosition.ExitToolAssociationList.Count + 1 To EgtGetHeadExitCount(sHead)
TempPosition.ExitToolAssociationList.Add(New ExitToolAssociation(ExitIndex.ToString, TempPosition))
Next
For ExitIndex = TempPosition.ExitToolAssociationList.Count - 1 To EgtGetHeadExitCount(sHead) Step -1
TempPosition.ExitToolAssociationList.RemoveAt(ExitIndex)
Next
End If
For ExitIndex = 0 To TempPosition.ExitToolAssociationList.Count - 1
TempPosition.ExitToolAssociationList.Add(New ExitToolAssociation(ExitIndex.ToString, TempPosition))
Next
For ExitIndex = TempPosition.ExitToolAssociationList.Count - 1 To EgtGetHeadExitCount(sHead) Step -1
TempPosition.ExitToolAssociationList.RemoveAt(ExitIndex)
Next
End If
For ExitIndex = 0 To TempPosition.ExitToolAssociationList.Count - 1
Dim CurrExitToolAss As ExitToolAssociation = TempPosition.ExitToolAssociationList(ExitIndex)
If CurrExitToolAss.ExitPar = sExitList(ToolIndex) Then
' vi metto l'utensile e segno l'uscita come occupata
-20
View File
@@ -1,20 +0,0 @@
<UserControl x:Class="Printing3DPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</UserControl>
@@ -1,3 +0,0 @@
Public Class Printing3DPanelV
End Class
-26
View File
@@ -1,26 +0,0 @@
Imports System.IO
Imports EgtUILib
Public Class Printing3DPanelVM
Private m_ButtonList As New List(Of ButtonItem)
Public ReadOnly Property ButtonList As List(Of ButtonItem)
Get
Return m_ButtonList
End Get
End Property
Sub New()
' Se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActivePrinting3d() Then
' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonItem = Nothing
While GetPrivateProfileButton(S_PRINTING3D, K_BUTTON & BtnIndex, IniFile.m_sPrinting3dDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn)
BtnIndex += 1
End While
End If
End Sub
End Class
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="BeamPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<EgtFloating:EgtFloatingPanel x:Class="BeamPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding BeamPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
@@ -17,4 +19,4 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+14
View File
@@ -2,6 +2,7 @@
Imports EgtUILib
Public Class BeamPanelVM
Inherits VMBase
Friend Const BEAM_PROCESS As String = "Beam\Process.lua"
Friend Const BEAM_MACHININGS As String = "BeamMachinings"
@@ -13,7 +14,20 @@ Public Class BeamPanelVM
End Get
End Property
Private m_BeamPanel_Visibility As Visibility
Public ReadOnly Property BeamPanel_Visibility As Visibility
Get
Return m_BeamPanel_Visibility
End Get
End Property
Friend Sub SetBeamPanelVisibility(bValue As Boolean)
m_BeamPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(BeamPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefBeamPanelVM(Me)
' Se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveBeam() Then
' Inizializzo i bottoni leggendoli da file ini
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="BeamWallPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<EgtFloating:EgtFloatingPanel x:Class="BeamWallPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding BeamWallPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
@@ -17,4 +19,4 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+16 -2
View File
@@ -2,6 +2,7 @@
Imports EgtUILib
Public Class BeamWallPanelVM
Inherits VMBase
Private m_ButtonList As New List(Of ButtonItem)
Public ReadOnly Property ButtonList As List(Of ButtonItem)
@@ -10,14 +11,27 @@ Public Class BeamWallPanelVM
End Get
End Property
Private m_BeamWallPanel_Visibility As Visibility
Public ReadOnly Property BeamWallPanel_Visibility As Visibility
Get
Return m_BeamWallPanel_Visibility
End Get
End Property
Friend Sub SetBeamWallPanelVisibility(bValue As Boolean)
m_BeamWallPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(BeamWallPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefBeamWallPanelVM(Me)
' Se attivo Beam o Wall, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveBeam() Or IniFile.IsActiveWall() Then
GetPrivateProfileString( S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
GetPrivateProfileString(S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonItem = 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)
BtnIndex += 1
End While
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="WallPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<EgtFloating:EgtFloatingPanel x:Class="WallPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding WallPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
@@ -17,4 +19,4 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+14
View File
@@ -2,6 +2,7 @@
Imports EgtUILib
Public Class WallPanelVM
Inherits VMBase
Friend Const WALL_MACHININGS As String = "WallMachinings"
@@ -12,7 +13,20 @@ Public Class WallPanelVM
End Get
End Property
Private m_WallPanel_Visibility As Visibility
Public ReadOnly Property WallPanel_Visibility As Visibility
Get
Return m_WallPanel_Visibility
End Get
End Property
Friend Sub SetWallPanelVisibility(bValue As Boolean)
m_WallPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(WallPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefWallPanelVM(Me)
' Se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveWall() Then
' Inizializzo i bottoni leggendoli da file ini
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="DoorPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<EgtFloating:EgtFloatingPanel x:Class="DoorPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding DoorPanel_Visibility}">
<!--Barra superiore dei comandi-->
<StackPanel Background="Transparent" Orientation="Horizontal">
@@ -18,4 +20,4 @@
IsEnabled="{Binding MTableDb_IsEnabled}"/>
</StackPanel>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+11
View File
@@ -31,6 +31,17 @@ Public Class DoorPanelVM
End Get
End Property
Private m_DoorPanel_Visibility As Visibility
Public ReadOnly Property DoorPanel_Visibility As Visibility
Get
Return m_DoorPanel_Visibility
End Get
End Property
Friend Sub SetDoorPanelVisibility(bValue As Boolean)
m_DoorPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
OnPropertyChanged(NameOf(DoorPanel_Visibility))
End Sub
' Definizione comandi
Private m_cmdDoors As ICommand
Private m_cmdDMach As ICommand
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="GunStockPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<EgtFloating:EgtFloatingPanel x:Class="GunStockPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding GunStockPanel_Visibility}">
<StackPanel Background="Transparent" Orientation="Horizontal">
<Button Command="{Binding NewGunStockCommand}" Style="{StaticResource GridViewPanelButton}"
@@ -27,4 +29,4 @@
</Button>
</StackPanel>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+23 -7
View File
@@ -16,6 +16,25 @@ Public Class GunStockPanelVM
End Get
End Property
Public ReadOnly Property CopyGunStock_Visibility As Visibility
Get
Dim sFunction As String = String.Empty
GetPrivateProfileString(S_GUNSTOCK, K_COPYFUNCTION, "", sFunction)
Return If(String.IsNullOrWhiteSpace(sFunction), Visibility.Collapsed, Visibility.Visible)
End Get
End Property
Private m_GunStockPanel_Visibility As Visibility
Public ReadOnly Property GunStockPanel_Visibility As Visibility
Get
Return m_GunStockPanel_Visibility
End Get
End Property
Friend Sub SetGunStockPanelVisibility(bValue As Boolean)
m_GunStockPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
OnPropertyChanged(NameOf(GunStockPanel_Visibility))
End Sub
#Region "Messages"
Public ReadOnly Property NewGunStockMsg As String
@@ -56,13 +75,6 @@ Public Class GunStockPanelVM
#End Region ' ToolTip
Public ReadOnly Property CopyGunStock_Visibility As Visibility
Get
Dim sFunction As String = String.Empty
GetPrivateProfileString(S_GUNSTOCK, K_COPYFUNCTION, "", sFunction)
Return If( String.IsNullOrWhiteSpace( sFunction), Visibility.Collapsed, Visibility.Visible)
End Get
End Property
' Definizione comandi
@@ -72,6 +84,10 @@ Public Class GunStockPanelVM
Private Shared m_cmdOpenMruNewGunStock As ICommand
Private Shared m_cmdOpenMruModifyGunStock As ICommand
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefGunStockPanelVM(Me)
End Sub
#Region "COMMANDS"
#Region "NewGunStockCommand"
+6 -4
View File
@@ -1,6 +1,8 @@
<UserControl x:Class="SpecialPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<EgtFloating:EgtFloatingPanel x:Class="SpecialPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding SpecialPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
@@ -18,4 +20,4 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</UserControl>
</EgtFloating:EgtFloatingPanel>
+16 -2
View File
@@ -2,6 +2,7 @@
Imports EgtUILib
Public Class SpecialPanelVM
Inherits VMBase
Private m_ButtonList As New List(Of ButtonItem)
Public ReadOnly Property ButtonList As List(Of ButtonItem)
@@ -10,6 +11,17 @@ Public Class SpecialPanelVM
End Get
End Property
Private m_SpecialPanel_Visibility As Visibility
Public ReadOnly Property SpecialPanel_Visibility As Visibility
Get
Return m_SpecialPanel_Visibility
End Get
End Property
Friend Sub SetSpecialPanelVisibility(bValue As Boolean)
m_SpecialPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(SpecialPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefSpecialPanelVM(Me)
@@ -31,12 +43,14 @@ Public Class SpecialPanelVM
For Each BtnItem In m_ButtonList
' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList
Select Case BtnItem.nDrawMachOrBoth
Case 0 ' bottone visibile sia in Draw che in Machining
BtnItem.m_Btn_Visibility = Visibility.Visible
Case 0 ' bottone nascosto
BtnItem.m_Btn_Visibility = Visibility.Collapsed
Case 1 ' bottone visibile solo in Draw
BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed)
Case 2 ' bottone visibile solo in Machining
BtnItem.m_Btn_Visibility = If(IsMachMode, Visibility.Visible, Visibility.Collapsed)
Case 3 ' bottone visibile sia in Draw che in Machining
BtnItem.m_Btn_Visibility = Visibility.Visible
End Select
' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True
+28 -25
View File
@@ -2,15 +2,17 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Orientation="Horizontal">
<!--Barra superiore dei comandi-->
<UniformGrid Rows="1"
Visibility="{Binding ProjectManager_Visibility}">
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}"
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
ContextMenuService.Placement="Bottom" IsEnabled="{Binding DrawIsChecked}"
Tag="{Binding}">
ContextMenuService.Placement="Bottom" IsEnabled="{Binding DrawIsChecked}"
Tag="{Binding}">
<Button.ContextMenu>
<ContextMenu ItemsSource="{Binding MruFileNames}">
<ContextMenu.Resources>
@@ -33,35 +35,36 @@
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding InsertCommand}" ToolTip="{Binding InsertToolTip}"
IsEnabled="{Binding DrawIsChecked}">
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/Insert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ImportCommand}" ToolTip="{Binding ImportToolTip}"
IsEnabled="{Binding DrawIsChecked}">
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
IsEnabled="{Binding DrawIsChecked}">
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/Export.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding PrintCommand}" ToolTip="{Binding PrintToolTip}"
<Button Command="{Binding PrintCommand}" ToolTip="{Binding PrintToolTip}"
IsEnabled="True">
<Image Source="/Resources/TopCommandBar/Print.png" Height="22" />
</Button>
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}"
IsEnabled="{Binding SaveIsEnabled}">
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
</Button>
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}"
IsEnabled="{Binding SaveIsEnabled}">
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
<Image Source="/Resources/TopCommandBar/Print.png" Height="22" />
</Button>
<UniformGrid Rows="1">
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding DrawMsg}"
IsChecked="{Binding DrawIsChecked}" IsEnabled="{Binding DrawIsEnabled}"/>
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding MachiningMsg}"
IsChecked="{Binding MachiningIsChecked}" IsEnabled="{Binding MachiningIsEnabled}"/>
</UniformGrid>
</UniformGrid>
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}"
IsEnabled="{Binding SaveIsEnabled}">
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
</Button>
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}"
IsEnabled="{Binding SaveIsEnabled}">
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
</Button>
<UniformGrid Rows="1">
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding DrawMsg}"
IsChecked="{Binding DrawIsChecked}" IsEnabled="{Binding DrawIsEnabled}"/>
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding MachiningMsg}"
IsChecked="{Binding MachiningIsChecked}" IsEnabled="{Binding MachiningIsEnabled}"/>
</UniformGrid>
</StackPanel>
</StackPanel>
+72 -9
View File
@@ -15,6 +15,17 @@ Public Class TopCommandBarVM
End Get
End Property
Private m_ProjectManager_Visibility As Visibility = Visibility.Visible
Public ReadOnly Property ProjectManager_Visibility As Visibility
Get
Return m_ProjectManager_Visibility
End Get
End Property
Friend Sub SetProjectManagerVisibility(bValue As Boolean)
m_ProjectManager_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
OnPropertyChanged(NameOf(ProjectManager_Visibility))
End Sub
' Definizione comandi
Private m_cmdNew As ICommand
Private m_cmdOpen As ICommand
@@ -220,10 +231,10 @@ Public Class TopCommandBarVM
Dim bIsEnabled As Boolean = Not IsNothing(Map.refOperationParametersExpanderVM) AndAlso Not Map.refOperationParametersExpanderVM.ParametersIsExpanded
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(bIsEnabled, bIsEnabled, bIsEnabled)
' se parametri di una lavorazione aperti, disattivo MTable e SpecialPanel
Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
End If
Else
Else
' Deseleziono tutto
EgtDeselectAll()
' Pulisco lista e geometria faccette di superfici di lavorazione corrente
@@ -307,7 +318,7 @@ Public Class TopCommandBarVM
''' </summary>
Friend Sub NewCmd()
Map.refProjectVM.GetController.NewProject(True)
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
OnPropertyChanged("MruFileNames")
End Sub
@@ -342,7 +353,7 @@ Public Class TopCommandBarVM
Else
Map.refProjectVM.GetController.OpenProject(sFilePath, False)
End If
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
End Sub
#End Region ' OpenCommand
@@ -642,7 +653,7 @@ Public Class TopCommandBarVM
While nMchGrpId <> GDB_ID.NULL
Dim sMachineName As String = String.Empty
EgtGetMachGroupMachineName(nMchGrpId, sMachineName)
If Not String.IsNullOrWhiteSpace(sMachineName) Then
If Not String.IsNullOrWhiteSpace(sMachineName) AndAlso Not Machines.Contains( sMachineName) Then
Machines.Add(sMachineName)
End If
nMchGrpId = EgtGetNextMachGroup(nMchGrpId)
@@ -652,9 +663,13 @@ Public Class TopCommandBarVM
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
For FileIndex = 0 To TempFiles.Count - 1
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
If TempFiles(FileIndex) = sCurrProject Then Continue For
Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
If ( String.Compare(sCurrFileName, sCurrProjName) = 0 OrElse
sCurrFileName.Contains( sCurrProjName & "_")) Then
OtherFiles.Add(TempFiles(FileIndex))
End If
Next
@@ -667,6 +682,8 @@ Public Class TopCommandBarVM
End If
Try
Using zip As New Ionic.Zip.ZipFile(sZipToCreate)
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
zip.AlternateEncoding = Text.Encoding.UTF8
' aggiungo file macchine
For Each sMachineName As String In Machines
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sMachineName
@@ -731,7 +748,7 @@ Public Class TopCommandBarVM
If nErr = 0 Then
Map.refMachinePanelVM.UpdateCurrentMachine()
MachiningMode_IsChecked()
Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
IniFile.m_ProjectMode = ProjectModeOpt.MACHINING
Else
m_MachiningIsChecked = False
@@ -757,7 +774,29 @@ Public Class TopCommandBarVM
End If
' ProjectV
If Not IsNothing(Map.refProjectV) Then
If IniFile.IsActivePlugin() Then
For Each Panel In Map.refProjectVM.PanelList
If TypeOf Panel Is WinFormPluginControlV Then
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
If Not IsNothing(WinFormPanel) Then
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.DRAW)
End If
End If
Next
End If
Map.refProjectV.DrawMode_IsChecked()
Map.refMachinePanelVM.SetMachinePanelVisibility(IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW)
Map.refExecutePanelVM.SetExecutePanelVisibility(GetPrivateProfileInt(S_GENERAL, K_EXECUTE, 0) = 1)
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False))
Map.refBeamPanelVM.SetBeamPanelVisibility(IniFile.IsActiveBeam())
Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall())
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeam() Or IniFile.IsActiveWall())
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refGunStockPanelVM.SetGunStockPanelVisibility(IniFile.IsActiveGunStock())
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(True)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False)
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.DRAW)
End If
' ProjectVM
If Not IsNothing(Map.refProjectVM) Then
@@ -783,11 +822,35 @@ Public Class TopCommandBarVM
Friend Sub MachiningMode_IsChecked()
' ProjectV
If IniFile.IsActivePlugin() Then
For Each Panel In Map.refProjectVM.PanelList
If TypeOf Panel Is WinFormPluginControlV Then
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
If Not IsNothing(WinFormPanel) Then
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
End If
End If
Next
End If
Map.refProjectV.MachiningMode_IsChecked()
Map.refMachinePanelVM.SetMachinePanelVisibility(True)
Map.refExecutePanelVM.SetExecutePanelVisibility(False)
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True))
Map.refBeamPanelVM.SetBeamPanelVisibility(False)
Map.refWallPanelVM.SetWallPanelVisibility(False)
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False)
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
' ProjectVM
Map.refProjectVM.MachiningMode_IsChecked()
' OptionPanelVM
Map.refOptionPanelVM.MachiningMode_IsChecked()
If Not IsNothing(Map.refOptionPanelVM) Then Map.refOptionPanelVM.MachiningMode_IsChecked()
' MyMachinePanelVM
Map.refMachinePanelVM.MachineListIsEnabled = False
' InstrumentPanel
+36
View File
@@ -0,0 +1,36 @@
<WrapPanel x:Class="TopTrayV"
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"
DockPanel.Dock="Top"
Orientation="Horizontal">
<EgtFloating:EgtFloatingPanel Name="ShowPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:ShowPanelV DataContext="{StaticResource ShowPanelViewModel}"/>
</EgtFloating:EgtFloatingPanel>
<EgtFloating:EgtFloatingPanel Name="ViewPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/>
<local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
</EgtFloating:EgtFloatingPanel>
<!--<EgtFloating:EgtFloatingPanel Name="InstrumentPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">-->
<local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/>
<!--</EgtFloating:EgtFloatingPanel>-->
<EgtFloating:EgtFloatingPanel Name="GridPanel"
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
<local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/>
<local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
</EgtFloating:EgtFloatingPanel>
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
</WrapPanel>
+3
View File
@@ -0,0 +1,3 @@
Public Class TopTrayV
End Class
+28
View File
@@ -0,0 +1,28 @@
Imports EgtUILib
Public Class BasePanelVM
Inherits VMBase
Private m_PanelViewState As ViewPanelStates = ViewPanelStates.NEVER
Friend Sub SetPanelViewState(value As ViewPanelStates)
m_PanelViewState = value
End Sub
Private m_Panel_Visibility As Visibility
Public ReadOnly Property Panel_Visibility As Visibility
Get
Return m_Panel_Visibility
End Get
End Property
Friend Sub SetPanelVisibility(ProjectMode As ProjectModeOpt)
Dim bValue As Boolean = True
Select Case ProjectMode
Case ProjectModeOpt.DRAW, ProjectModeOpt.ONLYDRAW
m_Panel_Visibility = If(m_PanelViewState = ViewPanelStates.ONLYDRAW Or m_PanelViewState = ViewPanelStates.ALWAYS, Visibility.Visible, Visibility.Collapsed)
Case ProjectModeOpt.MACHINING
m_Panel_Visibility = If(m_PanelViewState = ViewPanelStates.ONLYMACHINING Or m_PanelViewState = ViewPanelStates.ALWAYS, Visibility.Visible, Visibility.Collapsed)
End Select
NotifyPropertyChanged(NameOf(Panel_Visibility))
End Sub
End Class
-1
View File
@@ -37,7 +37,6 @@
<EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/>
<EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/>
<EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/>
<EgtCAM5:Printing3DPanelVM x:Key="Printing3DPanelVM"/>
<EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/>
<!--<EgtCAM5:MachGroupPanelVM x:Key="MachGroupPanelViewModel"/>-->
<!--<EgtCAM5:OperationExpanderVM x:Key="OperationExpanderViewModel"/>-->
+12 -16
View File
@@ -32,7 +32,6 @@ Public Module IniFile
RAWPART = 3
RAWPARTWITHFIXTURE = 4
MACHPATH = 5
ALL = 99
End Enum
' MainWindow Page
@@ -51,7 +50,8 @@ Public Module IniFile
CAD2D = 128
STEELDORS = 256
WALL = 512
_3DPRINT = 1024
PLUGIN = 1024
ADVMACHINING = 2048
End Enum
Friend m_sDataRoot As String
Friend m_sConfigDir As String
@@ -263,9 +263,6 @@ Public Module IniFile
If bIsActive Then
Dim sTemp As String = ""
GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sTemp)
#If PLATFORM = "x64" Then
GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR64, sTemp, sTemp)
#End If
m_sBeamDirPath = sTemp.TrimEnd( "\"c)
End If
Return bIsActive
@@ -276,22 +273,11 @@ Public Module IniFile
If bIsActive Then
Dim sTemp As String = ""
GetPrivateProfileString(S_WALL, K_WALLBASEDIR, "", sTemp)
#If PLATFORM = "x64" Then
GetPrivateProfileString(S_WALL, K_WALLBASEDIR64, sTemp, sTemp)
#End If
m_sWallDirPath = sTemp.TrimEnd( "\"c)
End If
Return bIsActive
End Function
Friend Function IsActivePrinting3d() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT._3DPRINT) <> 0 And (GetPrivateProfileInt(S_PRINTING3D, K_ENABLE, 0) <> 0)
If bIsActive Then
GetPrivateProfileString(S_PRINTING3D, K_3PRNBASEDIR, "", m_sPrinting3dDirPath)
End If
Return bIsActive
End Function
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)
If bIsActive Then GetPrivateProfileString(S_DOORS, K_BASEDIR, "", m_sDoorsDirPath)
@@ -308,10 +294,20 @@ Public Module IniFile
Return bIsActive
End Function
Friend Function IsActivePlugin() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.PLUGIN) <> 0
Dim nTemp As Integer = GetPrivateProfileInt(S_GENERAL, K_PLUGIN, 0)
Return bIsActive And nTemp = 1
End Function
Friend Function IsKeyEnabledVirtualMilling() As Boolean
Return (IniFile.m_nKeyOptions And KEY_OPT.VIRTUALMILLING) <> 0
End Function
Friend Function IsKeyEnabledAdvancedMachining() As Boolean
Return (IniFile.m_nKeyOptions And KEY_OPT.ADVMACHINING) <> 0
End Function
Friend Function IsActiveSpecialPanel() As Boolean
Dim btDummy As ButtonItem = Nothing
Return GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0 AndAlso GetPrivateProfileButton(S_SPECIAL, K_BUTTON & "1", "", btDummy)
+19 -4
View File
@@ -38,8 +38,14 @@ Public Module MachineModel
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.CHISELING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 9)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 11)})
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFROUGHING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFROUGHING, .TypeName = EgtMsg(31212)})
End If
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(31211)})
End If
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_5AXMACHINING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY._5AXMACHINING, .TypeName = EgtMsg(31213)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.WATERJETTING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 12)})
@@ -76,8 +82,17 @@ Public Module MachineModel
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineName) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.CHISELING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 9)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineName) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 11)})
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFROUGHING, 0, sMachineName) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFROUGHING, .TypeName = EgtMsg(31212)})
End If
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineName) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(31211)})
End If
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_5AXMACHINING, 0, sMachineName) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY._5AXMACHINING, .TypeName = EgtMsg(31213)})
End If
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachineName) <> 0 Then
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.WATERJETTING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 12)})
End If
Return ActiveMachiningsFamiliesList.ToArray
End Function
+61
View File
@@ -9,6 +9,7 @@ Module Map
Private m_refTopCommandBarVM As TopCommandBarVM
Private m_refProjectVM As ProjectVM
Private m_refFixtureParametersVM As FixtureParametersVM
Private m_refRawPartOptionVM As RawPartOptionVM
Private m_refSimulationExpanderVM As SimulationExpanderVM
Private m_refMachinePanelVM As MyMachinePanelVM
Private m_refOptionPanelVM As OptionPanelVM
@@ -28,6 +29,11 @@ Module Map
Private m_refProjectV As ProjectV
Private m_refDoorPanelVM As DoorPanelVM
Private m_refSpecialPanelVM As SpecialPanelVM
Private m_refExecutePanelVM As ExecutePanelVM
Private m_refBeamPanelVM As BeamPanelVM
Private m_refWallPanelVM As WallPanelVM
Private m_refBeamWallPanelVM As BeamWallPanelVM
Private m_refGunStockPanelVM As GunStockPanelVM
#Region "Get"
@@ -56,6 +62,11 @@ Module Map
Return m_refFixtureParametersVM
End Get
End Property
Public ReadOnly Property refRawPartOptionVM As RawPartOptionVM
Get
Return m_refRawPartOptionVM
End Get
End Property
Public ReadOnly Property refSimulationExpanderVM As SimulationExpanderVM
Get
Return m_refSimulationExpanderVM
@@ -151,6 +162,31 @@ Module Map
Return m_refSpecialPanelVM
End Get
End Property
Public ReadOnly Property refExecutePanelVM As ExecutePanelVM
Get
Return m_refExecutePanelVM
End Get
End Property
Public ReadOnly Property refBeamPanelVM As BeamPanelVM
Get
Return m_refBeamPanelVM
End Get
End Property
Public ReadOnly Property refWallPanelVM As WallPanelVM
Get
Return m_refWallPanelVM
End Get
End Property
Public ReadOnly Property refBeamWallPanelVM As BeamWallPanelVM
Get
Return m_refBeamWallPanelVM
End Get
End Property
Public ReadOnly Property refGunStockPanelVM As GunStockPanelVM
Get
Return m_refGunStockPanelVM
End Get
End Property
#End Region ' Get
@@ -172,6 +208,11 @@ Module Map
m_refFixtureParametersVM = FixtureParametersVM
Return Not IsNothing(m_refFixtureParametersVM)
End Function
Friend Function SetRefRawPartOptionVM(RawPartOptionVM As RawPartOptionVM) As Boolean
m_refRawPartOptionVM = RawPartOptionVM
Return Not IsNothing(m_refRawPartOptionVM)
End Function
Friend Function SetRefSimulationExpanderVM(SimulationExpanderVM As SimulationExpanderVM) As Boolean
m_refSimulationExpanderVM = SimulationExpanderVM
Return Not IsNothing(m_refSimulationExpanderVM)
@@ -248,6 +289,26 @@ Module Map
m_refSpecialPanelVM = SpecialPanelVM
Return Not IsNothing(m_refSpecialPanelVM)
End Function
Friend Function SetRefExecutePanelVM(ExecutePanelVM As ExecutePanelVM) As Boolean
m_refExecutePanelVM = ExecutePanelVM
Return Not IsNothing(m_refExecutePanelVM)
End Function
Friend Function SetRefBeamPanelVM(BeamPanelVM As BeamPanelVM) As Boolean
m_refBeamPanelVM = BeamPanelVM
Return Not IsNothing(m_refBeamPanelVM)
End Function
Friend Function SetRefWallPanelVM(WallPanelVM As WallPanelVM) As Boolean
m_refWallPanelVM = WallPanelVM
Return Not IsNothing(m_refWallPanelVM)
End Function
Friend Function SetRefBeamWallPanelVM(BeamWallPanelVM As BeamWallPanelVM) As Boolean
m_refBeamWallPanelVM = BeamWallPanelVM
Return Not IsNothing(m_refBeamWallPanelVM)
End Function
Friend Function SetRefGunStockPanelVM(GunStockPanelVM As GunStockPanelVM) As Boolean
m_refGunStockPanelVM = GunStockPanelVM
Return Not IsNothing(m_refGunStockPanelVM)
End Function
#End Region ' Set
+9 -3
View File
@@ -9,21 +9,27 @@
<Button ToolTip="{Binding LookFromTopToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding TopViewCommand}">
<Image Source="/Resources/GridViewPanel/LookFromTOP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromBottomToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding BottomViewCommand}">
<Image Source="/Resources/GridViewPanel/LookFromBOTTOM.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromFrontToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding FrontViewCommand}">
<Image Source="/Resources/GridViewPanel/LookFromFRONT.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromRightToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding RightViewCommand}">
<Image Source="/Resources/GridViewPanel/LookFromRIGHT.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromBackToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding BackViewCommand}">
<Image Source="/Resources/GridViewPanel/LookFromBACK.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromLeftToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding LeftViewCommand}">
<Image Source="/Resources/GridViewPanel/LookFromLEFT.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromRightToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding RightViewCommand}">
<Image Source="/Resources/GridViewPanel/LookFromRIGHT.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_SWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewSWCommand}">
<Image Source="/Resources/GridViewPanel/LookFromISO_SW.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LookFromIso_SEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewSECommand}">
<Image Source="/Resources/GridViewPanel/LookFromISO_SE.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</UserControl>
+59
View File
@@ -8,11 +8,13 @@ Public Class ViewPanelVM
' Definizione comandi
Private m_cmdZoomAll As ICommand
Private m_cmdTopView As ICommand
Private m_cmdBottomView As ICommand
Private m_cmdFrontView As ICommand
Private m_cmdLeftView As ICommand
Private m_cmdBackView As ICommand
Private m_cmdRightView As ICommand
Private m_cmdIsoViewSW As ICommand
Private m_cmdIsoViewSE As ICommand
#Region "ToolTip"
@@ -27,6 +29,11 @@ Public Class ViewPanelVM
Return EgtMsg(MSG_GRIDVIEWPANEL + 7)
End Get
End Property
Public ReadOnly Property LookFromBottomToolTip As String
Get
Return EgtMsg(5284)
End Get
End Property
Public ReadOnly Property LookFromFrontToolTip As String
Get
@@ -58,6 +65,12 @@ Public Class ViewPanelVM
End Get
End Property
Public ReadOnly Property LookFromIso_SEToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 13)
End Get
End Property
#End Region ' ToolTip
#End Region ' FIELDS & PROPERTIES
@@ -110,6 +123,29 @@ Public Class ViewPanelVM
#End Region ' TopViewCommand
#Region "BottomViewCommand"
''' <summary>
''' Returns a command that do TopView.
''' </summary>
Public ReadOnly Property BottomViewCommand As ICommand
Get
If m_cmdBottomView Is Nothing Then
m_cmdBottomView = New RelayCommand(AddressOf BottomView)
End If
Return m_cmdBottomView
End Get
End Property
''' <summary>
''' Execute the BottomView. This method is invoked by the BottomViewCommand.
''' </summary>
Public Sub BottomView(ByVal param As Object)
Map.refProjectVM.GetScene.BottomView()
End Sub
#End Region ' BottomViewCommand
#Region "FrontViewCommand"
''' <summary>
@@ -225,6 +261,29 @@ Public Class ViewPanelVM
#End Region ' IsoViewSWCommand
#Region "IsoViewSECommand"
''' <summary>
''' Returns a command that do IsoViewSE.
''' </summary>
Public ReadOnly Property IsoViewSECommand As ICommand
Get
If m_cmdIsoViewSE Is Nothing Then
m_cmdIsoViewSE = New RelayCommand(AddressOf IsoViewSE)
End If
Return m_cmdIsoViewSE
End Get
End Property
''' <summary>
''' Execute the IsoViewSE. This method is invoked by the IsoViewSECommand.
''' </summary>
Public Sub IsoViewSE(ByVal param As Object)
Map.refProjectVM.GetScene.IsoViewSE()
End Sub
#End Region ' IsoViewSECommand
#End Region ' COMMANDS
End Class
@@ -0,0 +1,13 @@
<Grid x:Class="WinFormPluginControlV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DockPanel.Dock="{Binding DockSide}"
Height="{Binding Height}"
Width="{Binding Width}"
Visibility="{Binding Panel_Visibility}">
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
<!--<ContentControl Content="{Binding WinFormUserControlHost}"/>-->
<WindowsFormsHost Name="WinFormHost"/>
</Grid>
@@ -0,0 +1,30 @@
Imports System.Windows.Forms.Integration
Public Class WinFormPluginControlV
Private m_WinFormPluginControlVM As WinFormPluginControlVM
Public ReadOnly Property WinFormPluginControlVM As WinFormPluginControlVM
Get
Return m_WinFormPluginControlVM
End Get
End Property
Private m_WinFormUserControlHost As WindowsFormsHost
Public ReadOnly Property WinFormUserControlHost As WindowsFormsHost
Get
Return m_WinFormUserControlHost
End Get
End Property
Sub New(WinFormPluginControlVM As WinFormPluginControlVM)
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
WinFormHost.Child = WinFormPluginControlVM.WinFormUserControl
Me.DataContext = WinFormPluginControlVM
m_WinFormPluginControlVM = WinFormPluginControlVM
End Sub
End Class
@@ -0,0 +1,50 @@
Imports System.Windows.Forms.Integration
Imports EgtUILib
Public Class WinFormPluginControlVM
Inherits BasePanelVM
Private m_WinFormUserControl As Forms.Control
Public ReadOnly Property WinFormUserControl As Forms.Control
Get
Return m_WinFormUserControl
End Get
End Property
Private m_DockSide As Dock
Public ReadOnly Property DockSide As Dock
Get
Select Case TryCast(m_WinFormUserControl, IPluginControl).DockSide
Case Forms.DockStyle.Top
Return Dock.Top
Case Forms.DockStyle.Bottom
Return Dock.Bottom
Case Forms.DockStyle.Left
Return Dock.Left
Case Forms.DockStyle.Right
Return Dock.Right
Case Else
Return Nothing
End Select
End Get
End Property
Public ReadOnly Property Height As Double
Get
Return If(TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Left Or TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Right, Double.NaN, m_WinFormUserControl.Height)
End Get
End Property
Public ReadOnly Property Width As Double
Get
Return If(TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Top Or TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Bottom, Double.NaN, m_WinFormUserControl.Width)
End Get
End Property
Sub New(WinFormControl As Forms.Control, ViewPanelState As ViewPanelStates)
m_WinFormUserControl = WinFormControl
' imposto visibilita' standard
SetPanelViewState(ViewPanelState)
End Sub
End Class
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EgtUILib" version="2.4.6.1" targetFramework="net40-client" />
<package id="EgtWPFLib" version="2.3.12.1" targetFramework="net40-client" />
<package id="EgtWPFLib5" version="2.4.6.1" targetFramework="net40-client" />
</packages>