-rimosso distinzione tra view, machining page
This commit is contained in:
@@ -1532,8 +1532,8 @@ Public Class BTLPartVM
|
||||
End Get
|
||||
Set(value As BTLFeatureVM)
|
||||
m_SelBTLFeatureVM = value
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART) Then
|
||||
If Not IsNothing(m_SelBTLFeatureVM) Then
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART) Then
|
||||
If Not IsNothing(m_SelBTLFeatureVM) Then
|
||||
DirectCast(m_SelBTLFeatureVM, BTLFeatureVM).SelGeomFeature()
|
||||
' deseleziono i parametri
|
||||
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
|
||||
@@ -1558,7 +1558,7 @@ Public Class BTLPartVM
|
||||
EgtDeselectAll()
|
||||
End If
|
||||
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
|
||||
End If
|
||||
'End If
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
EgtResetCurrMachGroup()
|
||||
ResetSearchFound()
|
||||
|
||||
@@ -148,6 +148,7 @@ Public Class BTLStructureVM
|
||||
|
||||
Public Sub SelectBTLPart(BtlPart As BTLPartVM)
|
||||
m_SelBTLPart = BtlPart
|
||||
m_SelBTLPart.SetIsSettingBtnOpen(False)
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
'ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
' '' resetto gruppo di lavorazione corrente
|
||||
@@ -177,6 +178,7 @@ Public Class BTLStructureVM
|
||||
' aggiorno stato selezionato tutto
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
Map.refProjectVM.SetSelManagerTab(ProjectVM.ManagerTab.RAWPARTMANAGER)
|
||||
EgtZoom(ZM.ALL)
|
||||
NotifyPropertyChanged(NameOf(SelBTLPart))
|
||||
If m_SelBTLParts.Count = 1 Then
|
||||
|
||||
@@ -164,10 +164,6 @@
|
||||
</Compile>
|
||||
<Compile Include="ProjectTypeWnd\ProjectTypeWndVM.vb" />
|
||||
<Compile Include="Project\ProjectVM.vb" />
|
||||
<Compile Include="ProjManager\ProjManagerV.xaml.vb">
|
||||
<DependentUpon>ProjManagerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjManager\ProjManagerVM.vb" />
|
||||
<Compile Include="RawPartManager\OnlyProdRawPartManagerV.xaml.vb">
|
||||
<DependentUpon>OnlyProdRawPartManagerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -631,10 +627,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="ProjManager\ProjManagerV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="RawPartManager\OnlyProdRawPartManagerV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<StackPanel>
|
||||
<Button Command="{Binding ShowPopUpSettingBtnCommand}"
|
||||
ToolTip="{Binding Settings_Command_ToolTip}"
|
||||
Height="15" Width="15" Margin="0">
|
||||
@@ -350,7 +350,7 @@
|
||||
<Popup IsOpen="{Binding IsSettingBtnOpen}"
|
||||
AllowsTransparency="True"
|
||||
PopupAnimation="Scroll"
|
||||
StaysOpen="False"
|
||||
StaysOpen="False"
|
||||
PlacementTarget="{Binding ElementName=BTLPart_DataGrid.Button}">
|
||||
<EgtBEAMWALL:OnlyProdBTLPartManagerV/>
|
||||
</Popup>
|
||||
|
||||
@@ -17,6 +17,7 @@ Public Class OnlyProdBTLPartListV
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_BTLPartListVM = DataContext
|
||||
m_NameDataGridType = BTLPart_DataGrid.GetType()
|
||||
' Evita il drag sulla selezione multipla
|
||||
s_isDraggingSelectionField = m_NameDataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic)
|
||||
s_endDraggingMethod = m_NameDataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic)
|
||||
'SetSelButton(MouseButton.Right)
|
||||
@@ -104,10 +105,25 @@ Public Class OnlyProdBTLPartListV
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function FindVisualParents(Of T As DependencyObject, U As DependencyObject, V As DependencyObject)(ByVal child As DependencyObject) As Object
|
||||
Dim parentObject As DependencyObject = VisualTreeHelper.GetParent(child)
|
||||
If parentObject Is Nothing Then Return Nothing
|
||||
If TypeOf parentObject Is T Then
|
||||
Return parentObject
|
||||
ElseIf TypeOf parentObject Is U Then
|
||||
Return parentObject
|
||||
ElseIf TypeOf parentObject Is V Then
|
||||
Return parentObject
|
||||
Else
|
||||
Return FindVisualParents(Of T, U, V)(parentObject)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
|
||||
'If m_SelectBtn = MouseButton.Left AndAlso e.LeftButton = MouseButtonState.Pressed Then
|
||||
' If CBool(If(s_isDraggingSelectionField?.GetValue(BTLPart_DataGrid), False)) Then s_endDraggingMethod.Invoke(BTLPart_DataGrid, New Object(-1) {})
|
||||
'End If
|
||||
' Evita il drag sulla selezione multipla
|
||||
If m_SelectBtn = MouseButton.Left AndAlso e.LeftButton = MouseButtonState.Pressed Then
|
||||
If CBool(If(s_isDraggingSelectionField?.GetValue(BTLPart_DataGrid), False)) Then s_endDraggingMethod.Invoke(BTLPart_DataGrid, New Object(-1) {})
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
@@ -117,7 +133,7 @@ Public Class OnlyProdBTLPartListV
|
||||
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
||||
If TypeOf Row.DataContext IsNot BTLPartVM Then Return
|
||||
Dim BTLPartVM As BTLPartVM = DirectCast(Row.DataContext, BTLPartVM)
|
||||
Dim DataGridDetailsPresenter As Primitives.DataGridDetailsPresenter = FindVisualParent(Of Primitives.DataGridDetailsPresenter)(e.OriginalSource)
|
||||
Dim DataGridDetailsPresenter As Object = FindVisualParents(Of Button, CheckBox, Primitives.DataGridDetailsPresenter)(e.OriginalSource)
|
||||
If Not IsNothing(DataGridDetailsPresenter) Then Return
|
||||
'Dim parent = e.OriginalSource
|
||||
'While Not IsNothing(parent)
|
||||
|
||||
@@ -109,10 +109,10 @@ Public Class MainMenuVM
|
||||
Dim bOk As Boolean = True
|
||||
' Esco dallo stato corrente
|
||||
Select Case m_SelPage
|
||||
Case Pages.VIEW
|
||||
bOk = ExitVIEW(bVerifyModification)
|
||||
Case Pages.MACHINING
|
||||
bOk = ExitMACHINING(bVerifyModification)
|
||||
'Case Pages.VIEW
|
||||
' bOk = ExitVIEW(bVerifyModification)
|
||||
'Case Pages.MACHINING
|
||||
' bOk = ExitMACHINING(bVerifyModification)
|
||||
Case Pages.CONFIG
|
||||
bOk = ExitCONFIG()
|
||||
Case Pages.ONLYPRODPAGE
|
||||
@@ -122,10 +122,10 @@ Public Class MainMenuVM
|
||||
' Entro nel nuovo stato
|
||||
m_SelPage = Page
|
||||
Select Case m_SelPage
|
||||
Case Pages.VIEW
|
||||
InitVIEW()
|
||||
Case Pages.MACHINING
|
||||
InitMACHINING()
|
||||
'Case Pages.VIEW
|
||||
' InitVIEW()
|
||||
'Case Pages.MACHINING
|
||||
' InitMACHINING()
|
||||
Case Pages.CONFIG
|
||||
InitCONFIG()
|
||||
Case Pages.ONLYPRODPAGE
|
||||
@@ -133,8 +133,8 @@ Public Class MainMenuVM
|
||||
End Select
|
||||
End If
|
||||
' aggiorno visualizzazione RadioButton
|
||||
NotifyPropertyChanged(NameOf(View_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(Machining_IsChecked))
|
||||
'NotifyPropertyChanged(NameOf(View_IsChecked))
|
||||
'NotifyPropertyChanged(NameOf(Machining_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(Supervisor_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(Config_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(OnlyProdPage_IsChecked))
|
||||
@@ -266,285 +266,285 @@ Public Class MainMenuVM
|
||||
NotifyPropertyChanged(NameOf(MainMenu_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private Function InitVIEW() As Boolean
|
||||
'Map.refProjectVM.SetBottomPanel_Visibility(True)
|
||||
'Map.refProjectVM.SetLeftPanel_Visibility(True)
|
||||
''Map.refLeftPanelVM.UpdateView()
|
||||
'If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.UpdateView()
|
||||
'If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.UpdateView()
|
||||
'Map.refProjectVM.SetFeatureManager_Visibility(True)
|
||||
'Map.refProjectVM.SetTopPanel_Visibility(False)
|
||||
'Map.refProjectVM.SetShowBeamPanel_Visibility(True)
|
||||
'Map.refProjectVM.SetProjManager_Visibility(True)
|
||||
'Map.refProjectVM.SetProdManager_Visibility(False)
|
||||
'Map.refProjectVM.SetOnlyProdManager_Visibility(False)
|
||||
'Map.refProjectVM.SetOnlyProdLeftPanel_Visibility(False)
|
||||
'Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(False)
|
||||
'Map.refProjectVM.SetOptimizePanel_Visibility(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
'Map.refProjectVM.NotifyAllPanelVisibility()
|
||||
'Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refMachinePanelVM.MachineList.Count > 1 AndAlso GetMainPrivateProfileInt(S_MACH, K_CHANGEMACH, 0) = 1)
|
||||
'Map.refStatisticsTimePanelVM.SetStatisticsTimePanel_Visibility()
|
||||
'If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
|
||||
' Map.refFeatureListVM.colFeature_Do.ColumnVisibility = Visibility.Visible
|
||||
'End If
|
||||
'' aggiorno la visibilità delle colonne
|
||||
'For Each col In Map.refFeatureListVM.FeatureColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
'Next
|
||||
'For Each col In Map.refPartListVM.PartColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
'Next
|
||||
'For Each col In Map.refStatisticsVM.StatisticsColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
'Next
|
||||
'For Each col In Map.refPParameterListVM.PParameterListColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
'Next
|
||||
'For Each col In Map.refQParameterListVM.QParameterListColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
'Next
|
||||
'' imposto dimensioni colonne/righe della Grid
|
||||
'DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_VIEW, Map.refProjectVM.GridDims)
|
||||
'DimensionsIniFile.ReadGridDimensions(ConstDims.LEFTPANEL_VIEW, Map.refLeftPanelVM.GridDims)
|
||||
'' apro progetto proj
|
||||
'If Not IsNothing(ProjectManagerVM.CurrProj) Then
|
||||
' If ProjectManagerVM.CurrProj.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROJ, 2, EgtMsg(63005), 10, 100) ' Loading parts
|
||||
' Map.refProjManagerVM.OpenProject(ProjectManagerVM.CurrProj)
|
||||
' ' aggiorno le colonne in base al tipo progetto
|
||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
' Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
|
||||
' Else
|
||||
' Map.refRawPartListVM.UpdateColumns(BWType.BEAM)
|
||||
' Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
|
||||
' End If
|
||||
' ' resetto modifica parametri Q default
|
||||
' Map.refConfigurationPageVM.ResetQParametersModified()
|
||||
' DbControllers.m_ProjController.LockByProjId(ProjectManagerVM.CurrProj.nProjId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
' Else
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROJ, 2, EgtMsg(63005), 10, 100) ' Loading parts
|
||||
' ' recupero indice di modifica progetto
|
||||
' Dim CommIndex As Integer = -1
|
||||
' Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd(m_SupervisorId)
|
||||
' For Each ActiveSession In ActiveSessionList
|
||||
' If ActiveSession.ItemId = ProjectManagerVM.CurrProj.nProdId Then
|
||||
' CommIndex = ActiveSession.Index
|
||||
' End If
|
||||
' Next
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 3, EgtMsg(63002), 30, 100) ' Loading machining groups
|
||||
' ' verifico se il prod di provenienza ha piu' proj
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
|
||||
' ' se si rigenero BTLStructure
|
||||
' Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjectManagerVM.CurrProj.nProjId))
|
||||
' ' carico filtri di ricerca
|
||||
' Map.refProjectVM.BTLStructureVM.LoadFilters()
|
||||
' End If
|
||||
' ' fisso indice sessione di comunicazione
|
||||
' If CommIndex > -1 Then
|
||||
' ProjectManagerVM.CurrProj.SetModificationIndex(CommIndex)
|
||||
' End If
|
||||
' ' mostro tutti i pezzi
|
||||
' Map.refShowBeamPanelVM.ShowAll(True)
|
||||
' ProjectManagerVM.CurrProj.SetReloadProject(True)
|
||||
' End If
|
||||
' ' aggiorno titolo
|
||||
' Map.refMainWindowVM.UpdateTitle()
|
||||
' DbControllers.m_ProjController.LockByProjId(ProjectManagerVM.CurrProj.nProjId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
'Else
|
||||
' Map.refSceneHostVM.MainController.NewProject()
|
||||
' Map.refProjectVM.BTLStructureVM = Nothing
|
||||
' Map.refProjectVM.MachGroupPanelVM = Nothing
|
||||
'End If
|
||||
'Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
'Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
|
||||
'Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility))
|
||||
'Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeMaterial_Visibility))
|
||||
'Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.Statistic_Visibility))
|
||||
'Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.VisStatistic_Visibility))
|
||||
'Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.OtStatistic_Visibility))
|
||||
Return True
|
||||
End Function
|
||||
'Private Function InitVIEW() As Boolean
|
||||
' Map.refProjectVM.SetBottomPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetLeftPanel_Visibility(True)
|
||||
' 'Map.refLeftPanelVM.UpdateView()
|
||||
' If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.UpdateView()
|
||||
' If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.UpdateView()
|
||||
' Map.refProjectVM.SetFeatureManager_Visibility(True)
|
||||
' Map.refProjectVM.SetTopPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetShowBeamPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetProjManager_Visibility(True)
|
||||
' Map.refProjectVM.SetProdManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdLeftPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(False)
|
||||
' Map.refProjectVM.SetOptimizePanel_Visibility(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
' Map.refProjectVM.NotifyAllPanelVisibility()
|
||||
' Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refMachinePanelVM.MachineList.Count > 1 AndAlso GetMainPrivateProfileInt(S_MACH, K_CHANGEMACH, 0) = 1)
|
||||
' Map.refStatisticsTimePanelVM.SetStatisticsTimePanel_Visibility()
|
||||
' If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
|
||||
' Map.refFeatureListVM.colFeature_Do.ColumnVisibility = Visibility.Visible
|
||||
' End If
|
||||
' ' aggiorno la visibilità delle colonne
|
||||
' For Each col In Map.refFeatureListVM.FeatureColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refPartListVM.PartColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refStatisticsVM.StatisticsColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refPParameterListVM.PParameterListColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refQParameterListVM.QParameterListColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' ' imposto dimensioni colonne/righe della Grid
|
||||
' DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_VIEW, Map.refProjectVM.GridDims)
|
||||
' DimensionsIniFile.ReadGridDimensions(ConstDims.LEFTPANEL_VIEW, Map.refLeftPanelVM.GridDims)
|
||||
' ' apro progetto proj
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProj) Then
|
||||
' If ProjectManagerVM.CurrProj.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROJ, 2, EgtMsg(63005), 10, 100) ' Loading parts
|
||||
' Map.refProjManagerVM.OpenProject(ProjectManagerVM.CurrProj)
|
||||
' ' aggiorno le colonne in base al tipo progetto
|
||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
' Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
|
||||
' Else
|
||||
' Map.refRawPartListVM.UpdateColumns(BWType.BEAM)
|
||||
' Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
|
||||
' End If
|
||||
' ' resetto modifica parametri Q default
|
||||
' Map.refConfigurationPageVM.ResetQParametersModified()
|
||||
' DbControllers.m_ProjController.LockByProjId(ProjectManagerVM.CurrProj.nProjId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
' Else
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROJ, 2, EgtMsg(63005), 10, 100) ' Loading parts
|
||||
' ' recupero indice di modifica progetto
|
||||
' Dim CommIndex As Integer = -1
|
||||
' Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd(m_SupervisorId)
|
||||
' For Each ActiveSession In ActiveSessionList
|
||||
' If ActiveSession.ItemId = ProjectManagerVM.CurrProj.nProdId Then
|
||||
' CommIndex = ActiveSession.Index
|
||||
' End If
|
||||
' Next
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 3, EgtMsg(63002), 30, 100) ' Loading machining groups
|
||||
' ' verifico se il prod di provenienza ha piu' proj
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
|
||||
' ' se si rigenero BTLStructure
|
||||
' Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjectManagerVM.CurrProj.nProjId))
|
||||
' ' carico filtri di ricerca
|
||||
' Map.refProjectVM.BTLStructureVM.LoadFilters()
|
||||
' End If
|
||||
' ' fisso indice sessione di comunicazione
|
||||
' If CommIndex > -1 Then
|
||||
' ProjectManagerVM.CurrProj.SetModificationIndex(CommIndex)
|
||||
' End If
|
||||
' ' mostro tutti i pezzi
|
||||
' Map.refShowBeamPanelVM.ShowAll(True)
|
||||
' ProjectManagerVM.CurrProj.SetReloadProject(True)
|
||||
' End If
|
||||
' ' aggiorno titolo
|
||||
' Map.refMainWindowVM.UpdateTitle()
|
||||
' DbControllers.m_ProjController.LockByProjId(ProjectManagerVM.CurrProj.nProjId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' Else
|
||||
' Map.refSceneHostVM.MainController.NewProject()
|
||||
' Map.refProjectVM.BTLStructureVM = Nothing
|
||||
' Map.refProjectVM.MachGroupPanelVM = Nothing
|
||||
' End If
|
||||
' Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
' Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeMaterial_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.Statistic_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.VisStatistic_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.OtStatistic_Visibility))
|
||||
' Return True
|
||||
'End Function
|
||||
|
||||
Private Function ExitVIEW(bVerifyModification As Boolean) As Boolean
|
||||
' ' verifico se progetto modificato, e chiedo se salvare
|
||||
' If bVerifyModification Then
|
||||
' If Not ProjFileVM.VerifyProjectModification(ProjectManagerVM.CurrProj, ProjectType.PROJ) Then
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
' ' resetto eventuale visualizzazione statistiche
|
||||
' Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
|
||||
' Map.refProjectVM.SetBottomPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetLeftPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetFeatureManager_Visibility(False)
|
||||
' Map.refProjectVM.SetTopPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetShowBeamPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetProjManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdManager_Visibility(True)
|
||||
' Map.refProjectVM.SetOnlyProdLeftPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(True)
|
||||
' Map.refProjectVM.SetProdManager_Visibility(True)
|
||||
' Map.refProjectVM.SetOptimizePanel_Visibility(True)
|
||||
' Map.refCALCPanelVM.SetChooseMachine_Visibility(False)
|
||||
Return True
|
||||
End Function
|
||||
'Private Function ExitVIEW(bVerifyModification As Boolean) As Boolean
|
||||
' ' verifico se progetto modificato, e chiedo se salvare
|
||||
' If bVerifyModification Then
|
||||
' If Not ProjFileVM.VerifyProjectModification(ProjectManagerVM.CurrProj, ProjectType.PROJ) Then
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
' ' resetto eventuale visualizzazione statistiche
|
||||
' Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
|
||||
' Map.refProjectVM.SetBottomPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetLeftPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetFeatureManager_Visibility(False)
|
||||
' Map.refProjectVM.SetTopPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetShowBeamPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetProjManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdManager_Visibility(True)
|
||||
' Map.refProjectVM.SetOnlyProdLeftPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(True)
|
||||
' Map.refProjectVM.SetProdManager_Visibility(True)
|
||||
' Map.refProjectVM.SetOptimizePanel_Visibility(True)
|
||||
' Map.refCALCPanelVM.SetChooseMachine_Visibility(False)
|
||||
'Return True
|
||||
'End Function
|
||||
|
||||
Private Function InitMACHINING() As Boolean
|
||||
' ' imposto dimensioni colonne/righe della Grid
|
||||
' DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_OPTIMIZER, Map.refProjectVM.GridDims)
|
||||
' DimensionsIniFile.ReadGridDimensions(ConstDims.LEFTPANEL_OPTIMIZER, Map.refLeftPanelVM.GridDims)
|
||||
' ' inizializzo gruppi di lavorazione
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso Not IsNothing(ProjectManagerVM.CurrProd.nProdId) AndAlso ProjectManagerVM.CurrProd.nProdId > 0 Then
|
||||
' If File.Exists(ProjectManagerVM.CurrProd.sProdPath) Then
|
||||
' ' apro progetto
|
||||
' If ProjectManagerVM.CurrProd.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 50) ' Loading parts
|
||||
' Map.refProdManagerVM.TempCurrProd = ProjectManagerVM.CurrProd
|
||||
' If Map.refSceneHostVM.MainController.OpenProject(ProjectManagerVM.CurrProd.sProdPath, False) Then
|
||||
' ' aggiorno le colonne in base al tipo progetto
|
||||
' Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
|
||||
' ' resetto modifica parametri Q default
|
||||
' Map.refConfigurationPageVM.ResetQParametersModified()
|
||||
' DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
' End If
|
||||
' Else
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 30) ' Loading parts
|
||||
' ' mostro tutti i pezzi
|
||||
' Map.refShowBeamPanelVM.ShowAll(False)
|
||||
' ' verifico se il prod ha piu' proj
|
||||
' If ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
|
||||
' ' se si rigenero BTLStructure
|
||||
' Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
|
||||
' ' carico filtri di ricerca
|
||||
' Map.refProjectVM.BTLStructureVM.LoadFilters()
|
||||
' End If
|
||||
' ' recupero indice di modifica progetto
|
||||
' Dim CommIndex As Integer = -1
|
||||
' Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd(m_SupervisorId)
|
||||
' For Each ActiveSession In ActiveSessionList
|
||||
' If ActiveSession.ItemId = ProjectManagerVM.CurrProd.nProdId Then
|
||||
' CommIndex = ActiveSession.Index
|
||||
' End If
|
||||
' Next
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 3, EgtMsg(63002), 30, 100) ' Loading machining groups
|
||||
' ' carico lista dei MachGroup
|
||||
' Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
|
||||
' ' fisso indice sessione di comunicazione
|
||||
' If CommIndex > -1 Then
|
||||
' ProjectManagerVM.CurrProd.SetModificationIndex(CommIndex)
|
||||
' End If
|
||||
' ProjectManagerVM.CurrProd.SetReloadProject(True)
|
||||
' End If
|
||||
' ' se Warehouse di tipo Medium e piu' di un progetto collegato
|
||||
' Dim nDefault As Integer = 2
|
||||
' If GetMainPrivateProfileInt(S_WAREHOUSE, EgtBEAMWALL.Core.ConstIni.K_TYPE, nDefault) = WarehouseType.MEDIUM AndAlso ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
|
||||
' ' confronto le Sezioni del BTL importato con quelle in Warehouse
|
||||
' WarehouseWndVM.UpdateSectionXMaterial()
|
||||
' End If
|
||||
' ' aggiorno titolo
|
||||
' Map.refMainWindowVM.UpdateTitle()
|
||||
' DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' ' controllo se devo lanciare verifica perche' importato
|
||||
' Dim bGetVerifyResult As Boolean = False
|
||||
' Dim bVerifyMach As Boolean = False
|
||||
' Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
' While nBTLInfoLayerId <> GDB_ID.NULL
|
||||
' If EgtGetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, bGetVerifyResult) AndAlso bGetVerifyResult Then
|
||||
' If Not bVerifyMach Then bVerifyMach = True
|
||||
' EgtSetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, False)
|
||||
' End If
|
||||
' nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
|
||||
' End While
|
||||
' If bVerifyMach Then
|
||||
' Map.refCALCPanelVM.VerifyAll()
|
||||
' End If
|
||||
' ' seleziono prima barra
|
||||
' Map.refProjectVM.MachGroupPanelVM.SelFirstMachGroup()
|
||||
' Else
|
||||
' MessageBox.Show(EgtMsg(61871))
|
||||
' End If
|
||||
' Else
|
||||
' Map.refSceneHostVM.MainController.NewProject()
|
||||
' Map.refProjectVM.BTLStructureVM = Nothing
|
||||
' Map.refProjectVM.MachGroupPanelVM = Nothing
|
||||
' End If
|
||||
' ' aggiorno lista possibili nesting
|
||||
' Map.refOptimizePanelVM.UpdateOriginTypeList(EgtGetFirstNameInGroup(GDB_ID.ROOT, "RawParts") <> GDB_ID.NULL)
|
||||
' ' aggiorno visibilita' degli elementi grafici
|
||||
' Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
' Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeMaterial_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.Statistic_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.VisStatistic_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.OtStatistic_Visibility))
|
||||
' Map.refProjectVM.SetBottomPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetLeftPanel_Visibility(True)
|
||||
' If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.UpdateView()
|
||||
' If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.UpdateView()
|
||||
' Map.refProjectVM.SetFeatureManager_Visibility(False)
|
||||
' Map.refProjectVM.SetTopPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetShowBeamPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetProjManager_Visibility(False)
|
||||
' Map.refProjectVM.SetProdManager_Visibility(True)
|
||||
' Map.refProjectVM.SetOnlyProdManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdLeftPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(False)
|
||||
' Map.refProjectVM.NotifyAllPanelVisibility()
|
||||
' Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(False)
|
||||
' Map.refRawPartManagerVM.UpdateMovePartInRawPartVisibility()
|
||||
' Map.refStatisticsTimePanelVM.SetStatisticsTimePanel_Visibility()
|
||||
' ' aggiorno la visibilità delle colonne
|
||||
' For Each col In Map.refFeatureListVM.FeatureColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refRawPartListVM.RawPartColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refFeatureInPartInRawPartListVM.FeatureInPartInRawPartColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refPartInRawPartListVM.PartInRawPartColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refStatisticsVM.OptimizerStatisticsColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
|
||||
' Map.refFeatureListVM.colFeature_Do.ColumnVisibility = Visibility.Collapsed
|
||||
' End If
|
||||
' Map.refProjectVM.SetOptimizePanel_Visibility(True)
|
||||
Return True
|
||||
End Function
|
||||
'Private Function InitMACHINING() As Boolean
|
||||
' ' imposto dimensioni colonne/righe della Grid
|
||||
' DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_OPTIMIZER, Map.refProjectVM.GridDims)
|
||||
' DimensionsIniFile.ReadGridDimensions(ConstDims.LEFTPANEL_OPTIMIZER, Map.refLeftPanelVM.GridDims)
|
||||
' ' inizializzo gruppi di lavorazione
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso Not IsNothing(ProjectManagerVM.CurrProd.nProdId) AndAlso ProjectManagerVM.CurrProd.nProdId > 0 Then
|
||||
' If File.Exists(ProjectManagerVM.CurrProd.sProdPath) Then
|
||||
' ' apro progetto
|
||||
' If ProjectManagerVM.CurrProd.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 50) ' Loading parts
|
||||
' Map.refProdManagerVM.TempCurrProd = ProjectManagerVM.CurrProd
|
||||
' If Map.refSceneHostVM.MainController.OpenProject(ProjectManagerVM.CurrProd.sProdPath, False) Then
|
||||
' ' aggiorno le colonne in base al tipo progetto
|
||||
' Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
|
||||
' ' resetto modifica parametri Q default
|
||||
' Map.refConfigurationPageVM.ResetQParametersModified()
|
||||
' DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
' End If
|
||||
' Else
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 30) ' Loading parts
|
||||
' ' mostro tutti i pezzi
|
||||
' Map.refShowBeamPanelVM.ShowAll(False)
|
||||
' ' verifico se il prod ha piu' proj
|
||||
' If ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
|
||||
' ' se si rigenero BTLStructure
|
||||
' Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
|
||||
' ' carico filtri di ricerca
|
||||
' Map.refProjectVM.BTLStructureVM.LoadFilters()
|
||||
' End If
|
||||
' ' recupero indice di modifica progetto
|
||||
' Dim CommIndex As Integer = -1
|
||||
' Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd(m_SupervisorId)
|
||||
' For Each ActiveSession In ActiveSessionList
|
||||
' If ActiveSession.ItemId = ProjectManagerVM.CurrProd.nProdId Then
|
||||
' CommIndex = ActiveSession.Index
|
||||
' End If
|
||||
' Next
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 3, EgtMsg(63002), 30, 100) ' Loading machining groups
|
||||
' ' carico lista dei MachGroup
|
||||
' Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
|
||||
' ' fisso indice sessione di comunicazione
|
||||
' If CommIndex > -1 Then
|
||||
' ProjectManagerVM.CurrProd.SetModificationIndex(CommIndex)
|
||||
' End If
|
||||
' ProjectManagerVM.CurrProd.SetReloadProject(True)
|
||||
' End If
|
||||
' ' se Warehouse di tipo Medium e piu' di un progetto collegato
|
||||
' Dim nDefault As Integer = 2
|
||||
' If GetMainPrivateProfileInt(S_WAREHOUSE, EgtBEAMWALL.Core.ConstIni.K_TYPE, nDefault) = WarehouseType.MEDIUM AndAlso ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
|
||||
' ' confronto le Sezioni del BTL importato con quelle in Warehouse
|
||||
' WarehouseWndVM.UpdateSectionXMaterial()
|
||||
' End If
|
||||
' ' aggiorno titolo
|
||||
' Map.refMainWindowVM.UpdateTitle()
|
||||
' DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' ' controllo se devo lanciare verifica perche' importato
|
||||
' Dim bGetVerifyResult As Boolean = False
|
||||
' Dim bVerifyMach As Boolean = False
|
||||
' Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
' While nBTLInfoLayerId <> GDB_ID.NULL
|
||||
' If EgtGetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, bGetVerifyResult) AndAlso bGetVerifyResult Then
|
||||
' If Not bVerifyMach Then bVerifyMach = True
|
||||
' EgtSetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, False)
|
||||
' End If
|
||||
' nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
|
||||
' End While
|
||||
' If bVerifyMach Then
|
||||
' Map.refCALCPanelVM.VerifyAll()
|
||||
' End If
|
||||
' ' seleziono prima barra
|
||||
' Map.refProjectVM.MachGroupPanelVM.SelFirstMachGroup()
|
||||
' Else
|
||||
' MessageBox.Show(EgtMsg(61871))
|
||||
' End If
|
||||
' Else
|
||||
' Map.refSceneHostVM.MainController.NewProject()
|
||||
' Map.refProjectVM.BTLStructureVM = Nothing
|
||||
' Map.refProjectVM.MachGroupPanelVM = Nothing
|
||||
' End If
|
||||
' ' aggiorno lista possibili nesting
|
||||
' Map.refOptimizePanelVM.UpdateOriginTypeList(EgtGetFirstNameInGroup(GDB_ID.ROOT, "RawParts") <> GDB_ID.NULL)
|
||||
' ' aggiorno visibilita' degli elementi grafici
|
||||
' Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
' Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeMaterial_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.Statistic_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.VisStatistic_Visibility))
|
||||
' Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.OtStatistic_Visibility))
|
||||
' Map.refProjectVM.SetBottomPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetLeftPanel_Visibility(True)
|
||||
' If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.UpdateView()
|
||||
' If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.UpdateView()
|
||||
' Map.refProjectVM.SetFeatureManager_Visibility(False)
|
||||
' Map.refProjectVM.SetTopPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetShowBeamPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetProjManager_Visibility(False)
|
||||
' Map.refProjectVM.SetProdManager_Visibility(True)
|
||||
' Map.refProjectVM.SetOnlyProdManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdLeftPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(False)
|
||||
' Map.refProjectVM.NotifyAllPanelVisibility()
|
||||
' Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(False)
|
||||
' Map.refRawPartManagerVM.UpdateMovePartInRawPartVisibility()
|
||||
' Map.refStatisticsTimePanelVM.SetStatisticsTimePanel_Visibility()
|
||||
' ' aggiorno la visibilità delle colonne
|
||||
' For Each col In Map.refFeatureListVM.FeatureColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refRawPartListVM.RawPartColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refFeatureInPartInRawPartListVM.FeatureInPartInRawPartColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refPartInRawPartListVM.PartInRawPartColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' For Each col In Map.refStatisticsVM.OptimizerStatisticsColumns
|
||||
' col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
' Next
|
||||
' If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
|
||||
' Map.refFeatureListVM.colFeature_Do.ColumnVisibility = Visibility.Collapsed
|
||||
' End If
|
||||
' Map.refProjectVM.SetOptimizePanel_Visibility(True)
|
||||
'Return True
|
||||
'End Function
|
||||
|
||||
Private Function ExitMACHINING(bVerifyModification As Boolean) As Boolean
|
||||
' ' verifico se progetto modificato, e chiedo se salvare
|
||||
' If bVerifyModification Then
|
||||
' If ProdFileVM.VerifyProjectModification(ProjectManagerVM.CurrProd) = MessageBoxResult.Cancel Then
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
' ' resetto eventuale visualizzazione statistiche
|
||||
' Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
|
||||
' Map.refProjectVM.SetBottomPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetLeftPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetFeatureManager_Visibility(True)
|
||||
' Map.refProjectVM.SetTopPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetShowBeamPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetProjManager_Visibility(True)
|
||||
' Map.refProjectVM.SetProdManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdLeftPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(False)
|
||||
' Map.refProjectVM.SetOptimizePanel_Visibility(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
' Map.refCALCPanelVM.SetChooseMachine_Visibility(False)
|
||||
' EgtResetCurrMachGroup()
|
||||
Return True
|
||||
End Function
|
||||
'Private Function ExitMACHINING(bVerifyModification As Boolean) As Boolean
|
||||
' ' verifico se progetto modificato, e chiedo se salvare
|
||||
' If bVerifyModification Then
|
||||
' If ProdFileVM.VerifyProjectModification(ProjectManagerVM.CurrProd) = MessageBoxResult.Cancel Then
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
' ' resetto eventuale visualizzazione statistiche
|
||||
' Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
|
||||
' Map.refProjectVM.SetBottomPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetLeftPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetFeatureManager_Visibility(True)
|
||||
' Map.refProjectVM.SetTopPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetShowBeamPanel_Visibility(True)
|
||||
' Map.refProjectVM.SetProjManager_Visibility(True)
|
||||
' Map.refProjectVM.SetProdManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdManager_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdLeftPanel_Visibility(False)
|
||||
' Map.refProjectVM.SetOnlyProdOptimizePanel_Visibility(False)
|
||||
' Map.refProjectVM.SetOptimizePanel_Visibility(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
' Map.refCALCPanelVM.SetChooseMachine_Visibility(False)
|
||||
' EgtResetCurrMachGroup()
|
||||
'Return True
|
||||
'End Function
|
||||
|
||||
Private Function InitCONFIG() As Boolean
|
||||
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
@@ -785,10 +785,12 @@ Public Class MainMenuVM
|
||||
Dim ProjFileMList As List(Of ProjFileM)
|
||||
If (SelPage = Pages.MACHINING OrElse SelPage = Pages.ONLYPRODPAGE) And Not IsNothing(ProjectManagerVM.CurrProd) Then
|
||||
ProjFileMList = DbControllers.m_ProjController.GetByProdAsc(ProjectManagerVM.CurrProd.nProdId)
|
||||
Map.refProjManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
|
||||
'Map.refProjManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
|
||||
Map.refOnlyProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
|
||||
End If
|
||||
Dim sExportFileName = ProjectManagerVM.CurrProj.nProjId.ToString("0000") & " - " & ProjectManagerVM.CurrProj.sBTLFileName & " - ProjectExport"
|
||||
Dim sExpZipToCreate = Map.refProjManagerVM.ExportProject(sExportFileName)
|
||||
'Dim sExpZipToCreate = Map.refProjManagerVM.ExportProject(sExportFileName)
|
||||
Dim sExpZipToCreate = Map.refOnlyProdManagerVM.ExportProject(sExportFileName)
|
||||
' Creo zip file da allegare
|
||||
Dim sZipToCreate As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"
|
||||
If File.Exists(sZipToCreate) Then
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<StackPanel x:Class="OnlyProdMainMenuV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
Orientation="Horizontal"
|
||||
IsEnabled="{Binding MainMenu_IsEnabled}"
|
||||
DataContext="{StaticResource MainMenuVM}">
|
||||
<Grid x:Class="OnlyProdMainMenuV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
IsEnabled="{Binding MainMenu_IsEnabled}"
|
||||
DataContext="{StaticResource MainMenuVM}">
|
||||
|
||||
<!--Barra superiore dei comandi-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -31,19 +30,19 @@
|
||||
Visibility="{Binding Supervisor_Visibility}"
|
||||
Style="{StaticResource OnlyProdMainMenu_Button}"/>
|
||||
|
||||
<Button Grid.Column="3"
|
||||
Command="{Binding SendFeedbackCommand}"
|
||||
ToolTip="{Binding SendFeedbackToolTip}"
|
||||
Style="{StaticResource OnlyProdMainMenu_Button}"
|
||||
IsEnabled="{Binding SendFeedbackIsEnabled}"
|
||||
Width="40">
|
||||
<Image Source="/Resources/MainMenu/Send.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<!--<EgtBEAMWALL:OnlyProdStatisticsTimePanelV Grid.Column="2"
|
||||
DataContext="{StaticResource StatisticsTimePanelVM}"
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdMainMenuV}}}"/>-->
|
||||
|
||||
<!--<Button Command="{Binding SendFeedbackCommand}"
|
||||
ToolTip="{Binding SendFeedbackToolTip}"
|
||||
Style="{StaticResource OnlyProdMainMenu_Button}"
|
||||
IsEnabled="{Binding SendFeedbackIsEnabled}"
|
||||
HorizontalAlignment="Left"
|
||||
Width="40"
|
||||
Margin="-46.5,0,0,0">
|
||||
<Image Source="/Resources/MainMenu/Send.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<!--<StackPanel Orientation="Horizontal" Margin="-130,0,0,0">
|
||||
<TextBlock Text="{Binding NVersion_Msg}"
|
||||
Style="{StaticResource OptionTextBlockVersion_OnlyProd}"/>
|
||||
@@ -51,5 +50,4 @@
|
||||
Style="{StaticResource OptionTextBlockVersion_OnlyProd}"
|
||||
Margin="5,0,0,0"/>
|
||||
</StackPanel>-->
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -232,11 +232,7 @@ Public Class MainWindowM
|
||||
' e lo imposto nel core
|
||||
Core.Configuration.SetOnlyProd(m_bOnlyProd)
|
||||
' Impostazione path Ini file DataGrid
|
||||
If m_bOnlyProd Then
|
||||
DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & OPTIMIZERDATAGRIDCOLUMNS_FILE_NAME
|
||||
Else
|
||||
DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & DATAGRIDCOLUMNS_FILE_NAME
|
||||
End If
|
||||
DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & OPTIMIZERDATAGRIDCOLUMNS_FILE_NAME
|
||||
' Impostazione path Ini file Dimensioni
|
||||
DimensionsIniFile.m_sDimensionsIniFile = m_sConfigDir & "\" & ConstDims.DIMENSIONS_FILE_NAME
|
||||
' Impostazione path resources dir
|
||||
|
||||
@@ -364,10 +364,10 @@ Public Class MainWindowVM
|
||||
' Gestisco eventuale file corrente modificato
|
||||
Dim bOk As Boolean = True
|
||||
Select Case Map.refMainMenuVM.SelPage
|
||||
Case Pages.VIEW
|
||||
bOk = ProjFileVM.VerifyProjectModification(ProjectManagerVM.CurrProj, ProjectType.PROJ)
|
||||
Case Pages.MACHINING
|
||||
bOk = ProdFileVM.VerifyProjectModification(ProjectManagerVM.CurrProd) <> MessageBoxResult.Cancel
|
||||
'Case Pages.VIEW
|
||||
' bOk = ProjFileVM.VerifyProjectModification(ProjectManagerVM.CurrProj, ProjectType.PROJ)
|
||||
'Case Pages.MACHINING
|
||||
' bOk = ProdFileVM.VerifyProjectModification(ProjectManagerVM.CurrProd) <> MessageBoxResult.Cancel
|
||||
Case Pages.CONFIG
|
||||
' Verifica modifica parametri Macchina e chiedo il salvataggio
|
||||
Map.refConfigurationPageVM.VerifyConfigPageModification()
|
||||
|
||||
@@ -56,7 +56,8 @@ Public Class OnlyProdMainWindowV
|
||||
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||
' Se BTL importo il file
|
||||
If EgtGetFileType(sFiles(0)) = FT.BTL Then
|
||||
Map.refProjManagerVM.ImportBTL(sFiles(0), False)
|
||||
'Map.refProjManagerVM.ImportBTL(sFiles(0), False)
|
||||
Map.refOnlyProdManagerVM.ImportBTL(sFiles(0), False)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -163,16 +163,17 @@ Public Class NewOpenProjectFileDialogVM
|
||||
End If
|
||||
' rimuovo da lista ultimi progetti aperti
|
||||
For Each Project In SelProject.ProjFileList
|
||||
If Not IsNothing(Map.refProjManagerVM) Then
|
||||
Map.refProjManagerVM.m_MruFiles.Remove(Project.sProjPath)
|
||||
Else
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Remove(Project.sProjPath)
|
||||
End If
|
||||
'If Not IsNothing(Map.refProjManagerVM) Then
|
||||
' Map.refProjManagerVM.m_MruFiles.Remove(Project.sProjPath)
|
||||
'Else
|
||||
' Map.refOnlyProdManagerVM.m_MruFiles.Remove(Project.sProjPath)
|
||||
'End If
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Remove(Project.sProjPath)
|
||||
Next
|
||||
Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
|
||||
If Not IsNothing(SelProject.ProdFileVM) Then
|
||||
Map.refProdManagerVM.m_MruFiles.Remove(SelProject.ProdFileVM.sProdPath)
|
||||
Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Remove(SelProject.ProdFileVM.sProdPath)
|
||||
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
|
||||
End If
|
||||
' cancello progetto
|
||||
If Not IsNothing(SelProject.ProdFileVM) Then
|
||||
@@ -196,25 +197,24 @@ Public Class NewOpenProjectFileDialogVM
|
||||
Public Overrides Sub Cancel()
|
||||
If m_ChangeOpenedProjectOnCancel Then
|
||||
Dim bOpened As Boolean = False
|
||||
If m_ProjectType = ProjectType.PROJ Then
|
||||
For Each ProjectName In Map.refProjManagerVM.m_MruFiles.FileNames
|
||||
If Not String.IsNullOrWhiteSpace(ProjectName) Then
|
||||
Dim sProjId As String = Path.GetFileNameWithoutExtension(ProjectName)
|
||||
If Not String.IsNullOrWhiteSpace(sProjId) Then
|
||||
Dim nProjId As Integer = 0
|
||||
Integer.TryParse(sProjId, nProjId)
|
||||
Dim PjFileM = DbControllers.m_ProjController.FindByProjIdConv(nProjId)
|
||||
Dim PjFileVM = New ProjFileVM(PjFileM)
|
||||
Map.refProjManagerVM.OpenProject(PjFileVM)
|
||||
bOpened = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If Not bOpened Then
|
||||
Map.refProjManagerVM.OpenProject(m_ProjectList(0).ProjFileList(0))
|
||||
End If
|
||||
ElseIf m_ProjectType = ProjectType.PROD Then
|
||||
'If m_ProjectType = ProjectType.PROJ Then
|
||||
' For Each ProjectName In Map.refProjManagerVM.m_MruFiles.FileNames
|
||||
' If Not String.IsNullOrWhiteSpace(ProjectName) Then
|
||||
' Dim sProjId As String = Path.GetFileNameWithoutExtension(ProjectName)
|
||||
' If Not String.IsNullOrWhiteSpace(sProjId) Then
|
||||
' Dim nProjId As Integer = 0
|
||||
' Integer.TryParse(sProjId, nProjId)
|
||||
' Dim PjFileM = DbControllers.m_ProjController.FindByProjIdConv(nProjId)
|
||||
' Dim PjFileVM = New ProjFileVM(PjFileM)
|
||||
' Map.refProjManagerVM.OpenProject(PjFileVM)
|
||||
' bOpened = True
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
' If Not bOpened Then
|
||||
' 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
|
||||
If Not String.IsNullOrWhiteSpace(ProjectName) Then
|
||||
Dim sProdId As String = Path.GetFileNameWithoutExtension(ProjectName)
|
||||
|
||||
@@ -127,8 +127,8 @@ Public Class OpenProjectFileDialogVM
|
||||
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))
|
||||
'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)
|
||||
@@ -208,7 +208,7 @@ Public Class OpenProjectFileDialogVM
|
||||
End If
|
||||
' se proj corrente era il prod cancellato, aggiorno proj corrente
|
||||
If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso ProjectManagerVM.CurrProj.nProdId = SelProject.nProdId Then
|
||||
Map.refProjManagerVM.UpdateCurrProj()
|
||||
'Map.refProjManagerVM.UpdateCurrProj()
|
||||
End If
|
||||
' cancello cartella del Prod
|
||||
Try
|
||||
|
||||
@@ -306,7 +306,7 @@ Public Class ProdManagerVM
|
||||
' rimuovo il file in apertura dalla lista degli MRU
|
||||
Map.refProdManagerVM.m_MruFiles.Remove(sFilePath)
|
||||
MessageBox.Show(EgtMsg(61885), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
Map.refProjManagerVM.NewProject()
|
||||
'Map.refProjManagerVM.NewProject()
|
||||
Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
|
||||
Else
|
||||
If Map.refSceneHostVM.MainController.OpenProject(sFilePath, False) Then
|
||||
@@ -574,7 +574,8 @@ Public Class ProdManagerVM
|
||||
Else Return
|
||||
End If
|
||||
' apro progetto proj
|
||||
Map.refProjManagerVM.SetCurrProj(nProjId)
|
||||
'Map.refProjManagerVM.SetCurrProj(nProjId)
|
||||
ProjectManagerVM.SetCurrProj(nProjId)
|
||||
' ricarico progetto se il prod e' nullo (quindi e' stato cancellato)
|
||||
ProjectManagerVM.CurrProj.SetReloadProject(IsNothing(CurrProd) OrElse VerifyResult = MessageBoxResult.No OrElse VerifyResult = MessageBoxResult.None)
|
||||
' vado in pagina proj
|
||||
|
||||
@@ -178,7 +178,7 @@ Public Class ProjManagerVM
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefProjManagerVM(Me)
|
||||
'Map.SetRefProjManagerVM(Me)
|
||||
' Leggo ultimo indice di progetto
|
||||
m_nLastProjId = GetMainPrivateProfileInt(S_GENERAL, K_PROJSINDEX, 1)
|
||||
' Impostazioni MruLists
|
||||
@@ -217,7 +217,7 @@ Public Class ProjManagerVM
|
||||
End If
|
||||
If bOk Then
|
||||
' aggiorno path proj
|
||||
Map.refProjManagerVM.UpdateCurrProj()
|
||||
'Map.refProjManagerVM.UpdateCurrProj()
|
||||
' imposto currprod
|
||||
Map.refProdManagerVM.SetCurrProd(nProdId)
|
||||
' imposto TempCurrProd
|
||||
@@ -466,22 +466,22 @@ Public Class ProjManagerVM
|
||||
Dim nFlag As Integer = GetMainPrivateProfileInt(S_IMPORT, sBTLFlag, EIB_FL.TS3_POS + EIB_FL.SORT + EIB_FL.USEUATTR)
|
||||
EgtBeamSetFlag(nFlag)
|
||||
' se la macchina del progetto in apertura non è tra le macchine disponibili lo segnalo e apro un progetto vuoto
|
||||
If IsNothing(Map.refMachinePanelVM.MachineList.FirstOrDefault(Function(x) x.Name = Map.refProjManagerVM.TempCurrProj.sMachine)) Then
|
||||
' rimuovo il file in apertura dalla lista degli MRU
|
||||
Dim ProjId As Integer = ProjectManagerVM.nLoadingProjId
|
||||
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
|
||||
MessageBox.Show(EgtMsg(61885), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
If bStart Then Map.refProjManagerVM.NewProject()
|
||||
Else
|
||||
If Map.refSceneHostVM.MainController.OpenProject(sFilePath, False) Then
|
||||
Map.refProjectVM.SetOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
Map.refPartManagerVM.LockVisibilityUpdate()
|
||||
End If
|
||||
End If
|
||||
'If IsNothing(Map.refMachinePanelVM.MachineList.FirstOrDefault(Function(x) x.Name = Map.refProjManagerVM.TempCurrProj.sMachine)) Then
|
||||
' ' rimuovo il file in apertura dalla lista degli MRU
|
||||
' Dim ProjId As Integer = ProjectManagerVM.nLoadingProjId
|
||||
' 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
|
||||
' MessageBox.Show(EgtMsg(61885), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||
' 'If bStart Then Map.refProjManagerVM.NewProject()
|
||||
'Else
|
||||
' If Map.refSceneHostVM.MainController.OpenProject(sFilePath, False) Then
|
||||
' Map.refProjectVM.SetOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||
' Map.refPartManagerVM.LockVisibilityUpdate()
|
||||
' End If
|
||||
'End If
|
||||
' aggiorno titolo
|
||||
Map.refMainWindowVM.UpdateTitle()
|
||||
NotifyPropertyChanged(NameOf(MruFileNames))
|
||||
@@ -875,7 +875,7 @@ Public Class ProjManagerVM
|
||||
' setto il flag per inizializzazione gestore travi e pareti per importare progetto
|
||||
Dim nFlag As Integer
|
||||
Dim sBTLFlag As String
|
||||
If Map.refProjManagerVM.nProjType = Core.ConstBeam.BWType.BEAM Then
|
||||
If Map.refOnlyProdManagerVM.nProjType = Core.ConstBeam.BWType.BEAM Then
|
||||
sBTLFlag = K_BTLFLAG
|
||||
Else
|
||||
sBTLFlag = K_WALLBTLFLAG
|
||||
|
||||
@@ -373,7 +373,7 @@ Public Class ProjectVM
|
||||
If Not IsNothing(Map.refPartManagerVM) Then Map.refPartManagerVM.SetPartManagerIsEnabled(bIsEnabled)
|
||||
Map.refLeftPanelVM.SetLeftPanelIsEnabled(bIsEnabled)
|
||||
Map.refBTLPartManagerVM.SetBTLPartManagerIsEnabled(bIsEnabled)
|
||||
If Not IsNothing(Map.refProjManagerVM) Then Map.refProjManagerVM.SetProjManagerIsEnabled(bIsEnabled)
|
||||
'If Not IsNothing(Map.refProjManagerVM) Then Map.refProjManagerVM.SetProjManagerIsEnabled(bIsEnabled)
|
||||
If Not IsNothing(Map.refProdManagerVM) Then Map.refProdManagerVM.SetProdManagerIsEnabled(bIsEnabled)
|
||||
Map.refRawPartManagerVM.SetRawPartManagerIsEnabled(bIsEnabled)
|
||||
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(bIsEnabled)
|
||||
|
||||
@@ -72,10 +72,10 @@ Public Class ProdFileVM
|
||||
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
||||
End If
|
||||
DbControllers.m_ProdController.DeleteProd(CurrProject.nProdId, False)
|
||||
If Not IsNothing(Map.refProjManagerVM) AndAlso CurrProject.nProdId = ProjectManagerVM.CurrProj.nProdId Then
|
||||
' reset prod in path proj
|
||||
Map.refProjManagerVM.UpdateCurrProj()
|
||||
ElseIf Not IsNothing(Map.refOnlyProdManagerVM) AndAlso CurrProject.nProdId = ProjectManagerVM.CurrProj.nProdId Then
|
||||
'If Not IsNothing(Map.refProjManagerVM) AndAlso CurrProject.nProdId = ProjectManagerVM.CurrProj.nProdId Then
|
||||
' ' reset prod in path proj
|
||||
' Map.refProjManagerVM.UpdateCurrProj()
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) AndAlso CurrProject.nProdId = ProjectManagerVM.CurrProj.nProdId Then
|
||||
' reset prod in path proj
|
||||
Map.refOnlyProdManagerVM.UpdateCurrProj()
|
||||
End If
|
||||
|
||||
@@ -35,9 +35,9 @@ Public Class ProjFileVM
|
||||
Select Case MessageBox.Show(EgtMsg(61875), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||
Case MessageBoxResult.Yes
|
||||
' salvo proj
|
||||
If Not IsNothing(Map.refProjManagerVM) Then
|
||||
Map.refProjManagerVM.Save()
|
||||
ElseIf Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
'If Not IsNothing(Map.refProjManagerVM) Then
|
||||
' Map.refProjManagerVM.Save()
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.Save()
|
||||
End If
|
||||
Map.refCALCPanelVM.IsMachineApplied = False
|
||||
@@ -52,19 +52,19 @@ Public Class ProjFileVM
|
||||
If Directory.Exists(sProjectDirPath) Then
|
||||
Directory.Delete(sProjectDirPath, True)
|
||||
End If
|
||||
If Not IsNothing(Map.refProjManagerVM) Then
|
||||
Map.refProjManagerVM.m_MruFiles.Remove(CurrProject.sProjPath)
|
||||
Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
ElseIf Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
'If Not IsNothing(Map.refProjManagerVM) Then
|
||||
' Map.refProjManagerVM.m_MruFiles.Remove(CurrProject.sProjPath)
|
||||
' Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Remove(CurrProject.sProjPath)
|
||||
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
|
||||
End If
|
||||
|
||||
' CheckMe impostata come cancellazione FISICA dal DB...
|
||||
DbControllers.m_ProjController.DeleteProj(CurrProject.nProjId, False)
|
||||
If Not IsNothing(Map.refProjManagerVM) Then
|
||||
ProjectManagerVM.CurrProj = Nothing
|
||||
ElseIf Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
'If Not IsNothing(Map.refProjManagerVM) Then
|
||||
' ProjectManagerVM.CurrProj = Nothing
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
ProjectManagerVM.CurrProj = Nothing
|
||||
End If
|
||||
EgtResetModified()
|
||||
|
||||
@@ -34,7 +34,7 @@ Public Class ProjectTypeWndVM
|
||||
End Property
|
||||
|
||||
' Se la Macchina selezionata è di tipo BOTH verrà mostrata anche la selezione del Tipo
|
||||
Private m_IsBoth_Visibility As Visibility = If(Not IsNothing(Map.refProjManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProj) AndAlso
|
||||
Private m_IsBoth_Visibility As Visibility = If(Not IsNothing(ProjectManagerVM.CurrProj) AndAlso
|
||||
DirectCast(SelMachine, MyMachine).nType = MachineType.BOTH OrElse Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProd), Visibility.Visible, Visibility.Collapsed)
|
||||
Public Property IsBoth_Visibility As Visibility
|
||||
Get
|
||||
@@ -56,7 +56,7 @@ Public Class ProjectTypeWndVM
|
||||
End Property
|
||||
|
||||
' Se la Macchina selezionata è di tipo BOTH verrà selezionato di default il Tipo del progetto corrente
|
||||
Private m_nSelType As BWType = If(Not IsNothing(Map.refProjManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProj) AndAlso Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Not IsNothing(Map.refOnlyProdManagerVM.CurrProj) AndAlso
|
||||
Private m_nSelType As BWType = If(Not IsNothing(ProjectManagerVM.CurrProj) AndAlso Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Not IsNothing(Map.refOnlyProdManagerVM.CurrProj) AndAlso
|
||||
DirectCast(SelMachine, MyMachine).nType = MachineType.BOTH, ProjectManagerVM.CurrProj.nType, Nothing)
|
||||
Public Property nSelType As BWType
|
||||
Get
|
||||
|
||||
@@ -541,23 +541,23 @@ Public Class MySceneHostVM
|
||||
End If
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTPROJ, sFile)
|
||||
' in base al tipo progetto aggiungo il file in apertura alla 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.Add(PjFileVM.sProjPath)
|
||||
End If
|
||||
' imposto macchina del progetto
|
||||
Map.refMachinePanelVM.SelectedMachine = Map.refMachinePanelVM.MachineList.FirstOrDefault(Function(x) x.Name = Map.refProjManagerVM.TempCurrProj.sMachine)
|
||||
' aggiorno le colonne in base al tipo progetto
|
||||
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.BTLStructureM.nPROJTYPE)
|
||||
Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
|
||||
ProjectManagerVM.CurrProj = Map.refProjManagerVM.TempCurrProj
|
||||
DbControllers.m_ProjController.LockByProjId(ProjectManagerVM.CurrProj.nProjId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' carico lista macchine e macchina del progetto per il pulsante Reset Macchina del CALCPanel
|
||||
Map.refCALCPanelVM.LoadMachineList()
|
||||
ElseIf ProjectType = ProjectType.PROD Then
|
||||
'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.Add(PjFileVM.sProjPath)
|
||||
' End If
|
||||
' ' imposto macchina del progetto
|
||||
' Map.refMachinePanelVM.SelectedMachine = Map.refMachinePanelVM.MachineList.FirstOrDefault(Function(x) x.Name = Map.refProjManagerVM.TempCurrProj.sMachine)
|
||||
' ' aggiorno le colonne in base al tipo progetto
|
||||
' Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.BTLStructureM.nPROJTYPE)
|
||||
' Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
|
||||
' ProjectManagerVM.CurrProj = Map.refProjManagerVM.TempCurrProj
|
||||
' DbControllers.m_ProjController.LockByProjId(ProjectManagerVM.CurrProj.nProjId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||
' ' carico lista macchine e macchina del progetto per il pulsante Reset Macchina del CALCPanel
|
||||
' Map.refCALCPanelVM.LoadMachineList()
|
||||
If ProjectType = ProjectType.PROD Then
|
||||
' se salvato, carico progetto in lista mru
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Not IsNothing(Map.refOnlyProdManagerVM.TempCurrProd) AndAlso Not Map.refOnlyProdManagerVM.TempCurrProd.bIsNew Then
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Add(sFile)
|
||||
@@ -580,11 +580,11 @@ Public Class MySceneHostVM
|
||||
' carico lista macchine e macchina del progetto per il pulsante Reset Macchina del CALCPanel
|
||||
Map.refCALCPanelVM.LoadMachineList()
|
||||
End If
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.OPENPROJ, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
||||
' mostro tutti i pezzi
|
||||
Map.refShowBeamPanelVM.ShowAll(True)
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.OPENPROJ, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
||||
' ' mostro tutti i pezzi
|
||||
' Map.refShowBeamPanelVM.ShowAll(True)
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' recupero indice di modifica progetto quando caricato
|
||||
Dim CommIndex As Integer = -1
|
||||
Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd(m_SupervisorId)
|
||||
@@ -611,17 +611,17 @@ 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.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)
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10003) & " '" & sFile & "'", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
|
||||
Map.refProjManagerVM.NewProject()
|
||||
'Map.refProjManagerVM.NewProject()
|
||||
If Map.refMainMenuVM.SelPage = Pages.MACHINING OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
|
||||
End If
|
||||
@@ -646,7 +646,7 @@ Public Class MySceneHostVM
|
||||
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)
|
||||
'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)
|
||||
@@ -660,15 +660,15 @@ Public Class MySceneHostVM
|
||||
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.Add(PjFileVM.sProjPath)
|
||||
'If Not IsNothing(PjFileVM.ProjFileM) AndAlso Not IsNothing(PjFileVM.sProjPath) Then Map.refProjManagerVM.m_MruFiles.Add(PjFileVM.sProjPath)
|
||||
End If
|
||||
End If
|
||||
If ProjectType = ProjectType.PROD Then
|
||||
If Map.refMainMenuVM.SelPage = Pages.MACHINING AndAlso Not IsNothing(Map.refProdManagerVM) Then
|
||||
Map.refProdManagerVM.m_MruFiles.Add(sFile)
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Add(sFile)
|
||||
End If
|
||||
'If Map.refMainMenuVM.SelPage = Pages.MACHINING AndAlso Not IsNothing(Map.refProdManagerVM) Then
|
||||
' Map.refProdManagerVM.m_MruFiles.Add(sFile)
|
||||
'ElseIf Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Add(sFile)
|
||||
'End If
|
||||
End If
|
||||
' Salvo nome ultimo file
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTPROJ, sFile)
|
||||
@@ -677,7 +677,7 @@ Public Class MySceneHostVM
|
||||
Private Sub OnImportingProject(sender As Object, nType As Integer, ByRef nFlag As Integer)
|
||||
If nType = FT.BTL Or nType = FT.BTLX Then
|
||||
Dim sBTLFlag As String
|
||||
If Not IsNothing(Map.refProjManagerVM) AndAlso Map.refProjManagerVM.nProjType = Core.ConstBeam.BWType.BEAM OrElse Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Map.refOnlyProdManagerVM.nProjType = Core.ConstBeam.BWType.BEAM Then
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Map.refOnlyProdManagerVM.nProjType = Core.ConstBeam.BWType.BEAM Then
|
||||
sBTLFlag = K_BTLFLAG
|
||||
Else
|
||||
sBTLFlag = K_WALLBTLFLAG
|
||||
@@ -724,11 +724,11 @@ Public Class MySceneHostVM
|
||||
Else
|
||||
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
If Not IsNothing(Map.refProjManagerVM) Then
|
||||
Map.refProjManagerVM.NewProject()
|
||||
ElseIf Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.NewProject()
|
||||
End If
|
||||
'If Not IsNothing(Map.refProjManagerVM) Then
|
||||
' Map.refProjManagerVM.NewProject()
|
||||
'ElseIf Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.NewProject()
|
||||
'End If
|
||||
End If
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
-->
|
||||
<EgtBEAMWALL:MainWindowVM x:Key="MainWindowVM"/>
|
||||
<!--<EgtBEAMWALL:MySceneHostVM x:Key="MySceneHostVM"/>-->
|
||||
<EgtBEAMWALL:ProjManagerVM x:Key="ProjManagerVM"/>
|
||||
<!--<EgtBEAMWALL:ProjManagerVM x:Key="ProjManagerVM"/>-->
|
||||
<EgtBEAMWALL:ProdManagerVM x:Key="ProdManagerVM"/>
|
||||
<EgtBEAMWALL:MainMenuVM x:Key="MainMenuVM"/>
|
||||
<EgtBEAMWALL:MyStatusBarVM x:Key="StatusBarVM"/>
|
||||
|
||||
@@ -4,7 +4,7 @@ Imports EgtBEAMWALL.Core
|
||||
Module Map
|
||||
|
||||
Private m_refMainWindowVM As MainWindowVM
|
||||
Private m_refProjManagerVM As ProjManagerVM
|
||||
'Private m_refProjManagerVM As ProjManagerVM
|
||||
Private m_refProdManagerVM As ProdManagerVM
|
||||
Private m_refProjectVM As ProjectVM
|
||||
Private m_refMainMenuVM As MainMenuVM
|
||||
@@ -50,11 +50,11 @@ Module Map
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refProjManagerVM As ProjManagerVM
|
||||
Get
|
||||
Return m_refProjManagerVM
|
||||
End Get
|
||||
End Property
|
||||
'Public ReadOnly Property refProjManagerVM As ProjManagerVM
|
||||
' Get
|
||||
' Return m_refProjManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refProdManagerVM As ProdManagerVM
|
||||
Get
|
||||
@@ -269,10 +269,10 @@ Module Map
|
||||
Return Not IsNothing(LibMap.refStatusBarVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefProjManagerVM(ProjManagerVM As ProjManagerVM) As Boolean
|
||||
m_refProjManagerVM = ProjManagerVM
|
||||
Return Not IsNothing(m_refProjManagerVM)
|
||||
End Function
|
||||
'Friend Function SetRefProjManagerVM(ProjManagerVM As ProjManagerVM) As Boolean
|
||||
' m_refProjManagerVM = ProjManagerVM
|
||||
' Return Not IsNothing(m_refProjManagerVM)
|
||||
'End Function
|
||||
|
||||
Friend Function SetRefProdManagerVM(ProdManagerVM As ProdManagerVM) As Boolean
|
||||
m_refProdManagerVM = ProdManagerVM
|
||||
@@ -454,7 +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_refProjManagerVM) AndAlso
|
||||
Not IsNothing(LibMap.refStatusBarVM) AndAlso
|
||||
Not IsNothing(m_refProdManagerVM) 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
|
||||
|
||||
Reference in New Issue
Block a user