Public Module MainData ' salva il contesto della libreria Private m_ContextSTONELib As Integer Public Sub SetContextSTONELib(Context As Integer) m_ContextSTONELib = Context End Sub Public ReadOnly Property ContextSTONELib As Integer Get Return m_ContextSTONELib End Get End Property 'salva il contesto del programma chiamante Private m_PreviousContext As Integer Public Sub SetPreviousContext(PreviousContext As Integer) m_PreviousContext = PreviousContext End Sub Public ReadOnly Property PreviousContext As Integer Get Return m_PreviousContext End Get End Property Private m_bIsOmagOFFICE As Boolean = False Public ReadOnly Property bIsOmagOFFICE As Boolean Get Return m_bIsOmagOFFICE End Get End Property Private m_sConfigDir As String = String.Empty Public ReadOnly Property sConfigDir As String Get Return m_sConfigDir End Get End Property Private m_nKeyLevel As Integer Friend ReadOnly Property nKeyLevel As Integer Get Return m_nKeyLevel End Get End Property Private m_nKeyOptions As UInteger Friend ReadOnly Property nKeyOptions As Integer Get Return m_nKeyOptions End Get End Property Private m_nKey As Integer Friend ReadOnly Property nKey As Integer Get Return m_nKey End Get End Property Private m_sUser As String Friend ReadOnly Property sUser As String Get Return m_sUser End Get End Property Private m_sPhotoDir As String Friend ReadOnly Property sPhotoDir As String Get Return m_sPhotoDir End Get End Property Private m_sBackUpDir As String Friend ReadOnly Property sBackUpDir As String Get Return m_sBackUpDir End Get End Property Private m_sTemplateFilePrinter As String Friend ReadOnly Property sTemplateFilePrinter As String Get Return m_sTemplateFilePrinter End Get End Property Private m_sDatFilePrinter As String Friend ReadOnly Property sDataFilePrinter As String Get Return m_sDatFilePrinter End Get End Property Private m_sZebraPrinterExe As String Friend ReadOnly Property sZebraPrinterExe As String Get Return m_sZebraPrinterExe End Get End Property Private m_bEnablePrinter As Boolean = True Friend ReadOnly Property bVisibilityPrinter As Visibility Get If m_bEnablePrinter Then Return Visibility.Visible Else Return Visibility.Collapsed End If End Get End Property Private m_bEnableTextId As Boolean = True Friend ReadOnly Property bEnableTextId As Boolean Get Return m_bEnableTextId End Get End Property Private m_vVisibilityBlock As Visibility = Visibility.Collapsed Friend ReadOnly Property vVisibilityBlock As Visibility Get Return m_vVisibilityBlock End Get End Property Private m_sLastBlock As String = String.Empty Friend Property sLastBlock As String Get Return m_sLastBlock End Get Set(value As String) m_sLastBlock = value End Set End Property Private m_bCapsLock As Boolean = False Friend ReadOnly Property bCapsLock As Boolean Get Return m_bCapsLock End Get End Property Friend Function GetKeyOption(nKeyOpt As KEY_OPT) As Boolean Return ((m_nKeyOptions And nKeyOpt) <> 0) End Function Public Sub SetIsOmagOFFICE(bIsOmagOFFICE As Boolean) m_bIsOmagOFFICE = bIsOmagOFFICE End Sub Public Sub SetConfigDir(sConfigDir As String) m_sConfigDir = sConfigDir End Sub Public Sub SetKeyLevel(nKeyLevel As Integer) m_nKeyLevel = nKeyLevel End Sub Public Sub SetKeyOptions(nKeyOptions As Integer) m_nKeyOptions = nKeyOptions End Sub Public Sub SetPhotoDir(sPhotoDir As String) m_sPhotoDir = sPhotoDir End Sub Public Sub SetBackUpDir(sBackUpDir As String) m_sBackUpDir = sBackUpDir End Sub Public Sub SetTemplateFilePrinter(sFile As String) m_sTemplateFilePrinter = sFile End Sub Public Sub SetDataFilePrinter(sFile As String) m_sDatFilePrinter = sFile End Sub Public Sub SetZebraPrinterExe(sExe As String) m_sZebraPrinterExe = sExe End Sub Public Sub SetPrinterVisibility(bEnablePrinter As Boolean) m_bEnablePrinter = bEnablePrinter End Sub Public Sub SetLastBlock(sBlock As String) m_sLastBlock = sBlock ' disabilito il Cmapo ID e abilito la visualizzazione del campo Block m_bEnableTextId = False m_vVisibilityBlock = Visibility.Visible End Sub Public Sub SetCapsLock(bCapsLock As Boolean) m_bCapsLock = bCapsLock End Sub Public Sub SetCamera(objCamera As Camera) PhotoMap.refProjectVM.m_Camera = objCamera End Sub Public Sub SetKey(sKey As String) If Not String.IsNullOrEmpty(sKey) Then Dim Items() As String = sKey.Split(" "c) If Items.Count > 2 Then If IsNumeric(Items(1)) Then m_nKey = CInt(Items(1)) Else m_nKey = 1 End If Else m_nKey = 1 End If Else m_nKey = 1 End If End Sub Public Sub SetUser(CurrentUser As String) m_sUser = CurrentUser If m_bIsOmagOFFICE Then m_sUser &= "OFFICE" Else m_sUser &= "PHOTO" End If End Sub 'Public Sub SetMaterialFromDB() ' Dim MatList As List(Of String) = ManageDb.FindAllMaterialInDB() ' StoneMap.refProjectVM.MaterialList.Clear() ' For Each Item In MatList ' StoneMap.refProjectVM.MaterialList.Add(Item) ' Next 'End Sub End Module