diff --git a/Application.xaml.vb b/Application.xaml.vb index 150da68..1c776c7 100644 --- a/Application.xaml.vb +++ b/Application.xaml.vb @@ -174,6 +174,7 @@ Class Application Friend Const NEWMACHININGMODEISACTIVE As String = "NewMachiningModeIsActive" Friend Const SIMULATIONEXPANDER_GET_ISEXPANDED As String = "Get_SimulationExpander_IsExpanded" Friend Const SIMULATIONEXPANDER_SET_ISEXPANDED As String = "Set_SimulationExpander_IsExpanded" + Friend Const CANCELOPERATIONCOMMAND As String = "CancelOperationCommand" ' StatusBar messages Friend Const STATUSGRIDCOMMAND As String = "StatusGridCommand" diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj index 769b330..8070af0 100644 --- a/EgtCAM5.vbproj +++ b/EgtCAM5.vbproj @@ -135,6 +135,7 @@ MTableDbView.xaml + OptionsView.xaml diff --git a/MTableDb/MTableDbView.xaml b/MTableDb/MTableDbView.xaml index 187c6aa..86d9279 100644 --- a/MTableDb/MTableDbView.xaml +++ b/MTableDb/MTableDbView.xaml @@ -14,7 +14,7 @@ - + @@ -66,13 +66,13 @@ - - + + - - - + SelectedItemBinding="{Binding SelectedOperation}" Width="1*"/> + + + diff --git a/MTableDb/MTableDbViewModel.vb b/MTableDb/MTableDbViewModel.vb index b6da7db..cbfe6b3 100644 --- a/MTableDb/MTableDbViewModel.vb +++ b/MTableDb/MTableDbViewModel.vb @@ -17,6 +17,16 @@ Namespace EgtCAM5 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 @@ -29,20 +39,14 @@ Namespace EgtCAM5 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 + ' 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 - For Each Table In My.Computer.FileSystem.GetFiles("c:\EgtData\Doors\MTables\") + ' 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 diff --git a/MTableDb/MTableListBox.vb b/MTableDb/MTableListBox.vb new file mode 100644 index 0000000..04c3ff3 --- /dev/null +++ b/MTableDb/MTableListBox.vb @@ -0,0 +1,122 @@ +Imports System.ComponentModel +Imports System.Collections.ObjectModel +Imports EgtUILib + +Public Class MTableListBox + Implements INotifyPropertyChanged + + 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_MachineList As ObservableCollection(Of MTableMachineListBox) + Public Property MachineList As ObservableCollection(Of MTableMachineListBox) + Get + Return m_MachineList + End Get + Set(value As ObservableCollection(Of MTableMachineListBox)) + m_MachineList = Value + End Set + End Property + + 'Private m_OnPar As Boolean + 'Public Property OnPar As Boolean + ' Get + ' Return m_OnPar + ' End Get + ' Set(value As Boolean) + ' m_OnPar = value + ' End Set + 'End Property + + 'Private m_Oper As Boolean + 'Public Property Oper As Boolean + ' Get + ' Return m_Oper + ' End Get + ' Set(value As Boolean) + ' m_Oper = value + ' End Set + 'End Property + + 'Private m_Mach As Boolean + 'Public Property Mach As Boolean + ' Get + ' Return m_Mach + ' End Get + ' Set(value As Boolean) + ' m_Mach = value + ' End Set + 'End Property + + 'Private m_MachUp As Boolean + 'Public Property MachUp As Boolean + ' Get + ' Return m_MachUp + ' End Get + ' Set(value As Boolean) + ' m_MachUp = value + ' End Set + 'End Property + + 'Private m_MachDw As Boolean + 'Public Property MachDw As Boolean + ' Get + ' Return m_MachDw + ' End Get + ' Set(value As Boolean) + ' m_MachDw = value + ' End Set + 'End Property + + 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 MTableMachineListBox + + Private m_MachName As String + Public Property MachName As String + Get + Return m_MachName + End Get + Set(value As String) + m_MachName = value + End Set + End Property + + Private m_NcGenerate As Boolean + Public Property NcGenerate As Boolean + Get + Return m_NcGenerate + End Get + Set(value As Boolean) + m_NcGenerate = value + End Set + End Property + + Private m_Makeraw As Boolean + Public Property Makeraw As Boolean + Get + Return m_Makeraw + End Get + Set(value As Boolean) + m_Makeraw = value + End Set + End Property + +End Class + +Public Class MTableAssociationGridBox + +End Class diff --git a/ProjectPage/DbPanel/DbPanelView.xaml b/ProjectPage/DbPanel/DbPanelView.xaml index 47eabea..ff630b4 100644 --- a/ProjectPage/DbPanel/DbPanelView.xaml +++ b/ProjectPage/DbPanel/DbPanelView.xaml @@ -7,8 +7,6 @@ Style="{StaticResource GridViewPanelButton}" Width="55" Content="ToolDb"/>