7186aec547
- Aggiunta pagina MTables con abbozzo di gestione tabelle. - Aggiunta gestione della visualizzazione dei gruppi macchina. - Aggiunta possibilità di eseguire script di disposizione quando si passa in lavorazione.
52 lines
1.6 KiB
VB.net
52 lines
1.6 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports System.IO
|
|
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class MTableDbViewModel
|
|
Inherits TabViewModel
|
|
|
|
Private m_TablesList As New ObservableCollection(Of String)
|
|
Public Property TablesList As ObservableCollection(Of String)
|
|
Get
|
|
Return m_TablesList
|
|
End Get
|
|
Set(value As ObservableCollection(Of String))
|
|
m_TablesList = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_Title As String
|
|
Public ReadOnly Property Title As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 20)
|
|
End Get
|
|
End Property
|
|
|
|
Sub New()
|
|
SearchTables()
|
|
End Sub
|
|
|
|
Private Sub SearchTables()
|
|
'' Leggo dal file ini il direttorio per le Table
|
|
'If GetPrivateProfileString(S_TABLE, K_TABLESDIR, "", m_sTablesRoot) = 0 _
|
|
' Or not My.Computer.FileSystem.DirectoryExists(m_sTablesRoot) Then
|
|
' ' Se non lo trovo mando messaggio di errore e chiudo la finestra
|
|
' MessageBox.Show("ERROR IN LOADING TABLES", "Tables dir not found.")
|
|
'End If
|
|
' se trovo la cartella carico la lista di tabelle
|
|
|
|
|
|
Dim TempArray As String() = Directory.GetDirectories(IniFile.m_sMachinesRoot)
|
|
If TempArray.Count = 0 Then
|
|
'esci
|
|
End If
|
|
For Each Table In My.Computer.FileSystem.GetFiles("c:\EgtData\Doors\MTables\")
|
|
m_TablesList.Add(Path.GetFileNameWithoutExtension(Table))
|
|
Next
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
End Namespace |