Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 52461712a8 | |||
| a814b83e87 | |||
| 316374761d | |||
| a53f9ff352 | |||
| 5d32bb9ddf | |||
| 8006b66a01 | |||
| a97f84f49b | |||
| 98a16e0828 | |||
| e4390636fe | |||
| faa6bd2b8c | |||
| dd8be77fb5 | |||
| 301ec52bf3 | |||
| ee5a14a8f8 | |||
| dbc2b88e51 | |||
| 11a270febf | |||
| 03f8312a3d | |||
| 61310b1579 | |||
| ac9f8354cc | |||
| 1d65a311f3 | |||
| 3fb5e636bf | |||
| 621bd11b3d |
+8
-3
@@ -9,10 +9,15 @@ Class Application
|
|||||||
MyBase.OnStartup(e)
|
MyBase.OnStartup(e)
|
||||||
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||||
' Creo la View principale
|
' Creo la View principale
|
||||||
Me.MainWindow = New MainWindowV
|
Me.MainWindow = New MainWindowV(e.Args)
|
||||||
System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(Me.MainWindow)
|
System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(Me.MainWindow)
|
||||||
' Mostro la View principale
|
If OptionModule.AdjustDDT Then
|
||||||
Me.MainWindow.Show()
|
Me.MainWindow.Hide()
|
||||||
|
Else
|
||||||
|
Me.MainWindow.Show()
|
||||||
|
End If
|
||||||
|
'' Mostro la View principale
|
||||||
|
'Me.MainWindow.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1058,6 +1058,8 @@ Public Class Assembly
|
|||||||
If Not File.Exists(sPathDDF) Then
|
If Not File.Exists(sPathDDF) Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
' verifico se il file è un template
|
||||||
|
Dim bIsTemplate As Boolean = (Path.GetExtension(sPathDDF).ToLower = ".ddt")
|
||||||
ReadAssembly.FileContent = File.ReadAllLines(sPathDDF)
|
ReadAssembly.FileContent = File.ReadAllLines(sPathDDF)
|
||||||
' se il file esiste ma è vuoto
|
' se il file esiste ma è vuoto
|
||||||
If ReadAssembly.FileContent.Count = 0 Then
|
If ReadAssembly.FileContent.Count = 0 Then
|
||||||
@@ -1080,7 +1082,7 @@ Public Class Assembly
|
|||||||
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
||||||
Else
|
Else
|
||||||
Map.refSceneManagerVM.EnableRefresh = False
|
Map.refSceneManagerVM.EnableRefresh = False
|
||||||
If ReadAssembly.GetDDFDoor(IndexLine, sErrorInfo) = -1 Then
|
If ReadAssembly.GetDDFDoor(IndexLine, sErrorInfo, bIsTemplate) = -1 Then
|
||||||
' errore nella lettura di un part: blocco tutto
|
' errore nella lettura di un part: blocco tutto
|
||||||
ReadAssembly = Nothing
|
ReadAssembly = Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = False
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = False
|
||||||
@@ -1468,10 +1470,11 @@ Public Class Assembly
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
' dopo la lettura delle informazioni dell'assemblato
|
' dopo la lettura delle informazioni dell'assemblato
|
||||||
Private Function GetDDFDoor(IndexLine As Integer, ByRef sErrorInfo As String) As Integer
|
Private Function GetDDFDoor(IndexLine As Integer, ByRef sErrorInfo As String, Optional ByVal bIsTemplate As Boolean = False) As Integer
|
||||||
Dim Line As Integer = IndexLine
|
Dim Line As Integer = IndexLine
|
||||||
While Line < FileContent.Count - 1 AndAlso Not Search3Dots(FileContent(Line))
|
While Line < FileContent.Count - 1 AndAlso Not Search3Dots(FileContent(Line))
|
||||||
Dim Local_PartDoor As New PartDoor
|
Dim Local_PartDoor As New PartDoor
|
||||||
|
Local_PartDoor.IsTemplate = bIsTemplate
|
||||||
Dim Local_Door As New Part(Local_PartDoor)
|
Dim Local_Door As New Part(Local_PartDoor)
|
||||||
' carcio la liste delle propiretà
|
' carcio la liste delle propiretà
|
||||||
'CreateNewPropertiesList(Local_Door.PropertiesList, Local_Door.SelectedMaterial)
|
'CreateNewPropertiesList(Local_Door.PropertiesList, Local_Door.SelectedMaterial)
|
||||||
|
|||||||
@@ -7,6 +7,16 @@ Imports EgtWPFLib5
|
|||||||
Public Class PartDoor
|
Public Class PartDoor
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_IsTemplate As Boolean = False
|
||||||
|
Public Property IsTemplate As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsTemplate
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_IsTemplate = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_Door As Part
|
Private m_Door As Part
|
||||||
Public Property Door As Part
|
Public Property Door As Part
|
||||||
Get
|
Get
|
||||||
|
|||||||
@@ -981,6 +981,12 @@ Public Class AssemblyManagerVM
|
|||||||
OpenedAssName.IsModified = Part.FirstReadingEdge
|
OpenedAssName.IsModified = Part.FirstReadingEdge
|
||||||
If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then
|
If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then
|
||||||
DdfFile.WriteDDFPart(OpenedAssName.SelAssembly.ListPartDoor(0).Door, sTempFile, True, False)
|
DdfFile.WriteDDFPart(OpenedAssName.SelAssembly.ListPartDoor(0).Door, sTempFile, True, False)
|
||||||
|
If OptionModule.AdjustDDT Then
|
||||||
|
DdfFile.WriteDDFPart(OpenedAssName.SelAssembly.ListPartDoor(0).Door, OptionModule.SaveFileNameFromArgs, True, False)
|
||||||
|
' TERMINO TUTTO SUBITO
|
||||||
|
BlindProgLog("Scrittura file '.ddf' terminata")
|
||||||
|
End
|
||||||
|
End If
|
||||||
' aggiorno elenco quotature
|
' aggiorno elenco quotature
|
||||||
Map.refDimensioningPanelVM.LoadHardwareDimList()
|
Map.refDimensioningPanelVM.LoadHardwareDimList()
|
||||||
ExecDoors(Map.refSceneManagerVM.ProjectScene, sTempFile, False)
|
ExecDoors(Map.refSceneManagerVM.ProjectScene, sTempFile, False)
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ Module ConstIni
|
|||||||
Public Const K_DDFFUNCTION As String = "DdfFun"
|
Public Const K_DDFFUNCTION As String = "DdfFun"
|
||||||
Public Const K_MYPROJECTDIR As String = "ProjectDirectory"
|
Public Const K_MYPROJECTDIR As String = "ProjectDirectory"
|
||||||
Public Const K_TEMPLATEDIR As String = "TemplateDirectory"
|
Public Const K_TEMPLATEDIR As String = "TemplateDirectory"
|
||||||
Public Const K_MACHINDIR As String = "MachinDirectory"
|
' Correzione nome Chiave valore ver 2.6k2 "MachineDirectory"
|
||||||
|
Public Const K_MACHINDIR As String = "MachineDirectory"
|
||||||
Public Const K_MTABLE As String = "MTable"
|
Public Const K_MTABLE As String = "MTable"
|
||||||
|
|
||||||
Public Const S_REPORT As String = "Report"
|
Public Const S_REPORT As String = "Report"
|
||||||
|
|||||||
+27
-5
@@ -10,11 +10,7 @@ Module Modified
|
|||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
|
||||||
If Not IsNothing(Map.refPartPageVM) AndAlso Not IsNothing(Map.refPartPageVM.CurrPart) Then
|
If Not IsNothing(Map.refPartPageVM) AndAlso Not IsNothing(Map.refPartPageVM.CurrPart) Then
|
||||||
For Each Compo In Map.refPartPageVM.CurrPart.CompoList
|
For Each Compo In Map.refPartPageVM.CurrPart.CompoList
|
||||||
Compo.BorderColor = DirectCast(New BrushConverter().ConvertFrom("#DCDCDC"), SolidColorBrush)
|
Compo.ResetMark()
|
||||||
Compo.BackGroundColor = DirectCast(New BrushConverter().ConvertFrom("#FFFFFF"), SolidColorBrush)
|
|
||||||
Compo.Foreground = DirectCast(New BrushConverter().ConvertFrom("#000000"), SolidColorBrush)
|
|
||||||
Compo.BorderThickness = 1
|
|
||||||
Compo.FontBold = FontWeights.Normal
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -111,6 +107,32 @@ Public Class Compo
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Sub ResetMark()
|
||||||
|
m_BorderColor = DirectCast(New BrushConverter().ConvertFrom("#DCDCDC"), SolidColorBrush)
|
||||||
|
m_BackGroundColor = Brushes.White
|
||||||
|
m_Foreground = Brushes.Black
|
||||||
|
m_BorderThickness = 1
|
||||||
|
m_FontBold = FontWeights.Normal
|
||||||
|
NotifyPropertyChanged("BorderColor")
|
||||||
|
NotifyPropertyChanged("BackGroundColor")
|
||||||
|
NotifyPropertyChanged("Foreground")
|
||||||
|
NotifyPropertyChanged("BorderThickness")
|
||||||
|
NotifyPropertyChanged("FontBold")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SetMark()
|
||||||
|
m_BorderColor = Brushes.DeepPink
|
||||||
|
m_BackGroundColor = Brushes.White
|
||||||
|
m_Foreground = Brushes.Gold
|
||||||
|
m_BorderThickness = 2
|
||||||
|
m_FontBold = FontWeights.Bold
|
||||||
|
NotifyPropertyChanged("BorderColor")
|
||||||
|
NotifyPropertyChanged("BackGroundColor")
|
||||||
|
NotifyPropertyChanged("Foreground")
|
||||||
|
NotifyPropertyChanged("BorderThickness")
|
||||||
|
NotifyPropertyChanged("FontBold")
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Colori GroupBox
|
#End Region ' Colori GroupBox
|
||||||
|
|
||||||
#Region "CompoRef"
|
#Region "CompoRef"
|
||||||
|
|||||||
+22
-5
@@ -1509,7 +1509,7 @@ Public Class Part
|
|||||||
|
|
||||||
#Region "Selection compo"
|
#Region "Selection compo"
|
||||||
|
|
||||||
Private Sub ResetAllMark()
|
Public Sub ResetAllMark()
|
||||||
Dim nIdFirstPart As Integer = EgtGetFirstPart()
|
Dim nIdFirstPart As Integer = EgtGetFirstPart()
|
||||||
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
|
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
|
||||||
While nIdLay <> GDB_ID.NULL
|
While nIdLay <> GDB_ID.NULL
|
||||||
@@ -1517,6 +1517,9 @@ Public Class Part
|
|||||||
nIdLay = EgtGetNextLayer(nIdLay)
|
nIdLay = EgtGetNextLayer(nIdLay)
|
||||||
End While
|
End While
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
For Each ItemCompo As Compo In CompoList
|
||||||
|
ItemCompo.ResetMark()
|
||||||
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MarkCompoInScena()
|
Private Sub MarkCompoInScena()
|
||||||
@@ -1532,7 +1535,7 @@ Public Class Part
|
|||||||
' ontengo la posizione prevista nella grafica
|
' ontengo la posizione prevista nella grafica
|
||||||
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, m_SelCompo)
|
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, m_SelCompo)
|
||||||
' recupero la lista ordinata
|
' recupero la lista ordinata
|
||||||
Dim sCompoName As String = m_SelCompo.SelFile
|
Dim sCompoName As String = m_SelCompo.TemplateSelItem
|
||||||
' recupero il primo part disponibile
|
' recupero il primo part disponibile
|
||||||
Dim nIdFirstPart As Integer = EgtGetFirstPart()
|
Dim nIdFirstPart As Integer = EgtGetFirstPart()
|
||||||
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
|
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
|
||||||
@@ -1540,11 +1543,12 @@ Public Class Part
|
|||||||
While nIdLay <> GDB_ID.NULL
|
While nIdLay <> GDB_ID.NULL
|
||||||
Dim sInfoPath As String = String.Empty
|
Dim sInfoPath As String = String.Empty
|
||||||
If EgtGetInfo(nIdLay, "Path", sInfoPath) Then
|
If EgtGetInfo(nIdLay, "Path", sInfoPath) Then
|
||||||
Dim sNamePath As String = Path.GetFileNameWithoutExtension(sInfoPath)
|
Dim sNamePath As String = sInfoPath
|
||||||
If sNamePath = sCompoName And IndexLay = IndexInList Then
|
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
|
||||||
EgtSetMark(nIdLay)
|
EgtSetMark(nIdLay)
|
||||||
|
m_SelCompo.SetMark()
|
||||||
Exit While
|
Exit While
|
||||||
ElseIf sNamePath = sCompoName And IndexLay < IndexInList Then
|
ElseIf sNamePath.Contains(sCompoName) And IndexLay < IndexInList Then
|
||||||
IndexLay = IndexLay + 1
|
IndexLay = IndexLay + 1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2034,6 +2038,9 @@ Public Class Part
|
|||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
Dim sLine As String = RemoveComment(FileContent(Index))
|
Dim sLine As String = RemoveComment(FileContent(Index))
|
||||||
Dim Width As String = GetValueWithKey(sLine, K_WIDTH)
|
Dim Width As String = GetValueWithKey(sLine, K_WIDTH)
|
||||||
|
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT Then
|
||||||
|
Width = OptionModule.m_Width
|
||||||
|
End If
|
||||||
If String.IsNullOrWhiteSpace(Width) Then
|
If String.IsNullOrWhiteSpace(Width) Then
|
||||||
If Not SearchKey(sLine, K_WIDTH) Then Return -1
|
If Not SearchKey(sLine, K_WIDTH) Then Return -1
|
||||||
' altrimenti
|
' altrimenti
|
||||||
@@ -2051,6 +2058,9 @@ Public Class Part
|
|||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
sLine = RemoveComment(FileContent(Index))
|
sLine = RemoveComment(FileContent(Index))
|
||||||
Dim Height As String = GetValueWithKey(sLine, K_HEIGHT)
|
Dim Height As String = GetValueWithKey(sLine, K_HEIGHT)
|
||||||
|
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT Then
|
||||||
|
Height = OptionModule.m_Height
|
||||||
|
End If
|
||||||
If String.IsNullOrWhiteSpace(Height) Then
|
If String.IsNullOrWhiteSpace(Height) Then
|
||||||
If Not SearchKey(sLine, K_HEIGHT) Then Return -1
|
If Not SearchKey(sLine, K_HEIGHT) Then Return -1
|
||||||
' altrimenti
|
' altrimenti
|
||||||
@@ -2068,6 +2078,9 @@ Public Class Part
|
|||||||
If Index > FileContent.Count() - 1 Then Return -1
|
If Index > FileContent.Count() - 1 Then Return -1
|
||||||
sLine = RemoveComment(FileContent(Index))
|
sLine = RemoveComment(FileContent(Index))
|
||||||
Dim Thickness As String = GetValueWithKey(sLine, K_THICKNESS)
|
Dim Thickness As String = GetValueWithKey(sLine, K_THICKNESS)
|
||||||
|
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT Then
|
||||||
|
Thickness = OptionModule.m_Thickness
|
||||||
|
End If
|
||||||
If String.IsNullOrWhiteSpace(Thickness) Then
|
If String.IsNullOrWhiteSpace(Thickness) Then
|
||||||
If Not SearchKey(sLine, K_THICKNESS) Then Return -1
|
If Not SearchKey(sLine, K_THICKNESS) Then Return -1
|
||||||
' altrimenti
|
' altrimenti
|
||||||
@@ -2159,6 +2172,10 @@ Public Class Part
|
|||||||
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_SWING_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_SWING_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
Else
|
Else
|
||||||
' carico il valore nella porta corrente
|
' carico il valore nella porta corrente
|
||||||
|
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT AndAlso Not String.IsNullOrEmpty(OptionModule.ForcesSideSwing) Then
|
||||||
|
Swing = Swing.Remove(0, 1)
|
||||||
|
Swing = OptionModule.ForcesSideSwing & Swing
|
||||||
|
End If
|
||||||
m_Swing = Swing
|
m_Swing = Swing
|
||||||
OptionModule.SetCurrSwing(m_SwingAlias, m_Swing)
|
OptionModule.SetCurrSwing(m_SwingAlias, m_Swing)
|
||||||
If IsNothing(m_SwingAlias) Then Return -1
|
If IsNothing(m_SwingAlias) Then Return -1
|
||||||
|
|||||||
+10
-12
@@ -1,19 +1,17 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="GuideV"
|
<EgtWPFLib5:EgtCustomWindow x:Class="GuideV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
|
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
|
||||||
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
TitleBarBrush="{StaticResource EgaltechBlue1}"
|
||||||
BorderBrush="{StaticResource EgaltechBlue1}"
|
BorderBrush="{StaticResource EgaltechBlue1}"
|
||||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||||
IsMinimizable="True" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
IsMinimizable="True" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||||
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||||
Height="800" Width="1500">
|
Height="800" Width="1500">
|
||||||
|
|
||||||
|
|
||||||
<DockPanel Margin="5">
|
<DockPanel Margin="5">
|
||||||
<WebBrowser x:Name="DoorBrowser"/>
|
<WebBrowser x:Name="DoorBrowser"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
</EgtWPFLib5:EgtCustomWindow>
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ Public Class GuideV
|
|||||||
Dim sHelpDir As String = String.Empty
|
Dim sHelpDir As String = String.Empty
|
||||||
If OptionModule.m_SmartHelp = HelpPage.LocalHost Then
|
If OptionModule.m_SmartHelp = HelpPage.LocalHost Then
|
||||||
sHelpDir = IniFile.m_sHelpDir.Replace("C:", "file://127.0.0.1/c$")
|
sHelpDir = IniFile.m_sHelpDir.Replace("C:", "file://127.0.0.1/c$")
|
||||||
DoorBrowser.Navigate(New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html"))
|
DoorBrowser.Source = New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")
|
||||||
ElseIf OptionModule.m_SmartHelp = HelpPage.WebBrowserVB Then
|
ElseIf OptionModule.m_SmartHelp = HelpPage.WebBrowserVB Then
|
||||||
sHelpDir = IniFile.m_sHelpDir
|
sHelpDir = IniFile.m_sHelpDir
|
||||||
DoorBrowser.Navigate(New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html"))
|
DoorBrowser.Source = New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")
|
||||||
Else
|
Else
|
||||||
sHelpDir = IniFile.m_sHelpDir
|
sHelpDir = IniFile.m_sHelpDir
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ Friend Class MainWindowModel
|
|||||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||||
|
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2609, 1, IniFile.m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2612, 1, IniFile.m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(3279, 2609, 1, IniFile.m_nKeyOptions)
|
EgtGetKeyOptions(3279, 2612, 1, IniFile.m_nKeyOptions)
|
||||||
'Inizializzazione generale di EgtInterface
|
'Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
|
|||||||
@@ -2,8 +2,24 @@
|
|||||||
|
|
||||||
Class MainWindowV
|
Class MainWindowV
|
||||||
|
|
||||||
|
Private m_args() As String = Nothing
|
||||||
|
|
||||||
#Region "EVENTS"
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Public Sub New(args As String())
|
||||||
|
|
||||||
|
' La chiamata è richiesta dalla finestra di progettazione.
|
||||||
|
InitializeComponent()
|
||||||
|
' Per leggere più argomenti devono essere scritti ognuno tra doppi apici e separati da spazio
|
||||||
|
' Esempio:"Argomento 1 di prova" "Argomento 2 di prova"
|
||||||
|
If args.Length > 0 Then
|
||||||
|
m_args = args
|
||||||
|
RunBlindCode()
|
||||||
|
End If
|
||||||
|
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
' Carico e imposto posizione finestra
|
' Carico e imposto posizione finestra
|
||||||
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
|
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
|
||||||
@@ -11,10 +27,7 @@ Class MainWindowV
|
|||||||
|
|
||||||
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||||
' se è assente la chiave di protezione non mostro la finestra Launcher
|
' se è assente la chiave di protezione non mostro la finestra Launcher
|
||||||
If Map.refSceneManagerVM.bProtectKey Then
|
RunBlindCode()
|
||||||
Map.refMainWindowVM.SetLauncher()
|
|
||||||
Map.refMainWindowVM.ShowErrorCompoLoad()
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MainWindowV_Unloaded(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
|
Private Sub MainWindowV_Unloaded(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||||
@@ -26,4 +39,50 @@ Class MainWindowV
|
|||||||
|
|
||||||
#End Region ' EVENTS
|
#End Region ' EVENTS
|
||||||
|
|
||||||
|
Private Sub RunBlindCode()
|
||||||
|
If Map.refSceneManagerVM.bProtectKey Then
|
||||||
|
ReadArgs()
|
||||||
|
Map.refMainWindowVM.SetLauncher()
|
||||||
|
Map.refMainWindowVM.ShowErrorCompoLoad()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Lettura degli argomenti e scrittura di un file di Log con i parametri caricati
|
||||||
|
Private Sub ReadArgs()
|
||||||
|
If Not IsNothing(m_args) Then
|
||||||
|
StartBlinProgdLog(IniFile.m_sTempDir & "\BlindProgLog.txt")
|
||||||
|
' leggo gli argomenti: Il programma si chiude appena termina la scrittura del file DDF
|
||||||
|
Dim Items() As String = m_args(0).Split(";"c)
|
||||||
|
If Items.Length >= 5 Then
|
||||||
|
' Avvio progetto - LauncherOpt.Open_last_project (1)
|
||||||
|
OptionModule.m_bLauncherOpenOnce = True
|
||||||
|
' Indico il percorso del file
|
||||||
|
OptionModule.FileNameFromArgs = Items(0)
|
||||||
|
BlindProgLog(" File '.ddt' input : " & OptionModule.FileNameFromArgs)
|
||||||
|
' Assegno i valore Width, Height, Thickness
|
||||||
|
OptionModule.m_Width = Items(1)
|
||||||
|
BlindProgLog(" width : " & OptionModule.m_Width)
|
||||||
|
OptionModule.m_Height = Items(2)
|
||||||
|
BlindProgLog(" height : " & OptionModule.m_Height)
|
||||||
|
OptionModule.m_Thickness = Items(3)
|
||||||
|
BlindProgLog(" thickness : " & OptionModule.m_Thickness)
|
||||||
|
' Indico il percoso di salvataggio file DDF
|
||||||
|
OptionModule.SaveFileNameFromArgs = Items(4)
|
||||||
|
BlindProgLog(" File '.ddf' output : " & OptionModule.SaveFileNameFromArgs)
|
||||||
|
' Nuovo parametro da laggere per gestione Swing
|
||||||
|
If Items.Length = 6 Then
|
||||||
|
OptionModule.ForcesSideSwing = Items(5)
|
||||||
|
BlindProgLog(" swing : " & OptionModule.ForcesSideSwing)
|
||||||
|
End If
|
||||||
|
' abilito lettura dati
|
||||||
|
OptionModule.AdjustDDT = True
|
||||||
|
Else
|
||||||
|
' blocco lettura dati
|
||||||
|
OptionModule.AdjustDDT = False
|
||||||
|
' TERMINO TUTTO SUBITO!
|
||||||
|
End
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -67,7 +67,9 @@ Public Class MainWindowVM
|
|||||||
Set(value As ListPageEnum)
|
Set(value As ListPageEnum)
|
||||||
m_SelectedPage = value
|
m_SelectedPage = value
|
||||||
NotifyPropertyChanged("PageControl")
|
NotifyPropertyChanged("PageControl")
|
||||||
Map.refInstrumentPanelVM.NotifyPropertyChanged("DimensionVisibility")
|
If Not IsNothing(Map.refInstrumentPanelVM) Then
|
||||||
|
Map.refInstrumentPanelVM.NotifyPropertyChanged("DimensionVisibility")
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -366,6 +368,10 @@ Public Class MainWindowVM
|
|||||||
Case LauncherOpt.Open_last_project
|
Case LauncherOpt.Open_last_project
|
||||||
' se definito ultimo progetto, lo apro
|
' se definito ultimo progetto, lo apro
|
||||||
If GetMainPrivateProfileString(S_LAUNCHERWINDOW, K_LASTPROJECT, "", m_sLastProject) > 0 Then
|
If GetMainPrivateProfileString(S_LAUNCHERWINDOW, K_LASTPROJECT, "", m_sLastProject) > 0 Then
|
||||||
|
' se caricato il nome in avvio del programma allora sovrascrivo
|
||||||
|
If OptionModule.AdjustDDT Then
|
||||||
|
m_sLastProject = OptionModule.FileNameFromArgs
|
||||||
|
End If
|
||||||
Map.refProjectManagerVM.OpenLastProject()
|
Map.refProjectManagerVM.OpenLastProject()
|
||||||
End If
|
End If
|
||||||
Case Else
|
Case Else
|
||||||
|
|||||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.6.9.1")>
|
<Assembly: AssemblyVersion("2.6.12.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.6.9.1")>
|
<Assembly: AssemblyFileVersion("2.6.12.1")>
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ Friend Module OptionModule
|
|||||||
' flag per modalità di visualizzazione file (solo lettura)
|
' flag per modalità di visualizzazione file (solo lettura)
|
||||||
Friend ReadOnlyDDF As Boolean = False
|
Friend ReadOnlyDDF As Boolean = False
|
||||||
|
|
||||||
|
' flag per forzare l'aggiornamento delle dimensioni anta dei file DDT
|
||||||
|
Friend AdjustDDT As Boolean = False
|
||||||
|
Friend FileNameFromArgs As String = String.Empty
|
||||||
|
Friend SaveFileNameFromArgs As String = String.Empty
|
||||||
|
' Forza la scrittura dello swing Left(L..) oppure Right(R..)
|
||||||
|
Friend ForcesSideSwing As String = String.Empty
|
||||||
|
|
||||||
' Parametri che contengono lista delle lingue disponibili e lingua selezionata
|
' Parametri che contengono lista delle lingue disponibili e lingua selezionata
|
||||||
Friend m_LanguageList As New ObservableCollection(Of Language)
|
Friend m_LanguageList As New ObservableCollection(Of Language)
|
||||||
Friend m_SelectedLanguage As Language
|
Friend m_SelectedLanguage As Language
|
||||||
|
|||||||
+14
-10
@@ -66,10 +66,18 @@ Public Class OrderVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Function VerifyNotIsNothing() As Boolean
|
||||||
|
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) OrElse
|
||||||
|
IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly) OrElse
|
||||||
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Property Customer As String
|
Public Property Customer As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Customer
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Customer
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -83,8 +91,7 @@ Public Class OrderVM
|
|||||||
|
|
||||||
Public Property Elevation As String
|
Public Property Elevation As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Elevation
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Elevation
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -98,8 +105,7 @@ Public Class OrderVM
|
|||||||
|
|
||||||
Public Property Project As String
|
Public Property Project As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Project
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Project
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -113,8 +119,7 @@ Public Class OrderVM
|
|||||||
|
|
||||||
Public Property PO As String
|
Public Property PO As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.PO
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.PO
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -128,8 +133,7 @@ Public Class OrderVM
|
|||||||
|
|
||||||
Public Property Line As String
|
Public Property Line As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
|
If Not VerifyNotIsNothing() Then Return Nothing
|
||||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
|
|
||||||
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Line
|
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Line
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
|
|||||||
@@ -687,8 +687,8 @@ Public Class ProjectManagerVM
|
|||||||
fd.InitialDirectory = IniFile.m_MyProjectDir
|
fd.InitialDirectory = IniFile.m_MyProjectDir
|
||||||
End If
|
End If
|
||||||
' seleziono il filtro di apertura
|
' seleziono il filtro di apertura
|
||||||
fd.Filter = "(*.ddt) |*.ddt|(*.ddf) |*.ddf"
|
fd.Filter = "(*.ddf) |*.ddf|(*.ddt) |*.ddt"
|
||||||
fd.FilterIndex = 2
|
fd.FilterIndex = GetCurrentFilter()
|
||||||
fd.RestoreDirectory = True
|
fd.RestoreDirectory = True
|
||||||
' apro la finestra di dialogo
|
' apro la finestra di dialogo
|
||||||
If fd.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then
|
If fd.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then
|
||||||
@@ -703,6 +703,8 @@ Public Class ProjectManagerVM
|
|||||||
sFilePath = Path.GetDirectoryName(fd.FileName)
|
sFilePath = Path.GetDirectoryName(fd.FileName)
|
||||||
' salvo il nome completo del file
|
' salvo il nome completo del file
|
||||||
sFilePathComplete = fd.FileName
|
sFilePathComplete = fd.FileName
|
||||||
|
' salvo l'estensione dell'ultimo progetto aperto
|
||||||
|
WriteMainPrivateProfileString("General", "LastExtensionOpened", Path.GetExtension(fd.FileName))
|
||||||
' se esiste un file in lettura con questo nome allora blocco tutto
|
' se esiste un file in lettura con questo nome allora blocco tutto
|
||||||
If Utility.IsFileLocked(sFilePath, Path.GetFileNameWithoutExtension(sFilePathComplete)) Then
|
If Utility.IsFileLocked(sFilePath, Path.GetFileNameWithoutExtension(sFilePathComplete)) Then
|
||||||
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||||
@@ -846,6 +848,21 @@ Public Class ProjectManagerVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function GetCurrentFilter() As Integer
|
||||||
|
Dim nFilter As Integer = 1
|
||||||
|
Dim sExt As String = String.Empty
|
||||||
|
GetMainPrivateProfileString("General", "LastExtensionOpened", "ddf", sExt)
|
||||||
|
sExt = sExt.Replace("."c, "")
|
||||||
|
sExt = sExt.Trim
|
||||||
|
Select Case sExt
|
||||||
|
Case = "ddf"
|
||||||
|
nFilter = 1
|
||||||
|
Case = "ddt"
|
||||||
|
nFilter = 2
|
||||||
|
End Select
|
||||||
|
Return nFilter
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' OpenCommand
|
#End Region ' OpenCommand
|
||||||
|
|
||||||
#Region "OpenMruFileCommand"
|
#Region "OpenMruFileCommand"
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ Public Class SceneManagerVM
|
|||||||
' Chiudo il programma
|
' Chiudo il programma
|
||||||
End
|
End
|
||||||
End If
|
End If
|
||||||
Return m_ProjectSceneHost
|
Return m_ProjectSceneHost
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -346,7 +346,7 @@ Public Class SceneManagerVM
|
|||||||
ElseIf Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage Then
|
ElseIf Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage Then
|
||||||
If Not EnableRefresh Then Return
|
If Not EnableRefresh Then Return
|
||||||
' Verifico esista elemento selezionato
|
' Verifico esista elemento selezionato
|
||||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) orelse IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then Return
|
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) OrElse IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then Return
|
||||||
DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, sTempFile, True)
|
DdfFile.WriteDDFAssembly(Map.refAssemblyPageVM.CurrAssembly, sTempFile, True)
|
||||||
ExecDoors(m_ProjectScene, sTempFile, False)
|
ExecDoors(m_ProjectScene, sTempFile, False)
|
||||||
' mantengo i layer accesi
|
' mantengo i layer accesi
|
||||||
@@ -435,6 +435,104 @@ Public Class SceneManagerVM
|
|||||||
|
|
||||||
#End Region ' Command
|
#End Region ' Command
|
||||||
|
|
||||||
|
#Region "EVENT Scene"
|
||||||
|
|
||||||
|
Private Sub MouseMoveOverScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_ProjectScene.OnMouseMoveScene
|
||||||
|
' Se non abilitata l'evidenziazione dei compo allora esco
|
||||||
|
If GetMainPrivateProfileInt(S_GENERAL, "MarkCompo", 0) = 0 Then Return
|
||||||
|
' se non esiste una porta corrente allora esco
|
||||||
|
If IsNothing(Map.refPartPageVM) OrElse IsNothing(Map.refPartPageVM.CurrPart) Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim LocalCompoList As ObservableCollection(Of Compo) = Map.refPartPageVM.CurrPart.CompoList
|
||||||
|
' Ripulisco la scena da i Mark
|
||||||
|
Map.refPartPageVM.CurrPart.ResetAllMark()
|
||||||
|
' Se la lista dei componenti è vuota allora esco
|
||||||
|
If Map.refPartPageVM.CurrPart.CompoList.Count < 1 Then Return
|
||||||
|
' Ricavo il punto corrente in coordinate mondo
|
||||||
|
Dim ptCurr As Point3d
|
||||||
|
EgtUnProjectPoint(e.Location, ptCurr)
|
||||||
|
' Verifico se selezionato curva
|
||||||
|
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||||
|
Dim nSel As Integer
|
||||||
|
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||||
|
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nId) = GDB_TY.CRV_COMPO Or EgtGetType(nId) = GDB_TY.CRV_ARC Or EgtGetType(nId) = GDB_TY.CRV_LINE Then
|
||||||
|
Dim nIdParent As Integer = EgtGetParent(nId)
|
||||||
|
Dim sNameLayer As String = String.Empty
|
||||||
|
EgtGetName(nIdParent, sNameLayer)
|
||||||
|
If Not sNameLayer.StartsWith("AUX") Or Not sNameLayer.StartsWith("SOLID") Or Not sNameLayer.StartsWith("DIM") Then
|
||||||
|
' scorro l'elenco dei componenti fino a trovare un riscontro tra i nomi e i parametri
|
||||||
|
For Each ItemCompo As Compo In LocalCompoList
|
||||||
|
If MatchCompoFromScena(nIdParent, ItemCompo, LocalCompoList) Then Exit While
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Passo al successivo
|
||||||
|
nId = EgtGetNextObjInSelWin()
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function MatchCompoFromScena(nIdLay As Integer, CurrCompo As Compo, CompoList As ObservableCollection(Of Compo)) As Boolean
|
||||||
|
If IsNothing(CurrCompo) Then Return True
|
||||||
|
' recupero la lista dei compo dello stesso tipo
|
||||||
|
Dim TempList As ObservableCollection(Of Compo) = DdfFile.GetCurrentListSameCompoType(CompoList, CurrCompo.CompoType.DDFName)
|
||||||
|
' recupero la lista dei compo con lo stesso nome
|
||||||
|
TempList = DdfFile.GetCurrentListSameCompoDDFName(TempList, CurrCompo.SelFile, CurrCompo.SelBrandPart)
|
||||||
|
' riordino la lista appena trovata secondo le regole di stampa DDF
|
||||||
|
DdfFile.GetOrderedListSameCompo(TempList)
|
||||||
|
' ottengo la posizione prevista nella grafica
|
||||||
|
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, CurrCompo)
|
||||||
|
' recupero la lista ordinata
|
||||||
|
Dim sCompoName As String = CurrCompo.TemplateSelItem
|
||||||
|
' oridnamento del layer
|
||||||
|
Dim IndexLay As Integer = -1
|
||||||
|
' recupero il nome della comaponente selezionata con MouseOver
|
||||||
|
Dim sInfoPath As String = String.Empty
|
||||||
|
If Not EgtGetInfo(nIdLay, "Path", sInfoPath) Then Return True
|
||||||
|
' Dim sNamePath As String = Path.GetFileNameWithoutExtension(sInfoPath)
|
||||||
|
Dim sNamePath As String = sInfoPath
|
||||||
|
'If sNamePath = sCompoName Then
|
||||||
|
If sNamePath.Contains(sCompoName) Then
|
||||||
|
Dim nCurrLayId As Integer = nIdLay
|
||||||
|
Dim nCounter As Integer = 1
|
||||||
|
While nCurrLayId <> GDB_ID.NULL
|
||||||
|
nCurrLayId = EgtGetNext(nCurrLayId)
|
||||||
|
Dim LocalsPath As String = String.Empty
|
||||||
|
If EgtGetInfo(nCurrLayId, "Path", LocalsPath) Then
|
||||||
|
If sNamePath.Trim = LocalsPath.Trim Then
|
||||||
|
nCounter += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
IndexLay = TempList.Count - nCounter
|
||||||
|
End If
|
||||||
|
' la compo passata non ha lo stesso nome, quindi mi aspetto un'altra compo
|
||||||
|
If IndexLay = -1 Then Return False
|
||||||
|
|
||||||
|
While IndexInList < TempList.Count And nIdLay <> GDB_ID.NULL
|
||||||
|
' recupero l'ordinamento del layer
|
||||||
|
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
|
||||||
|
EgtSetMark(nIdLay)
|
||||||
|
' evidenzio la compo corrente
|
||||||
|
TempList(IndexInList).SetMark()
|
||||||
|
EgtDraw()
|
||||||
|
' ricerca terminata correttamente
|
||||||
|
Return True
|
||||||
|
Exit While
|
||||||
|
ElseIf sNamePath.Contains(sCompoName) And IndexInList < IndexLay Then
|
||||||
|
IndexInList += 1
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
' prova con un'altra compo
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' Event scene
|
||||||
|
|
||||||
Public Sub ComposeAssembly(nAssembl As Integer)
|
Public Sub ComposeAssembly(nAssembl As Integer)
|
||||||
If Not File.Exists(IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua") Then
|
If Not File.Exists(IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua") Then
|
||||||
EgtOutLog("SetUp error: SetUp configuration file (" & IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua)" & " doesn't exist ")
|
EgtOutLog("SetUp error: SetUp configuration file (" & IniFile.m_sDoorsDirPath & "\" & "Main_Assemb.lua)" & " doesn't exist ")
|
||||||
|
|||||||
+26
@@ -22,6 +22,10 @@ Public Module Utility
|
|||||||
|
|
||||||
' CurrFile deve arrivare già senza estensione!
|
' CurrFile deve arrivare già senza estensione!
|
||||||
Private Function GenerateLockFileName(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "") As String
|
Private Function GenerateLockFileName(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "") As String
|
||||||
|
' Se in modalità Modifica file DDT allora non bloccare il file
|
||||||
|
If OptionModule.AdjustDDT Then
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
If OptionModule.ReadOnlyDDF Then
|
If OptionModule.ReadOnlyDDF Then
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End If
|
End If
|
||||||
@@ -703,6 +707,28 @@ Public Module Utility
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "Create Log"
|
||||||
|
Private sFileBlindProgLog As System.IO.StreamWriter
|
||||||
|
Private sFilePath As String = String.Empty
|
||||||
|
|
||||||
|
Public Sub StartBlinProgdLog(sPath As String)
|
||||||
|
sFilePath = sPath
|
||||||
|
sFileBlindProgLog = New System.IO.StreamWriter(sPath, True)
|
||||||
|
Dim sInfoStart As String = Date.Now.ToString & " Avvio programma in cieco"
|
||||||
|
sInfoStart &= vbCrLf & My.Application.Info.Version.Major.ToString() & "." & My.Application.Info.Version.Minor.ToString() &
|
||||||
|
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() & My.Application.Info.Version.Revision.ToString()
|
||||||
|
sFileBlindProgLog.WriteLine(sInfoStart)
|
||||||
|
sFileBlindProgLog.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub BlindProgLog(sMsg As String)
|
||||||
|
sFileBlindProgLog = File.AppendText(sFilePath)
|
||||||
|
sFileBlindProgLog.WriteLine(sMsg)
|
||||||
|
sFileBlindProgLog.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|
||||||
Public Class CompoBrandDir
|
Public Class CompoBrandDir
|
||||||
|
|||||||
Reference in New Issue
Block a user