diff --git a/CompoPanel/CompoPanelVM.vb b/CompoPanel/CompoPanelVM.vb
index 7493faf..566c23e 100644
--- a/CompoPanel/CompoPanelVM.vb
+++ b/CompoPanel/CompoPanelVM.vb
@@ -129,6 +129,8 @@ Public Class CompoPanelVM
Map.refHardwarePageVM.CurrHardware = New Hardware
Map.refHardwarePageVM.VisibilityGeneral = Visibility.Visible
Map.refHardwarePageVM.CurrHardware.LoadTemplate(m_CurrCompoType)
+ ' Apro il progetto di esempio del tipo del bottone selezionato
+ Map.refHardwareHelpSceneHostV.LoadHelpProject()
End If
'------------------------------------------------------------------------------------------------------------------------------
Else ' se non sono nella configurazione Hardware
diff --git a/Doors.vb b/Doors.vb
index ea7a00a..165c036 100644
--- a/Doors.vb
+++ b/Doors.vb
@@ -35,25 +35,6 @@ Public Module Doors
Return bOk
End Function
- Function ExecDoorsPrinter(ByRef scene As Scene, sFilePath As String, Optional bDraw As Boolean = True) As Boolean
- ' Cursore attesa
- scene.Cursor = System.Windows.Forms.Cursors.WaitCursor
- ' Scrivo il nome del file aperto in una variabile globale per averlo in caso di errore
- IniFile.m_DDFFilePath = sFilePath
- ' Creazione porta
- Dim bOk As Boolean = CreateDoors(sFilePath, False, False)
- '' se attiva modalità assemblato, calcolo posizioni dei Part
- 'If OptionModule.m_ConfigurationSoftware = ConfigType.Assembly Then
- ' Map.refSceneManagerVM.ComposeAssembly(SceneManagerVM.nComposeAssembly)
- 'End If
- ' Aggiorno la visualizzazione
- If bDraw Then EgtDraw()
- EgtZoom(ZM.ALL)
- ' Cursore standard
- scene.Cursor = System.Windows.Forms.Cursors.Default
- Return bOk
- End Function
-
Function CreateDoors(ByRef sDdfFile As String, bNcGen As Boolean, bBatch As Boolean) As Boolean
' Carico il file
Dim sExecPath As String = String.Empty
@@ -63,7 +44,11 @@ Public Module Doors
If Not EgtLuaExecFile(sExecPath) Then Return False
' Setto variabili per quotatura
For Each HardwareDimension In Map.refDimensioningPanelVM.HardwareDimensionList
- EgtLuaSetGlobBoolVar("DGD." & HardwareDimension.NameLayer(), HardwareDimension.SelectedLayer)
+ Dim IsHardwareDimActive As Boolean = False
+ If Not Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage Then
+ IsHardwareDimActive = HardwareDimension.SelectedLayer
+ End If
+ EgtLuaSetGlobBoolVar("DGD." & HardwareDimension.NameLayer(), IsHardwareDimActive)
Next
' Lancio la creazione
EgtLuaSetGlobStringVar("DGD.FILE", sDdfFile)
diff --git a/EgtDOORCreator.vbproj b/EgtDOORCreator.vbproj
index 8d341b0..4505838 100644
--- a/EgtDOORCreator.vbproj
+++ b/EgtDOORCreator.vbproj
@@ -154,6 +154,9 @@
HardwarePageV.xaml
+
+ HardwareHelpSceneHostV.xaml
+ LauncherV.xaml
@@ -255,6 +258,10 @@
DesignerMSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+ DesignerMSBuild:Compile
diff --git a/EgtDOORCreatorDictionary.xaml b/EgtDOORCreatorDictionary.xaml
index c025bd8..f353521 100644
--- a/EgtDOORCreatorDictionary.xaml
+++ b/EgtDOORCreatorDictionary.xaml
@@ -2,7 +2,8 @@
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"
- xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator">
+ xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator"
+ xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
@@ -424,4 +425,24 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/HardwareManager/Hardware.vb b/HardwareManager/Hardware.vb
index dcac034..1ac0af2 100644
--- a/HardwareManager/Hardware.vb
+++ b/HardwareManager/Hardware.vb
@@ -156,7 +156,16 @@ Public Class Hardware
Return m_SelType
End Get
Set(value As TypeHardware)
+ ' verifico se tipo è cambiato
+ Dim bChanged As Boolean = If(Not IsNothing(m_SelType), value.NameINI <> m_SelType.NameINI, True)
m_SelType = value
+ ' se cambiato carico il suo progetto con quotature/suggerimenti
+ If bChanged Then Map.refHardwareHelpSceneHostV.LoadHelpProject()
+ ' se la text è visibile non passo mai dal SelTemplate quindi sposto qui il caricamento dei dati
+ If VisibilityTextTemplate = Visibility.Visible Then
+ ClearGroupChapters()
+ ReadChapterTemplate()
+ End If
NotifyPropertyChanged("SelType")
End Set
End Property
@@ -246,7 +255,7 @@ Public Class Hardware
' carico di Default il valore 1
For IndexListType As Integer = 0 To TypeList.Count - 1
If TypeList(IndexListType).NameINI = "1" Then
- m_SelType = TypeList(IndexListType)
+ SelType = TypeList(IndexListType)
NotifyPropertyChanged("SelType")
Exit For
End If
@@ -289,7 +298,7 @@ Public Class Hardware
Else
For IndexListType As Integer = 0 To TypeList.Count - 1
If TypeList(IndexListType).NameINI = ConfigDefault Then
- m_SelType = TypeList(IndexListType)
+ SelType = TypeList(IndexListType)
NotifyPropertyChanged("SelType")
Exit For
End If
diff --git a/HardwareManager/HardwareHelpSceneHostV.xaml b/HardwareManager/HardwareHelpSceneHostV.xaml
new file mode 100644
index 0000000..9ccfb65
--- /dev/null
+++ b/HardwareManager/HardwareHelpSceneHostV.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/HardwareManager/HardwareHelpSceneHostV.xaml.vb b/HardwareManager/HardwareHelpSceneHostV.xaml.vb
new file mode 100644
index 0000000..b1d6bf9
--- /dev/null
+++ b/HardwareManager/HardwareHelpSceneHostV.xaml.vb
@@ -0,0 +1,99 @@
+Imports EgtUILib
+Imports EgtWPFLib5
+Imports System.IO
+
+Public Class HardwareHelpSceneHostV
+
+ Sub New()
+ ' This call is required by the designer.
+ InitializeComponent()
+ ' Creo riferimento a questa classe in CompoWindowMap
+ Map.SetRefHardwareHelpSceneHostV(Me)
+ ' Inizializzazione Scena
+ PreInitializeScene()
+ HardwareHelpScene.Init()
+ PostInitializeScene()
+ ' Imposto stato gestione mouse diretto della scena a nessuno
+ HardwareHelpScene.SetStatusNull()
+ EgtSetCurrentContext(HardwareHelpScene.GetCtx)
+ EgtNewFile()
+ End Sub
+
+ Private Sub PreInitializeScene()
+ ' imposto colore di default
+ Dim DefColor As New Color3d(0, 0, 0)
+ GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
+ HardwareHelpScene.SetDefaultMaterial(DefColor)
+ ' imposto colori sfondo
+ Dim BackTopColor As New Color3d(192, 192, 192)
+ GetMainPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
+ Dim BackBotColor As New Color3d(BackTopColor)
+ GetMainPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
+ HardwareHelpScene.SetViewBackground(BackTopColor, BackBotColor)
+ ' imposto colore di evidenziazione
+ Dim MarkColor As New Color3d(255, 255, 0)
+ GetMainPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
+ HardwareHelpScene.SetMarkMaterial(MarkColor)
+ ' imposto colore per superfici selezionate
+ Dim SelSurfColor As New Color3d(255, 255, 192)
+ GetMainPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
+ HardwareHelpScene.SetSelSurfMaterial(SelSurfColor)
+ ' imposto tipo e colore del rettangolo di zoom
+ Dim bOutline As Boolean = True
+ Dim ZwColor As New Color3d(0, 0, 0)
+ GetMainPrivateProfileZoomWin(S_SCENE, K_ZOOMWIN, bOutline, ZwColor)
+ HardwareHelpScene.SetZoomWinAttribs(bOutline, ZwColor)
+ ' imposto colore della linea di distanza
+ Dim DstLnColor As New Color3d(255, 0, 0)
+ GetMainPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor)
+ HardwareHelpScene.SetDistLineMaterial(DstLnColor)
+ ' imposto parametri OpenGL
+ Dim nDriver As Integer = GetMainPrivateProfileInt(S_OPENGL, K_DRIVER, 3)
+ Dim b2Buff As Boolean = (GetMainPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1) <> 0)
+ Dim nColorBits As Integer = GetMainPrivateProfileInt(S_OPENGL, K_COLORBITS, 32)
+ Dim nDepthBits As Integer = GetMainPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32)
+ HardwareHelpScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
+ End Sub
+
+ Private Sub PostInitializeScene()
+ ' imposto tipo coordinate
+ HardwareHelpScene.SetGridCursorPos(True)
+ ' modo di visualizzazione
+ Dim nShowMode As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.HIDDENLINE)
+ EgtSetShowMode(DirectCast(nShowMode, SM))
+ End Sub
+
+ Private Sub OnMouseDownScene() Handles HardwareHelpScene.OnMouseDownScene
+ EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
+ End Sub
+
+ Friend Sub LoadHelpProject()
+ EgtSetCurrentContext(HardwareHelpScene.GetCtx())
+ Dim FileName As String = Map.refHardwarePageVM.CurrHardware.HardwareGeneral.Path & "\" & Map.refHardwarePageVM.CurrHardware.SelType.Name & ".nge"
+ If String.IsNullOrWhiteSpace(FileName) OrElse Not File.Exists(FileName) Then
+ EgtNewFile()
+ Else
+ EgtOpenFile(FileName)
+ EgtSetView(VT.ISO_NE, False)
+ EgtZoom(ZM.ALL, True)
+ End If
+ EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
+ End Sub
+
+ Friend Sub ShowHideParam(Param As CompoParam)
+ EgtSetCurrentContext(HardwareHelpScene.GetCtx())
+ Dim FirstPart As Integer = EgtGetFirstPart()
+ If FirstPart = GDB_ID.NULL Then
+ EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
+ Return
+ End If
+ For Each Compo In Map.refHardwarePageVM.CurrHardware.GroupChapters
+ For Each CurrParam In Compo.CompoParamList
+ EgtSetStatus(EgtGetFirstNameInGroup(FirstPart, CurrParam.DDFName), If(CurrParam.DDFName = Param.DDFName, GDB_ST.ON_, GDB_ST.OFF))
+ Next
+ Next
+ EgtDraw()
+ EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
+ End Sub
+
+End Class
diff --git a/HardwareManager/HardwarePageV.xaml b/HardwareManager/HardwarePageV.xaml
index a725c09..6061fb4 100644
--- a/HardwareManager/HardwarePageV.xaml
+++ b/HardwareManager/HardwarePageV.xaml
@@ -20,6 +20,7 @@
+
@@ -123,7 +124,7 @@
-
+
@@ -135,7 +136,7 @@
-
+
@@ -162,7 +163,7 @@
-
+
-
+
@@ -218,7 +219,7 @@
-
+
-
+
@@ -274,7 +275,10 @@
-
-
+
+
+
+
+
diff --git a/HardwareManager/HardwarePageV.xaml.vb b/HardwareManager/HardwarePageV.xaml.vb
index 06bada3..dc095ec 100644
--- a/HardwareManager/HardwarePageV.xaml.vb
+++ b/HardwareManager/HardwarePageV.xaml.vb
@@ -1,3 +1,8 @@
Public Class HardwarePageV
+ Private Sub Param_MouseEnter(sender As Object, e As MouseEventArgs)
+ Dim Grid As Panel = DirectCast(sender, Panel)
+ Map.refHardwareHelpSceneHostV.ShowHideParam(DirectCast(Grid.DataContext, CompoParam))
+ End Sub
+
End Class
diff --git a/Map.vb b/Map.vb
index 2229c86..3c062d1 100644
--- a/Map.vb
+++ b/Map.vb
@@ -22,6 +22,7 @@
Private m_refOrderVM As OrderVM
Private m_refPrintSceneHostV As PrintSceneHostV
+ Private m_refHardwareHelpSceneHostV As HardwareHelpSceneHostV
Private m_refOptionsVM As OptionsVM
@@ -141,6 +142,12 @@
End Get
End Property
+ Public ReadOnly Property refHardwareHelpSceneHostV As HardwareHelpSceneHostV
+ Get
+ Return m_refHardwareHelpSceneHostV
+ End Get
+ End Property
+
#End Region ' Get
#Region "Set"
@@ -240,6 +247,11 @@
Return Not IsNothing(m_refPrintSceneHostV)
End Function
+ Friend Function SetRefHardwareHelpSceneHostV(HardwareHelpSceneHostV As HardwareHelpSceneHostV) As Boolean
+ m_refHardwareHelpSceneHostV = HardwareHelpSceneHostV
+ Return Not IsNothing(m_refHardwareHelpSceneHostV)
+ End Function
+
#End Region ' Set
#Region "Init"
diff --git a/Print/PrintWndV.xaml b/Print/PrintWndV.xaml
index 0cc28ef..e6e8ce3 100644
--- a/Print/PrintWndV.xaml
+++ b/Print/PrintWndV.xaml
@@ -10,78 +10,29 @@
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
CloseCommand="{Binding CancelCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" SizeToContent="WidthAndHeight">
-
-
-
+ Height="30" Margin="0,0,5,0"
+ Content="{Binding PrintMsg}"
+ Command="{Binding PrintCommand}"
+ ToolTip="{Binding PrintToolTip}"
+ IsDefault="True"
+ Focusable="False"/>
+ Height="30" Margin="5,0,0,0"
+ Content="{Binding CancelMsg}"
+ Command="{Binding CancelCommand}"
+ ToolTip="{Binding CancelToolTip}"
+ Focusable="False"/>
diff --git a/ProjectManager/ProjectManagerHardwareVM.vb b/ProjectManager/ProjectManagerHardwareVM.vb
index dde5bef..a58d428 100644
--- a/ProjectManager/ProjectManagerHardwareVM.vb
+++ b/ProjectManager/ProjectManagerHardwareVM.vb
@@ -376,6 +376,11 @@ Public Class ProjectManagerHardwareVM
Map.refHardwarePageVM.CurrHardware.Save()
End If
End If
+ ' abilito DimensioningPanel
+ Map.refDimensioningPanelVM.SetDimensioningPanel_Visibility(True)
+ 'riporto la vista a top
+ EgtSetView(VT.TOP, False)
+ EgtZoom(ZM.ALL, False)
' torna all'EgtDOORCreator
If OptionModule.m_ConfigurationSoftware = ConfigType.Assembly Then
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage
diff --git a/ProjectManager/ProjectManagerVM.vb b/ProjectManager/ProjectManagerVM.vb
index a092ef6..a69d415 100644
--- a/ProjectManager/ProjectManagerVM.vb
+++ b/ProjectManager/ProjectManagerVM.vb
@@ -736,9 +736,11 @@ Public Class ProjectManagerVM
If Not Map.refAssemblyManagerVM.ManageModified() Then Return
' prima di continuare salvo il riferimento all'ultima cartella aperta
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage
- ' nascondo la visibilità del bottono goback dalla lista dei bottoni
+ ' nascondo la visibilità del bottone goback dalla lista dei bottoni
Map.refCompoPanelHardwareVM.GoBackVisibility = Visibility.Collapsed
Map.refHardwarePageVM.VisibilityGeneral = Visibility.Collapsed
+ ' disabilito DimensioningPanel
+ Map.refDimensioningPanelVM.SetDimensioningPanel_Visibility(False)
' creo una porta per il disegno dell'Hardware
Map.refHardwarePageVM.CreateDoor()
Map.refSceneManagerVM.RefreshBtn()
diff --git a/SceneManager/DimensioningPanel/DimensioningPanelV.xaml b/SceneManager/DimensioningPanel/DimensioningPanelV.xaml
index bf49c8f..f046bab 100644
--- a/SceneManager/DimensioningPanel/DimensioningPanelV.xaml
+++ b/SceneManager/DimensioningPanel/DimensioningPanelV.xaml
@@ -1,14 +1,15 @@
-
-
-
+
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/SceneManager/DimensioningPanel/DimensioningPanelVM.vb b/SceneManager/DimensioningPanel/DimensioningPanelVM.vb
index 921f6ff..8157c7a 100644
--- a/SceneManager/DimensioningPanel/DimensioningPanelVM.vb
+++ b/SceneManager/DimensioningPanel/DimensioningPanelVM.vb
@@ -21,6 +21,21 @@ Public Class DimensioningPanelVM
End Set
End Property
+ Private m_DimensioningPanel_Visibility As Visibility
+ Public ReadOnly Property DimensioningPanel_Visibility As Visibility
+ Get
+ Return m_DimensioningPanel_Visibility
+ End Get
+ End Property
+ Friend Sub SetDimensioningPanel_Visibility(IsVisible As Boolean)
+ If IsVisible Then
+ m_DimensioningPanel_Visibility = Visibility.Visible
+ Else
+ m_DimensioningPanel_Visibility = Visibility.Collapsed
+ End If
+ NotifyPropertyChanged("DimensioningPanel_Visibility")
+ End Sub
+
Public Function LoadHardwareDimList() As Boolean
' Se lista vuota
If m_HardwareDimensionList.Count = 0 Then
diff --git a/SceneManager/SceneManagerV.xaml b/SceneManager/SceneManagerV.xaml
index 294a7f3..b8716f3 100644
--- a/SceneManager/SceneManagerV.xaml
+++ b/SceneManager/SceneManagerV.xaml
@@ -29,10 +29,7 @@
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
-
-
-
+