Compare commits

...

29 Commits

Author SHA1 Message Date
NicolaP 07e19039ea Gestione visualizzazione schermi da Config 2023-01-18 12:54:54 +01:00
NicolaP 30a5b5ed49 Nuova disposizione finestra in interfaccia 2022-10-28 15:10:48 +02:00
NicolaP 467874aa93 Merge branch 'master' into NicolaP 2022-10-28 14:32:59 +02:00
NicolaP ae2d1e427b Gestione file compialti 2022-09-05 14:21:24 +02:00
NicolaP c12c8f296a Correzione ComboBoxOnOff DDF parmeteer in Hardware 2022-07-11 12:03:49 +02:00
NicolaP 901e151399 Correzione gestione TextBoxOnOff e ComboBoxOnOff 2022-07-11 11:42:54 +02:00
NicolaP 81711ec12e Merge branch 'NicolaP' 2022-07-08 11:31:31 +02:00
NicolaP e6ed99afca Cambio versione 2022-07-08 11:31:16 +02:00
NicolaP be57be1e27 Correzione stampa parameteri On/Off HardwareManager 2022-07-08 11:12:59 +02:00
NicolaP 9853d78cf9 Gestione chiave di protezione 2022-06-28 19:42:18 +02:00
NicolaP f43134d996 Merge branch 'master' into NicolaP 2022-06-27 17:36:46 +02:00
NicolaP 3d259cfb9f Merge branch 'Features/Restyle_Interface_Assembly' 2022-06-27 17:26:13 +02:00
NicolaP 10bf8719bd Modificata dimensione bottoni Ante 2022-06-27 17:25:50 +02:00
NicolaP 9b0ce1a094 Merge branch 'master' into NicolaP 2022-06-27 15:47:59 +02:00
NicolaP 47e84044f9 Cambio versione 2022-06-27 15:46:45 +02:00
NicolaP a82ded8b77 Merge commit '915e3f32db96319bf6d856f21f3a7b02fd9fc1bd' 2022-06-27 15:43:56 +02:00
NicolaP 915e3f32db Merge branch 'Features/Manage_ParamOnOff_In_Hardware_DDF_Param' into NicolaP 2022-06-27 15:43:22 +02:00
NicolaP c24f12a208 Gestione DDF_ParmOnOf in HardwareManager 2022-06-27 15:25:42 +02:00
NicolaP f3a53efa42 Non blocco i file se programma in sola lettura 2022-05-30 18:23:17 +02:00
NicolaP 1e75e0073c Miglioramento gestione errori per compo 2022-05-30 18:19:35 +02:00
NicolaP e0281a3f46 Miglioramento gestione errori per direttori compo 2022-05-12 18:08:55 +02:00
NicolaP cf07c578a0 Merge branch 'Features/OnlyRead' into NicolaP 2022-05-12 15:11:07 +02:00
NicolaP 6981bcafbb Opzione ReadOnly gestita da chiave di protezione 2022-04-08 12:45:02 +02:00
NicolaP 99d69a4ffe Merge branch 'NicolaP' into Features/OnlyRead 2022-03-17 15:19:29 +01:00
NicolaP 4355deafb3 Correzione gestione LinearDimensions 2022-03-17 15:11:39 +01:00
NicolaP e0a8f73b12 Aggiornamento versione della chiave 2022-03-17 11:15:43 +01:00
NicolaP a0c934f139 Cambi oversione 2022-03-17 11:13:07 +01:00
NicolaP 99a3ecad0a In modalità porta singola disabilito la modifca del DDF 2022-03-16 19:34:56 +01:00
NicolaP 325d3af0b1 Cambio versione, e eliminato avvio EgtCAM5 in modalità "1" 2022-01-20 20:08:42 +01:00
28 changed files with 511 additions and 95 deletions
+3 -3
View File
@@ -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
+9 -9
View File
@@ -415,17 +415,17 @@
<Grid Margin="0,0,0,2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="{Binding}"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="7"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="7"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="{Binding}"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="7"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="7"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
@@ -566,7 +566,7 @@
Command="{Binding DataContext.JambBtnCommand,
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Type}"
Width="100"
Width="140"
Style="{StaticResource DoorButton}"
IsEnabled="{Binding IsChecked, ElementName=DoorChk}"
Grid.Column="0" />
+1 -1
View File
@@ -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
+2 -2
View File
@@ -7,7 +7,7 @@
<KeyBinding Key="Enter" Command="{Binding RefreshCmd}"/>
</UserControl.InputBindings>
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="16*"/>
@@ -16,7 +16,7 @@
<ItemsControl ItemsSource="{Binding CompoTypeList}" Focusable="True"
Visibility="{Binding IsVisible}">
Visibility="{Binding IsVisible}" IsEnabled="{Binding EnableModify}">
<ItemsControl.InputBindings>
<KeyBinding Key="Enter" Command="{Binding RefreshCmd}"/>
+101 -3
View File
@@ -6,6 +6,13 @@ Imports System.IO
Public Class CompoPanelVM
Implements INotifyPropertyChanged
Private m_ErroLoadCompo As String = String.Empty
Public ReadOnly Property ErrorLoadCompo As String
Get
Return m_ErroLoadCompo
End Get
End Property
Private m_PageName As String = String.Empty
Public ReadOnly Property GoToAssembly As String
@@ -44,6 +51,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
@@ -69,9 +82,39 @@ Public Class CompoPanelVM
Return
End If
Dim CompoArray() As String = Directory.GetDirectories(IniFile.m_CompoDir)
Dim ListCompoToInsert As New List(Of VerifyCompo)
For Ind As Integer = 0 To DdfFile.CompoListOrder.Count - 1
ListCompoToInsert.Add(New VerifyCompo(DdfFile.CompoListOrder(Ind), False))
Next
' Verifico che la lista Panel abbia un numero di elementi uguale o minore di quella DDF
If OptionModule.m_CompoPaneOrder.Count > DdfFile.CompoListOrder.Count Then
Dim ListCompoToShow As New List(Of VerifyCompo)
For Ind As Integer = 0 To OptionModule.m_CompoPaneOrder.Count - 1
ListCompoToShow.Add(New VerifyCompo(OptionModule.m_CompoPaneOrder(Ind), False))
Next
' cerco quali sono le componenti in esubero nella lista CompoPane
For Each ItemCompoPane As String In DdfFile.CompoListOrder
ListCompoToShow.Find(Function(x) x.sName = ItemCompoPane).SetExists(True)
Next
' recupero i nomi delle componenti non presenti nell'elenco DDF
Dim sMissingCompoInDDFList As String = String.Empty
For Each Item As VerifyCompo In ListCompoToShow
If Not Item.bExists Then
If String.IsNullOrEmpty(sMissingCompoInDDFList) Then
sMissingCompoInDDFList = Item.sName
Else
sMissingCompoInDDFList &= ", " & Item.sName
End If
End If
Next
m_ErroLoadCompo = "Verify component in CompoPanelOrder: " & sMissingCompoInDDFList
Return
End If
' carico i valori dei bottoni con un preciso ordine
Dim CompoPanelList As List(Of String) = OptionModule.m_CompoPaneOrder
For IndexCompoOrder = 0 To DdfFile.CompoListOrder.Count - 1
For IndexCompoOrder = 0 To CompoPanelList.Count() - 1 ' DdfFile.CompoListOrder.Count - 1
For Index = 0 To CompoArray.Count - 1
' apro ogni directory e cerco un file di testo di nome Config.ini
Dim CurrCompoPath As String = CompoArray(Index) & "\" & ConstCompo.CONFIGINI_FILE_NAME
@@ -81,14 +124,41 @@ Public Class CompoPanelVM
GetPrivateProfileFolderName(S_TEMPLATE, K_FOLDER_NAME, FolderName, CurrCompoPath)
If CompoPanelList(IndexCompoOrder) = CompoNameDDF Then
m_CompoTypeList.Add(New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Side, FolderName))
ListCompoToInsert.Find(Function(x) x.sName = CompoNameDDF).SetExists(True)
' aggiungere il caricamento delle liste
Exit For
End If
End If
Next
Next
' verifica nella lista di partenza quali sono i componenti che non sono stati caricati
m_ErroLoadCompo = String.Empty
' cerco eventuali discrepanze tra la lista DDF e la lista Panel
Dim sMissingCompoInPanel As String = String.Empty
For nInd As Integer = 0 To ListCompoToInsert.Count - 1
Dim DDFCompoName As String = ListCompoToInsert(nInd).sName
If IsNothing(CompoPanelList.Find(Function(x) x = DDFCompoName)) Then
If String.IsNullOrEmpty(sMissingCompoInPanel) Then
sMissingCompoInPanel = "Missing component Panel button: " & vbCrLf & " - " & DDFCompoName
Else
sMissingCompoInPanel &= vbCrLf & " - " & DDFCompoName
End If
ListCompoToInsert(nInd).SetExists(True)
End If
Next
' cerco discrepanze tra la lista dei bottoni e direttori
For Each Item As VerifyCompo In ListCompoToInsert
If Not Item.bExists Then
If String.IsNullOrEmpty(m_ErroLoadCompo) Then
m_ErroLoadCompo = "Missing component Directory: " & vbCrLf & " - " & Item.sName
Else
m_ErroLoadCompo &= vbCrLf & " - " & Item.sName
End If
End If
Next
If Not String.IsNullOrEmpty(sMissingCompoInPanel) Then
m_ErroLoadCompo &= vbCrLf & sMissingCompoInPanel
End If
End Sub
#Region "COMMANDS"
@@ -209,3 +279,31 @@ Public Class CompoPanelVM
End Sub
End Class
Public Class VerifyCompo
Private m_sName As String
Public ReadOnly Property sName As String
Get
Return m_sName
End Get
End Property
Private m_bExists As Boolean = False
Public ReadOnly Property bExists As Boolean
Get
Return m_bExists
End Get
End Property
Public Sub SetExists(Exists As Boolean)
m_bExists = Exists
End Sub
Sub New(Name As String, Exists As Boolean)
m_sName = Name
m_bExists = Exists
End Sub
End Class
+31 -3
View File
@@ -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
@@ -1882,6 +1883,9 @@ Public Class Compo
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
If Not TempParam.EnableCopy Then Return False
End If
Dim sItems() As String = sValue.Split(";"c)
' estraggo il primo valore: -- NomeParamOnOff = inch(0.6); 0
sValue = sItems(0)
Dim ReadValue = RegexFunction.Brackets(sValue)
If ReadValue.Contains("DGD.dW") Then
ReadValue = sValue.Replace(ReadValue & ")", "W")
@@ -1897,7 +1901,17 @@ Public Class Compo
End If
Utility.ConvertCurrentUnitMeasure(ReadValue)
TempParam.SetValue(ReadValue)
TempParam.SetIsActive(True)
' verifico se deve essere attivata
If sItems.Count > 1 Then
If sItems(1).Trim <> "0" Then
TempParam.SetIsActive(True)
Else
TempParam.SetIsActive(False)
End If
Else
TempParam.SetIsActive(True)
End If
TempParam.NotifyPropertyChanged("IsActive")
Return True
ElseIf TypeOf CurrCompoParam Is TextBoxParam Then
Dim TempParam As TextBoxParam = DirectCast(CurrCompoParam, TextBoxParam)
@@ -1925,11 +1939,24 @@ Public Class Compo
If Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nHardwarePage Then
If Not TempParam.EnableCopy Then Return False
End If
Dim sItems() As String = sValue.Split(";"c)
' estraggo il primo valore: -- NomeParamOnOff = inch(0.6); 0
sValue = sItems(0)
Dim ReadValue = Trim(sValue)
For Each Item In TempParam.ItemListDDF
If Trim(Item).ToLower = ReadValue.ToLower Then
TempParam.SetSelItem(TempParam.ItemList(TempParam.ItemListDDF.IndexOf(Item)))
TempParam.SetIsActive(True)
' verifico se deve essere attivata
If sItems.Count > 1 Then
If sItems(1).Trim <> "0" Then
TempParam.SetIsActive(True)
Else
TempParam.SetIsActive(False)
End If
Else
TempParam.SetIsActive(True)
End If
TempParam.NotifyPropertyChanged("IsActive")
Exit For
End If
Next
@@ -1981,6 +2008,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
+2
View File
@@ -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
+32 -28
View File
@@ -12,16 +12,16 @@
<EgtDOORCreator:TrueToFalse x:Key="TrueToFalse"/>
</UserControl.Resources>
<Grid IsEnabled="{Binding EnablePageDoor}">
<Grid Name="MainGrid" IsEnabled="{Binding EnablePageDoor}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="{Binding WidthColumn1}"/>
<ColumnDefinition Width="{Binding WidthColumn2}"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Margin="0,0,0,0.2" Grid.Column="1" IsEnabled="{Binding IsReadOnly}">
<Grid Margin="0,0,0,0.2" Grid.Column="{Binding GridGeneralDiposition}" IsEnabled="{Binding IsReadOnly}">
<Grid.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
@@ -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}"/>
<!--Seconda colonna -->
<!-- Profiles-->
@@ -195,13 +196,13 @@
Name="LockHingeEdge"
Margin="0,0,20,0"
Style="{StaticResource DoorParamsChBx}"
Visibility="Collapsed"/>
Visibility="Collapsed"/>
<CheckBox Grid.Column="4" Grid.Row="3" Grid.RowSpan="2"
IsChecked="{Binding CurrPart.ResizeTopBottom}"
Name="TopBottomEdge"
Margin="0,0,20,0"
Style="{StaticResource DoorParamsChBx}"
Visibility="Collapsed"/>
Visibility="Collapsed"/>
<!--Machining-->
<CheckBox Grid.Column="5" Grid.Row="1"
Name="LockEdge" Style="{StaticResource DoorParamsChBx}"
@@ -288,11 +289,12 @@
Visibility="{Binding AllignGropBox}"
Style="{StaticResource DoorParamsChBx}"
VerticalAlignment="Stretch"
Margin="2,0,0.2,0"/>
Margin="2,0,0.2,0"
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
<ComboBox Style="{StaticResource DoorParamsCmBx}" Width="100"
Visibility="{Binding AllignGropBox}"
VerticalAlignment="Stretch" Height="Auto"
Margin="2,0,0,0"/>
Margin="2,0,0,0" IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
</StackPanel>
</GroupBox.Header>
@@ -353,6 +355,7 @@
Visibility="{Binding CurrPart.MaterialIsVisible}"
ItemsSource="{Binding CurrPart.MaterialsList}"
SelectedItem="{Binding CurrPart.SelectedMaterial}"
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"
DisplayMemberPath="Name">
</ComboBox>
<!--lLsta proprietà-->
@@ -362,6 +365,7 @@
Visibility="{Binding CurrPart.PropertiesIsVisible}"
ItemsSource="{Binding CurrPart.PropertiesList}"
SelectedItem="{Binding CurrPart.SelectedProperty}"
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"
DisplayMemberPath="GraphicName">
</ComboBox>
</Grid>
@@ -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"/>
<ComboBox Style="{StaticResource DoorParamsCmBx}" Width="100"
ItemsSource="{Binding CurrPart.TopShapeList}"
SelectedItem="{Binding CurrPart.SelectedShape}"
VerticalAlignment="Stretch" Height="Auto"
Margin="2,0,0,0"
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"
DisplayMemberPath="Name"/>
</StackPanel>
</GroupBox.Header>
@@ -545,7 +551,7 @@
</Grid>
</GroupBox>-->
<!--Cut-->
<!--Cut NON IN USO-->
<GroupBox Grid.Row="6" Grid.Column="1" Margin="2,0,2,0" Visibility="Collapsed">
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
@@ -631,9 +637,8 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<GroupBox
Width="{Binding ActualWidth,ElementName=DoorParamsItemsControl,
Converter={StaticResource SplitConverter},ConverterParameter=2}" Padding="0,0,1,0">
<GroupBox Width="{Binding ActualWidth,ElementName=DoorParamsItemsControl,
Converter={StaticResource SplitConverter},ConverterParameter=2}" Padding="0,0,1,0">
<GroupBox.Style>
<Style TargetType="GroupBox">
<Setter Property="BorderBrush" Value="LightGray"/>
@@ -651,7 +656,7 @@
</Style>
</GroupBox.Style>
<GroupBox.Header >
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" IsEnabled="{Binding IsReadOnly, Converter={StaticResource TrueToFalse}}">
<Button x:Name="ReloadCompoRef"
Visibility="{Binding VisibilitiReloadBtn}"
ToolTip="{Binding DataContext.ReloadCompoRefToolTip,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
@@ -696,6 +701,7 @@
</StackPanel>
</GroupBox.Header>
<StackPanel >
<!--Brand Template-->
<UniformGrid Columns="2" Visibility="{Binding TemplateVisibility}">
<!--Brand-->
<TextBlock Text="{Binding BrandMsg}">
@@ -712,12 +718,11 @@
</Style>
</TextBlock.Style>
</TextBlock>
<ComboBox ItemsSource="{Binding BrandListPart,
Converter={StaticResource TemplateListConverter}}"
<ComboBox ItemsSource="{Binding BrandListPart, Converter={StaticResource TemplateListConverter}}"
Margin="0,0,0,2"
SelectedItem="{Binding SelBrandPart}"
Style="{StaticResource DoorParamsCmBx}"
IsEnabled="{Binding IsReadOnly}"/>
IsEnabled="{Binding IsReadOnly, Converter={StaticResource TrueToFalse}}"/>
<!--File-->
<TextBlock Text="{Binding TemplateName}">
<TextBlock.Style>
@@ -732,12 +737,11 @@
</Style>
</TextBlock.Style>
</TextBlock>
<ComboBox ItemsSource="{Binding FileList,
Converter={StaticResource TemplateListConverter}}"
<ComboBox ItemsSource="{Binding FileList, Converter={StaticResource TemplateListConverter}}"
Margin="0,0,0,2"
SelectedItem="{Binding SelFile}"
Style="{StaticResource DoorParamsCmBx}"
IsEnabled="{Binding IsReadOnly}"/>
IsEnabled="{Binding IsReadOnly, Converter={StaticResource TrueToFalse}}"/>
</UniformGrid>
<!--Lista dei parametri-->
@@ -764,18 +768,18 @@
<ComboBox ItemsSource="{Binding ItemList}" Margin="0,0,0,2"
SelectedItem="{Binding SelItem}"
Style="{StaticResource DoorParamsCmBx}"
IsEnabled="{Binding IsRaedOnly}"/>
IsEnabled="{Binding CurrCompo.IsReadOnly, Converter={StaticResource TrueToFalse}}"/>
</UniformGrid>
</DataTemplate>
<!-- ComboBoxOnOff -->
<DataTemplate DataType="{x:Type local:ComboBoxOnOffParam}">
<Grid>
<Grid IsEnabled="{Binding CurrCompo.IsReadOnly, Converter={StaticResource TrueToFalse}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
@@ -783,8 +787,7 @@
<CheckBox Name="ChBxBox" IsChecked="{Binding IsActive}"
Style="{StaticResource DoorParamsChBx}"
VerticalAlignment="Top"
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
VerticalAlignment="Top"/>
<TextBlock Text="{Binding Name}" Grid.Column="1"
Margin="2,0,0,2">
<TextBlock.Style>
@@ -835,7 +838,7 @@
Style="{StaticResource DoorParamsTxBx}"
Margin="0,0,0,2"
ToolTip="{Binding ToolTipValue}"
IsEnabled="{Binding IsReadOnly}"/>
IsReadOnly="{Binding CurrCompo.IsReadOnly}"/>
</UniformGrid>
</DataTemplate>
<!-- TextBoxOnOff -->
@@ -855,7 +858,7 @@
<CheckBox Name="ChBx" IsChecked="{Binding IsActive}"
Style="{StaticResource DoorParamsChBx}"
VerticalAlignment="Top"
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
IsEnabled="{Binding CurrCompo.IsReadOnly, Converter={StaticResource TrueToFalse}}"/>
<TextBlock Text="{Binding Name}" Grid.Column="1"
Margin="2,0,0,2">
<TextBlock.Style>
@@ -875,6 +878,7 @@
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}" Grid.Column="2"
Style="{StaticResource DoorParamsTxBx}"
IsEnabled="{Binding IsChecked, ElementName=ChBx}"
IsReadOnly="{Binding CurrCompo.IsReadOnly}"
Margin="0,0,0,2"
ToolTip="{Binding ToolTipValue,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
@@ -889,7 +893,7 @@
</ListBox>
</Grid>
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
<ContentControl Name="MainContentConrol" Grid.Column="{Binding CompoPanelDiposition}" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
<!--<EgtDOORCreator:CompoPanelV Grid.Column="0" DataContext="{Binding CompoPanelPartVM}"/>-->
</Grid>
</UserControl>
+6 -2
View File
@@ -1,8 +1,8 @@
Public Class PartPageV
Public Sub ItemsControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
Dim ListControl As ListBox=DirectCast(sender,listbox)
If Not IsNothing( ListControl.SelectedItem) Then
Dim ListControl As ListBox = DirectCast(sender, ListBox)
If Not IsNothing(ListControl.SelectedItem) Then
Dim SelectedItemIndex As Integer = ListControl.Items.IndexOf(ListControl.SelectedItem)
If SelectedItemIndex < 0 Then Return
ListControl.Dispatcher.BeginInvoke(DirectCast(Sub()
@@ -27,4 +27,8 @@
End Sub
Private Sub UserControl_IsEnabledChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
End Sub
End Class
+45
View File
@@ -73,6 +73,50 @@ Public Class PartPageVM
End Get
End Property
#Region "DISPOSITION SCREEN"
Public ReadOnly Property WidthColumn1 As String
Get
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
Return "1*"
Else
Return "5*"
End If
End Get
End Property
Public ReadOnly Property WidthColumn2 As String
Get
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
Return "5*"
Else
Return "1*"
End If
End Get
End Property
Public ReadOnly Property GridGeneralDiposition As String
Get
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
Return "1"
Else
Return "0"
End If
End Get
End Property
Public ReadOnly Property CompoPanelDiposition As String
Get
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
Return "0"
Else
Return "1"
End If
End Get
End Property
#End Region ' Disposition Screen
#Region "CONSTUCTOR"
Sub New()
@@ -80,6 +124,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()
+2
View File
@@ -41,6 +41,8 @@ Public Module Doors
Dim sExecName As String = String.Empty
GetMainPrivateProfileString(S_DOORS, K_DDFEXEC, "", sExecName)
sExecPath = IniFile.m_sDoorsDirPath & "\" & sExecName
EgtLuaCreateGlobTable("DGD")
EgtLuaSetGlobStringVar("DGD.BASEDIR", IniFile.m_sDoorsDirPath & "\")
If Not EgtLuaExecFile(sExecPath) Then Return False
' Setto variabili per quotatura Lua
For Each HardwareDimension In Map.refDimensioningPanelVM.HardwareDimensionList
+48 -6
View File
@@ -1055,7 +1055,19 @@ Public Class Hardware
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxOnOffParam Then
Dim Text As TextBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxOnOffParam)
Text.SetIsActive(True)
' estraggo il valore: -- NomeParamOnOff = inch(0.6); 0
Dim sItems() As String = sValue.Split(";"c)
sValue = sItems(0)
' verifico se deve essere attivata
If sItems.Count > 1 Then
If sItems(1).Trim <> "0" Then
Text.SetIsActive(True)
Else
Text.SetIsActive(False)
End If
Else
Text.SetIsActive(True)
End If
' se testo numerico, eseguo opportunbe conversioni per H,W e T
sValue = ConvertToDGD(Text.TypeVar, sValue)
' controllo il tipo di dato che si aspetta
@@ -1116,7 +1128,19 @@ Public Class Hardware
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxOnOffParam Then
Dim Text As ComboBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxOnOffParam)
Text.SetIsActive(True)
' estraggo il valore: -- NomeParamOnOff = inch(0.6); 0
Dim sItems() As String = sValue.Split(";"c)
sValue = sItems(0)
' verifico se deve essere attivata
If sItems.Count > 1 Then
If sItems(1).Trim <> "0" Then
Text.SetIsActive(True)
Else
Text.SetIsActive(False)
End If
Else
Text.SetIsActive(True)
End If
Text.SetSelItem(Text.ItemList(0))
For IndexCombo As Integer = 0 To Text.ItemListDDF.Count - 1
If Trim(Utility.DeleteSuperScript(Text.ItemListDDF(IndexCombo))) = Trim(Utility.DeleteSuperScript(sValue)) Then Text.SetSelItem(Text.ItemList(IndexCombo))
@@ -2015,7 +2039,6 @@ Public Class Hardware
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxOnOffParam Then
Dim Text As TextBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxOnOffParam)
sValue = String.Empty
If Not Text.IsActive Then sValue = " nil" : Return True
' controllo il tipo di dato che si aspetta
Select Case Text.TypeVar
Case ConstGen.INCHES
@@ -2049,6 +2072,15 @@ Public Class Hardware
End Select
' se testo numerico, eseguo opportune conversioni per H,W e T
sValue = ConvertFromDGD(Text.TypeVar, sValue)
' se parametro spento (Solo per capitolo DDF)
If Not Text.IsActive Then
If m_GroupChapters(IndexGroupChapters).TemplateDDFName = "DDF" Then
sValue &= "; 0"
Else
' per inidicare di spegnere il valore deve essere restituito il valore " nill"
sValue = " nil"
End If
End If
Return True
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is TextBoxParam Then
Dim Text As TextBoxParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), TextBoxParam)
@@ -2118,11 +2150,21 @@ Public Class Hardware
'-- attenzione a quando abbiamo da stampare delle stringhe! e non dei valori numerici
Dim Text As ComboBoxOnOffParam = DirectCast(m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter), ComboBoxOnOffParam)
sValue = String.Empty
If Not Text.IsActive Then sValue = " nil" : Return True
For Index As Integer = 0 To Text.ItemList.Count - 1
If Text.SelItem = Text.ItemList(Index) Then sValue = Text.ItemListDDF(Index) : Return True
If Text.SelItem = Text.ItemList(Index) Then sValue = Text.ItemListDDF(Index)
Next
sValue = Text.SelItem
If String.IsNullOrEmpty(sValue) Then
sValue = Text.SelItem
End If
' se parametro spento
If Not Text.IsActive Then
If m_GroupChapters(IndexGroupChapters).TemplateDDFName = "DDF" Then
sValue &= "; 0"
Else
' per inidicare di spegnere il valore deve essere restituito il valore " nill"
sValue = " nil"
End If
End If
Return True
ElseIf TypeOf m_GroupChapters(IndexGroupChapters).CompoParamList(IndexChapter) Is ComboBoxParam Then
+6 -5
View File
@@ -15,8 +15,8 @@
<Grid IsEnabled="{Binding EnablePageHardware}">
<Grid.ColumnDefinitions>
<!-- Colonna dedicata alla lista dei bottoni -->
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="{Binding WidthColumn1}"/>
<ColumnDefinition Width="{Binding WidthColumn2}"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
@@ -26,8 +26,9 @@
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
</Grid.InputBindings>
<!-- La griglia che gestirà i parametri hardaware -->
<Grid Grid.Column="1">
<Grid Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="0">
<Grid.RowDefinitions>
<!-- Deicata al general dell'hardware-->
<RowDefinition Height="Auto"/>
@@ -858,9 +859,9 @@
</Grid>
<!-- Elenco pulsanti Hardware -->
<ContentControl Grid.Column="0" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
<ContentControl Grid.Column="{Binding CompoPanelDiposition}" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="1" Grid.Row="1" Margin="0,0,2,0"/>
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="1" Margin="0,0,2,0" />
</Grid>
+44
View File
@@ -93,6 +93,50 @@ Public Class HardwarePageVM
End Get
End Property
#Region "DISPOSITION SCREEN"
Public ReadOnly Property WidthColumn1 As String
Get
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
Return "1*"
Else
Return "5*"
End If
End Get
End Property
Public ReadOnly Property WidthColumn2 As String
Get
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
Return "5*"
Else
Return "1*"
End If
End Get
End Property
Public ReadOnly Property GridGeneralDiposition As String
Get
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
Return "1"
Else
Return "0"
End If
End Get
End Property
Public ReadOnly Property CompoPanelDiposition As String
Get
If OptionModule.m_nDispostionScreen = 0 Or OptionModule.m_nDispostionScreen = 1 Then
Return "0"
Else
Return "1"
End If
End Get
End Property
#End Region ' Disposition Screen
#Region "MESSAGES"
Public ReadOnly Property GeneralMsg As String
+2
View File
@@ -25,6 +25,8 @@ Friend Module IniFile
DOORS = 2
DOORCREATOR = 8
JAMBS = 32
STEELDOOR = 256
READ_ONLY = 512
End Enum
' Path cartella Data
+3 -2
View File
@@ -57,8 +57,8 @@ Friend Class MainWindowModel
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2311, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2311, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2407, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2407, 1, IniFile.m_nKeyOptions)
'Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
@@ -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
+7 -6
View File
@@ -23,8 +23,8 @@
<Grid>
<Grid.ColumnDefinitions>
<!--<ColumnDefinition Width="1*"/>-->
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="{Binding WidthColumn1}"/>
<ColumnDefinition Width="{Binding WidthColumn2}"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -32,10 +32,11 @@
</Grid.RowDefinitions>
<!--<EgtDOORCreator:AssemblyManagerV Grid.Column="0" DataContext="{StaticResource AssemblyManagerVM}"/>-->
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
<ContentControl Grid.Column="0" Grid.Row="1" Content="{Binding PageControl}"/>
<EgtDOORCreator:SceneManagerV Grid.Column="1" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>
<ContentControl Grid.Column="{Binding AssemblyManagerDisposition}" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
<ContentControl Grid.Column="{Binding PageControlDisposition}" Grid.Row="1" Content="{Binding PageControl}"/>
<!--<EgtDOORCreator:SceneManagerV Grid.Column="{Binding SceneManagerDiposition}" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>-->
<!--<EgtDOORCreator:SceneManagerV Grid.Column="0" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>-->
<ContentControl Grid.Column="{Binding SceneManagerDiposition}" Grid.RowSpan="2" Content="{Binding SceneManagerControl}"/>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
+1
View File
@@ -13,6 +13,7 @@ Class MainWindowV
' se è assente la chiave di protezione non mostro la finestra Launcher
If Map.refSceneManagerVM.bProtectKey Then
Map.refMainWindowVM.SetLauncher()
Map.refMainWindowVM.ShowErrorCompoLoad()
End If
End Sub
+76
View File
@@ -77,6 +77,7 @@ Public Class MainWindowVM
Private m_PartPage As PartPageV
Private m_AssemblyPage As AssemblyPageV
Private m_HardwarePage As HardwarePageV
Private m_SceneManager As SceneManagerV
Private Watcher As FileSystemWatcher = New FileSystemWatcher(IniFile.m_CompoDir, "*" & LUA_EXTENSION)
@@ -128,6 +129,12 @@ Public Class MainWindowVM
End Get
End Property
Public ReadOnly Property SceneManagerControl As ContentControl
Get
Return m_SceneManager
End Get
End Property
Public ReadOnly Property ProjectManagerControl As ContentControl
Get
If m_SelectedPage <> ListPageEnum.nHardwarePage then
@@ -159,10 +166,79 @@ Public Class MainWindowVM
m_HardwarePage.DataContext = New HardwarePageVM
m_AssemblyManager = New AssemblyManagerV
m_AssemblyManager.DataContext = New AssemblyManagerVM
' inserisco la scena
m_SceneManager = New SceneManagerV
m_SceneManager.DataContext = New SceneManagerVM
Dim OptionsPage As OptionsVM = OptionPage
InitWatcher()
End Sub
#Region "DISPOSITION SCREEN"
Public ReadOnly Property WidthColumn1 As String
Get
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
Return "5*"
Else
Return "6*"
End If
End Get
End Property
Public ReadOnly Property WidthColumn2 As String
Get
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
Return "6*"
Else
Return "5*"
End If
End Get
End Property
Public ReadOnly Property AssemblyManagerDisposition As String
Get
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
Return "1"
Else
Return "0"
End If
End Get
End Property
Public ReadOnly Property PageControlDisposition As String
Get
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
Return "1"
Else
Return "0"
End If
End Get
End Property
Public ReadOnly Property SceneManagerDiposition As String
Get
If OptionModule.m_nDispostionScreen = 1 Or OptionModule.m_nDispostionScreen = 2 Then
Return "0"
Else
Return "1"
End If
End Get
End Property
#End Region ' Disposition Screen
#Region "Methods"
Public Sub ShowErrorCompoLoad()
Dim sError As String = Map.refCompoPanelVM.ErrorLoadCompo
If Not String.IsNullOrEmpty(sError) Then
MessageBox.Show(sError, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
EgtOutLog(sError)
End If
End Sub
#End Region ' Methods
#Region "Watcher"
Public Enum WatcherCalling
+2 -2
View File
@@ -72,5 +72,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.11.3")>
<Assembly: AssemblyFileVersion("2.3.11.3")>
<Assembly: AssemblyVersion("2.4.9.1")>
<Assembly: AssemblyFileVersion("2.4.9.1")>
+21
View File
@@ -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)
@@ -43,6 +45,8 @@ Friend Module OptionModule
Friend m_EnableBrowse As Boolean = False
Friend m_nDispostionScreen As Integer = 0
Friend Enum LauncherOpt As Integer
Open_window = 0
Open_last_project = 1
@@ -216,11 +220,28 @@ Friend Module OptionModule
m_ConfigurationSoftware = ConfigType.Door
End If
' verifico se il programma è in modalità di sola lettura DDF
If (IniFile.m_nKeyOptions And KEY_OPT.READ_ONLY) <> 0 Then
OptionModule.ReadOnlyDDF = True
ElseIf 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)
m_SelectedMeasureUnit = m_MeasureUnitList(If(m_bIsMmUnit, 0, 1))
' leggo come deve essere visualizzato il programma
Dim nDispositionScreen As Integer = GetMainPrivateProfileInt(S_GENERAL, "DispositionScreen", 0)
If nDispositionScreen < 0 Or nDispositionScreen > 2 Then
m_nDispostionScreen = 0
Else
m_nDispostionScreen = nDispositionScreen
End If
' imposto tipo di avvio
Dim nLauncher As Integer = GetMainPrivateProfileInt(S_LAUNCHERWINDOW, K_LAUNCHER, 0)
m_SelectedOptionLauncher = (nLauncher Mod LoOpenOnce)
+17 -6
View File
@@ -1,6 +1,7 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OrderV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}" Icon="/Resources/EgtDOOR.ico"
TitleBarBrush="{StaticResource EgaltechBlue1}"
@@ -10,7 +11,11 @@
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Height="250" Width="350">
<Grid Margin="2">
<Window.Resources>
<EgtDOORCreator:TrueToFalse x:Key="TrueToFalse"/>
</Window.Resources>
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.6*"/>
<ColumnDefinition Width="1*"/>
@@ -26,31 +31,36 @@
</Grid.RowDefinitions>
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Customer}"
Style="{StaticResource DoorParamsTxBx}"
Margin="5,0,15,5"/>
Margin="5,0,15,5"
IsReadOnly="{Binding IsReadOnly}"/>
<TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding CustomerMsg}" VerticalAlignment="Center"
Margin="15,0,0,0"
Style="{StaticResource DoorParamsTxBl}"/>
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Elevation}"
Style="{StaticResource DoorParamsTxBx}"
Margin="5,0,15,5"/>
Margin="5,0,15,5"
IsReadOnly="{Binding IsReadOnly}"/>
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding ElevationMsg}" VerticalAlignment="Center"
Margin="15,0,0,0"
Style="{StaticResource DoorParamsTxBl}"/>
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Project}"
Style="{StaticResource DoorParamsTxBx}"
Margin="5,0,15,5"/>
Margin="5,0,15,5"
IsReadOnly="{Binding IsReadOnly}"/>
<TextBlock Grid.Column="0" Grid.Row="2" Text="{Binding ProjectMsg}" VerticalAlignment="Center"
Margin="15,0,0,0"
Style="{StaticResource DoorParamsTxBl}"/>
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding PO}"
Style="{StaticResource DoorParamsTxBx}"
Margin="5,0,15,5"/>
Margin="5,0,15,5"
IsReadOnly="{Binding IsReadOnly}"/>
<TextBlock Grid.Column="0" Grid.Row="3" Text="{Binding POMsg}" VerticalAlignment="Center"
Margin="15,0,0,0"
Style="{StaticResource DoorParamsTxBl}"/>
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Line}"
Style="{StaticResource DoorParamsTxBx}"
Margin="5,0,15,5"/>
Margin="5,0,15,5"
IsReadOnly="{Binding IsReadOnly}"/>
<TextBlock Grid.Column="0" Grid.Row="4" Text="{Binding LineMsg}" VerticalAlignment="Center"
Margin="15,0,0,0"
Style="{StaticResource DoorParamsTxBl}"/>
@@ -62,6 +72,7 @@
SelectedItem="{Binding Configuration}"/>-->
<Button Grid.Column="1" Grid.Row="5" Margin="70,2,30,2"
Content="{Binding SaveMsg}"
IsEnabled="{Binding IsReadOnly, Converter={StaticResource TrueToFalse}}"
IsDefault="True"
IsCancel="True"/>
</Grid>
+6
View File
@@ -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
+22 -13
View File
@@ -5,11 +5,13 @@
<StackPanel Orientation="Horizontal" IsEnabled="{Binding EnableProjectManager}" Height="32">
<!--Barra superiore dei comandi-->
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}" Focusable="False">
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}" Focusable="False"
IsEnabled="{Binding EnableModifyDDF}">
<Image Source="{Binding NewProjectImg}" Stretch="Uniform"/>
</Button>
<!--Visibility="{Binding VisibilityDeleteDDF}"-->
<Button Command="{Binding DeleteCommand}" ToolTip="{Binding DeleteToolTip}" Focusable="False">
<Button Command="{Binding DeleteCommand}" ToolTip="{Binding DeleteToolTip}" Focusable="False"
IsEnabled="{Binding EnableModifyDDF}">
<Image Source="{Binding DeleteProjectImg}" Stretch="Uniform"/>
</Button>
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
@@ -31,31 +33,35 @@
</Button.ContextMenu>
<Image Source="/Resources/TopCommandBar/Open.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ReloadCommand}" ToolTip="{Binding ReloadToolTip}" Focusable="False">
<Button Command="{Binding ReloadCommand}" ToolTip="{Binding ReloadToolTip}" Focusable="False"
IsEnabled="{Binding EnableModifyDDF}">
<Image Source="/Resources/Refresh/RefreshDir.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding SaveCommand}" ToolTip="{Binding SaveToolTip}" Focusable="False">
<Button Command="{Binding SaveCommand}" ToolTip="{Binding SaveToolTip}" Focusable="False"
IsEnabled="{Binding EnableModifyDDF}">
<Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/>
<!--<Image Source="{Binding IsModifiedImage}" Stretch="Uniform"/>-->
</Button>
<Button Command="{Binding DuplicaCommand}" ToolTip="{Binding DuplicaToolTip}" Focusable="False">
<Button Command="{Binding DuplicaCommand}" ToolTip="{Binding DuplicaToolTip}" Focusable="False"
IsEnabled="{Binding EnableModifyDDF}">
<ContentControl>
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform" />
</ContentControl>
</Button>
<Button Command="{Binding CreateTemplateCommand}" ToolTip="{Binding TemplateDoorToolTip}" Focusable="False"
Visibility="{Binding VisibilityTemplate}">
Visibility="{Binding VisibilityTemplate}" IsEnabled="{Binding EnableModifyDDF}">
<ContentControl>
<Image Source="/Resources/TopCommandBar/SaveAsTemplate.png" Stretch="Uniform" />
</ContentControl>
</Button>
<Button Command="{Binding CopyCommand}" ToolTip="{Binding CopyToolTip}" Focusable="False">
<Button Command="{Binding CopyCommand}" ToolTip="{Binding CopyToolTip}" Focusable="False"
IsEnabled="{Binding EnableModifyDDF}">
<ContentControl>
<Image Source="/Resources/TopCommandBar/Export.png" Stretch="Uniform" />
</ContentControl>
</Button>
<Button Command="{Binding OpenCamCommand}" ToolTip="{Binding OpenCamToolTip}" Focusable="False"
Visibility="{Binding VisibilityEgtCAM}">
Visibility="{Binding VisibilityEgtCAM}" IsEnabled="{Binding EnableModifyDDF}">
<ContentControl>
<Image Source="/Resources/EgtCAM5.png" Stretch="Uniform" />
</ContentControl>
@@ -76,16 +82,17 @@
</ContentControl>
</Button>-->
<Button Command="{Binding CreateAssemblyCommand}" ToolTip="{Binding CreateAssemblyToolTip}" Focusable="False"
Visibility="{Binding VisibilityCreateAssembly}">
Visibility="{Binding VisibilityCreateAssembly}" IsEnabled="{Binding EnableModifyDDF}">
<ContentControl>
<Image Source="/Resources/TopCommandBar/Create Assembly.png" Stretch="Uniform" />
</ContentControl>
</Button>
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}" Focusable="False"
Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}">
Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}" IsEnabled="{Binding EnableModifyDDF}">
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
</Button>
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}" Focusable="False">
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}" Focusable="False"
IsEnabled="{Binding EnableModifyDDF}">
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
</Button>
<Button Command="{Binding GuideCommand}" ToolTip="{Binding GuideToolTip}" Focusable="False">
@@ -97,12 +104,14 @@
<RadioButton Style="{StaticResource ModeButton}" Visibility="{Binding DisableHM}"
ToolTip="{Binding DoorToolTip}"
IsChecked="{Binding DoorIsChecked}"
Content="{Binding DoorToolTip}">
Content="{Binding DoorToolTip}"
IsEnabled="{Binding EnableModifyDDF}">
</RadioButton>
<!--Hardware-->
<RadioButton Style="{StaticResource ModeButton}" Visibility="{Binding DisableHM}"
Command="{Binding HardwareCommand}" ToolTip="{Binding HardwareToolTip}"
Content="{Binding HardwareToolTip}">
Content="{Binding HardwareToolTip}"
IsEnabled="{Binding EnableModifyDDF}">
</RadioButton>
</StackPanel>
</UserControl>
+9 -1
View File
@@ -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
@@ -1340,7 +1347,8 @@ Public Class ProjectManagerVM
Proc.StartInfo.FileName = IniFile.m_sEgtCameEXEPath
' 0: creata una porta come descritta nel file riferito
' 1 viene creata la porta e il suo programma di lavorazione sul centro di lavoro preconfigurato
Proc.StartInfo.Arguments = """" & CurrFile & """ " & If((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift, """1""", """0""")
' Proc.StartInfo.Arguments = """" & CurrFile & """ " & If((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift, """1""", """0""")
Proc.StartInfo.Arguments = """" & CurrFile & """ " & """0"""
If Not Proc.Start() Then
' Error in starting EgtCam5.exe
MessageBox.Show(EgtMsg(50567), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
@@ -173,10 +173,15 @@ Public Class InstrumentPanelVM
Private m_DimensioningLayer As Integer
Public Sub LinearDimension(ByVal param As Object)
GetDistIsChecked = False
EgtSetCurrPartLayer(EgtGetFirstPart(), m_DimensioningLayer)
If EgtSetCurrPartLayer(1, m_DimensioningLayer) Then
Dim nIndFirstPart As Integer = EgtGetFirstPart()
m_DimensioningLayer = EgtGetFirstNameInGroup(nIndFirstPart, "AUX")
If Not EgtSetCurrPartLayer(nIndFirstPart, m_DimensioningLayer) Then
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.NEWPART)
Map.refSceneManagerVM.GetController.ExecuteCommand(Controller.CMD.NEWLAYER)
nIndFirstPart = EgtGetFirstPart()
m_DimensioningLayer = EgtGetCurrLayer()
EgtSetCurrPartLayer(1, m_DimensioningLayer)
'EgtSetColor(m_DimensioningLayer, "BLACK")
End If
' blocco la pagina corrente
+3 -1
View File
@@ -109,7 +109,8 @@ Public Class SceneManagerVM
' Creazione scena
PreInitializeScene()
' Se tutto bene
If m_ProjectScene.Init() And (IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 Then
If m_ProjectScene.Init() And ((IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 OrElse
(Not (IniFile.m_nKeyOptions And KEY_OPT.DOORCREATOR) <> 0 AndAlso (IniFile.m_nKeyOptions And KEY_OPT.READ_ONLY) <> 0)) Then
EgtSetCurrentContext(m_ProjectScene.GetCtx)
PostInitializeScene()
m_ProjectScene.SetStatusNull()
@@ -453,6 +454,7 @@ Public Class SceneManagerVM
End Sub
Private Sub OnMouseSelectedPoint(ByVal sender As Object, ByVal PtP As Point3d, ByVal nSep As SEP, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPoint
EgtSetCurrentContext(Map.refSceneManagerVM.ProjectScene.GetCtx())
Dim bDone As Boolean = (Keyboard.Modifiers And ModifierKeys.Control) <> ModifierKeys.Control
m_Controller.MouseSelectedPoint(PtP, nSep, nId, bDone)
End Sub
+3
View File
@@ -22,6 +22,9 @@ Public Module Utility
' CurrFile deve arrivare già senza estensione!
Private Function GenerateLockFileName(ByVal CurrDirectory As String, Optional ByVal CurrFile As String = "") As String
If OptionModule.ReadOnlyDDF Then
Return String.Empty
End If
' per bloccare il direttorio
If String.IsNullOrEmpty(CurrFile) Then
Return CurrDirectory & "\Lock_Project" & LCK_EXTENSION