Compare commits

...

43 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 621bd11b3d Avvio programma con Args esterno 2024-10-04 13:32:08 +02:00
Nicola Pievani 22941facd2 Merge commit '90a898f25aedc4232808a9ae5b3221c9e4d12961' 2024-09-16 12:57:19 +02:00
Nicola Pievani 90a898f25a Aggiornamento versione 2.6i1 2024-09-16 12:57:04 +02:00
Nicola Pievani 062c19ff6f Migliorata/Corretta lettura parametri DGD.T/.H/.W in millimetri Hardware template 2024-09-16 12:55:10 +02:00
Nicola Pievani ef29a33418 Merge commit 'ab097ff0f029674cafbddc5925f84d4d0420019f' 2024-08-30 14:48:29 +02:00
Nicola Pievani ab097ff0f0 Migliorata gestione lettura direttori 2024-08-30 14:48:15 +02:00
Nicola Pievani 68ccdd17bd Merge branch 'NicolaP' 2024-08-06 12:35:12 +02:00
Nicola Pievani 41f5c23479 Correzione versione 2.6h1 2024-08-06 12:34:46 +02:00
Nicola Pievani 04d76a6f62 Correzione gestione SetMark 2024-08-06 12:29:21 +02:00
Nicola Pievani 72cfd8ff7d Inizio gerstione SetMark su compo selzionato 2024-08-06 12:05:54 +02:00
Nicola Pievani 8284811a4b Aggiornato CopyRight 2024-07-24 15:19:10 +02:00
Nicola Pievani 4143ea0389 Merge branch 'master' into NicolaP 2024-07-24 15:05:51 +02:00
Nicola Pievani a4202d0be1 Aggiornamento versione 2.6g5 2024-07-24 15:05:16 +02:00
Nicola Pievani 2730d1ad32 Miglioramenti gestione TmplateDoor 2024-07-10 18:39:05 +02:00
Nicola Pievani a6492ac6e1 Correzione scrittura parametri DGD 2024-06-26 18:24:19 +02:00
Nicola Pievani 1fb0c4bd09 Merge commit '5f71f7dfa33b55063c9e09469e744f7b800766b2' 2024-05-10 16:14:25 +02:00
Nicola Pievani 5f71f7dfa3 Gestione chiave di rete 2024-05-10 16:13:46 +02:00
Nicola Pievani 86b2e011e0 Merge commit 'b16d860805fee93995139704af452d3c9a0a45e4' 2024-05-07 15:59:32 +02:00
Nicola Pievani b16d860805 Migliorata gestione unità di misura 2024-05-07 15:59:12 +02:00
Nicola Pievani 774c64678f Merge commit '34472efbc2b8b675468e6f9482f181a81d41f82b' 2024-04-08 10:15:14 +02:00
Nicola Pievani 34472efbc2 Gestione errore 'Rabbet.frame' non trovato 2024-04-08 10:14:31 +02:00
Nicola Pievani 6ddc0f305b Merge branch 'NicolaP' 2024-02-21 16:19:42 +01:00
Nicola Pievani 9edda7ead3 Migliorata gestione unità di misura mm 2024-02-21 16:19:05 +01:00
27 changed files with 919 additions and 155 deletions
+8 -3
View File
@@ -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
+19 -6
View File
@@ -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)
@@ -3588,9 +3591,14 @@ Public Class Assembly
If Not bRabbet Then If Not bRabbet Then
'Map.refPartPageVM.CurrPart = Jamb 'Map.refPartPageVM.CurrPart = Jamb
CurrCompo = Jamb.AddNewCompo(Map.refCompoPanelVM.CompoTypeList(IndexCompoPanel), True) CurrCompo = Jamb.AddNewCompo(Map.refCompoPanelVM.CompoTypeList(IndexCompoPanel), True)
DirectCast(CurrCompo.CompoParamList(0), ComboBoxParam).SelItem = DirectCast(CurrCompo.CompoParamList(0), ComboBoxParam).ItemList(0) If Not IsNothing(CurrCompo) Then
DirectCast(CurrCompo.CompoParamList(0), ComboBoxParam).SelItem = DirectCast(CurrCompo.CompoParamList(0), ComboBoxParam).ItemList(0)
Else
' 50180=Warning : {0} does not exist.
MessageBox.Show(String.Format(EgtMsg(50180), Map.refCompoPanelVM.CompoTypeList(IndexCompoPanel).Name & ".frame"), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else Else
CurrCompo = Jamb.CompoList(IndexCompo) CurrCompo = Jamb.CompoList(IndexCompo)
End If End If
' mofico la componete rabbet ' mofico la componete rabbet
If Not IsNothing(CurrCompo) Then If Not IsNothing(CurrCompo) Then
@@ -3729,9 +3737,14 @@ Public Class Assembly
If Not bRabbet Then If Not bRabbet Then
' lo aggiungo ' lo aggiungo
Local_Compo = Jamb.AddNewCompo(Map.refCompoPanelVM.CompoTypeList(CompoListIndex), True) Local_Compo = Jamb.AddNewCompo(Map.refCompoPanelVM.CompoTypeList(CompoListIndex), True)
DirectCast(Local_Compo.CompoParamList(0), ComboBoxParam).SetSelItem(DirectCast(Local_Compo.CompoParamList(0), ComboBoxParam).ItemList(nIndexSide)) If Not IsNothing(Local_Compo) Then
DirectCast(Local_Compo.CompoParamList(0), ComboBoxParam).SetSelItem(DirectCast(Local_Compo.CompoParamList(0), ComboBoxParam).ItemList(nIndexSide))
Else
' 50180=Warning : {0} does not exist.
MessageBox.Show(String.Format(EgtMsg(50180), Map.refCompoPanelVM.CompoTypeList(CompoListIndex).Name & ".frame"), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else Else
Local_Compo = Jamb.CompoList(IndexCompo) Local_Compo = Jamb.CompoList(IndexCompo)
End If End If
If Not IsNothing(Local_Compo) Then If Not IsNothing(Local_Compo) Then
Dim dVal1 As Double = 0 Dim dVal1 As Double = 0
+10
View File
@@ -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
+30 -21
View File
@@ -21,7 +21,7 @@ Public Class AssemblyManagerVM
Private m_VisibilityDoorList As Visibility = Visibility.Collapsed Private m_VisibilityDoorList As Visibility = Visibility.Collapsed
Public Property VisibilityDoorList As Visibility Public Property VisibilityDoorList As Visibility
Get Get
Return m_VisibilityDoorList Return m_VisibilityDoorList
End Get End Get
Set(value As Visibility) Set(value As Visibility)
m_VisibilityDoorList = value m_VisibilityDoorList = value
@@ -81,7 +81,9 @@ Public Class AssemblyManagerVM
If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then
' ricarico la lista completa degli swing ' ricarico la lista completa degli swing
NewAssName.SelAssembly.ListPartDoor(0).Door.SwingTypeList = OptionModule.m_SwingTypeList NewAssName.SelAssembly.ListPartDoor(0).Door.SwingTypeList = OptionModule.m_SwingTypeList
NewAssName.SelAssembly.ListPartDoor(0).Door.SetSwing(OptionModule.m_Swing) If String.IsNullOrEmpty(NewAssName.SelAssembly.ListPartDoor(0).Door.Swing) Then
NewAssName.SelAssembly.ListPartDoor(0).Door.SetSwing(OptionModule.m_Swing)
End If
DdfFile.WriteDDFPart(NewAssName.SelAssembly.ListPartDoor(0).Door, sTempFile, False, False) DdfFile.WriteDDFPart(NewAssName.SelAssembly.ListPartDoor(0).Door, sTempFile, False, False)
' assegno la porte salvata nel CurrPart.ddf come porta corrente del progetto ' assegno la porte salvata nel CurrPart.ddf come porta corrente del progetto
Map.refPartPageVM.CurrPart = NewAssName.SelAssembly.ListPartDoor(0).Door Map.refPartPageVM.CurrPart = NewAssName.SelAssembly.ListPartDoor(0).Door
@@ -157,7 +159,7 @@ Public Class AssemblyManagerVM
DdfFile.SaveErrorCompo = False DdfFile.SaveErrorCompo = False
End If End If
' controllo che il salvataggio sia andato a buon fine ' controllo che il salvataggio sia andato a buon fine
If bConfirmSavin Then If bConfirmSavin Then
SavedAssName.IsModified = False SavedAssName.IsModified = False
' ogni progetto salvato è l'ultimo da aprire, anche se il programma è chiuso dall'HardwareManager ' ogni progetto salvato è l'ultimo da aprire, anche se il programma è chiuso dall'HardwareManager
@@ -321,18 +323,18 @@ Public Class AssemblyManagerVM
End Select End Select
Map.refMainWindowVM.selectedWatcher = MainWindowVM.WatcherCalling.NoEvents Map.refMainWindowVM.selectedWatcher = MainWindowVM.WatcherCalling.NoEvents
' se sono in modalità hardware allora esco senza caricare l'elenco delle porte ' se sono in modalità hardware allora esco senza caricare l'elenco delle porte
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage then Return true If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage Then Return True
'------------------------------------------------------------------------------------------------------------------------------------------------- '-------------------------------------------------------------------------------------------------------------------------------------------------
' devo ricalcolare l'elenco delle porte nel progetto corrente: ' devo ricalcolare l'elenco delle porte nel progetto corrente:
If OptionModule.m_SingleDoor then Return True If OptionModule.m_SingleDoor Then Return True
' calcolo l'elenco delle porte solo dopo il salvataggio della porta corrente ' calcolo l'elenco delle porte solo dopo il salvataggio della porta corrente
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified then Return true If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified Then Return True
If Not IsNothing( Map.refAssemblyManagerVM.CurrProject) andAlso Not String.IsNullOrEmpty(Map.refAssemblyManagerVM.CurrProject.Name) then If Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso Not String.IsNullOrEmpty(Map.refAssemblyManagerVM.CurrProject.Name) Then
Dim CurrAssemblyName As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name Dim CurrAssemblyName As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
Map.refAssemblyManagerVM.CurrProject.AssemblyList = New ObservableCollection(Of AssemblyName) Map.refAssemblyManagerVM.CurrProject.AssemblyList = New ObservableCollection(Of AssemblyName)
Dim DDFArray()as String = Directory.GetFiles(Map.refAssemblyManagerVM.CurrProject.Name) Dim DDFArray() As String = Directory.GetFiles(Map.refAssemblyManagerVM.CurrProject.Name)
For IndexFile As Integer = 0 to DDFArray.Count - 1 For IndexFile As Integer = 0 To DDFArray.Count - 1
If Path.GetExtension(DDFArray(IndexFile)) <> DDF_EXTENSION then If Path.GetExtension(DDFArray(IndexFile)) <> DDF_EXTENSION Then
Continue For Continue For
End If End If
Dim NewAssembly As New AssemblyName Dim NewAssembly As New AssemblyName
@@ -340,12 +342,12 @@ Public Class AssemblyManagerVM
NewAssembly.IsModified = False NewAssembly.IsModified = False
Map.refAssemblyManagerVM.CurrProject.AssemblyList.Add(NewAssembly) Map.refAssemblyManagerVM.CurrProject.AssemblyList.Add(NewAssembly)
Next Next
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) then If Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
Try Try
'Map.refAssemblyManagerVM.CurrProject = LocalCurrProject 'Map.refAssemblyManagerVM.CurrProject = LocalCurrProject
'LocalCurrProject.SelAssemblyName = LocalCurrProject.AssemblyList.First(Function(x) x.Name = Local_AssemblyName.Name) 'LocalCurrProject.SelAssemblyName = LocalCurrProject.AssemblyList.First(Function(x) x.Name = Local_AssemblyName.Name)
Map.refAssemblyManagerVM.CurrProject = Map.refAssemblyManagerVM.CurrProject Map.refAssemblyManagerVM.CurrProject = Map.refAssemblyManagerVM.CurrProject
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = Map.refAssemblyManagerVM.CurrProject.AssemblyList.First(Function(x) x.Name = CurrAssemblyName) Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = Map.refAssemblyManagerVM.CurrProject.AssemblyList.First(Function(x) x.Name = CurrAssemblyName)
Catch ex As Exception Catch ex As Exception
EgtOutLog("Aggiornamento Progetto Corrente: impossibile caricare ultima porta") EgtOutLog("Aggiornamento Progetto Corrente: impossibile caricare ultima porta")
End Try End Try
@@ -372,8 +374,8 @@ Public Class AssemblyManagerVM
Next Next
Next Next
End If End If
End If End If
Return True Return True
End Function End Function
' ricerca il tipo di compoente chiamato ' ricerca il tipo di compoente chiamato
@@ -446,7 +448,7 @@ Public Class AssemblyManagerVM
If Not bBrandExists OrElse Not bFileExists Then If Not bBrandExists OrElse Not bFileExists Then
'' se la compoenente che sto caricando era corretta '' se la compoenente che sto caricando era corretta
'ErrCompo.LoadByDefault = True 'ErrCompo.LoadByDefault = True
' se il brand non esiste, ma è selezionato ' se il brand non esiste, ma è selezionato
If Not bBrandExists Then If Not bBrandExists Then
ErrCompo.MissingDirectory = True ErrCompo.MissingDirectory = True
ErrCompo.MissingFile = True ErrCompo.MissingFile = True
@@ -979,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)
@@ -1072,7 +1080,7 @@ Public Class AssemblyManagerVM
Public Function ManageModified() As Boolean Public Function ManageModified() As Boolean
' verifico se selezionato esiste e modificato ' verifico se selezionato esiste e modificato
If Not IsNothing (m_CurrProject) AndAlso Not IsNothing(m_CurrProject.SelAssemblyName) AndAlso m_CurrProject.SelAssemblyName.IsModified Then If Not IsNothing(m_CurrProject) AndAlso Not IsNothing(m_CurrProject.SelAssemblyName) AndAlso m_CurrProject.SelAssemblyName.IsModified Then
Dim sText As String = String.Format(EgtMsg(50109), Path.GetFileNameWithoutExtension(m_CurrProject.SelAssemblyName.Name)) Dim sText As String = String.Format(EgtMsg(50109), Path.GetFileNameWithoutExtension(m_CurrProject.SelAssemblyName.Name))
Select Case MessageBox.Show(sText, "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) Select Case MessageBox.Show(sText, "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
@@ -1303,7 +1311,8 @@ Public Class AssemblyManagerVM
' creo le Ante ' creo le Ante
For IndexDoor As Integer = 0 To nDoorNumber - 1 For IndexDoor As Integer = 0 To nDoorNumber - 1
Dim Type As String = ConstGen.PART_DO_ & IndexDoor + 1 Dim Type As String = ConstGen.PART_DO_ & IndexDoor + 1
If IsNothing(ReserchPartDoor(Type)) Then Dim _PartDoor As PartDoor = ReserchPartDoor(Type)
If IsNothing(_PartDoor) Then
Dim Local_PartDoor As New PartDoor Dim Local_PartDoor As New PartDoor
Local_PartDoor.Door = New Part(Local_PartDoor) Local_PartDoor.Door = New Part(Local_PartDoor)
Local_PartDoor.Door.TypePart = Type Local_PartDoor.Door.TypePart = Type
@@ -1313,7 +1322,7 @@ Public Class AssemblyManagerVM
'CreateNewPropertiesList(Local_PartDoor.Door.PropertiesList, Local_PartDoor.Door.SelectedMaterial) 'CreateNewPropertiesList(Local_PartDoor.Door.PropertiesList, Local_PartDoor.Door.SelectedMaterial)
CurrAssembly.ListPartDoor.Add(Local_PartDoor) CurrAssembly.ListPartDoor.Add(Local_PartDoor)
Else Else
'CurrAssembly.ListPartDoor.Add(ReserchPartDoor(Type)) CurrAssembly.ListPartDoor.Add(_PartDoor)
End If End If
Next Next
@@ -1610,7 +1619,7 @@ Public Class AssemblyManagerVM
SaveFileDialog.FileName &= DDF_EXTENSION SaveFileDialog.FileName &= DDF_EXTENSION
End If End If
' verifico che non sia bloccato (in fase di creazione di una nuova porta posso avere il file .lck senza il ddf) ' verifico che non sia bloccato (in fase di creazione di una nuova porta posso avere il file .lck senza il ddf)
If Utility.IsFileLocked(Path.GetDirectoryName(SaveFileDialog.FileName), Path.GetFileNameWithoutExtension(SaveFileDialog.FileName)) then If Utility.IsFileLocked(Path.GetDirectoryName(SaveFileDialog.FileName), Path.GetFileNameWithoutExtension(SaveFileDialog.FileName)) Then
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then If Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
Utility.OutLog("Apertura progetto : " & Map.refAssemblyManagerVM.CurrProject.Name) Utility.OutLog("Apertura progetto : " & Map.refAssemblyManagerVM.CurrProject.Name)
Utility.LockDir(Map.refAssemblyManagerVM.CurrProject.Name, Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.GraphicName) Utility.LockDir(Map.refAssemblyManagerVM.CurrProject.Name, Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.GraphicName)
@@ -1654,7 +1663,7 @@ Public Class AssemblyManagerVM
' aggiorno la lista ' aggiorno la lista
'------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------------------------------
' LETTURA DI UN FILE DI TIPO TEMPLATE ' LETTURA DI UN FILE DI TIPO TEMPLATE
If ImportTemplate(sImportTemplate) Then If ImportTemplate(sImportTemplate) Then
Utility.OutLog("Apertura progetto : " & Local_AssemblyName.Name) Utility.OutLog("Apertura progetto : " & Local_AssemblyName.Name)
Utility.LockDir(Path.GetDirectoryName(Local_AssemblyName.Name), Path.GetFileNameWithoutExtension(Local_AssemblyName.Name)) Utility.LockDir(Path.GetDirectoryName(Local_AssemblyName.Name), Path.GetFileNameWithoutExtension(Local_AssemblyName.Name))
' carico il nome come Assemblato selezionato ' carico il nome come Assemblato selezionato
+10
View File
@@ -17,6 +17,16 @@ Public Class AssemblyName
End Set End Set
End Property End Property
Private m_OrigTemplate As String = String.Empty
Public Property OrigTemplate As String
Get
Return m_OrigTemplate
End Get
Set(value As String)
m_OrigTemplate = value
End Set
End Property
Private m_IsModified As Boolean Private m_IsModified As Boolean
Public Property IsModified As Boolean Public Property IsModified As Boolean
Get Get
+3
View File
@@ -23,6 +23,9 @@ Module ConstGen
Public Const LIC_FILE_NAME As String = "EgtDOORCreator.lic" Public Const LIC_FILE_NAME As String = "EgtDOORCreator.lic"
Public Const S_LICENCE As String = "Licence" Public Const S_LICENCE As String = "Licence"
Public Const K_KEY As String = "Key" Public Const K_KEY As String = "Key"
Public Const K_NETKEY As String = "NetKey"
Public Const K_LOCKID As String = "LockId"
Public Const K_NESTKEY As String = "NestKey"
' File di log generale ' File di log generale
Public Const GENLOG_FILE_NAME As String = "EgtDOORCreatorLog#.txt" Public Const GENLOG_FILE_NAME As String = "EgtDOORCreatorLog#.txt"
+2 -1
View File
@@ -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"
+89 -3
View File
@@ -64,6 +64,10 @@ Friend Module DdfFile
Dim Config As String = IniFile.m_sDoorsDirPath Dim Config As String = IniFile.m_sDoorsDirPath
Config = Path.GetFileName(Config) Config = Path.GetFileName(Config)
DdfFileContent.Add("#Config: " & Config) DdfFileContent.Add("#Config: " & Config)
' versione 2.6g1: salvo il nome del template da cui è genetato il file corrente
If Not String.IsNullOrEmpty(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.OrigTemplate) Then
DdfFileContent.Add("#OrigTemplate: " & Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.OrigTemplate)
End If
If Not IsNothing(Part.TypePart) Then If Not IsNothing(Part.TypePart) Then
DdfFileContent.Add("#" & PrintTitleDDFPart(Part.TypePart)) DdfFileContent.Add("#" & PrintTitleDDFPart(Part.TypePart))
End If End If
@@ -981,7 +985,7 @@ Friend Module DdfFile
z = DoubleToString(-dDeltaThickness + dDeltaBottom, 4) z = DoubleToString(-dDeltaThickness + dDeltaBottom, 4)
End If End If
End If End If
Return z Return z
End Function End Function
#End Region ' Funzioni per il posizionamento #End Region ' Funzioni per il posizionamento
@@ -1077,10 +1081,32 @@ Friend Module DdfFile
Return True Return True
End Function End Function
Private Function AscendingOrder(List As ObservableCollection(Of Compo), DdfFileContent As List(Of String), bIsDDF As Boolean) As Boolean ' ritorna una lista con tutti i compo dello stesso tipo
Public Function GetCurrentListSameCompoType(ByVal ListCompo As ObservableCollection(Of Compo), sCompoTypeDDF As String) As ObservableCollection(Of Compo)
Dim TempList As New ObservableCollection(Of Compo)
For Index As Integer = 0 To ListCompo.Count - 1
If ListCompo(Index).CompoType.DDFName = sCompoTypeDDF Then
TempList.Add(ListCompo(Index))
End If
Next
Return TempList
End Function
' ritorna una lista con tutti i compo dello stesso tipo con lo stesso nome
Public Function GetCurrentListSameCompoDDFName(ByVal ListCompo As ObservableCollection(Of Compo), sSelFile As String, sSelBrand As String) As ObservableCollection(Of Compo)
Dim TempList As New ObservableCollection(Of Compo)
For Index As Integer = 0 To ListCompo.Count - 1
If ListCompo(Index).SelFile = sSelFile And ListCompo(Index).SelBrandPart = sSelBrand Then
TempList.Add(ListCompo(Index))
End If
Next
Return TempList
End Function
' data la lista compo dello stesso tipo, la riordino ( Config.ini → TidyLayer = ...)
Public Sub GetOrderedListSameCompo(ByRef List As ObservableCollection(Of Compo))
Dim tidyParamIndex1 As Integer = -1 Dim tidyParamIndex1 As Integer = -1
Dim tidyParamIndex2 As Integer = -1 Dim tidyParamIndex2 As Integer = -1
Dim WritingError As String = String.Empty
If List.Count >= 2 Then If List.Count >= 2 Then
For IndexList1 As Integer = 0 To List.Count - 2 For IndexList1 As Integer = 0 To List.Count - 2
For IndexList2 As Integer = IndexList1 + 1 To List.Count - 1 For IndexList2 As Integer = IndexList1 + 1 To List.Count - 1
@@ -1113,6 +1139,66 @@ Friend Module DdfFile
Next Next
Next Next
End If End If
End Sub
' rercupera indice nella lista corrente della componente passata
Public Function GetIndexInList(ListCompo As ObservableCollection(Of Compo), SelCompo As Compo) As Integer
' Se sono qui allora i compo devono avere lo stesso nome?.. Mettere controllo..
Dim bFoundSelCompo As Boolean = True
For Ind As Integer = 0 To ListCompo.Count - 1
For Ind2 As Integer = 0 To ListCompo(Ind).CompoParamList.Count - 1
' verifco che gli oggetti abbiano lo stesso nome?.. Metter controllo..
If TypeOf ListCompo(Ind).CompoParamList(Ind2) Is TextBoxOnOffParam And
TypeOf SelCompo.CompoParamList(Ind2) Is TextBoxOnOffParam Then
Dim Temp As TextBoxOnOffParam = DirectCast(ListCompo(Ind).CompoParamList(Ind2), TextBoxOnOffParam)
Dim SelTemp As TextBoxOnOffParam = DirectCast(SelCompo.CompoParamList(Ind2), TextBoxOnOffParam)
If Temp.Value <> SelTemp.Value Or Temp.IsActive <> SelTemp.IsActive Then
bFoundSelCompo = False
End If
ElseIf TypeOf ListCompo(Ind).CompoParamList(Ind2) Is TextBoxParam And
TypeOf SelCompo.CompoParamList(Ind2) Is TextBoxParam Then
Dim Temp As TextBoxParam = DirectCast(ListCompo(Ind).CompoParamList(Ind2), TextBoxParam)
Dim SelTemp As TextBoxParam = DirectCast(SelCompo.CompoParamList(Ind2), TextBoxParam)
If Temp.Value <> SelTemp.Value Then
bFoundSelCompo = False
End If
ElseIf TypeOf ListCompo(Ind).CompoParamList(Ind2) Is ComboBoxOnOffParam And
TypeOf SelCOmpo.CompoParamList(Ind2) Is ComboBoxOnOffParam Then
Dim Temp As ComboBoxOnOffParam = DirectCast(ListCompo(Ind).CompoParamList(Ind2), ComboBoxOnOffParam)
Dim SelTemp As ComboBoxOnOffParam = DirectCast(SelCompo.CompoParamList(Ind2), ComboBoxOnOffParam)
If Temp.SelItem <> SelTemp.SelItem Or Temp.IsActive <> SelTemp.IsActive Then
bFoundSelCompo = False
End If
ElseIf TypeOf ListCompo(Ind).CompoParamList(Ind2) Is ComboBoxParam And
TypeOf SelCompo.CompoParamList(Ind2) Is ComboBoxParam Then
Dim Temp As ComboBoxParam = DirectCast(ListCompo(Ind).CompoParamList(Ind2), ComboBoxParam)
Dim SelTemp As ComboBoxParam = DirectCast(SelCompo.CompoParamList(Ind2), ComboBoxParam)
If Temp.SelItem <> SelTemp.SelItem Then
bFoundSelCompo = False
End If
Else
' le componeti non sono dello stesso tipo!
Return -1
End If
' verifico che il parametro corrente è uguale a quello della compo selezionata
If Not bFoundSelCompo Then
Exit For
End If
Next
' verifico se ho trovato la compo
If Not bFoundSelCompo Then
bFoundSelCompo = True
Else
Return Ind
End If
Next
' se esco senza aver trovato niente
Return -1
End Function
Private Function AscendingOrder(List As ObservableCollection(Of Compo), DdfFileContent As List(Of String), bIsDDF As Boolean) As Boolean
Dim WritingError As String = String.Empty
GetOrderedListSameCompo(List)
' stampa lista ' stampa lista
DdfFileContent.AddRange(GenerateCompolistDDF(List(0), WritingError, True, bIsDDF)) DdfFileContent.AddRange(GenerateCompolistDDF(List(0), WritingError, True, bIsDDF))
For IndexItem As Integer = 1 To List.Count - 1 For IndexItem As Integer = 1 To List.Count - 1
+27 -5
View File
@@ -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"
+140 -8
View File
@@ -2,6 +2,7 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports System.IO Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Public Class Part Public Class Part
@@ -1196,6 +1197,7 @@ Public Class Part
End Get End Get
Set(value As Compo) Set(value As Compo)
m_SelCompo = value m_SelCompo = value
MarkCompoInScena()
End Set End Set
End Property End Property
@@ -1505,6 +1507,59 @@ Public Class Part
#End Region 'AddCompo #End Region 'AddCompo
#Region "Selection compo"
Public Sub ResetAllMark()
Dim nIdFirstPart As Integer = EgtGetFirstPart()
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
While nIdLay <> GDB_ID.NULL
EgtResetMark(nIdLay)
nIdLay = EgtGetNextLayer(nIdLay)
End While
EgtDraw()
For Each ItemCompo As Compo In CompoList
ItemCompo.ResetMark()
Next
End Sub
Private Sub MarkCompoInScena()
If IsNothing(m_SelCompo) Then Return
If GetMainPrivateProfileInt(S_GENERAL, "MarkCompo", 0) = 0 Then Return
ResetAllMark()
' recupero la lista dei compo dello stesso tipo
Dim TempList As ObservableCollection(Of Compo) = DdfFile.GetCurrentListSameCompoType(m_CompoList, m_SelCompo.CompoType.DDFName)
' recupero la lista dei compo con lo stesso nome
TempList = DdfFile.GetCurrentListSameCompoDDFName(TempList, m_SelCompo.SelFile, m_SelCompo.SelBrandPart)
' riordino la lista appena trovata secondo le regole di stampa DDF
DdfFile.GetOrderedListSameCompo(TempList)
' 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.TemplateSelItem
' recupero il primo part disponibile
Dim nIdFirstPart As Integer = EgtGetFirstPart()
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
Dim IndexLay As Integer = 0
While nIdLay <> GDB_ID.NULL
Dim sInfoPath As String = String.Empty
If EgtGetInfo(nIdLay, "Path", sInfoPath) Then
Dim sNamePath As String = sInfoPath
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
EgtSetMark(nIdLay)
m_SelCompo.SetMark()
Exit While
ElseIf sNamePath.Contains(sCompoName) And IndexLay < IndexInList Then
IndexLay = IndexLay + 1
End If
End If
nIdLay = EgtGetNextLayer(nIdLay)
End While
EgtDraw()
End Sub
#End Region
#Region "RemoveCompo" #Region "RemoveCompo"
Friend Sub RemoveCompo(CompoToRemove As Compo, Optional OnlyOnJamb As Boolean = False) Friend Sub RemoveCompo(CompoToRemove As Compo, Optional OnlyOnJamb As Boolean = False)
@@ -1983,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
@@ -2000,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
@@ -2017,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
@@ -2108,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
@@ -3360,6 +3428,7 @@ Public Class Part
' utilizzata per generare la porta/jamb dell'Hardware ' utilizzata per generare la porta/jamb dell'Hardware
Sub New(Hardware As String) Sub New(Hardware As String)
If Not String.IsNullOrEmpty(Hardware) Then If Not String.IsNullOrEmpty(Hardware) Then
Me.m_Width = OptionModule.m_WidthJamb Me.m_Width = OptionModule.m_WidthJamb
Me.m_Height = OptionModule.m_Height Me.m_Height = OptionModule.m_Height
@@ -3393,10 +3462,77 @@ Public Class Part
Me.TypePart = ConstGen.PART_FRAME_LEFT Me.TypePart = ConstGen.PART_FRAME_LEFT
Return Return
End If End If
Me.m_Width = OptionModule.m_Width
Me.m_Height = OptionModule.m_Height Dim bCLoneDoor As Boolean = (GetMainPrivateProfileInt(S_GENERAL, "CloneDoor", 0) = 1)
Me.m_Thickness = OptionModule.m_Thickness ' Se abilitato in file Ini "DoorClone" allora verifico se esiste una porta corrente
Me.SetSwing(OptionModule.m_Swing) If bCLoneDoor And Not IsNothing(Map.refAssemblyManagerVM) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso
Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly) AndAlso
Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor) Then
' Se presente una sola anta
Dim nPartDoor As Integer = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count
If nPartDoor = 1 Then
Dim LocalPartDoor As PartDoor = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(0)
If Not IsNothing(LocalPartDoor.Door) Then
Me.m_Width = LocalPartDoor.Door.m_Width
Me.m_Height = LocalPartDoor.Door.m_Height
Me.m_Thickness = LocalPartDoor.Door.m_Thickness
Me.SetSwing(LocalPartDoor.Door.m_Swing)
Me.SetLockEdgeType(New EdgeType(LocalPartDoor.Door.LockEdgeType.Name, Visibility.Visible))
Me.SetHingeEdgeType(New EdgeType(LocalPartDoor.Door.HingeEdgeType.Name, Visibility.Visible))
Me.SetTopType(New EdgeType(LocalPartDoor.Door.TopType.Name, Visibility.Visible))
Me.SetBottomType(New EdgeType(LocalPartDoor.Door.BottomType.Name, Visibility.Visible))
Else
' Devo usare i parametri di default
Me.m_Width = OptionModule.m_Width
Me.m_Height = OptionModule.m_Height
Me.m_Thickness = OptionModule.m_Thickness
Me.SetSwing(OptionModule.m_Swing)
Me.SetLockEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetHingeEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetTopType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetBottomType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
End If
ElseIf nPartDoor > 1 Then
' Assemblati
Dim WdSelPartV As New SelectPartV()
Dim WdSelPartVM As New SelectPartVM("Selezione della porta", "Selezione anta", nPartDoor, 1)
WdSelPartV.DataContext = WdSelPartVM
WdSelPartV.ShowDialog()
Dim nSelection As Integer = CInt(WdSelPartVM.Selection.Split(" "c)(1)) - 1
' Apro una finestra per chiedere quale anta usare come riferimento
Dim LocalPartDoor As PartDoor = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor(nSelection)
Me.m_Width = LocalPartDoor.Door.m_Width
Me.m_Height = LocalPartDoor.Door.m_Height
Me.m_Thickness = LocalPartDoor.Door.m_Thickness
Me.SetSwing(LocalPartDoor.Door.m_Swing)
Me.SetLockEdgeType(New EdgeType(LocalPartDoor.Door.LockEdgeType.Name, Visibility.Visible))
Me.SetHingeEdgeType(New EdgeType(LocalPartDoor.Door.HingeEdgeType.Name, Visibility.Visible))
Me.SetTopType(New EdgeType(LocalPartDoor.Door.TopType.Name, Visibility.Visible))
Me.SetBottomType(New EdgeType(LocalPartDoor.Door.BottomType.Name, Visibility.Visible))
Else
' Devo usare i parametri di default
Me.m_Width = OptionModule.m_Width
Me.m_Height = OptionModule.m_Height
Me.m_Thickness = OptionModule.m_Thickness
Me.SetSwing(OptionModule.m_Swing)
Me.SetLockEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetHingeEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetTopType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetBottomType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
End If
Else
Me.m_Width = OptionModule.m_Width
Me.m_Height = OptionModule.m_Height
Me.m_Thickness = OptionModule.m_Thickness
Me.SetSwing(OptionModule.m_Swing)
Me.SetLockEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetHingeEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetTopType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetBottomType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
End If
If Not IsNothing(OptionModule.m_CurrMaterial) Then If Not IsNothing(OptionModule.m_CurrMaterial) Then
Try Try
Me.SetMaterial(m_MaterialList.First(Function(x) x.Name = Trim(OptionModule.m_CurrMaterial.Name))) Me.SetMaterial(m_MaterialList.First(Function(x) x.Name = Trim(OptionModule.m_CurrMaterial.Name)))
@@ -3409,10 +3545,6 @@ Public Class Part
Me.m_IsActive = True Me.m_IsActive = True
Me.m_Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit) Me.m_Measure = ConvertMmUnitsToString(OptionModule.m_bIsMmUnit)
Me.m_Weight = OptionModule.m_Weight Me.m_Weight = OptionModule.m_Weight
Me.SetLockEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetHingeEdgeType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetTopType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.SetBottomType(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
Me.m_LockEdgeMachining = OptionModule.m_LockEdgeMachining Me.m_LockEdgeMachining = OptionModule.m_LockEdgeMachining
Me.m_HingeEdgeMachining = OptionModule.m_HingeEdgeMachining Me.m_HingeEdgeMachining = OptionModule.m_HingeEdgeMachining
Me.m_TopMachining = OptionModule.m_TopMachining Me.m_TopMachining = OptionModule.m_TopMachining
+8
View File
@@ -223,6 +223,10 @@
</Compile> </Compile>
<Compile Include="ProjectManager\ProjectManagerVM.vb" /> <Compile Include="ProjectManager\ProjectManagerVM.vb" />
<Compile Include="ProjectManager\MySaveFileDialogVM.vb" /> <Compile Include="ProjectManager\MySaveFileDialogVM.vb" />
<Compile Include="ProjectManager\SelectPartV.xaml.vb">
<DependentUpon>SelectPartV.xaml</DependentUpon>
</Compile>
<Compile Include="ProjectManager\SelectPartVM.vb" />
<Compile Include="RegexFunction.vb" /> <Compile Include="RegexFunction.vb" />
<Compile Include="ReportInfo\ReportCompo.vb" /> <Compile Include="ReportInfo\ReportCompo.vb" />
<Compile Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml.vb"> <Compile Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml.vb">
@@ -363,6 +367,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="ProjectManager\SelectPartV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml"> <Page Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
+10 -12
View File
@@ -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>
+2 -2
View File
@@ -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
+58 -32
View File
@@ -83,8 +83,8 @@ Public Class Hardware
If Not IsNothing(value) Then If Not IsNothing(value) Then
m_SelBrand = value m_SelBrand = value
ElseIf Not IsNothing(value) AndAlso Not Directory.Exists(value.ModelDir) Then ElseIf Not IsNothing(value) AndAlso Not Directory.Exists(value.ModelDir) Then
' 50542 = {0}: Directory does not exist! ' 50542 = {0}: Directory does not exist!
ErrorReading = String.Format(EgtMsg(50542),value.ModelDir) ErrorReading = String.Format(EgtMsg(50542), value.ModelDir)
RefreshTemplateListEgtDOORCreator() RefreshTemplateListEgtDOORCreator()
Else Else
Return Return
@@ -130,8 +130,8 @@ Public Class Hardware
SelTemplate = String.Empty SelTemplate = String.Empty
'Map.refSceneManagerVM.RefreshBtn() 'Map.refSceneManagerVM.RefreshBtn()
End If End If
Else Else
SelTemplate = String.Empty SelTemplate = String.Empty
'Map.refSceneManagerVM.RefreshBtn() 'Map.refSceneManagerVM.RefreshBtn()
End If End If
' termine della selezione ' termine della selezione
@@ -530,7 +530,9 @@ Public Class Hardware
Else Else
SwingTemplate = "RH" SwingTemplate = "RH"
End If End If
IniFile.StdTemplateGetPrivateProfileString("Hardware", "Swing", SwingTemplate, SwingTemplate) If String.IsNullOrEmpty(SwingTemplate) Or Not (GetMainPrivateProfileInt(S_GENERAL, "CloneDoor", 0) = 1) Then
IniFile.StdTemplateGetPrivateProfileString("Hardware", "Swing", SwingTemplate, SwingTemplate)
End If
Map.refHardwarePageVM.GenericPart.SetSwing(SwingTemplate) Map.refHardwarePageVM.GenericPart.SetSwing(SwingTemplate)
If bIsFrame Then If bIsFrame Then
IniFile.StdTemplateGetPrivateProfileString("Hardware", "SwingFrame", "RH", SwingTemplate) IniFile.StdTemplateGetPrivateProfileString("Hardware", "SwingFrame", "RH", SwingTemplate)
@@ -555,17 +557,17 @@ Public Class Hardware
If Map.refHardwarePageVM.GenericPart.CompoList.Count < 1 Then Return If Map.refHardwarePageVM.GenericPart.CompoList.Count < 1 Then Return
'If String.IsNullOrEmpty(HardwareGeneral.JambSide) Then 'If String.IsNullOrEmpty(HardwareGeneral.JambSide) Then
For Each Item In Map.refHardwarePageVM.GenericPart.CompoList(0).CompoParamList For Each Item In Map.refHardwarePageVM.GenericPart.CompoList(0).CompoParamList
If TypeOf Item Is ComboBoxParam AndAlso If TypeOf Item Is ComboBoxParam AndAlso
Item.DDFName = "side" Then Item.DDFName = "side" Then
Dim CBoxPar As ComboBoxParam = DirectCast(Item, ComboBoxParam) Dim CBoxPar As ComboBoxParam = DirectCast(Item, ComboBoxParam)
Dim IndexItem As Integer = CBoxPar.ItemList.IndexOf(CBoxPar.SelItem) Dim IndexItem As Integer = CBoxPar.ItemList.IndexOf(CBoxPar.SelItem)
If IndexItem > -1 Then If IndexItem > -1 Then
HardwareGeneral.SetJambSide(CBoxPar.ItemListDDF(IndexItem)) HardwareGeneral.SetJambSide(CBoxPar.ItemListDDF(IndexItem))
End If
'HardwareGeneral.SetJambSide(CBoxPar.SelItem)
Exit For
End If End If
Next 'HardwareGeneral.SetJambSide(CBoxPar.SelItem)
Exit For
End If
Next
'End If 'End If
If HardwareGeneral.JambSide.ToLower.Contains("hinge") Then If HardwareGeneral.JambSide.ToLower.Contains("hinge") Then
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_LEFT & HINGE Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_LEFT & HINGE
@@ -581,21 +583,21 @@ Public Class Hardware
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_Height) Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_Height)
End If End If
Return Return
ElseIf HardwareGeneral.JambSide.ToLower.Contains("top") Then ElseIf HardwareGeneral.JambSide.ToLower.Contains("top") Then
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_TOP & TOP Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_TOP & TOP
If Not HardwarePartVM.bIsSettingDoor Then If Not HardwarePartVM.bIsSettingDoor Then
Map.refHardwarePageVM.GenericPart.SetWidth(OptionModule.m_Width) Map.refHardwarePageVM.GenericPart.SetWidth(OptionModule.m_Width)
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_ThicknessHead) Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_ThicknessHead)
End If End If
Return Return
ElseIf HardwareGeneral.JambSide.ToLower.Contains("bottom") Then ElseIf HardwareGeneral.JambSide.ToLower.Contains("bottom") Then
Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_BOTTOM & BOTTOM Map.refHardwarePageVM.GenericPart.TypePart = PART_FRAME_BOTTOM & BOTTOM
If Not HardwarePartVM.bIsSettingDoor Then If Not HardwarePartVM.bIsSettingDoor Then
Map.refHardwarePageVM.GenericPart.SetWidth(OptionModule.m_Width) Map.refHardwarePageVM.GenericPart.SetWidth(OptionModule.m_Width)
Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_ThicknessBottom) Map.refHardwarePageVM.GenericPart.SetHeight(OptionModule.m_ThicknessBottom)
End If End If
Return Return
End If End If
End Sub End Sub
@@ -826,7 +828,7 @@ Public Class Hardware
End If End If
End If End If
ParamIndex += 1 ParamIndex += 1
End While ' termina lettura del capitolo End While ' termina lettura del capitolo
GroupChapters.Add(Chapter) GroupChapters.Add(Chapter)
@@ -1876,7 +1878,7 @@ Public Class Hardware
' cerco un numero finito di parametri ' cerco un numero finito di parametri
For IndexParam As Integer = 0 To IndexParamDDF - 1 For IndexParam As Integer = 0 To IndexParamDDF - 1
If LineIndex + ParamIndex > sFile.Count - 1 Then Return False If LineIndex + ParamIndex > sFile.Count - 1 Then Return False
' recuro il nome del parametro ' recupero il nome del parametro
KeyParam = Trim(RegexFunction.KeyParamLine(sFile(LineIndex + ParamIndex))) KeyParam = Trim(RegexFunction.KeyParamLine(sFile(LineIndex + ParamIndex)))
While String.IsNullOrEmpty(KeyParam) And LineIndex + ParamIndex < sFile(LineIndex + ParamIndex).Count While String.IsNullOrEmpty(KeyParam) And LineIndex + ParamIndex < sFile(LineIndex + ParamIndex).Count
ParamIndex += 1 ParamIndex += 1
@@ -2013,21 +2015,27 @@ Public Class Hardware
If Text.ToolTipValue.Contains("Invalid") Then If Text.ToolTipValue.Contains("Invalid") Then
sValue = "0.0000" sValue = "0.0000"
Else Else
sValue = Text.TypeVar & "( " & Text.Value & ")" 'sValue = Text.TypeVar & "( " & Text.Value & ")"
sValue = "inch( " & Text.Value & ")"
End If End If
Else Else
sValue = Text.Value sValue = Text.Value
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")" 'If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
sValue = "mm( " & sValue & ")"
End If End If
Case ConstGen.MM Case ConstGen.MM
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
sValue = Text.Value sValue = Text.Value
InchesToMm(sValue) InchesToMm(sValue)
'sValue = Text.TypeVar & "( " & sValue & ")"
sValue = "inch( " & sValue & ")"
Else Else
If Text.ToolTipValue.Contains("Invalid") Then If Text.ToolTipValue.Contains("Invalid") Then
sValue = "0.0000" sValue = "0.0000"
Else Else
sValue = Text.Value 'sValue = Text.Value
'sValue = Text.TypeVar & "( " & Text.Value & ")"
sValue = "mm( " & Text.Value & ")"
End If End If
End If End If
End Select End Select
@@ -2046,21 +2054,27 @@ Public Class Hardware
If Text.ToolTipValue.Contains("Invalid") Then If Text.ToolTipValue.Contains("Invalid") Then
sValue = "0.0000" sValue = "0.0000"
Else Else
sValue = Text.TypeVar & "( " & Text.Value & ")" 'sValue = Text.TypeVar & "( " & Text.Value & ")"
sValue = "inch( " & Text.Value & ")"
End If End If
Else Else
sValue = Text.Value sValue = Text.Value
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")" 'If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
sValue = "mm( " & sValue & ")"
End If End If
Case ConstGen.MM Case ConstGen.MM
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
sValue = Text.Value sValue = Text.Value
InchesToMm(sValue) InchesToMm(sValue)
'sValue = Text.TypeVar & "( " & sValue & ")"
sValue = "inch( " & sValue & ")"
Else Else
If Text.ToolTipValue.Contains("Invalid") Then If Text.ToolTipValue.Contains("Invalid") Then
sValue = "0.0000" sValue = "0.0000"
Else Else
sValue = Text.Value 'sValue = Text.Value
'sValue = Text.TypeVar & "( " & Text.Value & ")"
sValue = "mm( " & Text.Value & ")"
End If End If
End If End If
End Select End Select
@@ -2093,22 +2107,28 @@ Public Class Hardware
If Text.ToolTipValue.Contains("Invalid") Then If Text.ToolTipValue.Contains("Invalid") Then
sValue = "0.0000" sValue = "0.0000"
Else Else
sValue = Text.TypeVar & "( " & Text.Value & ")" 'sValue = Text.TypeVar & "( " & Text.Value & ")"
sValue = "inch( " & Text.Value & ")"
End If End If
'sValue = Text.TypeVar & "( " & Text.ToolTipValue & ")" 'sValue = Text.TypeVar & "( " & Text.ToolTipValue & ")"
Else Else
sValue = Text.Value sValue = Text.Value
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")" 'If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
sValue = "mm( " & sValue & ")"
End If End If
Case ConstGen.MM Case ConstGen.MM
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
sValue = Text.Value sValue = Text.Value
InchesToMm(sValue) InchesToMm(sValue)
'sValue = Text.TypeVar & "( " & sValue & ")"
sValue = "inch( " & sValue & ")"
Else Else
If Text.ToolTipValue.Contains("Invalid") Then If Text.ToolTipValue.Contains("Invalid") Then
sValue = "0.0000" sValue = "0.0000"
Else Else
sValue = Text.Value 'sValue = Text.Value
'sValue = Text.TypeVar & "( " & Text.Value & ")"
sValue = "mm( " & Text.Value & ")"
End If End If
'sValue = Text.ToolTipValue 'sValue = Text.ToolTipValue
End If End If
@@ -2139,22 +2159,28 @@ Public Class Hardware
If Text.ToolTipValue.Contains("Invalid") Then If Text.ToolTipValue.Contains("Invalid") Then
sValue = "0.0000" sValue = "0.0000"
Else Else
sValue = Text.TypeVar & "( " & Text.Value & ")" 'sValue = Text.TypeVar & "( " & Text.Value & ")"
sValue = "inch( " & Text.Value & ")"
End If End If
'sValue = Text.TypeVar & "( " & Text.ToolTipValue & ")" 'sValue = Text.TypeVar & "( " & Text.ToolTipValue & ")"
Else Else
sValue = Text.Value sValue = Text.Value
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")" 'If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
sValue = "mm( " & Text.Value & ")"
End If End If
Case ConstGen.MM Case ConstGen.MM
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
sValue = Text.Value sValue = Text.Value
InchesToMm(sValue) InchesToMm(sValue)
'sValue = Text.TypeVar & "( " & sValue & ")"
sValue = "inch( " & Text.Value & ")"
Else Else
If Text.ToolTipValue.Contains("Invalid") Then If Text.ToolTipValue.Contains("Invalid") Then
sValue = "0.0000" sValue = "0.0000"
Else Else
sValue = Text.Value 'sValue = Text.Value
'sValue = Text.TypeVar & "( " & Text.Value & ")"
sValue = "mm( " & Text.Value & ")"
End If End If
'sValue = Text.ToolTipValue 'sValue = Text.ToolTipValue
End If End If
+21 -2
View File
@@ -56,9 +56,28 @@ Friend Class MainWindowModel
Dim sKey As String = String.Empty Dim sKey As String = String.Empty
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile) EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey) EgtSetKey(sKey)
Dim sNestKey As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNestKey(sNestKey)
Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
EgtSetNetHwKey(bNetHwKey)
' Impostazioni per chiave di rete
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
EgtSetNetHwKey(bNetKey)
Dim sLockId As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
If Not String.IsNullOrEmpty(sLockId) Then
EgtSetLockId(sLockId)
End If
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2512, 1, IniFile.m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(3279, 2612, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2512, 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())
+63 -4
View File
@@ -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
+7 -1
View File
@@ -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
+3 -3
View File
@@ -32,7 +32,7 @@ Imports System.Windows
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtDOORCreator")> <Assembly: AssemblyProduct("EgtDOORCreator")>
<Assembly: AssemblyCopyright("Copyright © 2016-2023 by Egalware s.r.l.")> <Assembly: AssemblyCopyright("Copyright © 2016-2024 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)> <Assembly: ComVisible(false)>
@@ -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.5.12.2")> <Assembly: AssemblyVersion("2.6.12.1")>
<Assembly: AssemblyFileVersion("2.5.12.2")> <Assembly: AssemblyFileVersion("2.6.12.1")>
+10 -3
View File
@@ -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
@@ -434,19 +441,19 @@ Friend Module OptionModule
Dim Width As String = String.Empty Dim Width As String = String.Empty
DefaultGetPrivateProfileString(S_SIZE_INI, K_WIDTH_INI, "32", Width) DefaultGetPrivateProfileString(S_SIZE_INI, K_WIDTH_INI, "32", Width)
Utility.ConvertCompoConfig(Width, 500) Utility.ConvertCompoConfig(Width, 9999)
m_Width = Width m_Width = Width
Dim dWidth As Double Dim dWidth As Double
If StringToDouble(m_Width, dWidth) Then EgtLuaSetGlobNumVar("W", dWidth) If StringToDouble(m_Width, dWidth) Then EgtLuaSetGlobNumVar("W", dWidth)
Dim Height As String = String.Empty Dim Height As String = String.Empty
DefaultGetPrivateProfileString(S_SIZE_INI, K_HEIGHT_INI, "80", Height) DefaultGetPrivateProfileString(S_SIZE_INI, K_HEIGHT_INI, "80", Height)
Utility.ConvertCompoConfig(Height, 500) Utility.ConvertCompoConfig(Height, 9999)
m_Height = Height m_Height = Height
Dim dHeight As Double Dim dHeight As Double
If StringToDouble(m_Height, dHeight) Then EgtLuaSetGlobNumVar("H", dHeight) If StringToDouble(m_Height, dHeight) Then EgtLuaSetGlobNumVar("H", dHeight)
Dim Thickness As String = String.Empty Dim Thickness As String = String.Empty
DefaultGetPrivateProfileString(S_SIZE_INI, K_THICKNESS_INI, "1.75", Thickness) DefaultGetPrivateProfileString(S_SIZE_INI, K_THICKNESS_INI, "1.75", Thickness)
Utility.ConvertCompoConfig(Thickness, 100) Utility.ConvertCompoConfig(Thickness, 9999)
m_Thickness = Thickness m_Thickness = Thickness
Dim dThickness As Double Dim dThickness As Double
If StringToDouble(m_Thickness, dThickness) Then EgtLuaSetGlobNumVar("T", dThickness) If StringToDouble(m_Thickness, dThickness) Then EgtLuaSetGlobNumVar("T", dThickness)
+14 -10
View File
@@ -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)
+70 -16
View File
@@ -6,7 +6,7 @@ Imports System.ComponentModel
Imports System.IO Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports Ionic.zip Imports Ionic.Zip
Public Class ProjectManagerVM Public Class ProjectManagerVM
Implements INotifyPropertyChanged Implements INotifyPropertyChanged
@@ -411,10 +411,10 @@ Public Class ProjectManagerVM
Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Visible Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Visible
Return Return
End If End If
'------------------------------------------------------------------------------------------------------------------------- '-------------------------------------------------------------------------------------------------------------------------
'Prima di tutto chiedo se vuole aprire un template 'Prima di tutto chiedo se vuole aprire un template
Dim sImportTemplate As String = Map.refAssemblyManagerVM.ShowDialogImportTemplate Dim sImportTemplate As String = Map.refAssemblyManagerVM.ShowDialogImportTemplate
' dichiaro la finestra di dialogo ' dichiaro la finestra di dialogo
Dim saveFileDialog1 As New System.Windows.Forms.SaveFileDialog() Dim saveFileDialog1 As New System.Windows.Forms.SaveFileDialog()
@@ -476,6 +476,7 @@ Public Class ProjectManagerVM
' creo un nuovo assemblato ' creo un nuovo assemblato
Dim Local_AssemblyName As New AssemblyName Dim Local_AssemblyName As New AssemblyName
Local_AssemblyName.Name = FilePathComplete Local_AssemblyName.Name = FilePathComplete
Local_AssemblyName.OrigTemplate = sImportTemplate
Local_AssemblyName.GraphicName = Path.GetFileNameWithoutExtension(FilePathComplete) Local_AssemblyName.GraphicName = Path.GetFileNameWithoutExtension(FilePathComplete)
m_CurrProject.AssemblyList.Add(Local_AssemblyName) m_CurrProject.AssemblyList.Add(Local_AssemblyName)
' Seleziono AssembyName creato ' Seleziono AssembyName creato
@@ -487,13 +488,17 @@ Public Class ProjectManagerVM
End If End If
' tolgo la visualizzazione della lista dei nomi ' tolgo la visualizzazione della lista dei nomi
Map.refAssemblyManagerVM.CurrProject = CurrProject Map.refAssemblyManagerVM.CurrProject = CurrProject
Map.refAssemblyManagerVM.ImportTemplate(sImportTemplate) Dim bImportedTemplate As Boolean = Map.refAssemblyManagerVM.ImportTemplate(sImportTemplate)
' Creo nuovo assembly ' Creo nuovo assembly
Map.refAssemblyManagerVM.NewCmd(Local_AssemblyName) Map.refAssemblyManagerVM.NewCmd(Local_AssemblyName)
Utility.OutLog("Creazione nuovo progetto : " & saveFileDialog1.FileName) Utility.OutLog("Creazione nuovo progetto : " & saveFileDialog1.FileName)
Utility.LockDir(Path.GetDirectoryName(saveFileDialog1.FileName), Path.GetFileNameWithoutExtension(saveFileDialog1.FileName)) Utility.LockDir(Path.GetDirectoryName(saveFileDialog1.FileName), Path.GetFileNameWithoutExtension(saveFileDialog1.FileName))
Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Collapsed Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Collapsed
CurrProject.NotifyPropertyChanged("Name") CurrProject.NotifyPropertyChanged("Name")
' Se l'importazione del template è andata a buon fine allora salvo
If bImportedTemplate Then
Save()
End If
End If End If
End Sub End Sub
@@ -682,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
@@ -698,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
@@ -841,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"
@@ -982,6 +1004,7 @@ Public Class ProjectManagerVM
Local_Assembly.IsModified = False Local_Assembly.IsModified = False
CurrProject.AssemblyList.Add(Local_Assembly) CurrProject.AssemblyList.Add(Local_Assembly)
Else Else
EgtOutLog("LastProject '" & OptionModule.m_sLastProject & "' is not a file or does not exist!")
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
Return Return
End If End If
@@ -1188,17 +1211,48 @@ Public Class ProjectManagerVM
End If End If
' se esite una porta, allora rendo possibile la creazione di un template della porta corrente ' se esite una porta, allora rendo possibile la creazione di un template della porta corrente
If Not IsNothing(Map.refPartPageVM.CurrPart) Then If Not IsNothing(Map.refPartPageVM.CurrPart) Then
' Stampo il file correte nella cartella Template
Dim SaveFileDialog As New MySaveFileDialogVM ' ' Stampo il file correte nella cartella Template
Dim SaveFileDialogWnd As New EgtWPFLib5.SaveFileDialogV(Application.Current.MainWindow, SaveFileDialog) ' Dim SaveFileDialog As New MySaveFileDialogVM
SaveFileDialog.Title = EgtMsg(50417) ' Dim SaveFileDialogWnd As New EgtWPFLib5.SaveFileDialogV(Application.Current.MainWindow, SaveFileDialog)
SaveFileDialog.Directory = IniFile.m_TemplateDir ' SaveFileDialog.Title = EgtMsg(50417)
SaveFileDialog.Extension = DDT_EXTENSION ' SaveFileDialog.Directory = IniFile.m_TemplateDir
'SaveFileDialog.FileName = m_CurrProject.Name & "\" ' SaveFileDialog.Extension = DDT_EXTENSION
' se decido di chiuedere la finestra ' 'SaveFileDialog.FileName = m_CurrProject.Name & "\"
If Not SaveFileDialogWnd.ShowDialog Then ' ' se decido di chiuedere la finestra
' If Not SaveFileDialogWnd.ShowDialog Then
' Return
' End If
' Apro la finestra di salvataggio generica
Dim SaveFileDialog As New System.Windows.Forms.SaveFileDialog()
' controllo se esiste il file DDF
Dim sFilePath As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
If File.Exists(sFilePath) Then
' recupero il nome del template che ha generato il DDF corrente
Dim DDTOrig As String = String.Empty
Dim fStream As String() = File.ReadAllLines(sFilePath)
DDTOrig = ReadOrigTemplate(fStream)
SaveFileDialog.Filter = "(*.ddt) |*.ddt"
SaveFileDialog.FilterIndex = 2
If String.IsNullOrEmpty(DDTOrig) Then
If OptionModule.m_SingleDoor Then
SaveFileDialog.FileName = Path.GetFileNameWithoutExtension(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name)
Else
SaveFileDialog.FileName = Path.GetFileNameWithoutExtension(Map.refAssemblyManagerVM.CurrProject.Name)
End If
Else
SaveFileDialog.FileName = Path.GetFileNameWithoutExtension(DDTOrig)
End If
End If
' avvio la ricerca nell'ultimo direttorio aperto
SaveFileDialog.InitialDirectory = IniFile.m_TemplateDir
If SaveFileDialog.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then
' Interrompo la creazione del template
Return Return
End If End If
' Controllo se ha estensione il nome della porta ' Controllo se ha estensione il nome della porta
If Path.HasExtension(SaveFileDialog.FileName) Then If Path.HasExtension(SaveFileDialog.FileName) Then
Dim sExtension As String = Path.GetExtension(SaveFileDialog.FileName) Dim sExtension As String = Path.GetExtension(SaveFileDialog.FileName)
+37
View File
@@ -0,0 +1,37 @@
<EgtWPFLib5:EgtCustomWindow x:Class="SelectPartV"
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}"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
Height="100" Width="300" Topmost="True"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<!--<EgtWPFLib5:EgtCustomWindow.Resources>
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources>-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<UniformGrid Columns="2" Grid.Row="0" Grid.ColumnSpan="2">
<TextBlock Margin="5" Height="24" Text="{Binding PartDoorMsg}" VerticalAlignment="Center"/>
<ComboBox Margin="5,0,5,0" Height="24" VerticalAlignment="Center"
ItemsSource="{Binding PartDoorList}" SelectedItem="{Binding Selection}"/>
</UniformGrid>
<Button IsDefault="True" Name="OkBtn" Grid.Row="2" Grid.ColumnSpan="2"
Content="{Binding SaveMsg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
+15
View File
@@ -0,0 +1,15 @@
Public Class SelectPartV
Sub New()
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
End Sub
Private Sub OkBtn_Click() Handles OkBtn.Click
Me.Close()
End Sub
End Class
+46
View File
@@ -0,0 +1,46 @@
Public Class SelectPartVM
Private m_Title As String = "Selection of door"
Public ReadOnly Property Title As String
Get
Return m_Title
End Get
End Property
Private m_PartDoorMsg As String = "Select part"
Public ReadOnly Property PartDoorMsg As String
Get
Return m_PartDoorMsg
End Get
End Property
Private m_PartDoorList As New List(Of String)
Public Property PartDoorList As List(Of String)
Get
Return m_PartDoorList
End Get
Set(value As List(Of String))
m_ListPartDoor = value
End Set
End Property
Private m_Selection As String = ""
Public Property Selection As String
Get
Return m_Selection
End Get
Set(value As String)
m_Selection = value
End Set
End Property
Sub New(TitleWd As String, MsgWd As String, nParts As Integer, nIndex As Integer)
m_Title = TitleWd
m_PartDoorMsg = MsgWd
For Index As Integer = 0 To nParts - 1
m_PartDoorList.Add("Door " & nParts.ToString)
Next
m_Selection = "Door " & nIndex.ToString
End Sub
End Class
+14
View File
@@ -121,6 +121,20 @@ Module RegexFunction
Return True Return True
End Function End Function
' leggo dal vettore per cercare la stringa OrigTemplate
Friend Function ReadOrigTemplate(fStream As String()) As String
Dim sOrigTemplate As String = String.Empty
For Each Line As String In fStream
If Line.Contains("#OrigTemplate") Then
sOrigTemplate = Regex.Match(Line, "\s*:\s*(.*?)\s*$").Groups(1).Value
Return sOrigTemplate
Exit For
End If
Next
' Processo il tipo di configurazione
Return sOrigTemplate
End Function
' restituisce quello che segue l'uguale assegnata la parola chiave Err ' restituisce quello che segue l'uguale assegnata la parola chiave Err
Friend Function ErrDraw(sLine As String) As Integer Friend Function ErrDraw(sLine As String) As Integer
Dim sErrMsg As String = Regex.Match(sLine, "\s*(Err)\s*=\s*(.*?\b)\s*$").Groups(2).Value Dim sErrMsg As String = Regex.Match(sLine, "\s*(Err)\s*=\s*(.*?\b)\s*$").Groups(2).Value
+119 -7
View File
@@ -121,12 +121,26 @@ Public Class SceneManagerVM
m_ProjectSceneHost.Child = Nothing m_ProjectSceneHost.Child = Nothing
' Se manca la chiave ' Se manca la chiave
If IniFile.m_nKeyLevel = -1 Or IniFile.m_nKeyLevel = -2 Then If IniFile.m_nKeyLevel = -1 Or IniFile.m_nKeyLevel = -2 Then
EgtOutLog("Missing Dongle") If Not EgtGetNetHwKey() Then
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore" EgtOutLog("Missing Dongle")
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3) ' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1) Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
Else
EgtOutLog("NetDongle is full")
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
End If
ElseIf IniFile.m_nKeyLevel = -9 Then
EgtOutLog("Missing Link with Net Dongle")
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
' Altrimenti manca la licenza ' Altrimenti manca la licenza
Else Else
EgtOutLog("Problems with Licence") EgtOutLog("Problems with Licence")
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore" ' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
@@ -158,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
@@ -332,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
@@ -421,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 ")
+84 -16
View File
@@ -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
@@ -40,6 +44,10 @@ Public Module Utility
End Function End Function
Public Function IsFileLocked(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "", Optional ByVal bSendMsg As Boolean = True) As Boolean Public Function IsFileLocked(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "", Optional ByVal bSendMsg As Boolean = True) As Boolean
If String.IsNullOrEmpty(CurrDirectory) Then
EgtOutLog("Impossible to find directory")
Return False
End If
Dim sLockFile As String = GenerateLockFileName(CurrDirectory, CurrFile) Dim sLockFile As String = GenerateLockFileName(CurrDirectory, CurrFile)
Dim bIsLocked As Boolean = False Dim bIsLocked As Boolean = False
Dim FileList As String() = Directory.GetFiles(CurrDirectory) Dim FileList As String() = Directory.GetFiles(CurrDirectory)
@@ -304,7 +312,32 @@ Public Module Utility
Return "0.0000" Return "0.0000"
End If End If
End Select End Select
ElseIf sValue.Contains("(") And sValue.Contains(")") And Not sValue.Contains("inch") Then ElseIf sValue.Contains("(") And sValue.Contains(")") And sValue.Contains("mm") Then
sValue = Trim(sValue.Replace("mm", ""))
If sValue.StartsWith("(") And sValue.EndsWith(")") Then
Dim ArrayString() As Char = StringToChar(sValue)
ArrayString(0) = CChar("§")
ArrayString(ArrayString.Count - 1) = CChar("§")
sValue = CharToString(ArrayString, sValue)
sValue = Trim(sValue.Replace("§", ""))
End If
If String.IsNullOrEmpty(sValue) Then Return "0.0000"
' ricevo un valore in inches
Select Case OptionModule.m_SelectedMeasureUnit
Case ConstGen.MM ' se la configurazione è inches non faccio conversioni
If StringToDouble(sValue, dVal) Then
Return sValue
Else
Return "0.0000"
End If
Case ConstGen.VAL_INCHES ' se la configurazione è in mm faccio la conevrsione
If MmToInches(sValue) Then
Return sValue
Else
Return "0.0000"
End If
End Select
ElseIf sValue.Contains("(") And sValue.Contains(")") And (Not sValue.Contains("inch") Or Not sValue.Contains("mm")) Then
'sValue = Regex.Match(sValue, "\s*\((.*?)\s*\)\s*\.*").Groups(1).Value 'sValue = Regex.Match(sValue, "\s*\((.*?)\s*\)\s*\.*").Groups(1).Value
If String.IsNullOrEmpty(sValue) Then Return "0.0000" If String.IsNullOrEmpty(sValue) Then Return "0.0000"
' ricevo un valore in mm ' ricevo un valore in mm
@@ -353,7 +386,7 @@ Public Module Utility
Friend Function MmToInches(ByRef sMeasure As String) As Boolean Friend Function MmToInches(ByRef sMeasure As String) As Boolean
Dim dVal As Double = 0.0 Dim dVal As Double = 0.0
If Not StringToDouble(sMeasure, dVal) Then Return False If Not StringToDouble(sMeasure, dVal) Then Return False
dVal = dVal / ONEINCH 'dVal = dVal / ONEINCH
sMeasure = LenToString(dVal, 4) sMeasure = LenToString(dVal, 4)
Return True Return True
End Function End Function
@@ -379,6 +412,10 @@ Public Module Utility
' non eseguo nessun tipo di conversione ' non eseguo nessun tipo di conversione
Return True Return True
Else Else
' la configurazione è già in mm quindi non devo convertire
If OptionModule.m_IsMM Then
Return True
End If
Return InchesToMm(sMeasure) Return InchesToMm(sMeasure)
End If End If
Return False Return False
@@ -417,7 +454,7 @@ Public Module Utility
End If End If
ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And OptionModule.m_IsMM Then ElseIf OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES And OptionModule.m_IsMM Then
' Discordi ' Discordi
If StringToLen(sItems, dDefaultValue) AndAlso dDefaultValue < dControlValue Then If StringToDouble(sItems, dDefaultValue) AndAlso dDefaultValue < dControlValue Then
MmToInches(sItems) MmToInches(sItems)
Return True Return True
End If End If
@@ -525,9 +562,9 @@ Public Module Utility
sMyVal = sMyVal.Replace("H", "(DGD.dH/25.4)") sMyVal = sMyVal.Replace("H", "(DGD.dH/25.4)")
sMyVal = sMyVal.Replace("T", "(DGD.dT/25.4)") sMyVal = sMyVal.Replace("T", "(DGD.dT/25.4)")
Else Else
sMyVal = sMyVal.Replace("W", "DGD.dW") sMyVal = sMyVal.Replace("W", "(DGD.dW)")
sMyVal = sMyVal.Replace("H", "DGD.dH") sMyVal = sMyVal.Replace("H", "(DGD.dH)")
sMyVal = sMyVal.Replace("T", "DGD.dT") sMyVal = sMyVal.Replace("T", "(DGD.dT)")
End If End If
End If End If
Return sMyVal Return sMyVal
@@ -536,16 +573,25 @@ Public Module Utility
Friend Function ConvertToDGD(sTypeVar As String, sValue As String) As String Friend Function ConvertToDGD(sTypeVar As String, sValue As String) As String
Dim sMyVal As String = sValue Dim sMyVal As String = sValue
' se testo numerico, eseguo opportunbe conversioni per H,W e T ' se testo numerico, eseguo opportunbe conversioni per H,W e T
If sTypeVar = ConstGen.INCHES Or sTypeVar = ConstGen.MM Then 'If sTypeVar = ConstGen.INCHES Or sTypeVar = ConstGen.MM Then
If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then ' If OptionModule.m_SelectedMeasureUnit = ConstGen.VAL_INCHES Then
sMyVal = sMyVal.Replace("(DGD.dW/25.4)", "W") ' sMyVal = sMyVal.Replace("(DGD.dW/25.4)", "W")
sMyVal = sMyVal.Replace("(DGD.dH/25.4)", "H") ' sMyVal = sMyVal.Replace("(DGD.dH/25.4)", "H")
sMyVal = sMyVal.Replace("(DGD.dT/25.4)", "T") ' sMyVal = sMyVal.Replace("(DGD.dT/25.4)", "T")
Else ' Else
sMyVal = sMyVal.Replace("DGD.dW", "W") ' sMyVal = sMyVal.Replace("DGD.dW", "W")
sMyVal = sMyVal.Replace("DGD.dH", "H") ' sMyVal = sMyVal.Replace("DGD.dH", "H")
sMyVal = sMyVal.Replace("DGD.dT", "T") ' sMyVal = sMyVal.Replace("DGD.dT", "T")
End If ' End If
'End If
If sMyVal.Contains("25.4") Then
sMyVal = sMyVal.Replace("(DGD.dW/25.4)", "W")
sMyVal = sMyVal.Replace("(DGD.dH/25.4)", "H")
sMyVal = sMyVal.Replace("(DGD.dT/25.4)", "T")
Else
sMyVal = sMyVal.Replace("(DGD.dW)", "W")
sMyVal = sMyVal.Replace("(DGD.dH)", "H")
sMyVal = sMyVal.Replace("(DGD.dT)", "T")
End If End If
Return sMyVal Return sMyVal
End Function End Function
@@ -661,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