diff --git a/EgtBEAMWALL.Core/Beam.vb b/EgtBEAMWALL.Core/Beam.vb index 9adddad5..bd5858d8 100644 --- a/EgtBEAMWALL.Core/Beam.vb +++ b/EgtBEAMWALL.Core/Beam.vb @@ -4,7 +4,7 @@ Imports EgtUILib Imports EgtWPFLib5 Public Class Beam - Inherits Part + Inherits PartM Protected m_dOffset As Double Public ReadOnly Property dOffset As Double @@ -18,7 +18,7 @@ Public Class Beam #Region "CONSTRUCTOR" - Sub New(nParentMachGroup As Core.MyMachGroup, nPartId As Integer, nRawPartId As Integer) + Sub New(nParentMachGroup As Core.MyMachGroupM, nPartId As Integer, nRawPartId As Integer) MyBase.New(nParentMachGroup, nPartId) m_nRawPartId = nRawPartId End Sub diff --git a/EgtBEAMWALL.Core/BeamMachGroup.vb b/EgtBEAMWALL.Core/BeamMachGroup.vb index b141464d..086b1e34 100644 --- a/EgtBEAMWALL.Core/BeamMachGroup.vb +++ b/EgtBEAMWALL.Core/BeamMachGroup.vb @@ -4,7 +4,7 @@ Imports EgtUILib Imports EgtWPFLib5 Public Class BeamMachGroup - Inherits MyMachGroup + Inherits MyMachGroupM Protected m_dStartCut As Double Public ReadOnly Property dStartCut As Double diff --git a/EgtBEAMWALL.Core/EgtBEAMWALL.Core.vbproj b/EgtBEAMWALL.Core/EgtBEAMWALL.Core.vbproj index 6b0b5824..479ba2a7 100644 --- a/EgtBEAMWALL.Core/EgtBEAMWALL.Core.vbproj +++ b/EgtBEAMWALL.Core/EgtBEAMWALL.Core.vbproj @@ -97,8 +97,8 @@ Settings.settings True - - + + diff --git a/EgtBEAMWALL.Core/MyMachGroup.vb b/EgtBEAMWALL.Core/MyMachGroupM.vb similarity index 83% rename from EgtBEAMWALL.Core/MyMachGroup.vb rename to EgtBEAMWALL.Core/MyMachGroupM.vb index 59f72b91..268ae385 100644 --- a/EgtBEAMWALL.Core/MyMachGroup.vb +++ b/EgtBEAMWALL.Core/MyMachGroupM.vb @@ -5,7 +5,7 @@ Imports System.Windows.Media Imports EgtUILib Imports EgtWPFLib5 -Public MustInherit Class MyMachGroup +Public MustInherit Class MyMachGroupM Inherits MachGroup Protected m_nMachineType As MachineType @@ -48,6 +48,26 @@ Public MustInherit Class MyMachGroup End Set End Property + Protected m_dtStartTime As DateTime + Public Property dtStartTime As DateTime + Get + Return m_dtStartTime + End Get + Set(value As DateTime) + m_dtStartTime = value + End Set + End Property + + Protected m_dtEndTime As DateTime + Public Property dtEndTime As DateTime + Get + Return m_dtEndTime + End Get + Set(value As DateTime) + m_dtEndTime = value + End Set + End Property + Protected m_dMatForPart As Double = 0 Protected m_dTotMat As Double = 0 Public ReadOnly Property dUsage As Double @@ -85,22 +105,22 @@ Public MustInherit Class MyMachGroup End Property ' lista dei pezzi che sono nel grezzo - Private m_PartList As New ObservableCollection(Of Part) - Public Property PartList As ObservableCollection(Of Part) + Private m_PartList As New ObservableCollection(Of PartM) + Public Property PartList As ObservableCollection(Of PartM) Get Return m_PartList End Get - Set(value As ObservableCollection(Of Part)) + Set(value As ObservableCollection(Of PartM)) m_PartList = value End Set End Property - Protected m_SelPart As Part - Public Overridable Property SelPart As Part + Protected m_SelPart As PartM + Public Overridable Property SelPart As PartM Get Return m_SelPart End Get - Set(value As Part) + Set(value As PartM) m_SelPart = value ' seleziono pezzo EgtDeselectAll() diff --git a/EgtBEAMWALL.Core/Part.vb b/EgtBEAMWALL.Core/PartM.vb similarity index 93% rename from EgtBEAMWALL.Core/Part.vb rename to EgtBEAMWALL.Core/PartM.vb index 5c4f46dd..40159f56 100644 --- a/EgtBEAMWALL.Core/Part.vb +++ b/EgtBEAMWALL.Core/PartM.vb @@ -5,13 +5,13 @@ Imports System.Windows.Media Imports EgtUILib Imports EgtWPFLib5 -Public MustInherit Class Part +Public MustInherit Class PartM Inherits VMBase #Region "FIELDS & PROPERTIES" - Protected m_ParentMachGroup As MyMachGroup - Public ReadOnly Property ParentMachGroup As MyMachGroup + Protected m_ParentMachGroup As MyMachGroupM + Public ReadOnly Property ParentMachGroup As MyMachGroupM Get Return m_ParentMachGroup End Get @@ -243,6 +243,26 @@ Public MustInherit Class Part End Set End Property + Protected m_dtStartTime As DateTime + Public Property dtStartTime As DateTime + Get + Return m_dtStartTime + End Get + Set(value As DateTime) + m_dtStartTime = value + End Set + End Property + + Protected m_dtEndTime As DateTime + Public Property dtEndTime As DateTime + Get + Return m_dtEndTime + End Get + Set(value As DateTime) + m_dtEndTime = value + End Set + End Property + ' definizione comandi Private m_cmdDeletePart As ICommand @@ -250,7 +270,7 @@ Public MustInherit Class Part #Region "CONSTRUCTOR" - Sub New(nParentMachGroup As MyMachGroup, nPartId As Integer) + Sub New(nParentMachGroup As MyMachGroupM, nPartId As Integer) m_ParentMachGroup = nParentMachGroup SetPartId(nPartId) m_FeatureList = New ObservableCollection(Of BTLFeatureM) diff --git a/EgtBEAMWALL.Core/Wall.vb b/EgtBEAMWALL.Core/Wall.vb index fb4961cd..4f0419da 100644 --- a/EgtBEAMWALL.Core/Wall.vb +++ b/EgtBEAMWALL.Core/Wall.vb @@ -4,7 +4,7 @@ Imports EgtUILib Imports EgtWPFLib5 Public Class Wall - Inherits Part + Inherits PartM Protected m_dPOSY As Double Public Property dPOSY As Double @@ -38,7 +38,7 @@ Public Class Wall #Region "CONSTRUCTOR" - Sub New(nParentMachGroup As MyMachGroup, nPartId As Integer) + Sub New(nParentMachGroup As MyMachGroupM, nPartId As Integer) MyBase.New(nParentMachGroup, nPartId) End Sub diff --git a/EgtBEAMWALL.Core/WallMachGroup.vb b/EgtBEAMWALL.Core/WallMachGroup.vb index 5711f5b5..cb14fb05 100644 --- a/EgtBEAMWALL.Core/WallMachGroup.vb +++ b/EgtBEAMWALL.Core/WallMachGroup.vb @@ -4,7 +4,7 @@ Imports EgtUILib Imports EgtWPFLib5 Public Class WallMachGroup - Inherits MyMachGroup + Inherits MyMachGroupM Protected m_nRawPartId As Integer = GDB_ID.NULL Public ReadOnly Property nRawPartId As Integer diff --git a/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs b/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs index 5b938a5b..ea07d99d 100644 --- a/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs +++ b/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs @@ -83,7 +83,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers /// /// /// - public static MachGroupModel ConvertFromCore(Core.MyMachGroup coreMachGroup, int currProdDbId) + public static MachGroupModel ConvertFromCore(Core.MyMachGroupM coreMachGroup, int currProdDbId) { MachGroupModel answ = new MachGroupModel(); if (coreMachGroup != null) diff --git a/EgtBEAMWALL.DataLayer/Controllers/PartController .cs b/EgtBEAMWALL.DataLayer/Controllers/PartController .cs index b2e6e240..327864c2 100644 --- a/EgtBEAMWALL.DataLayer/Controllers/PartController .cs +++ b/EgtBEAMWALL.DataLayer/Controllers/PartController .cs @@ -73,7 +73,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers /// /// /// - public static PartModel ConvertFromCore(Core.Part corePart, int currMachGroupDbId) + public static PartModel ConvertFromCore(Core.PartM corePart, int currMachGroupDbId) { PartModel answ = new PartModel(); if (corePart != null) diff --git a/EgtBEAMWALL.DataLayer/Controllers/ProdController.cs b/EgtBEAMWALL.DataLayer/Controllers/ProdController.cs index 3195f5e5..69823add 100644 --- a/EgtBEAMWALL.DataLayer/Controllers/ProdController.cs +++ b/EgtBEAMWALL.DataLayer/Controllers/ProdController.cs @@ -355,7 +355,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers /// Id del Prod /// Elenco MachGroup da associare /// - public ProdModel UpdateMachGroup(int ProdId, List MachGroupList) + public ProdModel UpdateMachGroup(int ProdId, List MachGroupList) { // Recupero il PROD ProdModel currData = FindByProdId(ProdId); diff --git a/EgtBEAMWALL.DataLayer/EgtBEAMWALL.DataLayer.csproj b/EgtBEAMWALL.DataLayer/EgtBEAMWALL.DataLayer.csproj index 38562cb8..0914f0a8 100644 --- a/EgtBEAMWALL.DataLayer/EgtBEAMWALL.DataLayer.csproj +++ b/EgtBEAMWALL.DataLayer/EgtBEAMWALL.DataLayer.csproj @@ -37,7 +37,8 @@ false - + + False ..\dll\EgtWPFLib5.dll diff --git a/EgtBEAMWALL.Supervisor/MainWindow/MainWindowVM.vb b/EgtBEAMWALL.Supervisor/MainWindow/MainWindowVM.vb index 34d398f7..48770be3 100644 --- a/EgtBEAMWALL.Supervisor/MainWindow/MainWindowVM.vb +++ b/EgtBEAMWALL.Supervisor/MainWindow/MainWindowVM.vb @@ -5,22 +5,22 @@ Public Class MainWindowVM Private m_SupervisorId As String = "A" Private m_SupervisorMachineName As String = "Essetre-FAST" - Private m_MachGroupList As New List(Of MyMachGroup) - Public Property MachGroupList As List(Of MyMachGroup) + Private m_MachGroupList As New List(Of MyMachGroupM) + Public Property MachGroupList As List(Of MyMachGroupM) Get Return m_MachGroupList End Get - Set(value As List(Of MyMachGroup)) + Set(value As List(Of MyMachGroupM)) m_MachGroupList = value End Set End Property - Private m_SelMachGroup As MyMachGroup - Public Property SelMachGroup As MyMachGroup + Private m_SelMachGroup As MyMachGroupM + Public Property SelMachGroup As MyMachGroupM Get Return m_SelMachGroup End Get - Set(value As MyMachGroup) + Set(value As MyMachGroupM) m_SelMachGroup = value End Set End Property @@ -67,7 +67,7 @@ Public Class MainWindowVM ''' Public Sub CompletedRawPart() If IsNothing(m_SelMachGroup) Then Return - DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, DataLayer.ItemState.Produced) + DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, ItemState.Produced) End Sub #End Region ' CompletedRawPart @@ -115,7 +115,7 @@ Public Class MainWindowVM ''' Public Sub MoveUpRawPart() If IsNothing(m_SelMachGroup) Then Return - DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, DataLayer.ItemState.Produced) + DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, ItemState.Produced) End Sub #End Region ' MoveUpRawPart @@ -139,7 +139,7 @@ Public Class MainWindowVM ''' Public Sub MoveDownRawPart() If IsNothing(m_SelMachGroup) Then Return - DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, DataLayer.ItemState.Produced) + DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, ItemState.Produced) End Sub #End Region ' MoveDownRawPart diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLFeatureVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLFeatureVM.vb index 5b9fb8ab..598fb6c1 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLFeatureVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLFeatureVM.vb @@ -48,11 +48,10 @@ Public Class BTLFeatureVM SelGeomFeature() ' rendo non calcolata questa feature CalcFeatureUpdate(False, 0, 0, 0, "") - '''' ed aggiorno stato pezzo - '''m_BTLPartM.CalcFeatureUpdate() Else NotifyPropertyChanged("nSelGRP") End If + NotifyPropertyChanged(NameOf(nSelGRP)) EgtDraw() End If End Set @@ -105,8 +104,6 @@ Public Class BTLFeatureVM SelGeomFeature() ' rendo non calcolata questa feature CalcFeatureUpdate(False, 0, 0, 0, "") - '''' ed aggiorno stato pezzo - '''DirectCast(ParentPart, BTLPartVM).CalcFeatureUpdate() Else NotifyPropertyChanged("nSelGRP") End If @@ -128,8 +125,6 @@ Public Class BTLFeatureVM Set(value As Boolean) If EgtBeamEnableProcess(nFeatureId, value) Then m_BTLFeatureM.bDO = value - '''' aggiorno check DOALL - '''ParentPart.NotifyPropertyChanged("bDOALL") EgtDraw() NotifyPropertyChanged("Calc_Background") NotifyPropertyChanged("bDO") diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLParamVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLParamVM.vb index 99ec3cdb..a448e362 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLParamVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLParamVM.vb @@ -200,17 +200,11 @@ Public Class BTLParamVM Select Case m_BTLParamM.nType Case BTLParamType.DOUBLE_, BTLParamType.LENGTH m_BTLParamM.dValue = dNewValue - NotifyPropertyChanged(NameOf(dValue)) + NotifyPropertyChanged(NameOf(sValue)) Case BTLParamType.STRING_ m_BTLParamM.sValue = sNewValue NotifyPropertyChanged(NameOf(sValue)) End Select - '''' riseleziono questa feature - '''m_BTLFeatureM.SelGeomFeature() - '''' rendo non calcolata questa feature - '''DirectCast(m_BTLFeatureM, BTLFeatureVM).CalcFeatureUpdate(False, 0, 0, 0, "") - '''' ed aggiorno stato pezzo - '''DirectCast(m_BTLFeatureM.ParentPart, BTLPartVM).CalcFeatureUpdate() Else NotifyPropertyChanged("sValue") End If diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLPartVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLPartVM.vb index a4de5b33..a421a297 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLPartVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLParam/BTLPartVM.vb @@ -1617,15 +1617,15 @@ Public Class BTLPartVM Private Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs) Select Case e.PropertyName - Case "nSelGRP", "nSelSIDE" + Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE) CalcFeatureUpdate() - Case "bDO" + Case NameOf(sender.bDO) NotifyPropertyChanged(NameOf(bDOALL)) End Select End Sub Private Sub OnBTLPParamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs) Select Case e.PropertyName - Case "dValue", "sValue" + Case NameOf(sender.dValue), NameOf(sender.sValue) CalcFeatureUpdate() End Select End Sub diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLParam/PartInRawPartListV.xaml.vb b/EgtBEAMWALL.ViewerOptimizer/BTLParam/PartInRawPartListV.xaml.vb index eb9d4c75..adcaf283 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLParam/PartInRawPartListV.xaml.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLParam/PartInRawPartListV.xaml.vb @@ -4,7 +4,7 @@ If TypeOf sender Is DataGridRow Then Dim Row As DataGridRow = DirectCast(sender, DataGridRow) If Not IsNothing(Row) AndAlso Row.IsSelected Then - Dim MyMachGroup As Core.MyMachGroup = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, Core.MyMachGroup) + Dim MyMachGroup As Core.MyMachGroupM = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, Core.MyMachGroupM) MyMachGroup.SelPart = MyMachGroup.SelPart End If End If diff --git a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb index 9e71f8ce..b12d4725 100644 --- a/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/InstrumentPanel/MyInstrumentPanelVM.vb @@ -81,23 +81,23 @@ Public Class MyInstrumentPanelVM Case BTLParamType.DOUBLE_, BTLParamType.LENGTH If Param.dValue = ChangeParameterWndVM.SelParam.dActualValue Then Param.UpdateParamValue(ChangeParameterWndVM.SelParam.dNewValue, "") - ' rinfresco valori parametri feature correntemente selezionata - If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso - Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) AndAlso - Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM Is Feature Then - Param.NotifyPropertyChanged("sValue") - End If + '' rinfresco valori parametri feature correntemente selezionata + 'If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso + ' Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) AndAlso + ' Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM Is Feature Then + ' Param.NotifyPropertyChanged("sValue") + 'End If End If Case BTLParamType.STRING_ If Param.sValue = ChangeParameterWndVM.SelParam.sActualValue Then - DirectCast(Param, BTLParamVM).UpdateParamValue(0, ChangeParameterWndVM.SelParam.sNewValue) - ' rinfresco valori parametri feature correntemente selezionata - If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso - Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) AndAlso - Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nPRC = ChangeParameterWndVM.SelPRC.nPRC AndAlso - Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nSelGRP = ChangeParameterWndVM.SelPRC.nGRP Then - Param.NotifyPropertyChanged("sValue") - End If + Param.UpdateParamValue(0, ChangeParameterWndVM.SelParam.sNewValue) + '' rinfresco valori parametri feature correntemente selezionata + 'If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso + ' Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) AndAlso + ' Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nPRC = ChangeParameterWndVM.SelPRC.nPRC AndAlso + ' Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nSelGRP = ChangeParameterWndVM.SelPRC.nGRP Then + ' Param.NotifyPropertyChanged("sValue") + 'End If End If End Select Next @@ -188,7 +188,7 @@ Public Class MyInstrumentPanelVM If ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) Then Dim TempBarList(Map.refMachGroupPanelVM.MachGroupList.Count - 1) As CalcIntegration.Bar For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupList.Count - 1 - Dim CurrPart As MyMachGroup = Map.refMachGroupPanelVM.MachGroupList(PartIndex) + Dim CurrPart As MyMachGroupM = Map.refMachGroupPanelVM.MachGroupList(PartIndex) Dim Bar As New CalcIntegration.Bar With {.nBarId = CurrPart.Id, .nBarType = ProjectType.PROD, .bBarOk = True} @@ -206,7 +206,7 @@ Public Class MyInstrumentPanelVM Dim Bar As New CalcIntegration.Bar With {.nBarId = Map.refMachGroupPanelVM.SelectedMachGroup.Id, .nBarType = ProjectType.PROD, .bBarOk = True} - Dim SelMachGroup As MyMachGroup = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, MyMachGroup) + Dim SelMachGroup As MyMachGroupM = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, MyMachGroupM) Select Case SelMachGroup.nState Case Core.CalcStates.OK Bar.nCmdType = CalcIntegration.CmdType.GENERATE diff --git a/EgtBEAMWALL.ViewerOptimizer/Integration/CalcIntegration.vb b/EgtBEAMWALL.ViewerOptimizer/Integration/CalcIntegration.vb index 3d37535d..fb5852f1 100644 --- a/EgtBEAMWALL.ViewerOptimizer/Integration/CalcIntegration.vb +++ b/EgtBEAMWALL.ViewerOptimizer/Integration/CalcIntegration.vb @@ -305,7 +305,7 @@ Public Class CalcIntegration Dim taskId As Integer = 0 Dim prevCutId As Integer = GDB_ID.NULL Dim currBTLPart As BTLPartVM - Dim currPart As Core.Part + Dim currPart As Core.PartM Dim lines As String() = System.IO.File.ReadAllLines(ResPath) For Each line As String In lines @@ -341,7 +341,7 @@ Public Class CalcIntegration End If Next ElseIf Bar.nBarType = ProjectType.PROD Then - For Each MachGroup As Core.MyMachGroup In Map.refMachGroupPanelVM.MachGroupList + For Each MachGroup As Core.MyMachGroupM In Map.refMachGroupPanelVM.MachGroupList For Each Part In MachGroup.PartList If Part.nPartId = cutId Then currPart = Part @@ -429,11 +429,11 @@ Public Class CalcIntegration Next ElseIf Bar.nBarType = ProjectType.PROD Then ' cerco pezzo in MachGroupList da id - For Each MachGroup As Core.MyMachGroup In Map.refMachGroupPanelVM.MachGroupList + For Each MachGroup As Core.MyMachGroupM In Map.refMachGroupPanelVM.MachGroupList If MachGroup.Id = Bar.nBarId Then For Each Part In MachGroup.PartList ' leggo errori da geometria e li aggiorno in struttura btl - DirectCast(Part, Core.Part).CalcFeatureUpdate() + DirectCast(Part, Core.PartM).CalcFeatureUpdate() Next MachGroup.CalcMachGroupUpdate() End If diff --git a/EgtBEAMWALL.ViewerOptimizer/LeftPanel/LeftPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/LeftPanel/LeftPanelVM.vb index 0c78788c..46c13443 100644 --- a/EgtBEAMWALL.ViewerOptimizer/LeftPanel/LeftPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/LeftPanel/LeftPanelVM.vb @@ -216,7 +216,7 @@ Public Class LeftPanelVM Friend Function VerifyTotLength(BeamMachGroup As BeamMachGroup, PartToAdd As BTLPartVM) As Boolean Dim dNewPartPos As Double = 0 If BeamMachGroup.PartList.Count > 0 Then - Dim LastPart As Core.Part = BeamMachGroup.PartList(BeamMachGroup.PartList.Count - 1) + Dim LastPart As Core.PartM = BeamMachGroup.PartList(BeamMachGroup.PartList.Count - 1) dNewPartPos += LastPart.dPOSX + LastPart.dL End If dNewPartPos += RawPartConfiguration.dBeamDist + PartToAdd.dL diff --git a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb index ae5ec5f6..42bb71cc 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb @@ -55,7 +55,7 @@ Public Class MyMachGroupPanelVM Dim sNewMachGroupMachineName As String = String.Empty EgtGetMachGroupName(nNewMachGroupID, sNewMachGroupName) EgtGetMachGroupMachineName(nNewMachGroupID, sNewMachGroupMachineName) - Dim MyMachGroup As Core.MyMachGroup + Dim MyMachGroup As Core.MyMachGroupM If Map.refMachinePanelVM.SelectedMachine.nType = MachineType.BEAM Then MyMachGroup = New BeamMachGroup(nNewMachGroupID, sNewMachGroupName, sNewMachGroupMachineName) Else @@ -543,7 +543,7 @@ Public Class Beam #Region "CONSTRUCTOR" - Sub New(nParentMachGroup As Core.MyMachGroup, nPartId As Integer, nRawPartId As Integer) + Sub New(nParentMachGroup As Core.MyMachGroupM, nPartId As Integer, nRawPartId As Integer) MyBase.New(nParentMachGroup, nPartId, nRawPartId) ' leggo info pezzo EgtGetInfo(nPartId, BTL_PRT_PROJ, nProjId) @@ -669,7 +669,7 @@ Public Class Wall #Region "CONSTRUCTOR" - Sub New(nParentMachGroup As Core.MyMachGroup, nPartId As Integer) + Sub New(nParentMachGroup As Core.MyMachGroupM, nPartId As Integer) MyBase.New(nParentMachGroup, nPartId) ' leggo info pezzo EgtGetInfo(nPartId, BTL_PRT_PROJ, m_nProjId) diff --git a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb index 59c1d291..6d40cf76 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb @@ -170,7 +170,7 @@ Public Class MainMenuVM Map.refSceneHostVM.MainController.NewProject() Map.refProjectVM.BTLStructureVM = Nothing End If - Map.refMainWindowVM.NotifyPropertyChanged("nSelTabPage") + Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage)) Return True End Function diff --git a/EgtBEAMWALL.ViewerOptimizer/MainWindow/MainWindowVM.vb b/EgtBEAMWALL.ViewerOptimizer/MainWindow/MainWindowVM.vb index 9e29c30a..0070658c 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MainWindow/MainWindowVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MainWindow/MainWindowVM.vb @@ -57,7 +57,7 @@ Public Class MainWindowVM Friend Sub SetTitle(sTitle As String) m_Title = sTitle - NotifyPropertyChanged("Title") + NotifyPropertyChanged(NameOf(Title)) End Sub Public Sub UpdateTitle() Select Case Map.refMainMenuVM.SelPage @@ -77,6 +77,7 @@ Public Class MainWindowVM m_Title = "Configuration Page" End Select m_Title &= " - EgtBEAMWALL" + NotifyPropertyChanged(NameOf(Title)) End Sub Friend Sub ContentRendered() diff --git a/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogV.xaml.vb b/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogV.xaml.vb index 43695c89..2a195e01 100644 --- a/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogV.xaml.vb +++ b/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogV.xaml.vb @@ -1,5 +1,6 @@ Imports System.ComponentModel Imports System.IO +Imports EgtBEAMWALL.Core.ConstBeam Imports EgtUILib Public Class OpenProjectFileDialogV @@ -26,7 +27,7 @@ Public Class OpenProjectFileDialogV ' mostro la finestra di dialogo Return Me.ShowDialog() End Function - Public Function EgtShowDialog(ProjectType As ProjectType, ProjectList As List(Of ProjFileVM)) As Boolean? + Public Function EgtShowDialog(ProjectType As ProjectType, ProjectList As List(Of ProjectFileVM)) As Boolean? m_OpenProjFileDialogVM.Init(ProjectType, ProjectList) ' mostro la finestra di dialogo Return Me.ShowDialog() diff --git a/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogVM.vb b/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogVM.vb index 13acc919..b2b54e93 100644 --- a/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogVM.vb @@ -1,4 +1,5 @@ Imports System.IO +Imports EgtBEAMWALL.Core Imports EgtBEAMWALL.Core.ConstBeam Imports EgtUILib @@ -101,13 +102,14 @@ Public Class OpenProjectFileDialogVM m_ProjectType = ProjectType If IsNothing(ProjectList) OrElse ProjectList.Count = 0 Then ' leggo da db - Dim DbProjectList As New List(Of Core.ProjFileM) If ProjectType = ProjectType.PROJ Then + Dim DbProjectList As New List(Of ProjFileM) DbProjectList = DbControllers.m_ProjController.GetLastDesc(50) For Each Project In DbProjectList m_ProjectList.Add(New ProjFileVM(Project)) Next ElseIf ProjectType = ProjectType.PROD Then + Dim DbProjectList As New List(Of ProdFileM) DbProjectList = DbControllers.m_ProdController.GetLastDesc(50) For Each Project In DbProjectList m_ProjectList.Add(New ProdFileVM(Project)) diff --git a/EgtBEAMWALL.ViewerOptimizer/ProdManager/ProdManagerVM.vb b/EgtBEAMWALL.ViewerOptimizer/ProdManager/ProdManagerVM.vb index 381a614a..850b3b13 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ProdManager/ProdManagerVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/ProdManager/ProdManagerVM.vb @@ -65,6 +65,26 @@ Public Class ProdManagerVM #Region "METHODS" + Friend Function InitNewProject(ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sProjectDir As String) As Boolean + ' richiedo indice nuovo progetto + nProdId = DbControllers.m_ProdController.GetNextIndex(nProjId) + If nProdId <= 0 Then Return False + sProjectDir = refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000") + ' creo cartella nuovo progetto + If Not Directory.Exists(sProjectDir) Then + Directory.CreateDirectory(sProjectDir) + Else + Dim di As System.IO.DirectoryInfo = New DirectoryInfo(sProjectDir) + For Each file As FileInfo In di.EnumerateFiles() + file.Delete() + Next + For Each dir As DirectoryInfo In di.EnumerateDirectories() + dir.Delete(True) + Next + End If + Return True + End Function + Public Function SetCurrProd(nProdId As Integer) As Boolean Dim Currprod As ProdModel = DbControllers.m_ProdController.FindByProdId(nProdId) If IsNothing(Currprod) Then Return False @@ -156,7 +176,7 @@ Public Class ProdManagerVM Public Sub Save() Map.refSceneHostVM.SaveProject() Map.refMainWindowVM.SetTitle(CurrProd.nProdId.ToString("0000") & " - EgtBEAMWALL") - Dim MyMachGroupList As New List(Of Core.MyMachGroup) + Dim MyMachGroupList As New List(Of Core.MyMachGroupM) For Each MachGroup In Map.refProjectVM.MachGroupPanelVM.MachGroupList If Map.refMachinePanelVM.SelectedMachine.nType = MachineType.BEAM Then MyMachGroupList.Add(New Core.BeamMachGroup(MachGroup.Id, MachGroup.Name, MachGroup.Machine)) diff --git a/EgtBEAMWALL.ViewerOptimizer/ProjManager/ProjManagerVM.vb b/EgtBEAMWALL.ViewerOptimizer/ProjManager/ProjManagerVM.vb index 6508a8d6..4cb7b252 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ProjManager/ProjManagerVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/ProjManager/ProjManagerVM.vb @@ -130,7 +130,7 @@ Public Class ProjManagerVM ' inizializzo nuovo progetto Dim nProdId As Integer = 0 Dim sProdDir As String = "" - InitNewProject(nProdId, sProdDir) + Map.refProdManagerVM.InitNewProject(m_CurrProj.nProjId, nProdId, sProdDir) ' copio file progetto Dim sProjPath As String = String.Empty Dim bOk = False @@ -147,7 +147,7 @@ Public Class ProjManagerVM End If If bOk Then ' aggiorno path proj - Map.refProjManagerVM.CurrProj.SetProdId(nProdId) + Map.refProjManagerVM.UpdateCurrProj() ' imposto currprod Map.refProdManagerVM.SetCurrProd(nProdId) ' setto flag nuovo progetto in prod @@ -191,6 +191,10 @@ Public Class ProjManagerVM Return True End Function + Public Function UpdateCurrProj() As Boolean + Return SetCurrProj(CurrProj.nProjId) + End Function + #End Region ' METHODS #Region "COMMANDS" @@ -202,10 +206,10 @@ Public Class ProjManagerVM ''' Public ReadOnly Property New_Command As ICommand Get - If m_cmdSave Is Nothing Then - m_cmdSave = New Command(AddressOf NewProject) + If m_cmdNew Is Nothing Then + m_cmdNew = New Command(AddressOf NewProject) End If - Return m_cmdSave + Return m_cmdNew End Get End Property @@ -397,7 +401,7 @@ Public Class ProjManagerVM If bOk Then bOk = Map.refSceneHostVM.MainController.ImportProject(sBtlCopyPath, False) End If - Dim sProjFileName As String = sProjDir & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR & FILENAMESEPARATOR & Path.GetFileNameWithoutExtension(sBtlCopyPath) & ".nge" + Dim sProjFileName As String = sProjDir & "\" & nProjId.ToString("0000") & ".nge" If bOk Then ' scrivo info proj su tutti i pezzi Dim nPartId = EgtGetFirstPart() diff --git a/EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb b/EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb index 5b691eb5..707a6002 100644 --- a/EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb @@ -10,7 +10,7 @@ End Get Set(value As BTLStructureVM) m_BTLStructureVM = value - NotifyPropertyChanged("BTLStructureVM") + NotifyPropertyChanged(NameOf(BTLStructureVM)) End Set End Property @@ -21,7 +21,7 @@ End Get Set(value As MyMachGroupPanelVM) m_MachGroupPanelVM = value - NotifyPropertyChanged("MachGroupPanelVM") + NotifyPropertyChanged(NameOf(MachGroupPanelVM)) End Set End Property diff --git a/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProdFileVM.vb b/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProdFileVM.vb index ec615127..0f4e0b9d 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProdFileVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProdFileVM.vb @@ -194,7 +194,7 @@ Public Class ProdFileVM DbControllers.m_ProjController.DeleteProj(CurrProject.nProdId) If CurrProject.nProdId = Map.refProjManagerVM.CurrProj.nProdId Then ' reset prod in path proj - Map.refProjManagerVM.CurrProj.ResetProdId() + Map.refProjManagerVM.UpdateCurrProj() End If CurrProject = Nothing End If diff --git a/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProjFileVM.vb b/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProjFileVM.vb index 023623ee..d58518e1 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProjFileVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProjFileVM.vb @@ -29,11 +29,7 @@ Public Class ProjFileVM Get Dim sPath As String = String.Empty If IsNothing(m_ProjFileM.nProjId) OrElse m_ProjFileM.nProjId = 0 Then Return String.Empty - sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR - If Not IsNothing(m_ProjFileM.nProdId) AndAlso m_ProjFileM.nProdId > 0 Then - sPath &= nProdId.ToString("0000") - End If - sPath &= FILENAMESEPARATOR & BTLFileName & ".nge" + sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge" Return sPath End Get End Property @@ -107,18 +103,6 @@ Public Class ProjFileVM #End Region ' CONSTRUCTORS - Friend Sub SetProdId(nProdId As Integer) - ' rinomino proj con riferimento a prod - Dim OldPath As String = sProjPath - '''m_ProjFileM.nProdId = nProdId - Dim NewPath As String = sProjPath - File.Move(OldPath, NewPath) - End Sub - - Friend Sub ResetProdId() - SetProdId(0) - End Sub - ' funzione che restituisce le parti di nome file Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean If nProjectType = ProjectType.PROJ Then @@ -229,8 +213,6 @@ Public Class ProjFileVM Directory.Delete(sProjectDirPath, True) DbControllers.m_ProjController.DeleteProj(CurrProject.nProjId) If Type = ProjectType.PROD AndAlso CurrProject.nProdId = Map.refProjManagerVM.CurrProj.nProdId Then - ' reset prod in path proj - '''Map.refProjManagerVM.CurrProj.ResetProdId() End If CurrProject = Nothing End If diff --git a/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProjectFileVM.vb b/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProjectFileVM.vb index de586928..f80a822c 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProjectFileVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/ProjectManager/ProjectFileVM.vb @@ -29,11 +29,7 @@ Public Class ProjectFileVM Get Dim sPath As String = String.Empty If IsNothing(m_ProjectFileM.nProjId) OrElse m_ProjectFileM.nProjId = 0 Then Return String.Empty - sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR - If Not IsNothing(m_ProjectFileM.nProdId) AndAlso m_ProjectFileM.nProdId > 0 Then - sPath &= nProdId.ToString("0000") - End If - sPath &= FILENAMESEPARATOR '& BTLFileName & ".nge" + sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge" Return sPath End Get End Property diff --git a/EgtBEAMWALL.ViewerOptimizer/SceneHost/MySceneHostVM.vb b/EgtBEAMWALL.ViewerOptimizer/SceneHost/MySceneHostVM.vb index 62842e12..ba9f1768 100644 --- a/EgtBEAMWALL.ViewerOptimizer/SceneHost/MySceneHostVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/SceneHost/MySceneHostVM.vb @@ -312,7 +312,7 @@ Public Class MySceneHostVM End If Case Pages.MACHINING If Not IsNothing(Map.refMachGroupPanelVM) AndAlso Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then - Dim SelectedMachGroup As Core.MyMachGroup = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, Core.MyMachGroup) + Dim SelectedMachGroup As Core.MyMachGroupM = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, Core.MyMachGroupM) If SelectedMachGroup.nMachineType = MachineType.WALL Then Wall_OnMouseDownScene(sender, e) End If @@ -329,7 +329,7 @@ Public Class MySceneHostVM End If Case Pages.MACHINING If Not IsNothing(Map.refMachGroupPanelVM) AndAlso Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then - Dim SelectedMachGroup As Core.MyMachGroup = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, Core.MyMachGroup) + Dim SelectedMachGroup As Core.MyMachGroupM = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, Core.MyMachGroupM) If SelectedMachGroup.nMachineType = MachineType.WALL Then Wall_OnMouseMoveScene(sender, e) End If @@ -346,7 +346,7 @@ Public Class MySceneHostVM End If Case Pages.MACHINING If Not IsNothing(Map.refMachGroupPanelVM) AndAlso Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then - Dim SelectedMachGroup As Core.MyMachGroup = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, Core.MyMachGroup) + Dim SelectedMachGroup As Core.MyMachGroupM = DirectCast(Map.refMachGroupPanelVM.SelectedMachGroup, Core.MyMachGroupM) If SelectedMachGroup.nMachineType = MachineType.WALL Then Wall_OnMouseUpScene(sender, e) End If diff --git a/EgtBEAMWALL.ViewerOptimizer/TopPanel/TopPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/TopPanel/TopPanelVM.vb index 271e54f1..e8831426 100644 --- a/EgtBEAMWALL.ViewerOptimizer/TopPanel/TopPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/TopPanel/TopPanelVM.vb @@ -45,7 +45,7 @@ Public Class TopPanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Sub ProduceRawPart() - Dim SelMachGroup As Core.MyMachGroup = Map.refMachGroupPanelVM.SelectedMachGroup + Dim SelMachGroup As Core.MyMachGroupM = Map.refMachGroupPanelVM.SelectedMachGroup If IsNothing(SelMachGroup) Then Return DbControllers.m_MachGroupController.UpdateAssign(SelMachGroup.Id, DbControllers.m_SupervisorId) End Sub @@ -70,7 +70,7 @@ Public Class TopPanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Sub ProduceAllRawPart() - Dim SelMachGroup As Core.MyMachGroup = Map.refMachGroupPanelVM.SelectedMachGroup + Dim SelMachGroup As Core.MyMachGroupM = Map.refMachGroupPanelVM.SelectedMachGroup If IsNothing(SelMachGroup) Then Return @@ -96,7 +96,7 @@ Public Class TopPanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Sub CopyRawPart() - Dim SelMachGroup As Core.MyMachGroup = Map.refMachGroupPanelVM.SelectedMachGroup + Dim SelMachGroup As Core.MyMachGroupM = Map.refMachGroupPanelVM.SelectedMachGroup If IsNothing(SelMachGroup) Then Return @@ -122,7 +122,7 @@ Public Class TopPanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Sub RemoveRawPart() - Dim SelMachGroup As Core.MyMachGroup = Map.refMachGroupPanelVM.SelectedMachGroup + Dim SelMachGroup As Core.MyMachGroupM = Map.refMachGroupPanelVM.SelectedMachGroup If IsNothing(SelMachGroup) Then Return SelMachGroup.DeleteMachGroup() End Sub @@ -147,9 +147,9 @@ Public Class TopPanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Sub RemovePart() - Dim SelMachGroup As Core.MyMachGroup = Map.refMachGroupPanelVM.SelectedMachGroup + Dim SelMachGroup As Core.MyMachGroupM = Map.refMachGroupPanelVM.SelectedMachGroup If IsNothing(SelMachGroup) Then Return - Dim SelPart As Core.Part = SelMachGroup.SelPart + Dim SelPart As Core.PartM = SelMachGroup.SelPart If IsNothing(SelPart) Then Return SelPart.DeletePart() End Sub @@ -174,9 +174,9 @@ Public Class TopPanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Sub MoveUpPart() - Dim SelMachGroup As Core.MyMachGroup = Map.refMachGroupPanelVM.SelectedMachGroup + Dim SelMachGroup As Core.MyMachGroupM = Map.refMachGroupPanelVM.SelectedMachGroup If IsNothing(SelMachGroup) Then Return - Dim SelPart As Core.Part = SelMachGroup.SelPart + Dim SelPart As Core.PartM = SelMachGroup.SelPart If IsNothing(SelPart) Then Return If SelMachGroup.nMachineType = MachineType.BEAM Then Dim BeamMachGroup As BeamMachGroup = DirectCast(SelMachGroup, BeamMachGroup) @@ -207,9 +207,9 @@ Public Class TopPanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Sub MoveDownPart() - Dim SelMachGroup As Core.MyMachGroup = Map.refMachGroupPanelVM.SelectedMachGroup + Dim SelMachGroup As Core.MyMachGroupM = Map.refMachGroupPanelVM.SelectedMachGroup If IsNothing(SelMachGroup) Then Return - Dim SelPart As Core.Part = SelMachGroup.SelPart + Dim SelPart As Core.PartM = SelMachGroup.SelPart If IsNothing(SelPart) Then Return If SelMachGroup.nMachineType = MachineType.BEAM Then Dim BeamMachGroup As BeamMachGroup = DirectCast(SelMachGroup, BeamMachGroup) @@ -240,9 +240,9 @@ Public Class TopPanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Sub ReOrderPart() - Dim SelMachGroup As Core.MyMachGroup = Map.refMachGroupPanelVM.SelectedMachGroup + Dim SelMachGroup As Core.MyMachGroupM = Map.refMachGroupPanelVM.SelectedMachGroup If IsNothing(SelMachGroup) Then Return - Dim SelPart As Core.Part = SelMachGroup.SelPart + Dim SelPart As Core.PartM = SelMachGroup.SelPart If IsNothing(SelPart) Then Return If SelMachGroup.nMachineType = MachineType.BEAM Then Dim BeamMachGroup As BeamMachGroup = DirectCast(SelMachGroup, BeamMachGroup)