- aggiunto bottomrail per sash

- aggiunto bottone per visualizzare/nascondere ferramenta
- impostata path cartella profilo nel costruttore
This commit is contained in:
Emmanuele Sassi
2025-04-15 17:31:39 +02:00
parent 9acbbab49e
commit 761490510b
3 changed files with 81 additions and 6 deletions
+17 -3
View File
@@ -243,6 +243,16 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</GroupBox>
<Expander IsExpanded="{Binding SelArea.BottomRail}"
Header="Bottom Rail"
Margin="0,0,0,10"
Style="{StaticResource Expander.CheckBoxHeader}">
<UniformGrid Columns="2"
Margin="0,5">
<TextBlock Text="Quantità"/>
<TextBox Text="{Binding SelArea.BottomRailQty}"/>
</UniformGrid>
</Expander>
<TextBlock Text="Modello ferramenta"
Margin="0,0,0,5"/>
<ComboBox ItemsSource="{Binding SelArea.HardwareList}"
@@ -370,14 +380,18 @@
<RadioButton Content="2D"
IsChecked="{Binding bIsShow2DOn}"
Margin="0,0,5,0"
Style="{StaticResource ToolBar.DShowMode}"/>
Style="{StaticResource ToggleButton.ToolBar.DShowMode}"/>
<RadioButton Content="S3D"
IsChecked="{Binding bIsShowSimple3DOn}"
Margin="0,0,5,0"
Style="{StaticResource ToolBar.DShowMode}"/>
Style="{StaticResource ToggleButton.ToolBar.DShowMode}"/>
<RadioButton Content="3D"
IsChecked="{Binding bIsShow3DOn}"
Style="{StaticResource ToolBar.DShowMode}"/>
Margin="0,0,5,0"
Style="{StaticResource ToggleButton.ToolBar.DShowMode}"/>
<ToggleButton Content="Ferramenta"
IsChecked="{Binding HardwareShowMode}"
Style="{StaticResource ToggleButton.ToolBar.DShowMode}"/>
</StackPanel>
<local:SceneHostV Grid.Row="1"/>
</Grid>
+63 -2
View File
@@ -153,6 +153,22 @@ Public Class ManageWindowVM
End Set
End Property
Private m_HardwareShowMode As Boolean = True
Public Property HardwareShowMode As Boolean
Get
Return m_HardwareShowMode
End Get
Set(value As Boolean)
m_HardwareShowMode = value
' imposto se mostrare solido ferramenta
Dim gf = EgtLuaCreateGlobTable("WDG")
Dim kl = EgtLuaSetGlobBoolVar("WDG.AUXSTATUS", m_HardwareShowMode)
Dim kj = EgtLuaCallFunction("WinSetAuxGrpStatus")
Dim go = EgtLuaResetGlobVar("WDG")
EgtDraw()
End Set
End Property
#Region "Split"
'Private m_nSplitParamPage As SplitParamPages
@@ -218,6 +234,12 @@ Public Class ManageWindowVM
Joint.m_delDrawWindow = AddressOf DrawWindow
Split.m_delDrawWindow = AddressOf DrawWindow
Sash.m_delDrawWindow = AddressOf DrawWindow
' imposto path profilo per lua
Dim gg = EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.sBaseDir & "\" & DESIGNING_DIR & "\WinProject.lua")
Dim gf = EgtLuaCreateGlobTable("WDG")
Dim kk = EgtLuaSetGlobStringVar("WDG.PROFILEPATH", Map.refMainWindowVM.MainWindowM.sProfileDir)
Dim ke = EgtLuaCallFunction("SetProfilePath")
Dim ud = EgtLuaResetGlobVar("WDG")
' carico lista hardware
RefreshHardwareList()
' creo nuova finestra
@@ -451,10 +473,9 @@ Public Class ManageWindowVM
Private Function DrawWindow(Optional bDraw As Boolean = True) As Boolean
If IsNothing(m_CurrWindow) OrElse String.IsNullOrWhiteSpace(m_CurrWindow.sProfilePath) OrElse m_CurrWindow.AreaList.Count = 0 Then Return False
EgtNewFile()
Dim gg = EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.sBaseDir & "\" & DESIGNING_DIR & "\WinProject.lua")
Dim gf = EgtLuaCreateGlobTable("WDG")
' importo profilo
Dim hh = EgtLuaSetGlobStringVar("WDG.PROFILE", Map.refMainWindowVM.MainWindowM.sProfileDir & "\" & m_CurrWindow.sProfilePath & ".nge")
Dim hh = EgtLuaSetGlobStringVar("WDG.PROFILE", m_CurrWindow.sProfilePath)
If Not EgtLuaCallFunction("WinCreate_ImportProfile") Then Return False
' creo aree
For Each Area In m_CurrWindow.AreaList
@@ -1665,6 +1686,8 @@ Public Class Frame
Dim NewFrame As New Frame(Nothing)
NewFrame.SetAreaType(AreaTypes.FRAME)
NewFrame.SetSelShape(Shapes.RECTANGLE)
NewFrame.SetBottomRail(False)
NewFrame.SetBottomRailQty(0)
NewFrame.AppliedDone()
Return NewFrame
End Function
@@ -1897,6 +1920,32 @@ Public Class Sash
End Set
End Property
Private m_bBottomRail As Boolean
Public Property BottomRail As Boolean
Get
Return m_bBottomRail
End Get
Set(value As Boolean)
m_bBottomRail = value
End Set
End Property
Friend Sub SetBottomRail(bBottomRail As Boolean)
m_bBottomRail = bBottomRail
End Sub
Private m_nBottomRailQty As Integer = 0
Public Property BottomRailQty As Integer
Get
Return m_nBottomRailQty
End Get
Set(value As Integer)
m_nBottomRailQty = value
End Set
End Property
Friend Sub SetBottomRailQty(nBottomRailQty As Integer)
m_nBottomRailQty = nBottomRailQty
End Sub
Private m_bIsPercentage As Boolean = True
Public ReadOnly Property bIsPercentage As Boolean
Get
@@ -2011,6 +2060,8 @@ Public Class Sash
For JointIndex = 0 To nJointQty - 1
NewSash.JointList.Add(New Joint(JointIndex + 1, Joints.FULL_H))
Next
NewSash.SetBottomRail(False)
NewSash.SetBottomRailQty(0)
NewSash.RefreshHardwareList()
NewSash.RefreshHardwareOptionList()
NewSash.SetFirstHardware()
@@ -2185,6 +2236,11 @@ Public Class Sash
Dim tltf = EgtLuaGetGlobIntVar("WDG.AREAID", m_nAreaId)
nAreaId = m_nAreaId
If m_nAreaId = GDB_ID.NULL Then Return False
' aggiungo BottomRail se necessario
If m_bBottomRail Then
EgtLuaSetGlobIntVar("WDG.NBR", m_nBottomRailQty)
Dim tdlt = EgtLuaCallFunction("WinCreate_AddBottomRail")
End If
Else
' se piu' di un'anta
' creo split
@@ -2270,6 +2326,11 @@ Public Class Sash
Dim tltf = EgtLuaGetGlobIntVar("WDG.AREAID", nNewAreaId)
Area.AreaList(nSashIndex).nAreaId = nNewAreaId
If nNewAreaId = GDB_ID.NULL Then Return False
' aggiungo BottomRail se necessario
If m_bBottomRail Then
EgtLuaSetGlobIntVar("WDG.NBR", m_nBottomRailQty)
Dim tdlt = EgtLuaCallFunction("WinCreate_AddBottomRail")
End If
Next
End If
' aggiungo ferramenta
+1 -1
View File
@@ -332,7 +332,7 @@
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style x:Key="ToolBar.DShowMode" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Style x:Key="ToggleButton.ToolBar.DShowMode" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="50"/>
<Setter Property="BorderThickness" Value="0"/>