Compare commits

..

8 Commits

Author SHA1 Message Date
NicolaP a568c614fb Migliorata gestione deposito su tavola ausiliaria 2022-10-03 19:14:22 +02:00
NicolaP 6dc5fe5a12 Gestione modifica per scarico su tavola 2 2022-10-03 18:23:20 +02:00
NicolaP c3abca3cee Inizio gestione modifica per spostamenti 2022-09-22 20:16:19 +02:00
NicolaP 9c60ef020f Sacrico tutti i pezzi da tavola ausiliaria 2022-09-21 18:56:49 +02:00
NicolaP ab525c7431 Aggiunta modifica 2022-09-21 17:55:33 +02:00
NicolaP 613b9fa725 Correzione gestione salvataggio fase 2022-09-21 17:52:51 +02:00
NicolaP 41903872b1 Definita funzione per il salvataggio TabAux (ERRORE simulazione) 2022-09-05 12:13:26 +02:00
NicolaP beb3ce841b Inizio gestione creazione grezzi per scarico (ERRORI simulazione) 2022-09-01 20:29:46 +02:00
14 changed files with 238 additions and 412 deletions
+5 -3
View File
@@ -155,9 +155,11 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
</Grid>
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
</Grid>
+192 -36
View File
@@ -11,8 +11,12 @@ Public Class MoveRawPartPage
Private m_nAuxTabId As Integer = GDB_ID.NULL
' Fase corrente
Private m_nCurrPhase As Integer = 0
' Disposizione corrente
Private m_nCurrDisposition As Integer = GDB_ID.NULL
' Premuto Prev
Private m_bPrev As Boolean = False
' Pemuto Next
Private m_bToNext As Boolean = False
' Dati movimento
Private m_dStep As Double = 0
Private m_dRotation As Double = 0
@@ -41,6 +45,8 @@ Public Class MoveRawPartPage
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
m_SplitPage = m_MainWindow.m_CadCutPageUC.m_SplitPage
m_bActive = True
' resetto l'inidice del pezzo da mnovimentare
m_CurrRawOnVacuum = GDB_ID.NULL
' Leggo tipo movimento grezzi
m_bByHand = (GetVacuumType() = 0 Or
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
@@ -68,29 +74,9 @@ Public Class MoveRawPartPage
m_nCurrPhase = EgtGetCurrPhase()
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
If m_SplitPage.m_bOnAuxTab Then
m_nAuxTabId = EgtGetTableId(AUX_TAB)
' Visualizzo tavolo ausiliario
Dim bOldEnMod As Boolean = EgtGetEnableModified()
If bOldEnMod Then EgtDisableModified()
EgtSetStatus(m_nAuxTabId, GDB_ST.ON_)
If bOldEnMod Then EgtEnableModified()
' Se definizione movimenti
If Not m_SplitPage.m_bShow Then
' Area tavolo ausiliario
Dim b3AuxTab As New BBox3d
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
' Area tavolo principale
Dim b3Tab As New BBox3d
EgtGetTableArea(1, b3Tab)
' Imposto offset su tavolo principale per includere anche il secondario
Dim dOffsXP As Double = Math.Max(b3AuxTab.Max().x - b3Tab.Max().x, 0)
Dim dOffsYP As Double = Math.Max(b3AuxTab.Max().y - b3Tab.Max().y, 0)
Dim dOffsXM As Double = Math.Max(b3Tab.Min().x - b3AuxTab.Min().x, 0)
Dim dOffsYM As Double = Math.Max(b3Tab.Min().y - b3AuxTab.Min().y, 0)
EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
End If
EgtZoom(ZM.ALL)
' altrimenti, aggiorno visualizzazione
' assegnazione delle info tavola ausiliaria alla dispozione corrente
SetAuxTabInCurrDisposition()
' altrimenti, aggiorno visualizzazione
Else
EgtDraw()
End If
@@ -164,8 +150,9 @@ Public Class MoveRawPartPage
TopRBtn.Visibility = Windows.Visibility.Hidden
BottomLBtn.Visibility = Windows.Visibility.Hidden
BottomRBtn.Visibility = Windows.Visibility.Hidden
PauseBtn.Visibility = Windows.Visibility.Hidden
ResetBtn.Visibility = Windows.Visibility.Hidden
' altrimenti per movimento con ventose
' altrimenti per movimento con ventose
ElseIf Not m_SplitPage.m_bOnAuxTab Then
UpBtn.Visibility = Windows.Visibility.Visible
LeftBtn.Visibility = Windows.Visibility.Visible
@@ -180,8 +167,9 @@ Public Class MoveRawPartPage
TopRBtn.Visibility = Windows.Visibility.Hidden
BottomLBtn.Visibility = Windows.Visibility.Hidden
BottomRBtn.Visibility = Windows.Visibility.Hidden
PauseBtn.Visibility = Windows.Visibility.Hidden
ResetBtn.Visibility = Windows.Visibility.Hidden
' altrimenti per movimento finale dei pezzi
' altrimenti per movimento finale dei pezzi
Else
UpBtn.Visibility = Windows.Visibility.Hidden
LeftBtn.Visibility = Windows.Visibility.Hidden
@@ -196,14 +184,47 @@ Public Class MoveRawPartPage
TopRBtn.Visibility = Windows.Visibility.Visible
BottomLBtn.Visibility = Windows.Visibility.Visible
BottomRBtn.Visibility = Windows.Visibility.Visible
PauseBtn.Visibility = Windows.Visibility.Visible
ResetBtn.Visibility = Windows.Visibility.Visible
End If
' salvo l'idice della fase corrente
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
' Abilitazione bottone modifica
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
' gestione abilitazione altri bottoni
EnableButtons()
End Sub
Private Sub SetAuxTabInCurrDisposition()
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
m_nAuxTabId = EgtGetTableId(AUX_TAB)
' Visualizzo tavolo ausiliario
Dim bOldEnMod As Boolean = EgtGetEnableModified()
If bOldEnMod Then EgtDisableModified()
EgtSetStatus(m_nAuxTabId, GDB_ST.ON_)
If bOldEnMod Then EgtEnableModified()
' Se definizione movimenti
If Not m_SplitPage.m_bShow Then
' Area tavolo ausiliario
Dim b3AuxTab As New BBox3d
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
' Area tavolo principale
Dim b3Tab As New BBox3d
EgtGetTableArea(1, b3Tab)
' Imposto offset su tavolo principale per includere anche il secondario
Dim dOffsXP As Double = Math.Max(b3AuxTab.Max().x - b3Tab.Max().x, 0)
Dim dOffsYP As Double = Math.Max(b3AuxTab.Max().y - b3Tab.Max().y, 0)
Dim dOffsXM As Double = Math.Max(b3Tab.Min().x - b3AuxTab.Min().x, 0)
Dim dOffsYM As Double = Math.Max(b3Tab.Min().y - b3AuxTab.Min().y, 0)
EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
End If
EgtZoom(ZM.ALL)
' verifico che siano state salvate correttamente le info della tavola di scarico
EgtSaveFile("c:\EgtData\OmagCUT\Temp\AuxTab.nge", NGE.BIN)
End Sub
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
' Verifico di essere il gestore attivo
If Not m_bActive Then Return
@@ -235,14 +256,14 @@ Public Class MoveRawPartPage
' Se il pezzo corrente è selezionato allora lo disattivo -> deposito del pezzo
If nStat = GDB_ST.SEL Then
EgtSetStatus(nId, GDB_ST.ON_)
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola (evito il controllo se ultima fase)
If VerifyCollisionWithOtherRawPart(nId) Then
' mantengo la selezione del pezzo
EgtSetStatus(nId, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
Else
' Se con ventose, le nascondo
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
' mantengo la selezione del pezzo
EgtSetStatus(nId, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
Else
' Se con ventose, le nascondo
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
End If
Else
@@ -316,6 +337,8 @@ Public Class MoveRawPartPage
' Veririfica che il grezzo non entri in colliosione con altri pezzi
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
If m_SplitPage.m_bOnAuxTab Then Return False
If nIdOnVacumm = GDB_ID.NULL Then Return False
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
@@ -763,6 +786,16 @@ Public Class MoveRawPartPage
Next
If Not bOkRotate Then Return
Else
' sposto il pezzo in centro tavola → perchè tutti i movimenti sono fatti ruotando il pezzo in centro tavola!
Dim b3Area As New BBox3d
EgtGetTableArea(1, b3Area)
Dim b3RawTemp As New BBox3d
EgtGetRawPartBBox(nRawId, b3RawTemp)
' ricavo il riferimento dell'angolo in basso a sinstra del grezzo rispetto alla tavola
Dim ptCorner As Point3d = New Point3d(b3Area.DimX / 2, b3Area.DimY / 2, 0) - New Vector3d(b3RawTemp.DimX / 2, b3RawTemp.DimY / 2, 0)
' sposto il pezzo in questa posizione
EgtMoveToCornerRawPart(nRawId, ptCorner, MCH_CR.BL)
' riprovo il movimento
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw) Then
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
' riposiziono il pezzo come era prima
@@ -877,6 +910,62 @@ Public Class MoveRawPartPage
Return True
End Function
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
' verifico che ci sia almeno un elemto selezionato (dati di aggancio pezzo)
If m_RawMoveDataList.Count = 0 Then Return
' verifico che sia stato inseito almeno uno spostamento, altrimenti lo rimuovo
Dim Index As Integer = 0
For Index = m_RawMoveDataList.Count - 1 To 0 Step -1
If Math.Abs(m_RawMoveDataList(Index).m_vtRawMove.x) < EPS_SMALL AndAlso Math.Abs(m_RawMoveDataList(Index).m_vtRawMove.y) < EPS_SMALL Then
m_RawMoveDataList.RemoveAt(Index)
End If
Next
' verifico che la lista non sia vuota
If m_RawMoveDataList.Count = 0 Then Return
' recupero disposizione fase corrente
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
' imposto eventuale movimento pezzi su tavola ausiliaria
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
'' Eseguo calcolo speciale dei movimenti: per tavola multicut
'SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
' Creo nuova fase
Dim nNewPhase As Integer = EgtAddPhase()
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
Dim nRawId As Integer = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
Dim bKeepRawPart As Boolean = True
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
If nRawId = RawOnAuxTabData.m_nId Then
bKeepRawPart = False
Exit For
End If
Next
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
End If
' passo al successivo grezzo
nRawId = EgtGetNextRawPart(nRawId)
End While
Dim nCurrDisposition As Integer = EgtGetPhaseDisposition(nNewPhase)
SetPause(nCurrDisposition)
m_nCurrDisposition = nCurrDisposition
' EgtSetStatus(nRawIdSlected, GDB_ST.OFF)
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
EgtSetCurrPhase(nNewPhase)
SetAuxTabInCurrDisposition()
' ripulisco la lista degli spostamenti
m_RawMoveDataList.Clear()
' aggiorno la fase corrente
m_nCurrPhase = EgtGetCurrPhase()
End Sub
Private Sub ResetBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetBtn.Click
' Recupero il primo grezzo selezionato
Dim nRawId As Integer = EgtGetFirstSelectedObj()
@@ -912,7 +1001,30 @@ Public Class MoveRawPartPage
EgtDeselectAll()
' Torno alla fase precedente
m_bPrev = True
' Passo alla pagina delle spezzature
' Passo alla pagina delle spezzature solo se non esiste prima una fased di deposito sulla tavola di scarico
Dim nPrevDispId As Integer = EgtGetPrevOperation(m_nCurrDisposition)
' verifico se la fasa precedente è di tipo scarico
If IsDispUnloadOnAuxTab(nPrevDispId) Then
EgtSetCurrPhase(m_nCurrPhase - 1)
m_nCurrDisposition = nPrevDispId
m_nCurrPhase -= 1
m_bPrev = False
m_SplitPage.m_bShow = True
EgtDraw()
Return
End If
'If EgtGetOperationType(EgtGetPrevOperation(m_nCurrDisposition)) = MCH_OY.DISP AndAlso m_SplitPage.m_bOnAuxTab Then
' EgtSetCurrPhase(m_nCurrPhase - 1)
' m_nCurrDisposition = EgtGetPrevOperation(m_nCurrDisposition)
' m_nCurrPhase -= 1
' m_bPrev = False
' m_SplitPage.m_bShow = True
' EgtDraw()
' Return
'End If
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(Me)
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_SplitPage)
m_MainWindow.m_CadCutPageUC.m_CadCutMode = CadCutPageUC.CadCutModes.Split
@@ -928,6 +1040,19 @@ Public Class MoveRawPartPage
' non cambio pagina
Return
End If
' se la disposizione corrente è sulla tavola ausiliaria allora lo sarà anche quella successiva
If IsDispUnloadOnAuxTab(m_nCurrDisposition) Then
EgtSetCurrPhase(m_nCurrPhase + 1)
m_nCurrDisposition = EgtGetNextOperation(m_nCurrDisposition)
m_nCurrPhase += 1
m_bToNext = False
m_SplitPage.m_bShow = True
EgtDraw()
EnableButtons()
Return
End If
' resetto l'inidice del pezzo da mnovimentare
m_CurrRawOnVacuum = GDB_ID.NULL
' Deseleziono tutto
@@ -973,6 +1098,26 @@ Public Class MoveRawPartPage
EnableButtons()
End Sub
' verifica se la disposizione indicata è uno scarico sulla tavola ausiliaria
Public Function IsDispUnloadOnAuxTab(nCurrDispId As Integer)
' verifico se la fase precedente è uno scarico su tavola ausiliaria
Dim bVal As Integer = 0
EgtGetInfo(nCurrDispId, "Pat", bVal)
Return bVal
End Function
' recupero la prima disposizione disponibile tra l'elenco delle operazioni presenti
Public Function GetNextDisposition(nCurrDisposId As Integer)
Dim nDispId As Integer = nCurrDisposId
While nDispId <> GDB_ID.NULL
If EgtGetOperationType(nDispId) = MCH_OY.DISP Then
Return nDispId
End If
nDispId = EgtGetNextOperation(nDispId)
End While
Return GDB_ID.NULL
End Function
Private Sub EnableButtons()
UpBtn.IsEnabled = Not m_SplitPage.m_bShow
LeftBtn.IsEnabled = Not m_SplitPage.m_bShow
@@ -987,11 +1132,22 @@ Public Class MoveRawPartPage
TopRBtn.IsEnabled = Not m_SplitPage.m_bShow
BottomLBtn.IsEnabled = Not m_SplitPage.m_bShow
BottomRBtn.IsEnabled = Not m_SplitPage.m_bShow
PauseBtn.IsEnabled = Not m_SplitPage.m_bShow
ResetBtn.IsEnabled = Not m_SplitPage.m_bShow
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
If m_SplitPage.m_bShow Then
NextBtn.IsEnabled = (m_nCurrPhase < EgtGetPhaseCount())
Else
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
End If
End Sub
Private Sub MoveRawPartPage_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
' verifico che la fase corrente non sia vuota
Dim nLastDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
If EgtIsOperationEmpty(nLastDispId) And m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
EgtErase(nLastDispId)
End If
' Se movimento con ventose
If Not m_bByHand Then
' nascondo le ventose
@@ -1007,11 +1163,11 @@ Public Class MoveRawPartPage
' imposto eventuale presenza rimozioni manuali
SaveRemoveByHandInDisposition(nDispId, m_bRemovedRaw)
' imposto eventuale movimento pezzi su tavola ausiliaria
SaveMovePartsOnAuxTable( nDispId, m_SplitPage.m_bOnAuxTab)
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
' Eseguo calcolo speciale dei movimenti
SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
End If
' se altrimenti movimento senza ventose perchè lama troppo grande
' se altrimenti movimento senza ventose perchè lama troppo grande
ElseIf GetVacuumType() > 0 Then
' se non solo visualizzazione
If Not m_SplitPage.m_bShow Then
+26 -23
View File
@@ -7,6 +7,7 @@ Public Class SplitPageUC
' Riferimento alla MainWindow
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
' Flag di pagina attiva
Private m_bActive As Boolean = False
' Tipo movimento dei grezzi (manuale o con testa ventosa)
@@ -35,6 +36,7 @@ Public Class SplitPageUC
Private m_nIdSelectedWaterJet_End As Integer = GDB_ID.NULL
' Id gruppo Bridges (Nuovo da versione 30/08/2022)
Private m_nIdBridgesGroup As Integer = GDB_ID.NULL
Private m_nIdBridgeLineGroup As Integer = GDB_ID.NULL
Private m_nIdBridge As Integer = GDB_ID.NULL
Private m_ptSrtBridge As New Point3d
Private m_ptEndBridge As New Point3d
@@ -86,7 +88,6 @@ Public Class SplitPageUC
AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto
RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart
BridgesWJBtn.ToolTip = "Bridges"
BridgesDeleteWJBtn.ToolTip = "Remove bridges"
End Sub
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
@@ -251,6 +252,9 @@ Public Class SplitPageUC
' se non esiste almeno 1 Preview di tipo WaterJet
If ListGroup.Count > 0 Then
m_nIdSelectedSideWJ = nIdMy
' Ricalcolo tutte le lavorazioni
Dim nWarn As Integer = 0
ResetAllMachinings(nWarn)
' recupero l'indice del PreView che deve essere acceso per indicare la selezione
ListGroup = m_MainWindow.m_CadCutPageUC.m_NestPage.ResearchGropuWJ(nIdParent, nIdPV)
Dim nIdWJ As Integer = m_MainWindow.m_CadCutPageUC.m_NestPage.GetPVIdFromIdSide(ListGroup, nIdMy)
@@ -264,12 +268,9 @@ Public Class SplitPageUC
EgtModifyCurveEndPoint(m_nIdBridge, m_ptEndBridge, GDB_RT.GLOB)
If VerifyInterference(m_nIdBridge) Then
m_CurrProjPage.ClearMessage()
EgtSetInfo(m_nIdBridge, "PartStart", m_nIdSelectedPartWJ_Srt)
EgtSetInfo(m_nIdBridge, "PartEnd", m_nIdSelectedPartWJ_End)
EgtSetInfo(m_nIdBridge, "Ph", EgtGetCurrPhase())
' Ricalcolo tutte le lavorazioni
Dim nWarn As Integer = 0
ResetAllMachinings(nWarn)
' salvo nel Gruppo "BridgeLine" gli dei pezzi che sono collegati
EgtSetInfo(EgtGetParent(m_nIdBridge), "PartStart", m_nIdSelectedPartWJ_Srt)
EgtSetInfo(EgtGetParent(m_nIdBridge), "PartEnd", m_nIdSelectedPartWJ_End)
Else
' attendo la selezione di un punto valido
m_nIdSelectedSideWJ = GDB_ID.NULL
@@ -306,19 +307,13 @@ Public Class SplitPageUC
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
While nIdMy <> GDB_ID.NULL
Dim sGroupName As String = String.Empty
Dim sSelName As String = String.Empty
' gruppo di appartenenza
Dim nIdParent As Integer = EgtGetParent(nIdMy)
' recupero il nome del gruppo di appartenenza
' recupero il nome del Layer
EgtGetName(nIdParent, sGroupName)
' recupero il nome dell'oggetto selezionato
EgtGetName(nIdMy, sSelName)
If sGroupName.Contains(BRIDGES) AndAlso sSelName.Contains(BRIDGELINE) Then
EgtErase(nIdMy)
If sGroupName.Contains(BRIDGELINE) Then
EgtErase(nIdParent)
EgtDraw()
' Ricalcolo tutte le lavorazioni
Dim nWarn As Integer = 0
ResetAllMachinings(nWarn)
Return
End If
nIdMy = EgtGetNextObjInSelWin()
@@ -329,9 +324,9 @@ Public Class SplitPageUC
ptCurr.z = m_ptSrtBridge.z
' rappresento il egmento
If m_nIdBridge = GDB_ID.NULL Then
m_nIdBridge = EgtCreateLine(m_nIdBridgesGroup, m_ptSrtBridge, ptCurr, GDB_RT.GLOB)
' assegno un nome alla linea
EgtSetName(m_nIdBridge, BRIDGELINE)
m_nIdBridgeLineGroup = EgtCreateGroup(m_nIdBridgesGroup)
EgtSetName(m_nIdBridgeLineGroup, BRIDGELINE)
m_nIdBridge = EgtCreateLine(m_nIdBridgeLineGroup, m_ptSrtBridge, ptCurr, GDB_RT.GLOB)
End If
EgtModifyCurveEndPoint(m_nIdBridge, ptCurr, GDB_RT.GLOB)
EgtDraw()
@@ -1664,6 +1659,16 @@ Public Class SplitPageUC
End Sub
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
If m_bShow Then
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
' recupero l'operazione successiva
Dim NextDisposition As Integer = EgtGetNextOperation(CurrDisposition)
If Not IsNothing(m_MainWindow.m_CadCutPageUC.m_MoveRawPartPage) Then
' verifico che l'operazione sia una disposizione, altrimenti cerco
NextDisposition = m_MainWindow.m_CadCutPageUC.m_MoveRawPartPage.GetNextDisposition(NextDisposition)
m_bOnAuxTab = m_MainWindow.m_CadCutPageUC.m_MoveRawPartPage.IsDispUnloadOnAuxTab(NextDisposition)
End If
End If
m_bToNext = True
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(m_MainWindow.m_CadCutPageUC.m_SplitPage)
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC.m_MoveRawPartPage)
@@ -1895,7 +1900,7 @@ Public Class SplitPageUC
m_bOnAuxTab = False
' Ci deve essere almeno 1 taglio disabilitato e 1 e 1 solo passante
NextBtn.IsEnabled = (GetDisabledCutsCount() > 0 And GetSplitCutsCount() = 1)
' Altrimenti
' Altrimenti
Else
' movimento standard sulla tavola (almeno un taglio disabilitato)
Dim bStdTab As Boolean = (GetDisabledCutsCount() > 0)
@@ -1906,7 +1911,7 @@ Public Class SplitPageUC
' Deve essere permesso almeno un tipo di movimento
NextBtn.IsEnabled = bStdTab Or m_bOnAuxTab Or bFinalMoveTab
End If
' altrimenti sto solo visualizzando
' altrimenti sto solo visualizzando
Else
' movimento su tavola di scarico
m_bOnAuxTab = (m_nCurrPhase = EgtGetPhaseCount() - 1 And m_bEnableOnAuxTab And EgtGetOperationType(EgtGetLastOperation()) = MCH_OY.DISP)
@@ -1945,8 +1950,6 @@ Public Class SplitPageUC
ModifEndBtn.IsEnabled = Not m_bShow
InvertBtn.IsEnabled = Not m_bShow
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
BridgesWJBtn.IsEnabled = Not m_bShow
BridgesDeleteWJBtn.IsEnabled = Not m_bShow
' nascondo i comandi che non devono essere visualizzati in funzione delle lavorazioni attive
If m_nCountSawing = 0 And (m_nCountWaterjetting > 0 Or m_nCountOtherMachining) Then
-8
View File
@@ -170,14 +170,6 @@ Module ConstIni
Public Const K_CSVCURRDIR As String = "CurrDir"
Public Const K_CSVLASTFILE As String = "LastFile"
Public Const S_TRF As String = "TRF"
Public Const K_ORDCODE As String = "OrdCode"
Public Const K_ORDDESC As String = "OrdDesc"
Public Const K_PARTCODE As String = "PartCode"
Public Const K_MATCODE As String = "MatCode"
Public Const K_SURFCODE As String = "SurfCode"
Public Const K_TRFTHICKNESS As String = "TrfThickness"
Public Const S_SLABDXF As String = "SlabDxf"
Public Const K_IMPORTSLABDXF As String = "ImportSlabDxf"
Public Const K_SLABLAYER As String = "SlabLayer"
-24
View File
@@ -24,7 +24,6 @@ Public Class CompoTrfData
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
DialogResult = True
SaveData()
Close()
End Sub
@@ -33,30 +32,7 @@ Public Class CompoTrfData
Close()
End Sub
Private Sub SaveData()
WritePrivateProfileString(S_TRF, K_ORDCODE, OrdCodeTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_TRF, K_ORDDESC, OrdDescTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_TRF, K_PARTCODE, PartCodeTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_TRF, K_MATCODE, MatCodeTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_TRF, K_SURFCODE, SurfCodeTxBx.Text, m_MainWindow.GetIniFile())
' prima di salvare lo spessore converto in mm e poi di nuovo in stringa
Dim dVal As Double = 0
StringToLen(ThicknessTxBx.Text, dVal)
WritePrivateProfileString(S_TRF, K_TRFTHICKNESS, DoubleToString(dVal, 4), m_MainWindow.GetIniFile())
End Sub
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
' se verifico che non sono stati iniziliazzti i campi allora provvedo a leggere il file ini del programma
If sOrdCode = "" And sOrdDesc = "" And sPartCode = "" And sMatCode = "" And sSurfCode = "" Then
GetPrivateProfileString(S_TRF, K_ORDCODE, sOrdCode, sOrdCode, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_TRF, K_ORDDESC, sOrdDesc, sOrdDesc, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_TRF, K_PARTCODE, sPartCode, sPartCode, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_TRF, K_MATCODE, sMatCode, sMatCode, m_MainWindow.GetIniFile())
GetPrivateProfileString(S_TRF, K_SURFCODE, sSurfCode, sSurfCode, m_MainWindow.GetIniFile())
' recupero il dato dello spessore che deve essere in mm
dTh = GetPrivateProfileDouble(S_TRF, K_TRFTHICKNESS, dTh, m_MainWindow.GetIniFile())
End If
' inizializzo i campi della finestra
OrdCodeTxBx.Text = sOrdCode
OrdDescTxBx.Text = sOrdDesc
PartCodeTxBx.Text = sPartCode
-2
View File
@@ -1173,10 +1173,8 @@ Public Class DrawPageUC
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
If m_bTrfData Then
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
' carico i dati appena salvati nella pagina
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
If DlgTrfData.ShowDialog() Then
' recupero i dati salvati nella pagina
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
End If
ElseIf m_bCsvData Then
+3 -16
View File
@@ -49,28 +49,15 @@
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="7.25*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
ItemsSource="{Binding ItemList}"/>
<Grid Grid.Row="3" Margin="0,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
</Button>
</Grid>
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Border>
+1 -33
View File
@@ -297,36 +297,6 @@ Public Class ImportPageUC
End Select
End Sub
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
' Elimino spazi iniziali e finali
FindTxBx.Text = FindTxBx.Text.Trim()
' ricarico la lista dei file
LoadCurrDir()
Dim UpdateListFile As New List(Of IconListBoxItem)
' Se esiste un nome
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
For Each Item As IconListBoxItem In FileListBox.ItemsSource
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
UpdateListFile.Add(Item)
End If
Next
End If
If UpdateListFile.Count > 0 Then
FileListBox.ItemsSource = UpdateListFile
Else
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
End If
End Sub
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
' svuoto la text
FindTxBx.Text = ""
' ricarico la lista dei file
LoadCurrDir()
' e aggiorno la lista dei file
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
End Sub
Private Function ClearView() As Boolean
' Pulisco il DB geometrico locale
EgtNewFile()
@@ -839,7 +809,7 @@ Public Class ImportPageUC
PartId = EgtGetNextPart(PartId)
End While
' identificativo univoico del gruppo di pezzi, se più di un "Repeat"
' identificativo univoico del gruppo di pezzi, se più di un pezzo
Dim sGUICode As New List(Of String)
' Scrivo testi per nesting
@@ -881,7 +851,6 @@ Public Class ImportPageUC
EgtInsertFile(sTmpFile)
Dim FirstOfImport As Integer = EgtGetNextPart(nFirst2Id)
If FirstOfImport = GDB_ID.NULL Then FirstOfImport = EgtGetFirstPart()
Dim Index As Integer = 1
While FirstOfImport <> GDB_ID.NULL And Index <= sGUICode.Count
If Not String.IsNullOrEmpty(sGUICode(Index - 1)) Then
@@ -918,7 +887,6 @@ Public Class ImportPageUC
' Passo al pezzo successivo
nId = EgtGetNextPart(nId)
End While
' Ciclo sui pezzi inseriti
nId = nFirstId
While nId <> GDB_ID.NULL
-27
View File
@@ -578,33 +578,6 @@ Public Class AlarmsPageUC
String.Compare(sMchTool, m_CurrentMachine.sCurrSaw, True) <> 0 Then
m_CurrentMachine.sCurrSawing = String.Empty
End If
'Dim sVal As String = String.Empty
'Dim dVal As Double = 0
'If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSawing, false) Then
' StringToDouble(sVal, dVal)
' m_CurrentMachine.SetFsevLength(dVal)
'End If
'If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSawing, false) Then
' StringToDouble(sVal, dVal)
' m_CurrentMachine.SetFsevPerc(dVal)
'End If
Dim sVal As String = String.Empty
Dim dVal As Double = 0
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, dVal)
m_CurrentMachine.SetFsevLength(dVal)
End If
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, dVal)
m_CurrentMachine.SetFsevPerc(dVal)
End If
' Leggo parametri per variazione feed in tagli aggiornati in funzione della lama
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
' Aggiorno utensili per lavoro in corso
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
' aggiorno la lista delle lavorazioni
-167
View File
@@ -609,18 +609,6 @@ Public Class CurrentMachine
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
m_sCurrSawing = value
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
'' aggiorno il file ini della macchina con i valori correnti della lavorazione
'Dim sVal As String = String.Empty
'Dim dVal As Double = m_dFsevLength
'If GetUserNote("FsevLength", sVal, m_sCurrSawing, False) Then
' StringToDouble(sVal, dVal)
' SetFsevLength(dVal)
'End If
'dVal = m_dFsevPerc
'If GetUserNote("FsevPerc", sVal, m_sCurrSawing, False) Then
' StringToDouble(sVal, m_dFsevPerc)
' SetFsevPerc(dVal)
'End If
End If
End Set
End Property
@@ -873,18 +861,9 @@ Public Class CurrentMachine
Set(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevLength = value
' salvo il dato nelle UserNote della lavorazione
'MdbSetCurrMachiningUserNote("FsevLength", m_dFsevLength.ToString, sCurrSawing, false)
' salvo il dato nelle UserNote dell'utensile
TdbSetCurrToolUserNote("FsevLength", m_dFsevLength.ToString, sCurrSaw)
End If
End Set
End Property
Friend Sub SetFsevLength(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevLength = value
End If
End Sub
Friend Property dFsevPerc As Double
Get
@@ -893,18 +872,9 @@ Public Class CurrentMachine
Set(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevPerc = value
'' salvo il dato nelle UserNote della lavorazione
'MdbSetCurrMachiningUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSawing)
' salvo il dato nelle UserNote dell'utensile
TdbSetCurrToolUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSaw)
End If
End Set
End Property
Friend Sub SetFsevPerc(value As Double)
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
m_dFsevPerc = value
End If
End Sub
Friend ReadOnly Property ToolChangerNbr As Integer
Get
@@ -1295,7 +1265,6 @@ Public Class CurrentMachine
' Leggo dati per feed ridotta all'inizio/fine dei tagli
m_bFsevEnable = (GetPrivateProfileInt(S_NEST, K_MACH_CUTFSEVENABLE, 0, sMachIniFile) <> 0)
' sposto la lettura nel DB delle lavorazioni della lama corrente!
m_dFsevLength = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVLEN, 0, sMachIniFile)
m_dFsevPerc = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVPERC, 0, sMachIniFile)
@@ -1417,142 +1386,6 @@ Public Class CurrentMachine
Return dMaxThick
End Function
#Region "USERNOTE"
' recupero le note UserNote associate alla LAVORAZIONE Machining
Friend Function MdbGetCurrMachiningUserNote(Machining As String) As String
Dim UserNotes As String = String.Empty
' lavorazione corrente
Dim CurrMach As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
' Imposto utensile lama corrente
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
' leggo nel db corrente della lavorazione questa info
EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, UserNotes)
' reimposto lavorazione corrente
EgtMdbSetCurrMachining(CurrMach)
End If
Return UserNotes
End Function
' recupero le note UserNote associate all'UTENSILE Tool
Friend Function TdbGetCurrToolUserNote(Tool As String) As String
Dim UserNotes As String = String.Empty
' lavorazione corrente
Dim CurrTool As String = String.Empty
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
' Imposto utensile lama corrente
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
' leggo nel db corrente della lavorazione questa info
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, UserNotes)
' reimposto lavorazione corrente
EgtTdbSetCurrTool(CurrTool)
End If
Return UserNotes
End Function
' imposta il nuovo valore in UserNote della LAVORAZIONE Machining
Friend Sub MdbSetCurrMachiningUserNote(sKeyUserNote As String, sValUserNote As String, Machining As String)
' lavorazione corrente
Dim CurrMach As String = String.Empty
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
' Imposto utensile lama corrente
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
Dim UserNotes As String = String.Empty
' salvo nel db corrente della lavorazione questa info devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Machining))
EgtMdbSaveCurrMachining()
EgtMdbSave()
' reimposto lavorazione corrente
EgtMdbSetCurrMachining(CurrMach)
End If
End Sub
' imposta il nuovo valore in UserNote dell'UTENSILE Tool
Friend Sub TdbSetCurrToolUserNote(sKeyUserNote As String, sValUserNote As String, Tool As String)
' lavorazione corrente
Dim CurrTool As String = String.Empty
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
' Imposto utensile lama corrente
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
Dim UserNotes As String = String.Empty
' salvo nel db corrente della lavorazione questa info devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Tool))
EgtTdbSaveCurrTool()
EgtTdbSave()
' reimposto lavorazione corrente
EgtTdbSetCurrTool(Tool)
End If
End Sub
' separa la le note UserNote della LAVORAZIONE
Private Function SplitUserNoteMachinig(Machining As String) As String()
Dim sUserNotes As String = MdbGetCurrMachiningUserNote(Machining)
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
Dim sItems As String() = sUserNotes.Split(";"c)
Return sItems
End Function
' separa la le note UserNote della LAVORAZIONE
Private Function SplitUserNoteTool(Tool As String) As String()
Dim sUserNotes As String = TdbGetCurrToolUserNote(Tool)
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
Dim sItems As String() = sUserNotes.Split(";"c)
Return sItems
End Function
' recupera il valore della associato alla chiave per la lavorazione oppure utensile (bIsToolNote)
Friend Function GetUserNote(sKeyUserNote As String, ByRef sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As Boolean
Dim sUserNotesList As String() = Nothing
If bIsToolNote Then
sUserNotesList = SplitUserNoteTool(sName)
Else
sUserNotesList = SplitUserNoteMachinig(sName)
End If
If IsNothing(sUserNotesList) Then Return False
For Index As Integer = 0 To sUserNotesList.Count - 1
Dim sNote As String() = sUserNotesList(Index).Split("="c)
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
sValUserNote = sNote(1).Trim
End If
Next
Return True
End Function
' ricostruisce la stringa UserNote da salvare
Friend Function AssembUserNote(sKeyUserNote As String, sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As String
Dim sUserNotes As String = String.Empty
Dim sUserNotesList As String() = Nothing
If bIsToolNote Then
sUserNotesList = SplitUserNoteTool(sName)
Else
sUserNotesList = SplitUserNoteMachinig(sName)
End If
Dim bExists As Boolean = False
If Not IsNothing(sUserNotesList) Then
For Index As Integer = 0 To sUserNotesList.Count - 1
Dim sNote As String() = sUserNotesList(Index).Split("="c)
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
sUserNotesList(Index) = sKeyUserNote & "=" & sValUserNote
bExists = True
Exit For
End If
Next
' riassemblo la stringa
For Each Item As String In sUserNotesList
If Not String.IsNullOrWhiteSpace(Item) Then
sUserNotes &= Item & ";"
End If
Next
End If
If Not bExists Then
sUserNotes &= sKeyUserNote & "=" & sValUserNote & ";"
End If
Return sUserNotes
End Function
#End Region ' USERNOTE
Friend Function IsVacuumMovePossible() As Boolean
' Recupero diametro lama corrente
EgtTdbSetCurrTool(sCurrSaw)
-10
View File
@@ -546,16 +546,6 @@ Class MainWindow
m_WorkInProgressPageUC.Prepare()
m_WorkInProgressPageUC.UpdateTools()
Dim sVal As String = String.Empty
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, m_CurrentMachine.dFsevLength)
m_CurrentMachine.SetFsevLength(m_CurrentMachine.dFsevLength)
End If
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
StringToDouble(sVal, m_CurrentMachine.dFsevPerc)
m_CurrentMachine.SetFsevPerc(m_CurrentMachine.dFsevPerc)
End If
' Se macchina fotografica abilitata, ne inizializzo il gestore
#If Not TRIAL Then
If GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO) Then
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.9.2")>
<Assembly: AssemblyFileVersion("2.4.9.2")>
<Assembly: AssemblyVersion("2.4.7.1")>
<Assembly: AssemblyFileVersion("2.4.7.1")>
+9 -30
View File
@@ -2,8 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="OpenPage_Initialized" Loaded="OpenPage_Loaded" Unloaded="OpenPage_Unloaded">
@@ -18,42 +17,22 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!-- Definizione della Grid Superiore -->
<!-- Definizione della Grid Inferiore per i Button V e X -->
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
</Grid>
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<Grid Grid.Row="1" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="6.5*"/>
<RowDefinition Height="0.65*"/>
</Grid.RowDefinitions>
<ListBox Name="FileListBox" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<Grid Grid.Row="1" Margin="0,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
</Button>
</Grid>
</Grid>
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
ItemsSource="{Binding ItemList}"/>
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
<TextBlock Name="MessageTxBx" TextAlignment="Center"
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
-31
View File
@@ -38,7 +38,6 @@ Public Class OpenPageUC
OpenSceneHost.SetValue(Grid.ColumnProperty, 1)
OpenSceneHost.SetValue(Grid.RowProperty, 2)
' OpenSceneHost.SetValue(Grid.RowSpanProperty, 1)
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
Me.OpenPageGrid.Children.Add(OpenSceneHost)
' Definizione del collegamento tra ItemList e ListBox1
@@ -204,36 +203,6 @@ Public Class OpenPageUC
End If
End Sub
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
' Elimino spazi iniziali e finali
FindTxBx.Text = FindTxBx.Text.Trim()
' ricarico la lista dei file
LoadCurrDir()
Dim UpdateListFile As New List(Of IconListBoxItem)
' Se esiste un nome
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
For Each Item As IconListBoxItem In FileListBox.ItemsSource
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
UpdateListFile.Add(Item)
End If
Next
End If
If UpdateListFile.Count > 0 Then
FileListBox.ItemsSource = UpdateListFile
Else
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
End If
End Sub
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
' svuoto la text
FindTxBx.Text = ""
' ricarico la lista dei file
LoadCurrDir()
' e aggiorno la lista dei file
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
End Sub
Private Function ClearView() As Boolean
' Pulisco il DB geometrico locale
EgtNewFile()