Compare commits

..

2 Commits

Author SHA1 Message Date
NicolaP 83cf2646cf Passo alla libreira il nome dello User 2022-06-20 15:08:08 +02:00
NicolaP 11bc92bb10 Getsione comunicazionea DB lastra in lettura 2022-06-16 16:17:35 +02:00
3 changed files with 33 additions and 34 deletions
+5 -1
View File
@@ -269,10 +269,14 @@ Public Class MainWindowM
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString())
EgtPHOTOLib.MainData.SetConfigDir(m_sConfigDir)
EgtPHOTOLib.MainData.SetKeyLevel(m_nKeyLevel)
EgtPHOTOLib.MainData.SetKeyOptions( CInt( m_nKeyOptions))
EgtPHOTOLib.MainData.SetKeyOptions(CInt(m_nKeyOptions))
EgtPHOTOLib.MainData.SetPhotoDir(m_sPhotoDir)
EgtPHOTOLib.MainData.SetBackUpDir(m_sBackUpDir)
EgtPHOTOLib.MainData.SetIsOmagOFFICE(True)
EgtPHOTOLib.MainData.SetUser(Environment.MachineName & "\" & Environment.UserName & " (" & nInstance.ToString() & ")")
Dim sIdKey As String = String.Empty
EgtGetKeyInfo(sIdKey)
EgtPHOTOLib.MainData.SetKey(sIdKey)
End Sub
Private Sub ManageInstance()
+2 -30
View File
@@ -223,8 +223,6 @@ Public Class MySceneHostVM
End Sub
Private Function ExecExport(sDirDest As String) As Boolean
' salvo il nome della macchina correntemente selezionata
Dim CurrentSelectedMachGroup As String = OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.Machine
' Path completa del progetto corrente
Dim sFilePath As String = String.Empty
EgtGetCurrFilePath(sFilePath)
@@ -284,10 +282,10 @@ Public Class MySceneHostVM
File.Copy(sOriPath, sNewPath, True)
Catch ex As Exception
bOk = False
EgtOutLog("Slab image not found :" & sOriPath)
EgtOutLog( "Slab image not found :" & sOriPath)
End Try
EgtSetName(nPhotoId, PHOTO_NAME)
EgtChangePhotoCenterAsFlatScan(nPhotoId)
EgtChangePhotoCenterAsFlatScan( nPhotoId)
End If
' Elimino gli altri gruppi di lavorazioni
For Each nMGrpId As Integer In vMchGrps
@@ -310,25 +308,6 @@ Public Class MySceneHostVM
Dim nMarkId As Integer = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nMarkId, NAME_PROJMARK)
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
' Imposto la macchina: salvo l'altezza della sovratavola
Dim sMachine As String = String.Empty
EgtGetInfo(nMchGrpId, "Machine", sMachine)
If Not String.IsNullOrEmpty(sMachine) Then
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sMachine,
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
True)
Select Case GetCurrentTable()
Case 3
EgtSetInfo(nMarkId, K_TAB3_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
Case 2
EgtSetInfo(nMarkId, K_TAB2_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
Case Else
EgtSetInfo(nMarkId, K_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
End Select
End If
Dim nReducedCut As Integer = 1
EgtGetInfo(nMchGrpId, INFO_REDUCEDCUT, nReducedCut)
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
@@ -347,13 +326,6 @@ Public Class MySceneHostVM
' Salvo il file
If Not EgtSaveFile(sFileDest, NGE.CMPTEXT) Then bOk = False
Next
' reimposto la macchina corrente
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, CurrentSelectedMachGroup,
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
True)
' Distruggo il contesto corrente e ripristino quello originale
EgtSetCurrentContext(nCurrCtx)
EgtDeleteContext(nCtx)
+26 -3
View File
@@ -1,4 +1,6 @@
Imports System.IO
Imports System.Threading
Imports System.Windows.Threading
Imports System.IO
Imports System.Collections.ObjectModel
Imports EgtWPFLib5
Imports EgtPHOTOLib
@@ -7,6 +9,10 @@ Imports EgtUILib
Public Class RawPartTabVM
Inherits VMBase
' Timer
Private m_TimerIsBusy As Boolean = False
Private m_RefreshTimer As New DispatcherTimer
Friend OmagPhoto As OmagPhotoV
Private m_OmagPhotoVM As OmagPhotoVM
@@ -2034,11 +2040,17 @@ Public Class RawPartTabVM
' inserisco in elenco solo i materiali della macchina corrente
AddHandler PhotoMap.refOptionPanelVM.SlabIsSelectedOFFICE, AddressOf OmagOFFICEMap.refRawPartTabVM.ClosePhotoWnd
' Dim OmagPhotoWnd As New OmagPhotoV(Application.Current.MainWindow(), New OmagPhotoVM)
'OmagPhotoWnd.ShowDialog()
' lancio il timer di aggiornamento dell'interfaccia, per la gestione di due OmagPHOTO che accedono allo stesso SQL
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_Tick
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(2000)
m_RefreshTimer.Start()
' apro la finestra per accedere al DB delle lastre
Me.OmagPhoto = New OmagPhotoV
OmagPhoto.ShowDialog()
m_RefreshTimer.Stop()
EgtSetCurrentContext(EgtPHOTOLib.MainData.PreviousContext)
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
@@ -2156,6 +2168,17 @@ Public Class RawPartTabVM
EgtDraw()
End Sub
' per la gestione di due OmagPHOTO che accedono allo stesso SQL
Private Sub RefreshTimer_Tick()
If Not m_TimerIsBusy And PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.LIST Then
m_TimerIsBusy = True
m_RefreshTimer.Stop()
EgtPHOTOLib.PhotoMap.refListPageVM.RefreshLisPage()
m_TimerIsBusy = False
m_RefreshTimer.Start()
End If
End Sub
#End Region ' PhotoCommand
#Region "ConfirmPhotoCommand"