OmagCUT 2.2h1 :
- richiesta licenza livello 22 - aggiunta gestione opzionale Ordine, Distinta e Nome in import CSV - aggiunta gestione opzionale Ordine, Distinta e Nome in import DXF - aggiunta gestione opzionale Ordine, Distinta e Nome in disegno parametrico pezzi - aggiunta gestione opzionale Blocco e Numero Lastra in definizione grezzo.
This commit is contained in:
@@ -8,6 +8,8 @@ Friend Module CSVFile
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Class CsvPart
|
||||
Public m_sName As String = String.Empty
|
||||
Public m_sOrd As String = String.Empty
|
||||
Public m_sDist As String = String.Empty
|
||||
Public m_sMaterial As String = String.Empty
|
||||
Public m_bActive As Boolean = True
|
||||
Public m_nCount As Integer = 0
|
||||
@@ -51,6 +53,8 @@ Friend Module CSVFile
|
||||
Dim sN As String = i.ToString()
|
||||
EgtLuaGetGlobStringVar("CSV.NAME" & sN, OnePart.m_sName)
|
||||
OnePart.m_bActive = True
|
||||
EgtLuaGetGlobStringVar("CSV.ORD" & sN, OnePart.m_sOrd)
|
||||
EgtLuaGetGlobStringVar("CSV.DIST" & sN, OnePart.m_sDist)
|
||||
EgtLuaGetGlobStringVar("CSV.MAT" & sN, OnePart.m_sMaterial)
|
||||
EgtLuaGetGlobIntVar("CSV.COUNT" & sN, OnePart.m_nCount)
|
||||
OnePart.m_nToNest = OnePart.m_nCount
|
||||
@@ -121,6 +125,10 @@ Friend Module CSVFile
|
||||
If sItems.Count() >= 2 Then
|
||||
If sItems(0) = "Nam" Then
|
||||
OnePart.m_sName = sItems(1)
|
||||
ElseIf sItems(0) = "Ord" Then
|
||||
OnePart.m_sOrd = sItems(1)
|
||||
ElseIf sItems(0) = "Dist" Then
|
||||
OnePart.m_sDist = sItems(1)
|
||||
ElseIf sItems(0) = "Mat" Then
|
||||
OnePart.m_sMaterial = sItems(1)
|
||||
ElseIf sItems(0) = "Act" Then
|
||||
@@ -169,6 +177,8 @@ Friend Module CSVFile
|
||||
Dim CurrPart As CsvPart = CsvPartList(i - 1)
|
||||
Writer.WriteLine("[P" & i.ToString() & "]")
|
||||
Writer.WriteLine("Nam=" & CurrPart.m_sName)
|
||||
Writer.WriteLine("Ord=" & CurrPart.m_sOrd)
|
||||
Writer.WriteLine("Dist=" & CurrPart.m_sDist)
|
||||
Writer.WriteLine("Mat=" & CurrPart.m_sMaterial)
|
||||
Writer.WriteLine("Act=" & If(CurrPart.m_bActive, "1", "0"))
|
||||
Writer.WriteLine("Cnt=" & CurrPart.m_nCount.ToString())
|
||||
|
||||
@@ -446,6 +446,9 @@ Public Class CSVPage
|
||||
If m_bFull Then
|
||||
EgtSetInfo(nId, INFO_CSV_PATH, m_sCsvPath)
|
||||
EgtSetInfo(nId, INFO_CSV_PART, CurrPart.m_sName)
|
||||
EgtSetInfo(nId, INFO_CSV_ORD, CurrPart.m_sOrd)
|
||||
EgtSetInfo(nId, INFO_CSV_DIST, CurrPart.m_sDist)
|
||||
EgtSetInfo(nId, INFO_CSV_MAT, CurrPart.m_sMaterial)
|
||||
End If
|
||||
' Imposto colore testi
|
||||
Utility.SetTextColor( nRegId)
|
||||
|
||||
@@ -137,6 +137,10 @@ Module ConstGen
|
||||
Public Const NAME_RAW_PHOTO_OUTLINE As String = "RawPhotoOutline"
|
||||
' Nome testo per Barcode
|
||||
Public Const NAME_BARCODE As String = "BarCode"
|
||||
' Info per identificativo blocco
|
||||
Public Const INFO_RAW_BLOCK = "Block"
|
||||
' Info per numero lastra nel blocco
|
||||
Public Const INFO_RAW_SLABNBR = "SlabNbr"
|
||||
|
||||
' Contrassegno di progetto OmagCut
|
||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||
@@ -257,10 +261,22 @@ Module ConstGen
|
||||
Public Const INFO_MCH_ORILEADIN As String = "OriLI"
|
||||
' Info in lavorazione taglio per uscita originale
|
||||
Public Const INFO_MCH_ORILEADOUT As String = "OriLO"
|
||||
' Info in pezzo con path di provenienza
|
||||
Public Const INFO_SOU_PATH As String = "SouPath"
|
||||
' Info in pezzo con path di Csv di provenienza
|
||||
Public Const INFO_CSV_PATH As String = "CsvPath"
|
||||
' Info in pezzo con suo nome in Csv
|
||||
Public Const INFO_CSV_PART As String = "CsvPart"
|
||||
' Info in pezzo con suo ordine in Csv
|
||||
Public Const INFO_CSV_ORD As String = "CsvOrd"
|
||||
' Info in pezzo con sua distinta in Csv
|
||||
Public Const INFO_CSV_DIST As String = "CsvDist"
|
||||
' Info in pezzo con suo materiale in Csv
|
||||
Public Const INFO_CSV_MAT As String = "CsvMat"
|
||||
' Info in pezzo con dimensione X in Csv
|
||||
Public Const INFO_CSV_V1 As String = "V1"
|
||||
' Info in pezzo con dimensione Y in Csv
|
||||
Public Const INFO_CSV_V2 As String = "V2"
|
||||
' Nome layer per valori angoli di inclinazione dei lati
|
||||
Public Const SIDE_ANGLE_LAYER As String = "SideAngle"
|
||||
' Nome layer per regioni selezione percorsi interni
|
||||
|
||||
@@ -92,6 +92,7 @@ Module ConstIni
|
||||
|
||||
Public Const S_COMPO As String = "Compo"
|
||||
Public Const K_TRFDATA As String = "TrfData"
|
||||
Public Const K_CSVDATA As String = "CsvData"
|
||||
Public Const K_COMPODIR As String = "CompoDir"
|
||||
|
||||
Public Const S_FLATPARTS As String = "FlatParts"
|
||||
@@ -102,6 +103,7 @@ Module ConstIni
|
||||
Public Const K_MAXSIDEANGLE As String = "MaxSideAngle"
|
||||
Public Const K_PARSIDE_AS_TRF As String = "ParSideAsTrf"
|
||||
Public Const K_SIDEANGLE As String = "SideAngle"
|
||||
Public Const K_DELTA_ANG_TG As String = "DeltaAngTg"
|
||||
Public Const K_ENGRAVEOFFSET As String = "EngraveOffset"
|
||||
Public Const K_ENGRAVEOFFSET2 As String = "EngraveOffset2"
|
||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||
@@ -157,6 +159,7 @@ Module ConstIni
|
||||
Public Const S_RAWPART As String = "RawPart"
|
||||
Public Const K_RAWCOLOR As String = "RawColor"
|
||||
Public Const K_KERFCOLOR As String = "KerfColor"
|
||||
Public Const K_SLABID As String = "EnableSlabId"
|
||||
Public Const K_RAWLENGTH As String = "Length"
|
||||
Public Const K_RAWWIDTH As String = "Width"
|
||||
Public Const K_RAWHEIGHT As String = "Height"
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<Window x:Class="CompoCsvData"
|
||||
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"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ChooseMachining" Height="276.5" Width="426.5">
|
||||
|
||||
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid Name="CompoCsvDataGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="OrderTxBl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OrderTxBx" Grid.Column="2" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="ListTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ListTxBx" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="NameTxBl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NameTxBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,56 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class CompoCsvData
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Private Sub CompoTrfData_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
OrderTxBl.Text = EgtMsg( 90467) 'Ordine
|
||||
ListTxBl.Text = EgtMsg( 90468) 'Distinta
|
||||
NameTxBl.Text = EgtMsg( 90469) 'Nome
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
DialogResult = False
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Friend Sub SetData(sOrder As String, sList As String)
|
||||
OrderTxBx.Text = sOrder
|
||||
ListTxBx.Text = sList
|
||||
NameTxBl.Visibility = Visibility.Hidden
|
||||
NameTxBx.Visibility = Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
Friend Sub GetData(ByRef sOrder As String, ByRef sList As String)
|
||||
sOrder = OrderTxBx.Text
|
||||
sList = ListTxBx.Text
|
||||
End Sub
|
||||
|
||||
Friend Sub SetData(sOrder As String, sList As String, sName As String)
|
||||
OrderTxBx.Text = sOrder
|
||||
ListTxBx.Text = sList
|
||||
NameTxBx.Text = sName
|
||||
End Sub
|
||||
|
||||
Friend Sub GetData(ByRef sOrder As String, ByRef sList As String, ByRef sName As String)
|
||||
sOrder = OrderTxBx.Text
|
||||
sList = ListTxBx.Text
|
||||
sName = NameTxBx.Text
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -48,6 +48,11 @@ Public Class DrawPageUC
|
||||
Private m_TrfSurfCode As String = ""
|
||||
Private m_TrfThickness As Double = 0
|
||||
|
||||
' Csv Data
|
||||
Private m_bCsvData As Boolean = False
|
||||
Private m_sCsvOrder As String = ""
|
||||
Private m_sCsvList As String = ""
|
||||
Private m_sCsvName As String = ""
|
||||
|
||||
Friend ReadOnly Property sCompoName As String
|
||||
Get
|
||||
@@ -124,23 +129,31 @@ Public Class DrawPageUC
|
||||
EngraveBtn.Content = EgtMsg( 90397) ' Incidi
|
||||
DripCutBtn.Content = EgtMsg( 90458) ' Incidi da sotto
|
||||
TopTxBl.Text = EgtMsg( 90384) ' Indica Lato Sopra
|
||||
TrfDataBtn.Content = EgtMsg( 90389) ' Dati Trf
|
||||
|
||||
' Abilitazione lavorazioni da sotto da chiave
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
|
||||
' Abilitazione Nome/TrfData
|
||||
' Abilitazione TrfData
|
||||
m_bTrfData = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.TRF_IMPORT) And
|
||||
(GetPrivateProfileInt(S_COMPO, K_TRFDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
If Not m_bTrfData Then
|
||||
PartNameTxBl.Visibility = Windows.Visibility.Visible
|
||||
PartNameTxBx.Visibility = Windows.Visibility.Visible
|
||||
TrfDataBtn.Visibility = Windows.Visibility.Hidden
|
||||
Else
|
||||
' Abilitazione CsvData
|
||||
m_bCsvData = ( Not m_bTrfData And GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
|
||||
If m_bTrfData Then
|
||||
PartNameTxBl.Visibility = Windows.Visibility.Hidden
|
||||
PartNameTxBx.Visibility = Windows.Visibility.Hidden
|
||||
TrfDataBtn.Visibility = Windows.Visibility.Visible
|
||||
TrfDataBtn.Content = EgtMsg( 90389) ' Dati Trf
|
||||
ElseIf m_bCsvData Then
|
||||
PartNameTxBl.Visibility = Windows.Visibility.Hidden
|
||||
PartNameTxBx.Visibility = Windows.Visibility.Hidden
|
||||
TrfDataBtn.Visibility = Windows.Visibility.Visible
|
||||
TrfDataBtn.Content = EgtMsg( 90398) ' Dati Csv
|
||||
Else
|
||||
PartNameTxBl.Visibility = Windows.Visibility.Visible
|
||||
PartNameTxBx.Visibility = Windows.Visibility.Visible
|
||||
TrfDataBtn.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -223,6 +236,11 @@ Public Class DrawPageUC
|
||||
m_TrfMatCode = ""
|
||||
m_TrfSurfCode = ""
|
||||
m_TrfThickness = 0
|
||||
|
||||
' Reset dati Csv
|
||||
m_sCsvOrder = ""
|
||||
m_sCsvList = ""
|
||||
m_sCsvName = ""
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles DrawScene.OnMouseDownScene
|
||||
@@ -621,24 +639,8 @@ Public Class DrawPageUC
|
||||
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 normali
|
||||
If Not m_bTrfData Then
|
||||
' 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
|
||||
' altrimenti se pezzo con dati TRF
|
||||
Else
|
||||
' Se pezzo con dati TRF
|
||||
If m_bTrfData Then
|
||||
' Nome da dati Trf
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
@@ -658,32 +660,67 @@ Public Class DrawPageUC
|
||||
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)
|
||||
End If
|
||||
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))
|
||||
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
|
||||
Dim dDimX As Double = b3Part.DimX()
|
||||
Dim dDimY As Double = b3Part.DimY()
|
||||
Dim dH As Double = Math.Min(0.1 * dDimY, 30)
|
||||
Dim nText As Integer = EgtCreateTextAdv(nRegLayId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||
EgtSetColor(nText, New Color3d())
|
||||
Utility.AddTopToPartRegion( nRegLayId)
|
||||
End If
|
||||
' Scrivo testi per nesting
|
||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||
@@ -781,10 +818,18 @@ Public Class DrawPageUC
|
||||
End Sub
|
||||
|
||||
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_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
If DlgTrfData.ShowDialog() Then
|
||||
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
If m_bTrfData Then
|
||||
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
|
||||
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_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
End If
|
||||
ElseIf m_bCsvData Then
|
||||
Dim DlgCsvData As New CompoCsvData( m_MainWindow)
|
||||
DlgCsvData.SetData( m_sCsvOrder, m_sCsvList, m_sCsvName)
|
||||
If DlgCsvData.ShowDialog() Then
|
||||
DlgCsvData.GetData( m_sCsvOrder, m_sCsvList, m_sCsvName)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -63,10 +63,12 @@
|
||||
<!-- Definizione della Grid inferiore per Button -->
|
||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -83,7 +85,11 @@
|
||||
<RadioButton Name="mmBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<RadioButton Name="inchBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<Grid Name="PartNumberGrd" Grid.Column="6" Grid.ColumnSpan="2">
|
||||
<Button Name="OrderListBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<ToggleButton Name="TopBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<Grid Name="PartNumberGrd" Grid.Column="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -93,14 +99,13 @@
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="8" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="9" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ Public Class ImportPageUC
|
||||
Private m_bFirst As Boolean = True
|
||||
Private m_bMM As Boolean = True
|
||||
Private m_bEnableTrf As Boolean = False
|
||||
Private m_bEnableOrderList As Boolean = False
|
||||
Private m_sOrder As String = ""
|
||||
Private m_sList As String = ""
|
||||
' Costante per formato TRF
|
||||
Private Const FT_TRF As Integer = 51
|
||||
' Costante per formato CUT
|
||||
@@ -70,6 +73,8 @@ Public Class ImportPageUC
|
||||
ResetBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 3) 'Reset
|
||||
mmBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 4) 'mm
|
||||
inchBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 5) 'inch
|
||||
OrderListBtn.Content = EgtMsg( 90398) 'Dati Csv
|
||||
TopBtn.Content = EgtMsg( 90384) 'Indica Lato Sopra
|
||||
PartNumTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 15) 'Numero
|
||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclinazione
|
||||
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incisione da sotto
|
||||
@@ -82,9 +87,12 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub ImportPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
' imposto importazione TRF
|
||||
' abilitazione importazione TRF
|
||||
m_bEnableTrf = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.TRF_IMPORT))
|
||||
' abilitazione Ordine e Distinta per importazione DXF
|
||||
m_bEnableOrderList = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||
GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
|
||||
If m_bFirst Then
|
||||
' imposto colore di default
|
||||
@@ -148,6 +156,8 @@ Public Class ImportPageUC
|
||||
UseClosedCurveBtn.Visibility = Windows.Visibility.Visible
|
||||
ResetBtn.Visibility = Windows.Visibility.Visible
|
||||
SideAngleBtn.Visibility = Windows.Visibility.Visible
|
||||
OrderListBtn.Visibility = If( m_bEnableOrderList, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
TopBtn.Visibility = Windows.Visibility.Visible
|
||||
PartNumberGrd.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
UseLayerBtn.Visibility = Windows.Visibility.Hidden
|
||||
@@ -155,6 +165,8 @@ Public Class ImportPageUC
|
||||
UseClosedCurveBtn.Visibility = Windows.Visibility.Hidden
|
||||
ResetBtn.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleBtn.Visibility = Windows.Visibility.Hidden
|
||||
OrderListBtn.Visibility = Windows.Visibility.Hidden
|
||||
TopBtn.Visibility = Windows.Visibility.Hidden
|
||||
PartNumberGrd.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
mmBtn.IsEnabled = True
|
||||
@@ -334,6 +346,8 @@ Public Class ImportPageUC
|
||||
ResetBtn.IsEnabled = False
|
||||
mmBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||
inchBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||
OrderListBtn.IsEnabled = m_bEnableOrderList
|
||||
TopBtn.IsEnabled = True
|
||||
PartNumberGrd.IsEnabled = True
|
||||
OkBtn.IsEnabled = False
|
||||
SideAngleBtn.IsEnabled = False
|
||||
@@ -347,6 +361,8 @@ Public Class ImportPageUC
|
||||
ResetBtn.IsEnabled = False
|
||||
mmBtn.IsEnabled = False
|
||||
inchBtn.IsEnabled = False
|
||||
OrderListBtn.IsEnabled = False
|
||||
TopBtn.IsEnabled = False
|
||||
PartNumberGrd.IsEnabled = False
|
||||
OkBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = False
|
||||
@@ -635,6 +651,14 @@ Public Class ImportPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OrderListBtn_Click(sender As Object, e As RoutedEventArgs) Handles OrderListBtn.Click
|
||||
Dim DlgOrderList As New CompoCsvData( m_MainWindow)
|
||||
DlgOrderList.SetData( m_sOrder, m_sList)
|
||||
If DlgOrderList.ShowDialog() Then
|
||||
DlgOrderList.GetData( m_sOrder, m_sList)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' Se import per pezzi piatti
|
||||
@@ -714,8 +738,32 @@ Public Class ImportPageUC
|
||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||
Dim nRegId = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
||||
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||
' Se file origine Dxf o Nge
|
||||
If m_nFileType = FT.DXF Or m_nFileType = FT.NGE Then
|
||||
' Eventuale testo per indicare il sopra
|
||||
If TopBtn.IsChecked() Then
|
||||
Utility.AddTopToPartRegion( nRegId)
|
||||
End If
|
||||
' Se richiesti, inserisco dati Ordine, Distinta, Nome, Origine
|
||||
If m_bEnableOrderList Then
|
||||
' Cerco il nome del pezzo
|
||||
Dim sName As String = ""
|
||||
EgtGetName( nId, sName)
|
||||
' Recupero il box del pezzo
|
||||
Dim b3Reg As New BBox3d : EgtGetBBox( nRegId, GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Reg)
|
||||
' Aggiungo info equivalenti a CSV
|
||||
EgtSetInfo(nId, INFO_CSV_PART, sName)
|
||||
EgtSetInfo(nId, INFO_CSV_ORD, m_sOrder)
|
||||
EgtSetInfo(nId, INFO_CSV_DIST, m_sList)
|
||||
EgtSetInfo(nId, INFO_CSV_MAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
|
||||
EgtSetInfo(nId, INFO_CSV_V1, DoubleToString( b3Reg.DimX(), 1))
|
||||
EgtSetInfo(nId, INFO_CSV_V2, DoubleToString( b3Reg.DimY(), 1))
|
||||
End If
|
||||
End If
|
||||
' Imposto colore testi
|
||||
Utility.SetTextColor( nRegId)
|
||||
' Imposto path di provenienza
|
||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||
' Inserisco in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
|
||||
' Recupero Id di pezzo successivo
|
||||
|
||||
@@ -185,6 +185,7 @@ Public Class InternalComponentPageUC
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.TopGrd.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.PartNameGrd.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.PartNumberGrd.Visibility = Windows.Visibility.Visible
|
||||
' Carico componente
|
||||
|
||||
@@ -194,8 +194,7 @@ Public Class MainComponentPageUC
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.TopGrd.Visibility =
|
||||
If(sCompo.ToLower() = "rettangolo.lua", Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
m_MainWindow.m_DrawPageUC.TopGrd.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.PartNameGrd.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.PartNumberGrd.Visibility = Windows.Visibility.Visible
|
||||
' Carico componente
|
||||
|
||||
@@ -230,6 +230,7 @@ Public Class SecondaryComponentPageUC
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.BackBtn.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.TopGrd.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.PartNameGrd.Visibility = Windows.Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.PartNumberGrd.Visibility = Windows.Visibility.Visible
|
||||
|
||||
|
||||
@@ -66,7 +66,8 @@ Module SideAngle
|
||||
if EgtCurveIsClosed( CurrLine) Then Return bOutLoop
|
||||
|
||||
' Delta angolare limite per tangenza
|
||||
Const DELTA_ANG_TG As Double = 5.0
|
||||
Const DELTA_ANG_TG_DEF As Double = 5.0
|
||||
Dim dDeltaAngTg As Double = GetPrivateProfileDouble(S_SIDES, K_DELTA_ANG_TG, DELTA_ANG_TG_DEF, m_MainWindow.GetIniFile())
|
||||
' Verifico se curva precedente mi permette di inclinare
|
||||
Dim bLastOk As Boolean = False
|
||||
Select EgtGetType(LastLine)
|
||||
@@ -80,7 +81,7 @@ Module SideAngle
|
||||
' Confronto direzioni per vedere se sono tangenti
|
||||
Dim dAngDeg As Double = GetAngle( vtLastEnd, vtCurrStart)
|
||||
' verifico se l'angolo è significativo
|
||||
bLastOk = ( dAngDeg > DELTA_ANG_TG)
|
||||
bLastOk = ( dDeltaAngTg < EPS_ANG_SMALL Or dAngDeg > dDeltaAngTg)
|
||||
Case Else
|
||||
EgtOutLog("Error in Compo Outloop: found an entity that is not a line or a arc")
|
||||
End Select
|
||||
@@ -98,7 +99,7 @@ Module SideAngle
|
||||
' Confronto direzioni per vedere se sono tangenti
|
||||
Dim dAngDeg As Double = GetAngle( vtCurrEnd, vtNextStart)
|
||||
' verifico se l'angolo è significativo
|
||||
bNextOk = ( dAngDeg > DELTA_ANG_TG)
|
||||
bNextOk = ( dDeltaAngTg < EPS_ANG_SMALL Or dAngDeg > dDeltaAngTg)
|
||||
Case Else
|
||||
EgtOutLog("Error in Compo Outloop: found an entity that is not a line or a arc")
|
||||
End Select
|
||||
|
||||
+2
-2
@@ -320,8 +320,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 21, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 21, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 22, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 22, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.2.7.5")>
|
||||
<Assembly: AssemblyFileVersion("2.2.7.5")>
|
||||
<Assembly: AssemblyVersion("2.2.8.1")>
|
||||
<Assembly: AssemblyFileVersion("2.2.8.1")>
|
||||
|
||||
@@ -170,6 +170,9 @@
|
||||
<Compile Include="DirectCuts\Polishing.xaml.vb">
|
||||
<DependentUpon>Polishing.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawImport\CompoCsvData.xaml.vb">
|
||||
<DependentUpon>CompoCsvData.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\AlarmsPageUC.xaml.vb">
|
||||
<DependentUpon>AlarmsPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -177,6 +180,9 @@
|
||||
<DependentUpon>CadCutPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamAuto.vb" />
|
||||
<Compile Include="RawPhoto\SlabIdWD.xaml.vb">
|
||||
<DependentUpon>SlabIdWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RawPhoto\Camera.vb" />
|
||||
<Compile Include="RawPhoto\ChooseMachining.xaml.vb">
|
||||
<DependentUpon>ChooseMachining.xaml</DependentUpon>
|
||||
@@ -374,6 +380,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="DrawImport\CompoCsvData.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Machine\AlarmsPageUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -382,6 +392,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="RawPhoto\SlabIdWD.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="RawPhoto\ChooseMachining.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -979,6 +993,12 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Vacuum.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\SlabId.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\SlabId.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
<BitmapImage x:Key="AlignPiecesImg" UriSource="Resources/NewIcons/ruota-oggetto-inclinato.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BarCodeImg" UriSource="Resources/NewIcons/BarCode.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SlabIdImg" UriSource="Resources/NewIcons/SlabId.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomLeftImg" UriSource="Resources/NewIcons/1-BottomLeft.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomRightImg" UriSource="Resources/NewIcons/2-BottomRight.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PartRotOnImg" UriSource="Resources/NewIcons/PartRotOn.png"></BitmapImage>
|
||||
@@ -474,7 +475,7 @@
|
||||
<Setter Property="Keyboard" Value="Alphanumeric"/>
|
||||
<Setter Property="KeyboardDimension" Value="600"/>
|
||||
<Setter Property="Background" Value="#636974"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_LowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
|
||||
<BitmapImage x:Key="AlignPiecesImg" UriSource="Resources/AlignPieces.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BarCodeImg" UriSource="Resources/BarCode.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SlabIdImg" UriSource="Resources/SlabId.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomLeftImg" UriSource="Resources/BottomLeft.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomRightImg" UriSource="Resources/BottomRight.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PartRotOnImg" UriSource="Resources/PartRotOn.png"></BitmapImage>
|
||||
|
||||
@@ -159,7 +159,8 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -172,6 +173,10 @@
|
||||
<Image Source="{DynamicResource BarCodeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="SlabIdBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SlabIdImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="5" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
@@ -116,9 +116,13 @@ Public Class RawPartPageUC
|
||||
RawModeCmBx.ItemsSource = m_RawModeList
|
||||
|
||||
' Nascondo bottone tastatura lastra se disattivato da file .ini
|
||||
RawProbingBtn.Visibility = If(m_CurrentMachine.bHasRawProbe, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
RawProbingBtn.Visibility = If( m_CurrentMachine.bHasRawProbe, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
' Nascondo bottone lettura codice a barre se non attivato da file .ini
|
||||
BarCodeBtn.Visibility = If(m_CurrentMachine.bHasRawBarCodeReader, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
BarCodeBtn.Visibility = If( m_CurrentMachine.bHasRawBarCodeReader, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
' Nascondo bottone dati lastra se non attivato da file .ini
|
||||
Dim bSlabId As Boolean = ( Not m_CurrentMachine.bHasRawBarCodeReader And
|
||||
GetPrivateProfileInt( S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
SlabIdBtn.Visibility = If( bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
OutlineBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 33) 'Rectangle - Rettangolo
|
||||
@@ -1510,6 +1514,46 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SlabIdBtn_Click(sender As Object, e As RoutedEventArgs) Handles SlabIdBtn.Click
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Finestra input dati
|
||||
Dim SlabIdWindow As New SlabIdWD( m_MainWindow)
|
||||
' Recupero eventuali vecchi dati della lastra
|
||||
If nRawId <> GDB_ID.NULL Then
|
||||
Dim sBlock As String = "" : EgtGetInfo( nRawId, INFO_RAW_BLOCK, sBlock)
|
||||
Dim sSlabNbr As String = "" : EgtGetInfo( nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
SlabIdWindow.SetBlockName( sBlock)
|
||||
SlabIdWindow.SetSlabNbr( sSlabNbr)
|
||||
End If
|
||||
' Visualizzo finestra richiesta dati
|
||||
If SlabIdWindow.ShowDialog() Then
|
||||
If nRawId <> GDB_ID.NULL Then
|
||||
Dim sBlock As String = SlabIdWindow.GetBlockName()
|
||||
Dim sSlabNbr As String = SlabIdWindow.GetSlabNbr()
|
||||
If String.IsNullOrWhiteSpace( sBlock) Then sSlabNbr = ""
|
||||
' Assegno info
|
||||
EgtSetInfo( nRawId, INFO_RAW_BLOCK, sBlock)
|
||||
EgtSetInfo( nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
' Cancello eventuale vecchio BarCode
|
||||
EgtErase(EgtGetFirstNameInGroup(nRawId, NAME_BARCODE))
|
||||
' Se definito, inserisco nuovo BarCode
|
||||
Dim sBarCode As String = sBlock & " - " & sSlabNbr
|
||||
If sBarCode <> " - " Then
|
||||
Dim ptRawCen As Point3d
|
||||
GetRawCenter(ptRawCen)
|
||||
Dim ptRawMin, ptRawMax As Point3d
|
||||
GetRawBox(ptRawMin, ptRawMax)
|
||||
Dim ptText As New Point3d(ptRawCen.x, ptRawCen.y, ptRawMax.z)
|
||||
Dim nText As Integer = EgtCreateTextAdv(nRawId, ptText, 0, sBarCode, "", 500, False, 50.0, 1, 0, INS_POS.MC, GDB_RT.GLOB)
|
||||
EgtSetName(nText, NAME_BARCODE)
|
||||
EgtSetColor(nText, New Color3d(255, 0, 0))
|
||||
End If
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RawPartPage_Unloaded(sender As Object, e As RoutedEventArgs)
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<Window x:Class="SlabIdWD"
|
||||
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"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="305.9" Width="426.5" ShowInTaskbar="False">
|
||||
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="BlockNameTxBl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="BlockNameTxBx" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="SlabNbrTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SlabNbrTxBx" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,55 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class SlabIdWD
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_sBlockName As String = ""
|
||||
Private m_sSlabNbr As String = ""
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Friend Sub SetBlockName( sBlock As String)
|
||||
m_sBlockName = sBlock
|
||||
End Sub
|
||||
|
||||
Friend Function GetBlockName() As String
|
||||
Return m_sBlockName
|
||||
End Function
|
||||
|
||||
Friend Sub SetSlabNbr( sSlab As String)
|
||||
m_sSlabNbr = sSlab
|
||||
End Sub
|
||||
|
||||
Friend Function GetSlabNbr() As String
|
||||
Return m_sSlabNbr
|
||||
End Function
|
||||
|
||||
Private Sub SlabIdWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
BlockNameTxBl.Text = EgtMsg(90882) 'Blocco
|
||||
SlabNbrTxBl.Text = EgtMsg(90883) 'Numero
|
||||
End Sub
|
||||
|
||||
Private Sub SlabIdWD_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
BlockNameTxBx.Text = m_sBlockName
|
||||
SlabNbrTxBx.Text = m_sSlabNbr
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_sBlockName = BlockNameTxBx.Text
|
||||
m_sSlabNbr = SlabNbrTxBx.Text
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
DialogResult = False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -329,7 +329,6 @@ Public Class SimulationPageUC
|
||||
While m_nStatus <> MCH_SIM_ST.UI_STOP
|
||||
' Se simulazione in svolgimento
|
||||
If m_nStatus = MCH_SIM_ST.UI_PLAY Or m_nStatus = MCH_SIM_ST.UI_STEP Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
' Eseguo movimento
|
||||
Dim nMove As Integer
|
||||
Dim bMove As Boolean = EgtSimMove(nMove)
|
||||
|
||||
@@ -140,6 +140,42 @@ Module Utility
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function AddTopToPartRegion( nRegId As Integer) As Boolean
|
||||
Dim frReg As New Frame3d : EgtGetGroupGlobFrame( nRegId, frReg)
|
||||
Dim b3Reg As New BBox3d : EgtGetBBoxGlob( nRegId, GDB_BB.STANDARD, b3Reg)
|
||||
Dim dH As Double = Math.Min(0.1 * b3Reg.DimY(), 30)
|
||||
Dim ptIns As New Point3d( b3Reg.Center().x, b3Reg.Max().y - dH, 0)
|
||||
ptIns.ToLoc( frReg)
|
||||
Dim nSfrId As Integer = EgtGetFirstInGroup( nRegId)
|
||||
While nSfrId <> GDB_ID.NULL
|
||||
If EgtGetType( nSfrId) = GDB_TY.SRF_FRGN Then Exit While
|
||||
nSfrId = EgtGetNext( nSfrId)
|
||||
End While
|
||||
If nSfrId <> GDB_ID.NULL Then
|
||||
Dim ptStart As New Point3d ( b3Reg.Min().x, b3Reg.Max().y - dH, 0)
|
||||
ptStart.ToLoc( frReg)
|
||||
Dim ptEnd As New Point3d ( b3Reg.Max().x, b3Reg.Max().y - dH, 0)
|
||||
ptEnd.ToLoc( frReg)
|
||||
Dim nLineId As Integer = EgtCreateLine( nRegId, ptStart, ptEnd)
|
||||
Dim nCount As Integer = 0
|
||||
Dim nNewId As Integer = EgtTrimCurveWithRegion( nLineId, nSfrId, True, False, nCount)
|
||||
If nNewId <> GDB_ID.NULL Then
|
||||
If nCount > 0 Then EgtMidPoint( nNewId, ptIns)
|
||||
For nTmpId As Integer = nNewId To nNewId + nCount - 1
|
||||
EgtErase( nTmpId)
|
||||
Next
|
||||
Else
|
||||
EgtErase( nLineId)
|
||||
End If
|
||||
End If
|
||||
Dim vtDir As New Vector3d( 1, 0, 0)
|
||||
vtDir.ToLoc( frReg)
|
||||
Dim dLen, dAngV, dAngH As Double
|
||||
vtDir.ToSpherical( dLen, dAngV, dAngH)
|
||||
Dim nText As Integer = EgtCreateTextAdv(nRegId, ptIns, dAngH, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||
Return ( nText <> GDB_ID.NULL)
|
||||
End Function
|
||||
|
||||
'--------------------------------------------------------------------------------------------------
|
||||
Public Class Language
|
||||
|
||||
|
||||
Reference in New Issue
Block a user