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 e3297ce..df3756a 100644 --- a/Icarus/ControllerInputPanel/ControllerInputPanelV.xaml +++ b/Icarus/ControllerInputPanel/ControllerInputPanelV.xaml @@ -25,7 +25,7 @@ Margin="2.5,0,2.5,0" Style="{StaticResource ControllerInput_TextBlock}"/> @@ -52,14 +52,14 @@ Visibility="{Binding ShowBtn_Visibility}" Content="{Binding ShowMsg}" Margin="2.5,0,2.5,0" - Style="{StaticResource EgtWPFLib5_InputButton}"/> + Style="{StaticResource RightPanel_Button}"/> diff --git a/Icarus/DispositionPanel/DispositionPanelV.xaml b/Icarus/DispositionPanel/DispositionPanelV.xaml index 6f85827..dddce66 100644 --- a/Icarus/DispositionPanel/DispositionPanelV.xaml +++ b/Icarus/DispositionPanel/DispositionPanelV.xaml @@ -53,10 +53,10 @@ - + diff --git a/Icarus/Icarus.vbproj b/Icarus/Icarus.vbproj index 5b4ffc5..fc3c553 100644 --- a/Icarus/Icarus.vbproj +++ b/Icarus/Icarus.vbproj @@ -118,10 +118,6 @@ ChooseMachineWndV.xaml - - ChooseReferenceWndV.xaml - - @@ -169,6 +165,10 @@ MachinePanelV.xaml + + MachineViewPanelV.xaml + + MachiningDbV.xaml @@ -322,10 +322,6 @@ MSBuild:Compile Designer - - Designer - MSBuild:Compile - MSBuild:Compile Designer @@ -347,8 +343,8 @@ Designer - MSBuild:Compile Designer + XamlIntelliSenseFileGenerator MSBuild:Compile @@ -362,6 +358,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -740,6 +740,15 @@ + + + + + + + + + IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe diff --git a/Icarus/MachineViewPanel/MachineViewPanelV.xaml b/Icarus/MachineViewPanel/MachineViewPanelV.xaml new file mode 100644 index 0000000..82dbd5d --- /dev/null +++ b/Icarus/MachineViewPanel/MachineViewPanelV.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff --git a/Icarus/MachineViewPanel/MachineViewPanelV.xaml.vb b/Icarus/MachineViewPanel/MachineViewPanelV.xaml.vb new file mode 100644 index 0000000..eeb9d98 --- /dev/null +++ b/Icarus/MachineViewPanel/MachineViewPanelV.xaml.vb @@ -0,0 +1,3 @@ +Public Class MachineViewPanelV + +End Class diff --git a/Icarus/MachineViewPanel/MachineViewPanelVM.vb b/Icarus/MachineViewPanel/MachineViewPanelVM.vb new file mode 100644 index 0000000..356ec36 --- /dev/null +++ b/Icarus/MachineViewPanel/MachineViewPanelVM.vb @@ -0,0 +1,35 @@ +Imports EgtUILib +Imports EgtWPFLib5 + +Public Class MachineViewPanelVM + Inherits VMBase + + Private m_nSelMachView As MCH_LOOK + Public Property ghSelMachView As Integer + Get + Return m_nSelMachView - 1 + End Get + Set(value As Integer) + m_nSelMachView = value + 1 + If Not IsNothing(Map.refSimulationPanelVM) Then + Dim MySimul As SimulationVM = Map.refSimulationPanelVM.MySimul + MySimul.SetMachLook(m_nSelMachView) + ' aggiorno lo stato della macchina e la sua visualizzazione + EgtSetMachineLook(MySimul.GetMachLook()) + WriteMainPrivateProfileString(S_SIMUL, K_MACHVIEWMODE, m_nSelMachView) + End If + EgtDraw() + End Set + End Property + Friend Sub SetSelViewSlider(value As MCH_LOOK) + m_nSelMachView = value + NotifyPropertyChanged(NameOf(ghSelMachView)) + End Sub + + Sub New() + ' leggo vista macchina da ini e la imposto + Dim DefaultMachViewMode As Integer = GetMainPrivateProfileInt(S_SIMUL, K_MACHVIEWMODE, 3) + SetSelViewSlider(DefaultMachViewMode) + End Sub + +End Class diff --git a/Icarus/MachiningDb/MachiningDbV.xaml b/Icarus/MachiningDb/MachiningDbV.xaml index 49a1044..bbd0399 100644 --- a/Icarus/MachiningDb/MachiningDbV.xaml +++ b/Icarus/MachiningDb/MachiningDbV.xaml @@ -73,11 +73,12 @@ HorizontalAlignment="Stretch" Margin="2.5,0,2.5,0" Style="{StaticResource RightPanel_ComboBox}"/> - + diff --git a/Icarus/MainWindow/MainWindowVM.vb b/Icarus/MainWindow/MainWindowVM.vb index c0e9847..af2317d 100644 --- a/Icarus/MainWindow/MainWindowVM.vb +++ b/Icarus/MainWindow/MainWindowVM.vb @@ -274,6 +274,10 @@ Public Class MainWindowVM If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then Return End If + ' gestisco la chiusura della simulazione + If Map.refRightPanelVM.SelPanel = RightPanelVM.Panels.SIMULATION AndAlso Not IsNothing(Map.refSimulationPanelVM) Then + Map.refSimulationPanelVM.MySimul.ResetSimulation() + End If ' Gestisco eventuale file corrente modificato Dim bOk As Boolean = True 'bOk = ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ) diff --git a/Icarus/Project/ProjectV.xaml b/Icarus/Project/ProjectV.xaml index b272969..1a0fe9c 100644 --- a/Icarus/Project/ProjectV.xaml +++ b/Icarus/Project/ProjectV.xaml @@ -96,6 +96,7 @@ + diff --git a/Icarus/Resources/Common/Cancel.png b/Icarus/Resources/Common/Cancel.png new file mode 100644 index 0000000..5736bed Binary files /dev/null and b/Icarus/Resources/Common/Cancel.png differ diff --git a/Icarus/Resources/Common/Ok.png b/Icarus/Resources/Common/Ok.png new file mode 100644 index 0000000..add1335 Binary files /dev/null and b/Icarus/Resources/Common/Ok.png differ diff --git a/Icarus/Resources/ProjectManager/SaveAs.png b/Icarus/Resources/ProjectManager/SaveAs.png index 91c00a3..44dc18f 100644 Binary files a/Icarus/Resources/ProjectManager/SaveAs.png and b/Icarus/Resources/ProjectManager/SaveAs.png differ diff --git a/Icarus/Resources/SimulationPanel/HeadMode.png b/Icarus/Resources/SimulationPanel/HeadMode.png index ff90ba9..d58ee67 100644 Binary files a/Icarus/Resources/SimulationPanel/HeadMode.png and b/Icarus/Resources/SimulationPanel/HeadMode.png differ diff --git a/Icarus/Resources/SimulationPanel/MachMode.png b/Icarus/Resources/SimulationPanel/MachMode.png index 5765f57..95954f6 100644 Binary files a/Icarus/Resources/SimulationPanel/MachMode.png and b/Icarus/Resources/SimulationPanel/MachMode.png differ diff --git a/Icarus/Resources/SimulationPanel/Pause.png b/Icarus/Resources/SimulationPanel/Pause.png index f7c5176..67323bc 100644 Binary files a/Icarus/Resources/SimulationPanel/Pause.png and b/Icarus/Resources/SimulationPanel/Pause.png differ diff --git a/Icarus/Resources/SimulationPanel/Play.png b/Icarus/Resources/SimulationPanel/Play.png index 322e67e..f96d44b 100644 Binary files a/Icarus/Resources/SimulationPanel/Play.png and b/Icarus/Resources/SimulationPanel/Play.png differ diff --git a/Icarus/Resources/SimulationPanel/PlayStep.png b/Icarus/Resources/SimulationPanel/PlayStep.png index 60e8c55..8801e33 100644 Binary files a/Icarus/Resources/SimulationPanel/PlayStep.png and b/Icarus/Resources/SimulationPanel/PlayStep.png differ diff --git a/Icarus/Resources/SimulationPanel/Stop.png b/Icarus/Resources/SimulationPanel/Stop.png index adecf17..94b9f0e 100644 Binary files a/Icarus/Resources/SimulationPanel/Stop.png and b/Icarus/Resources/SimulationPanel/Stop.png differ diff --git a/Icarus/Resources/SimulationPanel/ToolMode.png b/Icarus/Resources/SimulationPanel/ToolMode.png index 199aada..d433135 100644 Binary files a/Icarus/Resources/SimulationPanel/ToolMode.png and b/Icarus/Resources/SimulationPanel/ToolMode.png differ diff --git a/Icarus/Resources/TopPanel/Offset.png b/Icarus/Resources/TopPanel/Offset.png index 998f1b0..508de53 100644 Binary files a/Icarus/Resources/TopPanel/Offset.png and b/Icarus/Resources/TopPanel/Offset.png differ diff --git a/Icarus/Resources/TopPanel/StrandCount.png b/Icarus/Resources/TopPanel/StrandCount.png index b87694d..52a425c 100644 Binary files a/Icarus/Resources/TopPanel/StrandCount.png and b/Icarus/Resources/TopPanel/StrandCount.png differ diff --git a/Icarus/Resources/TopPanel/StrandH.png b/Icarus/Resources/TopPanel/StrandH.png index c29cab5..15df1b6 100644 Binary files a/Icarus/Resources/TopPanel/StrandH.png and b/Icarus/Resources/TopPanel/StrandH.png differ diff --git a/Icarus/Resources/TopPanel/StrandW.png b/Icarus/Resources/TopPanel/StrandW.png index a88756c..5968c91 100644 Binary files a/Icarus/Resources/TopPanel/StrandW.png and b/Icarus/Resources/TopPanel/StrandW.png differ diff --git a/Icarus/SimulationPanel/MySimulation.vb b/Icarus/SimulationPanel/MySimulation.vb index 7308161..15b321c 100644 --- a/Icarus/SimulationPanel/MySimulation.vb +++ b/Icarus/SimulationPanel/MySimulation.vb @@ -26,8 +26,8 @@ Public Class MySimulation #Region "CONSTRUCTOR" Sub New() - SetPlayImagePath("/Resources/SimulTab/Play.png") - SetPauseImagePath("/Resources/SimulTab/Pause.png") + SetPlayImagePath("/Resources/SimulationPanel/Play.png") + SetPauseImagePath("/Resources/SimulationPanel/Pause.png") SetPauseMsg(EgtMsg(90561)) ' Pausa SetStopMsg(EgtMsg(90562)) ' Simulazione interrotta SetHomeMsg(EgtMsg(90564)) ' Home @@ -94,16 +94,16 @@ Public Class MySimulation End Sub Public Overrides Sub OnPostSetSimulationStatus(value As MCH_SIM_ST) - 'If OmagOFFICE.refMainWindowVM.MainWindowM.nUserLevel >= 10 AndAlso - ' (GetStatus() = MCH_SIM_ST.UI_PAUSE OrElse GetStatus() = MCH_SIM_ST.UI_STOP) Then - ' For Index = 0 To MachineAxisList.Count - 1 - ' MachineAxisList(Index).IsReadOnlyAxesValue = False - ' Next - 'Else - ' For Index = 0 To MachineAxisList.Count - 1 - ' MachineAxisList(Index).IsReadOnlyAxesValue = True - ' Next - 'End If + If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 AndAlso + (GetStatus() = MCH_SIM_ST.UI_PAUSE OrElse GetStatus() = MCH_SIM_ST.UI_STOP) Then + For Index = 0 To MachineAxisList.Count - 1 + MachineAxisList(Index).IsReadOnlyAxesValue = False + Next + Else + For Index = 0 To MachineAxisList.Count - 1 + MachineAxisList(Index).IsReadOnlyAxesValue = True + Next + End If End Sub #End Region ' METHODS diff --git a/Icarus/SimulationPanel/SimulationPanelV.xaml b/Icarus/SimulationPanel/SimulationPanelV.xaml index 0f07085..b4566e7 100644 --- a/Icarus/SimulationPanel/SimulationPanelV.xaml +++ b/Icarus/SimulationPanel/SimulationPanelV.xaml @@ -1,8 +1,25 @@ - - + + + + + + + + + + + + + @@ -10,119 +27,121 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + - - - - - - - - + + + - - - - - - - - + diff --git a/Icarus/SimulationPanel/SimulationPanelVM.vb b/Icarus/SimulationPanel/SimulationPanelVM.vb index bc7b974..221d7be 100644 --- a/Icarus/SimulationPanel/SimulationPanelVM.vb +++ b/Icarus/SimulationPanel/SimulationPanelVM.vb @@ -1,6 +1,4 @@ -Imports System.Collections.ObjectModel -Imports System.IO -Imports EgtUILib +Imports EgtUILib Imports EgtWPFLib5 Public Class SimulationPanelVM @@ -8,12 +6,6 @@ Public Class SimulationPanelVM #Region "FIELDS & PROPERTIES" - Public Enum MachViews As Integer - TOOL = 0 - HEAD = 1 - MACHINE = 2 - End Enum - Private m_dPrevAngVertDegView As Double Private m_dPrevAngHorizDegView As Double @@ -28,50 +20,9 @@ Public Class SimulationPanelVM End Set End Property - Private m_MachViewList As New List(Of String)({"Tool", "Head", "Machine"}) - Public ReadOnly Property MachViewList As List(Of String) - Get - Return m_MachViewList - End Get - End Property - - Private m_nSelMachView As MachViews - Public Property nSelMachView As Integer - Get - Return m_nSelMachView - End Get - Set(value As Integer) - m_nSelMachView = value - Select Case m_nSelMachView - Case MachViews.TOOL - ToolMode() - Case MachViews.HEAD - HeadMode() - Case MachViews.MACHINE - MachMode() - End Select - End Set - End Property - Friend Sub SetSelMachView(value As MachViews) - nSelMachView = value - NotifyPropertyChanged(NameOf(nSelMachView)) - End Sub ' Definizione comandi Private m_cmdOk As ICommand - Private m_cmdToolMode As ICommand - Private m_cmdHeadMode As ICommand - Private m_cmdMachMode As ICommand - -#Region "Messages" - - Public ReadOnly Property MachViewMsg As String - Get - Return "View" - End Get - End Property - -#End Region ' Messages #Region "ToolTip" @@ -101,8 +52,6 @@ Public Class SimulationPanelVM ' Creo riferimento a questa classe in OmagOFFICEMap Map.SetRefSimulationPanelVM(Me) MySimul = New MySimulation - ' leggo vista macchina da ini e la imposto - SetSelMachView(MachViews.MACHINE) End Sub #End Region ' CONSTRUCTOR @@ -242,93 +191,6 @@ Public Class SimulationPanelVM #End Region ' Ok -#Region "ToolModeCommand" - - ''' - ''' Returns a command that create a new tool. - ''' - Public ReadOnly Property ToolModeCommand As ICommand - Get - If m_cmdToolMode Is Nothing Then - m_cmdToolMode = New Command(AddressOf ToolMode) - End If - Return m_cmdToolMode - End Get - End Property - - ''' - ''' Creata the new tool. This method is invoked by the NewCommand. - ''' - Public Sub ToolMode() - ' aggiorno lo stato - If MySimul.GetMachLook() <> MCH_LOOK.TAB_TOOL Then - MySimul.SetMachLook(MCH_LOOK.TAB_TOOL) - End If - ' aggiorno lo stato della macchina e la sua visualizzazione - EgtSetMachineLook(MySimul.GetMachLook()) - EgtDraw() - End Sub - -#End Region ' ToolModeCommand - -#Region "HeadModeCommand" - - ''' - ''' Returns a command that create a new tool. - ''' - Public ReadOnly Property HeadModeCommand As ICommand - Get - If m_cmdHeadMode Is Nothing Then - m_cmdHeadMode = New Command(AddressOf HeadMode) - End If - Return m_cmdHeadMode - End Get - End Property - - ''' - ''' Creata the new tool. This method is invoked by the NewCommand. - ''' - Public Sub HeadMode() - ' aggiorno lo stato - If MySimul.GetMachLook() <> MCH_LOOK.TAB_HEAD Then - MySimul.SetMachLook(MCH_LOOK.TAB_HEAD) - End If - ' aggiorno lo stato della macchina e la sua visualizzazione - EgtSetMachineLook(MySimul.GetMachLook()) - EgtDraw() - End Sub - -#End Region ' HeadModeCommand - -#Region "MachModeCommand" - - ''' - ''' Returns a command that create a new tool. - ''' - Public ReadOnly Property MachModeCommand As ICommand - Get - If m_cmdMachMode Is Nothing Then - m_cmdMachMode = New Command(AddressOf MachMode) - End If - Return m_cmdMachMode - End Get - End Property - - ''' - ''' Creata the new tool. This method is invoked by the NewCommand. - ''' - Public Sub MachMode() - ' aggiorno lo stato - If MySimul.GetMachLook() <> MCH_LOOK.ALL Then - MySimul.SetMachLook(MCH_LOOK.ALL) - End If - ' aggiorno lo stato della macchina e la sua visualizzazione - EgtSetMachineLook(MySimul.GetMachLook()) - EgtDraw() - End Sub - -#End Region ' MachModeCommand - #End Region ' COMMANDS End Class diff --git a/Icarus/TopPanel/TopPanelVM.vb b/Icarus/TopPanel/TopPanelVM.vb index 1c9b75e..39aab57 100644 --- a/Icarus/TopPanel/TopPanelVM.vb +++ b/Icarus/TopPanel/TopPanelVM.vb @@ -616,11 +616,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/Utility/Dictionary.xaml b/Icarus/Utility/Dictionary.xaml index db9e7f5..4885569 100644 --- a/Icarus/Utility/Dictionary.xaml +++ b/Icarus/Utility/Dictionary.xaml @@ -46,6 +46,7 @@ + @@ -768,7 +774,7 @@ - + - + + + @@ -800,6 +812,18 @@ + + + + + @@ -854,6 +886,13 @@ + + @@ -861,7 +900,13 @@ - + + + @@ -2949,9 +3003,9 @@ Visibility="Collapsed"/>