Imports System.Collections.ObjectModel Imports System.ComponentModel Imports System.IO Imports EgtWPFLib5 Public Class Project 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 NotifyPropertyChanged("Name") End Set End Property Private m_AssemblyList As New ObservableCollection(Of AssemblyName) Public Property AssemblyList As ObservableCollection(Of AssemblyName) Get Return m_AssemblyList End Get Set(value As ObservableCollection(Of AssemblyName)) m_AssemblyList = value End Set End Property Private m_SelAssemblyName As AssemblyName Public Property SelAssemblyName As AssemblyName Get Return m_SelAssemblyName End Get Set(value As AssemblyName) If IsNothing(value) then m_SelAssemblyName = value Return End If m_SelAssemblyName = value Map.refAssemblyManagerVM.Open(m_SelAssemblyName) NotifyPropertyChanged("Name") NotifyPropertyChanged("SelAssemblyName") End Set End Property Friend Function IsBlockedSelAssemblyName(value As AssemblyName) As Boolean If IsNothing(value) then Return false If Not File.Exists(value.Name) AndAlso Not IsNothing(Map.refAssemblyManagerVM) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject) then Map.refAssemblyManagerVM.RefreshAssembly() Return False End If If value.Name = m_SelAssemblyName.Name then Map.refAssemblyManagerVM.Open(m_SelAssemblyName) Return false End If If Not Utility.IsFileLocked(Path.GetDirectoryName(value.Name), value.GraphicName) then m_SelAssemblyName = value Utility.OutLog("Chiudo progetto : " & m_SelAssemblyName.Name) Utility.UnLockDir() 'Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected Utility.LockDir(Path.GetDirectoryName(m_SelAssemblyName.Name),m_SelAssemblyName.GraphicName) Return false End If Map.refAssemblyManagerVM.Open(m_SelAssemblyName) Return true End Function End Class