diff --git a/Assembly/Assembly.vb b/Assembly/Assembly.vb index 69e964d..0b81f16 100644 --- a/Assembly/Assembly.vb +++ b/Assembly/Assembly.vb @@ -1847,8 +1847,8 @@ Public Class Assembly Door.CompoList(IndexCompo).refJambCompo = Jamb.CompoList(IndexCompoJamb) Jamb.CompoList(IndexCompoJamb).refCompoDoor = Door.CompoList(IndexCompo) Door.CompoList(IndexCompo).refJambCompo.VisibilitiReloadBtn = Visibility.Visible - Door.CompoList(IndexCompo).refJambCompo.IsReadOnly = False - Door.CompoList(IndexCompo).IsReadOnly = True + Door.CompoList(IndexCompo).refJambCompo.IsReadOnly = True + Door.CompoList(IndexCompo).IsReadOnly = False ' definisco la proprietà ReadOnly per i parametri inseriti If Not LoadCompoParam(Door.CompoList(IndexCompo), Door.TypePart) Then Return For IndexParam As Integer = 0 To Door.CompoList(IndexCompo).refJambCompo.CompoParamList.Count - 1 @@ -1872,7 +1872,7 @@ Public Class Assembly End If Next Else - Door.CompoList(IndexCompo).IsReadOnly = True + Door.CompoList(IndexCompo).IsReadOnly = False End If Next End Sub diff --git a/Assembly/AssemblyPageVM.vb b/Assembly/AssemblyPageVM.vb index 75deaaf..bcfd314 100644 --- a/Assembly/AssemblyPageVM.vb +++ b/Assembly/AssemblyPageVM.vb @@ -263,7 +263,7 @@ Public Class AssemblyPageVM Case ConstGen.PART_FRAME_BOTTOM bOkSelection = LoadSelectedPartDoor(ConstGen.PART_FRAME_BOTTOM, OptionModule.m_CompoPanelFrameVisibility, True) Case Else - bOkSelection = LoadSelectedPartDoor(SelectPart, Visibility.Visible, False) + bOkSelection = LoadSelectedPartDoor(SelectPart, Visibility.Visible, OptionModule.ReadOnlyDDF) End Select If bOkSelection Then Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage ' aggiorno elenco quotature diff --git a/CompoPanel/CompoPanelV.xaml b/CompoPanel/CompoPanelV.xaml index 8341f3d..c292d09 100644 --- a/CompoPanel/CompoPanelV.xaml +++ b/CompoPanel/CompoPanelV.xaml @@ -7,7 +7,7 @@ - + @@ -16,7 +16,7 @@ + Visibility="{Binding IsVisible}" IsEnabled="{Binding EnableModify}"> diff --git a/CompoPanel/CompoPanelVM.vb b/CompoPanel/CompoPanelVM.vb index 6fd8de3..50554e0 100644 --- a/CompoPanel/CompoPanelVM.vb +++ b/CompoPanel/CompoPanelVM.vb @@ -44,6 +44,12 @@ Public Class CompoPanelVM End Set End Property + Public ReadOnly Property EnableModify As Boolean + Get + Return Not OptionModule.ReadOnlyDDF + End Get + End Property + ' Definizione comando Private m_CmdCompoBtn As ICommand Private m_CmdGoToAssemblyBtn As ICommand diff --git a/DoorParameters/Compo.vb b/DoorParameters/Compo.vb index ecf0eca..f43f0dc 100644 --- a/DoorParameters/Compo.vb +++ b/DoorParameters/Compo.vb @@ -137,13 +137,14 @@ Public Class Compo End Set End Property - Private m_IsReadOnly As Boolean = True + Private m_IsReadOnly As Boolean = False Public Property IsReadOnly As Boolean Get Return m_IsReadOnly End Get Set(value As Boolean) m_IsReadOnly = value + NotifyPropertyChanged("IsReadOnly") End Set End Property @@ -1981,6 +1982,7 @@ Public Class Compo ' creo una copia dell'oggetto Sub New(CompoType As CompoType) m_CompoType = CompoType.DeepCopy() + If OptionModule.ReadOnlyDDF Then IsReadOnly = OptionModule.ReadOnlyDDF End Sub ' creo un riferiemento all'oggetto diff --git a/DoorParameters/Part.vb b/DoorParameters/Part.vb index b49cb23..48dfa64 100644 --- a/DoorParameters/Part.vb +++ b/DoorParameters/Part.vb @@ -2811,6 +2811,8 @@ Public Class Part End If ' Inserisco il componente in lista m_CurrCompo.FontBold = FontWeights.Normal + ' forzo la non modificabilità dei parametri della compo + If OptionModule.ReadOnlyDDF Then m_CurrCompo.IsReadOnly = OptionModule.ReadOnlyDDF m_CompoList.Add(m_CurrCompo) End While Return Index diff --git a/DoorParameters/PartPageV.xaml b/DoorParameters/PartPageV.xaml index 52f5400..01ead2c 100644 --- a/DoorParameters/PartPageV.xaml +++ b/DoorParameters/PartPageV.xaml @@ -135,7 +135,8 @@ ToolTip="{Binding CurrPart.ToolTipEvaluatedWeight}" MaxWidth="120" Margin="0.4,2,10,3.2" VerticalAlignment="Stretch" Height="Auto" - Visibility="{Binding CurrPart.VisibilityWeight}"/> + Visibility="{Binding CurrPart.VisibilityWeight}" + IsReadOnly="{Binding IsRaedOnly}"/> @@ -195,13 +196,13 @@ Name="LockHingeEdge" Margin="0,0,20,0" Style="{StaticResource DoorParamsChBx}" - Visibility="Collapsed"/> + Visibility="Collapsed"/> + Visibility="Collapsed"/> + Margin="2,0,0.2,0" + IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/> + Margin="2,0,0,0" IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/> @@ -353,6 +355,7 @@ Visibility="{Binding CurrPart.MaterialIsVisible}" ItemsSource="{Binding CurrPart.MaterialsList}" SelectedItem="{Binding CurrPart.SelectedMaterial}" + IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}" DisplayMemberPath="Name"> @@ -362,6 +365,7 @@ Visibility="{Binding CurrPart.PropertiesIsVisible}" ItemsSource="{Binding CurrPart.PropertiesList}" SelectedItem="{Binding CurrPart.SelectedProperty}" + IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}" DisplayMemberPath="GraphicName"> @@ -382,12 +386,14 @@ Style="{StaticResource DoorParamsChBx}" IsChecked="{Binding CurrPart.TopShapeIsChecked}" VerticalAlignment="Stretch" + IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}" Margin="2,0,0.2,0"/> @@ -545,7 +551,7 @@ --> - + @@ -631,9 +637,8 @@ - + - + - - - - - --> -