Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 55ef0b7fcb |
@@ -442,7 +442,7 @@ Friend Module CamAuto
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId As String In sItems
|
||||
For Each sId In sItems
|
||||
Dim nId As Integer = 0
|
||||
StringToInt(sId, nId)
|
||||
If nId > 0 Then vOthId.Add(nId)
|
||||
@@ -660,7 +660,7 @@ Friend Module CamAuto
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nMchId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId2 As String In sItems
|
||||
For Each sId2 In sItems
|
||||
' Indice gruppo di preview nella lavorazione
|
||||
Dim nId2 As Integer = GDB_ID.NULL
|
||||
StringToInt(sId2, nId2)
|
||||
@@ -699,31 +699,11 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function IsExitPreCut(nOperId As Integer) As Boolean
|
||||
' Deve essere una lavorazione
|
||||
If Not EgtSetCurrMachining(nOperId) Then Return False
|
||||
' Verifico presenza Info di PreCut
|
||||
Return EgtExistsInfo(nOperId, INFO_MCH_EPC)
|
||||
End Function
|
||||
|
||||
Friend Function RemoveAllExitPreCuts() As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
While nOperId <> GDB_ID.NULL
|
||||
Dim nNextOperId As Integer = EgtGetNextOperation( nOperId)
|
||||
If EgtGetType( nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
||||
EgtRemoveOperation( nOperId)
|
||||
End If
|
||||
nOperId = nNextOperId
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||
Dim sPocketMch As String = m_MainWindow.m_CurrentMachine.sCurrPocketing
|
||||
Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
||||
Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
|
||||
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
|
||||
@@ -738,7 +718,6 @@ Friend Module CamAuto
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
||||
|
||||
@@ -568,7 +568,7 @@ Public Class CSVPage
|
||||
' Verifico che il pezzo appartenga a questo Csv
|
||||
If String.Compare(sCsvPath, m_sCsvPath, True) = 0 Then
|
||||
' Cerco il pezzo nella lista dei pezzi
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
For i = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If String.Compare(sName, CurrPart.m_sName, True) = 0 Then
|
||||
' Se nel grezzo
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<TextBlock Name="ValueTxbl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -34,15 +34,10 @@ Public Class EditValueWD
|
||||
End Sub
|
||||
|
||||
Private Sub EditValueWD_Rendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||
' ValueTxBx.Focus()
|
||||
' ValueTxBx.OpenKeyboard(ValueTxBx, ValueTxBx)
|
||||
ValueTxBx.Focus()
|
||||
ValueTxBx.OpenKeyboard(ValueTxBx, ValueTxBx)
|
||||
End Sub
|
||||
|
||||
'Private Sub ValueTxBx_Closed(Sender As Object, e As EventArgs) Handles ValueTxBx.EgtClosed
|
||||
' m_sValue = ValueTxBx.Text
|
||||
' DialogResult = True
|
||||
'End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_sValue = ValueTxBx.Text
|
||||
DialogResult = True
|
||||
|
||||
@@ -41,7 +41,7 @@ Public Class FastGridSlabManager
|
||||
' Recupero parametri per nesting
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.LoadParams()
|
||||
' Recupero dimensioni pezzi da ini
|
||||
For Index As Integer = 1 To 5
|
||||
For Index = 1 To 5
|
||||
GetPieceDimensions(Index)
|
||||
Next
|
||||
' Ne imposto i valori
|
||||
|
||||
@@ -94,9 +94,7 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
' Carico i parametri di movimento
|
||||
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
||||
' Ricavo la lunghezza del baffo di taglio
|
||||
m_dStep = SplitAuto.MaxCuttingMustache(m_dStep)
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+1"
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 3)
|
||||
m_dRotation = GetPrivateProfileDouble(S_RAWMOVE, K_RAWROTATION, 30, m_MainWindow.GetIniFile())
|
||||
RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3)
|
||||
' Se movimento manuale perpendicolare
|
||||
@@ -509,7 +507,7 @@ Public Class MoveRawPartPage
|
||||
If AngRotList.Count > 0 Then
|
||||
Dim bOkRotate As Boolean = False
|
||||
' allora provo a ruotare il pezzo nel verso di rotazione della ventosa
|
||||
For Each AngStep As Double In AngRotList
|
||||
For Each AngStep In AngRotList
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -AngStep) Then
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
|
||||
' riposiziono il pezzo come era prima
|
||||
|
||||
@@ -101,25 +101,16 @@
|
||||
</Button>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -56,11 +56,11 @@ Public Class NestPageUC
|
||||
|
||||
Private Sub NestPage_Initialized(sender As Object, e As EventArgs)
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
InsertPartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo
|
||||
StorePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo
|
||||
RemovePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
|
||||
SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||
DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||
InsertPartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo
|
||||
StorePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo
|
||||
RemovePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
|
||||
SelectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||
DeselectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||
End Sub
|
||||
|
||||
Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
@@ -132,6 +132,9 @@ Public Class NestPageUC
|
||||
Not m_CurrProjPage.m_bSelectCurv Then
|
||||
Return
|
||||
End If
|
||||
|
||||
'------------------- NUOVA DEFINIZIONE -------------------------
|
||||
|
||||
' provo a riconoscere il valore medio del segmento
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
@@ -173,9 +176,13 @@ Public Class NestPageUC
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
Return
|
||||
|
||||
'------------------- NUOVA DEFINIZIONE -------------------------
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||
If Not m_bActive Or m_bRegister Then Return
|
||||
@@ -194,8 +201,6 @@ Public Class NestPageUC
|
||||
While nId <> GDB_ID.NULL
|
||||
' Recupero l'identificativo del pezzo cui appartiene
|
||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
Dim sNamePartId As String = String.Empty
|
||||
EgtGetName(nPartId, sNamePartId)
|
||||
Dim bPartInTable As Boolean = (EgtGetParent(nPartId) = m_nRawId)
|
||||
If EgtIsPart(nPartId) Or bPartInTable Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
@@ -211,40 +216,6 @@ Public Class NestPageUC
|
||||
' Drag possibile
|
||||
m_bDrag = True
|
||||
Exit While
|
||||
Else
|
||||
' verifico se l'elemento selezionato è il nome della tavola
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then
|
||||
Dim nTab As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
|
||||
' se non è stata eseguita nessuna scelta esco dal ciclo
|
||||
If nTab = 0 Then Exit While
|
||||
' imposto l'altra tavola
|
||||
Dim sOtherTab = If( sNamePartId = MAIN_TAB, SECOND_TAB, MAIN_TAB)
|
||||
EgtChangeTable( sOtherTab, True)
|
||||
m_CurrProjPage.AdjustAdditionalTable( True)
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
' aggiorno le lavorazioni
|
||||
UpdateAllMachiningsToolpaths()
|
||||
' aggiorno i movimenti pezzi tra disposizioni
|
||||
For nI As Integer = 1 To EgtGetPhaseCount()
|
||||
EgtSetCurrPhase( nI)
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(nI)
|
||||
SpecialApplyDisposition(nDispId, True)
|
||||
Next
|
||||
' aggiorno posizionamento ventose per lavorazioni da sotto
|
||||
UpdateVacuumsForDrip()
|
||||
' dichiaro tutto aggiornato
|
||||
m_CurrProjPage.SetOrderMachiningFlag()
|
||||
EgtSetCurrPhase(1)
|
||||
' aggiorno posizione pezzi in parcheggio
|
||||
Dim nPPId As Integer = EgtGetFirstPart()
|
||||
While nPPId <> GDB_ID.NULL
|
||||
PackPartInStore(nPPId)
|
||||
nPPId = EgtGetNextPart( nPPId)
|
||||
End While
|
||||
' visualizzazione
|
||||
EgtZoom(ZM.ALL)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
@@ -877,7 +848,7 @@ Public Class NestPageUC
|
||||
|
||||
Private Sub InsertPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertPartBtn.Click
|
||||
' Se inserimento automatico
|
||||
If GetPrivateProfileInt( S_NEST, K_AUTOMATICOPTIMIZE, 0, m_MainWindow.GetIniFile()) <> 0 And
|
||||
If GetPrivateProfileInt( S_MACH_NEST, K_MACH_NEST_AUTOMATIC, 0, m_MainWindow.GetMachIniFile()) <> 0 And
|
||||
m_MainWindow.GetAutoNestingOption() Then
|
||||
AutomaticInsert()
|
||||
' altrimenti inserimento standard
|
||||
@@ -962,7 +933,7 @@ Public Class NestPageUC
|
||||
EnableReferenceRegion(bAligned)
|
||||
' Eseguo nesting automatico
|
||||
Dim bOpimizeOnX As Boolean = ( GetPrivateProfileInt( S_NEST, K_AUTOMATICOPTIMIZE, 2, m_MainWindow.GetIniFile()) = 1)
|
||||
Dim bGuillotineMode As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_GHIGLIOTTINA, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim bGuillotineMode As Boolean = bAligned
|
||||
Dim nAutomaticMaxTime As Integer = GetPrivateProfileInt( S_NEST, K_AUTOMATICMAXTIME, 20, m_MainWindow.GetIniFile())
|
||||
Dim dPartTime As Double = If( bGuillotineMode, 1.0, 0.5)
|
||||
Dim nMaxTime As Integer = Math.Min( 2.0 + dPartTime * vParts.Count(), nAutomaticMaxTime)
|
||||
|
||||
@@ -5,11 +5,6 @@ Public Module SplitAuto
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_dLastDT As Double = 0
|
||||
Public ReadOnly Property dLastDT As Double
|
||||
Get
|
||||
Return m_dLastDT
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Class SplitMach
|
||||
@@ -57,7 +52,7 @@ Public Module SplitAuto
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId As String In sItems
|
||||
For Each sId In sItems
|
||||
Dim nId As Integer = 0
|
||||
StringToInt(sId, nId)
|
||||
If nId > 0 Then Mach.m_vOthId.Add(nId)
|
||||
@@ -273,7 +268,7 @@ Public Module SplitAuto
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nOpeId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId As String In sItems
|
||||
For Each sId In sItems
|
||||
Dim nId As Integer = GDB_ID.NULL
|
||||
StringToInt(sId, nId)
|
||||
Dim nPvId2 As Integer = GDB_ID.NULL
|
||||
@@ -303,7 +298,7 @@ Public Module SplitAuto
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nOpeId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId As String In sItems
|
||||
For Each sId In sItems
|
||||
Dim nId As Integer = GDB_ID.NULL
|
||||
StringToInt(sId, nId)
|
||||
Dim nPvId2 As Integer = GDB_ID.NULL
|
||||
@@ -389,7 +384,7 @@ Public Module SplitAuto
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId2 As String In sItems
|
||||
For Each sId2 In sItems
|
||||
Dim nId2 As Integer = 0
|
||||
StringToInt(sId2, nId2)
|
||||
If nId2 > 0 Then EgtChangeOperationPhase(nId2, nNewPhase)
|
||||
@@ -816,36 +811,10 @@ Public Module SplitAuto
|
||||
End If
|
||||
Next
|
||||
' Cancello curve offset
|
||||
For i As Integer = 0 To nCount - 1
|
||||
For i = 0 To nCount - 1
|
||||
EgtErase(nOffsId + i)
|
||||
Next
|
||||
Return (Not bInterf)
|
||||
End Function
|
||||
|
||||
Public Function MaxCuttingMustache(dMustache As Double) As Double
|
||||
Dim MachSplitList As New List(Of SplitMach)
|
||||
' Recupero l'indice della fase corrente
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
' se non è stata creata nessuna lista allora restituisco il valore di Default
|
||||
If Not CalculateSplitMachList(nCurrPhase, MachSplitList) Then Return dMustache
|
||||
Dim NewMustache As Double = 0
|
||||
Dim ItemMachSplit As SplitMach
|
||||
For Each ItemMachSplit In MachSplitList
|
||||
' Recupero lunghezza baffo secondo taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(ItemMachSplit.m_nId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double
|
||||
If EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT) Then
|
||||
If NewMustache < dDT Then NewMustache = dDT
|
||||
End If
|
||||
Next
|
||||
Dim dExtraL As Double = 0
|
||||
EgtMdbGetGeneralParam(MCH_GP.EXTRALONCUTREG, dExtraL)
|
||||
' se esiste il valore di un baffo allora sovrascrivo il valore di default
|
||||
If NewMustache > 0 Then
|
||||
dMustache = Math.Ceiling(NewMustache)
|
||||
End If
|
||||
Return dMustache + dExtraL
|
||||
End Function
|
||||
|
||||
End Module
|
||||
@@ -100,15 +100,9 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-ONImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -119,17 +113,11 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -151,42 +139,18 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Modifica-InizioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Modifica-FineImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource InvertiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-allungaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-accorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -29,24 +29,24 @@ Public Class SplitPageUC
|
||||
' Collego lista di oggetti a ListBox
|
||||
MachiningLsBx.ItemsSource = m_ItemList
|
||||
' Assegno testi
|
||||
OnOffBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 1) ' On/Off
|
||||
AllOnBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 2) ' Tutti On
|
||||
AllOffBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 3) ' Tutti Off
|
||||
CutBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 4) ' Allunga/Accorcia
|
||||
CutStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 5) ' Inizio Allunga/Accorcia
|
||||
CutEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 6) ' Fine Allunga/Accorcia
|
||||
OutCenStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 7) ' Inizio Centro/Fuori
|
||||
OutCenEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori
|
||||
ModifStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 33) ' Inizio Modif.
|
||||
ModifEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 34) ' Fine Modif.
|
||||
InvertBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 36) ' Inverti
|
||||
PauseBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off
|
||||
AllOutStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 8) ' Inizi Tutti Fuori
|
||||
AllCenStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 9) ' Inizi Tutti Centro
|
||||
AllOutEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 13) ' Fine Tutti Fuori
|
||||
AllCenEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 14) ' Fine Tutti Centro
|
||||
AllExtendBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 15) ' Allunga Tutti
|
||||
AllReduceBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 16) ' Accorc. Tutti
|
||||
OnOffBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 1) ' On/Off
|
||||
AllOnBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 2) ' Tutti On
|
||||
AllOffBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 3) ' Tutti Off
|
||||
CutBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 4) ' Allunga/Accorcia
|
||||
CutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 5) ' Inizio Allunga/Accorcia
|
||||
CutEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 6) ' Fine Allunga/Accorcia
|
||||
OutCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 7) ' Inizio Centro/Fuori
|
||||
OutCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori
|
||||
ModifStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 33) ' Inizio Modif.
|
||||
ModifEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 34) ' Fine Modif.
|
||||
InvertBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 36) ' Inverti
|
||||
PauseBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off
|
||||
AllOutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 8) ' Inizi Tutti Fuori
|
||||
AllCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 9) ' Inizi Tutti Centro
|
||||
AllOutEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 13) ' Fine Tutti Fuori
|
||||
AllCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 14) ' Fine Tutti Centro
|
||||
AllExtendBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 15) ' Allunga Tutti
|
||||
AllReduceBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 16) ' Accorc. Tutti
|
||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) ' Modifica
|
||||
AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto
|
||||
RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart
|
||||
@@ -73,8 +73,6 @@ Public Class SplitPageUC
|
||||
' Deseleziono pezzi
|
||||
EgtDeselectAll()
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino eventuali pretagli su uscite
|
||||
RemoveAllExitPreCuts()
|
||||
' Se non sono in sola visualizzazione, faccio ordine automatico delle lavorazioni
|
||||
If Not m_bShow Then
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
@@ -153,10 +151,6 @@ Public Class SplitPageUC
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
||||
If Mach.m_bPause Then AddPauseText( sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
|
||||
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
||||
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
@@ -182,7 +176,7 @@ Public Class SplitPageUC
|
||||
If MachiningLsBx.SelectedItems.Count = 0 Then Return
|
||||
' creo lista ordinata dei selezionati
|
||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||
For Each Item In MachiningLsBx.SelectedItems
|
||||
ItemList.Add(Item)
|
||||
Next
|
||||
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(m_ItemList.IndexOf(x), m_ItemList.IndexOf(y)))
|
||||
@@ -194,7 +188,7 @@ Public Class SplitPageUC
|
||||
If MachiningLsBx.SelectedItems.Count = 1 Then
|
||||
bContigus = True
|
||||
Else
|
||||
For Each Item As NameIdLsBxItem In ItemList
|
||||
For Each Item In ItemList
|
||||
If Item.Ind = LastSel.Ind + 1 Or Item.Ind = LastSel.Ind - 1 Then
|
||||
bContigus = True
|
||||
End If
|
||||
@@ -207,7 +201,7 @@ Public Class SplitPageUC
|
||||
End If
|
||||
' resetto marcatura lavorazioni
|
||||
If m_CurrFirstInd > -1 Then
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
MarkMachining(m_ItemList(Index).Ind, False)
|
||||
Next
|
||||
End If
|
||||
@@ -215,7 +209,7 @@ Public Class SplitPageUC
|
||||
m_CurrFirstInd = -1
|
||||
m_CurrLastInd = -1
|
||||
' marco lavorazioni selezionate
|
||||
For Each Item As NameIdLsBxItem In ItemList
|
||||
For Each Item In ItemList
|
||||
MarkMachining(Item.Ind, True)
|
||||
Next
|
||||
m_CurrFirstInd = m_ItemList.IndexOf(ItemList(0))
|
||||
@@ -243,7 +237,7 @@ Public Class SplitPageUC
|
||||
m_ItemList.Move(m_CurrLastInd + 1, m_CurrFirstInd)
|
||||
MoveMachining(m_CurrLastInd + 1, m_CurrFirstInd)
|
||||
' aggiorno gli indici degli elementi coinvolti nello spostamento (selezionati e non)
|
||||
For index As Integer = m_CurrLastInd + 1 To m_CurrFirstInd Step -1
|
||||
For index = m_CurrLastInd + 1 To m_CurrFirstInd Step -1
|
||||
m_ItemList(index).Ind = index
|
||||
Next
|
||||
m_CurrFirstInd += 1
|
||||
@@ -253,7 +247,7 @@ Public Class SplitPageUC
|
||||
m_ItemList.Move(m_CurrFirstInd - 1, m_CurrLastInd)
|
||||
MoveMachining(m_CurrFirstInd - 1, m_CurrLastInd)
|
||||
' aggiorno gli indici degli elementi coinvolti nello spostamento (selezionati e non)
|
||||
For index As Integer = m_CurrFirstInd - 1 To m_CurrLastInd
|
||||
For index = m_CurrFirstInd - 1 To m_CurrLastInd
|
||||
m_ItemList(index).Ind = index
|
||||
Next
|
||||
m_CurrFirstInd -= 1
|
||||
@@ -272,7 +266,7 @@ Public Class SplitPageUC
|
||||
|
||||
Private Sub OnOffBtn_Click(sender As Object, e As RoutedEventArgs) Handles OnOffBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
If m_MachiningList(nI).m_bEnabled Then
|
||||
m_MachiningList(nI).m_bEnabled = False
|
||||
@@ -326,7 +320,7 @@ Public Class SplitPageUC
|
||||
Private Sub CutBtn_Click(sender As Object, e As RoutedEventArgs) Handles CutBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
' Provo ad entrambi gli estremi
|
||||
Dim bModif As Boolean = AdjustBothCuts(nI)
|
||||
@@ -351,7 +345,7 @@ Public Class SplitPageUC
|
||||
Private Sub CutEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles CutEndBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
' Eseguo
|
||||
If AdjustEndCut(nI) Then
|
||||
@@ -370,7 +364,7 @@ Public Class SplitPageUC
|
||||
Private Sub CutStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles CutStartBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
' Eseguo
|
||||
If AdjustStartCut(nI) Then
|
||||
@@ -498,7 +492,7 @@ Public Class SplitPageUC
|
||||
Private Sub OutCenStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles OutCenStartBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
@@ -596,7 +590,7 @@ Public Class SplitPageUC
|
||||
Private Sub OutCenEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles OutCenEndBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
@@ -734,55 +728,33 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ModifStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles ModifStartBtn.Click
|
||||
' abilito la finestra per inserire i valori solo per il primo elemento della lista (di default tutti gli altri oggetti assumono lo stesso valore)
|
||||
Dim bFirstInd As Boolean = True
|
||||
' elenco delle variabili : MCH_MY.SAWING/MCH_MY.MILLING
|
||||
Dim dUsal As Double = 0
|
||||
|
||||
' elenco delle variabili : MCH_MY.WATERJETTING
|
||||
Dim dWJAddLen As Double = 0
|
||||
Dim bWJLiHole As Boolean = True
|
||||
Dim nWJTangDist As Double = 0
|
||||
Dim nWJPerpDist As Double = 0
|
||||
Dim nWJLeadInType As Integer = 0
|
||||
|
||||
' Recupero la lavorazione corrente
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
||||
' Se taglio con lama
|
||||
If nMachiningType = MCH_MY.SAWING And
|
||||
(m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dPrevAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||
' leggo il valore salvato nella geometria
|
||||
( m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dPrevAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||
Dim dOrigUsal As Double = 0
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstInd Then
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUsal)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
' carico il valore letto dal testierino virtuale
|
||||
dUsal = ValWnd.GetVal()
|
||||
' comunico che ho letto il primo dato
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUsal)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
Dim dUsal As Double = ValWnd.GetVal()
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
EgtGetInfo( EgtGetFirstNameInGroup( nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
EgtGetInfo( EgtGetFirstGroupInGroup( nPvId), "DT", dDT)
|
||||
dUsal = Math.Min( dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
@@ -797,26 +769,15 @@ Public Class SplitPageUC
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
bGenModif = True
|
||||
|
||||
' se altrimenti fresatura sopra
|
||||
' se altrimenti fresatura sopra
|
||||
ElseIf nMachiningType = MCH_MY.MILLING And m_MachiningList(nI).m_sLay = NAME_ONPATH Then
|
||||
|
||||
' leggo il valore salvato nella geometria
|
||||
Dim dOrigUsal As Double = 0
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
If bFirstInd Then
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUsal)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
' carico il valore letto dal testierino virtuale
|
||||
dUsal = ValWnd.GetVal()
|
||||
' comunico che ho letto il primo dato
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUsal)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
Dim dUsal As Double = ValWnd.GetVal()
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
@@ -825,59 +786,41 @@ Public Class SplitPageUC
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
bGenModif = True
|
||||
|
||||
' se altrimenti getto d'acqua
|
||||
' se altrimenti getto d'acqua
|
||||
ElseIf nMachiningType = MCH_MY.WATERJETTING Then
|
||||
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstInd Then
|
||||
' Recupero i valori attuali della lavorazione
|
||||
Dim bOriginalIsLeadIn As Boolean = True
|
||||
Dim dOriginalAddLen As Double = 0
|
||||
Dim bOriginalLiHole As Boolean = True
|
||||
Dim nOriginalTangDist As Double = 0
|
||||
Dim nOriginalPerpDist As Double = 0
|
||||
Dim nOriginalLeadInType As Integer = 0
|
||||
EgtSetCurrMachining(nOperId)
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dOriginalAddLen)
|
||||
EgtGetMachiningParam(MCH_MP.LIHOLE, bOriginalLiHole)
|
||||
EgtGetMachiningParam(MCH_MP.LITANG, nOriginalTangDist)
|
||||
EgtGetMachiningParam(MCH_MP.LIPERP, nOriginalPerpDist)
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nOriginalLeadInType)
|
||||
' Dialogo richiesta valori
|
||||
Dim ModifStartWnd As New ModifStartEndWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 33), bOriginalIsLeadIn, nOperId) ' Inizio Modif.
|
||||
ModifStartWnd.SetElongation(dOriginalAddLen)
|
||||
ModifStartWnd.SetHole(bOriginalLiHole)
|
||||
ModifStartWnd.SetLiTangDist(nOriginalTangDist)
|
||||
ModifStartWnd.SetLiPerpDist(nOriginalPerpDist)
|
||||
ModifStartWnd.SetLeadInType(nOriginalLeadInType)
|
||||
If Not ModifStartWnd.ShowDialog() Then Return
|
||||
|
||||
' carico il valore letto dal testierino virtuale
|
||||
dWJAddLen = ModifStartWnd.GetElongation()
|
||||
bWJLiHole = ModifStartWnd.GetHole()
|
||||
nWJTangDist = ModifStartWnd.GetLiTangDist()
|
||||
nWJPerpDist = ModifStartWnd.GetLiPerpDist()
|
||||
nWJLeadInType = ModifStartWnd.GetLeadInType().Id
|
||||
' comunico che ho letto il primo dato
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
|
||||
' Recupero i valori attuali della lavorazione
|
||||
Dim bIsLeadIn As Boolean = True
|
||||
Dim dAddLen As Double = 0
|
||||
Dim bLiHole As Boolean = true
|
||||
Dim nTangDist As Double = 0
|
||||
Dim nPerpDist As Double = 0
|
||||
Dim LeadInType As Integer = 0
|
||||
EgtSetCurrMachining( nOperId)
|
||||
EgtGetMachiningParam( MCH_MP.STARTADDLEN, dAddLen)
|
||||
EgtGetMachiningParam( MCH_MP.LIHOLE, bLiHole)
|
||||
EgtGetMachiningParam( MCH_MP.LITANG, nTangDist)
|
||||
EgtGetMachiningParam( MCH_MP.LIPERP, nPerpDist)
|
||||
EgtGetMachiningParam( MCH_MP.LEADINTYPE, LeadInType)
|
||||
' Dialogo richiesta valori
|
||||
Dim ModifStartWnd As New ModifStartEndWD( m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 33), bIsLeadIn, nOperId) ' Inizio Modif.
|
||||
ModifStartWnd.SetElongation( dAddLen)
|
||||
ModifStartWnd.SetHole( bLiHole)
|
||||
ModifStartWnd.SetLeadInType( LeadInType)
|
||||
ModifStartWnd.SetLiTangDist( nTangDist)
|
||||
ModifStartWnd.SetLiPerpDist( nPerpDist)
|
||||
If Not ModifStartWnd.ShowDialog() Then return
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
EgtSetMachiningParam(MCH_MP.LIHOLE, bWJLiHole)
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dWJAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, nWJLeadInType)
|
||||
EgtSetMachiningParam(MCH_MP.LITANG, nWJTangDist)
|
||||
EgtSetMachiningParam(MCH_MP.LIPERP, nWJPerpDist)
|
||||
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
|
||||
EgtSetCurrMachining( nOperId)
|
||||
EgtSetMachiningParam( MCH_MP.LIHOLE, ModifStartWnd.GetHole())
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, ModifStartWnd.GetElongation())
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, ModifStartWnd.GetLeadInType().Id)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, ModifStartWnd.GetLiTangDist())
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, ModifStartWnd.GetLiPerpDist())
|
||||
UpdateMachiningPreview( m_MachiningList(nI).m_nId, True)
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining( m_MachiningList(nI))
|
||||
ColorNumberArrow( nI)
|
||||
bGenModif = True
|
||||
End If
|
||||
Next
|
||||
@@ -889,81 +832,56 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ModifEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles ModifEndBtn.Click
|
||||
' abilito la finestra per inserire i valori solo per il primo elemento della lista (di default tutti gli altri oggetti assumono lo stesso valore)
|
||||
Dim bFirstInd As Boolean = True
|
||||
' elenco delle variabili : MCH_MY.SAWING/MCH_MY.MILLING
|
||||
Dim dUeal As Double = 0
|
||||
|
||||
' Recupero i valori attuali della lavorazione
|
||||
Dim dWJAddLen As Double = 0
|
||||
Dim WJLeadOutType As Integer = 0
|
||||
Dim nWJTangDist As Double = 0
|
||||
Dim nWJPerpDist As Double = 0
|
||||
|
||||
' Recupero la lavorazione corrente
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As integer = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList( Index).Ind
|
||||
Dim nOperId As Integer = m_MachiningList( nI).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType( nOperId)
|
||||
' Se taglio con lama
|
||||
If nMachiningType = MCH_MY.SAWING And
|
||||
(m_MachiningList(nI).m_bIsLine Or m_MachiningList(nI).m_dNextAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||
|
||||
( m_MachiningList( nI).m_bIsLine Or m_MachiningList( nI).m_dNextAng > FL_ARC_ANG_MIN Or m_MachiningList(nI).m_sLay = NAME_ONPATH) Then
|
||||
Dim dOrigUeal As Double = 0
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstInd Then
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUeal)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
dUeal = ValWnd.GetVal()
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD( m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUeal)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
Dim dUeal As Double = ValWnd.GetVal()
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
EgtGetInfo( EgtGetFirstNameInGroup( nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
EgtGetInfo( EgtGetFirstGroupInGroup( nPvId), "DT", dDT)
|
||||
dUeal = Math.Min( dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
EgtSetCurrMachining( nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
EgtGetMachiningParam( MCH_MP.ENDADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then Return
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo( nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview( m_MachiningList(nI).m_nId, True)
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining( m_MachiningList(nI))
|
||||
ColorNumberArrow( nI)
|
||||
bGenModif = True
|
||||
' se altrimenti fresatura sopra
|
||||
' se altrimenti fresatura sopra
|
||||
ElseIf nMachiningType = MCH_MY.MILLING And m_MachiningList(nI).m_sLay = NAME_ONPATH Then
|
||||
|
||||
Dim dOrigUeal As Double = 0
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
If bFirstInd Then
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUeal)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
dUeal = ValWnd.GetVal()
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal(dOrigUeal)
|
||||
If Not ValWnd.ShowDialog() Then Return
|
||||
Dim dUeal As Double = ValWnd.GetVal()
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
@@ -972,46 +890,36 @@ Public Class SplitPageUC
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
bGenModif = True
|
||||
' se altrimenti getto d'acqua
|
||||
' se altrimenti getto d'acqua
|
||||
ElseIf nMachiningType = MCH_MY.WATERJETTING Then
|
||||
|
||||
If bFirstInd Then
|
||||
' Recupero i valori attuali della lavorazione
|
||||
Dim dAddLen As Double = 0
|
||||
Dim LeadOutType As Integer = 0
|
||||
Dim nTangDist As Double = 0
|
||||
Dim nPerpDist As Double = 0
|
||||
EgtSetCurrMachining(nOperId)
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, LeadOutType)
|
||||
EgtGetMachiningParam(MCH_MP.LOTANG, nTangDist)
|
||||
EgtGetMachiningParam(MCH_MP.LOPERP, nPerpDist)
|
||||
' Dialogo richiesta valore
|
||||
Dim ModifStartWnd As New ModifStartEndWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 34), False, nOperId) ' Fine Modif.
|
||||
ModifStartWnd.SetElongation(dAddLen)
|
||||
ModifStartWnd.SetLeadOutType(LeadOutType)
|
||||
ModifStartWnd.SetLoTangDist(nTangDist)
|
||||
ModifStartWnd.SetLoPerpDist(nPerpDist)
|
||||
If Not ModifStartWnd.ShowDialog() Then Return
|
||||
dWJAddLen = ModifStartWnd.GetElongation()
|
||||
WJLeadOutType = ModifStartWnd.GetLeadOutType().Id
|
||||
nWJTangDist = ModifStartWnd.GetLoTangDist()
|
||||
nWJPerpDist = ModifStartWnd.GetLoPerpDist()
|
||||
bFirstInd = False
|
||||
End If
|
||||
|
||||
' Recupero i valori attuali della lavorazione
|
||||
Dim dAddLen As Double = 0
|
||||
Dim LeadOutType As Integer = 0
|
||||
Dim nTangDist As Double = 0
|
||||
Dim nPerpDist As Double = 0
|
||||
EgtSetCurrMachining(nOperId)
|
||||
EgtGetMachiningParam( MCH_MP.ENDADDLEN, dAddLen)
|
||||
EgtGetMachiningParam( MCH_MP.LEADOUTTYPE, LeadOutType)
|
||||
EgtGetMachiningParam( MCH_MP.LOTANG, nTangDist)
|
||||
EgtGetMachiningParam( MCH_MP.LOPERP, nPerpDist)
|
||||
' Dialogo richiesta valore
|
||||
Dim ModifStartWnd As New ModifStartEndWD( m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 34), False, nOperId) ' Fine Modif.
|
||||
ModifStartWnd.SetElongation( dAddLen)
|
||||
ModifStartWnd.SetLeadOutType( LeadOutType)
|
||||
ModifStartWnd.SetLoTangDist( nTangDist)
|
||||
ModifStartWnd.SetLoPerpDist( nPerpDist)
|
||||
If Not ModifStartWnd.ShowDialog() Then Return
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dWJAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, WJLeadOutType)
|
||||
EgtSetMachiningParam(MCH_MP.LOTANG, nWJTangDist)
|
||||
EgtSetMachiningParam(MCH_MP.LOPERP, nWJPerpDist)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, ModifStartWnd.GetElongation())
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, ModifStartWnd.GetLeadOutType().Id)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, ModifStartWnd.GetLoTangDist())
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, ModifStartWnd.GetLoPerpDist())
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining( m_MachiningList(nI))
|
||||
ColorNumberArrow( nI)
|
||||
bGenModif = True
|
||||
End If
|
||||
Next
|
||||
@@ -1024,7 +932,7 @@ Public Class SplitPageUC
|
||||
|
||||
Private Sub InvertBtn_Click(sender As Object, e As RoutedEventArgs) Handles InvertBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
' Si possono invertire solo i tagli di lama
|
||||
If m_MachiningList( nI).m_nType <> MCH_OY.SAWING Then Continue For
|
||||
@@ -1069,7 +977,7 @@ Public Class SplitPageUC
|
||||
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
If GetPause(nOperId) Then
|
||||
@@ -1189,7 +1097,7 @@ Public Class SplitPageUC
|
||||
If m_bModified Then
|
||||
' Al primo posto deve rimanere la disposizione della fase
|
||||
Dim nFirstOperId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
For i As Integer = m_ItemList.Count() - 1 To 0 Step -1
|
||||
For i = m_ItemList.Count() - 1 To 0 Step -1
|
||||
Dim nI As Integer = m_ItemList(i).Ind
|
||||
Dim nMchId As Integer = m_MachiningList(nI).m_nId
|
||||
EgtRelocate(nMchId, nFirstOperId, GDB_POS.AFTER)
|
||||
@@ -1515,7 +1423,7 @@ Public Class SplitPageUC
|
||||
EgtDisableModified()
|
||||
' cancello evidenziazione
|
||||
If m_CurrFirstInd >= 0 Then
|
||||
For Index As integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index = m_CurrFirstInd To m_CurrLastInd
|
||||
MarkMachining(m_ItemList(Index).Ind, False)
|
||||
Next
|
||||
m_CurrFirstInd = -1
|
||||
|
||||
@@ -244,8 +244,6 @@ Module ConstGen
|
||||
Public Const INFO_MCH_USER_SAL As String = "Usal"
|
||||
' Info allungamento finale lavorazione imposto dall'utente
|
||||
Public Const INFO_MCH_USER_EAL As String = "Ueal"
|
||||
' Info lavorazione di tipo pretaglio sull'uscita
|
||||
Public Const INFO_MCH_EPC As String = "EPC"
|
||||
' Nome contorno taglio
|
||||
Public Const NAME_PV_CUT As String = "CUT"
|
||||
' Nome contorno pre-taglio
|
||||
@@ -334,8 +332,6 @@ Module ConstGen
|
||||
' Nome di pezzo temporaneo che serve per copia dime
|
||||
Public Const NAME_COPYTEMPLATE As String = "CopyTemplate"
|
||||
|
||||
' Nome layer solidi per VM
|
||||
Public Const NAME_VM_SOLID As String = "Solid"
|
||||
' Chiave per Id originale del pezzo per VeinMatch
|
||||
Public Const KEY_ORI_ID As String = "OriId"
|
||||
|
||||
@@ -345,9 +341,6 @@ Module ConstGen
|
||||
' Lunghezza libera infinita
|
||||
Public Const FREELEN_INF = 9999
|
||||
|
||||
' Costante per lunghezza gambo di lama
|
||||
Public Const STEM = 131072
|
||||
|
||||
' Colori per lavorazioni
|
||||
Public Function COL_MCH_CUT() As Color3d
|
||||
Return New Color3d(0, 255, 0)
|
||||
|
||||
@@ -45,7 +45,6 @@ Module ConstIni
|
||||
Public Const K_VIRTUALKEYBOARD As String = "VirtualKeyboard"
|
||||
Public Const K_THEME As String = "Theme"
|
||||
Public Const K_MANUAL_CUT As String = "ManualCut"
|
||||
Public Const K_TEST As String = "Test"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -80,13 +79,6 @@ Module ConstIni
|
||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
Public Const K_DISTLINE As String = "DistLine"
|
||||
|
||||
Public Const S_ALZFRONT As String = "Alz&Front"
|
||||
Public Const K_ALZFRONT As String = "Alz&Front"
|
||||
Public Const K_ALZ_HEIGHT As String = "A_Height"
|
||||
Public Const K_ALZ_DELTA_ANG As String = "A_DeltaAng"
|
||||
Public Const K_FRONT_HEIGHT As String = "F_Height"
|
||||
Public Const K_FRONT_DELTA_ANG As String = "F_DeltaAng"
|
||||
|
||||
Public Const S_GRID As String = "Grid"
|
||||
Public Const K_SHOWGRID As String = "ShowGrid"
|
||||
Public Const K_SHOWFRAME As String = "ShowFrame"
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
Public Const S_NCNUM As String = "NcNUM"
|
||||
Public Const K_RESETSENDDELAY As String = "ResetSendDelay"
|
||||
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
||||
|
||||
Public Const S_NCDATA As String = "NcData"
|
||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||
@@ -102,12 +101,10 @@
|
||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||
' Nuove variabili
|
||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||
Public Const K_XYJOG As String = "XYJog"
|
||||
Public Const K_ZCJOG As String = "ZCJog"
|
||||
Public Const K_ZBJOG As String = "ZBJog"
|
||||
Public Const K_XYAXES As String = "XYAxes"
|
||||
Public Const K_ZAXES As String = "ZAxes"
|
||||
Public Const K_BCAXES As String = "BCAxes"
|
||||
Public Const K_POWERON As String = "PowerON"
|
||||
Public Const K_POWEROFF As String = "PowerOFF"
|
||||
Public Const K_REMOTE As String = "Remote"
|
||||
|
||||
Public Const S_PRODUCTIONLINE As String = "ProductionLine"
|
||||
Public Const K_ACTIVE As String = "Active"
|
||||
@@ -139,7 +136,6 @@
|
||||
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
|
||||
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
|
||||
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
||||
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
||||
|
||||
Public Const S_PHOTO As String = "Photo"
|
||||
Public Const K_PHOTO_OFFSETX As String = "OffsetX"
|
||||
@@ -190,7 +186,6 @@
|
||||
Public Const K_MACH_REDUCEDDEPTH As String = "ReducedDepth"
|
||||
Public Const K_MACH_EXTARCMINRAD As String = "ExtArcMinRad"
|
||||
Public Const K_MACH_INTARCMAXSIDEANG As String = "IntArcMaxSideAng"
|
||||
Public Const K_MACH_PRECUTEXIT As String = "PreCutExit"
|
||||
Public Const K_MACH_MILLING_ON_CORNERS As String = "MillingOnCorners"
|
||||
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
||||
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
||||
@@ -198,7 +193,7 @@
|
||||
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
||||
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
||||
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
||||
Public Const K_MACH_NEST_GHIGLIOTTINA As String = "Guillotine"
|
||||
Public Const K_MACH_NEST_AUTOMATIC As String = "Automatic"
|
||||
Public Const K_MACH_WASHING As String = "Washing"
|
||||
Public Const K_MACH_SACPROBE As String = "SacProbe"
|
||||
Public Const K_MACH_ENABLERESTART As String = "EnableRestart"
|
||||
@@ -212,9 +207,6 @@
|
||||
' MinDistHeadsMultiCut
|
||||
' MinSawRbHeight
|
||||
|
||||
Public Const S_MACH_FRAME As String = "Frame"
|
||||
Public Const K_MACH_PAUSE As String = "Pause"
|
||||
|
||||
Public Const S_MACH_RAWMOVE As String = "RawMove"
|
||||
Public Const K_MACH_RM_ROTATE As String = "Rotate"
|
||||
Public Const K_MACH_RM_FINALMOVE As String = "FinalMove"
|
||||
|
||||
@@ -78,7 +78,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||
Dim SpindleButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_SPINDLE Then
|
||||
SpindleButton = MachineButton
|
||||
End If
|
||||
@@ -90,7 +90,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub LaserStateChanged(LaserState As Boolean)
|
||||
Dim LaserButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_LASER Then
|
||||
LaserButton = MachineButton
|
||||
End If
|
||||
@@ -102,7 +102,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub FeedHoldChanged(FeedHoldState As Boolean)
|
||||
Dim FeedHoldButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_FEEDHOLD Then
|
||||
FeedHoldButton = MachineButton
|
||||
End If
|
||||
@@ -114,7 +114,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub SpeedHoldChanged(SpeedHoldState As Boolean)
|
||||
Dim SpeedHoldButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_SPEEDHOLD Then
|
||||
SpeedHoldButton = MachineButton
|
||||
End If
|
||||
@@ -126,7 +126,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub LaserTracStateChanged(LaserTracState As Boolean)
|
||||
Dim LaserTracButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_LASERTRAC Then
|
||||
LaserTracButton = MachineButton
|
||||
End If
|
||||
@@ -138,7 +138,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub CoolantStateChanged(CoolantState As Boolean)
|
||||
Dim CoolantButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_COOLANT Then
|
||||
CoolantButton = MachineButton
|
||||
End If
|
||||
@@ -150,7 +150,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub InternalCoolantStateChanged(InternalCoolantState As Boolean)
|
||||
Dim IntCoolantButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_INTERNALCOOLANT Then
|
||||
IntCoolantButton = MachineButton
|
||||
End If
|
||||
@@ -162,7 +162,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub ExternCoolantStateChanged(ExternCoolantState As Boolean)
|
||||
Dim ExtCoolantButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_EXTERNCOOLANT Then
|
||||
ExtCoolantButton = MachineButton
|
||||
End If
|
||||
@@ -175,7 +175,7 @@ Public Class ControlsMachineButtonUC
|
||||
Friend Sub CBAxesStateChanged(CBAxesState As Boolean)
|
||||
Dim CAxesButton As TwoStateButton = Nothing
|
||||
Dim BAxesButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_CAXES Then
|
||||
CAxesButton = MachineButton
|
||||
ElseIf MachineButton.StateFlag = K_BAXES Then
|
||||
@@ -192,7 +192,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub AirBlowStateChanged(AirBlowState As Boolean)
|
||||
Dim AirBlowButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_AIRBLOW Then
|
||||
AirBlowButton = MachineButton
|
||||
End If
|
||||
@@ -204,7 +204,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub HomeStateChanged(HomeState As Boolean)
|
||||
Dim HomeButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_HOME Then
|
||||
HomeButton = MachineButton
|
||||
End If
|
||||
@@ -216,7 +216,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub TableUpChanged(TableUpState As Boolean)
|
||||
Dim TableUpButton As PressedCommandButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_TABLEUP Then
|
||||
TableUpButton = MachineButton
|
||||
End If
|
||||
@@ -228,7 +228,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub TableDownChanged(TableDownState As Boolean)
|
||||
Dim TableDownButton As PressedCommandButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_TABLEDOWN Then
|
||||
TableDownButton = MachineButton
|
||||
End If
|
||||
@@ -240,7 +240,7 @@ Public Class ControlsMachineButtonUC
|
||||
|
||||
Friend Sub HSMChanged(HsmState As Boolean)
|
||||
Dim HsmButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_HSM Then
|
||||
HsmButton = MachineButton
|
||||
End If
|
||||
@@ -253,7 +253,7 @@ Public Class ControlsMachineButtonUC
|
||||
Friend Sub DoorClosedChanged(DoorClosedState As Integer)
|
||||
Dim DoorClosedButton As ThreeStateButton = Nothing
|
||||
Dim DoorOpenedButton As ThreeStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_DOORCLOSED Then
|
||||
'If TypeOf MachineButton Is NoStateButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, NoStateButton)
|
||||
@@ -295,7 +295,7 @@ Public Class ControlsMachineButtonUC
|
||||
Friend Sub LimitZChanged(LimitZState As Boolean)
|
||||
Dim TwoLimitZButton As TwoStateButton = Nothing
|
||||
Dim DoubleLimitZButton As DoubleCommandButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_LIMITZ Then
|
||||
If TypeOf MachineButton Is DoubleCommandButton Then
|
||||
DoubleLimitZButton = MachineButton
|
||||
@@ -315,7 +315,7 @@ Public Class ControlsMachineButtonUC
|
||||
Friend Sub FiveAxisStateChanged(FiveAxisState As Boolean)
|
||||
Dim ThreeAxesButton As TwoStateButton = Nothing
|
||||
Dim FiveAxesButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_THREEAXES Then
|
||||
ThreeAxesButton = MachineButton
|
||||
ElseIf MachineButton.StateFlag = K_FIVEAXES Then
|
||||
|
||||
@@ -35,11 +35,10 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
@@ -56,12 +55,10 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource LineaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ArcoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="LineBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="ArcBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -72,18 +69,14 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource ChiudiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2"
|
||||
Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2"
|
||||
Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource Salva-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
|
||||
@@ -49,12 +49,12 @@ Public Class CopyTemplateUC
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
LineBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
|
||||
ArcBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
|
||||
RemoveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
|
||||
CloseBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
|
||||
SaveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
LineBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
|
||||
ArcBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
|
||||
RemoveBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
|
||||
CloseBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
|
||||
SaveBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
|
||||
End Sub
|
||||
|
||||
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
@@ -60,127 +60,24 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="ManualTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="GridCutBtn" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="SingleDrillBtn" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="FlatteningCutBtn" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="PolishingBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="8"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="GridCutBtn" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="FlatteningCutBtn" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="PolishingBtn" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="SawTestBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -200,8 +97,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -219,27 +115,22 @@
|
||||
<!--Comando asse X-Y-->
|
||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-C-->
|
||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-B-->
|
||||
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando Remote-->
|
||||
<ToggleButton Name="RemoteBtn" Grid.Column="5"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
<Button Name="ManualModeBtn" Grid.Column="8"
|
||||
|
||||
<!--Comando asse Z-->
|
||||
<ToggleButton Name="ZBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse B-C-->
|
||||
<ToggleButton Name="BCBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<Button Name="ManualModeBtn" Grid.Column="7"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
@@ -8,7 +8,6 @@ Public Class DirectCutPageUC
|
||||
Friend m_MachineButtons As MachineButtonsUC
|
||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||
Friend m_SingleCut As SingleCutUC
|
||||
Friend m_SingleDrill As SingleDrillUC
|
||||
' nuova finestra per i comandi per il taglio manuale nuovo
|
||||
Friend m_SingleCutAuto As SingleCutAuto
|
||||
Friend m_MultipleCut As MultipleCut
|
||||
@@ -19,7 +18,6 @@ Public Class DirectCutPageUC
|
||||
Friend m_SawTest As SawTestUC
|
||||
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
||||
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
||||
|
||||
' Stato di visualizzazione della macchina
|
||||
Friend m_bShowMachine As Boolean = False
|
||||
Friend m_nMachLook As Integer = MCH_LOOK.ALL
|
||||
@@ -39,7 +37,7 @@ Public Class DirectCutPageUC
|
||||
Friend m_bManulaCut As Boolean = False
|
||||
|
||||
' elenco dei nuovi bottoni
|
||||
Private m_ButtonJogList As New List(Of MachineButton)
|
||||
Private m_ButtonAxesList As New List(Of MachineButton)
|
||||
|
||||
Enum DirectCutPages
|
||||
DirectCut
|
||||
@@ -52,7 +50,6 @@ Public Class DirectCutPageUC
|
||||
CopyTemplate
|
||||
SawTest
|
||||
SingleCutAuto
|
||||
SingleDrill
|
||||
End Enum
|
||||
|
||||
Private Sub DirectCutPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
@@ -63,7 +60,6 @@ Public Class DirectCutPageUC
|
||||
m_MachineButtons = New MachineButtonsUC
|
||||
m_ManualAxesMove = New ManualAxesMoveUC
|
||||
m_SingleCut = New SingleCutUC
|
||||
m_SingleDrill = New SingleDrillUC
|
||||
m_MultipleCut = New MultipleCut
|
||||
m_GridCut = New GridCut
|
||||
m_FlatteningCut = New FlatteningCut
|
||||
@@ -77,14 +73,13 @@ Public Class DirectCutPageUC
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 6)
|
||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||
If m_bManulaCut Then
|
||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||
Else
|
||||
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
||||
End If
|
||||
m_SingleDrill.SetValue(Grid.RowProperty, 1)
|
||||
m_MultipleCut.SetValue(Grid.RowProperty, 1)
|
||||
m_GridCut.SetValue(Grid.RowProperty, 1)
|
||||
m_FlatteningCut.SetValue(Grid.RowProperty, 1)
|
||||
@@ -94,14 +89,15 @@ Public Class DirectCutPageUC
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [ControlMachButtons])
|
||||
Dim bCollapsedNewBottonsConsole As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons("JogButtons", "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
Dim bCollpsedNewBottonsConsole As Boolean = False
|
||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
If Not m_NewMachineButtonsType Then
|
||||
'Assegno MachineButtons alla pagina
|
||||
LowerButtonGrid.Children.Add(m_MachineButtons)
|
||||
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' per le configurazioni diverse dalla Digitale5
|
||||
bCollpsedNewBottonsConsole = True
|
||||
End If
|
||||
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
@@ -109,55 +105,32 @@ Public Class DirectCutPageUC
|
||||
ManualModeBtn.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' ManualBtn.Content = EgtMsg(90201)
|
||||
ManualTxt.Text = EgtMsg(90201)
|
||||
'SingleCutBtn.Content = EgtMsg(90202)
|
||||
SingleCutTxt.Text = EgtMsg(90202)
|
||||
'SingleDrillBtn.Content = "Foro singolo"
|
||||
SingleDrillTxt.Text = EgtMsg(90258)
|
||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||
MultipleCutTxt.Text = EgtMsg(90203)
|
||||
'GridCutBtn.Content = EgtMsg(90204)
|
||||
GridCutTxt.Text = EgtMsg(90204)
|
||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||
'PolishingBtn.Content = EgtMsg(90231)
|
||||
PolishingTxt.Text = EgtMsg(90231)
|
||||
'CopyTemplateBtn.Content = EgtMsg(90209)
|
||||
CopyTemplateTxt.Text = EgtMsg(90209)
|
||||
'SawTestBtn.Content = EgtMsg(90207)
|
||||
SawTestTxt.text = EgtMsg(90207)
|
||||
ManualBtn.Content = EgtMsg( 90201)
|
||||
SingleCutBtn.Content = EgtMsg(90202)
|
||||
MultipleCutBtn.Content = EgtMsg( 90203)
|
||||
GridCutBtn.Content = EgtMsg( 90204)
|
||||
FlatteningCutBtn.Content = EgtMsg( 90206)
|
||||
PolishingBtn.Content = EgtMsg( 90231)
|
||||
CopyTemplateBtn.Content = EgtMsg( 90209)
|
||||
SawTestBtn.Content = EgtMsg(90207)
|
||||
|
||||
|
||||
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
|
||||
' leggo il numero di assi attivi nella macchina
|
||||
Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile())
|
||||
|
||||
'' leggo se è stata configurata la nuova conole
|
||||
'If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollapsedNewBottonsConsole Then
|
||||
' XYBtn.Content = "X - Y"
|
||||
' XYBtn.Foreground = Brushes.White
|
||||
' ZCBtn.Content = "Z - C"
|
||||
' ZCBtn.Foreground = Brushes.White
|
||||
' If AxesNumber < 5 Then
|
||||
' ZBBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' End If
|
||||
' ZBBtn.Content = "Z - B"
|
||||
' ZBBtn.Foreground = Brushes.White
|
||||
' RemoteBtn.Content = "Remote"
|
||||
' RemoteBtn.Foreground = Brushes.White
|
||||
'Else
|
||||
' XYBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' ZCBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' ZBBtn.Visibility = Windows.Visibility.Collapsed
|
||||
'End If
|
||||
' nuovi bottoni 20/05/2021
|
||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollpsedNewBottonsConsole Then
|
||||
XYBtn.Content = "X - Y"
|
||||
ZBtn.Content = "Z"
|
||||
BCBtn.Content = "B - C"
|
||||
Else
|
||||
XYBtn.Visibility = Windows.Visibility.Collapsed
|
||||
ZBtn.Visibility = Windows.Visibility.Collapsed
|
||||
BCBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DirectCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
'------ INIZIO NUOVI BOTTONI ----------
|
||||
'------ NUOVI BOTTONI ----------
|
||||
' Lettura configurazione bottoni (per impostare l'uso del Joystick) da Ini di macchina
|
||||
m_ButtonJogList.Clear()
|
||||
m_ButtonAxesList.Clear()
|
||||
Dim m_nCount As Integer = 1
|
||||
Dim bFoundBtn As Boolean = True
|
||||
While bFoundBtn
|
||||
@@ -168,7 +141,7 @@ Public Class DirectCutPageUC
|
||||
Dim sFImageName As String = String.Empty
|
||||
Dim sFLuaScriptName As String = String.Empty
|
||||
Dim sStateFlag As String = String.Empty
|
||||
bFoundBtn = m_ControlsMachineButton.GetPrivateProfileMachineButtons("JogButtons", sNameBtn, sMachineButtonType, sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag, m_MainWindow.GetMachIniFile())
|
||||
bFoundBtn = m_ControlsMachineButton.GetPrivateProfileMachineButtons("AxesButtons", sNameBtn, sMachineButtonType, sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag, m_MainWindow.GetMachIniFile())
|
||||
If bFoundBtn Then
|
||||
m_nCount += 1
|
||||
Dim ButtonToAdd As MachineButton = Nothing
|
||||
@@ -186,15 +159,13 @@ Public Class DirectCutPageUC
|
||||
ButtonToAdd = New PressedCommandButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
End Select
|
||||
If Not IsNothing(ButtonToAdd) Then
|
||||
m_ButtonJogList.Add(ButtonToAdd)
|
||||
m_ButtonAxesList.Add(ButtonToAdd)
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
' attivo la visualizzazione dei comandi
|
||||
SetVisibilityJogButtuns()
|
||||
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
||||
'----------- FINE NUOVI BOTTONI------------
|
||||
|
||||
'-----------NUOVI BOTTONI------------
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
@@ -217,9 +188,6 @@ Public Class DirectCutPageUC
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SawTest Then
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Caso standard
|
||||
@@ -238,7 +206,6 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
MultipleCutBtn.IsEnabled = bRawOk
|
||||
GridCutBtn.IsEnabled = bRawOk
|
||||
SingleDrillBtn.IsEnabled = bRawOk
|
||||
FlatteningCutBtn.IsEnabled = bRawOk
|
||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
SawTestBtn.IsEnabled = bRawOk
|
||||
@@ -249,35 +216,6 @@ Public Class DirectCutPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SetVisibilityJogButtuns()
|
||||
XYBtn.Visibility = Visibility.Collapsed
|
||||
ZCBtn.Visibility = Visibility.Collapsed
|
||||
ZBBtn.Visibility = Visibility.Collapsed
|
||||
RemoteBtn.Visibility = Visibility.Collapsed
|
||||
|
||||
Dim Item As MachineButton = Nothing
|
||||
For Each Item In m_ButtonJogList
|
||||
Select Case Item.StateFlag.Trim
|
||||
Case K_XYJOG
|
||||
XYBtn.Visibility = Visibility.Visible
|
||||
XYBtn.Foreground = Brushes.White
|
||||
XYBtn.ToolTip = "X - Y"
|
||||
Case K_ZCJOG
|
||||
ZCBtn.Visibility = Visibility.Visible
|
||||
ZCBtn.Foreground = Brushes.White
|
||||
ZCBtn.ToolTip = "Z - C"
|
||||
Case K_ZBJOG
|
||||
ZBBtn.Visibility = Visibility.Visible
|
||||
ZBBtn.Foreground = Brushes.White
|
||||
ZBBtn.ToolTip = "Z - B"
|
||||
Case K_REMOTE
|
||||
RemoteBtn.Visibility = Visibility.Visible
|
||||
RemoteBtn.Foreground = Brushes.White
|
||||
RemoteBtn.Content = "Remote"
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Se macchina fotografica collegata, faccio una foto
|
||||
@@ -285,7 +223,7 @@ Public Class DirectCutPageUC
|
||||
If Not m_MainWindow.m_Camera.CameraClick() Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(90313)) 'Fotografia non riuscita
|
||||
End If
|
||||
' Altrimenti lancio browser di immagini
|
||||
' Altrimenti lancio browser di immagini
|
||||
Else
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_PhotoPage)
|
||||
@@ -348,11 +286,6 @@ Public Class DirectCutPageUC
|
||||
m_ActiveDirectCutPage = DirectCutPages.SawTest
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
|
||||
End Sub
|
||||
|
||||
Private Sub ControlsMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles ControlsMachineBtn.Click
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||
@@ -382,134 +315,65 @@ Public Class DirectCutPageUC
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click
|
||||
' riverco in elenco il bottone XYJog
|
||||
Dim XYJogButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_XYJOG Then
|
||||
XYJogButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(XYJogButton) Then Return
|
||||
Dim XYAxesButton As MachineButton = m_ButtonAxesList(0)
|
||||
' eseguo lo script lua associato
|
||||
XYJogButton.ExecuteMDICommand(XYJogButton.TLuaScriptName)
|
||||
XYAxesButton.ExecuteMDICommand(XYAxesButton.TLuaScriptName)
|
||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||
End Sub
|
||||
|
||||
Friend Sub XYJogChanged(bXYAxes As Boolean)
|
||||
Friend Sub XYAxesChanged(bXYAxes As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim XYJogButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
' elimino gli spazi ad inizio e fine della stringa
|
||||
If MachineButton.StateFlag.Trim = K_XYJOG Then
|
||||
XYJogButton = MachineButton
|
||||
Exit For
|
||||
Dim XYAxesButton As TwoStateButton = Nothing
|
||||
For Each MachineButton In m_ButtonAxesList
|
||||
If MachineButton.StateFlag = "XYAxes" Then
|
||||
XYAxesButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(XYJogButton) Then
|
||||
XYJogButton.SetIsChecked(bXYAxes)
|
||||
If Not IsNothing(XYAxesButton) Then
|
||||
XYAxesButton.SetIsChecked(bXYAxes)
|
||||
XYBtn.IsChecked = bXYAxes
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ZCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZCBtn.Click
|
||||
' riverco in elenco il bottone ZCYJog
|
||||
Dim ZJogButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_ZCJOG Then
|
||||
ZJogButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(ZJogButton) Then Return
|
||||
Private Sub ZBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBtn.Click
|
||||
Dim ZAxesButton As MachineButton = m_ButtonAxesList(1)
|
||||
' eseguo lo script lua associato
|
||||
ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName)
|
||||
ZAxesButton.ExecuteMDICommand(ZAxesButton.TLuaScriptName)
|
||||
End Sub
|
||||
|
||||
Friend Sub ZCJogChanged(bZAxes As Boolean)
|
||||
Friend Sub ZAxesChanged(bZAxes As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim ZJogButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
If MachineButton.StateFlag.Trim = K_ZCJOG Then
|
||||
ZJogButton = MachineButton
|
||||
Exit For
|
||||
Dim ZAxesButton As TwoStateButton = Nothing
|
||||
For Each MachineButton In m_ButtonAxesList
|
||||
If MachineButton.StateFlag = "ZAxes" Then
|
||||
ZAxesButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(ZJogButton) Then
|
||||
ZJogButton.SetIsChecked(bZAxes)
|
||||
ZCBtn.IsChecked = bZAxes
|
||||
If Not IsNothing(ZAxesButton) Then
|
||||
ZAxesButton.SetIsChecked(bZAxes)
|
||||
ZBtn.IsChecked = bZAxes
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ZBBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBBtn.Click
|
||||
' riverco in elenco il bottone ZCYJog
|
||||
Dim ZBJogButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_ZBJOG Then
|
||||
ZBJogButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(ZBJogButton) Then Return
|
||||
Private Sub BCBtn_Click(sender As Object, e As RoutedEventArgs) Handles BCBtn.Click
|
||||
Dim BCAxesButton As MachineButton = m_ButtonAxesList(2)
|
||||
' eseguo lo script lua associato
|
||||
ZBJogButton.ExecuteMDICommand(ZBJogButton.TLuaScriptName)
|
||||
BCAxesButton.ExecuteMDICommand(BCAxesButton.TLuaScriptName)
|
||||
End Sub
|
||||
|
||||
Friend Sub ZBJogChanged(bBCAxes As Boolean)
|
||||
Friend Sub BCAxesChanged(bBCAxes As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim BCJogButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
If MachineButton.StateFlag.Trim = K_ZBJOG Then
|
||||
BCJogButton = MachineButton
|
||||
Exit For
|
||||
Dim BCAxesButton As TwoStateButton = Nothing
|
||||
For Each MachineButton In m_ButtonAxesList
|
||||
If MachineButton.StateFlag = "BCAxes" Then
|
||||
BCAxesButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(BCJogButton) Then
|
||||
BCJogButton.SetIsChecked(bBCAxes)
|
||||
ZBBtn.IsChecked = bBCAxes
|
||||
If Not IsNothing(BCAxesButton) Then
|
||||
BCAxesButton.SetIsChecked(bBCAxes)
|
||||
BCBtn.IsChecked = bBCAxes
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RemoteBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemoteBtn.Click
|
||||
Dim RemoteButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_REMOTE Then
|
||||
RemoteButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(RemoteButton) Then Return
|
||||
' eseguo lo script lua associato
|
||||
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||
Dim sLuaFileName As String = String.Empty
|
||||
' verifico lo stato del bottone per avviare il giusto script
|
||||
If CurrentBtn.IsChecked() Then
|
||||
sLuaFileName = RemoteButton.TLuaScriptName
|
||||
Else
|
||||
sLuaFileName = RemoteButton.FLuaScriptName
|
||||
End If
|
||||
RemoteButton.ExecuteMDICommand(sLuaFileName)
|
||||
End Sub
|
||||
|
||||
Friend Sub RemoteChanged(bRemote As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim RemoteButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
If MachineButton.StateFlag.Trim = K_REMOTE Then
|
||||
RemoteButton = MachineButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(RemoteButton) Then
|
||||
RemoteButton.SetIsChecked(bRemote)
|
||||
RemoteBtn.IsChecked = bRemote
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
||||
If m_bShowMachine Then
|
||||
@@ -548,8 +412,6 @@ Public Class DirectCutPageUC
|
||||
LeftButtonGrid.Children.Remove(m_CopyTemplate)
|
||||
Case DirectCutPages.SawTest
|
||||
LeftButtonGrid.Children.Remove(m_SawTest)
|
||||
Case DirectCutPages.SingleDrill
|
||||
LeftButtonGrid.Children.Remove(m_SingleDrill)
|
||||
End Select
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
@@ -567,124 +429,4 @@ Public Class DirectCutPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
'' ------------------------ GESTIONE SECONDA PAGINA ------------------------
|
||||
'Private Sub ClearButton(nCount As Integer)
|
||||
' Dim nEndIndex As Integer
|
||||
' If m_bIsFirstPage Then
|
||||
' nEndIndex = If(nCount < 8, nCount, 8)
|
||||
' Else
|
||||
' nEndIndex = If(nCount < 16, nCount - 8, 8)
|
||||
' End If
|
||||
' For index As Integer = 1 To nEndIndex
|
||||
' GetLabel(index).Text = String.Empty
|
||||
' GetImage(index).Source = Nothing
|
||||
' GetButton(index).Visibility = Windows.Visibility.Visible
|
||||
' Next
|
||||
' For index As Integer = nEndIndex + 1 To 8
|
||||
' GetLabel(index).Text = String.Empty
|
||||
' GetImage(index).Source = Nothing
|
||||
' GetButton(index).Visibility = Windows.Visibility.Hidden
|
||||
' Next
|
||||
'End Sub
|
||||
|
||||
'Private Sub LoadPage()
|
||||
' Dim nDeltaSecondPage As Integer = 8
|
||||
' ' Leggo numero di componenti presenti
|
||||
' Dim nCompoNumber As Integer = GetPrivateProfileInt("Compo", "Count", 0, m_MainWindow.GetIniFile())
|
||||
' ' Calcolo indici a seconda della pagina in cui sono
|
||||
' If m_bIsFirstPage Then
|
||||
' ClearButton(nCompoNumber)
|
||||
' nDeltaSecondPage = 0
|
||||
' Else
|
||||
' ClearButton(nCompoNumber)
|
||||
' nDeltaSecondPage = 8
|
||||
' End If
|
||||
|
||||
' ' Creazione converter da String a ImageSource
|
||||
' Dim ImageConverter As New ImageSourceConverter
|
||||
' Dim ThicknessConverter As New ThicknessConverter
|
||||
|
||||
' 'Assegnazione immagine e testo ai Button
|
||||
' For index As Integer = 1 To 8
|
||||
' Dim CustomThickness As New Thickness(0)
|
||||
' Dim nCompoName As Integer = GetPrivateProfileInt("Compo" & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
||||
' Dim sCompoImage As String = ""
|
||||
' Dim sCompoImageSource As ImageSource
|
||||
|
||||
' 'verifico presenza immagine e la aggiungo
|
||||
' If GetPrivateProfileString("Compo" & index + nDeltaSecondPage, "Image", "", sCompoImage, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
' Try
|
||||
' sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
||||
' GetImage(index).Height = 65
|
||||
' GetImage(index).Width = 65
|
||||
' GetImage(index).Source = sCompoImageSource
|
||||
' Catch ex As Exception
|
||||
' EgtOutLog("Error loading image " & sCompoImage)
|
||||
' sCompoImage = String.Empty
|
||||
' GetImage(index).Height = 0
|
||||
' GetImage(index).Width = 0
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End Try
|
||||
' Else
|
||||
' 'Se non c'è l'immagine azzero la distanza tra testo e immagine
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End If
|
||||
|
||||
' 'verifico presenza testo
|
||||
' If nCompoName > 0 Then
|
||||
' Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
||||
' 'verifico presenza immagine
|
||||
' If sCompoImage.Length > 0 Then
|
||||
' 'se la lunghezza del testo è maggiore di 15 lo taglio
|
||||
' If sCompoName.Length > 15 Then
|
||||
' sCompoName = sCompoName.Substring(0, 15)
|
||||
' End If
|
||||
' GetLabel(index).Text = sCompoName
|
||||
' 'Se ci sono sia testo che immagine imposto un margine di 10
|
||||
' CustomThickness.Right = 10
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' Else
|
||||
' 'se l'immagine non c'è e il testo è maggiore di 20 lo taglio
|
||||
' If sCompoName.Length > 20 Then
|
||||
' sCompoName = sCompoName.Substring(0, 20)
|
||||
' End If
|
||||
' GetLabel(index).Text = sCompoName
|
||||
' End If
|
||||
' Else
|
||||
' 'Se non c'è testo azzero la distanza tra testo e immagine
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
'End Sub
|
||||
|
||||
'' Gestione bottone altri componenti
|
||||
'Private Sub Compo9_Click(sender As Object, e As RoutedEventArgs) Handles Compo9.Click
|
||||
' If m_bIsFirstPage Then
|
||||
' m_bIsFirstPage = False
|
||||
' LoadPage()
|
||||
' 'Compo9.SetValue(Grid.ColumnProperty, 1)
|
||||
' 'Compo9.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
' 'ImageCompo9.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NumericKeyboardArrow.png", UriKind.Relative))
|
||||
' 'ImageCompo9.Visibility = Windows.Visibility.Visible
|
||||
' 'LabelCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
' Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
' ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' Else
|
||||
' m_bIsFirstPage = True
|
||||
' LoadPage()
|
||||
' Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
' Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
' ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -38,17 +38,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -130,16 +125,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@ Public Class FlatteningCut
|
||||
' la associo alla combobox
|
||||
TypeCmBx.ItemsSource = m_TypeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
@@ -89,8 +89,8 @@ Public Class FlatteningCut
|
||||
ZReleasedTxBl.Text = "Z Svincolo"
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -34,16 +34,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
@@ -135,16 +131,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ Public Class GridCut
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||
@@ -73,8 +73,8 @@ Public Class GridCut
|
||||
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
|
||||
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -111,22 +111,6 @@ Public Class MachineButtonsUC
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & sImage)
|
||||
End Try
|
||||
Else
|
||||
' In attesa che attivono le icone di questi pulsanti scrivo il contenuto del bottone
|
||||
Try
|
||||
Dim CurrToggleBtn As Primitives.ToggleButton = GetToggleButton(nIndex + 1)
|
||||
If StateFlagArray(nIndex) = K_XYJOG Then
|
||||
CurrToggleBtn.Content = "X - Y"
|
||||
ElseIf StateFlagArray(nIndex) = K_ZCJOG Then
|
||||
CurrToggleBtn.Content = "Z - C"
|
||||
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
||||
CurrToggleBtn.Content = "Z - B"
|
||||
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
|
||||
CurrToggleBtn.Content = "Remote"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -581,38 +565,29 @@ Public Class MachineButtonsUC
|
||||
End Sub
|
||||
|
||||
'----------------- Queste funzioni determina lo stato del bottone direttamente dalla lettura delle variabili CN
|
||||
Friend Sub XYJogChanged(ByVal bXYAxes As Boolean)
|
||||
Friend Sub XYAxesChanged(ByVal bXYAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_XYJOG)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, "XYAxes")
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bXYAxes
|
||||
End Sub
|
||||
|
||||
Friend Sub ZJogChanged(ByVal bZAxes As Boolean)
|
||||
Friend Sub ZAxesChanged(ByVal bZAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_ZCJOG)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, "ZAxes")
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bZAxes
|
||||
End Sub
|
||||
|
||||
Friend Sub BCJogChanged(ByVal bBCAxes As Boolean)
|
||||
Friend Sub BCAxesChanged(ByVal bBCAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_ZBJOG)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, "BCAxes")
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bBCAxes
|
||||
End Sub
|
||||
|
||||
Friend Sub RemoteChanged(ByVal bRemote As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_REMOTE)
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bRemote
|
||||
End Sub
|
||||
|
||||
'-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Private Function GetToggleButton(ByVal nIndex As Integer) As Primitives.ToggleButton
|
||||
|
||||
@@ -206,7 +206,6 @@ Public Class ManualAxesMoveUC
|
||||
m_CN.MDI_command()
|
||||
System.Threading.Thread.Sleep(150)
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
m_MoveClicked = False
|
||||
End Sub
|
||||
|
||||
@@ -35,17 +35,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
@@ -261,16 +256,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ Public Class MultipleCut
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
@@ -72,8 +72,8 @@ Public Class MultipleCut
|
||||
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
|
||||
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Num1TxBl.Text = "1"
|
||||
Num2TxBl.Text = "2"
|
||||
Num3TxBl.Text = "3"
|
||||
|
||||
@@ -63,16 +63,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ Public Class Polishing
|
||||
|
||||
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' assegno messaggi
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
End Sub
|
||||
|
||||
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
@@ -37,17 +37,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
@@ -85,16 +80,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -58,14 +58,14 @@ Public Class SawTestUC
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo test
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -161,7 +161,7 @@ Public Class SingleCutAuto
|
||||
ShowCoord()
|
||||
' carico la lista dei materiali lavorabili in macchina
|
||||
m_MaterialsList.Clear()
|
||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
For Each Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||
Next
|
||||
' Carico l'elenco dei materiali presenti in macchina per l'assegnata lavorazione
|
||||
|
||||
@@ -38,16 +38,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -111,14 +106,10 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -57,16 +57,16 @@ Public Class SingleCutUC
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' Assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
<UserControl x:Class="SingleDrillUC"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
|
||||
<!-- Definizione della Grid SingleCut -->
|
||||
<Grid Name="SingleCutGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
|
||||
|
||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -1,452 +0,0 @@
|
||||
Imports EgtUILib
|
||||
Public Class SingleDrillUC
|
||||
' Riferimenti a pagine
|
||||
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
|
||||
' Flag di simulazione in corso
|
||||
Private m_bSimul As Boolean = False
|
||||
|
||||
' riferimento alla macchina corrente
|
||||
Private m_CurrentMachine As CurrentMachine
|
||||
|
||||
' --------------------- VARIABILI PRESENTI NEL TAGLIO SINGOLO ---------------------
|
||||
' Origine tavola e dati grezzo
|
||||
Private m_bRawOk As Boolean = False
|
||||
Private m_ptTabOri As Point3d
|
||||
Private m_ptRawMin As Point3d
|
||||
Private m_ptRawMax As Point3d
|
||||
' Parametri P1 acquisito
|
||||
Private m_bPointP1Ok As Boolean = False
|
||||
Private m_ptTipP1 As Point3d
|
||||
Private m_vtToolP1 As Vector3d
|
||||
' Parametri P2 acquisito
|
||||
Private m_bPointP2Ok As Boolean = False
|
||||
Private m_ptTipP2 As Point3d
|
||||
Private m_vtToolP2 As Vector3d
|
||||
' Parametri della lavorazione
|
||||
Private m_bCutOk As Boolean = False
|
||||
|
||||
' Array delle modalità di acquisizione dei punti
|
||||
Private m_PointsModeArray(2) As String
|
||||
' Punto selezionato nel disegno
|
||||
Private m_ptPrev As Point3d
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
|
||||
Private m_dDiameter As Double = 0
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
Private Const MIN_CUT_LEN As Double = 10.0
|
||||
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||
' Costanti che indicano la modalità di acquisizione dei punti
|
||||
Private Enum PT_MODE As Integer
|
||||
DRILL = 0
|
||||
LASER = 1
|
||||
DRAW = 2
|
||||
End Enum
|
||||
|
||||
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.DRILL) = EgtMsg(90752)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
|
||||
' Assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' recupero informazioni del foretto usato
|
||||
EgtTdbSetCurrTool(m_CurrentMachine.sCurrDrill)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||
|
||||
' Attivo la pagina
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_bActive = True
|
||||
' Se rientro da simulazione
|
||||
If m_bSimul Then
|
||||
m_bSimul = False
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
' Aggiorno visualizzazione
|
||||
SetMachineInCurrPos()
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
' Creo layer temporaneo per crocette
|
||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on TableRef1")
|
||||
End If
|
||||
' Dati del grezzo
|
||||
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on RawBox")
|
||||
End If
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno
|
||||
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
' Reset taglio e disabilito bottone esecuzione
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
' Deseleziono bottone primo punto
|
||||
Point1Btn.IsChecked = False
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' esco dalla pagina di foro diretto
|
||||
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Riattivo eventuali lavorazioni presenti
|
||||
ActivateAllMachinings()
|
||||
' Abilito registrazione progetto modificato
|
||||
EgtEnableModified()
|
||||
' Nascondo la macchina
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End If
|
||||
' Dichiaro pagina non attiva
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
SimulBtn.Foreground = Brushes.Black
|
||||
OkBtn.IsEnabled = True
|
||||
OkBtn.Foreground = Brushes.Black
|
||||
Else
|
||||
SimulBtn.IsEnabled = False
|
||||
SimulBtn.Foreground = Brushes.DarkGray
|
||||
OkBtn.IsEnabled = False
|
||||
OkBtn.Foreground = Brushes.DarkGray
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
' deselezione il bottone per acquisizione
|
||||
Point1Btn.IsChecked = False
|
||||
' Verifico di essere il gestore attivo
|
||||
If Not m_bActive Then Return
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Acquisisco punto da disegno
|
||||
EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
' Aggiusto Z punto acquisito (è in globale)
|
||||
Dim dPtPrevZ As Double = m_ptPrev.z
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Se direzione di vista calcolabile e da sopra posso aggiustare anche XY
|
||||
Dim dAngVertDeg, dAngHorizDeg As Double
|
||||
If EgtGetGenericView(dAngVertDeg, dAngHorizDeg) Then
|
||||
Dim vtDir As Vector3d = Vector3d.FromSpherical(1, dAngVertDeg, dAngHorizDeg)
|
||||
If vtDir.z > EPS_SMALL Then
|
||||
m_ptPrev.z = dPtPrevZ
|
||||
m_ptPrev += vtDir * (m_ptRawMax.z - m_ptPrev.z) / vtDir.z
|
||||
End If
|
||||
End If
|
||||
' Visualizzo coordinate (rispetto a 0 tavola)
|
||||
ShowCoord()
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub PointModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PointModeCmBx.SelectionChanged
|
||||
SetCoordVisibility(PointModeCmBx.SelectedIndex = PT_MODE.DRAW)
|
||||
End Sub
|
||||
|
||||
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Reset punto non acquisito
|
||||
m_bPointP1Ok = False
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Se acquisizione lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
|
||||
' Ricavo dati Foretto corrente
|
||||
Dim sDrill As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = m_ptPrev
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
CreateSingleDrill()
|
||||
' Disegno la macchina nella sua posizione reale
|
||||
SetMachineInCurrPos()
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||
EgtDraw()
|
||||
' Seleziono il bottone per indicare che il primo punto è stato acquisito
|
||||
Point1Btn.IsChecked = True
|
||||
End Sub
|
||||
|
||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dXcoord As Double = 0
|
||||
StringToLen(XcoordTxBx.Text, dXcoord)
|
||||
XcoordTxBx.Text = LenToString(dXcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.x = dXcoord + m_ptTabOri.x
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub YcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles YcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dYcoord As Double = 0
|
||||
StringToLen(YcoordTxBx.Text, dYcoord)
|
||||
YcoordTxBx.Text = LenToString(dYcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.y = dYcoord + m_ptTabOri.y
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
' Salvo il progetto con le lavorazioni
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||
' Predispongo passaggio a simulazione
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Simulation
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
#If TRIAL Then
|
||||
m_CurrProjPage.SetWarningMessage( "Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
' Salvo il progetto con le lavorazioni
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||
' Genero file CNC (lancio anche se errore in precedenza)
|
||||
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion())
|
||||
' Se errore in generazione, segnalo l'errore ed esco
|
||||
If Not bOk Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleDrill() As Boolean
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||
m_bCutOk = False
|
||||
Return False
|
||||
End If
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Recupero spessore lama corrente
|
||||
Dim sDrill As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
EgtTdbSetCurrTool(sDrill)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
DeactivateAllMachinings()
|
||||
|
||||
' Creo nuovo pezzo per il taglio diretto
|
||||
Dim nPartId = CreateDirectCutPart()
|
||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayerId, NAME_INLOOP)
|
||||
' Creo il Drill
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
|
||||
' Creo layer per crocetta di riferimento
|
||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||
' Aggiungo crocetta/e
|
||||
If m_bPointP1Ok Then
|
||||
CreateCross(nCrossLayerId, ptStart)
|
||||
End If
|
||||
|
||||
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
|
||||
|
||||
' Calcolo punto di inserimento nel grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
Dim ptIns As Point3d = ptMin + (m_ptTabOri - m_ptRawMin)
|
||||
ptIns.z = dRawHeight
|
||||
' Inserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||
' Inserisco la lavorazione
|
||||
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||
EgtSetCurrPhase(1)
|
||||
' Eventuale eliminazione Home finale
|
||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||
RemoveFinalHome()
|
||||
End If
|
||||
UpdateSimulOkBtn()
|
||||
Return m_bCutOk
|
||||
End Function
|
||||
|
||||
' crea una croce nel punto indicato e rappresenta il diametro dell'utensile corrente
|
||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||
' Aggiungo crocette
|
||||
ptP += New Vector3d(0, 0, 0.15)
|
||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||
Dim vtCrossY As New Vector3d(0, 20, 0)
|
||||
Dim nCrossId1 = EgtCreateLine(nLayerId, ptP + (-vtCrossX), ptP + vtCrossX)
|
||||
EgtSetColor(nCrossId1, New Color3d(255, 0, 0))
|
||||
Dim nCrossId2 = EgtCreateLine(nLayerId, ptP + (-vtCrossY), ptP + vtCrossY)
|
||||
EgtSetColor(nCrossId2, New Color3d(255, 0, 0))
|
||||
Dim nPntId = EgtCreateGeoPoint(nLayerId, ptP)
|
||||
EgtSetColor(nPntId, New Color3d(255, 0, 0))
|
||||
Dim nCirleId = EgtCreateCircle(nLayerId, ptP, m_dDiameter / 2)
|
||||
EgtSetColor(nCirleId, New Color3d(0, 255, 0))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetCoordVisibility(bShow As Boolean)
|
||||
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
End Sub
|
||||
|
||||
Private Sub ShowCoord()
|
||||
Dim ptText As Point3d = m_ptPrev
|
||||
ptText.ToLoc(New Frame3d(m_ptTabOri))
|
||||
XcoordTxBx.Text = LenToString(ptText.x, 2)
|
||||
YcoordTxBx.Text = LenToString(ptText.y, 2)
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
|
||||
' Recupero il nome degli assi macchina
|
||||
Dim sL1 As String = String.Empty
|
||||
Dim sL2 As String = String.Empty
|
||||
Dim sL3 As String = String.Empty
|
||||
Dim sR1 As String = String.Empty
|
||||
Dim sR2 As String = String.Empty
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||
' Visualizzo macchina in posizione
|
||||
EgtSetAxisPos(sL1, dL1)
|
||||
EgtSetAxisPos(sL2, dL2)
|
||||
EgtSetAxisPos(sL3, dL3)
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -77,7 +77,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub VacuumUpChanged(VacuumUpState As Boolean)
|
||||
Dim VacuumUpButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUMUP Then
|
||||
VacuumUpButton = MachineButton
|
||||
End If
|
||||
@@ -89,7 +89,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub VacuumDownChanged(VacuumDownState As Boolean)
|
||||
Dim VacuumDownButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUMDOWN Then
|
||||
VacuumDownButton = MachineButton
|
||||
End If
|
||||
@@ -101,7 +101,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum2UpChanged(Vacuum2UpState As Boolean)
|
||||
Dim Vacuum2UpButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM2UP Then
|
||||
Vacuum2UpButton = MachineButton
|
||||
End If
|
||||
@@ -113,7 +113,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum2DownChanged(Vacuum2DownState As Boolean)
|
||||
Dim Vacuum2DownButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM2DOWN Then
|
||||
Vacuum2DownButton = MachineButton
|
||||
End If
|
||||
@@ -125,7 +125,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum0Changed(Vacuum0State As Boolean)
|
||||
Dim Vacuum0Button As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM0 Then
|
||||
Vacuum0Button = MachineButton
|
||||
End If
|
||||
@@ -137,7 +137,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum90Changed(Vacuum90State As Boolean)
|
||||
Dim VacuumRotButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM90 Then
|
||||
VacuumRotButton = MachineButton
|
||||
End If
|
||||
@@ -149,7 +149,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum1Changed(Vacuum1State As Boolean)
|
||||
Dim Vacuum1StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM1STATE Then
|
||||
Vacuum1StateButton = MachineButton
|
||||
End If
|
||||
@@ -161,7 +161,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum2Changed(Vacuum2State As Boolean)
|
||||
Dim Vacuum2StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM2STATE Then
|
||||
Vacuum2StateButton = MachineButton
|
||||
End If
|
||||
@@ -173,7 +173,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum3Changed(Vacuum3State As Boolean)
|
||||
Dim Vacuum3StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM3STATE Then
|
||||
Vacuum3StateButton = MachineButton
|
||||
End If
|
||||
@@ -185,7 +185,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum4Changed(Vacuum4State As Boolean)
|
||||
Dim Vacuum4StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM4STATE Then
|
||||
Vacuum4StateButton = MachineButton
|
||||
End If
|
||||
@@ -197,7 +197,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum5Changed(Vacuum5State As Boolean)
|
||||
Dim Vacuum5StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM5STATE Then
|
||||
Vacuum5StateButton = MachineButton
|
||||
End If
|
||||
@@ -209,7 +209,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum6Changed(Vacuum6State As Boolean)
|
||||
Dim Vacuum6StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM6STATE Then
|
||||
Vacuum6StateButton = MachineButton
|
||||
End If
|
||||
@@ -221,7 +221,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum135Changed(Vacuum135State As Boolean)
|
||||
Dim Vacuum135StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM135STATE Then
|
||||
Vacuum135StateButton = MachineButton
|
||||
End If
|
||||
@@ -233,7 +233,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Vacuum246Changed(Vacuum246State As Boolean)
|
||||
Dim Vacuum246StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUM246STATE Then
|
||||
Vacuum246StateButton = MachineButton
|
||||
End If
|
||||
@@ -245,7 +245,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub OpenAllChanged(OpenAllState As Boolean)
|
||||
Dim OpenAllStateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_OPENALLSTATE Then
|
||||
OpenAllStateButton = MachineButton
|
||||
End If
|
||||
@@ -257,7 +257,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub CloseAllChanged(CloseAllState As Boolean)
|
||||
Dim CloseAllStateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_CLOSEALLSTATE Then
|
||||
CloseAllStateButton = MachineButton
|
||||
End If
|
||||
@@ -269,7 +269,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Open123Changed(Open123State As Boolean)
|
||||
Dim Open123StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_OPEN123STATE Then
|
||||
Open123StateButton = MachineButton
|
||||
End If
|
||||
@@ -281,7 +281,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Open456Changed(Open456State As Boolean)
|
||||
Dim Open456StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_OPEN456STATE Then
|
||||
Open456StateButton = MachineButton
|
||||
End If
|
||||
@@ -293,7 +293,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Close123Changed(Close123State As Boolean)
|
||||
Dim Close123StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_CLOSE123STATE Then
|
||||
Close123StateButton = MachineButton
|
||||
End If
|
||||
@@ -305,7 +305,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub Close456Changed(Close456State As Boolean)
|
||||
Dim Close456StateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_CLOSE456STATE Then
|
||||
Close456StateButton = MachineButton
|
||||
End If
|
||||
@@ -317,7 +317,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub BlowChanged(BlowState As Boolean)
|
||||
Dim BlowStateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_BLOWSTATE Then
|
||||
BlowStateButton = MachineButton
|
||||
End If
|
||||
@@ -329,7 +329,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub VacuumOnChanged(VacuumState As Boolean)
|
||||
Dim VacuumOnButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUMON Then
|
||||
VacuumOnButton = MachineButton
|
||||
End If
|
||||
@@ -341,7 +341,7 @@ Public Class VacuumMachineButtonUC
|
||||
|
||||
Friend Sub VacuumOffChanged(VacuumState As Boolean)
|
||||
Dim VacuumOffButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_VACUUMOFF Then
|
||||
VacuumOffButton = MachineButton
|
||||
End If
|
||||
@@ -354,7 +354,7 @@ Public Class VacuumMachineButtonUC
|
||||
Friend Sub BypassChanged(BypassState As Boolean)
|
||||
Dim PressedBypassStateButton As PressedCommandButton = Nothing
|
||||
Dim TwoBypassStateButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
For Each MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_BYPASSTATE Then
|
||||
If TypeOf MachineButton Is TwoStateButton Then
|
||||
TwoBypassStateButton = MachineButton
|
||||
|
||||
@@ -1,271 +0,0 @@
|
||||
<UserControl x:Class="AlzFrontUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256">
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<!--<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Titolo della colonna della ALZATINE-->
|
||||
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="Alz."
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<!--Titolo della colonna dei FRONTALINI-->
|
||||
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="Front."
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A1" Grid.Column="2" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,0"/>
|
||||
<CheckBox Name="F1" Grid.Column="3" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A2" Grid.Column="2" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F2" Grid.Column="3" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A3" Grid.Column="2" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F3" Grid.Column="3" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A4" Grid.Column="2" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F4" Grid.Column="3" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A5" Grid.Column="2" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F5" Grid.Column="3" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A6" Grid.Column="2" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F6" Grid.Column="3" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A7" Grid.Column="2" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F7" Grid.Column="3" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A8" Grid.Column="2" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F8" Grid.Column="3" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A9" Grid.Column="2" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F9" Grid.Column="3" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A10" Grid.Column="2" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<CheckBox Name="F10" Grid.Column="3" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<!--<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Altezza delle alette -->
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Text="Offset"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1ATxBx"
|
||||
Grid.Column="2" Grid.Row="0"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1FTxBx"
|
||||
Grid.Column="3" Grid.Row="0"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!-- Delta angolo (abilitato solo per i frontalini) -->
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<!-- temporaneamente disabilito la definizione delta angolo per alzatine -->
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
|
||||
IsEnabled="False"
|
||||
Visibility="Collapsed"
|
||||
Grid.Column="2" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2FTxBx"
|
||||
Grid.Column="3" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!-- Spessore aletta -->
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--Gestisco nello spazio di una TextBox due TextBoxs--><!--
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
Grid.Column="2" Grid.Row="12"
|
||||
Width="40" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||
Grid.Column="3" Grid.Row="12"
|
||||
Width="40" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>-->
|
||||
|
||||
|
||||
<!--<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Affondamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<!--<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Text="Accorciamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
|
||||
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
|
||||
<Button Name="Vuoto" Visibility="Hidden"/>
|
||||
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
|
||||
<Button Name="BackBtn"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,864 +0,0 @@
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class AlzFrontUC
|
||||
Private Const NUM_VAR As Integer = 10
|
||||
Private Const LUA_CMP_VARS As String = "CMP"
|
||||
Private Const LUA_CMP_DRAW As String = "CMP_Draw"
|
||||
Private Const INFO_VAR As String = "Var"
|
||||
Private Const INFO_CMP As String = "CMP"
|
||||
Private Const INFO_ID As String = "ID"
|
||||
Friend Const LUA_CMP_INDEX As String = LUA_CMP_VARS & ".Ind"
|
||||
Friend Const LUA_CMP_INTERNAL As String = LUA_CMP_VARS & ".Int"
|
||||
Friend Const LUA_REMOVEHOLE As String = "RemoveHole"
|
||||
|
||||
' Costanti layer componenti
|
||||
Friend Const COMPO_LAYER_AUX As String = "LayAux"
|
||||
Friend Const COMPO_LAYER_QUOTATURE As String = "Quotature"
|
||||
Friend Const COMPO_LAYER_ETICHETTE As String = "Etichette"
|
||||
|
||||
' nome della info riferita alle alzatine e ai frontalini (1=Alz, 2=Front, 0=niente)
|
||||
Private Const INFO_ALZFRONT As String = "AF"
|
||||
|
||||
' Properties
|
||||
Private m_sCompoDir As String = String.Empty
|
||||
Private m_sCompoName As String = String.Empty
|
||||
Friend m_bDrawOk As Boolean = False
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
' Riferimento alla pagina che ha aperto SideAngleUC
|
||||
Private m_CallingPage As MainWindow.Pages
|
||||
|
||||
' Gestione pagine
|
||||
Private Const MAX_LINES As Integer = 10
|
||||
' lista dei lati, in cui indico il tipo di entità da associare
|
||||
Private AlzFrontEntityList As New List(Of AlzFrontEntity)
|
||||
|
||||
' numero di lati presenti nella figura
|
||||
Private m_nCount As Integer = 0
|
||||
' numero di righe rese disponibili nella pagina -> m_nShow = min(m_nCount, MAX_LINE)
|
||||
Private m_nShow As Integer = MAX_LINES
|
||||
|
||||
Private bInternalSelection As Boolean = False
|
||||
|
||||
' raggio circoscritto al pezzo
|
||||
Private m_dBBoxRad As Double
|
||||
' dimensione dei caratteri
|
||||
Private m_dH As Double
|
||||
|
||||
Private Sub AlzFrontPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.AlzFront
|
||||
|
||||
' numero di elemnti presenti nella lista SideAngle/DripEntity
|
||||
m_nCount = 0
|
||||
' numero di righe rese disponibili nella pagina -> m_nShow = min(m_nCount, MAX_LINE)
|
||||
m_nShow = 0
|
||||
|
||||
' carico la lista dei lati della figura
|
||||
InitSides()
|
||||
' aggiorno la visualizzazione delle TextBox e dei CheckBox
|
||||
TxBlChBxView()
|
||||
' imposto lo stato delle checkbox
|
||||
SetCheck()
|
||||
|
||||
' nascondo il bottone Back della pagina Draw
|
||||
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Visibility.Hidden
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Hidden
|
||||
' Disabilito bottoni angoli di fianco e lavorazioni da sotto
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||
|
||||
' nome dei parametri condivisi
|
||||
Parameter1TxBl.Text = "Altezza"
|
||||
Parameter2TxBl.Text = "Delta angolo"
|
||||
Parameter5TxBl.Text = "Spessore"
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
' carico la lista dei lati della figura corrente
|
||||
Private Sub InitSides()
|
||||
' pulisco la lista dei lati
|
||||
AlzFrontEntityList.Clear()
|
||||
|
||||
' Id del pezzo
|
||||
Dim PartId As Integer = GDB_ID.NULL
|
||||
' Id del loop eseterno
|
||||
Dim LoopId As Integer = GDB_ID.NULL
|
||||
' Id delle label
|
||||
Dim LabelId As Integer = GDB_ID.NULL
|
||||
|
||||
' definisco i valori delle altezza e degli angoli di spoglia per le alzatine e i frontalini (letti da file ini del programma)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", Parameter1ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
Parameter5TxBx.Text = Utility.LenToString(m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight, 2)
|
||||
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
' Ricavo nome primo pezzo
|
||||
PartId = EgtGetFirstPart()
|
||||
' se non esiste un pezzo corrente allora esco
|
||||
If PartId = GDB_ID.NULL Then Return
|
||||
|
||||
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
||||
LoopId = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||
|
||||
' Recupero il layer "Etichette" per inserirvi il nome dei lati
|
||||
LabelId = EgtGetFirstNameInGroup(EgtGetFirstPart(), COMPO_LAYER_ETICHETTE)
|
||||
If LabelId = GDB_ID.NULL Then
|
||||
LabelId = EgtCreateGroup(PartId)
|
||||
EgtSetName(LabelId, COMPO_LAYER_ETICHETTE)
|
||||
Else
|
||||
' se esistente allora lo svuoto
|
||||
EgtEmptyGroup(LabelId)
|
||||
End If
|
||||
EgtSetStatus(LabelId, GDB_ST.ON_)
|
||||
|
||||
'Determino se loop esterno o interno
|
||||
Dim sLoopName As String = ""
|
||||
Dim bOutLoop As Boolean = (EgtGetName(LoopId, sLoopName) AndAlso sLoopName = NAME_OUTLOOP)
|
||||
' Calcolo dimensione ingombro Loop
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(LoopId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
' utilizzato per definire la dimensione dei caratteri delle label per i lati
|
||||
m_dBBoxRad = 0.5 * Point3d.DistXY(ptMin, ptMax)
|
||||
|
||||
' Recupero Id della curva del Loop Esterno
|
||||
Dim PrevLine As Integer = EgtGetLastInGroup(LoopId)
|
||||
Dim CurrLine As Integer = EgtGetFirstInGroup(LoopId)
|
||||
' Creo indice per numerare le entità in ImportPage
|
||||
Dim nEntityIndex As Integer = 1
|
||||
Dim nOtherIndex As Integer = 1
|
||||
|
||||
' inserisco il lato nella lista
|
||||
While CurrLine <> GDB_ID.NULL
|
||||
' escludo tutte le forme che non sono delle linee
|
||||
If EgtGetType(CurrLine) = GDB_TY.CRV_LINE Then
|
||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere una alzatina o un frontalino
|
||||
Dim sNameCurrLine As String = String.Empty
|
||||
Dim nInfo As Integer = 0
|
||||
Dim dSideAng As Integer = 0
|
||||
EgtSetName(CurrLine, "A" & nEntityIndex.ToString)
|
||||
EgtGetName(CurrLine, sNameCurrLine)
|
||||
' inserisco la numerazione dei lati della figura
|
||||
AddTextToLine(sNameCurrLine, LabelId, CurrLine, 20, m_dBBoxRad, True)
|
||||
' recupero l'informazione
|
||||
EgtGetInfo(CurrLine, INFO_ALZFRONT, nInfo)
|
||||
If nInfo = 1 Then
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.ALZATINA))
|
||||
ElseIf nInfo = 2 Then
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.FRONTALINO))
|
||||
Else
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine))
|
||||
End If
|
||||
' inserisco riferimento univoco al lato (solo se non esiste)
|
||||
Dim sInfoRef As String = String.Empty
|
||||
EgtGetInfo(CurrLine, "RefAF", sInfoRef)
|
||||
If String.IsNullOrEmpty(sInfoRef) Then
|
||||
Dim sRefGUID As String = System.Guid.NewGuid().ToString()
|
||||
EgtSetInfo(CurrLine, "RefAF", sRefGUID)
|
||||
End If
|
||||
nEntityIndex += 1
|
||||
Else
|
||||
EgtSetName(CurrLine, "B" & nOtherIndex.ToString)
|
||||
nOtherIndex = nOtherIndex + 1
|
||||
End If
|
||||
|
||||
PrevLine = CurrLine
|
||||
CurrLine = EgtGetNext(CurrLine)
|
||||
End While
|
||||
|
||||
' Aggiorno numero di lati carciati
|
||||
m_nCount = AlzFrontEntityList.Count()
|
||||
' Aggiorno numero item visualizzati nella pagina iniziale
|
||||
m_nShow = Math.Min(m_nCount, MAX_LINES)
|
||||
|
||||
' Se non ci sono lati su cui operare, messaggio utente
|
||||
If LoopId <> GDB_ID.NULL Then
|
||||
If m_nCount = 0 Then
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
Else
|
||||
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_ImportPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
End If
|
||||
Else
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = ""
|
||||
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Brushes.Transparent
|
||||
Else
|
||||
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = ""
|
||||
m_MainWindow.m_ImportPageUC.MessageBrd.Background = Brushes.Transparent
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' aggiungo l'Info che comunica se il lato è stato modificato
|
||||
InitList()
|
||||
|
||||
End Sub
|
||||
|
||||
' Imposto la visibilità degli oggetti nella pagina: qui eseguo l'impaginazione
|
||||
Private Sub TxBlChBxView()
|
||||
|
||||
If m_nCount = 0 Then
|
||||
' nascondo il nome delle colonne
|
||||
SideAngleBl.Visibility = Windows.Visibility.Hidden
|
||||
HeelBl.Visibility = Windows.Visibility.Hidden
|
||||
Else
|
||||
' definisco il posizionamento del nome (Alz.) delle colonne all'interno della grigia
|
||||
Grid.SetRow(SideAngleBl, MAX_LINES - m_nShow)
|
||||
SideAngleBl.Text = "Alz."
|
||||
SideAngleBl.Visibility = Windows.Visibility.Visible
|
||||
' definisco il posizionamento del nome (Front.) delle colonne all'interno della grigia
|
||||
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
|
||||
HeelBl.Text = "Front."
|
||||
HeelBl.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' Lati visibili
|
||||
For nI As Integer = 1 To m_nShow
|
||||
Dim Index As Integer = MAX_LINES - m_nShow + nI
|
||||
' definisco la visibilità della label
|
||||
GetTxBlFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
GetTxBlFromIndex(Index).Text = "A" & nI.ToString
|
||||
GetChBxAlzFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
GetChBxFrontFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
' annulo le eventuali selezioni
|
||||
bInternalSelection = True
|
||||
GetChBxAlzFromIndex(Index).IsChecked = False
|
||||
bInternalSelection = True
|
||||
GetChBxFrontFromIndex(Index).IsChecked = False
|
||||
|
||||
' aggiungo i campi per allungare e accorciare i lati (adesso sostituito con le CheckBox)
|
||||
'GetAngleTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
'GetHeelTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
Next
|
||||
|
||||
' Lati nascosti: nascondo i lati partendo dall'alto (se ho 4 lati la prima TextBx disponibile è la settima -> 11-4 = 7 lati nascosti)
|
||||
For Index As Integer = 1 To MAX_LINES - m_nShow
|
||||
' definisco la visibilità della label
|
||||
GetTxBlFromIndex(Index).Visibility = Windows.Visibility.Hidden
|
||||
GetChBxAlzFromIndex(Index).Visibility = Windows.Visibility.Hidden
|
||||
GetChBxFrontFromIndex(Index).Visibility = Windows.Visibility.Hidden
|
||||
bInternalSelection = True
|
||||
GetChBxAlzFromIndex(Index).IsChecked = False
|
||||
bInternalSelection = True
|
||||
GetChBxFrontFromIndex(Index).IsChecked = False
|
||||
'GetAngleTxBxFromIndex(Index).Visibility = Windows.Visibility.Hidden
|
||||
'GetHeelTxBxFromIndex(Index).Visibility = Windows.Visibility.Hidden
|
||||
|
||||
Next
|
||||
bInternalSelection = False
|
||||
End Sub
|
||||
|
||||
Private Sub SetCheck()
|
||||
For IndexSide As Integer = 0 To AlzFrontEntityList.Count() - 1
|
||||
Dim sNameSide As String = AlzFrontEntityList(IndexSide).SideName
|
||||
Dim IndexCh As Integer = IndexSide + MAX_LINES - m_nShow + 1
|
||||
If AlzFrontEntityList(IndexSide).Type = AlzFrontEntity.AlzFront.ALZATINA Then
|
||||
bInternalSelection = True
|
||||
GetChBxAlzFromIndex(IndexCh).IsChecked = True
|
||||
ElseIf AlzFrontEntityList(IndexSide).Type = AlzFrontEntity.AlzFront.FRONTALINO Then
|
||||
bInternalSelection = True
|
||||
GetChBxFrontFromIndex(IndexCh).IsChecked = True
|
||||
End If
|
||||
Next
|
||||
bInternalSelection = False
|
||||
End Sub
|
||||
|
||||
|
||||
' Permette di aggiugere accanto alla linea passata
|
||||
Friend Function AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double,
|
||||
dBBoxRad As Double, bTextExt As Boolean, Optional bRot As Boolean = False) As Integer
|
||||
' Calcolo altezza testo
|
||||
m_dH = 0.05 * dBBoxRad
|
||||
' Creo testo
|
||||
Dim nText As Integer = EgtCreateTextAdv(TextLayer, Point3d.ORIG(), 0, sText, "", 500, False, m_dH, 1, 0, INS_POS.MC)
|
||||
' Calcolo posizionamento
|
||||
' BBox del testo e suo centro
|
||||
Dim ptMinBBox As Point3d
|
||||
Dim ptMaxBBox As Point3d
|
||||
EgtGetBBox(nText, GDB_BB.STANDARD, ptMinBBox, ptMaxBBox)
|
||||
Dim ptMidBBox As Point3d
|
||||
ptMidBBox = Point3d.Media(ptMinBBox, ptMaxBBox)
|
||||
' Punto medio della curva
|
||||
Dim ptMid As Point3d
|
||||
EgtMidPoint(CurrLine, nText, ptMid)
|
||||
' Versore sul punto medio della curva
|
||||
Dim vtMid As Vector3d
|
||||
EgtMidVector(CurrLine, nText, vtMid)
|
||||
' versore perpendicolare alla CurrLine che punta verso il testo
|
||||
Dim vtOrto As New Vector3d(vtMid)
|
||||
If bTextExt Then
|
||||
vtOrto.Rotate(Vector3d.Z_AX(), -90)
|
||||
Else
|
||||
vtOrto.Rotate(Vector3d.Z_AX(), 90)
|
||||
End If
|
||||
' eventuale rotazione del testo
|
||||
Dim dRotAng As Double = 0
|
||||
If bRot Then
|
||||
dRotAng = Math.Atan2(vtMid.y, vtMid.x) * 180 / Math.PI
|
||||
Dim dSpecRotAng = dRotAng
|
||||
If dSpecRotAng > 91 Then
|
||||
dSpecRotAng -= 180
|
||||
ElseIf dSpecRotAng < -89 Then
|
||||
dSpecRotAng += 180
|
||||
End If
|
||||
EgtRotate(nText, Point3d.ORIG(), Vector3d.Z_AX(), dSpecRotAng)
|
||||
End If
|
||||
' vettore dal centro del BBox all'estremo più vicino
|
||||
Dim vtptExtptMC As Vector3d
|
||||
If bRot Then
|
||||
vtptExtptMC = New Vector3d(0, ptMidBBox.y - ptMinBBox.y, 0)
|
||||
vtptExtptMC.Rotate(Vector3d.Z_AX(), dRotAng)
|
||||
Else
|
||||
If bTextExt Then
|
||||
If vtMid.x > 0 Then
|
||||
If vtMid.y > 0 Then
|
||||
vtptExtptMC = ptMidBBox - New Point3d(ptMinBBox.x, ptMaxBBox.y, 0)
|
||||
Else
|
||||
vtptExtptMC = ptMidBBox - ptMaxBBox
|
||||
End If
|
||||
Else
|
||||
If vtMid.y > 0 Then
|
||||
vtptExtptMC = ptMidBBox - ptMinBBox
|
||||
Else
|
||||
vtptExtptMC = ptMidBBox - New Point3d(ptMaxBBox.x, ptMinBBox.y, 0)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If vtMid.x > 0 Then
|
||||
If vtMid.y > 0 Then
|
||||
vtptExtptMC = ptMidBBox - New Point3d(ptMaxBBox.x, ptMinBBox.y, 0)
|
||||
Else
|
||||
vtptExtptMC = ptMidBBox - ptMinBBox
|
||||
End If
|
||||
Else
|
||||
If vtMid.y > 0 Then
|
||||
vtptExtptMC = ptMidBBox - ptMaxBBox
|
||||
Else
|
||||
vtptExtptMC = ptMidBBox - New Point3d(ptMinBBox.x, ptMaxBBox.y, 0)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' Calcolo il centro del testo
|
||||
Dim ptTextMC As Point3d = ptMid + vtOrto * (dDistance + (vtOrto * vtptExtptMC))
|
||||
EgtMove(nText, (ptTextMC - Point3d.ORIG()))
|
||||
Return nText
|
||||
End Function
|
||||
|
||||
#Region "CHIAMATA ALLE TEXT/CHECK/LABEL"
|
||||
Private Function GetChBxAlzFromIndex(Index As Integer) As CheckBox
|
||||
Select Case Index
|
||||
Case 1
|
||||
Return A1
|
||||
Case 2
|
||||
Return A2
|
||||
Case 3
|
||||
Return A3
|
||||
Case 4
|
||||
Return A4
|
||||
Case 5
|
||||
Return A5
|
||||
Case 6
|
||||
Return A6
|
||||
Case 7
|
||||
Return A7
|
||||
Case 8
|
||||
Return A8
|
||||
Case 9
|
||||
Return A9
|
||||
Case Else
|
||||
Return A10
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetChBxAalZFromName(sName As String) As CheckBox
|
||||
Select Case sName
|
||||
Case "A1"
|
||||
Return A1
|
||||
Case "A2"
|
||||
Return A2
|
||||
Case "A3"
|
||||
Return A3
|
||||
Case "A4"
|
||||
Return A4
|
||||
Case "A5"
|
||||
Return A5
|
||||
Case "A6"
|
||||
Return A6
|
||||
Case "A7"
|
||||
Return A7
|
||||
Case "A8"
|
||||
Return A8
|
||||
Case "A9"
|
||||
Return A9
|
||||
Case Else
|
||||
Return A10
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetChBxFrontFromIndex(Index As Integer) As CheckBox
|
||||
Select Case Index
|
||||
Case 1
|
||||
Return F1
|
||||
Case 2
|
||||
Return F2
|
||||
Case 3
|
||||
Return F3
|
||||
Case 4
|
||||
Return F4
|
||||
Case 5
|
||||
Return F5
|
||||
Case 6
|
||||
Return F6
|
||||
Case 7
|
||||
Return F7
|
||||
Case 8
|
||||
Return F8
|
||||
Case 9
|
||||
Return F9
|
||||
Case Else
|
||||
Return F10
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetChBxFrontFromName(sName As String) As CheckBox
|
||||
Select Case sName
|
||||
Case "F1"
|
||||
Return F1
|
||||
Case "F2"
|
||||
Return F2
|
||||
Case "F3"
|
||||
Return F3
|
||||
Case "F4"
|
||||
Return F4
|
||||
Case "F5"
|
||||
Return F5
|
||||
Case "F6"
|
||||
Return F6
|
||||
Case "F7"
|
||||
Return F7
|
||||
Case "F8"
|
||||
Return F8
|
||||
Case "F9"
|
||||
Return F9
|
||||
Case Else
|
||||
Return F10
|
||||
End Select
|
||||
End Function
|
||||
|
||||
'Private Function GetAngleTxBxFromIndex(Index As Integer) As EgtWPFLib.EgtTextBox
|
||||
' Select Case Index
|
||||
' Case 1
|
||||
' Return A1TxBx
|
||||
' Case 2
|
||||
' Return A2TxBx
|
||||
' Case 3
|
||||
' Return A3TxBx
|
||||
' Case 4
|
||||
' Return A4TxBx
|
||||
' Case 5
|
||||
' Return A5TxBx
|
||||
' Case 6
|
||||
' Return A6TxBx
|
||||
' Case 7
|
||||
' Return A7TxBx
|
||||
' Case 8
|
||||
' Return A8TxBx
|
||||
' Case 9
|
||||
' Return A9TxBx
|
||||
' Case Else
|
||||
' Return A10TxBx
|
||||
' End Select
|
||||
'End Function
|
||||
|
||||
'Private Function GetHeelTxBxFromIndex(Index As Integer) As EgtWPFLib.EgtTextBox
|
||||
' Select Case Index
|
||||
' Case 1
|
||||
' Return H1TxBx
|
||||
' Case 2
|
||||
' Return H2TxBx
|
||||
' Case 3
|
||||
' Return H3TxBx
|
||||
' Case 4
|
||||
' Return H4TxBx
|
||||
' Case 5
|
||||
' Return H5TxBx
|
||||
' Case 6
|
||||
' Return H6TxBx
|
||||
' Case 7
|
||||
' Return H7TxBx
|
||||
' Case 8
|
||||
' Return H8TxBx
|
||||
' Case 9
|
||||
' Return H9TxBx
|
||||
' Case Else
|
||||
' Return H10TxBx
|
||||
' End Select
|
||||
'End Function
|
||||
|
||||
Private Function GetTxBlFromIndex(Index As Integer) As TextBlock
|
||||
Select Case Index
|
||||
Case 1
|
||||
Return Entity1
|
||||
Case 2
|
||||
Return Entity2
|
||||
Case 3
|
||||
Return Entity3
|
||||
Case 4
|
||||
Return Entity4
|
||||
Case 5
|
||||
Return Entity5
|
||||
Case 6
|
||||
Return Entity6
|
||||
Case 7
|
||||
Return Entity7
|
||||
Case 8
|
||||
Return Entity8
|
||||
Case 9
|
||||
Return Entity9
|
||||
Case Else
|
||||
Return Entity10
|
||||
End Select
|
||||
End Function
|
||||
|
||||
#End Region ' Chiamata elle Text/Check/Label
|
||||
|
||||
#Region "SELEZIONE CHECKBOX"
|
||||
|
||||
' Per gestire la selezione/deselezione delle Alzatine
|
||||
Private Sub A_Checked(sender As Object, e As RoutedEventArgs) Handles A1.Checked, A2.Checked, A3.Checked, A4.Checked, A5.Checked, A6.Checked, A7.Checked, A8.Checked, A9.Checked, A10.Checked,
|
||||
A1.Unchecked, A2.Unchecked, A3.Unchecked, A4.Unchecked, A5.Unchecked, A6.Unchecked, A7.Unchecked, A8.Unchecked, A9.Unchecked, A10.Unchecked
|
||||
' recupero il nome della Check selezionata
|
||||
Dim bIsAlzatina As Boolean = True
|
||||
Dim sChName As String = DirectCast(sender, CheckBox).Name
|
||||
Dim bIsChecked As Boolean = DirectCast(sender, CheckBox).IsChecked
|
||||
Dim sSideName As String = GetSideFromCheck(sChName, bIsAlzatina)
|
||||
Dim sOppositeCheckBox As String = GetOppositeCheck(sChName, bIsAlzatina)
|
||||
' se la modifica della stato della checkbox avviene internamente al programma allora non devo eseguire nessun aggiornamento
|
||||
If bInternalSelection Then
|
||||
bInternalSelection = False
|
||||
Return
|
||||
End If
|
||||
RefreshList(sSideName, sOppositeCheckBox, bIsAlzatina, bIsChecked)
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
' Per gestire la selezione/deselezione dei Frontalini
|
||||
Private Sub F_Checked(sender As Object, e As RoutedEventArgs) Handles F1.Checked, F2.Checked, F3.Checked, F4.Checked, F5.Checked, F6.Checked, F7.Checked, F8.Checked, F9.Checked, F10.Checked,
|
||||
F1.Unchecked, F2.Unchecked, F3.Unchecked, F4.Unchecked, F5.Unchecked, F6.Unchecked, F7.Unchecked, F8.Unchecked, F9.Unchecked, F10.Unchecked
|
||||
' recupero il nome della Check selezionata
|
||||
Dim bIsAlzatina As Boolean = False
|
||||
Dim sChName As String = DirectCast(sender, CheckBox).Name
|
||||
Dim bIsChecked As Boolean = DirectCast(sender, CheckBox).IsChecked
|
||||
Dim sSideName As String = GetSideFromCheck(sChName, bIsAlzatina)
|
||||
Dim sOppositeCheckBox As String = GetOppositeCheck(sChName, bIsAlzatina)
|
||||
' se la modifica della stato della checkbox avviene internamente al programma allora non devo eseguire nessun aggiornamento
|
||||
If bInternalSelection Then
|
||||
bInternalSelection = False
|
||||
Return
|
||||
End If
|
||||
RefreshList(sSideName, sOppositeCheckBox, bIsAlzatina, bIsChecked)
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
#End Region ' Selezione CheckBox
|
||||
|
||||
#Region "ALTEZZA, DELTA ANGOLO DI SPOGLIA"
|
||||
|
||||
' altezza ALZATINA
|
||||
Private Sub ParameterA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1ATxBx.EgtClosed
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter1ATxBx.Text, dValue)
|
||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||
WritePrivateProfileString("Alz&Front", "A_Height", Parameter1ATxBx.Text, m_MainWindow.GetIniFile())
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
' altezza FRONTALINO
|
||||
Private Sub Parameter1FTxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1FTxBx.EgtClosed
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter1FTxBx.Text, dValue)
|
||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||
WritePrivateProfileString("Alz&Front", "F_Height", Parameter1FTxBx.Text, m_MainWindow.GetIniFile())
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
' angolo di spoglia ALZATINA
|
||||
Private Sub ParameterA2TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter2ATxBx.EgtClosed
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter2ATxBx.Text, dValue)
|
||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||
WritePrivateProfileString("Alz&Front", "A_DeltaAng", Parameter2ATxBx.Text, m_MainWindow.GetIniFile())
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
' angolo di spoglia FRONTALINO
|
||||
Private Sub Parameter2FTxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter2FTxBx.EgtClosed
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter2FTxBx.Text, dValue)
|
||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||
WritePrivateProfileString("Alz&Front", "F_DeltaAng", Parameter2FTxBx.Text, m_MainWindow.GetIniFile())
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter5TxBx.Text, dValue)
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
#End Region ' Altezza, delta angolo di spoglia
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
' noto il nome della checkbox (scritta nel codice xaml) selezionata restituisce il nome del lato (associato al disegno)
|
||||
Private Function GetSideFromCheck(sNameCheck As String, bIsAlz As Boolean) As String
|
||||
Dim sSideName As String = String.Empty
|
||||
Dim sTypeCheck As String = "A"
|
||||
If Not bIsAlz Then
|
||||
sTypeCheck = "F"
|
||||
End If
|
||||
' separo il nome in due
|
||||
Dim sItems As String() = Split(sNameCheck, sTypeCheck)
|
||||
Dim nIndex As Integer
|
||||
' costruisco il nome del lato
|
||||
If sItems.Count > 1 Then
|
||||
nIndex = CInt(sItems(1))
|
||||
nIndex = nIndex - (MAX_LINES - m_nShow)
|
||||
sSideName = "A" & nIndex.ToString
|
||||
End If
|
||||
|
||||
Return sSideName
|
||||
End Function
|
||||
|
||||
' restituisce il nome del check opposto (Se passo una alzaztina restituisco il nome della checbox del frontalino)
|
||||
Private Function GetOppositeCheck(sNameCheck As String, bIsAlz As Boolean) As String
|
||||
Dim sSideName As String = String.Empty
|
||||
Dim sTypeCheck As String = "A"
|
||||
If Not bIsAlz Then
|
||||
sTypeCheck = "F"
|
||||
End If
|
||||
' separo il nome in due
|
||||
Dim sItems As String() = Split(sNameCheck, sTypeCheck)
|
||||
|
||||
' estraggo l'indice del lato selezionato e costruisco il nome del CheckBox opposto
|
||||
If sItems.Count > 1 Then
|
||||
If bIsAlz Then
|
||||
sSideName = "F" & sItems(1).Trim
|
||||
Else
|
||||
sSideName = "A" & sItems(1).Trim
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return sSideName
|
||||
End Function
|
||||
|
||||
Private Sub InitList()
|
||||
' quando avvio la pagina inizializzo tutti i lati comunicando che non sono stati modificati
|
||||
For j As Integer = 0 To AlzFrontEntityList.Count() - 1
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 0)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' aggiorno lo stato della dell'oggetto
|
||||
Private Sub RefreshList(sSideName As String, sOppositeNameCheck As String, bIsAlz As Boolean, bIsChecked As Boolean)
|
||||
For j As Integer = 0 To AlzFrontEntityList.Count() - 1
|
||||
If AlzFrontEntityList(j).SideName = sSideName Then
|
||||
' se deseleziono
|
||||
If Not bIsChecked Then
|
||||
AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.NONE
|
||||
' insrisco l'informazione nelle info del lato
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 0)
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
|
||||
Exit For
|
||||
End If
|
||||
' se selezione di Alz. o Front.
|
||||
If bIsAlz Then
|
||||
AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.ALZATINA
|
||||
' deseleziono il Check opposto
|
||||
If GetChBxFrontFromName(sOppositeNameCheck).IsChecked Then
|
||||
bInternalSelection = True
|
||||
GetChBxFrontFromName(sOppositeNameCheck).IsChecked = False
|
||||
End If
|
||||
' insrisco l'informazione nelle info del lato
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 1)
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
|
||||
Else
|
||||
AlzFrontEntityList(j).Type = AlzFrontEntity.AlzFront.FRONTALINO
|
||||
' deseleziono il Check opposto
|
||||
If GetChBxAalZFromName(sOppositeNameCheck).IsChecked Then
|
||||
bInternalSelection = True
|
||||
GetChBxAalZFromName(sOppositeNameCheck).IsChecked = False
|
||||
End If
|
||||
' inserisco l'informazione nelle info del lato
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, INFO_ALZFRONT, 2)
|
||||
EgtSetInfo(AlzFrontEntityList(j).Id, "IsModify", 1)
|
||||
End If
|
||||
' termino il ciclo
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' questa funzione deve essere lanciata al termine di ogno selezione o modifica dei parametri di dimensione
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
' eseguo il file per generare le Alzatine e i Frontalini (stesso file Lua)
|
||||
Private Sub LoadCurrentCompo()
|
||||
' !! ATTENZIONE !! : per problemi di spazio è stata spenta la text per stampare i messaggi (ma potrebbe servire?)
|
||||
' Pulisco l'ambiente lua
|
||||
EgtLuaResetGlobVar(LUA_CMP_VARS)
|
||||
EgtLuaResetGlobVar(LUA_CMP_DRAW)
|
||||
|
||||
Dim nCompoName As Integer
|
||||
Dim sCompoFile As String = ""
|
||||
Dim sCompoImage As String = ""
|
||||
|
||||
' recupero il nome del direttorio
|
||||
Dim sCompoDir As String = String.Empty
|
||||
GetPrivateProfileString(S_ALZFRONT, K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
|
||||
' leggo le info inserite nel campo "Alz&Front"
|
||||
m_MainWindow.m_DrawPageUC.m_MainComponentPage.GetPrivateProfileCompo(S_ALZFRONT, K_ALZFRONT, nCompoName, sCompoFile, sCompoImage, m_MainWindow.GetIniFile())
|
||||
'Dim sCompoImageSource As ImageSource
|
||||
|
||||
' Costruisco path completa del componente
|
||||
Dim sPath = sCompoDir & "\" & sCompoFile
|
||||
' Carico il file
|
||||
EgtLuaExecFile(sPath)
|
||||
|
||||
' carico la lista di variabili
|
||||
Dim dVal As Double
|
||||
If StringToLen(Parameter1ATxBx.Text, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.A_Height", dVal)
|
||||
End If
|
||||
If StringToLen(Parameter1FTxBx.Text, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.F_Height", dVal)
|
||||
End If
|
||||
If StringToLen(Parameter2ATxBx.Text, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.A_DeltaAng", dVal)
|
||||
End If
|
||||
If StringToLen(Parameter2FTxBx.Text, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal)
|
||||
End If
|
||||
If StringToLen(Parameter5TxBx.Text, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.ThicknessRaw", dVal)
|
||||
End If
|
||||
' parametri per la scrittura dei caratteri
|
||||
EgtLuaSetGlobNumVar("CMP.BBoxRad", m_dBBoxRad)
|
||||
EgtLuaSetGlobNumVar("CMP.HeightText", m_dH)
|
||||
|
||||
|
||||
Dim sMsg As String = String.Empty
|
||||
' eseguo la funzione per il disegno della componente (CMP_Draw)
|
||||
If Not EgtLuaExecLine(LUA_CMP_DRAW & "(true)") Then
|
||||
sMsg = "Error in component execution"
|
||||
m_bDrawOk = False
|
||||
Else
|
||||
EgtLuaGetGlobStringVar(LUA_CMP_VARS & ".MSG", sMsg)
|
||||
Dim nErr As Integer = 0
|
||||
EgtLuaGetGlobIntVar(LUA_CMP_VARS & ".ERR", nErr)
|
||||
m_bDrawOk = (nErr = 0)
|
||||
End If
|
||||
' aggiorno la grafica
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
|
||||
' metodo utilizzato per tornare indietro alla pagina di selezione "CompoInterni/Alz&Front"
|
||||
Private Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||
m_MainWindow.m_DrawPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
|
||||
' torno alla pagina iniziale di selezione del piano (Compo)
|
||||
'm_MainWindow.m_DrawPageUC.BackBtn_Click(sender, e)
|
||||
|
||||
'--------- NUOVA GESTIONE ---------
|
||||
' rimuovo l'elenco di bottoni per selezionare il tipo di componente interna
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||
' inserisco nella Grid VaribalsesGrid lo UeserControl per definire le dimensioni della componente
|
||||
m_MainWindow.m_DrawPageUC.VariablesGrd.Children.Add(m_MainWindow.m_DrawPageUC.m_CompoDimension)
|
||||
' nascondo la lista dei parametri
|
||||
m_MainWindow.m_DrawPageUC.m_CompoDimension.CollapsedAllParam()
|
||||
' sto uscendo dalla componente interna (quindi comunico il cambio di componente)
|
||||
m_MainWindow.m_DrawPageUC.m_bInternalCompo = False
|
||||
' comunico che sto arrivando da una componente interna
|
||||
m_MainWindow.m_DrawPageUC.m_bBackFromInternalCompo = True
|
||||
|
||||
'm_MainWindow.m_DrawPageUC.SelectedComponent(m_MainWindow.m_DrawPageUC.m_sMainCompo)
|
||||
'm_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.CompoDimension
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class AlzFrontEntity
|
||||
Public Enum AlzFront
|
||||
ALZATINA
|
||||
FRONTALINO
|
||||
NONE
|
||||
End Enum
|
||||
|
||||
Private m_SideName As String
|
||||
Private m_Id As Integer
|
||||
Private m_Type As AlzFront = AlzFront.NONE
|
||||
|
||||
' nome del lato scritto nel file nge (il nome deve avere la forma: A1, A2, .., An)
|
||||
Public Property SideName As String
|
||||
Get
|
||||
Return m_SideName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_SideName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Type As AlzFront
|
||||
Get
|
||||
Return m_Type
|
||||
End Get
|
||||
Set(value As AlzFront)
|
||||
m_Type = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Id As Integer
|
||||
Get
|
||||
Return m_Id
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Id = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Name As String, CurrId As Integer, Optional CurrType As AlzFront = AlzFront.NONE)
|
||||
m_SideName = Name
|
||||
m_Id = CurrId
|
||||
m_Type = CurrType
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -26,7 +26,7 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Label1" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
@@ -69,18 +69,12 @@
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox10" Grid.Column="1" Grid.Row="9" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--Per confermare l'inserimento CompoInterno-->
|
||||
<Button Name="AddBtn" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="CancelBtn" Grid.Column="1" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="InternComponentBtn" Grid.Row="11" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<!--Selezione delle componenti interne-->
|
||||
<Button Name="InternComponentBtn" Grid.Row="10" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="AddBtn" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="CancelBtn" Grid.Column="1" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<!--Selezione di Alz&Front-->
|
||||
<Button Name="AlzFrontBtn" Grid.Row="11" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -13,35 +13,15 @@ Public Class CompoDimensionUC
|
||||
|
||||
' Riferimento alla pagina di selezione dei componenti interni
|
||||
Friend m_InternalCompoPage As InternalComponentPageUC
|
||||
' Riferimento alla pagina di selezione della alzatine
|
||||
Friend m_AlzFrontPage As AlzFrontUC
|
||||
' solo se è configurato il direttorio della componente allora mostro il bottone
|
||||
Friend bEnableAlzFront As Boolean = False
|
||||
|
||||
Private Sub CompoDimensionUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
'Creazione delle Page UserControl (per le componenti interne)
|
||||
'Creazione delle Page UserControl
|
||||
m_InternalCompoPage = New InternalComponentPageUC
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_InternalCompoPage.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
m_InternalCompoPage.SetValue(Grid.RowSpanProperty, 4)
|
||||
|
||||
'Creazione della Page UserControl (per le alzatine e i frontalini)
|
||||
m_AlzFrontPage = New AlzFrontUC
|
||||
'Posizionamento nella griglia della Page UserControl
|
||||
m_AlzFrontPage.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
m_AlzFrontPage.SetValue(Grid.RowSpanProperty, 4)
|
||||
|
||||
Dim sCompoDir As String = String.Empty
|
||||
GetPrivateProfileString(S_ALZFRONT, K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
|
||||
' definisco il nome dei comandi presenti nella pagine
|
||||
InternComponentBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 47) ' Componenti interni
|
||||
If Not String.IsNullOrEmpty(sCompoDir) Then
|
||||
bEnableAlzFront = True
|
||||
AlzFrontBtn.Content = "Alzatine & Frontalini"
|
||||
Else
|
||||
AlzFrontBtn.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
|
||||
AddBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 48) ' Aggiungi
|
||||
CancelBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 49) ' Rimuovi
|
||||
End Sub
|
||||
@@ -53,19 +33,6 @@ Public Class CompoDimensionUC
|
||||
' Imposto questa come pagina correntemente visualizzata nella drawpage
|
||||
m_DrawPage.m_ActiveComponentPage = DrawPageUC.Pages.CompoDimension
|
||||
|
||||
' se arrivo dalla pagina delle componenti interne allora esco (non devo ricalcolare i parametri)
|
||||
If m_DrawPage.m_bBackFromInternalCompo Then
|
||||
ShowInternalBtn(True)
|
||||
ShowAlzFrontBtn(bEnableAlzFront)
|
||||
' Se componente interno visualizzo bottoni aggiungi rimuovi
|
||||
ShowAddRemoveBtn(m_DrawPage.m_bInternalCompo)
|
||||
' Imposto contesto corrente e faccio uno ZoomAll della scena con il componente
|
||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
EgtZoom(ZM.ALL)
|
||||
' termino il caricamento della pagina
|
||||
Return
|
||||
End If
|
||||
|
||||
' Se componente interno disabilito il bottone di ok della drawpage
|
||||
If m_DrawPage.m_bInternalCompo Then
|
||||
m_DrawPage.OkBtn.IsEnabled = False
|
||||
@@ -74,10 +41,8 @@ Public Class CompoDimensionUC
|
||||
If m_DrawPage.sCompoName.StartsWith("PCucina") Or
|
||||
m_DrawPage.sCompoName.StartsWith("PBagno") Then
|
||||
ShowInternalBtn(True)
|
||||
ShowAlzFrontBtn(bEnableAlzFront)
|
||||
Else
|
||||
ShowInternalBtn(False)
|
||||
ShowAlzFrontBtn(False)
|
||||
End If
|
||||
|
||||
' Se componente interno visualizzo bottoni aggiungi rimuovi
|
||||
@@ -93,7 +58,6 @@ Public Class CompoDimensionUC
|
||||
m_DrawPage.OkBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
' rende visibile il bottone per inserire le componenti interne: solo nella pagine delle componenti
|
||||
Friend Sub ShowInternalBtn(value As Boolean)
|
||||
If value Then
|
||||
InternComponentBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -102,16 +66,6 @@ Public Class CompoDimensionUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' rende visibile il bottone per inserire le azatine e i frontalini: solo nella pagina delle componenti
|
||||
Friend Sub ShowAlzFrontBtn(ByVal value As Boolean)
|
||||
If value Then
|
||||
AlzFrontBtn.Visibility = Visibility.Visible
|
||||
Else
|
||||
AlzFrontBtn.Visibility = Visibility.Hidden
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' definisce se rendere visbile oppure no i bottone "Aggiungi" e "Rimuovi": presenti solo nella componenti interne
|
||||
Friend Sub ShowAddRemoveBtn(value As Boolean)
|
||||
If value Then
|
||||
m_DrawPage.SideAngleBtn.IsEnabled = False
|
||||
@@ -279,18 +233,7 @@ Public Class CompoDimensionUC
|
||||
m_DrawPage.UpdateView()
|
||||
End Sub
|
||||
|
||||
Public Sub CollapsedAllParam()
|
||||
For i As Integer = 1 To NUM_VAR
|
||||
GetNameEdit(i).Visibility = Visibility.Collapsed
|
||||
GetValueEdit(i).Visibility = Visibility.Collapsed
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#Region "METHODS for InternalCompo"
|
||||
|
||||
' visualizzo la pagina per la selezione delle componenti interne
|
||||
Private Sub InternComponentBtn_Click(sender As Object, e As RoutedEventArgs) Handles InternComponentBtn.Click
|
||||
m_DrawPage.m_bBackFromInternalCompo = False
|
||||
' imposto contesto
|
||||
EgtSetCurrentContext(m_DrawPage.DrawScene.GetCtx())
|
||||
' Nascondo layer etichette e quotature
|
||||
@@ -305,25 +248,6 @@ Public Class CompoDimensionUC
|
||||
m_DrawPage.LeftButtonGrd.Children.Add(m_InternalCompoPage)
|
||||
End Sub
|
||||
|
||||
' visualizzo la pagina per la selezione delle componenti interne
|
||||
Private Sub AlzFrontBtn_Click(sender As Object, e As RoutedEventArgs) Handles AlzFrontBtn.Click
|
||||
m_DrawPage.m_bBackFromInternalCompo = False
|
||||
' imposto contesto
|
||||
EgtSetCurrentContext(m_DrawPage.DrawScene.GetCtx())
|
||||
' Nascondo layer etichette e quotature
|
||||
Dim Pz As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "LayAux"), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "Etichette"), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "Quotature"), GDB_ST.OFF)
|
||||
EgtDraw()
|
||||
|
||||
m_DrawPage.VariablesGrd.Children.Remove(Me)
|
||||
m_DrawPage.m_bInternalCompo = True
|
||||
m_DrawPage.LeftButtonGrd.Children.Add(m_AlzFrontPage)
|
||||
End Sub
|
||||
|
||||
|
||||
' Bottone utilizzato per inserire le componenti interne
|
||||
Private Sub AddBtn_Click(sender As Object, e As RoutedEventArgs) Handles AddBtn.Click
|
||||
' Se componente errato, non faccio alcunché
|
||||
If Not m_DrawPage.m_bDrawOk Then Return
|
||||
@@ -342,10 +266,15 @@ Public Class CompoDimensionUC
|
||||
End While
|
||||
End If
|
||||
' Esco dalla pagina
|
||||
ExitInternalVariable()
|
||||
m_DrawPage.VariablesGrd.Children.Remove(Me)
|
||||
m_DrawPage.LeftButtonGrd.Children.Add(m_InternalCompoPage)
|
||||
' Reset componente
|
||||
m_MainWindow.m_DrawPageUC.ResetCompoName()
|
||||
' Deseleziono oggetto corrente e aggiorno visualizzazione
|
||||
EgtDeselectAll()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' annulla l'inserimento della componente corrente
|
||||
Private Sub CancelBtn_Click(sender As Object, e As RoutedEventArgs) Handles CancelBtn.Click
|
||||
' Cancello layer con contorno errato
|
||||
Dim nId As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "ErrorLay")
|
||||
@@ -363,13 +292,7 @@ Public Class CompoDimensionUC
|
||||
Else
|
||||
m_DrawPage.m_bDrawOk = True
|
||||
End If
|
||||
' Esco dalla pagina
|
||||
ExitInternalVariable()
|
||||
End Sub
|
||||
|
||||
' Esco dalla pagine delle variabili della componente interna: reimposto la pagina della componenti interne
|
||||
Private Sub ExitInternalVariable()
|
||||
' Esco dalla pagina
|
||||
' Sistemo interfaccia
|
||||
m_DrawPage.VariablesGrd.Children.Remove(Me)
|
||||
m_DrawPage.LeftButtonGrd.Children.Add(m_InternalCompoPage)
|
||||
' Reset componente
|
||||
@@ -379,5 +302,4 @@ Public Class CompoDimensionUC
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS for InternalCompo
|
||||
End Class
|
||||
|
||||
@@ -30,9 +30,8 @@ Public Class DrawPageUC
|
||||
Friend m_SideAngleUC As SideAngleUC
|
||||
Friend m_FiloTopUC As FiloTopUC
|
||||
|
||||
' Variabile che indica se componenti interni o esterni (usato anche per definire le alzatine e i fronatlini)
|
||||
' Variabile che indica se componenti interni o esterni
|
||||
Friend m_bInternalCompo As Boolean = False
|
||||
Friend m_bBackFromInternalCompo As Boolean = False
|
||||
|
||||
' Properties
|
||||
Private m_sCompoDir As String = String.Empty
|
||||
@@ -41,10 +40,6 @@ Public Class DrawPageUC
|
||||
Friend m_bDrawOk As Boolean = False
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
' questa variabile serve per risalire al nome della componente che ospita i componenti interni att
|
||||
Friend m_sMainCompo As String = String.Empty
|
||||
|
||||
|
||||
' Trf Data
|
||||
Private m_bTrfData As Boolean = False
|
||||
Private m_TrfOrderCode As String = ""
|
||||
@@ -114,7 +109,6 @@ Public Class DrawPageUC
|
||||
CompoDimension
|
||||
SideAngle
|
||||
FiloTop
|
||||
AlzFront
|
||||
End Enum
|
||||
|
||||
Private Sub DrawPage_Initialized(sender As Object, e As EventArgs)
|
||||
@@ -185,7 +179,6 @@ Public Class DrawPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
' carico le impostazioni grafiche della scena (solo al primo avvio)
|
||||
Private Sub DrawPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
If m_bFirst Then
|
||||
@@ -212,14 +205,6 @@ Public Class DrawPageUC
|
||||
Dim DstLnColor As New Color3d(255, 0, 0)
|
||||
GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor, m_MainWindow.GetIniFile())
|
||||
DrawScene.SetDistLineMaterial(DstLnColor)
|
||||
|
||||
'' imposto il colore di sfondo del disegno
|
||||
'Dim BAckTopColor As New Color3d(192, 192, 192)
|
||||
'GetPrivateProfileColor(S_SCENE, "BackTop", BAckTopColor, m_MainWindow.GetIniFile())
|
||||
'Dim BackBottom As New Color3d(192, 192, 192)
|
||||
'GetPrivateProfileColor(S_SCENE, "BackBottom", BackBottom, m_MainWindow.GetIniFile())
|
||||
'DrawScene.SetViewBackground(BAckTopColor, BackBottom)
|
||||
|
||||
' imposto parametri OpenGL
|
||||
Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3, m_MainWindow.GetIniFile())
|
||||
Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
@@ -279,20 +264,16 @@ Public Class DrawPageUC
|
||||
m_sCsvName = ""
|
||||
End Sub
|
||||
|
||||
' recupero il click sulla scena ed assegno il metodo a secondo della pagina aperta
|
||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles DrawScene.OnMouseDownScene
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or Not DrawScene.IsStatusNull() Then Return
|
||||
' Si può selezionare solo se non si sta già editando un componente
|
||||
If m_ActiveComponentPage = Pages.InternalComponent Then
|
||||
OnMouseDownSceneInternalComponent(e)
|
||||
OnMouseDownSceneInternalComponent( e)
|
||||
ElseIf m_ActiveComponentPage = Pages.SideAngle Then
|
||||
OnMouseDownSceneSideAngle(e)
|
||||
OnMouseDownSceneSideAngle( e)
|
||||
ElseIf m_ActiveComponentPage = Pages.FiloTop Then
|
||||
OnMouseDownSceneFiloTop(e)
|
||||
ElseIf m_ActiveComponentPage = Pages.AlzFront Then
|
||||
' da definire
|
||||
|
||||
OnMouseDownSceneFiloTop( e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -516,7 +497,6 @@ Public Class DrawPageUC
|
||||
If sCompo = m_sCompoName Then
|
||||
Return
|
||||
End If
|
||||
|
||||
m_sCompoName = sCompo
|
||||
' Pulisco l'ambiente lua
|
||||
ResetLuaVariables()
|
||||
@@ -877,220 +857,7 @@ Public Class DrawPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' permette di inserire più di un part
|
||||
Private Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
||||
Dim InsertColor As Color3d = New Color3d(89, 210, 210)
|
||||
CompoColor(InsertColor, m_MainWindow.GetIniFile())
|
||||
|
||||
' Imposto il contesto corrente
|
||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||
Dim Pz As Integer = -1
|
||||
Dim NxtPz As Integer = -1
|
||||
|
||||
' Cancello layer regioni per selezione buchi
|
||||
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
|
||||
While Pz <> -1
|
||||
' imposto il contesto corrente
|
||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||
' salvo il file temporaneo per studio delle alzatine
|
||||
EgtSaveFile("c:\EgtData\OmagCUT\Temp\TempAlzatine.nge", NGE.CMPTEXT)
|
||||
' cerco un altro pezzo nell'elenco
|
||||
NxtPz = EgtGetNextPart(Pz)
|
||||
|
||||
Dim SelectRegion As Integer = EgtGetFirstNameInGroup(Pz, "SelectRegion")
|
||||
EgtErase(SelectRegion)
|
||||
' Cancello layer etichette, quotatura,ausiliario e box
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "LayAux"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Etichette"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Quotature"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Box"))
|
||||
|
||||
' Cancello layer etichette dei componenti interni (buchi)
|
||||
Dim nHLId As Integer = EgtGetFirstNameInGroup(Pz, "HoleLabels")
|
||||
While nHLId <> GDB_ID.NULL
|
||||
EgtErase(nHLId)
|
||||
nHLId = EgtGetFirstNameInGroup(Pz, "HoleLabels")
|
||||
End While
|
||||
|
||||
' Attivo visualizzazione misura
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(Pz, NAME_REGION)
|
||||
Dim nId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
While nId <> GDB_ID.NULL
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
End If
|
||||
nId = EgtGetNext(nId)
|
||||
End While
|
||||
|
||||
' Calcolo dimensione ingombro Pezzo tramite OutLoop
|
||||
Dim nOutLoopLayer = EgtGetFirstNameInGroup(Pz, NAME_OUTLOOP)
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, b3Part)
|
||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||
EgtMove(nRegLayId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||
|
||||
' Se pezzo con dati TRF
|
||||
If m_bTrfData Then
|
||||
' Nome da dati Trf
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = m_TrfOrderCode & "-" & m_TrfOrderDesc
|
||||
Dim sText2 As String = m_TrfMatCode & "-" & m_TrfSurfCode
|
||||
Dim sText3 As String = LenToString(b3Part.DimX(), 0) & " x " & LenToString(b3Part.DimY(), 0) & " x " & LenToString(m_TrfThickness, 0)
|
||||
Dim dRatio As Double = Math.Max(b3Part.DimX(), b3Part.DimY()) / Math.Min(b3Part.DimX(), b3Part.DimY())
|
||||
If dRatio < 5 Then
|
||||
sText = sText & "<br/>" & sText2 & "<br/>" & sText3
|
||||
Else
|
||||
sText = sText & " " & sText2 & " " & sText3
|
||||
End If
|
||||
EgtModifyText(nTextId, sText)
|
||||
Dim ptCen As Point3d
|
||||
EgtCenterPoint(nTextId, ptCen)
|
||||
Dim b3Text As New BBox3d
|
||||
EgtGetBBoxGlob(nTextId, GDB_BB.STANDARD, b3Text)
|
||||
Dim dCoeff As Double = Math.Min(b3Part.DimX() / b3Text.DimX(), b3Part.DimY() / b3Text.DimY()) / 1.25
|
||||
If dCoeff < 1 Then EgtScale(nTextId, New Frame3d(ptCen), dCoeff, dCoeff, dCoeff)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
' Info di pezzo da dati Trf
|
||||
EgtSetInfo(Pz, "OC", m_TrfOrderCode)
|
||||
EgtSetInfo(Pz, "OD", m_TrfOrderDesc)
|
||||
EgtSetInfo(Pz, "PC", m_TrfPartCode)
|
||||
EgtSetInfo(Pz, "MT", m_TrfMatCode)
|
||||
EgtSetInfo(Pz, "SRF", m_TrfSurfCode)
|
||||
EgtSetInfo(Pz, "L", DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, "W", DoubleToString(b3Part.DimY(), 1))
|
||||
EgtSetInfo(Pz, "T", m_TrfThickness)
|
||||
EgtSetInfo(Pz, "V1", DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, "V2", DoubleToString(b3Part.DimY(), 1))
|
||||
' Se altrimenti pezzo con dati Csv
|
||||
ElseIf m_bCsvData Then
|
||||
' Nome del pezzo
|
||||
EgtSetName(Pz, m_sCsvName)
|
||||
' Dati Csv
|
||||
EgtSetInfo(Pz, INFO_CSV_PART, m_sCsvName)
|
||||
EgtSetInfo(Pz, INFO_CSV_ORD, m_sCsvOrder)
|
||||
EgtSetInfo(Pz, INFO_CSV_DIST, m_sCsvList)
|
||||
EgtSetInfo(Pz, INFO_CSV_MAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
|
||||
EgtSetInfo(Pz, INFO_CSV_V1, DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, INFO_CSV_V2, DoubleToString(b3Part.DimY(), 1))
|
||||
' Se definito nome lo inserisco nel testo
|
||||
If Not String.IsNullOrWhiteSpace(m_sCsvName) Then
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim sNewText = m_sCsvName & "<br/>" & sText
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' Altrimenti pezzo con dati normali
|
||||
Else
|
||||
' Se definito nome lo inserisco nel testo
|
||||
If Not String.IsNullOrWhiteSpace(sName) Then
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim sNewText = sName & "<br/>" & sText
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
' Eventuale testo per indicare il sopra (solo nel caso di rettangolo)
|
||||
If TopChBx.IsVisible() And TopChBx.IsChecked() Then
|
||||
Utility.AddTopToPartRegion(nRegLayId)
|
||||
End If
|
||||
' Scrivo testi per nesting
|
||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||
' Imposto colore testi
|
||||
Utility.SetTextColor(nRegLayId)
|
||||
' Imposto il colore del pezzo inserito nel progetto
|
||||
Dim nPartInRegion As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
EgtSetColor(nPartInRegion, InsertColor)
|
||||
|
||||
' Esporto il pezzo in un file temporaneo
|
||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPartCompo.Nge"
|
||||
If Not EgtSaveObjToFile(Pz, sTmpFile, NGE.BIN) Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Elimino eventuali precedenti pezzi vuoti
|
||||
EgtEraseEmptyParts()
|
||||
' Area dei nuovi pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
' Se esiste il file del pezzo
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
' eseguo inserimento
|
||||
For i As Integer = 1 To nNbr
|
||||
' Inserisco il pezzo
|
||||
EgtInsertFile(sTmpFile)
|
||||
' Ne recupero l'Id
|
||||
Dim nId2 As Integer = EgtGetLastPart()
|
||||
' Aggiusto per lavorazioni
|
||||
EgtAdjustFlatPart(nId2)
|
||||
' Se dati Trf assegno nome univoco
|
||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
|
||||
' Aggiorno l'area dei nuovi pezzi
|
||||
dNewArea += GeomCalc.GetPartArea(nId2)
|
||||
' Inserisco in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||
|
||||
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||
' verifico che il pezzo sia un Piano Cucina o un Piano Bagno o un'Aletta
|
||||
Dim sCMP As String = String.Empty
|
||||
EgtGetInfo(nId2, "CMP", sCMP)
|
||||
If sCMP.StartsWith("PCucina") Or sCMP.StartsWith("PBagno") Or sCMP.StartsWith("AlzFront") Then
|
||||
' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||
VeinMatching.SetRefOnPart(nId2)
|
||||
VeinMatching.AddPartFromDraw(nId2)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
If bDirect Then
|
||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.InsertOnePart(nId2) Then
|
||||
' Eventuale notifica al VeinMatching
|
||||
VeinMatching.OnInsertPartInRaw(nId2)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||
|
||||
Next
|
||||
' Cancello il file
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
End If
|
||||
' Aggiorno Aree totale
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea(dNewArea)
|
||||
' passo al pezzo successivo
|
||||
Pz = NxtPz
|
||||
End While
|
||||
' Aggiorno Aree da lavorare dei pezzi
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_bBackFromInternalCompo = False
|
||||
m_bInternalCompo = False
|
||||
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' se sto definendo un componente interno non posso uscire
|
||||
If m_ActiveComponentPage = Pages.CompoDimension And m_bInternalCompo Then Return
|
||||
@@ -1101,8 +868,7 @@ Public Class DrawPageUC
|
||||
' Leggo numero di pezzi da inserire
|
||||
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
|
||||
' Passo al contesto principale
|
||||
'MakeInsert(InsNbr, sPartName)
|
||||
MakeMultipleInsert(InsNbr, sPartName)
|
||||
MakeInsert(InsNbr, sPartName)
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino nome del componente precedente
|
||||
@@ -1110,9 +876,7 @@ Public Class DrawPageUC
|
||||
' Reset inclinazioni
|
||||
m_SideAngleUC.DeleteSideAngle()
|
||||
' Chiudo compo interni nel caso siano aperti
|
||||
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
@@ -1120,11 +884,7 @@ Public Class DrawPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
' esco dalla pagina corrente
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_bBackFromInternalCompo = False
|
||||
m_bInternalCompo = False
|
||||
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' Elimino nome del componente precedente
|
||||
m_sCompoName = String.Empty
|
||||
@@ -1133,7 +893,6 @@ Public Class DrawPageUC
|
||||
' Chiudo compo secondari e interni nel caso siano aperti
|
||||
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
@@ -1167,9 +926,6 @@ Public Class DrawPageUC
|
||||
ElseIf m_ActiveComponentPage = Pages.InternalComponent Then
|
||||
m_PrevSideAnglePage = Pages.InternalComponent
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||
ElseIf m_ActiveComponentPage = Pages.AlzFront Then
|
||||
m_PrevSideAnglePage = Pages.AlzFront
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
End If
|
||||
VariablesGrd.Children.Add(m_SideAngleUC)
|
||||
FiloTopBtn.IsEnabled = False
|
||||
@@ -1231,9 +987,6 @@ Public Class DrawPageUC
|
||||
ElseIf m_ActiveComponentPage = Pages.InternalComponent Then
|
||||
m_PrevSideAnglePage = Pages.InternalComponent
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||
ElseIf m_ActiveComponentPage = Pages.AlzFront Then
|
||||
m_PrevSideAnglePage = Pages.AlzFront
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
End If
|
||||
VariablesGrd.Children.Add(m_SideAngleUC)
|
||||
FiloTopBtn.IsEnabled = False
|
||||
@@ -1292,9 +1045,6 @@ Public Class DrawPageUC
|
||||
ElseIf m_ActiveComponentPage = Pages.InternalComponent Then
|
||||
m_PrevSideAnglePage = Pages.InternalComponent
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||
ElseIf m_ActiveComponentPage = Pages.AlzFront Then
|
||||
m_PrevSideAnglePage = Pages.AlzFront
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
End If
|
||||
VariablesGrd.Children.Add(m_SideAngleUC)
|
||||
SideAngleBtn.IsEnabled = False
|
||||
@@ -1348,13 +1098,10 @@ Public Class DrawPageUC
|
||||
' Imposto modalità
|
||||
If m_ActiveComponentPage = Pages.CompoDimension Then
|
||||
m_PrevSideAnglePage = Pages.CompoDimension
|
||||
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||
VariablesGrd.Children.Remove( m_CompoDimension)
|
||||
ElseIf m_ActiveComponentPage = Pages.InternalComponent Then
|
||||
m_PrevSideAnglePage = Pages.InternalComponent
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||
ElseIf m_ActiveComponentPage = Pages.AlzFront Then
|
||||
m_PrevSideAnglePage = Pages.AlzFront
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
LeftButtonGrd.Children.Remove( m_CompoDimension.m_InternalCompoPage)
|
||||
End If
|
||||
VariablesGrd.Children.Add( m_FiloTopUC)
|
||||
SideAngleBtn.IsEnabled = False
|
||||
@@ -1412,7 +1159,7 @@ Public Class DrawPageUC
|
||||
Case Pages.SideAngle
|
||||
VariablesGrd.Children.Remove( m_SideAngleUC)
|
||||
Case Pages.FiloTop
|
||||
VariablesGrd.Children.Remove(m_FiloTopUC)
|
||||
VariablesGrd.Children.Remove( m_FiloTopUC)
|
||||
End Select
|
||||
|
||||
' Pulisco l'ambiente lua
|
||||
|
||||
@@ -79,7 +79,7 @@ Module Engrave
|
||||
End Function
|
||||
|
||||
Friend Function GetEngraveAff(cCol As Color3d, ByRef dAff As Double, ByRef dLar As Double) As Boolean
|
||||
For Each Ctsa As CTE In m_ListCte
|
||||
For Each Ctsa In m_ListCte
|
||||
If Ctsa.m_bOk And
|
||||
Math.Abs(cCol.R - Ctsa.m_R) < m_nTol And
|
||||
Math.Abs(cCol.G - Ctsa.m_G) < m_nTol And
|
||||
|
||||
@@ -576,36 +576,6 @@ Public Class ImportPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' metodo utilizzato per definire il colore dei pezzi DXF importati
|
||||
Private Sub ColorRegion(nCtx As Integer)
|
||||
' Leggo dati corrispondenza colore
|
||||
Dim InsertColor As Color3d = New Color3d(89, 210, 210)
|
||||
CompoColor(InsertColor, m_MainWindow.GetIniFile())
|
||||
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(nCtx)
|
||||
' Ciclo sui pezzi
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
While PartId <> GDB_ID.NULL
|
||||
' Ciclo sui layer di contorno
|
||||
Dim bOutLoop As Boolean = True
|
||||
Dim RegionId As Integer = EgtGetFirstNameInGroup(PartId, NAME_REGION)
|
||||
While RegionId <> GDB_ID.NULL
|
||||
' Ciclo sulle regioni
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
EgtSetColor(EntId, InsertColor)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
RegionId = EgtGetNextName(PartId, NAME_REGION)
|
||||
End While
|
||||
' passo al pezzo successico
|
||||
PartId = EgtGetNextPart(PartId)
|
||||
End While
|
||||
' Aggiorno scritte per angoli sui lati
|
||||
WriteSideAngleForNest(nCtx)
|
||||
End Sub
|
||||
|
||||
Private Sub UseLayerBtn_Click(sender As Object, e As RoutedEventArgs) Handles UseLayerBtn.Click
|
||||
' Creo i pezzi
|
||||
Dim nType As Integer = If(m_nFileType = FT.NGE, FPC_TYPE.NGE, FPC_TYPE.LAYER)
|
||||
@@ -619,8 +589,6 @@ Public Class ImportPageUC
|
||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||
End If
|
||||
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||
ColorRegion(ImportScene.GetCtx())
|
||||
' Eseguo zoom
|
||||
ImportScene.ZoomAll()
|
||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||
@@ -651,8 +619,6 @@ Public Class ImportPageUC
|
||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||
End If
|
||||
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||
ColorRegion(ImportScene.GetCtx())
|
||||
' Eseguo zoom
|
||||
ImportScene.ZoomAll()
|
||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||
@@ -683,8 +649,6 @@ Public Class ImportPageUC
|
||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||
End If
|
||||
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||
ColorRegion(ImportScene.GetCtx())
|
||||
' Eseguo zoom
|
||||
ImportScene.ZoomAll()
|
||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||
|
||||
@@ -17,10 +17,9 @@ Public Class InternalComponentPageUC
|
||||
m_bIsFirstPage = True
|
||||
LoadPage()
|
||||
CurrentBtn = Nothing
|
||||
' bottone per selezionare la seconda pagina di componenti interni
|
||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
LabelCompo9.Text = EgtMsg(MSG_COMPONENTPAGEUC + 9) ' Altri
|
||||
LabelCompo9.Text = EgtMsg(MSG_COMPONENTPAGEUC + 9)
|
||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
|
||||
@@ -267,7 +266,7 @@ Public Class InternalComponentPageUC
|
||||
Dim ThicknessConverter As New ThicknessConverter
|
||||
|
||||
' Assegnazione immagine e testo ai Button
|
||||
For index As Integer = 1 To 8
|
||||
For index = 1 To 8
|
||||
Dim CustomThickness As Thickness = ThicknessConverter.ConvertFromString("0")
|
||||
Dim nCompoName As Integer
|
||||
Dim sCompo As String = ""
|
||||
@@ -285,8 +284,7 @@ Public Class InternalComponentPageUC
|
||||
' Verifico presenza immagine e la aggiungo
|
||||
If sCompoImage.Length <> 0 Then
|
||||
Try
|
||||
Dim sPath As String = m_MainWindow.GetResourcesDir() & "\" & sCompoImage
|
||||
sCompoImageSource = ImageConverter.ConvertFromString(sPath)
|
||||
sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
||||
GetImage(index).Height = 65
|
||||
GetImage(index).Width = 65
|
||||
GetImage(index).Source = sCompoImageSource
|
||||
@@ -366,27 +364,7 @@ Public Class InternalComponentPageUC
|
||||
|
||||
Private Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||
m_MainWindow.m_DrawPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
|
||||
'--------- NUOVA GESTIONE ---------
|
||||
If m_MainWindow.m_DrawPageUC.m_CompoDimension.bEnableAlzFront Then
|
||||
' rimuovo l'elenco di bottoni per selezionare il tipo di componente interna
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||
' inserisco nella Grid VaribalsesGrid lo UeserControl per definire le dimensioni della componente
|
||||
m_MainWindow.m_DrawPageUC.VariablesGrd.Children.Add(m_MainWindow.m_DrawPageUC.m_CompoDimension)
|
||||
' nascondo la lista dei parametri
|
||||
m_MainWindow.m_DrawPageUC.m_CompoDimension.CollapsedAllParam()
|
||||
' sto uscendo dalla componente interna (quindi comunico il cambio di componente)
|
||||
m_MainWindow.m_DrawPageUC.m_bInternalCompo = False
|
||||
' comunico che sto arrivando da una componente interna
|
||||
m_MainWindow.m_DrawPageUC.m_bBackFromInternalCompo = True
|
||||
Return
|
||||
End If
|
||||
|
||||
'--------- VECCHIA GESTIONE ---------
|
||||
' torno alla pagina iniziale di selezione del piano (Compo)
|
||||
m_MainWindow.m_DrawPageUC.BackBtn_Click(sender, e)
|
||||
'm_MainWindow.m_DrawPageUC.SelectedComponent(m_MainWindow.m_DrawPageUC.m_sMainCompo)
|
||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.CompoDimension
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -268,7 +268,7 @@ Public Class MainComponentPageUC
|
||||
Dim ThicknessConverter As New ThicknessConverter
|
||||
|
||||
'Assegnazione immagine e testo ai Button
|
||||
For index As Integer = 1 To 8
|
||||
For index = 1 To 8
|
||||
Dim CustomThickness As New Thickness(0)
|
||||
Dim nCompoName As Integer = GetPrivateProfileInt("Compo" & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
||||
Dim sCompoImage As String = ""
|
||||
|
||||
@@ -14,7 +14,6 @@ Public Class SecondaryComponentPageUC
|
||||
' Variabile che contiene il nome del componente selezionato
|
||||
Friend m_sCurrCompo As String = String.Empty
|
||||
|
||||
' dopo aver definito la forma della componente definisco quali parametri usare per la sua definizione
|
||||
Private Sub SecondaryComponentPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
m_MainComponentPage = m_MainWindow.m_DrawPageUC.m_MainComponentPage
|
||||
@@ -220,10 +219,8 @@ Public Class SecondaryComponentPageUC
|
||||
|
||||
' Carico componente
|
||||
m_MainWindow.m_DrawPageUC.SelectedComponent(sCompo)
|
||||
m_MainWindow.m_DrawPageUC.m_sMainCompo = sCompo
|
||||
m_sCurrCompo = "Compo" & GetButtonNumber(CurrentBtn.Name)
|
||||
m_MainWindow.m_DrawPageUC.VariablesGrd.Children.Add(m_MainWindow.m_DrawPageUC.m_CompoDimension)
|
||||
|
||||
'm_MainWindow.m_DrawPageUC.DimensionBtn.IsChecked = True
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsChecked = False
|
||||
|
||||
@@ -201,7 +201,7 @@ Module SideAngle
|
||||
Friend Sub ColorToSideAngle(nCtx As Integer)
|
||||
' Leggo dati corrispondenza colore-angolo
|
||||
Dim CurrCSA As New ColorSideAngs
|
||||
CurrCSA.Read(m_MainWindow.GetIniFile)
|
||||
CurrCSA.Read( m_MainWindow.GetIniFile)
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(nCtx)
|
||||
' Ciclo sui pezzi
|
||||
@@ -212,27 +212,27 @@ Module SideAngle
|
||||
Dim LoopId As Integer = EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP)
|
||||
While LoopId <> GDB_ID.NULL
|
||||
' Ciclo sulle curve
|
||||
Dim PrevId As Integer = EgtGetLastInGroup(LoopId)
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(LoopId)
|
||||
Dim PrevId As Integer = EgtGetLastInGroup( LoopId)
|
||||
Dim EntId As Integer = EgtGetFirstInGroup( LoopId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
Dim NextId As Integer = EgtGetNext(EntId)
|
||||
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup(LoopId)
|
||||
If VerifySideAnglePossible(PrevId, EntId, NextId, bOutLoop) Then
|
||||
Dim NextId As Integer = EgtGetNext( EntId)
|
||||
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup( LoopId)
|
||||
If VerifySideAnglePossible( PrevId, EntId, NextId, bOutLoop) Then
|
||||
Dim colEnt As Color3d
|
||||
If EgtGetColor(EntId, colEnt) Then
|
||||
If EgtGetColor( EntId, colEnt) Then
|
||||
Dim dAng As Double
|
||||
Dim dHeel As Double
|
||||
If CurrCSA.GetSideAngHeel(colEnt, dAng, dHeel) Then
|
||||
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
||||
If CurrCSA.GetSideAngHeel( colEnt, dAng, dHeel) Then
|
||||
EgtSetInfo( EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo( EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo( EntId, INFO_HEEL, dHeel)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
PrevId = EntId
|
||||
EntId = EgtGetNext(EntId)
|
||||
EntId = EgtGetNext( EntId)
|
||||
End While
|
||||
If bOutLoop Then
|
||||
If bOutLoop then
|
||||
bOutLoop = False
|
||||
LoopId = EgtGetFirstNameInGroup(PartId, NAME_INLOOP)
|
||||
Else
|
||||
@@ -371,7 +371,7 @@ Module SideAngle
|
||||
End Function
|
||||
|
||||
Friend Function GetSideAngHeel( cCol As Color3d, ByRef dAng As Double, ByRef dHeel As Double) As Boolean
|
||||
For Each Ctsa As CTSA In m_ListCtsa
|
||||
For Each Ctsa In m_ListCtsa
|
||||
If Ctsa.m_bOk And
|
||||
Math.Abs( cCol.R - Ctsa.m_R) < m_nTol And
|
||||
Math.Abs( cCol.G - Ctsa.m_G) < m_nTol And
|
||||
|
||||
@@ -528,7 +528,7 @@ Public Class SideAngleUC
|
||||
' Se modalità angoli di inclinazione...
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
' Per ogni entità (della lista inizializzata), creo testo con nome e angolo di inclinazione
|
||||
For Each Entity As SideAngleEntity In m_SideAngleEntityList
|
||||
For Each Entity In m_SideAngleEntityList
|
||||
Dim sText As String = Entity.sEntityName & " = " & DoubleToString(Entity.dSideAngle, 2) & "°"
|
||||
If Entity.dSideHeel > 10 * EPS_SMALL Then sText += "; " & LenToString(Entity.dSideHeel, 2)
|
||||
SideAngle.AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
@@ -536,7 +536,7 @@ Public Class SideAngleUC
|
||||
' Altrimenti modalità gocciolatoio
|
||||
Else
|
||||
' Per ogni entità creo testo con nome
|
||||
For Each Entity As DripEntity In m_DripEntityList
|
||||
For Each Entity In m_DripEntityList
|
||||
SideAngle.AddTextToLine(Entity.sEntityName, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
Next
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
@@ -549,7 +549,7 @@ Public Class SideAngleUC
|
||||
' refresh dei checkbox e della caselle di testo per tutte le entità presenti nelle liste SideAngle/DripEntity
|
||||
Private Sub RefreshCheckAndValue()
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
For nIndex As Integer = 1 To m_nCount
|
||||
For nIndex = 1 To m_nCount
|
||||
Dim Entity As SideAngleEntity = m_SideAngleEntityList(nIndex - 1)
|
||||
' Creo testo con angolo di inclinazione e dimensione tallone
|
||||
If nIndex < (m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
|
||||
@@ -560,7 +560,7 @@ Public Class SideAngleUC
|
||||
GetHeelTxBxFromIndex(nTxBxIndex).Text = LenToString(Entity.dSideHeel, 1)
|
||||
Next
|
||||
Else
|
||||
For nIndex As Integer = 1 To m_nCount
|
||||
For nIndex = 1 To m_nCount
|
||||
Dim Entity As DripEntity = m_DripEntityList(nIndex - 1)
|
||||
' Imposto check box (se sono stati definiti il numero corretto di CheckBox
|
||||
If nIndex < ( m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
|
||||
@@ -633,7 +633,7 @@ Public Class SideAngleUC
|
||||
End If
|
||||
' Per ogni entità con gocciolatoio, ne inserisco una copia nel layer
|
||||
Dim vSelId As New List(Of Integer)
|
||||
For Each Entity As DripEntity In m_DripEntityList
|
||||
For Each Entity In m_DripEntityList
|
||||
If Entity.bHaveDrip Then
|
||||
Dim nSouId As Integer = EgtGetFirstNameInGroup(nOutLoopId, Entity.sEntityName)
|
||||
Dim nNewId As Integer = EgtCopyGlob(nSouId, DripLayer)
|
||||
@@ -731,7 +731,7 @@ Public Class SideAngleUC
|
||||
Dim vJoint As New List(Of Boolean)
|
||||
Dim bJointStart As Boolean = False
|
||||
|
||||
For Each Entity As DripEntity In m_DripEntityList
|
||||
For Each Entity In m_DripEntityList
|
||||
If Entity.bHaveDrip Then
|
||||
vJoint.Add(True)
|
||||
Else
|
||||
@@ -742,7 +742,7 @@ Public Class SideAngleUC
|
||||
bJointStart = True
|
||||
End If
|
||||
|
||||
For Each Entity As DripEntity In m_DripEntityList
|
||||
For Each Entity In m_DripEntityList
|
||||
|
||||
If Entity.bHaveDrip Then
|
||||
Dim nSouId As Integer = EgtGetFirstNameInGroup(nOutLoopId, Entity.sEntityName)
|
||||
@@ -753,7 +753,7 @@ Public Class SideAngleUC
|
||||
End If
|
||||
|
||||
' devo distingure i casi in cui inserisco un valore positivo ed uno negativo!
|
||||
For Each IdCurve As Integer In vTempSelId
|
||||
For Each IdCurve In vTempSelId
|
||||
|
||||
' accorcio entrmabi i lati
|
||||
Dim dLen As Double
|
||||
@@ -1366,7 +1366,7 @@ Friend Class SideAngleEntity
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
For Each Entity As SideAngleEntity In EntityList
|
||||
For Each Entity In EntityList
|
||||
If Entity.m_sEntityName = sEntityName Then
|
||||
Return Entity
|
||||
End If
|
||||
@@ -1455,7 +1455,7 @@ Friend Class DripEntity
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
For Each Entity As DripEntity In EntityList
|
||||
For Each Entity In EntityList
|
||||
If Entity.m_sEntityName = sEntityName Then
|
||||
Return Entity
|
||||
End If
|
||||
|
||||
@@ -78,10 +78,7 @@
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelSectionBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Grid>
|
||||
<Button Name="SelGuideBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
@@ -115,13 +112,9 @@
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="MirrorPartBtn"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource SpecchiaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="RemovePartBtn"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource Rimuovi_eliminaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
|
||||
@@ -61,12 +61,12 @@ Public Class FrameCutPageUC
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 13)) 'Arco
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 14)) 'Guida
|
||||
End If
|
||||
SelSectionBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 15) 'Sezione
|
||||
SelSectionBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 15) 'Sezione
|
||||
SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida
|
||||
ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad
|
||||
ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang
|
||||
MirrorPartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
|
||||
RemovePartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
|
||||
MirrorPartBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
|
||||
RemovePartBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
|
||||
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
||||
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
||||
|
||||
@@ -147,7 +147,7 @@ Public Class FrameMachiningUC
|
||||
If SysNotes <> String.Empty Then
|
||||
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||
SysNotes = String.Empty
|
||||
For Each Material As Object In MachiningMaterials
|
||||
For Each Material In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
If Param(0) = m_CurrMachine.CurrMat.nId.ToString() Then
|
||||
Dim dRawHeight = GetRawHeight()
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -30,195 +29,6 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Costruisco le riche per la colonna 3-->
|
||||
<Grid Grid.Column="2" Grid.RowSpan="9">
|
||||
<Grid.RowDefinitions>
|
||||
<!--GruopBox: taglio lama-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<!--GruopBoxs: Fresatura/>Foratura/WaterJet-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<!--GroupBox: vai ad Home-->
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.375*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
||||
<!--definizione della grigli ainterna-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="PreCutExitTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="2" Grid.Row="4" Grid.RowSpan="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Parametri fori: 4 Parametri-->
|
||||
<GroupBox Name="HolesGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="145*"/>
|
||||
<ColumnDefinition Width="23*"/>
|
||||
<ColumnDefinition Width="169*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||
<CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri Fresatura: 3 Parametri-->
|
||||
<GroupBox Name="MillingsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||
<CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri WaterJet: 1 Parametro (se questo GroupBox attivo allora nascondo Fori/Fresatura)-->
|
||||
<GroupBox Name="WjsParamGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid Grid.Column="3" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="WjIntCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||
<CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Parametri Taglio diretto: 1 Parametro-->
|
||||
<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="12" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="FinalHomeChBx" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
@@ -289,18 +99,7 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrCupWheelCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
@@ -320,7 +119,7 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
||||
<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
@@ -422,7 +221,7 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>-->
|
||||
</Grid>
|
||||
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">
|
||||
@@ -471,7 +270,6 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
@@ -489,31 +287,26 @@
|
||||
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -524,7 +317,6 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
|
||||
@@ -549,7 +341,7 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>-->
|
||||
</GroupBox>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -595,7 +387,7 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
||||
<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="7">
|
||||
<Grid>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
@@ -603,10 +395,10 @@
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>-->
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -614,7 +406,6 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -623,27 +414,17 @@
|
||||
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Allineato-->
|
||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Ghigliottina-->
|
||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
<TextBlock Name="AutomaticTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Automatico-->
|
||||
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="AutomaticChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
@@ -772,23 +553,7 @@
|
||||
|
||||
</Border>
|
||||
|
||||
<!--Cornici-->
|
||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<UniformGrid Columns="4" Grid.Row="8">
|
||||
<UniformGrid Columns="4" Grid.Row="8">
|
||||
<Button x:Name="SawProbingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
|
||||
@@ -20,7 +20,6 @@ Public Class AlarmsPageUC
|
||||
Private m_SawList As New ObservableCollection(Of String)
|
||||
Private m_DrillList As New ObservableCollection(Of String)
|
||||
Private m_MillList As New ObservableCollection(Of String)
|
||||
Private m_CupWheelList As New ObservableCollection(Of String)
|
||||
Private m_WaterJetList As New ObservableCollection(Of String)
|
||||
Private m_AuxToolTypeList As New List(Of StringIdCmBx)
|
||||
|
||||
@@ -33,7 +32,6 @@ Public Class AlarmsPageUC
|
||||
CurrSawCmBx.ItemsSource = m_SawList
|
||||
CurrDrillCmBx.ItemsSource = m_DrillList
|
||||
CurrMillCmBx.ItemsSource = m_MillList
|
||||
CurrCupWheelCmBx.ItemsSource = m_CupWheelList
|
||||
CurrWJetCmBx.ItemsSource = m_WaterJetList
|
||||
AuxiliaryToolCmBx.ItemsSource = m_AuxToolTypeList
|
||||
|
||||
@@ -49,7 +47,6 @@ Public Class AlarmsPageUC
|
||||
CurrSawTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 1)
|
||||
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
|
||||
CurrDrillTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 3)
|
||||
CurrCupWheelTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 20)
|
||||
CurrMillTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 4)
|
||||
CurrWJetTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 0)
|
||||
HolesOffsetTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 9)
|
||||
@@ -67,7 +64,6 @@ Public Class AlarmsPageUC
|
||||
HolesGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 17)
|
||||
ExtArcMinRadTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 18)
|
||||
IntArcMaxSideAngTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 24)
|
||||
PreCutExitTxBl.Text = EgtMsg(91065) ' PreTaglio uscite
|
||||
MachineParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 19)
|
||||
SawGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 25)
|
||||
DirectCutsParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 27) ' Tagli diretti
|
||||
@@ -83,8 +79,7 @@ Public Class AlarmsPageUC
|
||||
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
|
||||
WjIntCutsTxBl.Text = EgtMsg( 90930) ' Sempre sugli interni
|
||||
NestingParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 31) ' Nesting
|
||||
AlignTxBl.Text = EgtMsg(90932) ' Allineato
|
||||
GhigliottinaTxBl.Text = EgtMsg(91066) ' Ghigliottina
|
||||
AlignTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 32) ' Allineato
|
||||
AutomaticTxBl.Text = EgtMsg(91059) ' Automatico
|
||||
SetUpBtn.Content = EgtMsg(MSG_ALARMSPAGEUC + 33) ' Attrezzaggio
|
||||
NewMatBtn.Content = EgtMsg(MSG_ALARMSPAGEUC + 34) ' Nuovo
|
||||
@@ -103,12 +98,9 @@ Public Class AlarmsPageUC
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 2) ' Taglio lama
|
||||
CurrDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 3) ' Foratura
|
||||
CurrMillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 4) ' Fresatura
|
||||
CurrPocketingTxBl.Text = EgtMsg(91069) ' Svuotatura
|
||||
CurrWaterJettingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 7) ' WaterJet
|
||||
CurrDripSawingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 5) ' DripSawing
|
||||
CurrDripDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 6) ' DripDrilling
|
||||
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
||||
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
@@ -122,7 +114,7 @@ Public Class AlarmsPageUC
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
' Elimino le righe inutili e riduco il groupbox utensili correnti
|
||||
For Index As Integer = 7 - 1 To 2 Step -1
|
||||
For Index = 7 - 1 To 2 Step -1
|
||||
CurrToolsGrid.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
Dim EndRow As New RowDefinition
|
||||
@@ -187,43 +179,30 @@ Public Class AlarmsPageUC
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
' Non compio alcuna azione (non sono previsti utensili ausiliari)
|
||||
|
||||
' Non compio alcuna azione
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
m_AuxToolTypeList.Clear()
|
||||
' creo l'elenco degli utensili ausiliri
|
||||
If m_CurrentMachine.bDrill Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(1, EgtMsg(MSG_ALARMSPAGEUC + 21))) ' Foretto
|
||||
End If
|
||||
If m_CurrentMachine.bMill Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_ALARMSPAGEUC + 22))) ' Fresa
|
||||
End If
|
||||
If m_CurrentMachine.bCupWheel Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(3, EgtMsg(MSG_TOOLSDBPAGEUC + 34))) ' Mola da scasso
|
||||
End If
|
||||
If m_CurrentMachine.bWaterJet Then
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(4, EgtMsg(MSG_TOOLSDBPAGEUC + 35))) ' WaterJet
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(3, EgtMsg(MSG_TOOLSDBPAGEUC + 35))) ' WaterJet
|
||||
End If
|
||||
' Aggiungo elemento nessuno in fondo alla lista
|
||||
m_AuxToolTypeList.Add(New StringIdCmBx(0, EgtMsg(MSG_ALARMSPAGEUC + 20))) ' Nessuno
|
||||
|
||||
' ComboBox per la selezione dell'utensile ausiliario
|
||||
AuxiliaryToolTxBl.Visibility = Windows.Visibility.Visible
|
||||
AuxiliaryToolCmBx.Visibility = Windows.Visibility.Visible
|
||||
' Drilling
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
' Milling
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
' Pocketing
|
||||
CurrCupWheelTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrCupWheelCmBx.Visibility = Windows.Visibility.Hidden
|
||||
' WaterJet
|
||||
CurrWJetTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJetCmBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
' verifico quale utensile è attulamente "montato sulla macchina"
|
||||
If m_CurrentMachine.sCurrDrill <> String.Empty Then
|
||||
CreateToolList(MCH_TF.DRILLBIT, m_DrillList)
|
||||
m_DrillList.Add(NO_TOOL)
|
||||
@@ -232,24 +211,17 @@ Public Class AlarmsPageUC
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Visible
|
||||
ElseIf m_CurrentMachine.sCurrMill <> String.Empty Then
|
||||
CreateToolList(MCH_TF.MILL, MCH_TY.MILL_STD, m_MillList)
|
||||
CreateToolList(MCH_TF.MILL, m_MillList)
|
||||
m_MillList.Add(NO_TOOL)
|
||||
CurrMillCmBx.SelectedItem = m_CurrentMachine.sCurrMill
|
||||
AuxiliaryToolCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(2, m_AuxToolTypeList)
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Visible
|
||||
ElseIf m_CurrentMachine.sCurrMillNoTip <> String.Empty Then
|
||||
CreateToolList(MCH_TF.MILL, MCH_TY.MILL_NOTIP, m_CupWheelList)
|
||||
m_CupWheelList.Add(NO_TOOL)
|
||||
CurrCupWheelCmBx.SelectedItem = m_CurrentMachine.sCurrMillNoTip
|
||||
AuxiliaryToolCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(3, m_AuxToolTypeList)
|
||||
CurrCupWheelTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrCupWheelCmBx.Visibility = Windows.Visibility.Visible
|
||||
ElseIf m_CurrentMachine.sCurrWaterJet <> String.Empty Then
|
||||
CreateToolList(MCH_TF.WATERJET, m_WaterJetList)
|
||||
m_WaterJetList.Add(NO_TOOL)
|
||||
CurrWJetCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJet
|
||||
AuxiliaryToolCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(4, m_AuxToolTypeList)
|
||||
AuxiliaryToolCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(3, m_AuxToolTypeList)
|
||||
CurrWJetTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJetCmBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
@@ -257,13 +229,54 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
' attivo il bottone per l'apertura della pagina che mostra la configurazione degli utensili in parcheggio
|
||||
SetUpBtn.Visibility = Windows.Visibility.Visible
|
||||
|
||||
End Select
|
||||
|
||||
' aggiorno le TextBlock con le lavorazioni correnti
|
||||
RefreschMachining()
|
||||
' Verifico la configurazione della macchina per creare i textbox delle lavorazioni
|
||||
CurrSawingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrDripSawingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDripSawingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrDripDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDripDrillingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
If m_CurrentMachine.sCurrSawing <> String.Empty Then
|
||||
CurrSawingTxBx.Text = m_CurrentMachine.sCurrSawing
|
||||
CurrSawingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrSawingTxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
CurrDrillingTxBx.Text = m_CurrentMachine.sCurrDrilling
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillingTxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
If m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
CurrMillingTxBx.Text = m_CurrentMachine.sCurrMilling
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingTxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
If m_CurrentMachine.sCurrwaterJetting <> String.Empty Then
|
||||
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrwaterJetting
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
||||
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
||||
CurrDripSawingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDripSawingTxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDripDrilling <> String.Empty Then
|
||||
CurrDripDrillingTxBx.Text = m_CurrentMachine.sCurrDripDrilling
|
||||
CurrDripDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDripDrillingTxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' Leggo offset fori
|
||||
Dim dVal As Double
|
||||
@@ -295,14 +308,6 @@ Public Class AlarmsPageUC
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_EXTARCMINRAD, 200, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
|
||||
ExtArcMinRadTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo se PreCutExit attivo (per taglio ceramico)
|
||||
Dim nPreCutExit As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, m_MainWindow.GetMachIniFile())
|
||||
If nPreCutExit = -1 Then
|
||||
PreCutExitTxBl.Visibility = Visibility.Hidden
|
||||
PreCutExitChBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
PreCutExitChBx.IsChecked = ( nPreCutExit <> 0)
|
||||
End If
|
||||
' Leggo angolo di fianco massimo arco interno
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, m_MainWindow.GetMachIniFile())
|
||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
|
||||
@@ -336,16 +341,10 @@ Public Class AlarmsPageUC
|
||||
' Flag per nesting allineato
|
||||
AlignChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_ALIGNED, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Flag per nesting a ghigliottina
|
||||
GhigliottinaChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_GHIGLIOTTINA, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Flag per nesting automatico
|
||||
AutomaticChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_NEST, K_AUTOMATICOPTIMIZE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
AdjustGhigliottinaTextOnAutomaticOrCompleteCuts()
|
||||
' Flag per inserire la puasa dopo la sgrossatura delle cornici
|
||||
FramePauseChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_FRAME, K_MACH_PAUSE, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_AUTOMATIC, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
AdjustAlignTextOnAutomaticOrCompleteCuts()
|
||||
' Aggiorno messaggio sovratavola con numero tavola
|
||||
If GetTableCount() > 1 Then
|
||||
AdditionalTableTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 36) & " " & GetCurrentTable().ToString()
|
||||
@@ -376,74 +375,11 @@ Public Class AlarmsPageUC
|
||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||
End Sub
|
||||
|
||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||
Private Sub RefreschMachining()
|
||||
If m_CurrentMachine.sCurrSawing <> String.Empty Then
|
||||
CurrSawingTxBx.Text = m_CurrentMachine.sCurrSawing
|
||||
CurrSawingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrSawingTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrSawingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
CurrDrillingTxBx.Text = m_CurrentMachine.sCurrDrilling
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillingTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
CurrMillingTxBx.Text = m_CurrentMachine.sCurrMilling
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrPocketing <> String.Empty Then
|
||||
CurrPocketingTxBx.Text = m_CurrentMachine.sCurrPocketing
|
||||
CurrPocketingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrPocketingTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrPocketingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrPocketingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
||||
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
||||
CurrDripSawingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDripSawingTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrDripSawingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDripSawingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDripDrilling <> String.Empty Then
|
||||
CurrDripDrillingTxBx.Text = m_CurrentMachine.sCurrDripDrilling
|
||||
CurrDripDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDripDrillingTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrDripDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDripDrillingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' questo metodo è utilizzato solo per le macchine con utensile ausiliario (Assenza del bottone Attrezzaggio-> monta un solo utensila per volta
|
||||
Private Sub AuxiliaryToolCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles AuxiliaryToolCmBx.SelectionChanged
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrCupWheelTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrCupWheelCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJetTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJetCmBx.Visibility = Windows.Visibility.Hidden
|
||||
Dim SelectedItem As StringIdCmBx = AuxiliaryToolCmBx.SelectedItem
|
||||
@@ -460,15 +396,11 @@ Public Class AlarmsPageUC
|
||||
CurrDrillCmBx.SelectedItem = m_CurrentMachine.sCurrDrill
|
||||
End If
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
m_CurrentMachine.sCurrMillNoTip = String.Empty
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
CurrDrillTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillCmBx.Visibility = Windows.Visibility.Visible
|
||||
Case 2
|
||||
CreateToolList(MCH_TF.MILL, MCH_TY.MILL_STD, m_MillList)
|
||||
CreateToolList(MCH_TF.MILL, m_MillList)
|
||||
m_MillList.Add(NO_TOOL)
|
||||
If m_CurrentMachine.sCurrMill = String.Empty Then
|
||||
CurrMillCmBx.SelectedItem = NO_TOOL
|
||||
@@ -476,30 +408,10 @@ Public Class AlarmsPageUC
|
||||
CurrMillCmBx.SelectedItem = m_CurrentMachine.sCurrMill
|
||||
End If
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_CurrentMachine.sCurrMillNoTip = String.Empty
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
CurrMillTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillCmBx.Visibility = Windows.Visibility.Visible
|
||||
Case 3
|
||||
CreateToolList(MCH_TF.MILL, MCH_TY.MILL_NOTIP, m_CupWheelList)
|
||||
m_CupWheelList.Add(NO_TOOL)
|
||||
If m_CurrentMachine.sCurrMillNoTip = String.Empty Then
|
||||
CurrCupWheelCmBx.SelectedItem = NO_TOOL
|
||||
Else
|
||||
CurrCupWheelCmBx.SelectedItem = m_CurrentMachine.sCurrMillNoTip
|
||||
End If
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
CurrCupWheelTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrCupWheelCmBx.Visibility = Windows.Visibility.Visible
|
||||
Case 4
|
||||
CreateToolList(MCH_TF.WATERJET, m_WaterJetList)
|
||||
m_WaterJetList.Add(NO_TOOL)
|
||||
If m_CurrentMachine.sCurrWaterJet = String.Empty Then
|
||||
@@ -508,21 +420,12 @@ Public Class AlarmsPageUC
|
||||
CurrWJetCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJet
|
||||
End If
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
m_CurrentMachine.sCurrMillNoTip = String.Empty
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
CurrWJetTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJetCmBx.Visibility = Windows.Visibility.Visible
|
||||
End Select
|
||||
' aggionro l'elenco delle lavoarzioni
|
||||
RefreschMachining()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "Selection: SAW, DRILL, MILL, CUPWHEEL, WATERJET"
|
||||
' -- SAW --
|
||||
Private Sub CurrSawCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrSawCmBx.SelectionChanged
|
||||
If IsNothing(CurrSawCmBx.SelectedItem) Then Return
|
||||
' Assegno
|
||||
@@ -538,11 +441,8 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- DRILL --
|
||||
Private Sub CurrDrillCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrDrillCmBx.SelectionChanged
|
||||
If IsNothing(CurrDrillCmBx.SelectedItem) Then Return
|
||||
' Rimuovo foretto
|
||||
@@ -556,8 +456,6 @@ Public Class AlarmsPageUC
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
m_CurrentMachine.sCurrMillNoTip = String.Empty
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
@@ -573,11 +471,8 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- MILL --
|
||||
Private Sub CurrMillCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrMillCmBx.SelectionChanged
|
||||
If IsNothing(CurrMillCmBx.SelectedItem) Then Return
|
||||
' Rimuovo fresa
|
||||
@@ -591,8 +486,6 @@ Public Class AlarmsPageUC
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_CurrentMachine.sCurrMillNoTip = String.Empty
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
@@ -608,46 +501,8 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- CUPWHEEL --
|
||||
Private Sub CurrCupWheelCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrCupWheelCmBx.SelectionChanged
|
||||
If IsNothing(CurrCupWheelCmBx.SelectedItem) Then Return
|
||||
' Rimuovo fresa
|
||||
If CurrCupWheelCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrMillNoTip = String.Empty
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
' Assegno fresa
|
||||
Else
|
||||
m_CurrentMachine.sCurrMillNoTip = CurrCupWheelCmBx.SelectedItem.ToString()
|
||||
' Reset foretto, waterjet e relative lavorazioni
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
' Se nuova fresa incompatibile con fresatura corrente, resetto quest'ultima
|
||||
Dim sMchTuuid As String = String.Empty
|
||||
Dim sMchTool As String = String.Empty
|
||||
If Not EgtMdbSetCurrMachining(m_CurrentMachine.sCurrPocketing) Or
|
||||
Not EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sMchTuuid) Or
|
||||
Not EgtTdbGetToolFromUUID(sMchTuuid, sMchTool) Or
|
||||
String.Compare(sMchTool, m_CurrentMachine.sCurrMillNoTip, True) <> 0 Then
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
End If
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- WATERJET --
|
||||
Private Sub CurrWJetCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrWJetCmBx.SelectionChanged
|
||||
If IsNothing(CurrWJetCmBx.SelectedItem) Then Return
|
||||
' Rimuovo Waterjet
|
||||
@@ -676,13 +531,9 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
#End Region 'Selection: SAW, DRILL, MILL, CUPWHEEL, WATERJET
|
||||
|
||||
Public Overloads Sub CreateToolList(ToolType As Integer, ToolList As ObservableCollection(Of String))
|
||||
Private Overloads Sub CreateToolList(ToolType As Integer, ToolList As ObservableCollection(Of String))
|
||||
ToolList.Clear()
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim nType As Integer = MCH_TY.NONE
|
||||
@@ -697,24 +548,6 @@ Public Class AlarmsPageUC
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' definisce l'elenco degli utensili in funzione della famiglia e del tipo (usata per distingure i diversi tipi di frese)
|
||||
Public Overloads Sub CreateToolList(ToolFamily As Integer, ToolType As Integer, ToolList As ObservableCollection(Of String))
|
||||
ToolList.Clear()
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim nType As Integer = ToolType
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool(ToolType, ToolName, nType)
|
||||
While bFound
|
||||
' Accetto utensili che non siano da sotto
|
||||
If String.Compare(ToolName, m_CurrentMachine.sCurrDripSaw, True) <> 0 AndAlso
|
||||
String.Compare(ToolName, m_CurrentMachine.sCurrDripDrill, True) <> 0 AndAlso
|
||||
nType = ToolType Then
|
||||
ToolList.Add(ToolName)
|
||||
End If
|
||||
bFound = EgtTdbGetNextTool(ToolType, ToolName, nType)
|
||||
End While
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SetUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles SetUpBtn.Click
|
||||
m_MainWindow.m_MachinePageUC.MachinePageGrid.Children.Remove(Me)
|
||||
m_SetUpPage = New SetUpPage
|
||||
@@ -788,14 +621,6 @@ Public Class AlarmsPageUC
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub PreCutExitChBx_Click(sender As Object, e As RoutedEventArgs) Handles PreCutExitChBx.Click
|
||||
If PreCutExitChBx.IsChecked Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CompleteCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CompleteCutsChBx.Click
|
||||
Dim NestPage As NestPageUC = m_MainWindow.m_CadCutPageUC.m_NestPage
|
||||
If CompleteCutsChBx.IsChecked() Then
|
||||
@@ -818,7 +643,7 @@ Public Class AlarmsPageUC
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_REDUCEDCUT, "1", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
AdjustGhigliottinaTextOnAutomaticOrCompleteCuts()
|
||||
AdjustAlignTextOnAutomaticOrCompleteCuts()
|
||||
End Sub
|
||||
|
||||
Private Sub CornerCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CornerCutsChBx.Click
|
||||
@@ -887,30 +712,20 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GligliottinaChBx_Click(sender As Object, e As RoutedEventArgs) Handles GhigliottinaChBx.Click
|
||||
If GhigliottinaChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_NEST_GHIGLIOTTINA, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_NEST_GHIGLIOTTINA, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AutomaticChBx_Click(sender As Object, e As RoutedEventArgs) Handles AutomaticChBx.Click
|
||||
If AutomaticChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_NEST, K_AUTOMATICOPTIMIZE, "1", m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_NEST_AUTOMATIC, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_NEST, K_AUTOMATICOPTIMIZE, "0", m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_NEST_AUTOMATIC, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
AdjustGhigliottinaTextOnAutomaticOrCompleteCuts()
|
||||
AdjustAlignTextOnAutomaticOrCompleteCuts()
|
||||
End Sub
|
||||
|
||||
Private Sub AdjustGhigliottinaTextOnAutomaticOrCompleteCuts()
|
||||
Private Sub AdjustAlignTextOnAutomaticOrCompleteCuts()
|
||||
If AutomaticChBx.IsChecked() And Not CompleteCutsChBx.IsChecked() Then
|
||||
GhigliottinaTxBl.Visibility = Visibility.Visible
|
||||
GhigliottinaChBx.Visibility = Visibility.Visible
|
||||
AlignTxBl.Text = EgtMsg( 91060) ' Allineato e Ghigliottina
|
||||
Else
|
||||
GhigliottinaTxBl.Visibility = Visibility.Collapsed
|
||||
GhigliottinaChBx.Visibility = Visibility.Collapsed
|
||||
AlignTxBl.Text = EgtMsg( 90932) ' Allineato
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -932,7 +747,7 @@ Public Class AlarmsPageUC
|
||||
If Not String.IsNullOrWhiteSpace(MatNameTxBx.Text) Then
|
||||
' Verifico che il nome non sia già utilizzato
|
||||
Dim bNameExist As Boolean = False
|
||||
For Each Material As Material In m_CurrentMachine.Materials
|
||||
For Each Material In m_CurrentMachine.Materials
|
||||
If Material.sName = MatNameTxBx.Text Then
|
||||
bNameExist = True
|
||||
Exit For
|
||||
@@ -1017,14 +832,6 @@ Public Class AlarmsPageUC
|
||||
m_CurrentMachine.dFsevPerc = dVal
|
||||
End Sub
|
||||
|
||||
Private Sub FramePauseChBx_Click(sender As Object, e As RoutedEventArgs) Handles FramePauseChBx.Click
|
||||
If FramePauseChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_FRAME, K_MACH_PAUSE, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_FRAME, K_MACH_PAUSE, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawProbingBtn.Click
|
||||
' Recupero file LUA
|
||||
EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua")
|
||||
@@ -1098,7 +905,7 @@ Public Class AlarmsPageUC
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
' Definisco flag tastatura
|
||||
Dim bProbingOk As Boolean = False
|
||||
For I As Integer = 0 To 120
|
||||
For I = 0 To 120
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(ProbingStateNameVar, 3)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
@@ -1140,7 +947,7 @@ Public Class AlarmsPageUC
|
||||
Dim SawDiameterNameVar As String = String.Empty
|
||||
GetPrivateProfileString(S_MACH_PROBING, K_SAWDIAMETER, "", SawDiameterNameVar, m_MainWindow.GetMachIniFile())
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
For I As Integer = 0 To 20
|
||||
For I = 0 To 20
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(SawDiameterNameVar, 3)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
@@ -53,7 +53,7 @@ Public Class ChooseToolWD
|
||||
m_SetUpToolList.Add(New ToolPos(m_MainWindow.m_CurrentMachine.sCurrSaw, sToolPos, True))
|
||||
End If
|
||||
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
For Each ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
Next
|
||||
Return True
|
||||
@@ -65,12 +65,12 @@ Public Class ChooseToolWD
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos)
|
||||
m_SetUpToolList.Add(New ToolPos(m_MainWindow.m_CurrentMachine.sCurrSaw, sToolPos, True))
|
||||
End If
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
For Each ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
End If
|
||||
Next
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
For Each ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
End If
|
||||
|
||||
@@ -24,13 +24,7 @@ Public Class CurrentMachine
|
||||
' Ritardo tra reset e invio programma per NUM
|
||||
Private m_nResetSendDelay As Integer = 1000
|
||||
|
||||
' tempo di arresto sospensione dei Thread prima dopo aver lanciato il comando CN
|
||||
Private m_nThreadSleep As Integer = 150
|
||||
|
||||
' Dati su linea di produzione
|
||||
Private m_bDemo As Boolean = False
|
||||
Public nLastProjSentToViewDEMO As Integer = 0
|
||||
|
||||
Private m_bProdLine As Boolean = False
|
||||
Private m_sVarProg1 As String = "E80021"
|
||||
Private m_nProg1 As Integer = 901
|
||||
@@ -222,18 +216,6 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property nThreadSleep As Integer
|
||||
Get
|
||||
Return m_nThreadSleep
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bDemo As Boolean
|
||||
Get
|
||||
Return m_bDemo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bProdLine As Boolean
|
||||
Get
|
||||
Return m_bProdLine
|
||||
@@ -904,7 +886,7 @@ Public Class CurrentMachine
|
||||
End Property
|
||||
|
||||
Friend Sub AddMaterial(value As Material)
|
||||
For Each Material As Material In Materials
|
||||
For Each Material In Materials
|
||||
If Material.nId = value.nId Then
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -928,7 +910,7 @@ Public Class CurrentMachine
|
||||
End If
|
||||
Next
|
||||
Dim TempMat As Material = Nothing
|
||||
For I As Integer = Index To m_MaxIdMat - 1
|
||||
For I = Index To m_MaxIdMat - 1
|
||||
GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & I + 2, TempMat, sMachIniFile)
|
||||
WritePrivateProfileMaterial(S_MATERIALS, K_MATERIAL & I + 1, TempMat, sMachIniFile)
|
||||
Next
|
||||
@@ -964,7 +946,7 @@ Public Class CurrentMachine
|
||||
If SysNotes <> String.Empty Then
|
||||
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||
SysNotes = String.Empty
|
||||
For Each Material As Object In MachiningMaterials
|
||||
For Each Material In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
If Param(0) <> valueId.ToString Then
|
||||
SysNotes &= Material & ";"
|
||||
@@ -993,7 +975,7 @@ Public Class CurrentMachine
|
||||
' Se stringa vuota
|
||||
If String.IsNullOrWhiteSpace(sMatName) Then Return False
|
||||
' Cerco il nome nella lista dei materiali
|
||||
For Index As Integer = 0 To Materials.Count - 1
|
||||
For Index = 0 To Materials.Count - 1
|
||||
If String.Compare(Materials(Index).sName, sMatName, True) = 0 Then
|
||||
CurrMat = Materials(Index)
|
||||
End If
|
||||
@@ -1035,15 +1017,12 @@ Public Class CurrentMachine
|
||||
m_dDeltaC = GetPrivateProfileDouble(S_AXES, K_DELTA_C, 0.0, sMachIniFile)
|
||||
' Leggo ritardo tra reset e send per NUM
|
||||
m_nResetSendDelay = GetPrivateProfileInt(S_NCNUM, K_RESETSENDDELAY, 1000, sMachIniFile)
|
||||
' Leggo ritardo tra reset e send per NUM
|
||||
m_nThreadSleep = GetPrivateProfileInt(S_NCNUM, K_THREADSLEEP, 150, sMachIniFile)
|
||||
' Leggo se linea di produzione e parametri relativi
|
||||
m_bProdLine = (GetPrivateProfileInt(S_PRODUCTIONLINE, K_ACTIVE, 0, sMachIniFile) <> 0)
|
||||
If m_bProdLine And Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.PRODUCTION_LINE) Then
|
||||
m_bProdLine = False
|
||||
EgtOutLog("Error - Production line requested but not key enabled")
|
||||
End If
|
||||
m_bDemo = (GetPrivateProfileInt(S_PRODUCTIONLINE, "Demo", 0, sMachIniFile) <> 0)
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG1, "", m_sVarProg1, sMachIniFile)
|
||||
m_nProg1 = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG1, 0, m_MainWindow.GetMachIniFile())
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG2, "", m_sVarProg2, sMachIniFile)
|
||||
@@ -1176,7 +1155,7 @@ Public Class CurrentMachine
|
||||
m_ManualToolChangerNbr = Math.Min(m_ManualToolChangerNbr, MAX_TCMAN_TOOLS)
|
||||
|
||||
' Leggo da file ini nomi e utensili manuali presenti
|
||||
For Index As Integer = 1 To m_ManualToolChangerNbr
|
||||
For Index = 1 To m_ManualToolChangerNbr
|
||||
Dim sName As String = String.Empty
|
||||
Dim sTool As String = String.Empty
|
||||
GetPrivateProfileString(S_TOOLCHANGER, K_MANUALNAME & Index, Nothing, sName, sMachIniFile)
|
||||
@@ -1351,7 +1330,7 @@ Friend Class Material
|
||||
|
||||
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
||||
Dim nMaxId As Integer = 0
|
||||
For Each Material As Material In MaterialList
|
||||
For Each Material In MaterialList
|
||||
If Material.nId > nMaxId Then
|
||||
nMaxId = Material.nId
|
||||
End If
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
<Window x:Class="ImportExportToolWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ScrollViewer Grid.Row="0" Margin="20">
|
||||
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpFamily}" ItemsSource="{Binding ToolList}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
<!-- multibinding quando sono attivi.-->
|
||||
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}" >
|
||||
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="false">
|
||||
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||
</Trigger>
|
||||
<!--<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</MultiTrigger>-->
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
|
||||
Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Active}"
|
||||
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
Command="{Binding OkCommand}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -1,20 +0,0 @@
|
||||
Imports EgtWPFLib5
|
||||
Public Class ImportExportToolWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private WithEvents m_ImportExportToolWindowVM As ImportExportToolWindowVM
|
||||
|
||||
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportToolWindowVM)
|
||||
Me.Owner = Owner
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = ImportExportToolWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_ImportExportToolWindowVM = ImportExportToolWindowVM
|
||||
End Sub
|
||||
|
||||
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ImportExportToolWindowVM.m_CloseWindow
|
||||
' Me.DialogResult = bDialogResult
|
||||
'End Sub
|
||||
End Class
|
||||
@@ -115,13 +115,11 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--PowerON-->
|
||||
<ToggleButton Name="PowerONBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<Button Name="PowerONBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<!--PowerOFF-->
|
||||
<ToggleButton Name="PowerOFFBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<Button Name="PowerOFFBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
@@ -56,12 +56,6 @@ Public Class MachineCNPageUC
|
||||
m_ButtonPower.Clear()
|
||||
Dim m_nCount As Integer = 1
|
||||
Dim bFoundBtn As Boolean = True
|
||||
Dim sTestVal As String = String.Empty
|
||||
' se non trovo il primo pulsante della lista allora nascondo l'elenco dei pulasnti per accensione
|
||||
If GetPrivateProfileString("MachineButtons", K_BUTTON & "1", "", sTestVal, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
PowerGpBx.Visibility = Visibility.Collapsed
|
||||
Return
|
||||
End If
|
||||
While bFoundBtn
|
||||
Dim sNameBtn As String = K_BUTTON & (m_nCount).ToString()
|
||||
Dim sMachineButtonType As String = String.Empty
|
||||
@@ -251,31 +245,15 @@ Public Class MachineCNPageUC
|
||||
Friend Sub PowerONChanged(bPowerON As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim PowerONButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonPower
|
||||
If MachineButton.StateFlag.Trim = K_POWERON Then
|
||||
For Each MachineButton In m_ButtonPower
|
||||
If MachineButton.StateFlag = "ZAxes" Then
|
||||
PowerONButton = MachineButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(PowerONButton) Then
|
||||
PowerONButton.SetIsChecked(bPowerON)
|
||||
PowerONBtn.IsChecked = bPowerON
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub PowerOFFChanged(bPowerOFF As Boolean)
|
||||
' leggo solo una varibile -> quindi quando modifico lo stato di PowerON devo modificare lo stato di PowerOFF
|
||||
Dim PowerOFFButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonPower
|
||||
If MachineButton.StateFlag.Trim = K_POWEROFF Then
|
||||
PowerOFFButton = MachineButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(PowerOFFButton) Then
|
||||
PowerOFFButton.SetIsChecked(bPowerOFF)
|
||||
PowerOFFBtn.IsChecked = bPowerOFF
|
||||
End If
|
||||
'If Not IsNothing(PowerONButton) Then
|
||||
' PowerONButton.SetIsChecked(bZAxes)
|
||||
' PowerONBtn.IsChecked = bZAxes
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -29,24 +29,12 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ToolsDBBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DB-lavorazioniImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
||||
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="ToolsDBBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -43,11 +43,11 @@ Public Class MachinePageUC
|
||||
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
AlarmsBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 5)
|
||||
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||
AlarmsBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 5)
|
||||
ToolsDBBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||
MachiningDBBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||
PolishingsBtn.Content = EgtMsg(91090)
|
||||
TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
||||
TestingPageBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
||||
StatisticsBtn.Content = EgtMsg(90709)
|
||||
|
||||
' Apro pagina dati macchina
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="B">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -111,26 +111,20 @@ Public Class MachineStatusUC
|
||||
' modifico uniformgrid
|
||||
AxisUniformGrid.Columns = 1
|
||||
AxisUniformGrid.Rows = m_AxesNumber + 2
|
||||
For Index As Integer = 0 To 12 - 1
|
||||
For Index = 0 To 12 - 1
|
||||
Dim HorizontalGrid As Grid = DirectCast(AxisUniformGrid.Children(Index), Grid)
|
||||
HorizontalGrid.ColumnDefinitions.Clear()
|
||||
HorizontalGrid.RowDefinitions.Clear()
|
||||
If Index < m_AxesNumber Then
|
||||
HorizontalGrid.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
If HorizontalGrid.Name = "B" And m_AxesNumber = 4 Then
|
||||
' se macchina a 4 assi allora nascondo le info dell'asse B
|
||||
HorizontalGrid.Visibility = Windows.Visibility.Collapsed
|
||||
Continue For
|
||||
End If
|
||||
Dim BorderRow As New RowDefinition
|
||||
BorderRow.Height = New GridLength(2, GridUnitType.Pixel)
|
||||
HorizontalGrid.RowDefinitions.Add(BorderRow)
|
||||
Dim AxisGrid As New RowDefinition
|
||||
AxisGrid.Height = New GridLength(1, GridUnitType.Star)
|
||||
HorizontalGrid.RowDefinitions.Add(AxisGrid)
|
||||
|
||||
For Each Children As UIElement In HorizontalGrid.Children
|
||||
For Each Children In HorizontalGrid.Children
|
||||
If TypeOf Children Is System.Windows.Controls.Primitives.UniformGrid Then
|
||||
Dim AxisUniformGrid As System.Windows.Controls.Primitives.UniformGrid = DirectCast(Children, System.Windows.Controls.Primitives.UniformGrid)
|
||||
AxisUniformGrid.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Name="CurveBrd" Grid.Column="0" Grid.Row="15" Grid.ColumnSpan="4" Grid.RowSpan="3"
|
||||
<Border Name="CurveBrd" Grid.Column="0" Grid.Row="18" Grid.ColumnSpan="4" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_NoNameGroupBorder}">
|
||||
|
||||
<Grid>
|
||||
|
||||
@@ -227,7 +227,7 @@ Public Class MachiningDbPageUC
|
||||
'Funzione che permette l'inizializzazione di albero e parametri all'apertura della pagina ToolsDb
|
||||
Private Sub InitializeFirstSelectedItem()
|
||||
If MachiningsList.Count > 0 Then
|
||||
For Each MachiningFamily As CathegoryItem In MachiningsList
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If MachiningFamily.Items.Count > 0 Then
|
||||
MachiningFamily.IsExpanded = True
|
||||
MachiningFamily.Items(0).IsSelected = True
|
||||
@@ -250,7 +250,7 @@ Public Class MachiningDbPageUC
|
||||
Dim NewName As String = SelectedCathegory.Name
|
||||
EgtMdbGetMachiningNewName(NewName)
|
||||
If EgtMdbAddMachining(NewName, SelectedCathegory.nTType) Then
|
||||
For Each MachiningFamily As CathegoryItem In MachiningsList
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If MachiningFamily.nTType = SelectedCathegory.nTType Then
|
||||
Dim NewMachiningItem As New CustomItem(NewName, SelectedCathegory.nTType)
|
||||
MachiningFamily.Items.Add(NewMachiningItem)
|
||||
@@ -270,7 +270,7 @@ Public Class MachiningDbPageUC
|
||||
If EgtMdbCopyMachining(SelectedCathegory.Name, NewName) Then
|
||||
Dim CurrType As Integer
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TYPE, CurrType)
|
||||
For Each MachiningFamily As CathegoryItem In MachiningsList
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If MachiningFamily.nTType = CurrType Then
|
||||
Dim NewMachiningItem As New CustomItem(NewName, CurrType)
|
||||
MachiningFamily.Items.Add(NewMachiningItem)
|
||||
@@ -303,7 +303,7 @@ Public Class MachiningDbPageUC
|
||||
' Cancello la lavorazione
|
||||
EgtMdbRemoveMachining(SelectedItem.Name)
|
||||
' Rimuovo dall'albero
|
||||
For Each MachiningFamily As CathegoryItem In MachiningsList
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If (MachiningFamily.nTType And SelectedItem.nType) <> 0 Then
|
||||
MachiningFamily.Items.Remove(SelectedItem)
|
||||
If MachiningFamily.Items.Count = 0 Then
|
||||
@@ -457,7 +457,7 @@ Public Class MachiningDbPageUC
|
||||
Case MCH_MY.MILLING 'Fresatura
|
||||
ToolCmBx.ItemsSource = MillTool
|
||||
Case MCH_MY.POCKETING 'Svuotatura
|
||||
ToolCmBx.ItemsSource = PocketTool
|
||||
ToolCmBx.ItemsSource = MillTool
|
||||
Case MCH_MY.DRILLING 'Foratura
|
||||
ToolCmBx.ItemsSource = DrillTool
|
||||
Case MCH_MY.SAWROUGHING 'Sgrossatura con lama
|
||||
@@ -472,7 +472,7 @@ Public Class MachiningDbPageUC
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||
EgtTdbGetToolFromUUID(sTuuid, ToolString)
|
||||
Dim bToolExist As Boolean = False
|
||||
For Each CurrTool As IEnumerable In ToolCmBx.ItemsSource
|
||||
For Each CurrTool In ToolCmBx.ItemsSource
|
||||
If CurrTool.ToString() = ToolString Then
|
||||
bToolExist = True
|
||||
Exit For
|
||||
@@ -514,14 +514,14 @@ Public Class MachiningDbPageUC
|
||||
RadOffsetTxBx.Text = LenToString(ToolDouble, 3)
|
||||
' Lista materiali
|
||||
m_MaterialsList.Clear()
|
||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
For Each Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||
Next
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
||||
If ToolString <> String.Empty Then
|
||||
Dim sItems() = ToolString.Split(";".ToCharArray)
|
||||
Dim Index As Integer = 0
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
For Each Material In m_MaterialsList
|
||||
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
||||
Dim nParId As Integer = 0
|
||||
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
||||
@@ -606,18 +606,6 @@ Public Class MachiningDbPageUC
|
||||
nTemp = If(AcrossChBx.IsChecked(), MCH_SAWFIN_SUB.ACROSS, MCH_SAWFIN_SUB.ALONG)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, nTemp)
|
||||
End If
|
||||
' Parmetri nascosti di svuotatura
|
||||
If nMachiningType = MCH_MY.POCKETING Then
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALOUT)
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||
Dim dToolDiam As Double = 100
|
||||
If Not IsNothing(ToolCmBx.SelectedItem) Then
|
||||
EgtTdbSetCurrTool( ToolCmBx.SelectedItem.ToString())
|
||||
EgtTdbGetCurrToolParam( MCH_TP.DIAM, dToolDiam)
|
||||
End If
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LITANG, 0.495 * dToolDiam)
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LIELEV, 2.0)
|
||||
End If
|
||||
' Parametri WaterJetting
|
||||
StringToDouble(ForwardAngleTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.FORWARDANGLE, dTemp)
|
||||
@@ -683,7 +671,7 @@ Public Class MachiningDbPageUC
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.OFFSR, dTemp)
|
||||
' Scrivo stringa materiali da lista
|
||||
Dim sMaterialString As String = String.Empty
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
For Each Material In m_MaterialsList
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
End If
|
||||
@@ -705,9 +693,8 @@ Public Class MachiningDbPageUC
|
||||
LonOffsetTxBx.Visibility = Windows.Visibility.Visible
|
||||
Select Case nMachiningType
|
||||
Case MCH_MY.SAWING 'Parametri Taglio
|
||||
' nascondo il parametro di sbandamento
|
||||
SideAngleTxBl.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleTxBx.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleTxBl.Visibility = Windows.Visibility.Visible
|
||||
SideAngleTxBx.Visibility = Windows.Visibility.Visible
|
||||
InvertTxBl.Visibility = Windows.Visibility.Visible
|
||||
InvertChBx.Visibility = Windows.Visibility.Visible
|
||||
AcrossTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -724,58 +711,40 @@ Public Class MachiningDbPageUC
|
||||
TypeBrd.Visibility = Windows.Visibility.Visible
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 1 Then
|
||||
For Index As Integer = RowNum - 1 To 1 Step -1
|
||||
If RowNum > 2 Then
|
||||
For Index = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 0)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 0)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
End If
|
||||
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
LeadOutTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadOutTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
ExtLinkTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
LeadLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
LeadLinkTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
CurveBrd.Visibility = Windows.Visibility.Visible
|
||||
|
||||
'If Not MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
If TypeGrd.Children.Contains(StartPosTxBl) Then
|
||||
'MachParamGrd.Children.Remove(StartPosTxBl)
|
||||
'MachParamGrd.Children.Remove(StartPosTxBx)
|
||||
'TypeGrd.Children.Add(StartPosTxBl)
|
||||
'TypeGrd.Children.Add(StartPosTxBx
|
||||
TypeGrd.Children.Remove(StartPosTxBl)
|
||||
TypeGrd.Children.Remove(StartPosTxBx)
|
||||
MachParamGrd.Children.Add(StartPosTxBl)
|
||||
MachParamGrd.Children.Add(StartPosTxBx)
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 3)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
CurveBrd.Visibility = Windows.Visibility.Hidden
|
||||
If MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
MachParamGrd.Children.Remove(StartPosTxBl)
|
||||
MachParamGrd.Children.Remove(StartPosTxBx)
|
||||
TypeGrd.Children.Add(StartPosTxBl)
|
||||
TypeGrd.Children.Add(StartPosTxBx)
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 0)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 0)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 1)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
StartPosTxBx.Style = Application.Current.FindResource("OmagCut_MachLeftCalculatorTextBoxInBorder")
|
||||
ElseIf MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 3)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
End If
|
||||
StartPosTxBl.Visibility = Windows.Visibility.Visible
|
||||
StartPosTxBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -831,7 +800,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella con la giusta altezza
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum > 4 Then
|
||||
For Index As Integer = RowNum - 1 To 4 Step -1
|
||||
For Index = RowNum - 1 To 4 Step -1
|
||||
FeedGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
End If
|
||||
@@ -840,7 +809,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella Feed
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum < 6 Then
|
||||
For Index As Integer = RowNum To 5
|
||||
For Index = RowNum To 5
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(1, GridUnitType.Star)
|
||||
FeedGrd.RowDefinitions.Add(Row)
|
||||
@@ -922,7 +891,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 2 Then
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
For Index = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
@@ -933,18 +902,6 @@ Public Class MachiningDbPageUC
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
ElseIf RowNum < 2 Then
|
||||
' costruiso una riga in più da inserire
|
||||
Dim Row As New RowDefinition
|
||||
TypeGrd.RowDefinitions.Add(Row)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
End If
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -1017,7 +974,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella con la giusta altezza
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum > 4 Then
|
||||
For Index As Integer = RowNum - 1 To 4 Step -1
|
||||
For Index = RowNum - 1 To 4 Step -1
|
||||
FeedGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
End If
|
||||
@@ -1026,7 +983,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella Feed
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum < 4 Then
|
||||
For Index As Integer = RowNum To 3
|
||||
For Index = RowNum To 3
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(1, GridUnitType.Star)
|
||||
FeedGrd.RowDefinitions.Add(Row)
|
||||
@@ -1110,14 +1067,6 @@ Public Class MachiningDbPageUC
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.Style = Application.Current.FindResource("OmagCut_LeftCalculatorTextBoxNoBorder")
|
||||
ElseIf MachParamGrd.Children.Contains(StartPosTxBl) Then
|
||||
StartPosTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
StartPosTxBl.SetValue(Grid.RowProperty, 6)
|
||||
StartPosTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StartPosTxBx.SetValue(Grid.RowProperty, 6)
|
||||
StartPosTxBl.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
StartPosTxBx.Style = Application.Current.FindResource("OmagCut_LeftCalculatorTextBoxNoBorder")
|
||||
End If
|
||||
StartPosTxBl.Visibility = Windows.Visibility.Visible
|
||||
StartPosTxBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -1147,7 +1096,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella con la giusta altezza
|
||||
Dim RowNum As Integer = FeedGrd.RowDefinitions.Count
|
||||
If RowNum > 4 Then
|
||||
For Index As Integer = RowNum - 1 To 4 Step -1
|
||||
For Index = RowNum - 1 To 4 Step -1
|
||||
FeedGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
End If
|
||||
@@ -1156,7 +1105,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella Feed
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum < 4 Then
|
||||
For Index As Integer = RowNum To 3
|
||||
For Index = RowNum To 3
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(1, GridUnitType.Star)
|
||||
FeedGrd.RowDefinitions.Add(Row)
|
||||
@@ -1236,7 +1185,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 2 Then
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
For Index = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
@@ -1304,7 +1253,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella con la giusta altezza
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum > 4 Then
|
||||
For Index As Integer = RowNum - 1 To 4 Step -1
|
||||
For Index = RowNum - 1 To 4 Step -1
|
||||
FeedGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
End If
|
||||
@@ -1313,7 +1262,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella Feed
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum < 4 Then
|
||||
For Index As Integer = RowNum To 3
|
||||
For Index = RowNum To 3
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(1, GridUnitType.Star)
|
||||
FeedGrd.RowDefinitions.Add(Row)
|
||||
@@ -1406,7 +1355,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 2 Then
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
For Index = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
@@ -1474,7 +1423,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella con la giusta altezza
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum > 4 Then
|
||||
For Index As Integer = RowNum - 1 To 4 Step -1
|
||||
For Index = RowNum - 1 To 4 Step -1
|
||||
FeedGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
End If
|
||||
@@ -1483,7 +1432,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella Feed
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum < 5 Then
|
||||
For Index As Integer = RowNum To 4
|
||||
For Index = RowNum To 4
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(1, GridUnitType.Star)
|
||||
FeedGrd.RowDefinitions.Add(Row)
|
||||
@@ -1512,7 +1461,7 @@ Public Class MachiningDbPageUC
|
||||
' Eliminazione di una riga della tabella Offset
|
||||
RowNum = OffsetGrd.RowDefinitions.Count
|
||||
If RowNum > 1 Then
|
||||
For Index As Integer = RowNum - 1 To 1 Step -1
|
||||
For Index = RowNum - 1 To 1 Step -1
|
||||
OffsetGrd.RowDefinitions.RemoveAt(Index)
|
||||
OffsetGpBx.SetValue(Grid.RowSpanProperty, 4)
|
||||
Next
|
||||
@@ -1564,15 +1513,15 @@ Public Class MachiningDbPageUC
|
||||
StepTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
SideBrd.SetValue(Grid.RowProperty, 9)
|
||||
SideBrd.Visibility = Windows.Visibility.Visible
|
||||
WorkSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
WorkSideCmBx.Visibility = Windows.Visibility.Hidden
|
||||
WorkSideTxBl.Visibility = Windows.Visibility.Visible
|
||||
WorkSideCmBx.Visibility = Windows.Visibility.Visible
|
||||
HeadSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
HeadSideCmBx.Visibility = Windows.Visibility.Hidden
|
||||
TypeBrd.Visibility = Windows.Visibility.Visible
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 2 Then
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
For Index = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
@@ -1635,30 +1584,27 @@ Public Class MachiningDbPageUC
|
||||
BackwardStepSideAngTxBl.Visibility = Windows.Visibility.Hidden
|
||||
BackwardStepSideAngTxBx.Visibility = Windows.Visibility.Hidden
|
||||
ForwardSawStepTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 15)
|
||||
If DrillStepGrd.Children.Contains(StepTxBx) Then
|
||||
DrillStepGrd.Children.Remove(StepTxBx)
|
||||
SawRouStepGrd.Children.Add(StepTxBx)
|
||||
StepTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StepTxBx.SetValue(Grid.RowProperty, 0)
|
||||
StepTxBx.Style = Application.Current.FindResource("OmagCut_CalculatorTextBoxInGroupBox")
|
||||
ElseIf SawStepGrd.Children.Contains(StepTxBx) Then
|
||||
SawStepGrd.Children.Remove(StepTxBx)
|
||||
SawRouStepGrd.Children.Add(StepTxBx)
|
||||
StepTxBx.SetValue(Grid.ColumnProperty, 1)
|
||||
StepTxBx.SetValue(Grid.RowProperty, 0)
|
||||
StepTxBx.Style = Application.Current.FindResource("OmagCut_CalculatorTextBoxInGroupBox")
|
||||
If SawStepGrd.Children.Contains(ArcIntTxBl) Then
|
||||
SawStepGrd.Children.Remove(ArcIntTxBl)
|
||||
SawStepGrd.Children.Remove(ArcIntTxBx)
|
||||
SawStepGrd.Children.Remove(ArcExtTxBl)
|
||||
SawStepGrd.Children.Remove(ArcExtTxBx)
|
||||
SawStepGrd.RowDefinitions.RemoveAt(2)
|
||||
End If
|
||||
If SawStepGrd.Children.Contains(LastSawStepTxBl) Then
|
||||
SawStepGrd.Children.Remove(LastSawStepTxBl)
|
||||
SawStepGrd.Children.Remove(LastSawStepTxBx)
|
||||
SawStepGrd.RowDefinitions.RemoveAt(2)
|
||||
End If
|
||||
DrillStepBrd.Visibility = Windows.Visibility.Hidden
|
||||
SawStepGpBx.Visibility = Windows.Visibility.Hidden
|
||||
SawRouStepGpBx.Visibility = Windows.Visibility.Visible
|
||||
SawRouStepTxBl.Visibility = Windows.Visibility.Visible
|
||||
SawRouStepGpBx.Visibility = Windows.Visibility.Hidden
|
||||
ReturnPosTxBl.Visibility = Windows.Visibility.Hidden
|
||||
ReturnPosTxBx.Visibility = Windows.Visibility.Hidden
|
||||
OffsetGpBx.Visibility = Windows.Visibility.Hidden
|
||||
' Definizione di una riga della tabella con la giusta altezza
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum > 4 Then
|
||||
For Index As Integer = RowNum - 1 To 4 Step -1
|
||||
For Index = RowNum - 1 To 4 Step -1
|
||||
FeedGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
End If
|
||||
@@ -1667,7 +1613,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella Feed
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum < 4 Then
|
||||
For Index As Integer = RowNum To 3
|
||||
For Index = RowNum To 3
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(1, GridUnitType.Star)
|
||||
FeedGrd.RowDefinitions.Add(Row)
|
||||
@@ -1747,7 +1693,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum < 3 Then
|
||||
For Index As Integer = RowNum To 2
|
||||
For Index = RowNum To 2
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(1, GridUnitType.Star)
|
||||
' Row.SetValue(Grid.RowSpanProperty, 3)
|
||||
@@ -1836,7 +1782,7 @@ Public Class MachiningDbPageUC
|
||||
' Definizione di una riga della tabella con la giusta altezza
|
||||
RowNum = FeedGrd.RowDefinitions.Count
|
||||
If RowNum > 3 Then
|
||||
For Index As Integer = RowNum - 1 To 3 Step -1
|
||||
For Index = RowNum - 1 To 3 Step -1
|
||||
FeedGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
End If
|
||||
@@ -1848,7 +1794,7 @@ Public Class MachiningDbPageUC
|
||||
' Eliminazione di una riga della tabella Offset
|
||||
RowNum = OffsetGrd.RowDefinitions.Count
|
||||
If RowNum > 1 Then
|
||||
For Index As Integer = RowNum - 1 To 1 Step -1
|
||||
For Index = RowNum - 1 To 1 Step -1
|
||||
OffsetGrd.RowDefinitions.RemoveAt(Index)
|
||||
OffsetGpBx.SetValue(Grid.RowSpanProperty, 4)
|
||||
Next
|
||||
@@ -2199,7 +2145,7 @@ Public Structure IdNameStruct
|
||||
End Function
|
||||
|
||||
Friend Shared Function IndFromId(Id As Integer, List As ObservableCollection(Of IdNameStruct)) As Integer
|
||||
For i As Integer = 0 To List.Count - 1
|
||||
For i = 0 To List.Count - 1
|
||||
If List(i).Id = Id Then Return i
|
||||
Next
|
||||
Return 0
|
||||
|
||||
@@ -113,12 +113,12 @@ Public Class PolishingsPageUC
|
||||
|
||||
' Recupero nome utensile tramite UUID
|
||||
Dim ToolString As String = String.Empty
|
||||
For Each KitItem As Kit In m_KitList
|
||||
For Each KitMachItem As KitMach In KitItem.KitMachList
|
||||
For Each KitItem In m_KitList
|
||||
For Each KitMachItem In KitItem.KitMachList
|
||||
Dim selToolIndex As Integer = 0
|
||||
EgtTdbGetToolFromUUID(KitMachItem.sToolUUID, ToolString)
|
||||
Dim bToolExist As Boolean = False
|
||||
For Each CurrTool As String In ToolList
|
||||
For Each CurrTool In ToolList
|
||||
If CurrTool.ToString() = ToolString Then
|
||||
bToolExist = True
|
||||
Exit For
|
||||
@@ -177,7 +177,7 @@ Public Class PolishingsPageUC
|
||||
If Not String.IsNullOrWhiteSpace( KitNameTxBx.Text) Then
|
||||
' Verifico che il nome non sia già utilizzato
|
||||
Dim bNameExist As Boolean = False
|
||||
For Each Kit As Kit In m_KitList
|
||||
For Each Kit In m_KitList
|
||||
If Kit.sName = KitNameTxBx.Text Then
|
||||
bNameExist = True
|
||||
Exit For
|
||||
@@ -448,7 +448,7 @@ Public Class PolishingsPageUC
|
||||
If Not IsNothing(m_OldItem) Then
|
||||
Dim nKitIndex As Integer = m_OldItem.nId
|
||||
If nKitIndex <= m_KitList.Count Then
|
||||
For Each KitMachItem As KitMach In m_KitList(nKitIndex - 1).KitMachList
|
||||
For Each KitMachItem In m_KitList(nKitIndex - 1).KitMachList
|
||||
If KitMachItem.m_IsModifiedId OrElse KitMachItem.m_IsModifiedToolUUID OrElse KitMachItem.m_IsModifiedToolName OrElse KitMachItem.m_IsModifiedSelTool OrElse
|
||||
KitMachItem.m_IsModifiedActive OrElse KitMachItem.m_IsModifiedContour OrElse KitMachItem.m_IsModifiedOffCnt OrElse KitMachItem.m_IsModifiedZigZagX OrElse
|
||||
KitMachItem.m_IsModifiedOffZigZagX OrElse KitMachItem.m_IsModifiedZigZagY OrElse KitMachItem.m_IsModifiedStepX OrElse KitMachItem.m_IsModifiedStepY OrElse
|
||||
@@ -466,7 +466,7 @@ Public Class PolishingsPageUC
|
||||
If IsNothing( m_OldItem) Then Return
|
||||
Dim nKitIndex As Integer = m_OldItem.nId
|
||||
If nKitIndex <= m_KitList.Count Then
|
||||
For Each KitMachItem As KitMach In m_KitList(nKitIndex - 1).KitMachList
|
||||
For Each KitMachItem In m_KitList(nKitIndex - 1).KitMachList
|
||||
KitMachItem.m_IsModifiedId = False
|
||||
KitMachItem.m_IsModifiedToolUUID = False
|
||||
KitMachItem.m_IsModifiedToolName = False
|
||||
@@ -911,7 +911,7 @@ Class KitMach
|
||||
m_sToolName = sToolNameDummy
|
||||
End If
|
||||
|
||||
For Each sToolUuidItem As String In m_MainWindow.m_MachinePageUC.m_PolishingsPageUC.ToolUuidList
|
||||
For Each sToolUuidItem In m_MainWindow.m_MachinePageUC.m_PolishingsPageUC.ToolUuidList
|
||||
EgtTdbGetToolFromUUID(sToolUuidItem, sToolNameDummy)
|
||||
If sToolNameDummy.Equals(m_sToolName) Then
|
||||
m_sToolUUID = sToolUuidItem
|
||||
|
||||
@@ -34,8 +34,8 @@ Public Class SetUpPage
|
||||
EgtOutLog("TC warning : too many tools (max 12 * 5)")
|
||||
ColNum = 12
|
||||
End If
|
||||
For Index As Integer = 12 To ColNum + 1 Step -1
|
||||
For Index2 As Integer = Index * 5 To (Index - 1) * 5 + 1 Step -1
|
||||
For Index = 12 To ColNum + 1 Step -1
|
||||
For Index2 = Index * 5 To (Index - 1) * 5 + 1 Step -1
|
||||
TlChGrid.Children.Remove(GetTlChPosFromIndex(Index2))
|
||||
TlChGrid.Children.Remove(GetTxBxFromIndex(Index2))
|
||||
Next
|
||||
@@ -43,14 +43,14 @@ Public Class SetUpPage
|
||||
TlChGrid.ColumnDefinitions.RemoveAt(Index * 2 - 2)
|
||||
Next
|
||||
' Modifico il numero di elementi presenti sull'ultima colonna
|
||||
For Index As Integer = ColNum * 5 To m_CurrMachine.ToolChangerNbr + 1 Step -1
|
||||
For Index = ColNum * 5 To m_CurrMachine.ToolChangerNbr + 1 Step -1
|
||||
TlChGrid.Children.Remove(GetTlChPosFromIndex(Index))
|
||||
TlChGrid.Children.Remove(GetTxBxFromIndex(Index))
|
||||
Next
|
||||
' Assegno lunghezza alla scrollviewer
|
||||
TlChGrid.Width = m_MainWindow.ActualWidth / 15 * 1.6 * ColNum * 2
|
||||
' Carico i nomi dei portautensili
|
||||
For Index As Integer = 1 To m_CurrMachine.ToolChangerNbr
|
||||
For Index = 1 To m_CurrMachine.ToolChangerNbr
|
||||
GetTlChPosFromIndex(Index).PositionNameTxBl.Text = m_CurrMachine.ToolChangerName(Index - 1)
|
||||
Next
|
||||
Else
|
||||
@@ -64,8 +64,8 @@ Public Class SetUpPage
|
||||
EgtOutLog("ManTC warning : too many tools (max 12 * 5)")
|
||||
ManColNum = 12
|
||||
End If
|
||||
For Index As Integer = 12 To ManColNum + 1 Step -1
|
||||
For Index2 As Integer = Index * 5 To (Index - 1) * 5 + 1 Step -1
|
||||
For Index = 12 To ManColNum + 1 Step -1
|
||||
For Index2 = Index * 5 To (Index - 1) * 5 + 1 Step -1
|
||||
ManTlChGrid.Children.Remove(GetManTlChPosFromIndex(Index2))
|
||||
ManTlChGrid.Children.Remove(GetManTxBxFromIndex(Index2))
|
||||
Next
|
||||
@@ -73,14 +73,14 @@ Public Class SetUpPage
|
||||
ManTlChGrid.ColumnDefinitions.RemoveAt(Index * 2 - 2)
|
||||
Next
|
||||
' Modifico il numero di elementi presenti sull'ultima colonna
|
||||
For Index As Integer = ManColNum * 5 To m_CurrMachine.ManualToolChangerNbr + 1 Step -1
|
||||
For Index = ManColNum * 5 To m_CurrMachine.ManualToolChangerNbr + 1 Step -1
|
||||
ManTlChGrid.Children.Remove(GetManTlChPosFromIndex(Index))
|
||||
ManTlChGrid.Children.Remove(GetManTxBxFromIndex(Index))
|
||||
Next
|
||||
' Assegno lunghezza alla scrollviewer
|
||||
ManTlChGrid.Width = m_MainWindow.ActualWidth / 15 * 1.6 * ManColNum * 2
|
||||
' Carico i nomi dei portautensili
|
||||
For Index As Integer = 1 To m_CurrMachine.ManualToolChangerNbr
|
||||
For Index = 1 To m_CurrMachine.ManualToolChangerNbr
|
||||
GetManTlChPosFromIndex(Index).PositionNameTxBl.Text = m_CurrMachine.ManualToolChangerName(Index - 1)
|
||||
Next
|
||||
|
||||
@@ -112,10 +112,10 @@ Public Class SetUpPage
|
||||
InitializeToolGroup( m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg( 90756), m_PolishingsList)
|
||||
|
||||
' Posiziono utensili già posizionati sul portautensili
|
||||
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ToolChanger
|
||||
For Each ToolPosition In m_CurrMachine.ToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If Not IsNothing( m_DrillbitsList) Then
|
||||
For Each Item As CustomItem In m_DrillbitsList.Items
|
||||
For Each Item In m_DrillbitsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_DrillbitsList.Items.Remove(Item)
|
||||
@@ -124,7 +124,7 @@ Public Class SetUpPage
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing( m_MillsList) Then
|
||||
For Each Item As CustomItem In m_MillsList.Items
|
||||
For Each Item In m_MillsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_MillsList.Items.Remove(Item)
|
||||
@@ -133,7 +133,7 @@ Public Class SetUpPage
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing( m_CupsList) Then
|
||||
For Each Item As CustomItem In m_CupsList.Items
|
||||
For Each Item In m_CupsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_CupsList.Items.Remove(Item)
|
||||
@@ -142,7 +142,7 @@ Public Class SetUpPage
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing( m_PolishingsList) Then
|
||||
For Each Item As CustomItem In m_PolishingsList.Items
|
||||
For Each Item In m_PolishingsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_PolishingsList.Items.Remove(Item)
|
||||
@@ -156,10 +156,10 @@ Public Class SetUpPage
|
||||
Next
|
||||
|
||||
' Posiziono utensili già posizionati sul portautensili manuale
|
||||
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ManualToolChanger
|
||||
For Each ToolPosition In m_CurrMachine.ManualToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If Not IsNothing( m_DrillbitsList) Then
|
||||
For Each Item As CustomItem In m_DrillbitsList.Items
|
||||
For Each Item In m_DrillbitsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_DrillbitsList.Items.Remove(Item)
|
||||
@@ -168,7 +168,7 @@ Public Class SetUpPage
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing( m_MillsList) Then
|
||||
For Each Item As CustomItem In m_MillsList.Items
|
||||
For Each Item In m_MillsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_MillsList.Items.Remove(Item)
|
||||
@@ -177,7 +177,7 @@ Public Class SetUpPage
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing( m_CupsList) Then
|
||||
For Each Item As CustomItem In m_CupsList.Items
|
||||
For Each Item In m_CupsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_CupsList.Items.Remove(Item)
|
||||
@@ -186,7 +186,7 @@ Public Class SetUpPage
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing( m_PolishingsList) Then
|
||||
For Each Item As CustomItem In m_PolishingsList.Items
|
||||
For Each Item In m_PolishingsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_PolishingsList.Items.Remove(Item)
|
||||
@@ -784,7 +784,7 @@ Public Class SetUpPage
|
||||
|
||||
' Funzione che rimette un utensile nell'albero
|
||||
Private Sub RestoreToolInList(sToolName As String)
|
||||
For Each Tool As CustomItem In m_SetUpToolsList.Items
|
||||
For Each Tool In m_SetUpToolsList.Items
|
||||
If Tool.Name = sToolName Then
|
||||
If Tool.nType = MCH_TY.DRILL_STD Then
|
||||
m_DrillbitsList.Items.Add(Tool)
|
||||
@@ -1119,7 +1119,7 @@ Public Class SetUpPage
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, ToolPositionName)
|
||||
If String.IsNullOrEmpty(ToolPositionName) Then Return
|
||||
' Cerco il portautensile nella lista degli automatici per vederne lo stato
|
||||
For Each TlChPos As ToolChangerPos In m_CurrMachine.ToolChanger
|
||||
For Each TlChPos In m_CurrMachine.ToolChanger
|
||||
If TlChPos.sName = ToolPositionName Then
|
||||
' Se la posizione è libera
|
||||
If GetTxBxFromIndex(TlChPos.nPosition).Text = String.Empty Then
|
||||
@@ -1137,7 +1137,7 @@ Public Class SetUpPage
|
||||
End If
|
||||
Next
|
||||
' Cerco il portautensile nella lista dei manuali per vederne lo stato
|
||||
For Each ManTlChPos As ToolChangerPos In m_CurrMachine.ManualToolChanger
|
||||
For Each ManTlChPos In m_CurrMachine.ManualToolChanger
|
||||
If ManTlChPos.sName = ToolPositionName Then
|
||||
' Se la posizione è libera
|
||||
If GetManTxBxFromIndex(ManTlChPos.nPosition).Text = String.Empty Then
|
||||
|
||||
@@ -434,17 +434,13 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="9*"/>
|
||||
<ColumnDefinition Width="11*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
<Button Name="ExportBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
<Button Name="ImportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ Imports OmagCUT.TreeViewItem
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class ToolsDbPageUC
|
||||
|
||||
@@ -17,8 +16,6 @@ Public Class ToolsDbPageUC
|
||||
Dim ToolsList As New ObservableCollection(Of CathegoryItem)
|
||||
' Proprietà
|
||||
Private m_bFirst As Boolean = True
|
||||
' Flag nuova gestione parametri lama in disegno
|
||||
Private m_bNewSawbladeMaker As Boolean = False
|
||||
' Stringa identificativa variabile geometrica in modifica
|
||||
Private m_sCurrVar As String = String.Empty
|
||||
' Parametri dell'utensile corrente
|
||||
@@ -56,8 +53,6 @@ Public Class ToolsDbPageUC
|
||||
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15)
|
||||
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
||||
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
||||
ExportBtn.Content = "Export"
|
||||
ImportBtn.Content = "Import"
|
||||
|
||||
NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1)
|
||||
TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2)
|
||||
@@ -165,20 +160,16 @@ Public Class ToolsDbPageUC
|
||||
ToolScene.SetStatusNull()
|
||||
' Inizializzo le famiglie di utensili nell'albero
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
InitializeToolGroup(m_CurrMachine.bSaw, MCH_TY.SAW_STD, EgtMsg(90751))
|
||||
InitializeToolGroup(m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg(90752))
|
||||
InitializeToolGroup(m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg(90753))
|
||||
InitializeToolGroup(m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg(90754))
|
||||
InitializeToolGroup(m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg(90756))
|
||||
InitializeToolGroup(m_CurrMachine.bWaterJet, MCH_TY.WATERJET, EgtMsg(90755))
|
||||
InitializeToolGroup(m_CurrMachine.bSaw, MCH_TY.SAW_STD, EgtMsg( 90751))
|
||||
InitializeToolGroup(m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg( 90752))
|
||||
InitializeToolGroup(m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg( 90753))
|
||||
InitializeToolGroup(m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg( 90754))
|
||||
InitializeToolGroup(m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg( 90756))
|
||||
InitializeToolGroup(m_CurrMachine.bWaterJet, MCH_TY.WATERJET, EgtMsg( 90755))
|
||||
' Sposto tutti i parametri in su di una riga se testa e uscita sono disattivati
|
||||
If Not m_CurrMachine.bShowHeadExit Then
|
||||
MoveParam()
|
||||
End If
|
||||
' Verifico se macchina con nuovo SawbladeMaker
|
||||
Dim sSawBladeMaker As String = ""
|
||||
GetPrivateProfileString( S_TOOLS, K_SAWBLADEMAKER, "", sSawBladeMaker, m_MainWindow.GetIniFile())
|
||||
m_bNewSawbladeMaker = String.Compare( sSawBladeMaker, "MakeStoneSawBlade.lua", True)
|
||||
m_bFirst = False
|
||||
Else
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
@@ -191,7 +182,7 @@ Public Class ToolsDbPageUC
|
||||
'Funzione che permette l'inizializzazione di albero e parametri all'apertura della pagina ToolsDb
|
||||
Private Sub InitializeFirstSelectedItem()
|
||||
If ToolsList.Count > 0 Then
|
||||
For Each ToolFamily As CathegoryItem In ToolsList
|
||||
For Each ToolFamily In ToolsList
|
||||
If ToolFamily.Items.Count > 0 Then
|
||||
ToolFamily.IsExpanded = True
|
||||
ToolFamily.Items(0).IsSelected = True
|
||||
@@ -236,7 +227,7 @@ Public Class ToolsDbPageUC
|
||||
Dim NewName As String = SelectedCathegory.Name
|
||||
EgtTdbGetToolNewName(NewName)
|
||||
If EgtTdbAddTool(NewName, SelectedCathegory.nTType) Then
|
||||
For Each ToolFamily As CathegoryItem In ToolsList
|
||||
For Each ToolFamily In ToolsList
|
||||
If ToolFamily.nTType = SelectedCathegory.nTType Then
|
||||
Dim NewToolItem As New CustomItem(NewName, SelectedCathegory.nTType)
|
||||
ToolFamily.Items.Add(NewToolItem)
|
||||
@@ -248,17 +239,17 @@ Public Class ToolsDbPageUC
|
||||
Next
|
||||
' Determino il tipo di utensile
|
||||
Dim nType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
|
||||
' Imposto testa e uscita
|
||||
' Sempre lame su H1.1 e utensili foretto, fresa e mola da scasso su H1.2
|
||||
If (nType And MCH_TF.WATERJET) = 0 Then
|
||||
If ( nType And MCH_TF.WATERJET) = 0 then
|
||||
Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H1")
|
||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, If(bSaw, 1, 2))
|
||||
' Waterjet sempre su H2.1
|
||||
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H1")
|
||||
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, If(bSaw, 1, 2))
|
||||
' Waterjet sempre su H2.1
|
||||
Else
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H2")
|
||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, 1)
|
||||
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H2")
|
||||
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, 1)
|
||||
End If
|
||||
' Per macchine senza ToolChanger, resetto la posizione su questo
|
||||
If m_CurrMachine.ShowToolChanger = 0 Then
|
||||
@@ -324,10 +315,10 @@ Public Class ToolsDbPageUC
|
||||
' Aggiorno lista utensili
|
||||
Dim CurrType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType)
|
||||
For Each ToolFamily As CathegoryItem In ToolsList
|
||||
For Each ToolFamily In ToolsList
|
||||
If ToolFamily.nTType = CurrType Then
|
||||
Dim NewToolItem As New CustomItem(NewName, CurrType)
|
||||
ToolFamily.Items.Add(NewToolItem)
|
||||
Dim NewToolItem As New CustomItem( NewName, CurrType)
|
||||
ToolFamily.Items.Add( NewToolItem)
|
||||
NewToolItem.IsSelected = True
|
||||
GetToolParams()
|
||||
m_OldItem = ToolTreeView.SelectedItem
|
||||
@@ -363,15 +354,15 @@ Public Class ToolsDbPageUC
|
||||
Dim sItems() As String = sUserNotes.Split(";".ToCharArray)
|
||||
For i As Integer = 0 To sItems.Count() - 1
|
||||
If sItems(i).Contains("CODE=") Then
|
||||
CodeTxBx.Text = sItems(i).Substring(5)
|
||||
CodeTxBx.Text = sItems(i).Substring( 5)
|
||||
ElseIf sItems(i).Contains("SUPPL=") Then
|
||||
SupplierTxBx.Text = sItems(i).Substring(6)
|
||||
SupplierTxBx.Text = sItems(i).Substring( 6)
|
||||
ElseIf sItems(i).Contains("S/N=") Then
|
||||
SerNbrTxBx.Text = sItems(i).Substring(4)
|
||||
SerNbrTxBx.Text = sItems(i).Substring( 4)
|
||||
ElseIf sItems(i).Contains("END=") Then
|
||||
EndLifeChBx.IsChecked = True
|
||||
m_sEndLife = sItems(i).Substring(4)
|
||||
ElseIf Not String.IsNullOrWhiteSpace(sItems(i)) Then
|
||||
m_sEndLife = sItems(i).Substring( 4)
|
||||
ElseIf Not String.IsNullOrWhiteSpace(sItems(i))
|
||||
sToShow &= sItems(i) & ";"
|
||||
End If
|
||||
Next
|
||||
@@ -392,7 +383,7 @@ Public Class ToolsDbPageUC
|
||||
sUserNotes &= "SUPPL=" & SupplierTxBx.Text & ";"
|
||||
sUserNotes &= "S/N=" & SerNbrTxBx.Text & ";"
|
||||
If EndLifeChBx.IsChecked Then
|
||||
If String.IsNullOrWhiteSpace(m_sEndLife) Then
|
||||
If String.IsNullOrWhiteSpace( m_sEndLife) Then
|
||||
m_sEndLife = My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
End If
|
||||
sUserNotes &= "END=" & m_sEndLife & ";"
|
||||
@@ -468,7 +459,7 @@ Public Class ToolsDbPageUC
|
||||
' Cancello l'utensile
|
||||
EgtTdbRemoveTool(SelectedItem.Name)
|
||||
' Rimuovo il nome dell'albero
|
||||
For Each ToolFamily As CathegoryItem In ToolsList
|
||||
For Each ToolFamily In ToolsList
|
||||
If (ToolFamily.nTType And SelectedItem.nType) <> 0 Then
|
||||
ToolFamily.Items.Remove(SelectedItem)
|
||||
If ToolFamily.Items.Count = 0 Then
|
||||
@@ -488,169 +479,18 @@ Public Class ToolsDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ExportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
|
||||
' creo lista utensili per esportazione
|
||||
Dim ToolToExportList = New ObservableCollection(Of ImpExpFamily)
|
||||
Dim Family As CathegoryItem
|
||||
Dim Tool As CustomItem
|
||||
For Each Family In ToolsList
|
||||
Dim ImpExpFamily As New ImpExpFamily(Family.Name, Family.nTType)
|
||||
ImpExpFamily.PictureString = "/Resources/ToolsTreeviewImages/Folder.png"
|
||||
For Each Tool In Family.Items
|
||||
Dim CurrTool = New ImpExpItem(Tool.Name, False)
|
||||
ImpExpFamily.ToolList.Add(CurrTool)
|
||||
Next
|
||||
ToolToExportList.Add(ImpExpFamily)
|
||||
Next
|
||||
|
||||
Dim ExportWndVM As New ImportExportToolWindowVM(ToolToExportList)
|
||||
Dim ExportWnd As New ImportExportToolWD(Application.Current.MainWindow, ExportWndVM)
|
||||
|
||||
ExportWnd.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ImportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' apro dialogo di scelta file
|
||||
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
|
||||
.DefaultExt = ".data",
|
||||
.Filter = "Tools (.data)|*.data",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If ImportFileDlg.ShowDialog() <> True Then Return
|
||||
Dim ImportFilePath As String = ImportFileDlg.FileName
|
||||
' recupero liste utensili da importare
|
||||
Dim ImportFileToolNameList As String() = Nothing
|
||||
Dim ImportFileToolFamilyList As Integer() = Nothing
|
||||
EgtTdbToBeImported(ImportFilePath, ImportFileToolNameList, ImportFileToolFamilyList)
|
||||
' li inserisco in lista per finestra di scelta
|
||||
Dim ToolToImportList As New ObservableCollection(Of ImpExpFamily)
|
||||
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||
For ToolIndex As Integer = 0 To ImportFileToolNameList.Count - 1
|
||||
Dim ToolName As String = ImportFileToolNameList(ToolIndex)
|
||||
Dim ToolFamily As Integer = ImportFileToolFamilyList(ToolIndex)
|
||||
ToolFamily = ToolFamily And
|
||||
(MCH_TF.DRILLBIT Or
|
||||
MCH_TF.SAWBLADE Or
|
||||
MCH_TF.MILL Or
|
||||
MCH_TF.MORTISE Or
|
||||
MCH_TF.CHISEL Or
|
||||
MCH_TF.WATERJET Or
|
||||
MCH_TF.COMPO)
|
||||
Dim bFounded As Boolean = False
|
||||
Dim ToolToImportFamily As ImpExpFamily
|
||||
For Each ToolToImportFamily In ToolToImportList
|
||||
If (ToolFamily = ToolToImportFamily.FamilyType) Then
|
||||
ToolToImportFamily.ToolList.Add(New ImpExpItem(ToolName, AlreadyExist(ToolName)))
|
||||
bFounded = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFounded Then
|
||||
Dim NewFamily As New ImpExpFamily(GetToolFamilyName(ToolFamily), ToolFamily)
|
||||
NewFamily.ToolList.Add(New ImpExpItem(ToolName, AlreadyExist(ToolName)))
|
||||
ToolToImportList.Add(NewFamily)
|
||||
End If
|
||||
Next
|
||||
Dim ImportWndVM As New ImportExportToolWindowVM(ToolToImportList, ImportFilePath, ImportFileToolNameList)
|
||||
Dim ImportWnd As New ImportExportToolWD(Application.Current.MainWindow, ImportWndVM)
|
||||
|
||||
If ImportWnd.ShowDialog() Then
|
||||
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||
LoadImportedMachineTools(ImportWndVM.vsImported)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function AlreadyExist(ToolName As String) As Boolean
|
||||
Dim ToolFamily As CathegoryItem
|
||||
For Each ToolFamily In ToolsList
|
||||
Dim ToolItem As CustomItem
|
||||
For Each ToolItem In ToolFamily.Items
|
||||
If ToolName = ToolItem.Name Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GetToolFamilyName(NewToolFamily As Integer) As String
|
||||
Dim ToolFamily As CathegoryItem
|
||||
For Each ToolFamily In ToolsList
|
||||
If NewToolFamily = ToolFamily.nTType Then
|
||||
Return ToolFamily.Name
|
||||
End If
|
||||
Next
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Private Sub LoadImportedMachineTools(vsImportedTools As String())
|
||||
' Leggo tutti gli utensili presenti nella Macchina (quindi anche quelli appena importati).
|
||||
Dim ActiveToolsFamilies() As ToolsFamily = MachineUtility.ReadToolFamilies(m_CurrMachine.sMachIniFile)
|
||||
Dim ToolsFamilyIndex As Integer = 0
|
||||
Dim ToolsFamilyItem As ToolsFamily
|
||||
For Each ToolsFamilyItem In ActiveToolsFamilies
|
||||
Dim FamilyTreeView As New CathegoryItem(ToolsFamilyItem.Name, ToolsFamilyItem.Id)
|
||||
Dim ToolFamilyItem = ToolsList.FirstOrDefault(Function(ToolFamily) ToolsFamilyItem.Id = FamilyTreeView.nTType)
|
||||
If IsNothing(ToolFamilyItem) Then
|
||||
ToolsList.Insert(ToolsFamilyIndex, FamilyTreeView)
|
||||
End If
|
||||
Dim nType As Integer = 0
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim ToolIndex As Integer = 0
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
If EgtTdbGetFirstTool(ToolsFamilyItem.Id, ToolName, nType) Then
|
||||
Dim ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
|
||||
If IsNothing(ToolItem) Then
|
||||
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
ElseIf vsImportedTools.Contains(ToolName) Then
|
||||
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
|
||||
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
End If
|
||||
ToolIndex += 1
|
||||
While EgtTdbGetNextTool(ToolsFamilyItem.Id, ToolName, nType)
|
||||
ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
|
||||
If IsNothing(ToolItem) Then
|
||||
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
ElseIf vsImportedTools.Contains(ToolName) Then
|
||||
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
|
||||
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
End If
|
||||
ToolIndex += 1
|
||||
End While
|
||||
End If
|
||||
ToolsFamilyIndex += 1
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String)
|
||||
If Not bEnabled Then Return
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
Dim ToolCathegory As New CathegoryItem(sFName, nTType)
|
||||
Dim ToolCathegory As New CathegoryItem( sFName, nTType)
|
||||
Dim nType As Integer = 0
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool( nTType, ToolName, nType)
|
||||
While bFound
|
||||
If nType = nTType Then ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
|
||||
If nType = nTType Then ToolCathegory.Items.Add( New CustomItem( ToolName, nType))
|
||||
bFound = EgtTdbGetNextTool( nTType, ToolName, nType)
|
||||
End While
|
||||
ToolsList.Add(ToolCathegory)
|
||||
ToolsList.Add( ToolCathegory)
|
||||
End Sub
|
||||
|
||||
Private Sub GetToolParams()
|
||||
@@ -705,7 +545,7 @@ Public Class ToolsDbPageUC
|
||||
HeadTxBx.Text = ToolString
|
||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, ToolInt)
|
||||
ExitTxBx.Text = ToolInt.ToString()
|
||||
If Not GetSpecials() Then
|
||||
if Not GetSpecials() Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString)
|
||||
UserNotesTxBx.Text = ToolString
|
||||
End If
|
||||
@@ -761,7 +601,7 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, HeadTxBx.Text)
|
||||
Int32.TryParse(ExitTxBx.Text, nTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, nTemp)
|
||||
If Not SetSpecials() Then
|
||||
if Not SetSpecials() Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text)
|
||||
End If
|
||||
End Sub
|
||||
@@ -797,7 +637,7 @@ Public Class ToolsDbPageUC
|
||||
Dim bShowUserNotes As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowUserNotes <> 0) Or m_CurrMachine.ShowUserNotes = 1)
|
||||
UserNotesTxBl.Visibility = If(bShowUserNotes, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
UserNotesTxBx.Visibility = If(bShowUserNotes, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
Dim bShowSpecials As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowSpecials <> 0) Or m_CurrMachine.ShowSpecials = 1)
|
||||
Dim bShowSpecials As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowSpecials <> 0) Or m_CurrMachine.ShowSpecials = 1)
|
||||
SerNbrTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
SerNbrTxBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
CodeTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
@@ -868,8 +708,6 @@ Public Class ToolsDbPageUC
|
||||
' Aggiorno visualizzazione
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
EgtSetView(VT.TOP, False)
|
||||
'EgtSetGenericView(150, -150)
|
||||
'EgtSetView(VT.ISO_SE, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
@@ -919,10 +757,6 @@ Public Class ToolsDbPageUC
|
||||
nMsg = MSG_TOOLSDBPAGEUC + 23 ' Spessore
|
||||
Case MCH_TP.MAXMAT
|
||||
nMsg = MSG_TOOLSDBPAGEUC + 24 ' Tagliente
|
||||
Case MCH_TP.CORE
|
||||
nMsg = 90720 ' Anima
|
||||
Case STEM
|
||||
nMsg = 90719 ' Lunghezza portautensile
|
||||
End Select
|
||||
' Predispongo calcolatrice (converto sempre in UIUnits perchè tutte lunghezze)
|
||||
Dim EgtCalculator As New EgtCalculatorWD(m_MainWindow, EgtToUiUnits(dVal), 300, WidthType.PIXEL, 0, 0, EgtMsg(nMsg))
|
||||
@@ -940,7 +774,7 @@ Public Class ToolsDbPageUC
|
||||
Private Sub RecreateToolDraw(ByVal dVal As Double)
|
||||
' Salvo il vecchio valore
|
||||
Dim dOldVal As Double
|
||||
GetVariableValue(dOldVal)
|
||||
GetVariableValue( dOldVal)
|
||||
' Aggiorno dati utensile
|
||||
SetVariableValue(dVal)
|
||||
' Creo utensile
|
||||
@@ -953,20 +787,7 @@ Public Class ToolsDbPageUC
|
||||
Private Function GetVariableValue(ByRef dVal As Double) As Boolean
|
||||
' Recupero valore variabile
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim nVarType As Integer = GetVariableType()
|
||||
If m_nToolType <> MCH_TY.SAW_STD OrElse nVarType <> STEM Then
|
||||
Return EgtTdbGetCurrToolParam(nVarType, dVal)
|
||||
Else
|
||||
Dim dL, dCore, dTh As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.LEN, dL) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
|
||||
dVal = Math.Max(dL - (dCore + dTh) / 2, 0.0)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return EgtTdbGetCurrToolParam(GetVariableType(), dVal)
|
||||
End Function
|
||||
|
||||
Private Function SetVariableValue(ByVal dVal As Double) As Boolean
|
||||
@@ -980,30 +801,6 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal + 1)
|
||||
Case MCH_TP.DIAM
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||
Case MCH_TP.THICK
|
||||
If m_bNewSawbladeMaker Then
|
||||
Dim dTh, dLen As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen) Then
|
||||
Dim dNewLen As Double = dLen + ((dVal - dTh) / 2)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, dNewLen)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dNewLen + 1)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Case MCH_TP.CORE
|
||||
If m_bNewSawbladeMaker Then
|
||||
Dim dCore, dLen As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen) Then
|
||||
Dim dNewLen As Double = dLen + ((dVal - dCore) / 2)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, dNewLen)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dNewLen + 1)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
ElseIf m_nToolType = MCH_TY.DRILL_STD Then
|
||||
Select Case nType
|
||||
@@ -1029,19 +826,7 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||
End Select
|
||||
End If
|
||||
If m_nToolType <> MCH_TY.SAW_STD OrElse nType <> STEM Then
|
||||
Return EgtTdbSetCurrToolParam(nType, dVal)
|
||||
Else
|
||||
Dim dCore, dTh As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
|
||||
Dim dL As Double = Math.Max( dVal, 0.0) + ((dCore + dTh) / 2)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dL + 1)
|
||||
Return EgtTdbSetCurrToolParam(MCH_TP.LEN, dL)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return EgtTdbSetCurrToolParam(nType, dVal)
|
||||
End Function
|
||||
|
||||
Private Function GetVariableType() As Integer
|
||||
@@ -1054,10 +839,6 @@ Public Class ToolsDbPageUC
|
||||
nType = MCH_TP.THICK
|
||||
ElseIf m_sCurrVar = "MAXMAT" Then
|
||||
nType = MCH_TP.MAXMAT
|
||||
ElseIf m_sCurrVar = "CORE" Then
|
||||
nType = MCH_TP.CORE
|
||||
ElseIf m_sCurrVar = "STEM" Then
|
||||
nType = STEM
|
||||
End If
|
||||
Return nType
|
||||
End Function
|
||||
@@ -1119,13 +900,6 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.THICK, dToolThick)
|
||||
EgtOutLog("ToolThick too small ->" & DoubleToString(dToolThick, 1))
|
||||
End If
|
||||
Dim dToolCore As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.CORE, dToolCore)
|
||||
If dToolCore < EPS_SMALL Then
|
||||
dToolCore = If( dToolLen >= dToolThick, dToolThick - 1, 2 * dToolLen - dToolThick)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.CORE, dToolCore)
|
||||
EgtOutLog("ToolCore too small ->" & DoubleToString(dToolCore, 1))
|
||||
End If
|
||||
Dim dToolMaxMat As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dToolMaxMat)
|
||||
If dToolMaxMat < EPS_SMALL Then
|
||||
@@ -1228,7 +1002,7 @@ Public Class ToolsDbPageUC
|
||||
End Function
|
||||
|
||||
Private Function CreateToolDraw() As Boolean
|
||||
Dim nErr As Integer = EgtTdbCurrToolDraw(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx(), ToolScene.GetCtx())
|
||||
Dim nErr As Integer = EgtTdbCurrToolDraw( m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx(), ToolScene.GetCtx())
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
Return (nErr = 0)
|
||||
End Function
|
||||
@@ -1281,4 +1055,4 @@ Public Class ToolsDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
End Class
|
||||
|
||||
@@ -323,8 +323,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2310, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2310, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2305, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2305, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -433,8 +433,7 @@ Class MainWindow
|
||||
End If
|
||||
|
||||
' abilito il bottone per la gestione del comando di Check-Up-Start (posziona lama prelavorazione)
|
||||
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse
|
||||
Not File.Exists( m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 Then
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
||||
@@ -1094,15 +1093,12 @@ Class MainWindow
|
||||
If m_bNCLink And m_CurrentMachine.bProdLine Then
|
||||
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_ProdLineTimer.Start()
|
||||
ElseIf m_CurrentMachine.bDemo Then
|
||||
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_ProdLineTimer.Start()
|
||||
End If
|
||||
|
||||
' seleziono il tipo di avvio
|
||||
m_CurrentProjectPageUC.StartProgram()
|
||||
'm_CurrentProjectPageUC.StartProgram()
|
||||
' aggiorno la grafica
|
||||
EgtZoom(ZM.ALL, True)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Friend Sub EgtWPFInit()
|
||||
@@ -1157,7 +1153,7 @@ Class MainWindow
|
||||
m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
m_CNCommunication.m_CN.ReadEls_Add_Parameter(m_CurrentMachine.sVarProjFinished, 1)
|
||||
Dim nVarFin As Integer = 0
|
||||
For I As Integer = 1 To 4
|
||||
For I = 1 To 4
|
||||
System.Threading.Thread.Sleep(50)
|
||||
If m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarFin = CInt(m_CNCommunication.m_CN.d_DReadELS_value)
|
||||
@@ -1197,7 +1193,7 @@ Class MainWindow
|
||||
nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1)
|
||||
nMove = 1
|
||||
End If
|
||||
' altrimenti forzo trasmissione ultimo inviato
|
||||
' altrimenti forzo trasmissione ultimo inviato
|
||||
Else
|
||||
nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1)
|
||||
nMove = 1
|
||||
@@ -1219,17 +1215,13 @@ Class MainWindow
|
||||
m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
m_CNCommunication.m_CN.ReadEls_Add_Parameter(m_CurrentMachine.sVarProjCopy, 1)
|
||||
Dim nVarCopy As Integer = 0
|
||||
For I As Integer = 1 To 10
|
||||
For I = 1 To 10
|
||||
System.Threading.Thread.Sleep(50)
|
||||
If m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarCopy = CInt(m_CNCommunication.m_CN.d_DReadELS_value)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
' forzo la variabile CN - aggiornando il valore dell'indice del progetto in elaborazione
|
||||
If m_CurrentMachine.bDemo Then nVarCopy = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, GetIniFile())
|
||||
|
||||
' Leggo variabile con ultimo progetto mandato a OmagView
|
||||
Dim nLastCopy As Integer = GetPrivateProfileInt(S_GENERAL, K_LASTPROJTOVIEW, 0, GetIniFile())
|
||||
' Se non nulla e diversa da ultimo copiato, verifico se eseguire la copia
|
||||
@@ -1276,7 +1268,7 @@ Class MainWindow
|
||||
m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
m_CNCommunication.m_CN.ReadEls_Add_Parameter(m_CurrentMachine.sProdLiProbingStateVar(nI), 1)
|
||||
Dim nProbingState As Integer = 0
|
||||
For I As Integer = 1 To 5
|
||||
For I = 1 To 5
|
||||
System.Threading.Thread.Sleep(20)
|
||||
If m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
nProbingState = CInt(m_CNCommunication.m_CN.d_DReadELS_value)
|
||||
@@ -1289,7 +1281,7 @@ Class MainWindow
|
||||
If m_CurrentMachine.sProdLiProbingTcPosVar(nI) <> "0" Then
|
||||
m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
m_CNCommunication.m_CN.ReadEls_Add_Parameter(m_CurrentMachine.sProdLiProbingTcPosVar(nI), 1)
|
||||
For I As Integer = 1 To 5
|
||||
For I = 1 To 5
|
||||
System.Threading.Thread.Sleep(20)
|
||||
If m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
nTcPos = CInt(m_CNCommunication.m_CN.d_DReadELS_value)
|
||||
@@ -1304,7 +1296,7 @@ Class MainWindow
|
||||
m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
m_CNCommunication.m_CN.ReadEls_Add_Parameter(m_CurrentMachine.sProdLiSawDiameterVar(nI), 1)
|
||||
Dim dDiam As Double = 0
|
||||
For I As Integer = 1 To 5
|
||||
For I = 1 To 5
|
||||
System.Threading.Thread.Sleep(20)
|
||||
If m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
dDiam = m_CNCommunication.m_CN.d_DReadELS_value
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.10.2")>
|
||||
<Assembly: AssemblyFileVersion("2.3.10.2")>
|
||||
<Assembly: AssemblyVersion("2.3.5.1")>
|
||||
<Assembly: AssemblyFileVersion("2.3.5.1")>
|
||||
|
||||
@@ -325,24 +325,21 @@ Public Class CNCommunication
|
||||
GetPrivateProfileString(S_NCDATA, K_BYPASSTATE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
|
||||
|
||||
' nuove variabili: stato dei nuovi pulsanti
|
||||
GetPrivateProfileString(S_NCDATA, K_NEWCONSOLE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_IsNewConsole = (sVal = 1)
|
||||
' nuove variabili
|
||||
m_IsNewConsole = GetPrivateProfileString(S_NCDATA, K_NEWCONSOLE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
If m_IsNewConsole Then
|
||||
GetPrivateProfileString(S_NCDATA, K_XYJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.XYJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZCJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.ZCJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZBJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.ZBJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_XYAXES, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.XYAxes, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZAXES, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.ZAxes, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_BCAxes, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.BCAxes, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_POWERON, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.PowerON, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_REMOTE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal)
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.PowerON, sVal)
|
||||
End If
|
||||
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
|
||||
Catch ex As Exception
|
||||
' set status to statusbar
|
||||
@@ -491,7 +488,7 @@ Public Class CNCommunication
|
||||
If m_CN.b_NC_error Then
|
||||
ErrorList.Clear()
|
||||
SyncLock m_CN
|
||||
For Each Item As String In m_CN.sz_NC_error_messages
|
||||
For Each Item In m_CN.sz_NC_error_messages
|
||||
ErrorList.Add(Item)
|
||||
Next
|
||||
End SyncLock
|
||||
@@ -558,10 +555,9 @@ Public Class CNCommunication
|
||||
|
||||
' Nuovi bottoni (uso joystick)
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.XYJogChanged(m_CN.bXYJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZCJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZBJogChanged(m_CN.bZBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.RemoteChanged(m_CN.bRemote)
|
||||
m_MainWindow.m_DirectCutPageUC.XYAxesChanged(m_CN.bXYAxes)
|
||||
m_MainWindow.m_DirectCutPageUC.ZAxesChanged(m_CN.bZAxes)
|
||||
m_MainWindow.m_DirectCutPageUC.BCAxesChanged(m_CN.bBCAxes)
|
||||
End If
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
@@ -579,10 +575,9 @@ Public Class CNCommunication
|
||||
|
||||
' Nuovi bottoni (uso joystick) per Area4
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.XYJogChanged(m_CN.bXYJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCJogChanged(m_CN.bZBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.RemoteChanged(m_CN.bRemote)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.XYAxesChanged(m_CN.bXYAxes)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZAxesChanged(m_CN.bZAxes)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCAxesChanged(m_CN.bBCAxes)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -595,7 +590,6 @@ Public Class CNCommunication
|
||||
' Nuove bottoni (Power Macchina)
|
||||
If m_IsNewConsole AndAlso m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
|
||||
End If
|
||||
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.WorkInProgress Then
|
||||
@@ -706,7 +700,7 @@ Public Class CNCommunication
|
||||
If m_CN.b_NC_error Then
|
||||
ErrorList.Clear()
|
||||
SyncLock m_CN
|
||||
For Each Item As String In m_CN.sz_NC_error_messages
|
||||
For Each Item In m_CN.sz_NC_error_messages
|
||||
ErrorList.Add(Item)
|
||||
Next
|
||||
End SyncLock
|
||||
|
||||
@@ -8,7 +8,7 @@ Public MustInherit Class CN_generico
|
||||
Public Const MAX_VAR As Short = 100
|
||||
Public Const MAX_VALUES As Short = 9 ' Max. index to read the data from the FXServer array
|
||||
Public Const MAX_TOOLS As Short = 100
|
||||
Public Const NUM_DATA = 52 ' Numero di dati del CN (Speed,Feed,...)
|
||||
Public Const NUM_DATA = 50 ' Numero di dati del CN (Speed,Feed,...)
|
||||
|
||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||
|
||||
@@ -61,11 +61,10 @@ Public MustInherit Class CN_generico
|
||||
VacuumOff = 45
|
||||
LaserTrac = 46
|
||||
|
||||
XYJog = 47
|
||||
ZCJog = 48
|
||||
ZBJog = 49
|
||||
XYAxes = 47
|
||||
ZAxes = 48
|
||||
BCAxes = 49
|
||||
PowerON = 50
|
||||
Remote = 51
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
@@ -201,12 +200,11 @@ Public MustInherit Class CN_generico
|
||||
Public bSpeedHold As Boolean
|
||||
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
Public bXYJog As Boolean
|
||||
Public bZCJog As Boolean
|
||||
Public bZBCJog As Boolean
|
||||
Public bXYAxes As Boolean
|
||||
Public bZAxes As Boolean
|
||||
Public bBCAxes As Boolean
|
||||
|
||||
Public bPowerON As Boolean
|
||||
Public bRemote As Boolean
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
|
||||
Public nMachineMode As Integer
|
||||
|
||||
@@ -719,7 +719,7 @@ Module M_MMFiles
|
||||
Next
|
||||
|
||||
' Copia variabili R
|
||||
For n As Integer = 0 To (N_R_VAR - 1)
|
||||
For n = 0 To (N_R_VAR - 1)
|
||||
CurrCN.d_Dvariable_values(n) = SiemensRet.d_interf_variable_values(n)
|
||||
Next
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ Namespace Num
|
||||
' Detect and identify the Flexium CNC type
|
||||
sz_CncFxIdentifier = objDMainCncData.GetCncIdentifier()
|
||||
' _txtGetCncIdentification.Invoke(DirectCast(Sub() _txtGetCncIdentification.Text = CncFxIdentifier, MethodInvoker))
|
||||
EgtOutLog("Modello Flexium: " & sz_CncFxIdentifier)
|
||||
|
||||
If sz_CncFxIdentifier = "Flexium 6" OrElse sz_CncFxIdentifier = "Flexium 8" OrElse sz_CncFxIdentifier = "Flexium 68" Then
|
||||
IsFlexiumPlus = False
|
||||
Else
|
||||
@@ -1077,16 +1077,14 @@ Namespace Num
|
||||
Case CnData.VacuumOff ' (45) Stato aspirazione ventose spento
|
||||
bVacuumOff = CBool(values(n))
|
||||
|
||||
Case CnData.XYJog ' (46)
|
||||
bXYJog = CBool(values(n))
|
||||
Case CnData.ZCJog ' (47)
|
||||
bZCJog = CBool(values(n))
|
||||
Case CnData.ZBJog ' (48)
|
||||
bZBCJog = CBool(values(n))
|
||||
Case CnData.XYAxes ' (46)
|
||||
bXYAxes = CBool(values(n))
|
||||
Case CnData.ZAxes ' (47)
|
||||
bZAxes = CBool(values(n))
|
||||
Case CnData.BCAxes ' (48)
|
||||
bBCAxes = CBool(values(n))
|
||||
Case CnData.PowerON ' (49)
|
||||
bPowerON = CBool(values(n))
|
||||
Case CnData.Remote ' (50)
|
||||
bRemote = CBool(values(n))
|
||||
|
||||
End Select
|
||||
Next
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>OmagCUT.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42032,42036</NoWarn>
|
||||
<WarningsAsErrors>
|
||||
</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
@@ -36,7 +36,7 @@
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>OmagCUT.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42032,42036</NoWarn>
|
||||
<WarningsAsErrors>
|
||||
</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
@@ -50,7 +50,7 @@
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>Off</OptionInfer>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -58,7 +58,7 @@
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DocumentationFile>OmagCUT.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42032,42036</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
@@ -70,7 +70,7 @@
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DocumentationFile>OmagCUT.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42032,42036</NoWarn>
|
||||
<DebugType>None</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
@@ -96,7 +96,7 @@
|
||||
<OutputPath>bin\Trial\</OutputPath>
|
||||
<DocumentationFile>OmagCUT.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42032,42036</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
@@ -105,7 +105,7 @@
|
||||
<OutputPath>bin\x86\Trial\</OutputPath>
|
||||
<DocumentationFile>OmagCUT.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42032,42036</NoWarn>
|
||||
<DebugType>None</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
@@ -173,12 +173,6 @@
|
||||
<Compile Include="DirectCuts\SingleCutAuto.xaml.vb">
|
||||
<DependentUpon>SingleCutAuto.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DirectCuts\SingleDrillUC.xaml.vb">
|
||||
<DependentUpon>SingleDrillUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawImport\AlzFrontUC.xaml.vb">
|
||||
<DependentUpon>AlzFrontUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawImport\CompoCsvData.xaml.vb">
|
||||
<DependentUpon>CompoCsvData.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -196,15 +190,12 @@
|
||||
<DependentUpon>CadCutPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamAuto.vb" />
|
||||
<Compile Include="Machine\ImportExportToolWD.xaml.vb">
|
||||
<DependentUpon>ImportExportToolWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\StartLauncheWD.xaml.vb">
|
||||
<DependentUpon>StartLauncheWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\CicloStartWD.xaml.vb">
|
||||
<DependentUpon>CicloStartWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\StartLauncheWDr.xaml.vb">
|
||||
<DependentUpon>StartLauncheWDr.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RawPhoto\SlabIdWD.xaml.vb">
|
||||
<DependentUpon>SlabIdWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -406,14 +397,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\SingleDrillUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DrawImport\AlzFrontUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DrawImport\CompoCsvData.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -434,15 +417,14 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Machine\ImportExportToolWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Project\StartLauncheWD.xaml">
|
||||
</Page>
|
||||
<Page Include="Project\CicloStartWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\StartLauncheWDr.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="RawPhoto\SlabIdWD.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -1046,183 +1028,6 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\SlabId.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Nuovo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Carica.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Salva.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Salva-con-nome.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\CSV.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Vein-match.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DatiMacchina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DB-lavorazioni.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DB-utensili.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Macchina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Movimento-manuale.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Taglio-singolo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Taglio-multiplo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Taglio-griglia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Spianatura.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Copia-dima.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Sezione-cornice.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Foro-singolo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P1_P2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Esegui.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Simula.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Test-lama.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\File-CSV.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Allunga-o-accorcia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inizio-allunga-o-accorcia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Fine-allunga-o-accorcia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\ON_OFF-singolo-taglio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Tutti-ON.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Tutti-OFF.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inizio-centro-fuori.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Fine-centro-fuori.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Modifica-inizio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Modifica-fine.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inverti.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Pausa-ON_OFF.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inizio-tutti-fuori.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inizio-tutti-centro.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Fine-tutti-centro.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Fine-tutti-fuori.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Tutti-allunga.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Tutti-accorcia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Parcheggia-pezzo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inserisci-pezzo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Elimina-pezzo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Seleziona-tutto.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Deseleziona-tutto.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Arco.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Linea.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Rimuovi-segmento.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Chiudi.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Salva-taglio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Take-point.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Specchia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Rimuovi_elimina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\XYJog.png" />
|
||||
<Resource Include="Resources\NewIcons\ZBJog.png" />
|
||||
<Resource Include="Resources\NewIcons\ZCJog.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Lucidatura.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P1.png" />
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<BitmapImage x:Key="ZoomOutImg" UriSource="Resources/NewIcons/Zoom-.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZoomWinImg" UriSource="Resources/NewIcons/ZoomWIn.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LogoOmagImg" UriSource="Resources/NewIcons/logo-OmCut.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Nuove icone da sistemare-->
|
||||
<BitmapImage x:Key="AvantiVeloceImg" UriSource="Resources/NewIcons/AvantiVeloce.png"></BitmapImage>
|
||||
<BitmapImage x:Key="IndietroVeloceImg" UriSource="Resources/NewIcons/IndietroVeloce.png"></BitmapImage>
|
||||
@@ -88,80 +88,6 @@
|
||||
<BitmapImage x:Key="StopImg" UriSource="Resources/NewIcons/Stop.png"></BitmapImage>
|
||||
<BitmapImage x:Key="VacuumImg" UriSource="Resources/NewIcons/Vacuum.png"></BitmapImage>
|
||||
|
||||
<!--General-->
|
||||
<BitmapImage x:Key="EseguiImg" UriSource="Resources/NewIcons/Esegui.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SimulaImg" UriSource="Resources/NewIcons/Simula.png"></BitmapImage>
|
||||
|
||||
<!--ProjectManager-->
|
||||
<BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/File-CSV.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Test-lamaImg" UriSource="Resources/NewIcons/Test-lama.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Parcheggia-pezzoImg" UriSource="Resources/NewIcons/Parcheggia-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inserisci-pezzoImg" UriSource="Resources/NewIcons/Inserisci-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
|
||||
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LucidaturaImg" UriSource="Resources/NewIcons/Lucidatura.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Direct cuts-->
|
||||
<BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-singoloImg" UriSource="Resources/NewIcons/Taglio-singolo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P1_P2Img" UriSource="Resources/NewIcons/Acquisisci-P1_P2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P1Img" UriSource="Resources/NewIcons/Acquisisci-P1.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P2Img" UriSource="Resources/NewIcons/Acquisisci-P2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-PImg" UriSource="Resources/NewIcons/Acquisisci-P.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ArcoImg" UriSource="Resources/NewIcons/Arco.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LineaImg" UriSource="Resources/NewIcons/Linea.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Rimuovi-segmentoImg" UriSource="Resources/NewIcons/Rimuovi-segmento.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ChiudiImg" UriSource="Resources/NewIcons/Chiudi.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-taglioImg" UriSource="Resources/NewIcons/Salva-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Take-pointImg" UriSource="Resources/NewIcons/Take-point.png"></BitmapImage>
|
||||
|
||||
<BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Frame-->
|
||||
<BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SpecchiaImg" UriSource="Resources/NewIcons/Specchia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Rimuovi_eliminaImg" UriSource="Resources/NewIcons/Rimuovi_elimina.png"></BitmapImage>
|
||||
|
||||
<!--Machinig-->
|
||||
<BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-OFFImg" UriSource="Resources/NewIcons/Tutti-OFF.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Centro-FuoriImg" UriSource="Resources/NewIcons/Inizio-centro-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Centro-FuoriImg" UriSource="Resources/NewIcons/Fine-centro-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Modifica-InizioImg" UriSource="Resources/NewIcons/Modifica-inizio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Modifica-FineImg" UriSource="Resources/NewIcons/Modifica-fine.png"></BitmapImage>
|
||||
<BitmapImage x:Key="InvertiImg" UriSource="Resources/NewIcons/Inverti.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Pausa-ON_OFFImg" UriSource="Resources/NewIcons/Pausa-ON_OFF.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-tutti-fuoriImg" UriSource="Resources/NewIcons/Inizio-tutti-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-tutti-centroImg" UriSource="Resources/NewIcons/Inizio-tutti-centro.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-tutti-fuoriImg" UriSource="Resources/NewIcons/Fine-tutti-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-tutti-centroImg" UriSource="Resources/NewIcons/Fine-tutti-centro.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-allungaImg" UriSource="Resources/NewIcons/Tutti-allunga.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-accorciaImg" UriSource="Resources/NewIcons/Tutti-accorcia.png"></BitmapImage>
|
||||
|
||||
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Roboto</FontFamily>
|
||||
|
||||
<SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#636974" />
|
||||
@@ -202,19 +128,12 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
|
||||
<!--<Setter Property="Background" Value="#636974" #3C3F48/>
|
||||
<Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
|
||||
<!--<Setter Property="Background" Value="#636974"/>
|
||||
<Setter Property="BorderBrush" Value="#636974"/>-->
|
||||
<Setter Property="Background" Value="#3C3F48"/>
|
||||
<Setter Property="BorderBrush" Value="#3C3F48"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_MachiningBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
|
||||
<!--<Setter Property="Background" Value="#636974" #3C3F48/>
|
||||
<Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<Setter Property="BorderBrush" Value="#3C3F48"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_EmptyBorder" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource EmptyBorder_CornerRadius}"/>
|
||||
@@ -332,32 +251,14 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_YellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Background" Value="#636974"/>
|
||||
<Setter Property="BorderBrush" Value="#636974"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter x:Name="MyContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="ToggleButton.Background" Value="#145993" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
|
||||
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_Blue}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
@@ -537,30 +438,10 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_YellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Background" Value="#1C1D22"/>
|
||||
<Setter Property="BorderBrush" Value="#1C1D22"/>
|
||||
<!--<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>-->
|
||||
<Setter Property="Foreground" Value="LightGray"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter x:Name="MyContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
|
||||
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_DarkGray}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_RightGrayYellowTextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton_Wrap}">
|
||||
@@ -578,29 +459,10 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_GradientBlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Background" Value="#2D3036"/>
|
||||
<Setter Property="BorderBrush" Value="#2D3036"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<!--<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>-->
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter x:Name="MyContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
|
||||
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_Blue}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
|
||||
|
||||
@@ -155,82 +155,6 @@
|
||||
<BitmapImage x:Key="StopImg" UriSource="Resources/Stop.png"></BitmapImage>
|
||||
<BitmapImage x:Key="VacuumImg" UriSource="Resources/Vacuum.png"></BitmapImage>
|
||||
|
||||
<!--sono le stesse immagini usate per l'interfaccia Dark-->
|
||||
<!--General-->
|
||||
<BitmapImage x:Key="EseguiImg" UriSource="Resources/NewIcons/Esegui.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SimulaImg" UriSource="Resources/NewIcons/Simula.png"></BitmapImage>
|
||||
|
||||
<!--ProjectManager-->
|
||||
<BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/File-CSV.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Test-lamaImg" UriSource="Resources/NewIcons/Test-lama.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Parcheggia-pezzoImg" UriSource="Resources/NewIcons/Parcheggia-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inserisci-pezzoImg" UriSource="Resources/NewIcons/Inserisci-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
|
||||
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LucidaturaImg" UriSource="Resources/NewIcons/Lucidatura.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Direct cuts-->
|
||||
<BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-singoloImg" UriSource="Resources/NewIcons/Taglio-singolo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P1_P2Img" UriSource="Resources/NewIcons/Acquisisci-P1_P2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P1Img" UriSource="Resources/NewIcons/Acquisisci-P1.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P2Img" UriSource="Resources/NewIcons/Acquisisci-P2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-PImg" UriSource="Resources/NewIcons/Acquisisci-P.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ArcoImg" UriSource="Resources/NewIcons/Arco.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LineaImg" UriSource="Resources/NewIcons/Linea.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Rimuovi-segmentoImg" UriSource="Resources/NewIcons/Rimuovi-segmento.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ChiudiImg" UriSource="Resources/NewIcons/Chiudi.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-taglioImg" UriSource="Resources/NewIcons/Salva-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Take-pointImg" UriSource="Resources/NewIcons/Take-point.png"></BitmapImage>
|
||||
|
||||
<BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Frame-->
|
||||
<BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SpecchiaImg" UriSource="Resources/NewIcons/Specchia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Rimuovi_eliminaImg" UriSource="Resources/NewIcons/Rimuovi_elimina.png"></BitmapImage>
|
||||
|
||||
<!--Machinig-->
|
||||
<BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-OFFImg" UriSource="Resources/NewIcons/Tutti-OFF.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Centro-FuoriImg" UriSource="Resources/NewIcons/Inizio-centro-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Centro-FuoriImg" UriSource="Resources/NewIcons/Fine-centro-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Modifica-InizioImg" UriSource="Resources/NewIcons/Modifica-inizio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Modifica-FineImg" UriSource="Resources/NewIcons/Modifica-fine.png"></BitmapImage>
|
||||
<BitmapImage x:Key="InvertiImg" UriSource="Resources/NewIcons/Inverti.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Pausa-ON_OFFImg" UriSource="Resources/NewIcons/Pausa-ON_OFF.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-tutti-fuoriImg" UriSource="Resources/NewIcons/Inizio-tutti-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-tutti-centroImg" UriSource="Resources/NewIcons/Inizio-tutti-centro.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-tutti-fuoriImg" UriSource="Resources/NewIcons/Fine-tutti-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-tutti-centroImg" UriSource="Resources/NewIcons/Fine-tutti-centro.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-allungaImg" UriSource="Resources/NewIcons/Tutti-allunga.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-accorciaImg" UriSource="Resources/NewIcons/Tutti-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LastProjImg" UriSource="Resources/NewIcons/PlayStep.png"></BitmapImage>
|
||||
|
||||
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Century Gothic</FontFamily>
|
||||
|
||||
<SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#FFFFFFFF" />
|
||||
@@ -249,14 +173,7 @@
|
||||
<Setter Property="Margin" Value="1" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_MachiningBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
|
||||
<!--<Setter Property="Background" Value="#636974" #3C3F48/>
|
||||
<Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="BorderBrush" Value="#3C3F48"/>
|
||||
</Style>
|
||||
|
||||
<!--Border-->
|
||||
<!--Border-->
|
||||
<Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
@@ -1231,7 +1148,6 @@
|
||||
|
||||
<Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/>
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
<Setter Property="IsEnabled" Value="False"/>
|
||||
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
|
||||
|
||||
@@ -1221,7 +1221,7 @@ Public Class OptionsPageUC
|
||||
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
|
||||
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
||||
For FileIndex As Integer = 0 To TempFiles.Count - 1
|
||||
For FileIndex = 0 To TempFiles.Count - 1
|
||||
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
|
||||
OtherFiles.Add(TempFiles(FileIndex))
|
||||
End If
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
@@ -38,8 +38,8 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_MachiningBorder}" Grid.Row="0" >
|
||||
<Grid >
|
||||
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_Border}" Grid.Row="0" >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -93,14 +93,6 @@ Public Class CurrentProjectPageUC
|
||||
Dim DstLnColor As New Color3d(255, 0, 0)
|
||||
GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor, m_MainWindow.GetIniFile())
|
||||
CurrentProjectScene.SetDistLineMaterial(DstLnColor)
|
||||
|
||||
''imposto il colore di sfondo del progetto
|
||||
'Dim BAckTopColor As New Color3d(192, 192, 192)
|
||||
'GetPrivateProfileColor(S_SCENE, "BackTop", BAckTopColor, m_MainWindow.GetIniFile())
|
||||
'Dim BackBottom As New Color3d(192, 192, 192)
|
||||
'GetPrivateProfileColor(S_SCENE, "BackBottom", BackBottom, m_MainWindow.GetIniFile())
|
||||
'CurrentProjectScene.SetViewBackground(BAckTopColor, BackBottom)
|
||||
|
||||
' imposto parametri OpenGL
|
||||
Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3, m_MainWindow.GetIniFile())
|
||||
Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
@@ -181,28 +173,22 @@ Public Class CurrentProjectPageUC
|
||||
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
|
||||
m_bFirst = False
|
||||
|
||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
||||
' apro la finstra di selezione di avvio del programma
|
||||
'StartProgram()
|
||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
||||
' Se richiesto, carico ultimo progetto
|
||||
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
If bAutoLoadLast Then
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
If Not LoadProject(sPath, False) Then
|
||||
NewProject()
|
||||
End If
|
||||
EgtResetModified()
|
||||
'Altrimenti ne imposto uno nuovo
|
||||
Else
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
NewProject()
|
||||
End If
|
||||
|
||||
'' Se richiesto, carico ultimo progetto
|
||||
'Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
'If bAutoLoadLast Then
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
' If Not LoadProject(sPath, False) Then
|
||||
' NewProject()
|
||||
' End If
|
||||
' EgtResetModified()
|
||||
' 'Altrimenti ne imposto uno nuovo
|
||||
'Else
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' NewProject()
|
||||
'End If
|
||||
|
||||
' creo nuovo progetto
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
'' creo nuovo progetto
|
||||
'NewProject()
|
||||
|
||||
' Nascondo progress per fotografia
|
||||
@@ -241,13 +227,15 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
Dim MyStartLancherWD As New StartLauncherWD(m_MainWindow)
|
||||
' mostro la finestra di avvio solo se configirato (= 3)
|
||||
If nStart = MODE_LAUNCHER.ShowWindow Then
|
||||
If nStart = 3 Then
|
||||
MyStartLancherWD.ShowDialog()
|
||||
Else
|
||||
MyStartLancherWD.CurrSelection = nStart
|
||||
End If
|
||||
|
||||
If MyStartLancherWD.CurrSelection = MODE_LAUNCHER.LastProject Then
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' se ultimo progetto (= 0)
|
||||
If MyStartLancherWD.CurrSelection = 0 Then
|
||||
' Stampo il numero di progetto con 4 decimali: 12 -> "0012"
|
||||
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
' provo ad aprire l'ultimo progetto modificato
|
||||
@@ -260,58 +248,20 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
EgtResetModified()
|
||||
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.NewProject Then
|
||||
NewProject()
|
||||
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.OpenFolder Then
|
||||
NewProject()
|
||||
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' Cancello eventuali messaggi
|
||||
ClearMessage()
|
||||
' Imposto la pagina attualmente attiva come Previous
|
||||
m_MainWindow.m_PrevActivePage = m_MainWindow.m_ActivePage
|
||||
' Passo alla pagina di apertura con preview
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
|
||||
|
||||
' seleziono il file dalla lista della finestra (= 4)
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.SelectedProject Then
|
||||
NewProject()
|
||||
Dim sCurrDir As String = Path.GetDirectoryName(MyStartLancherWD.SelPath)
|
||||
Dim sCurrFile As String = Path.GetFileName(MyStartLancherWD.SelPath)
|
||||
|
||||
If Not LoadProject(sCurrDir & "\" & sCurrFile) Then
|
||||
' seleziono file da finestra di avvio (= 4)
|
||||
ElseIf MyStartLancherWD.CurrSelection = 4 Then
|
||||
If Not LoadProject(MyStartLancherWD.SelPath, False) Then
|
||||
' altrimenti apro un nuovo progetto
|
||||
NewProject()
|
||||
m_MruFiles.Remove(sCurrDir & "\" & sCurrFile)
|
||||
Else
|
||||
' Verifico se file salvato con nome guardando il nome della cartella in cui si trova
|
||||
Dim sSaveNameDir As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, K_SAVENAMEDIR, "", sSaveNameDir, m_MainWindow.GetIniFile())
|
||||
If sCurrDir = sSaveNameDir Then
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, sCurrFile.Substring(0, sCurrFile.Length - 4), m_MainWindow.GetIniFile())
|
||||
' Salvo equivalente con indice
|
||||
SetNextProjectIndex()
|
||||
SaveProject()
|
||||
Else
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, String.Empty, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
' Salvo path di carico del progetto
|
||||
If sCurrDir <> m_MainWindow.GetSaveDir() And sCurrDir <> sSaveNameDir Then
|
||||
SetLoadPath(sCurrDir & "\" & sCurrFile)
|
||||
End If
|
||||
m_MruFiles.Add(sCurrDir & "\" & sCurrFile)
|
||||
' salvo il nome del file caricato
|
||||
m_MruFiles.Add(MyStartLancherWD.SelPath)
|
||||
End If
|
||||
EgtResetModified()
|
||||
|
||||
'If Not LoadProject(MyStartLancherWD.SelPath, False) Then
|
||||
' ' altrimenti apro un nuovo progetto
|
||||
' NewProject()
|
||||
'Else
|
||||
' ' salvo il nome del file caricato
|
||||
' m_MruFiles.Add(MyStartLancherWD.SelPath)
|
||||
'End If
|
||||
'EgtResetModified()
|
||||
' se nuovo progetto (= 1) o naviga direttorio (= 2)
|
||||
ElseIf MyStartLancherWD.CurrSelection = 1 Or MyStartLancherWD.CurrSelection = 0 Then
|
||||
NewProject()
|
||||
End If
|
||||
|
||||
'' Nascondo progress per fotografia
|
||||
@@ -328,26 +278,6 @@ Public Class CurrentProjectPageUC
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
' questo metodo è direttamente richiamato in caso di selezione della regione sinistra della pagina
|
||||
Private Sub ChooseMachining() Handles CurrProjGrid.MouseDown
|
||||
' Apro pagina di selezione della lavorazione prima di chiudere il grezzo
|
||||
Dim m_ChooseMachiningPage = New ChooseMachining(m_MainWindow)
|
||||
' apro la finestra per la selezione delle lavorazioni
|
||||
m_ChooseMachiningPage.ShowDialog()
|
||||
' se seleziono "Ok" allora resetto tutte le lavorazioni del progetto
|
||||
If m_ChooseMachiningPage.DialogResult Then
|
||||
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
ClearMessage()
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
If nWarn = 1 Then SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseDownScene
|
||||
If m_bSelectCurv Then
|
||||
RaiseEvent OnMouseDownSceneSelCurv(sender, e)
|
||||
@@ -458,7 +388,7 @@ Public Class CurrentProjectPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function AdjustAdditionalTable( Optional bForced As Boolean = False) As Boolean
|
||||
Friend Function AdjustAdditionalTable() As Boolean
|
||||
' Recupero altezza sottotavola corrente
|
||||
Dim nFixtId As Integer = EgtGetFirstNameInGroup(EgtGetFirstMachGroup(), MACH_FIXT_GROUP)
|
||||
Dim nAddTabId As Integer = EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE)
|
||||
@@ -470,7 +400,7 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Se valore cambiato, aggiorno...
|
||||
Dim dDeltaZ As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable - dCurrAddTab
|
||||
If Math.Abs(dDeltaZ) > EPS_SMALL Or bForced Then
|
||||
If Math.Abs(dDeltaZ) > EPS_SMALL Then
|
||||
AddAdditionalTable()
|
||||
UpdateAllRawsZ(dDeltaZ)
|
||||
If GetPhoto() <> GDB_ID.NULL Then
|
||||
@@ -491,28 +421,16 @@ Public Class CurrentProjectPageUC
|
||||
EgtErase(EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE))
|
||||
' Altezza eventuale tavola aggiuntiva
|
||||
Dim dAddTable As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable
|
||||
' Se non richiesta sovratavola, non c'è altro da fare ed esco
|
||||
' Se non esiste sovratavola, esco subito
|
||||
If dAddTable < 10 * EPS_SMALL Then Return True
|
||||
' Recupero box tavola
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetTableArea(1, ptMin, ptMax)
|
||||
' Nuova geometria
|
||||
Dim nAddTabId As Integer = GDB_ID.NULL
|
||||
' Se esiste geometria di riferimento
|
||||
Dim nRefAddTabId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( EgtGetTableId( MAIN_TAB), "SOLID"), MACH_ADD_TABLE)
|
||||
If nRefAddTabId <> GDB_ID.NULL Then
|
||||
nAddTabId = EgtCopyGlob( nRefAddTabId, nFixtId)
|
||||
EgtSetStatus( nAddTabId, GDB_ST.ON_)
|
||||
EgtScale( nAddTabId, new Frame3d( ptMin), 1, 1, dAddTable / 10)
|
||||
' altrimenti la creo
|
||||
Else
|
||||
' Aggiungo sovratavola nel gruppo dei bloccaggi
|
||||
ptMax.z -= DELTAZ_ADDTAB
|
||||
ptMin.z = ptMax.z
|
||||
ptMax.z += dAddTable
|
||||
nAddTabId = EgtCreateSurfTmBBox(nFixtId, ptMin, ptMax, GDB_RT.GLOB)
|
||||
End If
|
||||
' Sistemazioni finali
|
||||
' Aggiungo sovratavola nel gruppo dei bloccaggi
|
||||
ptMax.z -= DELTAZ_ADDTAB
|
||||
ptMin.z = ptMax.z
|
||||
ptMax.z += dAddTable
|
||||
Dim nAddTabId As Integer = EgtCreateSurfTmBBox(nFixtId, ptMin, ptMax, GDB_RT.GLOB)
|
||||
If nAddTabId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
||||
EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||
@@ -643,7 +561,7 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Notifico a foto il cambio di path
|
||||
EgtChangePhotoPath(nPhotoId, sNewPhoto)
|
||||
' Altrimenti cancello eventuali file di foto associabili al progetto
|
||||
' Altrimenti cancello eventuali file di foto associabili al progetto
|
||||
Else
|
||||
Dim sPhoto1 As String = Path.ChangeExtension(sPath, "jpg")
|
||||
Dim sPhoto2 As String = Path.ChangeExtension(sPath, "png")
|
||||
|
||||
@@ -14,50 +14,32 @@
|
||||
<ColumnDefinition Width="1.3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<UniformGrid Name="LowerButtonGrid" Rows="1" >
|
||||
|
||||
<Button Name="NewBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource NuovoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LoadBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource CaricaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SaveBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SalvaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SaveNameBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource Salva-con-nomeImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CSVBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource CSVImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<ToggleButton Name="VeinMatchingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Vein-matchImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="RegisterBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"></ToggleButton>
|
||||
|
||||
<Button Name="NewBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="LoadBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveNameBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
|
||||
<Button Name="CSVBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<ToggleButton Name="VeinMatchingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="RegisterBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<Button Name="ResetCutBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<!--Abilito la selezione delle linee da disegno-->
|
||||
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_BlueToggleButton}"/>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="SimulateBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="WorkBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SimulateBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButtonPrjMgr}"/>
|
||||
<Button Name="WorkBtn" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueTextButtonPrjMgr}"/>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -14,22 +14,21 @@ Public Class ProjectMgrUC
|
||||
|
||||
Private Sub ProjectMgrUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
NewBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 3)
|
||||
LoadBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 4)
|
||||
SaveBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 5)
|
||||
SaveNameBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 6)
|
||||
CSVBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 8)
|
||||
VeinMatchingBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 9)
|
||||
|
||||
NewBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 3)
|
||||
LoadBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 4)
|
||||
SaveBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 5)
|
||||
SaveNameBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 6)
|
||||
CSVBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 8)
|
||||
VeinMatchingBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 9)
|
||||
RegisterBtn.Content = "REG" 'Shape Registration
|
||||
ResetCutBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
SimulateBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula
|
||||
SimulateBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 10) 'Export - Esporta
|
||||
WorkBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 10) 'Export - Esporta
|
||||
Else
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora
|
||||
WorkBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora
|
||||
End If
|
||||
TestBtn.ToolTip = EgtMsg(90255) 'Test
|
||||
TestBtn.Content = EgtMsg(90255) 'Test
|
||||
End Sub
|
||||
|
||||
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -127,28 +126,6 @@ Public Class ProjectMgrUC
|
||||
Return nTabInd
|
||||
End Function
|
||||
|
||||
Friend Function ChangeTable() As Integer
|
||||
Dim nTabInd As Integer = 0
|
||||
' se non abilitato esco dalla pagina
|
||||
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
Return nTabInd
|
||||
End If
|
||||
Select Case GetTableCount()
|
||||
Case 2
|
||||
' Tavolo da usare ?
|
||||
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", String.Format(EgtMsg(90968)), EgtMsgBox.Buttons.OK_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Select Case TableToUse.m_nPressedBtn
|
||||
Case 1 ' 1
|
||||
nTabInd = 1
|
||||
Case 0 ' 2
|
||||
nTabInd = 2
|
||||
End Select
|
||||
Case Else
|
||||
' negli altri casi (3 tavole o una tavola non fare nulla)
|
||||
End Select
|
||||
Return nTabInd
|
||||
End Function
|
||||
|
||||
Private Sub LoadBtn_Click(sender As Object, e As RoutedEventArgs) Handles LoadBtn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
@@ -176,7 +153,6 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
Friend Sub PostLoad(ByVal sCurrDir As String, sCurrFile As String)
|
||||
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
If Not m_CurrProjPage.LoadProject(sCurrDir & "\" & sCurrFile) Then
|
||||
m_CurrProjPage.NewProject()
|
||||
@@ -321,7 +297,6 @@ Public Class ProjectMgrUC
|
||||
ptMid.x = (ptEnd.x + ptStart.x) / 2
|
||||
ptMid.y = (ptEnd.y + ptStart.y) / 2
|
||||
ptMid.z = (ptEnd.z + ptStart.z) / 2 + dDiam / 2
|
||||
ptMid -= vtDirT * dThick
|
||||
|
||||
'--------------------------- Imposto la posizione della macchina ----------------------------
|
||||
' Recupero la posizione macchina
|
||||
@@ -334,23 +309,22 @@ Public Class ProjectMgrUC
|
||||
Dim nStat As Integer
|
||||
Dim dC1, dB1, dC2, dB2 As Double
|
||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||
' calcolo la posizione degli assi lineari X, Y, Z
|
||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||
Dim dX, dY, dZ As Double
|
||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||
|
||||
' verifica assi lineari
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||
If nStat <> 0 Then
|
||||
vtDirT = - vtDirT
|
||||
ptMid -= vtDirT * dThick
|
||||
vtDirT.Rotate(Vector3d.Z_AX, 180)
|
||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||
End If
|
||||
|
||||
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
||||
Dim ptMachine As Point3d = New Point3d(dX, dY, dZ)
|
||||
ExecuteCommandCNC(ptMachine, dC1, dB1)
|
||||
|
||||
ExecuteCommandCNC(ptMid, dC1, dB1)
|
||||
Return
|
||||
End If
|
||||
' ---------------------------- Fine modalità test --------------------------------------------
|
||||
@@ -462,7 +436,7 @@ Public Class ProjectMgrUC
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Se macchina normale
|
||||
If Not m_CurrMachine.bProdLine Or Not m_CurrMachine.bDemo Then
|
||||
If Not m_CurrMachine.bProdLine Then
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_CurrNcComm.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
@@ -479,11 +453,8 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
|
||||
'-------------------Avvio il Ciclo-Start-------------------------
|
||||
If GetPrivateProfileInt(S_GENERAL, "StartProgram", 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
MyCicloStartWD.ShowDialog()
|
||||
End If
|
||||
|
||||
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
MyCicloStartWD.ShowDialog()
|
||||
'-------------------Avvio il Ciclo-Start-------------------------
|
||||
|
||||
' Altrimenti linea di produzione
|
||||
@@ -564,7 +535,6 @@ Public Class ProjectMgrUC
|
||||
|
||||
' Se non collegato alla macchina
|
||||
If Not m_MainWindow.m_bNCLink Then
|
||||
' salvo il progetto corrente incrementando il valore del progetto
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
@@ -575,7 +545,6 @@ Public Class ProjectMgrUC
|
||||
m_CurrProjPage.SaveProject()
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript(False, bAlreadySent)
|
||||
' se in versione demo (per linea di produzione) salvo il file corrente incrementando la numerazione
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -583,7 +552,7 @@ Public Class ProjectMgrUC
|
||||
m_CurrNcComm.m_CN.n_DReadELS_handle = 0
|
||||
m_CurrNcComm.m_CN.ReadEls_Add_Parameter(m_CurrMachine.sVarProg1, 1)
|
||||
Dim nVarProg1 As Integer = 99
|
||||
For I As Integer = 0 To 10
|
||||
For I = 0 To 10
|
||||
System.Threading.Thread.Sleep(50)
|
||||
If m_CurrNcComm.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarProg1 = CInt(m_CurrNcComm.m_CN.d_DReadELS_value)
|
||||
@@ -594,7 +563,7 @@ Public Class ProjectMgrUC
|
||||
m_CurrNcComm.m_CN.n_DReadELS_handle = 0
|
||||
m_CurrNcComm.m_CN.ReadEls_Add_Parameter(m_CurrMachine.sVarProg2, 1)
|
||||
Dim nVarProg2 As Integer = 99
|
||||
For I As Integer = 0 To 10
|
||||
For I = 0 To 10
|
||||
System.Threading.Thread.Sleep(50)
|
||||
If m_CurrNcComm.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarProg2 = CInt(m_CurrNcComm.m_CN.d_DReadELS_value)
|
||||
@@ -606,7 +575,7 @@ Public Class ProjectMgrUC
|
||||
If Not String.IsNullOrWhiteSpace(m_CurrMachine.sVarProgTwins) Then
|
||||
m_CurrNcComm.m_CN.n_DReadELS_handle = 0
|
||||
m_CurrNcComm.m_CN.ReadEls_Add_Parameter(m_CurrMachine.sVarProgTwins, 1)
|
||||
For I As Integer = 0 To 10
|
||||
For I = 0 To 10
|
||||
System.Threading.Thread.Sleep(50)
|
||||
If m_CurrNcComm.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarProgTwins = CInt(m_CurrNcComm.m_CN.d_DReadELS_value)
|
||||
@@ -660,6 +629,13 @@ Public Class ProjectMgrUC
|
||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||
Private Sub ExecuteCommandCNC(ptMid As Point3d, dAngC As Double, dAngB As Double)
|
||||
|
||||
'If m_CurrNcComm.m_nNCType = 3 AndAlso m_CurrNcComm.m_CN.m_IsSiemensOne Then
|
||||
' SiemensMoveAxis(ptMid, dAngC, dAngB)
|
||||
' Return
|
||||
'End If
|
||||
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
Dim CmdString As String = String.Empty
|
||||
If Not EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||
Return
|
||||
@@ -693,8 +669,26 @@ Public Class ProjectMgrUC
|
||||
|
||||
'----------- ASSEGNO POSIZIONE DI ARRIVO MACCHINA -----------
|
||||
' Assegno valore ad ogni asse da muovere (in zero macchina)
|
||||
EgtLuaSetGlobNumVar("CMD.X_AXISMOVE", ptMid.x)
|
||||
EgtLuaSetGlobNumVar("CMD.Y_AXISMOVE", ptMid.y)
|
||||
Dim dAxVal As Double = ptMid.x
|
||||
Dim bThickSaw As Boolean = True
|
||||
If bThickSaw Then
|
||||
If dAxVal > 0 Then
|
||||
dAxVal += dThick
|
||||
ElseIf dAxVal < 0 Then
|
||||
dAxVal -= dThick
|
||||
End If
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.X_AXISMOVE", dAxVal)
|
||||
dAxVal = ptMid.y
|
||||
If bThickSaw Then
|
||||
If dAxVal > 0 Then
|
||||
dAxVal += dThick
|
||||
ElseIf dAxVal < 0 Then
|
||||
dAxVal -= dThick
|
||||
End If
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.Y_AXISMOVE", dAxVal)
|
||||
dAxVal = ptMid.z
|
||||
EgtLuaSetGlobNumVar("CMD.Z_AXISMOVE", ptMid.z)
|
||||
' imposto gli angoli
|
||||
EgtLuaSetGlobNumVar("CMD.C_ANGMOVE", dAngC)
|
||||
@@ -710,6 +704,15 @@ Public Class ProjectMgrUC
|
||||
' Log del comando
|
||||
EgtOutLog("CmdString=" & CmdString)
|
||||
|
||||
'' Eseguo in MDI
|
||||
'm_CurrNcComm.m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
|
||||
'System.Threading.Thread.Sleep(150)
|
||||
'm_CurrNcComm.m_CN.sz_ManualDataInput = CmdString
|
||||
'm_CurrNcComm.m_CN.MDI_command()
|
||||
'System.Threading.Thread.Sleep(150)
|
||||
'm_CurrNcComm.m_CN.DGeneralFunctions_CycleStart()
|
||||
'm_CurrNcComm.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
' Modifico stringa per inserire i newline ( in questo caso non c'è bisogno perchè tutto sulla stessa linea)
|
||||
@@ -737,6 +740,95 @@ Public Class ProjectMgrUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SiemensMoveAxis(ptMid As Point3d, dAngC As Double, dAngB As Double)
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
Dim CmdString As String = String.Empty
|
||||
EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua")
|
||||
|
||||
'----------- DATI MOVIMENTO -----------
|
||||
' imposto avanzamneto in rapido (non deve essere impostata feed e speed)
|
||||
EgtLuaSetGlobBoolVar("CMD.G0", True)
|
||||
'' fermo la rotazione dell'utensile (per sicure
|
||||
'EgtLuaSetGlobNumVar("CMD.F", 30000)
|
||||
'EgtLuaSetGlobNumVar("CMD.S", 0)
|
||||
|
||||
'----------- POSIZINE MACCHINA -----------
|
||||
' Leggo gli assi rispetto allo 0 macchina
|
||||
m_CurrNcComm.m_CN.set_OP_OM(0)
|
||||
|
||||
System.Threading.Thread.Sleep(50)
|
||||
Dim dL1o, dL2o, dL3o As Double
|
||||
m_CurrNcComm.GetLinearAxesPositions(dL1o, dL2o, dL3o)
|
||||
Dim dR1, dR2 As Double
|
||||
m_CurrNcComm.GetRotaryAxesPositions(dR1, dR2)
|
||||
EgtLuaSetGlobNumVar("CMD.L1o", dL1o)
|
||||
EgtLuaSetGlobNumVar("CMD.L2o", dL2o)
|
||||
EgtLuaSetGlobNumVar("CMD.L3o", dL3o)
|
||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||
|
||||
' Recupero spessore lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
||||
|
||||
'----------- ASSEGNO POSIZIONE DI ARRIVO MACCHINA -----------
|
||||
' Assegno valore ad ogni asse da muovere (in zero macchina)
|
||||
Dim dAxVal As Double = ptMid.x
|
||||
Dim bThickSaw As Boolean = True
|
||||
If bThickSaw Then
|
||||
If dAxVal > 0 Then
|
||||
dAxVal += dThick
|
||||
ElseIf dAxVal < 0 Then
|
||||
dAxVal -= dThick
|
||||
End If
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.X_AXISMOVE", dAxVal)
|
||||
dAxVal = ptMid.y
|
||||
If bThickSaw Then
|
||||
If dAxVal > 0 Then
|
||||
dAxVal += dThick
|
||||
ElseIf dAxVal < 0 Then
|
||||
dAxVal -= dThick
|
||||
End If
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.Y_AXISMOVE", dAxVal)
|
||||
dAxVal = ptMid.z
|
||||
EgtLuaSetGlobNumVar("CMD.Z_AXISMOVE", ptMid.z)
|
||||
|
||||
EgtLuaSetGlobNumVar("CMD.C_ANGMOVE", dAngC)
|
||||
EgtLuaSetGlobNumVar("CMD.B_ANGMOVE", dAngB)
|
||||
|
||||
' Calcolo stringa di comando risultante
|
||||
EgtLuaCallFunction("CmdString")
|
||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
||||
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("CmdString")
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
' Log del comando
|
||||
EgtOutLog("CmdString=" & CmdString)
|
||||
|
||||
' Creo file
|
||||
Dim sFilePath As String = m_MainWindow.GetCncDir() & "\MANAXMOV.MPF"
|
||||
Try
|
||||
File.WriteAllLines(sFilePath, New List(Of String)({CmdString, "M30"}), Text.Encoding.UTF8)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Eccezione creazione programma: " & ex.Message)
|
||||
End Try
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_CurrNcComm.m_CN.Download_NC_prog(sFilePath, "MANAXMOV") = 0 Then
|
||||
EgtOutLog("Programma caricato")
|
||||
System.Threading.Thread.Sleep(150)
|
||||
Dim sActivateManAxMov As String = "/plc/OmagCUT_DB.CTRL.Start_Asup"
|
||||
' Attivo variabile per esecuzione comando manuale
|
||||
m_CurrNcComm.m_CN.DVariables_WriteVariables3(sActivateManAxMov, 1, 1, 0, 0, "")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||
|
||||
Private Sub TestBtn_Click(sender As Object, e As RoutedEventArgs) Handles TestBtn.Click
|
||||
|
||||
@@ -44,17 +44,17 @@
|
||||
<!--ultimo progetto-->
|
||||
<Button Name="LastProject" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="LastProject">
|
||||
<Image Source="{DynamicResource LastProjImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource CsvOpenImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--nuovo progetto-->
|
||||
<Button Name="NewProject" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="New Project">
|
||||
<Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource CsvNewImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--apri folder progetti-->
|
||||
<Button Name="OpenFolder" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="OpenFolder">
|
||||
<Image Source="{DynamicResource CaricaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ZoomWinImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -3,21 +3,20 @@ Imports EgtWPFLib
|
||||
Imports System.IO
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Enum MODE_LAUNCHER
|
||||
LastProject
|
||||
NewProject
|
||||
OpenFolder
|
||||
ShowWindow
|
||||
SelectedProject
|
||||
End Enum
|
||||
|
||||
Public Class StartLauncherWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
' lista dei file recenti da visualizzare
|
||||
Private m_RecentFileList As New ObservableCollection(Of FileNameLsBxItem)
|
||||
|
||||
Public Enum MODE_LAUNCHER
|
||||
LastProject
|
||||
OpenFolder
|
||||
NewProject
|
||||
ShowWindow
|
||||
SelectedProject
|
||||
End Enum
|
||||
|
||||
Private m_CurrSelection As MODE_LAUNCHER
|
||||
Public Property CurrSelection As MODE_LAUNCHER
|
||||
Get
|
||||
@@ -93,23 +92,13 @@ Public Class StartLauncherWD
|
||||
' inizializzo la finestra
|
||||
Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
FilesLsBx.ItemsSource = m_RecentFileList
|
||||
Dim ItemFile As String = String.Empty
|
||||
'carico la liste dei file recenti
|
||||
Dim sFileName As String = String.Empty
|
||||
' carico la liste dei file recenti
|
||||
For Each ItemFile In m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames
|
||||
sFileName = ItemFile.Replace("__", "_")
|
||||
If Not String.IsNullOrEmpty(sFileName) Then
|
||||
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
||||
m_RecentFileList.Add(New FileNameLsBxItem(sFileName, File.GetLastAccessTime(sFileName)))
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.Remove(ItemFile)
|
||||
End If
|
||||
m_RecentFileList.Add(New FileNameLsBxItem(ItemFile, File.GetLastAccessTime(ItemFile)))
|
||||
Next
|
||||
|
||||
' posiziono la fistra in centro alla pagina
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
|
||||
' imopposto il messaggio di avvio
|
||||
SlectLauncherTxbl.Text = "Seleziona modalità di avvio"
|
||||
FileName.Text = "Progetti recenti"
|
||||
@@ -119,7 +108,11 @@ Public Class StartLauncherWD
|
||||
' lancio l'apertura della pagina dei progetti
|
||||
Private Sub OpenFolder_Click(sender As Object, e As RoutedEventArgs) Handles OpenFolder.Click
|
||||
m_CurrSelection = MODE_LAUNCHER.OpenFolder
|
||||
EgtZoom(ZM.ALL)
|
||||
m_MainWindow.m_PrevActivePage = m_MainWindow.m_ActivePage
|
||||
' Passo alla pagina di apertura con preview
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<!--riga di margine lasciata a fine pagina-->
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TAGLIO-->
|
||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<ComboBox Name="CurrSawingCmBx" Grid.Column="1" Grid.Row="1">
|
||||
@@ -35,7 +33,6 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--LAVORAZIONE SECONDARIA-->
|
||||
<TextBlock Name="AuxiliaryMachiningTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||
<ComboBox Name="AuxiliaryMachiningCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
||||
@@ -46,7 +43,6 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--FORATURA-->
|
||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrDrillingCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
||||
@@ -57,7 +53,6 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--FRESATURA-->
|
||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrMillingCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
||||
@@ -68,18 +63,6 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--SVUOTATURA-->
|
||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrPocketingCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--WATERJET-->
|
||||
<TextBlock Name="CurrWJettingTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrWJettingCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
||||
@@ -90,7 +73,6 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--Bottoni Conferma/Cancel -->
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
@@ -12,34 +12,22 @@ Public Class ChooseMachining
|
||||
Private m_DrillingList As New List(Of String)
|
||||
Private m_MillingList As New List(Of String)
|
||||
Private m_WJettingList As New List(Of String)
|
||||
Private m_PocketingList As New List(Of String)
|
||||
' Numero righe della finestra, necessario per non ridimensionarla quando si cambia il tipo di utensile ausiliario
|
||||
Private m_RowNumber As Integer = 6
|
||||
|
||||
' attulmente questa ComboBox è spenta (ma potrebbe essere richiesta in futuro?)
|
||||
Private m_bNotShowAuxilaryCmBx As Boolean = False
|
||||
|
||||
Private m_MachIsModified As Boolean = False
|
||||
Public ReadOnly Property MachIsModified As Boolean
|
||||
Get
|
||||
Return m_MachIsModified
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
'ShowDialog()
|
||||
ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ChooseMachining_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
CurrSawingCmBx.ItemsSource = m_SawingList
|
||||
AuxiliaryMachiningCmBx.ItemsSource = m_AuxMachTypeList
|
||||
CurrDrillingCmBx.ItemsSource = m_DrillingList
|
||||
CurrMillingCmBx.ItemsSource = m_MillingList
|
||||
CurrPocketingCmBx.ItemsSource = m_PocketingList
|
||||
CurrWJettingCmBx.ItemsSource = m_WJettingList
|
||||
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 1)
|
||||
@@ -47,30 +35,24 @@ Public Class ChooseMachining
|
||||
CurrDrillingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 3)
|
||||
CurrMillingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 4)
|
||||
CurrWJettingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 10)
|
||||
CurrPocketingTxBl.Text = EgtMsg(90550)
|
||||
|
||||
' carico l'elenco delle lavorazioni della pagina (anche senza aver caricato la pagina)
|
||||
InitializeMachiningLists()
|
||||
End Sub
|
||||
|
||||
Private Sub ChooseMachining_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' InitializeMachiningLists()
|
||||
InitializeMachiningLists()
|
||||
End Sub
|
||||
|
||||
Private Sub InitializeMachiningLists()
|
||||
|
||||
' -- TAGLIO --
|
||||
' Creo lista lavorazioni di lama
|
||||
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSaw, m_SawingList)
|
||||
' aggiungo un campo vuoto
|
||||
m_SawingList.Add( "")
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
' se la macchina non è configurata con altre uscite rimuovo le ComboBox
|
||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningTxBl)
|
||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningCmBx)
|
||||
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
' Creo lista lavorazioni foretto e fresa
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
@@ -78,155 +60,88 @@ Public Class ChooseMachining
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_DrillingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
Else
|
||||
' aggiungo il campo vuoto
|
||||
m_DrillingList.Add("")
|
||||
End If
|
||||
CreateMachiningList(MCH_MY.MILLING, m_CurrentMachine.sCurrMill, m_MillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_MillingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
Else
|
||||
' aggiungo il campo vuoto
|
||||
m_MillingList.Add("")
|
||||
End If
|
||||
' -- SVUOTATURA --
|
||||
CreateMachiningList(MCH_MY.POCKETING, m_CurrentMachine.sCurrMillNoTip, m_PocketingList)
|
||||
If m_PocketingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
Else
|
||||
m_PocketingList.Add("")
|
||||
End If
|
||||
CreateMachiningList(MCH_MY.WATERJETTING, m_CurrentMachine.sCurrWaterJet, m_WJettingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_WJettingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
Else
|
||||
m_WJettingList.Add("")
|
||||
End If
|
||||
|
||||
' ---- MACCHINA CON CAMBIO UTENSILE ----
|
||||
ElseIf m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
' -- FORATURA --
|
||||
CreateMachiningList(MCH_MY.DRILLING, m_DrillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_DrillingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
Else
|
||||
' aggiungo il campo vuoto
|
||||
m_DrillingList.Add("")
|
||||
End If
|
||||
' -- FRESATURA --
|
||||
CreateMachiningList(MCH_MY.MILLING, m_MillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_MillingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
Else
|
||||
' aggiungo il campo vuoto
|
||||
m_MillingList.Add("")
|
||||
End If
|
||||
' -- SVUOTATURA --
|
||||
CreateMachiningList(MCH_MY.POCKETING, m_PocketingList)
|
||||
If m_PocketingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
Else
|
||||
' aggiungo il campo vuoto
|
||||
m_PocketingList.Add("")
|
||||
End If
|
||||
' -- WATERJET --
|
||||
CreateMachiningList(MCH_MY.WATERJETTING, m_WJettingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_WJettingList.Count = 0 Then
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
Else
|
||||
' aggiungo il campo vuoto
|
||||
m_WJettingList.Add("")
|
||||
End If
|
||||
End If
|
||||
|
||||
' preparazione dello spazio necessario ad ospitare la ComboBox per selezionare la lavorazione secondaria -- DA RIMUOVERE COMPLETAMENTE --
|
||||
If m_bNotShowAuxilaryCmBx Then
|
||||
' Preparazione interfaccia, definizione di due righe della tabella con la giusta altezza (per inserire la lavorazione secondaria)
|
||||
For Index As Integer = 0 To 1
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
AuxiliaryMachiningTxBl.SetValue(Grid.RowProperty, 2)
|
||||
AuxiliaryMachiningCmBx.SetValue(Grid.RowProperty, 3)
|
||||
ButtonsGrid.SetValue(Grid.RowProperty, 5)
|
||||
AuxiliaryMachiningTxBl.Visibility = Windows.Visibility.Visible
|
||||
AuxiliaryMachiningCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 341.2
|
||||
m_RowNumber += 2
|
||||
Else
|
||||
' se non visualizzato allora rimuovo
|
||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningTxBl)
|
||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningCmBx)
|
||||
End If
|
||||
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
For Index = 0 To 1
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
AuxiliaryMachiningTxBl.SetValue(Grid.RowProperty, 2)
|
||||
AuxiliaryMachiningCmBx.SetValue(Grid.RowProperty, 3)
|
||||
ButtonsGrid.SetValue(Grid.RowProperty, 5)
|
||||
AuxiliaryMachiningTxBl.Visibility = Windows.Visibility.Visible
|
||||
AuxiliaryMachiningCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 341.2
|
||||
m_RowNumber += 2
|
||||
End Select
|
||||
|
||||
' verifico che lista delle lavorazioni di lama non sia vuoto
|
||||
If m_SawingList.Count > 0 Then
|
||||
' provo ad assegnare la lama corrente (se l'associazione fallisce corrispoende ad impostare un campo vuoto)
|
||||
CurrSawingCmBx.SelectedItem = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Else
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
||||
End If
|
||||
' se non riesco a fare l'assegnazione della lama allora elimino il nome della lama salvata
|
||||
If String.IsNullOrEmpty(CurrSawingCmBx.SelectedItem) Then
|
||||
' verifico che il nome della lama esista
|
||||
If CurrSawingCmBx.SelectedItem <> m_MainWindow.m_CurrentMachine.sCurrSawing Then
|
||||
m_MachIsModified = True
|
||||
End If
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = String.Empty
|
||||
End If
|
||||
|
||||
' definizione della lista delle lavorazioni secondarie -- DA RIMUOVERE COMPLETAMENTE --
|
||||
If m_bNotShowAuxilaryCmBx Then
|
||||
If Not m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAW Then
|
||||
If m_CurrentMachine.bDrilling Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(1, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 6)))
|
||||
If m_CurrentMachine.bMilling Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 7)))
|
||||
If m_CurrentMachine.bPocketing Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(4, EgtMsg(91069)))
|
||||
End If
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(3, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 8)))
|
||||
End If
|
||||
End If
|
||||
ElseIf m_CurrentMachine.bMilling Then
|
||||
If Not m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAW Then
|
||||
If m_CurrentMachine.bDrilling Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(1, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 6)))
|
||||
If m_CurrentMachine.bMilling Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 7)))
|
||||
ElseIf m_CurrentMachine.bPocketing Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(4, EgtMsg(91069)))
|
||||
ElseIf m_CurrentMachine.bWaterJetting Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(5, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 11)))
|
||||
End If
|
||||
' Aggiungo "Nessuna" come ultimo elemento della lista
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(0, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 5)))
|
||||
|
||||
If m_CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
If m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(3, m_AuxMachTypeList)
|
||||
Else
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(1, m_AuxMachTypeList)
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(3, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 8)))
|
||||
End If
|
||||
ElseIf m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(2, m_AuxMachTypeList)
|
||||
ElseIf m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(4, m_AuxMachTypeList)
|
||||
Else
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(0, m_AuxMachTypeList)
|
||||
End If
|
||||
ElseIf m_CurrentMachine.bMilling Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(2, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 7)))
|
||||
ElseIf m_CurrentMachine.bWaterJetting Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(4, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 11)))
|
||||
End If
|
||||
' Aggiungo nessuna come ultimo elemento della lista
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(0, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 5)))
|
||||
|
||||
If m_CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
If m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(3, m_AuxMachTypeList)
|
||||
Else
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(1, m_AuxMachTypeList)
|
||||
End If
|
||||
ElseIf m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(2, m_AuxMachTypeList)
|
||||
ElseIf m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(4, m_AuxMachTypeList)
|
||||
Else
|
||||
AuxiliaryMachiningCmBx.SelectedItem = StringIdCmBx.FromIdToStringIdCmBx(0, m_AuxMachTypeList)
|
||||
End If
|
||||
End If
|
||||
|
||||
RefreshMachiningPage()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CreateMachiningList(MachiningType As Integer, CurrTool As String, MachiningList As List(Of String))
|
||||
@@ -256,7 +171,7 @@ Public Class ChooseMachining
|
||||
If SysNotes <> String.Empty Then
|
||||
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||
SysNotes = String.Empty
|
||||
For Each Material As Object In MachiningMaterials
|
||||
For Each Material In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
If Param(0) = m_CurrentMachine.CurrMat.nId.ToString() Then
|
||||
Dim dRawHeight = GetRawHeight()
|
||||
@@ -281,13 +196,13 @@ Public Class ChooseMachining
|
||||
Private Sub CreateMachiningList(MachiningType As Integer, MachiningList As List(Of String))
|
||||
' Recupero UUID di tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||
Dim TuuidList As New List(Of String)
|
||||
For Each ToolChangerPos As ToolChangerPos In m_CurrentMachine.ToolChanger
|
||||
For Each ToolChangerPos In m_CurrentMachine.ToolChanger
|
||||
Dim sTuuid As String = String.Empty
|
||||
EgtTdbSetCurrTool(ToolChangerPos.sTool)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.UUID, sTuuid)
|
||||
TuuidList.Add(sTuuid)
|
||||
Next
|
||||
For Each ToolChangerPos As ToolChangerPos In m_CurrentMachine.ManualToolChanger
|
||||
For Each ToolChangerPos In m_CurrentMachine.ManualToolChanger
|
||||
Dim sTuuid As String = String.Empty
|
||||
EgtTdbSetCurrTool(ToolChangerPos.sTool)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.UUID, sTuuid)
|
||||
@@ -302,7 +217,7 @@ Public Class ChooseMachining
|
||||
Dim sMachTuuid As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sMachTuuid)
|
||||
' Cerco UUID nella lista degli attrezzati
|
||||
For Each Tuuid As String In TuuidList
|
||||
For Each Tuuid In TuuidList
|
||||
If sMachTuuid = Tuuid Then
|
||||
If VerifyMatThickCompatibility() Then
|
||||
MachiningList.Add(MachiningName)
|
||||
@@ -320,15 +235,13 @@ Public Class ChooseMachining
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrPocketingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrPocketingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
Dim SelectedItem As StringIdCmBx = DirectCast(AuxiliaryMachiningCmBx.SelectedItem, StringIdCmBx)
|
||||
Select Case SelectedItem.nId
|
||||
Case 0 ' Nessuna
|
||||
If m_RowNumber > 8 Then
|
||||
For Index As Integer = m_RowNumber - 1 To 8 Step -1
|
||||
For Index = m_RowNumber - 1 To 8 Step -1
|
||||
ChooseMachiningGrid.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
m_RowNumber = 8
|
||||
@@ -341,7 +254,7 @@ Public Class ChooseMachining
|
||||
Case 1 ' Foratura
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 10 Then
|
||||
For Index As Integer = 1 To 10 - m_RowNumber
|
||||
For Index = 1 To 10 - m_RowNumber
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
@@ -356,14 +269,13 @@ Public Class ChooseMachining
|
||||
End If
|
||||
m_MainWindow.m_CurrentMachine.sCurrMilling = String.Empty
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
m_MainWindow.m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 426.5
|
||||
Case 2 ' Fresatura
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 10 Then
|
||||
For Index As Integer = 1 To 10 - m_RowNumber
|
||||
For Index = 1 To 10 - m_RowNumber
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
@@ -378,14 +290,13 @@ Public Class ChooseMachining
|
||||
End If
|
||||
m_MainWindow.m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
m_MainWindow.m_CurrentMachine.sCurrPocketing = String.Empty
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 426.5
|
||||
Case 3 ' Foratura + Fresatura (Entrambe)
|
||||
' Definizione di quattro righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 12 Then
|
||||
For Index As Integer = 1 To 12 - m_RowNumber
|
||||
For Index = 1 To 12 - m_RowNumber
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
@@ -409,33 +320,10 @@ Public Class ChooseMachining
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 511.8
|
||||
Case 4 ' Pocketing
|
||||
Case 4 ' WaterJetting
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 10 Then
|
||||
For Index As Integer = 1 To 10 - m_RowNumber
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
m_RowNumber = 10
|
||||
End If
|
||||
CurrPocketingTxBl.SetValue(Grid.RowProperty, 4)
|
||||
CurrPocketingCmBx.SetValue(Grid.RowProperty, 5)
|
||||
ButtonsGrid.SetValue(Grid.RowProperty, 7)
|
||||
If m_CurrentMachine.sCurrPocketing <> String.Empty Then
|
||||
CurrPocketingCmBx.SelectedItem = m_CurrentMachine.sCurrPocketing
|
||||
End If
|
||||
m_MainWindow.m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
m_MainWindow.m_CurrentMachine.sCurrMilling = String.Empty
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
CurrPocketingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrPocketingCmBx.Visibility = Windows.Visibility.Visible
|
||||
Me.Height = 426.5
|
||||
|
||||
Case 5 ' WaterJetting
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
If m_RowNumber < 10 Then
|
||||
For Index As Integer = 1 To 10 - m_RowNumber
|
||||
For Index = 1 To 10 - m_RowNumber
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
@@ -456,120 +344,6 @@ Public Class ChooseMachining
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshMachiningPage()
|
||||
Dim nDeltaRow As Integer = 4
|
||||
Dim nNewRow As Integer = 2
|
||||
' nascondo tutte le CmBx e TxBl
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrPocketingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrPocketingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
' -- FORATURA -- se foretto presente
|
||||
If m_CurrentMachine.bDrill And m_DrillingList.Count() > 0 Then
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
For Index As Integer = 1 To nNewRow
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
m_RowNumber = m_RowNumber + nNewRow
|
||||
' titolo della ComboBox
|
||||
CurrDrillingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||
' ComboBox (nella riga successiva al titolo)
|
||||
CurrDrillingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
'ButtonsGrid.SetValue(Grid.RowProperty, 5)
|
||||
If m_CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
CurrDrillingCmBx.SelectedItem = m_CurrentMachine.sCurrDrilling
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrDrillingCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrDrillingCmBx.SelectedItem <> m_CurrentMachine.sCurrDrilling Then m_MachIsModified = True
|
||||
End If
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' -- FRESATURA -- se fresa presente
|
||||
If m_CurrentMachine.bMill And m_MillingList.Count() > 0 Then
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
For Index As Integer = 1 To nNewRow
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
m_RowNumber = m_RowNumber + nNewRow
|
||||
CurrMillingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||
CurrMillingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
ButtonsGrid.SetValue(Grid.RowProperty, 7)
|
||||
If m_CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
CurrMillingCmBx.SelectedItem = m_CurrentMachine.sCurrMilling
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrMillingCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrMilling Then m_MachIsModified = True
|
||||
End If
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrMillingCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' -- SVUOTATURA -- se fresa senza punta presente
|
||||
If m_CurrentMachine.bCupWheel And m_PocketingList.Count > 0 Then
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
For Index As Integer = 1 To nNewRow
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
m_RowNumber = m_RowNumber + nNewRow
|
||||
CurrPocketingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||
CurrPocketingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
ButtonsGrid.SetValue(Grid.RowProperty, 7)
|
||||
If m_CurrentMachine.sCurrPocketing <> String.Empty Then
|
||||
CurrPocketingCmBx.SelectedItem = m_CurrentMachine.sCurrPocketing
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrPocketingCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrPocketing Then m_MachIsModified = True
|
||||
End If
|
||||
CurrPocketingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrPocketingCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' riga 8/9
|
||||
If m_CurrentMachine.bWaterJetting And m_WJettingList.Count > 0 Then
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
For Index As Integer = 1 To nNewRow
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
m_RowNumber = m_RowNumber + nNewRow
|
||||
CurrWJettingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||
CurrWJettingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrWJettingCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrWaterJetting Then m_MachIsModified = True
|
||||
End If
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
Me.Height = 42 * m_RowNumber
|
||||
ButtonsGrid.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow + 1)
|
||||
End Sub
|
||||
|
||||
Private Sub CurrSawingCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrSawingCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = CurrSawingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
@@ -582,10 +356,6 @@ Public Class ChooseMachining
|
||||
m_MainWindow.m_CurrentMachine.sCurrMilling = CurrMillingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrPocketingCmBx_SekectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrPocketingCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrPocketing = CurrPocketingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrWJettingCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrWJettingCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = CurrWJettingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
@@ -606,7 +376,7 @@ Class StringIdCmBx
|
||||
Private m_sName As String
|
||||
|
||||
Friend Overloads Shared Function FromIdToStringIdCmBx(nId As Integer, List As List(Of StringIdCmBx)) As StringIdCmBx
|
||||
For Each Item As StringIdCmBx In List
|
||||
For Each Item In List
|
||||
If Item.nId = nId Then
|
||||
Return Item
|
||||
End If
|
||||
@@ -615,7 +385,7 @@ Class StringIdCmBx
|
||||
End Function
|
||||
|
||||
Friend Overloads Shared Function FromIdToStringIdCmBx(nId As Integer, List As ObservableCollection(Of StringIdCmBx)) As StringIdCmBx
|
||||
For Each Item As StringIdCmBx In List
|
||||
For Each Item In List
|
||||
If Item.nId = nId Then
|
||||
Return Item
|
||||
End If
|
||||
|
||||
@@ -74,10 +74,6 @@ Public Class RawPartPageUC
|
||||
Private Const SAFE_RAW_DIST As Double = 5
|
||||
' Costante raggio cerchietto
|
||||
Private Const RAD_CIRCLE As Double = 30
|
||||
|
||||
' mostra la pagina delle lavorazioni
|
||||
Private m_SmartMachiningPage As Boolean = False
|
||||
|
||||
' Costanti modo operazione punti
|
||||
Private Enum PTMODE
|
||||
MOVE = 0
|
||||
@@ -141,8 +137,6 @@ Public Class RawPartPageUC
|
||||
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
SlabIdBtn.Visibility = If( m_bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
|
||||
m_SmartMachiningPage = GetPrivateProfileInt(S_GENERAL, "SmartMachiningPage", 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
OutlineBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 33) 'Rectangle - Rettangolo
|
||||
DamagedBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 10) 'By points - Per punti
|
||||
@@ -677,80 +671,66 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
' Apro pagina di selezione della lavorazione prima di chiudere il grezzo
|
||||
m_ChooseMachiningPage = New ChooseMachining(m_MainWindow)
|
||||
'--------------------------- SELEZIONE LAVORAZIONI ---------------------------------
|
||||
' mostro la finestra di selezione delle lavorazioni
|
||||
If m_ChooseMachiningPage.MachIsModified OrElse Not m_SmartMachiningPage Then
|
||||
m_ChooseMachiningPage.ShowDialog()
|
||||
'--------------------------- SELEZIONE LAVORAZIONI ---------------------------------
|
||||
If m_ChooseMachiningPage.DialogResult Then
|
||||
Return AdjustRawPartInCurrProject()
|
||||
Else
|
||||
Return False
|
||||
If m_ChooseMachiningPage.DialogResult Then
|
||||
' Sistemo il grezzo
|
||||
AdjustRawPartOnExit()
|
||||
' Imposto spessore del grezzo
|
||||
m_CurrProjPage.m_dRawHeight = GetRawHeight()
|
||||
m_CurrProjPage.UpdateHeightTxBx()
|
||||
' Aggiorno lavorazione in interfaccia
|
||||
m_CurrProjPage.UpdateMachiningTxBx()
|
||||
' Salvo nel file Ini le dimensioni del grezzo (sempre in mm)
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_RawOffsX, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_RawOffsY, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_RawKerf, 2), m_MainWindow.GetIniFile())
|
||||
' Se ci sono pezzi nel grezzo
|
||||
If EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId) <> GDB_ID.NULL Then
|
||||
' Cancello tutte le lavorazioni
|
||||
EraseMachinings(GDB_ID.NULL)
|
||||
' Se progetto con pezzi piani
|
||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
Dim nWarn As Integer = 0
|
||||
AddMachinings(GDB_ID.NULL, nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Aggiorno regioni per nesting
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UpdateNestRegions()
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.EnableReferenceRegion(False)
|
||||
' Visualizzo i pezzi parcheggiati (per inserire correttamente in parcheggio i pezzi del grezzo)
|
||||
ShowParkedParts()
|
||||
' Verifico ogni singolo pezzo
|
||||
Dim bReducedCut As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
If Not EgtVerifyPart(nPartId, bReducedCut) Then
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nPartId)
|
||||
VeinMatching.OnRemovePartFromRaw(nPartId)
|
||||
End If
|
||||
nPartId = nNextPartId
|
||||
End While
|
||||
' Nascondo i pezzi parcheggiati
|
||||
HideParkedParts()
|
||||
' Aggiusto eventuali solidi per lavorazioni da sotto
|
||||
nPartId = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
UpdateSolidForDrip(nPartId)
|
||||
nPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
End While
|
||||
' Se altrimenti progetto con cornici
|
||||
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
||||
' Reinserisco tutte le lavorazioni delle cornici
|
||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
Else
|
||||
Return AdjustRawPartInCurrProject()
|
||||
Return False
|
||||
End If
|
||||
' forzo l'uscita dalla pagina
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function AdjustRawPartInCurrProject() As Boolean
|
||||
' Sistemo il grezzo
|
||||
AdjustRawPartOnExit()
|
||||
' Imposto spessore del grezzo
|
||||
m_CurrProjPage.m_dRawHeight = GetRawHeight()
|
||||
m_CurrProjPage.UpdateHeightTxBx()
|
||||
' Aggiorno lavorazione in interfaccia
|
||||
m_CurrProjPage.UpdateMachiningTxBx()
|
||||
' Salvo nel file Ini le dimensioni del grezzo (sempre in mm)
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_RawOffsX, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_RawOffsY, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_RawKerf, 2), m_MainWindow.GetIniFile())
|
||||
' Se ci sono pezzi nel grezzo
|
||||
If EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId) <> GDB_ID.NULL Then
|
||||
' Cancello tutte le lavorazioni
|
||||
EraseMachinings(GDB_ID.NULL)
|
||||
' Se progetto con pezzi piani
|
||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
Dim nWarn As Integer = 0
|
||||
AddMachinings(GDB_ID.NULL, nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Aggiorno regioni per nesting
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.UpdateNestRegions()
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.EnableReferenceRegion(False)
|
||||
' Visualizzo i pezzi parcheggiati (per inserire correttamente in parcheggio i pezzi del grezzo)
|
||||
ShowParkedParts()
|
||||
' Verifico ogni singolo pezzo
|
||||
Dim bReducedCut As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
If Not EgtVerifyPart(nPartId, bReducedCut) Then
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nPartId)
|
||||
VeinMatching.OnRemovePartFromRaw(nPartId)
|
||||
End If
|
||||
nPartId = nNextPartId
|
||||
End While
|
||||
' Nascondo i pezzi parcheggiati
|
||||
HideParkedParts()
|
||||
' Aggiusto eventuali solidi per lavorazioni da sotto
|
||||
nPartId = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
UpdateSolidForDrip(nPartId)
|
||||
nPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
End While
|
||||
' Se altrimenti progetto con cornici
|
||||
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
||||
' Reinserisco tutte le lavorazioni delle cornici
|
||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub RawModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles RawModeCmBx.SelectionChanged
|
||||
@@ -1309,7 +1289,7 @@ Public Class RawPartPageUC
|
||||
Return False
|
||||
End If
|
||||
' Cancello eventuali curve risultato dell'offset oltre la prima
|
||||
For i As Integer = 1 To nCount - 1
|
||||
For i = 1 To nCount - 1
|
||||
EgtErase(nKerfId + i)
|
||||
Next
|
||||
' Cancello il vecchio kerf
|
||||
@@ -1562,7 +1542,7 @@ Public Class RawPartPageUC
|
||||
StringToLen(WidthTxBx.Text, m_RawWidth)
|
||||
StringToLen(OffsetXTxBx.Text, m_RawOffsX)
|
||||
StringToLen(OffsetYTxBx.Text, m_RawOffsY)
|
||||
' UpdateRawPart()
|
||||
UpdateRawPart()
|
||||
UpdateRawPartKerf()
|
||||
' Recupero id contorno kerf
|
||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||
@@ -1587,7 +1567,7 @@ Public Class RawPartPageUC
|
||||
m_RawOffsX = m_RawOffsX - m_RawKerf
|
||||
StringToLen(OffsetYTxBx.Text, m_RawOffsY)
|
||||
m_RawOffsY = m_RawOffsY - m_RawKerf
|
||||
' UpdateRawPart()
|
||||
UpdateRawPart()
|
||||
m_RawKerf = -m_RawKerf
|
||||
UpdateRawPartKerf()
|
||||
' Recupero id contorno kerf
|
||||
@@ -1676,7 +1656,7 @@ Public Class RawPartPageUC
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
' Definisco flag tastatura
|
||||
Dim bProbingOk As Boolean = False
|
||||
For I As integer = 0 To 120
|
||||
For I = 0 To 120
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(ProbingStateNameVar, 3)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
@@ -1713,7 +1693,7 @@ Public Class RawPartPageUC
|
||||
Dim RawThicknessNameVar As String = String.Empty
|
||||
GetPrivateProfileString(S_MACH_PROBING, K_RAWTHICKNESS, "", RawThicknessNameVar, m_MainWindow.GetMachIniFile())
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
For I As integer = 0 To 20
|
||||
For I = 0 To 20
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(RawThicknessNameVar, 3)
|
||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||
@@ -1833,7 +1813,7 @@ Public Class RawPartPageUC
|
||||
CloseRawByLaser()
|
||||
Else
|
||||
' Elimino tutti i segmenti disegnati
|
||||
For Each nEntityId As Integer In m_CurveXKerfList
|
||||
For Each nEntityId In m_CurveXKerfList
|
||||
If EgtGetType(nEntityId) = GDB_TY.CRV_LINE Then
|
||||
EgtErase(nEntityId)
|
||||
End If
|
||||
|
||||
|
Before Width: | Height: | Size: 985 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 431 B |
|
Before Width: | Height: | Size: 4.1 KiB |