Compare commits

..

2 Commits

Author SHA1 Message Date
NicolaP 0e7764b9df Merge branch 'Features/Correzione_Sel_Material_Assemb' 2022-11-07 11:38:44 +01:00
NicolaP c745c69ad2 Correzione lettura materiale in assemblato 2022-11-07 11:38:31 +01:00
9 changed files with 28 additions and 188 deletions
+5 -5
View File
@@ -12,16 +12,16 @@
<EgtDOORCreator:TrueToFalse x:Key="TrueToFalse"/>
</UserControl.Resources>
<Grid Name="MainGrid" IsEnabled="{Binding EnablePageDoor}">
<Grid IsEnabled="{Binding EnablePageDoor}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding WidthColumn1}"/>
<ColumnDefinition Width="{Binding WidthColumn2}"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Margin="0,0,0,0.2" Grid.Column="{Binding GridGeneralDiposition}" IsEnabled="{Binding IsReadOnly}">
<Grid Margin="0,0,0,0.2" Grid.Column="1" 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 Name="MainContentConrol" Grid.Column="{Binding CompoPanelDiposition}" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
<!--<EgtDOORCreator:CompoPanelV Grid.Column="0" DataContext="{Binding CompoPanelPartVM}"/>-->
</Grid>
</UserControl>
+2 -3
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()
@@ -30,5 +30,4 @@
Private Sub UserControl_IsEnabledChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
End Sub
End Class
-44
View File
@@ -73,50 +73,6 @@ 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()
+5 -6
View File
@@ -15,8 +15,8 @@
<Grid IsEnabled="{Binding EnablePageHardware}">
<Grid.ColumnDefinitions>
<!-- Colonna dedicata alla lista dei bottoni -->
<ColumnDefinition Width="{Binding WidthColumn1}"/>
<ColumnDefinition Width="{Binding WidthColumn2}"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
@@ -26,9 +26,8 @@
<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="{Binding GridGeneralDiposition}" Grid.Row="0">
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<!-- Deicata al general dell'hardware-->
<RowDefinition Height="Auto"/>
@@ -859,9 +858,9 @@
</Grid>
<!-- Elenco pulsanti Hardware -->
<ContentControl Grid.Column="{Binding CompoPanelDiposition}" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
<ContentControl Grid.Column="0" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="1" Margin="0,0,2,0" />
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="1" Grid.Row="1" Margin="0,0,2,0"/>
</Grid>
-44
View File
@@ -93,50 +93,6 @@ 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
+6 -7
View File
@@ -23,8 +23,8 @@
<Grid>
<Grid.ColumnDefinitions>
<!--<ColumnDefinition Width="1*"/>-->
<ColumnDefinition Width="{Binding WidthColumn1}"/>
<ColumnDefinition Width="{Binding WidthColumn2}"/>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -32,11 +32,10 @@
</Grid.RowDefinitions>
<!--<EgtDOORCreator:AssemblyManagerV Grid.Column="0" DataContext="{StaticResource AssemblyManagerVM}"/>-->
<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}"/>
<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}"/>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
-64
View File
@@ -77,7 +77,6 @@ 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)
@@ -129,12 +128,6 @@ 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
@@ -166,67 +159,10 @@ 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()
+2 -2
View File
@@ -72,5 +72,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.9.1")>
<Assembly: AssemblyFileVersion("2.4.9.1")>
<Assembly: AssemblyVersion("2.4.11.1")>
<Assembly: AssemblyFileVersion("2.4.11.1")>
+8 -13
View File
@@ -45,8 +45,6 @@ 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
@@ -234,14 +232,6 @@ 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)
@@ -834,12 +824,17 @@ Friend Module OptionModule
Friend Sub CreateNewPropertiesList(ByRef LocalPart As Part)
If OptionModule.m_DisableProperties <> Visibility.Visible Then Return
If OptionModule.m_MaterialList.Count > 0 Then
LocalPart.SetMaterial(OptionModule.m_MaterialList(0))
' assegno la proprietà di materiale
If Not IsNothing(LocalPart.SelectedMaterial) Then
LocalPart.SetMaterial(LocalPart.SelectedMaterial)
Else
LocalPart.SetMaterial(OptionModule.m_MaterialList(0))
End If
LocalPart.SetPropertiesList(OptionModule.m_MaterialList(0).PropertiesList)
Return
End If
' configurazione senza materiali
If LocalPart.PropertiesList.Count > 0 Then LocalPart.PropertiesList.Clear()
' configurazione senza materiali
If LocalPart.PropertiesList.Count > 0 Then LocalPart.PropertiesList.Clear()
For Each Item In OptionModule.m_PropertList
LocalPart.PropertiesList.Add(New PropertyItem(Item.Name, Item.GraphicName, Item.IsChecked))
Next