Gestione visualizzazione schermi da Config
This commit is contained in:
@@ -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="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<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="0" 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="1" 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()
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<Grid IsEnabled="{Binding EnablePageHardware}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- Colonna dedicata alla lista dei bottoni -->
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="{Binding WidthColumn1}"/>
|
||||
<ColumnDefinition Width="{Binding WidthColumn2}"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
@@ -28,7 +28,7 @@
|
||||
</Grid.InputBindings>
|
||||
|
||||
<!-- La griglia che gestirà i parametri hardaware -->
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- Deicata al general dell'hardware-->
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -859,9 +859,9 @@
|
||||
</Grid>
|
||||
|
||||
<!-- Elenco pulsanti Hardware -->
|
||||
<ContentControl Grid.Column="1" 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="0" 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
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<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="1" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
|
||||
<ContentControl Grid.Column="1" Grid.Row="1" Content="{Binding PageControl}"/>
|
||||
<EgtDOORCreator:SceneManagerV Grid.Column="0" 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>
|
||||
|
||||
@@ -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,67 @@ 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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user