SarmaxWall 1.6i3 :
- modifiche per gestione PAN, ROTATE e ZOOMWIN - aggiunta possibilità di cancellare porte o finsetre mentre si sta definendo una parete - migliorata selezione pezzi, ora solo su tasto sinistro (come touch).
This commit is contained in:
+2
-2
@@ -83,8 +83,8 @@
|
||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||
<Grid Name="BottomButtonsGrid" Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
+39
-6
@@ -8,6 +8,8 @@ Public Class DrawPageUC
|
||||
Private Const NUM_VAR As Integer = 4
|
||||
Private Const LUA_CMP_VARS As String = "CMP"
|
||||
Private Const LUA_CMP_DRAW As String = "CMP_Draw"
|
||||
Private Const LUA_REMOVEHOLE As String = "RemoveHole"
|
||||
Private Const LUA_PREINSERT As String = "PreInsert"
|
||||
Private Const INFO_CMP As String = "CMP"
|
||||
Private Const LUA_CMP_WALL As String = "Wall"
|
||||
Private Const LUA_CMP_DOOR As String = "Door"
|
||||
@@ -198,6 +200,18 @@ Public Class DrawPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub CancelBtn_Click(sender As Object, e As RoutedEventArgs) Handles CancelBtn.Click
|
||||
' Leggo l'indice del componente corrente
|
||||
Dim nCmp As Integer = 0
|
||||
If Not EgtLuaGetGlobIntVar(LUA_CMP_INDEX, nCmp) Or nCmp < 1 Then
|
||||
Return
|
||||
End If
|
||||
Dim sCmp As String = nCmp.ToString()
|
||||
' Lancio cancellazione
|
||||
If Not EgtLuaExecLine(LUA_REMOVEHOLE & "(" & nCmp & ")") Then
|
||||
EgtOutLog("Error in RemoveHole execution")
|
||||
Return
|
||||
End If
|
||||
' Sistemo interfaccia
|
||||
ResetBtns()
|
||||
m_ActiveComponent = Components.Null
|
||||
' Deseleziono oggetto corrente e aggiorno visualizzazione
|
||||
@@ -213,6 +227,10 @@ Public Class DrawPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles DrawScene.OnMouseDownScene
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or Not DrawScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' Si può selezionare solo se non si sta già editando un componente
|
||||
If m_ActiveComponent <> Components.Null Then
|
||||
Return
|
||||
@@ -264,6 +282,8 @@ Public Class DrawPageUC
|
||||
ResetLuaVariables()
|
||||
' Carico il file
|
||||
Dim bOk As Boolean = ExecCompoFile()
|
||||
' Leggo le variabili da Lua (per sapere numero, nome e tipo)
|
||||
ReadVariables()
|
||||
' Imposto le variabili del componente
|
||||
For i As Integer = 1 To NUM_VAR
|
||||
' leggo il valore della variabile
|
||||
@@ -294,8 +314,8 @@ Public Class DrawPageUC
|
||||
MessageLabel.Background = If(m_bDrawOk, Brushes.White, Brushes.Tomato)
|
||||
DrawScene.ZoomAll()
|
||||
m_bEdit = True
|
||||
' Leggo variabili e aggiorno griglia
|
||||
ReadAndShowVariables()
|
||||
' Aggiorno griglia
|
||||
ShowVariables()
|
||||
' Visualizzo bottoni Add e Cancel, e MessageLabel
|
||||
ShowComponentsButtons()
|
||||
End Sub
|
||||
@@ -350,13 +370,13 @@ Public Class DrawPageUC
|
||||
MessageLabel.Background = If(m_bDrawOk, Brushes.White, Brushes.Tomato)
|
||||
DrawScene.ZoomAll()
|
||||
' Leggo variabili e aggiorno griglia
|
||||
ReadAndShowVariables()
|
||||
ReadVariables()
|
||||
ShowVariables()
|
||||
' Visualizzo bottoni Add e Cancel, e MessageLabel
|
||||
ShowComponentsButtons()
|
||||
End Sub
|
||||
|
||||
Private Function ReadAndShowVariables() As Boolean
|
||||
m_bShowVar = True
|
||||
Private Function ReadVariables() As Boolean
|
||||
' Recupero nome, tipo e valore delle variabili globali
|
||||
For i As Integer = 1 To NUM_VAR
|
||||
Dim CVar = New CompoVar
|
||||
@@ -367,7 +387,12 @@ Public Class DrawPageUC
|
||||
m_CVars(i - 1) = Nothing
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function ShowVariables() As Boolean
|
||||
' Aggiorno la griglia dalle variabili
|
||||
m_bShowVar = True
|
||||
For i As Integer = 1 To NUM_VAR
|
||||
If m_CVars(i - 1) IsNot Nothing Then
|
||||
GetNameEdit(i).Content = m_CVars(i - 1).m_sName
|
||||
@@ -441,6 +466,11 @@ Public Class DrawPageUC
|
||||
End Function
|
||||
|
||||
Private Function MakeInsert(ByVal nNbr As Integer) As Boolean
|
||||
' Lancio funzione pre-inserimento
|
||||
If Not EgtLuaExecLine(LUA_PREINSERT & "()") Then
|
||||
EgtOutLog("Error in PreInsert execution")
|
||||
Return False
|
||||
End If
|
||||
' Vettore nomi file temporanei
|
||||
Dim sTmpFiles As New ArrayList()
|
||||
' Ciclo di salvataggio dei pezzi
|
||||
@@ -450,6 +480,7 @@ Public Class DrawPageUC
|
||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\Wall" & nId & ".Nge"
|
||||
sTmpFiles.Add(sTmpFile)
|
||||
If Not EgtSaveObjToFile(nId, sTmpFile, NGE.BIN) Then
|
||||
EgtOutLog("Error in saveObjToFile ")
|
||||
Return False
|
||||
End If
|
||||
' Passo al pezzo successivo
|
||||
@@ -503,7 +534,9 @@ Public Class DrawPageUC
|
||||
ResetBtns()
|
||||
m_ActiveComponent = Components.Null
|
||||
' Inserisco il componente nel DB geometrico principale
|
||||
MakeInsert(1)
|
||||
If Not MakeInsert(1) Then
|
||||
Return
|
||||
End If
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
' Istruzioni per chiudere DrawPageUC e aprire PlacePage UC
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@
|
||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||
<Grid Name="BottomButtonsGrid" Grid.Column="1" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -181,20 +181,14 @@ Public Class ImportPageUC
|
||||
m_sCurrDir = IO.Path.GetDirectoryName(m_sCurrDir)
|
||||
m_sCurrFile = ""
|
||||
LoadCurrDir()
|
||||
'ListBox1.Items(0).Selected = True
|
||||
'ListBox1.Items(0).Focused = True
|
||||
Case 1 ' Vai nella radice del disco
|
||||
m_sCurrDir = vItems.Name
|
||||
m_sCurrFile = ""
|
||||
LoadCurrDir()
|
||||
'ListBox1.Items(0).Selected = True
|
||||
'ListBox1.Items(0).Focused = True
|
||||
Case 2 ' Vai nel sottodirettorio
|
||||
m_sCurrDir = IO.Path.Combine(m_sCurrDir, vItems.Name)
|
||||
m_sCurrFile = ""
|
||||
LoadCurrDir()
|
||||
'ListBox1.Items(0).Selected = True
|
||||
'ListBox1.Items(0).Focused = True
|
||||
Case 3 ' File
|
||||
m_sCurrFile = vItems.Name
|
||||
LoadCurrFile()
|
||||
@@ -245,6 +239,10 @@ Public Class ImportPageUC
|
||||
End Function
|
||||
|
||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or Not ImportScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelect(True, True, True, True, True)
|
||||
Dim nSel As Integer
|
||||
|
||||
@@ -55,5 +55,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.6.9.2")>
|
||||
<Assembly: AssemblyFileVersion("1.6.9.2")>
|
||||
<Assembly: AssemblyVersion("1.6.9.3")>
|
||||
<Assembly: AssemblyFileVersion("1.6.9.3")>
|
||||
|
||||
+2
-2
@@ -82,8 +82,8 @@
|
||||
<!-- Definizione della Grid Inferiore per i Button Genera e Trasmetti -->
|
||||
<Grid Name="BottomButtonsGrid" Grid.Column="2" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -99,6 +99,10 @@ Public Class PlacePageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles PlaceScene.OnMouseDownScene
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or Not PlaceScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelect(True, True, True, True, True)
|
||||
Dim nSel As Integer
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -241,6 +241,9 @@
|
||||
<Resource Include="Resources\ZoomIn.png" />
|
||||
<Resource Include="Resources\ZoomOut.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ZoomWin.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\SarmaxWall\SarmaxWallR32.exe
|
||||
|
||||
+16
-6
@@ -4,9 +4,14 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="64" d:DesignWidth="409.6">
|
||||
d:DesignHeight="64" d:DesignWidth="455">
|
||||
|
||||
<!-- Definizione del controllo SceneButton -->
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary Source="SarmaxWallDictionary.xaml"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<!-- Definizione del controllo SceneButton -->
|
||||
<Grid Name="SceneButtonsGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -15,7 +20,8 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="ZoomAllBtn" Grid.Column="0" >
|
||||
<Image Source="Resources/ZoomAll.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
@@ -29,15 +35,19 @@
|
||||
<Image Source="Resources/ZoomOut.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="PanBtn" Grid.Column="3">
|
||||
<Button Name="ZoomWinBtn" Grid.Column="3" >
|
||||
<Image Source="Resources/ZoomWin.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="PanBtn" Grid.Column="4" >
|
||||
<Image Source="Resources/Pan.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="GenericViewBtn" Grid.Column="4">
|
||||
<Button Name="GenericViewBtn" Grid.Column="5">
|
||||
<Image Source="Resources/GenericView.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="TopViewBtn" Grid.Column="5">
|
||||
<Button Name="TopViewBtn" Grid.Column="6">
|
||||
<Image Source="Resources/LookFromTOP.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
+20
-2
@@ -2,6 +2,9 @@
|
||||
|
||||
Public Class SceneButtonsUC
|
||||
|
||||
'Riferimento alla MainWindow
|
||||
Dim m_MainWindow As MainWindow = Application.Current.MainWindow
|
||||
|
||||
Private Sub ZoomAllBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZoomAllBtn.Click
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
@@ -14,16 +17,31 @@ Public Class SceneButtonsUC
|
||||
EgtZoom(ZM.OUT)
|
||||
End Sub
|
||||
|
||||
Private Sub PanBtn_Click(sender As Object, e As RoutedEventArgs) Handles PanBtn.Click
|
||||
Private Sub ZoomWinBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZoomWinBtn.Click
|
||||
GetCurrScene.SetStatusZoomWin()
|
||||
End Sub
|
||||
|
||||
Private Sub PanBtn_Click(sender As Object, e As RoutedEventArgs) Handles PanBtn.Click
|
||||
GetCurrScene.SetStatusPan()
|
||||
End Sub
|
||||
|
||||
Private Sub GenericViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles GenericViewBtn.Click
|
||||
|
||||
GetCurrScene.SetStatusRot()
|
||||
End Sub
|
||||
|
||||
Private Sub TopViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles TopViewBtn.Click
|
||||
EgtSetView(VT.TOP)
|
||||
End Sub
|
||||
|
||||
Private Function GetCurrScene() As EgtUILib.Scene
|
||||
Select Case m_MainWindow.m_ActivePage
|
||||
Case MainWindow.Pages.Draw
|
||||
Return m_MainWindow.m_DrawPageUC.DrawScene
|
||||
Case MainWindow.Pages.Import
|
||||
Return m_MainWindow.m_ImportPageUC.ImportScene
|
||||
Case Else
|
||||
Return m_MainWindow.m_PlacePageUC.PlaceScene
|
||||
End Select
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user