diff --git a/MachOptionsWindow/MachOptionV.xaml b/MachOptionsWindow/MachOptionV.xaml
index 65f9464..cc6b62a 100644
--- a/MachOptionsWindow/MachOptionV.xaml
+++ b/MachOptionsWindow/MachOptionV.xaml
@@ -65,7 +65,7 @@
+ SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
diff --git a/MainWindow/MainWindowV.xaml.vb b/MainWindow/MainWindowV.xaml.vb
index c82114f..3c917ff 100644
--- a/MainWindow/MainWindowV.xaml.vb
+++ b/MainWindow/MainWindowV.xaml.vb
@@ -1,5 +1,4 @@
-Imports System.ComponentModel
-Imports EgtWPFLib5
+Imports EgtWPFLib5
Class MainWindowV
Inherits EgtCustomWindow
diff --git a/MainWindow/MainWindowVM.vb b/MainWindow/MainWindowVM.vb
index 114c365..7a133e6 100644
--- a/MainWindow/MainWindowVM.vb
+++ b/MainWindow/MainWindowVM.vb
@@ -1,7 +1,4 @@
-Imports System.Collections.ObjectModel
-Imports System.Threading
-Imports System.Windows.Threading
-Imports System.Runtime.InteropServices
+Imports System.Threading
Imports System.Math
Imports EgtUILib
Imports EgtWPFLib5
@@ -61,8 +58,9 @@ Public Class MainWindowVM
Public ReadOnly Property TopCommandBar As TopCommandBarV
Get
If IsNothing(m_TopCommandBar) Then
- m_TopCommandBar = New TopCommandBarV
- m_TopCommandBar.DataContext = New TopCommandBarVM
+ m_TopCommandBar = New TopCommandBarV With {
+ .DataContext = New TopCommandBarVM
+ }
End If
Return m_TopCommandBar
End Get
@@ -75,8 +73,9 @@ Public Class MainWindowVM
Get
If m_bfirst Then
m_bfirst = False
- m_StatusBar = New StatusBarV
- m_StatusBar.DataContext = New MyStatusBarVM
+ m_StatusBar = New StatusBarV With {
+ .DataContext = New MyStatusBarVM
+ }
End If
Return m_StatusBar
End Get
diff --git a/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderVM.vb b/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderVM.vb
index 0779556..ca1b04a 100644
--- a/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderVM.vb
+++ b/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderVM.vb
@@ -834,7 +834,6 @@ Public Class ManageLayerExpanderVM
Return Nothing
End Function
-
#End Region ' Methods
End Class
diff --git a/OptionPanel/DrawOptionPanelVM.vb b/OptionPanel/DrawOptionPanelVM.vb
index fbea97c..d5a0c01 100644
--- a/OptionPanel/DrawOptionPanelVM.vb
+++ b/OptionPanel/DrawOptionPanelVM.vb
@@ -1,6 +1,4 @@
-Imports EgtUILib
-
-Public Class DrawOptionPanelVM
+Public Class DrawOptionPanelVM
Inherits ViewModelBase
' GRAPHICAL ELEMENTS
@@ -52,12 +50,10 @@ Public Class DrawOptionPanelVM
#Region "METHODS"
Friend Function InitDrawOptionPanel() As Boolean
- 'EgtZoom(ZM.ALL)
Return True
End Function
Friend Function ExitDrawOptionPanel() As Boolean
-
Return True
End Function
diff --git a/OptionPanel/MachiningOptionPanel/EstimationsExpander/EstimationsExpander.vb b/OptionPanel/MachiningOptionPanel/EstimationsExpander/EstimationsExpander.vb
index a9c0c11..47e6726 100644
--- a/OptionPanel/MachiningOptionPanel/EstimationsExpander/EstimationsExpander.vb
+++ b/OptionPanel/MachiningOptionPanel/EstimationsExpander/EstimationsExpander.vb
@@ -76,14 +76,14 @@ Public Class EstimationsExpanderVM
' Abilito la selezione di tutti i tipi di geometria
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.PARTCURVESANDSURFACES
CalcEstimation()
- NotifyPropertyChanged("Time")
- NotifyPropertyChanged("CutLen")
+ NotifyPropertyChanged(NameOf(Time))
+ NotifyPropertyChanged(NameOf(CutLen))
m_Estimation_IsExpanded = True
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
Map.refOperationsListExpanderVM.EstimationExpander_Get_IsExpanded(True)
- NotifyPropertyChanged("Estimation_IsExpanded")
- Map.refMachiningOptionPanelVM.OnPropertyChanged("GenerateIsEnabled")
+ NotifyPropertyChanged(NameOf(Estimation_IsExpanded))
+ Map.refMachiningOptionPanelVM.OnPropertyChanged(NameOf(Map.refMachiningOptionPanelVM.GenerateIsEnabled))
' disattivo database utensili, lavorazioni e setup se vado in stima
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(False, False, False)
' disattivo MTable e SpecialPanel se vado in stima
@@ -96,8 +96,8 @@ Public Class EstimationsExpanderVM
m_Estimation_IsExpanded = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
Map.refOperationsListExpanderVM.EstimationExpander_Get_IsExpanded(False)
- NotifyPropertyChanged("Estimation_IsExpanded")
- Map.refMachiningOptionPanelVM.OnPropertyChanged("GenerateIsEnabled")
+ NotifyPropertyChanged(NameOf(Estimation_IsExpanded))
+ Map.refMachiningOptionPanelVM.OnPropertyChanged(NameOf(Map.refMachiningOptionPanelVM.GenerateIsEnabled))
' attivo database utensili, lavorazioni e setup se esco dalla stima
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
' attivo MTable e SpecialPanel se esco dalla stima
diff --git a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderV.xaml.vb
index 3565bcf..b002bed 100644
--- a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderV.xaml.vb
@@ -2,12 +2,6 @@
' Evento necessario per impedire che venga creata la lavorazione quando si fa doppio click sulla ScrollBar
Private Sub MachiningsTreeView_MouseDoubleClick(sender As Object, e As System.Windows.Input.MouseButtonEventArgs)
- 'Dim src As DependencyObject = VisualTreeHelper.GetParent(DirectCast(e.OriginalSource, DependencyObject))
-
- '' Your logic here
- 'If TypeOf src Is Control AndAlso src.[GetType]() <> GetType(Grid) Then
- ' e.Handled = True
- 'End If
' recupero il viewmodel associato a questa view in cui è presente la funzione che l'evento deve lanciare
Dim MachiningTreeExpanderViewModel As MachiningTreeExpanderVM = DirectCast(Me.DataContext, MachiningTreeExpanderVM)
' recupero il treeviewitem clickato(sorgente dell'evento)
diff --git a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb
index 2dfa088..803e83a 100644
--- a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb
@@ -199,7 +199,7 @@ Public Class MachiningTreeExpanderVM
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
CodeCommand = False
- OnPropertyChanged("IsEnabled")
+ OnPropertyChanged(NameOf(IsEnabled))
Return True
End Function
@@ -213,11 +213,11 @@ Public Class MachiningTreeExpanderVM
If Not CodeCommand Then
Map.refOperationsListExpanderVM.CancelOperationCmd()
CodeCommand = False
- OnPropertyChanged("IsEnabled")
+ OnPropertyChanged(NameOf(IsEnabled))
Return False
End If
CodeCommand = False
- OnPropertyChanged("IsEnabled")
+ OnPropertyChanged(NameOf(IsEnabled))
Return True
End Function
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderV.xaml
index 62559c1..a1071a3 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderV.xaml
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderV.xaml
@@ -82,7 +82,6 @@
-
-
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderVM.vb
index 7fb1eb2..eea1ad1 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionParameterExpanderVM.vb
@@ -68,12 +68,12 @@ Public Class DispositionParameterExpanderVM
End If
If m_MoveIsChecked Then
m_RawRefGroupVisibility = Visibility.Visible
- OnPropertyChanged("RawRefGroupVisibility")
+ OnPropertyChanged(NameOf(RawRefGroupVisibility))
End If
Else
' Nascondo i bottoni per impostare la posizione di riferimento del grezzo
m_RawRefGroupVisibility = Visibility.Collapsed
- OnPropertyChanged("RawRefGroupVisibility")
+ OnPropertyChanged(NameOf(RawRefGroupVisibility))
' smarco la prima entità selezionata
EgtResetMark(EgtGetFirstSelectedObj)
EgtDeselectAll()
@@ -81,7 +81,7 @@ Public Class DispositionParameterExpanderVM
End If
m_RawPartIsExpanded = value
ActiveObject = ObjectType.RAWPART
- OnPropertyChanged("RawPartIsExpanded")
+ OnPropertyChanged(NameOf(RawPartIsExpanded))
End If
End Set
End Property
@@ -105,7 +105,7 @@ Public Class DispositionParameterExpanderVM
End If
m_PartIsExpanded = value
ActiveObject = ObjectType.PART
- OnPropertyChanged("PartIsExpanded")
+ OnPropertyChanged(NameOf(PartIsExpanded))
End If
End Set
End Property
@@ -133,7 +133,7 @@ Public Class DispositionParameterExpanderVM
End If
m_FixtureIsExpanded = value
ActiveObject = ObjectType.FIXTURE
- OnPropertyChanged("FixtureIsExpanded")
+ OnPropertyChanged(NameOf(FixtureIsExpanded))
End If
End Set
End Property
@@ -147,22 +147,22 @@ Public Class DispositionParameterExpanderVM
If value <> m_MoveIsChecked Then
Map.refProjectVM.SetMoveInDisposition(value)
InputValue = String.Empty
- OnPropertyChanged("InputValue")
+ OnPropertyChanged(NameOf(InputValue))
If value Then
If m_RawPartIsExpanded Then
m_RawRefGroupVisibility = Visibility.Visible
- OnPropertyChanged("RawRefGroupVisibility")
+ OnPropertyChanged(NameOf(RawRefGroupVisibility))
Else
m_RawRefGroupVisibility = Visibility.Collapsed
- OnPropertyChanged("RawRefGroupVisibility")
+ OnPropertyChanged(NameOf(RawRefGroupVisibility))
End If
m_InputMsg = "Move to:"
Else
m_RawRefGroupVisibility = Visibility.Collapsed
- OnPropertyChanged("RawRefGroupVisibility")
+ OnPropertyChanged(NameOf(RawRefGroupVisibility))
m_InputMsg = "Rotate of:"
End If
- OnPropertyChanged("InputMsg")
+ OnPropertyChanged(NameOf(InputMsg))
m_MoveIsChecked = value
End If
End Set
@@ -176,7 +176,7 @@ Public Class DispositionParameterExpanderVM
Set(value As String)
If Not String.IsNullOrEmpty(m_InputErrorMsg) Then
m_InputErrorMsg = String.Empty
- OnPropertyChanged("InputErrorMsg")
+ OnPropertyChanged(NameOf(InputErrorMsg))
End If
m_InputValue = value
End Set
@@ -257,7 +257,7 @@ Public Class DispositionParameterExpanderVM
OpenDispositionFunction = AddressOf OpenDispositionParameters
MoveIsChecked = True
m_BLIsChecked = True
- OnPropertyChanged("BLIsChecked")
+ OnPropertyChanged(NameOf(BLIsChecked))
m_RawRefPosition = MCH_CR.BL
End Sub
@@ -316,7 +316,7 @@ Public Class DispositionParameterExpanderVM
StringToLen(Values(1), InputPoint.y)
Else
m_InputErrorMsg = "Il valore non è una cordinata XY"
- OnPropertyChanged("InputErrorMsg")
+ OnPropertyChanged(NameOf(InputErrorMsg))
Return
End If
' Vettore di movimento
@@ -383,7 +383,7 @@ Public Class DispositionParameterExpanderVM
Dim InputAngle As Double = 0
If Not StringToDouble(sVal, InputAngle) Then
m_InputErrorMsg = "Il valore non è un angolo valido"
- OnPropertyChanged("InputErrorMsg")
+ OnPropertyChanged(NameOf(InputErrorMsg))
Return
End If
' eseguo rotazione
@@ -396,14 +396,14 @@ Public Class DispositionParameterExpanderVM
DispositionUtility.VerifyRawPosition(nSelId, vtOrigMove, vtRefMove)
Else
m_InputErrorMsg = "Impossibile ruotare il grezzo."
- OnPropertyChanged("InputErrorMsg")
+ OnPropertyChanged(NameOf(InputErrorMsg))
End If
Case ObjectType.PART
'EgtMove...
Case ObjectType.FIXTURE
If Not EgtRotateFixture(nSelId, InputAngle) Then
m_InputErrorMsg = "Impossibile ruotare la ventosa"
- OnPropertyChanged("InputErrorMsg")
+ OnPropertyChanged(NameOf(InputErrorMsg))
End If
End Select
nSelId = EgtGetNextSelectedObj()
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionUtility.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionUtility.vb
index 67685e4..6e93bb0 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionUtility.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/DispositionUtility.vb
@@ -142,10 +142,6 @@ Public NotInheritable Class DispositionUtility
If Not VerifyRawPartFixturePos(nMoveId, vtMove, vtRefMove) Then
bErrorVerify = True
End If
- 'Dim sOut As String = "VerifyRaw : Count=" & nCount & " Err=" & If(bErrorVerify, "1", "0") &
- ' " Move=" & LenToString(vtMove.x, 3) & "," & LenToString(vtMove.y, 3) &
- ' " RefMove=" & LenToString(vtRefMove.x, 3) & "," & LenToString(vtRefMove.y, 3)
- 'EgtOutLog(sOut)
End If
End If
' Se non c'è errore ma necessaria correzione riferimento
@@ -173,9 +169,7 @@ Public NotInheritable Class DispositionUtility
EgtMoveFixture(nMoveId, -vtMove)
' segno hook occupato prima del movimento correttivo come non utilizzato
SetHookUsed(m_nPrevUsedHookId, nMoveId, True)
- 'EgtSetInfo(m_nPrevUsedHookId, USED, nMoveId)
SetHookUsed(m_nPrevUsedHookId, nMoveId, False)
- 'EgtRemoveInfo(m_nUsedHookId, USED)
Else
EgtMoveRawPart(nMoveId, -vtMove)
End If
@@ -589,9 +583,6 @@ Public NotInheritable Class DispositionUtility
Else
dMaxYMove = PStroke
End If
- ' sottraggo dagli estremi l'ingombro della barra
- 'dMinYMove += dCurrBarMVal
- 'dMaxYMove -= dCurrBarPVal
' verifico che lo spostamento sia entro le corse
If dCurrBarYPos + vtMove.y <= dMinYMove Then
vtMove.y = dMinYMove - dCurrBarYPos
@@ -847,28 +838,11 @@ Public NotInheritable Class DispositionUtility
If EgtGetInfo(nCurrHookId, USED, nTableHookUsed) AndAlso nTableHookUsed <> nMoveId Then Return
If nTableHookUsed = nMoveId Then
SetHookUsed(nCurrHookId, nMoveId, False)
- 'EgtRemoveInfo(nCurrHookId, USED)
m_nPrevUsedHookId = nCurrHookId
End If
' calcolo distanza punto hook tavola dal punto hook della ventosa
EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
dDist = Point3d.Dist(ptCurrHook, ptFixtHook)
- 'If nTableHookUsed <> nMoveId Then
- ' ' calcolo distanza punto hook tavola dal punto hook della ventosa
- ' EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
- ' dDist = Point3d.Dist(ptCurrHook, ptFixtHook)
- 'Else
- ' EgtRemoveInfo(nCurrHookId, USED)
- ' m_nPrevUsedHookId = nCurrHookId
- ' Return
- 'End If
- 'If Not EgtGetInfo(nCurrHookId, USED, nTableHookUsed) Or nTableHookUsed = nMoveId Then
- ' ' calcolo distanza punto hook tavola dal punto hook della ventosa
- ' EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
- ' dDist = Point3d.Dist(ptCurrHook, ptFixtHook)
- 'Else
- ' Return
- 'End If
ElseIf nTableHookType = GDB_TY.CRV_LINE Then
' calcolo distanza linea hook tavola dal punto hook della ventosa
Dim nRefId As Integer = 0
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersV.xaml
index ffe299d..e786bc7 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersV.xaml
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersV.xaml
@@ -24,7 +24,7 @@
+ FontSize="15" FontWeight="SemiBold"/>
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersVM.vb
index 18ce3ca..7afb3b8 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/FixtureParameters/FixtureParametersVM.vb
@@ -117,9 +117,9 @@ Public Class FixtureParametersVM
' recupero area della tavola
Dim ptTableMin As Point3d
Dim ptTableMax As Point3d
- if Not EgtGetTableArea(1, ptTableMin, ptTableMax) Then
+ If Not EgtGetTableArea(1, ptTableMin, ptTableMax) Then
m_FixtureErrorMsg = "Tavola non definita"
- OnPropertyChanged("FixtureErrorMsg")
+ OnPropertyChanged(NameOf(FixtureErrorMsg))
Return
End If
' calcolo il centro della tavola
@@ -128,7 +128,7 @@ Public Class FixtureParametersVM
Dim nAddedFixtureId As Integer = EgtAddFixture(SelectedFixture.Name, ptTableMid, 0, 0)
If nAddedFixtureId = GDB_ID.NULL Then
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
- OnPropertyChanged("FixtureErrorMsg")
+ OnPropertyChanged(NameOf(FixtureErrorMsg))
Return
End If
' verifico se la ventosa ha punti di hook da ancorare
@@ -141,8 +141,8 @@ Public Class FixtureParametersVM
End If
Else
' se non ha punti di ancoraggio
- ' verifico se è in una posizione valida
- If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
+ ' verifico se è in una posizione valida
+ If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
' se non trovo una posizione valida, esco
If Not SearchOkFixturePosition(nAddedFixtureId, ptTableMin, ptTableMax, ptTableMid) Then
Return
@@ -152,81 +152,81 @@ Public Class FixtureParametersVM
' sottraggo la ventosa aggiunta dal conto di quelle disponibili
SelectedFixture.UsedNumber += 1
EgtDraw()
- OnPropertyChanged("FixtureErrorMsg")
+ OnPropertyChanged(NameOf(FixtureErrorMsg))
End Sub
' Funzione che cerca una posizione valida per la ventosa libera di muoversi
Private Function SearchOkFixturePosition(nAddedFixtureId As Integer, ptTableMin As Point3d, ptTableMax As Point3d, ptTableMid As Point3d) As Boolean
- ' creo un gruppo temporaneo
- Dim nTempGroupId As Integer = EgtCreateGroup(GDB_ID.ROOT)
- EgtSetLevel(nTempGroupId, GDB_LV.USER)
- EgtSetMode(nTempGroupId, GDB_MD.STD)
- ' calcolo ingombro sottopezzo aggiunto
- Dim bboxAddedFixture As New BBox3d
- EgtGetBBoxGlob(nAddedFixtureId, GDB_BB.STANDARD, bboxAddedFixture)
- ' calcolo bbox tavolo
- Dim bboxTableArea As New BBox3d(ptTableMin, ptTableMax)
- bboxTableArea.Expand(-bboxAddedFixture.DimX / 2, -bboxAddedFixture.DimY / 2, 0)
- ' creo superficie delle misure della tavola
- Dim nTableFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, bboxTableArea.Min, bboxTableArea.Max)
- ' ciclo su tutti i pezzi di questa fase
- Dim nFixtureId As Integer = EgtGetFirstFixture()
- While nFixtureId <> GDB_ID.NULL
- ' creo il bbox del sottopezzo
- Dim bboxFixture As New BBox3d
- EgtGetBBoxGlob(nFixtureId, GDB_BB.STANDARD, bboxFixture)
- ' faccio offset del bbox del sottopezzo per includere metà del sottopezzo da aggiungere
- bboxFixture.Expand(bboxAddedFixture.DimX / 2, bboxAddedFixture.DimY / 2, 0)
- ' lo porto all'altezza della tavola
- Dim ptMinFixtureFr As New Point3d(bboxFixture.Min)
- Dim ptMaxFixtureFr As New Point3d(bboxFixture.Max)
- ptMinFixtureFr.z = ptTableMin.z
- ptMaxFixtureFr.z = ptTableMin.z
- ' creo la regione occupata dal bbox del sottopezzo
- Dim nFixtureFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, ptMinFixtureFr, ptMaxFixtureFr)
- ' sottraggo la regione del sottopezzo da quella della tavola
- Dim x = EgtSurfFrSubtract(nTableFrId, nFixtureFrId)
- nFixtureId = EgtGetNextFixture(nFixtureId)
- End While
- ' creo gruppo con i bordi della regione di tavola avanzata
- Dim TableFrBorderGroupId As Integer = EgtCreateGroup(nTempGroupId)
- Dim nTableFrBorderCount As Integer = 0
- Dim nChunk As Integer = EgtSurfFrChunkCount(nTableFrId)
- For Index = 0 To nChunk - 1
- EgtExtractSurfFrChunkLoops(nTableFrId, Index, TableFrBorderGroupId, nTableFrBorderCount)
- Next
- ' verifico se c'è almeno un bordo
- If nTableFrBorderCount = 0 Then
- m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
- OnPropertyChanged("FixtureErrorMsg")
+ ' creo un gruppo temporaneo
+ Dim nTempGroupId As Integer = EgtCreateGroup(GDB_ID.ROOT)
+ EgtSetLevel(nTempGroupId, GDB_LV.USER)
+ EgtSetMode(nTempGroupId, GDB_MD.STD)
+ ' calcolo ingombro sottopezzo aggiunto
+ Dim bboxAddedFixture As New BBox3d
+ EgtGetBBoxGlob(nAddedFixtureId, GDB_BB.STANDARD, bboxAddedFixture)
+ ' calcolo bbox tavolo
+ Dim bboxTableArea As New BBox3d(ptTableMin, ptTableMax)
+ bboxTableArea.Expand(-bboxAddedFixture.DimX / 2, -bboxAddedFixture.DimY / 2, 0)
+ ' creo superficie delle misure della tavola
+ Dim nTableFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, bboxTableArea.Min, bboxTableArea.Max)
+ ' ciclo su tutti i pezzi di questa fase
+ Dim nFixtureId As Integer = EgtGetFirstFixture()
+ While nFixtureId <> GDB_ID.NULL
+ ' creo il bbox del sottopezzo
+ Dim bboxFixture As New BBox3d
+ EgtGetBBoxGlob(nFixtureId, GDB_BB.STANDARD, bboxFixture)
+ ' faccio offset del bbox del sottopezzo per includere metà del sottopezzo da aggiungere
+ bboxFixture.Expand(bboxAddedFixture.DimX / 2, bboxAddedFixture.DimY / 2, 0)
+ ' lo porto all'altezza della tavola
+ Dim ptMinFixtureFr As New Point3d(bboxFixture.Min)
+ Dim ptMaxFixtureFr As New Point3d(bboxFixture.Max)
+ ptMinFixtureFr.z = ptTableMin.z
+ ptMaxFixtureFr.z = ptTableMin.z
+ ' creo la regione occupata dal bbox del sottopezzo
+ Dim nFixtureFrId As Integer = EgtCreateSurfFrRectangle(nTempGroupId, ptMinFixtureFr, ptMaxFixtureFr)
+ ' sottraggo la regione del sottopezzo da quella della tavola
+ Dim x = EgtSurfFrSubtract(nTableFrId, nFixtureFrId)
+ nFixtureId = EgtGetNextFixture(nFixtureId)
+ End While
+ ' creo gruppo con i bordi della regione di tavola avanzata
+ Dim TableFrBorderGroupId As Integer = EgtCreateGroup(nTempGroupId)
+ Dim nTableFrBorderCount As Integer = 0
+ Dim nChunk As Integer = EgtSurfFrChunkCount(nTableFrId)
+ For Index = 0 To nChunk - 1
+ EgtExtractSurfFrChunkLoops(nTableFrId, Index, TableFrBorderGroupId, nTableFrBorderCount)
+ Next
+ ' verifico se c'è almeno un bordo
+ If nTableFrBorderCount = 0 Then
+ m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
+ OnPropertyChanged(NameOf(FixtureErrorMsg))
Return False
+ End If
+ ' converto il punto medio della tavola in coordinate globali
+ Dim PtTableRef As Point3d
+ EgtGetTableRef(1, PtTableRef)
+ Dim frTableRef As New Frame3d(PtTableRef)
+ ptTableMid.ToGlob(frTableRef)
+ ' ciclo sui bordi per trovare il punto più vicino
+ Dim dMinDist As Double = (bboxTableArea.Max - bboxTableArea.Min).SqLenXY
+ Dim ptMinAbs As Point3d
+ Dim BorderId As Integer = EgtGetFirstInGroup(TableFrBorderGroupId)
+ While BorderId <> GDB_ID.NULL
+ Dim dDist As Double = 0
+ Dim ptMinRel As Point3d
+ Dim nSide As Integer = 0
+ EgtPointCurveDistSide(ptTableMid, BorderId, Vector3d.Z_AX, GDB_ID.ROOT, dDist, ptMinRel, nSide)
+ If dDist < dMinDist Then
+ dMinDist = dDist
+ ptMinAbs = ptMinRel
End If
- ' converto il punto medio della tavola in coordinate globali
- Dim PtTableRef As Point3d
- EgtGetTableRef(1, PtTableRef)
- Dim frTableRef As New Frame3d(PtTableRef)
- ptTableMid.ToGlob(frTableRef)
- ' ciclo sui bordi per trovare il punto più vicino
- Dim dMinDist As Double = (bboxTableArea.Max - bboxTableArea.Min).SqLenXY
- Dim ptMinAbs As Point3d
- Dim BorderId As Integer = EgtGetFirstInGroup(TableFrBorderGroupId)
- While BorderId <> GDB_ID.NULL
- Dim dDist As Double = 0
- Dim ptMinRel As Point3d
- Dim nSide As Integer = 0
- EgtPointCurveDistSide(ptTableMid, BorderId, Vector3d.Z_AX, GDB_ID.ROOT, dDist, ptMinRel, nSide)
- If dDist < dMinDist Then
- dMinDist = dDist
- ptMinAbs = ptMinRel
- End If
- BorderId = EgtGetNext(BorderId)
- End While
- ' sposto il sottopezzo nel punto trovato
- Dim vtFixtureMove As Vector3d = ptMinAbs - ptTableMid
- vtFixtureMove.z = 0
- EgtMoveFixture(nAddedFixtureId, vtFixtureMove)
- ' cancello il gruppo temporaneo
- EgtErase(nTempGroupId)
+ BorderId = EgtGetNext(BorderId)
+ End While
+ ' sposto il sottopezzo nel punto trovato
+ Dim vtFixtureMove As Vector3d = ptMinAbs - ptTableMid
+ vtFixtureMove.z = 0
+ EgtMoveFixture(nAddedFixtureId, vtFixtureMove)
+ ' cancello il gruppo temporaneo
+ EgtErase(nTempGroupId)
Return True
End Function
@@ -293,7 +293,7 @@ Public Class FixtureParametersVM
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
- EgtSetInfo(nCurrHookId, used, nFixtureId)
+ EgtSetInfo(nCurrHookId, USED, nFixtureId)
Return True
End If
End If
@@ -431,7 +431,7 @@ Public Class FixtureType
Set(value As Integer)
If value <> m_TotalNumber Then
m_TotalNumber = value
- NotifyPropertyChanged("UsedTotalRatio")
+ NotifyPropertyChanged(NameOf(UsedTotalRatio))
End If
End Set
End Property
@@ -442,15 +442,15 @@ Public Class FixtureType
Set(value As Integer)
If value <> m_UsedNumber Then
m_UsedNumber = value
- NotifyPropertyChanged("UsedTotalRatio")
+ NotifyPropertyChanged(NameOf(UsedTotalRatio))
If UsedNumber >= TotalNumber Then
m_IsEnabled = False
m_IsSelected = False
- NotifyPropertyChanged("IsSelected")
+ NotifyPropertyChanged(NameOf(IsSelected))
Else
m_IsEnabled = True
End If
- NotifyPropertyChanged("IsEnabled")
+ NotifyPropertyChanged(NameOf(IsEnabled))
End If
End Set
End Property
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/RawPartOption/RawPartOptionVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/RawPartOption/RawPartOptionVM.vb
index c88c67d..899b106 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/RawPartOption/RawPartOptionVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/DispositionParameterExpander/RawPartOption/RawPartOptionVM.vb
@@ -34,7 +34,7 @@ Public Class RawPartOptionVM
End If
EgtDraw()
m_MoveWithFixture = value
- OnPropertyChanged("MoveWithFixture")
+ OnPropertyChanged(NameOf(MoveWithFixture))
End If
End Set
End Property
@@ -121,7 +121,7 @@ Public Class RawPartOptionVM
Public Sub NewRawPart()
DispositionUtility.ShowParts()
m_bRawPartParamVisibility = Visibility.Visible
- OnPropertyChanged("RawPartParamVisibility")
+ OnPropertyChanged(NameOf(RawPartParamVisibility))
End Sub
#End Region ' NewRawPartCommand
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml
index ebd9380..f98dac0 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml
@@ -1,7 +1,6 @@
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml.vb
index 887b69e..6eefb4b 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/BeamMillingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class BeamMillingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml.vb
index c03be52..09ea1cc 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/ChiselingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class ChiselingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/FiveAxisMachinigParameterExpanderV.xaml b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/FiveAxisMachinigParameterExpanderV.xaml
index bc6b896..a764ed4 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/FiveAxisMachinigParameterExpanderV.xaml
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/FiveAxisMachinigParameterExpanderV.xaml
@@ -1,7 +1,6 @@
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/GenMachiningParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/GenMachiningParameterExpanderV.xaml.vb
index 3b0be02..ad89064 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/GenMachiningParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/GenMachiningParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class GenMachiningParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml.vb
index 6648511..06b9382 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderV.xaml.vb
@@ -1,18 +1,8 @@
Public Class MachiningParameterExpanderV
- Private WithEvents m_MachiningParameterExpanderVM As MachiningParameterExpanderVM
+ Private WithEvents m_MachiningParameterExpanderVM As New MachiningParameterExpanderVM
- Sub New()
-
- ' La chiamata è richiesta dalla finestra di progettazione.
- InitializeComponent()
-
- ' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
- Me.DataContext = Map.refMachiningParameterExpanderVM
- m_MachiningParameterExpanderVM = Map.refMachiningParameterExpanderVM
- End Sub
-
- Private Sub FocusOnSlider() Handles m_MachiningParameterExpanderVM.m_FocusOnSlider
+ Friend Sub FocusOnSlider() Handles m_MachiningParameterExpanderVM.m_FocusOnSlider
Me.SliderV.Focus()
End Sub
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml.vb
index 0718765..b25b323 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MortisingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class MortisingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml.vb
index ab2d31e..35967be 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/PocketingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class PocketingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml.vb
index 2787b7f..d0ec29f 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneDrillingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class StoneDrillingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml.vb
index 07c28f6..459139b 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneMillingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class StoneMillingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml.vb
index fa6c686..a17278c 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawFinishingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class StoneSawFinishingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml.vb
index b7a5bf9..3d478e6 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawRoughingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class StoneSawRoughingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml.vb
index 79a3dcc..64e8390 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/StoneSawingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class StoneSawingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfFinishingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfFinishingParameterExpanderV.xaml.vb
index c4229fb..7c94fe5 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfFinishingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/SurfFinishingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class SurfFinishingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml.vb
index ac0268b..98e659b 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WaterjettingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class WaterjettingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml.vb
index 8e65ecf..e89235d 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodDrillingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class WoodDrillingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml.vb
index 079ea9b..04562b1 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodMillingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class WoodMillingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml.vb
index 6b53c5c..9a16810 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/WoodSawingParameterExpanderV.xaml.vb
@@ -1,5 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
+Imports EgtWPFLib5.EgtFloating
Public Class WoodSawingParameterExpanderV
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/MachiningOpListBoxItem.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/MachiningOpListBoxItem.vb
index 05bd66c..9aa1204 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/MachiningOpListBoxItem.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/MachiningOpListBoxItem.vb
@@ -1,6 +1,4 @@
-Imports System.ComponentModel
-Imports System.Collections.ObjectModel
-Imports EgtUILib
+Imports EgtUILib
Public Class MachiningOpListBoxItem
Inherits OperationListBoxItem
@@ -101,10 +99,10 @@ Public Class MachiningOpListBoxItem
RaiseEvent m_ModifyNameGetFocus()
' se esco da modifica
End If
- NotifyPropertyChanged("ModifiedName")
- NotifyPropertyChanged("Name")
- NotifyPropertyChanged("Name_Visibility")
- NotifyPropertyChanged("ModifyName_Visibility")
+ NotifyPropertyChanged(NameOf(ModifiedName))
+ NotifyPropertyChanged(NameOf(Name))
+ NotifyPropertyChanged(NameOf(Name_Visibility))
+ NotifyPropertyChanged(NameOf(ModifyName_Visibility))
End Set
End Property
@@ -211,7 +209,7 @@ Public Class MachiningOpListBoxItem
m_CloseModifyLostFocus = False
MessageBox.Show(EgtMsg(MSG_OPERATION + 22), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Warning)
m_IsActive_ModifyName = True
- NotifyPropertyChanged("ModifyName_Visibility")
+ NotifyPropertyChanged(NameOf(ModifyName_Visibility))
m_Spy = True
Return
End If
diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/OperationListBoxItem.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/OperationListBoxItem.vb
index 2721419..9221418 100644
--- a/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/OperationListBoxItem.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBoxItem/OperationListBoxItem.vb
@@ -70,8 +70,8 @@ Public Class OperationListBoxItem
' Ne deseleziono la geometria
EgtDeselectAll()
- Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
- Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
+ Map.refOperationsListExpanderVM.OnPropertyChanged(NameOf(Map.refOperationsListExpanderVM.MoveUp_IsEnabled))
+ Map.refOperationsListExpanderVM.OnPropertyChanged(NameOf(Map.refOperationsListExpanderVM.MoveDown_IsEnabled))
NotifyPropertyChanged("IsSelected")
' Aggiorno visualizzazione
EgtDraw()
@@ -85,10 +85,6 @@ Public Class OperationListBoxItem
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
' Se l'operazione è una disposizione
If EgtGetOperationType(Id) = MCH_OY.DISP Then
- '' Abilito la selezione delle Fixture
- 'Map.refProjectVM.SceneSelType = SceneSelTypeOpt.FIXTURE
- ' Abilito la selezione di tutti i tipi di geometria
- 'Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
' Altrimenti è una lavorazione
Else
' Imposto come corrente la lavorazione selezionata
@@ -115,10 +111,10 @@ Public Class OperationListBoxItem
End If
' Notifico al contentcontrol OperationParameter di aggiornarsi
If Not IsNothing( Map.refOperationParametersExpanderVM) Then
- Map.refOperationParametersExpanderVM.OnPropertyChanged("OperationParameters")
+ Map.refOperationParametersExpanderVM.OnPropertyChanged(NameOf(Map.refOperationParametersExpanderVM.OperationParameters))
End If
- Map.refOperationsListExpanderVM.OnPropertyChanged("MoveUp_IsEnabled")
- Map.refOperationsListExpanderVM.OnPropertyChanged("MoveDown_IsEnabled")
+ Map.refOperationsListExpanderVM.OnPropertyChanged(NameOf(Map.refOperationsListExpanderVM.MoveUp_IsEnabled))
+ Map.refOperationsListExpanderVM.OnPropertyChanged(NameOf(Map.refOperationsListExpanderVM.MoveDown_IsEnabled))
' Notifico l'operazione selezionata all'expander con l'albero delle lavorazioni aggiungibili
If Not IsNothing( Map.refMachiningTreeExpanderVM) Then
Map.refMachiningTreeExpanderVM.nSelectedOperationId = Me.Id
@@ -126,11 +122,10 @@ Public Class OperationListBoxItem
' Aggiorno visualizzazione
EgtDraw()
End If
- 'OnPropertyChanged("ToolExpanderHeader")
- Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled")
- Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled")
- Map.refOperationsListExpanderVM.OnPropertyChanged("Rename_IsEnabled")
- NotifyPropertyChanged("IsSelected")
+ Map.refOperationsListExpanderVM.OnPropertyChanged(NameOf(Map.refOperationsListExpanderVM.DuplicateCmd_IsEnabled))
+ Map.refOperationsListExpanderVM.OnPropertyChanged(NameOf(Map.refOperationsListExpanderVM.MachToDb_IsEnabled))
+ Map.refOperationsListExpanderVM.OnPropertyChanged(NameOf(Map.refOperationsListExpanderVM.Rename_IsEnabled))
+ NotifyPropertyChanged(NameOf(IsSelected))
End Set
End Property
diff --git a/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderV.xaml.vb
index 2994cb7..ad1d54b 100644
--- a/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderV.xaml.vb
@@ -1,180 +1,3 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
-
-Public Class OperationParametersExpanderV
-
- ' Private m_OperationExpanderVM As OperationExpanderVM
-
- ' Private EgtFloatingTray As EgtFloatingTray
- ' Private OptionPanelView As UserControl
- ' Private OptionPanelViewStackPanel As StackPanel
- ' 'Private OperationParameters As ContentPresenter
- ' Private MachiningTreeContentPresenter As ContentPresenter
- ' Private MachiningTreeUserControl As UserControl
- ' Private MachiningTreeExpander As Expander
- ' Private SimulationContentPresenter As ContentPresenter
- ' Private SimulationUserControl As UserControl
- ' Private SimulationExpanderStackPanel As StackPanel
- ' Private SimulationExpander As Expander
- ' Private GenerateButton As Button
-
- ' Private m_bFirst As Boolean = True
-
- '#Region "CONSTRUCTOR"
-
- ' Sub New()
- ' ' Funzione che interpreta l'xaml
- ' InitializeComponent()
- ' ' Assegno al riferimento locale al VM il VM preso dal DataContext
- ' m_OperationExpanderVM = DirectCast(Me.DataContext, OperationExpanderVM)
- ' End Sub
-
- '#End Region ' CONSTRUCTOR
-
- '#Region "EVENTS"
-
- ' Private Sub MachiningOpListBoxItem_LostKeyboardFocus(sender As Object, e As KeyboardFocusChangedEventArgs)
- ' Dim TextBox As TextBox = TryCast(sender, TextBox)
- ' If IsNothing(TextBox) Then Return
- ' Dim SelOp As MachiningOpListBoxItem = TryCast(TextBox.DataContext, MachiningOpListBoxItem)
- ' If IsNothing(SelOp) Then Return
- ' If MachiningOpListBoxItem.m_CloseModifyLostFocus Then
- ' SelOp.ModifyNameEsc()
- ' Else
- ' If MachiningOpListBoxItem.m_Spy Then
- ' MachiningOpListBoxItem.m_CloseModifyLostFocus = True
- ' MachiningOpListBoxItem.m_Spy = False
- ' End If
- ' Keyboard.Focus(TextBox)
- ' End If
- ' End Sub
-
- ' Private Sub MachiningOpListBoxItem_IsVisibleChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
- ' Dim bNewVal As Boolean = False
- ' Try
- ' bNewVal = CType(e.NewValue, Boolean)
- ' Catch
- ' End Try
- ' If bNewVal Then
- ' Dim inElem As IInputElement = TryCast(sender, IInputElement)
- ' If Not IsNothing(inElem) Then Keyboard.Focus(inElem)
- ' End If
- ' End Sub
-
- '#End Region ' EVENTS
-
- ' Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
- ' If m_bFirst Then
- ' EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
- ' OptionPanelView = FindAncestor(Of UserControl)(Me)
- ' OptionPanelViewStackPanel = DirectCast(OptionPanelView.Content, StackPanel)
- ' MachiningTreeContentPresenter = DirectCast(OptionPanelViewStackPanel.Children(1), ContentPresenter)
- ' MachiningTreeUserControl = DirectCast(MachiningTreeContentPresenter.Content, UserControl)
- ' MachiningTreeExpander = DirectCast(MachiningTreeUserControl.Content, Expander)
- ' SimulationContentPresenter = DirectCast(OptionPanelViewStackPanel.Children(2), ContentPresenter)
- ' SimulationUserControl = DirectCast(SimulationContentPresenter.Content, UserControl)
- ' SimulationExpanderStackPanel = DirectCast(SimulationUserControl.Content, StackPanel)
- ' SimulationExpander = DirectCast(SimulationExpanderStackPanel.Children(0), Expander)
- ' GenerateButton = DirectCast(SimulationExpanderStackPanel.Children(2), Button)
- ' ' Gestisco l'evento SizeChanged della Tray
- ' AddHandler EgtFloatingTray.SizeChanged, AddressOf OperationExpanderTray_SizeChanged
- ' m_bFirst = False
- ' End If
- ' CalculateOperationParametersStackPanelMaxHeight()
- ' End Sub
-
- ' Private Sub OperationExpanderTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
- ' CalculateOperationParametersStackPanelMaxHeight()
- ' 'For Each Expander In OperationParametersStackPanel.Children
- ' ' If TypeOf Expander Is Expander Then
- ' ' Dim CurrExpander As Expander = DirectCast(Expander, Expander)
- ' ' CurrExpander.IsExpanded = False
- ' ' End If
- ' 'Next
- ' End Sub
-
- ' Private Sub CalculateOperationParametersStackPanelMaxHeight()
- ' Dim OccupiedHeight As Double = 0
- ' If Not MachiningTreeExpander.IsExpanded Then
- ' OccupiedHeight += MachiningTreeExpander.ActualHeight
- ' Else
- ' Dim MachiningTreeExpanderContent As FrameworkElement = DirectCast(MachiningTreeExpander.Content, FrameworkElement)
- ' MachiningTreeExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (MachiningTreeExpander.ActualHeight - MachiningTreeExpanderContent.DesiredSize.Height)
- ' End If
- ' If Not SimulationExpander.IsExpanded Then
- ' OccupiedHeight += SimulationExpander.ActualHeight
- ' Else
- ' Dim SimulationExpanderContent As FrameworkElement = DirectCast(SimulationExpander.Content, FrameworkElement)
- ' SimulationExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (SimulationExpander.ActualHeight - SimulationExpanderContent.DesiredSize.Height)
- ' End If
- ' OccupiedHeight += GenerateButton.ActualHeight
- ' 'Aggiungo altezza OperationsList header Expander
- ' If Not OperationsListExpander.IsExpanded Then
- ' OccupiedHeight += OperationsListExpander.ActualHeight
- ' Else
- ' Dim OperationsListExpanderContent As FrameworkElement = DirectCast(OperationsListExpander.Content, FrameworkElement)
- ' OperationsListExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (OperationsListExpander.ActualHeight - OperationsListExpanderContent.DesiredSize.Height)
- ' End If
- ' If Not OperationParametersExpander.IsExpanded Then
- ' OccupiedHeight += OperationParametersExpander.ActualHeight
- ' Else
- ' Dim OperationParametersExpanderContent As FrameworkElement = DirectCast(OperationParametersExpander.Content, FrameworkElement)
- ' OperationParametersExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (OperationParametersExpander.ActualHeight - OperationParametersExpanderContent.DesiredSize.Height)
- ' End If
- ' '' Aggiungo altezza contenuto OperationParameters che però è fuori dallo Stackpanel
- ' 'OperationFirstParametersStackPanel.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' 'If OperationFirstParametersStackPanel.DesiredSize.Height <> 0 Then
- ' ' OccupiedHeight += OperationFirstParametersStackPanel.DesiredSize.Height
- ' 'Else
- ' ' ' aggiungo il valore calcolato provando se non viene calcolato dal sistema al momento
- ' ' OccupiedHeight += 10
- ' 'End If
- ' 'OperationParametersStackPanel.MaxHeight = OptionPanelViewStackPanel.MaxHeight - OccupiedHeight
- ' End Sub
-
- ' ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
- ' Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
- ' Dim target As DependencyObject = dependencyObject
- ' Do
- ' target = LogicalTreeHelper.GetParent(target)
- ' Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
- ' If IsNothing(target) Then
- ' target = dependencyObject
- ' Do
- ' target = VisualTreeHelper.GetParent(target)
- ' Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
- ' End If
- ' Return TryCast(target, T)
- ' End Function
-
- ' 'Public Sub ItemsControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
- ' ' Dim ListControl As ListBox = DirectCast(sender, ListBox)
- ' ' If Not IsNothing(ListControl.SelectedItem) Then
- ' ' Dim SelectedItemIndex As Integer = ListControl.Items.IndexOf(ListControl.SelectedItem)
- ' ' ListControl.Dispatcher.BeginInvoke(DirectCast(Sub()
- ' ' ListControl.UpdateLayout()
- ' ' If ListControl.SelectedItem IsNot Nothing Then
- ' ' ListControl.ScrollIntoView(ListControl.SelectedItem)
- ' ' End If
- ' ' End Sub, Action))
- ' ' If SelectedItemIndex > 0 Then
- ' ' ListControl.Dispatcher.BeginInvoke(DirectCast(Sub()
- ' ' ListControl.UpdateLayout()
- ' ' ListControl.ScrollIntoView(ListControl.Items(SelectedItemIndex - 1))
- ' ' End Sub, Action))
- ' ' End If
- ' ' If SelectedItemIndex < ListControl.Items.Count - 2 Then
- ' ' ListControl.Dispatcher.BeginInvoke(DirectCast(Sub()
- ' ' ListControl.UpdateLayout()
- ' ' ListControl.ScrollIntoView(ListControl.Items(SelectedItemIndex + 1))
- ' ' End Sub, Action))
- ' ' End If
- ' ' End If
-
- ' 'End Sub
+Public Class OperationParametersExpanderV
End Class
diff --git a/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderVM.vb
index 4dfc1d0..f58b4de 100644
--- a/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationParametersExpander/OperationParametersExpanderVM.vb
@@ -72,7 +72,7 @@ Public Class OperationParametersExpanderVM
m_MachiningParameterExpanderVM = New MachiningParameterExpanderVM()
m_MachiningParameterExpander.DataContext = m_MachiningParameterExpanderVM
End If
- m_MachiningParameterExpanderVM.NotifyPropertyChanged("ParamExpanderPageV")
+ m_MachiningParameterExpanderVM.NotifyPropertyChanged(NameOf(m_MachiningParameterExpanderVM.ParamExpanderPageV))
Return m_MachiningParameterExpander
End If
End Get
diff --git a/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderV.xaml.vb b/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderV.xaml.vb
index f54b5b8..62d5f0e 100644
--- a/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderV.xaml.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderV.xaml.vb
@@ -1,155 +1,4 @@
-Imports EgtWPFLib5
-Imports EgtWPFLib5.EgtFloating
-
-Public Class OperationsListExpanderV
-
- ' Private m_OperationExpanderVM As OperationExpanderVM
-
- ' Private EgtFloatingTray As EgtFloatingTray
- ' Private OptionPanelView As UserControl
- ' Private OptionPanelViewStackPanel As StackPanel
- ' 'Private OperationParameters As ContentPresenter
- ' Private MachiningTreeContentPresenter As ContentPresenter
- ' Private MachiningTreeUserControl As UserControl
- ' Private MachiningTreeExpander As Expander
- ' Private SimulationContentPresenter As ContentPresenter
- ' Private SimulationUserControl As UserControl
- ' Private SimulationExpanderStackPanel As StackPanel
- ' Private SimulationExpander As Expander
- ' Private GenerateButton As Button
-
- ' Private m_bFirst As Boolean = True
-
- '#Region "CONSTRUCTOR"
-
- ' Sub New()
- ' ' Funzione che interpreta l'xaml
- ' InitializeComponent()
- ' ' Assegno al riferimento locale al VM il VM preso dal DataContext
- ' m_OperationExpanderVM = DirectCast(Me.DataContext, OperationExpanderVM)
- ' End Sub
-
- '#End Region ' CONSTRUCTOR
-
- '#Region "EVENTS"
-
- ' Private Sub MachiningOpListBoxItem_LostKeyboardFocus(sender As Object, e As KeyboardFocusChangedEventArgs)
- ' Dim TextBox As TextBox = TryCast(sender, TextBox)
- ' If IsNothing(TextBox) Then Return
- ' Dim SelOp As MachiningOpListBoxItem = TryCast(TextBox.DataContext, MachiningOpListBoxItem)
- ' If IsNothing(SelOp) Then Return
- ' If MachiningOpListBoxItem.m_CloseModifyLostFocus Then
- ' SelOp.ModifyNameEsc()
- ' Else
- ' If MachiningOpListBoxItem.m_Spy Then
- ' MachiningOpListBoxItem.m_CloseModifyLostFocus = True
- ' MachiningOpListBoxItem.m_Spy = False
- ' End If
- ' Keyboard.Focus(TextBox)
- ' End If
- ' End Sub
-
- ' Private Sub MachiningOpListBoxItem_IsVisibleChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
- ' Dim bNewVal As Boolean = False
- ' Try
- ' bNewVal = CType(e.NewValue, Boolean)
- ' Catch
- ' End Try
- ' If bNewVal Then
- ' Dim inElem As IInputElement = TryCast(sender, IInputElement)
- ' If Not IsNothing(inElem) Then Keyboard.Focus(inElem)
- ' End If
- ' End Sub
-
- '#End Region ' EVENTS
-
- ' Private Sub OperationExpanderView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
- ' If m_bFirst Then
- ' EgtFloatingTray = FindAncestor(Of EgtFloatingTray)(Me)
- ' OptionPanelView = FindAncestor(Of UserControl)(Me)
- ' OptionPanelViewStackPanel = DirectCast(OptionPanelView.Content, StackPanel)
- ' MachiningTreeContentPresenter = DirectCast(OptionPanelViewStackPanel.Children(1), ContentPresenter)
- ' MachiningTreeUserControl = DirectCast(MachiningTreeContentPresenter.Content, UserControl)
- ' MachiningTreeExpander = DirectCast(MachiningTreeUserControl.Content, Expander)
- ' SimulationContentPresenter = DirectCast(OptionPanelViewStackPanel.Children(2), ContentPresenter)
- ' SimulationUserControl = DirectCast(SimulationContentPresenter.Content, UserControl)
- ' SimulationExpanderStackPanel = DirectCast(SimulationUserControl.Content, StackPanel)
- ' SimulationExpander = DirectCast(SimulationExpanderStackPanel.Children(0), Expander)
- ' GenerateButton = DirectCast(SimulationExpanderStackPanel.Children(2), Button)
- ' ' Gestisco l'evento SizeChanged della Tray
- ' AddHandler EgtFloatingTray.SizeChanged, AddressOf OperationExpanderTray_SizeChanged
- ' m_bFirst = False
- ' End If
- ' CalculateOperationParametersStackPanelMaxHeight()
- ' End Sub
-
- ' Private Sub OperationExpanderTray_SizeChanged(sender As Object, e As System.Windows.SizeChangedEventArgs)
- ' CalculateOperationParametersStackPanelMaxHeight()
- ' 'For Each Expander In OperationParametersStackPanel.Children
- ' ' If TypeOf Expander Is Expander Then
- ' ' Dim CurrExpander As Expander = DirectCast(Expander, Expander)
- ' ' CurrExpander.IsExpanded = False
- ' ' End If
- ' 'Next
- ' End Sub
-
- ' Private Sub CalculateOperationParametersStackPanelMaxHeight()
- ' Dim OccupiedHeight As Double = 0
- ' If Not MachiningTreeExpander.IsExpanded Then
- ' OccupiedHeight += MachiningTreeExpander.ActualHeight
- ' Else
- ' Dim MachiningTreeExpanderContent As FrameworkElement = DirectCast(MachiningTreeExpander.Content, FrameworkElement)
- ' MachiningTreeExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (MachiningTreeExpander.ActualHeight - MachiningTreeExpanderContent.DesiredSize.Height)
- ' End If
- ' If Not SimulationExpander.IsExpanded Then
- ' OccupiedHeight += SimulationExpander.ActualHeight
- ' Else
- ' Dim SimulationExpanderContent As FrameworkElement = DirectCast(SimulationExpander.Content, FrameworkElement)
- ' SimulationExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (SimulationExpander.ActualHeight - SimulationExpanderContent.DesiredSize.Height)
- ' End If
- ' OccupiedHeight += GenerateButton.ActualHeight
- ' 'Aggiungo altezza OperationsList header Expander
- ' If Not OperationsListExpander.IsExpanded Then
- ' OccupiedHeight += OperationsListExpander.ActualHeight
- ' Else
- ' Dim OperationsListExpanderContent As FrameworkElement = DirectCast(OperationsListExpander.Content, FrameworkElement)
- ' OperationsListExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (OperationsListExpander.ActualHeight - OperationsListExpanderContent.DesiredSize.Height)
- ' End If
- ' If Not OperationParametersExpander.IsExpanded Then
- ' OccupiedHeight += OperationParametersExpander.ActualHeight
- ' Else
- ' Dim OperationParametersExpanderContent As FrameworkElement = DirectCast(OperationParametersExpander.Content, FrameworkElement)
- ' OperationParametersExpanderContent.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' OccupiedHeight += (OperationParametersExpander.ActualHeight - OperationParametersExpanderContent.DesiredSize.Height)
- ' End If
- ' '' Aggiungo altezza contenuto OperationParameters che però è fuori dallo Stackpanel
- ' 'OperationFirstParametersStackPanel.Measure(New Size(Double.PositiveInfinity, Double.PositiveInfinity))
- ' 'If OperationFirstParametersStackPanel.DesiredSize.Height <> 0 Then
- ' ' OccupiedHeight += OperationFirstParametersStackPanel.DesiredSize.Height
- ' 'Else
- ' ' ' aggiungo il valore calcolato provando se non viene calcolato dal sistema al momento
- ' ' OccupiedHeight += 10
- ' 'End If
- ' 'OperationParametersStackPanel.MaxHeight = OptionPanelViewStackPanel.MaxHeight - OccupiedHeight
- ' End Sub
-
- ' ' Funzione che permette di trovare il primo contenitore di tipo T di un elemento grafico dependencyObject
- ' Public Function FindAncestor(Of T As Class)(dependencyObject As DependencyObject) As T
- ' Dim target As DependencyObject = dependencyObject
- ' Do
- ' target = LogicalTreeHelper.GetParent(target)
- ' Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
- ' If IsNothing(target) Then
- ' target = dependencyObject
- ' Do
- ' target = VisualTreeHelper.GetParent(target)
- ' Loop While target IsNot Nothing AndAlso Not (TypeOf target Is T)
- ' End If
- ' Return TryCast(target, T)
- ' End Function
+Public Class OperationsListExpanderV
Public Sub ItemsControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
Dim ListControl As ListBox = DirectCast(sender, ListBox)
diff --git a/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderVM.vb
index 604457c..6e5ea06 100644
--- a/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/OperationsListExpander/OperationsListExpanderVM.vb
@@ -943,7 +943,6 @@ Public Class OperationsListExpanderVM
Friend Function ExitOperationsList() As Boolean
m_ListIsExpanded = False
-
OnPropertyChanged(NameOf(ListIsExpanded))
Return True
End Function
diff --git a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb
index 093707b..8f0cda6 100644
--- a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb
+++ b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb
@@ -1,5 +1,4 @@
-Imports System.Collections.ObjectModel
-Imports System.IO
+Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
@@ -29,7 +28,7 @@ Public Class SimulationExpanderVM
End Get
Set(value As Boolean)
m_Simulation_IsEnabled = value
- NotifyPropertyChanged("Simulation_IsEnabled")
+ NotifyPropertyChanged(NameOf(Simulation_IsEnabled))
End Set
End Property
@@ -41,7 +40,7 @@ Public Class SimulationExpanderVM
value = Math.Max(1, Math.Min(value, 100))
If Math.Abs(value - m_SliderValue) > 1 Then
m_SliderValue = value
- NotifyPropertyChanged("SliderValue")
+ NotifyPropertyChanged(NameOf(SliderValue))
End If
EgtSimSetStep(value * GetSliderX())
End Set
@@ -144,8 +143,8 @@ Public Class SimulationExpanderVM
m_Simulation_IsExpanded = True
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
Map.refOperationsListExpanderVM.SimulationExpander_Get_IsExpanded(True)
- NotifyPropertyChanged("Simulation_IsExpanded")
- Map.refMachiningOptionPanelVM.OnPropertyChanged("GenerateIsEnabled")
+ NotifyPropertyChanged(NameOf(Simulation_IsExpanded))
+ Map.refMachiningOptionPanelVM.OnPropertyChanged(NameOf(Map.refMachiningOptionPanelVM.GenerateIsEnabled))
' disattivo database utensili, lavorazioni e setup se vado in simulazione
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(False, False, False)
' disattivo MTable e SpecialPanel se vado in simulazione
@@ -166,8 +165,8 @@ Public Class SimulationExpanderVM
m_Simulation_IsExpanded = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
Map.refOperationsListExpanderVM.SimulationExpander_Get_IsExpanded(False)
- NotifyPropertyChanged("Simulation_IsExpanded")
- Map.refMachiningOptionPanelVM.OnPropertyChanged("GenerateIsEnabled")
+ NotifyPropertyChanged(NameOf(Simulation_IsExpanded))
+ Map.refMachiningOptionPanelVM.OnPropertyChanged(NameOf(Map.refMachiningOptionPanelVM.GenerateIsEnabled))
' attivo database utensili, lavorazioni e setup se esco dalla simulazione
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
' disattivo MTable e SpecialPanel se esco dalla simulazione
@@ -245,7 +244,7 @@ Public Class SimulationExpanderVM
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = False
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
Map.refMachGroupPanelVM.SetMachGroupState(False) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = False
- Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
+ Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
m_bStopOnNextCollision = True
If Not EgtSimStart(False) Then
If EgtGetLastMachMgrErrorId() <> 0 Then
@@ -271,7 +270,7 @@ Public Class SimulationExpanderVM
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
- NotifyPropertyChanged("PlayPauseImage")
+ NotifyPropertyChanged(NameOf(PlayPauseImage))
End If
' Se movimento con collisione
ElseIf nMove = MCH_SIM.COLLISION Then
@@ -281,7 +280,7 @@ Public Class SimulationExpanderVM
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
- NotifyPropertyChanged("PlayPauseImage")
+ NotifyPropertyChanged(NameOf(PlayPauseImage))
' Messaggio
MessageBox.Show(EgtMsg(MSG_SIMULATION + 19), EgtMsg(MSG_SIMULATION + 15), MessageBoxButton.OK, MessageBoxImage.Warning)
Else
@@ -292,7 +291,7 @@ Public Class SimulationExpanderVM
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
- NotifyPropertyChanged("PlayPauseImage")
+ NotifyPropertyChanged(NameOf(PlayPauseImage))
' Abilito check VMill
VMill_IsEnabled = True
Select Case nMove
@@ -341,7 +340,7 @@ Public Class SimulationExpanderVM
Map.refOperationsListExpanderVM.OpersListViewIsEnabled = True
Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
Map.refMachGroupPanelVM.SetMachGroupState(True) ' Map.refMachGroupPanelVM.MachGroupPanelIsEnabled = True
- Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
+ Map.refEstimationsExpanderVM.NotifyPropertyChanged(NameOf(Map.refEstimationsExpanderVM.Estimation_IsEnabled))
If IniFile.m_bSimulEndExitApp Then
refMainWindowVM.CloseApplication( Nothing)
End If
@@ -422,7 +421,7 @@ Public Class SimulationExpanderVM
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
- NotifyPropertyChanged("PlayPauseImage")
+ NotifyPropertyChanged(NameOf(PlayPauseImage))
' Dichiaro di non arrestarsi alla successiva notifica di collisione
m_bStopOnNextCollision = False
End If
diff --git a/OptionPanel/MachiningOptionPanelVM.vb b/OptionPanel/MachiningOptionPanelVM.vb
index 48ea62f..659449f 100644
--- a/OptionPanel/MachiningOptionPanelVM.vb
+++ b/OptionPanel/MachiningOptionPanelVM.vb
@@ -157,12 +157,10 @@ Public Class MachiningOptionPanelVM
#Region "METHODS"
Friend Function InitMachiningOptionPanel() As Boolean
- 'EgtZoom(ZM.ALL)
Return True
End Function
Friend Function ExitMachiningOptionPanel() As Boolean
-
Return True
End Function
diff --git a/OptionPanel/OptionPanelVM.vb b/OptionPanel/OptionPanelVM.vb
index fb804aa..9f8f5b0 100644
--- a/OptionPanel/OptionPanelVM.vb
+++ b/OptionPanel/OptionPanelVM.vb
@@ -60,14 +60,14 @@ Public Class OptionPanelVM
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
End If
- NotifyPropertyChanged("ModePanel")
+ NotifyPropertyChanged(NameOf(ModePanel))
End Sub
Friend Sub MachiningMode_IsChecked()
m_DrawIsChecked = False
m_MachiningIsChecked = True
EgtZoom(ZM.ALL, False)
- NotifyPropertyChanged("ModePanel")
+ NotifyPropertyChanged(NameOf(ModePanel))
End Sub
End Class
\ No newline at end of file
diff --git a/OptionsWindow/MachineBox.xaml b/OptionsWindow/MachineBox.xaml
index 41676de..1f29b12 100644
--- a/OptionsWindow/MachineBox.xaml
+++ b/OptionsWindow/MachineBox.xaml
@@ -1,10 +1,10 @@
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
+ Height="160" Width="380" WindowStyle="None" ResizeMode="NoResize"
+ TitleBarHeight="30" IsResizable="False" IsMinimizable="False"
+ ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
@@ -22,7 +22,7 @@
+ VerticalAlignment="Center" />
diff --git a/OptionsWindow/OptionWindowV.xaml b/OptionsWindow/OptionWindowV.xaml
index f70e3ef..182eeb4 100644
--- a/OptionsWindow/OptionWindowV.xaml
+++ b/OptionsWindow/OptionWindowV.xaml
@@ -295,15 +295,6 @@
-
diff --git a/OptionsWindow/OptionWindowVM.vb b/OptionsWindow/OptionWindowVM.vb
index b3e43a3..92ea71f 100644
--- a/OptionsWindow/OptionWindowVM.vb
+++ b/OptionsWindow/OptionWindowVM.vb
@@ -170,17 +170,6 @@ Public Class OptionWindowVM
End Set
End Property
- 'Public Property SelectedWaterJetGeomType As SceneSelModeOpt
- ' Get
- ' Return OptionModule.m_SelGeomWaterJetting
- ' End Get
- ' Set(value As SceneSelModeOpt)
- ' If WritePrivateProfileString(S_MACH, K_SELGEOMWATERJETTING, CInt(value).ToString()) Then
- ' OptionModule.m_SelGeomWaterJetting = value
- ' End If
- ' End Set
- 'End Property
-
Public Property SelectedFiveAxGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomFiveAxMilling
@@ -307,7 +296,7 @@ Public Class OptionWindowVM
OptionModule.m_dDxfScaleFactor = dVal
WritePrivateProfileString(S_IMPORT, K_DXFSCALE, DoubleToString(OptionModule.m_dDxfScaleFactor, 5))
Map.refProjectVM.GetController().SetScaleForDxfImport(OptionModule.m_dDxfScaleFactor)
- NotifyPropertyChanged("DxfScaleFactor")
+ NotifyPropertyChanged(NameOf(DxfScaleFactor))
End If
End Set
End Property
@@ -322,7 +311,7 @@ Public Class OptionWindowVM
OptionModule.m_dStlScaleFactor = dVal
WritePrivateProfileString(S_IMPORT, K_STLSCALE, DoubleToString(OptionModule.m_dStlScaleFactor, 5))
Map.refProjectVM.GetController().SetScaleForStlImport(OptionModule.m_dStlScaleFactor)
- NotifyPropertyChanged("StlScaleFactor")
+ NotifyPropertyChanged(NameOf(StlScaleFactor))
End If
End Set
End Property
@@ -337,7 +326,7 @@ Public Class OptionWindowVM
OptionModule.m_dImgScaleFactor = dVal
WritePrivateProfileString(S_IMPORT, K_IMGSCALE, DoubleToString(OptionModule.m_dImgScaleFactor, 5))
Map.refProjectVM.GetController().SetScaleForImageImport(OptionModule.m_dImgScaleFactor)
- NotifyPropertyChanged("ImageScaleFactor")
+ NotifyPropertyChanged(NameOf(ImageScaleFactor))
End If
End Set
End Property
@@ -481,7 +470,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
m_DXFScaleEnable = value
- NotifyPropertyChanged("DXFScaleEnable")
+ NotifyPropertyChanged(NameOf(DXFScaleEnable))
End Set
End Property
@@ -492,7 +481,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
m_STLScaleEnable = value
- NotifyPropertyChanged("STLScaleEnable")
+ NotifyPropertyChanged(NameOf(STLScaleEnable))
End Set
End Property
@@ -503,7 +492,7 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
m_ImageScaleEnable = value
- NotifyPropertyChanged("ImageScaleEnable")
+ NotifyPropertyChanged(NameOf(ImageScaleEnable))
End Set
End Property
@@ -996,7 +985,7 @@ Public Class OptionWindowVM
OptionModule.m_TopSceneBackground = BackTopColor
Map.refProjectVM.GetScene.SetViewBackground(OptionModule.m_TopSceneBackground, OptionModule.m_BotSceneBackground)
WritePrivateProfileColor(S_SCENE, K_BACKTOP, OptionModule.m_TopSceneBackground)
- NotifyPropertyChanged("TopSceneBackground")
+ NotifyPropertyChanged(NameOf(TopSceneBackground))
End If
End Sub
@@ -1028,7 +1017,7 @@ Public Class OptionWindowVM
OptionModule.m_BotSceneBackground = BackBotColor
Map.refProjectVM.GetScene.SetViewBackground(OptionModule.m_TopSceneBackground, OptionModule.m_BotSceneBackground)
WritePrivateProfileColor(S_SCENE, K_BACKBOTTOM, OptionModule.m_BotSceneBackground)
- NotifyPropertyChanged("BotSceneBackground")
+ NotifyPropertyChanged(NameOf(BotSceneBackground))
End If
End Sub
@@ -1064,7 +1053,7 @@ Public Class OptionWindowVM
WritePrivateProfileColor(S_GRID, K_MINLNCOLOR, OptionModule.m_GridColor)
WritePrivateProfileColor(S_GRID, K_MAJLNCOLOR, OptionModule.m_GridColor)
EgtDraw()
- NotifyPropertyChanged("GridColor")
+ NotifyPropertyChanged(NameOf(GridColor))
End If
End Sub
@@ -1099,7 +1088,7 @@ Public Class OptionWindowVM
EgtDraw()
Map.refManageLayerExpanderVM.UpdateHeaderColor(OptionModule.m_DefMaterialColor)
Map.refManageLayerExpanderVM.LoadObjTree()
- NotifyPropertyChanged("DefMaterialColor")
+ NotifyPropertyChanged(NameOf(DefMaterialColor))
End If
End Sub
diff --git a/PopUpGridPanel/PopUpGridPanelV.xaml b/PopUpGridPanel/PopUpGridPanelV.xaml
index aa8b2fb..8f11acc 100644
--- a/PopUpGridPanel/PopUpGridPanelV.xaml
+++ b/PopUpGridPanel/PopUpGridPanelV.xaml
@@ -1,6 +1,6 @@
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">