849ddf39c5
- Miglioramento check quotatura. - Miglioramento pagina di stampa.
105 lines
4.7 KiB
VB.net
105 lines
4.7 KiB
VB.net
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
Imports System.IO
|
|
|
|
Public Class PrintSceneHostV
|
|
|
|
Private m_SelFromScene As Boolean = False
|
|
Friend ReadOnly Property SelFromScene As Boolean
|
|
Get
|
|
Return m_SelFromScene
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub RefreshPrint()
|
|
EgtOpenFile(IniFile.m_sTempDir & "\" & Path.ChangeExtension(TEMP_FILE, ".nge"))
|
|
' mantengo i layer accesi
|
|
For Each Compo In Map.refDimensioningPanelVM.HardwareDimensionList
|
|
PrintWndVM.TurnDimensioningLayer(Compo.NameLayer, Compo.SelectedLayer)
|
|
Next
|
|
EgtZoom(ZM.ALL)
|
|
End Sub
|
|
|
|
Sub New()
|
|
' This call is required by the designer.
|
|
InitializeComponent()
|
|
' Creo riferimento a questa classe in CompoWindowMap
|
|
Map.SetRefPrintSceneHostV(Me)
|
|
' Inizializzazione Scena
|
|
PreInitializeScene()
|
|
PrintScene.Init()
|
|
PostInitializeScene()
|
|
' Imposto stato gestione mouse diretto della scena a nessuno
|
|
PrintScene.SetStatusNull()
|
|
EgtSetCurrentContext(PrintScene.GetCtx)
|
|
RefreshPrint()
|
|
End Sub
|
|
|
|
Private Sub PreInitializeScene()
|
|
' imposto colore di default
|
|
Dim DefColor As New Color3d(0, 0, 0)
|
|
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
|
PrintScene.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)
|
|
PrintScene.SetViewBackground(BackTopColor, BackBotColor)
|
|
' imposto colore di evidenziazione
|
|
Dim MarkColor As New Color3d(255, 255, 0)
|
|
GetMainPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
|
PrintScene.SetMarkMaterial(MarkColor)
|
|
' imposto colore per superfici selezionate
|
|
Dim SelSurfColor As New Color3d(255, 255, 192)
|
|
GetMainPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
|
PrintScene.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)
|
|
PrintScene.SetZoomWinAttribs(bOutline, ZwColor)
|
|
' imposto colore della linea di distanza
|
|
Dim DstLnColor As New Color3d(255, 0, 0)
|
|
GetMainPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor)
|
|
PrintScene.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)
|
|
PrintScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
|
End Sub
|
|
|
|
Private Sub PostInitializeScene()
|
|
' imposto tipo coordinate
|
|
PrintScene.SetGridCursorPos(True)
|
|
' modo di visualizzazione
|
|
Dim nShowMode As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.HIDDENLINE)
|
|
EgtSetShowMode(DirectCast(nShowMode, SM))
|
|
'' visualizzazione avanzata dei triangoli costituenti le superfici
|
|
'Dim bShowTriaAdv As Boolean = (GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
|
'EgtSetShowTriaAdv(bShowTriaAdv)
|
|
'' tipo visualizzazione per Zmap
|
|
'Dim nShowZmap As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
|
|
'EgtSetShowZmap(DirectCast(nShowZmap, ZSM), False)
|
|
'' dati di griglia
|
|
'Dim dSnapStep As Double = If(EgtUiUnitsAreMM(),
|
|
' GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10),
|
|
' GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 12.7))
|
|
'Dim nMinLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
|
'Dim nMajLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
|
|
'Dim nExtSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 50)
|
|
'Dim MinLnColor As New Color3d(160, 160, 160)
|
|
'GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, MinLnColor)
|
|
'Dim MajLnColor As New Color3d(160, 160, 160)
|
|
'GetMainPrivateProfileColor(S_GRID, K_MAJLNCOLOR, MajLnColor)
|
|
'EgtSetGridFrame(Frame3d.GLOB)
|
|
'EgtSetGridGeo(dSnapStep, nMinLineSStep, nMajLineSStep, nExtSStep)
|
|
'EgtSetGridColor(MinLnColor, MajLnColor)
|
|
'Dim bShowGrid As Boolean = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
|
|
'EgtSetGridShow(bShowGrid, False)
|
|
End Sub
|
|
|
|
End Class
|