Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d31c0dd28 | |||
| 9fd4fb3f60 | |||
| 7b6063d337 | |||
| 63dec23d10 | |||
| 32b743c7e1 | |||
| c7debc8c31 | |||
| 1a5d6a5ab5 | |||
| d812365abc | |||
| acc8cd3a5e | |||
| 5f2c355121 | |||
| f3bd024f29 | |||
| 305913a8a9 | |||
| 82f4944844 | |||
| 16203c4596 | |||
| ef196d84e5 | |||
| 456e8697be | |||
| 88502249dd | |||
| 412df1c856 | |||
| fac1206613 | |||
| 9dc4278783 | |||
| 3388afffb5 | |||
| 93a54a47bb | |||
| 7d1b2004d9 | |||
| 34493aca8f | |||
| 8035f6ee87 | |||
| 2023a6217d | |||
| 6043e8bf16 | |||
| 95b1d94ea9 | |||
| 8f1e5821cd | |||
| c1272fa5d2 | |||
| 8adc2d749b | |||
| 69f52511e0 | |||
| 7a7e15f34b | |||
| 9adb463d30 | |||
| dff00ca1e7 | |||
| d3a7ef97a6 | |||
| 48edd0abc4 | |||
| edb2d25953 | |||
| 4786a666fd | |||
| bf6d36be9b | |||
| 701c6e816a | |||
| f2da51ffa7 | |||
| f70eba5633 | |||
| 1e006a8eb6 | |||
| 433cec7c52 | |||
| 862ee938c3 | |||
| b7e6d1dd7d | |||
| b5026d0a62 | |||
| 2cf32788c4 | |||
| f62672b1c6 | |||
| 93e1651af4 | |||
| 804f72527b | |||
| 7c5a2b6106 | |||
| e537861ca5 | |||
| 92e76f0c32 | |||
| d04d9fedc7 | |||
| 17fb0e9f51 | |||
| 68e2cc5c08 | |||
| ce39300091 | |||
| 9c646a6ff7 |
@@ -0,0 +1,48 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class AngleVM
|
||||
Inherits SceneUserControlVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
Title = EGT_ADDCONSTRAINT.ToUpper()
|
||||
|
||||
DirectCast(Map.refSceneButtonVM.m_AngleUC, SceneUserControlV).Preview.Visibility = Visibility.Hidden
|
||||
DirectCast(Map.refSceneButtonVM.m_AngleUC, SceneUserControlV).Annulla.Visibility = Visibility.Hidden
|
||||
|
||||
LoadParamList()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
' ' Inserisci Angolo
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, EgtMsg(110048), ParamType.STR))
|
||||
' Angolo
|
||||
AddGenericParam(New _TextBoxParam(EgtMsg(110006), 0, ParamType.DOUB, Visibility.Visible, True))
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Conferma()
|
||||
LoadEditParametric()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ShowPreview()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Annulla()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Close()
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_AngleUC)
|
||||
SolidManagerM.ManageUndoRedo()
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
+7
-7
@@ -12,13 +12,13 @@
|
||||
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
||||
MyBase.OnStartup(e)
|
||||
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||
'If e.Args.Count = 0 Then
|
||||
' ' creo finestra SplashScreen
|
||||
' Dim SplashScreen As New SplashScreenV
|
||||
' Me.MainWindow = SplashScreen
|
||||
' Me.MainWindow.Show()
|
||||
' Map.SetRefSplashScreen(SplashScreen)
|
||||
'End If
|
||||
If e.Args.Count = 0 Then
|
||||
' creo finestra SplashScreen
|
||||
Dim SplashScreen As New SplashScreenV
|
||||
Me.MainWindow = SplashScreen
|
||||
Me.MainWindow.Show()
|
||||
Map.SetRefSplashScreen(SplashScreen)
|
||||
End If
|
||||
' Creo la View principale
|
||||
Me.MainWindow = New MainWindowV
|
||||
' Mostro la View principale
|
||||
|
||||
@@ -7,19 +7,42 @@ Public Class ParametricCompoVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly sLuaPath As String = String.Empty
|
||||
Private m_sLuaPath As String = String.Empty
|
||||
Friend ReadOnly bFileExsist As Boolean = False
|
||||
Private m_nVeinCtx As Integer
|
||||
|
||||
Private m_nPartId As Integer = GDB_ID.NULL
|
||||
Public Property nPartId As Integer
|
||||
Get
|
||||
Return m_nPartId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPartId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(sFile As String)
|
||||
Sub New(sFile As String, nVeinCtx As Integer, Optional dir As String = "")
|
||||
MyBase.New()
|
||||
m_nVeinCtx = nVeinCtx
|
||||
Title = EGT_PARAMETRIC.ToUpper()
|
||||
' Recupero path cartella che contiene i componenti
|
||||
GetMainPrivateProfileString(K_COMPO, COMPO_DIR, "", sLuaPath)
|
||||
sLuaPath &= sFile
|
||||
LoadParamList()
|
||||
If Not File.Exists(dir & sFile) Then
|
||||
GetMainPrivateProfileString(K_COMPO, COMPO_DIR, "", m_sLuaPath)
|
||||
' Controllo se il file esiste
|
||||
m_sLuaPath &= sFile
|
||||
Else
|
||||
m_sLuaPath = dir & sFile
|
||||
End If
|
||||
If File.Exists(m_sLuaPath) Then
|
||||
LoadParamList()
|
||||
bFileExsist = True
|
||||
Else
|
||||
EgtOutLog("File " & m_sLuaPath & " non esiste nella cartella dei componenti")
|
||||
End If
|
||||
' aggiorno visualizzazione
|
||||
EgtSetView(VT.TOP, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -32,31 +55,32 @@ Public Class ParametricCompoVM
|
||||
Public Overrides Sub LoadParamList()
|
||||
' Pulisco lista variabili
|
||||
ParamList.Clear()
|
||||
EgtLuaExecFile(sLuaPath)
|
||||
EgtLuaExecFile(m_sLuaPath)
|
||||
Dim sPar As String = "0"
|
||||
EgtLuaGetGlobStringVar("CMP.Npar", sPar)
|
||||
Dim sName As String = String.Empty
|
||||
EgtLuaGetGlobStringVar("CMP.Nome", sName)
|
||||
Dim nPar As Integer = CInt(sPar)
|
||||
ParamList.Add(New _TextBlockParam("Messaggio", sName, Visibility.Visible))
|
||||
' Recupero nome, tipo e valore delle variabili globali
|
||||
For Index As Integer = 1 To nPar
|
||||
Dim NewCompo As GenericParam = Nothing
|
||||
If NameTypeValueFromLua(Index, NewCompo) Then
|
||||
ParamList.Add(NewCompo)
|
||||
End If
|
||||
Next
|
||||
If Not String.IsNullOrEmpty(sPar) Then
|
||||
Dim sName As String = String.Empty
|
||||
EgtLuaGetGlobStringVar("CMP.Nome", sName)
|
||||
Dim nPar As Integer = CInt(sPar)
|
||||
ParamList.Add(New _TextBlockParam(EGT_MESSAGE, sName, Visibility.Visible))
|
||||
' Recupero nome, tipo e valore delle variabili globali
|
||||
For Index As Integer = 1 To nPar
|
||||
Dim NewCompo As GenericParam = Nothing
|
||||
If NameTypeValueFromLua(Index, NewCompo) Then
|
||||
ParamList.Add(NewCompo)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExecLua()
|
||||
Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
|
||||
If Not File.Exists(sLuaPath) Then
|
||||
EgtOutLog("Matching error: missing file (" & sLuaPath & ")")
|
||||
If Not File.Exists(m_sLuaPath) Then
|
||||
EgtOutLog("Matching error: missing file (" & m_sLuaPath & ")")
|
||||
Return
|
||||
End If
|
||||
' Parsing
|
||||
EgtLuaExecFile(sLuaPath)
|
||||
EgtSetCurrentContext(nVeinCtx)
|
||||
EgtLuaExecFile(m_sLuaPath)
|
||||
EgtSetCurrentContext(m_nVeinCtx)
|
||||
For Index As Integer = 0 To ParamList.Count - 1
|
||||
If TypeOf ParamList(Index) Is _TextBoxParam Then
|
||||
Dim _TextBox As _TextBoxParam = DirectCast(ParamList(Index), _TextBoxParam)
|
||||
@@ -68,6 +92,15 @@ Public Class ParametricCompoVM
|
||||
Next
|
||||
EgtLuaExecLine("CMP_Draw" & "(true)")
|
||||
EgtLuaResetGlobVar("CMP")
|
||||
|
||||
' rinomino il part con un nome univoco
|
||||
Dim nPart As Integer = EgtGetLastPart()
|
||||
EgtLuaSetGlobNumVar("TOOL.nId", nPart)
|
||||
EgtLuaCallFunction("TOOL.RenameNewPart")
|
||||
EgtLuaCallFunction("TOOL.ReorganizeEdges")
|
||||
EgtLuaCallFunction("TOOL.ClearVariables")
|
||||
|
||||
nPartId = EgtGetLastPart()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Conferma()
|
||||
@@ -78,7 +111,8 @@ Public Class ParametricCompoVM
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Annulla()
|
||||
EgtErase(EgtGetFirstPart())
|
||||
Dim PartSolidSel As PartSolidM = GetPartSolid(nPartId)
|
||||
SolidManagerM.Delete(nPartId)
|
||||
EgtDraw()
|
||||
Close()
|
||||
End Sub
|
||||
@@ -91,6 +125,10 @@ Public Class ParametricCompoVM
|
||||
|
||||
Private Sub Close()
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_ParametricCompoUC)
|
||||
SolidManagerM.RefreshPartSolid(nPartId)
|
||||
' debug
|
||||
EgtSaveFile("D:\\Temp\\marmo\\Vein3D\\template.nge", 2)
|
||||
' debug
|
||||
End Sub
|
||||
|
||||
Private Function NameTypeValueFromLua(nInd As Integer, ByRef Param As GenericParam) As Boolean
|
||||
|
||||
@@ -11,17 +11,32 @@
|
||||
Public Const EGT_SEL_TYPE As String = "SelType"
|
||||
Public Const EGT_IMPORT_LOOP As String = "ImportLoop"
|
||||
Public Const EGT_CREATE_SOLID_LOOP As String = "CreateSolidFromLoop"
|
||||
Public Const EGT_CREATE_ALL_SOLIDS As String = "CreateAllSolids"
|
||||
Public Const EGT_MOVE As String = "Move"
|
||||
Public Const EGT_ALZ As String = "AddSplashTop"
|
||||
Public Const EGT_FRO As String = "AddWaterfall"
|
||||
Public Const EGT_PANEL As String = "AddPanel"
|
||||
Public Const EGT_ADD_ALZ As String = "AddSplashTop"
|
||||
Public Const EGT_ADD_FRO As String = "AddWaterfall"
|
||||
Public Const EGT_ADD_PANEL As String = "AddPanel"
|
||||
Public Const EGT_EDIT_PANEL As String = "EditPanel"
|
||||
Public Const EGT_EDIT_PARAMETRIC As String = "EditParametric"
|
||||
Public Const EGT_EXPORTPROJECT As String = "ExportProject"
|
||||
Public Const EGT_DELETE As String = "Delete"
|
||||
Public Const EGT_RECTANGE As String = "Rettangolo"
|
||||
Public Const EGT_POLIGON As String = "Poligono"
|
||||
Public Const EGT_ELLIPSE As String = "Ellisse"
|
||||
Public Const EGT_PARAMETRIC As String = "Parametric Compo"
|
||||
Public Const EGT_LENGHT As String = "Lunghezza"
|
||||
Public Const EGT_ANGLE As String = "Angolo"
|
||||
Public Const EGT_EXTREMITY As String = "Estremita'"
|
||||
Public Const EGT_ADDCONSTRAINT As String = "Aggiungi Vincolo"
|
||||
Public Const EGT_MESSAGE As String = "Messaggio"
|
||||
|
||||
Public Const EGT_PANEL As String = "Paretina"
|
||||
Public Const EGT_BOTTOM As String = "Fondo"
|
||||
Public Const EGT_SPLASHTOP As String = "Alzatina"
|
||||
Public Const EGT_WATERFALL As String = "Frontalino"
|
||||
Public Const EGT_SINK As String = "Paretine e fondo"
|
||||
Public Const EGT_SINK_SPLITBOTTOM As String = "Paretine e fondo composto"
|
||||
Public Const EGT_SPLITBOTTOM As String = "Fondo composito"
|
||||
|
||||
Public Const EGT_SLOT As String = "Fessura"
|
||||
Public Const EGT_BORE As String = "Foro"
|
||||
|
||||
Public Const EGT_X As String = "X"
|
||||
Public Const EGT_Y As String = "Y"
|
||||
@@ -69,6 +84,9 @@
|
||||
Public Const BOTTOMLIST_BTN As String = "BottomListBtn"
|
||||
Public Const BOTTOMCENTERLIST_BTN As String = "BottomCenterListBtn"
|
||||
Public Const TOPPANELLIST_BTN As String = "TopPanelListBtn"
|
||||
Public Const PARAMETRICLIST_BTN As String = "ParametricListBtn"
|
||||
Public Const INFOLLIST_BTN As String = "InfoListBtn"
|
||||
Public Const TOPPANELOFFICELIST_BTN As String = "TopPanelOfficeListBtn"
|
||||
|
||||
Public Const UTILITY_FOLDER As String = "Utility"
|
||||
|
||||
@@ -117,6 +135,27 @@
|
||||
ShowPreview = 2
|
||||
End Enum
|
||||
|
||||
Public Enum PartType As Integer
|
||||
Unknown = -1
|
||||
TopKitchen = 0
|
||||
Panel = 1
|
||||
SinkSplitBottom = 2
|
||||
Sink = 3
|
||||
End Enum
|
||||
|
||||
Public Enum JunctionType As Integer
|
||||
TrimStart = 0
|
||||
TrimEnd = 1
|
||||
Angled = 3
|
||||
End Enum
|
||||
|
||||
'enum per le fasi di modifica di un piano cucina
|
||||
Public Enum EditParametricStage As Integer
|
||||
SelectPart = 0
|
||||
SelectPoint = 1
|
||||
SelectEdge = 2
|
||||
End Enum
|
||||
|
||||
' Constanti ParametricCompo
|
||||
Public Enum ParamType As Integer
|
||||
BOOL = 1
|
||||
@@ -130,4 +169,5 @@
|
||||
Public Const LUA_VALUE As String = LUA_CMP_VARS & ".V"
|
||||
Public Const LUA_NAME As String = LUA_CMP_VARS & ".N"
|
||||
Public Const LUA_TYPE As String = LUA_CMP_VARS & ".T"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -234,7 +234,8 @@
|
||||
<DataGrid ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected}"
|
||||
ColumnHeaderStyle="{StaticResource DataGridColumnHeader}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="5*">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
|
||||
@@ -249,7 +249,7 @@ Public Class EgtManageFileDialogVM
|
||||
Set(value As Integer)
|
||||
m_nFilterIndex = value
|
||||
m_SelFilter = m_FilterList.FirstOrDefault(Function(x) x.nIndexExstension = m_nFilterIndex)
|
||||
sFileName = "New" & m_SelFilter.sExstension.Trim("*"c)
|
||||
sFileName = Path.GetFileNameWithoutExtension(sFileName) & m_SelFilter.sExstension.Trim("*"c)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -370,7 +370,7 @@ Public Class EgtManageFileDialogVM
|
||||
|
||||
#End Region
|
||||
|
||||
'Comandi
|
||||
' Comandi
|
||||
Private m_cmdCancel As ICommand
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdGoBack As ICommand
|
||||
@@ -557,8 +557,15 @@ Public Class EgtManageFileDialogVM
|
||||
Dim CurrItemSelected As EgtFolder = DirectCast(m_ItemSelected, EgtFolder)
|
||||
CurrItemSelected.SetIsSelected(True, True)
|
||||
m_sSelPath = CurrItemSelected.sFullName
|
||||
Else
|
||||
m_ItemSelected.IsSelected = True
|
||||
ElseIf TypeOf m_ItemSelected Is EgtItem Then
|
||||
Dim CurrItemSelected As EgtItem = DirectCast(m_ItemSelected, EgtItem)
|
||||
m_ItemSelected.IsExpanded = False
|
||||
If File.Exists(CurrItemSelected.sFullName) Then
|
||||
m_sFileName = CurrItemSelected.sFullName
|
||||
RaiseEvent m_CloseWindow(DialogResult.OK)
|
||||
Else
|
||||
EgtOutLog("File Inesistente")
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sSelPath))
|
||||
End Sub
|
||||
|
||||
@@ -8,17 +8,23 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Debug|x64.Build.0 = Debug|x64
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Debug|x86.Build.0 = Debug|x86
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Release|x64.ActiveCfg = Release|x64
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Release|x64.Build.0 = Release|x64
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Release|x86.ActiveCfg = Release|x86
|
||||
{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
|
||||
+102
-5
@@ -12,6 +12,21 @@
|
||||
<MyType>Custom</MyType>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -72,6 +87,30 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\EgalwareLogo.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DocumentationFile>EgtStone3D.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DocumentationFile>EgtStone3D.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib">
|
||||
<HintPath>..\..\..\EgtProg\Dll32\EgtUILib.dll</HintPath>
|
||||
@@ -80,6 +119,9 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\EgtStone3D\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.AvalonEdit, Version=6.3.0.90, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
|
||||
<HintPath>packages\AvalonEdit.6.3.0.90\lib\net462\ICSharpCode.AvalonEdit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework.Aero2" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
@@ -106,6 +148,7 @@
|
||||
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
|
||||
<DependentUpon>AboutBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Angle\AngleVM.vb" />
|
||||
<Compile Include="CompoLib\ParametricCompoVM.vb" />
|
||||
<Compile Include="Constants\ConstEgtStone3D.vb" />
|
||||
<Compile Include="EgtColorPicker\EgtColorPickerV.xaml.vb">
|
||||
@@ -118,10 +161,18 @@
|
||||
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
|
||||
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GridPanel\GridPanelVM.vb" />
|
||||
<Compile Include="GridPanel\GridPaneV.xaml.vb">
|
||||
<DependentUpon>GridPaneV.xaml</DependentUpon>
|
||||
<Compile Include="Extremity\ExtremityVM.vb" />
|
||||
<Compile Include="GridPanel\GridDimensionPanelV.xaml.vb">
|
||||
<DependentUpon>GridDimensionPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GridPanel\GridPanelVM.vb" />
|
||||
<Compile Include="GridPanel\GridPanelV.xaml.vb">
|
||||
<DependentUpon>GridPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GridPanel\GridViewPanelV.xaml.vb">
|
||||
<DependentUpon>GridViewPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Length\LengthVM.vb" />
|
||||
<Compile Include="MainWindow\MainWindowV.xaml.vb">
|
||||
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -133,6 +184,7 @@
|
||||
<Compile Include="OptionsWindow\OptionWindowVM.vb" />
|
||||
<Compile Include="Pair\PairVM.vb" />
|
||||
<Compile Include="Panel\EditPanelVM.vb" />
|
||||
<Compile Include="Panel\EditParametricVM.vb" />
|
||||
<Compile Include="Panel\NewPanelVM.vb" />
|
||||
<Compile Include="Panel\PanelManagerM.vb" />
|
||||
<Compile Include="ProjManager\ProjManagerButtonV.xaml.vb">
|
||||
@@ -155,6 +207,10 @@
|
||||
<DependentUpon>SceneUserControlV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SceneUserControl\SceneUserControlVM.vb" />
|
||||
<Compile Include="ScriptWindow\ScriptWindowV.xaml.vb">
|
||||
<DependentUpon>ScriptWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ScriptWindow\ScriptWindowVM.vb" />
|
||||
<Compile Include="SecondaryWindow\SecondaryWindowV.xaml.vb">
|
||||
<DependentUpon>SecondaryWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -187,12 +243,18 @@
|
||||
<Compile Include="TopPanel\TopPanelHomeV.xaml.vb">
|
||||
<DependentUpon>TopPanelHomeV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TopPanel\TopPanelInfoParametricV.xaml.vb">
|
||||
<DependentUpon>TopPanelInfoParametricV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TopPanel\TopPanelListButton_1V.xaml.vb">
|
||||
<DependentUpon>TopPanelListButton_1V.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TopPanel\TopPanelListV.xaml.vb">
|
||||
<DependentUpon>TopPanelListV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TopPanel\TopPanelOfficeListButtonV.xaml.vb">
|
||||
<DependentUpon>TopPanelOfficeListButtonV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TopPanel\TopPanelV.xaml.vb">
|
||||
<DependentUpon>TopPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -204,6 +266,7 @@
|
||||
</Compile>
|
||||
<Compile Include="TopPanel\TopPanelVM.vb" />
|
||||
<Compile Include="Utility\AssLogM.vb" />
|
||||
<Compile Include="Utility\ColorScriptM.vb" />
|
||||
<Compile Include="Utility\EstCalc.vb" />
|
||||
<Compile Include="Utility\GeomEntityColors.vb" />
|
||||
<Compile Include="Utility\Map.vb" />
|
||||
@@ -215,6 +278,7 @@
|
||||
<Compile Include="Constants\ConstIni.vb" />
|
||||
<Compile Include="MainWindow\MainWindowM.vb" />
|
||||
<Compile Include="Utility\PartSolidM.vb" />
|
||||
<Compile Include="Utility\RegexM.vb" />
|
||||
<Compile Include="Utility\SolidManagerM.vb" />
|
||||
<Compile Include="ViewPanelProspective\ViewPanelProspectiveV.xaml.vb">
|
||||
<DependentUpon>ViewPanelProspectiveV.xaml</DependentUpon>
|
||||
@@ -240,7 +304,15 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="GridPanel\GridPaneV.xaml">
|
||||
<Page Include="GridPanel\GridDimensionPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="GridPanel\GridPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="GridPanel\GridViewPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
@@ -272,6 +344,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ScriptWindow\ScriptWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="SecondaryWindow\SecondaryWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -308,6 +384,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="TopPanel\TopPanelInfoParametricV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="TopPanel\TopPanelListButton_1V.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -316,6 +396,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="TopPanel\TopPanelOfficeListButtonV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="TopPanel\TopPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -392,10 +476,12 @@
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
<None Include="My Project\app.manifest" />
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<Resource Include="Resources\EgalwareLogo.ico" />
|
||||
<Resource Include="Resources\Fonts\Roboto-Light.ttf" />
|
||||
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
|
||||
@@ -495,7 +581,18 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtMessageBox\Warning.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 e x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\GridViewPanel\ZoomAll.png" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ExtremityVM
|
||||
Inherits SceneUserControlVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
Title = EGT_ADDCONSTRAINT.ToUpper()
|
||||
|
||||
DirectCast(Map.refSceneButtonVM.m_ExtremityUC, SceneUserControlV).Preview.Visibility = Visibility.Hidden
|
||||
DirectCast(Map.refSceneButtonVM.m_ExtremityUC, SceneUserControlV).Annulla.Visibility = Visibility.Hidden
|
||||
|
||||
LoadParamList()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
' Scegli quale estremità vincolare
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, EgtMsg(110047), ParamType.STR))
|
||||
Dim ExtremityOptionList As New List(Of ParamCmBx)({New ParamCmBx("Start"),
|
||||
New ParamCmBx("End")})
|
||||
' Estremità
|
||||
AddGenericParam(New _ComboBoxParam(EgtMsg(110046), ExtremityOptionList, 0, Visibility.Visible))
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Conferma()
|
||||
LoadEditParametric()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ShowPreview()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Annulla()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Close()
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_ExtremityUC)
|
||||
SolidManagerM.ManageUndoRedo()
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,35 @@
|
||||
<Grid x:Class="GridDimensionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
|
||||
Margin="0,10,0,5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Content="{Binding MeasureUnit}"
|
||||
ToolTip="{Binding MeasureUnit_Msg}"
|
||||
Command="{Binding StatusUnitsCommand}"
|
||||
Style="{StaticResource GridPanel_Btn}"/>
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Name="GridDimensionBtn"
|
||||
Command="{Binding ShowPopUpCommand}"
|
||||
Style="{StaticResource Grid_Btn}">
|
||||
<EgtStone3D:SVGV FileSource="{Binding FileGridDimSVG, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</Button>
|
||||
<Popup IsOpen="{Binding IsOpenGridDimension}"
|
||||
AllowsTransparency="True"
|
||||
PopupAnimation="Scroll"
|
||||
StaysOpen="False"
|
||||
PlacementTarget="{Binding ElementName=GridDimensionBtn}">
|
||||
<TextBox Text="{Binding GridDimensionText, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource GridPanel_TextBox}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding GridDimensionCommand}"/>
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
</Popup>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class GridDimensionPanelV
|
||||
|
||||
End Class
|
||||
@@ -1,37 +0,0 @@
|
||||
<WrapPanel x:Class="GridPaneV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Style="{StaticResource GridPanel_WrapPanel}">
|
||||
|
||||
<UniformGrid Columns="2">
|
||||
<Button ToolTip="{Binding ZoomAllToolTip}"
|
||||
Command="{Binding ZoomAllCommand}"
|
||||
Style="{StaticResource Proj_Btn}">
|
||||
<Image Source="/Resources/GridViewPanel/ZoomAll.png"
|
||||
Style="{StaticResource Proj_Img}"/>
|
||||
</Button>
|
||||
<Button Content="{Binding StatusGridText}"
|
||||
Command="{Binding StatusGridCommand}"
|
||||
Style="{StaticResource Grid_Btn}"/>
|
||||
</UniformGrid>
|
||||
|
||||
|
||||
<UniformGrid Columns="2">
|
||||
<TextBlock Text="Grid" Style="{StaticResource GridPanel_TxBl}"/>
|
||||
<TextBox Text="{Binding GridDimensionText, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource GridPanel_TextBox}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding GridDimensionCommand}"/>
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
Style="{StaticResource GridPanel_UniformGrid}">
|
||||
<TextBlock Text="{Binding MeasureUnit_Msg}"
|
||||
Style="{StaticResource GridPanel_TxBl}"/>
|
||||
<Button Content="{Binding MeasureUnit}"
|
||||
Command="{Binding StatusUnitsCommand}"
|
||||
Style="{StaticResource GridPanel_Btn}"/>
|
||||
</UniformGrid>
|
||||
</WrapPanel>
|
||||
@@ -1,3 +0,0 @@
|
||||
Public Class GridPaneV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,13 @@
|
||||
<WrapPanel x:Class="GridPaneV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
|
||||
Style="{StaticResource GridPanel_WrapPanel}">
|
||||
|
||||
<EgtStone3D:GridViewPanelV DataContext="{StaticResource GridPanelVM}"/>
|
||||
|
||||
<Separator Style="{StaticResource TopPanel_Separator}"/>
|
||||
|
||||
<EgtStone3D:GridDimensionPanelV DataContext="{StaticResource GridPanelVM}"/>
|
||||
|
||||
</WrapPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class GridPanelV
|
||||
|
||||
End Class
|
||||
@@ -39,6 +39,50 @@ Public Class GridPanelVM
|
||||
NotifyPropertyChanged(NameOf(MeasureUnit))
|
||||
End Sub
|
||||
|
||||
Private m_FileGridOnOffSVG As String = String.Empty
|
||||
Public Property FileGridOnOffSVG As String
|
||||
Get
|
||||
Return m_FileGridOnOffSVG
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_FileGridOnOffSVG = value
|
||||
NotifyPropertyChanged(NameOf(FileGridOnOffSVG))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFileGridOnOffSVG(sFileGridOnOffSVG As String)
|
||||
m_FileGridOnOffSVG = sFileGridOnOffSVG
|
||||
NotifyPropertyChanged(NameOf(FileGridOnOffSVG))
|
||||
End Sub
|
||||
|
||||
Private m_FileGridDimSVG As String = String.Empty
|
||||
Public Property FileGridDimSVG As String
|
||||
Get
|
||||
Return m_FileGridDimSVG
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_FileGridDimSVG = value
|
||||
NotifyPropertyChanged(NameOf(FileGridDimSVG))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFileGridDimSVG(sFileGridDimSVG As String)
|
||||
m_FileGridDimSVG = sFileGridDimSVG
|
||||
NotifyPropertyChanged(NameOf(FileGridDimSVG))
|
||||
End Sub
|
||||
|
||||
Private m_IsOpenGridDimension As Boolean = False
|
||||
Public Property IsOpenGridDimension As Boolean
|
||||
Get
|
||||
Return m_IsOpenGridDimension
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_IsOpenGridDimension = value
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetIsOpenGridDimension(bIsOpenGridDimension As Boolean)
|
||||
m_IsOpenGridDimension = bIsOpenGridDimension
|
||||
NotifyPropertyChanged(NameOf(IsOpenGridDimension))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property MeasureUnit_Msg
|
||||
@@ -64,6 +108,7 @@ Public Class GridPanelVM
|
||||
Private m_cmdGridDimension As ICommand
|
||||
Private m_cmdStatusUnits As ICommand
|
||||
Private m_cmdZoomAll As ICommand
|
||||
Private m_cmdShowPopUpCmd As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
@@ -71,6 +116,8 @@ Public Class GridPanelVM
|
||||
|
||||
Sub New()
|
||||
Map.SetRefGridPanelVM(Me)
|
||||
SetFileGridOnOffSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\GridON.svg")
|
||||
SetFileGridDimSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\GridDIM.svg")
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
@@ -190,6 +237,28 @@ Public Class GridPanelVM
|
||||
|
||||
#End Region ' ZoomAllCommand
|
||||
|
||||
#Region "ShowPopUpCommand"
|
||||
|
||||
Public ReadOnly Property ShowPopUpCommand As ICommand
|
||||
Get
|
||||
If m_cmdShowPopUpCmd Is Nothing Then
|
||||
m_cmdShowPopUpCmd = New Command(AddressOf ShowPopUp)
|
||||
End If
|
||||
Return m_cmdShowPopUpCmd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ShowPopUp(ByVal param As Object)
|
||||
If m_IsOpenGridDimension Then
|
||||
SetIsOpenGridDimension(False)
|
||||
'SetView_Msg("▼" & EgtMsg(110019)) ' Vista
|
||||
Else
|
||||
SetIsOpenGridDimension(True)
|
||||
'SetView_Msg("▲" & EgtMsg(110019)) ' Vista
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ShowPopUpCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<Grid x:Class="GridViewPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
|
||||
Margin="0,0,10,5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button ToolTip="{Binding ZoomAllToolTip}"
|
||||
Command="{Binding ZoomAllCommand}"
|
||||
Style="{StaticResource Proj_Btn}">
|
||||
<Image Source="/Resources/GridViewPanel/ZoomAll.png"
|
||||
Style="{StaticResource Proj_Img}"/>
|
||||
</Button>
|
||||
<Button Grid.Row="1"
|
||||
ToolTip="{Binding StatusGridText}"
|
||||
Command="{Binding StatusGridCommand}"
|
||||
Style="{StaticResource Grid_Btn}">
|
||||
<EgtStone3D:SVGV FileSource="{Binding FileGridOnOffSVG, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class GridViewPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,48 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class LengthVM
|
||||
Inherits SceneUserControlVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
Title = EGT_ADDCONSTRAINT.ToUpper()
|
||||
|
||||
DirectCast(Map.refSceneButtonVM.m_LengthUC, SceneUserControlV).Preview.Visibility = Visibility.Hidden
|
||||
DirectCast(Map.refSceneButtonVM.m_LengthUC, SceneUserControlV).Annulla.Visibility = Visibility.Hidden
|
||||
|
||||
LoadParamList()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
' Inserisci Lunghezza
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, EgtMsg(110045), ParamType.STR))
|
||||
' Lunghezza
|
||||
AddGenericParam(New _TextBoxParam(EgtMsg(110044), 0, ParamType.DOUB, Visibility.Visible, True))
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Conferma()
|
||||
LoadEditParametric()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ShowPreview()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Annulla()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Close()
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_LengthUC)
|
||||
SolidManagerM.ManageUndoRedo()
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
+24
-1
@@ -49,6 +49,8 @@ Public Class MoveVM
|
||||
Title = EGT_MOVE.ToUpper()
|
||||
LoadParamList()
|
||||
Stage = If(Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL, MoveStage.SelectPart, MoveStage.InsertMovement)
|
||||
ActivateButton()
|
||||
RemoveAllUC()
|
||||
End Sub
|
||||
|
||||
#End Region ' Contructor
|
||||
@@ -56,7 +58,7 @@ Public Class MoveVM
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
ParamList.Add(New _TextBlockParam("Messaggio", MsgList(Stage), ParamType.STR, Visibility.Visible))
|
||||
ParamList.Add(New _TextBlockParam(EGT_MESSAGE, MsgList(Stage), ParamType.STR, Visibility.Visible))
|
||||
ParamList.Add(New _TextBoxParam("X", "0", ParamType.LEN, Visibility.Visible))
|
||||
ParamList.Add(New _TextBoxParam("Y", "0", ParamType.LEN, Visibility.Visible))
|
||||
ParamList.Add(New _TextBoxParam("Z", "0", ParamType.LEN, Visibility.Visible))
|
||||
@@ -212,6 +214,27 @@ Public Class MoveVM
|
||||
SolidManagerM.ManageUndoRedo()
|
||||
End Sub
|
||||
|
||||
Private Sub ActivateButton()
|
||||
' Disattivo pulsante Rotate
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_ROTATE), _ToggleButton).IsChecked = False
|
||||
' Disattivo pulsante Pair
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_PAIR), _ToggleButton).IsChecked = False
|
||||
' Attivo pulsante Move
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_MOVE), _ToggleButton).IsChecked = True
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveAllUC()
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_AngleUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditPanelUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditParametricUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_ExtremityUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_LengthUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_NewPanelUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_PairUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_ParametricCompoUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_RotateUC)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
@@ -15,7 +15,7 @@ Imports System.Windows
|
||||
<Assembly: AssemblyDescription("EgtStone3D Debug 32 bit")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtStone3D")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- Opzioni manifesto di Controllo dell'account utente
|
||||
Per modificare il livello di Controllo dell'account utente di Windows, sostituire il
|
||||
nodo requestedExecutionLevel con uno dei seguenti.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
Se si specifica l'elemento requestedExecutionLevel, la funzionalità Virtualizzazione file system e registro di sistema verrà disabilitata.
|
||||
Rimuovere questo elemento se l'applicazione richiede questa virtualizzazione per
|
||||
compatibilità con le versioni precedenti.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Elenco delle versioni di Windows in cui è stata testata questa applicazione e
|
||||
per cui è stato previsto l'uso. Rimuovere il commento dagli elementi appropriati per
|
||||
fare in modo che Windows selezioni automaticamente l'ambiente più compatibile. -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Indica che l'applicazione è sensibile ai valori DPI e non verrà scalata automaticamente da Windows in caso di
|
||||
valori DPI maggiori. Le applicazioni Windows Presentation Foundation (WPF) sono automaticamente sensibili ai valori DPI, pertanto non è necessario
|
||||
acconsentire esplicitamente. Con le applicazioni Windows Forms destinate a .NET Framework 4.6 per cui è stato acconsentito esplicitamente a questa impostazione,
|
||||
è anche necessario impostare 'EnableWindowsFormsHighDpiAutoResizing' su 'true' nel relativo file app.config.
|
||||
|
||||
Imposta l'applicazione in modo riconosca i percorsi lunghi. Vedere https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
|
||||
<!--
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
-->
|
||||
|
||||
<!-- Abilita i temi per finestre di dialogo e controlli comuni di Windows (Windows XP e versioni successive) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
</assembly>
|
||||
+25
-1
@@ -75,6 +75,9 @@ Public Class PairVM
|
||||
If EgtLuaSetGlobBoolVar("ASS.bSaveTemp", bSaveTemp) Then AssLog("ASS.bSaveTemp = " & bSaveTemp.ToString)
|
||||
|
||||
LoadParamList()
|
||||
|
||||
ActivateButton()
|
||||
RemoveAllUC()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
@@ -82,7 +85,7 @@ Public Class PairVM
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(0), ParamType.STR, Visibility.Visible))
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(0), ParamType.STR, Visibility.Visible))
|
||||
Dim PairOptionList As New List(Of ParamCmBx)({New ParamCmBx("Start-Start"), New ParamCmBx("Start-End"), New ParamCmBx("End-Start"),
|
||||
New ParamCmBx("End-End"), New ParamCmBx("Middle-Middle")})
|
||||
AddGenericParam(New _ComboBoxParam("PairOption", PairOptionList, 1, Visibility.Collapsed))
|
||||
@@ -185,6 +188,27 @@ NoSecondLine:
|
||||
Map.refSceneHostVM.m_nTransfNum += nTransf
|
||||
End Sub
|
||||
|
||||
Private Sub ActivateButton()
|
||||
' Disattivo pulsante Rotate
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_ROTATE), _ToggleButton).IsChecked = False
|
||||
' Attivo pulsante Pair
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_PAIR), _ToggleButton).IsChecked = True
|
||||
' Disattivo pulsante Move
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_MOVE), _ToggleButton).IsChecked = False
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveAllUC()
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_AngleUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditPanelUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditParametricUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_ExtremityUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_LengthUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_MoveUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_NewPanelUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_ParametricCompoUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_RotateUC)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
+416
-155
@@ -2,9 +2,29 @@
|
||||
|
||||
Public Class EditPanelVM
|
||||
Inherits SceneUserControlVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly m_MsgList As New List(Of String)({TopBar_Msg_Stg0, TopBar_Msg_Stg1, TopBar_Msg_Stg2})
|
||||
Private Enum ParamEnum
|
||||
MSG_ISTRUZ = 0
|
||||
PARAG_PANEL = 1
|
||||
PANEL_H = 2
|
||||
PANEL_TH = 3
|
||||
PANEL_J = 4
|
||||
PARAG_BOTTOM = 5
|
||||
BOTTOM_TH = 6
|
||||
BOTTOM_ALPHA = 7
|
||||
BOTTOM_DEPTH = 8
|
||||
BOTTOM_HOLE_TYPE = 9
|
||||
BOTTOM_HOLE_X = 10
|
||||
BOTTOM_HOLE_Y = 11
|
||||
BOTTOM_DIAM = 12
|
||||
BOTTOM_HOLE_DIMX = 13
|
||||
BOTTOM_HOLE_DIMY = 14
|
||||
EDIT_NEIGH = 15
|
||||
End Enum
|
||||
|
||||
Private ReadOnly m_MsgList As New List(Of String)({TopBar_Msg_Stg0, TopBar_Msg_Stg1, TopBar_Msg_Stg2, Msg_Paragraph1, Msg_Paragraph2})
|
||||
Public ReadOnly Property MsgList As List(Of String)
|
||||
Get
|
||||
Return m_MsgList
|
||||
@@ -18,7 +38,18 @@ Public Class EditPanelVM
|
||||
End Get
|
||||
Set(value As EditPanelStage)
|
||||
m_Stage = value
|
||||
DirectCast(ParamList(0), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||
DirectCast(ParamList(ParamEnum.MSG_ISTRUZ), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||
ChangeTextColor()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_PartType As PartType = PartType.Unknown
|
||||
Friend Property PartType As PartType
|
||||
Get
|
||||
Return m_PartType
|
||||
End Get
|
||||
Set(value As PartType)
|
||||
m_PartType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -29,7 +60,31 @@ Public Class EditPanelVM
|
||||
Return m_nIdPart
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SceneCmd.DeselectAll()
|
||||
m_nIdPart = value
|
||||
Stage = EditPanelStage.InsertNewParam
|
||||
' devo capire che tipo di pezzo sto modificando
|
||||
' se non ha info di accoppiamento è una base (piano cucina)
|
||||
' se ha l'info "Sink" allora è un pezzo di una buca
|
||||
' se ha info di accoppiamento generico è una paretina
|
||||
PartType = GetPartType()
|
||||
If ParamList.Count > 0 Then
|
||||
Select Case PartType
|
||||
Case PartType.Panel
|
||||
UpdatePanelInfoFromPart(m_nIdPart)
|
||||
Case PartType.Sink, PartType.SinkSplitBottom
|
||||
Dim bIsBottom As Boolean = False
|
||||
EgtGetInfo(m_nIdPart, "Bottom", bIsBottom)
|
||||
If bIsBottom Then
|
||||
Dim nParent As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(m_nIdPart, "Parent", nParent)
|
||||
UpdatePanelInfoFromPart(nParent)
|
||||
Else
|
||||
UpdatePanelInfoFromPart(m_nIdPart)
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
UpdateParameterListShown()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -40,17 +95,31 @@ Public Class EditPanelVM
|
||||
Return EgtMsg(110040) ' Seleziona il Part che vuoi modificare
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TopBar_Msg_Stg1 As String
|
||||
Get
|
||||
Return EgtMsg(110041) ' Inserisci i nuovi parametri
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TopBar_Msg_Stg2 As String
|
||||
Get
|
||||
Return EgtMsg(110042) ' Conferma, modifica con altri parametri o annulla
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Msg_Paragraph1 As String
|
||||
Get
|
||||
Return EgtMsg(110038) ' Frontalino
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Msg_Paragraph2 As String
|
||||
Get
|
||||
Return EgtMsg(110039) ' Fondo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
@@ -61,72 +130,170 @@ Public Class EditPanelVM
|
||||
MyBase.New()
|
||||
Title = "Modifica Paretina".ToUpper()
|
||||
LoadParamList()
|
||||
|
||||
If Map.refSceneHostVM.m_nIdPart <> GDB_ID.NULL Then
|
||||
nIdPart = Map.refSceneHostVM.m_nIdPart
|
||||
Stage = EditPanelStage.InsertNewParam
|
||||
End If
|
||||
|
||||
UpdatePanelInfoFromPart(m_nIdPart)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(0), ParamType.STR, Visibility.Visible))
|
||||
' sezione paretina
|
||||
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(1), ParamType.STR, Visibility.Collapsed))
|
||||
Dim dH As Double = 0
|
||||
Private Sub UpdatePanelInfoFromPart(nIdPart As Integer)
|
||||
If nIdPart = GDB_ID.NULL Then Return
|
||||
Dim dH As Double = 100
|
||||
EgtGetInfo(nIdPart, "H", dH)
|
||||
AddGenericParam(New _TextBoxParam("Altezza", dH, ParamType.LEN, Visibility.Visible))
|
||||
Dim dTh As Double = 0
|
||||
DirectCast(ParamList(ParamEnum.PANEL_H), _TextBoxParam).sValue = dH.ToString()
|
||||
Dim dTh As Double = 10
|
||||
EgtGetInfo(nIdPart, "Th", dTh)
|
||||
DirectCast(ParamList(ParamEnum.PANEL_TH), _TextBoxParam).sValue = dTh.ToString()
|
||||
Dim nJunctionType As Integer
|
||||
EgtGetInfo(nIdPart, "JunctionType", nJunctionType)
|
||||
DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx = nJunctionType - 1
|
||||
If PartType = PartType.Sink Or PartType = PartType.SinkSplitBottom Then
|
||||
' recupero un pezzo bottom
|
||||
Dim bIsBottom As Boolean = False
|
||||
EgtGetInfo(nIdPart, "Bottom", bIsBottom)
|
||||
Dim nBottomId As Integer = nIdPart
|
||||
If Not bIsBottom Then
|
||||
Dim nWaterfallId As Integer = nIdPart
|
||||
Dim sPartChildName As String = String.Empty
|
||||
EgtGetInfo(nWaterfallId, "A3", sPartChildName)
|
||||
nBottomId = EgtGetFirstNameInGroup(GDB_ID.ROOT, sPartChildName)
|
||||
End If
|
||||
|
||||
Dim dDiam As Double = 0
|
||||
EgtGetInfo(nBottomId, "HoleDiam", dDiam)
|
||||
If dDiam < EPS_SMALL Then
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_TYPE), _ComboBoxParam).IndexSelParamCmBx = 0
|
||||
Dim dDimX As Double = 0
|
||||
Dim dDimY As Double = 0
|
||||
EgtGetInfo(nBottomId, "HoleDimX", dDimX)
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_DIMX), _TextBoxParam).sValue = dDimX.ToString()
|
||||
EgtGetInfo(nBottomId, "HoleDimY", dDimY)
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_DIMY), _TextBoxParam).sValue = dDimY.ToString()
|
||||
Else
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_TYPE), _ComboBoxParam).IndexSelParamCmBx = 1
|
||||
EgtGetInfo(nBottomId, "HoleDiam", dDiam)
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_DIAM), _TextBoxParam).sValue = dDiam.ToString()
|
||||
End If
|
||||
Dim dPosX As Double = 0
|
||||
Dim dPosY As Double = 0
|
||||
EgtGetInfo(nBottomId, "HolePosX", dPosX)
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_X), _TextBoxParam).sValue = dPosX.ToString()
|
||||
EgtGetInfo(nBottomId, "HolePosY", dPosY)
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_Y), _TextBoxParam).sValue = dPosY.ToString()
|
||||
|
||||
Dim dDepth As Double = 0
|
||||
EgtGetInfo(nBottomId, "Depth", dDepth)
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_DEPTH), _TextBoxParam).sValue = dDepth.ToString()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateParameterListShown()
|
||||
'' dalle info leggo se l'oggetto è una paretina o una buca
|
||||
If PartType = PartType.TopKitchen Then
|
||||
'ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Collapsed
|
||||
'ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Collapsed
|
||||
|
||||
'ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Visible
|
||||
'ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Visible
|
||||
'ParamList(ParamEnum.BOTTOM_ALPHA).nVisibility = Visibility.Visible
|
||||
'ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Visible
|
||||
'ParamList(ParamEnum.EDIT_NEIGH).nVisibility = Visibility.Visible
|
||||
|
||||
ElseIf PartType = PartType.SinkSplitBottom Then
|
||||
ParamList(ParamEnum.PARAG_PANEL).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Collapsed
|
||||
|
||||
ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_ALPHA).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_DEPTH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_TYPE).nVisibility = Visibility.Visible
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_TYPE), _ComboBoxParam).IndexSelParamCmBx = 0
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_X).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_Y).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Visible
|
||||
|
||||
ParamList(ParamEnum.EDIT_NEIGH).nVisibility = Visibility.Collapsed
|
||||
ElseIf PartType = PartType.Sink Then
|
||||
|
||||
|
||||
ParamList(ParamEnum.PARAG_PANEL).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Collapsed
|
||||
|
||||
ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_ALPHA).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DEPTH).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_TYPE).nVisibility = Visibility.Visible
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_TYPE), _ComboBoxParam).IndexSelParamCmBx = 1
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_X).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_Y).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Collapsed
|
||||
|
||||
ParamList(ParamEnum.EDIT_NEIGH).nVisibility = Visibility.Collapsed
|
||||
ElseIf PartType = PartType.Panel Then
|
||||
ParamList(ParamEnum.PARAG_PANEL).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.PANEL_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Visible
|
||||
|
||||
ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_ALPHA).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_DEPTH).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_TYPE).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_X).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_Y).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Collapsed
|
||||
|
||||
ParamList(ParamEnum.EDIT_NEIGH).nVisibility = Visibility.Visible
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(0), ParamType.STR, Visibility.Visible))
|
||||
' sezione paretina
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(3), ParamType.STR, Visibility.Collapsed))
|
||||
Dim dH As Double = 200
|
||||
AddGenericParam(New _TextBoxParam("Altezza", dH, ParamType.LEN, Visibility.Visible))
|
||||
Dim dTh As Double = 20
|
||||
AddGenericParam(New _TextBoxParam("Spessore", dTh, ParamType.LEN, Visibility.Visible))
|
||||
Dim nJunctionType As Integer = 0
|
||||
Dim JunctionTypeList As New List(Of ParamCmBx)({New ParamCmBx("Trim Start"), New ParamCmBx("Trim End"), New ParamCmBx("Angle"), New ParamCmBx("Trim Both")})
|
||||
AddGenericParam(New _ComboBoxParam("Tipo Giunzione", JunctionTypeList, nJunctionType))
|
||||
|
||||
' sezione fondello
|
||||
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(2), ParamType.STR, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Altezza", 100, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(4), ParamType.STR, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Spessore", 10, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Inclinazione", 0.1, ParamType.DOUB, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Profondità", 0.1, ParamType.LEN, Visibility.Collapsed))
|
||||
Dim HoleType As New List(Of ParamCmBx)({New ParamCmBx("Fessura"), New ParamCmBx("Foro")})
|
||||
AddGenericParam(New _ComboBoxParam("TipoBuco", HoleType, 0, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Posizione X foro", 50, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Posizione Y foro", 50, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Diametro foro", 30, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Dimensione X foro", 25, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Dimensione Y foro", 25, ParamType.LEN, Visibility.Collapsed))
|
||||
|
||||
'
|
||||
AddGenericParam(New _CheckBoxParam("ModificaAdiacenti", "Modifica anche paretine adiacenti", Visibility.Visible))
|
||||
|
||||
'' dalle info leggo se l'oggetto è una paretina o una buca
|
||||
|
||||
'If DirectCast(sender, _ComboBoxParam).Name = "TipoParetina" Then
|
||||
' If DirectCast(Selection, ParamCmBx).Name = "SplitBottom" Then
|
||||
' ParamList(3).nVisibility = Visibility.Collapsed
|
||||
' ParamList(4).nVisibility = Visibility.Collapsed
|
||||
|
||||
' ParamList(5).nVisibility = Visibility.Visible
|
||||
' ParamList(6).nVisibility = Visibility.Visible
|
||||
' ParamList(7).nVisibility = Visibility.Visible
|
||||
' ParamList(8).nVisibility = Visibility.Visible
|
||||
' ParamList(9).nVisibility = Visibility.Visible
|
||||
' Map.refSceneHostVM.m_SelType = GDB_TY.SRF_MESH
|
||||
' 'DirectCast(Map.refSceneButtonV.m_PanelUC, SceneUserControlV).Preview.Visibility = Visibility.Visible
|
||||
' ElseIf DirectCast(Selection, ParamCmBx).Name = "Tappa Buca" Then
|
||||
' ParamList(2).nVisibility = Visibility.Visible
|
||||
' ParamList(3).nVisibility = Visibility.Visible
|
||||
' ParamList(4).nVisibility = Visibility.Visible
|
||||
|
||||
' ParamList(5).nVisibility = Visibility.Visible
|
||||
' ParamList(6).nVisibility = Visibility.Visible
|
||||
' ParamList(7).nVisibility = Visibility.Visible
|
||||
' ParamList(8).nVisibility = Visibility.Visible
|
||||
' ParamList(9).nVisibility = Visibility.Visible
|
||||
' Map.refSceneHostVM.m_SelType = GDB_TY.CRV_LINE
|
||||
' Else
|
||||
' ParamList(2).nVisibility = Visibility.Collapsed
|
||||
' ParamList(3).nVisibility = Visibility.Visible
|
||||
' ParamList(4).nVisibility = Visibility.Visible
|
||||
|
||||
' ParamList(5).nVisibility = Visibility.Collapsed
|
||||
' ParamList(6).nVisibility = Visibility.Collapsed
|
||||
' ParamList(7).nVisibility = Visibility.Collapsed
|
||||
' ParamList(8).nVisibility = Visibility.Collapsed
|
||||
' ParamList(9).nVisibility = Visibility.Collapsed
|
||||
' Map.refSceneHostVM.m_SelType = GDB_TY.CRV_LINE
|
||||
' 'DirectCast(Map.refSceneButtonV.m_PanelUC, SceneUserControlV).Preview.Visibility = Visibility.Hidden
|
||||
' End If
|
||||
'End If
|
||||
' checkbox
|
||||
AddGenericParam(New _CheckBoxParam("ModificaAdiacenti", "Modifica anche altre paretine dello stesso tipo", Visibility.Visible))
|
||||
End Sub
|
||||
|
||||
Public Sub AdvanceStage()
|
||||
@@ -138,15 +305,19 @@ Public Class EditPanelVM
|
||||
End Function
|
||||
|
||||
Public Overrides Sub Conferma()
|
||||
' se sono in modalità fondello allora devo creare il pezzo
|
||||
If DirectCast(ParamList(1), _ComboBoxParam).SelParamCmBx.Name = "SplitBottom" Then
|
||||
AddSplitBottom(Map.refSceneHostVM.m_PanelPartList)
|
||||
End If
|
||||
' resetto la lista dei part selezionati per la creazione di uno splitBottom
|
||||
Map.refSceneHostVM.m_PanelPartList.Clear()
|
||||
' resetto il tipo di elementi da evidenziare
|
||||
Map.refSceneHostVM.m_SelType = GDB_TY.NONE
|
||||
|
||||
' in base al tipo di pezzo che sto modificando chiamo la funzione corrispondente
|
||||
Select Case PartType
|
||||
Case PartType.Sink
|
||||
EditSink()
|
||||
Case PartType.SinkSplitBottom
|
||||
EditSinkWithSplitBottom()
|
||||
Case PartType.Panel
|
||||
EditPanel(nIdPart)
|
||||
Case PartType.TopKitchen
|
||||
'EditTopKitchen()
|
||||
End Select
|
||||
' aggiorno la lista dei partSolid
|
||||
SolidManagerM.CreatePartSolid()
|
||||
' chiudo lo user control
|
||||
Close()
|
||||
End Sub
|
||||
@@ -161,86 +332,141 @@ Public Class EditPanelVM
|
||||
Private Sub Close()
|
||||
SolidManagerM.ResetOperationMarks(Map.refSceneHostVM.m_nIdPart)
|
||||
EgtDraw()
|
||||
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_PANEL)
|
||||
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_EDIT_PANEL)
|
||||
If TypeOf (Btn) Is _ToggleButton Then
|
||||
DirectCast(Btn, _ToggleButton).IsChecked = False
|
||||
Else
|
||||
EgtOutLog("CONFIG ERR: Il pulsante di Panel è stato definito come Button anziché ToggleButton")
|
||||
EgtOutLog("CONFIG ERR: Il pulsante di Edit Panel è stato definito come Button anziché ToggleButton")
|
||||
End If
|
||||
' rimuovo lo UC dalla griglia
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_NewPanelUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditPanelUC)
|
||||
SolidManagerM.ManageUndoRedo()
|
||||
End Sub
|
||||
|
||||
Public Sub AddPanel(nId As Integer)
|
||||
Dim ComboBoxParam As _ComboBoxParam = DirectCast(ParamList(1), _ComboBoxParam)
|
||||
If ComboBoxParam.SelParamCmBx.Name = "Alzatina" Then
|
||||
AddSplashTop(nId)
|
||||
ElseIf ComboBoxParam.SelParamCmBx.Name = "Frontalino" Then
|
||||
AddWaterfall(nId)
|
||||
ElseIf ComboBoxParam.SelParamCmBx.Name = "Tappa Buca" Then
|
||||
AddWaterfallAndBottom(nId)
|
||||
Public Function GetPartType()
|
||||
' controllo se è un lavandino con fondo unico
|
||||
Dim bIsSink As Boolean = False
|
||||
EgtGetInfo(m_nIdPart, "Sink", bIsSink)
|
||||
If bIsSink Then
|
||||
Return PartType.Sink
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function GetPanelType()
|
||||
Return DirectCast(ParamList(1), _ComboBoxParam).SelParamCmBx.Name
|
||||
' controllo se è un lavandino con fondo splittato
|
||||
Dim bIsSinkSplitBottom As Boolean = False
|
||||
EgtGetInfo(m_nIdPart, "SinkSplitBottom", bIsSinkSplitBottom)
|
||||
If bIsSinkSplitBottom Then
|
||||
Return PartType.SinkSplitBottom
|
||||
End If
|
||||
' sennò è una paretina o un piano cucina
|
||||
Dim sPair As String = String.Empty
|
||||
EgtGetInfo(m_nIdPart, "PairMyRef", sPair)
|
||||
Dim bIsPanel As Boolean = sPair <> String.Empty
|
||||
If bIsPanel Then
|
||||
Return PartType.Panel
|
||||
End If
|
||||
' altrimenti è un piano cucina
|
||||
Return PartType.TopKitchen
|
||||
End Function
|
||||
|
||||
Private Sub AddSplashTop(nId As Integer)
|
||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
' setto l'indice del lato e il parent
|
||||
If EgtLuaSetGlobIntVar("TOOL.nEdgeId", nId) Then AssLog("TOOL.nEdgeId = " & nId.ToString())
|
||||
If EgtLuaSetGlobIntVar("TOOL.nParent", nPartId) Then AssLog("TOOL.nParent = " & nPartId.ToString())
|
||||
' setto le variabili per l'alzatina
|
||||
Dim dAngAlzatina As Double = 90
|
||||
If EgtLuaSetGlobNumVar("TOOL.dPairAng", dAngAlzatina) Then AssLog("TOOL.dPairAng = " & dAngAlzatina.ToString())
|
||||
Dim nJunctionTypeAlz = 1
|
||||
If EgtLuaSetGlobIntVar("TOOL.nJunctionType", nJunctionTypeAlz) Then AssLog("TOOL.nJunctionType = " & nJunctionTypeAlz.ToString())
|
||||
Dim bOnLoop As Boolean = False
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bOnLoop", bOnLoop) Then AssLog("TOOL.bOnLoop = false")
|
||||
Dim bInsideLoop As Boolean = True
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bInsideLoop", bInsideLoop) Then AssLog("TOOL.bInsideLoop = true")
|
||||
' setto le varibili generiche per il pezzo
|
||||
Dim dTh As Double = DirectCast(ParamList(4), _TextBoxParam).GetValue()
|
||||
Private Sub SetVariablesAndRecreate(nEdgeId As Integer)
|
||||
If EgtLuaSetGlobIntVar("TOOL.nEdgeId", nEdgeId) Then AssLog("TOOL.nEdgeId = " & nEdgeId.ToString())
|
||||
Dim nJunctionType = DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx + 1 ' in Lua l'enum è 1-based
|
||||
If EgtLuaSetGlobIntVar("TOOL.nJunctionType", nJunctionType) Then AssLog("TOOL.nJunctionType = " & nJunctionType.ToString())
|
||||
Dim dTh As Double = DirectCast(ParamList(ParamEnum.PANEL_TH), _TextBoxParam).GetValue()
|
||||
If EgtLuaSetGlobNumVar("TOOL.dTh", dTh) Then AssLog("TOOL.dTh = " & dTh.ToString())
|
||||
Dim dH As Double = DirectCast(ParamList(3), _TextBoxParam).GetValue()
|
||||
Dim dH As Double = DirectCast(ParamList(ParamEnum.PANEL_H), _TextBoxParam).GetValue()
|
||||
If EgtLuaSetGlobNumVar("TOOL.dH", dH) Then AssLog("TOOL.dH = " & dH.ToString())
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bPrev", True) Then AssLog("TOOL.bPrev = true")
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bNext", True) Then AssLog("TOOL.bNext = true")
|
||||
' chiamo la funzione per la creazione
|
||||
If EgtLuaCallFunction("TOOL.CreateParetinaFull") Then AssLog("TOOL.CreateParetinaFull()")
|
||||
End Sub
|
||||
Private Sub AddWaterfall(nId As Integer)
|
||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
' setto l'indice del lato e il parent
|
||||
If EgtLuaSetGlobIntVar("TOOL.nEdgeId", nId) Then AssLog("TOOL.nEdgeId = " & nId.ToString())
|
||||
If EgtLuaSetGlobIntVar("TOOL.nParent", nPartId) Then AssLog("TOOL.nParent = " & nPartId.ToString())
|
||||
' setto le variabili per l'alzatina
|
||||
Dim dAngFrontalino As Double = -90
|
||||
If EgtLuaSetGlobNumVar("TOOL.dPairAng", dAngFrontalino) Then AssLog("TOOL.dPairAng = " & dAngFrontalino.ToString())
|
||||
Dim nJunctionTypeAlz = 3
|
||||
If EgtLuaSetGlobIntVar("TOOL.nJunctionType", nJunctionTypeAlz) Then AssLog("TOOL.nJunctionType = " & nJunctionTypeAlz.ToString())
|
||||
Dim bOnLoop As Boolean = True
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bOnLoop", bOnLoop) Then AssLog("TOOL.bOnLoop = false")
|
||||
Dim bInsideLoop As Boolean = True
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bInsideLoop", bInsideLoop) Then AssLog("TOOL.bInsideLoop = true")
|
||||
' setto le varibili generiche per il pezzo
|
||||
Dim dTh As Double = DirectCast(ParamList(4), _TextBoxParam).GetValue()
|
||||
If EgtLuaSetGlobNumVar("TOOL.dTh", dTh) Then AssLog("TOOL.dTh = " & dTh.ToString())
|
||||
Dim dH As Double = DirectCast(ParamList(3), _TextBoxParam).GetValue()
|
||||
If EgtLuaSetGlobNumVar("TOOL.dH", dH) Then AssLog("TOOL.dH = " & dH.ToString())
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bPrev", True) Then AssLog("TOOL.bPrev = true")
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bNext", True) Then AssLog("TOOL.bNext = true")
|
||||
' chiamo la funzione per la creazione
|
||||
Dim bPrev As Boolean = True
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bPrev", bPrev) Then AssLog("TOOL.bPrev = true")
|
||||
Dim bNext As Boolean = True
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bNext", bNext) Then AssLog("TOOL.bNext = true")
|
||||
If EgtLuaCallFunction("TOOL.CreateParetinaFull") Then AssLog("TOOL.CreateParetinaFull()")
|
||||
End Sub
|
||||
|
||||
Private Sub AddSplitBottom(PartList As List(Of Integer))
|
||||
If PartList.Count = 0 Then
|
||||
Close()
|
||||
Return
|
||||
Private Sub EditPanel(nId)
|
||||
' recupero le info salvate nel Part
|
||||
EgtLuaExecLine("TOOL.FillInfoTableFromPart(" & nId.ToString() & ")")
|
||||
' recupero l'id dell'edge che ha generato la paretina
|
||||
Dim nParent As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nId, "Parent", nParent)
|
||||
Dim nIn As Integer = 0
|
||||
EgtGetInfo(nId, "nInLoop", nIn)
|
||||
Dim sLayName As String = "OutLoop"
|
||||
Dim nLayId As Integer = GDB_ID.NULL
|
||||
If nIn = 0 Then
|
||||
nLayId = EgtGetFirstNameInGroup(nParent, sLayName)
|
||||
Else
|
||||
sLayName = "InLoop"
|
||||
nLayId = EgtGetFirstNameInGroup(nParent, sLayName)
|
||||
Dim nInLays = 1
|
||||
While nInLays <> nIn
|
||||
nLayId = EgtGetNextName(nLayId, sLayName)
|
||||
nInLays += 1
|
||||
End While
|
||||
End If
|
||||
Dim nEdge As Integer = 0
|
||||
EgtGetInfo(nId, "ParentEdge", nEdge)
|
||||
Dim sEdgeName As String = "A" & nEdge.ToString()
|
||||
Dim nEdgeId As Integer = EgtGetFirstNameInGroup(nLayId, sEdgeName)
|
||||
' setto i parametri che ha scelto l'utente
|
||||
SetVariablesAndRecreate(nEdgeId)
|
||||
' se la checkbox per la modifica delle paretine dello stesso tipo, sullo stesso loop, è checkata allora scorro il loop e continuo a chiamare la ricreazione
|
||||
If DirectCast(ParamList(ParamEnum.EDIT_NEIGH), _CheckBoxParam).IsChecked Then
|
||||
' scorro i next e prev modificando anche le paretine adiacenti con le stesse modifiche
|
||||
' facendo attenzione a non entrare in un loop
|
||||
Dim sCurrPartName As String = String.Empty
|
||||
EgtGetName(nId, sCurrPartName)
|
||||
Dim sNamePrev As String = String.Empty
|
||||
EgtGetInfo(nId, "Prev", sNamePrev)
|
||||
Dim nLastPrev As Integer = GDB_ID.NULL
|
||||
While sNamePrev <> String.Empty And sNamePrev <> sCurrPartName
|
||||
Dim nPrev As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, sNamePrev)
|
||||
' recupero l'edge del parent e ricreo la paretina
|
||||
EgtGetInfo(nPrev, "ParentEdge", nEdge)
|
||||
' recupero le info salvate nel Part
|
||||
EgtLuaExecLine("TOOL.FillInfoTableFromPart(" & nPrev.ToString() & ")")
|
||||
sEdgeName = "A" & nEdge.ToString()
|
||||
nEdgeId = EgtGetFirstNameInGroup(nLayId, sEdgeName)
|
||||
SetVariablesAndRecreate(nEdgeId)
|
||||
EgtGetInfo(nPrev, "Prev", sNamePrev)
|
||||
nLastPrev = nPrev
|
||||
End While
|
||||
Dim sNameNext As String = String.Empty
|
||||
EgtGetInfo(nId, "Next", sNameNext)
|
||||
While sNameNext <> String.Empty
|
||||
Dim nNext As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, sNameNext)
|
||||
' recupero l'edge del parent e ricreo la paretina
|
||||
If nNext = nLastPrev Then Exit While
|
||||
' recupero le info salvate nel Part
|
||||
EgtLuaExecLine("TOOL.FillInfoTableFromPart(" & nNext.ToString() & ")")
|
||||
EgtGetInfo(nNext, "ParentEdge", nEdge)
|
||||
sEdgeName = "A" & nEdge.ToString()
|
||||
nEdgeId = EgtGetFirstNameInGroup(nLayId, sEdgeName)
|
||||
SetVariablesAndRecreate(nEdgeId)
|
||||
EgtGetInfo(nNext, "Next", sNameNext)
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GetNeighbours(nId As Integer)
|
||||
Dim NeighList As New List(Of Integer)
|
||||
If nId = GDB_ID.NULL Then Return NeighList
|
||||
Dim nNextId As Integer = nId
|
||||
While nNextId <> GDB_ID.NULL
|
||||
NeighList.Add(nNextId)
|
||||
Dim sNextName As String = String.Empty
|
||||
EgtGetInfo(nNextId, "Next", sNextName)
|
||||
nNextId = EgtGetFirstNameInGroup(GDB_ID.ROOT, sNextName)
|
||||
If nNextId = nId Then Exit While
|
||||
End While
|
||||
|
||||
Return NeighList
|
||||
End Function
|
||||
|
||||
Private Sub EditSink()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub EditSplitBottom(PartList As List(Of Integer))
|
||||
Dim lEdgeList As New List(Of Integer)
|
||||
For Each nPart As Integer In PartList
|
||||
Dim nOutLay As Integer = EgtGetFirstNameInGroup(nPart, "OutLoop")
|
||||
@@ -251,42 +477,77 @@ Public Class EditPanelVM
|
||||
For i As Integer = 1 To lEdgeList.Count
|
||||
EgtLuaSetGlobIntVar("TOOL.tbIdEdges." & i.ToString(), lEdgeList(i - 1).ToString())
|
||||
Next
|
||||
Dim dTh As Double = DirectCast(ParamList(7), _TextBoxParam).GetValue()
|
||||
Dim dTh As Double = DirectCast(ParamList(ParamEnum.BOTTOM_TH), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dTh", dTh)
|
||||
Dim dDiam As Double = DirectCast(ParamList(9), _TextBoxParam).GetValue()
|
||||
Dim dDiam As Double = DirectCast(ParamList(ParamEnum.BOTTOM_DIAM), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dDiamBore", dDiam)
|
||||
Dim dAng As Double = DirectCast(ParamList(8), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dSlopeAng", dAng)
|
||||
Dim dDepth As Double = DirectCast(ParamList(ParamEnum.BOTTOM_DEPTH), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dDepth", dDepth)
|
||||
Dim dPosX As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_X), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleX", dPosX)
|
||||
Dim dPosY As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_Y), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleY", dPosY)
|
||||
Dim dDimX As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_DIMX), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleDimX", dDimX)
|
||||
Dim dDimY As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_DIMY), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleDimY", dDimY)
|
||||
EgtLuaCallFunction("TOOL.CreateSplitBottom")
|
||||
End Sub
|
||||
|
||||
Private Sub AddWaterfallAndBottom(nId As Integer)
|
||||
Dim nInLoopLay As Integer = EgtGetParent(nId)
|
||||
Dim nEdges As Integer = EgtGetGroupObjs(nInLoopLay)
|
||||
Dim nEdge As Integer = EgtGetFirstInGroup(nInLoopLay)
|
||||
While nEdge <> GDB_ID.NULL
|
||||
AddWaterfall(nEdge)
|
||||
nEdge = EgtGetNext(nEdge)
|
||||
End While
|
||||
' recupero le info dei part creati come frontalini dalle info del Parent
|
||||
Dim nParent As Integer = EgtGetParent(nInLoopLay)
|
||||
' scopro la posizione ordinale dell'inloop in questione
|
||||
Dim nIn As Integer = 1
|
||||
Dim nInLoop As Integer = EgtGetFirstNameInGroup(nParent, "InLoop")
|
||||
While nInLoop <> nInLoopLay
|
||||
nIn += 1
|
||||
nInLoop = EgtGetNextName(nInLoop, "InLoop")
|
||||
End While
|
||||
Dim WaterFallList As New List(Of Integer)
|
||||
For i As Integer = 1 To nEdges
|
||||
Dim sInfoName As String = "A" & i.ToString() & "_I" & nIn.ToString()
|
||||
Dim sPartName As String = String.Empty
|
||||
EgtGetInfo(nParent, sInfoName, sPartName)
|
||||
WaterFallList.Add(EgtGetFirstNameInGroup(GDB_ID.ROOT, sPartName))
|
||||
Next
|
||||
' ora che ho la lista dei frontalini posso creare lo split bottom
|
||||
AddSplitBottom(WaterFallList)
|
||||
Private Sub EditSinkWithSplitBottom()
|
||||
' risalgo ai frontalini
|
||||
Dim bBottom As Boolean = False
|
||||
EgtGetInfo(nIdPart, "Bottom", bBottom)
|
||||
Dim nWaterfallId As Integer = nIdPart
|
||||
If bBottom Then
|
||||
Dim sInfoPartDest As String = String.Empty
|
||||
EgtGetInfo(nIdPart, "PairToRef", sInfoPartDest)
|
||||
Dim sInfoPartDestSplit As Array = sInfoPartDest.Split(","c)
|
||||
Dim sPartDest As String = sInfoPartDestSplit(0)
|
||||
nWaterfallId = EgtGetFirstNameInGroup(GDB_ID.ROOT, sPartDest)
|
||||
End If
|
||||
' modifico i frontalini
|
||||
DirectCast(ParamList(ParamEnum.EDIT_NEIGH), _CheckBoxParam).IsChecked = True
|
||||
EditPanel(nWaterfallId)
|
||||
' recupero la lista degli id dei frontalini
|
||||
Dim WaterfallList As List(Of Integer) = GetNeighbours(nWaterfallId)
|
||||
' modifico i pezzi dello split bottom
|
||||
EditSplitBottom(WaterfallList)
|
||||
End Sub
|
||||
|
||||
Public Sub SelectPartOrPartsToEdit()
|
||||
If PartType = PartType.Sink Or PartType = PartType.SinkSplitBottom Then
|
||||
Dim bBottom As Boolean = False
|
||||
EgtGetInfo(nIdPart, "Bottom", bBottom)
|
||||
Dim BottomList As List(Of Integer)
|
||||
Dim WaterFallList As List(Of Integer)
|
||||
If bBottom Then
|
||||
BottomList = GetNeighbours(nIdPart)
|
||||
Dim nWaterfallId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdPart, "Parent", nWaterfallId)
|
||||
WaterFallList = GetNeighbours(nWaterfallId)
|
||||
Else
|
||||
WaterFallList = GetNeighbours(nIdPart)
|
||||
Dim sBottomName As String = String.Empty
|
||||
EgtGetInfo(nIdPart, "A3", sBottomName)
|
||||
Dim nBottomId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, sBottomName)
|
||||
BottomList = GetNeighbours(nBottomId)
|
||||
End If
|
||||
For Each nPartId In BottomList
|
||||
Dim PartSolidSel As PartSolidM = GetPartSolid(nPartId)
|
||||
PartSolidSel.SelectSinglePart()
|
||||
Next
|
||||
For Each nPartId In WaterFallList
|
||||
Dim PartSolidSel As PartSolidM = GetPartSolid(nPartId)
|
||||
PartSolidSel.SelectSinglePart()
|
||||
Next
|
||||
Else
|
||||
Dim PartSolidSel As PartSolidM = GetPartSolid(nIdPart)
|
||||
PartSolidSel.SelectSinglePart()
|
||||
End If
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EditParametricVM
|
||||
Inherits SceneUserControlVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private Enum ParamEnum As Integer
|
||||
TOP_MSG = 0
|
||||
CHK_PNT = 1
|
||||
CHK_LEN = 2
|
||||
CHK_DIR = 3
|
||||
End Enum
|
||||
|
||||
Private bReadyForLinks As Boolean = False
|
||||
|
||||
Private ReadOnly m_MsgList As New List(Of String)({TopBar_Msg_Stg0, TopBar_Msg_Stg1, TopBar_Msg_Stg2})
|
||||
Public ReadOnly Property MsgList As List(Of String)
|
||||
Get
|
||||
Return m_MsgList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Stage As EditParametricStage = EditParametricStage.SelectPart
|
||||
Private Property Stage As EditParametricStage
|
||||
Get
|
||||
Return m_Stage
|
||||
End Get
|
||||
Set(value As EditParametricStage)
|
||||
m_Stage = value
|
||||
DirectCast(ParamList(0), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||
ChangeTextColor()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' id del part selezionato per essere modificato
|
||||
Private m_nId1 As Integer = GDB_ID.NULL
|
||||
Public Property nId1 As Integer
|
||||
Get
|
||||
Return m_nId1
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If m_nId1 <> GDB_ID.NULL Then SceneCmd.DeselectAll()
|
||||
m_nId1 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' punto selezionato sulla prima linea
|
||||
Private m_FirstPoint As New Point3d
|
||||
Public Property FirstPoint As Point3d
|
||||
Get
|
||||
Return m_FirstPoint
|
||||
End Get
|
||||
Set(value As Point3d)
|
||||
m_FirstPoint = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' parametro del punto sulla prima linea
|
||||
Private m_dUFirst As Double
|
||||
Public Property dUFirst As Double
|
||||
Get
|
||||
Return m_dUFirst
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dUFirst = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' id del secondo part, a cui voglio vincolare il primo
|
||||
Private m_nId2 As Integer = GDB_ID.NULL
|
||||
Public Property nId2 As Integer
|
||||
Get
|
||||
Return m_nId2
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If m_nId2 <> GDB_ID.NULL Then SceneCmd.DeselectAll()
|
||||
m_nId2 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' punto selezionato sulla seconda linea
|
||||
Private m_SecondPoint As New Point3d
|
||||
Public Property SecondPoint As Point3d
|
||||
Get
|
||||
Return m_SecondPoint
|
||||
End Get
|
||||
Set(value As Point3d)
|
||||
m_SecondPoint = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' parametro del punto sulla seconda linea
|
||||
Private m_dUSecond As Double
|
||||
Public Property dUSecond As Double
|
||||
Get
|
||||
Return m_dUSecond
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dUSecond = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' sottocurva sulla prima curva selezionata
|
||||
Private m_nSubCrv1 As Integer
|
||||
Public Property nSubCrv1 As Integer
|
||||
Get
|
||||
Return m_nSubCrv1
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nSubCrv1 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' sottocurva sull'ultima curva selezionata
|
||||
Private m_nSubCrv2 As Integer
|
||||
Public Property nSubCrv2 As Integer
|
||||
Get
|
||||
Return m_nSubCrv2
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nSubCrv2 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property TopBar_Msg_Stg0 As String
|
||||
Get
|
||||
Return EgtMsg(110040) ' Seleziona l'oggetto di cui vuoi modificare il vincolo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TopBar_Msg_Stg1 As String
|
||||
Get
|
||||
Return EgtMsg(110041) ' Seleziona l'oggetto a cui vuoi vincolare il precedente
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TopBar_Msg_Stg2 As String
|
||||
Get
|
||||
Return EgtMsg(110042) '
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
Title = "Modifica Contorno Pezzo".ToUpper()
|
||||
|
||||
Dim Dir_Vein3D As String = String.Empty
|
||||
Dim Path_Parametric As String = String.Empty
|
||||
' carico il file LUA con tutte le funzioni di gestione parametrico
|
||||
GetMainPrivateProfileString(K_VEIND3D, VEIND3D_DIR, "", Dir_Vein3D)
|
||||
' Path del lua da utilizzare
|
||||
GetMainPrivateProfileString(K_VEIND3D, "Parametric2D", "", Path_Parametric)
|
||||
' avvio il file OperationOnSolid.lua
|
||||
Dim sLuaPath As String = Dir_Vein3D & Path_Parametric
|
||||
EgtLuaExecFile(sLuaPath)
|
||||
|
||||
LoadParamList()
|
||||
Map.refSceneHostVM.m_SelType = GDB_TY.CRV_LINE
|
||||
EgtSetView(VT.TOP)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(0), ParamType.STR, Visibility.Visible))
|
||||
' checkbox
|
||||
AddGenericParam(New _CheckBoxParam("Vincolo Punto", "Punto Start Vincolato", Visibility.Visible))
|
||||
AddGenericParam(New _CheckBoxParam("Vincolo Lunghezza", "Lunghezza Vincolata", Visibility.Visible))
|
||||
AddGenericParam(New _CheckBoxParam("Vincolo Direzione", "Direzione Vincolata", Visibility.Visible))
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Conferma()
|
||||
' Eseguo la giunzione di due pezzi
|
||||
LinksEnt()
|
||||
' Unisco in una compo
|
||||
EgtLuaExecLine("PAR.JointLine()")
|
||||
' chiudo lo user control
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Annulla()
|
||||
' Ripristino il primo stato
|
||||
UndoLinksEnt()
|
||||
' chiudo lo user control
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ShowPreview()
|
||||
LinksEnt()
|
||||
End Sub
|
||||
|
||||
Private Sub Close()
|
||||
SolidManagerM.ResetOperationMarks(Map.refSceneHostVM.m_nIdPart)
|
||||
EgtDraw()
|
||||
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_EDIT_PARAMETRIC)
|
||||
If TypeOf (Btn) Is _ToggleButton Then
|
||||
DirectCast(Btn, _ToggleButton).IsChecked = False
|
||||
Else
|
||||
EgtOutLog("CONFIG ERR: Il pulsante di Edit Panel è stato definito come Button anziché ToggleButton")
|
||||
End If
|
||||
' rimuovo lo UC dalla griglia
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditParametricUC)
|
||||
SolidManagerM.ManageUndoRedo()
|
||||
' resetto la tabella globale del parametric
|
||||
EgtLuaResetGlobVar("PAR")
|
||||
End Sub
|
||||
|
||||
Private Sub LinksEnt()
|
||||
' Unisco le due entità ricevute
|
||||
If bReadyForLinks Then
|
||||
EgtLuaExecLine("PAR.LinksLine()")
|
||||
Else
|
||||
EgtOutLog("Errore nella definizione dei pezzi da unire")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub UndoLinksEnt()
|
||||
' Riposiziono prima entità
|
||||
EgtLuaExecLine("PAR.UndoLinksLine()")
|
||||
End Sub
|
||||
|
||||
Private Sub ResetEnt()
|
||||
' Ripulisco la tabelle e il disegno
|
||||
EgtLuaExecLine("PAR.Reset()")
|
||||
End Sub
|
||||
|
||||
Public Sub ShowFirstCurrPoint()
|
||||
' Info primo punto
|
||||
EgtLuaSetGlobIntVar("PAR.nId1", m_nId1)
|
||||
EgtLuaSetGlobPointVar("PAR.Pt1", m_FirstPoint)
|
||||
EgtLuaSetGlobNumVar("PAR.dU1", m_dUFirst)
|
||||
EgtLuaSetGlobNumVar("PAR.nSubCrv1", m_nSubCrv1)
|
||||
' Disegno l'entità selezionata
|
||||
bReadyForLinks = EgtLuaExecLine("PAR.DrawFirstPoint()")
|
||||
End Sub
|
||||
|
||||
Public Sub ShowSecondCurrPoint()
|
||||
' Info secondo punto
|
||||
EgtLuaSetGlobIntVar("PAR.nId2", m_nId2)
|
||||
EgtLuaSetGlobPointVar("PAR.Pt2", m_SecondPoint)
|
||||
EgtLuaSetGlobNumVar("PAR.dU2", m_dUSecond)
|
||||
EgtLuaSetGlobNumVar("PAR.nSubCrv2", m_nSubCrv2)
|
||||
' Disegno l'entità selezionata
|
||||
bReadyForLinks = bReadyForLinks And EgtLuaExecLine("PAR.DrawSecondPoint()")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ConstraintLenght()
|
||||
' Lunghezza segmento
|
||||
EgtLuaSetGlobNumVar("PAR.Len", 450.25)
|
||||
' Fisso la lunghezza del segmento
|
||||
EgtLuaExecLine("PAR.LinearDimension()")
|
||||
' Rappresento la quotatura
|
||||
EgtLuaExecLine("PAR.DrawLinearDimension()")
|
||||
End Sub
|
||||
|
||||
Private Sub ConstraintDirection()
|
||||
' Lunghezza segmento
|
||||
EgtLuaSetGlobNumVar("PAR.Ang", 45.5)
|
||||
' Fisso la lunghezza del segmento
|
||||
EgtLuaExecLine("PAR.AngularDimension()")
|
||||
' Rappresento la quotatura
|
||||
EgtLuaExecLine("PAR.DrawAngularDimension()")
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Public Overrides Sub OnCheckboxCheckedChanged(sender As Object, checkedState As Boolean)
|
||||
Dim CheckBox As _CheckBoxParam = DirectCast(sender, _CheckBoxParam)
|
||||
Select Case CheckBox.Name
|
||||
Case "Vincolo Punto"
|
||||
'LinksEnt()
|
||||
Case "Vincolo Lunghezza"
|
||||
ConstraintLenght()
|
||||
Reset()
|
||||
Case "Vincolo Direzione"
|
||||
ConstraintDirection()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub OnComboboxSelectionChanged(sender As Object, Selection As ParamCmBx)
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
End Class
|
||||
+254
-59
@@ -5,6 +5,26 @@ Public Class NewPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private Enum ParamEnum
|
||||
MSG_ISTRUZ = 0
|
||||
TY_PANEL = 1
|
||||
PARAG_PANEL = 2
|
||||
PANEL_H = 3
|
||||
PANEL_TH = 4
|
||||
PANEL_J = 5
|
||||
PARAG_BOTTOM = 6
|
||||
BOTTOM_H = 7
|
||||
BOTTOM_TH = 8
|
||||
BOTTOM_DEPTH = 9
|
||||
BOTTOM_HOLE_X = 10
|
||||
BOTTOM_HOLE_Y = 11
|
||||
BOTTOM_HOLE_TYPE = 12
|
||||
BOTTOM_DIAM = 13
|
||||
BOTTOM_HOLE_DIMX = 14
|
||||
BOTTOM_HOLE_DIMY = 15
|
||||
BOTTOM_ALPHA = 16
|
||||
End Enum
|
||||
|
||||
Private ReadOnly m_MsgList As New List(Of String)({TopBar_Msg_Stg0, TopBar_Msg_Stg1, TopBar_Msg_Stg2})
|
||||
Public ReadOnly Property MsgList As List(Of String)
|
||||
Get
|
||||
@@ -19,7 +39,7 @@ Public Class NewPanelVM
|
||||
End Get
|
||||
Set(value As NewPanelStage)
|
||||
m_Stage = value
|
||||
DirectCast(ParamList(0), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||
DirectCast(ParamList(ParamEnum.MSG_ISTRUZ), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -30,17 +50,25 @@ Public Class NewPanelVM
|
||||
Return EgtMsg(110030) ' Clicca sull'edge di un pezzo per aggiungere una paretina del tipo selezionato
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TopBar_Msg_Stg1 As String
|
||||
Get
|
||||
Return EgtMsg(110038) ' frontalino
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TopBar_Msg_Stg2 As String
|
||||
Get
|
||||
Return EgtMsg(110039) ' fondo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TopBar_Msg_Bottom As String
|
||||
Get
|
||||
Return EgtMsg(110043) ' seleziona le paretine che fanno da contorno al fondo che vuoi creare
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
@@ -60,20 +88,30 @@ Public Class NewPanelVM
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(0), ParamType.STR, Visibility.Visible))
|
||||
Dim PanelType As New List(Of ParamCmBx)({New ParamCmBx("Alzatina"), New ParamCmBx("Frontalino"), New ParamCmBx("SplitBottom"), New ParamCmBx("Tappa Buca")})
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(0), ParamType.STR, Visibility.Visible))
|
||||
Dim PanelType As New List(Of ParamCmBx)({New ParamCmBx(EGT_SPLASHTOP), New ParamCmBx(EGT_WATERFALL), New ParamCmBx(EGT_SPLITBOTTOM),
|
||||
New ParamCmBx(EGT_SINK_SPLITBOTTOM), New ParamCmBx(EGT_SINK), New ParamCmBx(EGT_BOTTOM)})
|
||||
AddGenericParam(New _ComboBoxParam("TipoParetina", PanelType, 0, Visibility.Visible))
|
||||
' sezione paretina
|
||||
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(1), ParamType.STR, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(1), ParamType.STR, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Altezza", 100, ParamType.LEN, Visibility.Visible))
|
||||
AddGenericParam(New _TextBoxParam("Spessore", 10, ParamType.LEN, Visibility.Visible))
|
||||
Dim JunctionType As New List(Of ParamCmBx)({New ParamCmBx("Trim Start"), New ParamCmBx("Trim End"), New ParamCmBx("Trim Angled")})
|
||||
AddGenericParam(New _ComboBoxParam("TipoGiunzione", JunctionType, 0, Visibility.Visible))
|
||||
|
||||
' sezione fondello
|
||||
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(2), ParamType.STR, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(2), ParamType.STR, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Altezza", 100, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Spessore", 10, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Inclinazione", 0.1, ParamType.DOUB, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Profondità", 1, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Posizione X foro", 50, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Posizione Y foro", 50, ParamType.LEN, Visibility.Collapsed))
|
||||
Dim HoleType As New List(Of ParamCmBx)({New ParamCmBx("Fessura"), New ParamCmBx("Foro")})
|
||||
AddGenericParam(New _ComboBoxParam("TipoBuco", HoleType, 0, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Diametro foro", 30, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Dimensione X foro", 25, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Dimensione Y foro", 25, ParamType.LEN, Visibility.Collapsed))
|
||||
AddGenericParam(New _TextBoxParam("Inclinazione", 2, ParamType.DOUB, Visibility.Collapsed))
|
||||
End Sub
|
||||
|
||||
Public Sub AdvanceStage()
|
||||
@@ -87,48 +125,143 @@ Public Class NewPanelVM
|
||||
Public Overrides Sub OnComboboxSelectionChanged(sender As Object, Selection As ParamCmBx)
|
||||
' quando viene selezionato lo split bottom devo mostrare le opzioni per il fondello
|
||||
If DirectCast(sender, _ComboBoxParam).Name = "TipoParetina" Then
|
||||
If DirectCast(Selection, ParamCmBx).Name = "SplitBottom" Then
|
||||
ParamList(3).nVisibility = Visibility.Collapsed
|
||||
ParamList(4).nVisibility = Visibility.Collapsed
|
||||
Dim sType As String = DirectCast(Selection, ParamCmBx).Name
|
||||
If sType = EGT_SPLITBOTTOM Then
|
||||
DirectCast(Map.refSceneButtonVM.m_NewPanelUC, SceneUserControlV).Preview.Visibility = Visibility.Visible
|
||||
|
||||
ParamList(5).nVisibility = Visibility.Visible
|
||||
ParamList(6).nVisibility = Visibility.Visible
|
||||
ParamList(7).nVisibility = Visibility.Visible
|
||||
ParamList(8).nVisibility = Visibility.Visible
|
||||
ParamList(9).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_H).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Collapsed
|
||||
|
||||
ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DEPTH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_TYPE).nVisibility = Visibility.Visible
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_TYPE), _ComboBoxParam).IndexSelParamCmBx = 0
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_X).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_Y).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Visible
|
||||
Map.refSceneHostVM.m_SelType = GDB_TY.SRF_MESH
|
||||
'DirectCast(Map.refSceneButtonV.m_PanelUC, SceneUserControlV).Preview.Visibility = Visibility.Visible
|
||||
ElseIf DirectCast(Selection, ParamCmBx).Name = "Tappa Buca" Then
|
||||
ParamList(2).nVisibility = Visibility.Visible
|
||||
ParamList(3).nVisibility = Visibility.Visible
|
||||
ParamList(4).nVisibility = Visibility.Visible
|
||||
ElseIf sType = EGT_SINK_SPLITBOTTOM Then
|
||||
DirectCast(Map.refSceneButtonVM.m_NewPanelUC, SceneUserControlV).Preview.Visibility = Visibility.Visible
|
||||
|
||||
ParamList(5).nVisibility = Visibility.Visible
|
||||
ParamList(6).nVisibility = Visibility.Visible
|
||||
ParamList(7).nVisibility = Visibility.Visible
|
||||
ParamList(8).nVisibility = Visibility.Visible
|
||||
ParamList(9).nVisibility = Visibility.Visible
|
||||
Map.refSceneHostVM.m_SelType = GDB_TY.CRV_LINE
|
||||
Else
|
||||
ParamList(2).nVisibility = Visibility.Collapsed
|
||||
ParamList(3).nVisibility = Visibility.Visible
|
||||
ParamList(4).nVisibility = Visibility.Visible
|
||||
DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx = 2
|
||||
ParamList(ParamEnum.PARAG_PANEL).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Visible
|
||||
|
||||
ParamList(5).nVisibility = Visibility.Collapsed
|
||||
ParamList(6).nVisibility = Visibility.Collapsed
|
||||
ParamList(7).nVisibility = Visibility.Collapsed
|
||||
ParamList(8).nVisibility = Visibility.Collapsed
|
||||
ParamList(9).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DEPTH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_TYPE).nVisibility = Visibility.Visible
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_TYPE), _ComboBoxParam).IndexSelParamCmBx = 0
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_X).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_Y).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Visible
|
||||
Map.refSceneHostVM.m_SelType = GDB_TY.CRV_LINE
|
||||
'DirectCast(Map.refSceneButtonV.m_PanelUC, SceneUserControlV).Preview.Visibility = Visibility.Hidden
|
||||
ElseIf sType = EGT_SINK Then
|
||||
DirectCast(Map.refSceneButtonVM.m_NewPanelUC, SceneUserControlV).Preview.Visibility = Visibility.Visible
|
||||
|
||||
DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx = 2
|
||||
ParamList(ParamEnum.PARAG_PANEL).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Visible
|
||||
|
||||
ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DEPTH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_TYPE).nVisibility = Visibility.Visible
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_TYPE), _ComboBoxParam).IndexSelParamCmBx = 1
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_X).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_Y).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Collapsed
|
||||
Map.refSceneHostVM.m_SelType = GDB_TY.CRV_LINE
|
||||
ElseIf sType = EGT_SPLASHTOP Or sType = EGT_WATERFALL Then
|
||||
DirectCast(Map.refSceneButtonVM.m_NewPanelUC, SceneUserControlV).Preview.Visibility = Visibility.Hidden
|
||||
|
||||
ParamList(ParamEnum.PARAG_PANEL).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.PANEL_H).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Visible
|
||||
If DirectCast(Selection, ParamCmBx).Name = EGT_SPLASHTOP Then
|
||||
DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx = 0
|
||||
ElseIf DirectCast(Selection, ParamCmBx).Name = EGT_WATERFALL Then
|
||||
DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx = 2
|
||||
End If
|
||||
|
||||
ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_H).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_DEPTH).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_TYPE).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_X).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_Y).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Collapsed
|
||||
Map.refSceneHostVM.m_SelType = GDB_TY.CRV_LINE
|
||||
ElseIf sType = EGT_BOTTOM Then
|
||||
DirectCast(Map.refSceneButtonVM.m_NewPanelUC, SceneUserControlV).Preview.Visibility = Visibility.Visible
|
||||
|
||||
DirectCast(ParamList(ParamEnum.MSG_ISTRUZ), _TextBlockParam).MsgValue = TopBar_Msg_Bottom
|
||||
ParamList(ParamEnum.PARAG_PANEL).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.PANEL_H).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.PANEL_TH).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.PANEL_J).nVisibility = Visibility.Collapsed
|
||||
|
||||
ParamList(ParamEnum.PARAG_BOTTOM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_H).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_TH).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DEPTH).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_TYPE).nVisibility = Visibility.Visible
|
||||
DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_TYPE), _ComboBoxParam).IndexSelParamCmBx = 1
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_X).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_Y).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Collapsed
|
||||
|
||||
Map.refSceneHostVM.m_SelType = GDB_TY.SRF_MESH
|
||||
End If
|
||||
End If
|
||||
|
||||
If DirectCast(sender, _ComboBoxParam).Name = "TipoBuco" Then
|
||||
Dim sType As String = DirectCast(Selection, ParamCmBx).Name
|
||||
If sType = EGT_SLOT Then
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Visible
|
||||
ElseIf sType = EGT_BORE Then
|
||||
ParamList(ParamEnum.BOTTOM_DIAM).nVisibility = Visibility.Visible
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMX).nVisibility = Visibility.Collapsed
|
||||
ParamList(ParamEnum.BOTTOM_HOLE_DIMY).nVisibility = Visibility.Collapsed
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Conferma()
|
||||
''debug
|
||||
'DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx = 2
|
||||
'AddWaterfallAndSplitBottom(105)
|
||||
''debug
|
||||
|
||||
' se sono in modalità fondello allora devo creare il pezzo
|
||||
If DirectCast(ParamList(1), _ComboBoxParam).SelParamCmBx.Name = "SplitBottom" Then
|
||||
Dim sType As String = DirectCast(ParamList(ParamEnum.TY_PANEL), _ComboBoxParam).SelParamCmBx.Name
|
||||
If sType = EGT_SPLITBOTTOM Then
|
||||
AddSplitBottom(Map.refSceneHostVM.m_PanelPartList)
|
||||
ElseIf sType = EGT_BOTTOM Then
|
||||
AddBottom(Map.refSceneHostVM.m_PanelPartList)
|
||||
End If
|
||||
' resetto la lista dei part selezionati per la creazione di uno splitBottom
|
||||
Map.refSceneHostVM.m_PanelPartList.Clear()
|
||||
@@ -139,15 +272,21 @@ Public Class NewPanelVM
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ShowPreview()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Close()
|
||||
SolidManagerM.ResetOperationMarks(Map.refSceneHostVM.m_nIdPart)
|
||||
EgtDraw()
|
||||
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_PANEL)
|
||||
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_ADD_PANEL)
|
||||
If TypeOf (Btn) Is _ToggleButton Then
|
||||
DirectCast(Btn, _ToggleButton).IsChecked = False
|
||||
Else
|
||||
EgtOutLog("CONFIG ERR: Il pulsante di Panel è stato definito come Button anziché ToggleButton")
|
||||
End If
|
||||
' ricostruisco l'elenco dei part solid
|
||||
SolidManagerM.CreatePartSolid()
|
||||
' rimuovo lo UC dalla griglia
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_NewPanelUC)
|
||||
' gestisco le attivazioni di undo/redo
|
||||
@@ -155,18 +294,20 @@ Public Class NewPanelVM
|
||||
End Sub
|
||||
|
||||
Public Sub AddPanel(nId As Integer)
|
||||
Dim ComboBoxParam As _ComboBoxParam = DirectCast(ParamList(1), _ComboBoxParam)
|
||||
If ComboBoxParam.SelParamCmBx.Name = "Alzatina" Then
|
||||
Dim ComboBoxParam As _ComboBoxParam = DirectCast(ParamList(ParamEnum.TY_PANEL), _ComboBoxParam)
|
||||
If ComboBoxParam.SelParamCmBx.Name = EGT_SPLASHTOP Then
|
||||
AddSplashTop(nId)
|
||||
ElseIf ComboBoxParam.SelParamCmBx.Name = "Frontalino" Then
|
||||
ElseIf ComboBoxParam.SelParamCmBx.Name = EGT_WATERFALL Then
|
||||
AddWaterfall(nId)
|
||||
ElseIf ComboBoxParam.SelParamCmBx.Name = "Tappa Buca" Then
|
||||
ElseIf ComboBoxParam.SelParamCmBx.Name = EGT_SINK Then
|
||||
AddWaterfallAndBottom(nId)
|
||||
ElseIf ComboBoxParam.SelParamCmBx.Name = EGT_SINK_SPLITBOTTOM Then
|
||||
AddWaterfallAndSplitBottom(nId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function GetPanelType()
|
||||
Return DirectCast(ParamList(1), _ComboBoxParam).SelParamCmBx.Name
|
||||
Return DirectCast(ParamList(ParamEnum.TY_PANEL), _ComboBoxParam).SelParamCmBx.Name
|
||||
End Function
|
||||
|
||||
Private Sub AddSplashTop(nId As Integer)
|
||||
@@ -177,14 +318,14 @@ Public Class NewPanelVM
|
||||
' setto le variabili per l'alzatina
|
||||
Dim dAngAlzatina As Double = 90
|
||||
If EgtLuaSetGlobNumVar("TOOL.dPairAng", dAngAlzatina) Then AssLog("TOOL.dPairAng = " & dAngAlzatina.ToString())
|
||||
Dim nJunctionTypeAlz = 1
|
||||
If EgtLuaSetGlobIntVar("TOOL.nJunctionType", nJunctionTypeAlz) Then AssLog("TOOL.nJunctionType = " & nJunctionTypeAlz.ToString())
|
||||
Dim nJunctionType As Integer = DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx + 1
|
||||
If EgtLuaSetGlobIntVar("TOOL.nJunctionType", nJunctionType) Then AssLog("TOOL.nJunctionType = " & nJunctionType.ToString())
|
||||
Dim bOnLoop As Boolean = False
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bOnLoop", bOnLoop) Then AssLog("TOOL.bOnLoop = false")
|
||||
Dim bInsideLoop As Boolean = True
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bInsideLoop", bInsideLoop) Then AssLog("TOOL.bInsideLoop = true")
|
||||
' setto le varibili generiche per il pezzo
|
||||
Dim dTh As Double = DirectCast(ParamList(4), _TextBoxParam).GetValue()
|
||||
Dim dTh As Double = DirectCast(ParamList(ParamEnum.PANEL_TH), _TextBoxParam).GetValue()
|
||||
If EgtLuaSetGlobNumVar("TOOL.dTh", dTh) Then AssLog("TOOL.dTh = " & dTh.ToString())
|
||||
Dim dH As Double = DirectCast(ParamList(3), _TextBoxParam).GetValue()
|
||||
If EgtLuaSetGlobNumVar("TOOL.dH", dH) Then AssLog("TOOL.dH = " & dH.ToString())
|
||||
@@ -193,32 +334,37 @@ Public Class NewPanelVM
|
||||
' chiamo la funzione per la creazione
|
||||
If EgtLuaCallFunction("TOOL.CreateParetinaFull") Then AssLog("TOOL.CreateParetinaFull()")
|
||||
End Sub
|
||||
Private Sub AddWaterfall(nId As Integer)
|
||||
Private Sub AddWaterfall(nId As Integer, Optional sInfoKey As String = "", Optional sInfoValue As String = "")
|
||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
' setto l'indice del lato e il parent
|
||||
If EgtLuaSetGlobIntVar("TOOL.nEdgeId", nId) Then AssLog("TOOL.nEdgeId = " & nId.ToString())
|
||||
If EgtLuaSetGlobIntVar("TOOL.nParent", nPartId) Then AssLog("TOOL.nParent = " & nPartId.ToString())
|
||||
' setto le variabili per l'alzatina
|
||||
' setto le variabili per il frontalino
|
||||
Dim dAngFrontalino As Double = -90
|
||||
If EgtLuaSetGlobNumVar("TOOL.dPairAng", dAngFrontalino) Then AssLog("TOOL.dPairAng = " & dAngFrontalino.ToString())
|
||||
Dim nJunctionTypeAlz = 3
|
||||
If EgtLuaSetGlobIntVar("TOOL.nJunctionType", nJunctionTypeAlz) Then AssLog("TOOL.nJunctionType = " & nJunctionTypeAlz.ToString())
|
||||
Dim nJunctionType As Integer = DirectCast(ParamList(ParamEnum.PANEL_J), _ComboBoxParam).IndexSelParamCmBx + 1
|
||||
If EgtLuaSetGlobIntVar("TOOL.nJunctionType", nJunctionType) Then AssLog("TOOL.nJunctionType = " & nJunctionType.ToString())
|
||||
Dim bOnLoop As Boolean = True
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bOnLoop", bOnLoop) Then AssLog("TOOL.bOnLoop = false")
|
||||
Dim bInsideLoop As Boolean = True
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bInsideLoop", bInsideLoop) Then AssLog("TOOL.bInsideLoop = true")
|
||||
' setto le varibili generiche per il pezzo
|
||||
Dim dTh As Double = DirectCast(ParamList(4), _TextBoxParam).GetValue()
|
||||
Dim dTh As Double = DirectCast(ParamList(ParamEnum.PANEL_TH), _TextBoxParam).GetValue()
|
||||
If EgtLuaSetGlobNumVar("TOOL.dTh", dTh) Then AssLog("TOOL.dTh = " & dTh.ToString())
|
||||
Dim dH As Double = DirectCast(ParamList(3), _TextBoxParam).GetValue()
|
||||
If EgtLuaSetGlobNumVar("TOOL.dH", dH) Then AssLog("TOOL.dH = " & dH.ToString())
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bPrev", True) Then AssLog("TOOL.bPrev = true")
|
||||
If EgtLuaSetGlobBoolVar("TOOL.bNext", True) Then AssLog("TOOL.bNext = true")
|
||||
' se presente setto l'info addizionale
|
||||
If sInfoKey <> String.Empty Then
|
||||
If EgtLuaSetGlobStringVar("TOOL.tbInfo.InfoKey", sInfoKey) Then AssLog("TOOL.InfoKey = " & sInfoKey)
|
||||
If EgtLuaSetGlobStringVar("TOOL.tbInfo.InfoValue", sInfoValue) Then AssLog("TOOL.sInfoValue = " & sInfoValue)
|
||||
End If
|
||||
' chiamo la funzione per la creazione
|
||||
If EgtLuaCallFunction("TOOL.CreateParetinaFull") Then AssLog("TOOL.CreateParetinaFull()")
|
||||
End Sub
|
||||
|
||||
Private Sub AddSplitBottom(PartList As List(Of Integer))
|
||||
Private Sub AddSplitBottom(PartList As List(Of Integer), Optional sInfoKey As String = "", Optional sInfoValue As String = "")
|
||||
If PartList.Count = 0 Then
|
||||
Close()
|
||||
Return
|
||||
@@ -233,21 +379,70 @@ Public Class NewPanelVM
|
||||
For i As Integer = 1 To lEdgeList.Count
|
||||
EgtLuaSetGlobIntVar("TOOL.tbIdEdges." & i.ToString(), lEdgeList(i - 1).ToString())
|
||||
Next
|
||||
Dim dTh As Double = DirectCast(ParamList(7), _TextBoxParam).GetValue()
|
||||
Dim dTh As Double = DirectCast(ParamList(ParamEnum.BOTTOM_TH), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dTh", dTh)
|
||||
Dim dDiam As Double = DirectCast(ParamList(9), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dDiamBore", dDiam)
|
||||
Dim dAng As Double = DirectCast(ParamList(8), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dSlopeAng", dAng)
|
||||
Dim dDepth As Double = DirectCast(ParamList(ParamEnum.BOTTOM_DEPTH), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dDepth", dDepth)
|
||||
Dim dPosX As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_X), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleX", dPosX)
|
||||
Dim dPosY As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_Y), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleY", dPosY)
|
||||
Dim dDimX As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_DIMX), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleDimX", dDimX)
|
||||
Dim dDimY As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_DIMY), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleDimY", dDimY)
|
||||
' se presente setto l'info addizionale
|
||||
If sInfoKey <> String.Empty Then
|
||||
If EgtLuaSetGlobStringVar("TOOL.tbInfo.InfoKey", sInfoKey) Then AssLog("TOOL.InfoKey = " & sInfoKey)
|
||||
If EgtLuaSetGlobStringVar("TOOL.tbInfo.InfoValue", sInfoValue) Then AssLog("TOOL.InfoValue = " & sInfoValue)
|
||||
End If
|
||||
EgtLuaCallFunction("TOOL.CreateSplitBottom")
|
||||
End Sub
|
||||
|
||||
Private Sub AddWaterfallAndBottom(nId As Integer)
|
||||
Private Sub AddBottom(PartList As List(Of Integer), Optional sInfoKey As String = "", Optional sInfoValue As String = "")
|
||||
If PartList.Count = 0 Then
|
||||
Close()
|
||||
Return
|
||||
End If
|
||||
Dim lEdgeList As New List(Of Integer)
|
||||
For Each nPart As Integer In PartList
|
||||
Dim nOutLay As Integer = EgtGetFirstNameInGroup(nPart, "OutLoop")
|
||||
Dim nEdge As Integer = EgtGetFirstNameInGroup(nOutLay, "A3")
|
||||
lEdgeList.Add(nEdge)
|
||||
Next
|
||||
|
||||
For i As Integer = 1 To lEdgeList.Count
|
||||
EgtLuaSetGlobIntVar("TOOL.tbIdEdges." & i.ToString(), lEdgeList(i - 1).ToString())
|
||||
Next
|
||||
Dim dTh As Double = DirectCast(ParamList(ParamEnum.BOTTOM_TH), _TextBoxParam).GetValue()
|
||||
EgtLuaSetGlobNumVar("TOOL.dTh", dTh)
|
||||
Dim dDiam As Double = DirectCast(ParamList(ParamEnum.BOTTOM_DIAM), _TextBoxParam).GetValue()
|
||||
If dDiam < 1 Then dDiam = 30
|
||||
EgtLuaSetGlobNumVar("TOOL.dDiamBore", dDiam)
|
||||
Dim dX As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_X), _TextBoxParam).GetValue()
|
||||
If dX < dDiam Then dX = dDiam + 10
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleX", dX)
|
||||
Dim dY As Double = DirectCast(ParamList(ParamEnum.BOTTOM_HOLE_Y), _TextBoxParam).GetValue()
|
||||
If dY < dDiam Then dY = dDiam + 10
|
||||
EgtLuaSetGlobNumVar("TOOL.dHoleY", dY)
|
||||
' se presente setto l'info addizionale
|
||||
If sInfoKey <> String.Empty Then
|
||||
If EgtLuaSetGlobStringVar("TOOL.tbInfo.InfoKey", sInfoKey) Then AssLog("TOOL.InfoKey = " & sInfoKey)
|
||||
If EgtLuaSetGlobStringVar("TOOL.tbInfo.InfoValue", sInfoValue) Then AssLog("TOOL.InfoKey = " & sInfoValue)
|
||||
End If
|
||||
EgtLuaCallFunction("TOOL.CreateBottom")
|
||||
End Sub
|
||||
|
||||
Private Sub AddWaterfallAndBottom(nId)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub AddWaterfallAndSplitBottom(nId As Integer)
|
||||
Dim nInLoopLay As Integer = EgtGetParent(nId)
|
||||
Dim nEdges As Integer = EgtGetGroupObjs(nInLoopLay)
|
||||
Dim nEdge As Integer = EgtGetFirstInGroup(nInLoopLay)
|
||||
While nEdge <> GDB_ID.NULL
|
||||
AddWaterfall(nEdge)
|
||||
AddWaterfall(nEdge, "SinkSplitBottom", "1")
|
||||
nEdge = EgtGetNext(nEdge)
|
||||
End While
|
||||
' recupero le info dei part creati come frontalini dalle info del Parent
|
||||
@@ -277,7 +472,7 @@ Public Class NewPanelVM
|
||||
WaterFallList.Add(EgtGetFirstNameInGroup(GDB_ID.ROOT, sPartName))
|
||||
Next
|
||||
' ora che ho la lista dei frontalini posso creare lo split bottom
|
||||
AddSplitBottom(WaterFallList)
|
||||
AddSplitBottom(WaterFallList, "SinkSplitBottom", "1")
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
@@ -13,5 +13,8 @@
|
||||
<RadioButton Content="{Binding Parametrico_Msg}"
|
||||
Command="{Binding ParametricoCmd}"
|
||||
Style="{StaticResource Parametrico_ToggleButton}"/>
|
||||
|
||||
<RadioButton Content="{Binding Office_Msg}"
|
||||
Command="{Binding OfficeCmd}"
|
||||
Style="{StaticResource Office_ToggleButton}"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -38,11 +38,18 @@ Public Class ProjManagerVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Office_Msg
|
||||
Get
|
||||
Return EgtMsg(110036).ToUpper() ' Office
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione Comandi
|
||||
Private m_HomeCmd As ICommand
|
||||
Private m_ParametricoCmd As ICommand
|
||||
Private m_OfficeCmd As ICommand
|
||||
Private m_NewFileCmd As ICommand
|
||||
Private m_OpenFileCmd As ICommand
|
||||
Private m_SaveFileCmd As ICommand
|
||||
@@ -112,6 +119,23 @@ Public Class ProjManagerVM
|
||||
|
||||
#End Region ' ParametricoCmd
|
||||
|
||||
#Region "OfficeCmd"
|
||||
|
||||
Public ReadOnly Property OfficeCmd As ICommand
|
||||
Get
|
||||
If IsNothing(m_OfficeCmd) Then
|
||||
m_OfficeCmd = New Command(AddressOf Office)
|
||||
End If
|
||||
Return m_OfficeCmd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub Office()
|
||||
Map.refTopPanelVM.SetSelTopOption(TopPanelVM.TopOption.OFFICE)
|
||||
End Sub
|
||||
|
||||
#End Region ' OfficeCmd
|
||||
|
||||
#Region "NewFileCmd"
|
||||
|
||||
Public ReadOnly Property NewFileCmd As ICommand
|
||||
@@ -143,8 +167,6 @@ Public Class ProjManagerVM
|
||||
|
||||
Friend Sub OpenFile()
|
||||
Map.refTopPanelVM.OpenProject("")
|
||||
SolidManagerM.CreatePartSolid()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' OpenFileCmd
|
||||
|
||||
+25
-1
@@ -83,6 +83,9 @@ Public Class RotateVM
|
||||
|
||||
LoadParamList()
|
||||
Stage = If(Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL, RotateStage.SelectPart, RotateStage.SelectAxis)
|
||||
|
||||
ActivateButton()
|
||||
RemoveAllUC()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
@@ -90,7 +93,7 @@ Public Class RotateVM
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub LoadParamList()
|
||||
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(Stage), ParamType.STR))
|
||||
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(Stage), ParamType.STR))
|
||||
' Angolo
|
||||
AddGenericParam(New _TextBoxParam(EgtMsg(110006), 0, ParamType.DOUB, Visibility.Visible, False))
|
||||
End Sub
|
||||
@@ -178,6 +181,27 @@ Public Class RotateVM
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ActivateButton()
|
||||
' Attivo pulsante Rotate
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_ROTATE), _ToggleButton).IsChecked = True
|
||||
' Disattivo pulsante Pair
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_PAIR), _ToggleButton).IsChecked = False
|
||||
' Disattivo pulsante Move
|
||||
DirectCast(Map.refSceneButtonVM.GetButton(EGT_MOVE), _ToggleButton).IsChecked = False
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveAllUC()
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_AngleUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditPanelUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditParametricUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_ExtremityUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_LengthUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_MoveUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_NewPanelUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_ParametricCompoUC)
|
||||
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_PairUC)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
+1
-4
@@ -1,7 +1,4 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class SVGV
|
||||
Public Class SVGV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
|
||||
@@ -278,6 +278,7 @@ Public Class MyPath
|
||||
' Carico colore linea
|
||||
SetBrushFromRGBString(m_stroke, m_CurrPath.Stroke)
|
||||
' Carico spessore linea
|
||||
If m_stroke_width < 5 Then m_stroke_width = 10
|
||||
m_CurrPath.StrokeThickness = m_stroke_width
|
||||
' Applico l'opacità della superificie
|
||||
m_CurrPath.Opacity = m_fill_opacity
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
<!--TOP-->
|
||||
<ItemsControl ItemsSource="{Binding TopListBtn}"
|
||||
Visibility="Collapsed"
|
||||
Style="{StaticResource TopList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
@@ -124,6 +125,7 @@
|
||||
|
||||
<!--LEFT colonna 1-->
|
||||
<ItemsControl ItemsSource="{Binding LeftListBtn}"
|
||||
Visibility="Collapsed"
|
||||
Style="{StaticResource LeftList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
||||
@@ -10,24 +10,16 @@
|
||||
Me.DataContext = Map.refSceneButtonVM
|
||||
SolidManagerM.ManageUndoRedo()
|
||||
Map.SetRefSceneButtonV(Me)
|
||||
AddHandler Me.Loaded, AddressOf SceneButtonV_Loaded
|
||||
AddHandler Me.SizeChanged, AddressOf SceneButtonV_Sizing
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Sizing()
|
||||
Me.Width = Map.refMainWindowV.ActualWidth
|
||||
Me.Height = Map.refMainWindowV.ActualHeight
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "Events"
|
||||
|
||||
Private Sub SceneButtonV_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
Sizing()
|
||||
Public Sub SceneButtonV_Sizing()
|
||||
Me.Width = Map.refMainWindowV.ActualWidth
|
||||
Me.Height = Map.refMainWindowV.ActualHeight
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
+119
-22
@@ -9,6 +9,8 @@ Public Class SceneButtonVM
|
||||
Public Shared m_nIndexList As Integer = 0
|
||||
Public Shared m_nIndexList_1 As Integer = 0
|
||||
Public Shared m_nIndexList_2 As Integer = 0
|
||||
Public Shared m_nIndexList_3 As Integer = 0
|
||||
Public Shared m_nIndexList_4 As Integer = 0
|
||||
|
||||
Public m_SelOptionUC As SelOptionV
|
||||
Public m_SceneUserControlV As SceneUserControlV
|
||||
@@ -17,7 +19,11 @@ Public Class SceneButtonVM
|
||||
Public m_MoveUC As SceneUserControlV
|
||||
Public m_NewPanelUC As SceneUserControlV
|
||||
Public m_EditPanelUC As SceneUserControlV
|
||||
Public m_EditParametricUC As SceneUserControlV
|
||||
Public m_ParametricCompoUC As SceneUserControlV
|
||||
Public m_LengthUC As SceneUserControlV
|
||||
Public m_AngleUC As SceneUserControlV
|
||||
Public m_ExtremityUC As SceneUserControlV
|
||||
|
||||
Private m_TopListBtn As New List(Of SceneBtn)
|
||||
Public Property TopListBtn As List(Of SceneBtn)
|
||||
@@ -79,6 +85,36 @@ Public Class SceneButtonVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ParametricListGroupBtn As New List(Of GroupSceneBtn)
|
||||
Public Property ParametricListGroupBtn As List(Of GroupSceneBtn)
|
||||
Get
|
||||
Return m_ParametricListGroupBtn
|
||||
End Get
|
||||
Set(value As List(Of GroupSceneBtn))
|
||||
m_ParametricListGroupBtn = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_InfoListBtn As New List(Of GroupSceneBtn)
|
||||
Public Property InfoListBtn As List(Of GroupSceneBtn)
|
||||
Get
|
||||
Return m_InfoListBtn
|
||||
End Get
|
||||
Set(value As List(Of GroupSceneBtn))
|
||||
m_InfoListBtn = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_TopPanelOfficeListBtn As New List(Of GroupSceneBtn)
|
||||
Public Property TopPanelOfficeListBtn As List(Of GroupSceneBtn)
|
||||
Get
|
||||
Return m_TopPanelOfficeListBtn
|
||||
End Get
|
||||
Set(value As List(Of GroupSceneBtn))
|
||||
m_TopPanelOfficeListBtn = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Enum TopPanel As Integer
|
||||
TOP_PANEL = 0
|
||||
TOP_PANEL_1 = 1
|
||||
@@ -105,7 +141,7 @@ Public Class SceneButtonVM
|
||||
Sub New()
|
||||
Map.SetRefSceneButtonVM(Me)
|
||||
LoadButtons()
|
||||
LoadGroupButtons()
|
||||
LoadListButtons()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
@@ -123,14 +159,21 @@ Public Class SceneButtonVM
|
||||
SetButtonsLocation(BOTTOMCENTERLIST_BTN, m_BottomCenterListBtn)
|
||||
End Sub
|
||||
|
||||
Private Sub LoadGroupButtons()
|
||||
Private Sub LoadListButtons()
|
||||
LoadGroupButtons(TOPPANELLIST_BTN, m_TopPanelListGroupBtn)
|
||||
LoadGroupButtons(PARAMETRICLIST_BTN, m_ParametricListGroupBtn)
|
||||
LoadGroupButtons(INFOLLIST_BTN, m_InfoListBtn)
|
||||
LoadGroupButtons(TOPPANELOFFICELIST_BTN, m_TopPanelOfficeListBtn)
|
||||
End Sub
|
||||
|
||||
Private Sub LoadGroupButtons(NameList As String, GroupSceneBtnList As List(Of GroupSceneBtn))
|
||||
Dim Index As Integer = 1
|
||||
Dim SubTitle As String = String.Empty
|
||||
Dim sKeyTitle As String = TOPPANELLIST_BTN & "_" & Index.ToString()
|
||||
Dim sKeyTitle As String = NameList & "_" & Index.ToString()
|
||||
While GetMainPrivateProfileString(sKeyTitle, ConstEgtStone3D.SUBTITLE, "", SubTitle) > 0
|
||||
SetGroupButtonsLocation(sKeyTitle, m_TopPanelListGroupBtn)
|
||||
SetGroupButtonsLocation(sKeyTitle, GroupSceneBtnList)
|
||||
Index += 1
|
||||
sKeyTitle = TOPPANELLIST_BTN & "_" & Index.ToString()
|
||||
sKeyTitle = NameList & "_" & Index.ToString()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
@@ -171,6 +214,9 @@ Public Class SceneButtonVM
|
||||
SetButtonsLocation(PositionList, LocalListSceneBtn)
|
||||
GetMainPrivateProfileString(PositionList, ConstEgtStone3D.SUBTITLE, "", SubTitle)
|
||||
Title = SplitSubTitle(SubTitle)
|
||||
For Each ItemLocalList As SceneBtn In LocalListSceneBtn
|
||||
ItemLocalList.Name = SplitSubTitle(ItemLocalList.Name)
|
||||
Next
|
||||
ListGroupBtn.Add(New GroupSceneBtn(LocalListSceneBtn, Title))
|
||||
End Sub
|
||||
|
||||
@@ -194,6 +240,12 @@ Public Class SceneButtonVM
|
||||
Btn = m_LeftListBtn.FirstOrDefault(Function(x) x.Flag = Flag)
|
||||
If Not IsNothing(Btn) Then Return Btn
|
||||
Btn = m_BottomCenterListBtn.FirstOrDefault(Function(x) x.Flag = Flag)
|
||||
If IsNothing(Btn) Then
|
||||
For Each ItemPanelList As GroupSceneBtn In m_TopPanelListGroupBtn
|
||||
Btn = ItemPanelList.TopPanelListBtn.FirstOrDefault(Function(x) x.Flag = Flag)
|
||||
If Not IsNothing(Btn) Then Exit For
|
||||
Next
|
||||
End If
|
||||
Return Btn
|
||||
End Function
|
||||
|
||||
@@ -202,8 +254,10 @@ Public Class SceneButtonVM
|
||||
For IndexTitle As Integer = 0 To subTitleList.Count - 1
|
||||
If IsNumeric(subTitleList(IndexTitle)) AndAlso Not EgtMsg(subTitleList(IndexTitle)).StartsWith("Msg") Then
|
||||
Return EgtMsg(subTitleList(IndexTitle))
|
||||
Else
|
||||
ElseIf IndexTitle > 1 Then
|
||||
Return subTitleList(IndexTitle + 1)
|
||||
Else
|
||||
Return subTitleList(IndexTitle)
|
||||
End If
|
||||
Next
|
||||
Return String.Empty
|
||||
@@ -214,10 +268,17 @@ Public Class SceneButtonVM
|
||||
''' </summary>
|
||||
''' <param name="SceneUC">User control generico</param>
|
||||
Public Sub LoadUC(SceneUC As SceneUserControlV)
|
||||
If Not IsNothing(m_PairUC) Then RemoveUC(m_PairUC)
|
||||
If Not IsNothing(m_RotateUC) Then RemoveUC(m_RotateUC)
|
||||
If Not IsNothing(m_MoveUC) Then RemoveUC(m_MoveUC)
|
||||
If Not IsNothing(m_NewPanelUC) Then RemoveUC(m_NewPanelUC)
|
||||
If Not IsNothing(m_EditPanelUC) Then RemoveUC(m_EditPanelUC)
|
||||
If Not IsNothing(m_EditParametricUC) Then RemoveUC(m_EditParametricUC)
|
||||
If Not IsNothing(m_ParametricCompoUC) Then RemoveUC(m_ParametricCompoUC)
|
||||
Grid.SetColumn(SceneUC, 0)
|
||||
Grid.SetRow(SceneUC, 0)
|
||||
Grid.SetColumnSpan(SceneUC, 2)
|
||||
Grid.SetRowSpan(SceneUC, 5)
|
||||
Grid.SetRowSpan(SceneUC, 10)
|
||||
Map.refSceneButtonV.MainGrid.Children.Add(SceneUC)
|
||||
End Sub
|
||||
|
||||
@@ -227,6 +288,7 @@ Public Class SceneButtonVM
|
||||
''' <param name="SceneUC">User control generico</param>
|
||||
Friend Sub RemoveUC(SceneUC As SceneUserControlV)
|
||||
Map.refSceneButtonV.MainGrid.Children.Remove(SceneUC)
|
||||
SceneUC = Nothing
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
@@ -439,8 +501,25 @@ Module SceneCmd
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Exec(Flag)
|
||||
Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
|
||||
Public Function ExecFile(Flag As String, nVeinCtx As Integer, Optional dir As String = "") As Boolean
|
||||
Dim bNewParametricExsists As Boolean = False
|
||||
If Flag.Contains(".lua") Then
|
||||
If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
|
||||
Dim LocalParametricCompo As New ParametricCompoVM(Flag, nVeinCtx, dir)
|
||||
If LocalParametricCompo.bFileExsist Then
|
||||
Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = LocalParametricCompo
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
|
||||
bNewParametricExsists = True
|
||||
SolidManagerM.CreatePartSolid()
|
||||
Else
|
||||
EgtOutLog("La chiamata del lua '" & Flag & "' non è andata a buon fine")
|
||||
End If
|
||||
End If
|
||||
Return bNewParametricExsists
|
||||
End Function
|
||||
|
||||
Public Function ExecMethod(Flag As String, nVeinCtx As Integer) As Boolean
|
||||
Dim bNewMethodsExsists As Boolean = True
|
||||
Select Case Flag
|
||||
Case EGT_AUTOPAIR
|
||||
EgtSetCurrentContext(nVeinCtx)
|
||||
@@ -472,7 +551,9 @@ Module SceneCmd
|
||||
ImportLoop()
|
||||
Case EGT_CREATE_SOLID_LOOP
|
||||
SolidManagerM.CreateSolidFromLoops(Map.refSceneHostVM.m_nIdPart)
|
||||
Case EGT_PANEL
|
||||
Case EGT_CREATE_ALL_SOLIDS
|
||||
SolidManagerM.CreateAllSolids()
|
||||
Case EGT_ADD_PANEL
|
||||
If IsNothing(Map.refSceneButtonVM.m_NewPanelUC) Then Map.refSceneButtonVM.m_NewPanelUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_NewPanelUC.DataContext = New NewPanelVM()
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_NewPanelUC)
|
||||
@@ -483,23 +564,39 @@ Module SceneCmd
|
||||
Case EGT_DELETE
|
||||
SolidManagerM.Delete(Map.refSceneHostVM.m_nIdPart)
|
||||
Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL
|
||||
Case EGT_RECTANGE
|
||||
If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_RECTANGE & ".lua")
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
|
||||
Case EGT_POLIGON
|
||||
If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_POLIGON & ".lua")
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
|
||||
Case EGT_ELLIPSE
|
||||
If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_ELLIPSE & ".lua")
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
|
||||
Case EGT_EDIT_PANEL
|
||||
If IsNothing(Map.refSceneButtonVM.m_EditPanelUC) Then Map.refSceneButtonVM.m_EditPanelUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_EditPanelUC.DataContext = New EditPanelVM()
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_EditPanelUC)
|
||||
Case EGT_EDIT_PARAMETRIC
|
||||
If IsNothing(Map.refSceneButtonVM.m_EditParametricUC) Then Map.refSceneButtonVM.m_EditParametricUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_EditParametricUC.DataContext = New EditParametricVM()
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_EditParametricUC)
|
||||
Case EGT_LENGHT
|
||||
If IsNothing(Map.refSceneButtonVM.m_LengthUC) Then Map.refSceneButtonVM.m_LengthUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_LengthUC.DataContext = New LengthVM()
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_LengthUC)
|
||||
Case EGT_ANGLE
|
||||
If IsNothing(Map.refSceneButtonVM.m_AngleUC) Then Map.refSceneButtonVM.m_AngleUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_AngleUC.DataContext = New AngleVM()
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_AngleUC)
|
||||
Case EGT_EXTREMITY
|
||||
If IsNothing(Map.refSceneButtonVM.m_ExtremityUC) Then Map.refSceneButtonVM.m_ExtremityUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_ExtremityUC.DataContext = New ExtremityVM()
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ExtremityUC)
|
||||
Case Else
|
||||
EgtOutLog("La chiamata del metodo '" & Flag & "' non è andata a buon fine")
|
||||
bNewMethodsExsists = False
|
||||
End Select
|
||||
Return bNewMethodsExsists
|
||||
End Function
|
||||
|
||||
Public Sub Exec(Flag As String)
|
||||
Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
|
||||
|
||||
If Not ExecFile(Flag, nVeinCtx) Then
|
||||
ExecMethod(Flag, nVeinCtx)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub Undo()
|
||||
|
||||
@@ -358,7 +358,8 @@ Public Class MySceneHostVM
|
||||
.Title = EgtMsg(110013), ' Salva
|
||||
.Filter = "New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|vme files (*.vme)|*.vme",
|
||||
.FilterIndex = 1,
|
||||
.FileName = sFile,
|
||||
.FilterIndex = 2,
|
||||
.InitialDirectory = sDir,
|
||||
.ValidateNames = False,
|
||||
.OverwritePrompt = True,
|
||||
@@ -443,6 +444,29 @@ Public Class MySceneHostVM
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SaveProj(sCurrFile As String, Optional nType As NGE = NGE.CMPTEXT) As Boolean
|
||||
If String.IsNullOrWhiteSpace(sCurrFile) Or EgtGetFileType(sCurrFile) <> FT.LUA Then
|
||||
Return SaveAsProject()
|
||||
Else
|
||||
' Reset controller and scene
|
||||
MainController.ResetStatus(False)
|
||||
' Before saving
|
||||
OnSavingProject(Me, sCurrFile)
|
||||
' Project saving
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
EgtEnableCommandLogger()
|
||||
Dim bOk As Boolean = EgtSaveFile(sCurrFile, nType)
|
||||
EgtDisableCommandLogger()
|
||||
' Update
|
||||
UpdateUI(Me, False)
|
||||
Cursor.Current = Cursors.Default
|
||||
' Result handling
|
||||
If EgtGetFileType(sCurrFile) <> FT.LUA Then Map.refSceneHostVM.OnSavedProject(Me, sCurrFile, bOk)
|
||||
Return bOk
|
||||
End If
|
||||
End Function
|
||||
|
||||
Friend Sub StatusUnitsCommand()
|
||||
OptionModule.m_bMmUnits = Not OptionModule.m_bMmUnits
|
||||
Map.refGridPanelVM.UpdateStatusUnits(OptionModule.m_bMmUnits)
|
||||
@@ -565,7 +589,6 @@ Public Class MySceneHostVM
|
||||
Map.refOptionWindowVM.UpdateAllMessages()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
OnMouseOver(sender, e, m_SelType)
|
||||
' Se drag non abilitato o già in esecuzione, esco
|
||||
@@ -942,13 +965,14 @@ Line1:
|
||||
Continue While
|
||||
End If
|
||||
|
||||
If Map.refSceneButtonVM.IsTgBtnChecked(EGT_PANEL) Then
|
||||
If Map.refSceneButtonVM.IsTgBtnChecked(EGT_ADD_PANEL) Then
|
||||
Dim sPanelType = DirectCast(Map.refSceneButtonVM.m_NewPanelUC.DataContext, NewPanelVM).GetPanelType()
|
||||
If sPanelType = "Alzatina" Or sPanelType = "Frontalino" Or sPanelType = "Tappa Buca" Then
|
||||
If sPanelType = EGT_SPLASHTOP Or sPanelType = EGT_WATERFALL Or sPanelType = EGT_SINK Or sPanelType = EGT_SINK_SPLITBOTTOM Then
|
||||
If EgtGetType(nId) = GDB_TY.CRV_LINE Then
|
||||
Dim sLayName As String = String.Empty
|
||||
EgtGetName(EgtGetParent(nId), sLayName)
|
||||
If sPanelType = "Alzatina" Or sPanelType = "Frontalino" Or (sPanelType = "Tappa Buca" And sLayName = "InLoop") Then
|
||||
If sPanelType = EGT_SPLASHTOP Or sPanelType = EGT_WATERFALL Or
|
||||
((sPanelType = EGT_SINK Or sPanelType = EGT_SINK_SPLITBOTTOM) And sLayName = "InLoop") Then
|
||||
Dim sEdgeName As String = String.Empty
|
||||
EgtGetName(nId, sEdgeName)
|
||||
If sEdgeName.Length > 0 Then
|
||||
@@ -960,7 +984,7 @@ Line1:
|
||||
End If
|
||||
End If
|
||||
|
||||
ElseIf sPanelType = "SplitBottom" Then
|
||||
ElseIf sPanelType = EGT_SPLITBOTTOM Or sPanelType = EGT_BOTTOM Then
|
||||
Dim nPanelPart As Integer = nPartId
|
||||
If sName = "SOLID" Then
|
||||
EgtGetInfo(nPartId, "Parent", nPanelPart)
|
||||
@@ -983,6 +1007,57 @@ Line1:
|
||||
Continue While
|
||||
End If
|
||||
|
||||
If Map.refSceneButtonVM.IsTgBtnChecked(EGT_EDIT_PANEL) Then
|
||||
Dim PartSolidSel As PartSolidM = SolidManagerM.GetPartSolid(nPartId)
|
||||
DirectCast(Map.refSceneButtonVM.m_EditPanelUC.DataContext, EditPanelVM).nIdPart = PartSolidSel.PartId
|
||||
End If
|
||||
|
||||
If Map.refSceneButtonVM.IsTgBtnChecked(EGT_EDIT_PARAMETRIC) Then
|
||||
If EgtGetType(nId) = GDB_TY.CRV_LINE Or EgtGetType(nId) = GDB_TY.CRV_COMPO Or EgtGetType(nId) = GDB_TY.CRV_ARC Then
|
||||
Dim refEditParametricVM As EditParametricVM = DirectCast(Map.refSceneButtonVM.m_EditParametricUC.DataContext, EditParametricVM)
|
||||
' recupero la sottocurva e il punto selezionato sulla curva
|
||||
Dim nSubCurve As Integer = GDB_ID.NULL
|
||||
Dim ptSelected As New Point3d
|
||||
EgtGetPointFromSelect(nId, e.Location, ptSelected, nSubCurve)
|
||||
Dim ptOnCurve As New Point3d
|
||||
EgtNearPoint(nId, ptSelected, ptOnCurve)
|
||||
Dim ptStart As New Point3d
|
||||
Dim ptEnd As New Point3d
|
||||
EgtAtParamPoint(nId, nSubCurve, GDB_RT.GLOB, ptStart)
|
||||
EgtAtParamPoint(nId, nSubCurve + 1, GDB_RT.GLOB, ptEnd)
|
||||
Dim dU As Double = 0
|
||||
If Point3d.Dist(ptStart, ptOnCurve) <= Point3d.Dist(ptEnd, ptOnCurve) Then
|
||||
ptOnCurve = ptStart
|
||||
dU = nSubCurve
|
||||
Else
|
||||
ptOnCurve = ptEnd
|
||||
dU = nSubCurve + 1
|
||||
End If
|
||||
' al primo passaggio seleziono un punto della prima linea
|
||||
If refEditParametricVM.nId1 = GDB_ID.NULL Or refEditParametricVM.nId1 = nId Then
|
||||
' salvo l'id della linea
|
||||
refEditParametricVM.nId1 = nId
|
||||
refEditParametricVM.dUFirst = dU
|
||||
refEditParametricVM.FirstPoint = ptOnCurve
|
||||
refEditParametricVM.nSubCrv1 = nSubCurve
|
||||
refEditParametricVM.ShowFirstCurrPoint()
|
||||
' al secondo passaggio selezion il punto sulla seconda linea
|
||||
ElseIf refEditParametricVM.nId2 = GDB_ID.NULL Or refEditParametricVM.nId2 = nId Then
|
||||
' salvo l'id della linea
|
||||
refEditParametricVM.nId2 = nId
|
||||
refEditParametricVM.dUSecond = dU
|
||||
refEditParametricVM.SecondPoint = ptOnCurve
|
||||
refEditParametricVM.nSubCrv2 = nSubCurve
|
||||
refEditParametricVM.ShowSecondCurrPoint()
|
||||
End If
|
||||
ElseIf EgtGetType(nId) = GDB_TY.EXT_DIMENSION Then
|
||||
' Modifico la lunghezza del segemnto
|
||||
End If
|
||||
' passo al prossimo id
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
Continue While
|
||||
End If
|
||||
|
||||
' selezione semplice
|
||||
If EgtIsPart(nPartId) Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
@@ -1090,7 +1165,11 @@ Line1:
|
||||
' WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
' WARNING WARNING WARNING WARNING WARNING WARNING ' questo controllo è stato tolto per poter selezionare gli oggetti importati nel vme e quindi non presenti nel nesting
|
||||
'If bSelected Then
|
||||
PartSolidIdToSel.SelectPart()
|
||||
If Map.refSceneButtonVM.IsTgBtnChecked(EGT_EDIT_PANEL) Then
|
||||
DirectCast(Map.refSceneButtonVM.m_EditPanelUC.DataContext, EditPanelVM).SelectPartOrPartsToEdit()
|
||||
Else
|
||||
PartSolidIdToSel.SelectPart()
|
||||
End If
|
||||
'End If
|
||||
' Se deselezione da eseguire
|
||||
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
Style="{StaticResource SceneUserControl_TxBl}"/>
|
||||
<ComboBox ItemsSource="{Binding ParamCmBxList}"
|
||||
SelectedItem="{Binding SelParamCmBx}"
|
||||
SelectedIndex="{Binding IndexSelParamCmBx}"
|
||||
DisplayMemberPath="Name"
|
||||
IsEnabled="{Binding IsEnabled}"/>
|
||||
</UniformGrid>
|
||||
|
||||
@@ -104,6 +104,12 @@ Public Class SceneUserControlVM
|
||||
m_Color_Timer.Start()
|
||||
End Sub
|
||||
|
||||
Public Sub LoadEditParametric()
|
||||
If IsNothing(Map.refSceneButtonVM.m_EditParametricUC) Then Map.refSceneButtonVM.m_EditParametricUC = New SceneUserControlV
|
||||
Map.refSceneButtonVM.m_EditParametricUC.DataContext = New EditParametricVM()
|
||||
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_EditParametricUC)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "EVENTS"
|
||||
@@ -174,6 +180,8 @@ Public Class SceneUserControlVM
|
||||
|
||||
End Class
|
||||
|
||||
' ------------------------------ _GENERICPARAM ------------------------------
|
||||
|
||||
Public Class GenericParam
|
||||
Inherits VMBase
|
||||
|
||||
@@ -245,6 +253,8 @@ Public Class GenericParam
|
||||
|
||||
End Class
|
||||
|
||||
' ------------------------------ _TEXTBOX ------------------------------
|
||||
|
||||
Public Class _TextBoxParam
|
||||
Inherits GenericParam
|
||||
|
||||
@@ -287,6 +297,8 @@ Public Class _TextBoxParam
|
||||
|
||||
End Class
|
||||
|
||||
' ------------------------------ _TEXTBLOCK ------------------------------
|
||||
|
||||
Public Class _TextBlockParam
|
||||
Inherits GenericParam
|
||||
|
||||
@@ -327,6 +339,8 @@ Public Class _TextBlockParam
|
||||
|
||||
End Class
|
||||
|
||||
' ------------------------------ _COMBOBOX ------------------------------
|
||||
|
||||
Public Class _ComboBoxParam
|
||||
Inherits GenericParam
|
||||
|
||||
@@ -354,6 +368,18 @@ Public Class _ComboBoxParam
|
||||
m_SelParamCmBx = value
|
||||
RaiseEvent SelectionChanged(Me, m_SelParamCmBx)
|
||||
NotifyPropertyChanged(NameOf(SelParamCmBx))
|
||||
IndexSelParamCmBx = ParamCmBxList.FindIndex(Function(x As ParamCmBx) x.Name = m_SelParamCmBx.Name)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_IndexSelParamCmBx As Integer = 0
|
||||
Public Property IndexSelParamCmBx As Integer
|
||||
Get
|
||||
Return m_IndexSelParamCmBx
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_IndexSelParamCmBx = value
|
||||
NotifyPropertyChanged(NameOf(IndexSelParamCmBx))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -398,6 +424,8 @@ Public Class ParamCmBx
|
||||
|
||||
End Class
|
||||
|
||||
' ------------------------------ _CHECKBOX ------------------------------
|
||||
|
||||
Public Class _CheckBoxParam
|
||||
Inherits GenericParam
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<EgtWPFLib5:EgtMainWindow x:Class="ScriptWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
|
||||
Title="{Binding Title}"
|
||||
Icon="/Resources/EgalwareLogo.ico"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
PreviewKeyDown="EgtMainWindow_PreviewKeyDown"
|
||||
xmlns:AVALON="http://icsharpcode.net/sharpdevelop/avalonedit"
|
||||
xmlns:EgtSTONE3D="clr-namespace:EgtStone3D"
|
||||
Style="{StaticResource ScriptWindowV_Window}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox Text="{Binding sNameFile}"
|
||||
Style="{StaticResource Script_TxBx}"/>
|
||||
<Border Grid.Row="1"
|
||||
Style="{StaticResource ScriptWindow_Border}">
|
||||
<WrapPanel Style="{StaticResource WrapScript_WrapPanel}">
|
||||
<ComboBox ItemsSource="{Binding FontFamilyList}"
|
||||
SelectedItem="{Binding SelFontFamily}"
|
||||
Style="{StaticResource ScriptWindow_CmBx}"/>
|
||||
<ComboBox ItemsSource="{Binding FontSizeList}"
|
||||
SelectedItem="{Binding SelFontSize}"
|
||||
Style="{StaticResource ScriptWindow_CmBx}"/>
|
||||
|
||||
<Separator Style="{StaticResource Script_Separator}"/>
|
||||
|
||||
<Button Content="C"
|
||||
Command="{Binding TextColorCmd}"
|
||||
Style="{StaticResource Script_InputButton}"/>
|
||||
|
||||
<Separator Style="{StaticResource Script_Separator}"/>
|
||||
|
||||
<ToggleButton Content="B"
|
||||
Command="{Binding BoldCmd}"
|
||||
IsChecked="{Binding BoldIsChecked}"
|
||||
Style="{StaticResource General_ToogleButton}"/>
|
||||
<ToggleButton Content="IT"
|
||||
Command="{Binding ItalicCmd}"
|
||||
IsChecked="{Binding ItalicIsChecked}"
|
||||
Style="{StaticResource General_ToogleButton}"/>
|
||||
<ToggleButton Content="U"
|
||||
Command="{Binding UnderlineCmd}"
|
||||
IsChecked="{Binding UnderlineChecked}"
|
||||
Style="{StaticResource General_ToogleButton}"/>
|
||||
|
||||
<Separator Style="{StaticResource Script_Separator}"/>
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
<AVALON:TextEditor Grid.Row="2"
|
||||
Name="LuaEditor"
|
||||
TextChanged="LuaEditor_TextChanged"
|
||||
EgtSTONE3D:TextEditorHelper.Text="{Binding sScriptText}"
|
||||
Style="{StaticResource ScriptTextEditor}"/>
|
||||
<Grid Grid.Row="3"
|
||||
Style="{StaticResource SceneUserControl_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="Conferma"
|
||||
IsDefault="True"
|
||||
Content="{Binding Conferma_Msg}"
|
||||
Command="{Binding ConfermaCmd}"
|
||||
Style="{StaticResource Ok_Btn}"/>
|
||||
<Button Grid.Column="1"
|
||||
Name="Preview"
|
||||
Content="{Binding Salva_Msg}"
|
||||
Command="{Binding SalvaCmd}"
|
||||
Style="{StaticResource Preview_Btn}"/>
|
||||
<Button Grid.Column="2"
|
||||
Name="Annulla"
|
||||
IsCancel="True"
|
||||
Content="{Binding Annulla_Msg}"
|
||||
Command="{Binding AnnullaCmd}"
|
||||
Style="{StaticResource Cancel_Btn}"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtMainWindow>
|
||||
@@ -0,0 +1,100 @@
|
||||
Imports ICSharpCode.AvalonEdit
|
||||
|
||||
Public Class ScriptWindowV
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
Map.SetRefScriptWindowV(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub EgtMainWindow_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.Key = Key.Escape Then
|
||||
Annulla.IsCancel = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LuaEditor_TextChanged(sender As Object, e As EventArgs)
|
||||
Map.refScriptWindowVM.SetColorScriptText()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
End Class
|
||||
|
||||
Public Class TextEditorHelper
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Registra la proprietà di dipendenza
|
||||
Public Shared ReadOnly TextProperty As DependencyProperty = DependencyProperty.RegisterAttached(
|
||||
"Text",
|
||||
GetType(String),
|
||||
GetType(TextEditorHelper),
|
||||
New FrameworkPropertyMetadata(Nothing, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, AddressOf OnTextChanged)
|
||||
)
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
' Getter per la proprietà
|
||||
Public Shared Function GetText(editor As TextEditor) As String
|
||||
Return CType(editor.GetValue(TextProperty), String)
|
||||
End Function
|
||||
|
||||
' Setter per la proprietà
|
||||
Public Shared Sub SetText(editor As TextEditor, value As String)
|
||||
editor.SetValue(TextProperty, value)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
' Callback per quando cambia la proprietà
|
||||
Private Shared Sub OnTextChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
|
||||
Dim editor = TryCast(d, TextEditor)
|
||||
If editor IsNot Nothing Then
|
||||
' Rimuovi temporaneamente l'evento TextChanged
|
||||
RemoveHandler editor.TextChanged, AddressOf EditorTextChanged
|
||||
|
||||
' Usa editor.Document per modificare il testo in modo sicuro
|
||||
editor.BeginChange()
|
||||
Try
|
||||
Dim newText As String = If(e.NewValue, String.Empty).ToString()
|
||||
If editor.Document.Text <> newText Then
|
||||
editor.Document.Text = newText
|
||||
End If
|
||||
Finally
|
||||
editor.EndChange() ' Conclude l'operazione di modifica
|
||||
End Try
|
||||
|
||||
' Riattacca l'evento TextChanged
|
||||
AddHandler editor.TextChanged, AddressOf EditorTextChanged
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Evento per aggiornare la proprietà di dipendenza quando il testo cambia
|
||||
Private Shared Sub EditorTextChanged(sender As Object, e As EventArgs)
|
||||
Dim editor = TryCast(sender, TextEditor)
|
||||
If editor IsNot Nothing Then
|
||||
Dim currentText = GetText(editor)
|
||||
If editor.Document.Text <> currentText Then
|
||||
SetText(editor, editor.Document.Text)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,801 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports ICSharpCode.AvalonEdit.Document
|
||||
Imports ICSharpCode.AvalonEdit.Rendering
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Public Class ScriptWindowVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELD & PROPERTIES"
|
||||
|
||||
Private m_sNameFile As String = String.Empty
|
||||
Public Property sNameFile As String
|
||||
Get
|
||||
Return m_sNameFile
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sNameFile = value
|
||||
NotifyPropertyChanged(NameOf(sNameFile))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sScriptText As String = String.Empty
|
||||
Public Property sScriptText As String
|
||||
Get
|
||||
Return m_sScriptText
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sScriptText = value
|
||||
NotifyPropertyChanged(NameOf(sScriptText))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nFontSizeList As New List(Of Integer)
|
||||
Public Property FontSizeList As List(Of Integer)
|
||||
Get
|
||||
Return m_nFontSizeList
|
||||
End Get
|
||||
Set(value As List(Of Integer))
|
||||
m_nFontSizeList = value
|
||||
NotifyPropertyChanged(NameOf(FontSizeList))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nSelFontSize As Integer
|
||||
Public Property SelFontSize As Integer
|
||||
Get
|
||||
Return m_nSelFontSize
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nSelFontSize = value
|
||||
If Not IsNothing(m_nSelFontSize) Then ChangeFontSize(m_nSelFontSize)
|
||||
NotifyPropertyChanged(NameOf(SelFontSize))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetSelFontSize(value As Integer)
|
||||
m_nSelFontSize = value
|
||||
NotifyPropertyChanged(NameOf(SelFontSize))
|
||||
End Sub
|
||||
|
||||
Private m_sFontFamilyList As New List(Of FontFamily)
|
||||
Public Property FontFamilyList As List(Of FontFamily)
|
||||
Get
|
||||
Return m_sFontFamilyList
|
||||
End Get
|
||||
Set(value As List(Of FontFamily))
|
||||
m_sFontFamilyList = value
|
||||
NotifyPropertyChanged(NameOf(FontFamilyList))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sSelFontFamily As FontFamily
|
||||
Public Property SelFontFamily As FontFamily
|
||||
Get
|
||||
Return m_sSelFontFamily
|
||||
End Get
|
||||
Set(value As FontFamily)
|
||||
m_sSelFontFamily = value
|
||||
If Not IsNothing(m_sSelFontFamily) Then ChangeFontFamily(m_sSelFontFamily)
|
||||
NotifyPropertyChanged(NameOf(SelFontFamily))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetSelFontFamily(value As FontFamily)
|
||||
m_sSelFontFamily = value
|
||||
NotifyPropertyChanged(NameOf(SelFontFamily))
|
||||
End Sub
|
||||
|
||||
Private m_bBoldIsChecked As Boolean = False
|
||||
Public Property BoldIsChecked As Boolean
|
||||
Get
|
||||
Return m_bBoldIsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bBoldIsChecked = value
|
||||
NotifyPropertyChanged(NameOf(BoldIsChecked))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bItalicIsChecked As Boolean = False
|
||||
Public Property ItalicIsChecked As Boolean
|
||||
Get
|
||||
Return m_bItalicIsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bItalicIsChecked = value
|
||||
NotifyPropertyChanged(NameOf(ItalicIsChecked))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bUnderlineChecked As Boolean = False
|
||||
Public Property UnderlineChecked As Boolean
|
||||
Get
|
||||
Return m_bUnderlineChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bUnderlineChecked = value
|
||||
NotifyPropertyChanged(NameOf(UnderlineChecked))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Title As String
|
||||
Get
|
||||
Return EgtMsg(110076) ' Script File
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Conferma_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110075) ' Esegui
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Salva_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110013) ' Salva
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Annulla_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110004) ' Annulla
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione Comandi
|
||||
Private m_ConfermaCmd As ICommand
|
||||
Private m_cmdSaveAs As ICommand
|
||||
Private m_cmdAnnulla As ICommand
|
||||
Private m_cmdTextColor As ICommand
|
||||
Private m_cmdBold As ICommand
|
||||
Private m_cmdItalic As ICommand
|
||||
Private m_cmdUnderline As ICommand
|
||||
Private m_cmdAllign As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
Map.SetRefScriptWindowVM(Me)
|
||||
|
||||
If m_nFontSizeList.Count <= 0 Then CreateFontSizeList()
|
||||
|
||||
If m_sFontFamilyList.Count <= 0 Then CreateFontFamilyList()
|
||||
|
||||
SetToolbar()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Function SaveProject() As Boolean
|
||||
' Determina il nome del file di default
|
||||
Dim sFile As String = If(String.IsNullOrWhiteSpace(m_sNameFile), "New.lua", $"{m_sNameFile}.lua")
|
||||
sFile = IO.Path.ChangeExtension(sFile, "lua")
|
||||
|
||||
' Assegnazione nome file con dialogo
|
||||
Dim SaveFileDialog As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
.Title = EgtMsg(110013), ' Salva
|
||||
.Filter = "lua files (*.lua)|*.lua",
|
||||
.FileName = sFile,
|
||||
.FilterIndex = 1,
|
||||
.InitialDirectory = Map.refMainWindowVM.MainWindowM.sTempDir,
|
||||
.ValidateNames = False,
|
||||
.OverwritePrompt = True,
|
||||
.Mode = 1
|
||||
}
|
||||
' Mostra la finestra di dialogo e ottieni il percorso del file selezionato
|
||||
Dim sFileName As String = String.Empty
|
||||
If SaveFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
Dim fileExtension = IO.Path.GetExtension(SaveFileDialog.SafeFileName)
|
||||
sFileName = IO.Path.Combine(SaveFileDialog.InitialDirectory,
|
||||
SaveFileDialog.SafeFileName & If(String.IsNullOrEmpty(fileExtension),
|
||||
SaveFileDialog.SelFilter.sExstension.Trim("*"c), String.Empty))
|
||||
End If
|
||||
|
||||
' Verifica se il nome del file è stato selezionato
|
||||
If String.IsNullOrWhiteSpace(sFileName) Then Return False
|
||||
' Salva il progetto e scrive lo script Lua
|
||||
Dim bOk = Map.refSceneHostVM.SaveProj(sFileName)
|
||||
WriteTextScriptLua(sFileName)
|
||||
' Imposta lo stato della scena
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Sub WriteTextScriptLua(sFileName As String)
|
||||
If String.IsNullOrWhiteSpace(sFileName) Then Return ' Validazione input
|
||||
File.WriteAllText(sFileName, m_sScriptText, Encoding.UTF8) ' Salva il file con codifica UTF-8
|
||||
End Sub
|
||||
|
||||
Private Sub SaveScript(sPathFileScript As String, sScriptText As String)
|
||||
If String.IsNullOrWhiteSpace(sPathFileScript) OrElse String.IsNullOrWhiteSpace(sScriptText) Then Return ' Validazione input
|
||||
Map.refSceneHostVM.SaveProj(sPathFileScript) ' Salva il progetto nel percorso specificato
|
||||
File.WriteAllText(sPathFileScript, sScriptText, Encoding.UTF8) ' Salva il contenuto con codifica UTF-8
|
||||
End Sub
|
||||
|
||||
Public Sub SetColorScriptText()
|
||||
Map.refScriptWindowV.LuaEditor.TextArea.TextView.LineTransformers.Add(New LuaRegexColorizer())
|
||||
End Sub
|
||||
|
||||
Private Sub CreateFontSizeList()
|
||||
' Aggiunge solo font-size pari alla lista, con un semplice iteratore
|
||||
m_nFontSizeList.AddRange(Enumerable.Range(8, 13).Where(Function(size) size Mod 2 = 0))
|
||||
End Sub
|
||||
|
||||
Private Sub CreateFontFamilyList()
|
||||
' Aggiunge direttamente tutte le famiglie di font alla lista
|
||||
m_sFontFamilyList.AddRange(Fonts.SystemFontFamilies)
|
||||
End Sub
|
||||
|
||||
Private Sub ApplyTextStyle(editor As ICSharpCode.AvalonEdit.TextEditor, colorizer As Object)
|
||||
Dim selectionStart As Integer = editor.SelectionStart
|
||||
Dim selectionLength As Integer = editor.SelectionLength
|
||||
|
||||
' Controlla se c'è una selezione valida
|
||||
If selectionLength > 0 Then
|
||||
' Aggiungi il colorizer specifico per applicare lo stile
|
||||
editor.TextArea.TextView.LineTransformers.Add(colorizer)
|
||||
' Ridisegna il controllo per applicare le modifiche
|
||||
editor.TextArea.TextView.Redraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeFontSize(nSelFontSize As Integer)
|
||||
' Passa un FontSizeColorizer al metodo ausiliario
|
||||
Dim editor = Map.refScriptWindowV.LuaEditor
|
||||
ApplyTextStyle(editor, New FontSizeColorizer(editor.SelectionStart, editor.SelectionLength, nSelFontSize))
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeFontFamily(sSelFontFamily As FontFamily)
|
||||
' Passa un FontFamilyColorizer al metodo ausiliario
|
||||
Dim editor = Map.refScriptWindowV.LuaEditor
|
||||
ApplyTextStyle(editor, New FontFamilyColorizer(editor.SelectionStart, editor.SelectionLength, sSelFontFamily))
|
||||
End Sub
|
||||
|
||||
Friend Sub SetToolbar()
|
||||
' Recupera font e dimensione
|
||||
SetSelFontFamily(Map.refScriptWindowV.LuaEditor.FontFamily)
|
||||
SetSelFontSize(Map.refScriptWindowV.LuaEditor.FontSize)
|
||||
End Sub
|
||||
|
||||
Private Sub ApplyTextEffect(editor As ICSharpCode.AvalonEdit.TextEditor, colorizer As Object)
|
||||
Dim selectionStart As Integer = editor.SelectionStart
|
||||
Dim selectionLength As Integer = editor.SelectionLength
|
||||
|
||||
' Verifica che ci sia una selezione valida
|
||||
If selectionLength > 0 Then
|
||||
' Aggiungi il colorizer specifico per applicare l'effetto
|
||||
editor.TextArea.TextView.LineTransformers.Add(colorizer)
|
||||
' Ridisegna il controllo per applicare le modifiche
|
||||
editor.TextArea.TextView.Redraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ApplyBoldToSelection(editor As ICSharpCode.AvalonEdit.TextEditor)
|
||||
ApplyTextEffect(editor, New BoldColorizer(editor.SelectionStart, editor.SelectionLength))
|
||||
End Sub
|
||||
|
||||
Private Sub ApplyItalicToSelection(editor As ICSharpCode.AvalonEdit.TextEditor)
|
||||
ApplyTextEffect(editor, New ItalicColorizer(editor.SelectionStart, editor.SelectionLength))
|
||||
End Sub
|
||||
|
||||
Private Sub ApplyUnderlineToSelection(editor As ICSharpCode.AvalonEdit.TextEditor)
|
||||
ApplyTextEffect(editor, New UnderlineColorizer(editor.SelectionStart, editor.SelectionLength))
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ConfermCmd"
|
||||
|
||||
Public ReadOnly Property ConfermaCmd As ICommand
|
||||
Get
|
||||
If m_ConfermaCmd Is Nothing Then
|
||||
m_ConfermaCmd = New Command(AddressOf Conferma)
|
||||
End If
|
||||
Return m_ConfermaCmd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Conferma()
|
||||
' Genera il percorso del file script
|
||||
Dim scriptFilePath As String = IO.Path.Combine(Map.refMainWindowVM.MainWindowM.sTempDir, $"{m_sNameFile}.lua")
|
||||
' Salva il file script
|
||||
SaveScript(scriptFilePath, m_sScriptText)
|
||||
' Esegue il file script
|
||||
EgtLuaExecFile(scriptFilePath)
|
||||
' Imposta lo stato della gestione mouse diretto della scena a "nessuno"
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
#End Region ' ConfermaCmd
|
||||
|
||||
#Region "SaveAsCommand"
|
||||
|
||||
Public ReadOnly Property SalvaCmd As ICommand
|
||||
Get
|
||||
If m_cmdSaveAs Is Nothing Then
|
||||
m_cmdSaveAs = New Command(AddressOf SaveAs)
|
||||
End If
|
||||
Return m_cmdSaveAs
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub SaveAs()
|
||||
SaveProject()
|
||||
End Sub
|
||||
|
||||
#End Region ' SaveAsCommand
|
||||
|
||||
#Region "AnnullaCmd"
|
||||
|
||||
Public ReadOnly Property AnnullaCmd As ICommand
|
||||
Get
|
||||
If m_cmdAnnulla Is Nothing Then
|
||||
m_cmdAnnulla = New Command(AddressOf Annulla)
|
||||
End If
|
||||
Return m_cmdAnnulla
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Annulla()
|
||||
Map.refScriptWindowV.Close()
|
||||
Map.refTopPanelVM.SetIsEnableScriptBtn(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' AnnullaCmd
|
||||
|
||||
#Region "TextColorCmd"
|
||||
|
||||
Public ReadOnly Property TextColorCmd As ICommand
|
||||
Get
|
||||
If m_cmdTextColor Is Nothing Then
|
||||
m_cmdTextColor = New Command(AddressOf TextColor)
|
||||
End If
|
||||
Return m_cmdTextColor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub TextColor()
|
||||
' Recupero colori custom
|
||||
Dim defaultColor As New Color3d(10, 122, 150)
|
||||
Dim sCustomColors As String = String.Empty
|
||||
GetMainPrivateProfileString(S_COLORS, K_CUSTOMCOLORS, "", sCustomColors)
|
||||
|
||||
' Parsing dei colori custom in una lista di interi
|
||||
Dim nCustomColors = sCustomColors.Split(","c).
|
||||
Select(Function(color)
|
||||
Dim nColor As Integer
|
||||
Return If(Integer.TryParse(color, nColor), nColor, Nothing)
|
||||
End Function).
|
||||
Where(Function(nColor) nColor > 0).Cast(Of Integer)().ToList()
|
||||
|
||||
' Configurazione dialogo colori
|
||||
Dim colorDialog As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
|
||||
.CustomColors = nCustomColors.ToArray(),
|
||||
.Color = defaultColor.ToColor()
|
||||
}
|
||||
|
||||
' Visualizzo il dialogo e gestisco l'output
|
||||
If colorDialog.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return
|
||||
|
||||
' Conversione colore selezionato
|
||||
Dim selectedColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(
|
||||
CByte(colorDialog.Color.R),
|
||||
CByte(colorDialog.Color.G),
|
||||
CByte(colorDialog.Color.B)
|
||||
)
|
||||
|
||||
' Applicazione del colore al testo selezionato
|
||||
Dim selectedText As String = Map.refScriptWindowV.LuaEditor.SelectedText
|
||||
Dim selectionStart As Integer = Map.refScriptWindowV.LuaEditor.SelectionStart
|
||||
Dim selectionLength As Integer = Map.refScriptWindowV.LuaEditor.SelectionLength
|
||||
|
||||
' Controlla se c'è una selezione valida
|
||||
If selectionLength > 0 Then
|
||||
' Colore di evidenziazione, ad esempio giallo
|
||||
Dim highlightColor As Color = Colors.Yellow
|
||||
' Aggiungi il colorizer per evidenziare la selezione
|
||||
Map.refScriptWindowV.LuaEditor.TextArea.TextView.LineTransformers.Add(New SelectionColorizer(selectionStart, selectionLength, selectedColor))
|
||||
' Ridisegna il controllo per applicare le modifiche
|
||||
Map.refScriptWindowV.LuaEditor.TextArea.TextView.Redraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' TextColorCmd
|
||||
|
||||
#Region "BoldCmd"
|
||||
|
||||
Public ReadOnly Property BoldCmd As ICommand
|
||||
Get
|
||||
If m_cmdBold Is Nothing Then
|
||||
m_cmdBold = New Command(AddressOf ApplyBold)
|
||||
End If
|
||||
Return m_cmdBold
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ApplyBold()
|
||||
ApplyBoldToSelection(Map.refScriptWindowV.LuaEditor)
|
||||
End Sub
|
||||
|
||||
#End Region ' BoldCmd
|
||||
|
||||
#Region "ItalicCmd"
|
||||
|
||||
Public ReadOnly Property ItalicCmd As ICommand
|
||||
Get
|
||||
If m_cmdItalic Is Nothing Then
|
||||
m_cmdItalic = New Command(AddressOf ApplyItalic)
|
||||
End If
|
||||
Return m_cmdItalic
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ApplyItalic()
|
||||
ApplyItalicToSelection(Map.refScriptWindowV.LuaEditor)
|
||||
End Sub
|
||||
|
||||
#End Region ' ItalicCmd
|
||||
|
||||
#Region "UnderlineCmd"
|
||||
|
||||
Public ReadOnly Property UnderlineCmd As ICommand
|
||||
Get
|
||||
If m_cmdUnderline Is Nothing Then
|
||||
m_cmdUnderline = New Command(AddressOf ApplyUnderline)
|
||||
End If
|
||||
Return m_cmdUnderline
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ApplyUnderline()
|
||||
ApplyUnderlineToSelection(Map.refScriptWindowV.LuaEditor)
|
||||
End Sub
|
||||
|
||||
#End Region ' UnderlineCmd
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
' Classe per gestire la colorazione tramite Regex
|
||||
Public Class LuaRegexColorizer
|
||||
Inherits DocumentColorizingTransformer
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Dizionario con Regex Precompilate e Colori Associati
|
||||
Private patterns As New Dictionary(Of Regex, System.Windows.Media.Color) From {
|
||||
{RegexM.KeywordRegex, ColorScriptM.KeywordColor},
|
||||
{RegexM.ValueRegex, ColorScriptM.ValueColor},
|
||||
{RegexM.FunctionRegex, ColorScriptM.FunctionColor},
|
||||
{RegexM.InfoRegex, ColorScriptM.InfoColor},
|
||||
{RegexM.EgtRegex, ColorScriptM.EgtColor},
|
||||
{RegexM.BracketRegex, ColorScriptM.BracketColor},
|
||||
{RegexM.TextRegex, ColorScriptM.TextColor},
|
||||
{RegexM.NumberRegex, ColorScriptM.NumberColor},
|
||||
{RegexM.CommentRegex, ColorScriptM.CommentColor},
|
||||
{RegexM.PointRegex, ColorScriptM.FreeColor},
|
||||
{RegexM.TableRegex, ColorScriptM.EgtColor},
|
||||
{RegexM.EqualRegex, ColorScriptM.FreeColor}
|
||||
}
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub ColorizeLine(line As DocumentLine)
|
||||
' Applicare evidenziazione per ogni regex nel dizionario
|
||||
For Each kvp In patterns
|
||||
Dim regex As Regex = kvp.Key
|
||||
Dim color As Color = kvp.Value
|
||||
|
||||
' Evidenzia le corrispondenze
|
||||
Dim matches As MatchCollection = regex.Matches(CurrentContext.Document.GetText(line))
|
||||
For Each match As Match In matches
|
||||
ChangeLinePart(line.Offset + match.Index,
|
||||
line.Offset + match.Index + match.Length,
|
||||
Sub(visual As VisualLineElement)
|
||||
visual.TextRunProperties.SetForegroundBrush(New SolidColorBrush(color))
|
||||
End Sub)
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
' Classe per gestire la colorazione quando viene selezionata una parola
|
||||
Public Class SelectionColorizer
|
||||
Inherits DocumentColorizingTransformer
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly StartOffset As Integer
|
||||
Private ReadOnly Length As Integer
|
||||
Private ReadOnly HighlightBrush As Brush
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New(startOffset As Integer, length As Integer, color As Color)
|
||||
Me.StartOffset = startOffset
|
||||
Me.Length = length
|
||||
Me.HighlightBrush = New SolidColorBrush(color)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub ColorizeLine(line As DocumentLine)
|
||||
Dim lineStart As Integer = line.Offset
|
||||
Dim lineEnd As Integer = lineStart + line.Length
|
||||
|
||||
' Se la selezione non riguarda questa linea, termina
|
||||
If StartOffset >= lineEnd OrElse (StartOffset + Length) <= lineStart Then Return
|
||||
|
||||
' Calcola l'inizio e la fine dell'area da colorare
|
||||
Dim start As Integer = Math.Max(StartOffset, lineStart)
|
||||
Dim [end] As Integer = Math.Min(StartOffset + Length, lineEnd)
|
||||
|
||||
' Applica lo stile
|
||||
ChangeLinePart(start, [end], Sub(visualLineElement As VisualLineElement)
|
||||
visualLineElement.TextRunProperties.SetForegroundBrush(HighlightBrush)
|
||||
End Sub)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
' Classe per gestire la dimensione di una parola selezionata
|
||||
Public Class FontSizeColorizer
|
||||
Inherits DocumentColorizingTransformer
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly StartOffset As Integer
|
||||
Private ReadOnly Length As Integer
|
||||
Private ReadOnly FontSize As Double
|
||||
|
||||
#End Region ' Field & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New(startOffset As Integer, length As Integer, fontSize As Double)
|
||||
Me.StartOffset = startOffset
|
||||
Me.Length = length
|
||||
Me.FontSize = fontSize
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub ColorizeLine(line As DocumentLine)
|
||||
Dim lineStart As Integer = line.Offset
|
||||
Dim lineEnd As Integer = lineStart + line.Length
|
||||
|
||||
' Se la selezione non riguarda questa linea, termina
|
||||
If StartOffset >= lineEnd OrElse (StartOffset + Length) <= lineStart Then Return
|
||||
|
||||
' Calcola l'inizio e la fine dell'area da modificare
|
||||
Dim start As Integer = Math.Max(StartOffset, lineStart)
|
||||
Dim [end] As Integer = Math.Min(StartOffset + Length, lineEnd)
|
||||
|
||||
' Applica la dimensione del font
|
||||
ChangeLinePart(start, [end], Sub(visualLineElement As VisualLineElement)
|
||||
visualLineElement.TextRunProperties.SetFontRenderingEmSize(FontSize)
|
||||
End Sub)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
' Classe per gestire la famiglia dei caratteri di una parola selezionata
|
||||
Public Class FontFamilyColorizer
|
||||
Inherits DocumentColorizingTransformer
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly StartOffset As Integer
|
||||
Private ReadOnly Length As Integer
|
||||
Private ReadOnly FontFamily As FontFamily
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New(startOffset As Integer, length As Integer, fontFamily As FontFamily)
|
||||
Me.StartOffset = startOffset
|
||||
Me.Length = length
|
||||
Me.FontFamily = fontFamily
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub ColorizeLine(line As DocumentLine)
|
||||
Dim lineStart As Integer = line.Offset
|
||||
Dim lineEnd As Integer = lineStart + line.Length
|
||||
|
||||
' Se la selezione non riguarda questa linea, esci
|
||||
If StartOffset >= lineEnd OrElse (StartOffset + Length) <= lineStart Then Return
|
||||
|
||||
' Calcola i limiti della parte di testo da modificare
|
||||
Dim start As Integer = Math.Max(StartOffset, lineStart)
|
||||
Dim [end] As Integer = Math.Min(StartOffset + Length, lineEnd)
|
||||
|
||||
' Applica la nuova FontFamily
|
||||
ChangeLinePart(start, [end], Sub(visualLineElement As VisualLineElement)
|
||||
Dim properties = visualLineElement.TextRunProperties.Clone()
|
||||
Dim typeface = properties.Typeface
|
||||
visualLineElement.TextRunProperties.SetTypeface(New Typeface(FontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal))
|
||||
End Sub)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
' Classe per gestire il grassetto del testo
|
||||
Public Class BoldColorizer
|
||||
Inherits DocumentColorizingTransformer
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly StartOffset As Integer
|
||||
Private ReadOnly Length As Integer
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New(startOffset As Integer, length As Integer)
|
||||
Me.StartOffset = startOffset
|
||||
Me.Length = length
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub ColorizeLine(line As DocumentLine)
|
||||
Dim lineStart As Integer = line.Offset
|
||||
Dim lineEnd As Integer = lineStart + line.Length
|
||||
|
||||
' Se la selezione cade fuori dalla linea attuale, esci
|
||||
If StartOffset >= lineEnd OrElse (StartOffset + Length) <= lineStart Then Return
|
||||
|
||||
' Calcola l'inizio e la fine dell'area da colorare
|
||||
Dim start As Integer = Math.Max(StartOffset, lineStart)
|
||||
Dim [end] As Integer = Math.Min(StartOffset + Length, lineEnd)
|
||||
|
||||
' Applica il grassetto modificando il Typeface
|
||||
ChangeLinePart(start, [end], Sub(visualLineElement As VisualLineElement)
|
||||
Dim properties = visualLineElement.TextRunProperties.Clone()
|
||||
Dim typeface = properties.Typeface
|
||||
If Map.refScriptWindowVM.BoldIsChecked Then
|
||||
visualLineElement.TextRunProperties.SetTypeface(New Typeface(typeface.FontFamily, FontStyles.Normal, FontWeights.Bold, typeface.Stretch))
|
||||
Else
|
||||
visualLineElement.TextRunProperties.SetTypeface(New Typeface(typeface.FontFamily, FontStyles.Normal, FontWeights.Normal, typeface.Stretch))
|
||||
End If
|
||||
End Sub)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
' Classe per gestire il corsivo del testo
|
||||
Public Class ItalicColorizer
|
||||
Inherits DocumentColorizingTransformer
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly StartOffset As Integer
|
||||
Private ReadOnly Length As Integer
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New(startOffset As Integer, length As Integer)
|
||||
Me.StartOffset = startOffset
|
||||
Me.Length = length
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub ColorizeLine(line As DocumentLine)
|
||||
Dim lineStart As Integer = line.Offset
|
||||
Dim lineEnd As Integer = lineStart + line.Length
|
||||
|
||||
' Controlla se la selezione cade nella linea attuale
|
||||
If StartOffset >= lineEnd OrElse (StartOffset + Length) <= lineStart Then Return
|
||||
|
||||
' Calcola l'inizio e la fine dell'area da stilizzare
|
||||
Dim start As Integer = Math.Max(StartOffset, lineStart)
|
||||
Dim [end] As Integer = Math.Min(StartOffset + Length, lineEnd)
|
||||
|
||||
' Applica il corsivo
|
||||
ChangeLinePart(start, [end], Sub(visualLineElement As VisualLineElement)
|
||||
Dim properties = visualLineElement.TextRunProperties.Clone()
|
||||
Dim typeface = properties.Typeface
|
||||
If Map.refScriptWindowVM.ItalicIsChecked Then
|
||||
visualLineElement.TextRunProperties.SetTypeface(New Typeface(typeface.FontFamily, FontStyles.Italic, typeface.Weight, typeface.Stretch))
|
||||
Else
|
||||
visualLineElement.TextRunProperties.SetTypeface(New Typeface(typeface.FontFamily, FontStyles.Normal, typeface.Weight, typeface.Stretch))
|
||||
End If
|
||||
End Sub)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
' Classe per gestire il sottolineato del testo
|
||||
Public Class UnderlineColorizer
|
||||
Inherits DocumentColorizingTransformer
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly StartOffset As Integer
|
||||
Private ReadOnly Length As Integer
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New(startOffset As Integer, length As Integer)
|
||||
Me.StartOffset = startOffset
|
||||
Me.Length = length
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub ColorizeLine(line As DocumentLine)
|
||||
Dim lineStart As Integer = line.Offset
|
||||
Dim lineEnd As Integer = lineStart + line.Length
|
||||
|
||||
' Controlla se la selezione cade nella linea attuale
|
||||
If StartOffset >= lineEnd OrElse (StartOffset + Length) <= lineStart Then Return
|
||||
|
||||
' Calcola i limiti della parte di testo da sottolineare
|
||||
Dim start As Integer = Math.Max(StartOffset, lineStart)
|
||||
Dim [end] As Integer = Math.Min(StartOffset + Length, lineEnd)
|
||||
|
||||
' Applica la sottolineatura
|
||||
ChangeLinePart(start, [end], Sub(visualLineElement As VisualLineElement)
|
||||
' Aggiungi le decorazioni di sottolineatura
|
||||
If Map.refScriptWindowVM.UnderlineChecked Then
|
||||
visualLineElement.TextRunProperties.SetTextDecorations(TextDecorations.Underline)
|
||||
Else
|
||||
visualLineElement.TextRunProperties.SetTextDecorations(Nothing)
|
||||
End If
|
||||
End Sub)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -71,7 +71,7 @@ Public Class SecondaryWindowV
|
||||
Application.Current.MainWindow.InvalidateVisual()
|
||||
End If
|
||||
If Not IsNothing(Map.refSceneButtonV) Then
|
||||
Map.refSceneButtonV.Sizing()
|
||||
Map.refSceneButtonV.SceneButtonV_Sizing()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -144,6 +144,8 @@ Public Class SecondaryWindowVM
|
||||
ElseIf e.Key = Key.Delete Then
|
||||
SolidManagerM.Delete(Map.refSceneHostVM.m_nIdPart)
|
||||
Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL
|
||||
ElseIf e.Key = Key.Escape Then
|
||||
If Not IsNothing(Map.refScriptWindowVM) Then Map.refScriptWindowVM.Annulla()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
<ToggleButton Command="{Binding CmdBtn}"
|
||||
ToolTip="{Binding Name}"
|
||||
IsChecked="{Binding IsChecked}"
|
||||
Style="{DynamicResource SceneToggleButton}">
|
||||
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<Grid x:Class="TopPanelInfoParametricV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtStone3D="clr-namespace:EgtStone3D">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding TopPanelListBtn}"
|
||||
Style="{DynamicResource TopList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource TopPanelWnd_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button ToolTip="{Binding Name}"
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
Command="{Binding CmdBtn}"
|
||||
Style="{StaticResource SceneButton2}">
|
||||
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
|
||||
<EgtStone3D:SVGV FileSource="{Binding Img}" Height="50"/>
|
||||
<TextBlock Text="{Binding Name}"
|
||||
Style="{StaticResource TopPanel_TxBl}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
@@ -0,0 +1,24 @@
|
||||
Public Class TopPanelInfoParametricV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_SceneButtonVM As SceneButtonVM
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_SceneButtonVM = Map.refSceneButtonVM
|
||||
Me.DataContext = m_SceneButtonVM.InfoListBtn(SceneButtonVM.m_nIndexList_3)
|
||||
SceneButtonVM.m_nIndexList_3 += 1
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
End Class
|
||||
@@ -3,7 +3,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtStone3D="clr-namespace:EgtStone3D">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -11,7 +10,7 @@
|
||||
Style="{DynamicResource TopList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"/>
|
||||
<WrapPanel Style="{StaticResource TopPanel_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
@@ -19,8 +18,7 @@
|
||||
<Button ToolTip="{Binding Name}"
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
Command="{Binding CmdBtn}"
|
||||
Height="65" Width="65" BorderThickness="0">
|
||||
<!--<Image Source="{Binding Img}"/>-->
|
||||
Style="{StaticResource SceneButton2}">
|
||||
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
|
||||
<EgtStone3D:SVGV FileSource="{Binding Img}" Height="50"/>
|
||||
<TextBlock Text="{Binding Name}"
|
||||
@@ -30,10 +28,9 @@
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
<ToggleButton ToolTip="{Binding Name}"
|
||||
Command="{Binding CmdBtn}" Background="Transparent"
|
||||
IsChecked="{Binding IsChecked}" Margin="3,0,0,0"
|
||||
Height="65" Width="65" BorderThickness="0">
|
||||
<!--<Image Source="{Binding Img}"/>-->
|
||||
Command="{Binding CmdBtn}"
|
||||
IsChecked="{Binding IsChecked}"
|
||||
Style="{StaticResource SceneToggleButton2}">
|
||||
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
|
||||
<EgtStone3D:SVGV FileSource="{Binding Img}" Height="50"/>
|
||||
<TextBlock Text="{Binding Name}"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_SceneButtonVM = Map.refSceneButtonVM
|
||||
Me.DataContext = m_SceneButtonVM.TopPanelListGroupBtn(SceneButtonVM.m_nIndexList_1)
|
||||
Me.DataContext = m_SceneButtonVM.ParametricListGroupBtn(SceneButtonVM.m_nIndexList_1)
|
||||
SceneButtonVM.m_nIndexList_1 += 1
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<Grid x:Class="TopPanelOfficeListButtonV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtStone3D="clr-namespace:EgtStone3D">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding TopPanelListBtn}"
|
||||
Style="{DynamicResource TopList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource TopPanelWnd_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button ToolTip="{Binding Name}"
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
Command="{Binding CmdBtn}"
|
||||
Style="{StaticResource SceneButton2}">
|
||||
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
|
||||
<EgtStone3D:SVGV FileSource="{Binding Img}" Height="40"/>
|
||||
<TextBlock Text="{Binding Name}"
|
||||
Style="{StaticResource TopPanel_TxBl}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding SubTitle}"
|
||||
Style="{StaticResource TopPanel_TxBl}"/>
|
||||
</Grid>
|
||||
@@ -0,0 +1,24 @@
|
||||
Public Class TopPanelOfficeListButtonV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_SceneButtonVM As SceneButtonVM
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_SceneButtonVM = Map.refSceneButtonVM
|
||||
Me.DataContext = m_SceneButtonVM.TopPanelOfficeListBtn(SceneButtonVM.m_nIndexList_4)
|
||||
SceneButtonVM.m_nIndexList_4 += 1
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
End Class
|
||||
+73
-9
@@ -5,6 +5,7 @@
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
SelectedIndex="{Binding SelTopOption}"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"
|
||||
Style="{StaticResource TopPanel_TabControl}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
@@ -29,10 +30,12 @@
|
||||
<EgtStone3D:TopPanelHomeV DataContext="{StaticResource TopPanelVM}"/>
|
||||
<Separator Grid.Column="1"
|
||||
Style="{StaticResource TopPanel_Separator}"/>
|
||||
<EgtStone3D:TopPanelViewV Grid.Column="2" DataContext="{StaticResource TopPanelVM}"/>
|
||||
<EgtStone3D:TopPanelViewV Grid.Column="2"
|
||||
DataContext="{StaticResource TopPanelVM}"/>
|
||||
<Separator Grid.Column="3"
|
||||
Style="{StaticResource TopPanel_Separator}"/>
|
||||
<EgtStone3D:TopPanelViewProspectiveV Grid.Column="4" DataContext="{StaticResource TopPanelVM}"/>
|
||||
<EgtStone3D:TopPanelViewProspectiveV Grid.Column="4"
|
||||
DataContext="{StaticResource TopPanelVM}"/>
|
||||
<Separator Grid.Column="5"
|
||||
Style="{StaticResource TopPanel_Separator}"/>
|
||||
<EgtStone3D:GridPaneV Grid.Column="6"
|
||||
@@ -43,8 +46,7 @@
|
||||
ItemsSource="{Binding TopPanelListGroupBtn}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource TopPanel_WrapPanel}"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"/>
|
||||
<WrapPanel Style="{StaticResource TopPanel_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
@@ -56,19 +58,41 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
<EgtStone3D:TopPanelListV Grid.Column="9"/>
|
||||
<Button Grid.Column="9"
|
||||
Command="{Binding ScriptFileCmd}"
|
||||
Tag="{Binding}"
|
||||
IsEnabled="{Binding IsEnableScriptBtn}"
|
||||
Style="{DynamicResource ProjManager_Btn}">
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding FileLuaNames}"
|
||||
Style="{StaticResource EgtStone3D_ContextMenu}">
|
||||
<ContextMenu.Resources>
|
||||
<Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource EgtStone3D_MenuItem}">
|
||||
<Setter Property="Command"
|
||||
Value="{Binding PlacementTarget.Tag.OpenFileLuaCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
|
||||
<Setter Property="CommandParameter" Value="{Binding}"/>
|
||||
</Style>
|
||||
</ContextMenu.Resources>
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
|
||||
<EgtStone3D:SVGV Height="50" FileSource="{Binding FileScriptSVG, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="{Binding Script_Msg}"
|
||||
Style="{StaticResource TopPanel_TxBl}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding Parametrico_Msg}">
|
||||
<Grid Style="{StaticResource TopPanel_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ItemsControl ItemsSource="{Binding TopPanelListGroupBtn}">
|
||||
<ItemsControl ItemsSource="{Binding ParametricListGroupBtn}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource TopPanel_WrapPanel}"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"/>
|
||||
<WrapPanel Style="{StaticResource TopPanel_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
@@ -80,6 +104,46 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
<ItemsControl Grid.Column="1"
|
||||
ItemsSource="{Binding InfoListBtn}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource TopPanel_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:GroupSceneBtn}">
|
||||
<StackPanel Style="{StaticResource SceneButtonH_StackPanel}">
|
||||
<EgtStone3D:TopPanelInfoParametricV/>
|
||||
<Separator Style="{StaticResource TopPanel_Separator}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding Office_Msg}">
|
||||
<Grid Style="{StaticResource TopPanel_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ItemsControl ItemsSource="{Binding TopPanelOfficeListBtn}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource TopPanel_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:GroupSceneBtn}">
|
||||
<StackPanel Style="{StaticResource SceneButtonH_StackPanel}">
|
||||
<EgtStone3D:TopPanelOfficeListButtonV/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
<Separator Grid.Column="1"
|
||||
Style="{StaticResource TopPanel_Separator}"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
+164
-21
@@ -2,6 +2,7 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
|
||||
Public Class TopPanelVM
|
||||
Inherits VMBase
|
||||
@@ -11,6 +12,7 @@ Public Class TopPanelVM
|
||||
Friend Enum TopOption As Integer
|
||||
OPTIONS = 0
|
||||
PARAMETRICO = 1
|
||||
OFFICE = 2
|
||||
End Enum
|
||||
|
||||
Private m_SelTopOption As TopOption = TopOption.OPTIONS
|
||||
@@ -134,6 +136,61 @@ Public Class TopPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ParametricListGroupBtn As List(Of GroupSceneBtn)
|
||||
Get
|
||||
Return Map.refSceneButtonVM.ParametricListGroupBtn
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property InfoListBtn As List(Of GroupSceneBtn)
|
||||
Get
|
||||
Return Map.refSceneButtonVM.InfoListBtn
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TopPanelOfficeListBtn As List(Of GroupSceneBtn)
|
||||
Get
|
||||
Return Map.refSceneButtonVM.TopPanelOfficeListBtn
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_FileScriptSVG As String = String.Empty
|
||||
Public Property FileScriptSVG As String
|
||||
Get
|
||||
Return m_FileScriptSVG
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_FileScriptSVG = value
|
||||
NotifyPropertyChanged(NameOf(FileScriptSVG))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFileScriptSVG(sFileScriptSVG As String)
|
||||
m_FileScriptSVG = sFileScriptSVG
|
||||
NotifyPropertyChanged(NameOf(FileScriptSVG))
|
||||
End Sub
|
||||
|
||||
Private m_FileLuaNames As New ObservableCollection(Of String)
|
||||
Public Property FileLuaNames As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_FileLuaNames
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of String))
|
||||
m_FileLuaNames = value
|
||||
NotifyPropertyChanged(NameOf(FileLuaNames))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bIsEnableScriptBtn As Boolean = True
|
||||
Public ReadOnly Property IsEnableScriptBtn As Boolean
|
||||
Get
|
||||
Return m_bIsEnableScriptBtn
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetIsEnableScriptBtn(value As Boolean)
|
||||
m_bIsEnableScriptBtn = value
|
||||
NotifyPropertyChanged(NameOf(IsEnableScriptBtn))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property NewFile_Msg
|
||||
@@ -166,6 +223,12 @@ Public Class TopPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Script_Msg
|
||||
Get
|
||||
Return EgtMsg(110076) ' Script File
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione Comandi
|
||||
@@ -177,6 +240,8 @@ Public Class TopPanelVM
|
||||
Private m_cmdShowPopUpCmd As ICommand
|
||||
Private m_cmdShowPopUpProspectiveCmd As ICommand
|
||||
Private m_cmdOpenMruFile As ICommand
|
||||
Private m_cmdScriptFileCmd As ICommand
|
||||
Private m_cmdOpenFileLua As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
@@ -188,6 +253,8 @@ Public Class TopPanelVM
|
||||
m_MruFiles.Init(S_MRUFILES, 8)
|
||||
m_MruImportFiles.Init(S_MRUIMPORTFILES, 8)
|
||||
SetFileSourceSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\test.svg")
|
||||
SetFileScriptSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\ScriptLua.svg")
|
||||
GetFileLuaList()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
@@ -204,7 +271,10 @@ Public Class TopPanelVM
|
||||
End Sub
|
||||
|
||||
Friend Function OpenProject(sFilePath As String) As Boolean
|
||||
Return Map.refSceneHostVM.OpenProject(sFilePath)
|
||||
Dim bOk As Boolean = Map.refSceneHostVM.OpenProject(sFilePath)
|
||||
SolidManagerM.CreatePartSolid()
|
||||
EgtDraw()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Sub Save()
|
||||
@@ -223,6 +293,52 @@ Public Class TopPanelVM
|
||||
SetProspectiveView_Msg("▼" & EgtMsg(110027)) ' Vista Prospettica
|
||||
End Sub
|
||||
|
||||
Private Sub Get_ReadFile(fileName As String)
|
||||
Map.refScriptWindowVM.sNameFile = Path.GetFileNameWithoutExtension(fileName)
|
||||
Map.refScriptWindowVM.sScriptText = File.ReadAllText(fileName, Encoding.UTF8)
|
||||
End Sub
|
||||
|
||||
Private Sub GetFile()
|
||||
' Verifica se la cartella esiste
|
||||
If Directory.Exists(Map.refMainWindowVM.MainWindowM.sTempDir) Then
|
||||
' Recupero tutti i nomi dei file nella cartella
|
||||
Dim fileNames() As String = Directory.GetFiles(Map.refMainWindowVM.MainWindowM.sTempDir, "*.lua")
|
||||
If fileNames.Length > 0 Then
|
||||
' Recupero il file con l'ultima modifica
|
||||
Dim lastModifyFile As New FileInfo(fileNames(0))
|
||||
For Each fileName As String In fileNames
|
||||
Dim fileInfo As New FileInfo(fileName)
|
||||
If fileInfo.LastWriteTime >= lastModifyFile.LastWriteTime Then
|
||||
lastModifyFile = fileInfo
|
||||
Get_ReadFile(fileName)
|
||||
End If
|
||||
Next
|
||||
ElseIf fileNames.Length = 0 Then
|
||||
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(110078), EgtMsg(110077), MessageBoxButton.OK, MessageBoxImage.Information) = MessageBoxResult.OK Then
|
||||
Dim OpenDialog As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||
.Title = EgtMsg(110015), ' Importa
|
||||
.Filter = "lua files (*.lua)|*.lua",
|
||||
.FilterIndex = 1,
|
||||
.Mode = 1
|
||||
}
|
||||
If Not OpenDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then Return
|
||||
If String.IsNullOrEmpty(OpenDialog.FileName) Then Return
|
||||
Get_ReadFile(OpenDialog.FileName)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GetFileLuaList()
|
||||
If Directory.Exists(Map.refMainWindowVM.MainWindowM.sTempDir) Then
|
||||
' Recupera tutti i nomi dei file nella cartella
|
||||
Dim fileNames() As String = Directory.GetFiles(Map.refMainWindowVM.MainWindowM.sTempDir, "*.lua")
|
||||
For Each fileName As String In fileNames
|
||||
m_FileLuaNames.Add(fileName)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -258,8 +374,6 @@ Public Class TopPanelVM
|
||||
|
||||
Friend Sub OpenFile()
|
||||
OpenProject("")
|
||||
SolidManagerM.CreatePartSolid()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' OpenFileCmd
|
||||
@@ -306,9 +420,6 @@ Public Class TopPanelVM
|
||||
|
||||
#Region "OptionsCmd"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Export.
|
||||
''' </summary>
|
||||
Public ReadOnly Property OptionsCommand As ICommand
|
||||
Get
|
||||
If m_cmdOptionsCmd Is Nothing Then
|
||||
@@ -318,9 +429,6 @@ Public Class TopPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Export. This method is invoked by the ExportCommand.
|
||||
''' </summary>
|
||||
Public Sub Options(ByVal param As Object)
|
||||
Dim OptionsWindow As New OptionWindowV With {
|
||||
.DataContext = New OptionWindowVM,
|
||||
@@ -333,9 +441,6 @@ Public Class TopPanelVM
|
||||
|
||||
#Region "ShowPopUpCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Export.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ShowPopUpCommand As ICommand
|
||||
Get
|
||||
If m_cmdShowPopUpCmd Is Nothing Then
|
||||
@@ -345,9 +450,6 @@ Public Class TopPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Export. This method is invoked by the ExportCommand.
|
||||
''' </summary>
|
||||
Public Sub ShowPopUp(ByVal param As Object)
|
||||
If m_IsOpen Then
|
||||
SetIsOpen(False)
|
||||
@@ -364,9 +466,6 @@ Public Class TopPanelVM
|
||||
|
||||
#Region "ShowPopUpProspectiveCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Export.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ShowPopUpProspectiveCommand As ICommand
|
||||
Get
|
||||
If m_cmdShowPopUpProspectiveCmd Is Nothing Then
|
||||
@@ -376,9 +475,6 @@ Public Class TopPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Export. This method is invoked by the ExportCommand.
|
||||
''' </summary>
|
||||
Public Sub ShowPopUpProspective(ByVal param As Object)
|
||||
If m_IsOpenProspective Then
|
||||
SetIsOpenProspective(False)
|
||||
@@ -416,6 +512,53 @@ Public Class TopPanelVM
|
||||
|
||||
#End Region ' OpenMruFileCommand
|
||||
|
||||
#Region "ScriptFileCmd"
|
||||
|
||||
Public ReadOnly Property ScriptFileCmd As ICommand
|
||||
Get
|
||||
If m_cmdScriptFileCmd Is Nothing Then
|
||||
m_cmdScriptFileCmd = New Command(AddressOf OpenScriptFile)
|
||||
End If
|
||||
Return m_cmdScriptFileCmd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub OpenScriptFile()
|
||||
Dim ScriptWindow As New ScriptWindowV With {
|
||||
.DataContext = New ScriptWindowVM,
|
||||
.Owner = Application.Current.MainWindow
|
||||
}
|
||||
GetFile()
|
||||
ScriptWindow.Show()
|
||||
SetIsEnableScriptBtn(False)
|
||||
End Sub
|
||||
|
||||
#End Region ' ScriptFileCmd
|
||||
|
||||
#Region "OpenFileLuaCommand"
|
||||
|
||||
Public ReadOnly Property OpenFileLuaCommand As ICommand
|
||||
Get
|
||||
If m_cmdOpenFileLua Is Nothing Then
|
||||
m_cmdOpenFileLua = New Command(AddressOf OpenFileLua)
|
||||
End If
|
||||
Return m_cmdOpenFileLua
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub OpenFileLua(ByVal param As Object)
|
||||
Dim fileName = DirectCast(param, String)
|
||||
Dim ScriptWindow As New ScriptWindowV With {
|
||||
.DataContext = New ScriptWindowVM,
|
||||
.Owner = Application.Current.MainWindow
|
||||
}
|
||||
Get_ReadFile(fileName)
|
||||
ScriptWindow.Show()
|
||||
SetIsEnableScriptBtn(False)
|
||||
End Sub
|
||||
|
||||
#End Region ' OpenFileLuaCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Module ColorScriptM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Definire i colori come variabili statiche
|
||||
Public ReadOnly KeywordColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(45, 122, 214)
|
||||
Public ReadOnly CommentColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(94, 153, 62)
|
||||
Public ReadOnly ValueColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(78, 201, 176)
|
||||
Public ReadOnly EgtColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(220, 220, 170)
|
||||
Public ReadOnly InfoColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(206, 145, 120)
|
||||
Public ReadOnly FunctionColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(204, 153, 255)
|
||||
Public ReadOnly BracketColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(255, 200, 20)
|
||||
Public ReadOnly TextColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(104, 205, 254)
|
||||
Public ReadOnly NumberColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(167, 206, 155)
|
||||
Public ReadOnly FreeColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(105, 205, 254)
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
End Module
|
||||
@@ -4,7 +4,8 @@
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
|
||||
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
|
||||
xmlns:AVALON="http://icsharpcode.net/sharpdevelop/avalonedit">
|
||||
|
||||
<!--#region
|
||||
Assign a Key to every Panel ViewModel to use
|
||||
@@ -57,6 +58,9 @@
|
||||
<SolidColorBrush x:Key="EgtStone3D_Silver" Color="#BFBFBF"/>
|
||||
<SolidColorBrush x:Key="EgtStone3D_Gold" Color="#FFD700"/>
|
||||
<SolidColorBrush x:Key="EgtStone3D_Scorpion" Color="#606060"/>
|
||||
<SolidColorBrush x:Key="EgtStone3D_Tundora" Color="#404040"/>
|
||||
<SolidColorBrush x:Key="EgtStone3D_PaleSky" Color="#6E7681"/>
|
||||
<SolidColorBrush x:Key="EgtStone3D_MineShaft" Color="#1F1F1F"/>
|
||||
|
||||
<Color x:Key="EgalwareTransparent_Color">Transparent</Color>
|
||||
<Color x:Key="EgalwareBlue1_Color">#4D84C4</Color>
|
||||
@@ -92,6 +96,9 @@
|
||||
<Color x:Key="EgtStone3D_Silver_Color">#BFBFBF</Color>
|
||||
<Color x:Key="EgtStone3D_Gold_Color">#FFD700</Color>
|
||||
<Color x:Key="EgalwareScorpion_Color">#606060</Color>
|
||||
<Color x:Key="EgalwareTundora_Color">#404040</Color>
|
||||
<Color x:Key="EgalwarePaleSky_Color">#6E7681</Color>
|
||||
<Color x:Key="EgalwareMineShaft_Color">#1F1F1F</Color>
|
||||
|
||||
<!--#endregion Colori Predefiniti-->
|
||||
|
||||
@@ -228,6 +235,14 @@
|
||||
<Setter Property="Width" Value="35"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SceneButton2" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Background" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Margin" Value="3,0,0,0"/>
|
||||
<Setter Property="Height" Value="65"/>
|
||||
<Setter Property="Width" Value="100"/>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="Button.HalfRoundButton" TargetType="{x:Type Button}">
|
||||
<Border x:Name="border" CornerRadius="4,4,0,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
@@ -296,8 +311,11 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Grid_Btn" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Width" Value="80"/>
|
||||
<Setter Property="Margin" Value="0,0,0,15"/>
|
||||
<Setter Property="Background" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Margin" Value="0,5,0,5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TopPanel_Btn" TargetType="{x:Type Button}" BasedOn="{StaticResource Proj_Btn}">
|
||||
@@ -357,6 +375,8 @@
|
||||
|
||||
<Style x:Key="GridPanel_Btn" TargetType="{x:Type Button}" BasedOn="{StaticResource Proj_Btn}">
|
||||
<Setter Property="Width" Value="35"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="Margin" Value="0,-5,0,3.5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
@@ -364,6 +384,11 @@
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Script_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="25"/>
|
||||
<Setter Property="Width" Value="25"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="LeftPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Margin" Value="0,10,0,0"/>
|
||||
@@ -374,6 +399,18 @@
|
||||
<Setter Property="Margin" Value="100,1"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScriptWindow_Btn" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Background" Value="{DynamicResource EgalwareTransparent}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Margin" Value="0,0,10,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScriptWindowEnd_Btn" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Background" Value="{DynamicResource EgalwareTransparent}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion ButtonStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -493,6 +530,18 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Office_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ProjManager_ToogleButton}">
|
||||
<Setter Property="Height" Value="24"/>
|
||||
<Setter Property="Width" Value="64"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Margin" Value="5,5,5,0"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="TextBlock.FontWeight" Value="ExtraBold"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SceneToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource General_ToogleButton}">
|
||||
<Setter Property="Background" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource EgalwareTransparent}"/>
|
||||
@@ -512,6 +561,29 @@
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="Width" Value="35"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SceneToggleButton2" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource General_ToogleButton}">
|
||||
<Setter Property="Background" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Margin" Value="3,0,0,0"/>
|
||||
<Setter Property="Height" Value="65"/>
|
||||
<Setter Property="Width" Value="65"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScriptToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource General_ToogleButton}">
|
||||
<Setter Property="Background" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Height" Value="25"/>
|
||||
<Setter Property="Width" Value="20"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScriptToggleButton1" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ScriptToggleButton}">
|
||||
<Setter Property="Margin" Value="2,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
|
||||
<!--#endregion ToogleButtonStyle-->
|
||||
|
||||
@@ -585,6 +657,14 @@
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScriptWindow_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="{StaticResource EgalwareUltraLightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource EgalwareUltraLightGray}"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="Margin" Value="10,10,10,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion BorderStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -881,6 +961,11 @@
|
||||
<Setter Property="MinHeight" Value="382"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScriptWindowV_Window" TargetType="{x:Type EgtWPFLib5:EgtMainWindow}" BasedOn="{StaticResource Dialog_Window}">
|
||||
<Setter Property="Width" Value="900"/>
|
||||
<Setter Property="Height" Value="800"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion EgtCustomWindowStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -1075,7 +1160,7 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SceneUserControl_TxBl" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="TextWrapping" Value="WrapWithOverflow"/>
|
||||
<Setter Property="Margin" Value="10,0,10,0"/>
|
||||
</Style>
|
||||
|
||||
@@ -1116,7 +1201,7 @@
|
||||
|
||||
<!--#region TextBoxStyle-->
|
||||
|
||||
<Style x:Key="BaseTextBox" TargetType="{x:Type TextBox}">
|
||||
<Style x:Key="BaseTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
|
||||
<Setter Property="Background" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource BaseTextBox.Static.Foreground}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
@@ -1125,7 +1210,8 @@
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="Height" Value="22"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<!--<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>-->
|
||||
<Setter Property="FontWeight" Value="Normal"/>
|
||||
</Style>
|
||||
|
||||
@@ -1168,6 +1254,11 @@
|
||||
<Setter Property="Margin" Value="1,5,1,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Script_TxBx" TargetType="{x:Type TextBox}" BasedOn="{StaticResource BaseTextBox}">
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="10,10,10,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="AboutBox_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextBox.Static.Foreground}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
@@ -1181,8 +1272,8 @@
|
||||
|
||||
<Style x:Key="GridPanel_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextBox.Static.Foreground}"/>
|
||||
<Setter Property="Width" Value="45"/>
|
||||
<Setter Property="Margin" Value="-5,0,0,0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion TextBoxStyle-->
|
||||
@@ -1525,6 +1616,12 @@
|
||||
<Setter Property="Margin" Value="0,2,0,5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScriptWindow_CmBx" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Height" Value="25"/>
|
||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion ComboBoxStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -1608,7 +1705,7 @@
|
||||
|
||||
<Style x:Key="TopPanelButton_ItemsControl" TargetType="{x:Type ItemsControl}">
|
||||
<Setter Property="DockPanel.Dock" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="-10,10,0,0"/>
|
||||
</Style>
|
||||
|
||||
@@ -1627,7 +1724,7 @@
|
||||
<Style x:Key="RightList_ItemsControl" TargetType="{x:Type ItemsControl}">
|
||||
<Setter Property="DockPanel.Dock" Value="Right"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="0,-30,4,0"/>
|
||||
<Setter Property="Margin" Value="0,10,4,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="LeftList_ItemsControl" TargetType="{x:Type ItemsControl}">
|
||||
@@ -1739,7 +1836,29 @@
|
||||
</Style.Resources>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CellDataGrid_CustomHighLight" TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="BorderBrush" Value="LightGray" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="BorderThickness" Value="2,2,2,2" />
|
||||
<Setter Property="BorderBrush" Value="Cyan" />
|
||||
<Setter Property="Padding" Value="0,0,0,0" />
|
||||
<Setter Property="Margin" Value="-2,0,-2,0" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
<Style.Resources>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Black" />
|
||||
</Style.Resources>
|
||||
</Style>
|
||||
|
||||
|
||||
<Style x:Key="DataGrid_CustomHighLight" TargetType="{x:Type DataGrid}">
|
||||
<Setter Property="BorderBrush" Value="LightGray" />
|
||||
<Style.Resources>
|
||||
<Style TargetType="{x:Type DataGridCell}">
|
||||
<Style.Triggers>
|
||||
@@ -1783,8 +1902,8 @@
|
||||
<Setter Property="Foreground" Value="Gray"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="BorderThickness" Value="0 0 1 1"/>
|
||||
<Setter Property="BorderBrush" Value="DarkGray"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||
<Setter Property="BorderBrush" Value="LightGray"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
@@ -2323,12 +2442,21 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="GridPanel_WrapPanel" TargetType="{x:Type WrapPanel}">
|
||||
<Setter Property="Orientation" Value="Vertical"/>
|
||||
<Setter Property="Orientation" Value="Horizontal"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WrapScript_WrapPanel" TargetType="{x:Type WrapPanel}">
|
||||
<Setter Property="Orientation" Value="Horizontal"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TopPanelWnd_WrapPanel" TargetType="{x:Type WrapPanel}">
|
||||
<Setter Property="Orientation" Value="Horizontal"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion WrapPanelStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -2599,8 +2727,9 @@
|
||||
|
||||
<Style x:Key="SceneUserControl_UserControl" TargetType="{x:Type UserControl}">
|
||||
<Setter Property="Background" Value="{StaticResource EgalwareTransparent}"/>
|
||||
<Setter Property="Width" Value="420"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Height" Value="Auto"/>
|
||||
<Setter Property="Margin" Value="10,10,0,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion UserControlStyle-->
|
||||
@@ -2907,6 +3036,22 @@
|
||||
<Setter Property="Margin" Value="0,10,0,5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Script_Separator" TargetType="{x:Type Separator}">
|
||||
<Setter Property="Background" Value="{DynamicResource Separator.Static.Background}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Height" Value="20"/>
|
||||
<Setter Property="Width" Value="38.5"/>
|
||||
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
|
||||
<Setter Property="RenderTransform">
|
||||
<Setter.Value>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="90"/>
|
||||
</TransformGroup>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--#endregion SeparatorStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -2921,4 +3066,22 @@
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region TextEditorStyle-->
|
||||
|
||||
<Style x:Key="ScriptTextEditor" TargetType="{x:Type AVALON:TextEditor}">
|
||||
<Setter Property="Background" Value="{StaticResource EgtStone3D_MineShaft}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource EgtStone3D_Alto}"/>
|
||||
<Setter Property="LineNumbersForeground" Value="{StaticResource EgtStone3D_PaleSky}"/>
|
||||
<Setter Property="ShowLineNumbers" Value="True"/>
|
||||
<Setter Property="SyntaxHighlighting" Value="Lua"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="FontFamily" Value="Consolas"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="Margin" Value="10"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion TextEditorStyle-->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -13,12 +13,14 @@ Module Map
|
||||
Private m_refViewPanelProspectiveVM As ViewPanelProspectiveVM
|
||||
Private m_refGridPanelVM As GridPanelVM
|
||||
Private m_refOptionWindowVM As OptionWindowVM
|
||||
Private m_refScriptWindowVM As ScriptWindowVM
|
||||
|
||||
Private m_refMainWindowV As MainWindowV
|
||||
Private m_refSecondaryWindowV As SecondaryWindowV
|
||||
Private m_refSceneHostV As SceneHostV
|
||||
Private m_refSceneButtonV As SceneButtonV
|
||||
Private m_refSplashScreenV As SplashScreenV
|
||||
Private m_refScriptWindowV As ScriptWindowV
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
@@ -78,6 +80,12 @@ Module Map
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refScriptWindowVM As ScriptWindowVM
|
||||
Get
|
||||
Return m_refScriptWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSceneHostV As SceneHostV
|
||||
Get
|
||||
Return m_refSceneHostV
|
||||
@@ -96,6 +104,12 @@ Module Map
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refScriptWindowV As ScriptWindowV
|
||||
Get
|
||||
Return m_refScriptWindowV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSceneButtonVM As SceneButtonVM
|
||||
Get
|
||||
Return m_refSceneButtonVM
|
||||
@@ -163,6 +177,11 @@ Module Map
|
||||
Return Not IsNothing(m_refOptionWindowVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefScriptWindowVM(ScriptWindowVM As ScriptWindowVM) As Boolean
|
||||
m_refScriptWindowVM = ScriptWindowVM
|
||||
Return Not IsNothing(m_refScriptWindowVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSceneHostV(SceneHostV As SceneHostV) As Boolean
|
||||
m_refSceneHostV = SceneHostV
|
||||
Return Not IsNothing(m_refSceneHostV)
|
||||
@@ -178,6 +197,11 @@ Module Map
|
||||
Return Not IsNothing(m_refSplashScreenV)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefScriptWindowV(ScriptWindowV As ScriptWindowV) As Boolean
|
||||
m_refScriptWindowV = ScriptWindowV
|
||||
Return Not IsNothing(m_refScriptWindowV)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSceneButtonVM(SceneButtonVM As SceneButtonVM) As Boolean
|
||||
m_refSceneButtonVM = SceneButtonVM
|
||||
Return Not IsNothing(m_refSceneButtonVM)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Module RegexM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Precompilare regex con ottimizzazione globale
|
||||
Public ReadOnly KeywordRegex As New Regex("\b(?:local|end|if|then|else|for|while|do|return|true|nil|_ENV|_G)\b", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly ValueRegex As New Regex("\.(CMP_Draw|N1|V1|T1|Npar|Nome|INFO|WithInt|CMP|GLOB|ROOT)\b", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly FunctionRegex As New Regex("\bfunction\b", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly InfoRegex As New Regex("'([^']*)'", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly EgtRegex As New Regex("\b\w+(?=\s*\()", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly TextRegex As New Regex("\b\w+(?=\[)(?!.*[\(\{])", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly BracketRegex As New Regex("[()\[\]{}]", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly NumberRegex As New Regex("\b\d+\b", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly CommentRegex As New Regex("--.*$", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly FreeRegex As New Regex("\b[a-zA-Z_]\w*(?=\s*=\s*)", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly PointRegex As New Regex("\b(?!table\b)\w+(?=\.)", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly TableRegex As New Regex("\btable\b", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
Public ReadOnly EqualRegex As New Regex("\b\w+(?=\s=)", RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace)
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
End Module
|
||||
+110
-19
@@ -13,6 +13,13 @@ Module SolidManagerM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Function ExistsPartSolid(nId As Integer) As PartSolidM
|
||||
' cerco nella lista dei part quello con id uguale a nId, se non lo trovo allora nId era riferito ad un Part Solid
|
||||
Dim PartSolid As PartSolidM = m_PartSolidList.FirstOrDefault(Function(x) x.PartId = nId)
|
||||
If IsNothing(PartSolid) Then PartSolid = m_PartSolidList.FirstOrDefault(Function(x) x.PartSolidId = nId)
|
||||
Return PartSolid
|
||||
End Function
|
||||
|
||||
Public Function GetPartSolid(nId As Integer) As PartSolidM
|
||||
' se la lista non esiste la creo
|
||||
If m_PartSolidList.Count = 0 Then
|
||||
@@ -20,9 +27,8 @@ Module SolidManagerM
|
||||
End If
|
||||
' se l'id è negativo allora sto applicando un disaccoppiamento e mi basta rendere l'id positivo
|
||||
If nId < 0 Then nId *= -1
|
||||
' cerco nella lista dei part quello con id uguale a nId, se non lo trovo allora nId era riferito ad un Part Solid
|
||||
Dim PartSolid As PartSolidM = m_PartSolidList.FirstOrDefault(Function(x) x.PartId = nId)
|
||||
If IsNothing(PartSolid) Then PartSolid = m_PartSolidList.FirstOrDefault(Function(x) x.PartSolidId = nId)
|
||||
' cerco se è già presente nella lista il corrispondete PartSolid
|
||||
Dim PartSolid As PartSolidM = ExistsPartSolid(nId)
|
||||
' se non l'ho trovato allora lo creo
|
||||
If IsNothing(PartSolid) Then AddPartSolid(nId, PartSolid)
|
||||
|
||||
@@ -39,12 +45,15 @@ Module SolidManagerM
|
||||
End Function
|
||||
|
||||
Public Sub RefreshPartSolid(nPartId As Integer)
|
||||
Dim PartSolidSel As PartSolidM = GetPartSolid(nPartId)
|
||||
' rimuovo il part solid associato a questo part
|
||||
PartSolidSel.DeselectPart()
|
||||
m_PartSolidList.Remove(PartSolidSel)
|
||||
Dim PartSolidSel As PartSolidM = ExistsPartSolid(nPartId)
|
||||
If Not IsNothing(PartSolidSel) Then
|
||||
' rimuovo il part solid associato a questo part
|
||||
PartSolidSel.DeselectPart()
|
||||
m_PartSolidList.Remove(PartSolidSel)
|
||||
End If
|
||||
' lo ricreo
|
||||
AddPartSolid(nPartId)
|
||||
AddPartSolid(nPartId, PartSolidSel)
|
||||
PartSolidSel.DeselectPart()
|
||||
End Sub
|
||||
|
||||
Public Sub ClearPartSolidList()
|
||||
@@ -76,6 +85,7 @@ Module SolidManagerM
|
||||
End Sub
|
||||
|
||||
Public Sub CreateSolidFromLoops(nPart As Integer)
|
||||
If nPart = GDB_ID.NULL Then Return
|
||||
Dim nChild As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nPart, "Child", nChild)
|
||||
' proseguo solo nel caso in cui non sia già presente un solido associato al Part
|
||||
@@ -89,13 +99,18 @@ Module SolidManagerM
|
||||
nInLay = EgtGetNextName(nInLay, "InLoop")
|
||||
End While
|
||||
|
||||
' creo la superficie piana
|
||||
Dim nRegLay As Integer = EgtCreateGroup(nPart)
|
||||
EgtSetName(nRegLay, "Region")
|
||||
EgtCreateSurfFlatRegion(nRegLay, nLoops.ToArray())
|
||||
' creo la superficie piana, se non è già presente
|
||||
Dim nRegLay As Integer = EgtGetFirstNameInGroup(nPart, "Region")
|
||||
If nRegLay = GDB_ID.NULL Then
|
||||
nRegLay = EgtCreateGroup(nPart)
|
||||
EgtSetName(nRegLay, "Region")
|
||||
EgtCreateSurfFlatRegion(nRegLay, nLoops.ToArray())
|
||||
End If
|
||||
' splitto le compo nei lati singoli
|
||||
For Each nLoopId In nLoops
|
||||
EgtLuaExecLine("TOOL.ExplodeAndNameEdges(" & nLoopId.ToString & "," & "false" & ")")
|
||||
If EgtGetType(nLoopId) = GDB_TY.CRV_COMPO Then
|
||||
EgtLuaExecLine("TOOL.ExplodeAndNameEdges(" & nLoopId.ToString & "," & "false" & ")")
|
||||
End If
|
||||
Next
|
||||
|
||||
' Assegno valori ai parametri per lua (appartengono alla tabella SLD)
|
||||
@@ -113,6 +128,31 @@ Module SolidManagerM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CreateAllSolids()
|
||||
' controllo se tutti i Part nel .vme hanno un corrispettiveo nella lista dei PartSolid, sennò la aggiorno
|
||||
EgtSetCurrentContext(m_nVeinCtx)
|
||||
Dim nPart As Integer = EgtGetFirstPart()
|
||||
|
||||
Dim dThick As Double = 20
|
||||
EgtSetCurrentContext(m_nVeinCtx)
|
||||
Dim IdFP As Integer = EgtGetFirstPart()
|
||||
While IdFP <> GDB_ID.NULL
|
||||
Dim bImport As Boolean = False
|
||||
EgtGetInfo(IdFP, "Import", bImport)
|
||||
Dim sName As String = String.Empty
|
||||
EgtGetName(IdFP, sName)
|
||||
' se il part non è un solido o una terna, creo il solido corrispondente, se non è già presente
|
||||
If Not bImport And sName <> "SOLID" And sName <> "Terna" Then
|
||||
CreateSolidFromLoops(IdFP)
|
||||
End If
|
||||
IdFP = EgtGetNextPart(IdFP)
|
||||
End While
|
||||
|
||||
' aggiorno la lista dei part solid
|
||||
CreatePartSolid()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Public Sub UpdatePairInfo(nId1 As Integer, Optional nId2 As Integer = GDB_ID.NULL)
|
||||
If EgtLuaSetGlobIntVar("ASS.nPartId", nId1) Then AssLog("ASS.nPartId = " & nId1.ToString)
|
||||
If EgtLuaSetGlobIntVar("ASS.nPartToPair", nId2) Then AssLog("ASS.nPartToPair = " & nId2.ToString)
|
||||
@@ -672,12 +712,48 @@ Module SolidManagerM
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Public Sub RebuildPartFromInfo(nId As Integer)
|
||||
If nId = GDB_ID.NULL Then Return
|
||||
Dim PartSolidSel As PartSolidM = GetPartSolid(nId)
|
||||
nId = PartSolidSel.PartId
|
||||
' recupero le info salvate nel Part
|
||||
EgtLuaExecLine("TOOL.FillInfoTableFromPart(" & nId.ToString() & ")")
|
||||
' recupero l'id dell'edge che ha generato la paretina
|
||||
Dim nParent As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nId, "Parent", nParent)
|
||||
Dim nIn As Integer = 0
|
||||
EgtGetInfo(nId, "nInLoop", nIn)
|
||||
Dim sLayName As String = "OutLoop"
|
||||
Dim nLayId As Integer = GDB_ID.NULL
|
||||
If nIn = 0 Then
|
||||
nLayId = EgtGetFirstNameInGroup(nParent, sLayName)
|
||||
Else
|
||||
sLayName = "InLoop"
|
||||
nLayId = EgtGetFirstNameInGroup(nParent, sLayName)
|
||||
Dim nInLays = 1
|
||||
While nInLays <> nIn
|
||||
nLayId = EgtGetNextName(nLayId, sLayName)
|
||||
nInLays += 1
|
||||
End While
|
||||
End If
|
||||
Dim nEdge As Integer = 0
|
||||
EgtGetInfo(nId, "ParentEdge", nEdge)
|
||||
Dim sEdgeName As String = "A" & nEdge.ToString()
|
||||
Dim nEdgeId As Integer = EgtGetFirstNameInGroup(nLayId, sEdgeName)
|
||||
' recupero le info e ricreo il pezzo
|
||||
If EgtLuaSetGlobIntVar("TOOL.nEdgeId", nEdgeId) Then AssLog("TOOL.nEdgeId = " & nEdgeId.ToString())
|
||||
If EgtLuaCallFunction("TOOL.CreateParetinaFull") Then AssLog("TOOL.CreateParetinaFull()")
|
||||
SolidManagerM.RefreshPartSolid(nId)
|
||||
End Sub
|
||||
|
||||
Public Sub Delete(nPartId)
|
||||
If nPartId = GDB_ID.NULL Then Return
|
||||
Dim PartSolidSel As PartSolidM = GetPartSolid(nPartId)
|
||||
|
||||
' cancello tutte le info che riguardano il pezzo che sono in altri pezzi
|
||||
Unpair(nPartId)
|
||||
Unpair(PartSolidSel.PartId)
|
||||
Dim sPairToRef As String = String.Empty
|
||||
EgtGetInfo(nPartId, "PairToRef", sPairToRef)
|
||||
EgtGetInfo(PartSolidSel.PartId, "PairToRef", sPairToRef)
|
||||
If sPairToRef <> String.Empty Then
|
||||
Dim vPairToRef As Array = sPairToRef.Split(CChar(","))
|
||||
Dim sPartToPair As String = vPairToRef(0)
|
||||
@@ -689,23 +765,38 @@ Module SolidManagerM
|
||||
|
||||
' elimino l'info nel parent
|
||||
Dim nEdge As Integer = 0
|
||||
EgtGetInfo(nPartId, "ParentEdge", nEdge)
|
||||
EgtGetInfo(PartSolidSel.PartId, "ParentEdge", nEdge)
|
||||
Dim nParentId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nPartId, "Parent", nParentId)
|
||||
EgtGetInfo(PartSolidSel.PartId, "Parent", nParentId)
|
||||
Dim sEdgeName As String = "A" & nEdge.ToString()
|
||||
Dim nIn As Integer = 0
|
||||
EgtGetInfo(nPartId, "nInLoop", nIn)
|
||||
EgtGetInfo(PartSolidSel.PartId, "nInLoop", nIn)
|
||||
If nIn <> 0 Then sEdgeName = sEdgeName & "_I" & nIn.ToString()
|
||||
EgtSetInfo(nParentId, sEdgeName, "")
|
||||
|
||||
' recupero gli eventuali vicini
|
||||
Dim sPrev As String = String.Empty
|
||||
Dim sNext As String = String.Empty
|
||||
EgtGetInfo(PartSolidSel.PartId, "Prev", sPrev)
|
||||
EgtGetInfo(PartSolidSel.PartId, "Next", sNext)
|
||||
Dim PrevId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, sPrev)
|
||||
Dim NextId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, sNext)
|
||||
|
||||
' elimino il part e il suo solido
|
||||
Dim PartSolidSel As PartSolidM = GetPartSolid(nPartId)
|
||||
PartSolidSel.DeselectPart()
|
||||
EgtErase(PartSolidSel.PartId)
|
||||
EgtErase(PartSolidSel.PartSolidId)
|
||||
|
||||
' elimino il PartSolid dalla lista
|
||||
m_PartSolidList.Remove(PartSolidSel)
|
||||
|
||||
' ricostruisco eventuali vicini e modifico le loro info
|
||||
EgtSetInfo(PrevId, "Next", "")
|
||||
EgtSetInfo(NextId, "Prev", "")
|
||||
RebuildPartFromInfo(PrevId)
|
||||
RebuildPartFromInfo(NextId)
|
||||
EgtDraw()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AvalonEdit" version="6.3.0.90" targetFramework="net472" />
|
||||
</packages>
|
||||
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
## About
|
||||
|
||||
Check out the [official documentation](http://avalonedit.net/documentation/) and the
|
||||
[samples and articles wiki page](https://github.com/icsharpcode/AvalonEdit/wiki/Samples-and-Articles)
|
||||
|
||||
Make sure to try the AvalonEdit sample application in the repository - its project has additional documentation included.
|
||||
|
||||
OSS projects using AvalonEdit are listed on the repository main page.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
+11284
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
+11284
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user