From 6851be8186f98fb4358851f0bf11f89279f38882 Mon Sep 17 00:00:00 2001 From: NicolaP Date: Wed, 5 May 2021 15:50:57 +0200 Subject: [PATCH 1/6] Nuova gestione SQL --- MainWindow/MainWindowM.vb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb index 4d557e6..8ead47f 100644 --- a/MainWindow/MainWindowM.vb +++ b/MainWindow/MainWindowM.vb @@ -217,22 +217,22 @@ Public Class MainWindowM Dim sIdKey As String = String.Empty EgtGetKeyInfo(sIdKey) EgtPHOTOLib.MainData.SetKey(sIdKey) - '' 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() + ' 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() 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 + 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 Private Sub ManageInstance() Dim bCreated As Boolean From d0f7cf74098b87413a94ee6fff2c2991041982c9 Mon Sep 17 00:00:00 2001 From: NicolaP Date: Thu, 22 Jul 2021 16:16:00 +0200 Subject: [PATCH 2/6] Creazione file di dati per stampa etichetta --- Constants/ConstIni.vb | 5 +++++ MainWindow/MainWindowM.vb | 30 ++++++++++++++++++++++++++++++ OmagPHOTO.vbproj | 13 ++++++++----- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb index 2c8bcb6..16a1a1b 100644 --- a/Constants/ConstIni.vb +++ b/Constants/ConstIni.vb @@ -36,6 +36,11 @@ Module ConstIni Public Const K_PHOTODIR As String = "PhotoDir" Public Const K_CAMERALINK As String = "CameraLink" + Public Const S_PRINTER As String = "Printer" + Public Const K_TEMPLATE As String = "Template" + Public Const K_DAT As String = "Dat" + Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities" + Public Const S_LANGUAGES As String = "Languages" Public Const K_LANGUAGE As String = "Language" diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb index 8ead47f..6252ac6 100644 --- a/MainWindow/MainWindowM.vb +++ b/MainWindow/MainWindowM.vb @@ -93,6 +93,27 @@ Public Class MainWindowM End Get End Property + Private m_TemplateFilePrinter As String + Friend ReadOnly Property sTemplateFilePrinter As String + Get + Return m_TemplateFilePrinter + End Get + End Property + + Private m_DatFilePrinter As String + Friend ReadOnly Property DataFilePrinter As String + Get + Return m_DatFilePrinter + End Get + End Property + + Private m_ZebraUtilitiesExe As String + Friend ReadOnly Property ZebraUtilitiesExe As String + Get + Return m_ZebraUtilitiesExe + End Get + End Property + Private m_sBackUpDir As String Friend ReadOnly Property sBackUpDir As String Get @@ -200,6 +221,12 @@ Public Class MainWindowM EgtLuaRequire(sLuaBaseLib) ' Leggo nome cartella delle foto GetMainPrivateProfileString(S_GENERAL, K_PHOTODIR, sDataRoot & "\Data", m_sPhotoDir) + ' leggo nome file prn (per stampante zebra) + GetMainPrivateProfileString(S_PRINTER, K_TEMPLATE, sDataRoot & "\Template.prn", m_TemplateFilePrinter) + ' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra) + GetMainPrivateProfileString(S_PRINTER, K_DAT, sDataRoot & "\Temp", m_DatFilePrinter) + ' leggo nome file exe (per stampante zebra) + GetMainPrivateProfileString(S_PRINTER, K_ZEBRAUTILITIES, System.AppDomain.CurrentDomain.BaseDirectory & "\ZebraPrinterUtilitiesR32.exe", m_ZebraUtilitiesExe) ' Creo connessione al Db If Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then EgtOutLog("Error connecting to DB") @@ -214,6 +241,9 @@ Public Class MainWindowM EgtPHOTOLib.MainData.SetKeyOptions(m_nKeyOptions) EgtPHOTOLib.MainData.SetPhotoDir(m_sPhotoDir) EgtPHOTOLib.MainData.SetBackUpDir(m_sBackUpDir) + EgtPHOTOLib.MainData.SetTemplateFilePrinter(m_TemplateFilePrinter) + EgtPHOTOLib.MainData.SetDataFilePrinter(m_DatFilePrinter) + EgtPHOTOLib.MainData.SetZebraPrinterExe(m_ZebraUtilitiesExe) Dim sIdKey As String = String.Empty EgtGetKeyInfo(sIdKey) EgtPHOTOLib.MainData.SetKey(sIdKey) diff --git a/OmagPHOTO.vbproj b/OmagPHOTO.vbproj index a61413c..4d4c62e 100644 --- a/OmagPHOTO.vbproj +++ b/OmagPHOTO.vbproj @@ -55,14 +55,17 @@ app.manifest - + + False ..\..\EgtProg\Dll32\EgtPHOTOLib.dll - - ..\..\EgtProg\DllD32\EgtUILib.dll + + False + ..\..\EgtProg\Dll32\EgtUILib.dll - - ..\..\EgtProg\DllD32\EgtWPFLib5.dll + + False + ..\..\EgtProg\Dll32\EgtWPFLib5.dll From 0c9159e29a42562a16d8a4d9a1bb7389bcd4382b Mon Sep 17 00:00:00 2001 From: NicolaP Date: Fri, 23 Jul 2021 11:54:12 +0200 Subject: [PATCH 3/6] Aggiornamento di versione 2.3g1 --- MainWindow/MainWindowM.vb | 6 +++--- My Project/AssemblyInfo.vb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb index 6252ac6..5eb59b2 100644 --- a/MainWindow/MainWindowM.vb +++ b/MainWindow/MainWindowM.vb @@ -161,8 +161,8 @@ Public Class MainWindowM EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile) EgtSetKey(sKey) ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(9423, 2304, 1, m_nKeyLevel) And - EgtGetKeyOptions(9423, 2304, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(9423, 2307, 1, m_nKeyLevel) And + EgtGetKeyOptions(9423, 2307, 1, m_nKeyOptions) ' Verifico abilitazione prodotto Dim bProd As Boolean = GetKeyOption(KEY_OPT.PHOTO_BASE) ' Inizializzazione generale di EgtInterface @@ -226,7 +226,7 @@ Public Class MainWindowM ' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra) GetMainPrivateProfileString(S_PRINTER, K_DAT, sDataRoot & "\Temp", m_DatFilePrinter) ' leggo nome file exe (per stampante zebra) - GetMainPrivateProfileString(S_PRINTER, K_ZEBRAUTILITIES, System.AppDomain.CurrentDomain.BaseDirectory & "\ZebraPrinterUtilitiesR32.exe", m_ZebraUtilitiesExe) + GetMainPrivateProfileString(S_PRINTER, K_ZEBRAUTILITIES, System.AppDomain.CurrentDomain.BaseDirectory & "ZebraPrinterUtilitiesR32.exe", m_ZebraUtilitiesExe) ' Creo connessione al Db If Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then EgtOutLog("Error connecting to DB") diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 1d0c5b1..40e5b01 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -59,5 +59,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From a50cc537abcca6a5a800291f8f40c09ddb409771 Mon Sep 17 00:00:00 2001 From: NicolaP Date: Thu, 5 Aug 2021 16:34:35 +0200 Subject: [PATCH 4/6] Aggiornamento ver_2.3h1 --- MainWindow/MainWindowM.vb | 4 ++-- My Project/AssemblyInfo.vb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb index 5eb59b2..a36c070 100644 --- a/MainWindow/MainWindowM.vb +++ b/MainWindow/MainWindowM.vb @@ -161,8 +161,8 @@ Public Class MainWindowM EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile) EgtSetKey(sKey) ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(9423, 2307, 1, m_nKeyLevel) And - EgtGetKeyOptions(9423, 2307, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(9423, 2308, 1, m_nKeyLevel) And + EgtGetKeyOptions(9423, 2308, 1, m_nKeyOptions) ' Verifico abilitazione prodotto Dim bProd As Boolean = GetKeyOption(KEY_OPT.PHOTO_BASE) ' Inizializzazione generale di EgtInterface diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 40e5b01..c24205b 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -59,5 +59,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From e8716e32ef58877b667f4af5306b6d865c9a7d9f Mon Sep 17 00:00:00 2001 From: NicolaP Date: Wed, 25 Aug 2021 18:45:54 +0200 Subject: [PATCH 5/6] =?UTF-8?q?Gestione=20selezione=20del=20file=20*.prn?= =?UTF-8?q?=20per=20stampante=20e=20visibilit=C3=A0=20bottone=20Print?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Constants/ConstIni.vb | 1 + MainWindow/MainWindowM.vb | 24 +++++++++++-- My Project/AssemblyInfo.vb | 4 +-- OptionWindow/OptionWindowV.xaml | 22 ++++++++++-- OptionWindow/OptionWindowVM.vb | 61 +++++++++++++++++++++++++++++++++ 5 files changed, 105 insertions(+), 7 deletions(-) diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb index 16a1a1b..9503e74 100644 --- a/Constants/ConstIni.vb +++ b/Constants/ConstIni.vb @@ -40,6 +40,7 @@ Module ConstIni Public Const K_TEMPLATE As String = "Template" Public Const K_DAT As String = "Dat" Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities" + Public Const K_ENABLE_PRINTER As String = "EnablePrinter" Public Const S_LANGUAGES As String = "Languages" Public Const K_LANGUAGE As String = "Language" diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb index a36c070..4886cfc 100644 --- a/MainWindow/MainWindowM.vb +++ b/MainWindow/MainWindowM.vb @@ -93,11 +93,19 @@ Public Class MainWindowM End Get End Property + ' l'indirizzo del file può essere modificato dalla pagina OptionPage Private m_TemplateFilePrinter As String - Friend ReadOnly Property sTemplateFilePrinter As String + Friend Property sTemplateFilePrinter As String Get Return m_TemplateFilePrinter End Get + Set(value As String) + m_TemplateFilePrinter = value + ' salvo il nome del nuovo file template in uso + WriteMainPrivateProfileString(S_PRINTER, K_TEMPLATE, m_TemplateFilePrinter) + ' comunico alla librearia il nuovo nome del file in uso dal programma + EgtPHOTOLib.MainData.SetTemplateFilePrinter(m_TemplateFilePrinter) + End Set End Property Private m_DatFilePrinter As String @@ -114,6 +122,13 @@ Public Class MainWindowM End Get End Property + Private m_PrinterIsVisible As Boolean = False + Friend ReadOnly Property PrinterIsVisible As Boolean + Get + Return m_PrinterIsVisible + End Get + End Property + Private m_sBackUpDir As String Friend ReadOnly Property sBackUpDir As String Get @@ -222,11 +237,13 @@ Public Class MainWindowM ' Leggo nome cartella delle foto GetMainPrivateProfileString(S_GENERAL, K_PHOTODIR, sDataRoot & "\Data", m_sPhotoDir) ' leggo nome file prn (per stampante zebra) - GetMainPrivateProfileString(S_PRINTER, K_TEMPLATE, sDataRoot & "\Template.prn", m_TemplateFilePrinter) - ' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra) + GetMainPrivateProfileString(S_PRINTER, K_TEMPLATE, sDataRoot & "\Label\Default.prn", m_TemplateFilePrinter) + ' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra) -- solo se si desidera scrivere il file in un direttorio diverso GetMainPrivateProfileString(S_PRINTER, K_DAT, sDataRoot & "\Temp", m_DatFilePrinter) ' leggo nome file exe (per stampante zebra) GetMainPrivateProfileString(S_PRINTER, K_ZEBRAUTILITIES, System.AppDomain.CurrentDomain.BaseDirectory & "ZebraPrinterUtilitiesR32.exe", m_ZebraUtilitiesExe) + ' verifico che sia abilitata la stampante con flag + m_PrinterIsVisible = (GetMainPrivateProfileInt(S_PRINTER, K_ENABLE_PRINTER, 0) = 1) ' Creo connessione al Db If Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then EgtOutLog("Error connecting to DB") @@ -244,6 +261,7 @@ Public Class MainWindowM EgtPHOTOLib.MainData.SetTemplateFilePrinter(m_TemplateFilePrinter) EgtPHOTOLib.MainData.SetDataFilePrinter(m_DatFilePrinter) EgtPHOTOLib.MainData.SetZebraPrinterExe(m_ZebraUtilitiesExe) + EgtPHOTOLib.MainData.SetPrinterVisibility(m_PrinterIsVisible) Dim sIdKey As String = String.Empty EgtGetKeyInfo(sIdKey) EgtPHOTOLib.MainData.SetKey(sIdKey) diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index c24205b..681b0fe 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -59,5 +59,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/OptionWindow/OptionWindowV.xaml b/OptionWindow/OptionWindowV.xaml index baa3329..7087be1 100644 --- a/OptionWindow/OptionWindowV.xaml +++ b/OptionWindow/OptionWindowV.xaml @@ -18,6 +18,7 @@ + - + + + + + + + +