Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4c6de1bee | |||
| b4b3447730 | |||
| c7068ddac5 | |||
| 07cabcf3d4 | |||
| dd9cf064b2 | |||
| 27fb494f66 | |||
| 32cff06df5 | |||
| 07e19039ea | |||
| 8fe9728eb5 | |||
| 336f8b73e8 | |||
| b2d793b61b | |||
| 98c29fc84a | |||
| d3d7fbacd4 | |||
| 201cf2ddf1 | |||
| cb66dfb636 | |||
| 80c3634506 | |||
| 43bc9d7e59 | |||
| 27ce1ae461 | |||
| 4ab6a1a393 | |||
| 929966c456 | |||
| 65f8b72488 | |||
| d73ca948c9 | |||
| 9bc09a73b2 | |||
| 2ba7424137 | |||
| aea8143807 | |||
| 79151af902 | |||
| 5bf6b4acd4 | |||
| 2c95ccefea | |||
| 0e7764b9df | |||
| c745c69ad2 | |||
| 30a5b5ed49 | |||
| 467874aa93 | |||
| ae2d1e427b | |||
| c12c8f296a | |||
| 901e151399 | |||
| 81711ec12e | |||
| e6ed99afca | |||
| be57be1e27 | |||
| 9853d78cf9 | |||
| f43134d996 | |||
| 3d259cfb9f |
+68
-9
@@ -31,6 +31,13 @@ Public Class Assembly
|
||||
' tutte queste proprietà interagiscono direttamente con le dimensioni del TELAIO
|
||||
' per questo motivo la funzione set può ospitare la chiamata ad una funzione che modifica le dimensioni della porta
|
||||
|
||||
Private m_AssemblyUnit As String = ConstGen.VAL_INCHES
|
||||
Public ReadOnly Property AssemblyUnit As String
|
||||
Get
|
||||
Return m_AssemblyUnit
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "GENERAL"
|
||||
|
||||
#Region "Light Up/Bottom"
|
||||
@@ -1109,6 +1116,28 @@ Public Class Assembly
|
||||
' se non carico nessuna informazione allora non è un assemblato, esco
|
||||
If IndexLine = 0 Then Return ResultReadingAssembInfo.MissingAssembInfo
|
||||
|
||||
' Measure
|
||||
If IndexLine < FileContent.Count - 1 Then
|
||||
If SearchKey(FileContent(IndexLine), "Unit") Then
|
||||
' leggo le dimemensioni dei Jamb e restituisco la riga successiva
|
||||
IndexLine = GetUnit(IndexLine + 1)
|
||||
If IndexLine = -1 Then
|
||||
' 50102: Failed reading DDF file. Missing needed parameter {0}.
|
||||
sErrorInfo += String.Format(EgtMsg(50102), "measures" + vbCrLf)
|
||||
Return ResultReadingAssembInfo.ErrorInAssembInfo
|
||||
End If
|
||||
Else
|
||||
IndexLine = GetUnitFromDoor(IndexLine)
|
||||
If IndexLine = -1 Then
|
||||
' 50102: Failed reading DDF file. Missing needed parameter {0}.
|
||||
sErrorInfo += String.Format(EgtMsg(50102), "measures" + vbCrLf)
|
||||
Return ResultReadingAssembInfo.ErrorInAssembInfo
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
IndexLine = SkipWhiteSpace(IndexLine)
|
||||
If IndexLine = 0 Then Return ResultReadingAssembInfo.MissingAssembInfo
|
||||
' Size
|
||||
If IndexLine < FileContent.Count - 1 Then
|
||||
If SearchKey(FileContent(IndexLine), ConstIni.S_SIZE_INI) Then
|
||||
@@ -1184,7 +1213,7 @@ Public Class Assembly
|
||||
If IndexLine < FileContent.Count Then
|
||||
If SearchKey(FileContent(IndexLine), ConstIni.S_DOORS_ASSEMBY) Then
|
||||
' assegno ad una variabile il valore in lettura
|
||||
IndexLine = GetValue(IndexLine, ConstIni.S_DOORS_ASSEMBY, m_DoorNumber)
|
||||
IndexLine = GetValue(IndexLine, ConstIni.S_DOORS_ASSEMBY, m_DoorNumber, False)
|
||||
' assegno il numero di ante
|
||||
SetDoorNumber(m_DoorNumber)
|
||||
If IndexLine = -1 Then
|
||||
@@ -1237,7 +1266,7 @@ Public Class Assembly
|
||||
End Function
|
||||
|
||||
' funzione per la ricerca dei valori, restituice la riga successiva
|
||||
Private Function GetValue(Index As Integer, Name As String, ByRef Var As String) As Integer
|
||||
Private Function GetValue(Index As Integer, Name As String, ByRef Var As String, Optional bConvertUnit As Boolean = True) As Integer
|
||||
If Index = -1 Then Return -1
|
||||
Dim Local_Var As String = GetValueWithKey(FileContent(Index), Name)
|
||||
If String.IsNullOrWhiteSpace(Local_Var) Then
|
||||
@@ -1245,6 +1274,7 @@ Public Class Assembly
|
||||
If Not SearchKey(FileContent(Index), Name) Then Return -1
|
||||
' altrimenti lascia il valore vuoto
|
||||
Else
|
||||
If bConvertUnit Then ConvertDDFValueIntoCurrentUnit(m_AssemblyUnit, Local_Var)
|
||||
Var = Local_Var
|
||||
End If
|
||||
Return Index + 1
|
||||
@@ -1330,6 +1360,35 @@ Public Class Assembly
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Unit (Metadati Assembly)
|
||||
Private Function GetUnit(Index As Integer) As Integer
|
||||
If Index = -1 Then Return -1
|
||||
Dim PreviuosIndex As Integer = Index
|
||||
Index = GetValue(Index, "measures", m_AssemblyUnit, False)
|
||||
Return Index
|
||||
End Function
|
||||
|
||||
' Measures (Parametri Door)
|
||||
Private Function GetUnitFromDoor(Index As Integer) As Integer
|
||||
' inizio la ricerca all'interno del file
|
||||
Dim PreviuosIndex As Integer = Index
|
||||
Dim bUnitFound As Boolean = False
|
||||
' cerco la prima porta e recupero la sua unità di misura
|
||||
While Not SearchKey(FileContent(Index), "measures") And Index < FileContent.Count - 1
|
||||
Index += 1
|
||||
End While
|
||||
If SearchKey(FileContent(Index), "measures") Then
|
||||
m_AssemblyUnit = GetValueWithKey(FileContent(Index), "measures")
|
||||
bUnitFound = True
|
||||
End If
|
||||
If bUnitFound Then
|
||||
Index = PreviuosIndex
|
||||
Else
|
||||
Index = -1
|
||||
End If
|
||||
Return Index
|
||||
End Function
|
||||
|
||||
' Size
|
||||
Private Function GetSize(Index As Integer) As Integer
|
||||
If Index = -1 Then Return -1
|
||||
@@ -2774,7 +2833,7 @@ Public Class Assembly
|
||||
If TBoxPar.EnableCopy Then
|
||||
TBoxNewPar.SetValue(TBoxPar.Value)
|
||||
TBoxNewPar.SetIsActive(TBoxPar.IsActive)
|
||||
End If
|
||||
End If
|
||||
ElseIf TypeOf PrecCompo.CompoParamList(IndexParam) Is TextBoxParam AndAlso
|
||||
PrecCompo.CompoParamList(IndexParam).DDFName = NewCompo.CompoParamList(IndexParam).DDFName Then
|
||||
Dim TBoxPar As TextBoxParam = DirectCast(PrecCompo.CompoParamList(IndexParam), TextBoxParam)
|
||||
@@ -2796,7 +2855,7 @@ Public Class Assembly
|
||||
Dim CBoxNewPar As ComboBoxParam = DirectCast(NewCompo.CompoParamList(IndexParam), ComboBoxParam)
|
||||
If CBoxNewPar.EnableCopy Then
|
||||
CBoxNewPar.SetSelItem(CBoxNewPar.ItemList(CBoxNewPar.ItemList.IndexOf(CBoxPar.SelItem)))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
@@ -3735,8 +3794,8 @@ Public Class Assembly
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
' rimuovo dalla lista
|
||||
If bRabbet Then Jamb.CompoList.RemoveAt(IndexCompo)
|
||||
' rimuovo dalla lista
|
||||
If bRabbet Then Jamb.CompoList.RemoveAt(IndexCompo)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -3763,9 +3822,9 @@ Public Class Assembly
|
||||
TextParam.m_Value = DoubleToString(dDeltaT + dThicknessDoor, 4)
|
||||
End If
|
||||
TextParam.NotifyPropertyChanged("Value")
|
||||
End If
|
||||
' depth
|
||||
CurrCompoParam = CurrCompo.CompoParamList(2)
|
||||
End If
|
||||
' depth
|
||||
CurrCompoParam = CurrCompo.CompoParamList(2)
|
||||
If TypeOf DirectCast(CurrCompoParam, CompoParam) Is TextBoxParam Then
|
||||
Dim TextParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
||||
Dim sRabbetDepth As String = sOverlap
|
||||
|
||||
@@ -22,23 +22,25 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox ItemsSource="{Binding CurrProject.AssemblyList}"
|
||||
SelectedItem="{Binding CurrProject.SelAssemblyName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource DoorListBox}" Name="AssemblyList" Grid.ColumnSpan="2" Margin="0,0,28,0.4" Grid.RowSpan="2">
|
||||
|
||||
<ListBox PreviewMouseWheel="ListBox_PreviewMouseWheel"
|
||||
ItemsSource="{Binding CurrProject.AssemblyList}"
|
||||
SelectedItem="{Binding CurrProject.SelAssemblyName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource DoorListBox}" Name="AssemblyList" Grid.ColumnSpan="2" Margin="0,0,28,0.4" Grid.RowSpan="2">
|
||||
<!--SelectionChanged="AssemblyList_SelectedItem"-->
|
||||
<Interactivity:Interaction.Behaviors>
|
||||
<EgtDOORCreator:ScrollIntoViewForListBox/>
|
||||
</Interactivity:Interaction.Behaviors>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel IsItemsHost="True" Orientation="Horizontal"/>
|
||||
<VirtualizingStackPanel Name="MyVirtual" IsItemsHost="True" Orientation="Horizontal" VirtualizationMode="Recycling"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ContentPresenter/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
@@ -53,7 +55,7 @@
|
||||
Style="{StaticResource {x:Type ToggleButton}}"
|
||||
IsChecked="{Binding Path=IsSelected, RelativeSource={
|
||||
RelativeSource AncestorType={x:Type ListBoxItem}}}">
|
||||
<RadioButton.Content>
|
||||
<RadioButton.Content>
|
||||
<TextBlock Text="{Binding GraphicName}"/>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
@@ -68,7 +70,7 @@
|
||||
Focusable="False" Grid.RowSpan="2">
|
||||
<Image Source="/Resources/TopCommandBar/Add.png" Stretch="Uniform"/>
|
||||
<!--<Image Source="/Resources/TopCommandBar/NewFile.png" Stretch="Uniform"/>-->
|
||||
</Button>
|
||||
</Button>
|
||||
<Button Grid.Column="2"
|
||||
Height="20" Width="20" VerticalAlignment="Center"
|
||||
Margin="0,5,4.8,5.4" Command="{Binding RemoveAssembly_Command}"
|
||||
@@ -76,7 +78,7 @@
|
||||
Focusable="False" Grid.RowSpan="2">
|
||||
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
||||
<!--<Image Source="/Resources/TopCommandBar/Delete.png" Stretch="Uniform"/>-->
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -2,26 +2,46 @@
|
||||
|
||||
Private Sub Door_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs)
|
||||
Dim Item As ListBoxItem = DirectCast(sender, ListBoxItem)
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) then
|
||||
e.Handled=True
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||
e.Handled = True
|
||||
Return
|
||||
End If
|
||||
' Gestisco porta corrente modificata
|
||||
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified then
|
||||
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified Then
|
||||
If Not Map.refAssemblyManagerVM.ManageModified() Then
|
||||
Return
|
||||
End If
|
||||
Item.IsSelected=Not Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||
Item.IsSelected = Not Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||
Return
|
||||
End If
|
||||
' verifico se il progetto cliccato è quello già selezionato
|
||||
'If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName Is DirectCast(Item.DataContext, AssemblyName) Then
|
||||
' ricarico la porta
|
||||
e.Handled= Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||
e.Handled = Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||
'End If
|
||||
'If IsModified Then
|
||||
' Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = DirectCast(Item.DataContext, AssemblyName)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub ListBox_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs)
|
||||
Dim MyList As ListBox = DirectCast(sender, ListBox)
|
||||
Dim Index As Integer = 0
|
||||
Dim nCountChildren As Integer = VisualTreeHelper.GetChildrenCount(MyList) - 1
|
||||
Dim MyScroll As ScrollViewer
|
||||
For Index = 0 To nCountChildren
|
||||
If TypeOf VisualTreeHelper.GetChild(MyList, Index) Is ScrollViewer Then
|
||||
MyScroll = DirectCast(VisualTreeHelper.GetChild(MyList, Index), ScrollViewer)
|
||||
If e.Delta > 0 Then
|
||||
MyScroll.LineLeft()
|
||||
Else
|
||||
MyScroll.LineRight()
|
||||
End If
|
||||
e.Handled = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -33,7 +33,16 @@
|
||||
Command="{Binding DataContext.CompoBtnCommand,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
CommandParameter="{Binding}"
|
||||
Focusable="False"/>
|
||||
Focusable="False">
|
||||
|
||||
<Button.ToolTip>
|
||||
<Image Source="{Binding ImageDoorHardware}"
|
||||
MaxHeight="100"
|
||||
MaxWidth="100"
|
||||
Stretch="Uniform"/>
|
||||
</Button.ToolTip>
|
||||
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
@@ -73,6 +73,7 @@ Public Class CompoPanelVM
|
||||
Dim Index As Integer = 1
|
||||
Dim CompoName As String = String.Empty
|
||||
Dim CompoNameDDF As String = String.Empty
|
||||
Dim Image As String = String.Empty
|
||||
Dim Side As String = String.Empty
|
||||
Dim FolderName As String = String.Empty
|
||||
' Carico un vettore con il nome delle Path delle componenti
|
||||
@@ -119,11 +120,19 @@ Public Class CompoPanelVM
|
||||
' apro ogni directory e cerco un file di testo di nome Config.ini
|
||||
Dim CurrCompoPath As String = CompoArray(Index) & "\" & ConstCompo.CONFIGINI_FILE_NAME
|
||||
If File.Exists(CurrCompoPath) Then
|
||||
Image = String.Empty
|
||||
GetPrivateProfileCompoName(ConstCompo.S_COMPO, ConstCompo.K_NAME, CompoNameDDF, CompoName, CurrCompoPath)
|
||||
GetPrivateProfileCompoImage(ConstCompo.S_COMPO, ConstCompo.K_IMAGE, Image, CurrCompoPath)
|
||||
GetPrivateProfileJambSide(S_POSITIONSIDE, K_SIDE, Side, CurrCompoPath)
|
||||
GetPrivateProfileFolderName(S_TEMPLATE, K_FOLDER_NAME, FolderName, CurrCompoPath)
|
||||
If CompoPanelList(IndexCompoOrder) = CompoNameDDF Then
|
||||
m_CompoTypeList.Add(New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Side, FolderName))
|
||||
Dim Local_NewCompoType As CompoType
|
||||
If Not String.IsNullOrEmpty(Image) Then
|
||||
Local_NewCompoType = New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Image, Side, FolderName)
|
||||
Else
|
||||
Local_NewCompoType = New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Side, FolderName)
|
||||
End If
|
||||
m_CompoTypeList.Add(Local_NewCompoType)
|
||||
ListCompoToInsert.Find(Function(x) x.sName = CompoNameDDF).SetExists(True)
|
||||
' aggiungere il caricamento delle liste
|
||||
Exit For
|
||||
|
||||
+46
-1
@@ -79,6 +79,28 @@ Public Class CompoType
|
||||
m_Path = Path
|
||||
End Sub
|
||||
|
||||
Private m_ImageDoorHardware As String
|
||||
Public ReadOnly Property ImageDoorHardware As String
|
||||
Get
|
||||
Return m_ImageDoorHardware
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetImageDoorHarware(Image As String)
|
||||
m_ImageDoorHardware = Image
|
||||
End Sub
|
||||
|
||||
Private m_ShowToolTipImag As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property ShowToolTipImg As Visibility
|
||||
Get
|
||||
If Not String.IsNullOrEmpty(m_ImageDoorHardware) Then
|
||||
m_ShowToolTipImag = Visibility.Visible
|
||||
Else
|
||||
m_ShowToolTipImag = Visibility.Collapsed
|
||||
End If
|
||||
Return m_ShowToolTipImag
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_JambSide As String
|
||||
Public ReadOnly Property JambSide As String
|
||||
Get
|
||||
@@ -99,6 +121,17 @@ Public Class CompoType
|
||||
m_FolderName = FolderName
|
||||
End Sub
|
||||
|
||||
Private m_DDFMaterial As String
|
||||
Public ReadOnly Property DDFMaterial As String
|
||||
Get
|
||||
Return m_DDFMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub SetDDFMaterial(DDFMaterial As String)
|
||||
m_DDFMaterial = DDFMaterial
|
||||
End Sub
|
||||
|
||||
Public Function LoadListTemplate() As Boolean
|
||||
FolderList.Clear()
|
||||
m_HardwareFolderList.Clear()
|
||||
@@ -114,12 +147,24 @@ Public Class CompoType
|
||||
Return other
|
||||
End Function
|
||||
|
||||
Sub New(sName As String, sDDFName As String, sPath As String, sJambSide As String, sFolderName As String)
|
||||
Sub New(sName As String, sDDFName As String, sPath As String, sJambSide As String, sFolderName As String, Optional sDDFMaterial As String = "wood")
|
||||
m_Name = sName
|
||||
m_DDFName = sDDFName
|
||||
m_Path = sPath
|
||||
m_JambSide = sJambSide
|
||||
m_FolderName = sFolderName
|
||||
m_DDFMaterial = sDDFMaterial
|
||||
LoadListTemplate()
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String, sDDFName As String, sPath As String, sImage As String, sJambSide As String, sFolderName As String, Optional sDDFMaterial As String = "wood")
|
||||
m_Name = sName
|
||||
m_DDFName = sDDFName
|
||||
m_Path = sPath
|
||||
m_ImageDoorHardware = sImage
|
||||
m_JambSide = sJambSide
|
||||
m_FolderName = sFolderName
|
||||
m_DDFMaterial = sDDFMaterial
|
||||
LoadListTemplate()
|
||||
End Sub
|
||||
|
||||
|
||||
+12
-2
@@ -16,6 +16,7 @@ Module ConstCompo
|
||||
' Sezioni e chiavi standard del file DDF
|
||||
Public Const S_GENERALINI As String = "General"
|
||||
Public Const K_MMUNITSINI As String = "MmUnits"
|
||||
Public Const S_VERSION As String = "version"
|
||||
Public Const S_PRODUCE As String = "produce"
|
||||
Public Const S_MEASURES As String = "measures"
|
||||
Public Const S_CODE As String = "code"
|
||||
@@ -47,8 +48,9 @@ Module ConstCompo
|
||||
Public Const K_LOCKEDGE As String = "lockedge"
|
||||
Public Const K_HINGEEDGE As String = "hingeedge"
|
||||
Public Const K_TOP As String = "top"
|
||||
Public Const K_BOTTOM As String = "bottom"
|
||||
Public Const K_MACHINING As String = "machining"
|
||||
Public Const K_BOTTOM As String = "bottom"
|
||||
Public Const K_TYPEEDGE As String = "type"
|
||||
Public Const K_MACHINING As String = "machining"
|
||||
Public Const K_OVERMATERIAL As String = "overmaterial"
|
||||
Public Const K_IDCODECOMPONENT As String = "IdCodeComponent"
|
||||
Public Const K_OTHERDOOR As String = "other_door"
|
||||
@@ -59,11 +61,13 @@ Module ConstCompo
|
||||
Public Const K_THICKNESS_BOTTOM As String = "thickness bottom"
|
||||
Public Const K_DEPTH_BOTTOM As String = "depth bottom"
|
||||
Public Const K_DELTA_BOTTOM As String = "delta bottom"
|
||||
Public Const K_HARDWARE As String = "hardware"
|
||||
|
||||
' Nome, sezioni e chiavi del file Config.ini
|
||||
Public Const CONFIGINI_FILE_NAME As String = "Config.ini"
|
||||
Public Const S_COMPO As String = "Compo"
|
||||
Public Const K_NAME As String = "Name"
|
||||
Public Const K_IMAGE As String = "Image"
|
||||
Public Const S_TEMPLATE As String = "Template"
|
||||
Public Const K_ISACTIVE As String = "IsActive"
|
||||
Public Const K_MATERIAL As String = "Material"
|
||||
@@ -105,8 +109,12 @@ Module ConstCompo
|
||||
|
||||
' Alcune stringhe notevoli dei file DDF
|
||||
Public Const DDF_HYPHEN As String = " - "
|
||||
Public Const DDF_HYPHEN_2 As String = " - "
|
||||
Public Const DDF_SPACE2 As String = " "
|
||||
Public Const DDF_SPACE3 As String = " "
|
||||
Public Const DDF_SPACE4 As String = " "
|
||||
Public Const DDF_SPACE5 As String = " "
|
||||
Public Const DDF_SPACE6 As String = " "
|
||||
Public Const DDF_METADATA As String = "##"
|
||||
Public Const DDF_ON As String = "ON"
|
||||
Public Const DDF_OFF As String = "OFF"
|
||||
@@ -135,9 +143,11 @@ Module ConstCompo
|
||||
Public Const INI_COMBOBOX_ONOFF As String = "ComboBoxOnOff"
|
||||
Public Const INI_COMBOBOX_LUA As String = "ComboBoxLua"
|
||||
Public Const INI_TEXTBOX As String = "TextBox"
|
||||
Public Const INI_TEXTBOX_D As String = "TextBox_d"
|
||||
Public Const INI_TEXTBOXDGC As String = "TextBoxDGC"
|
||||
Public Const INI_TEXTBOXTHICKNESS As String = "TextBoxThickness"
|
||||
Public Const INI_TEXTBOX_ONOFF As String = "TextBoxOnOff"
|
||||
Public Const INI_TEXTBOX_ONOFF_D As String = "TextBoxOnOff_d"
|
||||
Public Const INI_TEXTBOXNGE As String = "TextBoxNge"
|
||||
Public Const INI_TEXTBOXLUA As String = "TextBoxLua"
|
||||
Public Const INI_CHECKBOX As String = "CheckBox"
|
||||
|
||||
@@ -41,6 +41,7 @@ Module ConstIni
|
||||
Public Const K_ASKMEAGAINCONFIRM As String = "AskMeAgainConfirm"
|
||||
Public Const K_EGTCAMEXE As String = "EgtCam5Exe"
|
||||
Public Const K_REFRESHTIME As String = "RefreshTime"
|
||||
Public Const K_DDFVERSION As String = "DDFVersion"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -90,6 +91,7 @@ Module ConstIni
|
||||
Public Const K_MYPROJECTDIR As String = "ProjectDirectory"
|
||||
Public Const K_TEMPLATEDIR As String = "TemplateDirectory"
|
||||
Public Const K_MACHINDIR As String = "MachinDirectory"
|
||||
Public Const K_MTABLE As String = "MTable"
|
||||
|
||||
Public Const S_REPORT As String = "Report"
|
||||
Public Const K_REPORTDIR As String = "ReportDirectory"
|
||||
|
||||
+206
-157
@@ -68,11 +68,19 @@ Friend Module DdfFile
|
||||
DdfFileContent.Add("#" & PrintTitleDDFPart(Part.TypePart))
|
||||
End If
|
||||
DdfFileContent.Add("")
|
||||
' dal 20/04/2023 inserita gestione della versione (da configurare nel programma)
|
||||
If OptionModule.m_sVersionDDF <> "1" Then
|
||||
DdfFileContent.Add("version: " & OptionModule.m_sVersionDDF)
|
||||
End If
|
||||
DdfFileContent.Add("")
|
||||
' definisco se il pezzo deve essere prodotto
|
||||
DdfFileContent.Add("produce: " & If(Part.IsActive, "true", "false"))
|
||||
'Genero una lista di stringhe
|
||||
DdfFileContent.Add("")
|
||||
If IsNothing(Part.Measure) Then Part.Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
|
||||
DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & Part.Measure)
|
||||
'If IsNothing(Part.Measure) Then Part.Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
|
||||
'DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & Part.Measure)
|
||||
DdfFileContent.Add(ConstCompo.S_MEASURES & ": " & ConvertMmUnitsToString(OptionModule.m_bIsMmUnit))
|
||||
|
||||
' 50200=Unit measure
|
||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50200), Part.Measure))
|
||||
|
||||
@@ -101,52 +109,52 @@ Friend Module DdfFile
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter("Door", Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.GraphicName))
|
||||
' Probabilmente da cambiare
|
||||
If Not IsNothing(Part.Customer) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_CUSTOMER & ": " & Part.Customer)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_CUSTOMER & ": " & Part.Customer)
|
||||
' 50070=Customer
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50070), Part.Customer))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50070), Part.Customer))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_CUSTOMER & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_CUSTOMER & ": ")
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50070), ""))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50070), ""))
|
||||
End If
|
||||
If Not IsNothing(Part.Elevation) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_ELEVATION & ": " & Part.Elevation)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_ELEVATION & ": " & Part.Elevation)
|
||||
' 50406=Elevation
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50406), Part.Elevation))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50406), Part.Elevation))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_ELEVATION & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_ELEVATION & ": ")
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50406), ""))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50406), ""))
|
||||
End If
|
||||
If Not IsNothing(Part.Project) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PROJECT & ": " & Part.Project)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PROJECT & ": " & Part.Project)
|
||||
' 50407=Project
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50407), Part.Project))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50407), Part.Project))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PROJECT & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PROJECT & ": ")
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50407), ""))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50407), ""))
|
||||
End If
|
||||
If Not IsNothing(Part.PO) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PO & ": " & Part.PO)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PO & ": " & Part.PO)
|
||||
' 50408=PO
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50408), Part.PO))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50408), Part.PO))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PO & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PO & ": ")
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50408), ""))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50408), ""))
|
||||
End If
|
||||
If Not IsNothing(Part.Line) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LINE & ": " & Part.Line)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LINE & ": " & Part.Line)
|
||||
' 50409=Line
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50409), Part.Line))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50409), Part.Line))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LINE & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LINE & ": ")
|
||||
OrderInReport.OrderParameterList.Add(New ReportParameter(EgtMsg(50409), ""))
|
||||
TOrder.Order_ParametersList.Add(New ReportParameter(EgtMsg(50409), ""))
|
||||
End If
|
||||
@@ -165,9 +173,9 @@ Friend Module DdfFile
|
||||
' il posizionamento della prima porta sta nell'origine
|
||||
If Part.TypePart = ConstGen.PART_DO_ & "1" Then
|
||||
DdfFileContent.Add("position: ")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & "0")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & "0")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & "0")
|
||||
DdfFileContent.Add(m_sSpace1Tab & "x: " & "0")
|
||||
DdfFileContent.Add(m_sSpace1Tab & "y: " & "0")
|
||||
DdfFileContent.Add(m_sSpace1Tab & "z: " & "0")
|
||||
ElseIf Part.TypePart = ConstGen.PART_DO_ & "2" Then
|
||||
' si trova traslata verso destra dello spessore DO_1 sommato a LightLock"
|
||||
Dim x_DO_1 As Double = 0.0
|
||||
@@ -179,30 +187,30 @@ Friend Module DdfFile
|
||||
StringToDouble(Map.refAssemblyPageVM.CurrAssembly.LightLock, dLightLock)
|
||||
Dim x As String = DoubleToString(x_DO_1 + dLightLock, 4)
|
||||
DdfFileContent.Add("position: ")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & x)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & "0")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & "0")
|
||||
DdfFileContent.Add(m_sSpace1Tab & "x: " & x)
|
||||
DdfFileContent.Add(m_sSpace1Tab & "y: " & "0")
|
||||
DdfFileContent.Add(m_sSpace1Tab & "z: " & "0")
|
||||
' Jamb Sinistro serratura
|
||||
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_LEFT) Then
|
||||
DdfFileContent.Add("position: ")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & PositionJamb_X(Part))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & PositionJamb_Y(Part))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & PositionJamb_Z(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "x: " & PositionJamb_X(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "y: " & PositionJamb_Y(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "z: " & PositionJamb_Z(Part))
|
||||
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_RIGHT) Then
|
||||
DdfFileContent.Add("position: ")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & PositionJamb_X(Part))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & PositionJamb_Y(Part))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & PositionJamb_Z(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "x: " & PositionJamb_X(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "y: " & PositionJamb_Y(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "z: " & PositionJamb_Z(Part))
|
||||
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_TOP) Then
|
||||
DdfFileContent.Add("position: ")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & PositionJamb_X(Part))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & PositionJamb_Y(Part))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & PositionJamb_Z(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "x: " & PositionJamb_X(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "y: " & PositionJamb_Y(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "z: " & PositionJamb_Z(Part))
|
||||
ElseIf Part.TypePart.Contains(ConstGen.PART_FRAME_BOTTOM) Then
|
||||
DdfFileContent.Add("position: ")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "x: " & PositionJamb_X(Part))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "y: " & PositionJamb_Y(Part))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & "z: " & PositionJamb_Z(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "x: " & PositionJamb_X(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "y: " & PositionJamb_Y(Part))
|
||||
DdfFileContent.Add(m_sSpace1Tab & "z: " & PositionJamb_Z(Part))
|
||||
End If
|
||||
DdfFileContent.Add("")
|
||||
End If
|
||||
@@ -216,9 +224,9 @@ Friend Module DdfFile
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & Part.Width)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & Part.Width)
|
||||
End If
|
||||
End If
|
||||
' 50001=Width
|
||||
@@ -230,9 +238,9 @@ Friend Module DdfFile
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & Part.Height)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & Part.Height)
|
||||
End If
|
||||
End If
|
||||
' 50002=Height
|
||||
@@ -244,9 +252,9 @@ Friend Module DdfFile
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & Part.Thickness)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & Part.Thickness)
|
||||
End If
|
||||
End If
|
||||
' 50003=Thickness
|
||||
@@ -355,53 +363,68 @@ Friend Module DdfFile
|
||||
DdfFileContent.Add("" & ConstCompo.S_PROFILES & ":")
|
||||
Dim TProfile As New TableProfile
|
||||
Dim BevelDDF As String = SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LOCKEDGE & ": " & BevelDDF)
|
||||
If OptionModule.m_sVersionDDF = "2" Then ' K_TYPE
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LOCKEDGE & ": ")
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & BevelDDF)
|
||||
Else
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LOCKEDGE & ": " & BevelDDF)
|
||||
End If
|
||||
' 50005=Lock edge
|
||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50005), BevelDDF))
|
||||
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50005), BevelDDF))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
|
||||
If Not StringToDouble(Part.LockEdgeOverMaterial, dVal) Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), K_LOCKEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.LockEdgeOverMaterial)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.LockEdgeOverMaterial)
|
||||
End If
|
||||
End If
|
||||
|
||||
BevelDDF = SetBevel(Part.TypePart, Part.HingeEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HINGEEDGE & ": " & BevelDDF)
|
||||
If OptionModule.m_sVersionDDF = "2" Then
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HINGEEDGE & ": ")
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & BevelDDF)
|
||||
Else
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HINGEEDGE & ": " & BevelDDF)
|
||||
End If
|
||||
' 50006=Hinge edge
|
||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50006), BevelDDF))
|
||||
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50006), BevelDDF))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.HingeEdgeMachining))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.HingeEdgeMachining))
|
||||
If Not StringToDouble(Part.HingeEdgeOverMaterial, dVal) Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), K_HINGEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.HingeEdgeOverMaterial)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.HingeEdgeOverMaterial)
|
||||
End If
|
||||
End If
|
||||
|
||||
BevelDDF = SetBevel(Part.TypePart, Part.TopType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_TOP & ": " & BevelDDF)
|
||||
If OptionModule.m_sVersionDDF = "2" Then
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_TOP & ": ")
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & BevelDDF)
|
||||
Else
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_TOP & ": " & BevelDDF)
|
||||
End If
|
||||
' 50007=Top
|
||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50007), BevelDDF))
|
||||
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50007), BevelDDF))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.TopMachining))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.TopMachining))
|
||||
If Not StringToDouble(Part.TopOverMaterial, dVal) Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), K_TOPOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.TopOverMaterial)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.TopOverMaterial)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -411,9 +434,9 @@ Friend Module DdfFile
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_RADIUS & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_RADIUS & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_RADIUS & ": " & Part.Radius)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_RADIUS & ": " & Part.Radius)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -422,9 +445,9 @@ Friend Module DdfFile
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_POSX & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_POSX & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_POSX & ": " & Part.Posx)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_POSX & ": " & Part.Posx)
|
||||
End If
|
||||
End If
|
||||
' 50707=Top Arc
|
||||
@@ -444,9 +467,9 @@ Friend Module DdfFile
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_POSX & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_POSX & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_POSX & ": " & Part.PosxAngle)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_POSX & ": " & Part.PosxAngle)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -455,9 +478,9 @@ Friend Module DdfFile
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_ANGLE & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_ANGLE & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_ANGLE & ": " & Part.Angle)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_ANGLE & ": " & Part.Angle)
|
||||
End If
|
||||
End If
|
||||
' 50708=Top Angle
|
||||
@@ -472,23 +495,32 @@ Friend Module DdfFile
|
||||
End If
|
||||
|
||||
BevelDDF = SetBevel(Part.TypePart, Part.BottomType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_BOTTOM & ": " & BevelDDF)
|
||||
If OptionModule.m_sVersionDDF = "2" Then
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_BOTTOM & ": ")
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_TYPEEDGE & ": " & BevelDDF)
|
||||
Else
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_BOTTOM & ": " & BevelDDF)
|
||||
End If
|
||||
' 50008=Bottom
|
||||
CompoDoorReport.CompoParameterList.Add(New ReportParameter(EgtMsg(50008), BevelDDF))
|
||||
TProfile.Profile_ParametersList.Add(New ReportParameter(EgtMsg(50008), BevelDDF))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.BottomMachining))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.BottomMachining))
|
||||
If Not StringToDouble(Part.BottomOverMaterial, dVal) Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), K_BOTTOMOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
Else
|
||||
If bIsDDF Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.BottomOverMaterial)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.BottomOverMaterial)
|
||||
End If
|
||||
End If
|
||||
DoorExists = True
|
||||
|
||||
DdfFileContent.Add(" ")
|
||||
If OptionModule.m_sVersionDDF = "2" Then
|
||||
DdfFileContent.Add(ConstCompo.K_HARDWARE & ": ")
|
||||
End If
|
||||
' Riordino e stampo le compo
|
||||
SearchCompo(DdfFileContent, Part, bIsDDF)
|
||||
If Not Directory.Exists(Path.GetDirectoryName(sPath)) Then
|
||||
@@ -530,6 +562,10 @@ Friend Module DdfFile
|
||||
If Not String.IsNullOrEmpty(CurrHardwareReference) Then
|
||||
DdfFileContent.Add("#" & CurrHardwareReference)
|
||||
End If
|
||||
' dal 20/04/2023 inserita gestione della versione (da configurare nel programma)
|
||||
If OptionModule.m_sVersionDDF <> "1" Then
|
||||
DdfFileContent.Add("version: " & OptionModule.m_sVersionDDF)
|
||||
End If
|
||||
DdfFileContent.Add("")
|
||||
DdfFileContent.Add("produce: " & If(Part.IsActive, "true", "false"))
|
||||
'Genero una lista di stringhe
|
||||
@@ -556,29 +592,29 @@ Friend Module DdfFile
|
||||
DdfFileContent.Add(ConstCompo.S_ORDER & ":")
|
||||
' Probabilmente da cambiare
|
||||
If Not IsNothing(Part.Customer) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_CUSTOMER & ": " & Part.Customer)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_CUSTOMER & ": " & Part.Customer)
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_CUSTOMER & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_CUSTOMER & ": ")
|
||||
End If
|
||||
If Not IsNothing(Part.Elevation) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_ELEVATION & ": " & Part.Elevation)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_ELEVATION & ": " & Part.Elevation)
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_ELEVATION & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_ELEVATION & ": ")
|
||||
End If
|
||||
If Not IsNothing(Part.Project) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PROJECT & ": " & Part.Project)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PROJECT & ": " & Part.Project)
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PROJECT & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PROJECT & ": ")
|
||||
End If
|
||||
If Not IsNothing(Part.PO) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PO & ": " & Part.PO)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PO & ": " & Part.PO)
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_PO & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_PO & ": ")
|
||||
End If
|
||||
If Not IsNothing(Part.Line) Then
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LINE & ": " & Part.Line)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LINE & ": " & Part.Line)
|
||||
Else
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LINE & ": ")
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LINE & ": ")
|
||||
End If
|
||||
' aggiungo una riga vuota per separare la lista successiva
|
||||
DdfFileContent.Add("")
|
||||
@@ -600,11 +636,11 @@ Friend Module DdfFile
|
||||
' ConvertCurrentUnitMeasure(sVal)
|
||||
'Part.SetWidth(sVal)
|
||||
If bIsDDF Then
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & sVal)
|
||||
Else
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & Part.Width)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_WIDTH & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & Part.Width)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_WIDTH & ": " & sVal)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -616,11 +652,11 @@ Friend Module DdfFile
|
||||
' ConvertCurrentUnitMeasure(sVal)
|
||||
'Part.SetHeight(sVal)
|
||||
If bIsDDF Then
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & sVal)
|
||||
Else
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & Part.Height)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HEIGHT & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & Part.Height)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HEIGHT & ": " & sVal)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -633,11 +669,11 @@ Friend Module DdfFile
|
||||
' ConvertCurrentUnitMeasure(sVal)
|
||||
'Part.SetThickness(sVal)
|
||||
If bIsDDF Then
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & sVal)
|
||||
Else
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & Part.Thickness)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_THICKNESS & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & Part.Thickness)
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_THICKNESS & ": " & sVal)
|
||||
End If
|
||||
End If
|
||||
' aggiungo una riga vuota per separare la lista successiva
|
||||
@@ -662,8 +698,8 @@ Friend Module DdfFile
|
||||
End If
|
||||
'----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DdfFileContent.Add("" & ConstCompo.S_PROFILES & ":")
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_LOCKEDGE & ": " & SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_LOCKEDGE & ": " & SetBevel(Part.TypePart, Part.LockEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name, Part.InvertBevel))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.LockEdgeMachining))
|
||||
If Not StringToDouble(Part.LockEdgeOverMaterial, dVal) Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), K_LOCKEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
@@ -671,15 +707,15 @@ Friend Module DdfFile
|
||||
sVal = Part.LockEdgeOverMaterial
|
||||
' ConvertCurrentUnitMeasure(sVal)
|
||||
If bIsDDF Then
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
Else
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.LockEdgeOverMaterial)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.LockEdgeOverMaterial)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
End If
|
||||
End If
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_HINGEEDGE & ": " & SetBevel(Part.TypePart, Part.HingeEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.HingeEdgeMachining))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_HINGEEDGE & ": " & SetBevel(Part.TypePart, Part.HingeEdgeType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.HingeEdgeMachining))
|
||||
If Not StringToDouble(Part.HingeEdgeOverMaterial, dVal) Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), K_HINGEDGEOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
@@ -687,15 +723,15 @@ Friend Module DdfFile
|
||||
sVal = Part.HingeEdgeOverMaterial
|
||||
ConvertCurrentUnitMeasure(sVal)
|
||||
If bIsDDF Then
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
Else
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.HingeEdgeOverMaterial)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.HingeEdgeOverMaterial)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
End If
|
||||
End If
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_TOP & ": " & SetBevel(Part.TypePart, Part.TopType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.TopMachining))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_TOP & ": " & SetBevel(Part.TypePart, Part.TopType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.TopMachining))
|
||||
If Not StringToDouble(Part.TopOverMaterial, dVal) Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), K_TOPOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
@@ -703,15 +739,15 @@ Friend Module DdfFile
|
||||
sVal = Part.TopOverMaterial
|
||||
' ConvertCurrentUnitMeasure(sVal)
|
||||
If bIsDDF Then
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
Else
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.TopOverMaterial)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.TopOverMaterial)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
End If
|
||||
End If
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE3 & ConstCompo.K_BOTTOM & ": " & SetBevel(Part.TypePart, Part.BottomType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.BottomMachining))
|
||||
DdfFileContent.Add(m_sSpace1Tab & ConstCompo.K_BOTTOM & ": " & SetBevel(Part.TypePart, Part.BottomType.Name, Part.DispositionItem.Name, Part.SwingAlias.Name))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_MACHINING & ": " & ConvertBooleanToOnOff(Part.BottomMachining))
|
||||
If Not StringToDouble(Part.BottomOverMaterial, dVal) Then
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), K_BOTTOMOVERMATERIAL_INI), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
@@ -719,13 +755,17 @@ Friend Module DdfFile
|
||||
sVal = Part.BottomOverMaterial
|
||||
' ConvertCurrentUnitMeasure(sVal)
|
||||
If bIsDDF Then
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & DoubleToString(dVal, 5))
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
Else
|
||||
'DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & Part.BottomOverMaterial)
|
||||
DdfFileContent.Add(ConstCompo.DDF_SPACE5 & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
'DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & Part.BottomOverMaterial)
|
||||
DdfFileContent.Add(m_sSpace2Tab & ConstCompo.K_OVERMATERIAL & ": " & sVal)
|
||||
End If
|
||||
End If
|
||||
|
||||
If OptionModule.m_sVersionDDF = "2" Then
|
||||
DdfFileContent.Add(ConstCompo.K_HARDWARE & "hardware: ")
|
||||
End If
|
||||
' Riordino e stampo le compo
|
||||
SearchCompo(DdfFileContent, Part, bIsDDF)
|
||||
If Not Directory.Exists(Path.GetDirectoryName(sPath)) Then
|
||||
@@ -956,7 +996,9 @@ Friend Module DdfFile
|
||||
Dim NewCompoNameDDF = False
|
||||
Dim WritingError As String = String.Empty
|
||||
Dim TempList As New ObservableCollection(Of Compo)
|
||||
DdfFileContent.Add("")
|
||||
If OptionModule.m_sVersionDDF = "1" Then
|
||||
DdfFileContent.Add("")
|
||||
End If
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------
|
||||
' cerco la prima componente da aggiungere alla lista delle componenti
|
||||
For Index1 = 0 To DdfFile.CompoListOrder.Count() - 1
|
||||
@@ -1063,15 +1105,15 @@ Friend Module DdfFile
|
||||
' se il nome non esiste ancora nella lista lo aggiungo
|
||||
If bNewCompoNameDDF Then
|
||||
' aggiungo il nome DDF della componente
|
||||
CompoListDDF.Add(Compo.CompoType.DDFName & ":")
|
||||
CompoListDDF.Add(m_sSpaceTabCompo & Compo.CompoType.DDFName & ":")
|
||||
End If
|
||||
' se esiste il template
|
||||
If Not String.IsNullOrWhiteSpace(Compo.TemplateDDFName) Then
|
||||
' aggiungo " - nomeTemplate: TemplateSelezionato"
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_HYPHEN & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||
CompoListDDF.Add(DDF_METADATA & OptionModule.m_sSpaceHype & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||
ElseIf Compo.LoadByDefault And SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_HYPHEN & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||
CompoListDDF.Add(OptionModule.m_sSpaceHype & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||
If Not String.IsNullOrEmpty(sErrorList) Then sErrorList &= Environment.NewLine
|
||||
' 50563=Compo {0} does not exist.
|
||||
sErrorList &= String.Format(EgtMsg(50563), Compo.SelBrandPart & "\" & Compo.SelFile)
|
||||
@@ -1083,7 +1125,7 @@ Friend Module DdfFile
|
||||
End If
|
||||
ParamInCompoIsCorrect = False
|
||||
Else
|
||||
CompoListDDF.Add(DDF_HYPHEN & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||
CompoListDDF.Add(OptionModule.m_sSpaceHype & Compo.TemplateDDFName & ": " & Compo.TemplateSelItem)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -1108,9 +1150,9 @@ Friend Module DdfFile
|
||||
' restituisco il valore DDF della lista associato all'indice passato
|
||||
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
||||
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||
End If
|
||||
Else
|
||||
' se non è selezionato nessun elemento (cosa impossibile...)
|
||||
@@ -1136,9 +1178,9 @@ Friend Module DdfFile
|
||||
' restituisco il valore DDF della lista associato all'indice passato
|
||||
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
||||
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||
End If
|
||||
Else
|
||||
' se non è selezionato nessun elemento (cosa impossibile...)
|
||||
@@ -1147,9 +1189,9 @@ Friend Module DdfFile
|
||||
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
||||
ParamInCompoIsCorrect = False
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
End If
|
||||
End If
|
||||
ElseIf Not cbParam.ErrorInReading And cbParam.MissingParameterInReading Then
|
||||
@@ -1164,9 +1206,9 @@ Friend Module DdfFile
|
||||
' restituisco il valore DDF della lista associato all'indice passato
|
||||
Dim SelItemDDF As String = Trim(cbParam.ItemListDDF(IndexDDF))
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & SelItemDDF)
|
||||
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & SelItemDDF)
|
||||
End If
|
||||
Else
|
||||
' se non è selezionato nessun elemento (cosa impossibile...)
|
||||
@@ -1175,9 +1217,9 @@ Friend Module DdfFile
|
||||
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
||||
ParamInCompoIsCorrect = False
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
@@ -1185,9 +1227,9 @@ Friend Module DdfFile
|
||||
sErrorList &= String.Format(EgtMsg(50125), cbParam.Name, Compo.CompoType.DDFName)
|
||||
ParamInCompoIsCorrect = False
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
CompoListDDF.Add(m_sSpace3Tab & cbParam.DDFName & ": " & cbParam.SelItem)
|
||||
End If
|
||||
End If
|
||||
' TextBox Opzionale
|
||||
@@ -1200,24 +1242,24 @@ Friend Module DdfFile
|
||||
' 50122: Error reading {0} param in {1} compo.
|
||||
sErrorList &= String.Format(EgtMsg(50122), tboParam.Name, Compo.CompoType.DDFName)
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tboParam.DDFName & ": ")
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tboParam.DDFName & ": ")
|
||||
ParamInCompoIsCorrect = False
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.Value)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.Value)
|
||||
ParamInCompoIsCorrect = False
|
||||
End If
|
||||
Else
|
||||
If bIsDDF Then
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.ToolTipValue)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.ToolTipValue)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.ToolTipValue)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.ToolTipValue)
|
||||
End If
|
||||
Else
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.Value)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.Value)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tboParam.DDFName & ": " & tboParam.Value)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tboParam.DDFName & ": " & tboParam.Value)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1235,24 +1277,24 @@ Friend Module DdfFile
|
||||
' 50122: Error reading {0} param in {1} compo.
|
||||
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
ParamInCompoIsCorrect = False
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
ParamInCompoIsCorrect = False
|
||||
End If
|
||||
Else
|
||||
If bIsDDF Then
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||
End If
|
||||
Else
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1265,24 +1307,24 @@ Friend Module DdfFile
|
||||
' 50122: Error reading {0} param in {1} compo.
|
||||
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
ParamInCompoIsCorrect = False
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
ParamInCompoIsCorrect = False
|
||||
End If
|
||||
Else
|
||||
If bIsDDF Then
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.ToolTipValue)
|
||||
End If
|
||||
Else
|
||||
If Compo.LoadByDefault And Not SaveErrorCompo Then
|
||||
CompoListDDF.Add(DDF_METADATA & DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(DDF_METADATA & m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1290,7 +1332,7 @@ Friend Module DdfFile
|
||||
If Not String.IsNullOrEmpty(sErrorList) Then sErrorList &= Environment.NewLine
|
||||
' 50122: Error reading {0} param in {1} compo.
|
||||
sErrorList &= String.Format(EgtMsg(50122), tbParam.Name, Compo.CompoType.DDFName)
|
||||
CompoListDDF.Add(DDF_SPACE5 & tbParam.DDFName & ": " & tbParam.Value)
|
||||
CompoListDDF.Add(m_sSpace3Tab & tbParam.DDFName & ": " & tbParam.Value)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -1298,33 +1340,33 @@ Friend Module DdfFile
|
||||
If Not IsNothing(Compo.refJambCompo) Then
|
||||
' stampo una componente dell'anta
|
||||
If Not String.IsNullOrEmpty(Compo.IdCode) AndAlso Trim(Compo.refJambCompo.IdCode) = Trim(Compo.IdCode) Then
|
||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode)
|
||||
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode)
|
||||
Else
|
||||
Compo.IdCode = CStr(IdIndex)
|
||||
Compo.refJambCompo.IdCode = Trim(Compo.IdCode)
|
||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode)
|
||||
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode)
|
||||
End If
|
||||
IdIndex += 1
|
||||
ElseIf Not IsNothing(Compo.refCompoDoor) Then
|
||||
' stampo una componente sul telaio
|
||||
If Not String.IsNullOrEmpty(Compo.refCompoDoor.IdCode) Then
|
||||
If Compo.OtherDoor Then
|
||||
CompoListDDF.Add(DDF_SPACE5 & "other_door: 1")
|
||||
CompoListDDF.Add(m_sSpace3Tab & "other_door: 1")
|
||||
End If
|
||||
Compo.IdCode = Compo.refCompoDoor.IdCode
|
||||
If Compo.MatchedDoor Then
|
||||
' solo per il caso di sue ante
|
||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode & " , Matched")
|
||||
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode & " , Matched")
|
||||
Else
|
||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode)
|
||||
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode)
|
||||
End If
|
||||
|
||||
End If
|
||||
ElseIf Not String.IsNullOrEmpty(Compo.IdCode) Then
|
||||
If Compo.OtherDoor Then
|
||||
CompoListDDF.Add(DDF_SPACE5 & "other_door: 1")
|
||||
CompoListDDF.Add(m_sSpace3Tab & "other_door: 1")
|
||||
End If
|
||||
CompoListDDF.Add(DDF_SPACE5 & "##IdCodeComponent : " & Compo.IdCode)
|
||||
CompoListDDF.Add(m_sSpace3Tab & "##IdCodeComponent : " & Compo.IdCode)
|
||||
IdIndex += 1
|
||||
End If
|
||||
Return CompoListDDF
|
||||
@@ -1440,18 +1482,18 @@ Friend Module DdfFile
|
||||
If InvertBevel Then
|
||||
' If sCurrBevel = ConstGen.BEVEL_GRAPHIC And DispositionItem = ConstGen.BEVEL_DOWN Then
|
||||
If sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem = ConstGen.BEVEL_DOWN Then
|
||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_UP) & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
||||
' Return ConstGen.BEVEL_UP & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_UP) & m_sSpace1Tab & " ## Inverted"
|
||||
' Return ConstGen.BEVEL_UP & m_sSpace1Tab & " ## Inverted"
|
||||
ElseIf sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem = ConstGen.BEVEL_UP Then
|
||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_DOWN) & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
||||
'Return ConstGen.BEVEL_DOWN & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_DOWN) & m_sSpace1Tab & " ## Inverted"
|
||||
'Return ConstGen.BEVEL_DOWN & m_sSpace1Tab & " ## Inverted"
|
||||
ElseIf sCurrBevel.Contains(ConstGen.BEVEL_GRAPHIC) And DispositionItem <> ConstGen.BEVEL_UP And DispositionItem <> ConstGen.BEVEL_DOWN Then
|
||||
If sSwing.Contains(ConstGen.HAND_REVERSE) Then
|
||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_UP) & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
||||
'Return ConstGen.BEVEL_UP & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_UP) & m_sSpace1Tab & " ## Inverted"
|
||||
'Return ConstGen.BEVEL_UP & m_sSpace1Tab & " ## Inverted"
|
||||
Else
|
||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_DOWN) & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
||||
'Return ConstGen.BEVEL_DOWN & ConstCompo.DDF_SPACE3 & " ## Inverted"
|
||||
Return sCurrBevel.Replace(ConstGen.BEVEL_GRAPHIC, ConstGen.BEVEL_DOWN) & m_sSpace1Tab & " ## Inverted"
|
||||
'Return ConstGen.BEVEL_DOWN & m_sSpace1Tab & " ## Inverted"
|
||||
End If
|
||||
Else
|
||||
Return sCurrBevel
|
||||
@@ -1540,6 +1582,13 @@ Friend Module DdfFile
|
||||
GeneralAssembly.Add("#EGTDOORCREATOR")
|
||||
GeneralAssembly.Add("#GENERAL ASSEMBLY")
|
||||
GeneralAssembly.Add("#")
|
||||
|
||||
' dalla veresione 2.4l1 per gestione conversione mm/inch e viceversa
|
||||
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "Unit : ")
|
||||
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "measures : " & ConvertMmUnitsToString(OptionModule.m_bIsMmUnit))
|
||||
GeneralAssembly.Add(DDF_METADATA)
|
||||
|
||||
' dati assemblato
|
||||
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "Size : ")
|
||||
If StringToDouble(CurrAssembly.Thickness, dVal) Then
|
||||
GeneralAssembly.Add(ConstCompo.DDF_METADATA & "thickness : " & DoubleToString(dVal, 5))
|
||||
|
||||
+35
-5
@@ -1134,7 +1134,7 @@ Public Class Compo
|
||||
|
||||
Return True
|
||||
|
||||
Case INI_TEXTBOX
|
||||
Case INI_TEXTBOX, INI_TEXTBOX_D
|
||||
' NomeDDF e Nome del Text
|
||||
Dim sTextList() As String = sItems(1).Split("/"c)
|
||||
Dim sDDFName As String = String.Empty
|
||||
@@ -1150,20 +1150,30 @@ Public Class Compo
|
||||
' Se ci sono 2 elementi "TextBox; NomeDDF/Nome"
|
||||
If sItems.Count < 3 Then
|
||||
NewCompoParam = New TextBoxParam(sDDFName, sName, Me, "0.000", Nothing, Nothing)
|
||||
If Trim(sItems(0)).EndsWith("d"c) Then
|
||||
Dim Loc_TextBox_d As TextBoxParam = DirectCast(NewCompoParam, TextBoxParam)
|
||||
Loc_TextBox_d.bIsLen = False
|
||||
NewCompoParam = Loc_TextBox_d
|
||||
End If
|
||||
' Errore nella lettura {0} nel parametro {1} della componente: non esiste il valore.
|
||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50125), sName, m_CompoType.DDFName))
|
||||
Return True
|
||||
End If
|
||||
' recupero il valore di default
|
||||
Dim dHeight As Double = 500 ' Attenzione ai mm
|
||||
If Not ConvertCompoConfig(sItems(2), dHeight) Then
|
||||
If Not Trim(sItems(0)).EndsWith("d"c) AndAlso Not ConvertCompoConfig(sItems(2), dHeight) Then
|
||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50147), sName, sItems(2)))
|
||||
End If
|
||||
|
||||
NewCompoParam = New TextBoxParam(sDDFName, sName, Me, sItems(2), Nothing, Nothing)
|
||||
If Trim(sItems(0)).EndsWith("d"c) Then
|
||||
Dim Loc_TextBox_d As TextBoxParam = DirectCast(NewCompoParam, TextBoxParam)
|
||||
Loc_TextBox_d.bIsLen = False
|
||||
NewCompoParam = Loc_TextBox_d
|
||||
End If
|
||||
Return True
|
||||
|
||||
Case INI_TEXTBOX_ONOFF
|
||||
Case INI_TEXTBOX_ONOFF, INI_TEXTBOX_ONOFF_D
|
||||
' NomeDDF e Nome del Text
|
||||
Dim sTextList() As String = sItems(1).Split("/"c)
|
||||
Dim sDDFName As String = String.Empty
|
||||
@@ -1179,6 +1189,11 @@ Public Class Compo
|
||||
' Se ci sono 2 elementi "TextBox; NomeDDF/Nome"
|
||||
If sItems.Count < 3 Then
|
||||
NewCompoParam = New TextBoxOnOffParam(sDDFName, sName, Me, "0.000", Nothing, Nothing, False)
|
||||
If Trim(sItems(0)).EndsWith("d"c) Then
|
||||
Dim Loc_TextBox_d As TextBoxOnOffParam = DirectCast(NewCompoParam, TextBoxOnOffParam)
|
||||
Loc_TextBox_d.bIsLen = False
|
||||
NewCompoParam = Loc_TextBox_d
|
||||
End If
|
||||
' Errore nella lettura {0} nel parametro {1} della componente: non esiste il valore.
|
||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50125), sName, m_CompoType.DDFName))
|
||||
Return True
|
||||
@@ -1191,12 +1206,16 @@ Public Class Compo
|
||||
|
||||
' recupero il valore di default
|
||||
Dim dHeight As Double = 500 ' Attenzione ai mm
|
||||
If Not ConvertCompoConfig(sItems(2), dHeight) Then
|
||||
If Not Trim(sItems(0)).EndsWith("d"c) AndAlso Not ConvertCompoConfig(sItems(2), dHeight) Then
|
||||
sErrorList = ConcatErrorString(sErrorList, String.Format(EgtMsg(50147), sName, sItems(2)))
|
||||
End If
|
||||
|
||||
NewCompoParam = New TextBoxOnOffParam(sDDFName, sName, Me, sItems(2), Nothing, Nothing, bActiveBox)
|
||||
|
||||
If Trim(sItems(0)).EndsWith("d"c) Then
|
||||
Dim Loc_TextBox_d As TextBoxOnOffParam = DirectCast(NewCompoParam, TextBoxOnOffParam)
|
||||
Loc_TextBox_d.bIsLen = False
|
||||
NewCompoParam = Loc_TextBox_d
|
||||
End If
|
||||
Return True
|
||||
|
||||
End Select
|
||||
@@ -2367,6 +2386,17 @@ Public Class TextBoxParam
|
||||
Shared m_PrecCompoIdCode As String = "-1"
|
||||
Shared m_PrecNameParam As String = String.Empty
|
||||
|
||||
' utilizzata per riconoscere se il valore della text deve essere convertito mm/inch o viceversa
|
||||
Private m_bIsLen As Boolean = True
|
||||
Public Property bIsLen As Boolean
|
||||
Get
|
||||
Return m_bIsLen
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsLen = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' utilizzato negli Hardware
|
||||
Private m_TypeVar As String
|
||||
Public Property TypeVar As String
|
||||
|
||||
+126
-35
@@ -46,6 +46,18 @@ Public Class Part
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' per sapere quale tipo versione è il file
|
||||
Private m_Version As String = "1"
|
||||
Public Property Version As String
|
||||
Get
|
||||
Return m_Version
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Version = value
|
||||
RegexFunction.sCurrVersionDoor = m_Version
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' per sapere se il check è attivo (nella modalità assembalto)
|
||||
Private m_IsActive As Boolean
|
||||
Public Property IsActive As Boolean
|
||||
@@ -1543,7 +1555,8 @@ Public Class Part
|
||||
'Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
||||
ReadDoor.FileContent = ArrayFile
|
||||
ReadDoor.m_TypePart = ConstGen.PART_DO_ & "1"
|
||||
|
||||
' Imposto di default la porta in lettura è versione 1
|
||||
ReadDoor.Version = "1"
|
||||
' Se il file DDF è vuoto
|
||||
If ReadDoor.FileContent.Count = 0 Then
|
||||
' 50107 = Empty file.
|
||||
@@ -1565,6 +1578,8 @@ Public Class Part
|
||||
' Processo la sezione
|
||||
Dim sSection As String = GetName(sLine)
|
||||
Select Case sSection
|
||||
Case S_VERSION
|
||||
LineIndex = ReadDoor.GetVersion(LineIndex)
|
||||
Case S_PRODUCE
|
||||
LineIndex = ReadDoor.GetProduce(LineIndex)
|
||||
Case S_MEASURES
|
||||
@@ -1685,6 +1700,8 @@ Public Class Part
|
||||
sErrorInfo &= LocalMsg
|
||||
End If
|
||||
ReadDoorCompleted = True
|
||||
Case ConstCompo.K_HARDWARE
|
||||
LineIndex = LineIndex + 1
|
||||
Case Else 'COMPONENTS
|
||||
' Se sezione senza nome o altro errore
|
||||
If String.IsNullOrWhiteSpace(sSection) Then
|
||||
@@ -1800,6 +1817,24 @@ Public Class Part
|
||||
Return SkipWhiteSpace(FileContent, Index + 1)
|
||||
End Function
|
||||
|
||||
' Leggo versione
|
||||
Private Function GetVersion(Index As Integer) As Integer
|
||||
Dim sVersion As String = GetValueWithKey(RemoveComment(FileContent(Index)), S_VERSION)
|
||||
If String.IsNullOrWhiteSpace(sVersion) Then
|
||||
m_Version = "1"
|
||||
Else
|
||||
' verifico che sia valido (dove leggo l'elenco delle versioni disponibili?)
|
||||
If sVersion.Trim <> "2" Then
|
||||
m_Version = "1"
|
||||
Else
|
||||
m_Version = sVersion.Trim
|
||||
End If
|
||||
End If
|
||||
RegexFunction.sCurrVersionDoor = m_Version
|
||||
' passo alla riga successiva
|
||||
Return NextIndex(Index)
|
||||
End Function
|
||||
|
||||
' Leggo il frame
|
||||
Private Function GetProduce(Index As Integer) As Integer
|
||||
Dim sProduce As String = GetValueWithKey(RemoveComment(FileContent(Index)), S_PRODUCE)
|
||||
@@ -1940,6 +1975,7 @@ Public Class Part
|
||||
'50159= Missing parameter in ddf!
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_WIDTH_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Width)
|
||||
SetWidth(Width)
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
@@ -1956,6 +1992,7 @@ Public Class Part
|
||||
' 50159 = Missing parameter in ddf!
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_HEIGHT_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Height)
|
||||
SetHeight(Height)
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
@@ -1972,6 +2009,7 @@ Public Class Part
|
||||
' 50159 = Missing parameter in ddf!
|
||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_THICKNESS_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Thickness)
|
||||
SetThickness(Thickness)
|
||||
End If
|
||||
Map.refAssemblyPageVM.CurrAssembly.SetVarAssembly()
|
||||
@@ -2290,19 +2328,18 @@ Public Class Part
|
||||
refOptionsVM.RefreshEdgeTypeList()
|
||||
End If
|
||||
Dim bError As Boolean = False
|
||||
'-------------------------------------------------------------------------------
|
||||
' Lock
|
||||
If Index > FileContent.Count() - 1 Then Return -1
|
||||
Dim sLine As String = RemoveComment(FileContent(Index))
|
||||
m_LockEdgeType = m_LockEdgeTypeList(0)
|
||||
Dim LockEdgeType As String = GetValueWithKey(sLine, K_LOCKEDGE)
|
||||
' se vrsione 2 (20/04/2023) il tipo di bevel è inserito nella riga successiva con chaive K_TYPEEDGE
|
||||
Dim nError As Integer = Index
|
||||
Dim LockEdgeType As String = ManageProfileType(sLine, Index, nError, K_LOCKEDGE)
|
||||
If nError = -1 Then Return -1
|
||||
If String.IsNullOrWhiteSpace(LockEdgeType) Then
|
||||
' se non c'è la parola chiave allora esco con errore
|
||||
If Not SearchKey(sLine, K_LOCKEDGE) Then
|
||||
Return -1
|
||||
Else
|
||||
FirstReadingEdge = True
|
||||
sErrorMsg = String.Format(EgtMsg(50523), SIDE_LOCK)
|
||||
End If
|
||||
If ManageProfileError(sLine, K_LOCKEDGE, SIDE_LOCK) = -1 Then Return -1
|
||||
Else
|
||||
Try
|
||||
Dim sMetaData As String = Trim(RegexFunction.Metadata(sLine))
|
||||
@@ -2332,7 +2369,6 @@ Public Class Part
|
||||
End Try
|
||||
End If
|
||||
End Try
|
||||
|
||||
If Not ControlProfileInList(LockEdgeTypeList, LockEdgeType) Then
|
||||
' 50522=The profile {0} is not a member of the {1} list.
|
||||
sErrorMsg = String.Format(EgtMsg(50522), LockEdgeType, SIDE_LOCK)
|
||||
@@ -2355,6 +2391,7 @@ Public Class Part
|
||||
If String.IsNullOrWhiteSpace(LockEdgeOverMaterial) Then
|
||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, LockEdgeOverMaterial)
|
||||
m_LockEdgeOverMaterial = LockEdgeOverMaterial
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
@@ -2363,15 +2400,13 @@ Public Class Part
|
||||
If Index > FileContent.Count() - 1 Then Return -1
|
||||
sLine = RemoveComment(FileContent(Index))
|
||||
m_HingeEdgeType = m_HingeEdgeTypeList(0)
|
||||
Dim HingeEdgeType As String = GetValueWithKey(sLine, K_HINGEEDGE)
|
||||
' se vrsione 2 (20/04/2023) il tipo di bevel è inserito nella riga successiva con chaive K_TYPEEDGE
|
||||
nError = Index
|
||||
Dim HingeEdgeType As String = ManageProfileType(sLine, Index, nError, K_HINGEEDGE)
|
||||
If nError = -1 Then Return -1
|
||||
If String.IsNullOrWhiteSpace(HingeEdgeType) Then
|
||||
' se non c'è la parola chiave allora esco con errore
|
||||
If Not SearchKey(sLine, K_HINGEEDGE) Then
|
||||
Return -1
|
||||
Else
|
||||
FirstReadingEdge = True
|
||||
sErrorMsg = String.Format(EgtMsg(50523), SIDE_HINGE)
|
||||
End If
|
||||
If ManageProfileError(sLine, K_HINGEEDGE, SIDE_HINGE) = -1 Then Return -1
|
||||
Else
|
||||
Try
|
||||
m_HingeEdgeType = HingeEdgeTypeList.First(Function(x) x.Name = HingeEdgeType)
|
||||
@@ -2417,21 +2452,21 @@ Public Class Part
|
||||
If String.IsNullOrWhiteSpace(HingeEdgeOverMaterial) Then
|
||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, HingeEdgeOverMaterial)
|
||||
m_HingeEdgeOverMaterial = HingeEdgeOverMaterial
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
'-------------------------------------------------------------------------------
|
||||
' Top
|
||||
If Index > FileContent.Count() - 1 Then Return -1
|
||||
sLine = RemoveComment(FileContent(Index))
|
||||
m_TopType = m_TopEdgeTypeList(0)
|
||||
Dim TopType As String = GetValueWithKey(sLine, K_TOP)
|
||||
' se vrsione 2 (20/04/2023) il tipo di bevel è inserito nella riga successiva con chaive K_TYPEEDGE
|
||||
nError = Index
|
||||
Dim TopType As String = ManageProfileType(sLine, Index, nError, K_TOP)
|
||||
If nError = -1 Then Return -1
|
||||
If String.IsNullOrWhiteSpace(TopType) Then
|
||||
If Not SearchKey(sLine, K_TOP) Then
|
||||
Return -1
|
||||
Else
|
||||
FirstReadingEdge = True
|
||||
sErrorMsg = String.Format(EgtMsg(50523), SIDE_TOP)
|
||||
End If
|
||||
If ManageProfileError(sLine, K_TOP, SIDE_TOP) = -1 Then Return -1
|
||||
Else
|
||||
Try
|
||||
m_TopType = TopEdgeTypeList.First(Function(x) x.Name = TopType)
|
||||
@@ -2476,12 +2511,14 @@ Public Class Part
|
||||
If String.IsNullOrWhiteSpace(TopOverMaterial) Then
|
||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, TopOverMaterial)
|
||||
m_TopOverMaterial = TopOverMaterial
|
||||
End If
|
||||
Index = NextIndex(Index)
|
||||
If Index > FileContent.Count() - 1 Then Return -1
|
||||
sLine = RemoveComment(FileContent(Index))
|
||||
'-------------------------------------------------------------------------------
|
||||
' Top Arc
|
||||
Dim Radius As String = GetValueWithKey(sLine, ConstCompo.K_RADIUS)
|
||||
If Not String.IsNullOrEmpty(Radius) Then
|
||||
Index = NextIndex(Index)
|
||||
@@ -2495,7 +2532,9 @@ Public Class Part
|
||||
Index = NextIndex(Index)
|
||||
Else
|
||||
Index = NextIndex(Index)
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Radius)
|
||||
m_Radius = Radius
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, Posx)
|
||||
m_Posx = Posx
|
||||
TopArcIsChecked = True
|
||||
TopShapeIsChecked = True
|
||||
@@ -2519,6 +2558,7 @@ Public Class Part
|
||||
Else
|
||||
Index = NextIndex(Index)
|
||||
m_Angle = Angle
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, PosxAngle)
|
||||
m_PosxAngle = PosxAngle
|
||||
TopAngleIsChecked = True
|
||||
SelectedShape = m_TopShapeList(1)
|
||||
@@ -2532,14 +2572,12 @@ Public Class Part
|
||||
If Index > FileContent.Count() - 1 Then Return -1
|
||||
sLine = RemoveComment(FileContent(Index))
|
||||
m_BottomType = m_BottomEdgeTypeList(0)
|
||||
Dim BottomType As String = GetValueWithKey(sLine, K_BOTTOM)
|
||||
' se vrsione 2 (20/04/2023) il tipo di bevel è inserito nella riga successiva con chaive K_TYPEEDGE
|
||||
nError = Index
|
||||
Dim BottomType As String = ManageProfileType(sLine, Index, nError, K_BOTTOM)
|
||||
If nError = -1 Then Return -1
|
||||
If String.IsNullOrWhiteSpace(BottomType) Then
|
||||
If Not SearchKey(sLine, K_BOTTOM) Then
|
||||
Return -1
|
||||
Else
|
||||
FirstReadingEdge = True
|
||||
sErrorMsg = String.Format(EgtMsg(50523), SIDE_BOTTOM)
|
||||
End If
|
||||
If ManageProfileError(sLine, K_BOTTOM, SIDE_BOTTOM) = -1 Then Return -1
|
||||
Else
|
||||
Try
|
||||
m_BottomType = BottomEdgeTypeList.First(Function(x) x.Name = BottomType)
|
||||
@@ -2584,12 +2622,52 @@ Public Class Part
|
||||
If String.IsNullOrWhiteSpace(BottomOverMaterial) Then
|
||||
If Not SearchKey(sLine, K_OVERMATERIAL) Then Return -1
|
||||
Else
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, BottomOverMaterial)
|
||||
m_BottomOverMaterial = BottomOverMaterial
|
||||
End If
|
||||
CalcBevelFromSecure()
|
||||
Return NextIndex(Index)
|
||||
End Function
|
||||
|
||||
Private Function ManageProfileType(ByRef sLine As String, ByRef Index As Integer, ByRef nError As Integer, sEdgeName As String) As String
|
||||
Dim sVal As String = String.Empty
|
||||
If m_Version = "2" Then
|
||||
If SearchKey(sLine, sEdgeName) Then
|
||||
' passo alla riga successiva
|
||||
Index = NextIndex(Index)
|
||||
If Index > FileContent.Count() - 1 Then Return -1
|
||||
sLine = RemoveComment(FileContent(Index))
|
||||
sVal = GetValueWithKey(sLine, K_TYPEEDGE)
|
||||
Else
|
||||
nError = -1
|
||||
Return sVal
|
||||
End If
|
||||
Else
|
||||
sVal = GetValueWithKey(sLine, sEdgeName)
|
||||
End If
|
||||
Return sVal
|
||||
End Function
|
||||
|
||||
Private Function ManageProfileError(sLine As String, sEdgeName As String, sMsgName As String) As Integer
|
||||
Dim nError As Integer = 0
|
||||
If m_Version = "2" Then
|
||||
If Not SearchKey(sLine, K_TYPEEDGE) Then
|
||||
Return -1
|
||||
Else
|
||||
FirstReadingEdge = True
|
||||
sErrorMsg = String.Format(EgtMsg(50523), sMsgName)
|
||||
End If
|
||||
Else
|
||||
If Not SearchKey(sLine, sEdgeName) Then
|
||||
Return -1
|
||||
Else
|
||||
FirstReadingEdge = True
|
||||
sErrorMsg = String.Format(EgtMsg(50523), sMsgName)
|
||||
End If
|
||||
End If
|
||||
Return nError
|
||||
End Function
|
||||
|
||||
' Leggo i dati del componente ( da senllire riutilizzando funzioni che già esistono)
|
||||
Private Function GetCompo(Index As Integer, CompoNameDDF As String, ByRef sErrorInfo As String) As Integer
|
||||
' Controllo esistenza del componente
|
||||
@@ -2849,7 +2927,7 @@ Public Class Part
|
||||
While IndexLine < FileContent.Count - 1 AndAlso
|
||||
Not (Search3Hyphens(RemoveComment(FileContent(IndexLine))) OrElse Search3Dots(RemoveComment(FileContent(IndexLine)))) AndAlso
|
||||
Not Trim(RemoveComment(FileContent(IndexLine))).StartsWith("- ") AndAlso
|
||||
RemoveComment(FileContent(IndexLine)).StartsWith(ConstCompo.DDF_SPACE3)
|
||||
(RemoveComment(FileContent(IndexLine)).StartsWith(ConstCompo.DDF_SPACE3) Or RemoveComment(FileContent(IndexLine)).StartsWith(ConstCompo.DDF_SPACE2))
|
||||
' salvo i commenti
|
||||
If String.IsNullOrWhiteSpace(FileContent(IndexLine)) Then
|
||||
IndexLine += 1
|
||||
@@ -2955,7 +3033,13 @@ Public Class Part
|
||||
Dim sVal As String = GetValueWithoutKey(sLine)
|
||||
' per ora non esegue nessun tipo di controllo sui valori letti dal file DDF
|
||||
' DirectCast(CurrCompoParam, TextBoxParam).m_Value = sVal
|
||||
DirectCast(CurrCompoParam, TextBoxParam).Value = sVal
|
||||
Dim Local_TextBoxParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
|
||||
If Local_TextBoxParam.bIsLen Then
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, sVal)
|
||||
Local_TextBoxParam.Value = sVal
|
||||
Else
|
||||
Local_TextBoxParam.Value = sVal
|
||||
End If
|
||||
' avviso che il file è modificato (in caso di chiusura del programma obbligo a passare dal salvataggio)
|
||||
Dim dVal As Double
|
||||
If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then
|
||||
@@ -3002,7 +3086,13 @@ Public Class Part
|
||||
If String.Equals(Trim(CompoTemplateItem.CompoParamList(IndexParam).DDFName), GetKey(sLine)) Then
|
||||
' se la stringa c'è nel DDF vuol dire che è stata selezionata
|
||||
Dim sVal As String = GetValueWithKey(sLine, Trim(CurrCompoParam.DDFName))
|
||||
DirectCast(CurrCompoParam, TextBoxOnOffParam).m_Value = sVal
|
||||
Dim Local_TextBoxOnOffParam As TextBoxOnOffParam = DirectCast(CurrCompoParam, TextBoxOnOffParam)
|
||||
If Local_TextBoxOnOffParam.bIsLen Then
|
||||
ConvertDDFValueIntoCurrentUnit(m_Measure, sVal)
|
||||
Local_TextBoxOnOffParam.m_Value = sVal
|
||||
Else
|
||||
Local_TextBoxOnOffParam.m_Value = sVal
|
||||
End If
|
||||
'DirectCast(CurrCompoParam, TextBoxOnOffParam).Value = sVal
|
||||
Dim dVal As Double
|
||||
If String.IsNullOrEmpty(sVal) OrElse Not StringToDouble(sVal, dVal) Then
|
||||
@@ -3059,6 +3149,7 @@ Public Class Part
|
||||
' assegno al parametro della compnente il valore "filtrato"
|
||||
DirectCast(CurrCompoParam, ComboBoxOnOffParam).SetSelItem(SelItem)
|
||||
'DirectCast(CurrCompoParam, ComboBoxOnOffParam).SelItem = SelItem
|
||||
DirectCast(CurrCompoParam, ComboBoxOnOffParam).SetIsActive(True)
|
||||
' se il nome esiste ma è sbagliato
|
||||
ElseIf Not String.IsNullOrWhiteSpace(GetKey(sLine)) Then
|
||||
' significa che la TextBoxOnOff è stata disattivata
|
||||
@@ -3118,8 +3209,8 @@ Public Class Part
|
||||
Return False
|
||||
End If
|
||||
' per riconoscere una componente: no spazi ad inizio riga, dopo i ":" riga vuota
|
||||
If FileContent(IndexLine) = FileContent(IndexLine).Trim AndAlso
|
||||
GetValueWithoutKey(FileContent(IndexLine)) = String.Empty Then
|
||||
If FileContent(IndexLine).StartsWith(OptionModule.m_sSpaceTabCompo) AndAlso
|
||||
GetValueWithoutKey(FileContent(IndexLine)) = String.Empty Then
|
||||
m_StopNextIndexLine = True
|
||||
Return True
|
||||
End If
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
<EgtDOORCreator:TrueToFalse x:Key="TrueToFalse"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid IsEnabled="{Binding EnablePageDoor}">
|
||||
<Grid Name="MainGrid" IsEnabled="{Binding EnablePageDoor}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="{Binding WidthColumn1}"/>
|
||||
<ColumnDefinition Width="{Binding WidthColumn2}"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Margin="0,0,0,0.2" Grid.Column="1" IsEnabled="{Binding IsReadOnly}">
|
||||
<Grid Margin="0,0,0,0.2" Grid.Column="{Binding GridGeneralDiposition}" IsEnabled="{Binding IsReadOnly}">
|
||||
<Grid.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
@@ -893,7 +893,7 @@
|
||||
</ListBox>
|
||||
|
||||
</Grid>
|
||||
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||
<ContentControl Name="MainContentConrol" Grid.Column="{Binding CompoPanelDiposition}" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||
<!--<EgtDOORCreator:CompoPanelV Grid.Column="0" DataContext="{Binding CompoPanelPartVM}"/>-->
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Public Class PartPageV
|
||||
|
||||
Public Sub ItemsControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||
Dim ListControl As ListBox=DirectCast(sender,listbox)
|
||||
If Not IsNothing( ListControl.SelectedItem) Then
|
||||
Dim ListControl As ListBox = DirectCast(sender, ListBox)
|
||||
If Not IsNothing(ListControl.SelectedItem) Then
|
||||
Dim SelectedItemIndex As Integer = ListControl.Items.IndexOf(ListControl.SelectedItem)
|
||||
If SelectedItemIndex < 0 Then Return
|
||||
ListControl.Dispatcher.BeginInvoke(DirectCast(Sub()
|
||||
@@ -30,4 +30,5 @@
|
||||
Private Sub UserControl_IsEnabledChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -73,6 +73,50 @@ Public Class PartPageVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "DISPOSITION SCREEN"
|
||||
|
||||
Public ReadOnly Property WidthColumn1 As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||
Return "1*"
|
||||
Else
|
||||
Return "5*"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property WidthColumn2 As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||
Return "5*"
|
||||
Else
|
||||
Return "1*"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GridGeneralDiposition As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||
Return "1"
|
||||
Else
|
||||
Return "0"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CompoPanelDiposition As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||
Return "0"
|
||||
Else
|
||||
Return "1"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Disposition Screen
|
||||
|
||||
#Region "CONSTUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
@@ -41,6 +41,8 @@ Public Module Doors
|
||||
Dim sExecName As String = String.Empty
|
||||
GetMainPrivateProfileString(S_DOORS, K_DDFEXEC, "", sExecName)
|
||||
sExecPath = IniFile.m_sDoorsDirPath & "\" & sExecName
|
||||
EgtLuaCreateGlobTable("DGD")
|
||||
EgtLuaSetGlobStringVar("DGD.BASEDIR", IniFile.m_sDoorsDirPath & "\")
|
||||
If Not EgtLuaExecFile(sExecPath) Then Return False
|
||||
' Setto variabili per quotatura Lua
|
||||
For Each HardwareDimension In Map.refDimensioningPanelVM.HardwareDimensionList
|
||||
|
||||
@@ -619,8 +619,8 @@
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtDOORCreator\EgtDOORCreatorR32.exe
|
||||
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtDOORCreator\EgtDOORCreatorD32.exe
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) C:\EgtProg\EgtDOORCreator\EgtDOORCreatorR32.exe
|
||||
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) C:\EgtProg\EgtDOORCreator\EgtDOORCreatorD32.exe
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
+76
-14
@@ -739,14 +739,16 @@ Public Class Hardware
|
||||
Dim nIsActiveMaterial As Integer = 3
|
||||
Dim bIsCurrentMaterial As Boolean = True
|
||||
StdTemplateGetPrivateProfileListMaterial(S_CHAPTER & ChapterIndex, K_MATERIAL, sMaterialList, nIsActiveMaterial)
|
||||
For Each ItemMaterial In sMaterialList
|
||||
bIsCurrentMaterial = False
|
||||
Dim ArrayItemMaterial As String() = ItemMaterial.Split("/"c)
|
||||
If Trim(ArrayItemMaterial(0)) = Trim(Map.refHardwarePageVM.GenericPart.SelectedMaterial.NameDDF) Then
|
||||
bIsCurrentMaterial = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'For Each ItemMaterial In sMaterialList
|
||||
' bIsCurrentMaterial = False
|
||||
' Dim ArrayItemMaterial As String() = ItemMaterial.Split("/"c)
|
||||
' If Trim(ArrayItemMaterial(0)) = Trim(Map.refHardwarePageVM.GenericPart.SelectedMaterial.NameDDF) Then
|
||||
' bIsCurrentMaterial = True
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
IsCurrentMaterial(sMaterialList, bIsCurrentMaterial)
|
||||
|
||||
If Not bIsCurrentMaterial And nIsActive <> 4 Then
|
||||
nIsActive = nIsActiveMaterial
|
||||
End If
|
||||
@@ -792,6 +794,18 @@ Public Class Hardware
|
||||
Dim NewParam As New CompoParam(m_HardwareGeneral.DDFName, m_HardwareGeneral.Name, Chapter)
|
||||
Dim sHelpParam As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_CHAPTER & ChapterIndex, "HelpParam" & ParamIndex, "", sHelpParam, m_StdTemplate)
|
||||
' verifico se il materiale corrente deve essere visualizzato in funzione del materiale associato al parametro
|
||||
Dim sMaterialParam As String = String.Empty
|
||||
Dim MaterialParamList As New List(Of String)
|
||||
Dim bIsCurrentMaterialParam As Boolean = True
|
||||
Dim sDefaultGhostValue As String = ""
|
||||
StdTemplateGetPrivateProfileListMaterialParam(S_CHAPTER & ChapterIndex, "MaterialParam" & ParamIndex, MaterialParamList, sDefaultGhostValue)
|
||||
IsCurrentMaterial(MaterialParamList, bIsCurrentMaterialParam)
|
||||
If Not bIsCurrentMaterialParam Then
|
||||
' trasformo il parametro in Ghost
|
||||
TrasformCurrParamInGhost(sParam, sDefaultGhostValue)
|
||||
End If
|
||||
|
||||
' leggo il tipo di parametro, se la lettura va a buon fine la carico
|
||||
If Chapter.ReadParamHardware(sParam, sHelpParam, NewParam, ErrorReading) Then Chapter.CompoParamList.Add(NewParam)
|
||||
If TypeOf NewParam Is TextBoxOnOffParam Then
|
||||
@@ -833,6 +847,29 @@ Public Class Hardware
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' recupera il l'elenco dei materiali indicati nella stringa e verifica se nell'elenco è presente il materiale attivo nella porta
|
||||
Private Sub IsCurrentMaterial(sMaterialList As List(Of String), ByRef bIsCurrentMaterial As Boolean)
|
||||
For Each ItemMaterial In sMaterialList
|
||||
bIsCurrentMaterial = False
|
||||
Dim ArrayItemMaterial As String() = ItemMaterial.Split("/"c)
|
||||
If Trim(ArrayItemMaterial(0)) = Trim(Map.refHardwarePageVM.GenericPart.SelectedMaterial.NameDDF) Then
|
||||
bIsCurrentMaterial = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub TrasformCurrParamInGhost(ByRef sParamLine As String, ByVal sDefaultValue As String)
|
||||
' separo la stringa
|
||||
Dim sItems As String() = sParamLine.Split(";"c)
|
||||
If sItems.Count > 2 Then
|
||||
sItems(0) = "Ghost"
|
||||
sItems(2) = sDefaultValue
|
||||
End If
|
||||
' riassemblo la stringa iniziale
|
||||
sParamLine = Trim(sItems(0)) & "; " & Trim(sItems(1)) & "; " & Trim(sItems(2))
|
||||
End Sub
|
||||
|
||||
' carico la liste dei nomi dei capitoli
|
||||
Private Function SetGroupChaptername(sName As String) As Boolean
|
||||
If m_GroupChapterName.Count = 0 Then m_GroupChapterName.Add(sName)
|
||||
@@ -988,6 +1025,10 @@ Public Class Hardware
|
||||
' caricamento dei dati del file lua
|
||||
Private Function FindParamTemplateInConfigList(sParam As String, sValue As String) As Boolean
|
||||
For IndexGroupChapters As Integer = 0 To m_GroupChapters.Count - 1
|
||||
' verifico che sia attivo il gruppo
|
||||
If Not m_GroupChapters(IndexGroupChapters).EnableChapter Then
|
||||
Continue For
|
||||
End If
|
||||
For IndexChapter As Integer = 0 To m_GroupChapters(IndexGroupChapters).CompoParamList.Count - 1
|
||||
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = sParam Then
|
||||
' ho trovato una corrispondenza tra il valore de file ini e quello lua in lettura
|
||||
@@ -1953,10 +1994,16 @@ Public Class Hardware
|
||||
End If
|
||||
|
||||
For IndexGroupChapters As Integer = 0 To m_GroupChapters.Count - 1
|
||||
' se il presente gruppo non è attivo passo al successivo (di default assegno "nil", in caso di uscita senza gruppo il valore
|
||||
If Not m_GroupChapters(IndexGroupChapters).EnableChapter Then
|
||||
sValue = " nil"
|
||||
Continue For
|
||||
End If
|
||||
For IndexChapter As Integer = 0 To m_GroupChapters(IndexGroupChapters).CompoParamList.Count - 1
|
||||
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = NameParam Then
|
||||
' verifico che il parametro da stampare sia abilitato alla stampa (altriementi NON scrivere nel file)
|
||||
If Not m_GroupChapters(IndexGroupChapters).IsActiveChapter Then sValue = " nil" : Return True
|
||||
|
||||
If TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxDGCParam Then
|
||||
Dim Text As TextBoxDGCParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxDGCParam)
|
||||
sValue = String.Empty
|
||||
@@ -2072,8 +2119,15 @@ Public Class Hardware
|
||||
End Select
|
||||
' se testo numerico, eseguo opportune conversioni per H,W e T
|
||||
sValue = ConvertFromDGD(Text.TypeVar, sValue)
|
||||
' se parametro spento
|
||||
If Not Text.IsActive Then sValue &= "; 0"
|
||||
' se parametro spento (Solo per capitolo DDF)
|
||||
If Not Text.IsActive Then
|
||||
If m_GroupChapters(IndexGroupChapters).TemplateDDFName = "DDF" Then
|
||||
sValue &= "; 0"
|
||||
Else
|
||||
' per inidicare di spegnere il valore deve essere restituito il valore " nill"
|
||||
sValue = " nil"
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxParam Then
|
||||
Dim Text As TextBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxParam)
|
||||
@@ -2143,13 +2197,21 @@ Public Class Hardware
|
||||
'-- attenzione a quando abbiamo da stampare delle stringhe! e non dei valori numerici
|
||||
Dim Text As ComboBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxOnOffParam)
|
||||
sValue = String.Empty
|
||||
If Not Text.IsActive Then sValue = " nil" : Return True
|
||||
For Index As Integer = 0 To Text.ItemList.Count - 1
|
||||
If Text.SelItem = Text.ItemList(Index) Then sValue = Text.ItemListDDF(Index) : Return True
|
||||
If Text.SelItem = Text.ItemList(Index) Then sValue = Text.ItemListDDF(Index)
|
||||
Next
|
||||
sValue = Text.SelItem
|
||||
If String.IsNullOrEmpty(sValue) Then
|
||||
sValue = Text.SelItem
|
||||
End If
|
||||
' se parametro spento
|
||||
If Not Text.IsActive Then sValue &= "; 0"
|
||||
If Not Text.IsActive Then
|
||||
If m_GroupChapters(IndexGroupChapters).TemplateDDFName = "DDF" Then
|
||||
sValue &= "; 0"
|
||||
Else
|
||||
' per inidicare di spegnere il valore deve essere restituito il valore " nill"
|
||||
sValue = " nil"
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
|
||||
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxParam Then
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<Grid IsEnabled="{Binding EnablePageHardware}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- Colonna dedicata alla lista dei bottoni -->
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="{Binding WidthColumn1}"/>
|
||||
<ColumnDefinition Width="{Binding WidthColumn2}"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
@@ -26,8 +26,9 @@
|
||||
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
</Grid.InputBindings>
|
||||
|
||||
<!-- La griglia che gestirà i parametri hardaware -->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- Deicata al general dell'hardware-->
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -858,9 +859,9 @@
|
||||
</Grid>
|
||||
|
||||
<!-- Elenco pulsanti Hardware -->
|
||||
<ContentControl Grid.Column="0" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||
<ContentControl Grid.Column="{Binding CompoPanelDiposition}" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||
|
||||
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="1" Grid.Row="1" Margin="0,0,2,0"/>
|
||||
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="1" Margin="0,0,2,0" />
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -93,6 +93,50 @@ Public Class HardwarePageVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "DISPOSITION SCREEN"
|
||||
|
||||
Public ReadOnly Property WidthColumn1 As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||
Return "1*"
|
||||
Else
|
||||
Return "5*"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property WidthColumn2 As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||
Return "5*"
|
||||
Else
|
||||
Return "1*"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GridGeneralDiposition As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||
Return "1"
|
||||
Else
|
||||
Return "0"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CompoPanelDiposition As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
|
||||
Return "0"
|
||||
Else
|
||||
Return "1"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Disposition Screen
|
||||
|
||||
#Region "MESSAGES"
|
||||
|
||||
Public ReadOnly Property GeneralMsg As String
|
||||
|
||||
+40
@@ -59,6 +59,8 @@ Friend Module IniFile
|
||||
Friend m_sListLabelCurrent As String = String.Empty
|
||||
' Path dell'eseguibile Cam5
|
||||
Friend m_sEgtCameEXEPath As String = String.Empty
|
||||
' Path LuaLibs Dir
|
||||
Friend m_sLuaLibsDir As String = String.Empty
|
||||
|
||||
' EgtDoorCreator.ini
|
||||
Public Function GetPrivateProfileLanguage(ByVal lpAppName As String, ByVal lpKeyName As String) As Language
|
||||
@@ -289,6 +291,27 @@ Friend Module IniFile
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' restituisce l'elenco dei materiali ed eventualmente il valore di default da associare al parametro Ghost che viene generato in sostituzione del parametro letto
|
||||
Public Function StdTemplateGetPrivateProfileListMaterialParam(ByVal lpAppName As String, ByVal lpKeyName As String, ByVal List As List(Of String), ByRef sDefaultParam As String) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
StdTemplateGetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||
If String.IsNullOrEmpty(sVal) Then Return False
|
||||
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||
' se la lista ha almeno due elementi
|
||||
If sItems.Count > 1 Then
|
||||
For Index = 0 To sItems.Count() - 2
|
||||
List.Add(Trim(sItems(Index)))
|
||||
Next
|
||||
End If
|
||||
' se la lista ha un solo elemento, oppure ha un solo elemento
|
||||
Dim LastItems As String() = sItems.Last.Split(";"c)
|
||||
List.Add(Trim(LastItems(0)))
|
||||
If LastItems.Count > 1 Then
|
||||
sDefaultParam = Trim(LastItems(1))
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Function StdTemplateGetPrivateProfileChapterName(ByVal lpAppName As String, ByVal lpKeyName As String, ByRef sValueLua As String, ByRef sValue As String) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
StdTemplateGetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||
@@ -341,6 +364,23 @@ Friend Module IniFile
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileCompoImage(IpAppName As String, IpKeyName As String, ByRef Image As String, CompoIniPath As String) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVal, CompoIniPath)
|
||||
Dim CurrDir As String = Path.GetDirectoryName(CompoIniPath)
|
||||
sVal = sVal.Trim
|
||||
If Not String.IsNullOrEmpty(sVal) AndAlso Not String.IsNullOrEmpty(CurrDir) Then
|
||||
sVal = CurrDir.Trim & "\" & sVal
|
||||
If File.Exists(sVal) Then
|
||||
Image = sVal
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileFolderName(IpAppName As String, IpKeyName As String, ByRef Name As String, CompoIniPath As String) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVal, CompoIniPath)
|
||||
|
||||
@@ -57,8 +57,8 @@ Friend Class MainWindowModel
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2406, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2406, 1, IniFile.m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2541, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2541, 1, IniFile.m_nKeyOptions)
|
||||
'Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
@@ -96,6 +96,7 @@ Friend Class MainWindowModel
|
||||
Dim sLuaLibsDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||
EgtSetLuaLibs(sLuaLibsDir)
|
||||
IniFile.m_sLuaLibsDir = sLuaLibsDir
|
||||
Dim sLuaBaseLib As String = String.Empty
|
||||
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||
EgtLuaRequire(sLuaBaseLib)
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="{Binding WidthColumn1}"/>
|
||||
<ColumnDefinition Width="{Binding WidthColumn2}"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -32,10 +32,11 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--<EgtDOORCreator:AssemblyManagerV Grid.Column="0" DataContext="{StaticResource AssemblyManagerVM}"/>-->
|
||||
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
|
||||
<ContentControl Grid.Column="0" Grid.Row="1" Content="{Binding PageControl}"/>
|
||||
<EgtDOORCreator:SceneManagerV Grid.Column="1" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>
|
||||
|
||||
<ContentControl Grid.Column="{Binding AssemblyManagerDisposition}" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
|
||||
<ContentControl Grid.Column="{Binding PageControlDisposition}" Grid.Row="1" Content="{Binding PageControl}"/>
|
||||
<!--<EgtDOORCreator:SceneManagerV Grid.Column="{Binding SceneManagerDiposition}" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>-->
|
||||
<!--<EgtDOORCreator:SceneManagerV Grid.Column="0" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>-->
|
||||
<ContentControl Grid.Column="{Binding SceneManagerDiposition}" Grid.RowSpan="2" Content="{Binding SceneManagerControl}"/>
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
@@ -77,6 +77,7 @@ Public Class MainWindowVM
|
||||
Private m_PartPage As PartPageV
|
||||
Private m_AssemblyPage As AssemblyPageV
|
||||
Private m_HardwarePage As HardwarePageV
|
||||
Private m_SceneManager As SceneManagerV
|
||||
|
||||
Private Watcher As FileSystemWatcher = New FileSystemWatcher(IniFile.m_CompoDir, "*" & LUA_EXTENSION)
|
||||
|
||||
@@ -128,6 +129,12 @@ Public Class MainWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SceneManagerControl As ContentControl
|
||||
Get
|
||||
Return m_SceneManager
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ProjectManagerControl As ContentControl
|
||||
Get
|
||||
If m_SelectedPage <> ListPageEnum.nHardwarePage then
|
||||
@@ -159,10 +166,67 @@ Public Class MainWindowVM
|
||||
m_HardwarePage.DataContext = New HardwarePageVM
|
||||
m_AssemblyManager = New AssemblyManagerV
|
||||
m_AssemblyManager.DataContext = New AssemblyManagerVM
|
||||
' inserisco la scena
|
||||
m_SceneManager = New SceneManagerV
|
||||
m_SceneManager.DataContext = New SceneManagerVM
|
||||
Dim OptionsPage As OptionsVM = OptionPage
|
||||
InitWatcher()
|
||||
End Sub
|
||||
|
||||
#Region "DISPOSITION SCREEN"
|
||||
|
||||
Public ReadOnly Property WidthColumn1 As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||
Return "5*"
|
||||
Else
|
||||
Return "6*"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property WidthColumn2 As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||
Return "6*"
|
||||
Else
|
||||
Return "5*"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property AssemblyManagerDisposition As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||
Return "1"
|
||||
Else
|
||||
Return "0"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PageControlDisposition As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||
Return "1"
|
||||
Else
|
||||
Return "0"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SceneManagerDiposition As String
|
||||
Get
|
||||
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
|
||||
Return "0"
|
||||
Else
|
||||
Return "1"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Disposition Screen
|
||||
|
||||
#Region "Methods"
|
||||
|
||||
Public Sub ShowErrorCompoLoad()
|
||||
|
||||
@@ -23,16 +23,16 @@ Imports System.Windows
|
||||
#Else
|
||||
#If DEBUG Then
|
||||
<Assembly: AssemblyTitle("EgtDOORCreator Debug 32 bit")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreatorD32.exe")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreatorD32.exe")>
|
||||
#Else
|
||||
<Assembly: AssemblyTitle("EgtDOORCreator Release 32 bit")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreatorR32.exe")>
|
||||
#End If
|
||||
#End If
|
||||
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtDOORCreator")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2021 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.6.1")>
|
||||
<Assembly: AssemblyVersion("2.5.4.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.4.1")>
|
||||
|
||||
@@ -11,6 +11,11 @@ Friend Module OptionModule
|
||||
Friend m_LanguageList As New ObservableCollection(Of Language)
|
||||
Friend m_SelectedLanguage As Language
|
||||
|
||||
' Elenco delle MTable disponibili nella configurazione corrente
|
||||
Friend m_MTableList As New ObservableCollection(Of MTable)
|
||||
Friend m_SelectedMTable As MTable
|
||||
Friend m_CurrentMachine As String = String.Empty
|
||||
|
||||
Friend m_OptionLauncherList As New List(Of String)
|
||||
Friend m_SelectedOptionLauncher As Integer = 0
|
||||
Friend m_bLauncherOpenOnce As Boolean = False
|
||||
@@ -25,6 +30,14 @@ Friend Module OptionModule
|
||||
Friend m_bBevelUp As Visibility
|
||||
Friend m_bBevelDown As Visibility
|
||||
|
||||
' Parametri per la scelta della versione di stampa ddf
|
||||
Friend m_sVersionDDF As String = "2"
|
||||
Friend m_sSpaceTabCompo As String = ""
|
||||
Friend m_sSpace1Tab As String = ConstCompo.DDF_SPACE3
|
||||
Friend m_sSpace2Tab As String = ConstCompo.DDF_SPACE5
|
||||
Friend m_sSpace3Tab As String = ConstCompo.DDF_SPACE5
|
||||
Friend m_sSpaceHype As String = ConstCompo.DDF_HYPHEN
|
||||
|
||||
Friend m_DisableInvertBevel As Visibility = Visibility.Collapsed
|
||||
|
||||
Friend m_DisableAddGeometry As Visibility = Visibility.Collapsed
|
||||
@@ -45,6 +58,8 @@ Friend Module OptionModule
|
||||
|
||||
Friend m_EnableBrowse As Boolean = False
|
||||
|
||||
Friend m_nDispostionScreen As Integer = 0
|
||||
|
||||
Friend Enum LauncherOpt As Integer
|
||||
Open_window = 0
|
||||
Open_last_project = 1
|
||||
@@ -227,11 +242,33 @@ Friend Module OptionModule
|
||||
OptionModule.ReadOnlyDDF = False
|
||||
End If
|
||||
|
||||
' valore indentazione programma
|
||||
Dim sVer As String = String.Empty
|
||||
If GetMainPrivateProfileString(S_GENERAL, K_DDFVERSION, "1", sVer) > 0 Then
|
||||
Dim sItem() As String = sVer.Split(";"c)
|
||||
m_sVersionDDF = sItem(0).Trim
|
||||
End If
|
||||
If m_sVersionDDF = "2" Then
|
||||
m_sSpaceTabCompo = ConstCompo.DDF_SPACE2
|
||||
m_sSpace1Tab = ConstCompo.DDF_SPACE2
|
||||
m_sSpace2Tab = ConstCompo.DDF_SPACE4
|
||||
m_sSpace3Tab = ConstCompo.DDF_SPACE6
|
||||
m_sSpaceHype = ConstCompo.DDF_HYPHEN_2
|
||||
End If
|
||||
|
||||
' imposto unità di misura per interfaccia utente
|
||||
m_bIsMmUnit = (GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
||||
EgtSetUiUnits(m_bIsMmUnit)
|
||||
m_SelectedMeasureUnit = m_MeasureUnitList(If(m_bIsMmUnit, 0, 1))
|
||||
|
||||
' leggo come deve essere visualizzato il programma
|
||||
Dim nDispositionScreen As Integer = GetMainPrivateProfileInt(S_GENERAL, "DispositionScreen", 0)
|
||||
If nDispositionScreen < 0 Or nDispositionScreen > 2 Then
|
||||
m_nDispostionScreen = 0
|
||||
Else
|
||||
m_nDispostionScreen = nDispositionScreen
|
||||
End If
|
||||
|
||||
' imposto tipo di avvio
|
||||
Dim nLauncher As Integer = GetMainPrivateProfileInt(S_LAUNCHERWINDOW, K_LAUNCHER, 0)
|
||||
m_SelectedOptionLauncher = (nLauncher Mod LoOpenOnce)
|
||||
@@ -391,6 +428,10 @@ Friend Module OptionModule
|
||||
DefaultGetMmUnits(ConstCompo.S_GENERALINI, ConstCompo.K_MMUNITSINI, IsMM)
|
||||
m_IsMM = IsMM
|
||||
|
||||
If GetCurrentMTableList() Then
|
||||
' abilito la modifica della MTbale solo se Debug superioere a 5
|
||||
End If
|
||||
|
||||
Dim Width As String = String.Empty
|
||||
DefaultGetPrivateProfileString(S_SIZE_INI, K_WIDTH_INI, "32", Width)
|
||||
Utility.ConvertCompoConfig(Width, 500)
|
||||
@@ -824,12 +865,17 @@ Friend Module OptionModule
|
||||
Friend Sub CreateNewPropertiesList(ByRef LocalPart As Part)
|
||||
If OptionModule.m_DisableProperties <> Visibility.Visible Then Return
|
||||
If OptionModule.m_MaterialList.Count > 0 Then
|
||||
LocalPart.SetMaterial(OptionModule.m_MaterialList(0))
|
||||
' assegno la proprietà di materiale
|
||||
If Not IsNothing(LocalPart.SelectedMaterial) Then
|
||||
LocalPart.SetMaterial(LocalPart.SelectedMaterial)
|
||||
Else
|
||||
LocalPart.SetMaterial(OptionModule.m_MaterialList(0))
|
||||
End If
|
||||
LocalPart.SetPropertiesList(OptionModule.m_MaterialList(0).PropertiesList)
|
||||
Return
|
||||
End If
|
||||
' configurazione senza materiali
|
||||
If LocalPart.PropertiesList.Count > 0 Then LocalPart.PropertiesList.Clear()
|
||||
' configurazione senza materiali
|
||||
If LocalPart.PropertiesList.Count > 0 Then LocalPart.PropertiesList.Clear()
|
||||
For Each Item In OptionModule.m_PropertList
|
||||
LocalPart.PropertiesList.Add(New PropertyItem(Item.Name, Item.GraphicName, Item.IsChecked))
|
||||
Next
|
||||
@@ -995,6 +1041,81 @@ Friend Module OptionModule
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function GetCurrentMTableList() As Boolean
|
||||
If String.IsNullOrEmpty(IniFile.m_sDoorsDirPath) Then Return False
|
||||
m_MTableList.Clear()
|
||||
Dim sMTableDir As String = IniFile.m_sDoorsDirPath & "\MTables"
|
||||
If Not Directory.Exists(sMTableDir) Then
|
||||
EgtOutLog("Directory " & "'" & sMTableDir & "'" & " not found.")
|
||||
Return False
|
||||
End If
|
||||
Dim Items As String() = Directory.GetFiles(sMTableDir)
|
||||
' recupero i file che hanno estemsione *.mtl
|
||||
For Each MTableFile As String In Items
|
||||
If MTableFile.EndsWith(".mtl") Then
|
||||
Dim sName As String = Path.GetFileNameWithoutExtension(MTableFile).ToLower
|
||||
Dim sPath As String = MTableFile
|
||||
Dim bIsValid As Boolean = True
|
||||
Dim ExcludeList As List(Of String) = GetExludeList()
|
||||
For Each ExcludedItem As String In ExcludeList
|
||||
If sName.ToLower.Contains(ExcludedItem) Then
|
||||
bIsValid = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bIsValid Then
|
||||
sName = Path.GetFileNameWithoutExtension(MTableFile)
|
||||
Dim LocalMTable As New MTable(sName.Trim, sPath.Trim)
|
||||
m_MTableList.Add(LocalMTable)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If m_MTableList.Count < 1 Then
|
||||
EgtOutLog("Not valid file in directory " & "'" & sMTableDir & "'" & ".")
|
||||
Return False
|
||||
End If
|
||||
' leggo il nome della MTable attiva
|
||||
Dim sSelectedMTable As String = String.Empty
|
||||
Dim nbSelected As Boolean = False
|
||||
If GetMainPrivateProfileString(S_DOORS, K_MTABLE, "", sSelectedMTable) <> 0 Then
|
||||
For Each ItemFile As MTable In m_MTableList
|
||||
If ItemFile.FilePath.ToLower = sSelectedMTable.Trim.ToLower Then
|
||||
m_SelectedMTable = ItemFile
|
||||
nbSelected = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not nbSelected Then m_SelectedMTable = m_MTableList(0)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function GetExludeList() As List(Of String)
|
||||
Dim LocalList As New List(Of String)
|
||||
Dim sVal As String = String.Empty
|
||||
GetMainPrivateProfileString(S_DOORS, "Exclude", "", sVal)
|
||||
Dim sItems As String() = sVal.Split(","c)
|
||||
For Each Item As String In sItems
|
||||
LocalList.Add(Item.Trim)
|
||||
Next
|
||||
Return LocalList
|
||||
End Function
|
||||
|
||||
Public Sub GetCurrentMachineInMTable()
|
||||
' aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
Dim sDir As String = IniFile.m_sDoorsDirPath.Replace("\", "/")
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", sDir)
|
||||
EgtLuaSetGlobStringVar("CCD.NewMTable", m_SelectedMTable.Name)
|
||||
' eseguo la funzione che esegue la scrittura delle variabili
|
||||
EgtLuaCallFunction("CCD.GetCurrentMachineInMTable")
|
||||
Dim sVal As String = ""
|
||||
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||
OptionModule.m_CurrentMachine = sVal
|
||||
EgtLuaResetGlobVar("CCD")
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
' Classe che identifica una lingua del programma con nome e path del file dei messaggi
|
||||
@@ -1027,3 +1148,33 @@ Public Class Language
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MTable
|
||||
|
||||
Private m_sName As String
|
||||
Private m_sFilePath As String
|
||||
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FilePath As String
|
||||
Get
|
||||
Return m_sFilePath
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sFilePath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String, sFilePath As String)
|
||||
Me.Name = sName
|
||||
Me.FilePath = sFilePath
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -5,12 +5,14 @@
|
||||
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
|
||||
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
||||
BorderBrush="{StaticResource EgaltechBlue1}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30"
|
||||
IsResizable="True" IsMovable="True"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="F1" Command="{Binding OptionGuideCmd}"/>
|
||||
<KeyBinding Key="Esc" Command="{Binding CloseOptionsCommand}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
|
||||
@@ -27,7 +29,7 @@
|
||||
<RowDefinition Height="6.7*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -253,6 +255,64 @@
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ConfigOption}" IsEnabled="{Binding EnableConfig}">
|
||||
<Grid Margin="3,3,3,3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="3.25*"/>
|
||||
<RowDefinition Height="3.0*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="{Binding ConfigMsg}" Grid.Row="0" Grid.ColumnSpan="4">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="125*"/>
|
||||
<ColumnDefinition Width="443*"/>
|
||||
<ColumnDefinition Width="147*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding ConfigDirectoryMsg}" Grid.Row="1" Grid.Column="0" Margin="2,10,5,5"
|
||||
Style="{StaticResource DoorParamsTxBl}" Grid.ColumnSpan="2"/>
|
||||
<TextBlock Text="{Binding BaseDir}" Grid.Row="1" Grid.Column="2" Margin="2,10,5,5"
|
||||
Style="{StaticResource DoorParamsTxBl}"/>
|
||||
<Button Content="{Binding ChangeConfigMsg}" Grid.Row="1" Grid.Column="3"
|
||||
Command="{Binding BrowseCommand}" Margin="5" MaxHeight="28"
|
||||
CommandParameter="ConfigDir"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Seclta della MTable-->
|
||||
<GroupBox Header="{Binding MTableMsg}" Grid.Row="1">
|
||||
<UniformGrid Rows="2">
|
||||
<ComboBox ItemsSource="{Binding MTableList, Mode=OneWay}"
|
||||
DisplayMemberPath="Name" SelectedItem="{Binding SelectedMTable}"
|
||||
Style="{StaticResource DoorParamsCmBx}"
|
||||
Margin="5,0,5,0"/>
|
||||
<TextBlock Text="{Binding MTableAdvertMsg}" TextWrapping="Wrap"
|
||||
TextAlignment="Center" Margin="5,0,5,0"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Seclta della MTable-->
|
||||
<GroupBox Header="{Binding CurrMachTitleMsg}" Grid.Row="1" Grid.Column="1">
|
||||
<UniformGrid Rows="1">
|
||||
<TextBlock Text="{Binding CurrentMachine}" TextWrapping="Wrap"
|
||||
TextAlignment="Center" VerticalAlignment="Center" FontWeight="Black" Margin="5,0,5,0"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<!--Impostazioni generali della porta-->
|
||||
@@ -327,7 +387,7 @@
|
||||
Margin="0,10,5,18"
|
||||
Style="{StaticResource DoorParamsChBx}" />
|
||||
|
||||
<TextBox Style="{StaticResource DoorParamsTxBx}"
|
||||
<TextBox Style="{StaticResource DoorParamsTxBx}"
|
||||
Grid.Column="0"
|
||||
Text="{Binding WeightValue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="5,5,10,13"
|
||||
|
||||
@@ -80,9 +80,25 @@ Public Class OptionsVM
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SelectedTabGeneral = value
|
||||
If m_SelectedTabGeneral = 2 Then
|
||||
OptionModule.GetCurrentMachineInMTable()
|
||||
NotifyPropertyChanged("CurrentMachine")
|
||||
m_OrigBaseDir = IniFile.m_sDoorsDirPath
|
||||
m_OrigMTable = OptionModule.m_SelectedMTable.Name
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_IsChangedConfig As Boolean = False
|
||||
Public ReadOnly Property IsChangedConfig As Boolean
|
||||
Get
|
||||
Return m_IsChangedConfig
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_OrigBaseDir As String = String.Empty
|
||||
Private m_OrigMTable As String = String.Empty
|
||||
|
||||
|
||||
#End Region ' Hardware_part
|
||||
|
||||
@@ -104,6 +120,68 @@ Public Class OptionsVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property EnableConfig As Boolean
|
||||
Get
|
||||
If GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) > 4 And File.Exists(IniFile.m_sConfigDir & "\ChangeConfig.lua") Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MTableList As ObservableCollection(Of MTable)
|
||||
Get
|
||||
Return OptionModule.m_MTableList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property SelectedMTable As MTable
|
||||
Get
|
||||
Return OptionModule.m_SelectedMTable
|
||||
End Get
|
||||
Set(value As MTable)
|
||||
If Not IsNothing(value) AndAlso value IsNot OptionModule.m_SelectedMTable Then
|
||||
OptionModule.m_SelectedMTable = value
|
||||
WriteMainPrivateProfileString(S_DOORS, K_MTABLE, OptionModule.m_SelectedMTable.FilePath)
|
||||
NotifyPropertyChanged("SelectedMTable")
|
||||
OptionModule.GetCurrentMachineInMTable()
|
||||
NotifyPropertyChanged("CurrentMachine")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property BaseDir As String
|
||||
Get
|
||||
Return IniFile.m_sDoorsDirPath
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value.Trim.ToLower <> IniFile.m_sDoorsDirPath.ToLower Then
|
||||
Dim sPreValue As String = IniFile.m_sDoorsDirPath
|
||||
IniFile.m_sDoorsDirPath = value
|
||||
If Not GetCurrentMTableList() Then
|
||||
MessageBox.Show("Currente directory '" & value & "' is not valid as BaseDir!", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
IniFile.m_sDoorsDirPath = sPreValue
|
||||
GetCurrentMTableList()
|
||||
End If
|
||||
WriteMainPrivateProfileString(S_DOORS, K_BASEDIR, IniFile.m_sDoorsDirPath)
|
||||
m_IsChangedConfig = True
|
||||
NotifyPropertyChanged("SelectedMTable")
|
||||
End If
|
||||
NotifyPropertyChanged("MTableList")
|
||||
NotifyPropertyChanged("ConfigDir")
|
||||
OptionModule.GetCurrentMachineInMTable()
|
||||
NotifyPropertyChanged("CurrentMachine")
|
||||
NotifyPropertyChanged("BaseDir")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CurrentMachine As String
|
||||
Get
|
||||
Return OptionModule.m_CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MeasureUnitList As List(Of String)
|
||||
Get
|
||||
Return OptionModule.m_MeasureUnitList
|
||||
@@ -116,6 +194,28 @@ Public Class OptionsVM
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value IsNot OptionModule.m_SelectedMeasureUnit Then
|
||||
|
||||
Dim sMessage As String = "The program will be shut down, do you want to proced?"
|
||||
Dim bRestartProgram As Boolean = EnableConfig
|
||||
If bRestartProgram Then
|
||||
sMessage = "The program will be restart, do you want to proced?"
|
||||
End If
|
||||
|
||||
' chiedo se desidera procedere con lo spegnimento del programma
|
||||
If MessageBox.Show(sMessage, "Warning", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation, MessageBoxResult.Cancel) = MessageBoxResult.OK Then
|
||||
' procedo alla chiusura del programma
|
||||
Map.refMainWindowVM.CloseApplication()
|
||||
If bRestartProgram Then Process.Start(Application.ResourceAssembly.Location)
|
||||
Else
|
||||
' esco senza salvare la selezione
|
||||
Return
|
||||
End If
|
||||
' sa la chiusura del porgramma è stata interotta
|
||||
If Map.refMainWindowVM.StopClosingApplication Then
|
||||
' esco senza salvare la selezione
|
||||
Return
|
||||
End If
|
||||
|
||||
OptionModule.m_bIsMmUnit = (value = OptionModule.m_MeasureUnitList(0))
|
||||
EgtSetUiUnits(OptionModule.m_bIsMmUnit)
|
||||
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, If(OptionModule.m_bIsMmUnit, "1", "0"))
|
||||
@@ -1112,9 +1212,9 @@ Public Class OptionsVM
|
||||
Public ReadOnly Property Title As String
|
||||
Get
|
||||
Dim sTitle As String = EgtMsg(MSG_MAINWINDOW + 209)
|
||||
If Map.refMainWindowVM.SelectedPage =MainWindowVM.ListPageEnum.nDDFPage then
|
||||
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage Then
|
||||
sTitle = "DOOR - " & sTitle
|
||||
else
|
||||
Else
|
||||
sTitle = "HARDWARE - " & sTitle
|
||||
End If
|
||||
Return sTitle
|
||||
@@ -1139,6 +1239,12 @@ Public Class OptionsVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MTableAdvertMsg As String
|
||||
Get
|
||||
Return "Going out this page the program will restart."
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MeasureUnit As String
|
||||
Get
|
||||
Return EgtMsg(50211)
|
||||
@@ -1322,7 +1428,7 @@ Public Class OptionsVM
|
||||
|
||||
Public ReadOnly Property MachMsg As String
|
||||
Get
|
||||
' Mach.
|
||||
' Mach.
|
||||
Return EgtMsg(50711)
|
||||
End Get
|
||||
End Property
|
||||
@@ -1352,20 +1458,56 @@ Public Class OptionsVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' TabMsg
|
||||
Public ReadOnly Property GeneralOption As String
|
||||
Get
|
||||
' 50729=General
|
||||
Return EgtMsg(50729)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GeneralCam As String
|
||||
Get
|
||||
' 50730=Report
|
||||
Return EgtMsg(50730)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ConfigOption As String
|
||||
Get
|
||||
Return "Config"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ChangeConfigMsg As String
|
||||
Get
|
||||
Return "Change config"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MTableMsg As String
|
||||
Get
|
||||
Return "MTable"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ConfigMsg As String
|
||||
Get
|
||||
Return "Door Config"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CurrMachTitleMsg As String
|
||||
Get
|
||||
Return "Current Machine"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ConfigDirectoryMsg As String
|
||||
Get
|
||||
Return "Directory"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' GenearlCamMsg
|
||||
Public ReadOnly Property ExtLineLenMsg As String
|
||||
Get
|
||||
' Estensione linea
|
||||
@@ -1524,14 +1666,14 @@ Public Class OptionsVM
|
||||
|
||||
Public ReadOnly Property LightUpMsg As String
|
||||
Get
|
||||
' Light Up
|
||||
' Light Up
|
||||
Return EgtMsg(50056)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LightLockMsg As String
|
||||
Get
|
||||
' Light Lock
|
||||
' Light Lock
|
||||
Return EgtMsg(50057)
|
||||
End Get
|
||||
End Property
|
||||
@@ -1724,10 +1866,17 @@ Public Class OptionsVM
|
||||
Return m_EnableAssembly
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
Dim sMessage As String = "The program will be shut down, do you want to proced?"
|
||||
Dim bRestartProgram As Boolean = EnableConfig
|
||||
If bRestartProgram Then
|
||||
sMessage = "The program will be restart, do you want to proced?"
|
||||
End If
|
||||
|
||||
' chiedo se desidera procedere con lo spegnimento del programma
|
||||
If MessageBox.Show("The program will be shut down, do you want to proced?", "Warning", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation, MessageBoxResult.Cancel) = MessageBoxResult.OK Then
|
||||
If MessageBox.Show(sMessage, "Warning", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation, MessageBoxResult.Cancel) = MessageBoxResult.OK Then
|
||||
' procedo alla chiusura del programma
|
||||
Map.refMainWindowVM.CloseApplication()
|
||||
If bRestartProgram Then Process.Start(Application.ResourceAssembly.Location)
|
||||
Else
|
||||
' esco senza salvare la selezione
|
||||
Return
|
||||
@@ -1883,10 +2032,10 @@ Public Class OptionsVM
|
||||
|
||||
Sub New()
|
||||
Map.SetRefOptionsVM(Me)
|
||||
If IsEnableHarwarePart then
|
||||
If IsEnableHarwarePart Then
|
||||
m_HardwarePartVM = New HardwarePartVM
|
||||
m_HardwarePartV = New HardwarePartV(m_HardwarePartVM)
|
||||
End if
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -1916,6 +2065,37 @@ Public Class OptionsVM
|
||||
OptionsWindow.Close()
|
||||
End If
|
||||
Next
|
||||
|
||||
If EnableConfig AndAlso m_IsChangedConfig Then
|
||||
' Se modifico il direttorio Compo: aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||
' eseguo la funzione che esegue la scrittura delle variabili
|
||||
EgtLuaCallFunction("CCD.ChangeConfigDirectory")
|
||||
Dim sVal As String = ""
|
||||
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||
OptionModule.m_CurrentMachine = sVal
|
||||
EgtLuaResetGlobVar("CCD")
|
||||
' chiudo il programma e lo riavvio
|
||||
Map.refMainWindowVM.CloseApplication()
|
||||
Process.Start(Application.ResourceAssembly.Location)
|
||||
'End If
|
||||
ElseIf EnableConfig AndAlso m_OrigMTable <> OptionModule.m_SelectedMTable.Name Then
|
||||
' aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||
' eseguo la funzione che esegue la scrittura delle variabili
|
||||
EgtLuaCallFunction("CCD.ChangeConfigDirectory")
|
||||
Dim sVal As String = ""
|
||||
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||
OptionModule.m_CurrentMachine = sVal
|
||||
EgtLuaResetGlobVar("CCD")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' CloseOptionsCommand
|
||||
@@ -1959,6 +2139,15 @@ Public Class OptionsVM
|
||||
Return
|
||||
End If
|
||||
TemplateDir = FolderBrowserDialog.SelectedPath
|
||||
Case "ConfigDir"
|
||||
Dim FolderBrowserDialog As New System.Windows.Forms.FolderBrowserDialog
|
||||
FolderBrowserDialog.SelectedPath = IniFile.m_sDoorsDirPath
|
||||
' mostriamo la finestra di dialogo aperta fino alla directory MyProjects
|
||||
If FolderBrowserDialog.ShowDialog <> Forms.DialogResult.OK Then
|
||||
' se la risposta è diversa da OK esce
|
||||
Return
|
||||
End If
|
||||
BaseDir = FolderBrowserDialog.SelectedPath
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
+18
-2
@@ -4,6 +4,8 @@ Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module RegexFunction
|
||||
Friend sCurrVersionDoor As String = "1"
|
||||
|
||||
' restituisce vero se trova il capitoletto [Graphic parameters]
|
||||
Friend Function IsGraphicParametersTitle(sLine As String) As Boolean
|
||||
Return Regex.Match(sLine, "\s*--\s*(\[Graphic parameters\])\s*$").Groups(1).Value = "[Graphic parameters]"
|
||||
@@ -88,13 +90,21 @@ Module RegexFunction
|
||||
Dim sErrorMsg As String = String.Format(EgtMsg(50196), ConfigurationCompo)
|
||||
MessageBox.Show(sErrorMsg, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
' se abilitata la modifica delle configurazioni cambio messaggio e disabilito la chiusura del programma
|
||||
If Map.refOptionsVM.EnableConfig Then
|
||||
Dim sWarningMsg As String = String.Format("The current ddf configuration ({0}) is different from the current program configuration ({1})", ConfigurationCompo, Path.GetFileName(IniFile.m_sDoorsDirPath), vbCrLf)
|
||||
MessageBox.Show(sWarningMsg, "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Part.LastPartName = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
||||
Return True
|
||||
End If
|
||||
|
||||
Dim MsgBoxResult As MessageBoxResult = MessageBoxResult.No
|
||||
' 50195=The current ddf configuration ({0}) is different from the current program configuration ({1}).
|
||||
Dim sWarningMas As String = String.Format(EgtMsg(50195), ConfigurationCompo, Path.GetFileName(IniFile.m_sDoorsDirPath), vbCrLf)
|
||||
MsgBoxResult = MessageBox.Show(sWarningMas, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||
If MsgBoxResult = MessageBoxResult.Yes Then
|
||||
' Imposto nuova configurazione
|
||||
WriteMainPrivateProfileString("Doors", "BaseDir", sConfCompoPath)
|
||||
WriteMainPrivateProfileString(S_DOORS, K_BASEDIR, sConfCompoPath)
|
||||
' Imposto progetto corrente
|
||||
WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LASTPROJECT, Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name)
|
||||
' Imposto apertura automatica al prossimo avvio
|
||||
@@ -208,8 +218,14 @@ Module RegexFunction
|
||||
|
||||
' Restituisce il nome che precede i due punti (tutti i caratteri dall'inizio della stringa)
|
||||
Friend Function GetName(sLine As String) As String
|
||||
' La versione deve essere impostata in fase di lettura della porta
|
||||
Dim sTmp As String = RemoveComment(sLine)
|
||||
If String.IsNullOrWhiteSpace(sTmp) OrElse Char.IsWhiteSpace(sTmp, 0) Then Return ""
|
||||
If sCurrVersionDoor = "2" Then
|
||||
If String.IsNullOrWhiteSpace(sTmp) OrElse sTmp.StartsWith(OptionModule.m_sSpaceHype) OrElse sTmp.StartsWith(OptionModule.m_sSpace3Tab) Then Return ""
|
||||
Else
|
||||
If String.IsNullOrWhiteSpace(sTmp) OrElse Char.IsWhiteSpace(sTmp, 0) Then Return ""
|
||||
End If
|
||||
Dim sString As String = Regex.Match(RemoveComment(sLine), "\s*(.*?\b)\s*:.*").Groups(1).Value
|
||||
Return Regex.Match(RemoveComment(sLine), "\s*(.*?\b)\s*:.*").Groups(1).Value
|
||||
End Function
|
||||
|
||||
|
||||
@@ -109,7 +109,8 @@ Public Class SceneManagerVM
|
||||
' Creazione scena
|
||||
PreInitializeScene()
|
||||
' Se tutto bene
|
||||
If m_ProjectScene.Init() And (IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 Then
|
||||
If m_ProjectScene.Init() And ((IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 OrElse
|
||||
(Not (IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 AndAlso (IniFile.m_nKeyOptions And KEY_OPT.READ_ONLY) <> 0)) Then
|
||||
EgtSetCurrentContext(m_ProjectScene.GetCtx)
|
||||
PostInitializeScene()
|
||||
m_ProjectScene.SetStatusNull()
|
||||
|
||||
+49
-11
@@ -43,14 +43,14 @@ Public Module Utility
|
||||
Dim sLockFile As String = GenerateLockFileName(CurrDirectory, CurrFile)
|
||||
Dim bIsLocked As Boolean = False
|
||||
Dim FileList As String() = Directory.GetFiles(CurrDirectory)
|
||||
|
||||
|
||||
' recurpero il nome del primo file bloccato nel direttorio corrente (se non è specificato un file)
|
||||
If String.IsNullOrEmpty(CurrFile) then
|
||||
Try
|
||||
If String.IsNullOrEmpty(CurrFile) Then
|
||||
Try
|
||||
sLockFile = FileList.First(Function(x) x.EndsWith(LCK_EXTENSION))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
If File.Exists(sLockFile) Then
|
||||
Try
|
||||
@@ -104,9 +104,9 @@ Public Module Utility
|
||||
m_CurrLockFile = GenerateLockFileName(CurrDirectory, CurrFile)
|
||||
m_StopSaving = False
|
||||
'If VerifyFileLocked(CurrDirectory, CurrFile) Then Return False
|
||||
If Not IsNothing(Map.refMainWindowVM.AssemblyManagerControl) then
|
||||
If Not IsNothing(Map.refMainWindowVM.AssemblyManagerControl) Then
|
||||
Map.refMainWindowVM.AssemblyManagerControl.Visibility = Visibility.Visible
|
||||
End If
|
||||
End If
|
||||
Try
|
||||
Dim NomeUtente As String = Environment.MachineName & "/" & Environment.UserName
|
||||
File.WriteAllText(m_CurrLockFile, NomeUtente, New System.Text.UTF8Encoding(False))
|
||||
@@ -358,6 +358,22 @@ Public Module Utility
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function DirectInchesToMm(ByRef sMeasure As String) As Boolean
|
||||
Dim dVal As Double = 0.0
|
||||
If Not StringToDouble(sMeasure, dVal) Then Return False
|
||||
dVal = dVal * ONEINCH
|
||||
sMeasure = DoubleToString(dVal, 3)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function DirectMmToInches(ByRef sMeasure As String) As Boolean
|
||||
Dim dVal As Double = 0.0
|
||||
If Not StringToDouble(sMeasure, dVal) Then Return False
|
||||
dVal = dVal / ONEINCH
|
||||
sMeasure = DoubleToString(dVal, 4)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ConvertCurrentUnitMeasure(ByRef sMeasure As String) As Boolean
|
||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
|
||||
' non eseguo nessun tipo di conversione
|
||||
@@ -388,10 +404,10 @@ Public Module Utility
|
||||
' conevrsione in lettura dei valori delle textbox nel DoorCreator/HardwareManager
|
||||
Friend Function ConvertCompoConfig(ByRef sItems As String, ByRef dControlValue As Double) As Boolean
|
||||
Dim dDefaultValue As Double = 0
|
||||
If sItems.Contains("$") then
|
||||
If sItems.Contains("$") Then
|
||||
sItems = "$"
|
||||
Return true
|
||||
end
|
||||
Return True
|
||||
End
|
||||
End If
|
||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And Not OptionModule.m_IsMM Then
|
||||
' Concordi = Inches
|
||||
@@ -453,6 +469,28 @@ Public Module Utility
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function ConvertDDFValueIntoCurrentUnit(sCurrUnitDDF As String, ByRef sValue As String) As Boolean
|
||||
Dim bCurrUnitDDFIsMM As Boolean = ConvertStringToMmUnits(sCurrUnitDDF)
|
||||
Dim dDefaultValue As Double = 0
|
||||
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And Not bCurrUnitDDFIsMM Then
|
||||
' non eseguo cenversione: Concordi = Inches
|
||||
Return True
|
||||
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And bCurrUnitDDFIsMM Then
|
||||
' eseguo conversione: Discordi= MM → Inches
|
||||
DirectMmToInches(sValue)
|
||||
'InchesToMm(sValue)
|
||||
Return True
|
||||
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.MM And Not bCurrUnitDDFIsMM Then
|
||||
' eseguo conversione: Discordi= Inches → MM
|
||||
DirectInchesToMm(sValue)
|
||||
Return True
|
||||
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.MM And bCurrUnitDDFIsMM Then
|
||||
' non eseguo cenversione: Concordi = MM
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Converte il valore Boolean in una stringa ON/OFF (attributo machining)
|
||||
Friend Function ConvertBooleanToOnOff(bValue As Boolean) As String
|
||||
Return If(bValue, DDF_ON, DDF_OFF)
|
||||
@@ -468,9 +506,9 @@ Public Module Utility
|
||||
End Function
|
||||
|
||||
Friend Function ConvertStringToMmUnits(sUnit As String) As Boolean
|
||||
If Trim(sUnit) = ConstGen.MM Then
|
||||
If Trim(sUnit).ToLower = ConstGen.MM.ToLower Then
|
||||
Return True
|
||||
ElseIf Trim(sUnit) = ConstGen.VAL_INCHES Then
|
||||
ElseIf Trim(sUnit).ToLower = ConstGen.VAL_INCHES.ToLower Then
|
||||
Return False
|
||||
Else
|
||||
Return OptionModule.m_bIsMmUnit
|
||||
|
||||
Reference in New Issue
Block a user