Gestione speciale tagli inclinati e cambio lama
This commit is contained in:
@@ -172,6 +172,63 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RestoreDef_Machinig(Optional bOnlySideAng As Boolean = True)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
Dim bApplySawingTilted As Boolean = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop dei pezzi nel grezzo
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop dei pezzi in parcheggio
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' ripristina la lavorazone indicata di default per i tagli inclinati
|
||||
Private Sub SetResetDef_Machining(nEntId As Integer, sSawingTilted As String, bApplySawingTilted As Boolean, bOnlySideAng As Boolean)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
Dim sInfoSIdeAng As String = String.Empty
|
||||
EgtGetInfo(nEntId, INFO_SIDE_ANGLE, sInfoSIdeAng)
|
||||
' Se è un'entità associata ad una lavorazione inclinata
|
||||
If Not String.IsNullOrEmpty(sInfoSIdeAng) Then
|
||||
If bApplySawingTilted Then
|
||||
' forzo la lavorazione inclinata
|
||||
If String.IsNullOrEmpty(sSawingTilted) Then
|
||||
' ma se non esiste nessuna lavorezione specifica applico qualla standard
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING)
|
||||
Else
|
||||
' Applico quella specificata
|
||||
EgtSetInfo(nEntId, DEF_MACHINING, sSawingTilted)
|
||||
End If
|
||||
Else
|
||||
' Rimuovo la lavorazione e applico quella standard
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING)
|
||||
End If
|
||||
|
||||
ElseIf Not bOnlySideAng Then
|
||||
Dim sInfo As String = String.Empty
|
||||
EgtGetInfo(nEntId, DEF_MACHINING, sInfo)
|
||||
If Not String.IsNullOrEmpty(sInfo) Then
|
||||
' se esiste una lavorazione specificata allora la rimuovo
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING)
|
||||
End If
|
||||
End If
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Friend Function ResetAllSplitCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
@@ -954,6 +1011,7 @@ Friend Module CamAuto
|
||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sSawTiltedMch As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
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
|
||||
@@ -972,6 +1030,7 @@ Friend Module CamAuto
|
||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWTILTEDMCH", sSawTiltedMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||
|
||||
@@ -11,6 +11,12 @@ Public Class ChangeToolWD
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
' Parametri della lama impostata correntemente in macchina
|
||||
Private m_DefaultSaw_Name As String = String.Empty
|
||||
Private m_DefaultSaw_Diam As Double = 0
|
||||
Private m_DefaultSaw_Thick As Double = 0
|
||||
Private m_DefaultSaw_Exists As Boolean = False
|
||||
|
||||
' Il nome della lavorazione restituito dalla selezione
|
||||
Private m_NewSawing As String = String.Empty
|
||||
Public ReadOnly Property NewSawing As String
|
||||
@@ -27,6 +33,7 @@ Public Class ChangeToolWD
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Il nome della posizione sulla rulliera
|
||||
Private m_TCPos As String = String.Empty
|
||||
Public ReadOnly Property TCPos As String
|
||||
Get
|
||||
@@ -34,6 +41,7 @@ Public Class ChangeToolWD
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Nome della lavorazione corrente
|
||||
Private m_CurrSawing As String = String.Empty
|
||||
Public Property CurrSawing As String
|
||||
Get
|
||||
@@ -44,13 +52,25 @@ Public Class ChangeToolWD
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub GetDiamAndThickDefaultSaw()
|
||||
m_DefaultSaw_Name = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If EgtTdbSetCurrTool(m_DefaultSaw_Name) Then
|
||||
' Diametro lama lavorazione
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_DefaultSaw_Diam)
|
||||
' Spessore lama corrente
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, m_DefaultSaw_Thick)
|
||||
m_DefaultSaw_Exists = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Posizione finestra
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
' Definizione del collegamento tra ItemList e ListBox1
|
||||
SetUpToolListBox.ItemsSource = m_SetUpMachiningList
|
||||
FilePathTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 45) ' Selezionare l'utensile da tastare
|
||||
' 90378=Seleziona lavorazione
|
||||
FilePathTxBl.Text = EgtMsg(90378)
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
@@ -63,7 +83,7 @@ Public Class ChangeToolWD
|
||||
Dim Item As ItemMachining = m_SetUpMachiningList.FirstOrDefault(Function(x) x.Machining = m_CurrSawing)
|
||||
Dim Index As Integer = m_SetUpMachiningList.IndexOf(Item)
|
||||
If Index < 0 Then
|
||||
' Notifico: Utensile sTool non attrezzato
|
||||
' Imposto lavorazione di default
|
||||
EgtMdbSetCurrMachining(m_CurrSawing)
|
||||
Dim sTool As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sTool)
|
||||
@@ -99,84 +119,13 @@ Public Class ChangeToolWD
|
||||
m_SetUpMachiningList.Clear()
|
||||
CreateSawingList(local_Sawing)
|
||||
|
||||
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrWaterJet
|
||||
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto WJ
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
'End If
|
||||
|
||||
'Select Case m_MainWindow.m_CurrentMachine.MountedToolConfig
|
||||
' Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
' sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la lama
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
' End If
|
||||
' sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
' If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la fresa
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
' End If
|
||||
' sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
' If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto il foretto
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
' End If
|
||||
|
||||
' Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
|
||||
' sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la lama
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
' End If
|
||||
' ' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||
' For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
' 'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
' sNameTool = ToolChangerPos.sTool
|
||||
' If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la lama
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
' End If
|
||||
' Next
|
||||
' Return True
|
||||
|
||||
' Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
' ' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||
' sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la lama
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
' End If
|
||||
' For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
' If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
' 'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
' sNameTool = ToolChangerPos.sTool
|
||||
' If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la lama
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
' If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
' 'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
' sNameTool = ToolChangerPos.sTool
|
||||
' If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la lama
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' Return True
|
||||
' Case Else
|
||||
' Return False
|
||||
'End Select
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Creo la lista delle delle lavorazioni di lama da proporre
|
||||
Private Sub CreateSawingList(SawingFam As TreeViewItem.CathegoryItem)
|
||||
' Recupero le info della lama montata di default
|
||||
GetDiamAndThickDefaultSaw()
|
||||
' recupero la prima lavorazione
|
||||
For Each Item As TreeViewItem.CustomItem In SawingFam.Items
|
||||
Dim sNameTool As String = String.Empty
|
||||
@@ -184,7 +133,7 @@ Public Class ChangeToolWD
|
||||
EgtMdbSetCurrMachining(Item.Name)
|
||||
' Recupero il nome dell'utensile della lavorazione
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool)
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
If Not String.IsNullOrEmpty(sNameTool) And VerifyCurrSawTollerance(sNameTool) Then
|
||||
' Verifico che sia montata su un portautensile
|
||||
EgtTdbSetCurrTool(sNameTool)
|
||||
Dim sTCPos As String = String.Empty
|
||||
@@ -210,7 +159,7 @@ Public Class ChangeToolWD
|
||||
EgtMdbSetCurrMachining(m_MainWindow.m_CurrentMachine.sCurrSawing)
|
||||
End Sub
|
||||
|
||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se puù lavorare il grezzo corrente
|
||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se può lavorare il grezzo corrente
|
||||
Private Function VerifyCurrMachiningMaterial() As Boolean
|
||||
Dim m_MaterialsList As New ObservableCollection(Of MachiningMaterial)
|
||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
@@ -234,11 +183,9 @@ Public Class ChangeToolWD
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If StringToInt(SubParam(0), nParId) AndAlso nParId = m_MainWindow.m_CurrentMachine.CurrMat.nId AndAlso SubParam.Count > 1 AndAlso
|
||||
StringToInt(SubParam(1), nSubParId) AndAlso nSubParId = Material.nSubId Then
|
||||
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
@@ -250,16 +197,45 @@ Public Class ChangeToolWD
|
||||
If m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight > Material.dMinThickness And m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight < Material.dMaxThickness Then
|
||||
Return True
|
||||
End If
|
||||
Index += 1
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
End If
|
||||
Index += 1
|
||||
Next
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se ha le stesse dimensioni della lama di default
|
||||
Private Function VerifyCurrSawTollerance(sNameTool As String) As Boolean
|
||||
If m_DefaultSaw_Exists Then
|
||||
If EgtTdbSetCurrTool(sNameTool) Then
|
||||
' Diametro nuova lama
|
||||
Dim NewDiam As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, NewDiam)
|
||||
' Spessore lama
|
||||
Dim NewThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, NewThick)
|
||||
' Verifico che la nuova lama possa essere applicata: diametro minore, uguale spessore
|
||||
Dim Delta_Diam As Double = NewDiam - m_DefaultSaw_Diam
|
||||
Dim Delta_Thick As Double = Math.Abs(NewThick - m_DefaultSaw_Thick)
|
||||
If Delta_Diam < EPS_SMALL And Delta_Thick < EPS_SMALL Then
|
||||
Return True
|
||||
Else
|
||||
EgtOutLog(String.Format("New saw {0} can not repalce the current {1}; Delta_Diam={2}, |Delta_Thick|={3} ", sNameTool, m_DefaultSaw_Name, Delta_Diam, Delta_Thick))
|
||||
End If
|
||||
Else
|
||||
EgtOutLog("Impossible to find in tooldb SAW: " & sNameTool)
|
||||
End If
|
||||
Else
|
||||
If String.IsNullOrEmpty(m_DefaultSaw_Name) Then
|
||||
EgtOutLog("There is no currsaw setted in machine!")
|
||||
Else
|
||||
EgtOutLog("Impossible to find in tooldb currsaw setted in machine: " & m_DefaultSaw_Name)
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Restituisce tutto l'elenco delle lavorazioni disponibili in macchina
|
||||
Private Function GetAllSwaing() As TreeViewItem.CathegoryItem
|
||||
Dim sFName As String = EgtMsg(MSG_MACHININGSDBPAGEUC + 31)
|
||||
|
||||
@@ -655,18 +655,18 @@ Public Class SplitPageUC
|
||||
EgtSetCurrMachining(nMchId)
|
||||
If Not EgtGetMachiningGeometry(0, EntId, SubEntId) Then Return
|
||||
' Recupero il nome della lavorazione
|
||||
EgtGetInfo(EntId, "Def_Machining", sSawing)
|
||||
EgtGetInfo(EntId, DEF_MACHINING, sSawing)
|
||||
|
||||
' Apro pagina di selezione della lavorazione prima di chiudere il grezzo
|
||||
' Apro pagina di selezione della lavorazione
|
||||
Dim m_ChangeToolPage = New ChangeToolWD(m_MainWindow)
|
||||
' Imposto nome lavorazione corrente
|
||||
m_ChangeToolPage.CurrSawing = sSawing
|
||||
|
||||
' apro la finestra per la selezione delle lavorazioni
|
||||
m_ChangeToolPage.ShowDialog()
|
||||
|
||||
' se seleziono "Ok" allora resetto tutte le lavorazioni del progetto
|
||||
If m_ChangeToolPage.DialogResult Then
|
||||
EgtSetInfo(EntId, "Def_Machining", m_ChangeToolPage.NewSawing)
|
||||
EgtSetInfo(EntId, DEF_MACHINING, m_ChangeToolPage.NewSawing)
|
||||
Dim Index As Integer = 0
|
||||
For Index = 0 To m_MachiningList.Count() - 1
|
||||
If m_MachiningList(Index).m_nId = nMchId Then
|
||||
@@ -702,7 +702,7 @@ Public Class SplitPageUC
|
||||
EgtSetCurrMachining(nMchId)
|
||||
If Not EgtGetMachiningGeometry(0, EntId, SubEntId) Then Return
|
||||
' Eventualmente recupero il nome della lavorazione
|
||||
EgtGetInfo(EntId, "Def_Machining", sSawing)
|
||||
EgtGetInfo(EntId, DEF_MACHINING, sSawing)
|
||||
If String.IsNullOrEmpty(sSawing) Then sSawing = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
' Imposto la lavorazione corrente
|
||||
EgtMdbSetCurrMachining(sSawing)
|
||||
|
||||
@@ -324,6 +324,8 @@ Module ConstGen
|
||||
Public Const INFO_START As String = "Start"
|
||||
' Nome dei tagli diretti inseriti in fase di Splitting
|
||||
Public Const SPLIT_CUT As String = "SplitCut"
|
||||
' Forzo specifica lavorazione
|
||||
Public Const DEF_MACHINING As String = "Def_Machining"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
|
||||
@@ -313,6 +313,7 @@
|
||||
|
||||
Public Const S_MACH_MACH As String = "Mach"
|
||||
Public Const K_CURRSAW As String = "CurrSaw"
|
||||
Public Const K_CURRSAWTILTED As String = "CurrSawTilted"
|
||||
Public Const K_CURRDRILL As String = "CurrDrill"
|
||||
Public Const K_CURRMILL As String = "CurrMill"
|
||||
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
|
||||
@@ -320,6 +321,8 @@
|
||||
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
|
||||
Public Const K_CURRWATERJET As String = "CurrWaterJet"
|
||||
Public Const K_CURRSAWING As String = "CurrSawing"
|
||||
Public Const K_CURRSAWINGTILTED As String = "CurrSawingTilted"
|
||||
Public Const K_APPLYSAWINGTILTED As String = "ApplySawingTilted"
|
||||
Public Const K_CURRDRILLING As String = "CurrDrilling"
|
||||
Public Const K_CURRMILLING As String = "CurrMilling"
|
||||
Public Const K_CURRPOCKETING As String = "CurrPocketing"
|
||||
|
||||
@@ -226,6 +226,10 @@ Module SideAngle
|
||||
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
If Not String.IsNullOrEmpty(sSawingTilted) Then
|
||||
EgtSetInfo(EntId, DEF_MACHINING, sSawingTilted)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1303,10 +1303,15 @@ Public Class SideAngleUC
|
||||
If dSideAngle <> 0 Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE, dSideAngle)
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE, dSideAngle)
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
If Not String.IsNullOrEmpty(sSawingTilted) Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, DEF_MACHINING, sSawingTilted)
|
||||
End If
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
Else
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE)
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE)
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, DEF_MACHINING)
|
||||
End If
|
||||
' Aggiorno lista entità con nuova inclinazione
|
||||
CurrEntity.dSideAngle = dSideAngle
|
||||
|
||||
+537
-517
File diff suppressed because it is too large
Load Diff
@@ -57,6 +57,7 @@ Public Class AlarmsPageUC
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
CurrSawTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 1)
|
||||
CurrSawTiltedTxBl.Text = EgtMsg(91049) ' Current saw tilted
|
||||
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
|
||||
CurrDrillTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 3)
|
||||
CurrCupWheelTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 20)
|
||||
@@ -120,6 +121,7 @@ Public Class AlarmsPageUC
|
||||
CfrPercTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 48) ' Riduzione %
|
||||
MachiningsGpBx.Header = EgtMsg(MSG_ALARMS2PAGEUC + 1) ' Lavorazioni
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 2) ' Taglio lama
|
||||
CurrSawingTiltedTxBl.Text = EgtMsg(91050) ' Taglio inclinato
|
||||
CurrDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 3) ' Foratura
|
||||
CurrMillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 4) ' Fresatura
|
||||
CurrPocketingTxBl.Text = EgtMsg(91069) ' Svuotatura
|
||||
@@ -330,6 +332,18 @@ Public Class AlarmsPageUC
|
||||
m_CurrentMachine.sCurrSawing = ""
|
||||
End If
|
||||
|
||||
CurrSawTiltedCmBx.ItemsSource = m_SawList
|
||||
If m_SawList.IndexOf(m_CurrentMachine.sCurrSawTilted) > -1 Then
|
||||
' Seleziono lama corrente
|
||||
CurrSawTiltedCmBx.SelectedItem = m_CurrentMachine.sCurrSawTilted
|
||||
Else
|
||||
m_CurrentMachine.sCurrSawingTilted = ""
|
||||
End If
|
||||
|
||||
' attivo la selezione della lama per il taglio in inlinato
|
||||
CurrSawTiltedTxBl.Visibility = Visibility.Visible
|
||||
CurrSawTiltedCmBx.Visibility = Visibility.Visible
|
||||
|
||||
' attivo il bottone per l'apertura della pagina che mostra la configurazione degli utensili in parcheggio
|
||||
SetUpBtn.Visibility = Windows.Visibility.Visible
|
||||
|
||||
@@ -482,6 +496,21 @@ Public Class AlarmsPageUC
|
||||
CurrSawingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrSawingTilted <> String.Empty Then
|
||||
If Not m_CurrentMachine.bApplySawingTilted Then
|
||||
CurrSawingTiltedTxBx.Foreground = Brushes.Gray
|
||||
CurrSawingTiltedTxBx.TextDecorations = TextDecorations.Strikethrough
|
||||
Else
|
||||
CurrSawingTiltedTxBx.Foreground = Brushes.White
|
||||
CurrSawingTiltedTxBx.TextDecorations = Nothing
|
||||
End If
|
||||
CurrSawingTiltedTxBx.Text = m_CurrentMachine.sCurrSawingTilted
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrSawingTiltedTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTiltedTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
CurrDrillingTxBx.Text = m_CurrentMachine.sCurrDrilling
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
@@ -682,6 +711,42 @@ Public Class AlarmsPageUC
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- SAW TILTED --
|
||||
Private Sub CurrSawTiltedCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrSawTiltedCmBx.SelectionChanged
|
||||
If IsNothing(CurrSawTiltedCmBx.SelectedItem) Then Return
|
||||
' Assegno
|
||||
m_CurrentMachine.sCurrSawTilted = CurrSawTiltedCmBx.SelectedItem.ToString()
|
||||
' Se nuova lama incompatibile con lavorazione di taglio corrente, resetto quest'ultima
|
||||
Dim sMchTuuid As String = String.Empty
|
||||
Dim sMchTool As String = String.Empty
|
||||
If Not EgtMdbSetCurrMachining(m_CurrentMachine.sCurrSawingTilted) Or
|
||||
Not EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sMchTuuid) Or
|
||||
Not EgtTdbGetToolFromUUID(sMchTuuid, sMchTool) Or
|
||||
String.Compare(sMchTool, m_CurrentMachine.sCurrSawTilted, True) <> 0 Then
|
||||
m_CurrentMachine.sCurrSawingTilted = String.Empty
|
||||
End If
|
||||
|
||||
' Dim sVal As String = String.Empty
|
||||
' Dim dVal As Double = 0
|
||||
' If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' m_CurrentMachine.SetFsevLength(dVal)
|
||||
' End If
|
||||
' If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' m_CurrentMachine.SetFsevPerc(dVal)
|
||||
' End If
|
||||
'
|
||||
' ' Leggo parametri per variazione feed in tagli aggiornati in funzione della lama
|
||||
' CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
' CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- DRILL --
|
||||
Private Sub CurrDrillCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrDrillCmBx.SelectionChanged
|
||||
If IsNothing(CurrDrillCmBx.SelectedItem) Then Return
|
||||
|
||||
+53
-12
@@ -107,6 +107,7 @@ Public Class CurrentMachine
|
||||
|
||||
' Variabili che contengono il nome degli utensili disponibili per tipo
|
||||
Private m_sCurrSaw As String = String.Empty
|
||||
Private m_sCurrSawTilted As String = String.Empty
|
||||
Private m_sCurrDrill As String = String.Empty
|
||||
Private m_sCurrMill As String = String.Empty
|
||||
Private m_sCurrMillNoTip As String = String.Empty
|
||||
@@ -116,6 +117,8 @@ Public Class CurrentMachine
|
||||
|
||||
' Variabili che contengono le lavorazioni correntemente attive (utilizzate per definire lavorazioni nel programma)
|
||||
Private m_sCurrSawing As String = String.Empty
|
||||
Private m_sCurrSawingTilted As String = String.Empty
|
||||
Private m_bApplySawingTilted As Boolean = False
|
||||
Private m_sCurrDrilling As String = String.Empty
|
||||
Private m_sCurrMilling As String = String.Empty
|
||||
Private m_sCurrPocketing As String = String.Empty
|
||||
@@ -574,6 +577,18 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrSawTilted As String
|
||||
Get
|
||||
Return m_sCurrSawTilted
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWTILTED, value, sMachIniFile) Then
|
||||
m_sCurrSawTilted = value
|
||||
' m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrDrill As String
|
||||
Get
|
||||
Return m_sCurrDrill
|
||||
@@ -648,18 +663,32 @@ Public Class CurrentMachine
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
|
||||
m_sCurrSawing = value
|
||||
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||
'' aggiorno il file ini della macchina con i valori correnti della lavorazione
|
||||
'Dim sVal As String = String.Empty
|
||||
'Dim dVal As Double = m_dFsevLength
|
||||
'If GetUserNote("FsevLength", sVal, m_sCurrSawing, False) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' SetFsevLength(dVal)
|
||||
'End If
|
||||
'dVal = m_dFsevPerc
|
||||
'If GetUserNote("FsevPerc", sVal, m_sCurrSawing, False) Then
|
||||
' StringToDouble(sVal, m_dFsevPerc)
|
||||
' SetFsevPerc(dVal)
|
||||
'End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrSawingTilted As String
|
||||
Get
|
||||
Return m_sCurrSawingTilted
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWINGTILTED, value, sMachIniFile) Then
|
||||
m_sCurrSawingTilted = value
|
||||
'm_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property bApplySawingTilted As Boolean
|
||||
Get
|
||||
Return m_bApplySawingTilted
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bApplySawingTilted = value
|
||||
If m_bApplySawingTilted Then
|
||||
WritePrivateProfileString(S_MACH_MACH, K_APPLYSAWINGTILTED, "1", sMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_MACH, K_APPLYSAWINGTILTED, "0", sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -1274,6 +1303,14 @@ Public Class CurrentMachine
|
||||
' Leggo utensili correnti
|
||||
' lama
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAW, Nothing, m_sCurrSaw, sMachIniFile)
|
||||
' lama inclinata
|
||||
If m_nShowToolChanger = 4 Then
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWTILTED, Nothing, m_sCurrSawTilted, sMachIniFile)
|
||||
Else
|
||||
' se non è configurato il cambio utensile e allora imposto l'unica lama disponibile per i tagli inclinati
|
||||
m_sCurrSawTilted = m_sCurrSaw
|
||||
End If
|
||||
|
||||
' foretto
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILL, Nothing, m_sCurrDrill, sMachIniFile)
|
||||
' fresa
|
||||
@@ -1290,6 +1327,10 @@ Public Class CurrentMachine
|
||||
' Leggo lavorazioni correnti
|
||||
' lama
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING, Nothing, m_sCurrSawing, sMachIniFile)
|
||||
' lama inlicnata
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWINGTILTED, Nothing, m_sCurrSawingTilted, sMachIniFile)
|
||||
' applica lavorazione di lama inclinata
|
||||
m_bApplySawingTilted = (GetPrivateProfileInt(S_MACH_MACH, K_APPLYSAWINGTILTED, 0, sMachIniFile) <> 0)
|
||||
' foretto
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILLING, Nothing, m_sCurrDrilling, sMachIniFile)
|
||||
' fresa
|
||||
|
||||
@@ -43,9 +43,30 @@
|
||||
|
||||
<ToggleButton Name="RegisterBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"></ToggleButton>
|
||||
<Button Name="ResetCutBtn"
|
||||
|
||||
<Button Name="ResetCutBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
<!--Abilito la selezione delle linee da disegno-->
|
||||
|
||||
<Popup Name="ResetCutPopUp"
|
||||
IsOpen="False"
|
||||
AllowsTransparency="False"
|
||||
PopupAnimation="Scroll"
|
||||
StaysOpen="False"
|
||||
Placement="Top"
|
||||
PlacementTarget="{Binding ElementName=ResetCutBtn}">
|
||||
<WrapPanel Orientation="Vertical"
|
||||
Background="{DynamicResource OmagCut_Gray}">
|
||||
<Button x:Name="ResetCut1Btn"
|
||||
Width ="78" Height="78"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
<Button x:Name="ResetCut2Btn"
|
||||
Width ="78" Height="78"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
</WrapPanel>
|
||||
</Popup>
|
||||
|
||||
|
||||
<!--Abilito la selezione delle linee da disegno-->
|
||||
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
@@ -26,6 +26,8 @@ Public Class ProjectMgrUC
|
||||
|
||||
RegisterBtn.Content = "REG" 'Shape Registration
|
||||
ResetCutBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
ResetCut2Btn.Content = EgtMsg(91024) 'Reset lavorazioni
|
||||
ResetCut1Btn.Content = EgtMsg(91025) 'Aggiorna feed/speed
|
||||
SimulateBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 10) 'Export - Esporta
|
||||
@@ -33,7 +35,7 @@ Public Class ProjectMgrUC
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora
|
||||
End If
|
||||
TestBtn.ToolTip = EgtMsg(90255) 'Test
|
||||
ResetCutBtn.ToolTip = "Reset Cuts" & vbCrLf & "Reset Feed (Shift)"
|
||||
ResetCutBtn.ToolTip = "Reset Cuts" & vbCrLf & "Other Reset (Shift)"
|
||||
End Sub
|
||||
|
||||
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -287,11 +289,58 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
Private Sub ResetCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCutBtn.Click
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) Then
|
||||
' eseguo il ricalcolo delle sole FEED di lavorazione
|
||||
UpdateFeedAllMachining()
|
||||
Return
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||
If ResetCutPopUp.IsOpen Then
|
||||
ResetCutPopUp.IsOpen = False
|
||||
Else
|
||||
ResetCutPopUp.IsOpen = True
|
||||
End If
|
||||
Else
|
||||
ResetCut3Btn_Click()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Reimposto le feed di tutte le lavorazioni
|
||||
Private Sub ResetCut1Btn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCut1Btn.Click
|
||||
' eseguo il ricalcolo delle sole FEED di lavorazione
|
||||
UpdateFeedAllMachining()
|
||||
End Sub
|
||||
|
||||
' Reimposto le lavorazioni di default e ripristino i parametri
|
||||
Private Sub ResetCut2Btn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCut2Btn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
m_CurrProjPage.ClearMessage()
|
||||
' cancello tutti i tagli di separazione (Waterjet)
|
||||
ResetAllSplitCurv()
|
||||
' cancello tutti i punti di inizio (Waterjet)
|
||||
ResetAllStartCurv()
|
||||
' cancello tutti i ponticelli disegnati
|
||||
ResetAllBRidges()
|
||||
' cancella tutti i tagli di separazione inseriti in OFFICE
|
||||
ResetAllSplitCut()
|
||||
|
||||
' assegno la lavorazione corrente per i tagli di lama inclinati (solo se specificato nella ComboBox della ChooseMachinig)
|
||||
RestoreDef_Machinig(True)
|
||||
' assegno la lavorazione corrente per i tagli verticali
|
||||
RestoreDef_Machinig(False)
|
||||
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Se eistono elimino i grezzi delle fasi che non contengono lavorazioni
|
||||
ResetAllRawPart()
|
||||
' Aggiorno Info C Home
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHome, 0))
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' Resetta i valori dei parametri (ma non le lavorazioni)
|
||||
Private Sub ResetCut3Btn_Click()
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
m_CurrProjPage.ClearMessage()
|
||||
@@ -305,7 +354,6 @@ Public Class ProjectMgrUC
|
||||
ResetAllSplitCut()
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
EgtOutLog(" -- RESET MACHININIG --")
|
||||
ResetAllMachinings(nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Se eistono elimino i grezzi delle fasi che non contengono lavorazioni
|
||||
|
||||
@@ -35,7 +35,42 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--LAVORAZIONE SECONDARIA-->
|
||||
<!--TAGLIO TILTED-->
|
||||
<Grid Grid.Column="1" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="9*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Name ="ApplySawingTiltedChBx" Grid.Column="0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
Margin="1.5,0,0,0"/>
|
||||
<TextBlock Name="CurrSawingTiltedTxBl" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="CurrSawingTiltedCmBx" Grid.Column="1" Grid.Row="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=ApplySawingTiltedChBx, Path=IsChecked}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=ApplySawingTiltedChBx, Path=IsChecked}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</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">
|
||||
|
||||
@@ -8,6 +8,7 @@ Public Class ChooseMachining
|
||||
Private m_CurrentMachine As CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
' Liste che contengono gli elementi appartenenti alle ComboBox
|
||||
Private m_SawingList As New List(Of String)
|
||||
Private m_SawingTiltedList As New List(Of String)
|
||||
Private m_AuxMachTypeList As New List(Of StringIdCmBx)
|
||||
Private m_DrillingList As New List(Of String)
|
||||
Private m_MillingList As New List(Of String)
|
||||
@@ -36,6 +37,7 @@ Public Class ChooseMachining
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
CurrSawingCmBx.ItemsSource = m_SawingList
|
||||
CurrSawingTiltedCmBx.ItemsSource = m_SawingTiltedList
|
||||
AuxiliaryMachiningCmBx.ItemsSource = m_AuxMachTypeList
|
||||
CurrDrillingCmBx.ItemsSource = m_DrillingList
|
||||
CurrMillingCmBx.ItemsSource = m_MillingList
|
||||
@@ -44,6 +46,7 @@ Public Class ChooseMachining
|
||||
CurrWJettingQualityCmBx.ItemsSource = m_CurrentMachine.Qualities
|
||||
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 1)
|
||||
CurrSawingTiltedTxBl.Text = EgtMsg(91023) ' Lavorazione inclinata
|
||||
AuxiliaryMachiningTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 2)
|
||||
CurrDrillingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 3)
|
||||
CurrMillingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 4)
|
||||
@@ -69,7 +72,13 @@ Public Class ChooseMachining
|
||||
' -- TAGLIO --
|
||||
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSaw, m_SawingList)
|
||||
' aggiungo un campo vuoto
|
||||
m_SawingList.Add( "")
|
||||
m_SawingList.Add("")
|
||||
' -- TAGLIO TILTED --
|
||||
CurrSawingTiltedCmBx.IsEnabled = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||
ApplySawingTiltedChBx.IsChecked = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSawTilted, m_SawingTiltedList)
|
||||
' aggiungo un campo vuoto
|
||||
m_SawingTiltedList.Add("")
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
@@ -494,6 +503,8 @@ Public Class ChooseMachining
|
||||
Dim nDeltaRow As Integer = 4
|
||||
Dim nNewRow As Integer = 2
|
||||
' nascondo tutte le CmBx e TxBl
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTiltedCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -503,6 +514,33 @@ Public Class ChooseMachining
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
' -- LAMA TILTED -- se definito il cambio utensile con lama
|
||||
'If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
If Not String.IsNullOrEmpty(m_CurrentMachine.sCurrSawTilted) 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
|
||||
CurrSawingTiltedTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||
' ComboBox (nella riga successiva al titolo)
|
||||
CurrSawingTiltedCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
'ButtonsGrid.SetValue(Grid.RowProperty, 5)
|
||||
If m_CurrentMachine.sCurrSawingTilted <> String.Empty Then
|
||||
CurrSawingTiltedCmBx.SelectedItem = m_CurrentMachine.sCurrSawingTilted
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrSawingTiltedCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrSawingTiltedCmBx.SelectedItem <> m_CurrentMachine.sCurrSawingTilted Then m_MachIsModified = True
|
||||
End If
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrSawingTiltedCmBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' -- FORATURA -- se foretto presente
|
||||
If m_CurrentMachine.bDrill And m_DrillingList.Count() > 0 Then
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
@@ -625,6 +663,20 @@ Public Class ChooseMachining
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = CurrSawingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub ApplySawingTiltedChBx_Checked() Handles ApplySawingTiltedChBx.Click
|
||||
If ApplySawingTiltedChBx.IsChecked Then
|
||||
CurrSawingTiltedCmBx.IsEnabled = True
|
||||
m_MainWindow.m_CurrentMachine.bApplySawingTilted = True
|
||||
Else
|
||||
CurrSawingTiltedCmBx.IsEnabled = False
|
||||
m_MainWindow.m_CurrentMachine.bApplySawingTilted = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CurrSawingTiltedCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrSawingTiltedCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawingTilted = CurrSawingTiltedCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrDrillingCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrDrillingCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrDrilling = CurrDrillingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user