OmagCUT 1.9j2 :
- sistemazione dati TRF da compo e aggiunta codice pezzo - in DB utensili con nuova lama creazione/aggiornamento note speciali Hofmann.
This commit is contained in:
+14
-8
@@ -17,6 +17,7 @@
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
@@ -25,7 +26,7 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="OrdCodeTxBl" Grid.Column="1" Grid.Row="1"
|
||||
@@ -38,22 +39,27 @@
|
||||
<EgtWPFLib:EgtTextBox Name="OrdDescTxBx" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="MatCodeTxBl" Grid.Column="1" Grid.Row="3"
|
||||
<TextBlock Name="PartCodeTxBl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MatCodeTxBx" Grid.Column="2" Grid.Row="3"
|
||||
<EgtWPFLib:EgtTextBox Name="PartCodeTxBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="SurfCodeTxBl" Grid.Column="1" Grid.Row="4"
|
||||
<TextBlock Name="MatCodeTxBl" Grid.Column="1" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SurfCodeTxBx" Grid.Column="2" Grid.Row="4"
|
||||
<EgtWPFLib:EgtTextBox Name="MatCodeTxBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="ThicknessTxBl" Grid.Column="1" Grid.Row="5"
|
||||
<TextBlock Name="SurfCodeTxBl" Grid.Column="1" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ThicknessTxBx" Grid.Column="2" Grid.Row="5"
|
||||
<EgtWPFLib:EgtTextBox Name="SurfCodeTxBx" Grid.Column="2" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="ThicknessTxBl" Grid.Column="1" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ThicknessTxBx" Grid.Column="2" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="4">
|
||||
<Grid Name="ButtonsGrid" Grid.Column="0" Grid.Row="8" Grid.ColumnSpan="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -16,6 +16,7 @@ Public Class CompoTrfData
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
OrdCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 10) 'Order Code
|
||||
OrdDescTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 11) 'Order Description
|
||||
PartCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 16) 'Part Code
|
||||
MatCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 12) 'Material Code
|
||||
SurfCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 13) 'Surface Code
|
||||
ThicknessTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 14) 'Thickness
|
||||
@@ -31,17 +32,19 @@ Public Class CompoTrfData
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
||||
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
||||
OrdCodeTxBx.Text = sOrdCode
|
||||
OrdDescTxBx.Text = sOrdDesc
|
||||
PartCodeTxBx.Text = sPartCode
|
||||
MatCodeTxBx.Text = sMatCode
|
||||
SurfCodeTxBx.Text = sSurfCode
|
||||
ThicknessTxBx.Text = LenToString(dTh, 2)
|
||||
End Sub
|
||||
|
||||
Friend Sub GetData(ByRef sOrdCode As String, ByRef sOrdDesc As String, ByRef sMatCode As String, ByRef sSurfCode As String, ByRef dTh As Double)
|
||||
Friend Sub GetData(ByRef sOrdCode As String, ByRef sOrdDesc As String, ByRef sPartCode As String, ByRef sMatCode As String, ByRef sSurfCode As String, ByRef dTh As Double)
|
||||
sOrdCode = OrdCodeTxBx.Text
|
||||
sOrdDesc = OrdDescTxBx.Text
|
||||
sPartCode = PartCodeTxBx.Text
|
||||
sMatCode = MatCodeTxBx.Text
|
||||
sSurfCode = SurfCodeTxBx.Text
|
||||
StringToLen(ThicknessTxBx.Text, dTh)
|
||||
|
||||
+6
-3
@@ -43,6 +43,7 @@ Public Class DrawPageUC
|
||||
Private m_bTrfData As Boolean = False
|
||||
Private m_TrfOrderCode As String = ""
|
||||
Private m_TrfOrderDesc As String = ""
|
||||
Private m_TrfPartCode As String = ""
|
||||
Private m_TrfMatCode As String = ""
|
||||
Private m_TrfSurfCode As String = ""
|
||||
Private m_TrfThickness As Double = 0
|
||||
@@ -220,6 +221,7 @@ Public Class DrawPageUC
|
||||
' Reset dati TRF
|
||||
m_TrfOrderCode = ""
|
||||
m_TrfOrderDesc = ""
|
||||
m_TrfPartCode = ""
|
||||
m_TrfMatCode = ""
|
||||
m_TrfSurfCode = ""
|
||||
m_TrfThickness = 0
|
||||
@@ -661,6 +663,7 @@ Public Class DrawPageUC
|
||||
' 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))
|
||||
@@ -700,7 +703,7 @@ Public Class DrawPageUC
|
||||
' Aggiusto per lavorazioni
|
||||
AdjustFlatPart(nId2)
|
||||
' Se dati Trf assegno nome univoco
|
||||
If m_bTrfData Then EgtSetInfo(Pz, "CsvPart", m_TrfOrderCode & "-" & i.ToString())
|
||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
|
||||
' Inserisco in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
@@ -763,9 +766,9 @@ Public Class DrawPageUC
|
||||
|
||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
|
||||
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
If DlgTrfData.ShowDialog() Then
|
||||
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.10.1")>
|
||||
<Assembly: AssemblyFileVersion("1.9.10.1")>
|
||||
<Assembly: AssemblyVersion("1.9.10.2")>
|
||||
<Assembly: AssemblyFileVersion("1.9.10.2")>
|
||||
|
||||
@@ -268,6 +268,8 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||
End If
|
||||
' Gestione speciale eventuali note tipo Hofmann
|
||||
ManageSpecialSawNotes()
|
||||
' Salvo e aggiorno interfaccia utente
|
||||
EgtTdbSaveCurrTool()
|
||||
GetToolParams()
|
||||
@@ -279,6 +281,8 @@ Public Class ToolsDbPageUC
|
||||
Dim NewName As String = SelectedCathegory.Name
|
||||
EgtTdbGetToolNewName(NewName)
|
||||
If EgtTdbCopyTool(SelectedCathegory.Name, NewName) Then
|
||||
' Gestione speciale eventuali note tipo Hofmann
|
||||
ManageSpecialSawNotes()
|
||||
' Annullo disegno
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DRAW, "")
|
||||
EgtTdbSaveCurrTool()
|
||||
@@ -302,6 +306,53 @@ Public Class ToolsDbPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ManageSpecialSawNotes()
|
||||
' Note utente devono essere visualizzate
|
||||
If m_CurrMachine.ShowUserNotes = 0 Then Return
|
||||
' Utensile deve essere lama
|
||||
Dim nType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
If nType <> MCH_TY.SAW_STD Then Return
|
||||
' Recupero le note utente
|
||||
Dim sUserNotes As String = ""
|
||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, sUserNotes)
|
||||
' Se esistono
|
||||
If Not String.IsNullOrEmpty(sUserNotes) Then
|
||||
' Le divido in parti
|
||||
Dim bIsCode As Boolean = False
|
||||
Dim bIsSuppl As Boolean = False
|
||||
Dim bIsSN As Boolean = False
|
||||
Dim sItems() As String = sUserNotes.Split(";".ToCharArray)
|
||||
For i As Integer = 0 To sItems.Count() - 1
|
||||
If sItems(i).Contains("CODE=") Then
|
||||
bIsCode = True
|
||||
ElseIf sItems(i).Contains("SUPPL=") Then
|
||||
bIsSuppl = True
|
||||
ElseIf sItems(i).Contains("S/N=") Then
|
||||
bIsSN = True
|
||||
ElseIf sItems(i).Contains("START=") Then
|
||||
sItems(i) = ""
|
||||
ElseIf sItems(i).Contains("PROD=") Then
|
||||
sItems(i) = ""
|
||||
End If
|
||||
Next
|
||||
sUserNotes = ""
|
||||
For i As Integer = 0 To sItems.Count() - 1
|
||||
If Not String.IsNullOrWhiteSpace(sItems(i)) Then
|
||||
sUserNotes &= sItems(i) & ";"
|
||||
End If
|
||||
Next
|
||||
If Not bIsCode Then sUserNotes &= "CODE= ;"
|
||||
If Not bIsSuppl Then sUserNotes &= "SUPPL= ;"
|
||||
If Not bIsSN Then sUserNotes &= "S/N= ;"
|
||||
Else
|
||||
sUserNotes = "CODE= ; SUPPL= ; S/N= ;"
|
||||
End If
|
||||
sUserNotes &= "START=" & My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH:mm:ss") & ";"
|
||||
sUserNotes &= "PROD=0;"
|
||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, sUserNotes)
|
||||
End Sub
|
||||
|
||||
Private Sub SaveBtn_Click(sender As Object, e As RoutedEventArgs) Handles SaveBtn.Click
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
SetToolParams()
|
||||
|
||||
Reference in New Issue
Block a user