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 @@
-
+
-
+
+
@@ -712,12 +718,11 @@
-
+ IsEnabled="{Binding IsReadOnly, Converter={StaticResource TrueToFalse}}"/>
@@ -732,12 +737,11 @@
-
+ IsEnabled="{Binding IsReadOnly, Converter={StaticResource TrueToFalse}}"/>
@@ -764,18 +768,18 @@
+ IsEnabled="{Binding CurrCompo.IsReadOnly, Converter={StaticResource TrueToFalse}}"/>
-
+
-
+
@@ -783,8 +787,7 @@
+ VerticalAlignment="Top"/>
@@ -835,7 +838,7 @@
Style="{StaticResource DoorParamsTxBx}"
Margin="0,0,0,2"
ToolTip="{Binding ToolTipValue}"
- IsEnabled="{Binding IsReadOnly}"/>
+ IsReadOnly="{Binding CurrCompo.IsReadOnly}"/>
@@ -855,7 +858,7 @@
+ IsEnabled="{Binding CurrCompo.IsReadOnly, Converter={StaticResource TrueToFalse}}"/>
@@ -875,6 +878,7 @@
diff --git a/DoorParameters/PartPageV.xaml.vb b/DoorParameters/PartPageV.xaml.vb
index 0769f4d..17f516d 100644
--- a/DoorParameters/PartPageV.xaml.vb
+++ b/DoorParameters/PartPageV.xaml.vb
@@ -27,4 +27,7 @@
End Sub
+ Private Sub UserControl_IsEnabledChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
+
+ End Sub
End Class
diff --git a/DoorParameters/PartPageVM.vb b/DoorParameters/PartPageVM.vb
index f7ac86c..42b918e 100644
--- a/DoorParameters/PartPageVM.vb
+++ b/DoorParameters/PartPageVM.vb
@@ -80,6 +80,7 @@ Public Class PartPageVM
If IsNothing(Map.refCompoPanelVM) Then Map.SetRefCompoPanelVM(New CompoPanelVM("PartPage"))
If IsNothing(m_CompoPanelPart) Then m_CompoPanelPart = New CompoPanelV
m_CompoPanelPart.DataContext = Map.refCompoPanelVM
+ m_IsReadOnly = OptionModule.ReadOnlyDDF
End Sub
Sub PrepareEvent()
diff --git a/MainWindow/MainWindowModel.vb b/MainWindow/MainWindowModel.vb
index c9c4ac3..0473a87 100644
--- a/MainWindow/MainWindowModel.vb
+++ b/MainWindow/MainWindowModel.vb
@@ -101,6 +101,7 @@ Friend Class MainWindowModel
EgtLuaRequire(sLuaBaseLib)
' Imposto path IniFile
EgtSetIniFile(IniFile.m_sIniFile)
+ ' Imposto la modalità di lettura dei file ddf
End Sub
diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb
index d516dd5..67ba164 100644
--- a/OptionsWindow/OptionModule.vb
+++ b/OptionsWindow/OptionModule.vb
@@ -4,6 +4,8 @@ Imports EgtUILib
Imports EgtWPFLib5
Friend Module OptionModule
+ ' flag per modalità di visualizzazione file (solo lettura)
+ Friend ReadOnlyDDF As Boolean = False
' Parametri che contengono lista delle lingue disponibili e lingua selezionata
Friend m_LanguageList As New ObservableCollection(Of Language)
@@ -216,6 +218,13 @@ Friend Module OptionModule
m_ConfigurationSoftware = ConfigType.Door
End If
+ ' verifico se il programma è in modalità di sola lettura DDF
+ If GetMainPrivateProfileInt(S_GENERAL, "ReadOnly", 0) <> 0 Then
+ OptionModule.ReadOnlyDDF = True
+ Else
+ OptionModule.ReadOnlyDDF = False
+ End If
+
' imposto unità di misura per interfaccia utente
m_bIsMmUnit = (GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
EgtSetUiUnits(m_bIsMmUnit)
diff --git a/Order/OrderV.xaml b/Order/OrderV.xaml
index 16c92ea..d23d60a 100644
--- a/Order/OrderV.xaml
+++ b/Order/OrderV.xaml
@@ -1,6 +1,7 @@
-
+
+
+
+
+
@@ -26,31 +31,36 @@
+ Margin="5,0,15,5"
+ IsReadOnly="{Binding IsReadOnly}"/>
+ Margin="5,0,15,5"
+ IsReadOnly="{Binding IsReadOnly}"/>
+ Margin="5,0,15,5"
+ IsReadOnly="{Binding IsReadOnly}"/>
+ Margin="5,0,15,5"
+ IsReadOnly="{Binding IsReadOnly}"/>
+ Margin="5,0,15,5"
+ IsReadOnly="{Binding IsReadOnly}"/>
@@ -62,6 +72,7 @@
SelectedItem="{Binding Configuration}"/>-->
diff --git a/Order/OrderVM.vb b/Order/OrderVM.vb
index a10cfb7..8a1ed35 100644
--- a/Order/OrderVM.vb
+++ b/Order/OrderVM.vb
@@ -60,6 +60,12 @@ Public Class OrderVM
#End Region ' Messages
+ Public ReadOnly Property IsReadOnly As Boolean
+ Get
+ Return OptionModule.ReadOnlyDDF
+ End Get
+ End Property
+
Public Property Customer As String
Get
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) AndAlso
diff --git a/ProjectManager/ProjectManagerV.xaml b/ProjectManager/ProjectManagerV.xaml
index 4bded59..c1ff30d 100644
--- a/ProjectManager/ProjectManagerV.xaml
+++ b/ProjectManager/ProjectManagerV.xaml
@@ -5,11 +5,13 @@
-
diff --git a/ProjectManager/ProjectManagerVM.vb b/ProjectManager/ProjectManagerVM.vb
index d82801d..c9ec746 100644
--- a/ProjectManager/ProjectManagerVM.vb
+++ b/ProjectManager/ProjectManagerVM.vb
@@ -120,6 +120,13 @@ Public Class ProjectManagerVM
End Get
End Property
+ ' se in sola lettura il programma allora abilito solo i camndi Apertura e Stampa
+ Public ReadOnly Property EnableModifyDDF As Boolean
+ Get
+ Return Not OptionModule.ReadOnlyDDF
+ End Get
+ End Property
+
' Definizione comandi
Private m_cmdNew As ICommand
Private m_cmdDelete As ICommand