diff --git a/Application.xaml.vb b/Application.xaml.vb index 4c3378a..0c96ca3 100644 --- a/Application.xaml.vb +++ b/Application.xaml.vb @@ -1,14 +1,21 @@ -Class Application +Imports EgtPHOTOLib - ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException - ' can be handled in this file. +Class Application + + ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException + ' can be handled in this file. Protected Overrides Sub OnStartup(e As StartupEventArgs) MyBase.OnStartup(e) ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose ' Creo la View principale Me.MainWindow = New MainWindowV ' Mostro la View principale - Me.MainWindow.Show() + If PhotoMap.ContinueApplication Then + Me.MainWindow.Show() + Else + End + End If + End Sub End Class diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb index 337677e..c8caee5 100644 --- a/MainWindow/MainWindowM.vb +++ b/MainWindow/MainWindowM.vb @@ -202,8 +202,8 @@ Public Class MainWindowM Dim bNetHwKey As Boolean = ( GetMainPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1) EgtSetNetHwKey( bNetHwKey) ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(9423, 2501, 1, m_nKeyLevel) And - EgtGetKeyOptions(9423, 2501, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(9423, 2502, 1, m_nKeyLevel) And + EgtGetKeyOptions(9423, 2502, 1, m_nKeyOptions) ' Verifico abilitazione prodotto Dim bProd As Boolean = GetKeyOption(KEY_OPT.PHOTO_BASE) ' Inizializzazione generale di EgtInterface @@ -278,9 +278,6 @@ Public Class MainWindowM MessageBox.Show(EgtMsg(MSG_OMAGPHOTO + 1) & EgtMsg(MSG_OMAGPHOTO + 2), EgtMsg(MSG_EGTMSGBOX + 15), MessageBoxButton.OK, MessageBoxImage.Error) End End If - - Dim sLastBlock As String = String.Empty - ' Info su opzioni chiave EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString()) ' Imposto parametri EgtPHOTOLib @@ -295,6 +292,7 @@ Public Class MainWindowM EgtPHOTOLib.MainData.SetZebraPrinterExe(m_ZebraUtilitiesExe) EgtPHOTOLib.MainData.SetPrinterVisibility(m_PrinterIsVisible) EgtPHOTOLib.MainData.SetCapsLock(m_bCapsLock) + Dim sLastBlock As String = String.Empty If GetMainPrivateProfileString(S_GENERAL, "LastBlock", "", sLastBlock) <> 0 Then EgtPHOTOLib.MainData.SetLastBlock(sLastBlock) Dim sIdKey As String = String.Empty EgtGetKeyInfo(sIdKey) @@ -307,7 +305,8 @@ Public Class MainWindowM ' 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 + If Not m_TimerIsBusy AndAlso Not IsNothing(PhotoMap.refProjectVM) AndAlso + PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.LIST Then m_TimerIsBusy = True m_RefreshTimer.Stop() EgtPHOTOLib.PhotoMap.refListPageVM.RefreshLisPage() diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index bf2539e..60702f8 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -18,8 +18,8 @@ Imports System.Windows #End If - - + + @@ -59,5 +59,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + +