diff --git a/DxfImportWindow/DxfImportSceneHostV.xaml.vb b/DxfImportWindow/DxfImportSceneHostV.xaml.vb index aacfb56..5e81a33 100644 --- a/DxfImportWindow/DxfImportSceneHostV.xaml.vb +++ b/DxfImportWindow/DxfImportSceneHostV.xaml.vb @@ -110,52 +110,6 @@ Public Class DxfImportSceneHostV #Region "EVENTS" - 'Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportDxfScene.OnMouseDownScene - ' ' Solo con il tasto sinistro e se stato NULL - ' If e.Button <> Windows.Forms.MouseButtons.Left Or Not ImportDxfScene.IsStatusNull() Then Return - ' If Not DxfImportWindowMap.refDxfImportWindowVM.VerifyIfSelectPart() Then Return - ' ' Verifico se selezionato indicativo di pezzo - ' EgtSetObjFilterForSelWin(False, False, True, False, False) - ' Dim nSel As Integer - ' EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel) - ' Dim nId As Integer = EgtGetFirstObjInSelWin() - ' While nId <> GDB_ID.NULL - ' ' Recupero l'identificativo del layer e del pezzo cui appartiene - ' Dim nRegLayId As Integer = EgtGetParent(nId) - ' Dim nPartId As Integer = EgtGetParent(nRegLayId) - ' If EgtIsPart(nPartId) Then - ' Dim sRegLayName As String = String.Empty - ' EgtGetName(nRegLayId, sRegLayName) - ' If sRegLayName = NAME_REGION Or sRegLayName = SELECT_REGION_LAYER Then - ' Dim nStat As Integer = GDB_ST.ON_ - ' EgtGetStatus(nId, nStat) - ' If nStat = GDB_ST.SEL Then - ' EgtDeselectAll() - ' m_nSelectedPart = GDB_ID.NULL - ' m_nSelectedLayer = GDB_ID.NULL - ' SideEntityControlVM.WriteSideAngleForNest(ImportDxfScene.GetCtx()) - ' ' Messaggio di selezione da effettuare - ' DxfImportWindowMap.refDxfImportWindowVM.SetOutputMessage(EgtMsg(MSG_DRAWPAGEUC + 6), MSG_TYPE.INFO) ' Selezionare un contorno - ' Else - ' Dim nLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP) - ' EgtGetInfo(nId, "ID", nLayId) - ' EgtDeselectAll() - ' EgtSelectObj(nId) - ' EgtSelectObj(nLayId) - ' m_nSelectedPart = nPartId - ' m_nSelectedLayer = nLayId - ' ' Pulisco area messaggi - ' DxfImportWindowMap.refDxfImportWindowVM.ClearOutputMessage() - ' End If - ' DxfImportWindowMap.refDxfImportWindowVM.SelectedPartChanged() - ' EgtDraw() - ' Exit While - ' End If - ' End If - ' nId = EgtGetNextObjInSelWin() - ' End While - 'End Sub - Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportDxfScene.OnMouseDownScene ' Solo se in modalità angoli o gocciolatoio su lati esterni If DxfImportWindowMap.refDxfImportWindowVM.SideAngle_IsChecked Or DxfImportWindowMap.refDxfImportWindowVM.Drip_IsChecked Then diff --git a/MainWindow/MainWindowVM.vb b/MainWindow/MainWindowVM.vb index b817c81..cb07907 100644 --- a/MainWindow/MainWindowVM.vb +++ b/MainWindow/MainWindowVM.vb @@ -73,10 +73,12 @@ Public Class MainWindowVM End If ' Inizializzo gestore CSV InitCsvM() + ' Verifico abilitazione VeinMatching + Dim bVmOn As Boolean = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.VM_MULTI) And + GetMainPrivateProfileInt(S_VEINMATCHING, K_VEINMA_ENABLE, 0) <> 0 + OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = bVmOn ' Se abilitato e richiesto carico finestra per VeinMatching - If OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.VM_MULTI) And - GetMainPrivateProfileInt(S_VEINMATCHING, K_VEINMA_ENABLE, 0) <> 0 And - IsNothing(m_VeinMatchingWnd) Then + If bVmOn And IsNothing(m_VeinMatchingWnd) Then m_VeinMatchingWnd = New VeinMatchingWindow m_VeinMatchingWnd.Owner = Application.Current.MainWindow m_VeinMatchingWnd.Show() diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 37d1b6d..651eedd 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -69,5 +69,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/SideEntityControl/SideEntityControlV.xaml b/SideEntityControl/SideEntityControlV.xaml index e6774ca..9e50d62 100644 --- a/SideEntityControl/SideEntityControlV.xaml +++ b/SideEntityControl/SideEntityControlV.xaml @@ -5,25 +5,40 @@ + + + + + + + + + + + - + - - + + - + - + HorizontalAlignment="Center" + VerticalAlignment="Center"/> + @@ -40,7 +55,6 @@ - - - - diff --git a/SideEntityControl/SideEntityControlVM.vb b/SideEntityControl/SideEntityControlVM.vb index 29d406a..5791b6e 100644 --- a/SideEntityControl/SideEntityControlVM.vb +++ b/SideEntityControl/SideEntityControlVM.vb @@ -31,6 +31,18 @@ Public Class SideEntityControlVM End Set End Property + Public ReadOnly Property Legenda_Visibility As Visibility + Get + If m_Mode = SideEntityControlVM.ModeOpt.DRIP OrElse + SideEntityControlVM.m_SideAngleCheck OrElse + m_SideEntityList.Count() = 0 Then + Return Visibility.Collapsed + Else + Return Visibility.Visible + End If + End Get + End Property + Private m_Parameter23_Visibility As Visibility Public Property Parameter23_Visibility As Visibility Get @@ -73,8 +85,8 @@ Public Class SideEntityControlVM ' Se checked lo imposto al valore letto dalla TxBx If m_SideEntityList(Index).bIsChecked Then StringToDouble(value, dSideAngle) + ' altrimenti lo imposto a zero Else - ' altrimenti lo imposto a zero dSideAngle = 0 End If ' Lo modifico nella geometria e nella lista inclinazioni @@ -166,7 +178,7 @@ Public Class SideEntityControlVM Private m_Parameter1Msg As String Public Property Parameter1Msg As String Get - Return EgtMsg(MSG_COMPONENTPAGEUC + 47) + Return m_Parameter1Msg End Get Set(value As String) m_Parameter1Msg = value @@ -509,6 +521,7 @@ Public Class SideEntityControlVM Dim sEntityName As String = String.Empty EgtGetName(CurrLine, sEntityName) m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, dSideAngleVal, dSideHeelVal, m_Mode)) + NotifyPropertyChanged("Legenda_Visibility") ' Creo testo con angolo di inclinazione ed eventuale tallone Dim sText As String = sEntityName & " = " & DoubleToString(dSideAngleVal, 1) & "°" If dSideHeelVal > 10 * EPS_SMALL Then sText += "; " & LenToString(dSideHeelVal, 1) @@ -526,6 +539,7 @@ Public Class SideEntityControlVM Dim sEntityName As String = String.Empty EgtGetName(CurrLine, sEntityName) m_SideEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, bHaveDripVal, m_Mode)) + NotifyPropertyChanged("Legenda_Visibility") ' Creo testo con angolo di inclinazione 0 AddTextToLine(sEntityName, TextLayer, CurrLine, 20, dBBoxRad, True) End Sub @@ -754,6 +768,7 @@ Public Class SideEntityControlVM Friend Sub ReLoadSideAnglePage(CallingWindow As CallingWindowOpt) m_SideEntityList.Clear() + NotifyPropertyChanged("Legenda_Visibility") If CallingWindow = CallingWindowOpt.COMPO Then ' Imposto contesto corrente @@ -851,12 +866,26 @@ Public Class SideEntityControlVM While LineId <> GDB_ID.NULL Dim dSideAngle As Double = 0 Dim bSA As Boolean = EgtGetInfo(LineId, INFO_SIDE_ANGLE, dSideAngle) + Dim dSideAngle2 As Double = 0 + Dim bSA2 As Boolean = EgtGetInfo(LineId, INFO_SIDE_ANGLE2, dSideAngle2) Dim dSideHeel As Double = 0 Dim bSH As Boolean = EgtGetInfo(LineId, INFO_HEEL, dSideHeel) - If Math.Abs(dSideAngle) > EPS_ANG_SMALL Or bSH Then + If Math.Abs(dSideAngle) > EPS_ANG_SMALL Or ( bSA2 And Not bSH) Then ' Creo testo con angolo di inclinazione Dim sText As String = DoubleToString(dSideAngle, 1) & "°" - If dSideHeel > 10 * EPS_SMALL Then sText &= "; " & LenToString(dSideHeel, 1) & "°" + ' Se presente tallone, lo indico + If bSH then + If dSideHeel > 10 * EPS_SMALL Then + If dSideAngle > 0 Then + sText = sText & "; " & LenToString(dSideHeel, 1) + Else + sText = LenToString(dSideHeel, 1) & "; " & sText + End If + End If + ' se altrimenti presente secondo angolo, lo indico + ElseIf bSA2 then + sText = DoubleToString(dSideAngle2, 1) & "°" & "; " & sText + End If SideEntityControlVM.AddTextToLine(sText, TextLayId, LineId, 15, dBBoxRad, False, True) ' Imposto angolo originale EgtSetInfo(LineId, INFO_ORIG_SIDE_ANGLE, dSideAngle) @@ -911,8 +940,6 @@ Public MustInherit Class SideEntity End If End Get End Property - - 'Private m_Check_Visibility As Visibility Public ReadOnly Property Check_Visibility As Visibility Get If m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then diff --git a/VeinMatchPanel/VeinMatchPanelV.xaml b/VeinMatchPanel/VeinMatchPanelV.xaml index 42c607f..b65a951 100644 --- a/VeinMatchPanel/VeinMatchPanelV.xaml +++ b/VeinMatchPanel/VeinMatchPanelV.xaml @@ -7,6 +7,7 @@ diff --git a/VeinMatchPanel/VeinMatchPanelVM.vb b/VeinMatchPanel/VeinMatchPanelVM.vb index 97aec90..20bda60 100644 --- a/VeinMatchPanel/VeinMatchPanelVM.vb +++ b/VeinMatchPanel/VeinMatchPanelVM.vb @@ -1,10 +1,22 @@ Imports EgtUILib Public Class VeinMatchPanelVM + Inherits VMBase #Region "FIELDS & PROPERTIES" - Private m_VeinMatchIsChecked As Boolean + Private m_VeinMatchIsEnabled As Boolean = False + Public Property VeinMatchIsEnabled As Boolean + Get + Return m_VeinMatchIsEnabled + End Get + Set(value As Boolean) + m_VeinMatchIsEnabled = value + NotifyPropertyChanged( "VeinMatchIsEnabled") + End Set + End Property + + Private m_VeinMatchIsChecked As Boolean = False Public Property VeinMatchIsChecked As Boolean Get Return m_VeinMatchIsChecked