diff --git a/AboutBoxWindow/AboutBoxView.xaml b/AboutBoxWindow/AboutBoxView.xaml index cf409be..19d0888 100644 --- a/AboutBoxWindow/AboutBoxView.xaml +++ b/AboutBoxWindow/AboutBoxView.xaml @@ -1,8 +1,8 @@  + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize" + ShowInTaskbar="False" WindowStartupLocation="CenterOwner"> @@ -35,15 +35,15 @@ + VerticalAlignment="Center" FontSize="18" /> + VerticalAlignment="Center" FontSize="18"/> + VerticalAlignment="Center" FontSize="12" /> + VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/> @@ -103,93 +103,93 @@ @@ -200,123 +200,123 @@ - - + + + @@ -327,8 +327,8 @@ diff --git a/DrawPanel/DrawPanelVM.vb b/DrawPanel/DrawPanelVM.vb index 20ffab5..796b07c 100644 --- a/DrawPanel/DrawPanelVM.vb +++ b/DrawPanel/DrawPanelVM.vb @@ -425,7 +425,6 @@ Public Class DrawPanelVM OnPropertyChanged(NameOf(DrawPanel_Visibility)) End Sub - #Region "Button state" Private m_bLayerOk As Boolean @@ -435,7 +434,7 @@ Public Class DrawPanelVM End Get Set(value As Boolean) m_bLayerOk = value - OnPropertyChanged("bLayerOk") + OnPropertyChanged(NameOf(bLayerOk)) End Set End Property Private m_bSelOk As Boolean @@ -445,7 +444,7 @@ Public Class DrawPanelVM End Get Set(value As Boolean) m_bSelOk = value - OnPropertyChanged("bSelOk") + OnPropertyChanged(NameOf(bSelOk)) End Set End Property Private m_bLayerOkAndSelOk As Boolean @@ -455,7 +454,7 @@ Public Class DrawPanelVM End Get Set(value As Boolean) m_bLayerOkAndSelOk = value - OnPropertyChanged("bLayerOkAndSelOk") + OnPropertyChanged(NameOf(bLayerOkAndSelOk)) End Set End Property diff --git a/EstimationsDetailsWnd/EstimationsDetailsWndV.xaml b/EstimationsDetailsWnd/EstimationsDetailsWndV.xaml index 833abd1..78f9006 100644 --- a/EstimationsDetailsWnd/EstimationsDetailsWndV.xaml +++ b/EstimationsDetailsWnd/EstimationsDetailsWndV.xaml @@ -1,14 +1,14 @@  - + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" + Title="{Binding TitleMsg}" + Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}" + WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="32" + Width="300" Height="300" + IsResizable="True" + IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"> + - + diff --git a/EstimationsDetailsWnd/EstimationsDetailsWndVM.vb b/EstimationsDetailsWnd/EstimationsDetailsWndVM.vb index 755ea61..73cb544 100644 --- a/EstimationsDetailsWnd/EstimationsDetailsWndVM.vb +++ b/EstimationsDetailsWnd/EstimationsDetailsWndVM.vb @@ -22,10 +22,6 @@ Public Class EstimationsDetailsWndVM #End Region ' Messages - ' Definizione comandi - Private m_cmdOk As ICommand - Private m_cmdCancel As ICommand - #End Region 'FIELDS & PROPERTIES #Region "CONSTRUCTOR" @@ -36,8 +32,4 @@ Public Class EstimationsDetailsWndVM #End Region ' CONSTRUCTOR -#Region "METHODS" - -#End Region ' METHODS - End Class diff --git a/ExecutePanel/ExecutePanelV.xaml b/ExecutePanel/ExecutePanelV.xaml index d914077..c41b52b 100644 --- a/ExecutePanel/ExecutePanelV.xaml +++ b/ExecutePanel/ExecutePanelV.xaml @@ -6,7 +6,7 @@ - + diff --git a/MachinePanel/MyMachinePanelVM.vb b/MachinePanel/MyMachinePanelVM.vb index be7d48a..bedf083 100644 --- a/MachinePanel/MyMachinePanelVM.vb +++ b/MachinePanel/MyMachinePanelVM.vb @@ -64,8 +64,7 @@ Public Class MyMachinePanelVM IniFile.m_sCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools" IniFile.m_sCurrMachSetUpDirPath = m_SelectedMachine.MachineDirPath & "\SetUp" IniFile.m_sCurrMachScriptsDirPath = m_SelectedMachine.MachineDirPath & "\Scripts" - 'UpdateToolAndMachDbParamVisibility() - NotifyPropertyChanged("SelectedMachine") + NotifyPropertyChanged(NameOf(SelectedMachine)) End If End If End Set @@ -78,7 +77,7 @@ Public Class MyMachinePanelVM End Get Set(value As Boolean) m_MachineListIsEnabled = value - NotifyPropertyChanged("MachineListIsEnabled") + NotifyPropertyChanged(NameOf(MachineListIsEnabled)) End Set End Property @@ -235,12 +234,6 @@ Public Class MyMachinePanelVM MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) Return End If - 'Dim ToolDbWindow As New ToolsDbV - 'ToolDbWindow.Height = 640 - 'ToolDbWindow.Width = 1024 - 'ToolDbWindow.DataContext = New ToolsDbVM - 'ToolDbWindow.Owner = Application.Current.MainWindow - 'ToolDbWindow.ShowDialog() Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & IniFile.m_sMachineName Dim ToolDbWindowVM As New MyToolDbWindowVM(sMachineDir, IniFile.m_sCurrMachIniFilePath, IniFile.m_ProjectSceneContext, "Wood", IniFile.m_nUserLevel > 9) @@ -358,11 +351,10 @@ Public Class MyMachinePanelVM ''' Execute the Exec. This method is invoked by the ExecCommand. ''' Public Overrides Sub MachOptions(ByVal param As Object) - Dim MachOptionWindow As New MachOptionV - 'MachOptionWindow.Height = 614 - 'MachOptionWindow.Width = 256 - MachOptionWindow.DataContext = New MachOptionVM - MachOptionWindow.Owner = Application.Current.MainWindow + Dim MachOptionWindow As New MachOptionV With { + .DataContext = New MachOptionVM, + .Owner = Application.Current.MainWindow + } MachOptionWindow.ShowDialog() End Sub @@ -448,14 +440,4 @@ Public Class MyMachinePanelVM End Class - 'Private Sub UpdateToolAndMachDbParamVisibility() - ' If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWINGONARCS, 0, IniFile.m_sCurrMachIniFilePath) <> 0 Then - ' Sawing(39) = Visibility.Visible ' StepExtArc - ' Sawing(40) = Visibility.Visible ' StepIntArc - ' Else - ' Sawing(39) = Visibility.Collapsed ' StepExtArc - ' Sawing(40) = Visibility.Collapsed ' StepIntArc - ' End If - 'End Sub - End Class \ No newline at end of file diff --git a/MachiningDbWindow/MyMachiningDbV.xaml b/MachiningDbWindow/MyMachiningDbV.xaml index b176915..831cc49 100644 --- a/MachiningDbWindow/MyMachiningDbV.xaml +++ b/MachiningDbWindow/MyMachiningDbV.xaml @@ -12,7 +12,7 @@ + CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/> @@ -78,7 +78,6 @@ - diff --git a/MainWindow/MainWindowV.xaml b/MainWindow/MainWindowV.xaml index 6fb1bfa..e2d96ec 100644 --- a/MainWindow/MainWindowV.xaml +++ b/MainWindow/MainWindowV.xaml @@ -1,16 +1,16 @@  + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" + xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" + xmlns:local="clr-namespace:EgtCAM5" + Title="{Binding Title}" Icon="{Binding IconSource}" + TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32" + BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2" + MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize" + AboutBoxCommand="{Binding AboutBoxCommand}" + AllowDrop="True" Drop="MainWindow_Drop" + CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"> diff --git a/MainWindow/MainWindowVM.vb b/MainWindow/MainWindowVM.vb index 406c184..114c365 100644 --- a/MainWindow/MainWindowVM.vb +++ b/MainWindow/MainWindowVM.vb @@ -88,8 +88,9 @@ Public Class MainWindowVM Get If m_bFirstProjectPage Then m_bFirstProjectPage = False - m_ProjectPage = New ProjectV - m_ProjectPage.DataContext = New ProjectVM + m_ProjectPage = New ProjectV With { + .DataContext = New ProjectVM + } End If Return m_ProjectPage End Get @@ -597,6 +598,9 @@ Public Class MainWindowVM ' pulisco output Map.refStatusBarVM.NotifyStatusOutput("") Map.refInputExpanderVM.ResetInputBox() + ElseIf e.Key = Key.Left AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then + Map.refMachiningParameterExpanderVM.FocusSlider() + e.Handled = True End If End Sub diff --git a/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderV.xaml b/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderV.xaml index 734f7c4..723305f 100644 --- a/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderV.xaml +++ b/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderV.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + Style="{StaticResource ExpanderStyle}"> diff --git a/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderVM.vb b/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderVM.vb index 4d7d69a..40fa3ea 100644 --- a/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderVM.vb +++ b/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderVM.vb @@ -21,7 +21,7 @@ Public Class InfoExpanderVM Set(value As Boolean) If value <> m_IsExpanded Then m_IsExpanded = value - OnPropertyChanged("IsEnabled") + OnPropertyChanged(NameOf(IsEnabled)) End If End Set End Property @@ -39,7 +39,7 @@ Public Class InfoExpanderVM Else IsEnabled = False End If - OnPropertyChanged("InfoBox") + OnPropertyChanged(NameOf(InfoBox)) End If End Set End Property diff --git a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml index 98ec228..5c4c400 100644 --- a/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml +++ b/OptionPanel/DrawOptionPanel/InputExpander/InputExpanderV.xaml @@ -1,9 +1,9 @@  + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + Style="{StaticResource ExpanderStyle}"> - + - + Style="{StaticResource ValidationErrorTextBlock}"/> + + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OptionPanel/MachiningOptionPanelVM.vb b/OptionPanel/MachiningOptionPanelVM.vb index 6c2889d..48ea62f 100644 --- a/OptionPanel/MachiningOptionPanelVM.vb +++ b/OptionPanel/MachiningOptionPanelVM.vb @@ -31,8 +31,9 @@ Public Class MachiningOptionPanelVM Public ReadOnly Property MachiningsTreeExpander As ContentControl Get If IsNothing(m_MachiningsTreeExpander) Then - m_MachiningsTreeExpander = New MachiningTreeExpanderV - m_MachiningsTreeExpander.DataContext = New MachiningTreeExpanderVM + m_MachiningsTreeExpander = New MachiningTreeExpanderV With { + .DataContext = New MachiningTreeExpanderVM + } End If Return m_MachiningsTreeExpander End Get @@ -42,8 +43,9 @@ Public Class MachiningOptionPanelVM Public ReadOnly Property SimulationExpander As ContentControl Get If IsNothing(m_SimulationExpander) Then - m_SimulationExpander = New SimulationExpanderV - m_SimulationExpander.DataContext = New SimulationExpanderVM + m_SimulationExpander = New SimulationExpanderV With { + .DataContext = New SimulationExpanderVM + } End If Map.refSimulationExpanderVM.Simulation_IsEnabled = True Return m_SimulationExpander @@ -54,8 +56,9 @@ Public Class MachiningOptionPanelVM Public ReadOnly Property EstimationsExpander As ContentControl Get If IsNothing(m_EstimationsExpander) Then - m_EstimationsExpander = New EstimationsExpanderV - m_EstimationsExpander.DataContext = New EstimationsExpanderVM + m_EstimationsExpander = New EstimationsExpanderV With { + .DataContext = New EstimationsExpanderVM + } End If Map.refEstimationsExpanderVM.Estimation_IsEnabled = (EgtUILib.GetPrivateProfileInt(S_ESTIMATIONS, K_EST_ENABLE, 0, IniFile.m_sCurrMachIniFilePath) <> 0) @@ -121,7 +124,7 @@ Public Class MachiningOptionPanelVM Case MachiningOptionPanelExpander.ESTIMATIONS Map.refEstimationsExpanderVM.InitEstimations() End Select - OnPropertyChanged("OpenExpander") + OnPropertyChanged(NameOf(OpenExpander)) End If End Set End Property diff --git a/Project/ProjectVM.vb b/Project/ProjectVM.vb index 11fb61a..395a013 100644 --- a/Project/ProjectVM.vb +++ b/Project/ProjectVM.vb @@ -1320,6 +1320,21 @@ Public Class ProjectVM If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast) Else m_Controller.MouseSelectedObj(nId, bLast) + ' Recupero primo layer selezionato + Dim nFirstSelId As Integer = EgtGetFirstSelectedObj() + ' Se viene selezionato un layer diverso deseleziono il layer precedente + If nFirstSelId <> nId Then + SetLastInteger(nFirstSelId) + Map.refProjectVM.ExecuteCommand(Controller.CMD.DESELECTPARTLAYEROBJ) + End If + ' Selezione layer in albero + Map.refManageLayerExpanderVM.UpdateObjInObjTree(nId) + Map.refManageLayerExpanderVM.SelectIdInObjTree(nId) + Map.refManageLayerExpanderVM.UpdateObjTree() + ' Cancello geometria e info di eventuale precedente analisi + Analyze.ClearAnalyzeGroup() + Map.refStatusBarVM.NotifyStatusOutput("") + EgtDraw() End If End Sub diff --git a/SetUp/SetUpVM.vb b/SetUp/SetUpVM.vb index fd10af7..c37a141 100644 --- a/SetUp/SetUpVM.vb +++ b/SetUp/SetUpVM.vb @@ -1,8 +1,6 @@ Imports System.Collections.ObjectModel -Imports System.ComponentModel Imports System.IO Imports EgtUILib -Imports EgtWPFLib5 Public Class SetUpVM Inherits VMBase diff --git a/StatusBar/StatusBarV.xaml b/StatusBar/StatusBarV.xaml index 6c32863..371a35b 100644 --- a/StatusBar/StatusBarV.xaml +++ b/StatusBar/StatusBarV.xaml @@ -1,12 +1,11 @@  + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + mc:Ignorable="d" + d:DesignHeight="20" d:DesignWidth="1366"> @@ -33,7 +32,7 @@