- selezione dei pezzi btl in prod
- implementazione copia rawpart travi - selezione dei pezzi btl in prod - implementazione accesso Db con codice chiave
This commit is contained in:
@@ -77,6 +77,12 @@ Public Class BeamM
|
||||
End While
|
||||
If bFound Then
|
||||
StringToDouble(sSplitInfo(1), NewBeamM.m_dPOSX)
|
||||
If NewBeamM.ParentMachGroup.PartMList.Count = 0 Then
|
||||
NewBeamM.m_dOffset = NewBeamM.m_dPOSX
|
||||
Else
|
||||
Dim PrevBeam As BeamM = NewBeamM.ParentMachGroup.PartMList(NewBeamM.ParentMachGroup.PartMList.Count - 1)
|
||||
NewBeamM.m_dOffset = NewBeamM.m_dPOSX - PrevBeam.m_dPOSX - PrevBeam.dL
|
||||
End If
|
||||
End If
|
||||
' leggo feature
|
||||
NewBeamM.m_FeatureMList = LoadBTLFeatures(nPartId)
|
||||
|
||||
@@ -88,7 +88,6 @@ Public Class BeamMachGroupM
|
||||
If nPartId <> GDB_ID.NULL Then
|
||||
Dim NewBeam As BeamM = BeamM.CreateBeam(NewBeamMachGroupM, nPartId, nRawPartId)
|
||||
TempList.Add(NewBeam)
|
||||
NewBeam.UpdateOffset()
|
||||
End If
|
||||
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||
End While
|
||||
|
||||
@@ -1608,6 +1608,12 @@ Public Class BTLPartVM
|
||||
NotifyPropertyChanged(NameOf(nINPROD))
|
||||
End Sub
|
||||
|
||||
Friend Function CanAddPartToCount(Optional Qty As Integer = 1, Optional ByRef Added As Integer = 0) As Boolean
|
||||
' verifico se ci sono pezzi da aggiungere
|
||||
Added = Math.Min(Qty, m_BTLPartM.nCNT + m_BTLPartM.nADDED - m_BTLPartM.nINPROD)
|
||||
Return Qty = Added
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
@@ -50,21 +50,8 @@ Public Class BTLStructureVM
|
||||
ShowBuilding(False)
|
||||
Map.refShowBeamPanelVM.SetShowBuilding(False)
|
||||
End If
|
||||
' deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' disabilito impostazione modificato
|
||||
DisableModified()
|
||||
' ciclo sui pezzi
|
||||
For Each Part As BTLPartVM In m_BTLPartVMList
|
||||
' se non è quello selezionato, lo nasondo
|
||||
If Part IsNot m_SelBTLPart Then
|
||||
EgtSetMode(Part.nPartId, GDB_MD.HIDDEN)
|
||||
Else
|
||||
EgtSetMode(Part.nPartId, GDB_MD.STD)
|
||||
End If
|
||||
Next
|
||||
' ripristino precedente impostazione modificato
|
||||
EnableModified()
|
||||
' seleziono pezzo nella scena
|
||||
SceneSelPartSelection()
|
||||
' seleziono pezzo in Db geometrico
|
||||
EgtBeamSetPart(m_SelBTLPart.nPartId)
|
||||
' seleziono pagina BottomPanel
|
||||
@@ -77,7 +64,21 @@ Public Class BTLStructureVM
|
||||
' aggiorno stato selezionato tutto
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
' aggiorno vista
|
||||
EgtSetView(VT.ISO_SW, False)
|
||||
Dim view As VT = VT.ISO_SW
|
||||
If Map.refMachinePanelVM.SelectedMachine.nType = Core.ConstBeam.MachineType.WALL Then view = VT.TOP
|
||||
EgtSetView(view, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
' resetto gruppo di lavorazione corrente
|
||||
EgtResetCurrMachGroup()
|
||||
' seleziono pezzo nella scena
|
||||
SceneSelPartSelection()
|
||||
' resetto selezione machgroup
|
||||
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = Nothing
|
||||
' aggiorno vista
|
||||
Dim view As VT = VT.ISO_SW
|
||||
If Map.refMachinePanelVM.SelectedMachine.nType = Core.ConstBeam.MachineType.WALL Then view = VT.TOP
|
||||
EgtSetView(view, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelBTLPart))
|
||||
@@ -515,18 +516,27 @@ Public Class BTLStructureVM
|
||||
AddHandler m_BTLPartVMList.CollectionChanged, AddressOf OnBTLPartVMListChanged
|
||||
End Sub
|
||||
|
||||
Private Sub DisableModified()
|
||||
m_bOldEnMod = EgtGetEnableModified()
|
||||
If m_bOldEnMod Then EgtDisableModified()
|
||||
End Sub
|
||||
|
||||
Private Sub EnableModified()
|
||||
If m_bOldEnMod Then EgtEnableModified()
|
||||
Private Sub SceneSelPartSelection()
|
||||
' deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' disabilito impostazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' ciclo sui pezzi
|
||||
For Each Part As BTLPartVM In m_BTLPartVMList
|
||||
' se non è quello selezionato, lo nasondo
|
||||
If Part IsNot m_SelBTLPart Then
|
||||
EgtSetMode(Part.nPartId, GDB_MD.HIDDEN)
|
||||
Else
|
||||
EgtSetMode(Part.nPartId, GDB_MD.STD)
|
||||
End If
|
||||
Next
|
||||
' ripristino precedente impostazione modificato
|
||||
DisableMgr.ReEnable()
|
||||
End Sub
|
||||
|
||||
Friend Sub ShowAll(Optional bRedraw As Boolean = True)
|
||||
' disabilito impostazione modificato
|
||||
DisableModified()
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
If Not IsNothing(SelBTLPart) Then
|
||||
' se pezzo solido, lo riporto normale
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
@@ -546,7 +556,7 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
Next
|
||||
' ripristino precedente impostazione modificato
|
||||
EnableModified()
|
||||
DisableMgr.ReEnable()
|
||||
EgtSetView(VT.ISO_SW, False)
|
||||
EgtZoom(ZM.ALL, bRedraw)
|
||||
' imposto stato per ShowBeamPanel
|
||||
@@ -555,7 +565,7 @@ Public Class BTLStructureVM
|
||||
|
||||
Friend Sub HideAll(Optional bRedraw As Boolean = True)
|
||||
' disabilito impostazione modificato
|
||||
DisableModified()
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
If Not IsNothing(SelBTLPart) Then
|
||||
' se pezzo solido, lo riporto normale
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
@@ -575,7 +585,7 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
Next
|
||||
' ripristino precedente impostazione modificato
|
||||
EnableModified()
|
||||
DisableMgr.ReEnable()
|
||||
EgtSetView(VT.ISO_SW, False)
|
||||
EgtZoom(ZM.ALL, bRedraw)
|
||||
' imposto stato per ShowBeamPanel
|
||||
@@ -584,7 +594,7 @@ Public Class BTLStructureVM
|
||||
|
||||
Friend Sub ShowBuilding(Optional bRedraw As Boolean = True)
|
||||
' disabilito impostazione modificato
|
||||
DisableModified()
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
'' tolgo pezzo selezionato
|
||||
'If Not IsNothing(SelBTLPart) Then SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
'SelBTLPart = Nothing
|
||||
@@ -640,14 +650,14 @@ Public Class BTLStructureVM
|
||||
AsseId = NextId
|
||||
End While
|
||||
' ripristino precedente impostazione modificato
|
||||
EnableModified()
|
||||
DisableMgr.ReEnable()
|
||||
EgtSetView(VT.ISO_SW, False)
|
||||
EgtZoom(ZM.ALL, bRedraw)
|
||||
End Sub
|
||||
|
||||
Friend Sub ShowSolid(Optional bRedraw As Boolean = True)
|
||||
' disabilito impostazione modificato
|
||||
DisableModified()
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' Recupero il pezzo del primo oggetto selezionato
|
||||
Dim nPartId As Integer = If(Not IsNothing(SelBTLPart), SelBTLPart.nPartId, GDB_ID.NULL)
|
||||
If nPartId = GDB_ID.NULL Or Not EgtIsPart(nPartId) Then
|
||||
@@ -668,7 +678,7 @@ Public Class BTLStructureVM
|
||||
|
||||
If bRedraw Then EgtDraw()
|
||||
' ripristino precedente impostazione modificato
|
||||
EnableModified()
|
||||
DisableMgr.ReEnable()
|
||||
End Sub
|
||||
|
||||
' Funzione per regolarizzare, se necessario, la superficie della feature
|
||||
|
||||
@@ -92,10 +92,14 @@ Public Class PartInRawPartListVM
|
||||
|
||||
Friend Sub UpdateColumns(nMachType As MachineType)
|
||||
If nMachType = MachineType.BEAM Then
|
||||
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_ROT)) Then m_PartInRawPartColumns.Remove(COL_ROT)
|
||||
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_FLIP)) Then m_PartInRawPartColumns.Remove(COL_FLIP)
|
||||
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_POSY)) Then m_PartInRawPartColumns.Remove(COL_POSY)
|
||||
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_OFFSET)) Then m_PartInRawPartColumns.Insert(8, COL_OFFSET)
|
||||
ElseIf nMachType = MachineType.WALL Then
|
||||
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_OFFSET)) Then m_PartInRawPartColumns.Remove(COL_OFFSET)
|
||||
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_ROT)) Then m_PartInRawPartColumns.Insert(6, COL_ROT)
|
||||
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_FLIP)) Then m_PartInRawPartColumns.Insert(7, COL_FLIP)
|
||||
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_POSY)) Then m_PartInRawPartColumns.Insert(9, COL_POSY)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
<Compile Include="Utility\EgtDataGrid.xaml.vb">
|
||||
<DependentUpon>EgtDataGrid.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||
<Compile Include="WarehouseWnd\WarehouseWndV.xaml.vb">
|
||||
<DependentUpon>WarehouseWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -210,8 +210,7 @@ Public Class CalcIntegration
|
||||
UpdateCutIdAndTaskId(nPartId)
|
||||
|
||||
' Disabilito segnalazione modificato
|
||||
Dim bOldEnableModified As Boolean = EgtGetEnableModified()
|
||||
If bOldEnableModified Then EgtDisableModified()
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
|
||||
' Recupero visibilita' pezzo e lo imposto a visibile
|
||||
Dim nOldPartMode As Integer
|
||||
@@ -229,7 +228,7 @@ Public Class CalcIntegration
|
||||
EgtSetMode(nPartId, nOldPartMode)
|
||||
|
||||
' Ripristino stato segnalazione modifica
|
||||
If bOldEnableModified Then EgtEnableModified()
|
||||
DisableMgr.ReEnable()
|
||||
|
||||
Return If(bOk, sPartFilePath, String.Empty)
|
||||
End Function
|
||||
|
||||
@@ -99,7 +99,7 @@ Public Class LeftPanelVM
|
||||
' creo copia del pezzo
|
||||
Dim nPartDuploId As Integer = EgtDuploNew(SelPart.nPartId)
|
||||
' elimino valori calcolo dell'originale
|
||||
DuploRemoveProjCalc(nPartDuploId)
|
||||
MyMachGroupPanelVM.DuploRemoveProjCalc(nPartDuploId)
|
||||
' lo rendo std
|
||||
EgtSetMode(nPartDuploId, GDB_MD.STD)
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
@@ -162,7 +162,7 @@ Public Class LeftPanelVM
|
||||
|
||||
Private Function VerifyPartCount(SelPart As BTLPartVM) As Boolean
|
||||
' verifico se ci sono pezzi da aggiungere
|
||||
If SelPart.nCNT + SelPart.nADDED = SelPart.nINPROD Then
|
||||
If Not SelPart.CanAddPartToCount Then
|
||||
' se non ci sono, chiedo se aggiungerne uno nuovo
|
||||
If MessageBox.Show("Raggiunto numero di pezzi da produrre: " &
|
||||
SelPart.nCNT & " da BTL; " & SelPart.nADDED & " aggiunti. Aggiungerne un altro?", "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
@@ -174,14 +174,6 @@ Public Class LeftPanelVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub DuploRemoveProjCalc(nPartDuploId As Integer)
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_ERR, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_MSG, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_ROT, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_FALL, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_TIME, "")
|
||||
End Sub
|
||||
|
||||
'Friend Sub IncrementPartCount(SelPart As BTLPartVM)
|
||||
' ' incremento i pezzi utilizzati
|
||||
' SelPart.AddPartToProd()
|
||||
|
||||
@@ -84,8 +84,6 @@ Public Class BeamMachGroupVM
|
||||
AddHandler m_PartVMList.CollectionChanged, AddressOf OnBeamVMListChanged
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
Public Overrides Sub RefreshPartList()
|
||||
' leggo StartCut da posizione primo pezzo
|
||||
Dim sInfo As String = ""
|
||||
@@ -200,6 +198,84 @@ Public Class BeamMachGroupVM
|
||||
FirstBeam.NotifyPropertyChanged(NameOf(FirstBeam.sOffset))
|
||||
End Sub
|
||||
|
||||
Friend Overrides Function Copy() As MyMachGroupVM
|
||||
EgtResetCurrMachGroup()
|
||||
' recupero lista dei pezzi BTL originali
|
||||
Dim PartList As New List(Of BTLPartVM)
|
||||
For Each Part In m_PartVMList
|
||||
PartList.Add(Part.RetrieveBTLPartFromPart())
|
||||
Next
|
||||
' verifico che nessun pezzo da copiare abbia raggiunto il numero massimo
|
||||
If Not VerifyPartCount(PartList) Then Return Nothing
|
||||
' creo nuovo gruppo di lavorazione
|
||||
Map.refMachGroupPanelVM.AddMachGroup()
|
||||
Dim nCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
Dim sCurrMachGroupName As String = ""
|
||||
EgtGetMachGroupName(nCurrMachGroup, sCurrMachGroupName)
|
||||
' scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PRODID, Map.refProdManagerVM.CurrProd.nProdId)
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PATTID, nCurrMachGroup)
|
||||
' scrivo dati costruzione grezzo in gruppo di lavorazione
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_BARLEN, dL)
|
||||
For Index = 0 To m_PartVMList.Count - 1
|
||||
' creo copia del pezzo
|
||||
Dim nPartDuploId As Integer = EgtDuploNew(PartList(Index).nPartId)
|
||||
' elimino valori calcolo dell'originale
|
||||
MyMachGroupPanelVM.DuploRemoveProjCalc(nPartDuploId)
|
||||
' lo rendo std
|
||||
EgtSetMode(nPartDuploId, GDB_MD.STD)
|
||||
' scrivo dati costruzione grezzo in gruppo di lavorazione
|
||||
EgtSetInfo(nCurrMachGroup, MGR_RPT_PART & 1, nPartDuploId & "," & m_PartVMList(Index).sPOSX)
|
||||
Next
|
||||
Dim BeamMachGroup As BeamMachGroupVM = Map.refMachGroupPanelVM.GetLastMachGroup()
|
||||
' eseguo script creazione grezzo
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdType.RAWPART, False) Then
|
||||
BeamMachGroup.DeleteMachGroup()
|
||||
Dim LogFile As String() = File.ReadAllLines(sLogPath)
|
||||
If LogFile.Count >= 2 AndAlso Not IsNothing(LogFile(1)) Then
|
||||
MessageBox.Show(LogFile(1), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
Return Nothing
|
||||
End If
|
||||
' aggiorno contatore pezzi usati in Prod
|
||||
For Each Part In PartList
|
||||
Part.RefreshPartInProd()
|
||||
Next
|
||||
'aggiorno lista pezzi
|
||||
BeamMachGroup.m_BeamMachGroupM.RefreshPartList()
|
||||
BeamMachGroup.m_BeamMachGroupM.RefreshGroupData()
|
||||
' aggiorno dati ultilizzo barra
|
||||
BeamMachGroup.UpdateUsage()
|
||||
EgtSetView(VT.ISO_SW, False)
|
||||
Return BeamMachGroup
|
||||
End Function
|
||||
|
||||
Private Function VerifyPartCount(SelParts As List(Of BTLPartVM)) As Boolean
|
||||
Dim sPartToAdd As String = "Raggiunto numero di pezzi da produrre per:"
|
||||
Dim bPartToAdd As Boolean = False
|
||||
For Each Part In SelParts
|
||||
' verifico se ci sono pezzi da aggiungere
|
||||
If Not Part.CanAddPartToCount() Then
|
||||
bPartToAdd = True
|
||||
sPartToAdd &= Environment.NewLine & "- PDN" & Part.nPDN & " | BTL QTY " & Part.nCNT & " | ADDED QTY " & Part.nADDED
|
||||
End If
|
||||
Next
|
||||
sPartToAdd &= Environment.NewLine & "Aggiungerli?"
|
||||
If bPartToAdd Then
|
||||
If MessageBox.Show(sPartToAdd, "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
For Each Part In SelParts
|
||||
If Not Part.CanAddPartToCount() Then Part.AddNewPartToAdded()
|
||||
Next
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeleteMachGroup"
|
||||
|
||||
@@ -22,10 +22,15 @@ Public Class BeamVM
|
||||
If StringToLen(value, dValue) Then
|
||||
Dim dOldValue As Double = m_BeamM.dOffset
|
||||
m_BeamM.dOffset = dValue
|
||||
' se prima trave della barra sostituisco valore anche a startoffset
|
||||
Dim BeamMachGroup As BeamMachGroupVM = DirectCast(ParentMachGroupVM, BeamMachGroupVM)
|
||||
If ParentMachGroupVM.PartVMList(0) Is Me Then
|
||||
BeamMachGroup.dStartCut = dValue
|
||||
End If
|
||||
If Not BeamMachGroup.ReDrawBeamMachgroup() Then
|
||||
' rispristino vecchio valore
|
||||
m_BeamM.dOffset = dOldValue
|
||||
BeamMachGroup.dStartCut = dOldValue
|
||||
BeamMachGroup.ReDrawBeamMachgroup()
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -153,6 +153,14 @@ Public Class MyMachGroupPanelVM
|
||||
Return EgtSetInfo(nSouId, DUPLO_TODELETE, "")
|
||||
End Function
|
||||
|
||||
Friend Shared Sub DuploRemoveProjCalc(nPartDuploId As Integer)
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_ERR, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_MSG, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_ROT, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_FALL, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_TIME, "")
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AddMachGroup()
|
||||
Dim SelMyMachine As MyMachine = Map.refMachinePanelVM.SelectedMachine
|
||||
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(SelMyMachine.Name, SelMyMachine.nType)
|
||||
@@ -179,6 +187,8 @@ Public Class MyMachGroupPanelVM
|
||||
End Function
|
||||
|
||||
Public Overrides Function OnPostSetCurrMachGroup() As Boolean
|
||||
' resetto eventuale selezione pezzo
|
||||
DirectCast(SelectedMachGroup, MyMachGroupVM).SelPart = Nothing
|
||||
' Imposto vista solo tavola
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
Dim View As VT
|
||||
|
||||
@@ -156,6 +156,8 @@ Public MustInherit Class MyMachGroupVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend MustOverride Function Copy() As MyMachGroupVM
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
Public MustOverride Sub RefreshPartList()
|
||||
|
||||
@@ -65,6 +65,13 @@ Public Class WallMachGroupVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Overrides Function Copy() As MyMachGroupVM
|
||||
|
||||
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
Public Overrides Sub RefreshPartList()
|
||||
|
||||
@@ -190,6 +190,7 @@ Public Class MainMenuVM
|
||||
Map.refProjectVM.SetShowBeamPanel_Visibility(True)
|
||||
Map.refProjectVM.SetProjManager_Visibility(True)
|
||||
Map.refProjectVM.SetProdManager_Visibility(False)
|
||||
Dim x = EgtGetEnableModified()
|
||||
' verifico se progetto modificato, e chiedo se salvare
|
||||
If bVerifyModification Then ProdFileVM.VerifyProjectModification(Map.refProdManagerVM.CurrProd)
|
||||
EgtResetCurrMachGroup()
|
||||
|
||||
@@ -46,6 +46,7 @@ Public Class TopPanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub ProduceRawPart()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
DbControllers.m_MachGroupController.UpdateSupervisor(Map.refProdManagerVM.CurrProd.nProdId, SelMachGroup.Id, DbControllers.m_SupervisorId)
|
||||
@@ -71,6 +72,7 @@ Public Class TopPanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub ProduceAllRawPart()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 0 Then
|
||||
For Each Machgroup In Map.refMachGroupPanelVM.MachGroupVMList
|
||||
DbControllers.m_MachGroupController.UpdateSupervisor(Map.refProdManagerVM.CurrProd.nProdId, Machgroup.Id, DbControllers.m_SupervisorId)
|
||||
@@ -98,10 +100,15 @@ Public Class TopPanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub CopyRawPart()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
|
||||
|
||||
' creo copia
|
||||
Dim NewMachGroup As MyMachGroupVM = SelMachGroup.Copy()
|
||||
If Not IsNothing(NewMachGroup) Then
|
||||
' lo seleziono
|
||||
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = NewMachGroup
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CopyRawPart
|
||||
@@ -124,6 +131,7 @@ Public Class TopPanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub RemoveRawPart()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
SelMachGroup.DeleteMachGroup()
|
||||
@@ -149,6 +157,7 @@ Public Class TopPanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub RemovePart()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
Dim SelPart As PartVM = SelMachGroup.SelPart
|
||||
@@ -176,6 +185,7 @@ Public Class TopPanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub MoveUpPart()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
Dim SelPart As PartVM = SelMachGroup.SelPart
|
||||
@@ -209,6 +219,7 @@ Public Class TopPanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub MoveDownPart()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
Dim SelPart As PartVM = SelMachGroup.SelPart
|
||||
@@ -242,6 +253,7 @@ Public Class TopPanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub ReOrderPart()
|
||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
Dim SelPart As PartVM = SelMachGroup.SelPart
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Module DbControllers
|
||||
Imports EgtUILib
|
||||
|
||||
Module DbControllers
|
||||
|
||||
Friend m_SupervisorId As String = "1"
|
||||
|
||||
@@ -10,8 +12,16 @@
|
||||
|
||||
' se demo--> server = db.steamware.net, nKey e sKey come le hai...
|
||||
|
||||
DataLayer.DbConfig.InitDb("127.0.0.1", "102", "12726")
|
||||
DataLayer.DbConfig.CheckUser("102", "12726")
|
||||
Dim sKey = "", sUser = "", sPwd = ""
|
||||
|
||||
EgtGetKeyInfo(sKey)
|
||||
sKey = sKey.Replace(" ", "")
|
||||
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
|
||||
sUser = sKey.Substring(3, 6)
|
||||
sPwd = sKey.Substring(10, sKey.Length - 10).Replace("(", "").Replace(")", "")
|
||||
End If
|
||||
DataLayer.DbConfig.InitDb("127.0.0.1", sUser, sPwd)
|
||||
DataLayer.DbConfig.CheckUser(sUser, sPwd)
|
||||
|
||||
m_ProjController = New DataLayer.Controllers.ProjController
|
||||
m_ProdController = New DataLayer.Controllers.ProdController
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class DisableModifiedMgr
|
||||
|
||||
Private m_bOldEnMod As Boolean
|
||||
|
||||
Sub New()
|
||||
m_bOldEnMod = EgtGetEnableModified()
|
||||
If m_bOldEnMod Then EgtDisableModified()
|
||||
End Sub
|
||||
|
||||
Public Sub ReEnable()
|
||||
If m_bOldEnMod Then EgtEnableModified()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user