diff --git a/Icarus/AboutBoxWindow/AboutBoxV.xaml b/Icarus/AboutBoxWindow/AboutBoxV.xaml
index 1e807e4..ca02375 100644
--- a/Icarus/AboutBoxWindow/AboutBoxV.xaml
+++ b/Icarus/AboutBoxWindow/AboutBoxV.xaml
@@ -1,52 +1,81 @@
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="AboutBox"
+ Height="486"
+ Width="735"
+ WindowStyle="None"
+ ResizeMode="NoResize"
+ AllowsTransparency="True"
+ Background="Transparent"
+ ShowInTaskbar="False"
+ WindowStartupLocation="CenterOwner">
-
+
-
+
+
+
-
-
+
+
+
-
-
-
-
+
-
+
-
-
+
+
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
-
-
diff --git a/Icarus/AboutBoxWindow/AboutBoxV.xaml.vb b/Icarus/AboutBoxWindow/AboutBoxV.xaml.vb
index 42fc809..0d57a6a 100644
--- a/Icarus/AboutBoxWindow/AboutBoxV.xaml.vb
+++ b/Icarus/AboutBoxWindow/AboutBoxV.xaml.vb
@@ -16,30 +16,29 @@ Public Class AboutBoxV
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
Dim sLeftDays As String = ""
- Dim nLeftDays As Integer
- if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
- sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
+ Dim nLeftDays As Integer
+ If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")"
+ sInfo = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
- " Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
+ " Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
Dim sOpSys As String = String.Empty
- EgtGetOsInfo( sOpSys)
+ EgtGetOsInfo(sOpSys)
sInfo &= sOpSys & Environment.NewLine
Dim sCPU As String = String.Empty
- EgtGetCpuInfo( sCPU)
+ EgtGetCpuInfo(sCPU)
sInfo &= sCPU & Environment.NewLine
Dim sMem As String = String.Empty
- EgtGetMemoryInfo( sMem)
+ EgtGetMemoryInfo(sMem)
sInfo &= sMem & Environment.NewLine
Dim sScene As String = String.Empty
EgtGetSceneInfo(sScene)
sInfo &= sScene
InfoLbl.Text = sInfo
- ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
End Sub
End Class
diff --git a/Icarus/AttachedProperties/TreeViewItemHelper.vb b/Icarus/AttachedProperties/TreeViewItemHelper.vb
new file mode 100644
index 0000000..d058a2b
--- /dev/null
+++ b/Icarus/AttachedProperties/TreeViewItemHelper.vb
@@ -0,0 +1,165 @@
+Imports System.Globalization
+Imports System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox
+Imports System.Windows.Media.Media3D
+
+Public Module TreeViewItemHelper
+
+ ' Gestione MouseOver come in ListBox
+ Private CurrentItem As TreeViewItem
+ Private ReadOnly UpdateOverItemEvent As RoutedEvent = EventManager.RegisterRoutedEvent("UpdateOverItem", RoutingStrategy.Bubble, GetType(RoutedEventHandler), GetType(TreeViewItemHelper))
+ Private ReadOnly IsMouseDirectlyOverItemKey As DependencyPropertyKey = DependencyProperty.RegisterAttachedReadOnly("IsMouseDirectlyOverItem", GetType(Boolean), GetType(TreeViewItemHelper), New FrameworkPropertyMetadata(Nothing, New CoerceValueCallback(AddressOf CalculateIsMouseDirectlyOverItem)))
+ Public ReadOnly IsMouseDirectlyOverItemProperty As DependencyProperty = IsMouseDirectlyOverItemKey.DependencyProperty
+
+ Sub New()
+ EventManager.RegisterClassHandler(GetType(TreeViewItem), UIElement.MouseEnterEvent, New MouseEventHandler(AddressOf OnMouseTransition), True)
+ EventManager.RegisterClassHandler(GetType(TreeViewItem), UIElement.MouseLeaveEvent, New MouseEventHandler(AddressOf OnMouseTransition), True)
+ EventManager.RegisterClassHandler(GetType(TreeViewItem), UpdateOverItemEvent, New RoutedEventHandler(AddressOf OnUpdateOverItem))
+ End Sub
+
+ Function GetIsMouseDirectlyOverItem(ByVal obj As DependencyObject) As Boolean
+ Return CBool(obj.GetValue(IsMouseDirectlyOverItemProperty))
+ End Function
+
+ Private Function CalculateIsMouseDirectlyOverItem(ByVal item As DependencyObject, ByVal value As Object) As Object
+ Return item Is CurrentItem
+ End Function
+
+ Private Sub OnUpdateOverItem(ByVal sender As Object, ByVal e As RoutedEventArgs)
+ CurrentItem = TryCast(sender, TreeViewItem)
+ CurrentItem.InvalidateProperty(IsMouseDirectlyOverItemProperty)
+ e.Handled = True
+ End Sub
+
+ Private Sub OnMouseTransition(ByVal sender As Object, ByVal e As MouseEventArgs)
+ SyncLock IsMouseDirectlyOverItemProperty
+
+ If Not IsNothing(CurrentItem) Then
+ Dim oldItem As DependencyObject = CurrentItem
+ CurrentItem = Nothing
+ oldItem.InvalidateProperty(IsMouseDirectlyOverItemProperty)
+ End If
+
+ Mouse.DirectlyOver?.RaiseEvent(New RoutedEventArgs(UpdateOverItemEvent))
+ End SyncLock
+ End Sub
+
+ ' Gestione click destro del mouse che seleziona l'elemento
+ Public ReadOnly SelectItemOnRightClickProperty As DependencyProperty = DependencyProperty.RegisterAttached("SelectItemOnRightClick", GetType(Boolean), GetType(TreeViewItemHelper), New UIPropertyMetadata(False, AddressOf OnSelectItemOnRightClickChanged))
+
+ Public Function GetSelectItemOnRightClick(ByVal d As DependencyObject) As Boolean
+ Return CBool(d.GetValue(SelectItemOnRightClickProperty))
+ End Function
+
+ Public Sub SetSelectItemOnRightClick(ByVal d As DependencyObject, ByVal value As Boolean)
+ d.SetValue(SelectItemOnRightClickProperty, value)
+ End Sub
+
+ Private Sub OnSelectItemOnRightClickChanged(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
+ Dim selectItemOnRightClick As Boolean = CBool(e.NewValue)
+ Dim treeView As TreeView = TryCast(d, TreeView)
+
+ If treeView IsNot Nothing Then
+
+ If selectItemOnRightClick Then
+ AddHandler treeView.PreviewMouseRightButtonDown, AddressOf OnPreviewMouseRightButtonDown
+ Else
+ RemoveHandler treeView.PreviewMouseRightButtonDown, AddressOf OnPreviewMouseRightButtonDown
+ End If
+ End If
+ End Sub
+
+ Private Sub OnPreviewMouseRightButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
+ Dim treeViewItem As TreeViewItem = VisualUpwardSearch(Of TreeViewItem)(TryCast(e.OriginalSource, DependencyObject))
+ If treeViewItem IsNot Nothing Then
+ treeViewItem.IsSelected = True
+ Dim Tree As TreeView = VisualUpwardSearch(Of TreeView)(TryCast(treeViewItem, DependencyObject))
+ If Not IsNothing(Tree) Then
+ Dim myTransform As GeneralTransform = treeViewItem.TransformToAncestor(Tree)
+
+ Dim myOffset As Point = myTransform.Transform(New Point(0, 0))
+ treeViewItem.ContextMenu.HorizontalOffset = -treeViewItem.ActualWidth + (-myOffset.X) + Tree.ActualWidth - 3
+ treeViewItem.ContextMenu.VerticalOffset = -3
+ End If
+ e.Handled = True
+ End If
+ End Sub
+
+ Private Function VisualUpwardSearch(Of T As DependencyObject)(ByVal source As DependencyObject) As T
+ Dim returnVal As DependencyObject = source
+
+ While returnVal IsNot Nothing AndAlso Not (TypeOf returnVal Is T)
+ Dim tempReturnVal As DependencyObject = Nothing
+
+ If TypeOf returnVal Is Visual OrElse TypeOf returnVal Is Visual3D Then
+ tempReturnVal = VisualTreeHelper.GetParent(returnVal)
+ End If
+
+ If tempReturnVal Is Nothing Then
+ returnVal = LogicalTreeHelper.GetParent(returnVal)
+ Else
+ returnVal = tempReturnVal
+ End If
+ End While
+
+ Return TryCast(returnVal, T)
+ End Function
+
+ ' Gestione indentazione sottoelementi
+ Public Function GetDepth(item As TreeViewItem) As Integer
+ Dim parent As TreeViewItem = GetParent(item)
+
+ If Not IsNothing(parent) Then Return GetDepth(parent) + 1
+
+ Return 0
+ End Function
+
+ Private Function GetParent(item As TreeViewItem) As TreeViewItem
+ Dim parent As DependencyObject = If(Not IsNothing(item), VisualTreeHelper.GetParent(item), Nothing)
+
+ While Not IsNothing(parent) AndAlso Not (TypeOf parent Is TreeViewItem OrElse TypeOf parent Is TreeView)
+ parent = VisualTreeHelper.GetParent(parent)
+ End While
+
+ Return TryCast(parent, TreeViewItem)
+ End Function
+
+ Private Function GetTreeParent(item As TreeViewItem) As TreeViewItem
+ Dim parent As DependencyObject = If(Not IsNothing(item), VisualTreeHelper.GetParent(item), Nothing)
+
+ While Not IsNothing(parent) AndAlso Not (TypeOf parent Is TreeViewItem OrElse TypeOf parent Is TreeView)
+ parent = VisualTreeHelper.GetParent(parent)
+ End While
+
+ Return TryCast(parent, TreeViewItem)
+ End Function
+
+ ' Gestione indentazione sottoelementi
+ Public Function GetHeight(Item As TreeViewItem, SearchedItem As TreeViewItem, ByRef nHeight As Integer) As Boolean
+ Dim Index As Integer = 0
+ While Index <= Item.Items.Count - 1
+ If GetHeight(Item.Items(Index), SearchedItem, nHeight) Then
+ nHeight += 1
+ Return True
+ End If
+ Index += 1
+ End While
+ Return False
+ End Function
+
+End Module
+
+Public Class LeftMarginMultiplierConverter
+ Implements IValueConverter
+
+ Public Property Length As Double
+
+ Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
+ Dim item As TreeViewItem = TryCast(value, TreeViewItem)
+ If item Is Nothing Then Return New Thickness(0)
+ Return New Thickness(Length * GetDepth(item), 0, 0, 0)
+ End Function
+
+ Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
+ Throw New System.NotImplementedException()
+ End Function
+End Class
diff --git a/Icarus/ChooseMachineWnd/ChooseMachineWndV.xaml b/Icarus/ChooseMachineWnd/ChooseMachineWndV.xaml
index ddbd8b5..e947109 100644
--- a/Icarus/ChooseMachineWnd/ChooseMachineWndV.xaml
+++ b/Icarus/ChooseMachineWnd/ChooseMachineWndV.xaml
@@ -1,71 +1,50 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
diff --git a/Icarus/ChooseMachineWnd/ChooseMachineWndVM.vb b/Icarus/ChooseMachineWnd/ChooseMachineWndVM.vb
index bdad22e..0895f8b 100644
--- a/Icarus/ChooseMachineWnd/ChooseMachineWndVM.vb
+++ b/Icarus/ChooseMachineWnd/ChooseMachineWndVM.vb
@@ -40,7 +40,7 @@ Public Class ChooseMachineWndVM
Public ReadOnly Property ChooseMachine_Msg As String
Get
- Return "Macchina: "
+ Return "Select the new project machine from the list"
End Get
End Property
diff --git a/Icarus/Constants/Const3dPrint.vb b/Icarus/Constants/Const3dPrint.vb
index e72f458..163f2db 100644
--- a/Icarus/Constants/Const3dPrint.vb
+++ b/Icarus/Constants/Const3dPrint.vb
@@ -5,6 +5,7 @@
Public Const PART = "Part"
Public Const PRINT_SOLID = "PrintSolid"
Public Const LAY_MACH_START = "MachStart"
+ Public Const LAY_PARTREFERENCE = "PartFrame"
Public Const LAY_REFERENCE = "Frame"
Public Const LAY_OTHERS = "Aux"
Public Const LAY_RIBS = "Ribs"
@@ -15,6 +16,8 @@
Public Const RIB_EXTRUSION = "RibExtrusion"
Public Const RIB_CURVE = "RibCurve"
Public Const RIB_ID = "RibId"
+ Public Const SHELLNUMBER_ID = "ShellNumberId"
+ Public Const FILLEDSOLID_ID = "FilledSolidId"
Public Const VIEWPARAMS = "ViewParams"
Public Const IMPORTED_SOLID = "ImportedSolid"
Public Const RESULT_READ_PROG = "ResultReadProg"
@@ -115,6 +118,7 @@
Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting"
Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe"
Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir"
+ Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid"
Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference"
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe"
@@ -166,4 +170,7 @@
Public Const PART_NAME = "PartName"
Public Const ENTITY_NAME = "EntityName"
+ ' stringa che identifica il materiale come originale del costruttore
+ Public Const ORIG_MATERIAL As String = "***"
+
End Module
diff --git a/Icarus/Constants/ConstIni.vb b/Icarus/Constants/ConstIni.vb
index ad144a5..c3717ea 100644
--- a/Icarus/Constants/ConstIni.vb
+++ b/Icarus/Constants/ConstIni.vb
@@ -105,6 +105,7 @@ Public Module ConstIni
'Public Const S_SIMUL As String = "Simul"
'Public Const K_SLIDERX As String = "SliderX"
'Public Const K_SLIDERVAL As String = "SliderVal"
+ Public Const K_MACHVIEWMODE As String = "MachViewMode"
Public Const S_PRINTING3D As String = "3dPrinting"
Public Const K_3PRNBASEDIR As String = "BaseDir"
diff --git a/Icarus/ControllerInputPanel/ControllerInputPanelV.xaml b/Icarus/ControllerInputPanel/ControllerInputPanelV.xaml
index ca0d06f..df3756a 100644
--- a/Icarus/ControllerInputPanel/ControllerInputPanelV.xaml
+++ b/Icarus/ControllerInputPanel/ControllerInputPanelV.xaml
@@ -1,10 +1,16 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Icarus/ManagePartPanel/ManagePartPanelVM.vb b/Icarus/ManagePartPanel/ManagePartPanelVM.vb
index d0f0cc2..4758342 100644
--- a/Icarus/ManagePartPanel/ManagePartPanelVM.vb
+++ b/Icarus/ManagePartPanel/ManagePartPanelVM.vb
@@ -316,8 +316,9 @@ Public Class ManagePartPanelVM
EgtRelocateGlob(PrintSolidEntity.nId, nPrintPartLayerId, GDB_POS.LAST_SON)
' calcolo box superficie per creazione riferimento
EgtGetBBoxGlob(PrintSolidEntity.nId, GDB_BB.STANDARD, b3PrintSolid)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(PrintSolidEntity.nId)
+ EgtSetStatus(PrintSolidEntity.nId, GDB_ST.ON_)
If PrintSolidEntity.sName <> PrintSolidEntity.nId.ToString() Then
EgtSetInfo(PrintSolidEntity.nId, ENTITY_NAME, PrintSolidEntity.sName)
End If
@@ -341,8 +342,9 @@ Public Class ManagePartPanelVM
nMachStartId = EgtCreateCurveCompo(nMachStartLayerId, PartManager_GeomEntity.nId, True)
End Select
EgtSetName(nMachStartId, START_GEOM)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(nMachStartId)
+ EgtSetStatus(nMachStartId, GDB_ST.ON_)
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
End If
@@ -352,8 +354,9 @@ Public Class ManagePartPanelVM
Dim ptStart As Point3d = b3PrintSolid.Center() - 0.6 * b3PrintSolid.DimY() * Vector3d.Y_AX() - 0.5 * b3PrintSolid.DimZ() * Vector3d.Z_AX()
nMachStartId = EgtCreateGeoPoint(nMachStartLayerId, ptStart, GDB_RT.GLOB)
EgtSetName(nMachStartId, START_GEOM)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(nMachStartId)
+ EgtSetStatus(nMachStartId, GDB_ST.ON_)
End If
Case ManagePart_Layer.LayerType.RIBS
nRibsLayerId = EgtCreateGroup(nPartId)
@@ -364,8 +367,9 @@ Public Class ManagePartPanelVM
EgtSetInfo(PartManager_GeomEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
EgtSetInfo(PartManager_GeomEntity.nId, RIB_ID, nRibsIndex)
EgtRelocateGlob(PartManager_GeomEntity.nId, nRibsLayerId, GDB_POS.LAST_SON)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(PartManager_GeomEntity.nId)
+ EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
End If
@@ -375,27 +379,35 @@ Public Class ManagePartPanelVM
nShellNumberLayerId = EgtCreateGroup(nPartId)
EgtSetName(nShellNumberLayerId, LAY_SHELL_NBR)
EgtSetColor(nShellNumberLayerId, GeomEntityColors.c3ShellNumber)
+ Dim nShellNumberIndex As Integer = 1
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
EgtSetInfo(PartManager_GeomEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
+ EgtSetInfo(PartManager_GeomEntity.nId, SHELLNUMBER_ID, nShellNumberIndex)
EgtRelocateGlob(PartManager_GeomEntity.nId, nShellNumberLayerId, GDB_POS.LAST_SON)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(PartManager_GeomEntity.nId)
+ EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
End If
+ nShellNumberIndex += 1
Next
Case ManagePart_Layer.LayerType.AUX_SOLIDS
nAuxSolidsLayerId = EgtCreateGroup(nPartId)
EgtSetName(nAuxSolidsLayerId, LAY_AUX_SOLIDS)
EgtSetColor(nAuxSolidsLayerId, GeomEntityColors.c3AuxSolids)
+ Dim nFilledSolidIndex As Integer = 1
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
EgtSetInfo(PartManager_GeomEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
+ EgtSetInfo(PartManager_GeomEntity.nId, FILLEDSOLID_ID, nFilledSolidIndex)
EgtRelocateGlob(PartManager_GeomEntity.nId, nAuxSolidsLayerId, GDB_POS.LAST_SON)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(PartManager_GeomEntity.nId)
+ EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
End If
+ nFilledSolidIndex += 1
Next
Case ManagePart_Layer.LayerType.OTHERS
nOthersLayerId = EgtCreateGroup(nPartId)
@@ -403,8 +415,9 @@ Public Class ManagePartPanelVM
EgtSetColor(nOthersLayerId, GeomEntityColors.c3Others)
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
EgtRelocateGlob(PartManager_GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(PartManager_GeomEntity.nId)
+ EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
End If
@@ -417,16 +430,18 @@ Public Class ManagePartPanelVM
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
' la trasformo in curva compo
Dim nOtherId As Integer = EgtCreateCurveCompo(nOthersLayerId, PartManager_GeomEntity.nId, True)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(PartManager_GeomEntity.nId)
+ EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
EgtSetInfo(nOtherId, ENTITY_NAME, PartManager_GeomEntity.sName)
End If
Case Else
' altrimenti la sposto solamente
EgtRelocateGlob(PartManager_GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
- ' elimino colore entita'
+ ' elimino colore entita' e rendo visibile
EgtResetColor(PartManager_GeomEntity.nId)
+ EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
End If
@@ -436,6 +451,8 @@ Public Class ManagePartPanelVM
End Select
Next
' aggiungo layer riferimento
+ Dim nPartReferenceLayerId As Integer = EgtCreateGroup(nPartId)
+ EgtSetName(nPartReferenceLayerId, LAY_PARTREFERENCE)
Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nReferenceLayerId, LAY_REFERENCE)
EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, ReferenceBtn.References.BL)
@@ -447,10 +464,11 @@ Public Class ManagePartPanelVM
EgtSetInfo(nPartId, FILE_PATH, sFilePath)
EgtSetInfo(nPartId, PART_NAME, ManagePart_Part.sName)
EgtSetInfo(nPartId, "PartOnTable", 1)
- Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
+ Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nPartReferenceLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
Map.refTopPanelVM.PartList.Add(NewPart)
' aggiorno riferimento
Map.refReferencePanelVM.UpdateFramePosition(NewPart)
+ Map.refSliceManagerVM.UpdateDimensions()
Next
End If
'EgtAddMachGroup("3dPrint")
diff --git a/Icarus/ManagePartPanel/ManagePartUtility.vb b/Icarus/ManagePartPanel/ManagePartUtility.vb
index efeb459..a2677e3 100644
--- a/Icarus/ManagePartPanel/ManagePartUtility.vb
+++ b/Icarus/ManagePartPanel/ManagePartUtility.vb
@@ -512,11 +512,11 @@ Public Class ManagePart_Layer
m_nLayerId = PrintPart.nAuxSolidsLayerId
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
While nEntityId <> GDB_ID.NULL
- 'Dim ShellType As Integer = ShellNumberEntity.ShellNumberTypes.FROMDRAW
- 'EgtGetInfo(nEntityId, KEY_SHELLNBR_TYPE, ShellType)
- 'If ShellType = ShellNumberEntity.ShellNumberTypes.FROMIMPORT Then
- m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
- 'End If
+ Dim FIlledSolidType As Integer = FilledSolidEntity.FilledSolidTypes.FROMDRAW
+ EgtGetInfo(nEntityId, KEY_AUXSOLID_TYPE, FIlledSolidType)
+ If FIlledSolidType = FilledSolidEntity.FilledSolidTypes.FROMIMPORT Then
+ m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
+ End If
nEntityId = EgtGetNext(nEntityId)
End While
Case LayerType.OTHERS
@@ -646,7 +646,9 @@ Public Class GeomEntity_MenuItem
' aggiorno riferimenti nel context menu item
Map.refManagePartPanelVM.UpdateAllEntityContextMenu()
' Imposto flag di ricalcolo slice
- EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ If Map.refManagePartPanelVM.Type = ManagePartPanelVM.ManagePartType.MODIFY Then
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End If
End If
Return
ElseIf m_Type = ManagePart_Layer.LayerType.NEWPART Then
@@ -718,6 +720,8 @@ Public Class GeomEntity_MenuItem
EgtSetName(nOthersLayerId, LAY_OTHERS)
EgtSetColor(nOthersLayerId, GeomEntityColors.c3Others)
' aggiungo riferimento
+ Dim nPartReferenceLayerId As Integer = EgtCreateGroup(nPartId)
+ EgtSetName(nPartReferenceLayerId, LAY_PARTREFERENCE)
Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId)
EgtSetName(nReferenceLayerId, LAY_REFERENCE)
EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, ReferenceBtn.References.BL)
@@ -726,7 +730,7 @@ Public Class GeomEntity_MenuItem
' lo aggiungo a lista pezzi
EgtSetInfo(nPartId, FILE_PATH, sFilePath)
EgtSetInfo(nPartId, "PartOnTable", 1)
- Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
+ Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nPartReferenceLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
Map.refTopPanelVM.PartList.Add(NewPart)
' aggiorno riferimento
Map.refReferencePanelVM.UpdateFramePosition(NewPart)
@@ -773,9 +777,9 @@ Public Class GeomEntity_MenuItem
End If
End If
' aggiorno riferimenti nel context menu item
- m_OrigEntity.UpdateContextMenu()
+ Map.refManagePartPanelVM.UpdateAllEntityContextMenu()
Case ManagePartPanelVM.ManagePartType.MODIFY
- Dim bIsMovedRib As Boolean = False
+ Dim bIsMovedPartOrRib As Boolean = False
' recupero layer da pezzo
Dim nLayerId As Integer = GDB_ID.NULL
Select Case m_Type
@@ -806,11 +810,12 @@ Public Class GeomEntity_MenuItem
EgtMove(m_OrigEntity.nId, -vtMoved, GDB_RT.GLOB)
EgtRemoveInfo(nPartId, KEY_MOVEDPART)
End If
+ bIsMovedPartOrRib = True
Case ManagePart_Layer.LayerType.MACH_START
Case ManagePart_Layer.LayerType.RIBS
EgtRemoveInfo(m_OrigEntity.nId, KEY_RIB_TYPE)
EgtRemoveInfo(m_OrigEntity.nId, RIB_ID)
- bIsMovedRib = True
+ bIsMovedPartOrRib = True
Case ManagePart_Layer.LayerType.SHELL_NUMBER
EgtRemoveInfo(m_OrigEntity.nId, KEY_SHELLNBR_TYPE)
Case ManagePart_Layer.LayerType.AUX_SOLIDS
@@ -834,34 +839,32 @@ Public Class GeomEntity_MenuItem
Select Case m_Type
Case ManagePart_Layer.LayerType.PRINT_SOLID
EgtSetName(m_OrigEntity.nId, PRINT_SOLID)
- EgtSetColor(m_OrigEntity.nId, c3Print)
' rimuovo eventuale nota spostamento per 45 gradi
EgtRemoveInfo(m_OrigEntity.OrigLayer.OrigPart.nId, KEY_MOVEDPART)
+ bIsMovedPartOrRib = True
Case ManagePart_Layer.LayerType.MACH_START
EgtSetName(m_OrigEntity.nId, LAY_MACH_START)
- EgtSetColor(m_OrigEntity.nId, c3MachStart)
Case ManagePart_Layer.LayerType.RIBS
EgtSetName(m_OrigEntity.nId, LAY_RIBS)
EgtSetInfo(m_OrigEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
EgtSetInfo(m_OrigEntity.nId, RIB_ID, RibPanelVM.GetNextRibIndex())
- EgtSetColor(m_OrigEntity.nId, c3Rib)
- bIsMovedRib = True
+ bIsMovedPartOrRib = True
Case ManagePart_Layer.LayerType.SHELL_NUMBER
EgtSetName(m_OrigEntity.nId, LAY_SHELL_NBR)
EgtSetInfo(m_OrigEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
- EgtSetColor(m_OrigEntity.nId, c3ShellNumber)
Case ManagePart_Layer.LayerType.AUX_SOLIDS
EgtSetName(m_OrigEntity.nId, LAY_AUX_SOLIDS)
EgtSetInfo(m_OrigEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
- EgtSetColor(m_OrigEntity.nId, c3AuxSolids)
Case ManagePart_Layer.LayerType.OTHERS
EgtSetName(m_OrigEntity.nId, LAY_OTHERS)
- EgtSetColor(m_OrigEntity.nId, c3Others)
End Select
+ ' resetto colore entita'
+ EgtResetColor(m_OrigEntity.nId)
' se spostato un Rib, aggiorno posizione riferimento e pezzo
- If bIsMovedRib Then
+ If bIsMovedPartOrRib Then
Map.refReferencePanelVM.UpdateFramePosition(NewPart.PrintPart)
Map.refDispositionPanelVM.UpdateZPos()
+ Map.refSliceManagerVM.UpdateDimensions()
End If
EgtDraw()
' aggiorno riferimenti nel context menu item
diff --git a/Icarus/MaterialDb/Material.vb b/Icarus/MaterialDb/Material.vb
index e5a5eb0..3280fb3 100644
--- a/Icarus/MaterialDb/Material.vb
+++ b/Icarus/MaterialDb/Material.vb
@@ -21,7 +21,7 @@ Public Class Material
End Get
End Property
Friend Sub UpdateIsModified()
- m_bIsModified = m_CathegoryList.Any(Function(x) x.MaterialParamList.Any(Function(y) y.bIsModified))
+ m_bIsModified = m_CathegoryList.Any(Function(x) x.MaterialParamList.Any(Function(y) y.bIsModified)) OrElse bIsModifiedName
NotifyPropertyChanged(NameOf(ghName))
End Sub
@@ -31,23 +31,32 @@ Public Class Material
Return m_nIndex
End Get
End Property
+ Friend Sub SetIndex(nValue As Integer)
+ m_nIndex = nValue
+ End Sub
Private m_sGUID As String
- Public ReadOnly Property sGUID As String
+ Public Property sGUID As String
Get
Return m_sGUID
End Get
+ Set(value As String)
+ m_sGUID = value
+ End Set
End Property
+ Private m_sOrigName As String = ""
Private m_sName As String
Public Property sName As String
Get
Return m_sName
End Get
Set(value As String)
+ Dim bIsModified As Boolean = m_sName <> value
m_sName = value
Map.refMaterialDbVM.SetNameVisibility(False)
- NotifyPropertyChanged(NameOf(ghName))
+ If bIsModified Then UpdateIsModified()
+ Map.refMaterialDbVM.SetIsEnabled(True)
End Set
End Property
Public ReadOnly Property ghName As String
@@ -55,12 +64,18 @@ Public Class Material
Return m_sName & If(m_bIsModified, "*", "")
End Get
End Property
+ Public ReadOnly Property bIsModifiedName As Boolean
+ Get
+ Return m_sName <> m_sOrigName
+ End Get
+ End Property
' per lettura da file
Sub New(nIndex As Integer)
m_nIndex = nIndex
ReadMaterialParamString(nIndex, MAT_GUID, "", m_sGUID)
ReadMaterialParamString(nIndex, MAT_NAME, "", m_sName)
+ m_sOrigName = m_sName
'EgtGetStringUtf8FromIni(nIndex, MAT_NAME, "", m_sName, sMatIniFilePath)
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.GENERAL, nIndex))
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.TEMPERATURES, nIndex))
@@ -76,7 +91,8 @@ Public Class Material
Sub New()
m_nIndex = Map.refMaterialDbVM.MaterialList.Max(Function(x) x.nIndex) + 1
m_sGUID = Guid.NewGuid.ToString()
- m_sName = "New Material Param"
+ m_sName = "New Material"
+ m_sOrigName = m_sName
Dim nCopyIndex As Integer = Map.refMaterialDbVM.SelMaterial.m_nIndex
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.GENERAL, nCopyIndex))
Dim Orig As StringMaterialParam = m_CathegoryList(0).MaterialParamList.FirstOrDefault(Function(x) x.Type = MaterialParam.Params.ORIG)
@@ -133,6 +149,16 @@ Public Class Material
'm_dRibsLeadOutWipeDir = ReadMaterialParamDouble(m_nIndex, MAC_RIBSLEADOUTWIPEDIR, 0, CurrentMachine.sMachiningFilePath)
End Sub
+ Private Sub SaveName()
+ m_sOrigName = m_sName
+ End Sub
+
+ Private Sub ResetName()
+ m_sName = m_sOrigName
+ NotifyPropertyChanged(NameOf(ghName))
+ NotifyPropertyChanged(NameOf(sName))
+ End Sub
+
Friend Sub Save()
If bIsModified Then
' salvo tutti i parametri su orig
@@ -145,15 +171,17 @@ Public Class Material
End Sub
Private Sub SaveParams()
+ SaveName()
For Each Cathegory In m_CathegoryList
Cathegory.SaveParams()
Next
End Sub
Friend Sub ResetModification()
+ ResetName()
If bIsModified Then
' annullo le modifiche di tutti i parametri
- SaveParams()
+ ResetParams()
' resetto stato di modificata
UpdateIsModified()
End If
@@ -165,12 +193,12 @@ Public Class Material
Next
End Sub
- Friend Sub WriteParamsOnDb(nIndex As Integer)
- WriteMaterialParam(nIndex, MAT_GUID, m_sGUID)
- WriteMaterialParam(nIndex, MAT_NAME, m_sName)
+ Friend Sub WriteParamsOnDb(nIndex As Integer, Optional sFilePath As String = "")
+ WriteMaterialParam(nIndex, MAT_GUID, m_sGUID, sFilePath)
+ WriteMaterialParam(nIndex, MAT_NAME, m_sName, sFilePath)
' EgtWriteStringUtf8toIni(nIndex, MAT_NAME, m_sName)
For Each Cathegory In m_CathegoryList
- Cathegory.WriteParamOnDb(nIndex)
+ Cathegory.WriteParamOnDb(nIndex, sFilePath)
Next
End Sub
@@ -358,9 +386,9 @@ Public Class MaterialCathegory
Next
End Sub
- Friend Sub WriteParamOnDb(nIndex As Integer)
+ Friend Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
For Each Param In m_MaterialParamList
- Param.WriteParamOnDb(nIndex)
+ Param.WriteParamOnDb(nIndex, sFilePath)
Next
End Sub
@@ -456,7 +484,7 @@ Public MustInherit Class MaterialParam
End Sub
- Friend MustOverride Sub WriteParamOnDb(nIndex As Integer)
+ Friend MustOverride Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
Friend MustOverride Sub SaveParam()
Friend MustOverride Sub ResetParam()
@@ -559,7 +587,7 @@ Public Class NumericMaterialParam
m_dOrigValue = m_dValue
End Sub
- Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
+ Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
Dim sWriteValue As String = ""
If m_bIsLen Then
sWriteValue = LenToString(m_dValue, 5)
@@ -568,43 +596,43 @@ Public Class NumericMaterialParam
End If
Select Case Type
Case Params.T1
- WriteMaterialParam(nIndex, MAT_T1, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_T1, sWriteValue, sFilePath)
Case Params.T2
- WriteMaterialParam(nIndex, MAT_T2, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_T2, sWriteValue, sFilePath)
Case Params.T3
- WriteMaterialParam(nIndex, MAT_T3, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_T3, sWriteValue, sFilePath)
Case Params.T4
- WriteMaterialParam(nIndex, MAT_T4, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_T4, sWriteValue, sFilePath)
Case Params.T5
- WriteMaterialParam(nIndex, MAT_T5, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_T5, sWriteValue, sFilePath)
Case Params.K_EXTRUSION
- WriteMaterialParam(nIndex, MAT_KEXTRUSION, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_KEXTRUSION, sWriteValue, sFilePath)
Case Params.K_LAY_TIME
- WriteMaterialParam(nIndex, MAT_KLAYERTIME, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_KLAYERTIME, sWriteValue, sFilePath)
Case Params.C1
- WriteMaterialParam(nIndex, MAT_C1, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_C1, sWriteValue, sFilePath)
Case Params.C2
- WriteMaterialParam(nIndex, MAT_C2, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_C2, sWriteValue, sFilePath)
Case Params.DENSITY
- WriteMaterialParam(nIndex, MAT_DENSITY, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_DENSITY, sWriteValue, sFilePath)
Case Params.AMAX
- WriteMaterialParam(nIndex, MAT_AMAX, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_AMAX, sWriteValue, sFilePath)
Case Params.ATRG
- WriteMaterialParam(nIndex, MAT_ATRG, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_ATRG, sWriteValue, sFilePath)
Case Params.AMIN
- WriteMaterialParam(nIndex, MAT_AMIN, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_AMIN, sWriteValue, sFilePath)
Case Params.BMAX
- WriteMaterialParam(nIndex, MAT_BMAX, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_BMAX, sWriteValue, sFilePath)
Case Params.BTRG
- WriteMaterialParam(nIndex, MAT_BTRG, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_BTRG, sWriteValue, sFilePath)
Case Params.BMIN
- WriteMaterialParam(nIndex, MAT_BMIN, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_BMIN, sWriteValue, sFilePath)
Case Params.KW
- WriteMaterialParam(nIndex, MAT_KW, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_KW, sWriteValue, sFilePath)
Case Params.KZ
- WriteMaterialParam(nIndex, MAT_KZ, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath)
Case Params.KN
- WriteMaterialParam(nIndex, MAT_KN, sWriteValue)
+ WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath)
End Select
End Sub
@@ -621,8 +649,6 @@ End Class
Public Class StringMaterialParam
Inherits MaterialParam
- Public Const DEFAULT_MATERIAL As String = "***"
-
Private m_sGUID As String
Public Property sGUID As String
Get
@@ -687,9 +713,9 @@ Public Class StringMaterialParam
Case Params.ORIG
Dim sOrigGUID As String = ""
ReadMaterialParamString(nIndex, MAT_ORIG, "", sOrigGUID)
- If sOrigGUID = DEFAULT_MATERIAL Then
- m_sGUID = DEFAULT_MATERIAL
- m_sValue = DEFAULT_MATERIAL
+ If sOrigGUID = ORIG_MATERIAL Then
+ m_sGUID = ORIG_MATERIAL
+ m_sValue = ORIG_MATERIAL
' se livello alto, lo visualizzo comunque
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
m_String_Visibility = Visibility.Visible
@@ -714,10 +740,10 @@ Public Class StringMaterialParam
m_sOrigValue = m_sValue
End Sub
- Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
+ Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
Select Case Type
Case Params.ORIG
- WriteMaterialParam(nIndex, MAT_ORIG, m_sGUID)
+ WriteMaterialParam(nIndex, MAT_ORIG, m_sGUID, sFilePath)
End Select
End Sub
@@ -744,8 +770,8 @@ Public Class StringMaterialParam
Public Sub Original()
If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
- m_sGUID = DEFAULT_MATERIAL
- m_sValue = DEFAULT_MATERIAL
+ m_sGUID = ORIG_MATERIAL
+ m_sValue = ORIG_MATERIAL
NotifyPropertyChanged(NameOf(sValue))
End If
End Sub
@@ -801,10 +827,10 @@ Public Class ComboMaterialParam
m_OrigSelValue = m_SelValue
End Sub
- Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
+ Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
Select Case Type
'Case Params.STRANDORDER
- ' WriteMaterialParam(nIndex, MAC_STRANDORDER, m_SelValue.Id)
+ ' WriteMaterialParam(nIndex, MAC_STRANDORDER, m_SelValue.Id, sFilePath)
End Select
End Sub
@@ -852,7 +878,7 @@ Public Class CheckMaterialParam
m_bOrigValue = m_bValue
End Sub
- Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
+ Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
Select Case Type
End Select
End Sub
diff --git a/Icarus/MaterialDb/MaterialDbV.xaml b/Icarus/MaterialDb/MaterialDbV.xaml
index 38706de..40cf3cb 100644
--- a/Icarus/MaterialDb/MaterialDbV.xaml
+++ b/Icarus/MaterialDb/MaterialDbV.xaml
@@ -1,54 +1,118 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
+ Margin="2.5,0,2.5,0"
+ Style="{StaticResource RightPanel_Button}"/>
+
+
+
+
-
-
-
+
+
+
-
-
+ HorizontalScrollBarVisibility="Disabled"
+ Margin="1,0,0,2.5"
+ Padding="0"
+ BorderThickness="0"
+ Style="{StaticResource RightPanel_ScrollViewer}">
+
-
+
@@ -57,11 +121,14 @@
IsExpanded="{Binding Cathegory_IsExpanded}"
VerticalContentAlignment="Top"
Visibility="{Binding Cathegory_Visibility}">
-
+
-
+
@@ -71,34 +138,32 @@
-
+
-
+
-
+ Text="{Binding dValue}"
+ Margin="2.5,0,0,0"
+ Style="{StaticResource ParameterList_TextBox}"/>
-
+
-
+
-
+
@@ -113,49 +178,37 @@
-
+
-
-
+
-
+ HorizontalAlignment="Stretch"
+ Margin="2.5,0,0,0"
+ Style="{StaticResource RightPanel_ComboBox}"/>
-
+
-
-
+
-
+ VerticalAlignment="Center"
+ Margin="2.5,0,0,0"/>
@@ -165,11 +218,14 @@
-
-
-
+
-
+
diff --git a/Icarus/MaterialDb/MaterialDbVM.vb b/Icarus/MaterialDb/MaterialDbVM.vb
index 2a9cc01..330de52 100644
--- a/Icarus/MaterialDb/MaterialDbVM.vb
+++ b/Icarus/MaterialDb/MaterialDbVM.vb
@@ -60,10 +60,13 @@ Public Class MaterialDbVM
Return m_Name_Visibility
End Get
End Property
- Friend Sub SetNameVisibility(bValue As Boolean)
- m_Name_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
- NotifyPropertyChanged(NameOf(Name_Visibility))
- End Sub
+
+ Private m_Combo_Visibility As Visibility = Visibility.Visible
+ Public ReadOnly Property Combo_Visibility As Visibility
+ Get
+ Return m_Combo_Visibility
+ End Get
+ End Property
' variabile che indica se una qualunque lavorazione e' stata modificata
Private m_bIsModified As Boolean
@@ -76,10 +79,22 @@ Public Class MaterialDbVM
m_bIsModified = value
End Sub
+ Private m_IsEnabled As Boolean = True
+ Public ReadOnly Property IsEnabled As Boolean
+ Get
+ Return m_IsEnabled
+ End Get
+ End Property
+ Friend Sub SetIsEnabled(value As Boolean)
+ m_IsEnabled = value
+ NotifyPropertyChanged(NameOf(IsEnabled))
+ NotifyPropertyChanged(NameOf(Delete_IsEnabled))
+ End Sub
+
Private m_Delete_IsEnabled As Boolean = True
Public ReadOnly Property Delete_IsEnabled As Boolean
Get
- Return m_Delete_IsEnabled
+ Return m_IsEnabled AndAlso m_Delete_IsEnabled
End Get
End Property
Friend Sub SetDeleteIsEnabled(value As Boolean)
@@ -91,11 +106,58 @@ Public Class MaterialDbVM
NotifyPropertyChanged(NameOf(Delete_IsEnabled))
End Sub
+ Private m_UserShouldEditValueNow As Boolean = False
+ Public Property UserShouldEditValueNow As Boolean
+ Get
+ Return m_UserShouldEditValueNow
+ End Get
+ Set(value As Boolean)
+ m_UserShouldEditValueNow = value
+ End Set
+ End Property
+ Friend Sub SetUserShouldEditValueNow()
+ m_UserShouldEditValueNow = True
+ NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
+ m_UserShouldEditValueNow = False
+ NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
+ End Sub
+
+ Public ReadOnly Property ImpExp_IsEnabled As Boolean
+ Get
+ Return m_IsEnabled AndAlso (IsNothing(m_SelMaterial) OrElse Not m_SelMaterial.bIsModified)
+ End Get
+ End Property
+
+#Region "Tooltip"
+
+ Public ReadOnly Property Import_ToolTip As String
+ Get
+ Return "Import"
+ End Get
+ End Property
+
+ Public ReadOnly Property Export_ToolTip As String
+ Get
+ Return "Export"
+ End Get
+ End Property
+
+ Public ReadOnly Property EditName_ToolTip As String
+ Get
+ Return "Edit Name"
+ End Get
+ End Property
+
+#End Region ' Tooltip
+
' Definizione comandi
Private m_cmdOk As ICommand
Private m_cmdCopy As ICommand
Private m_cmdSave As ICommand
Private m_cmdDelete As ICommand
+ Private m_cmdEditName As ICommand
+ Private m_cmdImport As ICommand
+ Private m_cmdExport As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -133,6 +195,14 @@ Public Class MaterialDbVM
End If
End Sub
+ Friend Sub SetNameVisibility(bValue As Boolean)
+ m_Name_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
+ m_Combo_Visibility = If(Not bValue, Visibility.Visible, Visibility.Collapsed)
+ NotifyPropertyChanged(NameOf(Name_Visibility))
+ NotifyPropertyChanged(NameOf(Combo_Visibility))
+ If bValue Then SetUserShouldEditValueNow()
+ End Sub
+
Private Function SelMaterialIsOriginal() As Boolean
If IsNothing(m_SelMaterial) Then Return False
' verifico abilitazione delete
@@ -140,7 +210,7 @@ Public Class MaterialDbVM
If Not IsNothing(General) Then
Dim Original As MaterialParam = General.MaterialParamList.FirstOrDefault(Function(x) x.Type = MaterialParam.Params.ORIG)
If Not IsNothing(Original) Then
- If DirectCast(Original, StringMaterialParam).sValue = StringMaterialParam.DEFAULT_MATERIAL Then
+ If DirectCast(Original, StringMaterialParam).sValue = ORIG_MATERIAL Then
Return True
End If
End If
@@ -176,7 +246,7 @@ Public Class MaterialDbVM
End Select
End If
If m_bIsModified Then
- Dim sBakMatIniFilePath As String = Path.ChangeExtension(CurrentMachine.sMaterialsFilePath, ".bak")
+ Dim sBakMatIniFilePath As String = Path.ChangeExtension(CurrentMachine.sMaterialFilePath, ".bak")
If File.Exists(sBakMatIniFilePath) Then
Try
' cambio estensione in bak a file Db vecchio
@@ -184,24 +254,24 @@ Public Class MaterialDbVM
Catch ex As Exception
End Try
End If
- If File.Exists(CurrentMachine.sMaterialsFilePath) Then
+ If File.Exists(CurrentMachine.sMaterialFilePath) Then
Try
' cambio estensione in bak a file Db vecchio
- File.Move(CurrentMachine.sMaterialsFilePath, sBakMatIniFilePath)
+ File.Move(CurrentMachine.sMaterialFilePath, sBakMatIniFilePath)
Catch ex As Exception
End Try
End If
' se ancora esiste lo elimino
- If File.Exists(CurrentMachine.sMaterialsFilePath) Then
+ If File.Exists(CurrentMachine.sMaterialFilePath) Then
Try
- File.Delete(CurrentMachine.sMaterialsFilePath)
+ File.Delete(CurrentMachine.sMaterialFilePath)
Catch ex As Exception
End Try
End If
' creo nuovo file
- If Not File.Exists(CurrentMachine.sMaterialsFilePath) Then
+ If Not File.Exists(CurrentMachine.sMaterialFilePath) Then
Try
- File.WriteAllLines(CurrentMachine.sMaterialsFilePath, {"; Commento per evitare BOM con UTF-8"})
+ File.WriteAllLines(CurrentMachine.sMaterialFilePath, {"; Commento per evitare BOM con UTF-8"})
Catch ex As Exception
End Try
End If
@@ -291,12 +361,28 @@ Public Class MaterialDbVM
End Property
Public Sub Delete()
+ Dim sCheckMessage As String = "Are you sure you want to delete selected material?"
' se materiale originale, esco
- If SelMaterialIsOriginal() Then Return
+ If SelMaterialIsOriginal() Then
+ If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
+ If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
+ Return
+ End If
+ sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?"
+ Else
+ MessageBox.Show("Original material impossible to delete!")
+ Return
+ End If
+ End If
' chiedo conferma
- Select Case MessageBox.Show("Are you sure you want to delete selected material?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
+ Select Case MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
Case MessageBoxResult.Yes
m_MaterialList.Remove(m_SelMaterial)
+ SetIsModified(True)
+ If m_MaterialList.Count > 0 Then
+ SelMaterial = m_MaterialList(0)
+ NotifyPropertyChanged(NameOf(SelMaterial))
+ End If
' segno Db come modificato
Map.refMaterialDbVM.SetIsModified(True)
Case MessageBoxResult.No
@@ -306,6 +392,78 @@ Public Class MaterialDbVM
#End Region ' Delete
+#Region "EditName"
+
+ Public ReadOnly Property EditName_Command As ICommand
+ Get
+ If m_cmdEditName Is Nothing Then
+ m_cmdEditName = New Command(AddressOf EditName)
+ End If
+ Return m_cmdEditName
+ End Get
+ End Property
+
+ Public Sub EditName()
+ If IsNothing(m_SelMaterial) Then Return
+ SetNameVisibility(True)
+ SetIsEnabled(False)
+ End Sub
+
+#End Region ' EditName
+
+#Region "Import"
+
+ Public ReadOnly Property Import_Command As ICommand
+ Get
+ If m_cmdImport Is Nothing Then
+ m_cmdImport = New Command(AddressOf Import)
+ End If
+ Return m_cmdImport
+ End Get
+ End Property
+
+ Public Sub Import()
+ ' chiedo il nome del file .data da aprire
+ Dim OpenFileDlg As New System.Windows.Forms.OpenFileDialog() With {.Title = EgtMsg(31451) & " " & EgtMsg(31452),
+ .Filter = "Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.MaterialDataExtension &
+ "|Original Material file data (*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension &
+ "|All Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & "," & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" &
+ ImportExportMachiningPanelVM.MaterialDataExtension & ";*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension,
+ .FilterIndex = 3,
+ .FileName = String.Empty}
+ If OpenFileDlg.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return
+ Dim ImportWindowVM As New ImportExportMachiningPanelVM(ImportExportMachiningPanelVM.WindowTypeEnum.MATERIAL, ImportExportMachiningPanelVM.WindowModeEnum.IMPORT, OpenFileDlg.FileName)
+ If ImportWindowVM.WindowMode <> ImportExportMachiningPanelVM.WindowModeEnum.IMPORT_ORIG Then
+ Dim ImportWindowV As New ImportExportMachiningPanelV(Application.Current.MainWindow, ImportWindowVM)
+ ImportWindowV.ShowDialog()
+ End If
+ End Sub
+
+#End Region ' Import
+
+#Region "Export"
+
+ Public ReadOnly Property Export_Command As ICommand
+ Get
+ If m_cmdExport Is Nothing Then
+ m_cmdExport = New Command(AddressOf Export)
+ End If
+ Return m_cmdExport
+ End Get
+ End Property
+
+ Public Sub Export()
+ Dim ExportMode As ImportExportMachiningPanelVM.WindowModeEnum = ImportExportMachiningPanelVM.WindowModeEnum.EXPORT
+ If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
+ ExportMode = ImportExportMachiningPanelVM.WindowModeEnum.EXPORT_ORIG
+ End If
+ Dim ExportWindowVM As New ImportExportMachiningPanelVM(ImportExportMachiningPanelVM.WindowTypeEnum.MATERIAL, ExportMode)
+ Dim ExportWindowV As New ImportExportMachiningPanelV(Application.Current.MainWindow, ExportWindowVM)
+ ExportWindowV.ShowDialog()
+ End Sub
+
+#End Region ' Export
+
#End Region ' COMMANDS
End Class
diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb
index d97e750..c108264 100644
--- a/Icarus/My Project/AssemblyInfo.vb
+++ b/Icarus/My Project/AssemblyInfo.vb
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
'
-
-
+
+
diff --git a/Icarus/OptionsWindow/MachineBox.xaml b/Icarus/OptionsWindow/MachineBox.xaml
deleted file mode 100644
index 398f316..0000000
--- a/Icarus/OptionsWindow/MachineBox.xaml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Icarus/OptionsWindow/MachineBox.xaml.vb b/Icarus/OptionsWindow/MachineBox.xaml.vb
deleted file mode 100644
index f86c449..0000000
--- a/Icarus/OptionsWindow/MachineBox.xaml.vb
+++ /dev/null
@@ -1,45 +0,0 @@
-Imports EgtUILib
-
-Public Class MachineBox
-
- Public Shadows DialogResult As MessageBoxResult = MessageBoxResult.Cancel
-
- Public Sub New( Owner As Window, sMachName As String)
-
- InitializeComponent()
-
- Me.Owner = Owner
-
- Title = EgtMsg( 6534) ' Avviso
-
- MessageLbl.Text = String.Format( EgtMsg( 6528), sMachName) ' La macchina "{0}" esiste già, cosa vuoi fare ?
-
- ReplaceBtn.Content = EgtMsg( 6531) ' Sostituisci
-
- UpdateBtn.Content = EgtMsg( 6532) ' Aggiorna
-
- CancelBtn.Content = EgtMsg( 6533) ' Annulla
-
- End Sub
-
- Private Sub ReplaceBtn_Click( sender As Object, e As RoutedEventArgs) Handles ReplaceBtn.Click
- DialogResult = MessageBoxResult.Yes
- Close()
- End Sub
-
- Private Sub UpdateBtn_Click( sender As Object, e As RoutedEventArgs) Handles UpdateBtn.Click
- DialogResult = MessageBoxResult.No
- Close()
- End Sub
-
- Private Sub CancelBtn_Click( sender As Object, e As RoutedEventArgs) Handles CancelBtn.Click
- DialogResult = MessageBoxResult.Cancel
- Close()
- End Sub
-
- Public Overloads Function ShowDialog() As MessageBoxResult
- MyBase.ShowDialog()
- Return DialogResult
- End Function
-
-End Class
diff --git a/Icarus/OptionsWindow/OptionWindowV-NewGraphics.xaml b/Icarus/OptionsWindow/OptionWindowV-NewGraphics.xaml
new file mode 100644
index 0000000..d72726b
--- /dev/null
+++ b/Icarus/OptionsWindow/OptionWindowV-NewGraphics.xaml
@@ -0,0 +1,223 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Icarus/OptionsWindow/OptionWindowV.xaml b/Icarus/OptionsWindow/OptionWindowV.xaml
index c2db194..3462b49 100644
--- a/Icarus/OptionsWindow/OptionWindowV.xaml
+++ b/Icarus/OptionsWindow/OptionWindowV.xaml
@@ -1,328 +1,342 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Icarus/OptionsWindow/OptionWindowVM.vb b/Icarus/OptionsWindow/OptionWindowVM.vb
index 655e310..2861885 100644
--- a/Icarus/OptionsWindow/OptionWindowVM.vb
+++ b/Icarus/OptionsWindow/OptionWindowVM.vb
@@ -980,16 +980,17 @@ Public Class OptionWindowVM
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
Dim bUpdate As Boolean = True
If bOldExists Then
- Dim MachBox As New MachineBox( Application.Current.MainWindow, sMachName)
- Select MachBox.ShowDialog()
- Case MessageBoxResult.Yes
- bUpdate = False
- Case MessageBoxResult.No
- bUpdate = True
- Case MessageBoxResult.Cancel
- ' Rimuovo il direttorio temporaneo ed esco
- My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
- Return
+ Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName))
+ MachBox.ShowDialog()
+ Select Case MachBox.DialogResult
+ Case MessageBoxResult.Yes
+ bUpdate = False
+ Case MessageBoxResult.No
+ bUpdate = True
+ Case MessageBoxResult.Cancel
+ ' Rimuovo il direttorio temporaneo ed esco
+ My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ Return
End Select
' Faccio una copia di backup della macchina corrente
Dim sBackupDir As String = sMachDir & ".old"
@@ -1133,7 +1134,7 @@ Public Class OptionWindowVM
' aggiungo i file della Macchina
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
If Directory.Exists(sMachineDir) Then
- zip.AddItem(sMachineDir, sCurrMachineName)
+ zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
End If
' salvo lo zip
zip.Save()
diff --git a/Icarus/ProjManager/ProjManagerV.xaml b/Icarus/ProjManager/ProjManagerV.xaml
index 6d7b8e2..8433dd3 100644
--- a/Icarus/ProjManager/ProjManagerV.xaml
+++ b/Icarus/ProjManager/ProjManagerV.xaml
@@ -9,19 +9,23 @@
+
+
+
+
+
+
+
+
+
-
+
diff --git a/Icarus/TSFEditor/TFSEditorVM.vb b/Icarus/TSFEditor/TFSEditorVM.vb
index 8b433d2..7cfced1 100644
--- a/Icarus/TSFEditor/TFSEditorVM.vb
+++ b/Icarus/TSFEditor/TFSEditorVM.vb
@@ -16,8 +16,8 @@ Public Class TFSEditorVM
HEIGHT = 1
SECTIONCHANGE = 2
SELECTION = 3
- SELECTION_WAIT = 4
- FEED_INCREMENT = 5
+ FEED_INCREMENT = 4
+ SELECTION_WAIT = 5
End Enum
Public Enum Filters As Integer
@@ -60,10 +60,15 @@ Public Class TFSEditorVM
End Set
End Property
- Private m_MediaTypeList As New List(Of String)({"Slice Number", "Section change", "Selection", "Selection Wait", "Feed Increment"})
+ Private m_MediaTypeList As New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Wait by Selection", "Feed by Increment"})
Public ReadOnly Property MediaTypeList As List(Of String)
Get
- Return m_MediaTypeList
+ If bWaitingTime Then
+ Return New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Feed by Increment", "Wait by Selection"})
+ Else
+ Return New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Feed by Increment"})
+ End If
+ ' Return m_MediaTypeList
End Get
End Property
@@ -76,179 +81,54 @@ Public Class TFSEditorVM
m_nSelMediaType = value + 1
Select Case m_nSelMediaType
Case MediaTypes.HEIGHT
- SetMediaHeightVisibility(True)
- SetFCurrVisibility(False)
- SetDifference_Visibility(False)
- SetWaitVisibility(False)
- SetFeedIncrementVisibility(False)
SetSetVisibility(False)
SetMediaVisibility(True)
Case MediaTypes.SECTIONCHANGE
- SetMediaHeightVisibility(False)
- SetFCurrVisibility(False)
- SetDifference_Visibility(True)
- SetWaitVisibility(False)
- SetFeedIncrementVisibility(False)
SetSetVisibility(False)
SetMediaVisibility(True)
Case MediaTypes.SELECTION
- SetMediaHeightVisibility(False)
- SetFCurrVisibility(True)
- SetDifference_Visibility(False)
- SetWaitVisibility(False)
- SetFeedIncrementVisibility(False)
SetSetVisibility(True)
SetMediaVisibility(True)
Case MediaTypes.SELECTION_WAIT
- SetMediaHeightVisibility(False)
- SetFCurrVisibility(False)
- SetDifference_Visibility(False)
- SetWaitVisibility(True)
- SetFeedIncrementVisibility(False)
SetSetVisibility(True)
SetMediaVisibility(False)
Case MediaTypes.FEED_INCREMENT
- SetMediaHeightVisibility(False)
- SetFCurrVisibility(False)
- SetDifference_Visibility(False)
- SetWaitVisibility(False)
- SetFeedIncrementVisibility(True)
SetSetVisibility(True)
SetMediaVisibility(False)
End Select
+ NotifyPropertyChanged(NameOf(Modify_Msg))
End Set
End Property
- Private m_nMediaHeight As Integer
- Public Property sMediaHeight As String
+ Private m_dModifyValue As Double
+ Public Property sModifyValue As String
Get
- Return m_nMediaHeight
+ Select Case m_nSelMediaType
+ Case MediaTypes.HEIGHT
+ Return DoubleToString(m_dModifyValue, 0)
+ Case Else
+ Return DoubleToString(m_dModifyValue, 1)
+ End Select
End Get
Set(value As String)
- Dim nNewValue As Integer = 0
- If Integer.TryParse(value, nNewValue) Then
- m_nMediaHeight = nNewValue
- Else
- NotifyPropertyChanged(NameOf(sMediaHeight))
- End If
+ Dim dNewValue As Double = 0
+ Select Case m_nSelMediaType
+ Case MediaTypes.HEIGHT
+ If Integer.TryParse(value, dNewValue) Then
+ m_dModifyValue = dNewValue
+ Else
+ NotifyPropertyChanged(NameOf(sModifyValue))
+ End If
+ Case Else
+ If StringToDouble(value, dNewValue) Then
+ m_dModifyValue = dNewValue
+ Else
+ NotifyPropertyChanged(NameOf(sModifyValue))
+ End If
+ End Select
End Set
End Property
- Private m_MediaHeight_Visibility As Visibility
- Public ReadOnly Property MediaHeight_Visibility As Visibility
- Get
- Return m_MediaHeight_Visibility
- End Get
- End Property
- Private Sub SetMediaHeightVisibility(bValue As Boolean)
- m_MediaHeight_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
- NotifyPropertyChanged(NameOf(MediaHeight_Visibility))
- End Sub
-
- Private m_nDifference As Integer
- Public Property sDifference As String
- Get
- Return m_nDifference
- End Get
- Set(value As String)
- Dim nNewValue As Integer = 0
- If Integer.TryParse(value, nNewValue) Then
- m_nDifference = nNewValue
- Else
- NotifyPropertyChanged(NameOf(sDifference))
- End If
- End Set
- End Property
-
- Private m_Difference_Visibility As Visibility = Visibility.Collapsed
- Public ReadOnly Property Difference_Visibility As Visibility
- Get
- Return m_Difference_Visibility
- End Get
- End Property
- Private Sub SetDifference_Visibility(bValue As Boolean)
- m_Difference_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
- NotifyPropertyChanged(NameOf(Difference_Visibility))
- End Sub
-
- Private m_dFCurr As Double
- Public Property sFCurr As String
- Get
- Return LenToString(m_dFCurr, 2)
- End Get
- Set(value As String)
- Dim nNewValue As Integer = 0
- If StringToLen(value, nNewValue) Then
- m_dFCurr = nNewValue
- Else
- NotifyPropertyChanged(NameOf(sFCurr))
- End If
- End Set
- End Property
-
- Private m_FCurr_Visibility As Visibility = Visibility.Collapsed
- Public ReadOnly Property FCurr_Visibility As Visibility
- Get
- Return m_FCurr_Visibility
- End Get
- End Property
- Private Sub SetFCurrVisibility(bValue As Boolean)
- m_FCurr_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
- NotifyPropertyChanged(NameOf(FCurr_Visibility))
- End Sub
-
- Private m_dWait As Double
- Public Property sWait As String
- Get
- Return LenToString(m_dWait, 2)
- End Get
- Set(value As String)
- Dim nNewValue As Integer = 0
- If StringToLen(value, nNewValue) Then
- m_dWait = nNewValue
- Else
- NotifyPropertyChanged(NameOf(sWait))
- End If
- End Set
- End Property
-
- Private m_Wait_Visibility As Visibility = Visibility.Collapsed
- Public ReadOnly Property Wait_Visibility As Visibility
- Get
- Return m_Wait_Visibility
- End Get
- End Property
- Private Sub SetWaitVisibility(bValue As Boolean)
- m_Wait_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
- NotifyPropertyChanged(NameOf(Wait_Visibility))
- End Sub
-
- Private m_dFeedIncrement As Double
- Public Property sFeedIncrement As String
- Get
- Return DoubleToString(m_dFeedIncrement, 0)
- End Get
- Set(value As String)
- Dim nNewValue As Integer = 0
- If StringToLen(value, nNewValue) Then
- m_dFeedIncrement = nNewValue
- Else
- NotifyPropertyChanged(NameOf(sFeedIncrement))
- End If
- End Set
- End Property
-
- Private m_FeedIncrement_Visibility As Visibility = Visibility.Collapsed
- Public ReadOnly Property FeedIncrement_Visibility As Visibility
- Get
- Return m_FeedIncrement_Visibility
- End Get
- End Property
- Private Sub SetFeedIncrementVisibility(bValue As Boolean)
- m_FeedIncrement_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
- NotifyPropertyChanged(NameOf(FeedIncrement_Visibility))
- End Sub
-
Private m_Media_Visibility As Visibility = Visibility.Visible
Public ReadOnly Property Media_Visibility As Visibility
Get
@@ -290,6 +170,11 @@ Public Class TFSEditorVM
End Property
Private m_bColExtend As Boolean = False
+ Public ReadOnly Property bColExtend As Boolean
+ Get
+ Return m_bColExtend
+ End Get
+ End Property
Public ReadOnly Property ColExtend_Visibility As Visibility
Get
Return If(m_bColExtend, Visibility.Visible, Visibility.Collapsed)
@@ -297,7 +182,7 @@ Public Class TFSEditorVM
End Property
Public ReadOnly Property ControlWidth As Double
Get
- Return If(m_bColExtend, 600, 300)
+ Return If(m_bColExtend, 620, 310)
End Get
End Property
@@ -329,6 +214,7 @@ Public Class TFSEditorVM
For Each Layer In m_LayerList
Layer.NotifyPropertyChanged(NameOf(Layer.Background))
Next
+ NotifyPropertyChanged(NameOf(MediaTypeList))
NotifyPropertyChanged(NameOf(ColWait_Visibility))
End Set
End Property
@@ -338,6 +224,25 @@ Public Class TFSEditorVM
End Get
End Property
+ Public ReadOnly Property Modify_Msg As String
+ Get
+ Select Case m_nSelMediaType
+ Case MediaTypes.HEIGHT
+ Return "Slice Number:"
+ Case MediaTypes.SECTIONCHANGE
+ Return "Difference:"
+ Case MediaTypes.SELECTION
+ Return "Feed:"
+ Case MediaTypes.SELECTION_WAIT
+ Return "Wait:"
+ Case MediaTypes.FEED_INCREMENT
+ Return "Increment(%):"
+ Case Else
+ Return ""
+ End Select
+ End Get
+ End Property
+
' Definizione comandi
Private m_cmdSet As ICommand
Private m_cmdMedia As ICommand
@@ -360,6 +265,7 @@ Public Class TFSEditorVM
' inizializzo contatore per aggiornare grafica su selezione
m_Selection_Timer.Interval = TimeSpan.FromMilliseconds(10)
AddHandler m_Selection_Timer.Tick, AddressOf SelectionTimer_Tick
+ NotifyPropertyChanged(NameOf(MediaTypeList))
End Sub
#End Region ' CONSTRUCTORS
@@ -460,31 +366,17 @@ Public Class TFSEditorVM
Select Case m_nSelMediaType
Case MediaTypes.SELECTION
For Each Layer In m_SelLayers
- Layer.SetFCurr(m_dFCurr)
+ Layer.SetFCurr(m_dModifyValue)
Next
Case MediaTypes.SELECTION_WAIT
For Each Layer In m_SelLayers
- Layer.SetTWait(m_dWait)
+ Layer.SetTWait(m_dModifyValue)
Next
Case MediaTypes.FEED_INCREMENT
For Each Layer In m_SelLayers
- Layer.SetFCurr(Layer.dFCurr * (m_dFeedIncrement / 100))
+ Layer.SetFCurr(Layer.dFCurr * (m_dModifyValue / 100))
Next
End Select
- '' salvo selezione corrente
- 'Dim SelIndexList As New List(Of Integer)
- 'For Each SelLayer In m_SelLayers
- ' SelIndexList.Add(SelLayer.nIndex)
- 'Next
- '' ricalcolo valori
- 'Map.refSliceManagerVM.CalcSlice(False, True)
- '' ripristino layer selezionati
- 'For Each Index In SelIndexList
- ' Dim NewLayer As TFSLayer = m_LayerList.FirstOrDefault(Function(x) x.nIndex = Index)
- ' If Not IsNothing(NewLayer) Then
- ' m_SelLayers.Add(NewLayer)
- ' End If
- 'Next
End Sub
#End Region ' Set
@@ -510,16 +402,18 @@ Public Class TFSEditorVM
If m_LayerList.Count <= 0 Then Return
Select Case m_nSelMediaType
Case MediaTypes.HEIGHT
- If m_nMediaHeight <= 0 Then Return
- For Index = 0 To Math.Ceiling(m_LayerList.Count() / m_nMediaHeight) - 1
+ ' verifico che sia un intero
+ Dim nMediaHeight As Integer = Math.Floor(m_dModifyValue)
+ If nMediaHeight <= 0 Then Return
+ For Index = 0 To Math.Ceiling(m_LayerList.Count() / nMediaHeight) - 1
Dim dFSum As Double = 0
Dim dFIndex As Double = 0
- For Index2 = (m_nMediaHeight * Index) To Math.Min(m_nMediaHeight * (Index + 1), m_LayerList.Count() - 1)
+ For Index2 = (nMediaHeight * Index) To Math.Min(nMediaHeight * (Index + 1), m_LayerList.Count() - 1)
dFSum += m_LayerList(Index2).sFCurr
dFIndex += 1
Next
Dim dNewFCurr As Double = dFSum / dFIndex
- For Index2 = (m_nMediaHeight * Index) To Math.Min(m_nMediaHeight * (Index + 1), m_LayerList.Count() - 1)
+ For Index2 = (nMediaHeight * Index) To Math.Min(nMediaHeight * (Index + 1), m_LayerList.Count() - 1)
m_LayerList(Index2).SetFCurr(dNewFCurr)
Next
Next
@@ -529,7 +423,7 @@ Public Class TFSEditorVM
' recupero punti di rottura
For Index = 1 To m_LayerList.Count() - 1
Dim dCurrLength = m_LayerList(Index)
- If dPrevLength < m_LayerList(Index).dLength * (1 - (m_nDifference / 100)) OrElse dPrevLength > m_LayerList(Index).dLength * (1 + (m_nDifference / 100)) Then
+ If dPrevLength < m_LayerList(Index).dLength * (1 - (m_dModifyValue / 100)) OrElse dPrevLength > m_LayerList(Index).dLength * (1 + (m_dModifyValue / 100)) Then
ChangeIndexList.Add(Index)
End If
dPrevLength = m_LayerList(Index).dLength
@@ -629,6 +523,7 @@ Public Class TFSEditorVM
'''
Public Sub Extend()
m_bColExtend = Not m_bColExtend
+ NotifyPropertyChanged(NameOf(bColExtend))
NotifyPropertyChanged(NameOf(ColExtend_Visibility))
NotifyPropertyChanged(NameOf(ControlWidth))
End Sub
@@ -725,6 +620,7 @@ Public Class TFSLayer
' Imposto flag di ricalcolo generate
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_TFS, True)
NotifyPropertyChanged(NameOf(Background))
+ NotifyPropertyChanged(NameOf(Foreground))
Else
NotifyPropertyChanged(NameOf(sTWait))
End If
@@ -737,6 +633,7 @@ Public Class TFSLayer
' Imposto flag di ricalcolo generate
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_TFS, True)
NotifyPropertyChanged(NameOf(Background))
+ NotifyPropertyChanged(NameOf(Foreground))
NotifyPropertyChanged(NameOf(sTWait))
End Sub
@@ -782,6 +679,7 @@ Public Class TFSLayer
' Imposto flag di ricalcolo generate
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_TFS, True)
NotifyPropertyChanged(NameOf(Background))
+ NotifyPropertyChanged(NameOf(Foreground))
Else
NotifyPropertyChanged(NameOf(sFCurr))
End If
@@ -794,6 +692,7 @@ Public Class TFSLayer
' Imposto flag di ricalcolo generate
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_TFS, True)
NotifyPropertyChanged(NameOf(Background))
+ NotifyPropertyChanged(NameOf(Foreground))
NotifyPropertyChanged(NameOf(sFCurr))
End Sub
Public ReadOnly Property dFCurr As Double
@@ -833,11 +732,11 @@ Public Class TFSLayer
If m_bFCurr_IsModified OrElse m_bTWait_IsModified Then
Return Brushes.White
ElseIf (Not Map.refTFSEditorVM.bWaitingTime AndAlso m_dTCurr + 1 < m_dTMin) OrElse (Map.refTFSEditorVM.bWaitingTime AndAlso m_dTCurr + m_dTWait + 1 < m_dTMin) Then
- Return Brushes.Red
+ Return Dictionary.Icarus_Orange
ElseIf m_dTCurr - 1 > m_dTMax Then
- Return Brushes.MediumOrchid
+ Return Dictionary.Icarus_Purple
Else
- Return Brushes.LightGreen
+ Return Dictionary.Icarus_Green
End If
End Get
End Property
@@ -847,9 +746,15 @@ Public Class TFSLayer
If m_bFCurr_IsModified OrElse m_bTWait_IsModified Then
Return Brushes.Black
ElseIf m_dSpeed <= Map.refTFSEditorVM.dSpeedMin OrElse m_dSpeed >= Map.refTFSEditorVM.dSpeedMax Then
- Return Brushes.DeepSkyBlue
+ If (Not Map.refTFSEditorVM.bWaitingTime AndAlso m_dTCurr + 1 < m_dTMin) OrElse
+ (Map.refTFSEditorVM.bWaitingTime AndAlso m_dTCurr + m_dTWait + 1 < m_dTMin) OrElse
+ m_dTCurr - 1 > m_dTMax Then
+ Return New BrushConverter().ConvertFrom("#63181b")
+ Else
+ Return New BrushConverter().ConvertFrom("#961824")
+ End If
Else
- Return Brushes.Black
+ Return Brushes.White
End If
End Get
End Property
@@ -894,6 +799,7 @@ Public Class TFSLayer
End If
End If
NotifyPropertyChanged(NameOf(Background))
+ NotifyPropertyChanged(NameOf(Foreground))
End Sub
Sub New(nId As Integer, nIndex As Integer, dLength As Double, dTMin As Double, dTTrg As Double, dTMax As Double, dTCurr As Double, dTWait As Double, dFMin As Double, dFTrg As Double, dFMax As Double, dFCurr As Double, dSpeed As Double)
diff --git a/Icarus/TopPanel/TopPanelV.xaml b/Icarus/TopPanel/TopPanelV.xaml
index 8bf3f33..881c61d 100644
--- a/Icarus/TopPanel/TopPanelV.xaml
+++ b/Icarus/TopPanel/TopPanelV.xaml
@@ -1,197 +1,229 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/Icarus/TopPanel/TopPanelVM.vb b/Icarus/TopPanel/TopPanelVM.vb
index 352caab..20b7d48 100644
--- a/Icarus/TopPanel/TopPanelVM.vb
+++ b/Icarus/TopPanel/TopPanelVM.vb
@@ -182,6 +182,7 @@ Public Class TopPanelVM
SetSelMachining(DbMachining)
' notifico posizione pezzo
Map.refDispositionPanelVM.RefreshPos()
+ Map.refSliceManagerVM.UpdateDimensions()
End If
End Set
End Property
@@ -413,6 +414,7 @@ Public Class TopPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
+ Map.refSliderManagerVM.SetSliderVisibility(False)
' imposto pagina
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.IMPORT)
''Map.refImportPanelVM.Init()
@@ -427,6 +429,7 @@ Public Class TopPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True)
+ Map.refSliderManagerVM.SetSliderVisibility(True)
Return True
End Function
@@ -479,6 +482,7 @@ Public Class TopPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
+ Map.refSliderManagerVM.SetSliderVisibility(False)
' imposto pagina
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.MATERIALDB)
End Sub
@@ -492,6 +496,7 @@ Public Class TopPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True)
+ Map.refSliderManagerVM.SetSliderVisibility(True)
Return True
End Function
@@ -504,6 +509,7 @@ Public Class TopPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
+ Map.refSliderManagerVM.SetSliderVisibility(False)
' imposto pagina
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.PRINTPARAMDB)
End Sub
@@ -517,6 +523,7 @@ Public Class TopPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True)
+ Map.refSliderManagerVM.SetSliderVisibility(True)
Return True
End Function
@@ -553,6 +560,7 @@ Public Class TopPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
+ Map.refSliderManagerVM.SetSliderVisibility(False)
'' tolgo mark da pezzo selezionato
'If Not IsNothing(SelPart) Then
' EgtResetMark(SelPart.nPrintSolidId)
@@ -569,6 +577,7 @@ Public Class TopPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True)
+ Map.refSliderManagerVM.SetSliderVisibility(True)
'' ripristino mark su pezzo selezionato
'If Not IsNothing(SelPart) Then
' EgtSetMark(SelPart.nPrintSolidId)
@@ -610,11 +619,11 @@ Public Class TopPanelVM
' { 'X', EgtNumToString( EgtToUiUnits( dPosX), 1)},
' { 'Y', EgtNumToString( EgtToUiUnits( dPosY), 1)})
- Dim ChooseReferenceWndVM As New ChooseReferenceWndVM
- Dim ChooseReferenceWndV As New ChooseReferenceWndV(Application.Current.MainWindow, ChooseReferenceWndVM)
- If Not ChooseReferenceWndV.ShowDialog() Then Return
+ 'Dim ChooseReferenceWndVM As New ChooseReferenceWndVM
+ 'Dim ChooseReferenceWndV As New ChooseReferenceWndV(Application.Current.MainWindow, ChooseReferenceWndVM)
+ 'If Not ChooseReferenceWndV.ShowDialog() Then Return
- Dim gg = ChooseReferenceWndVM.SelReference
+ 'Dim gg = ChooseReferenceWndVM.SelReference
'' Aggiungo il box del solido
'Dim nBoxId As Integer = EgtSurftmb(nAuxId, b3Solid, False, GDB_RT.GLOB)
diff --git a/Icarus/UpdateMachine/UpdateMachineV.xaml b/Icarus/UpdateMachine/UpdateMachineV.xaml
new file mode 100644
index 0000000..d5fa321
--- /dev/null
+++ b/Icarus/UpdateMachine/UpdateMachineV.xaml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Icarus/UpdateMachine/UpdateMachineV.xaml.vb b/Icarus/UpdateMachine/UpdateMachineV.xaml.vb
new file mode 100644
index 0000000..a9802e9
--- /dev/null
+++ b/Icarus/UpdateMachine/UpdateMachineV.xaml.vb
@@ -0,0 +1,24 @@
+Imports EgtUILib
+
+Public Class UpdateMachineV
+
+ Private WithEvents m_UpdateMachineVM As UpdateMachineVM
+
+ Public Shadows DialogResult As MessageBoxResult = MessageBoxResult.Cancel
+
+
+ Public Sub New(Owner As Window, UpdateMachineVM As UpdateMachineVM)
+ MyBase.New(Owner)
+ ' This call is required by the designer.
+ InitializeComponent()
+ Me.DataContext = UpdateMachineVM
+ ' Assegno al riferimento locale al VM il VM preso dal DataContext
+ m_UpdateMachineVM = UpdateMachineVM
+ End Sub
+
+ Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_UpdateMachineVM.m_CloseWindow
+ Me.DialogResult = DialogResult
+ Me.Close()
+ End Sub
+
+End Class
diff --git a/Icarus/UpdateMachine/UpdateMachineVM.vb b/Icarus/UpdateMachine/UpdateMachineVM.vb
new file mode 100644
index 0000000..8a58562
--- /dev/null
+++ b/Icarus/UpdateMachine/UpdateMachineVM.vb
@@ -0,0 +1,108 @@
+Imports EgtUILib
+Imports EgtWPFLib5
+Imports System.Collections.ObjectModel
+Imports System.Windows.Forms
+
+Public Class UpdateMachineVM
+
+#Region "FIELDS & PROPERTIES"
+
+ Friend Event m_CloseWindow(bDialogResult As MessageBoxResult)
+
+ Private m_MachineName As String = ""
+
+#Region "MESSAGES"
+
+ Public ReadOnly Property UpdateMachine_Msg As String
+ Get
+ Return String.Format(EgtMsg(6528), m_MachineName) ' La macchina "{0}" esiste già, cosa vuoi fare ?
+
+ End Get
+ End Property
+
+ Public ReadOnly Property Replace_Msg As String
+ Get
+ Return EgtMsg(6531) ' Sostituisci
+ End Get
+ End Property
+
+ Public ReadOnly Property Update_Msg As String
+ Get
+ Return EgtMsg(6532) ' Aggiorna
+ End Get
+ End Property
+
+
+#End Region ' MESSAGES
+
+ ' Definizione comandi
+ Private m_cmdReplace As ICommand
+ Private m_cmdUpdate As ICommand
+ Private m_cmdCancel As ICommand
+
+#End Region ' FIELDS & PROPERTIES
+
+#Region "CONSTRUCTOR"
+
+ Sub New(MachineName As String)
+ m_MachineName = MachineName
+ End Sub
+
+#End Region ' CONSTRUCTOR
+
+#Region "COMMANDS"
+
+#Region "Replace"
+
+ Public ReadOnly Property Replace_Command As ICommand
+ Get
+ If m_cmdReplace Is Nothing Then
+ m_cmdReplace = New Command(AddressOf Replace)
+ End If
+ Return m_cmdReplace
+ End Get
+ End Property
+
+ Public Sub Replace()
+ RaiseEvent m_CloseWindow(MessageBoxResult.Yes)
+ End Sub
+
+#End Region ' Replace
+
+#Region "Update"
+
+ Public ReadOnly Property Update_Command As ICommand
+ Get
+ If m_cmdUpdate Is Nothing Then
+ m_cmdUpdate = New Command(AddressOf Update)
+ End If
+ Return m_cmdUpdate
+ End Get
+ End Property
+
+ Public Sub Update()
+ RaiseEvent m_CloseWindow(MessageBoxResult.No)
+ End Sub
+
+#End Region ' Update
+
+#Region "Cancel"
+
+ Public ReadOnly Property Cancel_Command As ICommand
+ Get
+ If m_cmdCancel Is Nothing Then
+ m_cmdCancel = New Command(AddressOf Cancel)
+ End If
+ Return m_cmdCancel
+ End Get
+ End Property
+
+ Public Sub Cancel()
+ RaiseEvent m_CloseWindow(MessageBoxResult.Cancel)
+ End Sub
+
+#End Region ' Replace
+
+#End Region ' COMMANDS
+
+End Class
diff --git a/Icarus/Utility/CurrentMachine.vb b/Icarus/Utility/CurrentMachine.vb
index 7cd4985..cc8150b 100644
--- a/Icarus/Utility/CurrentMachine.vb
+++ b/Icarus/Utility/CurrentMachine.vb
@@ -46,12 +46,15 @@ Public Module CurrentMachine
m_sMachiningFilePath = sValue
End Sub
' Cartella dei materiali
- Private m_sMaterialsFilePath As String = String.Empty
- Friend ReadOnly Property sMaterialsFilePath As String
+ Private m_sMaterialFilePath As String = String.Empty
+ Friend ReadOnly Property sMaterialFilePath As String
Get
- Return m_sMaterialsFilePath
+ Return m_sMaterialFilePath
End Get
End Property
+ Friend Sub SetMaterialFilePath(sValue As String)
+ m_sMaterialFilePath = sValue
+ End Sub
' box della tavola macchina
Private m_b3Tab As New BBox3d
@@ -75,7 +78,7 @@ Public Module CurrentMachine
' impostazione cartella lavorazioni
m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini"
' impostazione cartella materiali
- m_sMaterialsFilePath = sMachinesRootDir & "\" & sMachineName & "\Materials\Materials.ini"
+ m_sMaterialFilePath = sMachinesRootDir & "\" & sMachineName & "\Materials\Materials.ini"
' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr
' recupero box macchina
@@ -180,7 +183,7 @@ Public Module CurrentMachine
End Function
Friend Function ReadMaterialParamString(lpAppName As String, lpKeyName As String, lpDefault As String, ByRef lpString As String, Optional sFilePath As String = "") As Integer
- Dim nResult As Integer = GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, lpString, If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMaterialsFilePath))
+ Dim nResult As Integer = GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, lpString, If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMaterialFilePath))
If Not String.IsNullOrWhiteSpace(lpString) Then
lpString = EgwCrypto.PowerDecryptString(lpString, m_Salt)
Else
@@ -198,7 +201,7 @@ Public Module CurrentMachine
End Function
Friend Function WriteMaterialParam(lpAppName As String, lpKeyName As String, lpString As String, Optional sFilePath As String = "") As Boolean
- Return WritePrivateProfileString(lpAppName, lpKeyName, EgwCrypto.PowerEncryptString(lpString, m_Salt), If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMaterialsFilePath))
+ Return WritePrivateProfileString(lpAppName, lpKeyName, EgwCrypto.PowerEncryptString(lpString, m_Salt), If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMaterialFilePath))
End Function
#End Region 'Methods
diff --git a/Icarus/Utility/Dictionary.xaml b/Icarus/Utility/Dictionary.xaml
index 681b201..90801b0 100644
--- a/Icarus/Utility/Dictionary.xaml
+++ b/Icarus/Utility/Dictionary.xaml
@@ -1,9 +1,12 @@
-
+
-
+
@@ -41,9 +44,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- None
+
+
+
+ 30
+ 2
+ 2
@@ -115,32 +141,93 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NaN
+ NaN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -371,7 +560,7 @@
- -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -429,16 +756,75 @@
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -448,11 +834,39 @@
+
+
+
+
@@ -468,6 +882,9 @@
+
-
+
+
@@ -492,49 +914,75 @@
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -592,82 +1614,114 @@
-
+
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -734,6 +2216,475 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -830,19 +2781,6 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 28
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -1009,41 +3068,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -1061,21 +3086,62 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
@@ -1091,17 +3163,19 @@
+
-
+
-
+
+
@@ -1111,9 +3185,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -1132,43 +3272,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -1186,37 +3294,76 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -1224,17 +3371,19 @@
+
-
+
-
+
+
@@ -1259,4 +3408,1173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Icarus/Utility/Dictionary.xaml.vb b/Icarus/Utility/Dictionary.xaml.vb
index fef4e3b..88d020e 100644
--- a/Icarus/Utility/Dictionary.xaml.vb
+++ b/Icarus/Utility/Dictionary.xaml.vb
@@ -1,4 +1,6 @@
-Public Class OmagOFFICEDictionary
+Imports System.Globalization
+
+Public Class Dictionary
Public Shared ReadOnly MySceneHostVM As String = "MySceneHostVM"
@@ -25,6 +27,76 @@
End Get
End Property
+
+ Private Shared m_Icarus_Gray As SolidColorBrush = Application.Current.FindResource("Icarus_Gray")
+ Public Shared ReadOnly Property Icarus_Gray As SolidColorBrush
+ Get
+ Return m_Icarus_Gray
+ End Get
+ End Property
+
+ Private Shared m_Icarus_LightBlue As SolidColorBrush = Application.Current.FindResource("Icarus_LightBlue")
+ Public Shared ReadOnly Property Icarus_LightBlue As SolidColorBrush
+ Get
+ Return m_Icarus_LightBlue
+ End Get
+ End Property
+
+ Private Shared m_Icarus_Blue As SolidColorBrush = Application.Current.FindResource("Icarus_Blue")
+ Public Shared ReadOnly Property Icarus_Blue As SolidColorBrush
+ Get
+ Return m_Icarus_Blue
+ End Get
+ End Property
+
+ Private Shared m_Icarus_Green As SolidColorBrush = Application.Current.FindResource("Icarus_Green")
+ Public Shared ReadOnly Property Icarus_Green As SolidColorBrush
+ Get
+ Return m_Icarus_Green
+ End Get
+ End Property
+
+ Private Shared m_Icarus_Orange As SolidColorBrush = Application.Current.FindResource("Icarus_Orange")
+ Public Shared ReadOnly Property Icarus_Orange As SolidColorBrush
+ Get
+ Return m_Icarus_Orange
+ End Get
+ End Property
+
+ Private Shared m_Icarus_Purple As SolidColorBrush = Application.Current.FindResource("Icarus_Purple")
+ Public Shared ReadOnly Property Icarus_Purple As SolidColorBrush
+ Get
+ Return m_Icarus_Purple
+ End Get
+ End Property
+
+ '
+ '
+ '
+ '
+ '
+ '
+
#End Region ' Colors
End Class
+
+Public Class CenterToolTipConverter
+ Implements IMultiValueConverter
+
+ Public Function Convert(ByVal values As Object(), ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
+ For Each value In values
+ If TypeOf (value) IsNot Double Then
+ Return Double.NaN
+ End If
+ Next
+ Dim dPlacementTarget As Double = CDbl(values(0))
+ Dim dToolTip As Double = CDbl(values(1))
+ Return (dPlacementTarget / 2.0) - (dToolTip / 2.0)
+ End Function
+
+ Public Function ConvertBack(ByVal value As Object, ByVal targetTypes As Type(), ByVal parameter As Object, ByVal culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
+ Throw New NotSupportedException()
+ End Function
+
+End Class
diff --git a/Icarus/Utility/Map.vb b/Icarus/Utility/Map.vb
index 7698fe0..837d91b 100644
--- a/Icarus/Utility/Map.vb
+++ b/Icarus/Utility/Map.vb
@@ -5,49 +5,18 @@ Module Map
Private m_refMainWindowVM As MainWindowVM
Private m_refMyStatusBarVM As MyStatusBarVM
Private m_refProjManagerVM As ProjManagerVM
- 'Private m_refProdManagerVM As ProdManagerVM
Private m_refProjectVM As ProjectVM
Private m_refSecondaryWindowVM As SecondaryWindowVM
Private m_refSecondaryWindowV As SecondaryWindowV
- 'Private m_refMainMenuVM As MainMenuVM
Private m_refMachinePanelVM As MachinePanelVM
- ''Private m_refMyMachGroupPanelVM As MyMachGroupPanelVM
Private m_refLeftPanelVM As LeftPanelVM
Private m_refRightPanelVM As RightPanelVM
Private m_refDispositionPanelVM As DispositionPanelVM
Private m_refStartMachPanelVM As StartMachPanelVM
Private m_refRibPanelVM As RibPanelVM
Private m_refControllerInputPanelVM As ControllerInputPanelVM
- 'Private m_refBottomPanelVM As BottomPanelVM
- 'Private m_refShowBeamPanelVM As ShowBeamPanelVM
- 'Private m_refConfigurationPageVM As ConfigurationPageVM
- 'Private m_refRawPartListVM As RawPartListVM
- 'Private m_refPartInRawPartListVM As PartInRawPartListVM
- 'Private m_refWarehouseWndVM As WarehouseWndVM
- 'Private m_refFeatureListVM As FeatureListVM
- 'Private m_refFreeContourManagerVM As FreeContourManagerVM
- 'Private m_refFreeContourInputVM As FreeContourInputVM
- 'Private m_refPartManagerVM As PartManagerVM
Private m_refInstrumentPanelVM As InstrumentPanelVM
Private m_refTopPanelVM As TopPanelVM
- 'Private m_refOptimizePanelVM As OptimizePanelVM
- 'Private m_refCALCPanelVM As CALCPanelVM
- 'Private m_refPartListVM As BTLPartListVM
- 'Private m_refFeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM
- 'Private m_refStatisticsVM As StatisticsVM
- 'Private m_refPParameterListVM As PParameterListVM
- 'Private m_refQParameterListVM As QParameterListVM
- 'Private m_refFeatureManagerVM As FeatureManagerVM
- 'Private m_refAddSectionXMaterialWndVM As AddSectionXMaterialWndVM
- 'Private m_refStatisticsTimePanelVM As StatisticsTimePanelVM
- 'Private m_refOpenProjectFileDialogVM As OpenProjectFileDialogVM
- 'Private m_refRawPartTabVM As RawPartTabVM
- 'Private m_refNestingTabVM As NestingTabVM
- 'Private m_refMachiningTabVM As MachiningTabVM
- 'Private m_refSplitModeVM As SplitModeVM
- 'Private m_refMoveRawModeVM As MoveRawModeVM
- 'Private m_refSimulTabVM As SimulTabVM
- ''Private m_refImportPanelVM As ImportPanelVM
Private m_refSliceManagerVM As SliceManagerVM
Private m_refTFSEditorVM As TFSEditorVM
Private m_refCurrMachiningPanelVM As CurrMachiningPanelVM
@@ -60,8 +29,9 @@ Module Map
Private m_refViewLayerManagerVM As ViewLayerManagerVM
Private m_refShellNumberPanelVM As ShellNumberPanelVM
Private m_refShellNumberParamPanelVM As ShellNumberParamPanelVM
+ Private m_refFilledSolidPanelVM As FilledSolidPanelVM
+ Private m_refFilledSolidParamPanelVM As FilledSolidParamPanelVM
Private m_refSplashScreen As SplashScreen
- ''Private m_refModifyPartPanelVM As ModifyPartPanelVM
Private m_refManagePartPanelVM As ManagePartPanelVM
#Region "Get"
@@ -113,12 +83,6 @@ Module Map
End Get
End Property
- 'Public ReadOnly Property refMainMenuVM As MainMenuVM
- ' Get
- ' Return m_refMainMenuVM
- ' End Get
- 'End Property
-
Public ReadOnly Property refMachinePanelVM As MachinePanelVM
Get
Return m_refMachinePanelVM
@@ -161,72 +125,6 @@ Module Map
End Get
End Property
- 'Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
- ' Get
- ' Return CoreMap.refMachGroupPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refBottomPanelVM As BottomPanelVM
- ' Get
- ' Return m_refBottomPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refShowBeamPanelVM As ShowBeamPanelVM
- ' Get
- ' Return m_refShowBeamPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refConfigurationPageVM As ConfigurationPageVM
- ' Get
- ' Return m_refConfigurationPageVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refRawPartListVM As RawPartListVM
- ' Get
- ' Return m_refRawPartListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refPartInRawPartListVM As PartInRawPartListVM
- ' Get
- ' Return m_refPartInRawPartListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refWarehouseWndVM As WarehouseWndVM
- ' Get
- ' Return m_refWarehouseWndVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFeatureListVM As FeatureListVM
- ' Get
- ' Return m_refFeatureListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFreeContourManagerVM As FreeContourManagerVM
- ' Get
- ' Return m_refFreeContourManagerVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFreeContourInputVM As FreeContourInputVM
- ' Get
- ' Return m_refFreeContourInputVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refPartManagerVM As PartManagerVM
- ' Get
- ' Return m_refPartManagerVM
- ' End Get
- 'End Property
-
Public ReadOnly Property refInstrumentPanelVM As MyInstrumentPanelVM
Get
Return m_refInstrumentPanelVM
@@ -239,120 +137,6 @@ Module Map
End Get
End Property
- 'Public ReadOnly Property refOptimizePanelVM As OptimizePanelVM
- ' Get
- ' Return m_refOptimizePanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refCALCPanelVM As CALCPanelVM
- ' Get
- ' Return m_refCALCPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refPartListVM As BTLPartListVM
- ' Get
- ' Return m_refPartListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM
- ' Get
- ' Return m_refFeatureInPartInRawPartListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refStatisticsVM As StatisticsVM
- ' Get
- ' Return m_refStatisticsVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refPParameterListVM As PParameterListVM
- ' Get
- ' Return m_refPParameterListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refQParameterListVM As QParameterListVM
- ' Get
- ' Return m_refQParameterListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFeatureManagerVM As FeatureManagerVM
- ' Get
- ' Return m_refFeatureManagerVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refAddSectionXMaterialWndVM As AddSectionXMaterialWndVM
- ' Get
- ' Return m_refAddSectionXMaterialWndVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refStatisticsTimePanelVM As StatisticsTimePanelVM
- ' Get
- ' Return m_refStatisticsTimePanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refOpenProjectFileDialogVM As OpenProjectFileDialogVM
- ' Get
- ' Return m_refOpenProjectFileDialogVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refOptionPanelVM As OptionPanelVM
- ' Get
- ' Return m_refOptionPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refRawPartTabVM As RawPartTabVM
- ' Get
- ' Return m_refRawPartTabVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refNestingTabVM As NestingTabVM
- ' Get
- ' Return m_refNestingTabVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refMachiningTabVM As MachiningTabVM
- ' Get
- ' Return m_refMachiningTabVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refSplitModeVM As SplitModeVM
- ' Get
- ' Return m_refSplitModeVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refMoveRawModeVM As MoveRawModeVM
- ' Get
- ' Return m_refMoveRawModeVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refSimulTabVM As SimulTabVM
- ' Get
- ' Return m_refSimulTabVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refImportPanelVM As ImportPanelVM
- ' Get
- ' Return m_refImportPanelVM
- ' End Get
- 'End Property
-
Public ReadOnly Property refSliceManagerVM As SliceManagerVM
Get
Return m_refSliceManagerVM
@@ -425,18 +209,24 @@ Module Map
End Get
End Property
+ Public ReadOnly Property refFilledSolidPanelVM As FilledSolidPanelVM
+ Get
+ Return m_refFilledSolidPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refFilledSolidParamPanelVM As FilledSolidParamPanelVM
+ Get
+ Return m_refFilledSolidParamPanelVM
+ End Get
+ End Property
+
Public ReadOnly Property refSplashScreen As SplashScreen
Get
Return m_refSplashScreen
End Get
End Property
- ''Public ReadOnly Property refModifyPartPanelVM As ModifyPartPanelVM
- '' Get
- '' Return m_refModifyPartPanelVM
- '' End Get
- ''End Property
-
Public ReadOnly Property refManagePartPanelVM As ManagePartPanelVM
Get
Return m_refManagePartPanelVM
@@ -457,21 +247,11 @@ Module Map
Return Not IsNothing(m_refProjManagerVM)
End Function
- 'Friend Function SetRefProdManagerVM(ProdManagerVM As ProdManagerVM) As Boolean
- ' m_refProdManagerVM = ProdManagerVM
- ' Return Not IsNothing(m_refProdManagerVM)
- 'End Function
-
Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
m_refProjectVM = ProjectVM
Return Not IsNothing(m_refProjectVM)
End Function
- 'Friend Function SetRefMainMenuVM(MainMenuVM As MainMenuVM) As Boolean
- ' m_refMainMenuVM = MainMenuVM
- ' Return Not IsNothing(m_refMainMenuVM)
- 'End Function
-
Friend Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
LibMap.SetRefSceneHostVM(SceneHostVM)
Return Not IsNothing(LibMap.refSceneHostVM)
@@ -486,11 +266,6 @@ Module Map
Return Not IsNothing(m_refSecondaryWindowV)
End Function
- 'Friend Function SetRefShowPanelVM(ShowPanelVM As ShowPanelVM) As Boolean
- ' LibMap.SetRefShowPanelVM(ShowPanelVM)
- ' Return Not IsNothing(LibMap.refShowPanelVM)
- 'End Function
-
Friend Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
m_refMachinePanelVM = MachinePanelVM
Return Not IsNothing(m_refMachinePanelVM)
@@ -526,61 +301,6 @@ Module Map
Return Not IsNothing(m_refControllerInputPanelVM)
End Function
- 'Friend Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
- ' CoreMap.SetRefMachGroupPanelVM(MachGroupPanelVM)
- ' Return Not IsNothing(CoreMap.refMachGroupPanelVM)
- 'End Function
-
- 'Friend Function SetRefBottomPanelVM(BottomPanelVM As BottomPanelVM) As Boolean
- ' m_refBottomPanelVM = BottomPanelVM
- ' Return Not IsNothing(m_refBottomPanelVM)
- 'End Function
-
- 'Friend Function SetRefShowBeamPanelVM(ShowBeamPanelVM As ShowBeamPanelVM) As Boolean
- ' m_refShowBeamPanelVM = ShowBeamPanelVM
- ' Return Not IsNothing(m_refShowBeamPanelVM)
- 'End Function
-
- 'Friend Function SetRefConfigurationPageVM(ConfigurationPageVM As ConfigurationPageVM) As Boolean
- ' m_refConfigurationPageVM = ConfigurationPageVM
- ' Return Not IsNothing(m_refConfigurationPageVM)
- 'End Function
-
- 'Friend Function SetRefRawPartListVM(RawPartListVM As RawPartListVM) As Boolean
- ' m_refRawPartListVM = RawPartListVM
- ' Return Not IsNothing(m_refRawPartListVM)
- 'End Function
-
- 'Friend Function SetRefPartInRawPartListVM(PartInRawPartListVM As PartInRawPartListVM) As Boolean
- ' m_refPartInRawPartListVM = PartInRawPartListVM
- ' Return Not IsNothing(m_refPartInRawPartListVM)
- 'End Function
-
- 'Friend Function SetRefWarehouseWndVM(WarehouseWndVM As WarehouseWndVM) As Boolean
- ' m_refWarehouseWndVM = WarehouseWndVM
- ' Return Not IsNothing(m_refWarehouseWndVM)
- 'End Function
-
- 'Friend Function SetRefFeatureListVM(FeatureListVM As FeatureListVM) As Boolean
- ' m_refFeatureListVM = FeatureListVM
- ' Return Not IsNothing(m_refFeatureListVM)
- 'End Function
-
- 'Friend Function SetRefFreeContourManagerVM(FreeContourManagerVM As FreeContourManagerVM) As Boolean
- ' m_refFreeContourManagerVM = FreeContourManagerVM
- ' Return Not IsNothing(m_refFreeContourManagerVM)
- 'End Function
-
- 'Friend Function SetRefFreeContourInputVM(FreeContourInputVM As FreeContourInputVM) As Boolean
- ' m_refFreeContourInputVM = FreeContourInputVM
- ' Return Not IsNothing(m_refFreeContourInputVM)
- 'End Function
-
- 'Friend Function SetRefPartManagerVM(PartManagerVM As PartManagerVM) As Boolean
- ' m_refPartManagerVM = PartManagerVM
- ' Return Not IsNothing(m_refPartManagerVM)
- 'End Function
-
Friend Function SetRefInstrumentPanelVM(InstrumentPanelVM As InstrumentPanelVM) As Boolean
m_refInstrumentPanelVM = InstrumentPanelVM
Return Not IsNothing(m_refInstrumentPanelVM)
@@ -591,101 +311,6 @@ Module Map
Return Not IsNothing(m_refTopPanelVM)
End Function
- 'Friend Function SetRefOptimizePanelVM(OptimizePanelVM As OptimizePanelVM) As Boolean
- ' m_refOptimizePanelVM = OptimizePanelVM
- ' Return Not IsNothing(m_refOptimizePanelVM)
- 'End Function
-
- 'Friend Function SetRefCALCPanelVM(CALCPanelVM As CALCPanelVM) As Boolean
- ' m_refCALCPanelVM = CALCPanelVM
- ' Return Not IsNothing(m_refCALCPanelVM)
- 'End Function
-
- 'Friend Function SetRefPartListVM(PartListVM As BTLPartListVM) As Boolean
- ' m_refPartListVM = PartListVM
- ' Return Not IsNothing(m_refPartListVM)
- 'End Function
-
- 'Friend Function SetRefFeatureInPartInRawPartListVM(FeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM) As Boolean
- ' m_refFeatureInPartInRawPartListVM = FeatureInPartInRawPartListVM
- ' Return Not IsNothing(m_refFeatureInPartInRawPartListVM)
- 'End Function
-
- 'Friend Function SetRefStatisticsVM(StatisticsVM As StatisticsVM) As Boolean
- ' m_refStatisticsVM = StatisticsVM
- ' Return Not IsNothing(m_refStatisticsVM)
- 'End Function
-
- 'Friend Function SetRefPParameterListVM(PParameterListVM As PParameterListVM) As Boolean
- ' m_refPParameterListVM = PParameterListVM
- ' Return Not IsNothing(m_refPParameterListVM)
- 'End Function
-
- 'Friend Function SetRefQParameterListVM(QParameterListVM As QParameterListVM) As Boolean
- ' m_refQParameterListVM = QParameterListVM
- ' Return Not IsNothing(m_refQParameterListVM)
- 'End Function
-
- 'Friend Function SetRefFeatureManagerVM(FeatureManagerVM As FeatureManagerVM) As Boolean
- ' m_refFeatureManagerVM = FeatureManagerVM
- ' Return Not IsNothing(m_refFeatureManagerVM)
- 'End Function
-
- 'Friend Function SetRefAddSectionXMaterialWndVM(AddSectionXMaterialWndVM As AddSectionXMaterialWndVM) As Boolean
- ' m_refAddSectionXMaterialWndVM = AddSectionXMaterialWndVM
- ' Return Not IsNothing(m_refAddSectionXMaterialWndVM)
- 'End Function
-
- 'Friend Function SetRefStatisticsTimePanelVM(StatisticsTimePanelVM As StatisticsTimePanelVM) As Boolean
- ' m_refStatisticsTimePanelVM = StatisticsTimePanelVM
- ' Return Not IsNothing(m_refStatisticsTimePanelVM)
- 'End Function
-
- 'Friend Function SetRefOpenProjectFileDialogVM(OpenProjectFileDialogVM As OpenProjectFileDialogVM) As Boolean
- ' m_refOpenProjectFileDialogVM = OpenProjectFileDialogVM
- ' Return Not IsNothing(m_refOpenProjectFileDialogVM)
- 'End Function
-
- 'Friend Function SetRefOptionPanelVM(OptionPanelVM As OptionPanelVM) As Boolean
- ' m_refOptionPanelVM = OptionPanelVM
- ' Return Not IsNothing(m_refOptionPanelVM)
- 'End Function
-
- 'Friend Function SetRefRawPartTabVM(RawPartTabVM As RawPartTabVM) As Boolean
- ' m_refRawPartTabVM = RawPartTabVM
- ' Return Not IsNothing(m_refRawPartTabVM)
- 'End Function
-
- 'Friend Function SetRefNestingTabVM(NestingTabVM As NestingTabVM) As Boolean
- ' m_refNestingTabVM = NestingTabVM
- ' Return Not IsNothing(m_refNestingTabVM)
- 'End Function
-
- 'Friend Function SetRefMachiningTabVM(MachiningTabVM As MachiningTabVM) As Boolean
- ' m_refMachiningTabVM = MachiningTabVM
- ' Return Not IsNothing(m_refMachiningTabVM)
- 'End Function
-
- 'Friend Function SetRefSplitModeVM(SplitModeVM As SplitModeVM) As Boolean
- ' m_refSplitModeVM = SplitModeVM
- ' Return Not IsNothing(m_refSplitModeVM)
- 'End Function
-
- 'Friend Function SetRefMoveRawModeVM(MoveRawModeVM As MoveRawModeVM) As Boolean
- ' m_refMoveRawModeVM = MoveRawModeVM
- ' Return Not IsNothing(m_refMoveRawModeVM)
- 'End Function
-
- 'Friend Function SetRefSimulTabVM(SimulTabVM As SimulTabVM) As Boolean
- ' m_refSimulTabVM = SimulTabVM
- ' Return Not IsNothing(m_refSimulTabVM)
- 'End Function
-
- ''Friend Function SetRefImportPanelVM(ImportPanelVM As ImportPanelVM) As Boolean
- '' m_refImportPanelVM = ImportPanelVM
- '' Return Not IsNothing(m_refImportPanelVM)
- ''End Function
-
Friend Function SetRefSliceManagerVM(SliceManagerVM As SliceManagerVM) As Boolean
m_refSliceManagerVM = SliceManagerVM
Return Not IsNothing(m_refSliceManagerVM)
@@ -746,16 +371,21 @@ Module Map
Return Not IsNothing(m_refShellNumberParamPanelVM)
End Function
+ Friend Function SetRefFilledSolidPanelVM(FilledSolidPanelVM As FilledSolidPanelVM) As Boolean
+ m_refFilledSolidPanelVM = FilledSolidPanelVM
+ Return Not IsNothing(m_refFilledSolidPanelVM)
+ End Function
+
+ Friend Function SetRefFilledSolidParamPanelVM(FilledSolidParamPanelVM As FilledSolidParamPanelVM) As Boolean
+ m_refFilledSolidParamPanelVM = FilledSolidParamPanelVM
+ Return Not IsNothing(m_refFilledSolidParamPanelVM)
+ End Function
+
Friend Function SetRefSplashScreen(SplashScreen As SplashScreen) As Boolean
m_refSplashScreen = SplashScreen
Return Not IsNothing(m_refSplashScreen)
End Function
- ''Friend Function SetRefModifyPartPanelVM(ModifyPartPanelVM As ModifyPartPanelVM) As Boolean
- '' m_refModifyPartPanelVM = ModifyPartPanelVM
- '' Return Not IsNothing(m_refModifyPartPanelVM)
- ''End Function
-
Friend Function SetRefManagePartPanelVM(ManagePartPanelVM As ManagePartPanelVM) As Boolean
m_refManagePartPanelVM = ManagePartPanelVM
Return Not IsNothing(m_refManagePartPanelVM)
diff --git a/Icarus/ViewLayerManager/ViewLayerManagerV.xaml b/Icarus/ViewLayerManager/ViewLayerManagerV.xaml
index f0d4e59..9909d02 100644
--- a/Icarus/ViewLayerManager/ViewLayerManagerV.xaml
+++ b/Icarus/ViewLayerManager/ViewLayerManagerV.xaml
@@ -1,9 +1,10 @@
-
+
@@ -15,9 +16,10 @@
+ Margin="2,0,0,0"
+ Style="{StaticResource BaseTextBlock}"/>
-
+
diff --git a/Icarus/ViewLayerManager/ViewLayerManagerVM.vb b/Icarus/ViewLayerManager/ViewLayerManagerVM.vb
index 5a25d3f..6793b7d 100644
--- a/Icarus/ViewLayerManager/ViewLayerManagerVM.vb
+++ b/Icarus/ViewLayerManager/ViewLayerManagerVM.vb
@@ -46,6 +46,7 @@ Public Class ViewLayerManagerVM
New ViewLayer(ViewLayer.ViewLayerType.SOLID_SLICE, "Solid Slice", True),
New ViewLayer(ViewLayer.ViewLayerType.SLICE_TOOLPATH, "Slice Toolpath", True),
New ViewLayer(ViewLayer.ViewLayerType.OTHERS, "Others", True)})
+ UpdateForced()
End Sub
Friend Sub ResetSolid()
@@ -327,7 +328,7 @@ Public Class ViewLayer
Friend Sub WriteIsVisibleToIni()
Dim nStatus As Integer = If(m_IsVisible, 1, 0)
Select Case Map.refTopPanelVM.SelPage
- Case Pages.MODIFY
+ Case Pages.IMPORT, Pages.MODIFY, Pages.MATERIALDB, Pages.MACHININGDB, Pages.CURRMACHINING, Pages.MODIFYPART
Select Case m_Type
Case ViewLayerType.PRINT_SOLID
WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_PRINTSOLID, nStatus)
diff --git a/Icarus/ViewModel/Print3dPartVM.vb b/Icarus/ViewModel/Print3dPartVM.vb
index 0c27358..b6de868 100644
--- a/Icarus/ViewModel/Print3dPartVM.vb
+++ b/Icarus/ViewModel/Print3dPartVM.vb
@@ -25,7 +25,25 @@ Public Class Print3dPartVM
End Get
End Property
- ' riferimento del solido/superficie di stampa
+ ' riferimento del pezzo solido/superficie da stampare
+ Private m_nPartReferenceLayerId As Integer = GDB_ID.NULL
+ Public ReadOnly Property nPartReferenceLayerId As Integer
+ Get
+ Return m_nPartReferenceLayerId
+ End Get
+ End Property
+ Private m_nPartReferenceId As Integer = GDB_ID.NULL
+ Public ReadOnly Property nPartReferenceId As Integer
+ Get
+ Dim nTemp As Integer = EgtGetFirstInGroup(nPartReferenceLayerId)
+ If nTemp <> GDB_ID.NULL Then
+ Return nTemp
+ Else
+ Return m_nReferenceId
+ End If
+ End Get
+ End Property
+ ' riferimento di stampa del pezzo solido/superficie (sempre Z 0)
Private m_nReferenceLayerId As Integer = GDB_ID.NULL
Public ReadOnly Property nReferenceLayerId As Integer
Get
@@ -122,10 +140,11 @@ Public Class Print3dPartVM
m_sImportedFilePath = sImportedFilePath
End Sub
- Sub New(nPartId As Integer, nPrintSolidLayerId As Integer, nReferenceLayerId As Integer, nReferenceId As Integer, nMachStartLayerId As Integer,
+ Sub New(nPartId As Integer, nPrintSolidLayerId As Integer, nPartReferenceLayerId As Integer, nReferenceLayerId As Integer, nReferenceId As Integer, nMachStartLayerId As Integer,
nRibsLayerId As Integer, nShellNumberLayerId As Integer, nAuxSolidsLayerId As Integer, nOthersLayerId As Integer, sImportedFilePath As String)
m_nPartId = nPartId
m_nPrintSolidLayerId = nPrintSolidLayerId
+ m_nPartReferenceLayerId = nPartReferenceLayerId
m_nReferenceLayerId = nReferenceLayerId
m_nReferenceId = nReferenceId
m_nMachStartLayerId = nMachStartLayerId
diff --git a/Icarus/ViewPanel/ViewPanelV.xaml b/Icarus/ViewPanel/ViewPanelV.xaml
index 60ff488..2145760 100644
--- a/Icarus/ViewPanel/ViewPanelV.xaml
+++ b/Icarus/ViewPanel/ViewPanelV.xaml
@@ -1,49 +1,70 @@
-
+
-
+ Command="{Binding ZoomAllCommand}"
+ Margin="2.5,0,2.5,0"
+ Style="{StaticResource BottomPanel_Button}">
+
-
+ Command="{Binding TopViewCommand}"
+ Margin="2.5,0,2.5,0"
+ Style="{StaticResource BottomPanel_Button}">
+
-
+ Command="{Binding FrontViewCommand}"
+ Margin="2.5,0,2.5,0"
+ Style="{StaticResource BottomPanel_Button}">
+
-
+ Command="{Binding RightViewCommand}"
+ Margin="2.5,0,2.5,0"
+ Style="{StaticResource BottomPanel_Button}">
+
-
+ Command="{Binding BackViewCommand}"
+ Margin="2.5,0,2.5,0"
+ Style="{StaticResource BottomPanel_Button}">
+
-
+ Command="{Binding LeftViewCommand}"
+ Margin="2.5,0,2.5,0"
+ Style="{StaticResource BottomPanel_Button}">
+
-
+ Command="{Binding IsoViewSWCommand}"
+ Margin="2.5,0,2.5,0"
+ Style="{StaticResource BottomPanel_Button}">
+
-
-
+
+
+
+
+
-
+
diff --git a/Icarus/ViewPanel/ViewPanelVM.vb b/Icarus/ViewPanel/ViewPanelVM.vb
index 18aca78..f8d7cfe 100644
--- a/Icarus/ViewPanel/ViewPanelVM.vb
+++ b/Icarus/ViewPanel/ViewPanelVM.vb
@@ -2,7 +2,7 @@
Imports EgtWPFLib5
Public Class ViewPanelVM
- Inherits vmbase
+ Inherits VMBase
#Region "FIELDS & PROPERTIES"
@@ -14,7 +14,8 @@ Public Class ViewPanelVM
Private m_cmdBackView As ICommand
Private m_cmdRightView As ICommand
Private m_cmdIsoViewSW As ICommand
- Private m_cmdViewToCPlane As ICommand
+ Private m_cmdIsoViewSE As ICommand
+ Private m_cmdViewFromCPlane As ICommand
#Region "ToolTip"
@@ -54,12 +55,24 @@ Public Class ViewPanelVM
End Get
End Property
- Public ReadOnly Property LookFromIso_SWToolTip As String
+ Public ReadOnly Property LookFromIsoSWToolTip As String
Get
Return EgtMsg(MSG_GRIDVIEWPANEL + 12)
End Get
End Property
+ Public ReadOnly Property LookFromIsoSEToolTip As String
+ Get
+ Return "SE Isometric View"
+ End Get
+ End Property
+
+ Public ReadOnly Property ViewFromCPlaneToolTip As String
+ Get
+ Return "View From CPlane"
+ End Get
+ End Property
+
#End Region ' ToolTip
#End Region ' FIELDS & PROPERTIES
@@ -227,28 +240,51 @@ Public Class ViewPanelVM
#End Region ' IsoViewSWCommand
-#Region "ViewToCPlaneCommand"
+#Region "IsoViewSECommand"
'''
- ''' Returns a command that do GetDist.
+ ''' Returns a command that do IsoViewSE.
'''
- Public ReadOnly Property ViewToCPlaneCommand As ICommand
+ Public ReadOnly Property IsoViewSECommand As ICommand
Get
- If m_cmdViewToCPlane Is Nothing Then
- m_cmdViewToCPlane = New Command(AddressOf ViewToCPlane)
+ If m_cmdIsoViewSE Is Nothing Then
+ m_cmdIsoViewSE = New Command(AddressOf IsoViewSE)
End If
- Return m_cmdViewToCPlane
+ Return m_cmdIsoViewSE
End Get
End Property
'''
- ''' Execute the GetDist. This method is invoked by the GetDistCommand.
+ ''' Execute the IsoViewSW. This method is invoked by the IsoViewSECommand.
'''
- Public Sub ViewToCPlane(ByVal param As Object)
+ Public Sub IsoViewSE(ByVal param As Object)
+ Map.refSceneHostVM.MainScene.IsoViewSE()
+ End Sub
+
+#End Region ' IsoViewSECommand
+
+#Region "ViewFromCPlaneCommand"
+
+ '''
+ ''' Returns a command that do ViewFromCPlane.
+ '''
+ Public ReadOnly Property ViewFromCPlaneCommand As ICommand
+ Get
+ If m_cmdViewFromCPlane Is Nothing Then
+ m_cmdViewFromCPlane = New Command(AddressOf ViewFromCPlane)
+ End If
+ Return m_cmdViewFromCPlane
+ End Get
+ End Property
+
+ '''
+ ''' Execute the ViewFromCPlane. This method is invoked by the ViewFromCPlaneCommand.
+ '''
+ Public Sub ViewFromCPlane(ByVal param As Object)
Map.refSceneHostVM.MainScene.CPlaneView()
End Sub
-#End Region ' ViewToCPlaneCommand
+#End Region ' ViewFromCPlaneCommand
#End Region ' COMMANDS