Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b5f9bc3a14 | |||
| 586b72848c | |||
| 1e1e9eab39 | |||
| 36d01fa535 | |||
| 4a42bd3067 | |||
| fbfaad64cf | |||
| 33b09fdc4d | |||
| 4407d36165 | |||
| 15ceb6159f | |||
| 6070516cd5 |
@@ -366,7 +366,7 @@ Module EstCalc
|
|||||||
Dim nRawGrpId As Integer = EgtGetFirstRawPart()
|
Dim nRawGrpId As Integer = EgtGetFirstRawPart()
|
||||||
While nRawGrpId <> GDB_ID.NULL
|
While nRawGrpId <> GDB_ID.NULL
|
||||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nRawGrpId, NAME_RAW_SOLID)
|
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nRawGrpId, NAME_RAW_SOLID)
|
||||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName(nRawSolidId, PHOTO_NAME)
|
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName(nRawSolidId, GetPhotoName())
|
||||||
nRawGrpId = EgtGetNextRawPart(nRawGrpId)
|
nRawGrpId = EgtGetNextRawPart(nRawGrpId)
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Module EstPhoto
|
|||||||
' Recupero le dimensioni della tavola
|
' Recupero le dimensioni della tavola
|
||||||
Dim b3Tab As New BBox3d
|
Dim b3Tab As New BBox3d
|
||||||
If Not EgtGetTableArea(1, b3Tab) Then Return False
|
If Not EgtGetTableArea(1, b3Tab) Then Return False
|
||||||
b3Tab.Expand(100, 100, 0)
|
b3Tab.Expand(1000, 1000, 0)
|
||||||
' Elimino eventuale precedente foto
|
' Elimino eventuale precedente foto
|
||||||
Dim nOldPhotoId = GetPhoto()
|
Dim nOldPhotoId = GetPhoto()
|
||||||
If nOldPhotoId <> GDB_ID.NULL Then EgtErase(nOldPhotoId)
|
If nOldPhotoId <> GDB_ID.NULL Then EgtErase(nOldPhotoId)
|
||||||
@@ -428,7 +428,9 @@ Module EstPhoto
|
|||||||
Dim nNewPhotoId As Integer = EgtAddPhoto2(GetPhotoName(), sPath, ptOri, ptCen, dDimX, dDimY, nPhGrpId, ptMin, ptMax)
|
Dim nNewPhotoId As Integer = EgtAddPhoto2(GetPhotoName(), sPath, ptOri, ptCen, dDimX, dDimY, nPhGrpId, ptMin, ptMax)
|
||||||
If nNewPhotoId = GDB_ID.NULL Then Return False
|
If nNewPhotoId = GDB_ID.NULL Then Return False
|
||||||
' Eseguo eventuale rotazione attorno all'origine
|
' Eseguo eventuale rotazione attorno all'origine
|
||||||
EgtRotatePhoto(nNewPhotoId, ptOri, Vector3d.Z_AX(), dRot)
|
If Math.Abs( dRot) > EPS_ANG_ZERO then
|
||||||
|
EgtRotatePhoto(nNewPhotoId, ptOri, Vector3d.Z_AX(), dRot)
|
||||||
|
End If
|
||||||
' Salvo gli offset
|
' Salvo gli offset
|
||||||
EgtSetInfo(nNewPhotoId, "OffsX", dOffsetX)
|
EgtSetInfo(nNewPhotoId, "OffsX", dOffsetX)
|
||||||
EgtSetInfo(nNewPhotoId, "OffsY", dOffsetY)
|
EgtSetInfo(nNewPhotoId, "OffsY", dOffsetY)
|
||||||
|
|||||||
@@ -228,8 +228,8 @@ Public Class MainWindowM
|
|||||||
' Verifico abilitazione nesting automatico
|
' Verifico abilitazione nesting automatico
|
||||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2707, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(9423, 3104, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(9423, 2707, 1, m_nKeyOptions)
|
EgtGetKeyOptions(9423, 3104, 1, m_nKeyOptions)
|
||||||
' Verifico abilitazione prodotto
|
' Verifico abilitazione prodotto
|
||||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
|||||||
#End If
|
#End If
|
||||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2017-2025 by Egalware s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2017-2026 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(false)>
|
<Assembly: ComVisible(false)>
|
||||||
'In order to begin building localizable applications, set
|
'In order to begin building localizable applications, set
|
||||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.7.7.1")>
|
<Assembly: AssemblyVersion("3.1.4.2")>
|
||||||
<Assembly: AssemblyFileVersion("2.7.7.1")>
|
<Assembly: AssemblyFileVersion("3.1.4.2")>
|
||||||
|
|
||||||
|
|||||||
@@ -117,10 +117,11 @@ Public Class MyMachGroupPanelVM
|
|||||||
' Se macchina con più tavole, chiedo quale usare
|
' Se macchina con più tavole, chiedo quale usare
|
||||||
Dim nTabInd As Integer = 1
|
Dim nTabInd As Integer = 1
|
||||||
Dim nTabCnt As Integer = CamAuto.GetTableCount()
|
Dim nTabCnt As Integer = CamAuto.GetTableCount()
|
||||||
If nTabCnt > 1 And nTabCnt <= 3 Then
|
Dim SelectTableWindowVM As New SelectTableWindowVM()
|
||||||
Dim dlg As New SelectTableWindowV(Application.Current.MainWindow, New SelectTableWindowVM(DirectCast(nTabCnt, SelectTableWindowVM.TableNumOpt)))
|
If nTabCnt > 1 And nTabCnt <= 4 Then
|
||||||
dlg.ShowDialog()
|
Dim SelectTableWindowV As New SelectTableWindowV(Application.Current.MainWindow, SelectTableWindowVM)
|
||||||
nTabInd = dlg.m_SelTable
|
SelectTableWindowV.ShowDialog()
|
||||||
|
nTabInd = SelectTableWindowVM.nSelectedTable
|
||||||
End If
|
End If
|
||||||
EgtSetTable(GetTableName(nTabInd))
|
EgtSetTable(GetTableName(nTabInd))
|
||||||
' leggo nome attrezzaggio di default
|
' leggo nome attrezzaggio di default
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Public Class MyMachiningDbWindowV
|
|||||||
m_MachiningDbWindowVM = MachiningDbWindowVM
|
m_MachiningDbWindowVM = MachiningDbWindowVM
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.m_CloseWindow
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.OnCloseWindow
|
||||||
Me.DataContext = Nothing
|
Me.DataContext = Nothing
|
||||||
Me.DialogResult = bDialogResult
|
Me.DialogResult = bDialogResult
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Public Class MySetUpWindowV
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpWindowVM.m_CloseWindow
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpWindowVM.OnCloseWindow
|
||||||
Me.DialogResult = bDialogResult
|
Me.DialogResult = bDialogResult
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Public Class MyToolDbWindowV
|
|||||||
m_ToolDbWindowVM = ToolDbWindowVM
|
m_ToolDbWindowVM = ToolDbWindowVM
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ToolsDbView_Closed(bDialogResult As Boolean) Handles m_ToolDbWindowVM.m_CloseWindow
|
Private Sub ToolsDbView_Closed(bDialogResult As Boolean) Handles m_ToolDbWindowVM.OnCloseWindow
|
||||||
' Imposto contesto generale
|
' Imposto contesto generale
|
||||||
EgtSetCurrentContext(EgtWPFLib5.ToolDbWindowVM.ProjectSceneContext)
|
EgtSetCurrentContext(EgtWPFLib5.ToolDbWindowVM.ProjectSceneContext)
|
||||||
' Cancello contesto di visualizzazione utensile
|
' Cancello contesto di visualizzazione utensile
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Public Class MyWaterjetDbWindowV
|
|||||||
m_WaterjetDbWindowVM = WaterjetDbWindowVM
|
m_WaterjetDbWindowVM = WaterjetDbWindowVM
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_WaterjetDbWindowVM.m_CloseWindow
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_WaterjetDbWindowVM.OnCloseWindow
|
||||||
Me.DialogResult = bDialogResult
|
Me.DialogResult = bDialogResult
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||||
IsMinimizable="False" WindowStartupLocation="CenterScreen"
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" IsClosable="False"
|
||||||
CloseCommand="{Binding CloseCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
|
||||||
Title="{Binding sTitle}" Height="150" Width="320">
|
Title="{Binding sTitle}" Height="150" Width="320">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
Public Class ChangeTableVM
|
Public Class ChangeTableVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
Private m_refChanTableV As ChangeTableV
|
Private m_refChanTableV As ChangeTableV
|
||||||
|
|
||||||
Public Enum EnumDialogResult
|
Public Enum EnumDialogResult
|
||||||
@@ -28,21 +31,30 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_CurrTableList As New List(Of TableToChange)
|
||||||
|
Public ReadOnly Property CurrTableList As List(Of TableToChange)
|
||||||
|
Get
|
||||||
|
Return m_CurrTableList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione Comandi
|
||||||
Private m_cmdOk As ICommand
|
Private m_cmdOk As ICommand
|
||||||
Private m_cmdCancel As ICommand
|
Private m_cmdCancel As ICommand
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New(refV As ChangeTableV)
|
Sub New(refV As ChangeTableV)
|
||||||
m_refChanTableV = refV
|
m_refChanTableV = refV
|
||||||
' Procedo alla creazione della lista delle tavole disponibili
|
' Procedo alla creazione della lista delle tavole disponibili
|
||||||
Initialized()
|
Initialized()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private m_CurrTableList As New List(Of TableToChange)
|
#End Region ' Constructor
|
||||||
Public ReadOnly Property CurrTableList As List(Of TableToChange)
|
|
||||||
Get
|
#Region "METHODS"
|
||||||
Return m_CurrTableList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Sub Initialized()
|
Private Sub Initialized()
|
||||||
' recuepero l'inidce della tavola corrente
|
' recuepero l'inidce della tavola corrente
|
||||||
@@ -53,6 +65,12 @@
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "OkCommand"
|
||||||
|
|
||||||
Public ReadOnly Property OkCommand() As ICommand
|
Public ReadOnly Property OkCommand() As ICommand
|
||||||
Get
|
Get
|
||||||
If m_cmdOk Is Nothing Then
|
If m_cmdOk Is Nothing Then
|
||||||
@@ -62,15 +80,6 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property CancelCommand() As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdCancel Is Nothing Then
|
|
||||||
m_cmdCancel = New Command(AddressOf Cancel)
|
|
||||||
End If
|
|
||||||
Return m_cmdCancel
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Sub Ok()
|
Private Sub Ok()
|
||||||
' recupero l'indice della tavola impostata
|
' recupero l'indice della tavola impostata
|
||||||
For Each ItemTab As TableToChange In CurrTableList
|
For Each ItemTab As TableToChange In CurrTableList
|
||||||
@@ -84,17 +93,36 @@
|
|||||||
m_refChanTableV.Close()
|
m_refChanTableV.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' OkCommand
|
||||||
|
|
||||||
|
#Region "CancelCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property CancelCommand() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCancel Is Nothing Then
|
||||||
|
m_cmdCancel = New Command(AddressOf Cancel)
|
||||||
|
End If
|
||||||
|
Return m_cmdCancel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Sub Cancel()
|
Private Sub Cancel()
|
||||||
m_MyDialogResult = EnumDialogResult.CANCEL
|
m_MyDialogResult = EnumDialogResult.CANCEL
|
||||||
' procedo alla chiusura della finetra
|
' procedo alla chiusura della finetra
|
||||||
m_refChanTableV.Close()
|
m_refChanTableV.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CancelCommand
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class TableToChange
|
Public Class TableToChange
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
Private Property m_sName As String = "Tab"
|
Private Property m_sName As String = "Tab"
|
||||||
Public ReadOnly Property sName As String
|
Public ReadOnly Property sName As String
|
||||||
Get
|
Get
|
||||||
@@ -133,11 +161,17 @@ Public Class TableToChange
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Public Sub New(Name As String, Ind As Integer, IsCurrent As Boolean)
|
Public Sub New(Name As String, Ind As Integer, IsCurrent As Boolean)
|
||||||
m_sName = Name & " " & Ind.ToString
|
m_sName = Name & " " & Ind.ToString
|
||||||
m_nIndex = Ind
|
m_nIndex = Ind
|
||||||
m_bIsActive = IsCurrent
|
m_bIsActive = IsCurrent
|
||||||
NotifyPropertyChanged("IsActive")
|
NotifyPropertyChanged(NameOf(IsActive))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports EgtWPFLib5
|
Imports System.Drawing
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
Imports OmagOFFICE.ChangeTableVM
|
Imports OmagOFFICE.ChangeTableVM
|
||||||
|
|
||||||
Public Class NestingTabVM
|
Public Class NestingTabVM
|
||||||
@@ -585,9 +586,7 @@ Public Class NestingTabVM
|
|||||||
m_bStartRot = False
|
m_bStartRot = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Function RotateAllRawParts(dAngDeg As Double, Optional bIsReg As Boolean = True) As Boolean
|
Friend Function RotateAllRawParts(dAngDeg As Double) As Boolean
|
||||||
' Recupero rotazione totale
|
|
||||||
Dim dRegRot As Double = CamAuto.GetRegistrationRotation()
|
|
||||||
' Recupero il centro del grezzo iniziale per usarlo come centro della rotazione
|
' Recupero il centro del grezzo iniziale per usarlo come centro della rotazione
|
||||||
Dim ptCen As New Point3d
|
Dim ptCen As New Point3d
|
||||||
GetRawCenter(ptCen)
|
GetRawCenter(ptCen)
|
||||||
@@ -641,7 +640,7 @@ Public Class NestingTabVM
|
|||||||
End While
|
End While
|
||||||
nRevPhase += 1
|
nRevPhase += 1
|
||||||
End While
|
End While
|
||||||
' Altrimenti eseguo sistemazioni
|
' Altrimenti eseguo sistemazioni
|
||||||
Else
|
Else
|
||||||
' Origine della tavola
|
' Origine della tavola
|
||||||
Dim ptOri As Point3d
|
Dim ptOri As Point3d
|
||||||
@@ -704,17 +703,20 @@ Public Class NestingTabVM
|
|||||||
End If
|
End If
|
||||||
nOpeId = EgtGetNextActiveOperation(nOpeId)
|
nOpeId = EgtGetNextActiveOperation(nOpeId)
|
||||||
End While
|
End While
|
||||||
' Se non è registrazione, ruoto anche l'eventuale foto della lastra
|
' Ruoto anche l'eventuale foto della lastra e sistemo il riferimento sul grezzo
|
||||||
'If Not bIsReg Then
|
Dim nPhotoId = EstPhoto.GetPhoto()
|
||||||
' Dim nPhotoId = m_CurrProjPage.GetPhoto()
|
If nPhotoId <> GDB_ID.NULL then
|
||||||
' If nPhotoId <> GDB_ID.NULL then EgtRotatePhoto(nPhotoId, ptCen, Vector3d.Z_AX(), dAngDeg)
|
Dim dOldRot As Double = 0
|
||||||
'End If
|
EgtGetInfo(nPhotoId, "Rot", dOldRot)
|
||||||
' Aggiorno rotazione totale
|
EgtRotatePhoto(nPhotoId, ptCen, Vector3d.Z_AX(), dAngDeg)
|
||||||
If bIsReg Then
|
EgtSetInfo(nPhotoId, "Rot", dOldRot + dAngDeg)
|
||||||
CamAuto.SetRegistrationRotation(dRegRot + dAngDeg)
|
Dim refTxr As New Frame3d
|
||||||
Else
|
GetPhotoTextureRef(refTxr)
|
||||||
CamAuto.SetRegistrationRotation(0)
|
Dim nSolidId = EgtGetFirstNameInGroup(EgtGetFirstRawPart(), NAME_RAW_SOLID)
|
||||||
|
EgtSetTextureFrame(nSolidId, refTxr, GDB_RT.GLOB)
|
||||||
End If
|
End If
|
||||||
|
' Aggiorno rotazione totale
|
||||||
|
CamAuto.SetRegistrationRotation(0)
|
||||||
' Dichiaro grezzo per punti
|
' Dichiaro grezzo per punti
|
||||||
EgtSetInfo(GetCurrentRaw(), KEY_RAWBYPOINTS, 1)
|
EgtSetInfo(GetCurrentRaw(), KEY_RAWBYPOINTS, 1)
|
||||||
End If
|
End If
|
||||||
@@ -778,8 +780,11 @@ Public Class NestingTabVM
|
|||||||
nRevPhase += 1
|
nRevPhase += 1
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
' Muovo i punti SpotReg generati nel programma OFFICE
|
|
||||||
If bMoveOk Then
|
If bMoveOk Then
|
||||||
|
' Traslo anche l'eventuale foto della lastra
|
||||||
|
Dim nPhotoId = EstPhoto.GetPhoto()
|
||||||
|
If nPhotoId <> GDB_ID.NULL then EgtMovePhoto(nPhotoId, vtMove)
|
||||||
|
' Muovo i punti SpotReg generati nel programma OFFICE
|
||||||
OmagOFFICEMap.refRawPartTabVM.MoveAllSpotRegistration(vtMove)
|
OmagOFFICEMap.refRawPartTabVM.MoveAllSpotRegistration(vtMove)
|
||||||
End If
|
End If
|
||||||
' Ripristino lo stato iniziale
|
' Ripristino lo stato iniziale
|
||||||
@@ -2414,7 +2419,7 @@ Public Class NestingTabVM
|
|||||||
Dim nStat As Integer = GDB_ST.ON_
|
Dim nStat As Integer = GDB_ST.ON_
|
||||||
EgtGetStatus(nPartId, nStat)
|
EgtGetStatus(nPartId, nStat)
|
||||||
|
|
||||||
' verifico se l'lemento selezionato è il numero di pezzi
|
' verifico se l'elemento selezionato è il numero di pezzi
|
||||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||||
Dim NameLayer As String = String.Empty
|
Dim NameLayer As String = String.Empty
|
||||||
EgtGetName(EgtGetParent(nId), NameLayer)
|
EgtGetName(EgtGetParent(nId), NameLayer)
|
||||||
@@ -2463,10 +2468,21 @@ Public Class NestingTabVM
|
|||||||
' se non è stata eseguita nessuna scelta esco dal ciclo
|
' se non è stata eseguita nessuna scelta esco dal ciclo
|
||||||
If ChgTbVM.MyDialogResult = EnumDialogResult.CANCEL Or ChgTbVM.nSelectedTable = 0 Then Exit While
|
If ChgTbVM.MyDialogResult = EnumDialogResult.CANCEL Or ChgTbVM.nSelectedTable = 0 Then Exit While
|
||||||
|
|
||||||
' recupero il nome della tavola corrente
|
' salvo l'origine della precente tavola
|
||||||
|
Dim ptOldTabOri As Point3d
|
||||||
|
EgtGetTableRef( 1, ptOldTabOri)
|
||||||
|
|
||||||
|
' recupero il nome della nuova tavola corrente
|
||||||
Dim sOtherTab As String = GetTableName(ChgTbVM.nSelectedTable)
|
Dim sOtherTab As String = GetTableName(ChgTbVM.nSelectedTable)
|
||||||
|
|
||||||
EgtChangeTable(sOtherTab, True)
|
EgtChangeTable(sOtherTab, True)
|
||||||
|
' Traslo anche l'eventuale foto della lastra
|
||||||
|
Dim nPhotoId = EstPhoto.GetPhoto()
|
||||||
|
If nPhotoId <> GDB_ID.NULL then
|
||||||
|
Dim ptTabOri As Point3d
|
||||||
|
EgtGetTableRef( 1, ptTabOri)
|
||||||
|
EgtMovePhoto(nPhotoId, ptTabOri - ptOldTabOri)
|
||||||
|
End If
|
||||||
EstCalc.AdjustAdditionalTable(True)
|
EstCalc.AdjustAdditionalTable(True)
|
||||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
' aggiorno le lavorazioni
|
' aggiorno le lavorazioni
|
||||||
@@ -2509,10 +2525,10 @@ Public Class NestingTabVM
|
|||||||
EgtSetCurrPhase(1)
|
EgtSetCurrPhase(1)
|
||||||
' Rotazione
|
' Rotazione
|
||||||
Dim dAngRot As Double = If(sOtherTab = SECOND_TAB, 180, -180)
|
Dim dAngRot As Double = If(sOtherTab = SECOND_TAB, 180, -180)
|
||||||
If Not RotateAllRawParts(dAngRot, False) Then
|
If Not RotateAllRawParts(dAngRot) Then
|
||||||
'm_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
|
'm_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
|
||||||
End If
|
End If
|
||||||
' Traslazione per riportare la lastra nella stessa posizione rispetto all'angolo BL che diveta TR e viceversa
|
' Traslazione per riportare la lastra nella stessa posizione rispetto all'angolo BL che diventa TR e viceversa
|
||||||
Dim b3Raw As New BBox3d
|
Dim b3Raw As New BBox3d
|
||||||
GetRawBox(b3Raw)
|
GetRawBox(b3Raw)
|
||||||
Dim vtMove As Vector3d
|
Dim vtMove As Vector3d
|
||||||
@@ -2538,7 +2554,7 @@ Public Class NestingTabVM
|
|||||||
|
|
||||||
' visualizzazione
|
' visualizzazione
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
' Elimino il datacontext della finsetra per la selezione della tavola
|
' Elimino il datacontext della finestra per la selezione della tavola
|
||||||
ChgTbVM = Nothing
|
ChgTbVM = Nothing
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1,56 +1,60 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="SelectTableWindowV"
|
<EgtWPFLib5:EgtCustomWindow x:Class="SelectTableWindowV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
IsClosable="False"
|
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||||
IsMinimizable="False"
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||||
ShowInTaskbar="False"
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" IsClosable="False"
|
||||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
Title="{Binding Title}" Height="150" Width="320">
|
||||||
SizeToContent="WidthAndHeight"
|
|
||||||
Title="{Binding Title}"
|
|
||||||
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
|
||||||
|
|
||||||
<Grid HorizontalAlignment="Center"
|
<Grid>
|
||||||
VerticalAlignment="Center"
|
|
||||||
Margin="10,10,10,20">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="2*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
<ItemsControl ItemsSource="{Binding CurrTableList}">
|
||||||
|
<!--Definisco l'organizzazione dei comandi-->
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<!--Definisco il contenuto del comando-->
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<RadioButton GroupName="TabGrp"
|
||||||
|
IsChecked="{Binding IsActive}"
|
||||||
|
Width="60" Height="60"
|
||||||
|
Style="{DynamicResource ChangeTable_ToggleButton}">
|
||||||
|
<Grid>
|
||||||
|
<!--Nome della tavole: Tab #-->
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Background="Transparent">
|
||||||
|
<TextBlock.Style>
|
||||||
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource Omag_LightGray}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=RadioButton}}" Value="True">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</TextBlock.Style>
|
||||||
|
</TextBlock>
|
||||||
|
<!--Rappresentazione di una tavola di lavoro-->
|
||||||
|
<Image Source="{Binding ImgTab}" Margin="0,20,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<TextBlock Text="{Binding WndMsg}"
|
</RadioButton>
|
||||||
FontSize="18"
|
</DataTemplate>
|
||||||
Grid.ColumnSpan="3"
|
</ItemsControl.ItemTemplate>
|
||||||
Margin="0,0,0,10"/>
|
</ItemsControl>
|
||||||
|
<Button Grid.Row="1" Content="Ok" Margin="5"
|
||||||
<Button Grid.Column="0" Grid.Row="1"
|
Command="{Binding OkCommand}"
|
||||||
Content="1" FontSize="40"
|
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||||
Style="{StaticResource OptionPanel_NestingButton}"
|
|
||||||
Command="{Binding Table_Command}"
|
|
||||||
CommandParameter="1"
|
|
||||||
Margin="10,0,10,0">
|
|
||||||
</Button>
|
|
||||||
<Button Grid.Column="1" Grid.Row="1"
|
|
||||||
Content="2" FontSize="40"
|
|
||||||
Style="{StaticResource OptionPanel_NestingButton}"
|
|
||||||
Command="{Binding Table_Command}"
|
|
||||||
CommandParameter="2"
|
|
||||||
Margin="10,0,10,0">
|
|
||||||
</Button>
|
|
||||||
<Button Grid.Column="2" Grid.Row="1"
|
|
||||||
Content="3" FontSize="40"
|
|
||||||
Style="{StaticResource OptionPanel_NestingButton}"
|
|
||||||
Command="{Binding Table_Command}"
|
|
||||||
CommandParameter="3"
|
|
||||||
Visibility="{Binding Table3_Visibility}"
|
|
||||||
Margin="10,0,10,0">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
</EgtWPFLib5:EgtCustomWindow>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
Public Class SelectTableWindowV
|
Public Class SelectTableWindowV
|
||||||
|
|
||||||
Private WithEvents m_SelectTableWindowVM As SelectTableWindowVM
|
Private WithEvents m_SelectTableWindowVM As SelectTableWindowVM
|
||||||
Public m_SelTable As Integer
|
|
||||||
|
|
||||||
Sub New(Owner As Window, SelectTableWindowVM As SelectTableWindowVM)
|
Sub New(Owner As Window, SelectTableWindowVM As SelectTableWindowVM)
|
||||||
MyBase.New(Owner)
|
MyBase.New(Owner)
|
||||||
@@ -13,7 +12,6 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseWindow(DialogResult As Integer) Handles m_SelectTableWindowVM.m_CloseWindow
|
Private Sub CloseWindow(DialogResult As Integer) Handles m_SelectTableWindowVM.m_CloseWindow
|
||||||
m_SelTable = DialogResult
|
|
||||||
Me.DialogResult = True
|
Me.DialogResult = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +1,24 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class SelectTableWindowVM
|
Public Class SelectTableWindowVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
Public Enum TableNumOpt As Integer
|
|
||||||
TWO = 2
|
|
||||||
THREE = 3
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Friend Event m_CloseWindow(DialogResult As Integer)
|
Friend Event m_CloseWindow(DialogResult As Integer)
|
||||||
|
|
||||||
Private m_Table3_Visibility As Visibility
|
Private m_nSelectedTable As Integer = 0
|
||||||
Public Property Table3_Visibility As Visibility
|
Public ReadOnly Property nSelectedTable As Integer
|
||||||
Get
|
Get
|
||||||
Return m_Table3_Visibility
|
Return m_nSelectedTable
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_CurrTableList As New List(Of TableToChange)
|
||||||
|
Public ReadOnly Property CurrTableList As List(Of TableToChange)
|
||||||
|
Get
|
||||||
|
Return m_CurrTableList
|
||||||
End Get
|
End Get
|
||||||
Set(value As Visibility)
|
|
||||||
m_Table3_Visibility = value
|
|
||||||
End Set
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
@@ -40,41 +38,49 @@ Public Class SelectTableWindowVM
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdTable As ICommand
|
Private m_cmdOk As ICommand
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New(nTableNum As TableNumOpt)
|
Sub New()
|
||||||
If nTableNum = TableNumOpt.TWO Then
|
' recuepero l'inidce della tavola corrente
|
||||||
m_Table3_Visibility = Visibility.Collapsed
|
Dim nIndeXCurrTab As Integer = GetCurrentTable()
|
||||||
Else
|
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
|
||||||
m_Table3_Visibility = Visibility.Visible
|
For nInd As Integer = 0 To GetTableCount() - 1
|
||||||
End If
|
m_CurrTableList.Add(New TableToChange("Tab", (nInd + 1), ((nInd + 1) = nIndeXCurrTab)))
|
||||||
NotifyPropertyChanged("Table3_Visibility")
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "Table"
|
#Region "OkCommand"
|
||||||
|
|
||||||
Public ReadOnly Property Table_Command As ICommand
|
Public ReadOnly Property OkCommand() As ICommand
|
||||||
Get
|
Get
|
||||||
If m_cmdTable Is Nothing Then
|
If m_cmdOk Is Nothing Then
|
||||||
m_cmdTable = New Command(AddressOf Table)
|
m_cmdOk = New Command(AddressOf Ok)
|
||||||
End If
|
End If
|
||||||
Return m_cmdTable
|
Return m_cmdOk
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub Table(ByVal param As Object)
|
Private Sub Ok(ByVal param As Object)
|
||||||
|
' 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
|
||||||
|
' procedo alla chiusura della finetra
|
||||||
RaiseEvent m_CloseWindow(CInt(param))
|
RaiseEvent m_CloseWindow(CInt(param))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' DrawCommand
|
#End Region ' OkCommand
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user