Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 07e19039ea | |||
| 30a5b5ed49 | |||
| 467874aa93 | |||
| ae2d1e427b | |||
| c12c8f296a | |||
| 901e151399 | |||
| 81711ec12e | |||
| e6ed99afca | |||
| be57be1e27 | |||
| 9853d78cf9 | |||
| f43134d996 | |||
| 3d259cfb9f |
@@ -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
|
||||
|
||||
@@ -2072,8 +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
|
||||
If Not Text.IsActive Then sValue &= "; 0"
|
||||
' 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)
|
||||
@@ -2143,13 +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 sValue &= "; 0"
|
||||
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, 2406, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2406, 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>
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.6.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()
|
||||
|
||||
Reference in New Issue
Block a user