Files
EgtCAM5/MTableDb/MTableDbViewModel.vb
T
Emmanuele Sassi a312eef399 EgtCAM5 :
- Aggiunta possibilità di getire progressbar e output message presenti nella StatusBar da LUA.
- Inizio scrittura della struttura per MTables.
- Aggiunta la possibilità di aggiungere nuovi gruppi di lavorazione.
- Gestita uscita da NewMachiningCmd(in OperationList) con Esc.
2016-10-07 10:14:14 +00:00

56 lines
1.7 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_SelectedTable As String
Public Property SelectedTable As String
Get
Return m_SelectedTable
End Get
Set(value As String)
m_SelectedTable = 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
For Each Table In My.Computer.FileSystem.GetFiles(m_sTablesRoot)
m_TablesList.Add(Path.GetFileNameWithoutExtension(Table))
Next
End Sub
End Class
End Namespace