Compare commits

..

23 Commits

Author SHA1 Message Date
Demetrio Cassarino 52461712a8 -modificato webbrouse da navigate a source 2024-12-09 15:31:38 +01:00
Demetrio Cassarino a814b83e87 -migliorata gestion customer 2024-12-09 11:32:29 +01:00
Nicola Pievani 316374761d Gestione Swing e miglioramenti avvio in cieco 2024-12-02 12:00:26 +01:00
Nicola Pievani a53f9ff352 Correzione stringa costanti 2024-11-25 17:58:35 +01:00
Nicola Pievani 5d32bb9ddf Migliorata gestione evidenziazione compo 2024-11-25 15:39:26 +01:00
Nicola Pievani 8006b66a01 Merge commit 'a97f84f49b32e3e9e2153ad583bfe2bd2814bb31' 2024-11-20 13:05:31 +01:00
Nicola Pievani a97f84f49b Cambio versione 2024-11-20 13:04:58 +01:00
Nicola Pievani 98a16e0828 Aggiunto messaggio di log 2024-11-20 12:48:56 +01:00
Nicola Pievani e4390636fe Creazione Log per programma avviato in cieco 2024-11-20 12:38:10 +01:00
Nicola Pievani faa6bd2b8c Migliorata gestione seleziona da scena 2024-11-19 16:37:46 +01:00
Nicola Pievani dd8be77fb5 Merge commit '301ec52bf3225311f9098b0083c7f24e3f3330e7' 2024-11-19 11:53:44 +01:00
Nicola Pievani 301ec52bf3 Cambio colore bordo in evidenza 2024-11-19 11:53:00 +01:00
Nicola Pievani ee5a14a8f8 Salvataggio ultima estensione aperta, evidenzio da scena 2024-11-19 11:52:15 +01:00
Nicola Pievani dbc2b88e51 Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtDOORCreator 2024-11-18 18:11:20 +01:00
Nicola Pievani 11a270febf Merge commit '03f8312a3ddf9dd052fedcf091590d304af2b180' 2024-11-18 18:10:59 +01:00
Nicola Pievani 03f8312a3d Merge commit '22941facd28769d1f963eb15f5887f92a9d633bd' into NicolaP 2024-11-18 18:10:29 +01:00
Dario Sassi 61310b1579 Merge commit 'ac9f8354cc14656222fc701c1f1b91f80761ca46' 2024-10-10 19:17:58 +02:00
Nicola Pievani ac9f8354cc Geastione avvio programma in cieco 2024-10-07 19:48:54 +02:00
Nicola Pievani 1d65a311f3 Correzione salvataggio dati da Args 2024-10-04 15:21:33 +02:00
Nicola Pievani 3fb5e636bf Se fallisce lettura Args termino tutto subito 2024-10-04 13:40:13 +02:00
Nicola Pievani 22941facd2 Merge commit '90a898f25aedc4232808a9ae5b3221c9e4d12961' 2024-09-16 12:57:19 +02:00
Nicola Pievani ef29a33418 Merge commit 'ab097ff0f029674cafbddc5925f84d4d0420019f' 2024-08-30 14:48:29 +02:00
Nicola Pievani 68ccdd17bd Merge branch 'NicolaP' 2024-08-06 12:35:12 +02:00
16 changed files with 282 additions and 73 deletions
+7 -2
View File
@@ -11,8 +11,13 @@ Class Application
' Creo la View principale
Me.MainWindow = New MainWindowV(e.Args)
System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(Me.MainWindow)
' Mostro la View principale
Me.MainWindow.Show()
If OptionModule.AdjustDDT Then
Me.MainWindow.Hide()
Else
Me.MainWindow.Show()
End If
'' Mostro la View principale
'Me.MainWindow.Show()
End Sub
End Class
+2
View File
@@ -983,6 +983,8 @@ Public Class AssemblyManagerVM
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
+2 -1
View File
@@ -90,7 +90,8 @@ Module ConstIni
Public Const K_DDFFUNCTION As String = "DdfFun"
Public Const K_MYPROJECTDIR As String = "ProjectDirectory"
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 S_REPORT As String = "Report"
+27 -5
View File
@@ -10,11 +10,7 @@ Module Modified
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
If Not IsNothing(Map.refPartPageVM) AndAlso Not IsNothing(Map.refPartPageVM.CurrPart) Then
For Each Compo In Map.refPartPageVM.CurrPart.CompoList
Compo.BorderColor = DirectCast(New BrushConverter().ConvertFrom("#DCDCDC"), SolidColorBrush)
Compo.BackGroundColor = DirectCast(New BrushConverter().ConvertFrom("#FFFFFF"), SolidColorBrush)
Compo.Foreground = DirectCast(New BrushConverter().ConvertFrom("#000000"), SolidColorBrush)
Compo.BorderThickness = 1
Compo.FontBold = FontWeights.Normal
Compo.ResetMark()
Next
End If
Else
@@ -111,6 +107,32 @@ Public Class Compo
End Set
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
#Region "CompoRef"
+14 -6
View File
@@ -1509,7 +1509,7 @@ Public Class Part
#Region "Selection compo"
Private Sub ResetAllMark()
Public Sub ResetAllMark()
Dim nIdFirstPart As Integer = EgtGetFirstPart()
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
While nIdLay <> GDB_ID.NULL
@@ -1517,6 +1517,9 @@ Public Class Part
nIdLay = EgtGetNextLayer(nIdLay)
End While
EgtDraw()
For Each ItemCompo As Compo In CompoList
ItemCompo.ResetMark()
Next
End Sub
Private Sub MarkCompoInScena()
@@ -1532,7 +1535,7 @@ Public Class Part
' ontengo la posizione prevista nella grafica
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, m_SelCompo)
' recupero la lista ordinata
Dim sCompoName As String = m_SelCompo.SelFile
Dim sCompoName As String = m_SelCompo.TemplateSelItem
' recupero il primo part disponibile
Dim nIdFirstPart As Integer = EgtGetFirstPart()
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
@@ -1540,11 +1543,12 @@ Public Class Part
While nIdLay <> GDB_ID.NULL
Dim sInfoPath As String = String.Empty
If EgtGetInfo(nIdLay, "Path", sInfoPath) Then
Dim sNamePath As String = Path.GetFileNameWithoutExtension(sInfoPath)
If sNamePath = sCompoName And IndexLay = IndexInList Then
Dim sNamePath As String = sInfoPath
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
EgtSetMark(nIdLay)
m_SelCompo.SetMark()
Exit While
ElseIf sNamePath = sCompoName And IndexLay < IndexInList Then
ElseIf sNamePath.Contains(sCompoName) And IndexLay < IndexInList Then
IndexLay = IndexLay + 1
End If
End If
@@ -2075,7 +2079,7 @@ Public Class Part
sLine = RemoveComment(FileContent(Index))
Dim Thickness As String = GetValueWithKey(sLine, K_THICKNESS)
If m_refPartDoor.IsTemplate And OptionModule.AdjustDDT Then
Height = OptionModule.m_Thickness
Thickness = OptionModule.m_Thickness
End If
If String.IsNullOrWhiteSpace(Thickness) Then
If Not SearchKey(sLine, K_THICKNESS) Then Return -1
@@ -2168,6 +2172,10 @@ Public Class Part
MessageBox.Show(String.Format(EgtMsg(50141), ConstIni.K_SWING_INI) & EgtMsg(50159), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
Else
' 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
OptionModule.SetCurrSwing(m_SwingAlias, m_Swing)
If IsNothing(m_SwingAlias) Then Return -1
+10 -12
View File
@@ -1,19 +1,17 @@
<EgtWPFLib5:EgtCustomWindow x:Class="GuideV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
TitleBarBrush="{StaticResource EgaltechBlue1}"
BorderBrush="{StaticResource EgaltechBlue1}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
IsMinimizable="True" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Height="800" Width="1500">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
TitleBarBrush="{StaticResource EgaltechBlue1}"
BorderBrush="{StaticResource EgaltechBlue1}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
IsMinimizable="True" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Height="800" Width="1500">
<DockPanel Margin="5">
<WebBrowser x:Name="DoorBrowser"/>
</DockPanel>
</EgtWPFLib5:EgtCustomWindow>
+2 -2
View File
@@ -20,10 +20,10 @@ Public Class GuideV
Dim sHelpDir As String = String.Empty
If OptionModule.m_SmartHelp = HelpPage.LocalHost Then
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
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
sHelpDir = IniFile.m_sHelpDir
Try
+2 -2
View File
@@ -76,8 +76,8 @@ Friend Class MainWindowModel
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2609, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2609, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2612, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2612, 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())
+50 -26
View File
@@ -10,8 +10,11 @@ Class MainWindowV
' 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().
@@ -24,32 +27,7 @@ Class MainWindowV
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
' se è assente la chiave di protezione non mostro la finestra Launcher
If Map.refSceneManagerVM.bProtectKey Then
If Not IsNothing(m_args) Then
' leggo gli argomenti
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)
' Assegno i valore Width, Height, Thickness
OptionModule.m_Width = Items(1)
OptionModule.m_Height = Items(2)
OptionModule.m_Thickness = Items(3)
' Indico il percoso di salvataggio file DDF
OptionModule.SaveFileNameFromArgs = Items(4)
' abilito lettura dati
OptionModule.AdjustDDT = True
Else
' blocco lettura dati
OptionModule.AdjustDDT = False
End If
End If
Map.refMainWindowVM.SetLauncher()
Map.refMainWindowVM.ShowErrorCompoLoad()
End If
RunBlindCode()
End Sub
Private Sub MainWindowV_Unloaded(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
@@ -61,4 +39,50 @@ Class MainWindowV
#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
+3 -1
View File
@@ -67,7 +67,9 @@ Public Class MainWindowVM
Set(value As ListPageEnum)
m_SelectedPage = value
NotifyPropertyChanged("PageControl")
Map.refInstrumentPanelVM.NotifyPropertyChanged("DimensionVisibility")
If Not IsNothing(Map.refInstrumentPanelVM) Then
Map.refInstrumentPanelVM.NotifyPropertyChanged("DimensionVisibility")
End If
End Set
End Property
+2 -2
View File
@@ -72,5 +72,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.10.1")>
<Assembly: AssemblyFileVersion("2.6.10.1")>
<Assembly: AssemblyVersion("2.6.12.1")>
<Assembly: AssemblyFileVersion("2.6.12.1")>
+2
View File
@@ -11,6 +11,8 @@ Friend Module OptionModule
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
Friend m_LanguageList As New ObservableCollection(Of Language)
+14 -10
View File
@@ -66,10 +66,18 @@ Public Class OrderVM
End Get
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
Get
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
If Not VerifyNotIsNothing() Then Return Nothing
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Customer
End Get
Set(value As String)
@@ -83,8 +91,7 @@ Public Class OrderVM
Public Property Elevation As String
Get
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
If Not VerifyNotIsNothing() Then Return Nothing
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Elevation
End Get
Set(value As String)
@@ -98,8 +105,7 @@ Public Class OrderVM
Public Property Project As String
Get
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
If Not VerifyNotIsNothing() Then Return Nothing
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Project
End Get
Set(value As String)
@@ -113,8 +119,7 @@ Public Class OrderVM
Public Property PO As String
Get
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
If Not VerifyNotIsNothing() Then Return Nothing
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.PO
End Get
Set(value As String)
@@ -128,8 +133,7 @@ Public Class OrderVM
Public Property Line As String
Get
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then Return Nothing
If Not VerifyNotIsNothing() Then Return Nothing
Return Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0).Door.Line
End Get
Set(value As String)
+19 -2
View File
@@ -687,8 +687,8 @@ Public Class ProjectManagerVM
fd.InitialDirectory = IniFile.m_MyProjectDir
End If
' seleziono il filtro di apertura
fd.Filter = "(*.ddt) |*.ddt|(*.ddf) |*.ddf"
fd.FilterIndex = 2
fd.Filter = "(*.ddf) |*.ddf|(*.ddt) |*.ddt"
fd.FilterIndex = GetCurrentFilter()
fd.RestoreDirectory = True
' apro la finestra di dialogo
If fd.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then
@@ -703,6 +703,8 @@ Public Class ProjectManagerVM
sFilePath = Path.GetDirectoryName(fd.FileName)
' salvo il nome completo del file
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
If Utility.IsFileLocked(sFilePath, Path.GetFileNameWithoutExtension(sFilePathComplete)) 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 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
#Region "OpenMruFileCommand"
+100 -2
View File
@@ -172,7 +172,7 @@ Public Class SceneManagerVM
' Chiudo il programma
End
End If
Return m_ProjectSceneHost
Return m_ProjectSceneHost
End Get
End Property
@@ -346,7 +346,7 @@ Public Class SceneManagerVM
ElseIf Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage Then
If Not EnableRefresh Then Return
' 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)
ExecDoors(m_ProjectScene, sTempFile, False)
' mantengo i layer accesi
@@ -435,6 +435,104 @@ Public Class SceneManagerVM
#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)
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 ")
+26
View File
@@ -22,6 +22,10 @@ Public Module Utility
' CurrFile deve arrivare già senza estensione!
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
Return String.Empty
End If
@@ -703,6 +707,28 @@ Public Module Utility
Next
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
Public Class CompoBrandDir