EgtDOORCreator 2.2c4 :
- aggiunta quotatura su hardware per report. - aggiunti parametri quotature nelle opzioni.
This commit is contained in:
+12
-3
@@ -918,7 +918,12 @@ Friend Module DdfFile
|
||||
Dim TempList As New ObservableCollection(Of Compo)
|
||||
If Door.Count = 0 Then Return True
|
||||
' se esiste un solo elemento lo carico
|
||||
If Door.Count = 1 Then TempList.Add(Door(0)) : AscendingOrder(TempList, DdfFileContent, bIsDDF) : Return True
|
||||
If Door.Count = 1 Then
|
||||
TempList.Add(Door(0))
|
||||
AscendingOrder(TempList, DdfFileContent, bIsDDF)
|
||||
GenerateCompoListReport(TempList)
|
||||
Return True
|
||||
End If
|
||||
For Index1 As Integer = 0 To Door.Count - 2
|
||||
TempList = New ObservableCollection(Of Compo)
|
||||
TempList.Add(Door(Index1))
|
||||
@@ -1251,13 +1256,17 @@ Friend Module DdfFile
|
||||
Private Sub GenerateCompoListReport(TempList As ObservableCollection(Of Compo))
|
||||
|
||||
For Each ItemCompo In TempList
|
||||
Dim sImagePath As String = "Empty"
|
||||
If File.Exists(ItemCompo.CompoType.Path & "\" & ItemCompo.SelBrandPart & "\" & ItemCompo.SelFile & ".png") Then
|
||||
sImagePath = ItemCompo.CompoType.Path & "\" & ItemCompo.SelBrandPart & "\" & ItemCompo.SelFile & ".png"
|
||||
End If
|
||||
If ItemCompo.CompoType.DDFName.Trim = "vision_cut_outs" OrElse
|
||||
ItemCompo.CompoType.DDFName.Trim = "louver_cut_outs" OrElse
|
||||
ItemCompo.CompoType.DDFName.Trim = "mail_slots" OrElse
|
||||
ItemCompo.CompoType.DDFName.Trim = "groove" OrElse
|
||||
ItemCompo.CompoType.DDFName.Trim = "rabbet" OrElse
|
||||
ItemCompo.CompoType.DDFName.Trim = "face_decoration" Then
|
||||
ReportDoor.MachList.Add(New TableMach(ItemCompo.CompoType.Name, ItemCompo.SelFile))
|
||||
ReportDoor.MachList.Add(New TableMach(ItemCompo.CompoType.Name, ItemCompo.SelFile, sImagePath))
|
||||
For Each ItemParameter In ItemCompo.CompoParamList
|
||||
Dim sValue As String = String.Empty
|
||||
Dim bIsActive As Boolean = True
|
||||
@@ -1277,7 +1286,7 @@ Friend Module DdfFile
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ReportDoor.HardwareList.Add(New TableHardaware(ItemCompo.CompoType.Name, ItemCompo.SelBrandPart, ItemCompo.SelFile))
|
||||
ReportDoor.HardwareList.Add(New TableHardaware(ItemCompo.CompoType.Name, ItemCompo.SelBrandPart, ItemCompo.SelFile, sImagePath))
|
||||
For Each ItemParameter In ItemCompo.CompoParamList
|
||||
Dim sValue As String = String.Empty
|
||||
Dim bIsActive As Boolean = True
|
||||
|
||||
@@ -17,6 +17,9 @@ Friend Module IniFile
|
||||
Friend m_nKeyLevel As Integer = 0
|
||||
' Opzioni attive sulla chiave
|
||||
Friend m_nKeyOptions As UInteger = 0
|
||||
|
||||
Friend m_ProjectSceneContext As Integer = 0
|
||||
|
||||
Friend Enum KEY_OPT As UInteger
|
||||
BASE = 1
|
||||
DOORS = 2
|
||||
|
||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.2.3.1")>
|
||||
<Assembly: AssemblyFileVersion("2.2.3.1")>
|
||||
<Assembly: AssemblyVersion("2.2.3.4")>
|
||||
<Assembly: AssemblyFileVersion("2.2.3.4")>
|
||||
|
||||
@@ -147,6 +147,14 @@ Friend Module OptionModule
|
||||
|
||||
Friend m_CompoPaneOrder As List(Of String) = New List(Of String)
|
||||
|
||||
Friend m_ExtLineLen As Double
|
||||
Friend m_ArrowLen As Double
|
||||
Friend m_TextDist As Double
|
||||
Friend m_LenIsMM As Integer
|
||||
Friend m_DecDigit As Integer
|
||||
Friend m_Font As String
|
||||
Friend m_TextHeight As Double
|
||||
|
||||
' iniziliazzo il la lettura dei messaggi
|
||||
Friend Sub ReadMessages()
|
||||
' Leggo elenco lingue disponibili da file ini
|
||||
|
||||
+425
-511
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,6 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Drawing.Text
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
@@ -14,6 +16,30 @@ Public Class OptionsVM
|
||||
Private m_HardwarePartV As HardwarePartV
|
||||
Private m_HardwarePartVM As HardwarePartVM
|
||||
|
||||
Private m_UnitMeasureList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(6545)})
|
||||
Public ReadOnly Property UnitMeasureList As List(Of String)
|
||||
Get
|
||||
Return m_UnitMeasureList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_FontList As New ObservableCollection(Of String)
|
||||
Public ReadOnly Property FontList As ObservableCollection(Of String)
|
||||
Get
|
||||
Dim sNfeDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
||||
Dim EgtFontList As String() = Directory.GetFiles(sNfeDir)
|
||||
For i = 0 To EgtFontList.Count - 1
|
||||
m_FontList.Add(Path.GetFileName(EgtFontList(i)))
|
||||
Next
|
||||
Dim fonts As New InstalledFontCollection
|
||||
For i = 0 To fonts.Families.Count - 1
|
||||
m_FontList.Add(fonts.Families(i).Name)
|
||||
Next
|
||||
Return m_FontList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property HardwarePart As ContentControl
|
||||
Get
|
||||
Return m_HardwarePartV
|
||||
@@ -47,7 +73,18 @@ Public Class OptionsVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Hardware_part
|
||||
Private m_SelectedTabGeneral As Integer = 0
|
||||
Public Property SelectedTabGeneral As Integer
|
||||
Get
|
||||
Return m_SelectedTabGeneral
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SelectedTabGeneral = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region ' Hardware_part
|
||||
|
||||
Public ReadOnly Property LanguageList As ObservableCollection(Of Language)
|
||||
Get
|
||||
@@ -176,6 +213,114 @@ Public Class OptionsVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Dimensionig"
|
||||
|
||||
Public Property ExtLineLen As String
|
||||
Get
|
||||
Return LenToString(OptionModule.m_ExtLineLen, 5)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dVal As Double = 0
|
||||
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
OptionModule.m_ExtLineLen = dVal
|
||||
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
||||
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_EXTLINELEN, DoubleToString(OptionModule.m_ExtLineLen, 5))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ArrowLen As String
|
||||
Get
|
||||
Return LenToString(OptionModule.m_ArrowLen, 5)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dVal As Double = 0
|
||||
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
OptionModule.m_ArrowLen = dVal
|
||||
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
||||
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_ARROWLEN, DoubleToString(OptionModule.m_ArrowLen, 5))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property TextDist As String
|
||||
Get
|
||||
Return LenToString(OptionModule.m_TextDist, 5)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dVal As Double = 0
|
||||
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
OptionModule.m_TextDist = dVal
|
||||
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
||||
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_TEXTDIST, DoubleToString(OptionModule.m_TextDist, 5))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SelectedUnitMeasure As String
|
||||
Get
|
||||
If OptionModule.m_LenIsMM = 0 Then
|
||||
Return "inch"
|
||||
ElseIf OptionModule.m_LenIsMM = 1 Then
|
||||
Return "mm"
|
||||
Else
|
||||
Return EgtMsg(6545)
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim nVal As Integer = 2
|
||||
If value = "inch" Then
|
||||
nVal = 0
|
||||
ElseIf value = "mm" Then
|
||||
nVal = 1
|
||||
End If
|
||||
OptionModule.m_LenIsMM = nVal
|
||||
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
||||
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_LENISMM, OptionModule.m_LenIsMM.ToString())
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DecDigit As String
|
||||
Get
|
||||
Return OptionModule.m_DecDigit.ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim nVal As Integer = 0
|
||||
If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
|
||||
OptionModule.m_DecDigit = nVal
|
||||
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
||||
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_DECDIGIT, OptionModule.m_DecDigit.ToString())
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SelectedFont As String
|
||||
Get
|
||||
Return m_FontList(m_FontList.IndexOf(OptionModule.m_Font))
|
||||
End Get
|
||||
Set(value As String)
|
||||
OptionModule.m_Font = value
|
||||
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
||||
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_DIMFONT, OptionModule.m_Font)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property TextHeight As String
|
||||
Get
|
||||
Return LenToString(OptionModule.m_TextHeight, 5)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dVal As Double = 0
|
||||
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
OptionModule.m_TextHeight = dVal
|
||||
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
||||
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_TEXTHEIGHT, DoubleToString(OptionModule.m_TextHeight, 5))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Dimensioning
|
||||
|
||||
' Carico i valori di Default della porta
|
||||
Public Property WidthValue As String
|
||||
Get
|
||||
@@ -1137,6 +1282,70 @@ Public Class OptionsVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GeneralOption As String
|
||||
Get
|
||||
' General
|
||||
Return EgtMsg(50716)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GeneralCam As String
|
||||
Get
|
||||
' Report
|
||||
Return EgtMsg(50715)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ExtLineLenMsg As String
|
||||
Get
|
||||
' Estensione linea
|
||||
Return EgtMsg(6537)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ArrowLenMsg As String
|
||||
Get
|
||||
' Dimensione freccia
|
||||
Return EgtMsg(6538)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TextDistMsg As String
|
||||
Get
|
||||
' Distanza messaggio
|
||||
Return EgtMsg(6539)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property LenIsMMMsg As String
|
||||
Get
|
||||
' Unità di misura
|
||||
Return EgtMsg(6540)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property DecDigitMsg As String
|
||||
Get
|
||||
' Numero dicmali
|
||||
Return EgtMsg(6541)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property FontMsg As String
|
||||
Get
|
||||
' Caretteri
|
||||
Return EgtMsg(6542)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TextHeightMsg As String
|
||||
Get
|
||||
' Dimensione testo
|
||||
Return EgtMsg(6543)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DimensionMsg As String
|
||||
Get
|
||||
' Quotatura
|
||||
Return EgtMsg(6544)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DispConfiguration As String
|
||||
Get
|
||||
Dim Msg As String = String.Empty
|
||||
|
||||
+14
-13
@@ -23,29 +23,30 @@
|
||||
<!--<EgtDOORCreator:PrintSceneHostV Height="600" Width="450"/>-->
|
||||
<ListLabel25:EnhancedViewerControl Name="enhancedPreviewControl" Height="650" Width="900" />
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
<UniformGrid Columns="3"
|
||||
Grid.Row="1"
|
||||
Margin="115,30,0,10">
|
||||
<Button VerticalAlignment="Center"
|
||||
Height="30" Margin="200,0,100,0"
|
||||
Height="30" Margin="50,0,50,0"
|
||||
Content="{Binding DesignMsg}"
|
||||
Command="{Binding DesignCommand}"
|
||||
Visibility="{Binding DesignVisibility}"
|
||||
ToolTip="{Binding DeisgnToolTip}"
|
||||
IsDefault="True"
|
||||
Focusable="False"/>
|
||||
<!--<Button VerticalAlignment="Center"
|
||||
Height="30" Margin="50,0,50,0"
|
||||
Content="{Binding SavePDFMsg}"
|
||||
Command="{Binding SavePDFCommand}"
|
||||
ToolTip="{Binding SavePDFToolTip}"
|
||||
Focusable="False"/>-->
|
||||
<Button VerticalAlignment="Center"
|
||||
Height="30" Margin="100,0,200,0"
|
||||
Content="{Binding CancelMsg}"
|
||||
Command="{Binding CancelCommand}"
|
||||
ToolTip="{Binding CancelToolTip}"
|
||||
Focusable="False"/>
|
||||
Visibility="Collapsed"
|
||||
Height="30" Margin="50,0,50,0"
|
||||
Content="{Binding SavePDFMsg}"
|
||||
Command="{Binding SavePDFCommand}"
|
||||
ToolTip="{Binding SavePDFToolTip}"
|
||||
Focusable="False"/>
|
||||
<Button VerticalAlignment="Center"
|
||||
Height="30" Margin="50,0,50,0"
|
||||
Content="{Binding CancelMsg}"
|
||||
Command="{Binding CancelCommand}"
|
||||
ToolTip="{Binding CancelToolTip}"
|
||||
Focusable="False"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
+32
-29
@@ -143,6 +143,7 @@ Public Class PrintWndVM
|
||||
Order.Add(DdfFile.ReportDoor)
|
||||
MyLL.SetDataBinding(Order, String.Empty)
|
||||
If String.IsNullOrEmpty(IniFile.m_sListLabelCurrent) Then
|
||||
'Dim VettOfFiles As String() = Directory.GetFiles(IniFile.m_sListLabelDir)
|
||||
MyLL.AutoProjectFile = IniFile.m_sListLabelDir + "\MyOrder.lst"
|
||||
Else
|
||||
MyLL.AutoProjectFile = IniFile.m_sListLabelCurrent
|
||||
@@ -165,36 +166,38 @@ Public Class PrintWndVM
|
||||
|
||||
#Region "SAvePDFCommand"
|
||||
|
||||
'Public ReadOnly Property SavePDFCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdSavePDF Is Nothing Then
|
||||
' m_cmdSavePDF = New Command(AddressOf SavePDF)
|
||||
' End If
|
||||
' Return m_cmdSavePDF
|
||||
' End Get
|
||||
'End Property
|
||||
Public ReadOnly Property SavePDFCommand As ICommand
|
||||
Get
|
||||
If m_cmdSavePDF Is Nothing Then
|
||||
m_cmdSavePDF = New Command(AddressOf SavePDF)
|
||||
End If
|
||||
Return m_cmdSavePDF
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Sub SavePDF()
|
||||
' Try
|
||||
' MyLL.DataBindingMode = DataBindingMode.Preload
|
||||
' Dim Order As New List(Of TableDoor)
|
||||
' Order.Add(DdfFile.ReportDoor)
|
||||
' MyLL.SetDataBinding(Order, String.Empty)
|
||||
' If String.IsNullOrEmpty(IniFile.m_sListLabelCurrent) Then
|
||||
' MyLL.AutoProjectFile = IniFile.m_sListLabelDir + "\MyOrder.lst"
|
||||
' Else
|
||||
' MyLL.AutoProjectFile = IniFile.m_sListLabelCurrent
|
||||
' End If
|
||||
' ' permette di visualizzare una prestampa
|
||||
' MyLL.AutoDestination = LlPrintMode.PreviewControl
|
||||
' MyLL.AutoShowPrintOptions = OptionModule.m_EnableBrowse
|
||||
' MyLL.AutoProjectType = LlProject.List Or LlProject.FileAlsoNew
|
||||
' MyLL.Export(New ExportConfiguration(LlExportTarget.Pdf, IniFile.m_sListLabelDir + "\Test.pdf", IniFile.m_sListLabelCurrent))
|
||||
' Catch generatedExceptionName As LL_User_Aborted_Exception
|
||||
' Catch LlException As ListLabelException
|
||||
' MessageBox.Show("Information: " + LlException.Message + vbLf & vbLf & "This information was generated by a List & Label custom exception.", "Information", MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
' End Try
|
||||
'End Sub
|
||||
Sub SavePDF()
|
||||
Try
|
||||
MyLL.DataBindingMode = DataBindingMode.Preload
|
||||
Dim Order As New List(Of TableDoor)
|
||||
Order.Add(DdfFile.ReportDoor)
|
||||
MyLL.SetDataBinding(Order, String.Empty)
|
||||
If String.IsNullOrEmpty(IniFile.m_sListLabelCurrent) Then
|
||||
'Dim VettOfFiles As String() = Directory.GetFiles(IniFile.m_sListLabelDir)
|
||||
MyLL.AutoProjectFile = IniFile.m_sListLabelDir + "\MyOrder.lst"
|
||||
Else
|
||||
MyLL.AutoProjectFile = IniFile.m_sListLabelCurrent
|
||||
End If
|
||||
' permette di visualizzare una prestampa
|
||||
MyLL.AutoDestination = LlPrintMode.PreviewControl
|
||||
MyLL.AutoShowPrintOptions = OptionModule.m_EnableBrowse
|
||||
MyLL.AutoProjectType = LlProject.List Or LlProject.FileAlsoNew
|
||||
' Manca la selezione della path completa per salvare il pdf (ora nella cartella Report)
|
||||
MyLL.Export(New ExportConfiguration(LlExportTarget.Pdf, IniFile.m_sListLabelDir + "\Test.pdf", IniFile.m_sListLabelCurrent))
|
||||
Catch generatedExceptionName As LL_User_Aborted_Exception
|
||||
Catch LlException As ListLabelException
|
||||
MessageBox.Show("Information: " + LlException.Message + vbLf & vbLf & "This information was generated by a List & Label custom exception.", "Information", MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region ' SAvePDFCommand
|
||||
|
||||
|
||||
@@ -526,6 +526,7 @@ Public Class ProjectManagerHardwareVM
|
||||
' abilito DimensioningPanel
|
||||
Map.refDimensioningPanelVM.SetDimensioningPanel_Visibility(True)
|
||||
'riporto la vista a top
|
||||
Map.refSceneManagerVM.ProjectScene.SetStatusNull()
|
||||
EgtSetView(VT.TOP, False)
|
||||
EgtZoom(ZM.ALL, False)
|
||||
' torna all'EgtDOORCreator
|
||||
@@ -538,7 +539,8 @@ Public Class ProjectManagerHardwareVM
|
||||
Map.refCompoPanelVM.GoBackVisibility = Visibility.Collapsed
|
||||
Map.refMainWindowVM.ProjectNameMsg = ""
|
||||
End If
|
||||
Map.refRefreshPanelVM.DimensionVisibility = Visibility.Collapsed
|
||||
Map.refRefreshPanelVM.DimensionVisibility = Visibility.Collapsed
|
||||
Map.refInstrumentPanelVM.PrintHardwareVisibility = Visibility.Collapsed
|
||||
' elimino i riferimenti all'hardware corrente
|
||||
Map.refHardwarePageVM.CurrHardware = Nothing
|
||||
' spengo il focus su tutti i bottoni
|
||||
@@ -546,7 +548,7 @@ Public Class ProjectManagerHardwareVM
|
||||
Map.refCompoPanelHardwareVM.CompoTypeList(IndexCompoType).IsSelectedBtn = False
|
||||
Next
|
||||
Map.refHardwarePageVM.CompoPanelControl.DataContext = Map.refCompoPanelHardwareVM
|
||||
ShowDimensionCommand = Visibility.Collapsed
|
||||
'ShowDimensionCommand = Visibility.Collapsed
|
||||
' apro l'ultimo progetto
|
||||
LauncherModule.InitLauncherModule()
|
||||
Map.refProjectManagerVM.DoorIsChecked = true
|
||||
|
||||
@@ -1414,6 +1414,7 @@ Public Class ProjectManagerVM
|
||||
Map.refHardwareHelpSceneHostV.CleanHelpProject()
|
||||
Map.refRefreshPanelVM.ButtonVisibility = Visibility.Collapsed
|
||||
Map.refRefreshPanelVM.DimensionVisibility = Visibility.Visible
|
||||
Map.refInstrumentPanelVM.PrintHardwareVisibility = Visibility.Visible
|
||||
Map.refProjectManagerHardwareVM.HardwareIsChecked = True
|
||||
End Sub
|
||||
|
||||
@@ -1442,6 +1443,7 @@ Public Class ProjectManagerVM
|
||||
End Property
|
||||
|
||||
Public Sub Print(ByVal param As Object)
|
||||
Utility.OutLog(" +++ PrintDoor +++")
|
||||
' questo test potrebbe essere sostituito con il controllo : If IsNothing(Map.refPartPageVM.CurrPart) Then Return
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject) OrElse
|
||||
IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||
|
||||
@@ -169,6 +169,17 @@ End Class
|
||||
|
||||
Public Class TableHardaware
|
||||
|
||||
' disegno quotato Hardware
|
||||
Private m_HardwareImg As String = "Empty"
|
||||
Public Property HardwareImg As String
|
||||
Get
|
||||
Return m_HardwareImg
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_HardwareImg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' nome Hardware
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
@@ -213,10 +224,11 @@ Public Class TableHardaware
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(Name__1 As String, Brand__2 As String, Template__3 As String)
|
||||
Public Sub New(Name__1 As String, Brand__2 As String, Template__3 As String, Image__4 As String)
|
||||
m_Name = Name__1
|
||||
m_Brand = Brand__2
|
||||
m_Template = Template__3
|
||||
m_HardwareImg = Image__4
|
||||
m_Hardware_ParametersList = New List(Of ReportParameter)
|
||||
End Sub
|
||||
|
||||
@@ -224,6 +236,17 @@ End Class
|
||||
|
||||
Public Class TableMach
|
||||
|
||||
' disegno quotato Hardware
|
||||
Private m_HardwareImg As String = "Empty"
|
||||
Public Property HardwareImg As String
|
||||
Get
|
||||
Return m_HardwareImg
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_HardwareImg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' nome Mach
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
@@ -257,9 +280,10 @@ Public Class TableMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(Name__1 As String, Template__2 As String)
|
||||
Public Sub New(Name__1 As String, Template__2 As String, Image__3 As String)
|
||||
m_Name = Name__1
|
||||
m_Template = Template__2
|
||||
m_HardwareImg = Image__3
|
||||
m_Mach_ParametersList = New List(Of ReportParameter)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -5,7 +5,19 @@
|
||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
||||
<ToggleButton ToolTip="{Binding GetDistToolTip}" Style="{StaticResource GridViewPanelToggleButton}" IsChecked="{Binding GetDistIsChecked}">
|
||||
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform" Width="25" />
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
<Button ToolTip="{Binding LinearDimensionToolTip}"
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
Command="{Binding LinearDimensionCommand}" IsEnabled="{Binding bLayerOk}"
|
||||
Visibility="{Binding PrintHardwareVisibility}">
|
||||
<Image Source="/Resources/InstrumentPanel/LinearDimension.png" Stretch="Uniform" Width="25"/>
|
||||
</Button>
|
||||
<Button Command="{Binding PrintHardwareCommand}" ToolTip="{Binding PrintHardwareToolTip}" Focusable="False"
|
||||
Visibility="{Binding PrintHardwareVisibility}">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform" Width="25"/>
|
||||
</ContentControl>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class InstrumentPanelVM
|
||||
Inherits ViewBase
|
||||
|
||||
Implements INotifyPropertyChanged
|
||||
'riferimento alla scena
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
@@ -15,6 +17,12 @@ Public Class InstrumentPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PrintHardwareToolTip As String
|
||||
Get
|
||||
Return "Save Image"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
Private m_GetDistIsChecked As Boolean = True
|
||||
@@ -38,18 +46,125 @@ Public Class InstrumentPanelVM
|
||||
Map.refSceneManagerVM.ProjectScene.SetStatusGetDistance()
|
||||
Else
|
||||
Map.refSceneManagerVM.ProjectScene.ResetStatusGetDistance()
|
||||
Map.refSceneManagerVM.ProjectScene.SetStatusNull()
|
||||
'Map.refSceneManagerVM.ProjectScene.SetStatusNull()
|
||||
Dim rfStatusBarVM As StatusBarVM = Map.refStatusBarVM
|
||||
rfStatusBarVM.StatusOutput = String.Empty
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private m_PrintHardwareVisibility As Visibility = Visibility.Collapsed
|
||||
Public Property PrintHardwareVisibility As Visibility
|
||||
Get
|
||||
Return m_PrintHardwareVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_PrintHardwareVisibility = value
|
||||
NotifyPropertyChanged("PrintHardwareVisibility")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Button state"
|
||||
|
||||
Private m_bLayerOk As Boolean = True
|
||||
Public Property bLayerOk As Boolean
|
||||
Get
|
||||
Return m_bLayerOk
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bLayerOk = value
|
||||
NotifyPropertyChanged("bLayerOk")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Button state
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdLinDim As ICommand
|
||||
Private m_cmdPrintHardware As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "LinearDimensionCommand"
|
||||
|
||||
Public ReadOnly Property LinearDimensionCommand As ICommand
|
||||
Get
|
||||
If m_cmdLinDim Is Nothing Then
|
||||
m_cmdLinDim = New Command(AddressOf LinearDimension)
|
||||
End If
|
||||
Return m_cmdLinDim
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DimensioningLayer As Integer
|
||||
|
||||
Public Sub LinearDimension(ByVal param As Object)
|
||||
GetDistIsChecked = False
|
||||
Dim x As Integer = EgtSetCurrPartLayer(EgtGetFirstPart(), m_DimensioningLayer)
|
||||
If EgtSetCurrPartLayer(1, m_DimensioningLayer) = 0 Then
|
||||
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.NEWLAYER)
|
||||
m_DimensioningLayer = EgtGetCurrLayer()
|
||||
'EgtSetColor(m_DimensioningLayer, "BLACK")
|
||||
End If
|
||||
Map.refSceneManagerVM.ProjectScene.SetStatusSelPoint()
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
||||
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.LINEARDIMENSION)
|
||||
Else
|
||||
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.ALIGNEDDIMENSION)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' LinearDimensionCommand
|
||||
|
||||
#Region "PrintHardwareCommand"
|
||||
|
||||
Public ReadOnly Property PrintHardwareCommand As ICommand
|
||||
Get
|
||||
If m_cmdPrintHardware Is Nothing Then
|
||||
m_cmdPrintHardware = New Command(AddressOf PrintHardware)
|
||||
End If
|
||||
Return m_cmdPrintHardware
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub PrintHardware()
|
||||
If Map.refProjectManagerHardwareVM.IsModified Then
|
||||
' Project must be saved before printing
|
||||
MessageBox.Show(EgtMsg(50186), EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
If IsNothing(Map.refHardwarePageVM.CurrHardware) OrElse IsNothing(Map.refHardwarePageVM.CurrHardware.SelTemplate) Then Return
|
||||
Dim sCurrDir As String = Path.GetDirectoryName(Map.refHardwarePageVM.CurrHardware.CurrPath())
|
||||
Dim sImageFile As String = sCurrDir & "\" & Path.GetFileNameWithoutExtension(Map.refHardwarePageVM.CurrHardware.CurrPath) & ".png"
|
||||
ExportPngFromNge(sImageFile)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Public Function ExportPngFromNge(ByRef SPathImage As String) As Boolean
|
||||
' Creo l'immagine da allegare
|
||||
' Nascondo la tavola ed eseguo zoom su quello che rimane
|
||||
' EgtZoom(ZM.ALL, True)
|
||||
' Prendo l'immagine per la stampa
|
||||
Dim colWhite As New Color3d(255, 255, 255)
|
||||
Dim nImgW As Integer = 3000
|
||||
Dim nImgH As Integer = 4000
|
||||
Dim sPath As String = SPathImage
|
||||
EgtSetLineAttribs(3)
|
||||
If Not EgtGetImage(SM.HIDDENLINE, colWhite, colWhite, nImgW, nImgH, sPath) Then
|
||||
' Error in creating the print image
|
||||
EgtOutLog(EgtMsg(50181))
|
||||
Return False
|
||||
End If
|
||||
EgtSetLineAttribs(1)
|
||||
SPathImage = sPath
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
Map.SetRefInstrumentPanelVM(me)
|
||||
Map.SetRefInstrumentPanelVM(Me)
|
||||
IniFile.m_ProjectSceneContext = Map.refSceneManagerVM.ProjectScene.GetCtx
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
@@ -161,6 +161,9 @@ Public Class SceneManagerVM
|
||||
|
||||
' Scene controller
|
||||
Private WithEvents m_Controller As New Controller
|
||||
Friend Function GetController() As Controller
|
||||
Return m_Controller
|
||||
End Function
|
||||
|
||||
' definizione comando
|
||||
Private m_CmdRefreshBtn As ICommand
|
||||
@@ -168,6 +171,7 @@ Public Class SceneManagerVM
|
||||
|
||||
Sub New()
|
||||
Map.SetRefSceneManagerVM(Me)
|
||||
AddHandler Application.Current.MainWindow.KeyDown, AddressOf Scene_KeyDown
|
||||
End Sub
|
||||
|
||||
Private Sub PreInitializeScene()
|
||||
@@ -199,14 +203,14 @@ Public Class SceneManagerVM
|
||||
GetMainPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor)
|
||||
m_ProjectScene.SetDistLineMaterial(DstLnColor)
|
||||
' Imposto i parametri del disegno quote
|
||||
Dim dExtLineLen As Double = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
|
||||
Dim dArrowLen As Double = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
|
||||
Dim dTextDist As Double = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
|
||||
Dim nLenIsMM As Integer = GetMainPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
|
||||
Dim nDecDigit As Integer = GetMainPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
|
||||
Dim sFont As String = "" : GetMainPrivateProfileString(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", sFont)
|
||||
Dim dTextHeight As Double = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
|
||||
EgtSetCurrDimensionStyle(dExtLineLen, dArrowLen, dTextDist, nLenIsMM, nDecDigit, sFont, dTextHeight)
|
||||
OptionModule.m_ExtLineLen = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
|
||||
OptionModule.m_ArrowLen = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
|
||||
OptionModule.m_TextDist = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
|
||||
OptionModule.m_LenIsMM = GetMainPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
|
||||
OptionModule.m_DecDigit = GetMainPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
|
||||
OptionModule.m_Font = "" : GetMainPrivateProfileString(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", OptionModule.m_Font)
|
||||
OptionModule.m_TextHeight = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
|
||||
EgtSetCurrDimensionStyle(OptionModule.m_ExtLineLen, OptionModule.m_ArrowLen, OptionModule.m_TextDist, OptionModule.m_LenIsMM, OptionModule.m_DecDigit, OptionModule.m_Font, OptionModule.m_TextHeight)
|
||||
' imposto parametri OpenGL
|
||||
Dim nDriver As Integer = GetMainPrivateProfileInt(S_OPENGL, K_DRIVER, 3)
|
||||
Dim b2Buff As Boolean = (GetMainPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1) <> 0)
|
||||
@@ -216,6 +220,8 @@ Public Class SceneManagerVM
|
||||
End Sub
|
||||
|
||||
Private Sub PostInitializeScene()
|
||||
' Impostazioni Controller
|
||||
m_Controller.SetScene(m_ProjectScene)
|
||||
' imposto stile quotature
|
||||
Dim dExtLineLen As Double = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
|
||||
Dim dArrowLen As Double = GetMainPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
|
||||
@@ -439,6 +445,47 @@ Public Class SceneManagerVM
|
||||
rfStatusBarVM.StatusOutput = sDistance
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseSelectedPoint(ByVal sender As Object, ByVal PtP As Point3d, ByVal nSep As SEP, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPoint
|
||||
Dim bDone As Boolean = (Keyboard.Modifiers And ModifierKeys.Control) <> ModifierKeys.Control
|
||||
m_Controller.MouseSelectedPoint(PtP, nSep, nId, bDone)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseMoveSelPoint(ByVal sender As Object, ByVal PtP As Point3d) Handles m_ProjectScene.OnMouseMoveSelPoint
|
||||
m_Controller.MouseMoveInSelectionPoint(PtP)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseSelectingObj(ByVal sender As Object, ByVal nId As Integer, ByRef bOk As Boolean) Handles m_ProjectScene.OnMouseSelectingObj
|
||||
bOk = (EgtGetType(nId) = GDB_TY.EXT_DIMENSION)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseSelectedObj(ByVal sender As Object, ByVal nId As Integer, ByVal bLast As Boolean) Handles m_ProjectScene.OnMouseSelectedObj
|
||||
m_Controller.MouseSelectedObj(nId, bLast)
|
||||
End Sub
|
||||
|
||||
Private Sub OnSetInputBoxText(ByVal sText As String) Handles m_Controller.SetInputBoxText
|
||||
If sText = "<>" Then
|
||||
m_Controller.Done(sText)
|
||||
'm_ProjectScene.SetStatusNull()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Scene_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs)
|
||||
' Con ESC esco dall'azione corrente
|
||||
If e.Key = Key.Escape Then
|
||||
' reset Azione corrente
|
||||
m_Controller.ResetStatus()
|
||||
' reset Distanza
|
||||
Map.refInstrumentPanelVM.GetDistIsChecked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnSceneKeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles m_ProjectScene.KeyDown
|
||||
' Con DEL eseguo cancellazione delle entità selezionate
|
||||
If e.KeyData = System.Windows.Forms.Keys.Delete Then
|
||||
m_Controller.SetLastInteger(GDB_ID.SEL)
|
||||
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
@@ -107,6 +107,8 @@ Public Class ViewPanelVM
|
||||
''' </summary>
|
||||
Public Sub TopView(ByVal param As Object)
|
||||
m_rfScenemanagerVM.ProjectScene.TopView()
|
||||
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' TopViewCommand
|
||||
@@ -130,6 +132,8 @@ Public Class ViewPanelVM
|
||||
''' </summary>
|
||||
Public Sub FrontView(ByVal param As Object)
|
||||
m_rfScenemanagerVM.ProjectScene.FrontView()
|
||||
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' FrontViewCommand
|
||||
@@ -153,6 +157,8 @@ Public Class ViewPanelVM
|
||||
''' </summary>
|
||||
Public Sub LeftView(ByVal param As Object)
|
||||
m_rfScenemanagerVM.ProjectScene.LeftView()
|
||||
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' LeftViewCommand
|
||||
@@ -176,6 +182,8 @@ Public Class ViewPanelVM
|
||||
''' </summary>
|
||||
Public Sub BackView(ByVal param As Object)
|
||||
m_rfScenemanagerVM.ProjectScene.BackView()
|
||||
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' BackViewCommand
|
||||
@@ -199,6 +207,8 @@ Public Class ViewPanelVM
|
||||
''' </summary>
|
||||
Public Sub RightView(ByVal param As Object)
|
||||
m_rfScenemanagerVM.ProjectScene.RightView()
|
||||
m_rfScenemanagerVM.GetController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
#End Region ' RightViewCommand
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Public Class StatusBarVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SnapPointTypeList As New List(Of SPItem)({New SPItem(SP.PT_END, EgtMsg(1105)), New SPItem(SP.PT_MID, EgtMsg(1107)), New SPItem(SP.CENTER, EgtMsg(1109)), New SPItem(SP.PT_INTERS, EgtMsg(1115)), New SPItem(SP.CENTROID, EgtMsg(1111))})
|
||||
Private m_SnapPointTypeList As New List(Of SPItem)({New SPItem(SP.PT_END, EgtMsg(1105)), New SPItem(SP.PT_SKETCH, EgtMsg(1102)), New SPItem(SP.PT_MID, EgtMsg(1107)), New SPItem(SP.CENTER, EgtMsg(1109)), New SPItem(SP.PT_INTERS, EgtMsg(1115)), New SPItem(SP.CENTROID, EgtMsg(1111))})
|
||||
Public ReadOnly Property SnapPointTypeList As List(Of SPItem)
|
||||
Get
|
||||
Return m_SnapPointTypeList
|
||||
|
||||
Reference in New Issue
Block a user