-ripristinato funzioni da modulo config
-pulizia di proj e prod manager -da sistemare selectedmachgroup
This commit is contained in:
@@ -169,9 +169,40 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
If Not IsNothing(BtlPart) Then
|
||||
' gestisco selezione pezzo
|
||||
Configuration.SelectedPieces(BtlPart.nPartId, Me)
|
||||
EgtBeamShowFacesName(False)
|
||||
EgtBeamShowLoadingSide(False, False)
|
||||
Map.refProjectVM.MacroFeature_IsEnabled = True
|
||||
' se modalità building, la tolgo
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
ShowBuilding(False, False)
|
||||
End If
|
||||
SceneSelPartSelection()
|
||||
' seleziono pezzo in Db geometrico
|
||||
EgtBeamSetPart(BtlPart.nPartId)
|
||||
EgtBeamShowFacesName(True)
|
||||
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
|
||||
Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
|
||||
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
|
||||
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
|
||||
Configuration.SetSearchPiece(BtlPart.nPartId)
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim bFound As Boolean = False
|
||||
For Each Part As PartVM In Machgroup.PartVMList
|
||||
If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
Part.SetSearchFound()
|
||||
bFound = True
|
||||
Else
|
||||
Part.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
If bFound Then
|
||||
Machgroup.SetSearchFound()
|
||||
Else
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
' seleziono la prima feature
|
||||
If Not IsNothing(BtlPart) AndAlso Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SelBTLFeatureVM = BtlPart.BTLFeatureVMList(0)
|
||||
|
||||
@@ -149,10 +149,6 @@
|
||||
<DependentUpon>PdfViewer.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PdfViewer\PDFViewerVM.vb" />
|
||||
<Compile Include="ProdManager\ProdManagerV.xaml.vb">
|
||||
<DependentUpon>ProdManagerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProdManager\ProdManagerVM.vb" />
|
||||
<Compile Include="ProjectFileVM\ProdFileVM.vb" />
|
||||
<Compile Include="ProjectFileVM\ProjFileVM.vb" />
|
||||
<Compile Include="ProjectManager\ProjectManagerVM.vb" />
|
||||
@@ -615,10 +611,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ProdManager\ProdManagerV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="ProjectTypeWnd\OnlyProdProjectTypeWndV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -46,4 +46,27 @@ Public Class OnlyProdRawPartListV
|
||||
})
|
||||
End Sub
|
||||
|
||||
'' funzione che permette di selezionare un pezzo anche quando gia' selezionato
|
||||
'Private Sub PartInRawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
' If TypeOf sender Is DataGridRow Then
|
||||
' Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
||||
' If Not IsNothing(Row) Then
|
||||
' Dim MyMachGroup As Core.MyMachGroupVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup
|
||||
' If EgtGetCurrMachGroup() = GDB_ID.NULL Then Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = MyMachGroup
|
||||
' MyMachGroup.SelPart = MyMachGroup.SelPart
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'' funzione che impedisce di editare le righe che sono gia' in produzione
|
||||
'Private Sub PartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
||||
' If IsNothing(e.Row) Then Return
|
||||
' Dim RowVM As PartVM = DirectCast(e.Row.DataContext, PartVM)
|
||||
' ' se in produzione impedisco modifica dei parametri
|
||||
' If RowVM.nProduction_State > ItemState.ND Then
|
||||
' 'For Each cell In Row.Item
|
||||
' e.Cancel = True
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -14,18 +14,20 @@ Public Class MyMachGroupPanelVM
|
||||
Set(value As MyMachGroupVM)
|
||||
' deevidenzio BTLPart di questo pezzo
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
EgtBeamShowFacesName(False)
|
||||
EgtBeamShowLoadingSide(False, False)
|
||||
' mostro pezzi selezionati
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count = 1 Then
|
||||
' se pezzo evidenziato da selezione precedente
|
||||
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST Then
|
||||
Dim nSelBTLPartId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLParts(0).nPartId
|
||||
' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
Configuration.ResetSearchPiece(nSelBTLPartId)
|
||||
End If
|
||||
End If
|
||||
If Not IsNothing(SelectedMachGroup) AndAlso Not IsNothing(SelectedMachGroup.SelPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
Configuration.ResetSearch(SelectedMachGroup.SelPart.nPartId)
|
||||
End If
|
||||
'If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count = 1 Then
|
||||
' ' se pezzo evidenziato da selezione precedente
|
||||
' If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST Then
|
||||
' Dim nSelBTLPartId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLParts(0).nPartId
|
||||
' ' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
' Configuration.ResetSearchPiece(nSelBTLPartId)
|
||||
' End If
|
||||
'End If
|
||||
'If Not IsNothing(SelectedMachGroup) AndAlso Not IsNothing(SelectedMachGroup.SelPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
' Configuration.ResetSearch(SelectedMachGroup.SelPart.nPartId)
|
||||
'End If
|
||||
' se modalita' assemblato
|
||||
Configuration.AssembledMode(Map.refShowBeamPanelVM.ShowBuilding_IsChecked)
|
||||
' se precedente pezzo selezionato
|
||||
@@ -54,12 +56,11 @@ Public Class MyMachGroupPanelVM
|
||||
OnPostSetCurrMachGroup()
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelectedMachGroup))
|
||||
' imposto tipo di grid selezionata
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Not IsNothing(value) Then
|
||||
Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP)
|
||||
Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Visible)
|
||||
Map.refStatisticsTimePanelVM.SetViewPage_Visibility(Visibility.Collapsed)
|
||||
End If
|
||||
'' imposto tipo di grid selezionata
|
||||
'If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Not IsNothing(value) Then
|
||||
' Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP)
|
||||
' Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Visible)
|
||||
'End If
|
||||
' se MachGroup gia' mandato in produzione,disabilito pulsanti verify e reset
|
||||
If Not IsNothing(SelectedMachGroup) AndAlso SelectedMachGroup.nProduction_State >= ItemState.Assigned Then
|
||||
Map.refCALCPanelVM.SetVerifyIsEnabled(False)
|
||||
|
||||
@@ -32,12 +32,22 @@ Public Class MyMachGroupVM
|
||||
If Not IsNothing(m_SelPart) Then
|
||||
' deevidenzio BTLPart di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
Configuration.ResetSearch(m_SelPart.nPartId)
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Dim nDuploOriginalId As Integer = 0
|
||||
If EgtGetInfo(m_SelPart.nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
Map.refProjectVM.SetFeatureListVisibility(False)
|
||||
End If
|
||||
' se modalita' assemblato
|
||||
Configuration.AssembledMode(Map.refShowBeamPanelVM.ShowBuilding_IsChecked)
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
End If
|
||||
m_SelPart = value
|
||||
' seleziono pezzo
|
||||
@@ -56,9 +66,14 @@ Public Class MyMachGroupVM
|
||||
End If
|
||||
' trovo ed evidenzio BTLPart di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Configuration.SetSearch(m_SelPart.nPartId)
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Dim nDuploOriginalId As Integer = 0
|
||||
If EgtGetInfo(m_SelPart.nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).SetSearchFound()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
If Not IsNothing(value) Then EgtDraw()
|
||||
NotifyPropertyChanged(NameOf(SelPart))
|
||||
|
||||
@@ -215,7 +215,7 @@ Public Class NewOpenProjectFileDialogVM
|
||||
' Map.refProjManagerVM.OpenProject(m_ProjectList(0).ProjFileList(0))
|
||||
' End If
|
||||
If m_ProjectType = ProjectType.PROD Then
|
||||
For Each ProjectName In Map.refProdManagerVM.m_MruFiles.FileNames
|
||||
For Each ProjectName In Map.refOnlyProdManagerVM.m_MruFiles.FileNames
|
||||
If Not String.IsNullOrWhiteSpace(ProjectName) Then
|
||||
Dim sProdId As String = Path.GetFileNameWithoutExtension(ProjectName)
|
||||
If Not String.IsNullOrWhiteSpace(sProdId) Then
|
||||
@@ -223,7 +223,7 @@ Public Class NewOpenProjectFileDialogVM
|
||||
Integer.TryParse(sProdId, nProdId)
|
||||
Dim PjFileM = DbControllers.m_ProdController.FindCoreByProdId(nProdId)
|
||||
Dim PjFileVM = New ProdFileVM(PjFileM)
|
||||
Map.refProdManagerVM.OpenProject(PjFileVM)
|
||||
Map.refOnlyProdManagerVM.OpenProject(PjFileVM)
|
||||
bOpened = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -543,7 +543,7 @@ Public Class OnlyProdManagerVM
|
||||
DbControllers.m_ProjController.UpdateInfo(nProjId, "Hand made", "Hand made", "", Date.MinValue, nType, Map.refMachinePanelVM.SelectedMachine.Name)
|
||||
SetCurrProj(nProjId)
|
||||
End If
|
||||
Map.refProjectVM.SetOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
' inizializzo nuovo progetto PROD
|
||||
NewProdFromProj()
|
||||
Else
|
||||
@@ -616,7 +616,7 @@ Public Class OnlyProdManagerVM
|
||||
Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
|
||||
Else
|
||||
If Map.refSceneHostVM.MainController.OpenProject(sFilePath, False) Then
|
||||
Map.refProjectVM.SetOptimizePanel_Visibility(True)
|
||||
Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(True)
|
||||
End If
|
||||
End If
|
||||
' imposto flag secondo tipo di progetto (travi o pareti)
|
||||
@@ -886,7 +886,7 @@ Public Class OnlyProdManagerVM
|
||||
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
Part.CalcBTLPartVolume()
|
||||
Next
|
||||
Map.refProjectVM.SetOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
'Map.refPartManagerVM.LockVisibilityUpdate()
|
||||
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
||||
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = bAssembly
|
||||
|
||||
@@ -116,36 +116,36 @@ Public Class OpenProjectFileDialogVM
|
||||
If IsNothing(SelProject) Then Return
|
||||
' recupero indice per riselezionare
|
||||
Dim ProjListIndex As Integer = m_ProjectList.IndexOf(SelProject)
|
||||
If m_ProjectType = ProjectType.PROJ Then
|
||||
' verifico se proj selezionato e' il corrente
|
||||
If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso SelProject.nProjId = ProjectManagerVM.CurrProj.nProjId Then
|
||||
MessageBox.Show(EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
' verifico se proj selezionato ha prod
|
||||
If SelProject.nProdId > 0 Then
|
||||
MessageBox.Show(EgtMsg(61873), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
'Map.refProjManagerVM.m_MruFiles.Remove(SelProject.sProjPath)
|
||||
'Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
' cancello progetto
|
||||
' CheckMe impostata come cancellazione FISICA dal DB...
|
||||
DbControllers.m_ProjController.DeleteProj(SelProject.nProjId, False)
|
||||
' cancello cartella del Proj
|
||||
Try
|
||||
Directory.Delete(SelProject.sProjDirPath, True)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error in deleting directory " & SelProject.sProjDirPath)
|
||||
End Try
|
||||
' aggiorno lista progetti
|
||||
m_ProjectList.Clear()
|
||||
Dim DbProjectList As New List(Of ProjFileM)
|
||||
DbProjectList = DbControllers.m_ProjController.GetLastDesc(50, False)
|
||||
For Each Project In DbProjectList
|
||||
m_ProjectList.Add(New ProjFileVM(Project))
|
||||
Next
|
||||
ElseIf m_ProjectType = ProjectType.PROD Then
|
||||
'If m_ProjectType = ProjectType.PROJ Then
|
||||
' ' verifico se proj selezionato e' il corrente
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso SelProject.nProjId = ProjectManagerVM.CurrProj.nProjId Then
|
||||
' MessageBox.Show(EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Return
|
||||
' End If
|
||||
' ' verifico se proj selezionato ha prod
|
||||
' If SelProject.nProdId > 0 Then
|
||||
' MessageBox.Show(EgtMsg(61873), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Return
|
||||
' End If
|
||||
' 'Map.refProjManagerVM.m_MruFiles.Remove(SelProject.sProjPath)
|
||||
' 'Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
' ' cancello progetto
|
||||
' ' CheckMe impostata come cancellazione FISICA dal DB...
|
||||
' DbControllers.m_ProjController.DeleteProj(SelProject.nProjId, False)
|
||||
' ' cancello cartella del Proj
|
||||
' Try
|
||||
' Directory.Delete(SelProject.sProjDirPath, True)
|
||||
' Catch ex As Exception
|
||||
' EgtOutLog("Error in deleting directory " & SelProject.sProjDirPath)
|
||||
' End Try
|
||||
' ' aggiorno lista progetti
|
||||
' m_ProjectList.Clear()
|
||||
' Dim DbProjectList As New List(Of ProjFileM)
|
||||
' DbProjectList = DbControllers.m_ProjController.GetLastDesc(50, False)
|
||||
' For Each Project In DbProjectList
|
||||
' m_ProjectList.Add(New ProjFileVM(Project))
|
||||
' Next
|
||||
If m_ProjectType = ProjectType.PROD Then
|
||||
' verifico se prod selezionato e' il corrente
|
||||
If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso SelProject.nProdId = ProjectManagerVM.CurrProd.nProdId Then
|
||||
MessageBox.Show(EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
@@ -156,8 +156,8 @@ Public Class OpenProjectFileDialogVM
|
||||
MessageBox.Show(EgtMsg(61874), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
Map.refProdManagerVM.m_MruFiles.Remove(SelProject.sProdPath)
|
||||
Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Remove(SelProject.sProdPath)
|
||||
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
|
||||
' cancello progetto
|
||||
DbControllers.m_ProdController.DeleteProd(SelProject.nProdId, True)
|
||||
' riporto prod in proj
|
||||
|
||||
@@ -124,16 +124,16 @@ Public Class OptimizePanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ViewPage_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.VIEW, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property MachiningPage_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.MACHINING Or Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
'Public ReadOnly Property ViewPage_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(Map.refMainMenuVM.SelPage = Pages.VIEW, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
'End Property
|
||||
'Public ReadOnly Property MachiningPage_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(Map.refMainMenuVM.SelPage = Pages.MACHINING Or Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ Public Class ProdManagerVM
|
||||
Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
|
||||
Else
|
||||
If Map.refSceneHostVM.MainController.OpenProject(sFilePath, False) Then
|
||||
Map.refProjectVM.SetOptimizePanel_Visibility(True)
|
||||
'Map.refProjectVM.SetOptimizePanel_Visibility(True)
|
||||
End If
|
||||
End If
|
||||
' imposto flag secondo tipo di progetto (travi o pareti)
|
||||
|
||||
@@ -158,25 +158,25 @@ Public Class ProjectVM
|
||||
' If Not IsNothing(Map.refProdManagerVM) Then Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.GoToProj_Visibility))
|
||||
'End Sub
|
||||
|
||||
Private m_OptimizePanel_Visibility As Boolean = True
|
||||
Public Property OptimizePanel_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_OptimizePanel_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_OptimizePanel_Visibility = (value = Visibility.Visible)
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetOptimizePanel_Visibility(IsVisible As Boolean)
|
||||
m_OptimizePanel_Visibility = IsVisible
|
||||
NotifyPropertyChanged(NameOf(OptimizePanel_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.CalcRotFlip_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.Optimize_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.OriginType_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.ViewPage_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.MachiningPage_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.NestingOption_Visibility))
|
||||
End Sub
|
||||
'Private m_OptimizePanel_Visibility As Boolean = True
|
||||
'Public Property OptimizePanel_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(m_OptimizePanel_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
' Set(value As Visibility)
|
||||
' m_OptimizePanel_Visibility = (value = Visibility.Visible)
|
||||
' End Set
|
||||
'End Property
|
||||
'Friend Sub SetOptimizePanel_Visibility(IsVisible As Boolean)
|
||||
' m_OptimizePanel_Visibility = IsVisible
|
||||
' NotifyPropertyChanged(NameOf(OptimizePanel_Visibility))
|
||||
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.CalcRotFlip_Visibility))
|
||||
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.Optimize_Visibility))
|
||||
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.OriginType_Visibility))
|
||||
' 'Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.ViewPage_Visibility))
|
||||
' 'Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.MachiningPage_Visibility))
|
||||
' Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.NestingOption_Visibility))
|
||||
'End Sub
|
||||
|
||||
Friend Sub NotifyCalcPanel_Visibility()
|
||||
'Map.refCALCPanelVM.NotifyPropertyChanged(NameOf(Map.refCALCPanelVM.ViewPage_Visibility))
|
||||
@@ -240,8 +240,8 @@ Public Class ProjectVM
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.CalcRotFlip_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.Optimize_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.OriginType_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.ViewPage_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.MachiningPage_Visibility))
|
||||
'Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.ViewPage_Visibility))
|
||||
'Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.MachiningPage_Visibility))
|
||||
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.NestingOption_Visibility))
|
||||
End Sub
|
||||
|
||||
@@ -374,7 +374,7 @@ Public Class ProjectVM
|
||||
Map.refLeftPanelVM.SetLeftPanelIsEnabled(bIsEnabled)
|
||||
Map.refBTLPartManagerVM.SetBTLPartManagerIsEnabled(bIsEnabled)
|
||||
'If Not IsNothing(Map.refProjManagerVM) Then Map.refProjManagerVM.SetProjManagerIsEnabled(bIsEnabled)
|
||||
If Not IsNothing(Map.refProdManagerVM) Then Map.refProdManagerVM.SetProdManagerIsEnabled(bIsEnabled)
|
||||
'If' Not IsNothing(Map.refProdManagerVM) Then Map.refProdManagerVM.SetProdManagerIsEnabled(bIsEnabled)
|
||||
Map.refRawPartManagerVM.SetRawPartManagerIsEnabled(bIsEnabled)
|
||||
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(bIsEnabled)
|
||||
Map.refFeatureManagerVM.SetFeatureManagerIsEnabled(bIsEnabled)
|
||||
|
||||
@@ -48,9 +48,9 @@ Public Class ProdFileVM
|
||||
Select Case VerifyResult
|
||||
Case MessageBoxResult.Yes
|
||||
' salvo proj
|
||||
If Not IsNothing(Map.refProdManagerVM) Then
|
||||
Map.refProdManagerVM.Save()
|
||||
ElseIf Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
'If Not IsNothing(Map.refProdManagerVM) Then
|
||||
' Map.refProdManagerVM.Save()
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.Save()
|
||||
End If
|
||||
Case MessageBoxResult.Cancel
|
||||
@@ -64,12 +64,12 @@ Public Class ProdFileVM
|
||||
Directory.Delete(sProjectDirPath, True)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
If Not IsNothing(Map.refProdManagerVM) Then
|
||||
Map.refProdManagerVM.m_MruFiles.Remove(CurrProject.sProdPath)
|
||||
Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
ElseIf Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
'If Not IsNothing(Map.refProdManagerVM) Then
|
||||
' Map.refProdManagerVM.m_MruFiles.Remove(CurrProject.sProdPath)
|
||||
' Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Remove(CurrProject.sProdPath)
|
||||
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
|
||||
End If
|
||||
DbControllers.m_ProdController.DeleteProd(CurrProject.nProdId, False)
|
||||
'If Not IsNothing(Map.refProjManagerVM) AndAlso CurrProject.nProdId = ProjectManagerVM.CurrProj.nProdId Then
|
||||
@@ -79,9 +79,9 @@ Public Class ProdFileVM
|
||||
' reset prod in path proj
|
||||
Map.refOnlyProdManagerVM.UpdateCurrProj()
|
||||
End If
|
||||
If Not IsNothing(Map.refProdManagerVM) Then
|
||||
ProjectManagerVM.CurrProd = Nothing
|
||||
End If
|
||||
'If Not IsNothing(Map.refProdManagerVM) Then
|
||||
' ProjectManagerVM.CurrProd = Nothing
|
||||
'End If
|
||||
EgtResetModified()
|
||||
Return MessageBoxResult.No
|
||||
End If
|
||||
|
||||
@@ -196,8 +196,8 @@ Public Class RawPartManagerVM
|
||||
sSaveExt = "." & sSaveExt
|
||||
End If
|
||||
Try
|
||||
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & ".cnc"
|
||||
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & sSaveExt
|
||||
Dim sMachGroupFilePath As String = Map.refOnlyProdManagerVM.CurrProd.sProdDirPath & "\" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & ".cnc"
|
||||
Dim sNewPath As String = sSaveCncPath & "\" & Map.refOnlyProdManagerVM.CurrProd.sProdId & "-" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & sSaveExt
|
||||
File.Copy(sMachGroupFilePath, sNewPath, True)
|
||||
MessageBox.Show(String.Format("File copied! You can find it at {0}", {sNewPath}), "Info", MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
Catch ex As Exception
|
||||
@@ -288,8 +288,8 @@ Public Class RawPartManagerVM
|
||||
End If
|
||||
If String.IsNullOrWhiteSpace(sSaveCncPath) OrElse Not Directory.Exists(sSaveCncPath) Then Return
|
||||
Try
|
||||
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Machgroup.Name.ToString() & ".cnc"
|
||||
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Machgroup.Name.ToString() & sSaveExt
|
||||
Dim sMachGroupFilePath As String = Map.refOnlyProdManagerVM.CurrProd.sProdDirPath & "\" & Machgroup.Name.ToString() & ".cnc"
|
||||
Dim sNewPath As String = sSaveCncPath & "\" & Map.refOnlyProdManagerVM.CurrProd.sProdId & "-" & Machgroup.Name.ToString() & sSaveExt
|
||||
File.Copy(sMachGroupFilePath, sNewPath, True)
|
||||
sErrorMessage &= String.Format("File copied! You can find it at {0}", {sNewPath}) & Environment.NewLine
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -611,15 +611,15 @@ Public Class MySceneHostVM
|
||||
End If
|
||||
Else
|
||||
' in base al tipo progetto rimuovo il file in apertura dalla lista degli MRU
|
||||
'If ProjectType = ProjectType.PROJ Then
|
||||
' ' nel caso PROJ ricavo il percorso del file tramite il ProjId
|
||||
' Dim PjFileVM As ProjFileVM
|
||||
' If Not IsNothing(ProjId) AndAlso ProjId <> 0 Then
|
||||
' PjFileVM = New ProjFileVM(DbControllers.m_ProjController.FindByProjIdConv(ProjId))
|
||||
' If Not IsNothing(PjFileVM.ProjFileM) AndAlso Not IsNothing(PjFileVM.sProjPath) Then Map.refProjManagerVM.m_MruFiles.Remove(PjFileVM.sProjPath)
|
||||
' End If
|
||||
'End If
|
||||
If ProjectType = ProjectType.PROD Then Map.refProdManagerVM.m_MruFiles.Remove(sFile)
|
||||
If ProjectType = ProjectType.PROJ Then
|
||||
' nel caso PROJ ricavo il percorso del file tramite il ProjId
|
||||
Dim PjFileVM As ProjFileVM
|
||||
If Not IsNothing(ProjId) AndAlso ProjId <> 0 Then
|
||||
PjFileVM = New ProjFileVM(DbControllers.m_ProjController.FindByProjIdConv(ProjId))
|
||||
If Not IsNothing(PjFileVM.ProjFileM) AndAlso Not IsNothing(PjFileVM.sProjPath) Then Map.refOnlyProdManagerVM.m_MruFiles.Remove(PjFileVM.sProjPath)
|
||||
End If
|
||||
End If
|
||||
If ProjectType = ProjectType.PROD Then Map.refOnlyProdManagerVM.m_MruFiles.Remove(sFile)
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10003) & " '" & sFile & "'", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
|
||||
'Map.refProjManagerVM.NewProject()
|
||||
If Map.refMainMenuVM.SelPage = Pages.MACHINING OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
@@ -649,7 +649,7 @@ Public Class MySceneHostVM
|
||||
'If Not IsNothing(PjFileVM.ProjFileM) AndAlso Not IsNothing(PjFileVM.sProjPath) Then Map.refProjManagerVM.m_MruFiles.Remove(PjFileVM.sProjPath)
|
||||
End If
|
||||
End If
|
||||
If ProjectType = ProjectType.PROD Then Map.refProdManagerVM.m_MruFiles.Remove(sFile)
|
||||
If ProjectType = ProjectType.PROD Then Map.refOnlyProdManagerVM.m_MruFiles.Remove(sFile)
|
||||
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
Return
|
||||
|
||||
@@ -33,8 +33,8 @@ Public Class SupervisorComm
|
||||
Select Case Message.ItemType
|
||||
Case StatusMapItemType.Comm
|
||||
Select Case Message.Operation
|
||||
Case StatusMapOpType.ChangeProdInProdRequest
|
||||
Map.refProdManagerVM.OpenProjectFromSupervisor(Message.ItemId)
|
||||
'Case StatusMapOpType.ChangeProdInProdRequest
|
||||
' Map.refProdManagerVM.OpenProjectFromSupervisor(Message.ItemId)
|
||||
Case StatusMapOpType.OpenPageInViewOptimRequest
|
||||
Map.refMainMenuVM.OpenPageFromSupervisor(Math.Abs(Message.ItemId))
|
||||
Case StatusMapOpType.ChangeProdInOnlyProdRequest
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<EgtBEAMWALL:MainWindowVM x:Key="MainWindowVM"/>
|
||||
<!--<EgtBEAMWALL:MySceneHostVM x:Key="MySceneHostVM"/>-->
|
||||
<!--<EgtBEAMWALL:ProjManagerVM x:Key="ProjManagerVM"/>-->
|
||||
<EgtBEAMWALL:ProdManagerVM x:Key="ProdManagerVM"/>
|
||||
<!--<EgtBEAMWALL:ProdManagerVM x:Key="ProdManagerVM"/>-->
|
||||
<EgtBEAMWALL:MainMenuVM x:Key="MainMenuVM"/>
|
||||
<EgtBEAMWALL:MyStatusBarVM x:Key="StatusBarVM"/>
|
||||
<EgtBEAMWALL:ProjectVM x:Key="ProjectVM"/>
|
||||
|
||||
@@ -118,9 +118,9 @@ Module LuaExec
|
||||
EgtLuaSetGlobNumVar("NEST.CORNER", nNestCorner)
|
||||
EgtLuaSetGlobStringVar("NEST.MATERIAL", PartList(0).sMATERIAL)
|
||||
EgtLuaSetGlobNumVar("NEST.TIME", nNestTime)
|
||||
If Not IsNothing(Map.refProdManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProd) Then
|
||||
EgtLuaSetGlobNumVar("NEST.PRODID", ProjectManagerVM.CurrProd.nProdId)
|
||||
ElseIf Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Not IsNothing(Map.refOnlyProdManagerVM.CurrProd) Then
|
||||
'If Not IsNothing(Map.refProdManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProd) Then
|
||||
' EgtLuaSetGlobNumVar("NEST.PRODID", ProjectManagerVM.CurrProd.nProdId)
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Not IsNothing(Map.refOnlyProdManagerVM.CurrProd) Then
|
||||
EgtLuaSetGlobNumVar("NEST.PRODID", ProjectManagerVM.CurrProd.nProdId)
|
||||
End If
|
||||
EgtLuaCreateGlobTable("PART")
|
||||
|
||||
@@ -5,7 +5,7 @@ Module Map
|
||||
|
||||
Private m_refMainWindowVM As MainWindowVM
|
||||
'Private m_refProjManagerVM As ProjManagerVM
|
||||
Private m_refProdManagerVM As ProdManagerVM
|
||||
'Private m_refProdManagerVM As ProdManagerVM
|
||||
Private m_refProjectVM As ProjectVM
|
||||
Private m_refMainMenuVM As MainMenuVM
|
||||
Private m_refLeftPanelVM As LeftPanelVM
|
||||
@@ -56,11 +56,11 @@ Module Map
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refProdManagerVM As ProdManagerVM
|
||||
Get
|
||||
Return m_refProdManagerVM
|
||||
End Get
|
||||
End Property
|
||||
'Public ReadOnly Property refProdManagerVM As ProdManagerVM
|
||||
' Get
|
||||
' Return m_refProdManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refProjectVM As ProjectVM
|
||||
Get
|
||||
@@ -274,10 +274,10 @@ Module Map
|
||||
' Return Not IsNothing(m_refProjManagerVM)
|
||||
'End Function
|
||||
|
||||
Friend Function SetRefProdManagerVM(ProdManagerVM As ProdManagerVM) As Boolean
|
||||
m_refProdManagerVM = ProdManagerVM
|
||||
Return Not IsNothing(m_refProdManagerVM)
|
||||
End Function
|
||||
'Friend Function SetRefProdManagerVM(ProdManagerVM As ProdManagerVM) As Boolean
|
||||
' m_refProdManagerVM = ProdManagerVM
|
||||
' Return Not IsNothing(m_refProdManagerVM)
|
||||
'End Function
|
||||
|
||||
Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
|
||||
m_refProjectVM = ProjectVM
|
||||
@@ -454,8 +454,7 @@ Module Map
|
||||
End Function
|
||||
Friend Function EndInit() As Boolean
|
||||
Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(m_refMainMenuVM) AndAlso
|
||||
Not IsNothing(LibMap.refStatusBarVM) AndAlso
|
||||
Not IsNothing(m_refProdManagerVM) AndAlso Not IsNothing(m_refConfigurationPageVM) AndAlso
|
||||
Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refConfigurationPageVM) AndAlso
|
||||
Not IsNothing(LibMap.refSceneHostVM) AndAlso Not IsNothing(LibMap.refShowPanelVM) AndAlso
|
||||
Not IsNothing(CoreMap.refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM) AndAlso
|
||||
Not IsNothing(m_refRawPartListVM) AndAlso Not IsNothing(m_refWarehouseWndVM) AndAlso
|
||||
|
||||
Reference in New Issue
Block a user