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
4 changed files with 48 additions and 40 deletions
-1
View File
@@ -104,7 +104,6 @@ Module ConstIni
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
Public Const K_ENGRAVESHORT As String = "EngraveShort"
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
Public Const K_DRIPOFFSET As String = "DripOffset"
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
Public Const K_DRIPDEPTH As String = "DripDepth"
+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"
+17 -35
View File
@@ -347,16 +347,11 @@ Public Class SideEntityControlVM
Return LenToString(m_Parameter4, 2)
End Get
Set(value As String)
If m_Mode = ModeOpt.DRIP Then
If m_Mode <> ModeOpt.SIDEANGLE Then
StringToLen(value, m_Parameter4)
m_dDripShort = m_Parameter4
' Creo le geometrie dei gocciolatoi
RefreshSideAngleText()
ElseIf m_Mode = ModeOpt.ENGRAVE Then
StringToLen(value, m_Parameter4)
m_dEngraveDepth2 = m_Parameter4
' Creo le geometrie dei gocciolatoi
RefreshSideAngleText()
End If
End Set
End Property
@@ -381,7 +376,6 @@ Public Class SideEntityControlVM
Private m_dDripOffset2 As Double = 0
Private m_nEngrNbr2 As Integer = 1
Private m_dDripDepth As Double = 10
Private m_dEngraveDepth2 As Double = 5
Private m_dDripShort As Double = 0
Private m_CallingWndScene As Scene
@@ -421,10 +415,10 @@ Public Class SideEntityControlVM
End Set
End Property
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2"
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 12)
Public Property Parameter4Msg As String
Get
Return m_Parameter4Msg ' Affondamento2
Return m_Parameter4Msg ' Accorciamento
End Get
Set(value As String)
m_Parameter4Msg = value
@@ -488,7 +482,7 @@ Public Class SideEntityControlVM
Else
' Temporaneamente lo disabilito
Parameter23_Visibility = Windows.Visibility.Visible
Parameter4_Visibility = Visibility.Visible
Parameter4_Visibility = Visibility.Collapsed
Parameter2ab_Visibility = Visibility.Visible
Parameter2_Visibility = Visibility.Hidden
End If
@@ -518,13 +512,12 @@ Public Class SideEntityControlVM
m_nEngrNbr2 = GetMainPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1)
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
m_dEngraveDepth2 = GetMainPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0)
SetParameter1(m_dDripOffset)
SetParameter2(m_dDripOffset2)
SetParameter2a(m_nEngrNbr2)
SetParameter2b(m_dDripOffset2)
SetParameter3(m_dDripDepth)
SetParameter4(m_dEngraveDepth2)
SetParameter4(m_dDripShort)
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
' definisco i nomi dei campi
@@ -543,9 +536,6 @@ Public Class SideEntityControlVM
LoadCurrentCompo()
End If
' aggiorno i testi sui lati della figura
RefreshSideAngleText()
' Aggiorno visualizzazione
If CallingWindow = CallingWindowOpt.COMPO Then
EgtZoom(ZM.ALL)
@@ -727,7 +717,7 @@ Public Class SideEntityControlVM
End If
' Aggiorno interfaccia
If m_CallingWindow = CallingWindowOpt.DXFIMPORT Or m_CallingWindow = CallingWindowOpt.COMPO Then
If m_CallingWindow = CallingWindowOpt.DXFIMPORT Then
If m_Mode = ModeOpt.SIDEANGLE Then
For Each Entity In m_SideEntityList
If DirectCast(Entity, SideAngleEntity).dSideAngle <> 0 Then
@@ -1111,9 +1101,6 @@ Public Class SideEntityControlVM
Dim nCrvId = EgtGetFirstInGroup(DripLayer)
While nCrvId <> GDB_ID.NULL
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
If m_Mode = ModeOpt.ENGRAVE Then
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
End If
nCrvId = EgtGetNext(nCrvId)
End While
' Eventuali curve aggiuntive con offset2
@@ -1124,14 +1111,10 @@ Public Class SideEntityControlVM
For i As Integer = 1 To m_nEngrNbr2
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
EgtOffsetCurve(nNewId, -i * m_dDripOffset2, OFF_TYPE.EXTEND)
If m_Mode = ModeOpt.ENGRAVE Then
EgtSetInfo(nNewId, INFO_DEPTH, m_dEngraveDepth2)
End If
Next
nCrvId = nNextCrvId
End While
End If
If m_Mode = ModeOpt.DRIP Then
' Esplodo nelle curve componenti
nCrvId = EgtGetFirstInGroup(DripLayer)
@@ -1154,7 +1137,7 @@ Public Class SideEntityControlVM
nCrvId = EgtGetFirstInGroup(DripLayer)
While nCrvId <> GDB_ID.NULL
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
' EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
nCrvId = EgtGetNext(nCrvId)
End While
@@ -1283,8 +1266,8 @@ Public Class SideEntityControlVM
If m_Mode = ModeOpt.SIDEANGLE Then
WriteMainPrivateProfileString(S_SIDES, K_SIDEANGLE, DoubleToString(m_Parameter1, 3))
ElseIf m_Mode = ModeOpt.FILOTOP Then
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPOFFSET, LenToString(m_Parameter1, 3))
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPDEPTH, LenToString(m_Parameter2, 3))
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPOFFSET, DoubleToString(m_Parameter1, 3))
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPDEPTH, DoubleToString(m_Parameter2, 3))
' Aggiorno affondamento del profilo
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
@@ -1300,10 +1283,10 @@ Public Class SideEntityControlVM
nPartId = EgtGetNextPart(nPartId)
End While
ElseIf m_Mode = ModeOpt.DRIP Then
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, LenToString(m_dDripOffset, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, LenToString(m_dDripOffset2, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, LenToString(m_dDripDepth, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, LenToString(m_dDripShort, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, DoubleToString(m_dDripOffset, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, DoubleToString(m_dDripOffset2, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, DoubleToString(m_dDripDepth, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, DoubleToString(m_dDripShort, 3))
For Each objEntity In m_SideEntityList
If TypeOf objEntity Is DripEntity Then
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
@@ -1312,12 +1295,11 @@ Public Class SideEntityControlVM
End If
Next
ElseIf m_Mode = ModeOpt.ENGRAVE Then
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, DoubleToString(m_dDripOffset, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, DoubleToString(m_dDripOffset2, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString)
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, LenToString(m_dDripShort, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, DoubleToString(m_dDripDepth, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, DoubleToString(m_dDripShort, 3))
For Each objEntity In m_SideEntityList
If TypeOf objEntity Is DripEntity Then
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)