Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 976e33c33e | |||
| d39d42393c | |||
| 4988d6f8bb |
@@ -10,6 +10,7 @@ Public Class MainWindowM
|
||||
#Region "FIELDS"
|
||||
|
||||
Friend m_SlabDB As Boolean = False
|
||||
Friend m_SlabDBMode As Integer = 0
|
||||
|
||||
Private m_sDataRoot As String = String.Empty
|
||||
Friend ReadOnly Property sDataRoot As String
|
||||
@@ -282,10 +283,11 @@ Public Class MainWindowM
|
||||
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||
EgtLuaRequire(sLuaBaseLib)
|
||||
' abilitazione DB
|
||||
m_SlabDB = (GetMainPrivateProfileInt(S_GENERAL, "SlabDB", 0) <> 0)
|
||||
m_SlabDBMode = GetMainPrivateProfileInt(S_GENERAL, "SlabDB", 0)
|
||||
m_SlabDB = (m_SlabDBMode <> 0)
|
||||
' Leggo nome cartella delle foto
|
||||
GetMainPrivateProfileString(S_GENERAL, K_PHOTODIR, sDataRoot & "\Data", m_sPhotoDir)
|
||||
' Creo connessione al Db
|
||||
' Creo connessione al Db se impostato di default come origine dati
|
||||
If m_SlabDB And Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then
|
||||
EgtOutLog("Error connecting to DB")
|
||||
MessageBox.Show(EgtMsg(92000 + 1), EgtMsg(MSG_EGTMSGBOX + 15), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
|
||||
@@ -2224,10 +2224,23 @@ Public Class RawPartTabVM
|
||||
Dim sSlabName As String = ""
|
||||
Dim sMat As String = ""
|
||||
|
||||
' cancello eventuali nome di materiali da DB
|
||||
SetMaterialFromDB(String.Empty)
|
||||
Dim bReadFromDB As Boolean = False
|
||||
' abilitazione DB
|
||||
Select Case OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDBMode
|
||||
Case 0
|
||||
' il database non è stato connesso
|
||||
Case 1
|
||||
' il database è stato connesso, la lettura è attiva
|
||||
bReadFromDB = True
|
||||
Case 2
|
||||
' il database è stato connesso, la lettura è attivabile con il pulsante Shift
|
||||
If (Keyboard.IsKeyDown(Key.LeftShift) Or Keyboard.IsKeyDown(Key.RightShift)) And OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||
' verifico che esista una connessione con il DataBase di OmagPHOTO
|
||||
bReadFromDB = True
|
||||
End If
|
||||
End Select
|
||||
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB And bReadFromDB Then
|
||||
' recupero il nome del progetto corrente
|
||||
Dim sFileProject As String = String.Empty
|
||||
EgtGetCurrFilePath(sFileProject)
|
||||
@@ -2298,8 +2311,11 @@ Public Class RawPartTabVM
|
||||
End If
|
||||
Next
|
||||
If Not bMaterialExists Then
|
||||
' mostro a video il nome del materiale importato in una casella di testa separata
|
||||
EstCalc.SetMaterialPhoto(LocalSlab.Material)
|
||||
SetMaterialFromDB(LocalSlab.Material)
|
||||
Else
|
||||
SetMaterialFromDB(String.Empty)
|
||||
End If
|
||||
End If
|
||||
' aggiungo la nuova lastra
|
||||
|
||||
Reference in New Issue
Block a user