Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 07e19039ea | |||
| 30a5b5ed49 | |||
| 467874aa93 | |||
| ae2d1e427b | |||
| c12c8f296a | |||
| 901e151399 | |||
| 81711ec12e | |||
| e6ed99afca | |||
| be57be1e27 | |||
| 9853d78cf9 | |||
| f43134d996 | |||
| 3d259cfb9f | |||
| 10bf8719bd | |||
| 9b0ce1a094 | |||
| 47e84044f9 | |||
| a82ded8b77 | |||
| 915e3f32db | |||
| c24f12a208 | |||
| f3a53efa42 | |||
| 1e75e0073c | |||
| e0281a3f46 | |||
| cf07c578a0 |
@@ -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" />
|
||||
|
||||
@@ -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
|
||||
@@ -75,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
|
||||
@@ -87,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"
|
||||
@@ -215,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
|
||||
+28
-2
@@ -1883,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")
|
||||
@@ -1898,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)
|
||||
@@ -1926,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
|
||||
|
||||
@@ -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}}}"/>
|
||||
@@ -893,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>
|
||||
|
||||
@@ -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()
|
||||
@@ -30,4 +30,5 @@
|
||||
Private Sub UserControl_IsEnabledChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, 2404, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2404, 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())
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.4.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.4.1")>
|
||||
<Assembly: AssemblyVersion("2.4.9.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.9.1")>
|
||||
|
||||
@@ -45,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
|
||||
@@ -232,6 +234,14 @@ Friend Module OptionModule
|
||||
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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user