-pulizia codice
-aggiunto selezione albero con un solo click -sistemato assemblato quando si seleziona pezzo in produzione
This commit is contained in:
@@ -7,7 +7,6 @@ Imports EgtBEAMWALL.Core
|
||||
Public Class BTLDataWndVM
|
||||
Inherits VMBase
|
||||
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
@@ -46,15 +46,8 @@ Public Class BTLPartManagerVM
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
'Private m_cmdNewRawPart As ICommand
|
||||
'Private m_cmdNewRawPartLast As ICommand
|
||||
'Private m_cmdAddToRawPart As ICommand
|
||||
Private m_cmdCopyPart As ICommand
|
||||
'Private m_cmdAddPart As ICommand
|
||||
Private m_cmdRemovePart As ICommand
|
||||
'Private m_cmdInvert As ICommand
|
||||
'Private m_cmdBackRotation As ICommand
|
||||
'Private m_cmdForwardRotation As ICommand
|
||||
Private m_cmdSimulate As ICommand
|
||||
Private m_cmdEdit As ICommand
|
||||
Private m_cmdResetCalc As ICommand
|
||||
@@ -159,11 +152,6 @@ Public Class BTLPartManagerVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub UpdateView()
|
||||
'NotifyPropertyChanged(NameOf(ViewPage_Visibility))
|
||||
'NotifyPropertyChanged(NameOf(MachiningPage_Visibility))
|
||||
End Sub
|
||||
|
||||
Friend Sub SetBTLPartManagerIsEnabled(bIsEnabled As Boolean)
|
||||
m_BTLPartManager_IsEnabled = bIsEnabled
|
||||
NotifyPropertyChanged(NameOf(BTLPartManager_IsEnabled))
|
||||
@@ -201,728 +189,6 @@ Public Class BTLPartManagerVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
'#Region "NewRawPart"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Exec.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property NewRawPart_Command As ICommand
|
||||
' Get
|
||||
' If m_cmdNewRawPart Is Nothing Then
|
||||
' m_cmdNewRawPart = New Command(AddressOf NewRawPartCmd)
|
||||
' End If
|
||||
' Return m_cmdNewRawPart
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub NewRawPartCmd()
|
||||
' NewRawPart(False)
|
||||
' End Sub
|
||||
|
||||
' Public Sub NewRawPart(bLast As Boolean)
|
||||
' If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||
' Dim SelParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
|
||||
' If IsNothing(SelParts) OrElse SelParts.Count <= 0 Then Return
|
||||
' ' verifico che abbiano tutti la stessa sezione
|
||||
' Dim dHSection As Double = SelParts(0).dH
|
||||
' Dim dWSection As Double = SelParts(0).dW
|
||||
' For PartIndex = 0 To SelParts.Count - 1
|
||||
' Dim Part As BTLPartVM = SelParts(PartIndex)
|
||||
' If Not IsNothing(Part) Then
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' If Part.dH <> dHSection OrElse Part.dW <> dWSection Then
|
||||
' MessageBox.Show(EgtMsg(61970), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||
' If Part.dH <> dHSection Then
|
||||
' MessageBox.Show(EgtMsg(61970), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' SelParts.Remove(Part)
|
||||
' End If
|
||||
' Next
|
||||
' ' se pareti e piu' di uno selezionato, esco
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL And SelParts.Count > 1 Then
|
||||
' MessageBox.Show(EgtMsg(61971), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' ' se nessun grezzo, rendo tutti i pezzi visibili
|
||||
' If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
' Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
||||
' End If
|
||||
' ' verifico se sono gia' stati messi tutti i pezzi richiesti
|
||||
' If Not VerifyPartCount(SelParts) Then Return
|
||||
' Dim dRawL As Double = SelParts(0).dL
|
||||
' Dim dRawW As Double = SelParts(0).dW
|
||||
' Dim dStartOffset As Double = 0
|
||||
' Dim dKerf As Double = 0
|
||||
' Dim dOffset As Double = WarehouseHelper.GetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' ' se tipo di definizione grezzo esplicito
|
||||
' If WarehouseHelper.GetRawPartDef = 1 OrElse ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift AndAlso WarehouseHelper.GetWarehouseType = WarehouseType.BASIC) Then
|
||||
' ' chiedo lunghezza grezzo
|
||||
' Dim sWarehouseIniPath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_BASIC_INI_FILE_NAME
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' dStartOffset = WarehouseHelper.GetStartOffset()
|
||||
' dRawL += dStartOffset
|
||||
' Else
|
||||
' dKerf = WarehouseHelper.GetKerf()
|
||||
' dRawL += 2 * dKerf
|
||||
' dRawW += 2 * dKerf
|
||||
' End If
|
||||
' Dim AddRawPartWndVM As New AddRawPartWndVM(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawL, dRawW, dStartOffset)
|
||||
' Dim AddRawPartWnd As Object = New OnlyProdAddRawPartWndV(Application.Current.MainWindow, AddRawPartWndVM)
|
||||
' If Not AddRawPartWnd.ShowDialog() Then Return
|
||||
' dRawL = AddRawPartWndVM.VariableList(0).dValue
|
||||
' dRawW = AddRawPartWndVM.VariableList(1).dValue
|
||||
' dStartOffset = AddRawPartWndVM.VariableList(1).dValue
|
||||
' ' se altrimenti definizione grezzo da warehouse
|
||||
' Else
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' dStartOffset = WarehouseHelper.GetStartOffset()
|
||||
' Else
|
||||
' dKerf = WarehouseHelper.GetKerf()
|
||||
' End If
|
||||
' ' se warehouse basic
|
||||
' Select Case WarehouseHelper.GetWarehouseType()
|
||||
' Case WarehouseType.BASIC
|
||||
' WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawW, dRawL)
|
||||
' Case WarehouseType.MEDIUM
|
||||
' Dim SectionList As List(Of SParam) = WarehouseHelper.GetSectionList()
|
||||
' Dim SParamlist As List(Of SParam) = SectionList.FindAll(Function(x) x.SectXMat = SelParts(0).Section)
|
||||
' If bLast Then
|
||||
' Dim LastMaterial As SParam = WarehouseHelper.GetLastMaterial(SelParts(0).Section)
|
||||
' If Not IsNothing(LastMaterial) Then
|
||||
' dRawL = LastMaterial.dL
|
||||
' dRawW = LastMaterial.dW
|
||||
' ElseIf SParamlist.Count > 0 Then
|
||||
' dRawL = SParamlist(0).dL
|
||||
' dRawW = SParamlist(0).dW
|
||||
' Else
|
||||
' MessageBox.Show(EgtMsg(61975), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' Else
|
||||
' If SParamlist.Count = 0 Then
|
||||
' ' se pareti aumento dimensioni del kerf
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||
' dRawW += (2 * dKerf)
|
||||
' dRawL += (2 * dKerf)
|
||||
' End If
|
||||
' ' apro finestra con solo edit
|
||||
' If AddRawPartWnd(AddRawPartWndVM.EditTypes.ONLY_TEXT, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
' WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
' Else
|
||||
' WarehouseHelper.SetKerf(dKerf)
|
||||
' End If
|
||||
' Else
|
||||
' Return
|
||||
' End If
|
||||
' ElseIf SParamlist.Count > 0 Then
|
||||
' ' imposto finestra con anche edit
|
||||
' If AddRawPartWnd(AddRawPartWndVM.EditTypes.TEXT_AND_COMBO, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
|
||||
' WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' WarehouseHelper.SetStartOffset(dStartOffset)
|
||||
' Else
|
||||
' WarehouseHelper.SetKerf(dKerf)
|
||||
' End If
|
||||
' Else
|
||||
' Return
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End Select
|
||||
' End If
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' ' verifico se lunghezza barra e' maggiore della lunghezza dei pezzi
|
||||
' Dim dTotLen As Double = WarehouseHelper.GetStartOffset()
|
||||
' For PartIndex = 0 To SelParts.Count - 1
|
||||
' If PartIndex <> 0 Then
|
||||
' dTotLen += WarehouseHelper.GetOffset(BWType.BEAM)
|
||||
' End If
|
||||
' dTotLen += SelParts(PartIndex).dL
|
||||
' Next
|
||||
' If dTotLen > dRawL Then
|
||||
' MessageBox.Show(EgtMsg(61972), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' End If
|
||||
' ' creo nuovo gruppo di lavorazione
|
||||
' Map.refMachGroupPanelVM.AddMachGroup()
|
||||
' Dim nCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
' Dim sCurrMachGroupName As String = ""
|
||||
' EgtGetMachGroupName(nCurrMachGroup, sCurrMachGroupName)
|
||||
' Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
' ' scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_PRODID, ProjectManagerVM.CurrProd.nProdId)
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_PATTID, nCurrMachGroup)
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' ' ordino i pezzi per lunghezza
|
||||
' SelParts = SelParts.OrderBy(Function(x) x.dL).ToList
|
||||
' ' creo copie dei pezzi
|
||||
' Dim nPartDuploIdList As New List(Of Integer)
|
||||
' For Each Part In SelParts
|
||||
' Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
|
||||
' ' elimino valori calcolo dell'originale
|
||||
' MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
|
||||
' ' lo rendo std
|
||||
' EgtSetMode(nDuploId, GDB_MD.STD)
|
||||
' nPartDuploIdList.Add(nDuploId)
|
||||
' Next
|
||||
' ' scrivo dati costruzione grezzo in gruppo di lavorazione
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_BARLEN, dRawL)
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, SelParts(0).sMATERIAL)
|
||||
' ' scrivo dati di tutti i pezzi
|
||||
' Dim dPosX As Double = WarehouseHelper.GetStartOffset()
|
||||
' ' ciclo sui pezzi
|
||||
' For nIndex = 0 To nPartDuploIdList.Count - 1
|
||||
' ' se non è primo, aggiungo offset tra barre standard
|
||||
' If nIndex <> 0 Then
|
||||
' dPosX += WarehouseHelper.GetOffset(BWType.BEAM)
|
||||
' End If
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_PART & nIndex + 1, nPartDuploIdList(nIndex) & "," & DoubleToString(dPosX, 3))
|
||||
' ' incremento posizione della sua lunghezza
|
||||
' dPosX += SelParts(nIndex).dL
|
||||
' Next
|
||||
' Dim BeamMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.GetLastMachGroup()
|
||||
' ' eseguo script creazione grezzo
|
||||
' Dim nERR As Integer = 0
|
||||
' If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
' ' elimino duplo e gruppo di lavorazione
|
||||
' For Each nDuploId In nPartDuploIdList
|
||||
' EgtErase(nDuploId)
|
||||
' Next
|
||||
' BeamMachGroup.DeleteMachGroup()
|
||||
' If File.Exists(sLogPath) Then
|
||||
' Dim LogFile As String() = File.ReadAllLines(sLogPath)
|
||||
' If LogFile.Count >= 2 AndAlso Not IsNothing(LogFile(1)) Then
|
||||
' MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' End If
|
||||
' Else
|
||||
' MessageBox.Show(EgtMsg(61973), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' End If
|
||||
' ' se nessun grezzo, rimetto tutti i pezzi invisibili
|
||||
' If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
' Map.refProjectVM.BTLStructureVM.HideAll()
|
||||
' End If
|
||||
' Return
|
||||
' End If
|
||||
' For nDuploIndex = 0 To SelParts.Count - 1
|
||||
' EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, SelParts(nDuploIndex).nROTATED)
|
||||
' EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_FLIP, SelParts(nDuploIndex).nINVERTED)
|
||||
' Next
|
||||
' ' aggiorno contatore pezzi usati in Prod
|
||||
' For Each SelPart In SelParts
|
||||
' SelPart.RefreshPartInProd()
|
||||
' Next
|
||||
' 'aggiorno lista pezzi
|
||||
' BeamMachGroup.MyMachGroupM.RefreshPartList()
|
||||
' BeamMachGroup.MyMachGroupM.RefreshGroupData()
|
||||
' ' aggiorno dati utilizzo barra
|
||||
' BeamMachGroup.UpdateUsage()
|
||||
' Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
|
||||
' ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
' Dim nPartDuploId As Integer = EgtDuploNew(SelParts(0).nPartId)
|
||||
' ' scrivo dati in gruppo di lavorazione
|
||||
' Dim dPosX As Double = dKerf
|
||||
' Dim dPosY As Double = dKerf
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_PANELLEN, dRawL)
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_PANELWIDTH, dRawW)
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, SelParts(0).sMATERIAL)
|
||||
' EgtSetInfo(nCurrMachGroup, MGR_RPT_PART & 1,
|
||||
' nPartDuploId & "," & DoubleToString(dPosX, 3) & "," & DoubleToString(dPosY, 3) & ",0,0")
|
||||
' Dim WallMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 1)
|
||||
' ' eseguo script creazione grezzo
|
||||
' If Not ExecWall(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False, False) Then
|
||||
' ' elimino duplo e gruppo di lavorazione
|
||||
' EgtErase(nPartDuploId)
|
||||
' WallMachGroup.DeleteMachGroup()
|
||||
' If File.Exists(sLogPath) Then
|
||||
' Dim LogFile As String() = File.ReadAllLines(sLogPath)
|
||||
' If LogFile.Count >= 2 AndAlso Not IsNothing(LogFile(1)) Then
|
||||
' MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' End If
|
||||
' Else
|
||||
' MessageBox.Show(EgtMsg(61973), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' End If
|
||||
' ' se nessun grezzo, rimetto tutti i pezzi invisibili
|
||||
' If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
' Map.refProjectVM.BTLStructureVM.HideAll(True)
|
||||
' End If
|
||||
' Return
|
||||
' End If
|
||||
' ' scrivo dati pezzo
|
||||
' EgtSetInfo(nPartDuploId, MGR_PRT_POSX, dPosX)
|
||||
' EgtSetInfo(nPartDuploId, MGR_PRT_POSY, dPosY)
|
||||
' EgtSetInfo(nPartDuploId, MGR_PRT_ROT, SelParts(0).nROTATED)
|
||||
' EgtSetInfo(nPartDuploId, MGR_PRT_FLIP, SelParts(0).nINVERTED)
|
||||
' ' aggiorno contatore pezzi usati in Prod
|
||||
' SelParts(0).RefreshPartInProd()
|
||||
' ' aggiorno lista pezzi
|
||||
' WallMachGroup.MyMachGroupM.RefreshPartList()
|
||||
' WallMachGroup.MyMachGroupM.RefreshGroupData()
|
||||
' ' aggiorno dati ultilizzo barra
|
||||
' WallMachGroup.UpdateUsage()
|
||||
' Core.ViewPanelVM.BWSetView(VT.TOP, False)
|
||||
' End If
|
||||
' EgtZoom(ZM.ALL)
|
||||
' End Sub
|
||||
|
||||
' ' funzione che apre finestra di scelta dimensioni grezzo
|
||||
' Private Function AddRawPartWnd(EditType As AddRawPartWndVM.EditTypes, SParamlist As List(Of SParam), ByRef dRawW As Double, ByRef dRawL As Double,
|
||||
' ByRef dStartOffset As Double, ByRef dOffset As Double, ByRef dKerf As Double) As Boolean
|
||||
' ' apro finestra con solo edit
|
||||
' Dim AddRawPartWndVM As New AddRawPartWndVM(EditType, Map.refProjectVM.BTLStructureVM.nPROJTYPE, SParamlist, dRawL, dRawW, dStartOffset, dOffset, dKerf)
|
||||
' Dim AddRawPartWndV As New OnlyProdAddRawPartWndV(Application.Current.MainWindow, AddRawPartWndVM)
|
||||
' If Not AddRawPartWndV.ShowDialog() Then Return False
|
||||
' Select Case Map.refProjectVM.BTLStructureVM.nPROJTYPE
|
||||
' Case BWType.BEAM
|
||||
' dRawL = AddRawPartWndVM.VariableList(0).dValue
|
||||
' dStartOffset = AddRawPartWndVM.VariableList(1).dValue
|
||||
' dOffset = AddRawPartWndVM.VariableList(2).dValue
|
||||
' Case BWType.WALL
|
||||
' dRawW = AddRawPartWndVM.VariableList(0).dValue
|
||||
' dRawL = AddRawPartWndVM.VariableList(1).dValue
|
||||
' dKerf = AddRawPartWndVM.VariableList(2).dValue
|
||||
' dOffset = AddRawPartWndVM.VariableList(3).dValue
|
||||
' End Select
|
||||
' ' verifico se il materiale esiste in magazzino o devo aggiungerlo
|
||||
' Dim CurrSParam As SParam = Nothing
|
||||
' Select Case EditType
|
||||
' Case AddRawPartWndVM.EditTypes.ONLY_TEXT
|
||||
' ' lo aggiungo a lista materiali in magazzino
|
||||
' CurrSParam = AddRawMaterial(dRawW, dRawL)
|
||||
' Case AddRawPartWndVM.EditTypes.ONLY_COMBO
|
||||
' ' non faccio nulla
|
||||
' Case AddRawPartWndVM.EditTypes.TEXT_AND_COMBO
|
||||
' ' verifico se lunghezza testo corrisponde a materiale
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' CurrSParam = SParamlist.FirstOrDefault(Function(x) x.dL = AddRawPartWndVM.VariableList(0).dValue)
|
||||
' Else
|
||||
' CurrSParam = SParamlist.FirstOrDefault(Function(x) x.dL = AddRawPartWndVM.VariableList(1).dValue AndAlso x.dW = AddRawPartWndVM.VariableList(0).dValue)
|
||||
' End If
|
||||
' If IsNothing(CurrSParam) Then
|
||||
' ' lo aggiungo a lista materiali in magazzino
|
||||
' CurrSParam = AddRawMaterial(dRawW, dRawL)
|
||||
' End If
|
||||
' End Select
|
||||
' ' imposto il materiale selezionato come ultimo utilizzato
|
||||
' SetLastMaterial(CurrSParam.SectXMat, CurrSParam)
|
||||
' Return True
|
||||
' End Function
|
||||
|
||||
' Private Function AddRawMaterial(dRawW As Double, ByRef dRawL As Double) As SParam
|
||||
' Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
|
||||
' Dim nQuantity As Integer = GetMainPrivateProfileInt(S_WAREHOUSE, K_DEFAULTQUANTITY, 1)
|
||||
' Dim CurrSParam = Nothing
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' ' creo sParam
|
||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0)) Then CurrSParam = New SParam(Map.refProjectVM.BTLStructureVM.SelBTLParts(0).Section, dRawL, nQuantity, False)
|
||||
' Dim sL As String = String.Empty
|
||||
' sL = LenToString(CurrSParam.dL, 3)
|
||||
' ' ricavo l'indice del SecionXMaterial dalla Beam_List
|
||||
' Dim SectXMatIndex As Integer = GetSectIndexFromSection(MachineType.BEAM, CurrSParam.SectXMat)
|
||||
' ' ricavo nuovo indice materiale
|
||||
' Dim ParamIndex As Integer = 1
|
||||
' Dim sParam As String = ""
|
||||
' While GetPrivateProfileString(S_BEAM, K_L & ParamIndex, "", sParam, sWarehousePath) > 0
|
||||
' ParamIndex += 1
|
||||
' End While
|
||||
' If SectXMatIndex > 0 Then
|
||||
' ' lo aggiungo in warehouse
|
||||
' WritePrivateProfileString(S_BEAM, K_L & ParamIndex,
|
||||
' SectXMatIndex & "," & sL & "," & CurrSParam.nQuantity & "," & If(CurrSParam.bActive, 1, 0),
|
||||
' sWarehousePath)
|
||||
' Else
|
||||
' EgtOutLog("Error in material creation, section not found!")
|
||||
' End If
|
||||
' Return CurrSParam
|
||||
' ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
' ' creo sParam
|
||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0)) Then CurrSParam = New SParam(Map.refProjectVM.BTLStructureVM.SelBTLParts(0).Section, dRawW, dRawL, nQuantity, False)
|
||||
' Dim sW As String = String.Empty
|
||||
' Dim sL As String = String.Empty
|
||||
' sW = LenToString(CurrSParam.dW, 3)
|
||||
' sL = LenToString(CurrSParam.dL, 3)
|
||||
' ' ricavo l'indice del SecionXMaterial dalla Wall_List
|
||||
' Dim SectXMatIndex As Integer = GetSectIndexFromSection(MachineType.WALL, CurrSParam.SectXMat)
|
||||
' ' ricavo nuovo indice materiale
|
||||
' Dim ParamIndex As Integer = 1
|
||||
' Dim sParam As String = ""
|
||||
' While GetPrivateProfileString(S_WALL, K_S & ParamIndex, "", sParam, sWarehousePath) > 0
|
||||
' ParamIndex += 1
|
||||
' End While
|
||||
' ' lo aggiungo in warehouse
|
||||
' WritePrivateProfileString(S_WALL, K_S & ParamIndex,
|
||||
' SectXMatIndex & "," & sW & "," & sL & "," & CurrSParam.nQuantity & "," & If(CurrSParam.bActive, 1, 0),
|
||||
' sWarehousePath)
|
||||
' Return CurrSParam
|
||||
' End If
|
||||
|
||||
' Return Nothing
|
||||
' End Function
|
||||
|
||||
' Private Function VerifyPartCount(SelParts As List(Of BTLPartVM)) As Boolean
|
||||
' ' verifico se ci sono pezzi da aggiungere
|
||||
' Dim ToAddList As New List(Of String)
|
||||
' Dim ToAddVM As New List(Of BTLPartVM)
|
||||
' For Each SelPart In SelParts
|
||||
' If Not SelPart.CanAddPartToCount Then
|
||||
' ToAddList.Add(SelPart.nCNT & EgtMsg(61864) & SelPart.nADDED & EgtMsg(61865))
|
||||
' ToAddVM.Add(SelPart)
|
||||
' End If
|
||||
' Next
|
||||
' ' se non ci sono, chiedo se aggiungerne uno nuovo
|
||||
' If ToAddList.Count > 0 Then
|
||||
' Dim sMessage As String = EgtMsg(61863) & Environment.NewLine
|
||||
' For Each sPart In ToAddList
|
||||
' sMessage &= " - " & sPart & Environment.NewLine
|
||||
' Next
|
||||
' If MessageBox.Show(sMessage & EgtMsg(61893), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' For Each PartVM In ToAddVM
|
||||
' PartVM.AddNewPartToAdded()
|
||||
' Next
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
' Return True
|
||||
' End Function
|
||||
|
||||
'#End Region ' NewRawPart
|
||||
|
||||
'#Region "NewRawPartLast"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Exec.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property NewRawPartLast_Command As ICommand
|
||||
' Get
|
||||
' If m_cmdNewRawPartLast Is Nothing Then
|
||||
' m_cmdNewRawPartLast = New Command(AddressOf NewRawPartLast)
|
||||
' End If
|
||||
' Return m_cmdNewRawPartLast
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub NewRawPartLast()
|
||||
' NewRawPart(True)
|
||||
' End Sub
|
||||
|
||||
'#End Region ' NewRawPartLast
|
||||
|
||||
'#Region "AddToRawPart"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Exec.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property AddToRawPart_Command As ICommand
|
||||
' Get
|
||||
' If m_cmdAddToRawPart Is Nothing Then
|
||||
' m_cmdAddToRawPart = New Command(AddressOf AddToRawPart)
|
||||
' End If
|
||||
' Return m_cmdAddToRawPart
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub AddToRawPart()
|
||||
' If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||
' Dim SelPart As BTLPartVM
|
||||
' If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count <= 0 Then
|
||||
' Return
|
||||
' Else
|
||||
' SelPart = Map.refProjectVM.BTLStructureVM.SelBTLParts(0)
|
||||
' End If
|
||||
' Dim SelParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
|
||||
' For Index = 0 To SelParts.Count() - 1
|
||||
' If IsNothing(SelParts(Index)) Then
|
||||
' SelParts.RemoveAt(Index)
|
||||
' End If
|
||||
' Next
|
||||
' If IsNothing(SelPart) Then Return
|
||||
' If IsNothing(SelParts) OrElse SelParts.Count <= 0 Then Return
|
||||
' Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
' If IsNothing(SelMachGroup) Then Return
|
||||
' ' se pareti e piu' di uno selezionato, esco
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL And SelParts.Count > 1 Then
|
||||
' MessageBox.Show(EgtMsg(61971), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' ' se MachGroup gia' mandato in produzione, esco
|
||||
' If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
||||
' ' verifico se sono gia' stati messi tutti i pezzi richiesti
|
||||
' If Not VerifyPartCount(SelParts) Then Return
|
||||
' ' verifico se impostato gruppo di lavorazione
|
||||
' Dim nCurrMachgroupId As Integer = EgtGetCurrMachGroup()
|
||||
' ' se nullo o diverso da quello selezionato in lista
|
||||
' If nCurrMachgroupId = GDB_ID.NULL OrElse nCurrMachgroupId <> SelMachGroup.Id Then
|
||||
' ' lo imposto
|
||||
' EgtSetCurrMachGroup(SelMachGroup.Id)
|
||||
' End If
|
||||
' If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' Dim BeamMachGroup As MyMachGroupVM = SelMachGroup
|
||||
' ' verifico sezione e materiale
|
||||
' For Each Part In SelParts
|
||||
' If Part.Section <> BeamMachGroup.Section Then
|
||||
' MessageBox.Show(EgtMsg(61866), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' Next
|
||||
' ' verifico lunghezza totale
|
||||
' If Not VerifyTotLength(BeamMachGroup, SelParts) Then
|
||||
' MessageBox.Show(EgtMsg(61867), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' If AddPartToBeam(BeamMachGroup, SelParts) Then
|
||||
' ' aggiorno contatore pezzi usati in Prod
|
||||
' For Each Part In SelParts
|
||||
' Part.RefreshPartInProd()
|
||||
' Next
|
||||
' ' resetto stato di calc
|
||||
' SelMachGroup.ResetCalcMachGroup()
|
||||
' End If
|
||||
' ' aggiorno dati ultilizzo barra
|
||||
' BeamMachGroup.UpdateUsage()
|
||||
' Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
|
||||
' ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
' Dim WallMachGroup As MyMachGroupVM = SelMachGroup
|
||||
' ' verifico spessore
|
||||
' If SelPart.Section <> WallMachGroup.Section Then
|
||||
' MessageBox.Show(EgtMsg(61868), EgtMsg(30007))
|
||||
' Return
|
||||
' End If
|
||||
' If AddPartToWall(WallMachGroup, SelPart) Then
|
||||
' ' aggiorno contatore pezzi usati in Prod
|
||||
' SelPart.RefreshPartInProd()
|
||||
' ' resetto stato di calc
|
||||
' SelMachGroup.ResetCalcMachGroup()
|
||||
' End If
|
||||
' ' aggiorno dati ultilizzo barra
|
||||
' WallMachGroup.UpdateUsage()
|
||||
' Core.ViewPanelVM.BWSetView(VT.TOP, False)
|
||||
' End If
|
||||
' EgtZoom(ZM.ALL)
|
||||
' End Sub
|
||||
|
||||
' Friend Function VerifyTotLength(BeamMachGroup As MyMachGroupVM, PartsToAdd As List(Of BTLPartVM)) As Boolean
|
||||
' Dim dNewPartPos As Double = 0
|
||||
' If BeamMachGroup.PartVMList.Count > 0 Then
|
||||
' Dim LastPart As PartVM = BeamMachGroup.PartVMList(BeamMachGroup.PartVMList.Count - 1)
|
||||
' dNewPartPos += LastPart.dPOSX + LastPart.dL
|
||||
' End If
|
||||
' For Each Part In PartsToAdd
|
||||
' dNewPartPos += WarehouseHelper.GetOffset(BeamMachGroup.nType) + Part.dL
|
||||
' Next
|
||||
' Return dNewPartPos < BeamMachGroup.dL
|
||||
' End Function
|
||||
|
||||
' Friend Function AddPartToBeam(BeamMachGroup As MyMachGroupVM, PartsToAdd As List(Of BTLPartVM)) As Boolean
|
||||
' ' ordino i pezzi da aggiungere
|
||||
' PartsToAdd = PartsToAdd.OrderBy(Function(x) x.dL).ToList()
|
||||
' ' creo copie dei pezzi
|
||||
' Dim nPartDuploIdList As New List(Of Integer)
|
||||
' For Each Part In PartsToAdd
|
||||
' Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
|
||||
' ' elimino valori calcolo dell'originale
|
||||
' MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
|
||||
' ' lo rendo std
|
||||
' EgtSetMode(nDuploId, GDB_MD.STD)
|
||||
' nPartDuploIdList.Add(nDuploId)
|
||||
' Next
|
||||
' ' calcolo posizione nuovo pezzo per rispettare ordine lunghezze
|
||||
' Dim nInsertIndex As Integer
|
||||
' ' scrivo dati di tutti i pezzi
|
||||
' Dim dPosX As Double = BeamMachGroup.dStartCut
|
||||
' Dim nPartIndex As Integer = 0
|
||||
' Dim nIndex As Integer
|
||||
' Dim bDuploInfo As Boolean = False
|
||||
' ' ciclo sui pezzi
|
||||
' For nIndex = 0 To BeamMachGroup.PartVMList.Count - 1
|
||||
' For PartsToAddIndex = nPartIndex To PartsToAdd.Count - 1
|
||||
' Dim Part As BTLPartVM = PartsToAdd(PartsToAddIndex)
|
||||
' ' se non ancora aggiunto e lunghezza minore del pezzo corrente, lo aggiungo
|
||||
' If nPartIndex < nPartDuploIdList.Count() AndAlso BeamMachGroup.PartVMList(nIndex).dL > Part.dL Then
|
||||
' ' se non è primo, aggiungo offset tra barre standard
|
||||
' If nIndex <> 0 OrElse nPartIndex <> 0 Then
|
||||
' dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType)
|
||||
' End If
|
||||
' EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1, nPartDuploIdList(nPartIndex) & "," & DoubleToString(dPosX, 3))
|
||||
' ' incremento posizione della sua lunghezza
|
||||
' dPosX += Part.dL
|
||||
' ' conservo indice d'inserimento
|
||||
' nInsertIndex = nIndex
|
||||
' nPartIndex += 1
|
||||
' Else
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' ' se non è primo, aggiungo offset del pezzo
|
||||
' If nIndex <> 0 Then
|
||||
' dPosX += BeamMachGroup.PartVMList(nIndex).dOffset
|
||||
' ' se sono a indice primo ed è stato aggiunto pezzo nuovo
|
||||
' ElseIf nIndex = 0 AndAlso nPartIndex > 0 Then
|
||||
' ' aggiungo offset tra barre standard
|
||||
' dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType)
|
||||
' End If
|
||||
' EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1, BeamMachGroup.PartVMList(nIndex).nPartId & "," & DoubleToString(dPosX, 3))
|
||||
' ' incremento posizione della sua lunghezza
|
||||
' dPosX += BeamMachGroup.PartVMList(nIndex).dL
|
||||
' Next
|
||||
' ' se non è ancora stato aggiunto
|
||||
' For PartsToAddIndex = nPartIndex To PartsToAdd.Count - 1
|
||||
' ' aggiungo offset tra barre standard
|
||||
' dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType)
|
||||
' ' lo aggiungo in fondo
|
||||
' EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1, nPartDuploIdList(nPartIndex) & "," & DoubleToString(dPosX, 3))
|
||||
' ' incremento posizione della sua lunghezza
|
||||
' dPosX += PartsToAdd(nPartIndex).dL
|
||||
' ' conservo indice d'inserimento
|
||||
' nInsertIndex = nIndex
|
||||
' nPartIndex += 1
|
||||
' Next
|
||||
' ' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
' Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
' While nRawId <> GDB_ID.NULL
|
||||
' EgtRemoveRawPart(nRawId)
|
||||
' nRawId = EgtGetFirstRawPart()
|
||||
' End While
|
||||
' Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
' If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
' EgtOutLog("Fallito inserimento grezzo nella barra in AddPartToBeam")
|
||||
' ' elimino duplo
|
||||
' For Each nDuploId In nPartDuploIdList
|
||||
' EgtErase(nDuploId)
|
||||
' Next
|
||||
' ' aggiorno info grezzo
|
||||
' For nIndex = 0 To BeamMachGroup.PartVMList.Count - 1
|
||||
' EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1, BeamMachGroup.PartVMList(nIndex).nPartId & "," & DoubleToString(BeamMachGroup.PartVMList(nIndex).dPOSX, 3))
|
||||
' Next
|
||||
' ' rimuovo info duplo
|
||||
' While EgtGetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1, nPartDuploIdList(0))
|
||||
' bDuploInfo = EgtGetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1, nPartDuploIdList(0))
|
||||
' EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1)
|
||||
' nIndex += 1
|
||||
' End While
|
||||
' ' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
' nRawId = EgtGetFirstRawPart()
|
||||
' While nRawId <> GDB_ID.NULL
|
||||
' EgtRemoveRawPart(nRawId)
|
||||
' nRawId = EgtGetFirstRawPart()
|
||||
' End While
|
||||
' If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
' EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
|
||||
' End If
|
||||
' End If
|
||||
' For nDuploIndex = 0 To PartsToAdd.Count - 1
|
||||
' EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, PartsToAdd(nDuploIndex).nROTATED)
|
||||
' EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_FLIP, PartsToAdd(nDuploIndex).nINVERTED)
|
||||
' Next
|
||||
' ' aggiorno lista pezzi
|
||||
' BeamMachGroup.MyMachGroupM.RefreshPartList()
|
||||
' ' seleziono pezzo aggiunto
|
||||
' If BeamMachGroup.PartVMList.Count > nInsertIndex Then
|
||||
' BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex)
|
||||
' ElseIf bDuploInfo Then
|
||||
' BeamMachGroup.SelPart = BeamMachGroup.PartVMList(BeamMachGroup.PartVMList.Count - 1)
|
||||
' End If
|
||||
' Return True
|
||||
' End Function
|
||||
|
||||
' Friend Function AddPartToWall(WallMachGroup As MyMachGroupVM, PartToAdd As BTLPartVM) As Boolean
|
||||
' ' creo copia del pezzo
|
||||
' Dim nPartDuploId As Integer = EgtDuploNew(PartToAdd.nPartId)
|
||||
' ' lo rendo std
|
||||
' EgtSetMode(nPartDuploId, GDB_MD.STD)
|
||||
' ' Posizione di inserimento
|
||||
' Dim dPosX As Double = WarehouseHelper.GetKerf()
|
||||
' Dim dPosY As Double = WarehouseHelper.GetKerf()
|
||||
' ' Se ci sono pezzi già inseriti
|
||||
' If WallMachGroup.PartVMList.Count > 0 Then
|
||||
' Dim LastWall As PartVM = WallMachGroup.PartVMList(WallMachGroup.PartVMList.Count - 1)
|
||||
' Dim LastWallPosX As Double = LastWall.dPOSX
|
||||
' Dim LastWallPosY As Double = LastWall.PartM.dPOSY
|
||||
' ' converto posizione ultimo pezzo nel riferimento BL
|
||||
' Select Case CurrentMachine.NestingCorner
|
||||
' Case MCH_CR.TL
|
||||
' LastWallPosY = WallMachGroup.dW - LastWall.dW - LastWall.PartM.dPOSY
|
||||
' Case MCH_CR.BL
|
||||
' Case MCH_CR.TR
|
||||
' LastWallPosX = WallMachGroup.dL - LastWall.dL - LastWall.dPOSX
|
||||
' LastWallPosY = WallMachGroup.dW - LastWall.dW - LastWall.PartM.dPOSY
|
||||
' Case MCH_CR.BR
|
||||
' LastWallPosX = WallMachGroup.dL - LastWall.dL - LastWall.dPOSX
|
||||
' End Select
|
||||
' ' verifico se posso metterlo sopra in Y
|
||||
' Dim NextPosY = LastWallPosY + LastWall.dW + WarehouseHelper.GetOffset(WallMachGroup.nType)
|
||||
' If WallMachGroup.dW - NextPosY > PartToAdd.dW + 10 Then
|
||||
' dPosX = LastWallPosX
|
||||
' dPosY = NextPosY
|
||||
' Else
|
||||
' ' altrimenti lo affianco in X
|
||||
' dPosX = 10
|
||||
' For i As Integer = 0 To WallMachGroup.PartVMList.Count - 1
|
||||
' Dim CurrWall As PartVM = WallMachGroup.PartVMList(i)
|
||||
' Dim CurrWallPosX As Double = CurrWall.dPOSX
|
||||
' ' converto posizione pezzo corrente nel riferimento BL
|
||||
' Select Case CurrentMachine.NestingCorner
|
||||
' Case MCH_CR.TL
|
||||
' Case MCH_CR.BL
|
||||
' Case MCH_CR.TR
|
||||
' CurrWallPosX = WallMachGroup.dL - CurrWall.dL - CurrWall.dPOSX
|
||||
' Case MCH_CR.BR
|
||||
' CurrWallPosX = WallMachGroup.dL - CurrWall.dL - CurrWall.dPOSX
|
||||
' End Select
|
||||
' Dim NextPosX = CurrWallPosX + CurrWall.dL + WarehouseHelper.GetOffset(WallMachGroup.nType)
|
||||
' If NextPosX > dPosX Then
|
||||
' dPosX = NextPosX
|
||||
' End If
|
||||
' Next
|
||||
' dPosY = 10
|
||||
' End If
|
||||
' End If
|
||||
' ' converto posizione trovata da riferimento BL a quello corrente
|
||||
' Select Case CurrentMachine.NestingCorner
|
||||
' Case MCH_CR.TL
|
||||
' dPosY = WallMachGroup.dW - PartToAdd.dW - dPosY
|
||||
' Case MCH_CR.BL
|
||||
' Case MCH_CR.TR
|
||||
' dPosX = WallMachGroup.dL - PartToAdd.dL - dPosX
|
||||
' dPosY = WallMachGroup.dW - PartToAdd.dW - dPosY
|
||||
' Case MCH_CR.BR
|
||||
' dPosX = WallMachGroup.dL - PartToAdd.dL - dPosX
|
||||
' End Select
|
||||
' ' aggiungo il pezzo al grezzo
|
||||
' If EgtAddPartToRawPart(nPartDuploId, New Point3d(dPosX, dPosY, 0), WallMachGroup.MyMachGroupM.nRawPartId) Then
|
||||
' EgtSetInfo(nPartDuploId, MGR_PRT_POSX, dPosX)
|
||||
' EgtSetInfo(nPartDuploId, MGR_PRT_POSY, dPosY)
|
||||
' EgtSetInfo(nPartDuploId, MGR_PRT_ROT, PartToAdd.nROTATED)
|
||||
' EgtSetInfo(nPartDuploId, MGR_PRT_FLIP, PartToAdd.nINVERTED)
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' 'aggiorno lista pezzi
|
||||
' WallMachGroup.MyMachGroupM.RefreshPartList()
|
||||
' ' seleziono pezzo aggiunto
|
||||
' If WallMachGroup.PartVMList.Count > 0 Then WallMachGroup.SelPart = WallMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartDuploId)
|
||||
' Return True
|
||||
' End Function
|
||||
|
||||
'#End Region ' AddToRawPart
|
||||
|
||||
#Region "CopyPart"
|
||||
|
||||
''' <summary>
|
||||
@@ -1161,15 +427,6 @@ Public Class BTLPartManagerVM
|
||||
Dim ProjType As BWType
|
||||
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
|
||||
ProjType = Map.refOnlyProdManagerVM.CurrProd.nType
|
||||
'If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then
|
||||
' If Not CreateBarToSimulate(Pages.VIEW, ProjType, BarList) Then Return
|
||||
' ' lancio simulazione
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
'ElseIf Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
|
||||
' If Not CreateBarToSimulate(Pages.MACHINING, ProjType, BarList) Then Return
|
||||
' ' lancio simulazione
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
'End If
|
||||
If Not CreateBarToSimulate(ProjType, BarList) Then Return
|
||||
' lancio simulazione
|
||||
EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
@@ -1197,31 +454,6 @@ Public Class BTLPartManagerVM
|
||||
End If
|
||||
' disabilito interfaccia
|
||||
Map.refProjectVM.SetCalcRunning(True)
|
||||
'ElseIf SelPage = Pages.MACHINING Then
|
||||
' If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
|
||||
' Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
' Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
|
||||
' Dim MachineName As String = ""
|
||||
' EgtGetMachGroupMachineName(SelMachGroup.Id, MachineName)
|
||||
' Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = SelMachGroup.Id,
|
||||
' .nProgramPage = ProjectType.PROD,
|
||||
' .nProjType = ProjType,
|
||||
' .bBarOk = True,
|
||||
' .nMachineName = MachineName,
|
||||
' .nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
||||
' .nGlobState = SelMachGroup.nGlobalState}
|
||||
' If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then
|
||||
' Dim sMachGroupFilePath As String = ProjectManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe"
|
||||
' If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath)
|
||||
' End If
|
||||
' TempBarList(0) = Bar
|
||||
' BarList = TempBarList
|
||||
'Else
|
||||
' Return False
|
||||
' End If
|
||||
' disabilito interfaccia
|
||||
Map.refProjectVM.SetCalcRunning(True)
|
||||
'End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -37,54 +37,5 @@
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<!--<Button Command="{Binding NewRawPart_Command}"
|
||||
Visibility="{Binding MachiningPage_Visibility}"
|
||||
ToolTip="{Binding NewRawPart_ToolTip}"
|
||||
IsEnabled="{Binding BTLPartManager_IsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding NewRawPartLast_Command}"
|
||||
Visibility="{Binding MachiningPage_Visibility}"
|
||||
ToolTip="{Binding NewRawPartLast_ToolTip}"
|
||||
IsEnabled="{Binding BTLPartManager_IsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/LeftPanel/NewRawPartAuto.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<!--<Button Command="{Binding AddToRawPart_Command}"
|
||||
Visibility="{Binding MachiningPage_Visibility}"
|
||||
ToolTip="{Binding AddToRawPart_ToolTip}"
|
||||
IsEnabled="{Binding BTLPartManager_IsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/LeftPanel/AddToRawPart.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<!--<Button Command="{Binding Invert_Command}"
|
||||
Visibility="{Binding ViewPage_Visibility}"
|
||||
ToolTip="{Binding InvertSx_ToolTip}"
|
||||
IsEnabled="{Binding RotatePart_IsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/PartManager/LeftInvert.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding Invert_Command}"
|
||||
Visibility="{Binding ViewPage_Visibility}"
|
||||
ToolTip="{Binding InvertDx_ToolTip}"
|
||||
IsEnabled="{Binding RotatePart_IsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/PartManager/RightInvert.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding BackRotation_Command}"
|
||||
Visibility="{Binding ViewPage_Visibility}"
|
||||
ToolTip="{Binding BackRotation_ToolTip}"
|
||||
IsEnabled="{Binding RotatePart_IsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/PartManager/LeftRotate.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding ForwardRotation_Command}"
|
||||
Visibility="{Binding ViewPage_Visibility}"
|
||||
ToolTip="{Binding ForwardRotation_ToolTip}"
|
||||
IsEnabled="{Binding RotatePart_IsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -167,12 +167,6 @@ Public Class BTLFeatureVM
|
||||
sPar = Nothing
|
||||
vParQ = Nothing
|
||||
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
|
||||
'' imposto path disegno da mostrare in BottomPanel
|
||||
'If value > 0 AndAlso File.Exists(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png") Then
|
||||
' Map.refBottomPanelVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & "." & sDES & ".png")
|
||||
'Else
|
||||
' Map.refBottomPanelVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png")
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Public Property sPriority As String
|
||||
@@ -215,10 +209,6 @@ Public Class BTLFeatureVM
|
||||
Set(value As Boolean)
|
||||
Dim bShowSolid As Boolean = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If value <> m_BTLFeatureM.bDO Then
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' ' verifico se solido attivo
|
||||
' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
'End If
|
||||
If EgtBeamEnableProcess(nFeatureId, value, Not m_bDO_MultipleUpdate) Then
|
||||
m_BTLFeatureM.bDO = value
|
||||
' setto feature da ricalcolare
|
||||
@@ -233,10 +223,6 @@ Public Class BTLFeatureVM
|
||||
Item.NotifyPropertyChanged(NameOf(Item.sMsg))
|
||||
Next
|
||||
End If
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' ' eventualmente ripristino solido
|
||||
' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
'End If
|
||||
If Not m_bDO_MultipleUpdate Then EgtDraw()
|
||||
' aggiorno stato abilitazione del bottone modifica free contour
|
||||
Map.refFeatureManagerVM.SetEditIsEnabled()
|
||||
@@ -271,12 +257,6 @@ Public Class BTLFeatureVM
|
||||
End Get
|
||||
Set(value As BTLParamVM)
|
||||
m_SelPBTLParam = value
|
||||
If Not IsNothing(m_SelPBTLParam) Then
|
||||
' imposto path disegno da mostrare in BottomPanel
|
||||
'If Not IsNothing(Map.refBottomPanelVM) Then
|
||||
' Map.refBottomPanelVM.SetCurrDraw(m_SelPBTLParam.sDrawPath)
|
||||
'End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelPBTLParam))
|
||||
End Set
|
||||
End Property
|
||||
@@ -298,10 +278,6 @@ Public Class BTLFeatureVM
|
||||
End Get
|
||||
Set(value As BTLParamVM)
|
||||
m_SelQParam = value
|
||||
'If Not IsNothing(m_SelQParam) AndAlso Not IsNothing(Map.refBottomPanelVM) Then
|
||||
' ' imposto path disegno da mostrare in BottomPanel
|
||||
' Map.refBottomPanelVM.SetCurrDraw(m_SelQParam.sDrawPath)
|
||||
'End If
|
||||
NotifyPropertyChanged(NameOf(SelQBTLParam))
|
||||
End Set
|
||||
End Property
|
||||
@@ -622,14 +598,11 @@ Public Class BTLFeatureVM
|
||||
End Property
|
||||
|
||||
Public Sub Strategy()
|
||||
' Visualizzo StrategyProductionV
|
||||
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.STRATEGYMANAGER)
|
||||
' Disabilito LeftPanel
|
||||
Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(False)
|
||||
Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(0.2)
|
||||
Map.refForcedStrategyPanelVM.Init(BTLFeatureM)
|
||||
'' Richiamo Funzione per mostrare Stragetie della Feature
|
||||
'Map.refStrategyManagerVM.GetStrategyProduction()
|
||||
End Sub
|
||||
|
||||
#End Region ' Strategy
|
||||
|
||||
@@ -1532,28 +1532,12 @@ 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
|
||||
DirectCast(m_SelBTLFeatureVM, BTLFeatureVM).SelGeomFeature()
|
||||
' deseleziono i parametri
|
||||
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
|
||||
' rinfresco bottoni freecontour
|
||||
m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
|
||||
'' aggiorno stato abilitazione del bottone modifica free contour
|
||||
'If Map.refMainMenuVM.SelPage <> Pages.ONLYPRODPAGE Then
|
||||
' Map.refFeatureManagerVM.SetEditIsEnabled()
|
||||
' Map.refFeatureManagerVM.NotifyPropertyChanged(NameOf(Map.refFeatureManagerVM.Priority_Visibility))
|
||||
'End If
|
||||
' Controlo se nPRC è 900 rendo visibile combobox Variant
|
||||
If m_SelBTLFeatureVM.nPRC = 900 Then
|
||||
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Visible)
|
||||
Dim nVariant As Integer = 0
|
||||
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
|
||||
m_SelBTLFeatureVM.nSelVARIANT = nVariant
|
||||
End If
|
||||
Else
|
||||
'If Map.refMainMenuVM.SelPage <> Pages.ONLYPRODPAGE Then Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed)
|
||||
End If
|
||||
' Forzo strategia
|
||||
Map.refForcedStrategyBTLVM.Init(m_SelBTLFeatureVM.BTLFeatureM)
|
||||
Else
|
||||
@@ -1573,6 +1557,7 @@ Public Class BTLPartVM
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
Map.refShowBeamPanelVM.SetShowBuilding(False)
|
||||
Map.refProjectVM.BTLStructureVM.SceneSelPartSelection()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -1603,6 +1588,7 @@ Public Class BTLPartVM
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
Map.refShowBeamPanelVM.SetShowBuilding(False)
|
||||
Map.refProjectVM.BTLStructureVM.SceneSelPartSelection()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -2369,7 +2355,6 @@ Public Class BTLPartVM
|
||||
Dim sBTLPartFilePath As String = ProjectManagerVM.CurrProj.sProjDirPath & "\" & Map.refProjectVM.BTLStructureVM.SelBTLPart.nPDN.ToString() & ".ori.bwe"
|
||||
If File.Exists(sBTLPartFilePath) Then File.Delete(sBTLPartFilePath)
|
||||
End If
|
||||
'Bar.nCmdType = CalcIntegration.CmdTypes.CHECKGEN
|
||||
Bar.nCmdType = CalcIntegration.CmdTypes.CHECKNOSIM
|
||||
End Select
|
||||
TempBarList(0) = Bar
|
||||
|
||||
@@ -5,7 +5,6 @@ Imports System.Windows.Threading
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports System.IO
|
||||
|
||||
Public Class BTLStructureVM
|
||||
Inherits VMBase
|
||||
@@ -1059,7 +1058,7 @@ Public Class BTLStructureVM
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' ciclo sui pezzi
|
||||
For Each Part As BTLPartVM In m_BTLPartVMList
|
||||
' se non è quello selezionato, lo nasondo
|
||||
' se non è quello selezionato, lo nascondo
|
||||
If Part IsNot m_SelBTLPart Then
|
||||
EgtSetMode(Part.nPartId, GDB_MD.HIDDEN)
|
||||
Else
|
||||
@@ -1135,15 +1134,12 @@ Public Class BTLStructureVM
|
||||
End Sub
|
||||
|
||||
Friend Sub ShowBuilding(bShow As Boolean, Optional bRedraw As Boolean = True)
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) Then
|
||||
EgtSetStatus(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Id, GDB_ST.OFF)
|
||||
End If
|
||||
' disabilito impostazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
'ShowAll(False)
|
||||
'Dim CurrProdPathFile As String = ProjectManagerVM.CurrProd.sProdPath
|
||||
'If File.Exists(CurrProdPathFile) Then
|
||||
' EgtOpenFile(CurrProdPathFile)
|
||||
'Else
|
||||
' EgtOutLog("File nge mancante")
|
||||
'End If
|
||||
|
||||
Dim bOn As Boolean = EgtBeamGetBuildingIsOn()
|
||||
If bShow <> bOn Then
|
||||
EgtBeamShowBuilding(bShow)
|
||||
|
||||
@@ -150,11 +150,6 @@ Public Class CALCPanelVM
|
||||
'End Property
|
||||
|
||||
' Definizione comandi
|
||||
'Private m_cmdVerify As ICommand
|
||||
'Private m_cmdVerifyAll As ICommand
|
||||
'Private m_cmdResetCalc As ICommand
|
||||
'Private m_cmdSimulate As ICommand
|
||||
'Private m_cmdEdit As ICommand
|
||||
Private m_cmdChooseMachine As ICommand
|
||||
Private m_cmdOk As ICommand
|
||||
|
||||
@@ -251,11 +246,6 @@ Public Class CALCPanelVM
|
||||
End If
|
||||
' se verify o verifyall, salvo il progetto per conservarne gli stati calcolati
|
||||
If e.CmdType = CmdTypes.CHECKGEN Then
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' Map.refProjManagerVM.Save()
|
||||
'ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
' Map.refProdManagerVM.Save()
|
||||
'End If
|
||||
Map.refOnlyProdManagerVM.Save()
|
||||
End If
|
||||
' se modalita' assemblato attiva
|
||||
@@ -634,27 +624,6 @@ Public Class CALCPanelVM
|
||||
'NotifyPropertyChanged(NameOf(Edit_IsEnabled))
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
'#Region "Verify"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Open.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property Verify_Command As ICommand
|
||||
' Get
|
||||
' If m_cmdVerify Is Nothing Then
|
||||
' m_cmdVerify = New Command(AddressOf Verify)
|
||||
' End If
|
||||
' Return m_cmdVerify
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Verify()
|
||||
If (Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM))) OrElse
|
||||
(Map.refMainMenuVM.SelPage = Pages.MACHINING AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) OrElse
|
||||
@@ -768,25 +737,6 @@ Public Class CALCPanelVM
|
||||
Map.refMyStatusBarVM.SetOutputMessage(sProgress)
|
||||
End Sub
|
||||
|
||||
'#End Region ' Verify
|
||||
|
||||
'#Region "VerifyAll"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Open.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property VerifyAll_Command As ICommand
|
||||
' Get
|
||||
' If m_cmdVerifyAll Is Nothing Then
|
||||
' m_cmdVerifyAll = New Command(AddressOf VerifyAll)
|
||||
' End If
|
||||
' Return m_cmdVerifyAll
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub VerifyAll()
|
||||
If (Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM))) OrElse
|
||||
(Map.refMainMenuVM.SelPage = Pages.MACHINING AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) OrElse
|
||||
@@ -880,217 +830,9 @@ Public Class CALCPanelVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
'#End Region ' VerifyAll
|
||||
#End Region ' METHODS
|
||||
|
||||
'#Region "ResetCalc"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Exec.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property ResetCalc_Command As ICommand
|
||||
' Get
|
||||
' If m_cmdResetCalc Is Nothing Then
|
||||
' m_cmdResetCalc = New Command(AddressOf ResetCalc)
|
||||
' End If
|
||||
' Return m_cmdResetCalc
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub ResetCalc()
|
||||
' If (Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM))) OrElse
|
||||
' (Map.refMainMenuVM.SelPage = Pages.MACHINING AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) OrElse
|
||||
' (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM)) AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
|
||||
' If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso (Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART OrElse Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST)) Then
|
||||
' If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
' For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
' If Part.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' ' resetto stato dei calcoli
|
||||
' Part.ResetCalcTotalPart()
|
||||
' End If
|
||||
' Next
|
||||
' ElseIf Map.refProjectVM.BTLStructureVM.SelBTLPartsCnt > 1 Then
|
||||
' Else
|
||||
' Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
|
||||
' If IsNothing(SelPart) Then Return
|
||||
' If SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' SelPart.ResetCalcTotalPart()
|
||||
' End If
|
||||
' End If
|
||||
' ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING OrElse (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP) Then
|
||||
' If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
' For Each MachGroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
' If MachGroup.nProduction_State >= ItemState.Assigned Then Continue For
|
||||
' If MachGroup.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' MachGroup.ResetCalcTotalMachGroup()
|
||||
' End If
|
||||
' Next
|
||||
' Else
|
||||
' Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
' If IsNothing(SelMachGroup) Then Return
|
||||
' ' se barra gia' assegnata a supervisore, esco
|
||||
' If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
||||
' If SelMachGroup.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' SelMachGroup.ResetCalcTotalMachGroup()
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
'#End Region ' ResetCalc
|
||||
|
||||
'#Region "Simulate"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Open.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property Simulate_Command As ICommand
|
||||
' Get
|
||||
' If m_cmdSimulate Is Nothing Then
|
||||
' m_cmdSimulate = New Command(AddressOf Simulate)
|
||||
' End If
|
||||
' Return m_cmdSimulate
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
' ''' </summary>
|
||||
' Friend Sub Simulate()
|
||||
' If (Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM))) OrElse
|
||||
' (Map.refMainMenuVM.SelPage = Pages.MACHINING AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) OrElse
|
||||
' (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM)) AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
|
||||
' Dim ProjType As BWType
|
||||
' Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
|
||||
' If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' ProjType = ProjectManagerVM.CurrProj.nType
|
||||
' If Not CreateBarToSimulate(Pages.VIEW, ProjType, BarList) Then Return
|
||||
' ' lancio simulazione
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
' ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
' ProjType = ProjectManagerVM.CurrProd.nType
|
||||
' If Not CreateBarToSimulate(Pages.MACHINING, ProjType, BarList) Then Return
|
||||
' ' lancio simulazione
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
' ElseIf Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' ProjType = Map.refOnlyProdManagerVM.CurrProd.nType
|
||||
' If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then
|
||||
' If Not CreateBarToSimulate(Pages.VIEW, ProjType, BarList) Then Return
|
||||
' ' lancio simulazione
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
' ElseIf Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
|
||||
' If Not CreateBarToSimulate(Pages.MACHINING, ProjType, BarList) Then Return
|
||||
' ' lancio simulazione
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
' End If
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Private Function CreateBarToSimulate(SelPage As Pages, ProjType As BWType, ByRef BarList As Bar()) As Boolean
|
||||
' If SelPage = Pages.VIEW Then
|
||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
|
||||
' Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
|
||||
' Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId,
|
||||
' .nProgramPage = ProjectType.PROJ,
|
||||
' .nProjType = ProjType,
|
||||
' .bBarOk = True,
|
||||
' .nMachineName = Map.refMachinePanelVM.SelectedMachine.Name,
|
||||
' .nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
||||
' .nGlobState = Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState}
|
||||
' If Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState = CalcStates.NOTCALCULATED Then
|
||||
' Dim sBTLPartFilePath As String = ProjectManagerVM.CurrProj.sProjDirPath & "\" & Map.refProjectVM.BTLStructureVM.SelBTLPart.nPDN.ToString() & ".ori.bwe"
|
||||
' If File.Exists(sBTLPartFilePath) Then File.Delete(sBTLPartFilePath)
|
||||
' End If
|
||||
' TempBarList(0) = Bar
|
||||
' BarList = TempBarList
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' ' disabilito interfaccia
|
||||
' Map.refProjectVM.SetCalcRunning(True)
|
||||
' ElseIf SelPage = Pages.MACHINING Then
|
||||
' If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
|
||||
' Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
' Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
|
||||
' Dim MachineName As String = ""
|
||||
' EgtGetMachGroupMachineName(SelMachGroup.Id, MachineName)
|
||||
' Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = SelMachGroup.Id,
|
||||
' .nProgramPage = ProjectType.PROD,
|
||||
' .nProjType = ProjType,
|
||||
' .bBarOk = True,
|
||||
' .nMachineName = MachineName,
|
||||
' .nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
||||
' .nGlobState = SelMachGroup.nGlobalState}
|
||||
' If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then
|
||||
' Dim sMachGroupFilePath As String = ProjectManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe"
|
||||
' If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath)
|
||||
' End If
|
||||
' TempBarList(0) = Bar
|
||||
' BarList = TempBarList
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' ' disabilito interfaccia
|
||||
' Map.refProjectVM.SetCalcRunning(True)
|
||||
' End If
|
||||
' Return True
|
||||
' End Function
|
||||
|
||||
'#End Region ' Simulate
|
||||
|
||||
'#Region "Edit"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Open.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property Edit_Command As ICommand
|
||||
' Get
|
||||
' If m_cmdEdit Is Nothing Then
|
||||
' m_cmdEdit = New Command(AddressOf Edit)
|
||||
' End If
|
||||
' Return m_cmdEdit
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
' ''' </summary>
|
||||
' Friend Sub Edit()
|
||||
' If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM)) Then Return
|
||||
' Dim ProjType As BWType
|
||||
' If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' ProjType = ProjectManagerVM.CurrProj.nType
|
||||
' Else
|
||||
' ProjType = ProjectManagerVM.CurrProd.nType
|
||||
' End If
|
||||
' Dim BarList() As EgtBEAMWALL.Core.Bar
|
||||
' If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
|
||||
' ' salvo il progetto prima di editarlo
|
||||
' Map.refProjManagerVM.Save()
|
||||
' Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
|
||||
' Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId,
|
||||
' .nProgramPage = ProjectType.PROJ,
|
||||
' .nProjType = ProjType,
|
||||
' .bBarOk = True,
|
||||
' .nMachineName = Map.refMachinePanelVM.SelectedMachine.Name,
|
||||
' .nCmdType = CalcIntegration.CmdTypes.EDIT,
|
||||
' .nGlobState = Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState}
|
||||
' TempBarList(0) = Bar
|
||||
' BarList = TempBarList
|
||||
' Else
|
||||
' Return
|
||||
' End If
|
||||
' ' disabilito interfaccia
|
||||
' Map.refProjectVM.SetCalcRunning(True)
|
||||
' ' lancio edit
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
'#End Region ' Edit
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ChooseMachine"
|
||||
|
||||
|
||||
@@ -4,37 +4,6 @@
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Style="{StaticResource OnlyProdPartManager_StackPanel}">
|
||||
|
||||
<!--<Button ToolTip="{Binding Verify_ToolTip}"
|
||||
Command="{Binding Verify_Command}"
|
||||
IsEnabled="{Binding Verify_IsEnabled}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/CALCPanel/Verify.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding VerifyAll_ToolTip}"
|
||||
Command="{Binding VerifyAll_Command}"
|
||||
IsEnabled="{Binding VerifyAll_IsEnabled}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/CALCPanel/VerifyAll.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<!--<Button Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<!--<Button ToolTip="{Binding Simulate_ToolTip}"
|
||||
Command="{Binding Simulate_Command}"
|
||||
IsEnabled="{Binding Simulate_IsEnabled}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<!--<Button ToolTip="{Binding Edit_ToolTip}"
|
||||
Command="{Binding Edit_Command}"
|
||||
IsEnabled="{Binding Edit_IsEnabled}"
|
||||
Visibility="{Binding Edit_Visibility}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
|
||||
Command="{Binding ChooseMachine_Command}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
|
||||
@@ -294,31 +294,6 @@ Public Class ConfigurationPageVM
|
||||
NotifyPropertyChanged(NameOf(MachineParameter_Visibility))
|
||||
End Sub
|
||||
|
||||
'' Lista delle versioni del programma
|
||||
'Private m_ProgramVersionList As New List(Of DTO.ReleaseDTO)
|
||||
'Public ReadOnly Property ProgramVersionList As List(Of DTO.ReleaseDTO)
|
||||
' Get
|
||||
' Return m_ProgramVersionList
|
||||
' End Get
|
||||
'End Property
|
||||
'Friend Sub SetProgramVersionList(value As List(Of DTO.ReleaseDTO))
|
||||
' m_ProgramVersionList = value
|
||||
' NotifyPropertyChanged(NameOf(ProgramVersionList))
|
||||
'End Sub
|
||||
|
||||
'' Item selezionato dalla lista delle versioni del programma
|
||||
'Private m_ProgramVersionListItem As DTO.ReleaseDTO
|
||||
'Public Property ProgramVersionListItem As DTO.ReleaseDTO
|
||||
' Get
|
||||
' Return m_ProgramVersionListItem
|
||||
' End Get
|
||||
' Set(value As DTO.ReleaseDTO)
|
||||
' m_ProgramVersionListItem = value
|
||||
' If Not IsNothing(m_ProgramVersionListItem) Then SetLinkVersionView(m_ProgramVersionListItem.UrlChangelog)
|
||||
' NotifyPropertyChanged(NameOf(ProgramVersionListItem))
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
' Link della versione del programma
|
||||
Private m_LinkVersionView As String
|
||||
Public ReadOnly Property LinkVersionView As String
|
||||
@@ -753,8 +728,6 @@ Public Class ConfigurationPageVM
|
||||
Friend Sub VerifyConfigPageModification()
|
||||
Dim bExitFor = False
|
||||
Select Case m_SelConfigSubPage
|
||||
'Case ConfigSubPages.STRATEGYMANAGER
|
||||
' Map.refStrategyManagerVM.CreateCustumerConfigJsonFile()
|
||||
Case ConfigSubPages.GENERAL
|
||||
' aggiorno tutti i valori senza verificare modifiche
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
||||
@@ -762,40 +735,6 @@ Public Class ConfigurationPageVM
|
||||
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
||||
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||
WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0))
|
||||
'Case ConfigSubPages.QPARAMETERS
|
||||
' ' ciclo sui parametri Q
|
||||
' Dim bAskToSaveDefaultValues As Boolean = False
|
||||
' For Each PRCItem In PRCList
|
||||
' For Each QParam In PRCItem.QBTLParamVMList
|
||||
' If QParam.bIsModified Then
|
||||
' bAskToSaveDefaultValues = True
|
||||
' ' esco dai For
|
||||
' bExitFor = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' If bExitFor Then Exit For
|
||||
' Next
|
||||
' ' se nel ciclo è stato trovato almeno un valore modificato chiedo il salvataggio
|
||||
' If bAskToSaveDefaultValues Then
|
||||
' If MessageBox.Show(EgtMsg(61861), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' ' se si è scelto di salvare i valori li scrivo
|
||||
' WriteProcessParams(PRCList.ToList())
|
||||
' m_QParametersModified = True
|
||||
' End If
|
||||
' ' in ogni caso ricarico i valori (in modo da resettare i flag di modifica)
|
||||
' GetQParamsList()
|
||||
' ' carico la lista di tutti i parametri Q ciclando su ogni Process di PRCList
|
||||
' If Not IsNothing(QBTLParamVMList) Then
|
||||
' QBTLParamVMList.Clear()
|
||||
' End If
|
||||
' For Each PRCItem In PRCList
|
||||
' For Each QBTLParam In PRCItem.QBTLParamVMList
|
||||
' QBTLParamVMList.Add(QBTLParam)
|
||||
' Next
|
||||
' Next
|
||||
' NotifyPropertyChanged(NameOf(QBTLParamVMList))
|
||||
' End If
|
||||
Case ConfigSubPages.MACHINE
|
||||
' ciclo sui parametri Macchina
|
||||
For Each MachTableItem In ConfigMachTableList
|
||||
@@ -1273,66 +1212,6 @@ Public Class ConfigurationPageVM
|
||||
|
||||
#End Region ' Restore
|
||||
|
||||
'#Region "GetAllReleaseCommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Comando che restituisce tutte le versioni del programma
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property GetAllReleaseCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdGetAllRelease Is Nothing Then
|
||||
' m_cmdGetAllRelease = New Command(AddressOf GetAllRelease)
|
||||
' End If
|
||||
' Return m_cmdGetAllRelease
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Funzione che restituisce tutte le versioni del programma
|
||||
' ''' </summary>
|
||||
' Public Async Sub GetAllRelease()
|
||||
' Dim bOk As Boolean = EgtBEAMWALL.Core.Configuration.GetComunication()
|
||||
' ' Controllo se la comunicazione è avvenuta con successo
|
||||
' If bOk Then
|
||||
' ' Setto la datagrid visibile
|
||||
' SetProgramVersionListVisibility(Visibility.Visible)
|
||||
' ' Recupero la lista di tutte le versioni del programma
|
||||
' SetProgramVersionList(Await EgtBEAMWALL.Core.Configuration.m_commLib.ReleaseGetAllAsync(K_BEAMWALL))
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
'#End Region ' ReleaseCommand
|
||||
|
||||
'#Region "GetVersionFromCommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Comando che restituisce le versioni del programma filtrate
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property GetVersionFromCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdGetVersionFrom Is Nothing Then
|
||||
' m_cmdGetVersionFrom = New Command(AddressOf GetVersionFrom)
|
||||
' End If
|
||||
' Return m_cmdGetVersionFrom
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Funzione che restituisce le versioni del programma filtrate
|
||||
' ''' </summary>
|
||||
' Public Async Sub GetVersionFrom()
|
||||
' Dim bOk As Boolean = EgtBEAMWALL.Core.Configuration.GetComunication()
|
||||
' ' Controllo se la comunicazione è avvenuta con successo
|
||||
' If bOk Then
|
||||
' ' Setto la datagrid visibile
|
||||
' SetProgramVersionListVisibility(Visibility.Visible)
|
||||
' ' Recupero la lista delle versioni del programma filtrate per quella attuale
|
||||
' SetProgramVersionList(Await EgtBEAMWALL.Core.Configuration.m_commLib.ReleaseGetFiltLimitAsync(K_BEAMWALL, EgtBEAMWALL.Core.Configuration.ActualVersion, "2.5.15.0"))
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
'#End Region ' ReleaseCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
@@ -1531,26 +1410,4 @@ Public Enum MachParamType As Integer
|
||||
COMBO = 3
|
||||
LENGTH = 4
|
||||
CHECKBOX = 5
|
||||
End Enum
|
||||
|
||||
' Converte il parametro isPermitted
|
||||
'Public Class IsPermittedConverter
|
||||
' Implements IValueConverter
|
||||
|
||||
' Public Function Convert(value As Object, targetType As System.Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||
' Dim isPermitted As DTO.ReleaseDTO = TryCast(value, DTO.ReleaseDTO)
|
||||
' Select Case isPermitted.IsPermitted
|
||||
' Case 0
|
||||
' Return "Versione Acquistata"
|
||||
' Case 1
|
||||
' Return "Versione da Acquistare"
|
||||
' Case Else
|
||||
' Return Nothing
|
||||
' End Select
|
||||
' Return Nothing
|
||||
' End Function
|
||||
|
||||
' Public Function ConvertBack(value As Object, targetType As System.Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
' Throw New NotImplementedException()
|
||||
' End Function
|
||||
'End Class
|
||||
End Enum
|
||||
@@ -19,16 +19,9 @@
|
||||
Style="{StaticResource OnlyProd_TabControl}">
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="{Binding Strategy_Msg}"
|
||||
FontSize="15"/>
|
||||
<!--<Button Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding StrategyManager_Visibility}"
|
||||
Style="{StaticResource SaveOptionPanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding Strategy_Msg}"
|
||||
FontSize="15"
|
||||
Margin="5"/>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<EgtBEAMWALL:StrategyManagerV DataContext="{StaticResource StrategyManagerVM}"/>
|
||||
@@ -51,23 +44,6 @@
|
||||
<EgtBEAMWALLCORE:OnlyProdGeneral_ConfigurationPageV/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<!--<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="{Binding ParameterQ_Msg}"
|
||||
FontSize="15"/>
|
||||
<Button Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding ParameterQ_Visibility}"
|
||||
Style="{StaticResource SaveOptionPanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<EgtBEAMWALLCORE:OnlyProdQParameter_ConfigurationPageV/>
|
||||
</TabItem.Content>
|
||||
</TabItem>-->
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
@@ -96,17 +72,6 @@
|
||||
<EgtBEAMWALL:OnlyProdPDFEditorV/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<!--<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="{Binding CtrlVersion_Msg}"
|
||||
FontSize="15"/>
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<EgtBEAMWALL:OnlyProdCheckVersionV/>
|
||||
</TabItem.Content>
|
||||
</TabItem>-->
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
|
||||
@@ -178,9 +178,6 @@
|
||||
<Compile Include="ProjectTypeWnd\OnlyProdProjectTypeWndV.xaml.vb">
|
||||
<DependentUpon>OnlyProdProjectTypeWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectTypeWnd\ProjectTypeWndV.xaml.vb">
|
||||
<DependentUpon>ProjectTypeWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectTypeWnd\ProjectTypeWndVM.vb" />
|
||||
<Compile Include="Project\ProjectVM.vb" />
|
||||
<Compile Include="RawPartManager\OnlyProdRawPartManagerV.xaml.vb">
|
||||
@@ -198,9 +195,6 @@
|
||||
<Compile Include="SceneHost\SceneHostV.xaml.vb">
|
||||
<DependentUpon>SceneHostV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SceneShowBulding\SceneShowBuldingV.xaml.vb">
|
||||
<DependentUpon>SceneShowBuldingV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SetUp\SetUpSupportClass.vb" />
|
||||
<Compile Include="SetUp\SetUpV.xaml.vb">
|
||||
<DependentUpon>SetUpV.xaml</DependentUpon>
|
||||
@@ -670,10 +664,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ProjectTypeWnd\ProjectTypeWndV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="RawPartManager\OnlyProdRawPartManagerV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -690,10 +680,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SceneShowBulding\SceneShowBuldingV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="SetUp\SetUpV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class FeatureManagerVM
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -55,9 +54,6 @@
|
||||
<Optmizer:ParameterStrategyV Tag="{Binding SelStrategy}"/>
|
||||
</GroupBox>
|
||||
|
||||
<!--<StackPanel Grid.Row="1"
|
||||
Grid.Column="2"/>-->
|
||||
|
||||
<StackPanel Grid.Row="2"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Right"
|
||||
|
||||
@@ -18,24 +18,6 @@ Public Class MyInstrumentPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Statistic_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.MACHINING, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property VisStatistic_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OtStatistic_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_InstrumentPanel_IsEnabled As Boolean = True
|
||||
Public Property InstrumentPanel_IsEnabled As Boolean
|
||||
Get
|
||||
@@ -46,83 +28,6 @@ Public Class MyInstrumentPanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Statistics_IsEnabled As Boolean = True
|
||||
Public Property Statistics_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_Statistics_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_Statistics_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' flag per verificare se è stato selezionato il pulsante VIS o OTT se 0 = VIS se 1 = OTT
|
||||
Private m_bVisOtt_Selected As Boolean = False
|
||||
Public Property bVisOtt_Selected As Boolean
|
||||
Get
|
||||
Return m_bVisOtt_Selected
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bVisOtt_Selected = value
|
||||
NotifyPropertyChanged(NameOf(bVisOtt_Selected))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Dim m_PrevBottomPanelPage As BottomPanelVM.PartFeatureTab = BottomPanelVM.PartFeatureTab.STRUCTURE_
|
||||
Private m_Statistics_IsChecked As Boolean = False
|
||||
Public Property Statistics_IsChecked As Boolean
|
||||
Get
|
||||
Return m_Statistics_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_Statistics_IsChecked = value
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
If value Then
|
||||
'' salvo pagina precedente
|
||||
'm_PrevBottomPanelPage = Map.refBottomPanelVM.SelPartFeatureTab
|
||||
' aggiorno valori totali
|
||||
Map.refProjectVM.BTLStructureVM.CalcGlobalUpdate()
|
||||
'' seleziono pagina Statistics
|
||||
'Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.STATISTICS)
|
||||
Else
|
||||
'' seleziono pagina precedente
|
||||
'Map.refBottomPanelVM.SetSelPartFeatureTab(m_PrevBottomPanelPage)
|
||||
End If
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
If value Then
|
||||
' aggiorno valori totali
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.MachGroupPanelVM.CalcGlobalUpdate()
|
||||
' aggiorno conto materiali usati
|
||||
If Not IsNothing(ProjectManagerVM.CurrProd) Then Map.refStatisticsVM.LoadRawPart()
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetStatisticsIsChecked(value As Boolean)
|
||||
m_Statistics_IsChecked = value
|
||||
NotifyPropertyChanged(NameOf(Statistics_IsChecked))
|
||||
End Sub
|
||||
|
||||
Private m_VisStatistic_IsEnabled As Boolean = True
|
||||
Public Property VisStatistic_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_VisStatistic_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_VisStatistic_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_OtStatistic_IsEnabled As Boolean = True
|
||||
Public Property OtStatistic_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_OtStatistic_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_OtStatistic_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdData As ICommand
|
||||
Private m_cmdChangeParameter As ICommand
|
||||
@@ -145,12 +50,6 @@ Public Class MyInstrumentPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Statistics_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61923)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
@@ -173,28 +72,9 @@ Public Class MyInstrumentPanelVM
|
||||
GetDistIsChecked = bIsChecked
|
||||
End Sub
|
||||
|
||||
Friend Sub ResetStatisticsIsChecked()
|
||||
If Statistics_IsChecked Then
|
||||
Statistics_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(Statistics_IsChecked))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub SetInstrumentPanelIsEnabled(bIsEnabled As Boolean)
|
||||
m_InstrumentPanel_IsEnabled = bIsEnabled
|
||||
NotifyPropertyChanged(NameOf(InstrumentPanel_IsEnabled))
|
||||
If Map.refFreeContourManagerVM.bIsActive Then
|
||||
m_Statistics_IsEnabled = bIsEnabled
|
||||
m_VisStatistic_IsEnabled = bIsEnabled
|
||||
m_OtStatistic_IsEnabled = bIsEnabled
|
||||
Else
|
||||
m_Statistics_IsEnabled = True
|
||||
m_VisStatistic_IsEnabled = True
|
||||
m_OtStatistic_IsEnabled = True
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(Statistics_IsEnabled))
|
||||
NotifyPropertyChanged(NameOf(VisStatistic_IsEnabled))
|
||||
NotifyPropertyChanged(NameOf(OtStatistic_IsEnabled))
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
@@ -296,56 +176,6 @@ Public Class MyInstrumentPanelVM
|
||||
|
||||
#End Region ' ChangeMaterial
|
||||
|
||||
#Region "Visualization"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Open.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Visualization_Command As ICommand
|
||||
Get
|
||||
If m_cmdVisualization Is Nothing Then
|
||||
m_cmdVisualization = New Command(AddressOf Visualization)
|
||||
End If
|
||||
Return m_cmdVisualization
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Visualization()
|
||||
m_bVisOtt_Selected = False
|
||||
Dim StatisticsWndV As New OptimizerStatisticsWndV(Application.Current.MainWindow, New StatisticsVM())
|
||||
StatisticsWndV.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' Visualization
|
||||
|
||||
#Region "Ottimization"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Open.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Optimizer_Command As ICommand
|
||||
Get
|
||||
If m_cmdOptimizer Is Nothing Then
|
||||
m_cmdOptimizer = New Command(AddressOf Optimizer)
|
||||
End If
|
||||
Return m_cmdOptimizer
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Optimizer()
|
||||
m_bVisOtt_Selected = True
|
||||
Dim OptimizerStatisticsWndV As New OptimizerStatisticsWndV(Application.Current.MainWindow, New StatisticsVM())
|
||||
OptimizerStatisticsWndV.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' Ottimization
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -26,28 +26,4 @@
|
||||
FontSize="12"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}"/>
|
||||
|
||||
<!--<ToggleButton ToolTip="{Binding Statistics_Msg}"
|
||||
Visibility="{Binding Statistic_Visibility}"
|
||||
IsChecked="{Binding Statistics_IsChecked}"
|
||||
IsEnabled="{Binding Statistics_IsEnabled}"
|
||||
Style="{StaticResource ToolBarOnlyProdPage_ToggleButton}">
|
||||
<Image Source="/Resources/InstrumentPanel/Statistics.png" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
|
||||
<Button Command="{Binding Visualization_Command}"
|
||||
ToolTip="{Binding Statistics_Msg}"
|
||||
Visibility="{Binding VisStatistic_Visibility}"
|
||||
IsEnabled="{Binding VisStatistic_IsEnabled}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/InstrumentPanel/Vis.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Button Command="{Binding Optimizer_Command}"
|
||||
ToolTip="{Binding Statistics_Msg}"
|
||||
Visibility="{Binding OtStatistic_Visibility}"
|
||||
IsEnabled="{Binding OtStatistic_IsEnabled}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/InstrumentPanel/Ott.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -107,9 +107,6 @@
|
||||
<DataGrid.Resources>
|
||||
<!--PDN - Nome-->
|
||||
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -133,20 +130,6 @@
|
||||
<Border Grid.Column="1"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding Calc_BorderBrush}">
|
||||
<!--<ItemsControl ItemsSource="{Binding BTLFeatureVMList_View}"
|
||||
Style="{StaticResource CALC_FALL_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="6" Rows="5"
|
||||
Margin="0"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Background="{Binding Calc_Background}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>-->
|
||||
</Border>
|
||||
<Grid Grid.Column="2"
|
||||
HorizontalAlignment="Center">
|
||||
@@ -186,9 +169,6 @@
|
||||
</DataGridTemplateColumn>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}" SortMemberPath="dW">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -197,9 +177,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--H - Altezza-->
|
||||
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}" SortMemberPath="dH">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -208,9 +185,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}" SortMemberPath="dL">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -219,9 +193,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--NAM - Descrizione-->
|
||||
<DataGridTextColumn x:Key="colNAM" Binding="{Binding sNAM}">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -230,9 +201,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -241,10 +209,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--CNT - Richiesti da BTL-->
|
||||
<DataGridTextColumn x:Key="colCNT" Binding="{Binding sCNT}" SortMemberPath="nCNT">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.ShortCNT_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
|
||||
ToolTip="{Binding Path=DataContext.CNT_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="QTY"
|
||||
@@ -254,10 +218,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--ADDED - Aggiunti-->
|
||||
<DataGridTextColumn x:Key="colADDED" Binding="{Binding sADDED}" SortMemberPath="nADDED">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.ShortADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
|
||||
ToolTip="{Binding Path=DataContext.ADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.ShortADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
@@ -272,10 +232,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--INPROD - IN OTTIMIZZAZIONE-->
|
||||
<DataGridTextColumn x:Key="colINPROD" Binding="{Binding nINPROD}">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.ShortINPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
|
||||
ToolTip="{Binding Path=DataContext.INPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.ShortINPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
@@ -285,10 +241,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--DONE - PRODOTTI-->
|
||||
<DataGridTextColumn x:Key="colDONE" Binding="{Binding nDONE}">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.ShortDONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
|
||||
ToolTip="{Binding Path=DataContext.DONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.ShortDONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
@@ -298,9 +250,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--GRP - Gruppo-->
|
||||
<DataGridTextColumn x:Key="colGROUP" Binding="{Binding sGROUP}">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.GRP_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.GRP_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -309,9 +258,6 @@
|
||||
</DataGridTextColumn>
|
||||
<!--STOREY - Sottogruppo-->
|
||||
<DataGridTextColumn x:Key="colSTOREY" Binding="{Binding sSTOREY}">
|
||||
<!--<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.STOREY_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>-->
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.STOREY_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
|
||||
@@ -58,12 +58,6 @@ Public Class LeftPanelVM
|
||||
NotifyPropertyChanged(NameOf(IsFilterBtnOpen))
|
||||
End Sub
|
||||
|
||||
'Public ReadOnly Property RotatePart_IsEnabled As Boolean
|
||||
' Get
|
||||
' Return Not IsNothing(Map.refProjectVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 1
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdVerifyAll As ICommand
|
||||
Private m_cmdShowPopUpFilterBtnCmd As ICommand
|
||||
@@ -207,33 +201,13 @@ Public Class LeftPanelVM
|
||||
' se modalita' assemblato
|
||||
Configuration.AssembledMode(Map.refShowBeamPanelVM.ShowBuilding_IsChecked)
|
||||
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
|
||||
Dim ProjType As BWType
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' ProjType = ProjectManagerVM.CurrProj.nType
|
||||
' If Not CreateBarListToVerify(Pages.VIEW, ProjType, BarList) Then Return
|
||||
' ' lancio calcolo
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
'ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
' ProjType = ProjectManagerVM.CurrProd.nType
|
||||
' If Not CreateBarListToVerify(Pages.MACHINING, ProjType, BarList) Then Return
|
||||
' ' lancio calcolo
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
'ElseIf Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
ProjType = ProjectManagerVM.CurrProd.nType
|
||||
'If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART OrElse Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST Then
|
||||
Dim ProjType As BWType = ProjectManagerVM.CurrProd.nType
|
||||
If Not CreateBarListToVerify(ProjType, BarList) Then Return
|
||||
' lancio calcolo
|
||||
EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
'ElseIf Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
|
||||
' If Not CreateBarListToVerify(Pages.MACHINING, ProjType, BarList) Then Return
|
||||
' ' lancio calcolo
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
'End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Function CreateBarListToVerify(ProjType As BWType, ByRef BarList As Bar()) As Boolean
|
||||
'If SelPage = Pages.VIEW Then
|
||||
Dim TempBarList As New List(Of EgtBEAMWALL.Core.Bar)
|
||||
For PartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Dim CurrPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList(PartIndex)
|
||||
@@ -252,7 +226,6 @@ Public Class LeftPanelVM
|
||||
Dim sBTLPartFilePath As String = ProjectManagerVM.CurrProj.sProjDirPath & "\" & CurrPart.nPDN.ToString() & ".ori.bwe"
|
||||
If File.Exists(sBTLPartFilePath) Then File.Delete(sBTLPartFilePath)
|
||||
End If
|
||||
'Bar.nCmdType = CalcIntegration.CmdTypes.CHECKGEN
|
||||
Bar.nCmdType = CalcIntegration.CmdTypes.CHECKNOSIM
|
||||
End Select
|
||||
TempBarList.Add(Bar)
|
||||
@@ -260,37 +233,6 @@ Public Class LeftPanelVM
|
||||
BarList = TempBarList.ToArray()
|
||||
' disabilito interfaccia
|
||||
Map.refProjectVM.SetCalcRunning(True)
|
||||
'ElseIf SelPage = Pages.MACHINING Then
|
||||
' Dim TempBarList As New List(Of EgtBEAMWALL.Core.Bar)
|
||||
' For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1
|
||||
' Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(PartIndex)
|
||||
' ' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
|
||||
' If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Continue For
|
||||
' Dim MachineName As String = ""
|
||||
' EgtGetMachGroupMachineName(CurrMachGroup.Id, MachineName)
|
||||
' Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = CurrMachGroup.Id,
|
||||
' .nProgramPage = ProjectType.PROD,
|
||||
' .nProjType = ProjType,
|
||||
' .bBarOk = True,
|
||||
' .nMachineName = MachineName,
|
||||
' .nGlobState = CurrMachGroup.nGlobalState}
|
||||
' Select Case CurrMachGroup.nGlobalState
|
||||
' Case Core.CalcStates.OK, CalcStates.INFO
|
||||
' Bar.nCmdType = CalcIntegration.CmdTypes.GENERATE
|
||||
' Case Else
|
||||
' If CurrMachGroup.nGlobalState = CalcStates.NOTCALCULATED OrElse (CurrMachGroup.nPartsGlobalState > CalcStates.INFO) Then
|
||||
' Dim sMachGroupFilePath As String = ProjectManagerVM.CurrProd.sProdDirPath & "\" & CurrMachGroup.Name.ToString() & ".ori.bwe"
|
||||
' If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath)
|
||||
' End If
|
||||
' Bar.nCmdType = CalcIntegration.CmdTypes.CHECKGEN
|
||||
' End Select
|
||||
' TempBarList.Add(Bar)
|
||||
' Next
|
||||
' If TempBarList.Count = 0 Then Return False
|
||||
' BarList = TempBarList.ToArray()
|
||||
' ' disabilito interfaccia
|
||||
' Map.refProjectVM.SetCalcRunning(True)
|
||||
'End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -16,69 +16,32 @@ Public Class MyMachGroupPanelVM
|
||||
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
|
||||
' se modalita' assemblato
|
||||
Configuration.AssembledMode(Map.refShowBeamPanelVM.ShowBuilding_IsChecked)
|
||||
' se precedente pezzo selezionato
|
||||
If Not IsNothing(value) AndAlso Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART AndAlso Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
|
||||
Dim SelBTLPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLParts(0)
|
||||
' deseleziono pezzo in lista BTLPart
|
||||
For BTLPartIndex = Map.refProjectVM.BTLStructureVM.SelBTLParts.Count - 1 To 0 Step -1
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLParts.RemoveFromList(Map.refProjectVM.BTLStructureVM.SelBTLParts(BTLPartIndex))
|
||||
Next
|
||||
' e lo evidenzio
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
Else
|
||||
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.HIGHLIGHT)
|
||||
End If
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLParts.Add(SelBTLPart)
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
Map.refShowBeamPanelVM.SetShowBuilding(False)
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
Next
|
||||
End If
|
||||
|
||||
If Map.refMainMenuVM.SelPage <> Pages.ONLYPRODPAGE Then Map.refShowBeamPanelVM.bShowAll = False
|
||||
|
||||
m_SelectedMachGroup = value
|
||||
If Not IsNothing(value) Then
|
||||
OnPreSetCurrMachGroup()
|
||||
EgtSetCurrMachGroup(value.Id)
|
||||
OnPostSetCurrMachGroup()
|
||||
Map.refStatisticsTimePanelVM.SetMachiningPage_Visibility(Visibility.Visible)
|
||||
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)
|
||||
'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)
|
||||
Else
|
||||
Map.refCALCPanelVM.SetCalcPanelIsEnabled(True)
|
||||
End If
|
||||
' se modalità building, la tolgo
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
Map.refShowBeamPanelVM.SetShowBuilding(False)
|
||||
EgtDraw()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
@@ -20,50 +20,51 @@ Public Class MyMachGroupVM
|
||||
Return m_SelPart
|
||||
End Get
|
||||
Set(value As Core.PartVM)
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' mostro pezzi selezionati
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
' se pezzo evidenziato da ultima selezione precedente
|
||||
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST AndAlso Map.refProjectVM.BTLStructureVM.SelBTLParts.Count = 1 Then
|
||||
Dim nSelBTLPartId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLParts(0).nPartId
|
||||
' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
Configuration.ResetSearchPiece(nSelBTLPartId)
|
||||
End If
|
||||
If Not IsNothing(m_SelPart) Then
|
||||
' deevidenzio BTLPart di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
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
|
||||
' mostro pezzi selezionati
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
' se pezzo evidenziato da ultima selezione precedente
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count = 1 Then
|
||||
' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
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) = Map.refProjectVM.BTLStructureVM.SelBTLParts(0).nPartId Then
|
||||
Part.ResetSearchFound()
|
||||
bFound = True
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
Map.refProjectVM.SetFeatureListVisibility(False)
|
||||
If bFound Then
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' se modalita' assemblato
|
||||
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
|
||||
If Not IsNothing(m_SelPart) Then
|
||||
' deevidenzio BTLPart di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
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
|
||||
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
|
||||
m_SelPart = value
|
||||
' seleziono pezzo
|
||||
EgtDeselectAll()
|
||||
If Not IsNothing(value) Then
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
'' deseleziono pezzo in lista BTLPart
|
||||
'For BTLPartIndex = Map.refProjectVM.BTLStructureVM.SelBTLParts.Count - 1 To 0 Step -1
|
||||
' Map.refProjectVM.BTLStructureVM.SelBTLParts.RemoveFromList(Map.refProjectVM.BTLStructureVM.SelBTLParts(BTLPartIndex))
|
||||
'Next
|
||||
Map.refProjectVM.SetFeatureListVisibility(True)
|
||||
End If
|
||||
Map.refProjectVM.SetFeatureListVisibility(True)
|
||||
EgtSelectObj(SelPart.nPartId)
|
||||
If Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
DirectCast(m_SelPart, PartVM).SelectBTLPart()
|
||||
End If
|
||||
' trovo ed evidenzio BTLPart di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
@@ -81,6 +82,7 @@ Public Class MyMachGroupVM
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
Map.refShowBeamPanelVM.SetShowBuilding(False)
|
||||
Map.refProjectVM.BTLStructureVM.SceneSelPartSelection()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -900,12 +902,6 @@ Public Class MyMachGroupVM
|
||||
|
||||
#End Region ' Parts
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeleteMachGroup"
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Overrides Sub DeleteMachGroup(Optional bMultipleCommand As Boolean = False)
|
||||
If EgtSetCurrMachGroup(Me.Id) Then
|
||||
@@ -961,7 +957,9 @@ Public Class MyMachGroupVM
|
||||
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteMachGroup
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ShowPopUpSettingBtnCommand"
|
||||
|
||||
@@ -1089,44 +1087,12 @@ Public Class MyMachGroupVM
|
||||
Dim ProjType As BWType
|
||||
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
|
||||
ProjType = Map.refOnlyProdManagerVM.CurrProd.nType
|
||||
'If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then
|
||||
' If Not CreateBarToSimulate(Pages.VIEW, ProjType, BarList) Then Return
|
||||
' ' lancio simulazione
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
'ElseIf Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
|
||||
' If Not CreateBarToSimulate(Pages.MACHINING, ProjType, BarList) Then Return
|
||||
' ' lancio simulazione
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
'End If
|
||||
If Not CreateBarToSimulate(ProjType, BarList) Then Return
|
||||
' lancio simulazione
|
||||
EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function CreateBarToSimulate(ProjType As BWType, ByRef BarList As Bar()) As Boolean
|
||||
'If SelPage = Pages.VIEW Then
|
||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
|
||||
' Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
|
||||
' Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId,
|
||||
' .nProgramPage = ProjectType.PROJ,
|
||||
' .nProjType = ProjType,
|
||||
' .bBarOk = True,
|
||||
' .nMachineName = Map.refMachinePanelVM.SelectedMachine.Name,
|
||||
' .nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
||||
' .nGlobState = Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState}
|
||||
' If Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState = CalcStates.NOTCALCULATED Then
|
||||
' Dim sBTLPartFilePath As String = ProjectManagerVM.CurrProj.sProjDirPath & "\" & Map.refProjectVM.BTLStructureVM.SelBTLPart.nPDN.ToString() & ".ori.bwe"
|
||||
' If File.Exists(sBTLPartFilePath) Then File.Delete(sBTLPartFilePath)
|
||||
' End If
|
||||
' TempBarList(0) = Bar
|
||||
' BarList = TempBarList
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' ' disabilito interfaccia
|
||||
' Map.refProjectVM.SetCalcRunning(True)
|
||||
'ElseIf SelPage = Pages.MACHINING Then
|
||||
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
|
||||
@@ -1389,31 +1355,6 @@ Public Class MyMachGroupVM
|
||||
''' </summary>
|
||||
Public Sub ResetCalc()
|
||||
If (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM)) AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso (Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART OrElse Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST)) Then
|
||||
' If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
' For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
' If Part.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' ' resetto stato dei calcoli
|
||||
' Part.ResetCalcTotalPart()
|
||||
' End If
|
||||
' Next
|
||||
' ElseIf Map.refProjectVM.BTLStructureVM.SelBTLPartsCnt > 1 Then
|
||||
' Else
|
||||
' Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
|
||||
' If IsNothing(SelPart) Then Return
|
||||
' If SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' SelPart.ResetCalcTotalPart()
|
||||
' End If
|
||||
' End If
|
||||
'ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING OrElse (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP) Then
|
||||
'If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
' For Each MachGroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
' If MachGroup.nProduction_State >= ItemState.Assigned Then Continue For
|
||||
' If MachGroup.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' MachGroup.ResetCalcTotalMachGroup()
|
||||
' End If
|
||||
' Next
|
||||
' Else
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
' se barra gia' assegnata a supervisore, esco
|
||||
@@ -1421,8 +1362,6 @@ Public Class MyMachGroupVM
|
||||
If SelMachGroup.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
SelMachGroup.ResetCalcTotalMachGroup()
|
||||
End If
|
||||
'End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ResetCalc
|
||||
|
||||
@@ -280,6 +280,8 @@ Public Class PartVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property MoveUpPart_ToolTip As String
|
||||
Get
|
||||
Return EgtMsg(61917)
|
||||
@@ -298,6 +300,8 @@ Public Class PartVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdBackRotation As ICommand
|
||||
Private m_cmdForwardRotation As ICommand
|
||||
@@ -494,6 +498,7 @@ Public Class PartVM
|
||||
nRawId = EgtGetFirstRawPart()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Friend Sub SelectBTLPart()
|
||||
' eseguo la selezione nella lista pezzi
|
||||
Dim nBTLPartId As Integer = MyMachGroupPanelM.DuploGetOriginal(nPartId)
|
||||
|
||||
@@ -29,36 +29,6 @@ Public Class MainMenuVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public Property View_IsChecked As Boolean
|
||||
' Get
|
||||
' Return m_SelPage = Pages.VIEW
|
||||
' End Get
|
||||
' Set(value As Boolean)
|
||||
' If value Then
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso Not IsNothing(ProjectManagerVM.CurrProd) AndAlso
|
||||
' ProjectManagerVM.CurrProj.nProdId = ProjectManagerVM.CurrProd.nProdId Then
|
||||
' ProjectManagerVM.CurrProj.SetReloadProject(False)
|
||||
' End If
|
||||
' SelPage = Pages.VIEW
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property Machining_IsChecked As Boolean
|
||||
' Get
|
||||
' Return m_SelPage = Pages.MACHINING
|
||||
' End Get
|
||||
' Set(value As Boolean)
|
||||
' If value Then
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso Not IsNothing(ProjectManagerVM.CurrProd) AndAlso
|
||||
' ProjectManagerVM.CurrProj.nProdId = ProjectManagerVM.CurrProd.nProdId Then
|
||||
' ProjectManagerVM.CurrProd.SetReloadProject(False)
|
||||
' End If
|
||||
' SelPage = Pages.MACHINING
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Public Property OnlyProdPage_IsChecked As Boolean
|
||||
Get
|
||||
Return m_SelPage = Pages.ONLYPRODPAGE
|
||||
@@ -109,10 +79,6 @@ 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.CONFIG
|
||||
bOk = ExitCONFIG()
|
||||
SetbOpenProject(True)
|
||||
@@ -123,10 +89,6 @@ Public Class MainMenuVM
|
||||
' Entro nel nuovo stato
|
||||
m_SelPage = Page
|
||||
Select Case m_SelPage
|
||||
'Case Pages.VIEW
|
||||
' InitVIEW()
|
||||
'Case Pages.MACHINING
|
||||
' InitMACHINING()
|
||||
Case Pages.CONFIG
|
||||
InitCONFIG()
|
||||
Case Pages.ONLYPRODPAGE
|
||||
@@ -134,8 +96,6 @@ Public Class MainMenuVM
|
||||
End Select
|
||||
End If
|
||||
' aggiorno visualizzazione RadioButton
|
||||
'NotifyPropertyChanged(NameOf(View_IsChecked))
|
||||
'NotifyPropertyChanged(NameOf(Machining_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(Supervisor_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(Config_IsChecked))
|
||||
NotifyPropertyChanged(NameOf(OnlyProdPage_IsChecked))
|
||||
@@ -147,22 +107,15 @@ Public Class MainMenuVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ViewOptimizer_Visibility As Visibility
|
||||
Private m_bOpenProject As Boolean = False
|
||||
Public ReadOnly Property bOpenProject As Boolean
|
||||
Get
|
||||
Return If(Map.refMainWindowVM.MainWindowM.bOnlyProd, Visibility.Collapsed, Visibility.Visible)
|
||||
Return bOpenProject
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Testo che mostra il numero di versioni da aggiornare
|
||||
Private m_NumVersion As Integer
|
||||
Public ReadOnly Property NumVersion As Integer
|
||||
Get
|
||||
Return m_NumVersion
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetNumVersion(value As Integer)
|
||||
m_NumVersion = value
|
||||
NotifyPropertyChanged(NameOf(NumVersion))
|
||||
Friend Sub SetbOpenProject(value As Boolean)
|
||||
m_bOpenProject = value
|
||||
NotifyPropertyChanged(NameOf(bOpenProject))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
@@ -233,8 +186,6 @@ Public Class MainMenuVM
|
||||
Else
|
||||
m_Supervisor_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
' imposto numero di versioni da aggiornare
|
||||
SetNumVersion(GetNumVersion())
|
||||
' imposto timer di apertura da ottimizzatore
|
||||
m_OpenPage_Timer.Interval = TimeSpan.FromMilliseconds(500)
|
||||
AddHandler m_OpenPage_Timer.Tick, AddressOf OpenPage_Tick
|
||||
@@ -245,319 +196,11 @@ Public Class MainMenuVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Funzione che restituisce il numero di versioni del programma che sono da aggiornare
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Friend Function GetNumVersion() As Integer
|
||||
'Dim bOk As Boolean = EgtBEAMWALL.Core.Configuration.GetComunication()
|
||||
'' Controllo se la comunicazione è avvenuta con successo
|
||||
'If bOk Then
|
||||
' ' Recupero la lista delle versioni del programma filtrate per quella attuale
|
||||
' Dim ReleaseList As List(Of DTO.ReleaseDTO) = EgtBEAMWALL.Core.Configuration.m_commLib.ReleaseGetFiltLimit(K_BEAMWALL, EgtBEAMWALL.Core.Configuration.ActualVersion, "2.5.15.0")
|
||||
' Return ReleaseList.Where(Function(r) r.IsPermitted).Count
|
||||
'Else
|
||||
' Return 0
|
||||
'End If
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
Friend Sub SetMainMenuIsEnabled(bIsEnabled As Boolean)
|
||||
m_MainMenu_IsEnabled = bIsEnabled
|
||||
NotifyPropertyChanged(NameOf(MainMenu_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private m_bOpenProject As Boolean = False
|
||||
Public ReadOnly Property bOpenProject As Boolean
|
||||
Get
|
||||
Return bOpenProject
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetbOpenProject(value As Boolean)
|
||||
m_bOpenProject = value
|
||||
NotifyPropertyChanged(NameOf(bOpenProject))
|
||||
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 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 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))
|
||||
Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
|
||||
@@ -685,9 +328,6 @@ Public Class MainMenuVM
|
||||
End If
|
||||
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||
Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
|
||||
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
|
||||
|
||||
@@ -699,7 +339,6 @@ Public Class MainMenuVM
|
||||
End If
|
||||
End If
|
||||
' resetto eventuale visualizzazione statistiche
|
||||
Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
|
||||
Map.refProjectVM.SetFeatureManager_Visibility(False)
|
||||
Map.refProjectVM.SetShowBeamPanel_Visibility(False)
|
||||
Map.refProjectVM.SetOnlyProdManager_Visibility(False)
|
||||
|
||||
@@ -38,16 +38,4 @@
|
||||
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}}}"/>-->
|
||||
|
||||
<!--<StackPanel Orientation="Horizontal" Margin="-130,0,0,0">
|
||||
<TextBlock Text="{Binding NVersion_Msg}"
|
||||
Style="{StaticResource OptionTextBlockVersion_OnlyProd}"/>
|
||||
<TextBlock Text="{Binding NumVersion}"
|
||||
Style="{StaticResource OptionTextBlockVersion_OnlyProd}"
|
||||
Margin="5,0,0,0"/>
|
||||
</StackPanel>-->
|
||||
</Grid>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtBEAMWALL.Core.ConstGen
|
||||
Imports EgtBEAMWALL.Core.ConstIni
|
||||
Imports EgtUILib
|
||||
@@ -88,33 +87,6 @@ Public Class MainWindowVM
|
||||
Public Sub UpdateTitle()
|
||||
m_Title = ""
|
||||
Select Case Map.refMainMenuVM.SelPage
|
||||
'Case Pages.VIEW
|
||||
' If GetMainPrivateProfileInt(S_GENERAL, K_PROJECTMODE, 0) = 1 Then
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProj) Then
|
||||
' If ProjectManagerVM.CurrProj.bIsNew Then m_Title = "New - "
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProj.nProdId) AndAlso ProjectManagerVM.CurrProj.nProdId > 0 Then
|
||||
' m_Title &= ProjectManagerVM.CurrProj.nProdId.ToString("0000") & " - "
|
||||
' End If
|
||||
' m_Title &= ProjectManagerVM.CurrProj.sBTLFileName
|
||||
' End If
|
||||
' Else
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProj) Then
|
||||
' If ProjectManagerVM.CurrProj.bIsNew Then m_Title = "New - "
|
||||
' m_Title &= ProjectManagerVM.CurrProj.nProjId.ToString("0000") & " - " & ProjectManagerVM.CurrProj.sBTLFileName
|
||||
' End If
|
||||
' End If
|
||||
'Case Pages.MACHINING
|
||||
' If GetMainPrivateProfileInt(S_GENERAL, K_PROJECTMODE, 0) = 1 Then
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProd) Then
|
||||
' If ProjectManagerVM.CurrProd.bIsNew Then m_Title = "New - "
|
||||
' m_Title &= ProjectManagerVM.CurrProd.nProdId.ToString("0000") & " - " & ProjectManagerVM.CurrProd.sName
|
||||
' End If
|
||||
' Else
|
||||
' If Not IsNothing(ProjectManagerVM.CurrProd) Then
|
||||
' If ProjectManagerVM.CurrProd.bIsNew Then m_Title = "New - "
|
||||
' m_Title &= ProjectManagerVM.CurrProd.nProdId.ToString("0000") & " - " & ProjectManagerVM.CurrProd.sBTLFileName
|
||||
' End If
|
||||
' End If
|
||||
Case Pages.CONFIG
|
||||
m_Title = "Configuration Page"
|
||||
Case Pages.ONLYPRODPAGE
|
||||
@@ -371,10 +343,6 @@ 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.CONFIG
|
||||
' Verifica modifica parametri Macchina e chiedo il salvataggio
|
||||
Map.refConfigurationPageVM.VerifyConfigPageModification()
|
||||
|
||||
@@ -99,10 +99,4 @@
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Popup>
|
||||
<!--<Button Command="{Binding GoToSupervisor_Command}"
|
||||
ToolTip="{Binding GoToSupervisor_ToolTip}"
|
||||
Visibility="{Binding GoToSupervisor_Visibility}"
|
||||
Style="{StaticResource ToolBarOnlyProdManagerGoToSupervisor_Button}">
|
||||
<Image Source="/Resources/ProjectManager/GoToProd.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
</StackPanel>
|
||||
|
||||
@@ -221,11 +221,6 @@ Public Class OnlyProdManagerVM
|
||||
Return EgtMsg(61838)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property GoToSupervisor_ToolTip As String
|
||||
Get
|
||||
Return EgtMsg(61974)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property AddProj_ToolTip As String
|
||||
Get
|
||||
Return EgtMsg(61921)
|
||||
@@ -632,8 +627,6 @@ Public Class OnlyProdManagerVM
|
||||
Map.refOptimizePanelVM.UpdateOriginTypeList(EgtGetFirstNameInGroup(GDB_ID.ROOT, "RawParts") <> GDB_ID.NULL)
|
||||
' aggiorno visibilità bottone Muovi pezzi
|
||||
Map.refRawPartManagerVM.UpdateMovePartInRawPartVisibility()
|
||||
' resetto eventuale visualizzazione statistiche
|
||||
Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
|
||||
' aggiorno titolo
|
||||
Map.refMainWindowVM.UpdateTitle()
|
||||
' mostro tutti i pezzi
|
||||
@@ -1874,49 +1867,6 @@ Public Class OnlyProdManagerVM
|
||||
|
||||
#End Region ' AddProj
|
||||
|
||||
#Region "GoToSupervisor"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Open.
|
||||
''' </summary>
|
||||
Public ReadOnly Property GoToSupervisor_Command As ICommand
|
||||
Get
|
||||
If m_cmdGoToSupervisor Is Nothing Then
|
||||
m_cmdGoToSupervisor = New Command(AddressOf GoToSupervisor)
|
||||
End If
|
||||
Return m_cmdGoToSupervisor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub GoToSupervisor()
|
||||
If IsNothing(CurrProd) Then Return
|
||||
' apro supervisore
|
||||
Dim sSupervisorName As String = "EgtBEAMWALL.SupervisorR32"
|
||||
' recupero processo del supervisore
|
||||
Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName)
|
||||
If localProc.Length > 0 Then
|
||||
For Each p As Process In localProc
|
||||
' porto in primo piano il Supervisor
|
||||
BringWindowToFront(p.MainWindowHandle)
|
||||
Exit For
|
||||
Next
|
||||
Else
|
||||
Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe"
|
||||
Try
|
||||
Process.Start(sSupervisorPath, "1 " & CurrProd.nProdId)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath)
|
||||
End Try
|
||||
End If
|
||||
' mando richiesta di apertura progetto in supervisore
|
||||
DbControllers.m_StatusMapController.UpdateAction(DbControllers.m_SupervisorId, CurrProd.nProdId, CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ChangeProdInSupervisorRequest, "")
|
||||
End Sub
|
||||
|
||||
#End Region ' GoToSupervisor
|
||||
|
||||
#Region "ShowPopUpStartBtnCommand"
|
||||
|
||||
Public ReadOnly Property ShowPopUpStartBtnCommand As ICommand
|
||||
|
||||
@@ -43,11 +43,6 @@
|
||||
<StackPanel Grid.Column="4"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Right">
|
||||
<!--<Button Command="{Binding Visualization_Command}"
|
||||
ToolTip="{Binding Statistics_Msg}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="/Resources/InstrumentPanel/Vis.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<Button Command="{Binding Optimizer_Command}"
|
||||
ToolTip="{Binding Statistics_Msg}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
|
||||
@@ -116,35 +116,6 @@ 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
|
||||
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
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
|
||||
|
||||
<!--<ComboBox ItemsSource="{Binding PartTypeList}"
|
||||
SelectedItem="{Binding SelPartType}"
|
||||
Style="{StaticResource OnlyProdOptimizePanel_ComboBox}"/>-->
|
||||
|
||||
<Button Content="{Binding Optimize_Msg}"
|
||||
Command="{Binding Optimize_Command}"
|
||||
IsEnabled="{Binding Optimize_IsEnabled}"
|
||||
|
||||
@@ -124,17 +124,6 @@ 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
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property LongDrillArea_Msg As String
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
<Border Style="{StaticResource OnlyProdQty_Border}">
|
||||
<UniformGrid Columns="4"
|
||||
@@ -55,68 +54,4 @@
|
||||
Style="{StaticResource Dimension_TextBox}"/>
|
||||
</UniformGrid>
|
||||
</Border>
|
||||
<!--<Border Grid.Row="1"
|
||||
Style="{StaticResource OnlyProdCommand_Border}">
|
||||
<UniformGrid Columns="11"
|
||||
Margin="0,0,-200,0">
|
||||
<TextBlock Text="Inverti"
|
||||
Style="{StaticResource OnlyProdInversion_TextBlock}"/>
|
||||
<Image IsEnabled="{Binding Tag.bLockInversion,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Visibility="{Binding Lock_Visibility}"
|
||||
Style="{StaticResource LockImage}"/>
|
||||
<Button Command="{Binding Tag.Invert_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Style="{StaticResource OnlyProdToolBar_SmallButton}">
|
||||
<Image Source="/Resources/PartManager/LeftInvert.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<TextBlock Text="{Binding Tag.sINVERTED,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Style="{StaticResource OnlyProdInverted_TextBlock}"/>
|
||||
<Button Command="{Binding Tag.Invert_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Style="{StaticResource OnlyProdToolBarInverted_SmallButton}">
|
||||
<Image Source="/Resources/PartManager/RightInvert.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<TextBlock Text="Ruota"
|
||||
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
|
||||
<Image IsEnabled="{Binding Tag.bLockRotation,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Visibility="{Binding Lock_Visibility}"
|
||||
Style="{StaticResource LockImage}"/>
|
||||
<Button Command="{Binding Tag.BackRotation_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Style="{StaticResource OnlyProdToolBar_SmallButton}">
|
||||
<Image Source="/Resources/PartManager/LeftRotate.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<TextBlock Text="{Binding Tag.sROTATED,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Style="{StaticResource OnlyProdInverted_TextBlock}"/>
|
||||
<Button Command="{Binding Tag.ForwardRotation_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Style="{StaticResource OnlyProdToolBarInverted_SmallButton}">
|
||||
<Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<TextBlock Text="{Binding Tag.sNAM,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Style="{StaticResource OptionTextBlock_OnlyProd}"/>
|
||||
</UniformGrid>
|
||||
</Border>
|
||||
<Border Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource OnlyProdUnitTime_Border}">
|
||||
<Grid Margin="0,0,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Tag.sUnitTime,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdPartManagerV}}}"
|
||||
Style="{StaticResource OnlyProdUnitTime_TextBlock}"/>
|
||||
<Image Grid.Column="1"
|
||||
Source="/Resources/PartManager/Clock.png"
|
||||
Style="{StaticResource UnitTime_Image}"/>
|
||||
</Grid>
|
||||
</Border>-->
|
||||
</Grid>
|
||||
|
||||
@@ -58,52 +58,6 @@ Public Class ProjectVM
|
||||
End Property
|
||||
Private m_bLockUX As Boolean = False
|
||||
|
||||
'Private m_LeftPanel_Visibility As Boolean = True
|
||||
'Public Property LeftPanel_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(m_LeftPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
' Set(value As Visibility)
|
||||
' m_LeftPanel_Visibility = (value = Visibility.Visible)
|
||||
' End Set
|
||||
'End Property
|
||||
'Friend Sub SetLeftPanel_Visibility(IsVisible As Boolean)
|
||||
' m_LeftPanel_Visibility = IsVisible
|
||||
'End Sub
|
||||
|
||||
'Private m_TopPanel_Visibility As Boolean = False
|
||||
'Public Property TopPanel_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(m_TopPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
' Set(value As Visibility)
|
||||
' m_TopPanel_Visibility = (value = Visibility.Visible)
|
||||
' End Set
|
||||
'End Property
|
||||
'Friend Sub SetTopPanel_Visibility(IsVisible As Boolean)
|
||||
' m_TopPanel_Visibility = IsVisible
|
||||
'End Sub
|
||||
|
||||
'Private m_BottomPanel_Visibility As Boolean = True
|
||||
'Public Property BottomPanel_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(m_BottomPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
' Set(value As Visibility)
|
||||
' m_BottomPanel_Visibility = (value = Visibility.Visible)
|
||||
' End Set
|
||||
'End Property
|
||||
'Friend Sub SetBottomPanel_Visibility(IsVisible As Boolean)
|
||||
' m_BottomPanel_Visibility = IsVisible
|
||||
'End Sub
|
||||
|
||||
'Private m_PartManager_Visibility As Boolean = True
|
||||
'Public ReadOnly Property PartManager_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelectionType = BTLStructureVM.SelectionTypes.SELECT_ AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Private m_FeatureManager_Visibility As Boolean = True
|
||||
Public Property FeatureManager_Visibility As Visibility
|
||||
Get
|
||||
@@ -130,59 +84,6 @@ Public Class ProjectVM
|
||||
m_ShowBeamPanel_Visibility = IsVisible
|
||||
End Sub
|
||||
|
||||
'Private m_ProjManager_Visibility As Boolean = True
|
||||
'Public Property ProjManager_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(m_ProjManager_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
' Set(value As Visibility)
|
||||
' m_ProjManager_Visibility = (value = Visibility.Visible)
|
||||
' End Set
|
||||
'End Property
|
||||
'Friend Sub SetProjManager_Visibility(IsVisible As Boolean)
|
||||
' m_ProjManager_Visibility = IsVisible
|
||||
' If Not IsNothing(Map.refProjManagerVM) Then Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.GoToProd_Visibility))
|
||||
'End Sub
|
||||
|
||||
'Private m_ProdManager_Visibility As Boolean = True
|
||||
'Public Property ProdManager_Visibility As Visibility
|
||||
' Get
|
||||
' Return If(m_ProdManager_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
' Set(value As Visibility)
|
||||
' m_ProdManager_Visibility = (value = Visibility.Visible)
|
||||
' End Set
|
||||
'End Property
|
||||
'Friend Sub SetProdManager_Visibility(IsVisible As Boolean)
|
||||
' m_ProdManager_Visibility = IsVisible
|
||||
' 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
|
||||
|
||||
Friend Sub NotifyCalcPanel_Visibility()
|
||||
'Map.refCALCPanelVM.NotifyPropertyChanged(NameOf(Map.refCALCPanelVM.ViewPage_Visibility))
|
||||
'Map.refCALCPanelVM.NotifyPropertyChanged(NameOf(Map.refCALCPanelVM.Edit_Visibility))
|
||||
End Sub
|
||||
|
||||
Private m_FreeContourManager_Visibility As Boolean = False
|
||||
Public Property FreeContourManager_Visibility As Visibility
|
||||
Get
|
||||
@@ -268,8 +169,6 @@ 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.NestingOption_Visibility))
|
||||
End Sub
|
||||
|
||||
@@ -305,18 +204,6 @@ Public Class ProjectVM
|
||||
m_LastSelGridType = value
|
||||
End Sub
|
||||
|
||||
' flag per verificare se è stato selezionato il pulsante VIS o OTT se 0 = VIS se 1 = OTT
|
||||
Private m_bVisOtt_Selected As Boolean = False
|
||||
Public Property bVisOtt_Selected As Boolean
|
||||
Get
|
||||
Return m_bVisOtt_Selected
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bVisOtt_Selected = value
|
||||
NotifyPropertyChanged(NameOf(bVisOtt_Selected))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Gestione Tab con Strategy
|
||||
Friend Enum StrategyManagerTab As Integer
|
||||
NULL = -1
|
||||
@@ -411,7 +298,6 @@ Public Class ProjectVM
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione Comandi
|
||||
Private m_cmdVisualization As ICommand
|
||||
Private m_cmdOptimizer As ICommand
|
||||
Private m_cmdParameter As ICommand
|
||||
|
||||
@@ -446,8 +332,6 @@ 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.refProdManagerVM) Then Map.refProdManagerVM.SetProdManagerIsEnabled(bIsEnabled)
|
||||
Map.refRawPartManagerVM.SetRawPartManagerIsEnabled(bIsEnabled)
|
||||
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(bIsEnabled)
|
||||
Map.refFeatureManagerVM.SetFeatureManagerIsEnabled(bIsEnabled)
|
||||
@@ -580,46 +464,14 @@ Public Class ProjectVM
|
||||
End Sub
|
||||
|
||||
Friend Sub NotifyAllPanelVisibility()
|
||||
'NotifyPropertyChanged(NameOf(LeftPanel_Visibility))
|
||||
'NotifyPropertyChanged(NameOf(TopPanel_Visibility))
|
||||
'NotifyPropertyChanged(NameOf(BottomPanel_Visibility))
|
||||
'NotifyPropertyChanged(NameOf(PartManager_Visibility))
|
||||
NotifyPropertyChanged(NameOf(FeatureManager_Visibility))
|
||||
NotifyPropertyChanged(NameOf(ShowBeamPanel_Visibility))
|
||||
'NotifyPropertyChanged(NameOf(ProjManager_Visibility))
|
||||
'NotifyPropertyChanged(NameOf(ProdManager_Visibility))
|
||||
NotifyCalcPanel_Visibility()
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMAND"
|
||||
|
||||
#Region "Visualization"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Open.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Visualization_Command As ICommand
|
||||
Get
|
||||
If m_cmdVisualization Is Nothing Then
|
||||
m_cmdVisualization = New Command(AddressOf Visualization)
|
||||
End If
|
||||
Return m_cmdVisualization
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Visualization()
|
||||
m_bVisOtt_Selected = False
|
||||
Dim StatisticsWndV As New OptimizerStatisticsWndV(Application.Current.MainWindow, New StatisticsVM())
|
||||
StatisticsWndV.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' Visualization
|
||||
|
||||
#Region "Ottimization"
|
||||
|
||||
''' <summary>
|
||||
@@ -638,7 +490,6 @@ Public Class ProjectVM
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Optimizer()
|
||||
m_bVisOtt_Selected = True
|
||||
Dim OptimizerStatisticsWndV As New OptimizerStatisticsWndV(Application.Current.MainWindow, New StatisticsVM())
|
||||
OptimizerStatisticsWndV.ShowDialog()
|
||||
End Sub
|
||||
|
||||
@@ -48,8 +48,6 @@ Public Class ProdFileVM
|
||||
Select Case VerifyResult
|
||||
Case MessageBoxResult.Yes
|
||||
' salvo proj
|
||||
'If Not IsNothing(Map.refProdManagerVM) Then
|
||||
' Map.refProdManagerVM.Save()
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.Save()
|
||||
End If
|
||||
@@ -64,24 +62,15 @@ 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))
|
||||
If Not IsNothing(Map.refOnlyProdManagerVM) Then
|
||||
Map.refOnlyProdManagerVM.m_MruFiles.Remove(CurrProject.sProdPath)
|
||||
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
|
||||
' ' 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
|
||||
'If Not IsNothing(Map.refProdManagerVM) Then
|
||||
' ProjectManagerVM.CurrProd = Nothing
|
||||
'End If
|
||||
EgtResetModified()
|
||||
Return MessageBoxResult.No
|
||||
End If
|
||||
|
||||
@@ -2,23 +2,20 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DataContext="{StaticResource RawPartManagerVM}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Button Command="{Binding ProduceRawPart_Command}"
|
||||
ToolTip="{Binding ProduceRawPart_ToolTip}"
|
||||
IsEnabled="{Binding RawPartManagerIsEnabled}"
|
||||
Visibility="{Binding ProduceRawPart_Visibility}"
|
||||
<Button Command="{Binding NewRawPart_Command}"
|
||||
ToolTip="{Binding NewRawPart_ToolTip}"
|
||||
IsEnabled="{Binding BTLPartManager_IsEnabled}"
|
||||
Margin="5,1,0,1"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/TopPanel/ProduceRawPart.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<StackPanel Style="{StaticResource OnlyProdRawPartManager_StackPanel}">
|
||||
<Button Command="{Binding NewRawPart_Command}"
|
||||
ToolTip="{Binding NewRawPart_ToolTip}"
|
||||
IsEnabled="{Binding BTLPartManager_IsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource OnlyProdRawPartManagerAll_StackPanel}">
|
||||
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<StackPanel Grid.Column="1"
|
||||
Style="{StaticResource OnlyProdRawPartManagerAll_StackPanel}">
|
||||
<Button Command="{Binding ProduceAllRawPart_Command}"
|
||||
ToolTip="{Binding ProduceAllRawPart_ToolTip}"
|
||||
IsEnabled="{Binding RawPartManagerIsEnabled}"
|
||||
@@ -26,18 +23,6 @@
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/TopPanel/ProduceAllRawPart.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<!--<Button Command="{Binding CopyRawPart_Command}"
|
||||
ToolTip="{Binding CopyRawPart_ToolTip}"
|
||||
IsEnabled="{Binding RawPartManagerIsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/TopPanel/CopyRawPart.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<!--<Button Command="{Binding RemoveRawPart_Command}"
|
||||
ToolTip="{Binding RemoveRawPart_ToolTip}"
|
||||
IsEnabled="{Binding RawPartManagerIsEnabled}"
|
||||
Style="{StaticResource OnlyProdLeftPanel_Button}">
|
||||
<Image Source="/Resources/TopPanel/RemoveRawPart.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<Button ToolTip="{Binding VerifyAll_ToolTip}"
|
||||
Command="{Binding VerifyAll_Command}"
|
||||
IsEnabled="{Binding VerifyAll_IsEnabled}"
|
||||
|
||||
@@ -36,9 +36,6 @@ Public Class RawPartManagerVM
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdProduceAllRawPart As ICommand
|
||||
Private m_cmdProduceRawPart As ICommand
|
||||
Private m_cmdCopyRawPart As ICommand
|
||||
Private m_cmdRemoveRawPart As ICommand
|
||||
Private m_cmdRemoveAllRawPart As ICommand
|
||||
Private m_cmdMovePartInRawPart As ICommand
|
||||
Private m_cmdNewRawPart As ICommand
|
||||
@@ -155,27 +152,6 @@ Public Class RawPartManagerVM
|
||||
Map.refMyStatusBarVM.SetOutputMessage(sProgress)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ProduceRawPart"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ProduceRawPart_Command As ICommand
|
||||
Get
|
||||
If m_cmdProduceRawPart Is Nothing Then
|
||||
m_cmdProduceRawPart = New Command(AddressOf ProduceRawPart)
|
||||
End If
|
||||
Return m_cmdProduceRawPart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub ProduceRawPart()
|
||||
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||
Dim ErrorMsg As String = ""
|
||||
@@ -243,7 +219,35 @@ Public Class RawPartManagerVM
|
||||
End If
|
||||
End Function
|
||||
|
||||
#End Region ' ProduceRawPart
|
||||
Public Sub RemoveRawPart(Optional bAll As Boolean = False)
|
||||
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||
' se tutti
|
||||
If bAll Then
|
||||
' cancello tutti
|
||||
For Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
|
||||
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
|
||||
' se barra gia' assegnata a supervisore, esco
|
||||
If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Continue For
|
||||
CurrMachGroup.DeleteMachGroup(True)
|
||||
Next
|
||||
Else
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
' se barra gia' assegnata a supervisore, esco
|
||||
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
||||
SelMachGroup.DeleteMachGroup()
|
||||
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
|
||||
End If
|
||||
EgtDraw()
|
||||
' se nessun grezzo, rimetto tutti i pezzi invisibili
|
||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.HideAll(True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ProduceAllRawPart"
|
||||
|
||||
@@ -322,94 +326,6 @@ Public Class RawPartManagerVM
|
||||
|
||||
#End Region ' ProduceAllRawPart
|
||||
|
||||
#Region "CopyRawPart"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CopyRawPart_Command As ICommand
|
||||
Get
|
||||
If m_cmdCopyRawPart Is Nothing Then
|
||||
m_cmdCopyRawPart = New Command(AddressOf CopyRawPart)
|
||||
End If
|
||||
Return m_cmdCopyRawPart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub CopyRawPart()
|
||||
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||
Dim nQty As Integer = 1
|
||||
' se premuto shift
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
Dim MultiCopyRawPartWndVM As New MultiCopyRawPartWndVM()
|
||||
Dim MultiCopyRawPartWnd As New MultiCopyRawPartWndV(Application.Current.MainWindow, MultiCopyRawPartWndVM)
|
||||
If Not MultiCopyRawPartWnd.ShowDialog() Then Return
|
||||
nQty = MultiCopyRawPartWndVM.nQuantity
|
||||
End If
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
' creo copia
|
||||
Dim NewMachGroup As MyMachGroupVM = SelMachGroup.Copy(nQty)
|
||||
If Not IsNothing(NewMachGroup) Then
|
||||
' lo seleziono
|
||||
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = NewMachGroup
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CopyRawPart
|
||||
|
||||
#Region "RemoveRawPart"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property RemoveRawPart_Command As ICommand
|
||||
Get
|
||||
If m_cmdRemoveRawPart Is Nothing Then
|
||||
m_cmdRemoveRawPart = New Command(AddressOf RemoveRawPartCmd)
|
||||
End If
|
||||
Return m_cmdRemoveRawPart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub RemoveRawPartCmd()
|
||||
RemoveRawPart()
|
||||
End Sub
|
||||
|
||||
Public Sub RemoveRawPart(Optional bAll As Boolean = False)
|
||||
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||
' se tutti
|
||||
If bAll Then
|
||||
' cancello tutti
|
||||
For Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
|
||||
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
|
||||
' se barra gia' assegnata a supervisore, esco
|
||||
If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Continue For
|
||||
CurrMachGroup.DeleteMachGroup(True)
|
||||
Next
|
||||
Else
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
' se barra gia' assegnata a supervisore, esco
|
||||
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
||||
SelMachGroup.DeleteMachGroup()
|
||||
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
|
||||
End If
|
||||
EgtDraw()
|
||||
' se nessun grezzo, rimetto tutti i pezzi invisibili
|
||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.HideAll(True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' RemoveRawPart
|
||||
|
||||
#Region "RemoveAllRawPart"
|
||||
|
||||
''' <summary>
|
||||
@@ -874,58 +790,13 @@ Public Class RawPartManagerVM
|
||||
Configuration.AssembledMode(Map.refShowBeamPanelVM.ShowBuilding_IsChecked)
|
||||
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
|
||||
Dim ProjType As BWType
|
||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
' ProjType = ProjectManagerVM.CurrProj.nType
|
||||
' If Not CreateBarListToVerify(Pages.VIEW, ProjType, BarList) Then Return
|
||||
' ' lancio calcolo
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
'ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
' ProjType = ProjectManagerVM.CurrProd.nType
|
||||
' If Not CreateBarListToVerify(Pages.MACHINING, ProjType, BarList) Then Return
|
||||
' ' lancio calcolo
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
'ElseIf Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
ProjType = ProjectManagerVM.CurrProd.nType
|
||||
'If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART OrElse Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST Then
|
||||
' If Not CreateBarListToVerify(Pages.VIEW, ProjType, BarList) Then Return
|
||||
' ' lancio calcolo
|
||||
' EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProj.sProjDirPath, AddressOf ManageCalc)
|
||||
'ElseIf Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
|
||||
If Not CreateBarListToVerify(ProjType, BarList) Then Return
|
||||
' lancio calcolo
|
||||
EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath, AddressOf ManageCalc)
|
||||
'End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Function CreateBarListToVerify(ProjType As BWType, ByRef BarList As Bar()) As Boolean
|
||||
'If SelPage = Pages.VIEW Then
|
||||
' Dim TempBarList As New List(Of EgtBEAMWALL.Core.Bar)
|
||||
' For PartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
' Dim CurrPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList(PartIndex)
|
||||
' If Not CurrPart.bDO Then Continue For
|
||||
' Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = CurrPart.nPartId,
|
||||
' .nProgramPage = ProjectType.PROJ,
|
||||
' .nProjType = ProjType,
|
||||
' .bBarOk = True,
|
||||
' .nMachineName = Map.refMachinePanelVM.SelectedMachine.Name,
|
||||
' .nGlobState = CurrPart.nGlobalState}
|
||||
' Select Case CurrPart.nGlobalState
|
||||
' Case Core.CalcStates.OK, CalcStates.INFO
|
||||
' Bar.nCmdType = CalcIntegration.CmdTypes.GENERATE
|
||||
' Case Else
|
||||
' If CurrPart.nGlobalState = CalcStates.NOTCALCULATED OrElse CurrPart.nFeaturesGlobalState > CalcStates.INFO Then
|
||||
' Dim sBTLPartFilePath As String = ProjectManagerVM.CurrProj.sProjDirPath & "\" & CurrPart.nPDN.ToString() & ".ori.bwe"
|
||||
' If File.Exists(sBTLPartFilePath) Then File.Delete(sBTLPartFilePath)
|
||||
' End If
|
||||
' Bar.nCmdType = CalcIntegration.CmdTypes.CHECKGEN
|
||||
' End Select
|
||||
' TempBarList.Add(Bar)
|
||||
' Next
|
||||
' BarList = TempBarList.ToArray()
|
||||
' ' disabilito interfaccia
|
||||
' Map.refProjectVM.SetCalcRunning(True)
|
||||
'ElseIf SelPage = Pages.MACHINING Then
|
||||
Dim TempBarList As New List(Of EgtBEAMWALL.Core.Bar)
|
||||
For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1
|
||||
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(PartIndex)
|
||||
@@ -955,7 +826,6 @@ Public Class RawPartManagerVM
|
||||
BarList = TempBarList.ToArray()
|
||||
' disabilito interfaccia
|
||||
Map.refProjectVM.SetCalcRunning(True)
|
||||
'End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<UserControl x:Class="SceneShowBuldingV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtUILib="clr-namespace:EgtUILib;assembly=EgtUILib">
|
||||
|
||||
<WindowsFormsHost>
|
||||
<EgtUILib:Scene x:Name="SceneShowBulding"/>
|
||||
</WindowsFormsHost>
|
||||
|
||||
</UserControl>
|
||||
@@ -1,106 +0,0 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.Windows.Interop
|
||||
Imports EgtUILib.EgtInterface
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class SceneShowBuldingV
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
' Creo Riferimento
|
||||
MapV.SetRefSceneShowBuldingV(Me)
|
||||
' Inizializzazione Scena
|
||||
PreInitializeScene()
|
||||
If SceneShowBulding.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.BEAM Or KEY_OPT.WALL) Then
|
||||
PostInitializeScene()
|
||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
||||
SceneShowBulding.SetStatusNull()
|
||||
' Imposto focus pulsante su false
|
||||
SceneShowBulding.SetFocusOnMove(False)
|
||||
' Recupero e imposto handle finestra principale
|
||||
'Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||
'EgtSetMainWindowHandle(hMainWnd)
|
||||
EgtSetCurrentContext(SceneShowBulding.GetCtx())
|
||||
' Imposto direttorio ausiliario per import/gestione BTL
|
||||
Dim sBtlAuxDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
|
||||
EgtSetBtlAuxDir(sBtlAuxDir)
|
||||
' inizializzo gestore travi e pareti
|
||||
EgtInitBeamMgr(EIB_FL.TS3_POS + EIB_FL.USEUATTR)
|
||||
' inizializzo gestore lavorazioni
|
||||
EgtInitMachMgr(Map.refMainWindowVM.MainWindowM.sMachinesRoot, Map.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Seleziono la macchina impostata nel file ini
|
||||
Map.refMachinePanelVM.LoadCurrentMachine()
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub PreInitializeScene()
|
||||
' imposto colore di default
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||
SceneShowBulding.SetDefaultMaterial(DefColor)
|
||||
' imposto colori sfondo
|
||||
Dim BackTopColor As New Color3d(192, 192, 192)
|
||||
GetMainPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
||||
Dim BackBotColor As New Color3d(BackTopColor)
|
||||
GetMainPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
|
||||
SceneShowBulding.SetViewBackground(BackTopColor, BackBotColor)
|
||||
' imposto colore di evidenziazione
|
||||
Dim MarkColor As New Color3d(255, 255, 0)
|
||||
GetMainPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
||||
SceneShowBulding.SetMarkMaterial(MarkColor)
|
||||
' imposto colore per superfici selezionate
|
||||
Dim SelSurfColor As New Color3d(255, 255, 192)
|
||||
GetMainPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
||||
SceneShowBulding.SetSelSurfMaterial(SelSurfColor)
|
||||
' imposto tipo e colore del rettangolo di zoom
|
||||
Dim bOutline As Boolean = True
|
||||
Dim ZwColor As New Color3d(0, 0, 0)
|
||||
GetMainPrivateProfileZoomWin(S_SCENE, K_ZOOMWIN, bOutline, ZwColor)
|
||||
SceneShowBulding.SetZoomWinAttribs(bOutline, ZwColor)
|
||||
' imposto colore della linea di distanza
|
||||
Dim DstLnColor As New Color3d(255, 0, 0)
|
||||
GetMainPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor)
|
||||
SceneShowBulding.SetDistLineMaterial(DstLnColor)
|
||||
' imposto parametri OpenGL
|
||||
Dim nDriver As Integer = GetMainPrivateProfileInt(S_OPENGL, K_DRIVER, 3)
|
||||
Dim b2Buff As Boolean = (GetMainPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1) <> 0)
|
||||
Dim nColorBits As Integer = GetMainPrivateProfileInt(S_OPENGL, K_COLORBITS, 32)
|
||||
Dim nDepthBits As Integer = GetMainPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32)
|
||||
SceneShowBulding.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
||||
End Sub
|
||||
|
||||
Private Sub PostInitializeScene()
|
||||
' imposto tipo coordinate
|
||||
SceneShowBulding.SetGridCursorPos(True)
|
||||
' modo di visualizzazione
|
||||
Dim nShowMode As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
|
||||
'Map.refShowPanelVM.SetShowMode(DirectCast(nShowMode, SM))
|
||||
EgtSetShowMode(DirectCast(nShowMode, SM))
|
||||
' visualizzazione avanzata dei triangoli costituenti le superfici
|
||||
Dim bShowTriaAdv As Boolean = (GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
||||
EgtSetShowTriaAdv(bShowTriaAdv)
|
||||
' tipo visualizzazione per Zmap
|
||||
Dim nShowZmap As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
|
||||
EgtSetShowZmap(DirectCast(nShowZmap, ZSM), False)
|
||||
' dimensione lineare max in pixel delle textures
|
||||
Dim nTxrMaxLinPix As Integer = GetMainPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
|
||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
||||
' tipo snap point
|
||||
SceneShowBulding.SetSnapPointType(SP.PT_SKETCH)
|
||||
' imposto parametri geometrici griglia
|
||||
EgtSetGridGeo(100, 1, 10, 100)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -51,15 +51,7 @@ Public Class ShowBeamPanelVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bShowBuilding = value
|
||||
'If m_bShowBuilding Then
|
||||
'Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.SCENESHOWBULDING)
|
||||
'EgtSetCurrentContext(MapV.refSceneShowBuldingV.SceneShowBulding.GetCtx())
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then Map.refProjectVM.BTLStructureVM.ShowBuilding(m_bShowBuilding)
|
||||
'EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||
'Else
|
||||
' EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||
' Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
|
||||
'End If
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetShowBuilding(bValue As Boolean)
|
||||
|
||||
@@ -28,10 +28,10 @@ Module PDFHelper
|
||||
Dim document As New Document()
|
||||
Dim Project As ProjectFileVM
|
||||
|
||||
If ActivePage = Pages.VIEW OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Map.refInstrumentPanelVM.bVisOtt_Selected = False) Then
|
||||
If ActivePage = Pages.VIEW OrElse ActivePage = Pages.ONLYPRODPAGE Then
|
||||
Project = ProjectManagerVM.CurrProj
|
||||
document.Info.Title = Project.sProjId & " - " & Project.BTLFileName_Msg & " - Statistics"
|
||||
ElseIf ActivePage = Pages.MACHINING OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Map.refInstrumentPanelVM.bVisOtt_Selected) Then
|
||||
ElseIf ActivePage = Pages.MACHINING OrElse ActivePage = Pages.ONLYPRODPAGE Then
|
||||
If ActivePage = Pages.CONFIG Then
|
||||
Project = ProjectManagerVM.CurrProj
|
||||
document.Info.Title = Project.sProjId & " - " & Project.BTLFileName_Msg & " - Statistics"
|
||||
@@ -50,10 +50,10 @@ Module PDFHelper
|
||||
Dim sImageLogo As String = Map.refMainWindowVM.MainWindowM.sTempDir & "/Image" & "Logo landscape" & ".png"
|
||||
DefineLogo(section, sImageLogo)
|
||||
|
||||
If ActivePage = Pages.VIEW OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Map.refInstrumentPanelVM.bVisOtt_Selected = False) Then
|
||||
If ActivePage = Pages.VIEW OrElse ActivePage = Pages.ONLYPRODPAGE Then
|
||||
DefinePartTotals(document, section, bPreview)
|
||||
DefineItemList(document, ListTypes.PART, bPreview)
|
||||
ElseIf ActivePage = Pages.MACHINING OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Map.refInstrumentPanelVM.bVisOtt_Selected) Then
|
||||
ElseIf ActivePage = Pages.MACHINING OrElse ActivePage = Pages.ONLYPRODPAGE Then
|
||||
DefineMachGroupTotals(document, section, bPreview)
|
||||
DefineItemList(document, ListTypes.MACHGROUP, bPreview)
|
||||
DefineItemList(document, ListTypes.RAWPART, bPreview)
|
||||
|
||||
@@ -336,11 +336,11 @@ Public Class StatisticsVM
|
||||
' salvo il documento
|
||||
Dim sFileName As String = ""
|
||||
|
||||
If (ActivePage = Pages.VIEW AndAlso Not bPreview) OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Not Map.refInstrumentPanelVM.bVisOtt_Selected AndAlso Not bPreview) Then
|
||||
If (ActivePage = Pages.VIEW AndAlso Not bPreview) OrElse ActivePage = Pages.ONLYPRODPAGE Then
|
||||
sFileName = ProjectManagerVM.CurrProj.sProjDirPath & "\" & "Statistics.pdf"
|
||||
ElseIf ActivePage = Pages.VIEW OrElse Pages.ONLYPRODPAGE AndAlso bPreview Then
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf" ' Se la pagina e' 0 e' bPreview e' True creo PDF Visualization
|
||||
ElseIf (ActivePage = Pages.MACHINING AndAlso Not bPreview) OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Map.refInstrumentPanelVM.bVisOtt_Selected AndAlso Not bPreview) Then
|
||||
ElseIf (ActivePage = Pages.MACHINING AndAlso Not bPreview) OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Not bPreview) Then
|
||||
sFileName = ProjectManagerVM.CurrProd.sProdDirPath & "\" & ProjectManagerVM.CurrProd.sProdId & " - " & "Statistics.pdf"
|
||||
ElseIf ActivePage = Pages.MACHINING OrElse Pages.ONLYPRODPAGE AndAlso bPreview Then ' Se la pagina e' 1 e' bPreview e' True creo PDF Optimizer
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf"
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
||||
<!--<EventSetter Event="PreviewMouseDown" Handler="TreeViewItem_PreviewMouseDown"/>-->
|
||||
<EventSetter Event="PreviewMouseDown" Handler="TreeViewItem_PreviewMouseDown"/>
|
||||
<Setter Property="Focusable" Value="{Binding RelativeSource={RelativeSource Self}, Converter={StaticResource StrategyTypeToFocusableConverter}}"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
@@ -1,12 +1,54 @@
|
||||
Public Class StrategyManagerV
|
||||
|
||||
'Private Sub TreeViewItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
' If TypeOf sender IsNot TreeViewItem Then Return
|
||||
' Dim TreeViewItem As TreeViewItem = DirectCast(sender, TreeViewItem)
|
||||
' Dim TreeViewItemButton As Object = TreeHelperManager.FindVisualParent(Of Primitives.ToggleButton)(e.OriginalSource)
|
||||
' Dim TreeViewItemParentNode As Object = TreeHelperManager.FindVisualParent(Of TreeViewItem)(sender)
|
||||
' If Not IsNothing(TreeViewItemButton) OrElse Not IsNothing(TreeViewItemParentNode) Then Return
|
||||
' TreeViewItem.IsExpanded = Not TreeViewItem.IsExpanded
|
||||
'End Sub
|
||||
|
||||
Private Sub TreeViewItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
If TypeOf sender IsNot TreeViewItem Then Return
|
||||
Dim TreeViewItem As TreeViewItem = DirectCast(sender, TreeViewItem)
|
||||
Dim TreeViewItemButton As Object = TreeHelperManager.FindVisualParent(Of Primitives.ToggleButton)(e.OriginalSource)
|
||||
Dim TreeViewItemParentNode As Object = TreeHelperManager.FindVisualParent(Of TreeViewItem)(sender)
|
||||
If Not IsNothing(TreeViewItemButton) OrElse Not IsNothing(TreeViewItemParentNode) Then Return
|
||||
TreeViewItem.IsExpanded = Not TreeViewItem.IsExpanded
|
||||
Dim treeViewItem As TreeViewItem = DirectCast(sender, TreeViewItem)
|
||||
If TypeOf treeViewItem.DataContext IsNot StrategyFeature Then
|
||||
Dim Topology As Topology = DirectCast(treeViewItem.DataContext, Topology)
|
||||
Topology.CreateStrategyViews()
|
||||
Topology.ActiveStrategyList_View.Refresh()
|
||||
Topology.AvailableStrategyList_View.Refresh()
|
||||
Else
|
||||
Dim Feature As StrategyFeature = DirectCast(treeViewItem.DataContext, StrategyFeature)
|
||||
For Each Topology As Topology In Feature.TopologyList
|
||||
Topology.ActiveStrategyList_View.Filter = Function(item) False
|
||||
Topology.AvailableStrategyList_View.Filter = Function(item) False
|
||||
Topology.ActiveStrategyList_View.Refresh()
|
||||
Topology.AvailableStrategyList_View.Refresh()
|
||||
Next
|
||||
End If
|
||||
' Controlla se il clic è avvenuto sulla HEADER o sul TOGGLEBUTTON
|
||||
Dim clickedElement As DependencyObject = e.OriginalSource
|
||||
While Not IsNothing(clickedElement) AndAlso TypeOf clickedElement IsNot TreeViewItem
|
||||
If TypeOf clickedElement Is Primitives.ToggleButton Then
|
||||
' Se il ToggleButton è stato cliccato, espandi o chiudi
|
||||
treeViewItem.IsExpanded = Not treeViewItem.IsExpanded
|
||||
' Se il nodo è chiuso, togli la selezione
|
||||
If Not treeViewItem.IsExpanded Then
|
||||
treeViewItem.IsSelected = False
|
||||
End If
|
||||
e.Handled = True
|
||||
Return
|
||||
End If
|
||||
clickedElement = VisualTreeHelper.GetParent(clickedElement)
|
||||
End While
|
||||
' Se il clic è sul nodo principale, espandi/chiudi
|
||||
If clickedElement Is treeViewItem AndAlso Not treeViewItem.IsSelected Then
|
||||
treeViewItem.IsExpanded = Not treeViewItem.IsExpanded
|
||||
' Se il nodo è chiuso, togli la selezione
|
||||
If Not treeViewItem.IsExpanded Then
|
||||
treeViewItem.IsSelected = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -756,11 +756,11 @@ Public Class Topology
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Function AvailableStrategyFilter(Strategy As Object) As Boolean
|
||||
Friend Function AvailableStrategyFilter(Strategy As Object) As Boolean
|
||||
Return DirectCast(Strategy, Strategy).nIndexInList < 0
|
||||
End Function
|
||||
|
||||
Private Function ActiveStrategyFilter(Strategy As Object) As Boolean
|
||||
Friend Function ActiveStrategyFilter(Strategy As Object) As Boolean
|
||||
Return DirectCast(Strategy, Strategy).nIndexInList >= 0
|
||||
End Function
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -62,9 +61,6 @@
|
||||
<Optmizer:ParameterStrategyV/>
|
||||
</GroupBox>
|
||||
|
||||
<!--<StackPanel Grid.Row="1"
|
||||
Grid.Column="2"/>-->
|
||||
|
||||
<StackPanel Grid.Row="2"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Right"
|
||||
|
||||
@@ -240,11 +240,11 @@ Module Configuration
|
||||
' salvo il documento
|
||||
Dim sFileName As String = ""
|
||||
|
||||
If (ActivePage = Pages.VIEW AndAlso Not bPreview) OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Not Map.refInstrumentPanelVM.bVisOtt_Selected AndAlso Not bPreview) Then
|
||||
If (ActivePage = Pages.VIEW AndAlso Not bPreview) OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Not bPreview) Then
|
||||
sFileName = ProjectManagerVM.CurrProj.sProjDirPath & "\" & "Statistics.pdf"
|
||||
ElseIf ActivePage = Pages.VIEW OrElse Pages.ONLYPRODPAGE AndAlso bPreview Then
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf" ' Se la pagina e' 0 e' bPreview e' True creo PDF Visualization
|
||||
ElseIf (ActivePage = Pages.MACHINING AndAlso Not bPreview) OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Map.refInstrumentPanelVM.bVisOtt_Selected AndAlso Not bPreview) Then
|
||||
ElseIf (ActivePage = Pages.MACHINING AndAlso Not bPreview) OrElse (ActivePage = Pages.ONLYPRODPAGE AndAlso Not bPreview) Then
|
||||
sFileName = ProjectManagerVM.CurrProd.sProdDirPath & "\" & ProjectManagerVM.CurrProd.sProdId & " - " & "Statistics.pdf"
|
||||
ElseIf ActivePage = Pages.MACHINING OrElse Pages.ONLYPRODPAGE AndAlso bPreview Then ' Se la pagina e' 1 e' bPreview e' True creo PDF Optimizer
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Module MapV
|
||||
|
||||
Private m_refStrategyProductionV As StrategyProductionV
|
||||
Private m_refSceneShowBuldingV As SceneShowBuldingV
|
||||
|
||||
#Region "Get"
|
||||
|
||||
@@ -11,12 +10,6 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSceneShowBuldingV As SceneShowBuldingV
|
||||
Get
|
||||
Return m_refSceneShowBuldingV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
@@ -26,11 +19,6 @@
|
||||
Return Not IsNothing(m_refStrategyProductionV)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSceneShowBuldingV(SceneShowBuldingV As SceneShowBuldingV) As Boolean
|
||||
m_refSceneShowBuldingV = SceneShowBuldingV
|
||||
Return Not IsNothing(m_refSceneShowBuldingV)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
End Module
|
||||
|
||||
Reference in New Issue
Block a user