From a312eef39926cc48cd155affc4e2607b366993e3 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Fri, 7 Oct 2016 10:14:14 +0000 Subject: [PATCH] =?UTF-8?q?EgtCAM5=20:=20-=20Aggiunta=20possibilit=C3=A0?= =?UTF-8?q?=20di=20getire=20progressbar=20e=20output=20message=20presenti?= =?UTF-8?q?=20nella=20StatusBar=20da=20LUA.=20-=20Inizio=20scrittura=20del?= =?UTF-8?q?la=20struttura=20per=20MTables.=20-=20Aggiunta=20la=20possibili?= =?UTF-8?q?t=C3=A0=20di=20aggiungere=20nuovi=20gruppi=20di=20lavorazione.?= =?UTF-8?q?=20-=20Gestita=20uscita=20da=20NewMachiningCmd(in=20OperationLi?= =?UTF-8?q?st)=20con=20Esc.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application.xaml.vb | 1 + EgtCAM5.vbproj | 1 + MTableDb/MTableDbView.xaml | 14 +- MTableDb/MTableDbViewModel.vb | 30 +++-- MTableDb/MTableListBox.vb | 122 ++++++++++++++++++ ProjectPage/DbPanel/DbPanelView.xaml | 2 - ProjectPage/DbPanel/DbPanelViewModel.vb | 29 ----- ProjectPage/DoorsPanel/DoorsPanelView.xaml | 2 + ProjectPage/DoorsPanel/DoorsPanelViewModel.vb | 29 +++++ .../MachGroupPanel/MachGroupPanelView.xaml | 11 +- .../MachGroupPanel/MachGroupPanelViewModel.vb | 18 ++- .../MachiningTreeExpanderView.xaml | 3 + .../MachiningTreeExpanderViewModel.vb | 24 ++++ .../OperationExpanderView.xaml | 3 + .../OperationExpanderViewModel.vb | 17 ++- StatusBar/StatusBarViewModel.vb | 33 +++++ 16 files changed, 276 insertions(+), 63 deletions(-) create mode 100644 MTableDb/MTableListBox.vb 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"/>