cbfdc473c2
-aggiunta dell'HardwareManager, -aggiunta della pagina di stampa.
916 lines
44 KiB
VB.net
916 lines
44 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.Collections.ObjectModel
|
|
Imports System.IO
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class Hardware
|
|
Implements INotifyPropertyChanged
|
|
|
|
Dim bTypeListExist As Boolean = False
|
|
Dim ModelList As New ObservableCollection(Of CompoBrandDir)
|
|
|
|
' i parametetri sono suddivisi in sottocapitolli (gruppi di parametri)
|
|
Private m_GroupChapters As New ObservableCollection(Of Compo)
|
|
Public Property GroupChapters As ObservableCollection(Of Compo)
|
|
Get
|
|
Return m_GroupChapters
|
|
End Get
|
|
Set(value As ObservableCollection(Of Compo))
|
|
m_GroupChapters = value
|
|
End Set
|
|
End Property
|
|
|
|
#Region "BRAND"
|
|
|
|
Private m_BrandList As New ObservableCollection(Of String)
|
|
Public Property BrandList As ObservableCollection(Of String)
|
|
Get
|
|
Return m_BrandList
|
|
End Get
|
|
Set(value As ObservableCollection(Of String))
|
|
m_BrandList = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_SelBrand As String
|
|
Public Property SelBrand As String
|
|
Get
|
|
Return m_SelBrand
|
|
End Get
|
|
Set(value As String)
|
|
m_SelBrand = value
|
|
SetModeltemplate()
|
|
End Set
|
|
End Property
|
|
|
|
#End Region ' Brand
|
|
|
|
#Region "TEMPLATE"
|
|
|
|
Private m_HardwareGeneral As CompoType
|
|
Public Property HardwareGeneral As CompoType
|
|
Get
|
|
Return m_HardwareGeneral
|
|
End Get
|
|
Set(value As CompoType)
|
|
m_HardwareGeneral = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_TemplateList As New ObservableCollection(Of String)
|
|
Public Property TemplateList As ObservableCollection(Of String)
|
|
Get
|
|
Return m_TemplateList
|
|
End Get
|
|
Set(value As ObservableCollection(Of String))
|
|
m_TemplateList = value
|
|
NotifyPropertyChanged("TemplateList")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_SelTemplate As String
|
|
' questa proprietà non è usata nel momento in cui generiamo un nuovo Hardware
|
|
Public Property SelTemplate As String
|
|
Get
|
|
Return m_SelTemplate
|
|
End Get
|
|
Set(value As String)
|
|
If SaveControl() = SaveResult.nCancel Then Return
|
|
m_SelTemplate = value
|
|
If bTypeListExist Then ' False-> errore nel caricamento della lista o non esiste, True-> la lista è stata caricata correttamente
|
|
SetTypeFromTemplate(m_SelTemplate)
|
|
NotifyPropertyChanged("VisibilityType")
|
|
End If
|
|
ClearGroupChapters() ' Prima di procedere ripulisco la pagina dai vacchi paramatri
|
|
ReadChapterTemplate() ' Rileggo i parametri del SetTemplate
|
|
ReadTemplate(m_SelTemplate) ' Carico i dati del template
|
|
Map.refSceneManagerVM.RefreshBtn() ' Creo un file temporaneo per gestire la grafica
|
|
NotifyPropertyChanged("SelTemplate")
|
|
NotifyPropertyChanged("TemplateList")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_VisibilityTemplate As Visibility = Visibility.Visible
|
|
Public Property VisibilityTemplate As Visibility
|
|
Get
|
|
Return m_VisibilityTemplate
|
|
End Get
|
|
Set(value As Visibility)
|
|
m_VisibilityTemplate = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_VisibilityTextTemplate As Visibility = Visibility.Collapsed
|
|
' in caso di nuovo Hardware incollo sopra alla combobox la textbox (non Collasso/Nascondo la combobox!)
|
|
Public Property VisibilityTextTemplate As Visibility
|
|
Get
|
|
If Not m_VisibilityTemplate = Visibility.Visible Then Return Visibility.Collapsed
|
|
Return m_VisibilityTextTemplate
|
|
End Get
|
|
Set(value As Visibility)
|
|
m_VisibilityTextTemplate = value
|
|
NotifyPropertyChanged("VisibilityTextTemplate")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_TemplateName As String = String.Empty
|
|
Public Property TemplateName As String
|
|
Get
|
|
Return m_TemplateName
|
|
End Get
|
|
Set(value As String)
|
|
m_TemplateName = value
|
|
' al momento del slavatggio il nome del file è quello contenuto in m_SelTemplate
|
|
m_SelTemplate = m_TemplateName
|
|
NotifyPropertyChanged("TemplateName")
|
|
End Set
|
|
End Property
|
|
|
|
#End Region ' Name-Template
|
|
|
|
#Region "TYPELIST"
|
|
|
|
Private m_TypeList As New List(Of TypeHardware)
|
|
Public Property TypeList As List(Of TypeHardware)
|
|
Get
|
|
Return m_TypeList
|
|
End Get
|
|
Set(value As List(Of TypeHardware))
|
|
m_TypeList = value
|
|
NotifyPropertyChanged("TypeList")
|
|
End Set
|
|
End Property
|
|
|
|
' per mostrare in grafica la lista
|
|
Private m_TypeListName As New List(Of String)
|
|
Public ReadOnly Property TypeListName As List(Of String)
|
|
Get
|
|
Return m_TypeListName
|
|
End Get
|
|
End Property
|
|
|
|
' se non dovessere esistere un tipo, al momento del salvataggio cerca il file con nome Template ed estensione .Templ
|
|
Private m_SelType As String = "Template"
|
|
Public Property SelType As String
|
|
Get
|
|
Return m_SelType
|
|
End Get
|
|
Set(value As String)
|
|
m_SelType = value
|
|
' se la text è visibile non passo mai dal SelTemplate quindi sposto qui il caricamento dei dati
|
|
If VisibilityTextTemplate = Visibility.Visible Then
|
|
ClearGroupChapters()
|
|
ReadChapterTemplate()
|
|
End If
|
|
NotifyPropertyChanged("SelType")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_VisibilityType As Visibility = Visibility.Collapsed
|
|
Public Property VisibilityType As Visibility
|
|
Get
|
|
Return m_VisibilityType
|
|
End Get
|
|
Set(value As Visibility)
|
|
m_VisibilityType = value
|
|
NotifyPropertyChanged("VisibilityType")
|
|
End Set
|
|
End Property
|
|
|
|
' se non viene modificata il tipo non può essere modificato
|
|
Private m_IsEnableType As Boolean = False
|
|
Public Property IsEnableType As Boolean
|
|
Get
|
|
If Not VisibilityType = Visibility.Visible Then Return False
|
|
Return m_IsEnableType
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_IsEnableType = value
|
|
NotifyPropertyChanged("IsEnableType")
|
|
End Set
|
|
End Property
|
|
|
|
#End Region ' TypeList
|
|
|
|
#Region "GENERAL FUNCTION"
|
|
|
|
#Region "Caricamento"
|
|
|
|
' Carica il nome della Componente, La lista dei template, La lista dei tipi
|
|
Public Sub LoadTemplate(ByRef CurrCompoType As CompoType)
|
|
Dim ErrorList As String = String.Empty
|
|
' carico il general dell'hardware
|
|
m_HardwareGeneral = CurrCompoType
|
|
NotifyPropertyChanged("HardwareGeneral")
|
|
If EgtUILib.GetPrivateProfileInt(S_TEMPLATE, K_ISACTIVE, 1, CurrCompoType.Path & "\" & CONFIGINI_FILE_NAME) <> 0 Then
|
|
GetDirectoryCompoModel(CurrCompoType.Path, ModelList)
|
|
If ModelList.Count > 0 Then
|
|
For IndexModel As Integer = 0 To ModelList.Count - 1
|
|
BrandList.Add(ModelList(IndexModel).ModelDirGraphic)
|
|
Next
|
|
' prendo il primo direttorio
|
|
For IndexFile As Integer = 0 To ModelList(0).ModelFileList.Count - 1
|
|
TemplateList.Add(ModelList(0).ModelFileList(IndexFile))
|
|
Next
|
|
bTypeListExist = LoadType() ' carico la lista dei Type
|
|
m_SelBrand = m_BrandList(0) ' Carico il primo modello della lista
|
|
NotifyPropertyChanged("SelBrand")
|
|
Dim SelItemindex As Integer = 0
|
|
While Path.HasExtension(m_TemplateList(SelItemindex)) And SelItemindex < m_TemplateList.Count - 1
|
|
SelItemindex += 1
|
|
End While
|
|
SelTemplate = m_TemplateList(SelItemindex)
|
|
End If
|
|
Else ' se non c'è il template
|
|
VisibilityTemplate = Visibility.Collapsed
|
|
NotifyPropertyChanged("VisibilityTemplate")
|
|
End If
|
|
End Sub
|
|
|
|
Public Sub SetModeltemplate()
|
|
For IndexModelList As Integer = 0 To m_BrandList.Count - 1
|
|
If m_BrandList(IndexModelList) = m_SelBrand Then
|
|
m_TemplateList = ModelList(IndexModelList).ModelFileList
|
|
Exit For
|
|
End If
|
|
Next
|
|
Dim SelItemindex As Integer = 0
|
|
While Path.HasExtension(m_TemplateList(SelItemindex)) And SelItemindex < m_TemplateList.Count - 1
|
|
SelItemindex += 1
|
|
End While
|
|
' se la text non è visbilie allora seleziono il primo della lista
|
|
If Not m_VisibilityTextTemplate = Visibility.Visible Then SelTemplate = m_TemplateList(SelItemindex)
|
|
End Sub
|
|
|
|
' carico la lista dei tipi --> devo stampare gli errori
|
|
Private Function LoadType() As Boolean
|
|
Dim ErrorMsg As String = String.Empty
|
|
' costruisco la Path del template da leggere
|
|
IniFile.m_StdTemplate = m_HardwareGeneral.Path & "\StdTemplate.ini"
|
|
If Not File.Exists(IniFile.m_StdTemplate) Then Return False
|
|
Dim List As New List(Of String) ' lista temporanea "1/Mort"
|
|
If IniFile.StdTemplateGetPrivateProfileList("Hardware", "Type", List) Then
|
|
m_VisibilityType = Visibility.Visible ' rendo visibile la lista
|
|
' leggo nomi
|
|
Dim ArrayNameSplit(1) As String
|
|
For IndexListType As Integer = 0 To List.Count - 1
|
|
ArrayNameSplit = List(IndexListType).Split("/"c)
|
|
If IsNumeric(ArrayNameSplit(0)) Then
|
|
m_TypeList.Add(New TypeHardware(ArrayNameSplit(1), ArrayNameSplit(0)))
|
|
m_TypeListName.Add(ArrayNameSplit(1))
|
|
Else
|
|
ErrorMsg = "In file StdTempate.ini is missing numeric param in [Type]"
|
|
TypeList.Add(New TypeHardware("Error!", "0"))
|
|
Return False ' interrompo la lettura
|
|
End If
|
|
Next
|
|
NotifyPropertyChanged("TypeList")
|
|
NotifyPropertyChanged("TypeListName")
|
|
Else
|
|
m_VisibilityType = Visibility.Collapsed
|
|
Return False ' se la lista è vuota restituisco falso
|
|
End If
|
|
Return True
|
|
End Function
|
|
|
|
' setta il valore del template --> devo stampare gli errori
|
|
Private Function SetTypeFromTemplate(value As String) As Boolean
|
|
' carico di Default il valore 1
|
|
For IndexListType As Integer = 0 To TypeList.Count - 1
|
|
If TypeList(IndexListType).NameINI = "1" Then
|
|
m_SelType = TypeListName(IndexListType)
|
|
NotifyPropertyChanged("SelType")
|
|
Exit For
|
|
End If
|
|
Next
|
|
' inizio la lettura del file lua selezionato
|
|
Dim CurrConfig As String = m_HardwareGeneral.Path & "\" & CONFIGINI_FILE_NAME
|
|
Dim ModelDir As String = String.Empty
|
|
If m_SelBrand <> RegexFunction.ModelTemplate(m_HardwareGeneral.Path) Then ModelDir = m_SelBrand & "\"
|
|
Dim CurrItemPath As String = m_HardwareGeneral.Path & "\" & ModelDir & value
|
|
|
|
Dim ErrorMsg As String = String.Empty
|
|
' se il file ha estensione nge
|
|
If Path.HasExtension(CurrItemPath) AndAlso Path.GetExtension(CurrItemPath).ToLower = NGE_EXTENSION Then
|
|
If Not File.Exists(CurrItemPath) Then ErrorMsg = "File does not exist" : Return False ' controllo che esiste il file altrimenti esco
|
|
' m_TemplateSelItem = value
|
|
' ' creo la stringa che contiene la lista degli errori
|
|
' Dim ParamIndex As Integer = 1
|
|
Dim ConfigDefault As String = String.Empty ' configurazione del template
|
|
' Dim NewCompoParam As CompoParam = Nothing
|
|
EgtUILib.GetPrivateProfileString(S_NGECONFIG, K_DEFAULT, "", ConfigDefault, CurrConfig)
|
|
For IndexTypeList As Integer = 0 To TypeList.Count - 1
|
|
If TypeList(IndexTypeList).NameINI = ConfigDefault Then Exit For Else ErrorMsg = "Definition type is not correct: " & ConfigDefault : Return False
|
|
Next
|
|
' ' ricerco la parola chiave Param nella stringa nel file Config.ini
|
|
' ReadParamConfig(NewCompoParam, ErrorList, ParamIndex, ConfigDefault)
|
|
Else
|
|
' se il file non ha estensione allora aggiungo l'estensione .lua
|
|
If Not Path.GetExtension(CurrItemPath).ToLower = LUA_EXTENSION Then
|
|
CurrItemPath &= LUA_EXTENSION
|
|
End If
|
|
' controllo che esiste il file altrimenti esco
|
|
If Not File.Exists(CurrItemPath) Then ErrorMsg = "File does not exist" : Return False
|
|
' m_TemplateSelItem = value
|
|
' carico un vettore con le stringhe del file corrente
|
|
Dim ReadCurrCompo() As String = File.ReadAllLines(CurrItemPath)
|
|
Dim EndOfFile As Boolean = False
|
|
' leggo il vettore di stringhe del file corrente
|
|
For LineIndex = 0 To ReadCurrCompo.Count - 1
|
|
' copio il valore della riga
|
|
Dim CurrCompoFileLine As String = ReadCurrCompo(LineIndex)
|
|
' cerco il titolo [Graphic parameters]: se lo trovo
|
|
If RegexFunction.IsGraphicParametersTitle(CurrCompoFileLine) Then
|
|
' mi preparo per leggere la prima riga dopo il titolo
|
|
Dim ParamIndex As Integer = 1
|
|
' Dim NewCompoParam As CompoParam = Nothing
|
|
' Dim bIsFinished As Boolean = False
|
|
' se la lettura del primo parametro "--Default=" restituisce un valore non nullo
|
|
If Not String.IsNullOrWhiteSpace(ParamLine(ReadCurrCompo(LineIndex + ParamIndex), K_DEFAULT)) Then
|
|
Dim ConfigDefault As String = Trim(ParamLine(ReadCurrCompo(LineIndex + ParamIndex), K_DEFAULT))
|
|
If Not IsNumeric(ConfigDefault) Then
|
|
ErrorMsg = "In file " & CurrItemPath & " param 'Default' must be numeric."
|
|
Return False ' valore letto non è numerico
|
|
Else
|
|
For IndexListType As Integer = 0 To TypeList.Count - 1
|
|
If TypeList(IndexListType).NameINI = ConfigDefault Then
|
|
m_SelType = TypeListName(IndexListType)
|
|
NotifyPropertyChanged("SelType")
|
|
Exit For
|
|
End If
|
|
Next
|
|
Exit For
|
|
End If
|
|
'Else
|
|
' ' se il primo parametro non è "Dafault" allora mi aspetto di leggere i parametri
|
|
' While Not bIsFinished
|
|
' ' attualizzo il componente a nulla
|
|
' NewCompoParam = Nothing
|
|
' ' cerco nella riga successiva al titolo il primo parametro
|
|
' If Not String.IsNullOrWhiteSpace(ReadCurrCompo(LineIndex + ParamIndex)) Then
|
|
' Dim ReadLine As String
|
|
' ' carico i valori della stringa che seguono la chiave "--Param1="
|
|
' ReadLine = ParamLine(ReadCurrCompo(LineIndex + ParamIndex), K_PARAM & ParamIndex)
|
|
|
|
' ' se uno dei paraemtri è completamente sbagliato allora restituisce falso e non riempo la NewCompoParam che rimane Nothing
|
|
' bIsFinished = Not ReadParam(ReadLine, NewCompoParam, ErrorList)
|
|
' Else
|
|
' ' altrimenti se la riga è vuota mi sposto alla successiva
|
|
' LineIndex += 1
|
|
' ' e continuo il ciclo while
|
|
' Continue While
|
|
End If
|
|
' ' insrisco la nuova componenenet: se la riga è vuota o la componente non è stata creata allora il componete è Nothing
|
|
' InsertCompoParam(NewCompoParam, ParamIndex)
|
|
' ' se il parametro è stato creato passa alla riga successiva
|
|
' If Not bIsFinished Then ParamIndex += 1
|
|
' End While
|
|
' NotifyPropertyChanged("TemplateSelItem")
|
|
End If
|
|
|
|
' ' esiste già una lista
|
|
' For DeleteIndex = m_CompoParamList.Count - 1 To ParamIndex - 1 Step -1
|
|
' m_CompoParamList.RemoveAt(DeleteIndex)
|
|
' Next
|
|
' Exit For
|
|
' ElseIf LineIndex = ReadCurrCompo.Count - 1 Then
|
|
' ' se non trovo il capitoletto nel file leggo i parametri di default del file Config.ini
|
|
|
|
' Dim ParamIndex As Integer = 1
|
|
' Dim NewCompoParam As CompoParam = Nothing
|
|
' ReadParamConfig(NewCompoParam, ErrorList, ParamIndex, "")
|
|
' Exit For
|
|
' End If
|
|
Next
|
|
|
|
End If
|
|
'If Not String.IsNullOrWhiteSpace(ErrorList) Then EgtOutLog(ErrorList)
|
|
''----------------------------------------------------------------------------------------------------------------------------------------------
|
|
'If Assembly.BuiltReffCompo Then
|
|
' Dim FrameCompoFile As String = String.Empty
|
|
' Dim FrameCompoFileConfig As String = String.Empty
|
|
' Dim nDoorNbr As Integer = 1
|
|
' Int32.TryParse(Map.refAssemblyPageVM.CurrAssembly.DoorNumber, nDoorNbr)
|
|
' If CalcCompoMatching(Me.CompoType.Path, nDoorNbr, Me.TemplateSelItem, FrameCompoFile) AndAlso
|
|
' Not String.IsNullOrEmpty(FrameCompoFile) Then
|
|
' If Not SearchFileConfig(FrameCompoFile, FrameCompoFileConfig) Then
|
|
' MessageBox.Show("Jamb compo does not exist", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
|
' If Not IsNothing(Me.refJambCompo) Then
|
|
' Map.refPartPageVM.CurrPart.RemoveRefCompo(Me.refJambCompo)
|
|
' Me.refJambCompo = Nothing
|
|
' Return
|
|
' End If
|
|
' Else
|
|
' Dim FrameCompoNameDDF As String = String.Empty
|
|
' Dim FrameCompoName As String = String.Empty
|
|
' Dim Side As String = String.Empty
|
|
' Dim CurrCompoPath As String = FrameCompoFileConfig
|
|
' ' sostituisco il vecchio CompoType con quello corretto
|
|
' If File.Exists(CurrCompoPath) Then
|
|
' GetPrivateProfileCompoName(ConstCompo.S_COMPO, ConstCompo.K_NAME, FrameCompoNameDDF, FrameCompoName, CurrCompoPath)
|
|
' GetPrivateProfileJambSide(S_POSITIONSIDE, K_SIDE, Side, Me.CompoType.Path & "\" & CONFIGINI_FILE_NAME)
|
|
' If String.IsNullOrEmpty(Side) Then
|
|
' ' controllo nell'elenco dei parametri se esiste un parametro di tipo Side
|
|
' For IndexParam As Integer = 0 To Me.CompoParamList.Count - 1
|
|
' If Me.CompoParamList(IndexParam).DDFName.ToLower = "side" Then
|
|
' Side = DirectCast(Me.CompoParamList(IndexParam), ComboBoxParam).SelItem
|
|
' Exit For
|
|
' End If
|
|
' Next
|
|
' End If
|
|
' '-------------------------------------------------------------------------------------------------------------------------------
|
|
' If IsNothing(Me.refJambCompo) Then
|
|
' Part.CreateRefCompo(Me.CompoType, Me, Map.refAssemblyPageVM.CurrAssembly, FrameCompoFileConfig, FrameCompoFile, Map.refPartPageVM.CurrPart)
|
|
' If CompoMatch.LoadCompoParam(Me, Map.refPartPageVM.CurrPart.TypePart) Then Map.refAssemblyPageVM.CurrAssembly.UpDateCurrCompoJamb(Me)
|
|
' For IndexParam As Integer = 0 To Me.refJambCompo.CompoParamList.Count - 1
|
|
' If Me.refJambCompo.CompoParamList(IndexParam).DDFName.ToLower = "side" Then
|
|
' ' assegno alla componente del frame la stessa posizione definita sull'anta
|
|
' DirectCast(Me.refJambCompo.CompoParamList(IndexParam), ComboBoxParam).SetSelItem(Me.CompoType.JambSide)
|
|
' Exit For
|
|
' End If
|
|
' Next
|
|
' Return
|
|
' End If
|
|
' '-------------------------------------------------------------------------------------------------------------------------------
|
|
' Me.refJambCompo.CompoType.SetDDFName(FrameCompoNameDDF)
|
|
' Me.refJambCompo.CompoType.SetName(FrameCompoName)
|
|
' Dim FrameCompoDirectory As String
|
|
' FrameCompoDirectory = FrameCompoFileConfig.Remove(FrameCompoFileConfig.LastIndexOf("\"))
|
|
' Me.refJambCompo.CompoType.SetPath(FrameCompoDirectory)
|
|
' Me.refJambCompo.CompoType.SetJambSide(Side)
|
|
' End If
|
|
' End If
|
|
' ' Carico il nome
|
|
' FrameCompoFile = FrameCompoFile.Substring(FrameCompoFileConfig.LastIndexOf("\") + 1)
|
|
' Me.refJambCompo.SetTemplateSelItemRefCompo(FrameCompoFile, Me.refJambCompo)
|
|
' LoadCompoParam(Me, Map.refPartPageVM.CurrPart.TypePart)
|
|
' Map.refAssemblyPageVM.CurrAssembly.UpDateCurrCompoJamb(Me)
|
|
' ResetCompoParam()
|
|
' Else
|
|
' If Not IsNothing(Me.refJambCompo) Then
|
|
' Map.refPartPageVM.CurrPart.RemoveRefCompo(Me.refJambCompo)
|
|
' Me.refJambCompo = Nothing
|
|
' End If
|
|
' End If
|
|
'End If
|
|
Return True
|
|
End Function
|
|
|
|
' ricerca il nome dei capitoli associati e chiama la lettura dei parametri
|
|
Public Sub ReadChapterTemplate()
|
|
Dim ErrorList As String = String.Empty
|
|
Dim sParam As String = String.Empty ' la stringa che contiene tutte le informazioni della componente
|
|
Dim ParamIndex As Integer = 1
|
|
Dim ChapterIndex As Integer = 1 ' numero del capitolo
|
|
Dim IndexChapter As String = "1"
|
|
For IndexTypeList As Integer = 0 To m_TypeList.Count - 1
|
|
If m_TypeList(IndexTypeList).Name = SelType Then
|
|
IndexChapter = m_TypeList(IndexTypeList).NameINI
|
|
Exit For
|
|
End If
|
|
Next
|
|
Dim S_CHAPTER As String = S_GR_PARAM_HARDWARE & IndexChapter & "." ' il nome del capitolo da leggere "ParametersN."
|
|
While EgtUILib.GetPrivateProfileString(S_CHAPTER & ChapterIndex, K_PARAM & ParamIndex, "", sParam, IniFile.m_StdTemplate) > 0 ' Verifico che esista il capitolo nuovo "Type-ChapterIndex"
|
|
Dim Chapter As New Compo(m_HardwareGeneral)
|
|
Dim Name As String = String.Empty
|
|
Dim LuaName As String = String.Empty
|
|
If StdTemplateGetPrivateProfileChapterName(S_CHAPTER & ChapterIndex, "Name", LuaName, Name) Then
|
|
Chapter.TemplateName = Name
|
|
End If
|
|
While EgtUILib.GetPrivateProfileString(S_CHAPTER & ChapterIndex, K_PARAM & ParamIndex, "", sParam, IniFile.m_StdTemplate) > 0 ' Verifico che esista il parametro nuovo "Param-ParamIndex"
|
|
If Not String.IsNullOrWhiteSpace(sParam) Then
|
|
Dim NewParam As New CompoParam(m_HardwareGeneral.DDFName, m_HardwareGeneral.Name, Chapter)
|
|
' leggo il tipo di parametro, se la lettura va a buon fine la carico
|
|
If Chapter.ReadParamHardware(sParam, NewParam, ErrorList) Then Chapter.CompoParamList.Add(NewParam)
|
|
End If
|
|
ParamIndex += 1
|
|
End While ' termina lettura del capitolo
|
|
GroupChapters.Add(Chapter)
|
|
ParamIndex = 1
|
|
ChapterIndex += 1
|
|
End While ' termina lettura della configurazione
|
|
If Not String.IsNullOrEmpty(ErrorList) Then
|
|
MessageBox.Show(ErrorList, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
|
End If
|
|
End Sub
|
|
|
|
' elimina le liste di parametri precedenti ad ogni selezione
|
|
Public Sub ClearGroupChapters()
|
|
If Not IsNothing(GroupChapters) Then
|
|
GroupChapters.Clear()
|
|
End If
|
|
NotifyPropertyChanged("GroupChapters")
|
|
End Sub
|
|
|
|
Friend Function ReadTemplate(sFile As String) As Boolean
|
|
' inizio la lettura del file lua selezionato
|
|
Dim FileContent() As String
|
|
Dim ModelDir As String = String.Empty
|
|
If m_SelBrand <> RegexFunction.ModelTemplate(m_HardwareGeneral.Path) Then ModelDir = m_SelBrand & "\"
|
|
Dim CurrItemPath As String = m_HardwareGeneral.Path & "\" & ModelDir & sFile
|
|
If Not Path.HasExtension(CurrItemPath) Then CurrItemPath &= LUA_EXTENSION
|
|
Dim ErrorMsg As String = String.Empty
|
|
' se il file ha estensione o se ha estensione nge: esco
|
|
If Path.GetExtension(CurrItemPath).ToLower = NGE_EXTENSION Then
|
|
ErrorMsg = "File has nge extension."
|
|
Return False
|
|
End If
|
|
If Not File.Exists(CurrItemPath) Then ErrorMsg = "File does not exist" : Return False ' controllo che esiste il file altrimenti esco
|
|
FileContent = File.ReadAllLines(CurrItemPath)
|
|
' se il file esiste ma è vuoto
|
|
If FileContent.Count = 0 Then
|
|
MessageBox.Show(EgtMsg(50107), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
|
End If
|
|
For IndexLine As Integer = 0 To FileContent.Count - 1
|
|
Dim CurrLine As String = Utility.DeleteLuaComment(FileContent(IndexLine))
|
|
Dim sLine() As String = CurrLine.Split("="c)
|
|
If sLine.Count < 2 OrElse sLine.Count > 2 Then Continue For
|
|
FindParamTemplateInConfigList(Trim(sLine(0)), Trim(sLine(1)))
|
|
Next
|
|
Return True
|
|
End Function
|
|
|
|
Private Function FindParamTemplateInConfigList(sParam As String, sValue As String) As Boolean
|
|
For IndexGroupChapters As Integer = 0 To m_GroupChapters.Count - 1
|
|
For IndexChapter As Integer = 0 To m_GroupChapters(IndexGroupChapters).CompoParamList.Count - 1
|
|
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = sParam Then
|
|
' ho trovato una corrispondenza tra il valore de file ini e quello lua in lettura
|
|
If TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxDGCParam Then
|
|
Dim Text As TextBoxDGCParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxDGCParam)
|
|
Dim sItems() As String = sValue.Split("+"c)
|
|
Dim sLen As String = Trim(Utility.GetMeasure(sItems(0)))
|
|
Dim dVal As Double = 0.0
|
|
Text.SetValue(sLen)
|
|
Text.SetConst(Text.ConstList(0))
|
|
If sItems.Count >= 2 Then
|
|
For IndexConst As Integer = 0 To Text.ConstList.Count - 1
|
|
If Text.ConstList(IndexConst) = Trim(sItems(1)) Then Text.SetConst(Text.ConstList(IndexConst)) : Exit For
|
|
Next
|
|
End If
|
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxParam Then
|
|
Dim Text As TextBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxParam)
|
|
' controllo il tipo di dato che si aspetta
|
|
Select Case Text.TypeVar
|
|
Case "inch"
|
|
Dim sLen As String = Trim(Utility.GetMeasure(sValue))
|
|
Text.SetValue(sLen)
|
|
Case "mm"
|
|
Dim sLen As String = Trim(Utility.GetMeasure(sValue))
|
|
Text.SetValue(sLen)
|
|
Case "double"
|
|
Dim dVal As Double = 0.0
|
|
If StringToDouble(sValue, dVal) Then Text.SetValue(sValue) Else Text.SetValue("0.000")
|
|
Case "string"
|
|
Text.SetValue(Trim(Utility.DeleteSuperScript(sValue)))
|
|
End Select
|
|
|
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is CheckBoxParam Then
|
|
Dim Text As CheckBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), CheckBoxParam)
|
|
Text.SetIsChecked(Utility.ConvertCheckBox(sValue))
|
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxParam Then
|
|
Dim Text As ComboBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxParam)
|
|
Text.SetSelItem(Text.ItemList(0))
|
|
For IndexCombo As Integer = 0 To Text.ItemListDDF.Count - 1
|
|
If Trim(Text.ItemListDDF(IndexCombo)) = Trim(Utility.DeleteSuperScript(sValue)) Then Text.SetSelItem(Text.ItemList(IndexCombo))
|
|
Next
|
|
End If
|
|
Return True
|
|
End If
|
|
Next
|
|
Next
|
|
Return False
|
|
End Function
|
|
|
|
#End Region ' Caricamneto
|
|
|
|
#Region "Salvataggio, Duplica, Aggiorna"
|
|
|
|
Public Function Duplicate(sSelBrand As String, sTemplate As String) As Boolean
|
|
If IsNothing(m_SelTemplate) Then
|
|
MessageBox.Show("Impossible to duplicate Hardware if there is no Hardware selected!", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
|
Return False
|
|
End If
|
|
If IsNothing(sTemplate) Then
|
|
MessageBox.Show("Missing name of the new template!", EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
|
Return False
|
|
End If
|
|
' ricostruico il percorso del file da dupicare
|
|
Dim ModelDir As String = String.Empty
|
|
If m_SelBrand <> RegexFunction.ModelTemplate(m_HardwareGeneral.Path) Then ModelDir = m_SelBrand & "\"
|
|
Dim OldDirPath As String = m_HardwareGeneral.Path & "\" & ModelDir & m_SelTemplate & LUA_EXTENSION
|
|
' ricostruisco il nuovo file da creare
|
|
ModelDir = String.Empty
|
|
If sSelBrand <> RegexFunction.ModelTemplate(m_HardwareGeneral.Path) Then ModelDir = sSelBrand & "\"
|
|
Dim CurrDirPath As String = m_HardwareGeneral.Path & "\" & ModelDir & sTemplate & LUA_EXTENSION
|
|
Dim IndexModel As Integer
|
|
Dim TemSelBrand As String = String.Empty
|
|
' carico la lista dei file presenti nel direttorio selezionato
|
|
Dim Temp_TemplateList As New ObservableCollection(Of String)
|
|
For IndexModel = 0 To ModelList.Count - 1
|
|
If ModelList(IndexModel).ModelDirGraphic = sSelBrand Then
|
|
TemSelBrand = ModelList(IndexModel).ModelDirGraphic
|
|
Temp_TemplateList = ModelList(IndexModel).ModelFileList
|
|
Exit For
|
|
End If
|
|
Next
|
|
' controllo se il nome è già presente nel direttorio selezionato
|
|
Dim bNameExist As Boolean = False
|
|
Dim IndexHardwList As Integer
|
|
For IndexHardwList = 0 To m_TemplateList.Count - 1
|
|
If m_TemplateList(IndexHardwList) = sTemplate Then
|
|
' se il nome è nella lista allora esco dal ciclo e rendo falsa la variabile bNameExist
|
|
bNameExist = True
|
|
Exit For
|
|
End If
|
|
bNameExist = False
|
|
Next
|
|
' se il nome esite già nel direttorio selezionato
|
|
If bNameExist Then
|
|
Select Case MessageBox.Show("The file: " & sTemplate & " already exist in directory " & sSelBrand & " . Do you want to overwrite it?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
|
' decido di sovrescrivere il file esistente
|
|
Case MessageBoxResult.Yes
|
|
If File.Exists(CurrDirPath) Then
|
|
Try
|
|
' elimino il file
|
|
File.Delete(CurrDirPath)
|
|
Catch ex As FileNotFoundException
|
|
' non è un problema
|
|
Catch ex As Exception
|
|
' non è un problema
|
|
End Try
|
|
End If
|
|
Case Else
|
|
' deicido di non sovrescrivere interrompo
|
|
Return False
|
|
End Select
|
|
End If
|
|
' elimino ilnome dalla lista dei file (alla fine il nome verrà aggiunto ancora)
|
|
For IndexTempList As Integer = 0 To m_TemplateList.Count - 1
|
|
If m_TemplateList(IndexTempList) = sTemplate Then
|
|
TemplateList.RemoveAt(IndexTempList)
|
|
Exit For
|
|
End If
|
|
Next
|
|
' carico le variabili temporanee e aggiorno la grafica (lista dei file e Brand selezionato)
|
|
SelBrand = TemSelBrand
|
|
TemplateList = Temp_TemplateList
|
|
NotifyPropertyChanged("TemplateList")
|
|
NotifyPropertyChanged("SelBrand")
|
|
' copio il file
|
|
Try
|
|
File.Copy(OldDirPath, CurrDirPath, True)
|
|
Catch ex As System.IO.IOException
|
|
MessageBox.Show("Error in copying: " & ex.Message)
|
|
' interrompo la copia e la creazione del nuovo file
|
|
File.Delete(CurrDirPath)
|
|
Return False
|
|
End Try
|
|
' aggiungo il nome alla lista
|
|
TemplateList.Add(sTemplate)
|
|
For IndexTempList As Integer = 0 To m_TemplateList.Count - 1
|
|
' aggiorno la grafica con il valore selzionato tra i template
|
|
If m_TemplateList(IndexTempList) = sTemplate Then SelTemplate = m_TemplateList(IndexTempList)
|
|
Next
|
|
RefreshTemplateListEgtDOORCreator()
|
|
Return True
|
|
End Function
|
|
|
|
' crea il file temporaneao per aggiornare la parte grafica
|
|
Public Function RefreshTempHardware() As Boolean
|
|
Dim ErrorMsg As String = String.Empty
|
|
' costruisco la Path del template da leggere
|
|
Dim TemplFile = m_HardwareGeneral.Path & "\" & m_SelType & ".templ "
|
|
If Not File.Exists(TemplFile) Then Return False
|
|
Dim FileContent() As String = File.ReadAllLines(TemplFile)
|
|
' inizio la lettura riga per riga
|
|
For IndexLine As Integer = 0 To FileContent.Count - 1
|
|
Dim CurrLine As String = Utility.DeleteLuaComment(FileContent(IndexLine))
|
|
Dim sLine() As String = CurrLine.Split("="c)
|
|
If sLine.Count < 2 OrElse sLine.Count > 2 Then Continue For ' significa che non è un parametro
|
|
Dim sValue As String = Trim(sLine(1))
|
|
Dim sTemplValue As String = Trim(sLine(1))
|
|
If Not ConvertValueForLua(sValue) Then Continue For
|
|
FileContent(IndexLine) = FileContent(IndexLine).Replace(sTemplValue, sValue)
|
|
Next
|
|
' costruisco il nome del percorso del file corrente
|
|
Dim sTempFileHardw As String = m_HardwareGeneral.Path & "\" & TEMP_FILE_HARDWARE
|
|
' salvo il file
|
|
File.WriteAllLines(sTempFileHardw, FileContent)
|
|
' aggiungo la componente
|
|
Map.refHardwarePageVM.Door.CompoList.Clear()
|
|
Map.refHardwarePageVM.Door.AddNewHardware(m_HardwareGeneral, Path.GetFileNameWithoutExtension(TEMP_FILE_HARDWARE))
|
|
'Map.refSceneManagerVM.RefreshBtn()
|
|
Return True
|
|
End Function
|
|
|
|
Public Function Save() As Boolean
|
|
Dim ErrorMsg As String = String.Empty
|
|
' costruisco la Path del template da leggere
|
|
Dim TemplFile = m_HardwareGeneral.Path & "\" & m_SelType & ".templ "
|
|
If Not File.Exists(TemplFile) Then Return False
|
|
Dim FileContent() As String = File.ReadAllLines(TemplFile)
|
|
' inizio la lettura riga per riga
|
|
For IndexLine As Integer = 0 To FileContent.Count - 1
|
|
Dim CurrLine As String = Utility.DeleteLuaComment(FileContent(IndexLine))
|
|
Dim sLine() As String = CurrLine.Split("="c)
|
|
If sLine.Count < 2 OrElse sLine.Count > 2 Then Continue For ' significa che non è un parametro
|
|
Dim sValue As String = Trim(sLine(1))
|
|
Dim sTemplValue As String = Trim(sLine(1))
|
|
If Not ConvertValueForLua(sValue) Then Continue For
|
|
FileContent(IndexLine) = FileContent(IndexLine).Replace(sTemplValue, sValue)
|
|
Next
|
|
' costruisco il nome del percorso del file corrente
|
|
Dim CurrConfig As String = m_HardwareGeneral.Path & "\" & CONFIGINI_FILE_NAME
|
|
Dim ModelDir As String = String.Empty
|
|
If m_SelBrand <> RegexFunction.ModelTemplate(m_HardwareGeneral.Path) Then ModelDir = m_SelBrand & "\"
|
|
Dim CurrItemPath As String = m_HardwareGeneral.Path & "\" & ModelDir & m_SelTemplate & LUA_EXTENSION
|
|
' devo controllare che il file con questo nome non esiste (solo nel caso di TextTemplate visibile)
|
|
If VisibilityTextTemplate = Visibility.Visible Then
|
|
Dim bNameExist As Boolean = False
|
|
Dim IndexHardwList As Integer
|
|
For IndexHardwList = 0 To m_TemplateList.Count - 1
|
|
If m_TemplateList(IndexHardwList) = m_SelTemplate Then
|
|
' se il nome è nella lista allora esco dal ciclo e rendo falsa la variabile bNameExist
|
|
bNameExist = True
|
|
Exit For
|
|
End If
|
|
bNameExist = False
|
|
Next
|
|
' se il nome esite già nel direttorio selezionato
|
|
If bNameExist Then
|
|
Select Case MessageBox.Show("The file: " & m_SelTemplate & " already exist in directory " & m_SelBrand & " . Do you want to overwrite it?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
|
' decido di sovrescrivere il file esistente
|
|
Case MessageBoxResult.Yes
|
|
' salvo il file
|
|
File.WriteAllLines(CurrItemPath, FileContent)
|
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = False
|
|
Return True
|
|
Case Else
|
|
' deicido di non sovrescrivere interrompo
|
|
Return False
|
|
End Select
|
|
End If
|
|
End If
|
|
' salvo il file
|
|
File.WriteAllLines(CurrItemPath, FileContent)
|
|
RefreshTemplateListEgtDOORCreator()
|
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = False
|
|
Return True
|
|
End Function
|
|
|
|
Private Function RefreshTemplateListEgtDOORCreator() As Boolean
|
|
For IndexHardw As Integer = 0 To Map.refCompoPanelVM.CompoTypeList.Count - 1
|
|
If m_HardwareGeneral.DDFName = Map.refCompoPanelVM.CompoTypeList(IndexHardw).DDFName Then
|
|
Map.refCompoPanelVM.CompoTypeList(IndexHardw).LoadListTemplate()
|
|
Return True
|
|
Exit For
|
|
End If
|
|
Next
|
|
Return False
|
|
End Function
|
|
|
|
Public Function ConvertValueForLua(ByRef sValue As String) As Boolean
|
|
Dim NameParam = Utility.FindNameParam(sValue)
|
|
If String.IsNullOrEmpty(NameParam) Then Return False
|
|
For IndexGroupChapters As Integer = 0 To m_GroupChapters.Count - 1
|
|
For IndexChapter As Integer = 0 To m_GroupChapters(IndexGroupChapters).CompoParamList.Count - 1
|
|
If m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter).DDFName = NameParam Then
|
|
If TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxDGCParam Then
|
|
Dim Text As TextBoxDGCParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxDGCParam)
|
|
sValue = String.Empty
|
|
Select Case Text.TypeVar
|
|
Case "inch"
|
|
If OptionModule.m_SelectedMeasureUnit = "Inches" Then
|
|
sValue = Text.TypeVar & "( " & Text.Value & ")"
|
|
Else
|
|
sValue = Text.Value
|
|
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
|
End If
|
|
Case "mm"
|
|
If OptionModule.m_SelectedMeasureUnit = "Inches" Then
|
|
sValue = Text.Value
|
|
InchesToMm(sValue)
|
|
Else
|
|
sValue = Text.Value
|
|
End If
|
|
End Select
|
|
sValue &= " + " & Text.SelConst
|
|
Return True
|
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxParam Then
|
|
Dim Text As TextBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxParam)
|
|
sValue = String.Empty
|
|
' controllo il tipo di dato che si aspetta
|
|
Select Case Text.TypeVar
|
|
Case "inch"
|
|
If OptionModule.m_SelectedMeasureUnit = "Inches" Then
|
|
sValue = Text.TypeVar & "( " & Text.Value & ")"
|
|
Else
|
|
sValue = Text.Value
|
|
If MmToInches(sValue) Then sValue = Text.TypeVar & "( " & sValue & ")"
|
|
End If
|
|
Case "mm"
|
|
If OptionModule.m_SelectedMeasureUnit = "Inches" Then
|
|
sValue = Text.Value
|
|
InchesToMm(sValue)
|
|
Else
|
|
sValue = Text.Value
|
|
End If
|
|
Case "double"
|
|
sValue = Text.Value
|
|
Case "string"
|
|
sValue = "'" & Text.Value & "'"
|
|
End Select
|
|
Return True
|
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is CheckBoxParam Then
|
|
Dim Text As CheckBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), CheckBoxParam)
|
|
sValue = String.Empty
|
|
If Text.IsChecked = True Then sValue = " true" Else sValue = " false"
|
|
Return True
|
|
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxParam Then
|
|
'-- attenzione a quando abbiamo da stampare delle stringhe! e non dei valori numerici
|
|
Dim Text As ComboBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxParam)
|
|
sValue = String.Empty
|
|
For Index As Integer = 0 To Text.ItemList.Count - 1
|
|
If Text.SelItem = Text.ItemList(Index) Then sValue = Text.ItemListDDF(Index) : Return True
|
|
Next
|
|
sValue = Text.SelItem
|
|
Return True
|
|
End If
|
|
|
|
End If
|
|
Next
|
|
Next
|
|
Return True
|
|
End Function
|
|
|
|
' lista delle riposte della funzione SaveControl
|
|
Enum SaveResult As Integer
|
|
nYes
|
|
nNo
|
|
nCancel
|
|
End Enum
|
|
|
|
' restituisce il messaggio della selezione
|
|
Public Function SaveControl() As SaveResult
|
|
If Not Map.refMainWindowVM.ProjectNameMsg.Contains("*") Then Return SaveResult.nNo
|
|
Select Case MessageBox.Show("Do you want to save the current changes?", "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
|
Case MessageBoxResult.Yes ' decido di salvare
|
|
Save()
|
|
Return SaveResult.nYes
|
|
Case MessageBoxResult.No ' decido di non salvare
|
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = False
|
|
Return SaveResult.nNo
|
|
Case Else ' altrimenti interrompi sempre
|
|
Return SaveResult.nCancel
|
|
End Select
|
|
End Function
|
|
|
|
#End Region ' Salvataggio, Duplica, Aggiorna
|
|
|
|
Public Sub New()
|
|
' ogni nuovo hardware che creao devo avere la lista di componenti vuota
|
|
Me.ClearGroupChapters()
|
|
End Sub
|
|
|
|
#End Region ' Genaral Function
|
|
|
|
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
|
Public Sub NotifyPropertyChanged(propName As String)
|
|
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
Public Class TypeHardware
|
|
Inherits VMBase
|
|
|
|
Private m_Name As String
|
|
Public Property Name As String
|
|
Get
|
|
Return m_Name
|
|
End Get
|
|
Set(value As String)
|
|
m_Name = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_NameINI As String
|
|
Public Property NameINI As String
|
|
Get
|
|
Return m_NameINI
|
|
End Get
|
|
Set(value As String)
|
|
m_NameINI = value
|
|
End Set
|
|
End Property
|
|
|
|
Sub New(Name As String, NameINI As String)
|
|
m_Name = Name
|
|
m_NameINI = NameINI
|
|
NotifyPropertyChanged("Name")
|
|
NotifyPropertyChanged("NameINI")
|
|
End Sub
|
|
|
|
End Class
|