Compare commits

...

31 Commits

Author SHA1 Message Date
Demetrio Cassarino bcfe9f3258 -aggiunto nuovo tab final cut in machining 2025-07-02 16:32:40 +02:00
Demetrio Cassarino 5cdf63a1a3 -aggiunto titolo a lista customgrid 2025-07-02 12:18:07 +02:00
Demetrio Cassarino 1c9601c1e6 -nuova gestione grafica customgrid 2025-07-02 11:40:34 +02:00
Nicola Pievani 18c50aa482 Merge branch 'Features/Final_Saw_Cut' into develop 2025-07-01 16:07:47 +02:00
Nicola Pievani 85bd57b7ff Merge branch 'Features/New_Grid_In_DirectCut' into develop 2025-07-01 16:07:17 +02:00
Nicola Pievani 60570863a3 Merge branch 'master' into Features/New_Grid_In_DirectCut 2025-07-01 16:06:58 +02:00
Nicola Pievani 74013dbd94 Merge commit '9c8971f52bbc98683b1385192a10a736078e18d9' into Features/Final_Saw_Cut 2025-07-01 16:01:55 +02:00
Nicola Pievani 9c8971f52b Merge remote-tracking branch 'origin/Features/New_Manage_Side_Angle' 2025-07-01 15:44:54 +02:00
Nicola Pievani 8d020eeea8 Aggiunto commento per spiegare come gestione scrittura CNCMode per flexium prima versione 2025-06-30 18:15:42 +02:00
Demetrio Cassarino 340276e11c -nuova gestione ottimizzata sideang 2025-06-27 15:50:42 +02:00
Demetrio Cassarino 87a24adaa3 -aggiunto chechi in sideangle da sistemare 2025-06-26 14:49:39 +02:00
Nicola Pievani 02a9f450fb Merge commit '7caca4f961ee6d7772816231a2370c4a160f97e8' 2025-06-20 10:58:08 +02:00
Nicola Pievani 7caca4f961 Aggiunta descrizione di altri tagli diretti 2025-06-20 10:48:58 +02:00
Nicola Pievani a23b18e5cb Aggiunto un flag per specificare il tipo di taglio diretto 2025-06-20 10:32:38 +02:00
Nicola Pievani eb1f776ed7 Migliorata gestione tagli con tallonamento 2025-06-17 16:17:23 +02:00
Nicola Pievani 697807dd79 Merge commit '8f8f781dee62e5be89bb8051c0a6fda0ebb0d3a8' 2025-06-11 12:59:52 +02:00
Nicola Pievani 90676d05ea Gestione cambio tavola con 3 tavole 2025-06-11 12:58:57 +02:00
Demetrio Cassarino 8f8f781dee Merge commit '01ced18fad0b4863f565dae8c01f195aebae3968' into Features/Manage_Msg 2025-06-11 12:56:33 +02:00
Demetrio Cassarino 01ced18fad -aggiornato messaggi 2025-06-11 12:47:23 +02:00
Nicola Pievani 3057c511ed Merge commit '07abfa9b8bc196e18cc8d95c7f52f4b4379a25d8' 2025-06-10 14:57:31 +02:00
Nicola Pievani 6fef662ce9 Migliorato codice e verifiche 2025-06-10 14:57:13 +02:00
Nicola Pievani c577ad9272 Correzione lettura MountedTool 2025-06-09 18:20:50 +02:00
Nicola Pievani 07abfa9b8b Cambio versione 2.7f1 2025-06-05 09:29:23 +02:00
Nicola Pievani fd6018c2e6 Gestione tallonatura e ponticelli per waterjet 2025-06-03 11:21:42 +02:00
Nicola Pievani 62475adcc1 Gestione nuovo flusso sabbia in WJ database 2025-05-20 18:08:13 +02:00
Nicola Pievani e08c196c54 Nuova gestione selezione tavola corrente 2025-05-20 12:46:07 +02:00
Nicola Pievani 0081855b8c Migliorata gestione caricamento progetto senza parcheggi attivi 2025-05-12 17:32:40 +02:00
Nicola Pievani f7ee580d1f Visualizzo con nome specifico i tagli finali 2025-05-12 17:10:08 +02:00
Nicola Pievani a74e6a0f8b Gestione tagli a griglia custom, da migliorare interfaccia 2025-05-08 12:21:06 +02:00
Nicola Pievani 7e3b85f7a2 Migliorata visualizzazione finestra Selezione lavorazione 2025-05-06 17:32:49 +02:00
Nicola Pievani 8b9c462814 Merge branch 'Features/Set_Machining' 2025-05-06 16:08:46 +02:00
59 changed files with 2060 additions and 803 deletions
+12 -8
View File
@@ -199,22 +199,22 @@ Friend Module CamAuto
' 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)
Dim sInfoOrigSideAng As String = String.Empty
EgtGetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, sInfoOrigSideAng)
' Se è un'entità associata ad una lavorazione inclinata
If Not String.IsNullOrEmpty(sInfoSIdeAng) Then
If Not String.IsNullOrEmpty(sInfoOrigSideAng) AndAlso sInfoOrigSideAng <> "0" 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)
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
Else
' Applico quella specificata
EgtSetInfo(nEntId, DEF_MACHINING, sSawingTilted)
EgtSetInfo(nEntId, DEF_MACHINING_TILTED, sSawingTilted)
End If
Else
' Rimuovo la lavorazione e applico quella standard
EgtRemoveInfo(nEntId, DEF_MACHINING)
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
End If
ElseIf Not bOnlySideAng Then
@@ -1056,20 +1056,24 @@ Friend Module CamAuto
If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0
If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1
If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2
Return 3
If EgtGetTableId(FORTH_TAB) = GDB_ID.NULL Then Return 3
Return 4
End Function
Friend Function GetTableName(nInd As Integer) As String
If nInd = 1 Then Return MAIN_TAB
If nInd = 2 Then Return SECOND_TAB
If nInd = 3 Then Return THIRD_TAB
If nInd = 4 Then Return FORTH_TAB
Return ""
End Function
Friend Function GetCurrentTable() As Integer
Dim sTabName As String = MAIN_TAB
EgtGetTableName(sTabName)
If sTabName = THIRD_TAB Then
If sTabName = FORTH_TAB Then
Return 4
ElseIf sTabName = THIRD_TAB Then
Return 3
ElseIf sTabName = SECOND_TAB Then
Return 2
+6 -6
View File
@@ -37,7 +37,7 @@
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="MACHINING" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
<TextBlock Grid.Column="1" Text="TOOL" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
<TextBlock Grid.Column="2" Text="TC" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Grid.Column="2" Text="TC" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Margin="10,0,0,0"/>
</Grid>
<ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
@@ -46,15 +46,15 @@
<DataTemplate>
<Grid Width="{Binding ActualWidth, ElementName=SetUpToolListBox}" Margin="0,0,-40,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.6*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.005*"/>
<ColumnDefinition Width="0.4*"/>
<ColumnDefinition Width="0.0*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Machining}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
<TextBlock Grid.Column="1" Text="{Binding ToolName}" Style="{StaticResource OmagCut_ListBoxTextBlock}" />
<TextBlock Grid.Column="1" Text="{Binding ToolName}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
<TextBlock Grid.Column="2" Text="{Binding ToolPos}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
<Rectangle Grid.Column="2" Style="{DynamicResource Rect_SplitPage}"/>
<Rectangle Grid.Column="2" Style="{DynamicResource Rect_SplitPage}" Margin="15,0,0,0"/>
<Grid.ToolTip>
<StackPanel>
<TextBlock Text="{Binding Machining}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
+5
View File
@@ -54,6 +54,11 @@ Public Class ChangeToolWD
Private Sub GetDiamAndThickDefaultSaw()
m_DefaultSaw_Name = m_MainWindow.m_CurrentMachine.sCurrSaw
' Dalla lavorazione corrente recupero il nome della lama
If EgtMdbSetCurrMachining(m_CurrSawing) Then
Dim sNameTool As String = String.Empty
If EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool) Then m_DefaultSaw_Name = sNameTool
End If
If EgtTdbSetCurrTool(m_DefaultSaw_Name) Then
' Diametro lama lavorazione
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_DefaultSaw_Diam)
+12 -12
View File
@@ -44,8 +44,8 @@ Public Class MoveRawPartPage
RemovePartBtn.Content = EgtMsg(MSG_MOVERAWPAGEUC + 1) 'Rimuovi
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) 'Modifica
ResetBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
ScrapsBtn.Content = "Add Scraps"
UnloadPartsBtn.Content = "Move part"
ScrapsBtn.Content = EgtMsg(90366) 'Add Scraps
UnloadPartsBtn.Content = EgtMsg(90367) 'Move part
End Sub
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
@@ -124,10 +124,10 @@ Public Class MoveRawPartPage
If m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
' assegnazione delle info tavola ausiliaria alla dispozione corrente (Spostato nella funzione Refresh)
SetAuxTabInCurrDisposition()
UnloadPartsBtn.Content = "Go to MOVE part"
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
' altrimenti, aggiorno visualizzazione
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
UnloadPartsBtn.Content = "Go to UNLOAD part"
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
End If
'---------------------------- AUX TABLE ----------------------------
EgtDraw()
@@ -215,10 +215,10 @@ Public Class MoveRawPartPage
Else
UnloadPartsBtn.Visibility = Visibility.Visible
If m_SplitPage.m_bOnAuxTab Then
UnloadPartsBtn.Content = "Go to MOVE part"
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
' altrimenti, aggiorno visualizzazione
Else
UnloadPartsBtn.Content = "Go to UNLOAD part"
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
End If
End If
' Aggiorno interfaccia per taglio perpendicolare
@@ -342,7 +342,7 @@ Public Class MoveRawPartPage
If VerifyCollisionWithOtherRawPart(nId) Then
' mantengo la selezione del pezzo
EgtSetStatus(nId, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
Else
' Se con ventose, le nascondo
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
@@ -352,7 +352,7 @@ Public Class MoveRawPartPage
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
' mantengo la selezione del pezzo
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
EgtDraw()
' esco dal ciclo, prima devo depositare correttamente il pezzo
Exit While
@@ -361,7 +361,7 @@ Public Class MoveRawPartPage
If VerifyCollisionWithOtherRawPart(nId, True) Then
' mantengo la selezione del pezzo
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
EgtDraw()
' esco dal ciclo, prima devo depositare correttamente il pezzo
Exit While
@@ -538,18 +538,18 @@ Public Class MoveRawPartPage
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
If nVal = 1 Or nVal = 2 Then
' 1 → è stato definito come nuovo grezzo oppure, 2 → è stato definito come nuovo grezzo ed è stato inserito nel DB delle lastre
ScrapsBtn.Content = "Remove Scrap"
ScrapsBtn.Content = EgtMsg(91228) ' Remove Scrap
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
Return True
ElseIf nVal = 3 Then
' non è possibile rimuovere il grezzo in questa fase
ScrapsBtn.Content = "Defined as Scrap"
ScrapsBtn.Content = EgtMsg(91229) ' Defined as Scrap
ScrapsBtn.IsEnabled = False
Return True
End If
End If
' non è un nuovo grezzo
ScrapsBtn.Content = "Add Scrap"
ScrapsBtn.Content = EgtMsg(91230) ' Add Scrap
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
Return False
End Function
+28 -13
View File
@@ -110,7 +110,7 @@ Public Class NestPageUC
RemovePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
DragRettanleBtn.ToolTip = "Strech"
DragRettanleBtn.ToolTip = EgtMsg(91207) 'Strech
' Nascondo i pulsanti in uso quando attivo la modalità REG
UG0_Reg.Visibility = Visibility.Hidden
@@ -356,7 +356,7 @@ Public Class NestPageUC
End While
If nIdMy = GDB_ID.NULL Then
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage("Select OUTLOOP")
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(91208)) ' Select OUTLOOP
End If
Return
End Sub
@@ -544,7 +544,7 @@ Public Class NestPageUC
m_nIdSelectedOutLoopRettangle = nIdParent
If Not IsRettangle(m_SideListRettangle) Then
m_CurrProjPage.ClearMessage()
m_CurrProjPage.SetWarningMessage("Non è un rettangolo (0)")
m_CurrProjPage.SetWarningMessage(EgtMsg(91209)) ' Non è un rettangolo (0)
Return
End If
' recupero il gruppo della lavorazione associata
@@ -553,13 +553,13 @@ Public Class NestPageUC
' se non esiste un gruppo di lavorazione associato allora esco
If nIdPV = GDB_ID.NULL Then
m_CurrProjPage.ClearMessage()
m_CurrProjPage.SetWarningMessage("Pezzo in parcheggio (1)")
m_CurrProjPage.SetWarningMessage(EgtMsg(91210)) ' Pezzo in parcheggio (1)
Return
End If
' se esiste ma è vuoto (pezzo scaricato da tavola)
If EgtGetFirstInGroup(nIdPV) = GDB_ID.NULL Then
m_CurrProjPage.ClearMessage()
m_CurrProjPage.SetWarningMessage("Pezzo in parcheggio (2)")
m_CurrProjPage.SetWarningMessage(EgtMsg(91211)) ' Pezzo in parcheggio (2)
Return
End If
' Devo verificare che sia una lavorazione solo di lama?
@@ -1017,7 +1017,7 @@ Public Class NestPageUC
AddPointRegBtn.IsChecked = False
Else
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Max spot for reg: " & m_nCountSpot.ToString)
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91212) & m_nCountSpot.ToString) ' Max spot for reg:
End If
ElseIf RemovePointRegBtn.IsChecked Then
' Verifico se selezionato indicativo di pezzo
@@ -1179,12 +1179,18 @@ Public Class NestPageUC
Exit While
Else
' verifico se l'elemento selezionato è il nome della tavola
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or
sNamePartId = SECOND_TAB Or
sNamePartId = THIRD_TAB Or
sNamePartId = FORTH_TAB) Then
' Apro la finestra per la selezione della tavola da usare
Dim nRes As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
' se non è stata eseguita nessuna scelta esco dal ciclo
If nRes = 0 Then Exit While
' imposto l'altra tavola
Dim sOtherTab = If(sNamePartId = MAIN_TAB, SECOND_TAB, MAIN_TAB)
' recupero il nome della tavola corrente
Dim sOtherTab As String = GetTableName(nRes)
EgtChangeTable(sOtherTab, True)
m_CurrProjPage.AdjustAdditionalTable(True)
EgtSetMachineLook(MCH_LOOK.TAB)
@@ -2997,11 +3003,12 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
If ParkIndBtn.IsChecked Then
m_SelParkInd.UpdateList()
End If
UpdateImageParkInd()
' abilito la notofica di modifica
UpdateImageParkInd(False)
End Sub
' Aggiorna immagine e restituisce il numero di parcheggi (+1) disponibili (+1 perchè conto anche il comando All_Off)
Private Function UpdateImageParkInd() As Integer
Private Function UpdateImageParkInd(Optional bDisableModified As Boolean = True) As Integer
' Carcico la lista dei parcheggi
Dim ListparkInd As New List(Of ParkInd)
SelParkIndWD.LoadParkInd(ListparkInd)
@@ -3016,6 +3023,11 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
End If
ParkIndImg.Source = ImageConverter.ConvertFromString(s)
Else
Dim bOldEnMod As Boolean = False
If bDisableModified Then
bOldEnMod = EgtGetEnableModified()
If bOldEnMod Then EgtDisableModified()
End If
' Se il comando non è abilitato allora provvedo a selezionare il primo parcheggio
Dim CurrparkInd As ParkInd = SelParkIndWD.GetCurrentParkIndSelected()
If Not IsNothing(CurrparkInd) Then
@@ -3026,6 +3038,8 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
SelParkIndWD.SetStatusPartInParkInd(ListparkInd(1), True)
End If
End If
' Se necessario, ripristino precedente impostazione modificato
If bOldEnMod Then EgtEnableModified()
End If
Return nCount
End Function
@@ -3174,7 +3188,8 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
If Not IsNothing(m_SelParkInd) Then
m_SelParkInd.UpdateList()
End If
UpdateImageParkInd()
' abilito la notofica di modifica
UpdateImageParkInd(False)
End Sub
@@ -3701,7 +3716,7 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
' Verifico che almeno un punto sia stato inserito
If m_nCountSpotCUT < 1 Then
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Insert one spot reg to start.")
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91213)) ' Insert one spot reg to start.
End If
' recupero l'elenco non ordinato degli Id dei punti SpotReg (da Office)
+2 -2
View File
@@ -33,8 +33,8 @@
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
TitleWDTxbl.Text = "Selection parts"
NbrOfPartsMsg.Text = "Number of parts"
TitleWDTxbl.Text = EgtUILib.EgtMsg(91232) ' Selection parts
NbrOfPartsMsg.Text = EgtUILib.EgtMsg(91233) ' Number of parts
NbrOfParts.Text = m_NumberOfParts.ToString
End Sub
+82
View File
@@ -0,0 +1,82 @@
<Window x:Class="SelectTableWD"
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}"
Title="ChooseTool" Height="282.6" Width="326.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<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="1.5*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="1.0*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="Title" Grid.Row="1" Grid.Column="1"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<ItemsControl Name="TableList"
Grid.Row="2" Grid.Column="1">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="TabGrp"
IsChecked="{Binding IsActive}"
Width="60" Height="60">
<RadioButton.Style>
<Style TargetType="ToggleButton" BasedOn="{StaticResource OmagCut_ToggleButton}">
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Foreground" Value="white"/>
<Setter Property="Background" Value="{StaticResource OmagCut_Blue}"/>
</Trigger>
</Style.Triggers>
</Style>
</RadioButton.Style>
<Grid>
<TextBlock Text="{Binding sName}" Background="Transparent"/>
<Image Source="{Binding ImgTab}" Margin="0,10,0,0"
Style="{StaticResource OmagCut_ButtonIcon}"/>
</Grid>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Grid.Column="1" Grid.Row="4">
<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" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
+96
View File
@@ -0,0 +1,96 @@
Imports System.ComponentModel
Public Class SelectTableWD
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private m_nSelectedTable As Integer = 0
Public ReadOnly Property nSelectedTable As Integer
Get
Return m_nSelectedTable
End Get
End Property
Sub New(Owner As Window)
Me.Owner = Owner
Me.WindowStartupLocation = WindowStartupLocation.CenterOwner
InitializeComponent()
End Sub
Public CurrTableList As New List(Of TableToChange)
Private Sub ChangeTable_Initialized() Handles Me.Initialized
Title.Text = EgtUILib.EgtMsg(91234) ' Seleziona la tavola da usare
' recuepero l'inidce della tavola corrente
Dim nIndeXCurrTab As Integer = GetCurrentTable()
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
For nInd As Integer = 0 To GetTableCount() - 1
CurrTableList.Add(New TableToChange("Tab", (nInd + 1).ToString, ((nInd + 1) = nIndeXCurrTab)))
Next
End Sub
Private Sub ChangeTable_Loaded() Handles Me.Loaded
TableList.ItemsSource = CurrTableList
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
' recupero l'indice della tavola impostata
For Each ItemTab As TableToChange In CurrTableList
If ItemTab.IsActive Then
m_nSelectedTable = ItemTab.nIndex
Exit For
End If
Next
DialogResult = True
End Sub
End Class
Public Class TableToChange
Implements INotifyPropertyChanged
Private Property m_sName As String = "Tab"
Public ReadOnly Property sName As String
Get
Return m_sName
End Get
End Property
Public ReadOnly Property ImgTab As String
Get
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\table.png"
End Get
End Property
Private Property m_nIndex As Integer = 3
Public ReadOnly Property nIndex As Integer
Get
Return m_nIndex
End Get
End Property
Private m_bIsActive As Boolean = False
Public Property IsActive As Boolean
Get
Return m_bIsActive
End Get
Set(value As Boolean)
m_bIsActive = value
NotifyPropertyChanged("IsActive")
End Set
End Property
Public Sub New(Name As String, Ind As Integer, IsCurrent As Boolean)
m_sName = Name & " " & Ind.ToString
m_nIndex = Ind
m_bIsActive = IsCurrent
NotifyPropertyChanged("IsActive")
End Sub
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class
+5 -141
View File
@@ -38,6 +38,8 @@ Public Module SplitAuto
Public m_vtDir As Vector3d
' ver 2.6f4: tagli corti gestiti con LeadIn.OUT/LeadOut.OUT
Public m_bMngLeadInOnIntCorner As Boolean
' ver 2.7e1: tagli finali
Public m_bFinalCut As Boolean
End Class
'-----------------------------------------------------------------------------------------------
@@ -51,146 +53,6 @@ Public Module SplitAuto
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
Dim Mach As New SplitMach
If CreateMach(Mach, nOperId) Then MachSplitList.Add(Mach)
'' se appartiene ad un grezzo attivo la inserisco in lista
'If IsMachiningInActiveRaw(nOperId) Then
' Dim Mach As New SplitMach
' Mach.m_nEntId = GDB_ID.NULL
' ' identificativo
' Mach.m_nId = nOperId
' ' eventuali lavorazioni inglobate
' Dim sInfo As String = String.Empty
' If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
' Dim sItems() As String = sInfo.Split(",".ToCharArray)
' For Each sId As String In sItems
' Dim nId As Integer = 0
' StringToInt(sId, nId)
' If nId > 0 Then Mach.m_vOthId.Add(nId)
' Next
' End If
' ' tipo
' Mach.m_nType = EgtGetOperationType(nOperId)
' ' layer di origine
' EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
' ' se taglio con lama
' If Mach.m_nType = MCH_OY.SAWING Then
' ' verifica interferenza
' If Mach.m_sLay = NAME_OUTLOOP Then
' EgtVerifyMachining(nOperId, Mach.m_nInterf)
' For Each nId As Integer In Mach.m_vOthId
' Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
' EgtVerifyMachining(nId, nRes)
' Mach.m_nInterf = Mach.m_nInterf Or nRes
' Next
' Else
' Mach.m_nInterf = FMI_TYPE.NONE
' End If
' ' la imposto come lavorazione corrente
' EgtSetCurrMachining(nOperId)
' ' inversione
' EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
' ' recupero l'angolo di fianco
' EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
' ' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
' Dim dStartAddLen As Double = -10
' EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
' Dim dEndAddLen As Double = -10
' EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
' ' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
' Mach.m_bIsLine = True
' Mach.m_dPrevAng = 0
' Mach.m_dNextAng = 0
' Mach.m_dStartFreeLen = FREELEN_INF + 1
' Mach.m_dEndFreeLen = FREELEN_INF + 1
' Dim nEntId, nSub As Integer
' If EgtGetMachiningGeometry(0, nEntId, nSub) Then
' ' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
' If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
' Mach.m_bEnableInvert = GetEnableInvert(nEntId)
' EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
' If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
' Mach.m_nEntId = nEntId
' EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
' End If
' ' verifico se trasformabile in un taglio di separazione (almeno da un lato)
' If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
' Mach.m_sLay = NAME_OUTLOOP And ( Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
' Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
' Dim bIn As Boolean = False
' Dim bOut As Boolean = False
' CanExtendSides(Mach, bIn, bOut)
' Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
' Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
' Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
' Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
' If nRes = 0 Then
' EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
' End If
' ElseIf (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
' Mach.m_sLay = NAME_OUTLOOP And
' (Mach.m_nInterf = FMI_TYPE.LI Or Mach.m_nInterf = FMI_TYPE.LO Or Mach.m_nInterf = FMI_TYPE.RM) Then
' Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
' Dim bIn As Boolean = False
' Dim bOut As Boolean = False
' CanExtendSides(Mach, bIn, bOut)
' ' And (nRes And CAR_RES.LI_OK) <> 0 : da aggiungere
' Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
' Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn And
' Mach.m_nInterf <> FMI_TYPE.LI
' ' And (nRes And CAR_RES.LO_OK) <> 0 : da aggiungere come sopra
' Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
' Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut And
' Mach.m_nInterf <> FMI_TYPE.LO
' If nRes = 0 Then
' EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
' End If
' End If
' ' se trasformabile in taglio di separazione, verifico se lo è
' If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
' EgtSetCurrMachining(nOperId)
' Dim nLiType As Integer
' EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
' Dim nLoType As Integer
' EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
' Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
' Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
' Else
' Mach.m_bStartAll = False
' Mach.m_bEndAll = False
' End If
' ' Waterjet
' ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
' Mach.m_nInterf = FMI_TYPE.NONE
' ' recupero l'angolo di fianco
' EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
' Mach.m_bCanStartAll = False
' Mach.m_bCanEndAll = False
' Mach.m_bStartAll = False
' Mach.m_bEndAll = False
' ' Forature e fresature
' Else
' Mach.m_nInterf = FMI_TYPE.NONE
' Mach.m_dSideAng = 0
' Mach.m_bCanStartAll = False
' Mach.m_bCanEndAll = False
' Mach.m_bStartAll = False
' Mach.m_bEndAll = False
' End If
' ' abilitazione
' Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
' ' pausa
' Mach.m_bPause = GetPause(nOperId)
' ' inserisco in lista
' MachSplitList.Add(Mach)
' ' altrimenti la disattivo
'Else
' EgtSetOperationMode(nOperId, False)
'End If
End If
nOperId = EgtGetNextOperation(nOperId)
End While
@@ -262,6 +124,8 @@ Public Module SplitAuto
Mach.m_nEntId = nEntId
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
End If
Mach.m_bFinalCut = False
EgtGetInfo(nOperId, "FinalCut", Mach.m_bFinalCut)
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
Mach.m_sLay = NAME_OUTLOOP And (Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
@@ -429,7 +293,7 @@ Public Module SplitAuto
' Se macchina con cambio utensile di lama
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
Dim sSawing As String = String.Empty, sSaw As String = String.Empty
m_MainWindow.m_CadCutPageUC.m_SplitPage.GetCurrSawingandSaw(nOperId, sSawing, sSaw)
m_MainWindow.m_CadCutPageUC.m_SplitPage.GetCurrSawingAndSaw(nOperId, sSawing, sSaw)
' Setto l'utensile corrente
EgtTdbSetCurrTool(sSaw)
' recupero il colore della lavorazione direttamente dall'utensile
+44 -24
View File
@@ -93,8 +93,8 @@ Public Class SplitPageUC
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) ' Modifica
AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto
RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart
BridgesWJBtn.ToolTip = "Bridges"
BridgesDeleteWJBtn.ToolTip = "Remove bridges"
BridgesWJBtn.ToolTip = EgtMsg(91214) ' Bridges
BridgesDeleteWJBtn.ToolTip = EgtMsg(91215) ' Remove bridges
End Sub
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
@@ -201,8 +201,9 @@ Public Class SplitPageUC
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
sText = EgtMsg(90791) & " " & i.ToString()
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
If Mach.m_bFinalCut Then AddFinalText(sText)
Else
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
End If
If Mach.m_bPause Then AddPauseText(sText)
AddItemToList(i, Mach, sText, MCH_OY.SAWING)
@@ -236,7 +237,7 @@ Public Class SplitPageUC
' Visualizzo la posizione utensile solo se configurata
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
Dim sSawing As String = String.Empty, sSaw As String = String.Empty
GetCurrSawingandSaw(Mach.m_nId, sSawing, sSaw)
GetCurrSawingAndSaw(Mach.m_nId, sSawing, sSaw)
' Verifico che sia montata su un portautensile
EgtTdbSetCurrTool(sSaw)
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
@@ -277,7 +278,7 @@ Public Class SplitPageUC
' recupero il nome del Layer
EgtGetName(nIdParent, sLayer)
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
If sLayer = NAME_OUTLOOP Then
If sLayer = NAME_OUTLOOP Or sLayer = "WjRectification" Then
If (EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE) AndAlso VerifySideIsAcceptable(nIdMy) Then
If m_nIdSelectedSideWJ <> GDB_ID.NULL Or m_nIdSelectedSideWJ = nIdMy Then
EgtDeselectObj(m_nIdSelectedSideWJ)
@@ -310,7 +311,7 @@ Public Class SplitPageUC
m_nIdSelectedSideWJ = GDB_ID.NULL
nIdParentPart = GDB_ID.NULL
m_CurrProjPage.ClearMessage()
m_CurrProjPage.SetWarningMessage("Bridge intersects part")
m_CurrProjPage.SetWarningMessage(EgtMsg(91216)) ' Bridge intersects part
Return
End If
End If
@@ -401,21 +402,22 @@ Public Class SplitPageUC
Private Function VerifySideIsAcceptable(nMyId As Integer) As Boolean
Dim dVal As Double = 0
' verifico che l'entità selezionata non contenga questi parametri
If EgtGetInfo(nMyId, INFO_SIDE_ANGLE2, dVal) Then
If dVal <> 0 Then
Return False
End If
End If
' If EgtGetInfo(nMyId, INFO_SIDE_ANGLE2, dVal) Then
' If dVal <> 0 Then
' Return False
' End If
' End If
If EgtGetInfo(nMyId, INFO_SIDE_ANGLE, dVal) Then
If dVal <> 0 Then
Return False
End If
End If
If EgtGetInfo(nMyId, INFO_ORIG_SIDE_ANGLE, dVal) Then
If dVal <> 0 Then
Return False
End If
End If
' ' Non bastano i controlli sopra...?
' If EgtGetInfo(nMyId, INFO_ORIG_SIDE_ANGLE, dVal) Then
' If dVal <> 0 Then
' Return False
' End If
' End If
' altrimenti l'entità è accettabile
Return True
End Function
@@ -654,8 +656,15 @@ Public Class SplitPageUC
Dim SubEntId As Integer = GDB_ID.NULL
EgtSetCurrMachining(nMchId)
If Not EgtGetMachiningGeometry(0, EntId, SubEntId) Then Return
' verifico se la lavorazione selezionata ha un angolo di inclinazione
Dim dSideAng As Double = 0.0
EgtGetMachiningParam(MCH_MP.SIDEANGLE, dSideAng)
Dim sDefMach As String = DEF_MACHINING
If Math.Abs(dSideAng) > 0 Then
sDefMach = DEF_MACHINING_TILTED
End If
' Recupero il nome della lavorazione
EgtGetInfo(EntId, DEF_MACHINING, sSawing)
EgtGetInfo(EntId, sDefMach, sSawing)
' Apro pagina di selezione della lavorazione
Dim m_ChangeToolPage = New ChangeToolWD(m_MainWindow)
@@ -666,7 +675,7 @@ Public Class SplitPageUC
' se seleziono "Ok" allora resetto tutte le lavorazioni del progetto
If m_ChangeToolPage.DialogResult Then
EgtSetInfo(EntId, DEF_MACHINING, m_ChangeToolPage.NewSawing)
EgtSetInfo(EntId, sDefMach, m_ChangeToolPage.NewSawing)
Dim Index As Integer = 0
For Index = 0 To m_MachiningList.Count() - 1
If m_MachiningList(Index).m_nId = nMchId Then
@@ -696,13 +705,20 @@ Public Class SplitPageUC
End If
End Sub
Public Sub GetCurrSawingandSaw(ByVal nMchId As Integer, ByRef sSawing As String, ByRef sNameTool As String)
Public Sub GetCurrSawingAndSaw(ByVal nMchId As Integer, ByRef sSawing As String, ByRef sNameTool As String)
Dim EntId As Integer = GDB_ID.NULL
Dim SubEntId As Integer = GDB_ID.NULL
EgtSetCurrMachining(nMchId)
If Not EgtGetMachiningGeometry(0, EntId, SubEntId) Then Return
' verifico se la lavorazione selezionata ha un angolo di inclinazione
Dim dSideAng As Double = 0.0
EgtGetMachiningParam(MCH_MP.SIDEANGLE, dSideAng)
Dim sDefMach As String = DEF_MACHINING
If Math.Abs(dSideAng) > EPS_ANG_SMALL Then
sDefMach = DEF_MACHINING_TILTED
End If
' Eventualmente recupero il nome della lavorazione
EgtGetInfo(EntId, DEF_MACHINING, sSawing)
EgtGetInfo(EntId, sDefMach, sSawing)
If String.IsNullOrEmpty(sSawing) Then sSawing = m_MainWindow.m_CurrentMachine.sCurrSawing
' Imposto la lavorazione corrente
EgtMdbSetCurrMachining(sSawing)
@@ -845,7 +861,11 @@ Public Class SplitPageUC
End Sub
Private Sub AddTopText(ByRef sName As String)
sName &= " Top"
sName &= EgtMsg(91217) ' Top
End Sub
Private Sub AddFinalText(ByRef sName As String)
sName = "Final " & sName
End Sub
Private Sub RemovePauseText(ByRef sName As String)
@@ -931,12 +951,12 @@ Public Class SplitPageUC
Private Sub SetLayNbArrTgBtn_Click()
If LayNbArrTgBtn.IsChecked Then
StatusOffNumbArrow(GDB_ST.ON_)
LayNbArrTgBtn.ToolTip = "Hide"
LayNbArrTgBtn.ToolTip = EgtMsg(91218) ' Hide
Dim Img As ImageSource = ImageConverter.ConvertFromString("pack://application:,,,/Resources/NewIcons/LightArrowOn.png")
LayNbArrImg.Source = Img
Else
StatusOffNumbArrow(GDB_ST.OFF)
LayNbArrTgBtn.ToolTip = "Show"
LayNbArrTgBtn.ToolTip = EgtMsg(91219) ' Show
Dim Img As ImageSource = ImageConverter.ConvertFromString("pack://application:,,,/Resources/NewIcons/LightArrowOff.png")
LayNbArrImg.Source = Img
End If
@@ -2420,7 +2440,7 @@ Public Class SplitPageUC
' eventualmente stampo messaggio
If Not m_bAreHomogeneous Then
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Lavorazioni non omogenee")
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91220)) ' Lavorazioni non omogenee
Else
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
End If
+3
View File
@@ -112,6 +112,7 @@ Module ConstGen
Public Const MAIN_TAB As String = "MainTab"
Public Const SECOND_TAB As String = "2ndTab"
Public Const THIRD_TAB As String = "3rdTab"
Public Const FORTH_TAB As String = "4thTab"
' Nome tavola ausiliaria per spostamento finale pezzi
Public Const AUX_TAB As String = "AuxTab"
@@ -326,6 +327,8 @@ Module ConstGen
Public Const SPLIT_CUT As String = "SplitCut"
' Forzo specifica lavorazione
Public Const DEF_MACHINING As String = "Def_Machining"
' Forzo specifica lavorazione solo per tagli con inclinazione
Public Const DEF_MACHINING_TILTED As String = "Def_Machining_Tilted"
' Nome di pezzo che è una cornice
Public Const NAME_FRAME As String = "Frame"
+5
View File
@@ -284,6 +284,8 @@ Module ConstIni
Public Const K_MACHINESDIR As String = "MachinesDir"
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
Public Const K_CURRMACH As String = "CurrMach"
Public Const K_ENABLEFINALSAWCUT As String = "EnableFinalSawCut"
Public Const K_FINALDEPTH As String = "FinalDepth"
Public Const S_SIMUL As String = "Simul"
Public Const K_SLIDERX As String = "SliderX"
@@ -354,6 +356,9 @@ Module ConstIni
Public Const K_DC_OFFSET_SQUARING As String = "OffsetSquaring"
Public Const K_DC_EXTRA_LEN_SQUARING As String = "ExtraLenSquaring"
Public Const K_ENABLEINVERT As String = "EnableInvert"
Public Const K_ENABLECUSTOMGRID As String = "EnableCustomGrid"
Public Const K_GRIDNUMDIMXCUSTOM As String = "GridNumDimXCustom"
Public Const K_GRIDNUMDIMYCUSTOM As String = "GridNumDimYCustom"
Public Const S_STATDATA As String = "StatData"
Public Const K_SD_DAY As String = "Day"
+1
View File
@@ -173,6 +173,7 @@
Public Const K_ADDITIONALTABLE As String = "AdditionalTable"
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
Public Const K_TAB4_ADDITIONALTABLE As String = "Tab4AdditionalTable"
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
Public Const K_CHANGETABWD As String = "ChangeTabWD"
+1
View File
@@ -78,6 +78,7 @@ Public Class ControlsDirectCutUC
' Costruisco la finestra per il nuovo tipo di taglio manuale
m_SingleCutAuto = New SingleCutAuto
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
m_MachineButtons.SetValue(Grid.RowProperty, 2)
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
+80
View File
@@ -0,0 +1,80 @@
<UserControl x:Class="CustomGridUC"
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}"
Background="#636974">
<Grid Name ="CustomGrid" Grid.Row="5" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="2.5*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<UniformGrid Grid.Row="0"
Grid.ColumnSpan="2"
Columns="4"
Margin="2,2,0,2">
<Button Name="AddCutBtn" Content="+"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<Button Name="RemoveCutBtn" Content="-"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<ToggleButton Name="Cut_XTgBtn" Content="X"
Style="{DynamicResource OmagCut_YellowToggleButton}"
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<ToggleButton Name="Cut_YTgBtn" Content="Y"
Style="{DynamicResource OmagCut_YellowToggleButton}"
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
</UniformGrid>
<TextBlock Name="NumPzXTxBl" Text="Number" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="DimPzXTxBl" Text="Dimension" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<ScrollViewer Background="Transparent" Grid.Row="2"
Grid.ColumnSpan="2"
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<ListBox Name="CustomGridLstBx" ScrollViewer.CanContentScroll="False">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Width="210">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Text="{Binding sNumber}" Grid.Column="0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Text="{Binding sInteraxis}" Grid.Column="2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
</ScrollViewer>
<UniformGrid Grid.Row="3"
Grid.ColumnSpan="2"
Columns="2"
Margin="0,2,0,2">
<Button Name="UpdateBtn" Content="Update"
Style="{DynamicResource OmagCut_YellowTextButton}"/>
<Button Name="ExitBtn" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</UniformGrid>
</Grid>
</UserControl>
+78
View File
@@ -0,0 +1,78 @@
Imports EgtUILib
Public Class CustomGridUC
#Region "FIELDS & PROPERTIES"
' Riferimento a GridCut
Private m_refGridCut As GridCut
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(GC As GridCut)
InitializeComponent()
m_refGridCut = GC
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_X
Cut_XTgBtn.IsChecked = True
End Sub
#End Region ' Constructor
#Region "EVENTS"
Private Sub CutX_Selected() Handles Cut_XTgBtn.Click
If Cut_XTgBtn.IsChecked Then
Cut_YTgBtn.IsChecked = False
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_X
CustomGridLstBx.UpdateLayout()
End If
End Sub
Private Sub CutY_Selected() Handles Cut_YTgBtn.Click
If Cut_YTgBtn.IsChecked Then
Cut_XTgBtn.IsChecked = False
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_Y
CustomGridLstBx.UpdateLayout()
End If
End Sub
Private Sub AddCut_Click(sender As Object, e As EventArgs) Handles AddCutBtn.Click
If Cut_XTgBtn.IsChecked Then
m_refGridCut.m_ListOfCut_X.Add(New Cut_Axis(0, 0))
ElseIf Cut_YTgBtn.IsChecked Then
m_refGridCut.m_ListOfCut_Y.Add(New Cut_Axis(0, 0))
End If
CustomGridLstBx.UpdateLayout()
End Sub
Private Sub RemoveCut_Click(sender As Object, e As EventArgs) Handles RemoveCutBtn.Click
Dim CurrIndexListSelected As Integer = -1
CurrIndexListSelected = CustomGridLstBx.SelectedIndex
If Cut_XTgBtn.IsChecked Then
If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_refGridCut.m_ListOfCut_X.Count - 1 Then
CurrIndexListSelected = m_refGridCut.m_ListOfCut_X.Count - 1
End If
m_refGridCut.m_ListOfCut_X.RemoveAt(CurrIndexListSelected)
ElseIf Cut_YTgBtn.IsChecked Then
If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_refGridCut.m_ListOfCut_Y.Count - 1 Then
CurrIndexListSelected = m_refGridCut.m_ListOfCut_Y.Count - 1
End If
m_refGridCut.m_ListOfCut_Y.RemoveAt(CurrIndexListSelected)
End If
CustomGridLstBx.UpdateLayout()
End Sub
Public Sub Update_Click() Handles UpdateBtn.Click
m_refGridCut.CreateGridCut()
EgtDraw()
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
m_refGridCut.SingleCutGrid.Children.Remove(Me)
End Sub
#End Region ' Events
End Class
+2 -2
View File
@@ -179,11 +179,11 @@ Public Class DirectCutPageUC
Case K_REMOTE
RemoteBtn.Visibility = Visibility.Visible
RemoteBtn.Foreground = Brushes.White
RemoteBtn.Content = "Remote"
RemoteBtn.Content = EgtMsg(90262) 'Remote
Case K_PARKING
ParkingBtn.Visibility = Visibility.Visible
ParkingBtn.Foreground = Brushes.White
ParkingBtn.ToolTip = "Parking"
ParkingBtn.ToolTip = EgtMsg(90263) 'Parking
End Select
Next
End Sub
+12 -7
View File
@@ -1,6 +1,7 @@
Imports System.Reflection
Imports EgtUILib
Imports EgtUILib.EgtInterface
Imports OmagCUT.MainWindow
Public Class FlatteningCut
@@ -11,6 +12,8 @@ Public Class FlatteningCut
Private m_bActive As Boolean = False
' Flag di simulazione in corso
Private m_bSimul As Boolean = False
' Definizione del taglio diretto di questa pagina
Private Const FLATTENING As String = "Flattening"
' Origine tavola e dati grezzo
Private m_bRawOk As Boolean = False
@@ -100,15 +103,15 @@ Public Class FlatteningCut
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
WidthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 26)
OverlapTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 27)
ZReleasedTxBl.Text = "Z Svincolo"
ZReleasedTxBl.Text = EgtMsg(91235) 'Z Svincolo
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
ChainedPathTxBl.Text = "Chained path"
ChainedPathTxBl.Text = EgtMsg(91236) 'Chained path
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
' tipo di utensile in uso per la lavorazione
m_ToolsArray(TOOL.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
m_ToolsArray(TOOL.MILL) = "Mill"
m_ToolsArray(TOOL.MILL) = EgtMsg(91237) 'Mill
SelToolCmBx.ItemsSource = m_ToolsArray
' Carico i dati dell'ultimo taglio
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
@@ -725,7 +728,8 @@ Public Class FlatteningCut
Dim ptStart As Point3d = m_ptTipP1
ptStart.z = 0
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
EgtSetInfo(nCutId, INFO_DIRECTCUT, 1)
' Inidico che è un taglio Diretto di tipo Flattening
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
If (m_nTool = TOOL.MILL) Then
@@ -844,8 +848,8 @@ Public Class FlatteningCut
End If
End If
End If
CutsList.Add(nCut2Id)
End If
CutsList.Add(nCut2Id)
End If
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
Next
@@ -876,7 +880,8 @@ Public Class FlatteningCut
Dim ptNear As Point3d
EgtStartPoint(CutsList(0), ptNear)
Dim IdJointCurv As Integer = EgtCreateCurveCompoByChain(nLayerId, CutsList.ToArray, ptNear, True)
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, 1)
' Inidico che è un taglio Diretto di tipo Flattening
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
EgtSetInfo(IdJointCurv, INFO_STEP_TYPE, m_nMachType)
EgtSetInfo(IdJointCurv, INFO_WIDTH, dThick)
' Se unisco il percorso devo per forza usare la fresa!
+117 -51
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="GridCut"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
@@ -34,19 +34,19 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point1Btn" Grid.Column="0"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
<ToggleButton Name="Point2Btn" Grid.Column="1"
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</Grid>
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
Margin="6,0,6,0">
Margin="6,0,6,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
@@ -55,21 +55,22 @@
</ComboBox>
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Row="5" Grid.ColumnSpan="2">
<!-- STANDARD -->
<Grid Name ="StandardGrid" Grid.Row="5" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="2"/>
@@ -85,31 +86,98 @@
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" Background="Black" />
<TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="0"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}" />
Style="{StaticResource OmagCut_CalculatorTextBox}" />
<TextBlock Name="NumPzYTxBl" Grid.Column="0" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
Style="{StaticResource OmagCut_CalculatorTextBox}" />
Style="{StaticResource OmagCut_CalculatorTextBox}" />
</Grid>
<Button Name="CustomGridBtn" Grid.Row="5" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}"
Margin="10,30,10,30">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" Height="90" Width="90" />
<TextBlock Name="GridCutTxt" Grid.Column="1"
HorizontalAlignment="Left"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</Grid>
</Button>
<!-- SPECIALE -->
<!--<Grid Name ="CustomGrid" Grid.Row="5" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="2.5*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0">
<Button Name="AddCutBtn" Content="+"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="35" Height="35" HorizontalAlignment="Left"/>
<Button Name="RemoveCutBtn" Content="-"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<ToggleButton Name="Cut_XTgBtn" Content="X"
Style="{DynamicResource OmagCut_YellowToggleButton}"
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<ToggleButton Name="Cut_YTgBtn" Content="Y"
Style="{DynamicResource OmagCut_YellowToggleButton}"
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
<Button Name="UpdateBtn" Content="Update"
Style="{DynamicResource OmagCut_YellowTextButton}"
Width="85" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
</StackPanel>
<ScrollViewer Background="Transparent" Grid.Row="1"
Margin="0,5,0,0"
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<ListBox Name="CustomGridLstBx" ScrollViewer.CanContentScroll="False">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Width="210">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Text="{Binding sNumber}" Grid.Column="0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Text="{Binding sInteraxis}" Grid.Column="2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
</ScrollViewer>
</Grid>-->
<TextBlock Name="SideTxBl" Grid.Row="6" Grid.ColumnSpan="2"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
HorizontalAlignment="Right" Margin="0,0,6,0"/>
<Grid Grid.Row="7" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
@@ -119,13 +187,13 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</Grid>
<Grid Grid.Row="11" Grid.ColumnSpan="2">
@@ -135,19 +203,17 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</UserControl>
+348 -39
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Imports System.Collections.ObjectModel
Public Class GridCut
' Riferimenti a pagine
@@ -41,6 +42,12 @@ Public Class GridCut
' Gestione spessore lama
Private m_bSawTh As Boolean = False
' Gestione griglia Custom
Dim m_bCustomGrid As Boolean = False
Public m_ListOfCut_X As New ObservableCollection(Of Cut_Axis)
Public m_ListOfCut_Y As New ObservableCollection(Of Cut_Axis)
Friend m_CustomGrid As CustomGridUC
' Costanti
Private Const MAX_TAB_DEPTH As Double = 10.0
Private Const MIN_CUT_LEN As Double = 10.0
@@ -77,22 +84,59 @@ Public Class GridCut
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
GridCutTxt.Text = EgtMsg(90264)
' Carico i dati dell'ultimo taglio
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
m_nNumX = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
m_dDimX = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
m_nNumY = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
m_nNumX = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
m_nNumY = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
m_nNumX = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
m_nNumY = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
' Carico i dati per i tagli di griglia Custom
m_bCustomGrid = (GetPrivateProfileInt(S_DIRECTCUTS, K_ENABLECUSTOMGRID, 0, m_MainWindow.GetIniFile()) <> 0)
If m_bCustomGrid Then
LoadCustomData(K_GRIDNUMDIMXCUSTOM, m_ListOfCut_X)
LoadCustomData(K_GRIDNUMDIMYCUSTOM, m_ListOfCut_Y)
End If
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
End Sub
' Lettura dei dati della griglia Custom
Private Sub LoadCustomData(sIpKeyName As String, LocalList As ObservableCollection(Of Cut_Axis))
Dim dVal As Double = 0
Dim nVal As Integer = 0
Dim sVal As String = String.Empty
GetPrivateProfileString(S_DIRECTCUTS, sIpKeyName, sVal, sVal, m_MainWindow.GetIniFile())
Dim sItems As String() = sVal.Split(";"c)
If sItems.Count > 0 Then
For Each Item As String In sItems
Dim sSubItems As String() = Item.Split(",")
If sSubItems.Count = 2 Then
If IsNumeric(sSubItems(0)) And IsNumeric(sSubItems(1)) Then
nVal = CInt(sSubItems(0))
StringToDouble(sSubItems(1), dVal)
LocalList.Add(New Cut_Axis(nVal, dVal))
End If
End If
Next
End If
End Sub
Private Sub GridCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -131,7 +175,8 @@ Public Class GridCut
m_bPointP1Ok = False
m_bPointP2Ok = False
' Inizializzo primo punto acquisito dal disegno
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
m_ptPrev.z = m_ptRawMax.z
' Disegno crocetta che indica il punto acquisito
CreateCross(m_nTempLay, m_ptPrev)
@@ -140,13 +185,18 @@ Public Class GridCut
SetCoordVisibility(True)
ShowCoord()
' Assegno parametri di lavorazione
DepthTxBx.Text = LenToString( m_dDepth, 1)
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
SideAngleTxBx.Text = DoubleToString( m_dAngV, 2)
DepthTxBx.Text = LenToString(m_dDepth, 1)
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
DepthTxBx.Text = LenToString(m_dDepth, 1)
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
NumPzXTxBx.Text = m_nNumX.ToString()
DimPzXTxBx.Text = LenToString( m_dDimX, 1)
DimPzXTxBx.Text = LenToString(m_dDimX, 1)
DimPzXTxBx.Text = LenToString(m_dDimX, 1)
NumPzYTxBx.Text = m_nNumY.ToString()
DimPzYTxBx.Text = LenToString( m_dDimY, 1)
DimPzYTxBx.Text = LenToString(m_dDimY, 1)
DimPzYTxBx.Text = LenToString(m_dDimY, 1)
SideChBx.IsChecked = m_bHeadSide
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
@@ -162,21 +212,51 @@ Public Class GridCut
Point1Btn.IsChecked = False
' Aggiorno visualizzazione
EgtDraw()
If m_bCustomGrid Then
StandardGrid.Visibility = Visibility.Hidden
CustomGridBtn.Visibility = Visibility.Visible
m_CustomGrid = New CustomGridUC(Me)
'CustomGrid.Visibility = Visibility.Visible
'Cut_XTgBtn.IsChecked = True
'CustomGridLstBx.ItemsSource = m_ListOfCut_X
Else
StandardGrid.Visibility = Visibility.Visible
CustomGridBtn.Visibility = Visibility.Hidden
'CustomGrid.Visibility = Visibility.Hidden
End If
End Sub
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
' Salvo i dati correnti
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_ANGV, DoubleToString( m_dAngV, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DIMX, DoubleToString( m_dDimX, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DIMY, DoubleToString( m_dDimY, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, If( m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_POSY, DoubleToString( m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_ANGV, DoubleToString(m_dAngV, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DIMX, DoubleToString(m_dDimX, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DIMY, DoubleToString(m_dDimY, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_HEADSIDE, If(m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
If m_bCustomGrid Then
Dim sGridNumDimXCustom As String = ""
For Index_X As Integer = 0 To m_ListOfCut_X.Count - 1
sGridNumDimXCustom &= m_ListOfCut_X(Index_X).sNumber & "," & DoubleToString(m_ListOfCut_X(Index_X).dInteraxis, 2) & ";"
Next
If sGridNumDimXCustom <> "" Then sGridNumDimXCustom = sGridNumDimXCustom.Remove(sGridNumDimXCustom.Count - 1)
WritePrivateProfileString(S_DIRECTCUTS, "GridNumDimXCustom", sGridNumDimXCustom, m_MainWindow.GetIniFile())
Dim sGridNumDimYCustom As String = ""
For Index_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
sGridNumDimYCustom &= m_ListOfCut_Y(Index_Y).sNumber & "," & DoubleToString(m_ListOfCut_Y(Index_Y).dInteraxis, 2) & ";"
Next
If sGridNumDimYCustom <> "" Then sGridNumDimYCustom = sGridNumDimYCustom.Remove(sGridNumDimYCustom.Count - 1)
WritePrivateProfileString(S_DIRECTCUTS, "GridNumDimYCustom", sGridNumDimYCustom, m_MainWindow.GetIniFile())
End If
' Se non vado in simulazione
If Not m_bSimul Then
' Dichiaro sottopagina da non riattivare
@@ -315,7 +395,7 @@ Public Class GridCut
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
' Altrimenti punto da click di mouse
' Altrimenti punto da click di mouse
Else
' Assegno punto selezionato nel disegno a m_ptTipP1
m_ptTipP1 = m_ptPrev
@@ -405,7 +485,7 @@ Public Class GridCut
m_dAngV = 90 - dTAngV
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
' Altrimenti punto da click di mouse
' Altrimenti punto da click di mouse
Else
' Assegno punto selezionato nel disegno a m_ptTipP2
m_ptTipP2 = m_ptPrev
@@ -521,6 +601,64 @@ Public Class GridCut
EgtDraw()
End Sub
Private Sub CustomGridBtn_Click(sender As Object, e As RoutedEventArgs) Handles CustomGridBtn.Click
m_CustomGrid.SetValue(Grid.RowProperty, 1)
m_CustomGrid.SetValue(Grid.RowSpanProperty, 6)
m_CustomGrid.SetValue(Grid.ColumnSpanProperty, 2)
SingleCutGrid.Children.Add(m_CustomGrid)
End Sub
'#Region "CUSTOM LIST GRID"
' Private Sub CutX_Selected() Handles Cut_XTgBtn.Click
' If Cut_XTgBtn.IsChecked Then
' Cut_YTgBtn.IsChecked = False
' CustomGridLstBx.ItemsSource = m_ListOfCut_X
' CustomGridLstBx.UpdateLayout()
' End If
' End Sub
' Private Sub CutY_Selected() Handles Cut_YTgBtn.Click
' If Cut_YTgBtn.IsChecked Then
' Cut_XTgBtn.IsChecked = False
' CustomGridLstBx.ItemsSource = m_ListOfCut_Y
' CustomGridLstBx.UpdateLayout()
' End If
' End Sub
' Private Sub AddCut_Click(sender As Object, e As EventArgs) Handles AddCutBtn.Click
' If Cut_XTgBtn.IsChecked Then
' m_ListOfCut_X.Add(New Cut_Axis(0, 0))
' ElseIf Cut_YTgBtn.IsChecked Then
' m_ListOfCut_Y.Add(New Cut_Axis(0, 0))
' End If
' CustomGridLstBx.UpdateLayout()
' End Sub
' Private Sub RemoveCut_Click(sender As Object, e As EventArgs) Handles RemoveCutBtn.Click
' Dim CurrIndexListSelected As Integer = -1
' CurrIndexListSelected = CustomGridLstBx.SelectedIndex
' If Cut_XTgBtn.IsChecked Then
' If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_ListOfCut_X.Count - 1 Then
' CurrIndexListSelected = m_ListOfCut_X.Count - 1
' End If
' m_ListOfCut_X.RemoveAt(CurrIndexListSelected)
' ElseIf Cut_YTgBtn.IsChecked Then
' If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_ListOfCut_Y.Count - 1 Then
' CurrIndexListSelected = m_ListOfCut_Y.Count - 1
' End If
' m_ListOfCut_Y.RemoveAt(CurrIndexListSelected)
' End If
' CustomGridLstBx.UpdateLayout()
' End Sub
' Public Sub Update_Click() Handles UpdateBtn.Click
' CreateGridCut()
' EgtDraw()
' End Sub
'#End Region ' Custom Grid
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
' Verifico ci sia un taglio valido
If Not m_bCutOk Then Return
@@ -544,9 +682,9 @@ Public Class GridCut
m_CurrProjPage.SetWarningMessage("Trial Version")
#Else
' Verifico non sia versione Ufficio
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
m_CurrProjPage.SetWarningMessage( "Office Version")
Return
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
m_CurrProjPage.SetWarningMessage("Office Version")
Return
End If
' Verifico ci sia un taglio valido
If Not m_bCutOk Then Return
@@ -578,7 +716,7 @@ Public Class GridCut
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
End Sub
Private Function CreateGridCut() As Boolean
Friend Function CreateGridCut() As Boolean
' Verifico sia definito il punto iniziale e il grezzo
If Not m_bPointP1Ok Or Not m_bRawOk Then
m_bCutOk = False
@@ -630,11 +768,18 @@ Public Class GridCut
End Function
Private Function MultiplyCut(nLayerId As Integer) As Boolean
If m_bCustomGrid Then
Return MultiplyCut_1(nLayerId)
End If
Return MultiplyCut_0(nLayerId)
End Function
Private Function MultiplyCut_0(nLayerId As Integer) As Boolean
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
Dim nType As Integer = 0
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
Dim dThick As Double = 0
EgtTdbGetCurrToolParam( If( nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
' Ricalcolo lo spessore in base all'inclinazione
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
@@ -656,7 +801,8 @@ Public Class GridCut
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
' Inidico che è un taglio Diretto di tipo GridCut
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, MainWindow.FlagDirectCuts.GridCut)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
' Recupero spessore lama corrente
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
@@ -683,7 +829,8 @@ Public Class GridCut
' Arretro il punto di partenza di uno spessore lama
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
' Inidico che è un taglio Diretto di tipo GridCut
EgtSetInfo(nCutPerpId, INFO_DIRECTCUT, MainWindow.FlagDirectCuts.GridCut)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutPerpId, -dThick, OFF_TYPE.EXTEND)
@@ -711,6 +858,116 @@ Public Class GridCut
Return True
End Function
Private Function MultiplyCut_1(nLayerId As Integer) As Boolean
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
Dim nType As Integer = 0
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
Dim dThick As Double = 0
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
' Ricalcolo lo spessore in base all'inclinazione
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
Dim dRotAngOX As Double = If(SideChBx.IsChecked(), -90, 90)
' Recupero dati da interfaccia
Dim dDimPzX As Double = If(m_ListOfCut_X.Count = 0, 0.0, m_ListOfCut_X(0).dInteraxis)
Dim nNumPzX As Integer = If(m_ListOfCut_X.Count = 0, 0, m_ListOfCut_X(0).nNumber)
Dim dDimPzY As Double = If(m_ListOfCut_Y.Count = 0, 0.0, m_ListOfCut_Y(0).dInteraxis)
Dim nNumPzY As Integer = If(m_ListOfCut_Y.Count = 0, 0, m_ListOfCut_Y(0).nNumber)
Dim TotLenX As Double = 0
For Ind_X As Integer = 0 To m_ListOfCut_X.Count - 1
TotLenX = TotLenX + (m_ListOfCut_X(Ind_X).dInteraxis + dThick) * m_ListOfCut_X(Ind_X).nNumber
Next
Dim TotLenY As Double = 0
For Ind_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
TotLenY = TotLenY + (m_ListOfCut_Y(Ind_Y).dInteraxis + dThick) * m_ListOfCut_Y(Ind_Y).nNumber
Next
' Definisco vettore di spostamento
Dim vtDelta As Vector3d
' Calcolo primo taglio parallelo
Dim ptStart As Point3d = m_ptTipP1
ptStart.z = 0
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
' -------------- TAGLI PARALLELI ASSE Y --------------
Dim dLenX As Double = dThick + TotLenX
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
' Recupero spessore lama corrente
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutParaId, -dThick, OFF_TYPE.EXTEND)
End If
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
For IndexList_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
Dim nCut2Id As Integer = GDB_ID.NULL
dDimPzY = m_ListOfCut_Y(IndexList_Y).dInteraxis
nNumPzY = m_ListOfCut_Y(IndexList_Y).nNumber
' Calcolo vettore di spostamento
vtDelta = Vector3d.FromPolar((dDimPzY + dThick), m_dAngO)
' Ruoto il vettore di traslazione
vtDelta.Rotate(Vector3d.Z_AX, dRotAngOX)
For Index As Integer = 1 To nNumPzY
Dim vtPerpMove As Vector3d = Index * vtDelta
' Creo copie
nCut2Id = EgtCopyGlob(nCutParaId, nLayerId)
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
Next
nCutParaId = nCut2Id
Next
' -------------- TAGLI PARALLELI ASSE X --------------
' Calcolo primo taglio perpendicolare
Dim dLenY As Double = dThick + TotLenY
' Arretro il punto di partenza di uno spessore lama
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
EgtOffsetCurve(nCutPerpId, -dThick, OFF_TYPE.EXTEND)
End If
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
' Specchio se è attivo il flag che cambia lato di disegno
If SideChBx.IsChecked() Then
Dim vtRot As Vector3d = Vector3d.FromPolar(1, m_dAngO + 90)
EgtMirror(nCutPerpId, ptStart + Vector3d.FromPolar(dThick / 2, m_dAngO - 90), vtRot, GDB_RT.GLOB)
EgtInvertCurve(nCutPerpId)
End If
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutPerpId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutPerpId, INFO_SIDE_ANGLE, m_dAngV)
For IndexList_X As Integer = 0 To m_ListOfCut_X.Count - 1
Dim nCut3Id As Integer = GDB_ID.NULL
dDimPzX = m_ListOfCut_X(IndexList_X).dInteraxis
nNumPzX = m_ListOfCut_X(IndexList_X).nNumber
' Calcolo secondo vettore di spostamento
vtDelta = Vector3d.FromPolar((dDimPzX + dThick), m_dAngO)
For Index As Integer = 1 To nNumPzX
Dim vtPerpMove As Vector3d = vtDelta * Index
' Creo copie
nCut3Id = EgtCopyGlob(nCutPerpId, nLayerId)
EgtMove(nCut3Id, vtPerpMove, GDB_RT.GLOB)
Next
nCutPerpId = nCut3Id
Next
End If
Return True
End Function
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
ptP += New Vector3d(0, 0, 0.15)
' Aggiungo crocette
@@ -725,10 +982,10 @@ Public Class GridCut
Private Sub NumPzsTxBx_EgtClosed(sender As Object, e As EventArgs) Handles NumPzXTxBx.EgtClosed, NumPzYTxBx.EgtClosed,
DimPzXTxBx.EgtClosed, DimPzYTxBx.EgtClosed, SideChBx.Click
StringToInt( NumPzXTxBx.Text, m_nNumX)
StringToLen( DimPzXTxBx.Text, m_dDimX)
StringToInt( NumPzYTxBx.Text, m_nNumY)
StringToLen( DimPzYTxBx.Text, m_dDimY)
StringToInt(NumPzXTxBx.Text, m_nNumX)
StringToLen(DimPzXTxBx.Text, m_dDimX)
StringToInt(NumPzYTxBx.Text, m_nNumY)
StringToLen(DimPzYTxBx.Text, m_dDimY)
m_bHeadSide = SideChBx.IsChecked
' Disegno il taglio
CreateGridCut()
@@ -770,4 +1027,56 @@ Public Class GridCut
Return True
End Function
End Class
Public Class Cut_Axis
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
' Numero di tagli con questo interasse
Private m_nNumber As Integer = 0
Public Property sNumber As String
Get
Return m_nNumber.ToString
End Get
Set(value As String)
If IsNumeric(value) Then
m_nNumber = CInt(value)
End If
End Set
End Property
Public ReadOnly Property nNumber As Double
Get
Return m_nNumber
End Get
End Property
' Distanza dal taglio precedente
Private m_dInteraxis As Double = 0.0
Public Property sInteraxis As String
Get
Return LenToString(m_dInteraxis, 2)
End Get
Set(value As String)
Dim PrevValue As Double = m_dInteraxis
If Not StringToLen(value, m_dInteraxis) Then m_dInteraxis = PrevValue
End Set
End Property
Public ReadOnly Property dInteraxis As Double
Get
Return m_dInteraxis
End Get
End Property
'Public ReadOnly Property UpdateSub As Boolean
' Get
' m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_CustomGrid.Update_Click()
' Return True
' End Get
'End Property
Sub New(nNumb As Integer, dInter As Double)
m_nNumber = nNumb
m_dInteraxis = dInter
End Sub
End Class
+1 -1
View File
@@ -136,7 +136,7 @@ Public Class MachineButtonsUC
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
CurrToggleBtn.Content = "Z - B"
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
CurrToggleBtn.Content = "Remote"
CurrToggleBtn.Content = EgtMsg(90262) 'Remote
End If
Catch ex As Exception
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
+6 -1
View File
@@ -1,5 +1,6 @@
Imports System.Windows.Threading
Imports EgtUILib
Imports OmagCUT.MainWindow
Public Class SingleCutUC
@@ -147,6 +148,8 @@ Public Class SingleCutUC
' Deseleziono bottone primo punto
Point1Btn.IsChecked = False
' forzo la verifica dell'affondamento in relazione allo spessore del pezzo
DepthTxBx_EgtClosed(Nothing, Nothing)
' la visualizzazione dei comandi è gestita dalla DirectCutPageUC richiamando la funzione ReloadParam
' forzo la macchina ad essere visibile fin da subito
@@ -159,7 +162,7 @@ Public Class SingleCutUC
' Aggiorno visualizzazione
EgtDraw()
' Avvi il timer
' Avvio il timer
m_RefreshTimer.Start()
End Sub
@@ -672,6 +675,8 @@ Public Class SingleCutUC
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
' Inidico che è un taglio Diretto di tipo SingleCut
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleCut)
' Imposto se disabilitare l'inversine di direzione del taglio
If Not m_MainWindow.m_CurrentMachine.bEnableInvert Then EgtSetInfo(nCutId, INFO_ENABLE_INVERT, 0)
' Creo layer per crocetta di riferimento
+3 -1
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Imports OmagCUT.MainWindow
Imports System.Collections.ObjectModel
Public Class SingleDrillUC
' Riferimenti a pagine
@@ -438,7 +439,8 @@ Public Class SingleDrillUC
End If
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
' Inidico che è un taglio Diretto di tipo SingleDrill
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleDrill)
' Calcolo punto di inserimento nel grezzo
Dim ptMin, ptMax As Point3d
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
+3
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Imports OmagCUT.MainWindow
Public Class SquaringUC
@@ -368,6 +369,8 @@ Public Class SquaringUC
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
' Inidico che è un taglio Diretto di tipo Squaring
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, FlagDirectCuts.Squaring)
' Imposto affondamento e angolo di fianco sul taglio (solo se non lama STD)
If Not nType = MCH_TY.SAW_STD Then
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
+10 -10
View File
@@ -29,43 +29,43 @@
</Grid.RowDefinitions>
<TextBlock Name="Label1" Grid.Row="0"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox1" Grid.Column="1" Grid.Row="0" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label2" Grid.Row="1"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox2" Grid.Column="1" Grid.Row="1" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label3" Grid.Row="2"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox3" Grid.Column="1" Grid.Row="2" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label4" Grid.Row="3"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox4" Grid.Column="1" Grid.Row="3" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label5" Grid.Row="4"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox5" Grid.Column="1" Grid.Row="4" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label6" Grid.Row="5"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox6" Grid.Column="1" Grid.Row="5" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label7" Grid.Row="6"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox7" Grid.Column="1" Grid.Row="6" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label8" Grid.Row="7"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox8" Grid.Column="1" Grid.Row="7" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label9" Grid.Row="8"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox9" Grid.Column="1" Grid.Row="8" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Label10" Grid.Row="9"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="TextBox10" Grid.Column="1" Grid.Row="9" Width="90"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
+2 -2
View File
@@ -95,7 +95,7 @@
<Grid Name="TopGrd">
<TextBlock Name="TopTxBl"
Style="{StaticResource OmagCut_ToolsDBTextBlock}" />
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
<CheckBox Name="TopChBx" Style="{StaticResource OmagCut_CheckBox}"
HorizontalAlignment="Right" Margin="6,0,6,0"/>
@@ -122,7 +122,7 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
TextAlignment="Right"/>
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
+4 -4
View File
@@ -84,13 +84,13 @@ 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
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) 'Inclina lati
FiloTopBtn.Content = EgtMsg(90400) 'Filo Top
FiloTopBtn.Content = EgtMsg(90400) 'Filo Top
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
EngraveBtn.Content = "Engrave"
EngraveBtn.Content = EgtMsg(91238) 'Engrave
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
Cad2dBtn.Content = "Cad 2d"
+1 -1
View File
@@ -228,7 +228,7 @@ Module SideAngle
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)
EgtSetInfo(EntId, DEF_MACHINING_TILTED, sSawingTilted)
End If
End If
End If
+83
View File
@@ -0,0 +1,83 @@
<Window x:Class="SideAngleOneForAllWindow"
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}"
Title="ChooseTool" Height="255.9" Width="426.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.7*"/>
<RowDefinition Height="0.3*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="TitleTxBl"
Grid.ColumnSpan="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<Grid Grid.Row="1"
Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="A °"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<TextBlock Grid.Column="1"
Text="T"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<ComboBox Grid.Row="1"
Name="SideAngleOneForAllCBx"
Margin="10,0,10,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="20"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox Grid.Row="1"
Grid.Column="1"
Name="SideHeelOneForAllCBx"
Margin="10,0,10,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="20"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" 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" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
@@ -0,0 +1,20 @@
Public Class SideAngleOneForAllWindow
Sub New()
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
TitleTxBl.Text = EgtUILib.EgtMsg(91253)
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
DialogResult = True
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
DialogResult = False
End Sub
End Class
+135 -126
View File
@@ -1,17 +1,17 @@
<UserControl x:Class="SideAngleUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="636.9" d:DesignWidth="255.9">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="636.9" d:DesignWidth="255.9">
<!-- Definizione della Grid Laterale -->
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.2*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
@@ -34,182 +34,191 @@
<RowDefinition Height="0.5*"/>-->
</Grid.RowDefinitions>
<Grid>
<Grid Name="SideAngleGrid" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.4*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.4*"/>
<!--<ColumnDefinition Width="0.4*"/>-->
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.8*"/>
</Grid.ColumnDefinitions>
<Button Name="PrevBtn" Grid.Column="1" Margin="4,0,4,0" Padding="0" Content="&lt;" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="NextBtn" Grid.Column="2" Margin="4,0,4,0" Padding="0" Content="&gt;" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="PrevBtn" Grid.Column="0" Margin="2,0,2,0" Padding="0" Content="&lt;" Style="{StaticResource OmagCut_YellowTextButton}"/>
<Button Name="NextBtn" Grid.Column="1" Margin="2,0,2,0" Padding="0" Content="&gt;" Style="{StaticResource OmagCut_YellowTextButton}"/>
<CheckBox Name="SideAngleChBx" Grid.Column="2" Margin="2,0,0,0" Padding="0"/>
</Grid>
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="A °"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="T"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="NewEntity" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="NewA1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="NewA1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="NewH1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity2" Grid.Row="2" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A2" Grid.Column="1" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity3" Grid.Row="3" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A3" Grid.Column="1" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity4" Grid.Row="4" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A4" Grid.Column="1" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity5" Grid.Row="5" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A5" Grid.Column="1" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity6" Grid.Row="6" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A6" Grid.Column="1" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity7" Grid.Row="7" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A7" Grid.Column="1" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity8" Grid.Row="8" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A8" Grid.Column="1" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity9" Grid.Row="9" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A9" Grid.Column="1" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<TextBlock Name="Entity10" Grid.Row="10" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<CheckBox Name="A10" Grid.Column="1" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
Margin="-20,0,0,0"/>
Margin="-20,0,0,0"/>
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60" IsLength="False"
Margin="0,0,0,-2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
Margin="0,0,0,-2"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.6*"/>
<ColumnDefinition Width="0.6*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.6*"/>
<ColumnDefinition Width="0.6*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
<RowDefinition Height="0.9*"/>
</Grid.RowDefinitions>
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
Text="Offset"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
Text="Offset"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
Text="Offset2"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
Grid.Column="2" Grid.Row="12"
Width="40" Height="30" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
Grid.Column="3" Grid.Row="12"
Width="40" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
</UniformGrid>
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
Text="Offset2"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
Grid.Column="2" Grid.Row="12"
Width="40" Height="30" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
Grid.Column="3" Grid.Row="12"
Width="40" Height="30"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</UniformGrid>
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
Text="Affondamento"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
Text="Affondamento"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
Text="Accorciamento"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
Text="Angolo"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
Margin="0,0,0,-2"
Width="85" Height="30" IsLength="False"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
Text="Accorciamento"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
Margin="0,0,0,-2"
Width="85" Height="30"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
Text="Angolo"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
Margin="0,0,0,-2"
Width="85" Height="30" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
</Grid>
</Grid>
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="11" Width="90"
+195 -34
View File
@@ -171,25 +171,25 @@ Public Class SideAngleUC
' Aggiorno valori
If m_Mode = ModeOpt.DRIP Then
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
m_dDripShort = GetPrivateProfileDouble( S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
Parameter2TxBx.Text = LenToString( m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
Parameter4TxBx.Text = LenToString( m_dDripShort, 3)
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
m_dDripOffset2 = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
m_dDripShort = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
Parameter2TxBx.Text = LenToString(m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
Parameter4TxBx.Text = LenToString(m_dDripShort, 3)
ElseIf m_Mode = ModeOpt.ENGRAVE Then
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET, 20, m_MainWindow.GetIniFile())
m_nEngrNbr2 = GetPrivateProfileInt( S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEOFFSET, 20, m_MainWindow.GetIniFile())
m_nEngrNbr2 = GetPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
m_dDripOffset2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
m_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, m_MainWindow.GetIniFile())
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
Parameter2bTxBx.Text = LenToString(m_dDripOffset2, 3)
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
End If
@@ -311,8 +311,14 @@ Public Class SideAngleUC
' Attualmente il vaore m_nCount è inizializzato ad "1"..
' Bottoni Prev Next
If m_nCount <= MAX_LINES Then
PrevBtn.Visibility= Windows.Visibility.Hidden
NextBtn.Visibility= Windows.Visibility.Hidden
PrevBtn.Visibility = Windows.Visibility.Hidden
NextBtn.Visibility = Windows.Visibility.Hidden
SideAngleChBx.Visibility = Windows.Visibility.Hidden
NewEntity.Visibility = Windows.Visibility.Hidden
NewA1.Visibility = Windows.Visibility.Hidden
NewA1TxBx.Visibility = Windows.Visibility.Hidden
NewH1TxBx.Visibility = Windows.Visibility.Hidden
Else
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
PrevBtn.Visibility = Windows.Visibility.Visible
@@ -320,6 +326,8 @@ Public Class SideAngleUC
Grid.SetRow(NextBtn, MAX_LINES - m_nShow)
NextBtn.Visibility = Windows.Visibility.Visible
NextBtn.IsEnabled = (m_nCount > m_nCurrPage * MAX_LINES)
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
SideAngleChBx.Visibility = Windows.Visibility.Visible
End If
' Intestazione per angoli di lato
@@ -335,6 +343,8 @@ Public Class SideAngleUC
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
HeelBl.Text = EgtMsg(91654) ' T
HeelBl.Visibility = Windows.Visibility.Visible
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
SideAngleChBx.Visibility = Windows.Visibility.Visible
End If
Else
If m_nCount = 0 Then
@@ -371,7 +381,7 @@ Public Class SideAngleUC
GetHeelTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_End", 0, m_MainWindow.GetIniFile())
End If
End If
Dim TxBlIndex As Integer = (m_nCurrPage - 1) * MAX_LINES + nI - 1
Dim TxBlIndex As Integer = (m_nCurrPage - 1) * MAX_LINES + nI - 1
GetTxBlFromIndex(Index).Text = If(m_Mode = ModeOpt.SIDEANGLE,
m_SideAngleEntityList(TxBlIndex).sEntityName,
m_DripEntityList(TxBlIndex).sEntityName)
@@ -391,6 +401,145 @@ Public Class SideAngleUC
Next
End Sub
Private Sub CheckedSideAngle() Handles SideAngleChBx.Checked
Grid.SetRow(NewEntity, MAX_LINES - m_nShow + 1)
Grid.SetRow(NewA1TxBx, MAX_LINES - m_nShow + 1)
Grid.SetRow(NewH1TxBx, MAX_LINES - m_nShow + 1)
NewEntity.Text = "A#"
' Se interrompo la creazione di un unico SideAng
If Not GetSideAngleFromAllEntities() Then Return
PrevBtn.Visibility = Visibility.Collapsed
NextBtn.Visibility = Visibility.Collapsed
NewEntity.Visibility = Visibility.Visible
NewA1TxBx.Visibility = Visibility.Visible
NewH1TxBx.Visibility = Visibility.Visible
Entity1.Visibility = Visibility.Collapsed
A1TxBx.Visibility = Visibility.Collapsed
H1TxBx.Visibility = Visibility.Collapsed
Entity2.Visibility = Visibility.Collapsed
A2TxBx.Visibility = Visibility.Collapsed
H2TxBx.Visibility = Visibility.Collapsed
Entity3.Visibility = Visibility.Collapsed
A3TxBx.Visibility = Visibility.Collapsed
H3TxBx.Visibility = Visibility.Collapsed
Entity4.Visibility = Visibility.Collapsed
A4TxBx.Visibility = Visibility.Collapsed
H4TxBx.Visibility = Visibility.Collapsed
Entity5.Visibility = Visibility.Collapsed
A5TxBx.Visibility = Visibility.Collapsed
H5TxBx.Visibility = Visibility.Collapsed
Entity6.Visibility = Visibility.Collapsed
A6TxBx.Visibility = Visibility.Collapsed
H6TxBx.Visibility = Visibility.Collapsed
Entity7.Visibility = Visibility.Collapsed
A7TxBx.Visibility = Visibility.Collapsed
H7TxBx.Visibility = Visibility.Collapsed
Entity8.Visibility = Visibility.Collapsed
A8TxBx.Visibility = Visibility.Collapsed
H8TxBx.Visibility = Visibility.Collapsed
Entity9.Visibility = Visibility.Collapsed
A9TxBx.Visibility = Visibility.Collapsed
H9TxBx.Visibility = Visibility.Collapsed
Entity10.Visibility = Visibility.Collapsed
A10TxBx.Visibility = Visibility.Collapsed
H10TxBx.Visibility = Visibility.Collapsed
End Sub
Private Sub UnCheckSideAngle() Handles SideAngleChBx.Unchecked
NewEntity.Visibility = Visibility.Collapsed
NewA1TxBx.Visibility = Visibility.Collapsed
NewH1TxBx.Visibility = Visibility.Collapsed
TxBlChBxView()
RefreshCheckAndValue()
End Sub
Private Function GetSideAngleFromAllEntities() As Boolean
Dim tmpSideAngleList As New List(Of Double)
tmpSideAngleList.Clear()
Dim tmpSideHeelList As New List(Of Double)
tmpSideHeelList.Clear()
Dim m_SideAngleOneForAllWindow As New SideAngleOneForAllWindow
For i As Integer = 0 To m_SideAngleEntityList.Count - 1
If Not tmpSideAngleList.Contains(m_SideAngleEntityList(i).dSideAngle) Then
tmpSideAngleList.Add(m_SideAngleEntityList(i).dSideAngle)
End If
If Not tmpSideHeelList.Contains(m_SideAngleEntityList(i).dSideHeel) Then
tmpSideHeelList.Add(m_SideAngleEntityList(i).dSideHeel)
End If
Next
NewA1TxBx.Text = DoubleToString(tmpSideAngleList(0), 2)
NewH1TxBx.Text = LenToString(tmpSideHeelList(0), 2)
If tmpSideAngleList.Count > 1 Or tmpSideHeelList.Count > 1 Then
m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.ItemsSource = tmpSideAngleList
m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.SelectedIndex = 0
m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.ItemsSource = tmpSideHeelList
m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.SelectedIndex = 0
m_SideAngleOneForAllWindow.ShowDialog()
If m_SideAngleOneForAllWindow.DialogResult Then
NewA1TxBx.Text = DoubleToString(m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.SelectedItem, 2)
NewH1TxBx.Text = LenToString(m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.SelectedItem, 2)
UpdateSideAngleAllEntities()
UpdateHeelAllEntities()
Else
SideAngleChBx.IsChecked = False
Return False
End If
End If
Return True
End Function
Private Sub UpdateHeelAllEntities()
' Nuovo tallone
Dim dSideHeel As Double
StringToLen(NewH1TxBx.Text, dSideHeel)
' Verifico stia nei limiti
If dSideHeel < 0 Then
dSideHeel = 0
NewH1TxBx.Text = "0"
End If
For Each Entity As SideAngleEntity In m_SideAngleEntityList
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideHeel(Entity.sEntityName, dSideHeel)
' Aggiorno tutti i testi
RefreshSideAngleText()
Next
End Sub
Private Sub UpdateSideAngleAllEntities()
' Nuovo angolo di inclinazione
Dim dSideAngle As Double
StringToDouble(NewA1TxBx.Text, dSideAngle)
' Verifico stia nei limiti
If dSideAngle < -m_dMaxSideAng Then
dSideAngle = -m_dMaxSideAng
NewA1TxBx.Text = DoubleToString(dSideAngle, 2)
ElseIf dSideAngle > m_dMaxSideAng Then
dSideAngle = m_dMaxSideAng
NewA1TxBx.Text = DoubleToString(dSideAngle, 2)
End If
For Each Entity As SideAngleEntity In m_SideAngleEntityList
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideAngle(Entity.sEntityName, dSideAngle)
' Aggiorno tutti i testi
RefreshSideAngleText()
Next
End Sub
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
Private Function GetChBxFromIndex(Index As Integer) As CheckBox
@@ -495,15 +644,15 @@ Public Class SideAngleUC
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
' quando esco salvo nel file l'ultima configurazione per le incisioni
Private Sub SideAngleUC_Unloaded( sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
Private Sub SideAngleUC_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
If m_CallingPage = MainWindow.Pages.Draw Then
' Ricavo nome pezzo
Dim PartId As Integer = EgtGetFirstInGroup( GDB_ID.ROOT)
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
' Svuoto layer in cui sono presenti i testi con le inclinazioni dei lati
If m_Mode = ModeOpt.SIDEANGLE Then
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
Else
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
End If
ElseIf m_CallingPage = MainWindow.Pages.Import Then
' Nessuna azione necessaria
@@ -516,7 +665,7 @@ Public Class SideAngleUC
'WritePrivateProfileString( S_SIDES, K_DRIPSHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
ElseIf m_Mode = ModeOpt.ENGRAVE Then
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString( S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
@@ -527,7 +676,6 @@ Public Class SideAngleUC
EgtDraw()
End Sub
' aggiunge il messaggio nel disegno, se DripGeom creo la geometria
Private Sub RefreshSideAngleText()
Dim PartId As Integer = GDB_ID.NULL
@@ -538,7 +686,7 @@ Public Class SideAngleUC
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
ElseIf m_CallingPage = MainWindow.Pages.Import Then
ElseIf m_CallingPage = MainWindow.Pages.Import Then
' Imposto contesto corrente
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
' Recupero nome pezzo
@@ -600,7 +748,7 @@ Public Class SideAngleUC
For nIndex As Integer = 1 To m_nCount
Dim Entity As DripEntity = m_DripEntityList(nIndex - 1)
' Imposto check box (se sono stati definiti il numero corretto di CheckBox
If nIndex < ( m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
If nIndex < (m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
Dim nChIndex As Integer = nIndex - (m_nCurrPage - 1) * MAX_LINES + MAX_LINES - m_nShow
' verifico se l'entità ha un gocciolatoio
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
@@ -973,15 +1121,15 @@ Public Class SideAngleUC
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
If m_nCurrPage = 1 Then Return
m_nCurrPage -= 1
m_nShow = Math.Min( m_nCount - ( m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
m_nShow = Math.Min(m_nCount - (m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
TxBlChBxView()
RefreshCheckAndValue()
End Sub
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
If m_nCount <= ( m_nCurrPage - 1) * MAX_LINES Then Return
If m_nCount <= (m_nCurrPage - 1) * MAX_LINES Then Return
m_nCurrPage += 1
m_nShow = Math.Min( m_nCount - ( m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
m_nShow = Math.Min(m_nCount - (m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
TxBlChBxView()
RefreshCheckAndValue()
End Sub
@@ -993,7 +1141,7 @@ Public Class SideAngleUC
Dim bVal As Boolean = CurrCheckBox.IsChecked()
Dim SideIndex As Integer = CInt(CurrCheckBox.Name.Substring(1))
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
Dim sCurrSide As String = m_DripEntityList(nCurrSide - 1).sEntityName
' aggiorno l'entità con i valori scritti nel campo di testo
Dim CurrEntity As DripEntity = DripEntity.FindEntity(sCurrSide)
@@ -1179,6 +1327,19 @@ Public Class SideAngleUC
End If
End Sub
'-------> riga nuova
Private Sub NewA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles NewA1TxBx.EgtClosed
If m_Mode = ModeOpt.SIDEANGLE Then
UpdateSideAngleAllEntities()
End If
End Sub
Private Sub NewH1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles NewH1TxBx.EgtClosed
If m_Mode = ModeOpt.SIDEANGLE Then
UpdateHeelAllEntities()
End If
End Sub
Private Sub SetSideAngleFromTxBx(SideIndex As Integer, AngleTxBx As EgtWPFLib.EgtTextBox)
' Nuovo angolo di inclinazione
Dim dSideAngle As Double
@@ -1192,7 +1353,7 @@ Public Class SideAngleUC
AngleTxBx.Text = DoubleToString(dSideAngle, 2)
End If
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideAngle(sCurrSide, dSideAngle)
@@ -1262,7 +1423,7 @@ Public Class SideAngleUC
HeelTxBx.Text = "0"
End If
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideHeel(sCurrSide, dSideHeel)
@@ -1305,13 +1466,13 @@ Public Class SideAngleUC
EgtSetInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE, dSideAngle)
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
If Not String.IsNullOrEmpty(sSawingTilted) Then
EgtSetInfo(CurrEntity.nGeomId, DEF_MACHINING, sSawingTilted)
EgtSetInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED, 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)
EgtRemoveInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED)
End If
' Aggiorno lista entità con nuova inclinazione
CurrEntity.dSideAngle = dSideAngle
@@ -1329,7 +1490,7 @@ Public Class SideAngleUC
' Scrivo nuovo tallone nelle info
If dSideHeel > 10 * EPS_SMALL Then
EgtSetInfo(CurrEntity.nGeomId, INFO_HEEL, dSideHeel)
' Cancello inclinazione nell'apposito campo info
' Cancello inclinazione nell'apposito campo info
Else
EgtRemoveInfo(CurrEntity.nGeomId, INFO_HEEL)
End If
+58
View File
@@ -0,0 +1,58 @@
<UserControl x:Class="Alarms2PageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="1280">
<Border Style="{DynamicResource OmagCut_PageBorder}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<GroupBox Name="FinalSawCutGpBx" Style="{DynamicResource OmagCut_GroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Name="EnableFinalSawCutTxBl" Grid.Column="0" Grid.Row="0"
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
<CheckBox Name="EnableFinalSawCutChBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right"/>
<TextBlock Name="FinalDepthTxBl" Grid.Column="0" Grid.Row="1"
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
<EgtWPFLib:EgtTextBox Name="FinalDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
</Grid>
</GroupBox>
</Grid>
</Border>
</UserControl>
+30
View File
@@ -0,0 +1,30 @@
Imports EgtUILib
Public Class Alarms2PageUC
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private Sub Alarms2Page_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
FinalSawCutGpBx.Header = EgtMsg(91254) ' Taglio Finale
EnableFinalSawCutTxBl.Text = EgtMsg(91255) ' Abilita
FinalDepthTxBl.Text = EgtMsg(91256) ' Ultimo Spessore
End Sub
Private Sub Allarm2Page_Loaded() Handles Me.Loaded
EnableFinalSawCutChBx.IsChecked = m_MainWindow.m_CurrentMachine.bEnableFinalSawCut
FinalDepthTxBx.Text = m_MainWindow.m_CurrentMachine.dFinalDepth
End Sub
Private Sub EnableFinalSawCutChBx_IsChecked() Handles EnableFinalSawCutChBx.Click
m_MainWindow.m_CurrentMachine.bEnableFinalSawCut = EnableFinalSawCutChBx.IsChecked
WritePrivateProfileString(S_MACH, K_ENABLEFINALSAWCUT, If(m_MainWindow.m_CurrentMachine.bEnableFinalSawCut, "1", "0"), m_MainWindow.GetMachIniFile())
End Sub
Private Sub FinalDepthTxBx_EgtClosed() Handles FinalDepthTxBx.EgtClosed
Dim dVal As Double = 0
StringToLen(FinalDepthTxBx.Text, dVal)
m_MainWindow.m_CurrentMachine.dFinalDepth = dVal
WritePrivateProfileString(S_MACH, K_FINALDEPTH, DoubleToString(m_MainWindow.m_CurrentMachine.dFinalDepth, 3), m_MainWindow.GetMachIniFile())
End Sub
End Class
+13 -13
View File
@@ -1,11 +1,11 @@
<UserControl x:Class="AlarmsPageUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="1280">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="1280">
<!-- Definizione della AlarmsPage -->
<Border Style="{DynamicResource OmagCut_PageBorder}" >
@@ -279,7 +279,7 @@
</Grid.RowDefinitions>
<GroupBox Name="SetUpGpBx" Grid.ColumnSpan="3" Grid.RowSpan="9"
Style="{DynamicResource OmagCut_GroupBox}">
Style="{DynamicResource OmagCut_GroupBox}">
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
@@ -298,7 +298,7 @@
</Grid.RowDefinitions>
<TextBlock Name="CurrSawTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
<ComboBox.ItemTemplate>
<DataTemplate>
@@ -308,8 +308,8 @@
</ComboBox>
<TextBlock Name="AuxiliaryToolTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
Visibility="Hidden"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
Visibility="Hidden"/>
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
<ComboBox.ItemTemplate>
<DataTemplate>
@@ -319,8 +319,8 @@
</ComboBox>
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
Visibility="Hidden"/>
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
Visibility="Hidden"/>
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
<ComboBox.ItemTemplate>
<DataTemplate>
+5 -5
View File
@@ -94,13 +94,13 @@ Public Class AlarmsPageUC
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
'-- INIZIO -- nuovi parametri per preforo lavello
HolesDiameterWJTxBl.Text = "Diameter"
HolesOffsetWJTxBl.Text = "Offset"
MinRadiusWJTxBl.Text = "Min Radius"
HolesDiameterWJTxBl.Text = EgtMsg(91044) ' Diametro
HolesOffsetWJTxBl.Text = EgtMsg(91045) ' Offset
MinRadiusWJTxBl.Text = EgtMsg(91046) ' Raggio Minimo
OneHoleInCornerWJTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 26)
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
REctificationWJParamGpBx.Header = "Rectification"
EnableRectificationTxBl.Text = "Enable (on subsquare angle)"
RectificationWJParamGpBx.Header = EgtMsg(91047) ' Rettifica
EnableRectificationTxBl.Text = EgtMsg(91048) ' Abilita (sottosquadra)
'-- FINE -- nuovi parametro Rettifica tagli sottosquadra WJ
NestingParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 31) ' Nesting
AlignTxBl.Text = EgtMsg(90932) ' Allineato
+50 -3
View File
@@ -135,6 +135,7 @@ Public Class CurrentMachine
Private m_dAdditionalTable As Double = 0
Private m_dTab2AdditionalTable As Double = 0
Private m_dTab3AdditionalTable As Double = 0
Private m_dTab4AdditionalTable As Double = 0
Private m_bCenterRawOnX As Boolean = False
' Offset aggiuntivi per fotografia
@@ -211,6 +212,12 @@ Public Class CurrentMachine
' Massima altezza lavorabile con lama grande
Private m_dHighPieceZ As Double = 200.0
'
Private m_dFinalDepth As Double = 0.0
' Flag che abilita l'esecuzione del taglio finale
Private m_bEnableFinalSawCut As Boolean = False
#Region "Proprietà che leggono e scrivono i valori anche da o su file ini"
Friend ReadOnly Property MaxTabDepth As Double
Get
@@ -833,10 +840,12 @@ Public Class CurrentMachine
Friend Property dAdditionalTable As Double
Get
Select Case GetCurrentTable()
Case 3
Return m_dTab3AdditionalTable
Case 2
Return m_dTab2AdditionalTable
Case 3
Return m_dTab3AdditionalTable
Case 4
Return m_dTab4AdditionalTable
Case Else
Return m_dAdditionalTable
End Select
@@ -844,6 +853,19 @@ Public Class CurrentMachine
Set(value As Double)
Dim dValue As Double = 0
Select Case GetCurrentTable()
Case 4
If Math.Abs(value - m_dTab4AdditionalTable) > EPS_SMALL And
WritePrivateProfileString(S_TABLE, K_TAB4_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
' Aggiorno il valore corrente
m_dTab4AdditionalTable = value
' Aggiorno il progetto corrente
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
' salvo il valore della sovratavola nel progetto
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, dValue)
If Math.Abs(dValue - value) > EPS_SMALL Then
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, value)
End If
End If
Case 3
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
WritePrivateProfileString(S_TABLE, K_TAB3_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
@@ -1188,6 +1210,24 @@ Public Class CurrentMachine
End Get
End Property
Friend Property bEnableFinalSawCut As Boolean
Get
Return m_bEnableFinalSawCut
End Get
Set(value As Boolean)
m_bEnableFinalSawCut = value
End Set
End Property
Friend Property dFinalDepth As Double
Get
Return m_dFinalDepth
End Get
Set(value As Double)
m_dFinalDepth = value
End Set
End Property
#End Region
Sub New()
@@ -1304,7 +1344,7 @@ Public Class CurrentMachine
' lama
GetPrivateProfileString(S_MACH_MACH, K_CURRSAW, Nothing, m_sCurrSaw, sMachIniFile)
' lama inclinata
If m_nShowToolChanger = 4 Then
If m_MountedToolConfig = 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
@@ -1384,6 +1424,7 @@ Public Class CurrentMachine
m_dAdditionalTable = GetPrivateProfileDouble(S_TABLE, K_ADDITIONALTABLE, 0, sMachIniFile)
m_dTab2AdditionalTable = GetPrivateProfileDouble(S_TABLE, K_TAB2_ADDITIONALTABLE, 0, sMachIniFile)
m_dTab3AdditionalTable = GetPrivateProfileDouble(S_TABLE, K_TAB3_ADDITIONALTABLE, 0, sMachIniFile)
m_dTab4AdditionalTable = GetPrivateProfileDouble(S_TABLE, K_TAB4_ADDITIONALTABLE, 0, sMachIniFile)
' Leggo centratura del pezzo in X sulla tavola (per macchine con nastro)
m_bCenterRawOnX = (GetPrivateProfileInt(S_TABLE, K_CENTER_RAW_ONX, 0, sMachIniFile) <> 0)
@@ -1471,6 +1512,12 @@ Public Class CurrentMachine
' Massimo spessore lavorabile con lama grande
m_dHighPieceZ = GetPrivateProfileDouble(S_RAWMOVE, "MaxHeightPiece", 800.0, m_MainWindow.GetMachIniFile())
' Flag per abilitare taglio finale
m_bEnableFinalSawCut = GetPrivateProfileInt(S_MACH, K_ENABLEFINALSAWCUT, 0, m_MainWindow.GetMachIniFile()) <> 0
' Flag per abilitare taglio finale
m_dFinalDepth = GetPrivateProfileDouble(S_MACH, K_FINALDEPTH, 0.0, m_MainWindow.GetMachIniFile())
End Sub
' Per il controllo FANUC al momento dell'inizializzazione del CN devono essere lette alcune variabili
+5 -5
View File
@@ -41,7 +41,7 @@ Public Class MachineCNPageUC
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
PowerONBtn.Content = "ON"
PowerOFFBtn.Content = "OFF"
PowerGpBx.Header = "Power"
PowerGpBx.Header = EgtMsg(90974) 'Power
Else
PowerGpBx.Visibility = Visibility.Collapsed
End If
@@ -49,7 +49,7 @@ Public Class MachineCNPageUC
' verifico che sia attiva la modalità per l'uso di due fotocamere
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
CameraHQ.Visibility = Visibility.Visible
CameraHQ.Header = "Photo on table"
CameraHQ.Header = EgtMsg(90975) 'Photo on table
CameraHQBtn.Content = "HQ"
' verifico quale camera è impostata
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
@@ -177,7 +177,7 @@ Public Class MachineCNPageUC
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
Dim sDBVarPath As String = ""
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", sDBVarPath, m_MainWindow.GetMachIniFile)
sDBVarPath &= "Start_Cycle"
sDBVarPath &= EgtMsg(90976) ' Start_Cycle
m_CN.DVariables_WriteVariables3(sDBVarPath, 1, 1, 0, 0, "") ' Modalità manuale
Else
m_CN.DGeneralFunctions_CycleStart()
@@ -188,7 +188,7 @@ Public Class MachineCNPageUC
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
Dim sDBVarPath As String = ""
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", sDBVarPath, m_MainWindow.GetMachIniFile)
sDBVarPath &= "Stop_Cycle"
sDBVarPath &= EgtMsg(90977) ' Stop_Cycle
m_CN.DVariables_WriteVariables3(sDBVarPath, 1, 0, 0, 0, "") ' Modalità manuale
Else
m_CN.DGeneralFunctions_FeedHold()
@@ -199,7 +199,7 @@ Public Class MachineCNPageUC
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
Dim sDBVarPath As String = ""
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", sDBVarPath, m_MainWindow.GetMachIniFile)
sDBVarPath &= "Reset_Cycle"
sDBVarPath &= EgtMsg(90978) ' Reset_Cycle
m_CN.DVariables_WriteVariables3(sDBVarPath, 1, 1, 0, 0, "") ' Modalità manuale
Else
Call m_CN.DGeneralFunctions_Reset()
+34 -31
View File
@@ -5,16 +5,16 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="853.3" d:DesignWidth="1280">
<!-- Definizione della MachinePage -->
<Border >
<Grid Name="MachinePageGrid" >
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<!-- Definizione della grid superiore -->
<Grid Name="UpperButtonGrid" Grid.Row="0" >
<Grid.ColumnDefinitions>
@@ -25,37 +25,40 @@
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.1*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="ToolsDBBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource DB-lavorazioniImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
</ToggleButton>
<ToggleButton Name="WaterJetBtn" Grid.Column="4" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
<!--<Image Source="{DynamicResource WaterJetImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
</ToggleButton>
<ToggleButton Name="TestingPageBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="StatisticsBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowToggleButton}">
</ToggleButton>
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="Alarms2Btn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource DatiMacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="ToolsDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource DB-lavorazioniImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="MachiningDBBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="PolishingsBtn" Grid.Column="4" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
</ToggleButton>
<ToggleButton Name="WaterJetBtn" Grid.Column="5" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
<!--<Image Source="{DynamicResource WaterJetImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
</ToggleButton>
<ToggleButton Name="TestingPageBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
</ToggleButton>
<ToggleButton Name="StatisticsBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowToggleButton}">
</Grid>
</ToggleButton>
</Grid>
</Grid>
</Border>
</UserControl>
+137
View File
@@ -13,6 +13,7 @@ Public Class MachinePageUC
Friend m_WaterJetPageUC As WaterJetPageUC
Friend m_MachineCNPageUC As MachineCNPageUC
Friend m_StatisticsPageUC As StatisticsPageUC
Friend m_Alarms2PageUC As Alarms2PageUC
' Riferimento alla pagina correntemente attiva
Friend m_ActiveMachinePage As MachinePages
@@ -25,6 +26,7 @@ Public Class MachinePageUC
WaterJet
MachineCN
Statistics
Alarms2
End Enum
Private Sub MachinePage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
@@ -37,6 +39,7 @@ Public Class MachinePageUC
m_WaterJetPageUC = New WaterJetPageUC
m_MachineCNPageUC = New MachineCNPageUC
m_StatisticsPageUC = New StatisticsPageUC
m_Alarms2PageUC = New Alarms2PageUC
'Posizionemento nella griglia delle Page UserControl
m_AlarmsPageUC.SetValue(Grid.RowProperty, 1)
@@ -46,8 +49,11 @@ Public Class MachinePageUC
m_WaterJetPageUC.SetValue(Grid.RowProperty, 1)
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
m_Alarms2PageUC.SetValue(Grid.RowProperty, 1)
AlarmsBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 5)
Alarms2Btn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 5)
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
PolishingsBtn.Content = EgtMsg(91090)
@@ -171,6 +177,95 @@ Public Class MachinePageUC
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
MachinePageGrid.Children.Add(m_AlarmsPageUC)
m_ActiveMachinePage = MachinePages.Alarms
Case MachinePages.Alarms2
Alarms2Btn.IsChecked = False
MachinePageGrid.Children.Remove(m_Alarms2PageUC)
MachinePageGrid.Children.Add(m_AlarmsPageUC)
m_ActiveMachinePage = MachinePages.Alarms
End Select
End Sub
Private Sub Alarms2Btn_Click(sender As Object, e As RoutedEventArgs) Handles Alarms2Btn.Click
Select Case m_ActiveMachinePage
Case MachinePages.Alarms
AlarmsBtn.IsChecked = False
Alarms2Btn.IsChecked = True
MachinePageGrid.Children.Remove(m_AlarmsPageUC)
MachinePageGrid.Children.Add(m_Alarms2PageUC)
m_ActiveMachinePage = MachinePages.Alarms2
Case MachinePages.ToolsDb
' Verifica ed eventuale salvataggio utensile corrente
If Not m_ToolsDbPageUC.SaveCurrTool() Then
Alarms2Btn.IsChecked = False
ToolsDBBtn.IsChecked = True
Return
End If
' salvo il DB utensili
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
EgtTdbSave()
' passo alla pagina Dati macchina
Alarms2Btn.IsChecked = True
ToolsDBBtn.IsChecked = False
MachinePageGrid.Children.Remove(m_ToolsDbPageUC)
MachinePageGrid.Children.Add(m_Alarms2PageUC)
m_ActiveMachinePage = MachinePages.Alarms2
Case MachinePages.MachiningDb
' Verifica ed eventuale salvataggio lavorazione corrente
If Not m_MachiningDbPageUC.SaveCurrMachining() Then
Alarms2Btn.IsChecked = False
MachiningDBBtn.IsChecked = True
Return
End If
' salvo il DB lavorazioni
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
EgtMdbSave()
' passo alla pagina Dati macchina
Alarms2Btn.IsChecked = True
MachiningDBBtn.IsChecked = False
MachinePageGrid.Children.Remove(m_MachiningDbPageUC)
MachinePageGrid.Children.Add(m_Alarms2PageUC)
m_ActiveMachinePage = MachinePages.Alarms2
Case MachinePages.Polishings
' Verifica ed eventuale salvataggio Lucidatura corrente
If Not m_PolishingsPageUC.SaveKit() Then
Alarms2Btn.IsChecked = False
PolishingsBtn.IsChecked = True
Return
End If
' passo alla pagina Dati Macchina
Alarms2Btn.IsChecked = True
PolishingsBtn.IsChecked = False
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
MachinePageGrid.Children.Add(m_Alarms2PageUC)
m_ActiveMachinePage = MachinePages.Alarms2
Case MachinePages.WaterJet
' Verifica ed eventuale salvataggio Db Waterjet
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
Alarms2Btn.IsChecked = False
WaterJetBtn.IsChecked = True
Return
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
m_WaterJetPageUC.WaterJetPage_Reinitialize()
End If
' passo alla pagina Dati Macchina
Alarms2Btn.IsChecked = True
WaterJetBtn.IsChecked = False
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
MachinePageGrid.Children.Add(m_Alarms2PageUC)
m_ActiveMachinePage = MachinePages.Alarms2
Case MachinePages.MachineCN
Alarms2Btn.IsChecked = True
TestingPageBtn.IsChecked = False
MachinePageGrid.Children.Remove(m_MachineCNPageUC)
MachinePageGrid.Children.Add(m_Alarms2PageUC)
m_ActiveMachinePage = MachinePages.Alarms2
Case MachinePages.Statistics
Alarms2Btn.IsChecked = True
StatisticsBtn.IsChecked = False
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
MachinePageGrid.Children.Add(m_Alarms2PageUC)
m_ActiveMachinePage = MachinePages.Alarms2
End Select
End Sub
@@ -241,6 +336,12 @@ Public Class MachinePageUC
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
m_ActiveMachinePage = MachinePages.ToolsDb
Case MachinePages.Alarms2
Alarms2Btn.IsChecked = False
ToolsDBBtn.IsChecked = True
MachinePageGrid.Children.Remove(m_Alarms2PageUC)
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
m_ActiveMachinePage = MachinePages.ToolsDb
End Select
End Sub
@@ -313,6 +414,12 @@ Public Class MachinePageUC
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
m_ActiveMachinePage = MachinePages.MachiningDb
Case MachinePages.Alarms2
Alarms2Btn.IsChecked = False
MachiningDBBtn.IsChecked = True
MachinePageGrid.Children.Remove(m_Alarms2PageUC)
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
m_ActiveMachinePage = MachinePages.MachiningDb
End Select
End Sub
@@ -386,6 +493,12 @@ Public Class MachinePageUC
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
MachinePageGrid.Children.Add(m_PolishingsPageUC)
m_ActiveMachinePage = MachinePages.Polishings
Case MachinePages.Alarms2
Alarms2Btn.IsChecked = False
PolishingsBtn.IsChecked = True
MachinePageGrid.Children.Remove(m_Alarms2PageUC)
MachinePageGrid.Children.Add(m_PolishingsPageUC)
m_ActiveMachinePage = MachinePages.Polishings
End Select
End Sub
@@ -457,6 +570,12 @@ Public Class MachinePageUC
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
MachinePageGrid.Children.Add(m_WaterJetPageUC)
m_ActiveMachinePage = MachinePages.WaterJet
Case MachinePages.Alarms2
Alarms2Btn.IsChecked = False
WaterJetBtn.IsChecked = True
MachinePageGrid.Children.Remove(m_Alarms2PageUC)
MachinePageGrid.Children.Add(m_WaterJetPageUC)
m_ActiveMachinePage = MachinePages.WaterJet
End Select
End Sub
@@ -537,6 +656,12 @@ Public Class MachinePageUC
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
MachinePageGrid.Children.Add(m_MachineCNPageUC)
m_ActiveMachinePage = MachinePages.MachineCN
Case MachinePages.Alarms2
Alarms2Btn.IsChecked = False
TestingPageBtn.IsChecked = True
MachinePageGrid.Children.Remove(m_Alarms2PageUC)
MachinePageGrid.Children.Add(m_MachineCNPageUC)
m_ActiveMachinePage = MachinePages.MachineCN
End Select
End Sub
@@ -617,6 +742,12 @@ Public Class MachinePageUC
m_ActiveMachinePage = MachinePages.Statistics
Case MachinePages.Statistics
StatisticsBtn.IsChecked = True
Case MachinePages.Alarms2
Alarms2Btn.IsChecked = False
StatisticsBtn.IsChecked = True
MachinePageGrid.Children.Remove(m_Alarms2PageUC)
MachinePageGrid.Children.Add(m_StatisticsPageUC)
m_ActiveMachinePage = MachinePages.Statistics
End Select
End Sub
@@ -670,6 +801,12 @@ Public Class MachinePageUC
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
MachinePageGrid.Children.Add(m_AlarmsPageUC)
m_ActiveMachinePage = MachinePages.Alarms
Case MachinePages.Alarms2
AlarmsBtn.IsChecked = True
Alarms2Btn.IsChecked = False
MachinePageGrid.Children.Remove(m_Alarms2PageUC)
MachinePageGrid.Children.Add(m_AlarmsPageUC)
m_ActiveMachinePage = MachinePages.Alarms
End Select
End Sub
+2 -2
View File
@@ -79,8 +79,8 @@ Public Class MachiningDbPageUC
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 16)
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
ExportBtn.Content = "Export"
ImportBtn.Content = "Import"
ExportBtn.Content = EgtMsg(91126) ' Export
ImportBtn.Content = EgtMsg(91127) ' Import
NameTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 1)
DepthTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 2)
+2 -2
View File
@@ -1105,8 +1105,8 @@ Public Class SetUpPage
' Funzione che genera il file di setup corrente (per Cam5 e Office)
Private Sub SaveSetUpFile()
If m_CurrMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then Return
Dim sContentFile As String = "; this file has been created by program OmagCUT by current setup" & vbCrLf
sContentFile &= "[General]" & vbCrLf
Dim sContentFile As String = EgtMsg(91239) & vbCrLf ' ; this file has been created by program OmagCUT by current setup
sContentFile &= EgtMsg(91240) & vbCrLf ' [General]
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ToolChanger
Dim sToolName As String = ToolPosition.sTool
Dim sPositionName As String = ToolPosition.sName
+190 -164
View File
@@ -8,266 +8,292 @@
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="1280" Initialized="WaterJetPage_Initialized">
<!-- Definizione della PolishingsPage -->
<Border Style="{DynamicResource OmagCut_PageBorder}">
<!-- Definizione della PolishingsPage -->
<Border Style="{DynamicResource OmagCut_PageBorder}">
<Grid Name="WaterJetPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="8*"/>
<ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Name="WaterJetPageGrid" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="8*"/>
<ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="8*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--Lista dei materiali-->
<GroupBox Name="MaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
<!--Lista dei materiali-->
<GroupBox Name="MaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
Header="{Binding Material_Msg}"
Grid.Row="0" BorderThickness="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--Lista dei materiali-->
<ListBox Name="MaterialsLstBx"
<!--Lista dei materiali-->
<ListBox Name="MaterialsLstBx"
ItemsSource="{Binding MaterialList}" SelectedItem="{Binding SelMaterial}"
Grid.RowSpan="2">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
<EgtWPFLib:EgtTextBox Name="NewMaterialNameTxBx" Grid.Row="1"
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
<EgtWPFLib:EgtTextBox Name="NewMaterialNameTxBx" Grid.Row="1"
Width="220"
Text="{Binding sNewMaterial}"
Visibility="{Binding NewMaterial_Visibility}"
Style="{DynamicResource OmagCut_KeyboardTextBox}"
KeyboardPosition="Top"/>
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
<UniformGrid Grid.Row="2" Columns="3">
<Button Name="NewMaterialBtn" Grid.Column="0"
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
<UniformGrid Grid.Row="2" Columns="3">
<Button Name="NewMaterialBtn" Grid.Column="0"
Content="{Binding New_Msg}"
Command="{Binding NewMaterialCommand}"
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
<Button Name="DeleteMaterialBtn" Grid.Column="1"
<Button Name="DeleteMaterialBtn" Grid.Column="1"
Content="{Binding Delete_Msg}"
Command="{Binding DeleteMaterialCommand}"
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
<Button Name="ModifyMaterialBtn" Grid.Column="1"
<Button Name="ModifyMaterialBtn" Grid.Column="1"
Content="{Binding Modify_Msg}"
Command="{Binding ModifyMaterialCommand}"
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
</UniformGrid>
</UniformGrid>
</Grid>
</Grid>
</GroupBox>
</GroupBox>
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
<Border Style="{DynamicResource OmagCut_Border}"
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
<Border Style="{DynamicResource OmagCut_Border}"
Grid.Column="1" Grid.Row="0"
Grid.ColumnSpan="2" Grid.RowSpan="1">
<Grid Name="SubMaterialGrd" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Name="SubMaterialGrd" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--Sottocategoria dei materiali associata alla lista precedente-->
<GroupBox Name="SubMaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}"
<!--Sottocategoria dei materiali associata alla lista precedente-->
<GroupBox Name="SubMaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}"
Header="{Binding SubMaterial_Msg}"
Grid.Column="0" Grid.Row="0"
Grid.ColumnSpan="1" Grid.RowSpan="8" BorderThickness="0">
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--Lista dei materiali-->
<ListBox Name="SubMaterialsLstBx" ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialsLstBx}"
<!--Lista dei materiali-->
<ListBox Name="SubMaterialsLstBx" ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialsLstBx}"
SelectedItem="{Binding Path=SelectedItem.SelSubMaterial, ElementName=MaterialsLstBx}"
Grid.RowSpan="2">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
<EgtWPFLib:EgtTextBox Name="NewSubMaterialNameTxBx" Grid.Row="1"
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
<EgtWPFLib:EgtTextBox Name="NewSubMaterialNameTxBx" Grid.Row="1"
Width="220"
Text="{Binding sNewSubMaterial}"
Visibility="{Binding NewSubMaterial_Visibility}"
Style="{DynamicResource OmagCut_KeyboardTextBox}"
KeyboardPosition="Top"/>
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
<UniformGrid Grid.Row="2" Columns="3">
<Button Name="NewSubMaterialBtn" Grid.Column="0"
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
<UniformGrid Grid.Row="2" Columns="3">
<Button Name="NewSubMaterialBtn" Grid.Column="0"
Content="{Binding New_Msg}"
Command="{Binding NewSubMaterialCommand}"
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
Content="{Binding Delete_Msg}"
Command="{Binding DeleteSubMaterialCommand}"
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
Content="{Binding Modify_Msg}"
Command="{Binding ModifySubMaterialCommand}"
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
</UniformGrid>
</UniformGrid>
</Grid>
</Grid>
</GroupBox>
</GroupBox>
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
<GroupBox Name="ParamsGpBx"
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
<GroupBox Name="ParamsGpBx"
Grid.Column="1" Grid.Row="0" Margin="0,0,0,3"
Grid.ColumnSpan="3" Grid.RowSpan="8" BorderThickness="0">
<!--Titolazione delle colonne della tabella-->
<GroupBox.Header >
<Grid Width="700">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!--Titolazione delle colonne della tabella-->
<GroupBox.Header >
<Grid Width="700">
<Grid.ColumnDefinitions>
<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*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="1" HorizontalAlignment="Center"
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
<Border Grid.Column="1" Margin="1,0,-1,-1"
Background="{StaticResource Omag_Blue}">
<TextBlock Text="{Binding Flux_Msg}" Grid.Column="1" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
</Border>
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="2" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding Q2_Msg}" Grid.Column="2" HorizontalAlignment="Center"
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
<TextBlock Text="{Binding Q2_Msg}" Grid.Column="3" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding Q3_Msg}" Grid.Column="3" HorizontalAlignment="Center"
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
<TextBlock Text="{Binding Q3_Msg}" Grid.Column="4" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding Q4_Msg}" Grid.Column="4" HorizontalAlignment="Center"
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
<TextBlock Text="{Binding Q4_Msg}" Grid.Column="5" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding Q5_Msg}" Grid.Column="5" HorizontalAlignment="Center"
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
<TextBlock Text="{Binding Q5_Msg}" Grid.Column="6" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="6" HorizontalAlignment="Center"
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="7" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
<TextBlock Text="{Binding AngComp_Msg}" Grid.Column="7" HorizontalAlignment="Center"
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
<TextBlock Text="{Binding AngComp_Msg}" Grid.Column="8" HorizontalAlignment="Center"
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
</Grid>
Foreground="{StaticResource Omag_White}"
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
</Grid>
</GroupBox.Header>
</GroupBox.Header>
<!--Definizione della Grid dei parametri delle lavorazioni-->
<Grid Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="308*"/>
<ColumnDefinition Width="73*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--Definizione della Grid dei parametri delle lavorazioni-->
<Grid Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="308*"/>
<ColumnDefinition Width="73*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ListBox Name="ParamLstBx"
<ListBox Name="ParamLstBx"
ItemsSource="{Binding Path=SelectedItem.ParamList , ElementName=SubMaterialsLstBx}"
SelectedItem="{Binding Path=SelectedItem.SelWjParam , ElementName=SubMaterialsLstBx}"
Margin="0,0,0,0"
Grid.RowSpan="2" Grid.ColumnSpan="2">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="700">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="700">
<Grid.ColumnDefinitions>
<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*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
<Border Grid.Column="1" Margin="0,-5,0,-5"
Background="Transparent"
BorderBrush="{StaticResource Omag_Blue}" BorderThickness="3, 4, 3, 4">
<EgtWPFLib:EgtTextBox Text="{Binding Flux}" Grid.Column="1"
Margin="-2,0,-2,0"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
</Border>
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="2"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="3"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="4"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="5"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="6"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
<EgtWPFLib:EgtTextBox Text="{Binding dAngComp}" Grid.Column="7" IsLength="False"
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="7"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<EgtWPFLib:EgtTextBox Text="{Binding dAngComp}" Grid.Column="8" IsLength="False"
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="2">
<Button Name="NewParamBtn" Grid.Column="0"
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="2">
<Button Name="NewParamBtn" Grid.Column="0"
Command="{Binding NewWjParamCommand}"
Content="{Binding New_Msg}"
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
<Button Name="RemoveParamBtn" Grid.Column="1"
<Button Name="RemoveParamBtn" Grid.Column="1"
Command="{Binding DeleteWjParamCommand}"
Content="{Binding Delete_Msg}"
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
</UniformGrid>
</UniformGrid>
</Grid>
</Grid>
</GroupBox>
</GroupBox>
</Grid>
</Border>
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
</Grid>
</Border>
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
Command="{Binding SaveCommand}"
Content="{Binding Save_Msg}"
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
</Grid>
</Grid>
</Border>
</Border>
</UserControl>
+7 -1
View File
@@ -405,7 +405,13 @@ Public Class WaterjetDbWindowVM
Public ReadOnly Property Thickness_Msg As String
Get
Return "Spessore"
Return "Spess."
End Get
End Property
Public ReadOnly Property Flux_Msg As String
Get
Return "mg/min"
End Get
End Property
+13
View File
@@ -149,6 +149,19 @@ Class MainWindow
Options
End Enum
' Elenco delle operazioni tagli diretti (decoficiato in CamAuto per riconoscere il tipo taglio diretto)
Friend Enum FlagDirectCuts
ManualMove = 1
SingleCut = 2
GridCut = 3
SingleDrill = 4
Flattening = 5
Squaring = 6
SawTest = 7
Polishing = 8
CopyTemplate = 9
End Enum
Public Function GetExeRootDir() As String
Return m_sExeRoot
End Function
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.5.1")>
<Assembly: AssemblyFileVersion("2.7.5.1")>
<Assembly: AssemblyVersion("2.7.6.2")>
<Assembly: AssemblyFileVersion("2.7.6.2")>
+14 -2
View File
@@ -1651,6 +1651,11 @@ Namespace Num
n_ret = objDGeneralFunctions.ActivateProgram(l_glbPartProgramNumber, 0)
If n_ret <> 0 Then
EgtOutLog("Error: ActivateProgram error : " + n_ret.ToString())
Return n_ret
End If
Return n_ret
End Function
@@ -1698,17 +1703,24 @@ Namespace Num
Dim ngroup0 As Short = 0
Dim nTimeOut As Integer = 0
bSetModeDone = False
' ' Per prima versione FLEXIUM (3.5.040 - 2013)
' EgtOutLog("Scrittura modalità (" & nmode.ToString & ")")
' objDGeneralFunctions.WriteCncMode(nmode, ngroup0)
' Return 0
' Per ultime versioni FLEXIUM
objDGeneralFunctions.WriteCncMode2(nHandle, nmode, ngroup0)
While Not bSetModeDone And nTimeOut < SHORTSLEEPCOUNT
System.Threading.Thread.Sleep(SHORTSLEEPTIME)
nTimeOut += 1
End While
If Not bSetModeDone Then
EgtOutLog("Errore cambio modalit in MDI: " & TIMEOUT)
EgtOutLog("Errore cambio modalità in MDI: " & TIMEOUT)
Return TIMEOUT 'Errore di timeout
End If
If nSetModeResult <> 0 Then
EgtOutLog("Errore 2 cambio modalit in MDI: " & nSetModeResult)
EgtOutLog("Errore 2 cambio modalità in MDI: " & nSetModeResult)
End If
Return nSetModeResult
+28
View File
@@ -174,6 +174,9 @@
<Compile Include="AboutBox\AboutBoxWD.xaml.vb">
<DependentUpon>AboutBoxWD.xaml</DependentUpon>
</Compile>
<Compile Include="CadCuts\SelectTableWD.xaml.vb">
<DependentUpon>SelectTableWD.xaml</DependentUpon>
</Compile>
<Compile Include="CadCuts\ChooseTestToolWD.xaml.vb">
<DependentUpon>ChooseTestToolWD.xaml</DependentUpon>
</Compile>
@@ -193,6 +196,9 @@
<Compile Include="DirectCuts\ControlsDirectCutUC1.xaml.vb">
<DependentUpon>ControlsDirectCutUC1.xaml</DependentUpon>
</Compile>
<Compile Include="DirectCuts\CustomGridUC.xaml.vb">
<DependentUpon>CustomGridUC.xaml</DependentUpon>
</Compile>
<Compile Include="DirectCuts\Polishing.xaml.vb">
<DependentUpon>Polishing.xaml</DependentUpon>
</Compile>
@@ -215,12 +221,18 @@
<Compile Include="DrawImport\FiloTopUC.xaml.vb">
<DependentUpon>FiloTopUC.xaml</DependentUpon>
</Compile>
<Compile Include="DrawImport\SideAngleOneForAllWindow.xaml.vb">
<DependentUpon>SideAngleOneForAllWindow.xaml</DependentUpon>
</Compile>
<Compile Include="DrawImport\UnderDrillUC.xaml.vb">
<DependentUpon>UnderDrillUC.xaml</DependentUpon>
</Compile>
<Compile Include="LicenseWindow.xaml.vb">
<DependentUpon>LicenseWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Machine\Alarms2PageUC.xaml.vb">
<DependentUpon>Alarms2PageUC.xaml</DependentUpon>
</Compile>
<Compile Include="Machine\AlarmsPageUC.xaml.vb">
<DependentUpon>AlarmsPageUC.xaml</DependentUpon>
</Compile>
@@ -453,6 +465,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="CadCuts\SelectTableWD.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="CadCuts\ChooseTestToolWD.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -477,6 +493,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="DirectCuts\CustomGridUC.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="DirectCuts\Polishing.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -505,6 +525,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="DrawImport\SideAngleOneForAllWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="DrawImport\UnderDrillUC.xaml">
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
@@ -513,6 +537,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Machine\Alarms2PageUC.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Machine\AlarmsPageUC.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
+10 -9
View File
@@ -387,7 +387,7 @@
<Setter Property="Keyboard" Value="Calculator"/>
<Setter Property="KeyboardDimension" Value="300"/>
<Setter Property="Background" Value="#636974"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
</Style>
<Style x:Key="OmagCut_MachToolCalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
@@ -509,6 +509,7 @@
<!--<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>-->
<Setter Property="Background" Value="#1C1D22"/>
<Setter Property="BorderBrush" Value="#1C1D22"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
<Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
@@ -629,21 +630,21 @@
<Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
</Style>
<Style x:Key="OmagCut_KeyboardTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
<Setter Property="Keyboard" Value="Alphanumeric"/>
<Setter Property="KeyboardDimension" Value="600"/>
<Setter Property="Background" Value="#636974"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
</Style>
<Style x:Key="OmagCut_LowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
</Style>
<DataTemplate x:Key="GroupBoxHeaderTemplate">
@@ -717,10 +718,10 @@
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</Style>
<Style x:Key="OmagCut_WindowBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
<Setter Property="CornerRadius" Value="{StaticResource Page_CornerRadius}"/>
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_DarkGray}"/>
<Setter Property="Background" Value="LightGray"/>
</Style>
<Style x:Key="OmagCut_WindowBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
<Setter Property="CornerRadius" Value="{StaticResource Page_CornerRadius}"/>
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_DarkGray}"/>
<Setter Property="Background" Value="LightGray"/>
</Style>
</ResourceDictionary>
+4 -1
View File
@@ -81,6 +81,7 @@
<system:Double x:Key="FontSize_LowerBarOverride">18.6</system:Double> <!--14pt-->
<system:Double x:Key="FontSize_UnitOfMeasure">13.3</system:Double> <!--10pt-->
<system:Double x:Key="FontSize_GroupBoxHeader">22</system:Double>
<system:Double x:Key="FontSize_GroupBoxHeaderWJ">18</system:Double>
<system:Double x:Key="ComboBox_Height">40</system:Double>
<system:Double x:Key="ComboBoxTextBlock_Height">40</system:Double>
<system:Double x:Key="ArrowImage_Height">65</system:Double>
@@ -1223,6 +1224,7 @@
</Style>
<Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
<Setter Property="Foreground" Value="{StaticResource Omag_Black}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
@@ -1256,13 +1258,14 @@
</Style>
<Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
<Setter Property="Foreground" Value="{StaticResource Omag_Black}"/>
<Setter Property="Keyboard" Value="Calculator"/>
<Setter Property="IsLength" Value="True"/>
<Setter Property="KeyboardDimension" Value="300"/>
</Style>
<Style x:Key="OmagCut_CalculatorParamWjTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
<Setter Property="Width" Value="80"/>
<Setter Property="Width" Value="70"/>
<Setter Property="Keyboard" Value="Calculator"/>
<Setter Property="KeyboardDimension" Value="300"/>
<Setter Property="IsHitTestVisible" Value="False" />
+1 -1
View File
@@ -91,7 +91,7 @@ Public Class AddToDataBaseUC
WritePrivateProfileString(S_SCRAPS, K_LASTBLOCK, EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock, m_OmagPhotoWD.m_MainWindow.GetIniFile())
End If
' aggiorno il testo del messaggio "Add" "Save"
AddBtn.Content = "Save"
AddBtn.Content = EgtMsg(91252) ' Save
' notifico che da ora la lastra inserita è in modalità di modifica (non salvo la lastra come nuova, ma la sovrascrivo come in modifica)
EgtPHOTOLib.PhotoMap.refProjectVM.SetSelProjectMode(ProjectSlabVM.ProjectModeOpt.DETAIL)
+1 -1
View File
@@ -145,7 +145,7 @@ Public Class OmagPhotoWD
m_AddToDataBaseUC.ThicknessTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Thickness
m_AddToDataBaseUC.ProjectTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ProjectAssignedTo
' aggiorno il testo del messaggio "Add" "Save"
m_AddToDataBaseUC.AddBtn.Content = "Save"
m_AddToDataBaseUC.AddBtn.Content = EgtMsg(91252) ' Save
Return
End If
' inizializzo i campi
+18 -47
View File
@@ -35,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 & "Other Reset (Shift)"
ResetCutBtn.ToolTip = EgtMsg(91241) & vbCrLf & EgtMsg(91242) ' Reset Cuts - Other Reset (Shift)
End Sub
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
@@ -113,25 +113,6 @@ Public Class ProjectMgrUC
m_MainWindow.m_CadCutPageUC.m_NestPage.ReloadListParkInd()
Dim sNewFileName As String = SelParkIndWD.GetPathCurrProj()
SelParkIndWD.CopyImgSvg(sNewFileName)
'Dim Extension As String = ".svg"
'If Not MainWindow.m_bShowSVGParkInd Then Extension = ".png"
'For Each ItemParkInd As ParkInd In ListParkInd
' If ItemParkInd.Ind <> 0 And ItemParkInd.Ind <> 999 And ItemParkInd.nPartInPark > 0 Then
' Try
' Dim sNewFile As String = sNewFileName & ItemParkInd.Ind.ToString & Extension
' If MainWindow.m_bShowSVGParkInd Then
' WriteMyXML(sNewFile, ItemParkInd.LocalMyCanvas)
' Else
' If File.Exists(sNewFile) Then
' File.Delete(sNewFile)
' End If
' File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
' End If
' Catch ex As Exception
' EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non roiscita")
' End Try
' End If
'Next
m_MainWindow.m_CadCutPageUC.m_NestPage.ReloadListParkInd()
@@ -142,26 +123,11 @@ Public Class ProjectMgrUC
Friend Function ChooseTable() As Integer
Dim nTabInd As Integer = 0
Select Case GetTableCount()
Case 3
' Tavolo da usare ?
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", EgtMsg(91111), EgtMsgBox.Buttons.ONE_TWO_THREE, EgtMsgBox.Icons.NULL)
Select Case TableToUse.m_nPressedBtn
Case 1 ' 1
nTabInd = 1
Case 2 ' 2
nTabInd = 2
Case 0 ' 3
nTabInd = 3
End Select
Case 2
' Tavolo da usare ?
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", EgtMsg(91111), EgtMsgBox.Buttons.ONE_TWO, EgtMsgBox.Icons.NULL)
Select Case TableToUse.m_nPressedBtn
Case 1 ' 1
nTabInd = 1
Case 0 ' 2
nTabInd = 2
End Select
Case 4, 3, 2
Dim SelTabWD As New SelectTableWD(m_MainWindow)
SelTabWD.ShowDialog()
nTabInd = SelTabWD.nSelectedTable
SelTabWD.Close()
Case Else
nTabInd = 1
End Select
@@ -174,13 +140,18 @@ Public Class ProjectMgrUC
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 0 Then
Return nRes
End If
Select Case GetTableCount()
Case 2
' Vuoi cambiare tavola?
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", String.Format(EgtMsg(90968)), EgtMsgBox.Buttons.OK_CANCEL, EgtMsgBox.Icons.NULL)
nRes = TableToUse.m_nPressedBtn
Dim nCountTable As Integer = GetTableCount()
Select Case nCountTable
Case 4, 3, 2
' visualizzo l'elenco dei bottoni associati alle tavole disponibili
Dim SelTabWD As New SelectTableWD(m_MainWindow)
SelTabWD.ShowDialog()
If SelTabWD.DialogResult Then
nRes = SelTabWD.nSelectedTable
End If
SelTabWD.Close()
Case Else
' negli altri casi (3 tavole o una tavola non fare nulla)
' non fare nulla
End Select
Return nRes
End Function
@@ -1058,7 +1029,7 @@ Public Class ProjectMgrUC
End If
Next
Next
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage("Lavorazione aggiornate: " & nMachUpdated & "/ " & nMach)
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(91243) & nMachUpdated & "/ " & nMach) ' Lavorazione aggiornate:
End Sub
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
+1 -1
View File
@@ -6,7 +6,7 @@ Public Class SceneButtonsUC
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
Private Sub Init() Handles Me.Initialized
TopViewBtn.ToolTip = "Top View" & vbCrLf & "Select View (Shift)"
TopViewBtn.ToolTip = EgtMsg(91244) & vbCrLf & EgtMsg(91245) ' Top View - Select View (Shift)
End Sub
Private Sub MeasureBtn_Checked(sender As Object, e As RoutedEventArgs) Handles MeasureBtn.Checked
+2 -2
View File
@@ -17,7 +17,7 @@ Public Class ScrapsWD
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
' inserisco il titolo della pagina aperta
TitleTxBl.Content = "Scraps List"
TitleTxBl.Content = EgtMsg(91246) ' Scraps List
ScrapsListBox.ItemsSource = m_ScrapList
' definzione posizione finetra
Me.Left = 25
@@ -137,7 +137,7 @@ Public Class ScrapsWD
MyOmagPhotoWD.ShowDialog()
Else
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage("Error loading contour scrap")
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(91247)) ' Error loading contour scrap
End If
' ripristino il contesto corrente dell'immagine
+4
View File
@@ -505,6 +505,8 @@ Public Class ChooseMachining
' nascondo tutte le CmBx e TxBl
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Hidden
CurrSawingTiltedCmBx.Visibility = Windows.Visibility.Hidden
ApplySawingTiltedChBx.Visibility = Windows.Visibility.Hidden
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Hidden
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
CurrDrillingCmBx.Visibility = Windows.Visibility.Hidden
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
@@ -539,6 +541,8 @@ Public Class ChooseMachining
End If
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Visible
CurrSawingTiltedCmBx.Visibility = Windows.Visibility.Visible
ApplySawingTiltedChBx.Visibility = Windows.Visibility.Visible
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Visible
End If
' -- FORATURA -- se foretto presente
+4 -4
View File
@@ -40,10 +40,10 @@ Public Class OtherRefTabWD
' posiziono la finestra
Me.Top = Owner.Top + Owner.Height / 4 - Me.Height / 2
Me.Left = Owner.Left + Owner.Width / 6 - Me.Width / 2
RefRawTxbl.Text = "Raw reference"
RefTabXTxbl.Text = "Position X"
RefTabYTxbl.Text = "Position Y"
SelRefTxbl.Text = "Sel reference"
RefRawTxbl.Text = EgtMsg(91248) ' Raw reference
RefTabXTxbl.Text = EgtMsg(91249) ' Position X
RefTabYTxbl.Text = EgtMsg(91250) ' Position Y
SelRefTxbl.Text = EgtMsg(91251) ' Sel reference
RefTabOrientationCmBx.ItemsSource = m_RawPartPage.m_OtherRefTabOrientationList
RefTabOrientationCmBx.SelectedIndex = m_RawPartPage.m_OtherRefTabPos
RefTabCmBx.ItemsSource = m_RawPartPage.m_OtherRefTabList
+15 -15
View File
@@ -162,18 +162,18 @@ Public Class RawPartPageUC
KerfTxBx.Tag = KerfTxBl
' Creo lista modalità di definizione del grezzo
m_RawModeList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
m_RawModeList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
m_RawModeList(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
m_RawModeList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
m_RawModeList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
m_RawModeList(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
If m_MainWindow.m_CurrentMachine.bSaw Then
m_RawModeList(3) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
Else
' se non insrisco "Lama" allora ridimensiono il vettore
ReDim Preserve m_RawModeList(2)
End If
m_RawModeListEx(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
m_RawModeListEx(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
m_RawModeListEx(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
m_RawModeListEx(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
m_RawModeListEx(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
m_RawModeListEx(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
If m_MainWindow.m_CurrentMachine.bSaw Then
m_RawModeListEx(3) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
m_RawModeListEx(4) = EgtMsg(MSG_RAWPARTPAGEUC + 35) 'Da Fotografia
@@ -185,14 +185,14 @@ Public Class RawPartPageUC
RawModeCmBx.ItemsSource = m_RawModeList
' Creo la lista dei riferimenti tavola
m_OtherRefTabOrientationList(OTHERREFMODE.BL) = "Bottom left"
m_OtherRefTabOrientationList(OTHERREFMODE.BR) = "Bottom right"
m_OtherRefTabOrientationList(OTHERREFMODE.TR) = "Top right"
m_OtherRefTabOrientationList(OTHERREFMODE.TL) = "Top left"
m_OtherRefTabOrientationList(OTHERREFMODE.BL) = EgtMsg(91221) 'Bottom left
m_OtherRefTabOrientationList(OTHERREFMODE.BR) = EgtMsg(91222) 'Bottom right
m_OtherRefTabOrientationList(OTHERREFMODE.TR) = EgtMsg(91223) 'Top right
m_OtherRefTabOrientationList(OTHERREFMODE.TL) = EgtMsg(91224) 'Top left
' lista per selezione RawModeDamaged
m_RawModeDamagedList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
m_RawModeDamagedList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
m_RawModeDamagedList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
m_RawModeDamagedList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
If m_MainWindow.m_CurrentMachine.bSaw Then
m_RawModeDamagedList(2) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
Else
@@ -228,10 +228,10 @@ Public Class RawPartPageUC
AddBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 14) 'Add - Aggiungi
RemoveBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 15) 'Remove - Rimuovi
CloseBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 31) 'Close - Chiudi
RectangleBtn.Content = "Rectangle"
RectangleBtn.Content = EgtMsg(90501) 'Rectangle
ConfirmPhotoBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 24) 'Conferma
OtherRefTabTxBl.Text = "New Ref On Tab"
OtherRefTabTxBl.Text = EgtMsg(91225) 'New Ref On Tab
End Sub
@@ -1982,7 +1982,7 @@ Public Class RawPartPageUC
m_CurrProjPage.ClearMessage()
Else
OkBtn.IsEnabled = False
m_CurrProjPage.SetErrorMessage("Errore nella posizione o dimensione del grezzo")
m_CurrProjPage.SetErrorMessage(EgtMsg(91226)) ' Errore nella posizione o dimensione del grezzo
End If
End Sub
+8 -7
View File
@@ -90,6 +90,12 @@ Public Class SimulationPageUC
EgtOutLog(" -- PREPARE SIMUL --")
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
Dim bOk As Boolean = True
' Visualizzo opportunamente la macchina
m_nMachLook = MCH_LOOK.ALL
EgtSetMachineLook(m_nMachLook)
' Imposto vista 3d isometrica di tutto
EgtSetView(VT.ISO_SE, False)
EgtZoom(ZM.ALL)
' Elimino eventuale attrezzaggio da OmagOFFICE
EgtEraseCurrSetup()
' Verifico l'attrezzaggio degli utensili utilizzati
@@ -180,12 +186,6 @@ Public Class SimulationPageUC
ShowAllCurrPhaseMachinings()
' Costringo ad aggiornare UI
UpdateUI()
' Visualizzo opportunamente la macchina
m_nMachLook = MCH_LOOK.ALL
EgtSetMachineLook(m_nMachLook)
' Imposto vista 3d isometrica di tutto
EgtSetView(VT.ISO_SE, False)
EgtZoom(ZM.ALL)
' Registro funzione su aggiornamento interfaccia da sotto
EgtSetProcessEvents(m_ProcEventsCallback)
EgtSetOutText(m_OutTextCallback)
@@ -214,6 +214,7 @@ Public Class SimulationPageUC
If m_nIdMinRedX <> GDB_ID.NULL Then EgtSetStatus(m_nIdMinRedX, GDB_ST.OFF)
Dim m_nIdMinRedY = EgtGetFirstNameInGroup(nIdBase, "MinRedY")
If m_nIdMinRedY <> GDB_ID.NULL Then EgtSetStatus(m_nIdMinRedY, GDB_ST.OFF)
EgtOutLog(" -- END PREPARE SIMUL --")
End Sub
Private Sub StepBtn_Click(sender As Object, e As RoutedEventArgs) Handles StepBtn.Click
@@ -622,7 +623,7 @@ Public Class SimulationPageUC
' Ripristino come fase corrente quella iniziale
EgtSetCurrPhase(1)
If bOk Then
m_CurrProjPage.SetInfoMessage("Genarato file " & sFileName & m_MainWindow.m_CurrentMachine.sIsoFileExt)
m_CurrProjPage.SetInfoMessage(EgtMsg(90571) & sFileName & m_MainWindow.m_CurrentMachine.sIsoFileExt) ' Genarato file
Else
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
End If