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
2 changed files with 31 additions and 4 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()
+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"