EgtCAM5 :

- Correzzione EgtSaveFile Dialog.
- Eliminazione Can da tutti i comandi dei bottoni nel programma.
This commit is contained in:
Emmanuele Sassi
2017-02-10 18:36:10 +00:00
parent fe91bda565
commit 2ee84a514d
18 changed files with 339 additions and 848 deletions
+1
View File
@@ -92,6 +92,7 @@ Module ConstIni
Public Const K_DDFDEFAULTDIR As String = "DdfDefaultDir"
Public Const K_DDFMACHEXEC As String = "DdfMachExec"
Public Const K_TABLESDIR As String = "TablesDir"
Public Const K_CURRMTABLE As String = "CurrMTable"
Public Const S_GUNSTOCK As String = "GunStock"
Public Const K_GUNSTOCKENABLE As String = "GsEnable"
+37 -34
View File
@@ -241,22 +241,23 @@ Namespace EgtCAM5
Private Sub SetActiveTable()
Dim ActiveMTableName As String = String.Empty
Dim ActiveMTableFilePath As String = Path.GetDirectoryName(IniFile.m_sTablesRoot) & "\CurrMTable.lua"
If File.Exists(ActiveMTableFilePath) Then
Dim ReadFile As String() = File.ReadAllLines(ActiveMTableFilePath)
For LineIndex As Integer = 0 To ReadFile.Count - 1
If ReadFile(LineIndex).Contains(MTABLENAME) Then
ActiveMTableName = TableUtility.SearchKey(ReadFile(LineIndex), MTNAME)
Exit For
End If
Next
For Index As Integer = 0 To m_TablesList.Count - 1
If m_TablesList(Index).TableName = ActiveMTableName Then
m_TablesList(Index).ActiveTable = True
Exit For
End If
Next
End If
GetPrivateProfileString(S_DOORS, K_CURRMTABLE, "", ActiveMTableName)
'Dim ActiveMTableFilePath As String = Path.GetDirectoryName(IniFile.m_sTablesRoot) & "\CurrMTable.lua"
'If File.Exists(ActiveMTableFilePath) Then
' Dim ReadFile As String() = File.ReadAllLines(ActiveMTableFilePath)
' For LineIndex As Integer = 0 To ReadFile.Count - 1
' If ReadFile(LineIndex).Contains(MTABLENAME) Then
' ActiveMTableName = TableUtility.SearchKey(ReadFile(LineIndex), MTNAME)
' Exit For
' End If
' Next
For Index As Integer = 0 To m_TablesList.Count - 1
If m_TablesList(Index).TableName = ActiveMTableName Then
m_TablesList(Index).ActiveTable = True
Exit For
End If
Next
'End If
End Sub
#End Region
@@ -368,7 +369,7 @@ Namespace EgtCAM5
SaveFileDialogView.Extension = ".mtl"
SaveFileDialogView.Directory = sDir
SaveFileDialogView.FileName = sTableName
If Not SaveFileDialogView.ShowDialog Then
If Not SaveFileDialogView.EgtShowDialog Then
Return False
End If
sPath = SaveFileDialogView.FileName
@@ -445,23 +446,25 @@ Namespace EgtCAM5
Public Sub SetActiveTable(param As Object)
Dim SelectedMTable As MTableListBoxItem = DirectCast(param, MTableListBoxItem)
If IsNothing(SelectedMTable) Then Return
For Index As Integer = 0 To m_TablesList.Count - 1
If m_TablesList(Index).TableName = SelectedMTable.TableName Then
m_TablesList(Index).ActiveTable = True
Else
m_TablesList(Index).ActiveTable = False
End If
Next
' Scrivo il file di configurazione con il nome di questa tavola
Dim FileContent As String() = File.ReadAllLines(Path.GetDirectoryName(IniFile.m_sTablesRoot) & "\" & CURRMTABLE_FILE)
Dim NewTableFileContent As New List(Of String)
For LineIndex As Integer = 0 To FileContent.Count - 1
Dim sCurrLine As String = FileContent(LineIndex)
sCurrLine = sCurrLine.Replace(TableUtility.DATETIME, System.DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"))
sCurrLine = sCurrLine.Replace(TableUtility.TABLENAME, SelectedMTable.TableName)
NewTableFileContent.Add(sCurrLine)
Next
File.WriteAllLines(Path.ChangeExtension(Path.GetDirectoryName(IniFile.m_sTablesRoot) & "\" & CURRMTABLE_FILE, ".lua"), NewTableFileContent, Text.Encoding.UTF8)
If WritePrivateProfileString(S_DOORS, K_CURRMTABLE, SelectedMTable.TableName) Then
For Index As Integer = 0 To m_TablesList.Count - 1
If m_TablesList(Index).TableName = SelectedMTable.TableName Then
m_TablesList(Index).ActiveTable = True
Else
m_TablesList(Index).ActiveTable = False
End If
Next
End If
'' Scrivo il file di configurazione con il nome di questa tavola
'Dim FileContent As String() = File.ReadAllLines(Path.GetDirectoryName(IniFile.m_sTablesRoot) & "\" & CURRMTABLE_FILE)
'Dim NewTableFileContent As New List(Of String)
'For LineIndex As Integer = 0 To FileContent.Count - 1
' Dim sCurrLine As String = FileContent(LineIndex)
' sCurrLine = sCurrLine.Replace(TableUtility.DATETIME, System.DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"))
' sCurrLine = sCurrLine.Replace(TableUtility.TABLENAME, SelectedMTable.TableName)
' NewTableFileContent.Add(sCurrLine)
'Next
'File.WriteAllLines(Path.ChangeExtension(Path.GetDirectoryName(IniFile.m_sTablesRoot) & "\" & CURRMTABLE_FILE, ".lua"), NewTableFileContent, Text.Encoding.UTF8)
End Sub
+61
View File
@@ -3,6 +3,8 @@ Imports EgtUILib
Public Module MachineModel
#Region "Machining"
''' <summary>
''' Method that search the machines in the correct folder and add to the MachinesList those valid.
''' </summary>
@@ -54,6 +56,7 @@ Public Module MachineModel
Implements INotifyPropertyChanged
Friend TypeId As MCH_MY
Private m_TypeName As String
Public Property TypeName As String
Get
@@ -72,4 +75,62 @@ Public Module MachineModel
End Class
#End Region ' Machining
#Region "Tool"
''' <summary>
''' Method that search the machines in the correct folder and add to the MachinesList those valid.
''' </summary>
Friend Function ReadActiveToolsFamilies() As ToolsFamily()
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.DRILLBIT, EgtMsg(MSG_TOOLSDBPAGE + 1)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.SAWBLADE, EgtMsg(MSG_TOOLSDBPAGE + 2)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(MSG_TOOLSDBPAGE + 3)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MORTISE, EgtMsg(MSG_TOOLSDBPAGE + 4)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_CHISEL, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.CHISEL, EgtMsg(MSG_TOOLSDBPAGE + 9)))
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.COMPO, EgtMsg(MSG_TOOLSDBPAGE + 5)))
End If
Return ActiveToolsFamiliesList.ToArray
End Function
''' <summary>
''' Structure that represent a tool's family, containing family type and family name
''' </summary>
Friend Class ToolsFamily
Private m_FamilyId As MCH_TF
Public ReadOnly Property FamilyId As MCH_TF
Get
Return m_FamilyId
End Get
End Property
Private m_FamilyName As String
Public ReadOnly Property FamilyName As String
Get
Return m_FamilyName
End Get
End Property
Sub New(nFamilyId As MCH_TF, sFamilyName As String)
m_FamilyId = nFamilyId
m_FamilyName = sFamilyName
End Sub
End Class
#End Region ' Tool
End Module
+2 -16
View File
@@ -28,7 +28,7 @@ Namespace EgtCAM5
Public ReadOnly Property DoorsCommand As ICommand
Get
If m_cmdDoors Is Nothing Then
m_cmdDoors = New RelayCommand(AddressOf Doors, AddressOf CanDoors)
m_cmdDoors = New RelayCommand(AddressOf Doors)
End If
Return m_cmdDoors
End Get
@@ -41,13 +41,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.DOORSSCRIPT, String.Empty)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanDoors(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' DoorsCommand
#Region "OpenMruDoorCommand"
@@ -81,7 +74,7 @@ Namespace EgtCAM5
Public ReadOnly Property DMachCommand As ICommand
Get
If m_cmdDMach Is Nothing Then
m_cmdDMach = New RelayCommand(AddressOf DMach, AddressOf CanDMach)
m_cmdDMach = New RelayCommand(AddressOf DMach)
End If
Return m_cmdDMach
End Get
@@ -94,13 +87,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.DMACHSCRIPT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanDMach(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' DMachCommand
#Region "MTableDbCommand"
+86 -46
View File
@@ -12,46 +12,60 @@
<TextBlock Text="{Binding Draw2DMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<Button ToolTip="{Binding PointToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding PointCommand}">
<Button ToolTip="{Binding PointToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PointCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Line2PToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding Line2PCommand}">
<Button ToolTip="{Binding Line2PToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Line2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding LinePDLToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding LinePDLCommand}">
<Button ToolTip="{Binding LinePDLToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding LinePDLCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinePDL.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding CircleCPCommand}">
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding CircleCDCommand}">
<Button ToolTip="{Binding CircleCDToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding CircleCDCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/CircleCD.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ArcCSECommand}">
<Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ArcCSECommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcCSE.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding Arc3PCommand}">
<Button ToolTip="{Binding Arc3PToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Arc3P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ArcPDPToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ArcPDPCommand}">
<Button ToolTip="{Binding ArcPDPToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding FilletToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding FilletCommand}">
<Button ToolTip="{Binding FilletToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding FilletCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Fillet.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChamferToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ChamferCommand}">
<Button ToolTip="{Binding ChamferToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChamferCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding Rectangle2PCommand}">
<Button ToolTip="{Binding Rectangle2PToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Rectangle2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Rectangle2P.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding PolygonToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding PolygonCommand}">
<Button ToolTip="{Binding PolygonToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PolygonCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Polygon.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding PolygonSideToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding PolygonSideCommand}">
<Button ToolTip="{Binding PolygonSideToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding TextToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding TextCommand}">
<Button ToolTip="{Binding TextToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding TextCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
@@ -61,31 +75,38 @@
<TextBlock Text="{Binding Draw3DMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<Button ToolTip="{Binding PlaneToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding PlaneCommand}">
<Button ToolTip="{Binding PlaneToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PlaneCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Plane.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtrudeToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ExtrudeCommand}">
<Button ToolTip="{Binding ExtrudeToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExtrudeCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Extrude.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RevolveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding RevolveCommand}">
<Button ToolTip="{Binding RevolveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding RevolveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Revolve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ScrewToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ScrewCommand}">
<Button ToolTip="{Binding ScrewToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ScrewCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Screw.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RuledToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding RuledCommand}">
<Button ToolTip="{Binding RuledToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding RuledCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Ruled.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding MergeSurfToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding MergeSurfCommand}">
<Button ToolTip="{Binding MergeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding MergeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/MergeSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExplodeSurfToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ExplodeSurfCommand}">
<Button ToolTip="{Binding ExplodeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExplodeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding InvertSurfToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding InvertSurfCommand}">
<Button ToolTip="{Binding InvertSurfToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertSurf.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}">
@@ -93,46 +114,58 @@
<TextBlock Text="{Binding ModifyMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<Button ToolTip="{Binding DeleteToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding DeleteCommand}">
<Button ToolTip="{Binding DeleteToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeLayerToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ChangeLayerCommand}">
<Button ToolTip="{Binding ChangeLayerToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeColorToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ChangeColorCommand}">
<Button ToolTip="{Binding ChangeColorToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeColor.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeAlphaToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ChangeAlphaCommand}">
<Button ToolTip="{Binding ChangeAlphaToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeAlphaCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeColorAlpha.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ResetColorToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ResetColorCommand}">
<Button ToolTip="{Binding ResetColorToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ResetColorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemoveColor.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding InvertCurveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding InvertCurveCommand}">
<Button ToolTip="{Binding InvertCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding InvertCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeStartToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ChangeStartCurveCommand}">
<Button ToolTip="{Binding ChangeStartToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeStartCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExtendCurveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ExtendCurveCommand}">
<Button ToolTip="{Binding ExtendCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExtendCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtendCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding BreakCurveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding BreakCurveCommand}">
<Button ToolTip="{Binding BreakCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding BreakCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/BreakCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding SplitCurveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding SplitCurveCommand}">
<Button ToolTip="{Binding SplitCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding SplitCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SplitCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding JoinCurveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding JoinCurveCommand}">
<Button ToolTip="{Binding JoinCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding JoinCurveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ExplodeCurveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ExplodeCurveCommand}">
<Button ToolTip="{Binding ExplodeCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExplodeCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeCurve.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding SetCurveThCommand}">
<Button ToolTip="{Binding ThickCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding SetCurveThCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ThickCurve.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Expander Name="Transform" Style="{StaticResource ExpanderStyle}" Grid.Row="3" IsExpanded="{Binding TransformIsExpanded}">
@@ -140,31 +173,38 @@
<TextBlock Text="{Binding TransformMsg}"/>
</Expander.Header>
<UniformGrid Columns="2">
<Button ToolTip="{Binding MoveToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding MoveCommand}">
<Button ToolTip="{Binding MoveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding MoveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding RotateToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding RotateCommand}">
<Button ToolTip="{Binding RotateToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding RotateCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Rotate3DToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding Rotate3DCommand}">
<Button ToolTip="{Binding Rotate3DToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Rotate3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Rotate3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding MirrorToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding MirrorCommand}">
<Button ToolTip="{Binding MirrorToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding MirrorCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Mirror3DToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding Mirror3DCommand}">
<Button ToolTip="{Binding Mirror3DToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Mirror3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Mirror3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ScaleToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding ScaleCommand}">
<Button ToolTip="{Binding ScaleToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding ScaleCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Scale3DToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding Scale3DCommand}">
<Button ToolTip="{Binding Scale3DToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding Scale3DCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Scale3D.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}" Command="{Binding OffsetCommand}">
<Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Offset.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Expander>
<Interactivity:Interaction.Behaviors>
+86 -359
View File
@@ -264,18 +264,6 @@ Namespace EgtCAM5
' Definizione layer corrente
Private m_CurrentLayer As Integer
Public ReadOnly Property bLayerOk As Boolean
Get
Return m_CurrentLayer <> GDB_ID.NULL
End Get
End Property
' Definizione layer corrente
Private m_bSelOk As Boolean = False
Public ReadOnly Property bSelOk As Boolean
Get
Return m_bSelOk
End Get
End Property
' Proprietà che permettono di aprire e chiudere gli expander
Private m_Draw2DIsExpanded As Boolean
@@ -318,6 +306,41 @@ Namespace EgtCAM5
End Set
End Property
#Region "Button state"
Private m_bLayerOk As Boolean
Public Property bLayerOk As Boolean
Get
Return m_bLayerOk
End Get
Set(value As Boolean)
m_bLayerOk = value
OnPropertyChanged("bLayerOk")
End Set
End Property
Private m_bSelOk As Boolean
Public Property bSelOk As Boolean
Get
Return m_bSelOk
End Get
Set(value As Boolean)
m_bSelOk = value
OnPropertyChanged("bSelOk")
End Set
End Property
Private m_bLayerOkAndSelOk As Boolean
Public Property bLayerOkAndSelOk As Boolean
Get
Return m_bLayerOkAndSelOk
End Get
Set(value As Boolean)
m_bLayerOkAndSelOk = value
OnPropertyChanged("bLayerOkAndSelOk")
End Set
End Property
#End Region ' Button state
' Definizione comandi
Private m_cmdPoint As ICommand
Private m_cmdLine2P As ICommand
@@ -397,7 +420,7 @@ Namespace EgtCAM5
Public ReadOnly Property PointCommand As ICommand
Get
If m_cmdPoint Is Nothing Then
m_cmdPoint = New RelayCommand(AddressOf Point, AddressOf CanPoint)
m_cmdPoint = New RelayCommand(AddressOf Point)
End If
Return m_cmdPoint
End Get
@@ -410,14 +433,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.POINT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanPoint(ByVal param As Object) As Boolean
Application.Msn.NotifyColleagues(Application.GETCURRLAYER)
Return bLayerOk
End Function
#End Region ' PointCommand
#Region "Line2PCommand"
@@ -428,7 +443,7 @@ Namespace EgtCAM5
Public ReadOnly Property Line2PCommand As ICommand
Get
If m_cmdLine2P Is Nothing Then
m_cmdLine2P = New RelayCommand(AddressOf Line2P, AddressOf CanLine2P)
m_cmdLine2P = New RelayCommand(AddressOf Line2P)
End If
Return m_cmdLine2P
End Get
@@ -441,12 +456,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.LINE2P)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanLine2P(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' Line2PCommand
@@ -458,7 +467,7 @@ Namespace EgtCAM5
Public ReadOnly Property LinePDLCommand As ICommand
Get
If m_cmdLinePDL Is Nothing Then
m_cmdLinePDL = New RelayCommand(AddressOf LinePDL, AddressOf CanLinePDL)
m_cmdLinePDL = New RelayCommand(AddressOf LinePDL)
End If
Return m_cmdLinePDL
End Get
@@ -471,13 +480,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.LINEPDL)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanLinePDL(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' LinePDLCommand
#Region "CircleCPCommand"
@@ -488,7 +490,7 @@ Namespace EgtCAM5
Public ReadOnly Property CircleCPCommand As ICommand
Get
If m_cmdCircleCP Is Nothing Then
m_cmdCircleCP = New RelayCommand(AddressOf CircleCP, AddressOf CanCircleCP)
m_cmdCircleCP = New RelayCommand(AddressOf CircleCP)
End If
Return m_cmdCircleCP
End Get
@@ -501,13 +503,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.CIRCLECP)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCircleCP(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' CircleCPCommand
#Region "CircleCDCommand"
@@ -518,7 +513,7 @@ Namespace EgtCAM5
Public ReadOnly Property CircleCDCommand As ICommand
Get
If m_cmdCircleCD Is Nothing Then
m_cmdCircleCD = New RelayCommand(AddressOf CircleCD, AddressOf CanCircleCD)
m_cmdCircleCD = New RelayCommand(AddressOf CircleCD)
End If
Return m_cmdCircleCD
End Get
@@ -531,13 +526,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.CIRCLECD)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCircleCD(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' CircleCDCommand
#Region "ArcCSECommand"
@@ -548,7 +536,7 @@ Namespace EgtCAM5
Public ReadOnly Property ArcCSECommand As ICommand
Get
If m_cmdArcCSE Is Nothing Then
m_cmdArcCSE = New RelayCommand(AddressOf ArcCSE, AddressOf CanArcCSE)
m_cmdArcCSE = New RelayCommand(AddressOf ArcCSE)
End If
Return m_cmdArcCSE
End Get
@@ -561,13 +549,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.ARCCSE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanArcCSE(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' ArcCSECommand
#Region "Arc3PCommand"
@@ -578,7 +559,7 @@ Namespace EgtCAM5
Public ReadOnly Property Arc3PCommand As ICommand
Get
If m_cmdArc3P Is Nothing Then
m_cmdArc3P = New RelayCommand(AddressOf Arc3P, AddressOf CanArc3P)
m_cmdArc3P = New RelayCommand(AddressOf Arc3P)
End If
Return m_cmdArc3P
End Get
@@ -591,13 +572,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.ARC3P)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanArc3P(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' Arc3PCommand
#Region "ArcPDPCommand"
@@ -608,7 +582,7 @@ Namespace EgtCAM5
Public ReadOnly Property ArcPDPCommand As ICommand
Get
If m_cmdArcPDP Is Nothing Then
m_cmdArcPDP = New RelayCommand(AddressOf ArcPDP, AddressOf CanArcPDP)
m_cmdArcPDP = New RelayCommand(AddressOf ArcPDP)
End If
Return m_cmdArcPDP
End Get
@@ -621,13 +595,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.ARCPDP)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanArcPDP(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' ArcPDPCommand
#Region "FilletCommand"
@@ -638,7 +605,7 @@ Namespace EgtCAM5
Public ReadOnly Property FilletCommand As ICommand
Get
If m_cmdFillet Is Nothing Then
m_cmdFillet = New RelayCommand(AddressOf Fillet, AddressOf CanFillet)
m_cmdFillet = New RelayCommand(AddressOf Fillet)
End If
Return m_cmdFillet
End Get
@@ -651,13 +618,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.FILLET)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanFillet(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' FilletCommand
#Region "ChamferCommand"
@@ -668,7 +628,7 @@ Namespace EgtCAM5
Public ReadOnly Property ChamferCommand As ICommand
Get
If m_cmdChamfer Is Nothing Then
m_cmdChamfer = New RelayCommand(AddressOf Chamfer, AddressOf CanChamfer)
m_cmdChamfer = New RelayCommand(AddressOf Chamfer)
End If
Return m_cmdChamfer
End Get
@@ -681,13 +641,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.CHAMFER)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanChamfer(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' ChamferCommand
#Region "Rectangle2PCommand"
@@ -698,7 +651,7 @@ Namespace EgtCAM5
Public ReadOnly Property Rectangle2PCommand As ICommand
Get
If m_cmdRectangle2P Is Nothing Then
m_cmdRectangle2P = New RelayCommand(AddressOf Rectangle2P, AddressOf CanRectangle2P)
m_cmdRectangle2P = New RelayCommand(AddressOf Rectangle2P)
End If
Return m_cmdRectangle2P
End Get
@@ -711,13 +664,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.RECTANGLE2P)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanRectangle2P(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' Rectangle2PCommand
#Region "PolygonCommand"
@@ -728,7 +674,7 @@ Namespace EgtCAM5
Public ReadOnly Property PolygonCommand As ICommand
Get
If m_cmdPolygon Is Nothing Then
m_cmdPolygon = New RelayCommand(AddressOf Polygon, AddressOf CanPolygon)
m_cmdPolygon = New RelayCommand(AddressOf Polygon)
End If
Return m_cmdPolygon
End Get
@@ -741,13 +687,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.POLYGON)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanPolygon(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' PolygonCommand
#Region "PolygonSideCommand"
@@ -758,7 +697,7 @@ Namespace EgtCAM5
Public ReadOnly Property PolygonSideCommand As ICommand
Get
If m_cmdPolygonSide Is Nothing Then
m_cmdPolygonSide = New RelayCommand(AddressOf PolygonSide, AddressOf CanPolygonSide)
m_cmdPolygonSide = New RelayCommand(AddressOf PolygonSide)
End If
Return m_cmdPolygonSide
End Get
@@ -771,13 +710,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.POLYGONSIDE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanPolygonSide(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' PolygonSideCommand
#Region "TextCommand"
@@ -788,7 +720,7 @@ Namespace EgtCAM5
Public ReadOnly Property TextCommand As ICommand
Get
If m_cmdText Is Nothing Then
m_cmdText = New RelayCommand(AddressOf Text, AddressOf CanText)
m_cmdText = New RelayCommand(AddressOf Text)
End If
Return m_cmdText
End Get
@@ -801,13 +733,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.TEXT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanText(ByVal param As Object) As Boolean
Return bLayerOk
End Function
#End Region ' TextCommand
#Region "PlaneCommand"
@@ -818,7 +743,7 @@ Namespace EgtCAM5
Public ReadOnly Property PlaneCommand As ICommand
Get
If m_cmdPlane Is Nothing Then
m_cmdPlane = New RelayCommand(AddressOf Plane, AddressOf CanPlane)
m_cmdPlane = New RelayCommand(AddressOf Plane)
End If
Return m_cmdPlane
End Get
@@ -831,15 +756,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.PLANE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanPlane(ByVal param As Object) As Boolean
If IniFile.m_ProjectSceneContext = 0 Then Return False
m_bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL
Return bLayerOk And bSelOk
End Function
#End Region ' PlaneCommand
#Region "ExtrudeCommand"
@@ -850,7 +766,7 @@ Namespace EgtCAM5
Public ReadOnly Property ExtrudeCommand As ICommand
Get
If m_cmdExtrude Is Nothing Then
m_cmdExtrude = New RelayCommand(AddressOf Extrude, AddressOf CanExtrude)
m_cmdExtrude = New RelayCommand(AddressOf Extrude)
End If
Return m_cmdExtrude
End Get
@@ -863,13 +779,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.EXTRUDE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanExtrude(ByVal param As Object) As Boolean
Return bLayerOk And bSelOk
End Function
#End Region ' ExtrudeCommand
#Region "RevolveCommand"
@@ -880,7 +789,7 @@ Namespace EgtCAM5
Public ReadOnly Property RevolveCommand As ICommand
Get
If m_cmdRevolve Is Nothing Then
m_cmdRevolve = New RelayCommand(AddressOf Revolve, AddressOf CanRevolve)
m_cmdRevolve = New RelayCommand(AddressOf Revolve)
End If
Return m_cmdRevolve
End Get
@@ -893,13 +802,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.REVOLVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanRevolve(ByVal param As Object) As Boolean
Return bLayerOk And bSelOk
End Function
#End Region ' RevolveCommand
#Region "ScrewCommand"
@@ -910,7 +812,7 @@ Namespace EgtCAM5
Public ReadOnly Property ScrewCommand As ICommand
Get
If m_cmdScrew Is Nothing Then
m_cmdScrew = New RelayCommand(AddressOf Screw, AddressOf CanScrew)
m_cmdScrew = New RelayCommand(AddressOf Screw)
End If
Return m_cmdScrew
End Get
@@ -923,13 +825,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SCREW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanScrew(ByVal param As Object) As Boolean
Return bLayerOk And bSelOk
End Function
#End Region ' ScrewCommand
#Region "RuledCommand"
@@ -940,7 +835,7 @@ Namespace EgtCAM5
Public ReadOnly Property RuledCommand As ICommand
Get
If m_cmdRuled Is Nothing Then
m_cmdRuled = New RelayCommand(AddressOf Ruled, AddressOf CanRuled)
m_cmdRuled = New RelayCommand(AddressOf Ruled)
End If
Return m_cmdRuled
End Get
@@ -953,13 +848,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.RULED)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanRuled(ByVal param As Object) As Boolean
Return bLayerOk And bSelOk
End Function
#End Region ' RuledCommand
#Region "MergeSurfCommand"
@@ -970,7 +858,7 @@ Namespace EgtCAM5
Public ReadOnly Property MergeSurfCommand As ICommand
Get
If m_cmdMergeSurf Is Nothing Then
m_cmdMergeSurf = New RelayCommand(AddressOf MergeSurf, AddressOf CanMergeSurf)
m_cmdMergeSurf = New RelayCommand(AddressOf MergeSurf)
End If
Return m_cmdMergeSurf
End Get
@@ -983,13 +871,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.MERGESURF)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanMergeSurf(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' MergeSurfCommand
#Region "ExplodeSurfCommand"
@@ -1000,7 +881,7 @@ Namespace EgtCAM5
Public ReadOnly Property ExplodeSurfCommand As ICommand
Get
If m_cmdExplodeSurf Is Nothing Then
m_cmdExplodeSurf = New RelayCommand(AddressOf ExplodeSurf, AddressOf CanExplodeSurf)
m_cmdExplodeSurf = New RelayCommand(AddressOf ExplodeSurf)
End If
Return m_cmdExplodeSurf
End Get
@@ -1013,13 +894,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.EXPLODESURF)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanExplodeSurf(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ExplodeSurfCommand
#Region "InvertSurfCommand"
@@ -1030,7 +904,7 @@ Namespace EgtCAM5
Public ReadOnly Property InvertSurfCommand As ICommand
Get
If m_cmdInvertSurf Is Nothing Then
m_cmdInvertSurf = New RelayCommand(AddressOf InvertSurf, AddressOf CanInvertSurf)
m_cmdInvertSurf = New RelayCommand(AddressOf InvertSurf)
End If
Return m_cmdInvertSurf
End Get
@@ -1043,13 +917,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.INVERTSURF)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanInvertSurf(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' InvertSurfCommand
#Region "DeleteCommand"
@@ -1060,7 +927,7 @@ Namespace EgtCAM5
Public ReadOnly Property DeleteCommand As ICommand
Get
If m_cmdDelete Is Nothing Then
m_cmdDelete = New RelayCommand(AddressOf Delete, AddressOf CanDelete)
m_cmdDelete = New RelayCommand(AddressOf Delete)
End If
Return m_cmdDelete
End Get
@@ -1073,13 +940,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.DELETE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanDelete(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' DeleteCommand
#Region "ChangeLayerCommand"
@@ -1090,7 +950,7 @@ Namespace EgtCAM5
Public ReadOnly Property ChangeLayerCommand As ICommand
Get
If m_cmdChangeLayer Is Nothing Then
m_cmdChangeLayer = New RelayCommand(AddressOf ChangeLayer, AddressOf CanChangeLayer)
m_cmdChangeLayer = New RelayCommand(AddressOf ChangeLayer)
End If
Return m_cmdChangeLayer
End Get
@@ -1107,13 +967,6 @@ Namespace EgtCAM5
End If
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanChangeLayer(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ChangeLayerCommand
#Region "ChangeAlphaCommand"
@@ -1124,7 +977,7 @@ Namespace EgtCAM5
Public ReadOnly Property ChangeAlphaCommand As ICommand
Get
If m_cmdChangeAlpha Is Nothing Then
m_cmdChangeAlpha = New RelayCommand(AddressOf ChangeAlpha, AddressOf CanChangeAlpha)
m_cmdChangeAlpha = New RelayCommand(AddressOf ChangeAlpha)
End If
Return m_cmdChangeAlpha
End Get
@@ -1137,13 +990,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.CHANGEALPHA)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanChangeAlpha(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ChangeAlphaCommand
#Region "ResetColorCommand"
@@ -1154,7 +1000,7 @@ Namespace EgtCAM5
Public ReadOnly Property ResetColorCommand As ICommand
Get
If m_cmdResetColor Is Nothing Then
m_cmdResetColor = New RelayCommand(AddressOf ResetColor, AddressOf CanResetColor)
m_cmdResetColor = New RelayCommand(AddressOf ResetColor)
End If
Return m_cmdResetColor
End Get
@@ -1167,13 +1013,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.RESETCOLOR)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanResetColor(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ResetColorCommand
#Region "ChangeColorCommand"
@@ -1184,7 +1023,7 @@ Namespace EgtCAM5
Public ReadOnly Property ChangeColorCommand As ICommand
Get
If m_cmdChangeColor Is Nothing Then
m_cmdChangeColor = New RelayCommand(AddressOf ChangeColor, AddressOf CanChangeColor)
m_cmdChangeColor = New RelayCommand(AddressOf ChangeColor)
End If
Return m_cmdChangeColor
End Get
@@ -1197,13 +1036,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.CHANGECOLOR)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanChangeColor(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ChangeColorCommand
#Region "InvertCurveCommand"
@@ -1214,7 +1046,7 @@ Namespace EgtCAM5
Public ReadOnly Property InvertCurveCommand As ICommand
Get
If m_cmdInvertCurve Is Nothing Then
m_cmdInvertCurve = New RelayCommand(AddressOf InvertCurve, AddressOf CanInvertCurve)
m_cmdInvertCurve = New RelayCommand(AddressOf InvertCurve)
End If
Return m_cmdInvertCurve
End Get
@@ -1227,13 +1059,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.INVERTCURVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanInvertCurve(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' InvertCurveCommand
#Region "ChangeStartCurveCommand"
@@ -1244,7 +1069,7 @@ Namespace EgtCAM5
Public ReadOnly Property ChangeStartCurveCommand As ICommand
Get
If m_cmdChangeStartCurve Is Nothing Then
m_cmdChangeStartCurve = New RelayCommand(AddressOf ChangeStartCurve, AddressOf CanChangeStartCurve)
m_cmdChangeStartCurve = New RelayCommand(AddressOf ChangeStartCurve)
End If
Return m_cmdChangeStartCurve
End Get
@@ -1257,13 +1082,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.CHANGESTARTCURVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanChangeStartCurve(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ChangeStartCurveCommand
#Region "ExtendCurveCommand"
@@ -1274,7 +1092,7 @@ Namespace EgtCAM5
Public ReadOnly Property ExtendCurveCommand As ICommand
Get
If m_cmdExtendCurve Is Nothing Then
m_cmdExtendCurve = New RelayCommand(AddressOf ExtendCurve, AddressOf CanExtendCurve)
m_cmdExtendCurve = New RelayCommand(AddressOf ExtendCurve)
End If
Return m_cmdExtendCurve
End Get
@@ -1287,13 +1105,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.TRIMEXTENDCURVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanExtendCurve(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ExtendCurveCommand
#Region "BreakCurveCommand"
@@ -1304,7 +1115,7 @@ Namespace EgtCAM5
Public ReadOnly Property BreakCurveCommand As ICommand
Get
If m_cmdBreakCurve Is Nothing Then
m_cmdBreakCurve = New RelayCommand(AddressOf BreakCurve, AddressOf CanBreakCurve)
m_cmdBreakCurve = New RelayCommand(AddressOf BreakCurve)
End If
Return m_cmdBreakCurve
End Get
@@ -1317,13 +1128,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.BREAKCURVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanBreakCurve(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' BreakCurveCommand
#Region "SplitCurveCommand"
@@ -1334,7 +1138,7 @@ Namespace EgtCAM5
Public ReadOnly Property SplitCurveCommand As ICommand
Get
If m_cmdSplitCurve Is Nothing Then
m_cmdSplitCurve = New RelayCommand(AddressOf SplitCurve, AddressOf CanSplitCurve)
m_cmdSplitCurve = New RelayCommand(AddressOf SplitCurve)
End If
Return m_cmdSplitCurve
End Get
@@ -1347,13 +1151,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SPLITCURVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanSplitCurve(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' SplitCurveCommand
#Region "JoinCurveCommand"
@@ -1364,7 +1161,7 @@ Namespace EgtCAM5
Public ReadOnly Property JoinCurveCommand As ICommand
Get
If m_cmdJoinCurve Is Nothing Then
m_cmdJoinCurve = New RelayCommand(AddressOf JoinCurve, AddressOf CanJoinCurve)
m_cmdJoinCurve = New RelayCommand(AddressOf JoinCurve)
End If
Return m_cmdJoinCurve
End Get
@@ -1377,13 +1174,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.JOINCURVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanJoinCurve(ByVal param As Object) As Boolean
Return bLayerOk And bSelOk
End Function
#End Region ' JoinCurveCommand
#Region "ExplodeCurveCommand"
@@ -1394,7 +1184,7 @@ Namespace EgtCAM5
Public ReadOnly Property ExplodeCurveCommand As ICommand
Get
If m_cmdExplodeCurve Is Nothing Then
m_cmdExplodeCurve = New RelayCommand(AddressOf ExplodeCurve, AddressOf CanExplodeCurve)
m_cmdExplodeCurve = New RelayCommand(AddressOf ExplodeCurve)
End If
Return m_cmdExplodeCurve
End Get
@@ -1407,13 +1197,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.EXPLODECURVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanExplodeCurve(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ExplodeCurveCommand
#Region "SetCurveThCommand"
@@ -1424,7 +1207,7 @@ Namespace EgtCAM5
Public ReadOnly Property SetCurveThCommand As ICommand
Get
If m_cmdSetCurveTh Is Nothing Then
m_cmdSetCurveTh = New RelayCommand(AddressOf SetCurveTh, AddressOf CanSetCurveTh)
m_cmdSetCurveTh = New RelayCommand(AddressOf SetCurveTh)
End If
Return m_cmdSetCurveTh
End Get
@@ -1437,13 +1220,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SETCURVETHICKNESS)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanSetCurveTh(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' SetCurveThCommand
#Region "MoveCommand"
@@ -1454,7 +1230,7 @@ Namespace EgtCAM5
Public ReadOnly Property MoveCommand As ICommand
Get
If m_cmdMove Is Nothing Then
m_cmdMove = New RelayCommand(AddressOf Move, AddressOf CanMove)
m_cmdMove = New RelayCommand(AddressOf Move)
End If
Return m_cmdMove
End Get
@@ -1467,13 +1243,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.MOVE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanMove(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' MoveCommand
#Region "RotateCommand"
@@ -1484,7 +1253,7 @@ Namespace EgtCAM5
Public ReadOnly Property RotateCommand As ICommand
Get
If m_cmdRotate Is Nothing Then
m_cmdRotate = New RelayCommand(AddressOf Rotate, AddressOf CanRotate)
m_cmdRotate = New RelayCommand(AddressOf Rotate)
End If
Return m_cmdRotate
End Get
@@ -1497,13 +1266,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.ROTATE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanRotate(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' RotateCommand
#Region "Rotate3DCommand"
@@ -1514,7 +1276,7 @@ Namespace EgtCAM5
Public ReadOnly Property Rotate3DCommand As ICommand
Get
If m_cmdRotate3D Is Nothing Then
m_cmdRotate3D = New RelayCommand(AddressOf Rotate3D, AddressOf CanRotate3D)
m_cmdRotate3D = New RelayCommand(AddressOf Rotate3D)
End If
Return m_cmdRotate3D
End Get
@@ -1527,13 +1289,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.ROTATE3D)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanRotate3D(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' Rotate3DCommand
#Region "MirrorCommand"
@@ -1544,7 +1299,7 @@ Namespace EgtCAM5
Public ReadOnly Property MirrorCommand As ICommand
Get
If m_cmdMirror Is Nothing Then
m_cmdMirror = New RelayCommand(AddressOf Mirror, AddressOf CanMirror)
m_cmdMirror = New RelayCommand(AddressOf Mirror)
End If
Return m_cmdMirror
End Get
@@ -1557,13 +1312,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.MIRROR)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanMirror(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' MirrorCommand
#Region "Mirror3DCommand"
@@ -1574,7 +1322,7 @@ Namespace EgtCAM5
Public ReadOnly Property Mirror3DCommand As ICommand
Get
If m_cmdMirror3D Is Nothing Then
m_cmdMirror3D = New RelayCommand(AddressOf Mirror3D, AddressOf CanMirror3D)
m_cmdMirror3D = New RelayCommand(AddressOf Mirror3D)
End If
Return m_cmdMirror3D
End Get
@@ -1587,13 +1335,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.MIRROR3D)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanMirror3D(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' Mirror3DCommand
#Region "ScaleCommand"
@@ -1604,7 +1345,7 @@ Namespace EgtCAM5
Public ReadOnly Property ScaleCommand As ICommand
Get
If m_cmdScale Is Nothing Then
m_cmdScale = New RelayCommand(AddressOf Scale, AddressOf CanScale)
m_cmdScale = New RelayCommand(AddressOf Scale)
End If
Return m_cmdScale
End Get
@@ -1617,13 +1358,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SCALE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanScale(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' ScaleCommand
#Region "Scale3DCommand"
@@ -1634,7 +1368,7 @@ Namespace EgtCAM5
Public ReadOnly Property Scale3DCommand As ICommand
Get
If m_cmdScale3D Is Nothing Then
m_cmdScale3D = New RelayCommand(AddressOf Scale3D, AddressOf CanScale3D)
m_cmdScale3D = New RelayCommand(AddressOf Scale3D)
End If
Return m_cmdScale3D
End Get
@@ -1647,13 +1381,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.SCALE3D)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanScale3D(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' Scale3DCommand
#Region "OffsetCommand"
@@ -1664,7 +1391,7 @@ Namespace EgtCAM5
Public ReadOnly Property OffsetCommand As ICommand
Get
If m_cmdOffset Is Nothing Then
m_cmdOffset = New RelayCommand(AddressOf Offset, AddressOf CanOffset)
m_cmdOffset = New RelayCommand(AddressOf Offset)
End If
Return m_cmdOffset
End Get
@@ -1677,19 +1404,19 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECUTECOMMAND, Controller.CMD.OFFSET)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanOffset(ByVal param As Object) As Boolean
Return bSelOk
End Function
#End Region ' OffsetCommand
#End Region ' Commands
Private Sub OnIdle()
CommandManager.InvalidateRequerySuggested()
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW Then
Application.Msn.NotifyColleagues(Application.GETCURRLAYER)
bLayerOk = m_CurrentLayer <> GDB_ID.NULL
If Not IniFile.m_ProjectSceneContext = 0 Then
bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL
bLayerOkAndSelOk = m_bLayerOk And m_bSelOk
End If
End If
End Sub
End Class
@@ -40,7 +40,7 @@ Namespace EgtCAM5
Public ReadOnly Property ExecCommand As ICommand
Get
If m_cmdExec Is Nothing Then
m_cmdExec = New RelayCommand(AddressOf Exec, AddressOf CanExec)
m_cmdExec = New RelayCommand(AddressOf Exec)
End If
Return m_cmdExec
End Get
@@ -53,13 +53,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXECSCRIPT, String.Empty)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanExec(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' ExecCommand
#Region "OpenMruScriptCommand"
+13 -104
View File
@@ -79,7 +79,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneTopCommand As ICommand
Get
If m_cmdCPlaneTop Is Nothing Then
m_cmdCPlaneTop = New RelayCommand(AddressOf CPlaneTop, AddressOf CanCPlaneTop)
m_cmdCPlaneTop = New RelayCommand(AddressOf CPlaneTop)
End If
Return m_cmdCPlaneTop
End Get
@@ -92,13 +92,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANETOP)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneTop(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneTopCommand
#Region "CPlaneFrontCommand"
@@ -109,7 +102,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneFrontCommand As ICommand
Get
If m_cmdCPlaneFront Is Nothing Then
m_cmdCPlaneFront = New RelayCommand(AddressOf CPlaneFront, AddressOf CanCPlaneFront)
m_cmdCPlaneFront = New RelayCommand(AddressOf CPlaneFront)
End If
Return m_cmdCPlaneFront
End Get
@@ -122,13 +115,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEFRONT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneFront(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneFrontCommand
#Region "CPlaneRightCommand"
@@ -139,7 +125,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneRightCommand As ICommand
Get
If m_cmdCPlaneRight Is Nothing Then
m_cmdCPlaneRight = New RelayCommand(AddressOf CPlaneRight, AddressOf CanCPlaneRight)
m_cmdCPlaneRight = New RelayCommand(AddressOf CPlaneRight)
End If
Return m_cmdCPlaneRight
End Get
@@ -152,13 +138,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANERIGHT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneRight(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneRightCommand
#Region "CPlaneBackCommand"
@@ -169,7 +148,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneBackCommand As ICommand
Get
If m_cmdCPlaneBack Is Nothing Then
m_cmdCPlaneBack = New RelayCommand(AddressOf CPlaneBack, AddressOf CanCPlaneBack)
m_cmdCPlaneBack = New RelayCommand(AddressOf CPlaneBack)
End If
Return m_cmdCPlaneBack
End Get
@@ -182,13 +161,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEBACK)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneBack(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneBackCommand
#Region "CPlaneLeftCommand"
@@ -199,7 +171,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneLeftCommand As ICommand
Get
If m_cmdCPlaneLeft Is Nothing Then
m_cmdCPlaneLeft = New RelayCommand(AddressOf CPlaneLeft, AddressOf CanCPlaneLeft)
m_cmdCPlaneLeft = New RelayCommand(AddressOf CPlaneLeft)
End If
Return m_cmdCPlaneLeft
End Get
@@ -212,13 +184,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANELEFT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneLeft(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneLeftCommand
#Region "CPlaneBottomCommand"
@@ -229,7 +194,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneBottomCommand As ICommand
Get
If m_cmdCPlaneBottom Is Nothing Then
m_cmdCPlaneBottom = New RelayCommand(AddressOf CPlaneBottom, AddressOf CanCPlaneBottom)
m_cmdCPlaneBottom = New RelayCommand(AddressOf CPlaneBottom)
End If
Return m_cmdCPlaneBottom
End Get
@@ -242,13 +207,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEBOTTOM)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneBottom(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneBottomCommand
#Region "CPlaneViewCommand"
@@ -259,7 +217,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneViewCommand As ICommand
Get
If m_cmdCPlaneView Is Nothing Then
m_cmdCPlaneView = New RelayCommand(AddressOf CPlaneView, AddressOf CanCPlaneView)
m_cmdCPlaneView = New RelayCommand(AddressOf CPlaneView)
End If
Return m_cmdCPlaneView
End Get
@@ -272,13 +230,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEVIEW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneView(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneViewCommand
#Region "CPlaneElevationCommand"
@@ -289,7 +240,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneElevationCommand As ICommand
Get
If m_cmdCPlaneElevation Is Nothing Then
m_cmdCPlaneElevation = New RelayCommand(AddressOf CPlaneElevation, AddressOf CanCPlaneElevation)
m_cmdCPlaneElevation = New RelayCommand(AddressOf CPlaneElevation)
End If
Return m_cmdCPlaneElevation
End Get
@@ -302,13 +253,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEELEVATION)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneElevation(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneElevationCommand
#Region "CPlaneOriginCommand"
@@ -319,7 +263,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneOriginCommand As ICommand
Get
If m_cmdCPlaneOrigin Is Nothing Then
m_cmdCPlaneOrigin = New RelayCommand(AddressOf CPlaneOrigin, AddressOf CanCPlaneOrigin)
m_cmdCPlaneOrigin = New RelayCommand(AddressOf CPlaneOrigin)
End If
Return m_cmdCPlaneOrigin
End Get
@@ -332,13 +276,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEORIGIN)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneOrigin(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneOriginCommand
#Region "CPlaneRotateCommand"
@@ -349,7 +286,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneRotateCommand As ICommand
Get
If m_cmdCPlaneRotate Is Nothing Then
m_cmdCPlaneRotate = New RelayCommand(AddressOf CPlaneRotate, AddressOf CanCPlaneRotate)
m_cmdCPlaneRotate = New RelayCommand(AddressOf CPlaneRotate)
End If
Return m_cmdCPlaneRotate
End Get
@@ -362,13 +299,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEROTATE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneRotate(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneRotateCommand
#Region "CPlane3PCommand"
@@ -379,7 +309,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlane3PCommand As ICommand
Get
If m_cmdCPlane3P Is Nothing Then
m_cmdCPlane3P = New RelayCommand(AddressOf CPlane3P, AddressOf CanCPlane3P)
m_cmdCPlane3P = New RelayCommand(AddressOf CPlane3P)
End If
Return m_cmdCPlane3P
End Get
@@ -392,13 +322,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANE3P)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlane3P(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlane3PCommand
#Region "CPlanePerpObjCommand"
@@ -409,7 +332,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlanePerpObjCommand As ICommand
Get
If m_cmdCPlanePerpObj Is Nothing Then
m_cmdCPlanePerpObj = New RelayCommand(AddressOf CPlanePerpObj, AddressOf CanCPlanePerpObj)
m_cmdCPlanePerpObj = New RelayCommand(AddressOf CPlanePerpObj)
End If
Return m_cmdCPlanePerpObj
End Get
@@ -422,13 +345,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEPERPOBJ)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlanePerpObj(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlanePerpObjCommand
#Region "CPlaneObjCommand"
@@ -439,7 +355,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneObjCommand As ICommand
Get
If m_cmdCPlaneObj Is Nothing Then
m_cmdCPlaneObj = New RelayCommand(AddressOf CPlaneObj, AddressOf CanCPlaneObj)
m_cmdCPlaneObj = New RelayCommand(AddressOf CPlaneObj)
End If
Return m_cmdCPlaneObj
End Get
@@ -452,13 +368,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEOBJ)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneObj(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneObjCommand
#End Region ' COMMANDS
@@ -43,8 +43,10 @@ Public Class MachineAxis
Return m_Token
End Get
Set(value As String)
m_Token = value
NotifyPropertyChanged("Token")
If value <> m_Token Then
m_Token = value
NotifyPropertyChanged("Token")
End If
End Set
End Property
@@ -422,6 +422,7 @@ Namespace EgtCAM5
Private Sub ExecSim()
EgtSimStart()
EgtSimSetStep(SliderValue * m_SliderX)
Dim nShowDataCounter As Integer = 0
While m_nStatus <> SIM_ST.ST_STOP
' Se simulazione in svolgimento
If m_nStatus = SIM_ST.ST_PLAY Or m_nStatus = SIM_ST.ST_STEP Then
@@ -459,14 +460,21 @@ Namespace EgtCAM5
End Select
End If
' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
'UpdateMachView()
UpdateMachView()
' Aggiorno visualizzazione
EgtDraw()
' Aggiorno dati CNC
'If nShowDataCounter = 10 Then
ShowCncData()
' nShowDataCounter = 0
'ElseIf nShowDataCounter > 10 Then
' nShowDataCounter = 0
'Else
' nShowDataCounter += 1
'End If
Else
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
System.Threading.Thread.Sleep(1)
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
System.Threading.Thread.Sleep(1)
End If
' Costringo ad aggiornare UI
UpdateUI()
@@ -56,7 +56,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneViewCommand As ICommand
Get
If m_cmdCPlaneView Is Nothing Then
m_cmdCPlaneView = New RelayCommand(AddressOf CPlaneView, AddressOf CanCPlaneView)
m_cmdCPlaneView = New RelayCommand(AddressOf CPlaneView)
End If
Return m_cmdCPlaneView
End Get
@@ -69,13 +69,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEVIEW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneView(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneViewCommand
#Region "CPlaneRotateCommand"
@@ -86,7 +79,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneRotateCommand As ICommand
Get
If m_cmdCPlaneRotate Is Nothing Then
m_cmdCPlaneRotate = New RelayCommand(AddressOf CPlaneRotate, AddressOf CanCPlaneRotate)
m_cmdCPlaneRotate = New RelayCommand(AddressOf CPlaneRotate)
End If
Return m_cmdCPlaneRotate
End Get
@@ -99,13 +92,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEROTATE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneRotate(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneRotateCommand
#Region "CPlane3PCommand"
@@ -116,7 +102,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlane3PCommand As ICommand
Get
If m_cmdCPlane3P Is Nothing Then
m_cmdCPlane3P = New RelayCommand(AddressOf CPlane3P, AddressOf CanCPlane3P)
m_cmdCPlane3P = New RelayCommand(AddressOf CPlane3P)
End If
Return m_cmdCPlane3P
End Get
@@ -129,13 +115,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANE3P)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlane3P(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlane3PCommand
#Region "CPlanePerpObjCommand"
@@ -146,7 +125,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlanePerpObjCommand As ICommand
Get
If m_cmdCPlanePerpObj Is Nothing Then
m_cmdCPlanePerpObj = New RelayCommand(AddressOf CPlanePerpObj, AddressOf CanCPlanePerpObj)
m_cmdCPlanePerpObj = New RelayCommand(AddressOf CPlanePerpObj)
End If
Return m_cmdCPlanePerpObj
End Get
@@ -159,13 +138,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEPERPOBJ)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlanePerpObj(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlanePerpObjCommand
#Region "CPlaneObjCommand"
@@ -176,7 +148,7 @@ Namespace EgtCAM5
Public ReadOnly Property CPlaneObjCommand As ICommand
Get
If m_cmdCPlaneObj Is Nothing Then
m_cmdCPlaneObj = New RelayCommand(AddressOf CPlaneObj, AddressOf CanCPlaneObj)
m_cmdCPlaneObj = New RelayCommand(AddressOf CPlaneObj)
End If
Return m_cmdCPlaneObj
End Get
@@ -189,13 +161,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.CPLANEOBJ)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanCPlaneObj(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CPlaneObjCommand
#End Region ' COMMANDS
@@ -67,7 +67,7 @@ Namespace EgtCAM5
Public ReadOnly Property ZoomInCommand As ICommand
Get
If m_cmdZoomIn Is Nothing Then
m_cmdZoomIn = New RelayCommand(AddressOf ZoomIn, AddressOf CanZoomIn)
m_cmdZoomIn = New RelayCommand(AddressOf ZoomIn)
End If
Return m_cmdZoomIn
End Get
@@ -80,13 +80,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.ZOOMIN)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanZoomIn(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' ZoomInCommand
#Region "ZoomOutCommand"
@@ -97,7 +90,7 @@ Namespace EgtCAM5
Public ReadOnly Property ZoomOutCommand As ICommand
Get
If m_cmdZoomOut Is Nothing Then
m_cmdZoomOut = New RelayCommand(AddressOf ZoomOut, AddressOf CanZoomOut)
m_cmdZoomOut = New RelayCommand(AddressOf ZoomOut)
End If
Return m_cmdZoomOut
End Get
@@ -110,13 +103,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.ZOOMOUT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanZoomOut(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' ZoomOutCommand
#Region "IsoViewSECommand"
@@ -127,7 +113,7 @@ Namespace EgtCAM5
Public ReadOnly Property IsoViewSECommand As ICommand
Get
If m_cmdIsoViewSE Is Nothing Then
m_cmdIsoViewSE = New RelayCommand(AddressOf IsoViewSE, AddressOf CanIsoViewSE)
m_cmdIsoViewSE = New RelayCommand(AddressOf IsoViewSE)
End If
Return m_cmdIsoViewSE
End Get
@@ -140,13 +126,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.ISOVIEWSE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanIsoViewSE(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' IsoViewSECommand
#Region "IsoViewNECommand"
@@ -157,7 +136,7 @@ Namespace EgtCAM5
Public ReadOnly Property IsoViewNECommand As ICommand
Get
If m_cmdIsoViewNE Is Nothing Then
m_cmdIsoViewNE = New RelayCommand(AddressOf IsoViewNE, AddressOf CanIsoViewNE)
m_cmdIsoViewNE = New RelayCommand(AddressOf IsoViewNE)
End If
Return m_cmdIsoViewNE
End Get
@@ -170,13 +149,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.ISOVIEWNE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanIsoViewNE(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' IsoViewNECommand
#Region "IsoViewNWCommand"
@@ -187,7 +159,7 @@ Namespace EgtCAM5
Public ReadOnly Property IsoViewNWCommand As ICommand
Get
If m_cmdIsoViewNW Is Nothing Then
m_cmdIsoViewNW = New RelayCommand(AddressOf IsoViewNW, AddressOf CanIsoViewNW)
m_cmdIsoViewNW = New RelayCommand(AddressOf IsoViewNW)
End If
Return m_cmdIsoViewNW
End Get
@@ -200,13 +172,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.ISOVIEWNW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanIsoViewNW(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' IsoViewNWCommand
#Region "ViewToCPlaneCommand"
@@ -217,7 +182,7 @@ Namespace EgtCAM5
Public ReadOnly Property ViewToCPlaneCommand As ICommand
Get
If m_cmdViewToCPlane Is Nothing Then
m_cmdViewToCPlane = New RelayCommand(AddressOf ViewToCPlane, AddressOf CanViewToCPlane)
m_cmdViewToCPlane = New RelayCommand(AddressOf ViewToCPlane)
End If
Return m_cmdViewToCPlane
End Get
@@ -230,13 +195,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.VIEWTOCPLANE)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanViewToCPlane(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' ViewToCPlaneCommand
#End Region ' COMMANDS
+7 -56
View File
@@ -74,7 +74,7 @@ Namespace EgtCAM5
Public ReadOnly Property ZoomAllCommand As ICommand
Get
If m_cmdZoomAll Is Nothing Then
m_cmdZoomAll = New RelayCommand(AddressOf ZoomAll, AddressOf CanZoomAll)
m_cmdZoomAll = New RelayCommand(AddressOf ZoomAll)
End If
Return m_cmdZoomAll
End Get
@@ -87,13 +87,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.ZOOMALL)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanZoomAll(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' ZoomAllCommand
#Region "TopViewCommand"
@@ -104,7 +97,7 @@ Namespace EgtCAM5
Public ReadOnly Property TopViewCommand As ICommand
Get
If m_cmdTopView Is Nothing Then
m_cmdTopView = New RelayCommand(AddressOf TopView, AddressOf CanTopView)
m_cmdTopView = New RelayCommand(AddressOf TopView)
End If
Return m_cmdTopView
End Get
@@ -117,13 +110,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.TOPVIEW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanTopView(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' TopViewCommand
#Region "FrontViewCommand"
@@ -134,7 +120,7 @@ Namespace EgtCAM5
Public ReadOnly Property FrontViewCommand As ICommand
Get
If m_cmdFrontView Is Nothing Then
m_cmdFrontView = New RelayCommand(AddressOf FrontView, AddressOf CanFrontView)
m_cmdFrontView = New RelayCommand(AddressOf FrontView)
End If
Return m_cmdFrontView
End Get
@@ -147,13 +133,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.FRONTVIEW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanFrontView(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' FrontViewCommand
#Region "LeftViewCommand"
@@ -164,7 +143,7 @@ Namespace EgtCAM5
Public ReadOnly Property LeftViewCommand As ICommand
Get
If m_cmdLeftView Is Nothing Then
m_cmdLeftView = New RelayCommand(AddressOf LeftView, AddressOf CanLeftView)
m_cmdLeftView = New RelayCommand(AddressOf LeftView)
End If
Return m_cmdLeftView
End Get
@@ -177,13 +156,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.LEFTVIEW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanLeftView(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' LeftViewCommand
#Region "BackViewCommand"
@@ -194,7 +166,7 @@ Namespace EgtCAM5
Public ReadOnly Property BackViewCommand As ICommand
Get
If m_cmdBackView Is Nothing Then
m_cmdBackView = New RelayCommand(AddressOf BackView, AddressOf CanBackView)
m_cmdBackView = New RelayCommand(AddressOf BackView)
End If
Return m_cmdBackView
End Get
@@ -207,13 +179,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.BACKVIEW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanBackView(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' BackViewCommand
#Region "RightViewCommand"
@@ -224,7 +189,7 @@ Namespace EgtCAM5
Public ReadOnly Property RightViewCommand As ICommand
Get
If m_cmdRightView Is Nothing Then
m_cmdRightView = New RelayCommand(AddressOf RightView, AddressOf CanRightView)
m_cmdRightView = New RelayCommand(AddressOf RightView)
End If
Return m_cmdRightView
End Get
@@ -237,13 +202,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.RIGHTVIEW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanRightView(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' RightViewCommand
#Region "IsoViewSWCommand"
@@ -254,7 +212,7 @@ Namespace EgtCAM5
Public ReadOnly Property IsoViewSWCommand As ICommand
Get
If m_cmdIsoViewSW Is Nothing Then
m_cmdIsoViewSW = New RelayCommand(AddressOf IsoViewSW, AddressOf CanIsoViewSW)
m_cmdIsoViewSW = New RelayCommand(AddressOf IsoViewSW)
End If
Return m_cmdIsoViewSW
End Get
@@ -267,13 +225,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.ISOVIEWSW)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanIsoViewSW(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' IsoViewSWCommand
#End Region ' COMMANDS
+2 -28
View File
@@ -143,7 +143,7 @@ Namespace EgtCAM5
Machining = EgtGetNextOperation(Machining)
End While
' Creo lista utensili per grafica
Dim ActiveToolsFamilies() As ToolsFamily = ReadActiveToolsFamilies()
Dim ActiveToolsFamilies() As ToolsFamily = MachineModel.ReadActiveToolsFamilies()
For Index = 0 To ActiveToolsFamilies.Count - 1
Dim FamilyToolItem As New FamilyToolItem(ActiveToolsFamilies(Index).FamilyName, ActiveToolsFamilies(Index).FamilyId)
m_ToolsList.Add(FamilyToolItem)
@@ -185,32 +185,6 @@ Namespace EgtCAM5
Next
End Sub
''' <summary>
''' Method that search the machines in the correct folder and add to the MachinesList those valid.
''' </summary>
Private Function ReadActiveToolsFamilies() As ToolsFamily()
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.DRILLBIT, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 1)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.SAWBLADE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 2)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MILL, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 3)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MORTISE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 4)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.COMPO, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 5)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_CHISEL, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.CHISEL, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 9)})
End If
Return ActiveToolsFamiliesList.ToArray
End Function
Private Sub LoadMachinePositions()
' recupero il gruppo del setup
Dim nSetUpGroup As Integer = EgtGetCurrSetup()
@@ -604,7 +578,7 @@ Namespace EgtCAM5
SaveFileDialogView.Extension = ".stu"
SaveFileDialogView.Directory = sDir
SaveFileDialogView.FileName = String.Empty
If Not SaveFileDialogView.ShowDialog Then
If Not SaveFileDialogView.EgtShowDialog Then
Return
End If
sPath = SaveFileDialogView.FileName
+1 -41
View File
@@ -269,10 +269,6 @@ Namespace EgtCAM5
LoadSelectedMachineTools()
'Application.Msn.Register(Application.REMOVETOOL, Sub(ToolToRemove As ToolTreeViewItem)
' Remove(ToolToRemove)
' End Sub)
' carico lista teste
ToolTreeViewItem.m_HeadList.Clear()
Dim sHeads As String = String.Empty
@@ -348,7 +344,7 @@ Namespace EgtCAM5
''' Method that search tools for the currently selected Machine and add it to the ToolsList.
''' </summary>
Private Sub LoadSelectedMachineTools()
Dim ActiveToolsFamilies() As ToolsFamily = ReadActiveToolsFamilies()
Dim ActiveToolsFamilies() As ToolsFamily = MachineModel.ReadActiveToolsFamilies()
For Each ToolsFamily In ActiveToolsFamilies
Dim FamilyTreeView As New FamilyToolTreeViewItem(ToolsFamily.FamilyName, ToolsFamily.FamilyId)
ToolsList.Add(FamilyTreeView)
@@ -370,42 +366,6 @@ Namespace EgtCAM5
End Sub
''' <summary>
''' Method that search the machines in the correct folder and add to the MachinesList those valid.
''' </summary>
Private Function ReadActiveToolsFamilies() As ToolsFamily()
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.DRILLBIT, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 1)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.SAWBLADE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 2)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MILL, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 3)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.MORTISE, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 4)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_CHISEL, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.CHISEL, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 9)})
End If
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, m_sCurrMachIniFilePath) <> 0 Then
ActiveToolsFamiliesList.Add(New ToolsFamily With {.FamilyId = MCH_TF.COMPO, .FamilyName = EgtMsg(MSG_TOOLSDBPAGE + 5)})
End If
Return ActiveToolsFamiliesList.ToArray
End Function
''' <summary>
''' Structure that represent a tool's family, containing family type and family name
''' </summary>
Structure ToolsFamily
Friend FamilyId As MCH_TF
Friend FamilyName As String
End Structure
#End Region ' Methods
#Region "COMMANDS"
+9 -5
View File
@@ -4,11 +4,12 @@
<!--Barra superiore dei comandi-->
<StackPanel Orientation="Horizontal">
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}">
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}"
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
ContextMenuService.Placement="Bottom">
ContextMenuService.Placement="Bottom" IsEnabled="{Binding DrawIsChecked}">
<Button.ContextMenu>
<ContextMenu ItemsSource="{Binding MruFileNames}" ItemContainerStyle="{StaticResource MruFileItem}">
</ContextMenu>
@@ -21,13 +22,16 @@
<Button Command="{Binding SaveAsCommand}" ToolTip="{Binding SaveAsToolTip}">
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding InsertCommand}" ToolTip="{Binding InsertToolTip}">
<Button Command="{Binding InsertCommand}" ToolTip="{Binding InsertToolTip}"
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/Insert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ImportCommand}" ToolTip="{Binding ImportToolTip}">
<Button Command="{Binding ImportCommand}" ToolTip="{Binding ImportToolTip}"
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}">
<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
IsEnabled="{Binding DrawIsChecked}">
<Image Source="/Resources/TopCommandBar/Export.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}">
+7 -48
View File
@@ -101,6 +101,7 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.LOADOBJTREE)
IniFile.m_ProjectMode = ProjectModeOpt.DRAW
End If
OnPropertyChanged("DrawIsChecked")
End If
End Set
End Property
@@ -163,7 +164,7 @@ Namespace EgtCAM5
Public ReadOnly Property NewCommand As ICommand
Get
If m_cmdNew Is Nothing Then
m_cmdNew = New RelayCommand(AddressOf NewCmd, AddressOf CanNew)
m_cmdNew = New RelayCommand(AddressOf NewCmd)
End If
Return m_cmdNew
End Get
@@ -177,13 +178,6 @@ Namespace EgtCAM5
OnPropertyChanged("MruFileNames")
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanNew(ByVal param As Object) As Boolean
Return m_DrawIsChecked
End Function
#End Region ' NewCommand
#Region "OpenCommand"
@@ -194,7 +188,7 @@ Namespace EgtCAM5
Public ReadOnly Property OpenCommand As ICommand
Get
If m_cmdOpen Is Nothing Then
m_cmdOpen = New RelayCommand(AddressOf Open, AddressOf CanOpen)
m_cmdOpen = New RelayCommand(AddressOf Open)
End If
Return m_cmdOpen
End Get
@@ -207,13 +201,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.OPENPROJECT, String.Empty)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanOpen(ByVal param As Object) As Boolean
Return m_DrawIsChecked
End Function
#End Region ' OpenCommand
#Region "OpenMruFileCommand"
@@ -293,7 +280,7 @@ Namespace EgtCAM5
Public ReadOnly Property InsertCommand As ICommand
Get
If m_cmdInsert Is Nothing Then
m_cmdInsert = New RelayCommand(AddressOf Insert, AddressOf CanInsert)
m_cmdInsert = New RelayCommand(AddressOf Insert)
End If
Return m_cmdInsert
End Get
@@ -306,13 +293,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.INSERTPROJECT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanInsert(ByVal param As Object) As Boolean
Return m_DrawIsChecked
End Function
#End Region ' InsertCommand
#Region "ImportCommand"
@@ -323,7 +303,7 @@ Namespace EgtCAM5
Public ReadOnly Property ImportCommand As ICommand
Get
If m_cmdImport Is Nothing Then
m_cmdImport = New RelayCommand(AddressOf Import, AddressOf CanImport)
m_cmdImport = New RelayCommand(AddressOf Import)
End If
Return m_cmdImport
End Get
@@ -336,13 +316,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.IMPORTPROJECT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanImport(ByVal param As Object) As Boolean
Return m_DrawIsChecked
End Function
#End Region ' ImportCommand
#Region "ExportCommand"
@@ -353,7 +326,7 @@ Namespace EgtCAM5
Public ReadOnly Property ExportCommand As ICommand
Get
If m_cmdExport Is Nothing Then
m_cmdExport = New RelayCommand(AddressOf Export, AddressOf CanExport)
m_cmdExport = New RelayCommand(AddressOf Export)
End If
Return m_cmdExport
End Get
@@ -366,13 +339,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.EXPORTPROJECT)
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanExport(ByVal param As Object) As Boolean
Return m_DrawIsChecked
End Function
#End Region ' ExportCommand
#Region "OptionsCommand"
@@ -383,7 +349,7 @@ Namespace EgtCAM5
Public ReadOnly Property OptionsCommand As ICommand
Get
If m_cmdOptions Is Nothing Then
m_cmdOptions = New RelayCommand(AddressOf Options, AddressOf CanOptions)
m_cmdOptions = New RelayCommand(AddressOf Options)
End If
Return m_cmdOptions
End Get
@@ -401,13 +367,6 @@ Namespace EgtCAM5
OptionsWindow.ShowDialog()
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanOptions(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' OptionsCommand
#End Region ' Commands
-10
View File
@@ -89,16 +89,6 @@ Public Module Utility
End Structure
''' <summary>
''' Structure that represent a tool's family, containing family type and family name
''' </summary>
Structure ToolsFamily
Friend FamilyId As MCH_TF
Friend FamilyName As String
End Structure
#Region "Positioning test"
Public Class WinPos