Compare commits
212 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 | |||
| 152e1baba1 | |||
| acb55fe3f1 | |||
| 71cc57613f | |||
| 6cc2323793 | |||
| ef1a116586 | |||
| e8bb8d7929 | |||
| f93fea1ad8 | |||
| ee2666e43b | |||
| 72a6c5e7c4 | |||
| f1df09ce61 | |||
| 6e391acf0a | |||
| 5e0a14656d | |||
| b18e2f308f | |||
| 021573b51c | |||
| 0135412ea1 | |||
| 673d06727a | |||
| 3819e89f9a | |||
| a743c980b5 | |||
| 31ba339f7e | |||
| 316cfcfce0 | |||
| 728f465356 | |||
| c6de02e026 | |||
| 12f3a33412 | |||
| c4b881fcd9 | |||
| c2011e5408 | |||
| 120e3fcc42 | |||
| 4e799ebc9b | |||
| 2b2619c51c | |||
| 71101d8fd7 | |||
| 09459328a5 | |||
| a4ffb5ed63 | |||
| e3f9f7b376 | |||
| 5ee3c8d15b | |||
| cfe838c454 | |||
| 71f12ea2b0 | |||
| 180ba2ca8d | |||
| 250d639dcc | |||
| 457fa2a4fe | |||
| c33484be6d | |||
| 56070171d8 | |||
| c470ab556c | |||
| bed47db10e | |||
| 3b0b8a7b51 | |||
| a54a5686f3 | |||
| 6aa5ad0a8a | |||
| e473a38246 | |||
| 0bfa71b125 | |||
| 77b45aa9b1 | |||
| cee752da32 | |||
| 3dc7cb4c9f | |||
| 3634c83160 | |||
| feafffa4d2 | |||
| d4d5a6503f | |||
| dca277d0ec | |||
| 48a8aaa113 | |||
| 67ec36aed4 | |||
| 16513d16f0 | |||
| ebf5a95a2d | |||
| 3d7960556b | |||
| 6e83913be8 | |||
| f35c7a6870 | |||
| 96e5af8ba2 | |||
| fdf49c18db | |||
| 2f250a554d | |||
| 00272afc5c | |||
| 48e6209bb3 | |||
| a4b32b186f | |||
| 335dbe806a | |||
| 55adab9e68 | |||
| abf9f88d7b | |||
| 0d0e24494a | |||
| 7e647a1552 | |||
| 97c058be03 | |||
| 1f2bbb9b6b | |||
| 45aacda576 | |||
| a3acf8aeca | |||
| eac593dd01 | |||
| 0843e49491 | |||
| 4b65c1db02 | |||
| 60fd277b94 | |||
| 0bc432c092 | |||
| ac018aeb53 | |||
| 0f1ab3af27 | |||
| 0b2112622c | |||
| 1ee8a8f0e0 | |||
| 180bfa730e | |||
| 668c2ef78b | |||
| 624099c2f4 | |||
| f8c64f1cad | |||
| abb0082b90 | |||
| 067ad44f03 | |||
| b19aeafdf3 | |||
| 2082e91b7c | |||
| 1b5bf009fd | |||
| 83a4b9bd01 | |||
| e9629399ef | |||
| 5aa20fa4c8 | |||
| 2533192b24 | |||
| 3cc5fdc4f7 | |||
| 29e0485a8e | |||
| e433c06461 | |||
| 475bd0ed83 | |||
| 0a0381222c | |||
| 66654b0ee8 | |||
| 07e2771552 | |||
| 517a5268ee | |||
| 89bc3e9be1 | |||
| 973f14e2df | |||
| 38b4d49e6e | |||
| 88e9a0f305 | |||
| 0bf092b9c9 | |||
| f0067b34a8 | |||
| ee3f0c09fc | |||
| fd60c6b0dc | |||
| 9d65365f1b | |||
| 09e1821400 | |||
| f08f731e67 | |||
| 9a2f7c7e90 | |||
| 21a59cbe60 | |||
| abe94daebf | |||
| 21f221e1f0 | |||
| 015d543937 | |||
| cfa1ec9bae | |||
| 627ac9a7e2 | |||
| 3a5dfd9108 | |||
| 486f3df30a | |||
| 5647264f01 | |||
| 66c7fa4a4b | |||
| 34ed932d7a | |||
| bfee6b66a5 | |||
| a69a257d35 | |||
| a0aa2ec740 | |||
| 2f384b4324 | |||
| 0e2641f1cf | |||
| 09e6c01520 | |||
| aca4eaaeaf | |||
| aff04c9e4f | |||
| a0d946667f | |||
| cca3fe0e0f | |||
| 4fd5ab6cd8 | |||
| 946f3cba82 | |||
| eb36414e56 | |||
| fb31e1a5ff | |||
| f79defbab1 | |||
| 13c7403589 | |||
| a5adaea91e | |||
| 8e4ab01451 | |||
| 55172e0496 | |||
| 2e0dce53c0 | |||
| b6e6cd375d | |||
| a35e9bc62a | |||
| 6c9c19d7fa |
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
# /
|
||||||
|
/revision.h
|
||||||
|
/*.aps
|
||||||
|
/*.ncb
|
||||||
|
/*.suo
|
||||||
|
/*.user
|
||||||
|
/*.sdf
|
||||||
|
/*.opensdf
|
||||||
|
/Debug32
|
||||||
|
/Release32
|
||||||
|
/Trial32
|
||||||
|
/Debug64
|
||||||
|
/Release64
|
||||||
|
/ipch
|
||||||
|
/bin
|
||||||
|
/obj
|
||||||
|
/.vs
|
||||||
|
|
||||||
|
/*.tmp
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<Window x:Class="AboutBoxV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
|
||||||
|
Title="AboutBoxV"
|
||||||
|
Background="Transparent"
|
||||||
|
Height="486"
|
||||||
|
Width="735"
|
||||||
|
WindowStyle="None"
|
||||||
|
ResizeMode="NoResize"
|
||||||
|
AllowsTransparency="True"
|
||||||
|
ShowInTaskbar="False"
|
||||||
|
WindowStartupLocation="CenterOwner">
|
||||||
|
|
||||||
|
<Border Style="{StaticResource WhiteBottomBlueRow_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid Grid.Row="1"
|
||||||
|
Grid.Column="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Image Grid.RowSpan="2"
|
||||||
|
Source="/Resources/AboutBox/EgalwareLogo.png"
|
||||||
|
Style="{StaticResource AboutBox_Image}"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Name="DescriptionLbl"
|
||||||
|
Style="{StaticResource DescriptionLbl_TextBlock}"/>
|
||||||
|
<TextBlock Grid.Row="1"
|
||||||
|
Grid.Column="2"
|
||||||
|
Name="VersionLbl"
|
||||||
|
Style="{StaticResource VersionLbl_TextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
<Image Grid.Row="3"
|
||||||
|
Grid.Column="1"
|
||||||
|
Source="/Resources/AboutBox/EgalwareLogo.png"
|
||||||
|
Style="{StaticResource AboutBoxLogo_Image}"/>
|
||||||
|
<TextBox Grid.Row="3"
|
||||||
|
Grid.Column="3"
|
||||||
|
Name="InfoLbl"
|
||||||
|
Style="{StaticResource AboutBox_TextBox}"/>
|
||||||
|
<TextBlock Grid.Row="5"
|
||||||
|
Grid.Column="3"
|
||||||
|
Name="CopyrightLbl"
|
||||||
|
Style="{StaticResource Copyright_AboutBox_TextBlock}"/>
|
||||||
|
<Button Grid.Row="7"
|
||||||
|
Grid.Column="3"
|
||||||
|
Style="{StaticResource AboutBoxOk_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class AboutBoxV
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
Me.Owner = Application.Current.MainWindow
|
||||||
|
DescriptionLbl.Text = My.Application.Info.Description.ToString()
|
||||||
|
VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() &
|
||||||
|
"." & My.Application.Info.Version.Minor.ToString() &
|
||||||
|
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||||
|
My.Application.Info.Version.Revision.ToString()
|
||||||
|
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||||
|
Dim sInfo As String = String.Empty
|
||||||
|
Dim sKey As String = String.Empty
|
||||||
|
EgtGetKeyInfo(sKey)
|
||||||
|
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
|
||||||
|
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
|
||||||
|
Dim sLeftDays As String = ""
|
||||||
|
Dim nLeftDays As Integer
|
||||||
|
If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")"
|
||||||
|
sInfo = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
|
||||||
|
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||||
|
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
|
||||||
|
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
|
||||||
|
" Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
|
||||||
|
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||||
|
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
|
||||||
|
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
|
||||||
|
Dim sOpSys As String = String.Empty
|
||||||
|
EgtGetOsInfo(sOpSys)
|
||||||
|
sInfo &= sOpSys & Environment.NewLine
|
||||||
|
Dim sCPU As String = String.Empty
|
||||||
|
EgtGetCpuInfo(sCPU)
|
||||||
|
sInfo &= sCPU & Environment.NewLine
|
||||||
|
Dim sMem As String = String.Empty
|
||||||
|
EgtGetMemoryInfo(sMem)
|
||||||
|
sInfo &= sMem & Environment.NewLine
|
||||||
|
Dim sScene As String = String.Empty
|
||||||
|
EgtGetSceneInfo(sScene)
|
||||||
|
sInfo &= sScene
|
||||||
|
InfoLbl.Text = sInfo
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<Application x:Class="Application"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<Application.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="Utility/EgtStone3DDarkDictionary.xaml"/>
|
||||||
|
<ResourceDictionary Source="Utility/EgtStone3DDictionary.xaml"/>
|
||||||
|
<ResourceDictionary Source="Utility/EgtStone3DDefaultStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Application.Resources>
|
||||||
|
</Application>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
Class Application
|
||||||
|
|
||||||
|
' Gli eventi a livello di applicazione, ad esempio Startup, Exit e DispatcherUnhandledException,
|
||||||
|
' possono essere gestiti in questo file.
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
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
|
||||||
|
' Creo la View principale
|
||||||
|
Me.MainWindow = New MainWindowV
|
||||||
|
' Mostro la View principale
|
||||||
|
Me.MainWindow.Show()
|
||||||
|
' inizializzo finestra interfaccia
|
||||||
|
Dim m_SecondaryWindowWnd = New SecondaryWindowV(Application.Current.MainWindow) With {
|
||||||
|
.Owner = Me.MainWindow
|
||||||
|
}
|
||||||
|
m_SecondaryWindowWnd.Show()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,171 @@
|
|||||||
|
Imports System.IO
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class ParametricCompoVM
|
||||||
|
Inherits SceneUserControlVM
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
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, nVeinCtx As Integer, Optional dir As String = "")
|
||||||
|
MyBase.New()
|
||||||
|
m_nVeinCtx = nVeinCtx
|
||||||
|
Title = EGT_PARAMETRIC.ToUpper()
|
||||||
|
' Recupero path cartella che contiene i componenti
|
||||||
|
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)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Contructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Overrides Sub LoadParamList()
|
||||||
|
' Pulisco lista variabili
|
||||||
|
ParamList.Clear()
|
||||||
|
EgtLuaExecFile(m_sLuaPath)
|
||||||
|
Dim sPar As String = "0"
|
||||||
|
EgtLuaGetGlobStringVar("CMP.Npar", sPar)
|
||||||
|
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()
|
||||||
|
If Not File.Exists(m_sLuaPath) Then
|
||||||
|
EgtOutLog("Matching error: missing file (" & m_sLuaPath & ")")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Parsing
|
||||||
|
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)
|
||||||
|
EgtLuaSetGlobNumVar("CMP.V" & Index, CDbl(_TextBox.sValue))
|
||||||
|
ElseIf TypeOf ParamList(Index) Is _CheckBoxParam Then
|
||||||
|
Dim _CheckBox As _CheckBoxParam = DirectCast(ParamList(Index), _CheckBoxParam)
|
||||||
|
EgtLuaSetGlobBoolVar("CMP.V" & Index, _CheckBox.IsChecked)
|
||||||
|
End If
|
||||||
|
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()
|
||||||
|
Map.refSceneHostVM.m_bPreviewShown = False
|
||||||
|
ExecLua()
|
||||||
|
EgtDraw()
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub Annulla()
|
||||||
|
Dim PartSolidSel As PartSolidM = GetPartSolid(nPartId)
|
||||||
|
SolidManagerM.Delete(nPartId)
|
||||||
|
EgtDraw()
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub ShowPreview()
|
||||||
|
Map.refSceneHostVM.m_bPreviewShown = True
|
||||||
|
ExecLua()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
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
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
Dim sName As String = String.Empty
|
||||||
|
Dim nType As Integer = 0
|
||||||
|
bOk = bOk AndAlso EgtLuaGetGlobStringVar(LUA_NAME & nInd.ToString(), sName)
|
||||||
|
bOk = bOk AndAlso EgtLuaGetGlobIntVar(LUA_TYPE & nInd.ToString(), nType)
|
||||||
|
Return bOk AndAlso FromLua(nInd, sName, nType, Param)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function FromLua(nInd As Integer, sName As String, nType As Integer, ByRef Param As GenericParam) As Boolean
|
||||||
|
Dim sVal As String = String.Empty
|
||||||
|
Dim dVal As Double = 0
|
||||||
|
Dim nVal As Integer = 0
|
||||||
|
Dim bOk As Boolean
|
||||||
|
Select Case nType
|
||||||
|
Case ParamType.BOOL
|
||||||
|
bOk = EgtLuaGetGlobBoolVar(LUA_VALUE & nInd.ToString(), ParamType.BOOL)
|
||||||
|
Param = New _CheckBoxParam(sName, sVal)
|
||||||
|
Return bOk
|
||||||
|
Case ParamType.INT
|
||||||
|
bOk = EgtLuaGetGlobIntVar(LUA_VALUE & nInd.ToString(), nVal)
|
||||||
|
Param = New _TextBoxParam(sName, nVal.ToString(), nType)
|
||||||
|
Return bOk
|
||||||
|
Case ParamType.LEN, ParamType.DOUB
|
||||||
|
bOk = EgtLuaGetGlobNumVar(LUA_VALUE & nInd.ToString(), dVal)
|
||||||
|
Param = New _TextBoxParam(sName, dVal.ToString(), nType)
|
||||||
|
Return bOk
|
||||||
|
Case ParamType.STR
|
||||||
|
bOk = EgtLuaGetGlobStringVar(LUA_VALUE & nInd.ToString(), sVal)
|
||||||
|
Param = New _TextBoxParam(sName, sVal, nType)
|
||||||
|
Return bOk
|
||||||
|
End Select
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
Module ConstEgtStone3D
|
||||||
|
|
||||||
|
Public Const EGT_ROTATE As String = "Rotate"
|
||||||
|
|
||||||
|
Public Const EGT_AUTOPAIR As String = "AutoPair"
|
||||||
|
Public Const EGT_PAIR As String = "Pair"
|
||||||
|
Public Const EGT_UNPAIR As String = "Unpair"
|
||||||
|
Public Const EGT_RESET_INTERS As String = "ResetInters"
|
||||||
|
Public Const EGT_UNDO As String = "Undo"
|
||||||
|
Public Const EGT_REDO As String = "Redo"
|
||||||
|
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_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_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"
|
||||||
|
Public Const EGT_Z As String = "Z"
|
||||||
|
Public Const EGT_XY As String = "XY"
|
||||||
|
Public Const EGT_YX As String = "YX"
|
||||||
|
Public Const EGT_YZ As String = "YZ"
|
||||||
|
Public Const EGT_ZY As String = "ZY"
|
||||||
|
Public Const EGT_ZX As String = "ZX"
|
||||||
|
Public Const EGT_XZ As String = "XZ"
|
||||||
|
|
||||||
|
Public Const ASSEMBLER_FILENAME As String = "AssemblerLog.txt"
|
||||||
|
Public Const TERNA_FILENAME As String = "TernaVeinMatch.nge"
|
||||||
|
Public Const CREATESOLID_FILENAME As String = "CreateSOLID_FromPartsInPark.lua"
|
||||||
|
Public Const OPERATIONSOLID_FILENAME As String = "OperationOnSolid.lua"
|
||||||
|
Public Const DICTIONARY_FILENAME As String = "Dictionary.xaml"
|
||||||
|
|
||||||
|
Public Const ASSEMBLER As String = " Avvio Assembler"
|
||||||
|
|
||||||
|
' unità di misura
|
||||||
|
Public Const MILLIMETER As String = "mm"
|
||||||
|
Public Const INCH As String = "in"
|
||||||
|
|
||||||
|
Public Const CHILD As String = "Child"
|
||||||
|
Public Const SOLID As String = "Solid"
|
||||||
|
Public Const MYSOLIDSURF As String = "MySolidSurf"
|
||||||
|
Public Const PAIRED As String = "Paired"
|
||||||
|
Public Const GROUP As String = "Group"
|
||||||
|
Public Const SURFACE As String = "Surface"
|
||||||
|
Public Const PARENT As String = "Parent"
|
||||||
|
Public Const REGION As String = "Region"
|
||||||
|
Public Const TEMP As String = "Temp"
|
||||||
|
Public Const TERNA As String = "Terna"
|
||||||
|
|
||||||
|
Public Const AXISX As String = "AxisX"
|
||||||
|
Public Const AXISY As String = "AxisY"
|
||||||
|
Public Const AXISZ As String = "AxisZ"
|
||||||
|
|
||||||
|
Public Const OUTLOOP As String = "OutLoop"
|
||||||
|
Public Const INLOOP As String = "InLoop"
|
||||||
|
|
||||||
|
Public Const TOPLIST_BTN As String = "TopListBtn"
|
||||||
|
Public Const LEFTLIST_BTN As String = "LeftListBtn"
|
||||||
|
Public Const RIGHTLIST_BTN As String = "RightListBtn"
|
||||||
|
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"
|
||||||
|
|
||||||
|
Public Const TABLE As String = "Table"
|
||||||
|
|
||||||
|
Public Const SUBTITLE As String = "SubTitle"
|
||||||
|
|
||||||
|
' nome file cn in progetto
|
||||||
|
Public Const KEY_ISOFILE_PATH As String = "IsoFilePath"
|
||||||
|
|
||||||
|
Public Const FILE_PATH As String = "FilePath"
|
||||||
|
|
||||||
|
' info per griglia
|
||||||
|
Public Const GRID_ON As String = "GRID ON "
|
||||||
|
Public Const GRID_OFF As String = "GRID OFF"
|
||||||
|
|
||||||
|
' enum per le fasi di accoppiamento
|
||||||
|
Public Enum PairStage As Integer
|
||||||
|
FirstLine = 0
|
||||||
|
SecondLine = 1
|
||||||
|
FacePair = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' enum per le fasi di rotazione
|
||||||
|
Public Enum RotateStage As Integer
|
||||||
|
SelectPart = 0
|
||||||
|
SelectAxis = 1
|
||||||
|
InsertAngle = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' enum per le fasi di movimento
|
||||||
|
Public Enum MoveStage As Integer
|
||||||
|
SelectPart = 0
|
||||||
|
InsertMovement = 1
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' enum per le fasi di creazione paretina
|
||||||
|
Public Enum NewPanelStage As Integer
|
||||||
|
InsertParam = 0
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' enum per le fasi di modifica paretina
|
||||||
|
Public Enum EditPanelStage As Integer
|
||||||
|
SelectPart = 0
|
||||||
|
InsertNewParam = 1
|
||||||
|
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
|
||||||
|
INT = 2
|
||||||
|
LEN = 3
|
||||||
|
DOUB = 4
|
||||||
|
STR = 5
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Const LUA_CMP_VARS As String = "CMP"
|
||||||
|
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
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
Module ConstGen
|
||||||
|
|
||||||
|
' Abilitazioni licenza
|
||||||
|
Friend Enum KEY_OPT As UInteger
|
||||||
|
BASE = 1 ' Prodotto EgtStone3D
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' File con dati di licenza
|
||||||
|
Public Const LIC_FILE_NAME As String = "EgtCAM5.lic"
|
||||||
|
Public Const S_LICENCE As String = "Licence"
|
||||||
|
Public Const K_LOCKID As String = "LockId"
|
||||||
|
Public Const K_KEY As String = "Key"
|
||||||
|
Public Const K_NESTKEY As String = "NestKey"
|
||||||
|
|
||||||
|
' File di log generale
|
||||||
|
Public Const GENLOG_FILE_NAME As String = "EgtStone3D#.txt"
|
||||||
|
|
||||||
|
' Sottodirettorio di configurazione
|
||||||
|
Public Const CONF_DIR As String = "Config"
|
||||||
|
' Sottodirettorio delle risorse
|
||||||
|
Public Const RES_DIR As String = "Resources"
|
||||||
|
' Sottodirettorio temporaneo
|
||||||
|
Public Const TEMP_DIR As String = "Temp"
|
||||||
|
' Sottodirettorio lavorazioni
|
||||||
|
Public Const MACHININGS_DIR As String = "Machinings"
|
||||||
|
' Sottodirettorio materiali
|
||||||
|
Public Const MATERIALS_DIR As String = "Materials"
|
||||||
|
' Sottodirettorio per lavorazioni travi
|
||||||
|
Public Const _3DPRINTING_DIR As String = "EgtStone3D"
|
||||||
|
' Sottodirettorio di default per le macchine
|
||||||
|
Public Const MACHINES_DFL_DIR As String = "Machines"
|
||||||
|
' Sottodirettorio di default per toolmakers
|
||||||
|
Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers"
|
||||||
|
' Sottodirettorio di configurazione
|
||||||
|
Public Const COMPO_DIR As String = "Compo_Dir"
|
||||||
|
|
||||||
|
' Sottodirettorio del Vein 3D
|
||||||
|
Public Const VEIND3D_DIR As String = "Vein3D_Dir"
|
||||||
|
' Sottodirettorio delle risorse
|
||||||
|
Public Const RESOURCES_DIR As String = "Resources"
|
||||||
|
' Sottodirettorio del Create Solid
|
||||||
|
Public Const CREATESOLID_DIR As String = "CreateSolid"
|
||||||
|
' Sottodirettorio dell'Operation Solid
|
||||||
|
Public Const OPERATIONSOLID_DIR As String = "OperationSolid"
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
Module ConstIni
|
||||||
|
|
||||||
|
Public Const INI_FILE_NAME As String = "EgtStone3D.ini"
|
||||||
|
|
||||||
|
Public Const K_NETKEY As String = "NetKey"
|
||||||
|
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||||
|
Public Const K_LINEWIDTH As String = "LineWidth"
|
||||||
|
Public Const K_CUSTOMCOLORS As String = "CustomColors"
|
||||||
|
Public Const K_VEIND3D As String = "Vein3D"
|
||||||
|
Public Const K_COMPO As String = "Compo"
|
||||||
|
Public Const K_THEMA As String = "Thema"
|
||||||
|
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||||
|
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||||
|
Public Const K_CNCFLAG As String = "CncFlag"
|
||||||
|
Public Const K_TOPPANEL As String = "TopPanelThema"
|
||||||
|
|
||||||
|
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||||
|
Public Const S_COLORS As String = "Colors"
|
||||||
|
Public Const S_MRUFILES As String = "MruFiles"
|
||||||
|
Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
|
||||||
|
Public Const S_IMPORT As String = "Import"
|
||||||
|
Public Const K_GRIDSTATE As String = "GridState"
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
<EgtWPFLib5:EgtMainWindow x:Class="EgtColorPickerV"
|
||||||
|
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"
|
||||||
|
Title="{Binding sTitle}"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Style="{StaticResource ColorPicker_Window}">
|
||||||
|
|
||||||
|
<Grid Style="{StaticResource TopPanel_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Style="{StaticResource TopPanel_Grid}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid Style="{StaticResource TopPanel_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TabControl Style="{StaticResource TreeView_TC}">
|
||||||
|
<TabItem Header="{Binding BasicColor_Msg}">
|
||||||
|
<Grid Style="{StaticResource EgtColorPicker_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ListBox ItemsSource="{Binding BasicColors}"
|
||||||
|
SelectedItem="{Binding SelColor}"
|
||||||
|
ItemContainerStyle="{StaticResource BasicColorsItem_ListBox}"
|
||||||
|
Style="{StaticResource BasicColors_ListBox}">
|
||||||
|
<ListBox.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Columns="13"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ListBox.ItemsPanel>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Rectangle Fill="{Binding Fill}"
|
||||||
|
Style="{StaticResource EgtColorPicker_Rect}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{Binding ColorPicker_Msg}">
|
||||||
|
<TabItem.Resources>
|
||||||
|
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
|
||||||
|
<Setter Property="BorderThickness" Value="1.5"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource EgalwareWhite}"/>
|
||||||
|
</Style>
|
||||||
|
</TabItem.Resources>
|
||||||
|
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
|
||||||
|
SelectedItem="{Binding sHexSelColor}"
|
||||||
|
Style="{StaticResource EgtHexList}">
|
||||||
|
<EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||||
|
<DataTemplate/>
|
||||||
|
</EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||||
|
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||||
|
<Style TargetType="EgtWPFLib5:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
|
||||||
|
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
|
||||||
|
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
|
||||||
|
<Setter Property="Background" Value="{Binding Background}"/>
|
||||||
|
</Style>
|
||||||
|
</EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||||
|
</EgtWPFLib5:EgtHexList>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{Binding ColorPickerTheme_Msg}">
|
||||||
|
<Grid Style="{StaticResource EgtColorPicker_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ListBox ItemsSource="{Binding BasicColorsTheme}"
|
||||||
|
SelectedItem="{Binding SelColorTheme}"
|
||||||
|
ItemContainerStyle="{StaticResource BasicColorsItem_ListBox}"
|
||||||
|
Style="{StaticResource BasicColorsTheme_ListBox}">
|
||||||
|
<ListBox.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Columns="13"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ListBox.ItemsPanel>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Rectangle Fill="{Binding Fill}"
|
||||||
|
Style="{StaticResource EgtColorPicker_Rect}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Column="1"
|
||||||
|
Style="{StaticResource CustomColor_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding CustomColor_Msg}"
|
||||||
|
Style="{StaticResource CustomColor_TxBl}"/>
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ListBox ItemsSource="{Binding CustomColors}"
|
||||||
|
SelectedItem="{Binding SelCustomColor}"
|
||||||
|
ItemContainerStyle="{StaticResource BasicColorsItem_ListBox}"
|
||||||
|
Style="{StaticResource BasicColors_ListBox}">
|
||||||
|
<ListBox.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Columns="13"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ListBox.ItemsPanel>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Rectangle Fill="{Binding Fill}"
|
||||||
|
Style="{StaticResource EgtColorPicker_Rect}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="2"
|
||||||
|
Style="{StaticResource CurrColor_Grid}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid Style="{StaticResource SaveColor_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Rectangle Fill="{Binding CurrColor}"
|
||||||
|
Style="{StaticResource CurrColor_Rect}"/>
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
x:Name="SaveColor"
|
||||||
|
Content="{Binding AddCColor_Msg}"
|
||||||
|
Command="{Binding SaveColor_Command}"
|
||||||
|
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Column="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding Red_Msg}"
|
||||||
|
Style="{StaticResource Red_TxBl}"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{StaticResource Red_TxBx}"/>
|
||||||
|
<TextBlock Grid.Row="1"
|
||||||
|
Text="{Binding Green_Msg}"
|
||||||
|
Style="{StaticResource Color_TxBl}"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{StaticResource ColorPicker_TxBx}"/>
|
||||||
|
<TextBlock Grid.Row="2"
|
||||||
|
Text="{Binding Blu_Msg}"
|
||||||
|
Style="{StaticResource Color_TxBl}"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{StaticResource ColorPicker_TxBx}"/>
|
||||||
|
<TextBlock Grid.Row="3"
|
||||||
|
Text="{Binding Hexadecimal_Msg}"
|
||||||
|
Style="{StaticResource Color_TxBl}"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
Text="{Binding Hexadecimal}"
|
||||||
|
Style="{StaticResource ColorPicker_TxBx}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<UniformGrid Grid.Row="2"
|
||||||
|
Rows="1"
|
||||||
|
Style="{StaticResource EgtColorPicker_UniformGrid}">
|
||||||
|
<Button IsDefault="True"
|
||||||
|
Content="OK"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
Style="{StaticResource EgtColorPicker_Btn}"/>
|
||||||
|
<Button Content="Cancel"
|
||||||
|
Command="{Binding Cancel_Command}"
|
||||||
|
Style="{StaticResource EgtColorPicker_Btn}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
|
Public Class EgtColorPickerV
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
|
||||||
|
|
||||||
|
Private Shadows DialogResult As DialogResult
|
||||||
|
|
||||||
|
Public Property CustomColors As Integer()
|
||||||
|
Get
|
||||||
|
Return m_EgtColorPickerVM.GetCustomColors()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer())
|
||||||
|
m_EgtColorPickerVM.SetCustomColors(value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Color As System.Drawing.Color
|
||||||
|
Get
|
||||||
|
Return System.Drawing.Color.FromArgb(255, m_EgtColorPickerVM.Red, m_EgtColorPickerVM.Green, m_EgtColorPickerVM.Blue)
|
||||||
|
End Get
|
||||||
|
Set(value As System.Drawing.Color)
|
||||||
|
m_EgtColorPickerVM.Red = value.R
|
||||||
|
m_EgtColorPickerVM.Green = value.G
|
||||||
|
m_EgtColorPickerVM.Blue = value.B
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONTRUCTORS"
|
||||||
|
|
||||||
|
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
|
||||||
|
MyBase.New(Owner)
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = EtgColorPickerVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_EgtColorPickerVM = EtgColorPickerVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructors
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
|
||||||
|
Me.DialogResult = DialogResult
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Events
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Apre una finestra EgtColorPicker
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overloads Function ShowDialog() As DialogResult
|
||||||
|
MyBase.ShowDialog()
|
||||||
|
Return Me.DialogResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,332 @@
|
|||||||
|
<EgtWPFLib5:EgtMainWindow x:Class="EgtManageFileDialogV"
|
||||||
|
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 sTitle}"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Style="{StaticResource ManageFileDialogV_Window}">
|
||||||
|
|
||||||
|
<Grid Style="{StaticResource TopPanel_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Style="{StaticResource TopPanel_Grid}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Command="{Binding GoBack_Command}"
|
||||||
|
Style="{StaticResource GoBack_Btn}">
|
||||||
|
<Image Source="\Resources\EgtDialog\Restore.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Text="{Binding sSelPath}"
|
||||||
|
Style="{StaticResource SelPath_TxBl}"/>
|
||||||
|
<ComboBox Grid.Column="2"
|
||||||
|
ItemsSource="{Binding ViewModeList}"
|
||||||
|
SelectedItem="{Binding SelViewMode}"
|
||||||
|
Style="{StaticResource ViewMode_CmBx}"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1"
|
||||||
|
Style="{StaticResource TopPanel_Grid}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TreeView x:Name="FileTree"
|
||||||
|
ItemsSource="{Binding RootList}"
|
||||||
|
Style="{StaticResource FileTree_TV}">
|
||||||
|
<TreeView.Resources>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type EgtStone3D:EgtFolder}"
|
||||||
|
ItemsSource="{Binding TreeItemList_View}">
|
||||||
|
<StackPanel Style="{StaticResource SceneButtonH_StackPanel}">
|
||||||
|
<Image Source="{Binding sIconSource}"
|
||||||
|
Style="{StaticResource IconSource_Img}"/>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Style="{StaticResource DialogWindow_TxBl}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:EgtItem}">
|
||||||
|
<StackPanel Style="{StaticResource SceneButtonH_StackPanel}">
|
||||||
|
<Image Source="{Binding sIconSource}"
|
||||||
|
Style="{StaticResource IconSource_Img}"/>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Style="{StaticResource DialogWindow_TxBl}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</TreeView.Resources>
|
||||||
|
<TreeView.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TreeViewItem}">
|
||||||
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
||||||
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
||||||
|
</Style>
|
||||||
|
</TreeView.ItemContainerStyle>
|
||||||
|
</TreeView>
|
||||||
|
<TabControl Grid.Column="1"
|
||||||
|
SelectedIndex="{Binding nSelTab}"
|
||||||
|
Style="{StaticResource TreeView_TC}">
|
||||||
|
<TabControl.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TabItem}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Style>
|
||||||
|
</TabControl.ItemContainerStyle>
|
||||||
|
<TabItem Header="LISTBOX">
|
||||||
|
<ListBox Grid.Row="1"
|
||||||
|
x:Name="FileList"
|
||||||
|
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||||
|
SelectedItem="{Binding ItemSelected, Mode=TwoWay}"
|
||||||
|
Margin="5,5,5,5"
|
||||||
|
BorderThickness="0"
|
||||||
|
Background="{DynamicResource ListBox.Static.Background}"
|
||||||
|
IsSynchronizedWithCurrentItem="True">
|
||||||
|
<ListBox.Resources>
|
||||||
|
<DataTemplate x:Key="ListTemplateView"
|
||||||
|
DataType="{x:Type EgtStone3D:EgtDirectory}">
|
||||||
|
<Grid Style="{StaticResource ListTemplateView_Grid}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{Binding sIconSource}"
|
||||||
|
Style="{StaticResource IconSource_Img}"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Text="{Binding sName}"
|
||||||
|
Style="{StaticResource DialogWindow_TxBl}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate x:Key="TilesTemplateView"
|
||||||
|
DataType="{x:Type EgtStone3D:EgtDirectory}">
|
||||||
|
<Grid Style="{StaticResource TilesTemplateView_Grid}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{Binding sIconSource}"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
<UniformGrid Grid.Column="1"
|
||||||
|
Rows="3"
|
||||||
|
Style="{StaticResource TemplateView_UniformGrid}">
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Style="{StaticResource TemplateView_TxBl}"/>
|
||||||
|
<TextBlock Text="{Binding ghTypeItem}"
|
||||||
|
Style="{StaticResource TemplateView_TxBl}"/>
|
||||||
|
<TextBlock Text="{Binding sDimension}"
|
||||||
|
Style="{StaticResource TemplateView_TxBl}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate x:Key="ContentTemplateView"
|
||||||
|
DataType="{x:Type EgtStone3D:EgtDirectory}">
|
||||||
|
<Grid Style="{StaticResource ContentTemplateView_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{Binding sIconSource}"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
<UniformGrid Grid.Column="1"
|
||||||
|
Rows="2"
|
||||||
|
Style="{StaticResource TemplateView_UniformGrid}">
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Style="{StaticResource TemplateView_TxBl}"/>
|
||||||
|
<TextBlock Text="{Binding ghTypeItem}"
|
||||||
|
Style="{StaticResource TemplateView_TxBl}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<UniformGrid Grid.Column="2"
|
||||||
|
Rows="2"
|
||||||
|
Style="{StaticResource TemplateView_UniformGrid}">
|
||||||
|
<TextBlock Text="{Binding sLastModifyDate}"
|
||||||
|
Style="{StaticResource TemplateView_TxBl}"/>
|
||||||
|
<TextBlock Text="{Binding sDimension}"
|
||||||
|
Style="{StaticResource TemplateView_TxBl}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
Style="{StaticResource TemplateView_Border}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.Resources>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:EgtDirectory}">
|
||||||
|
<ContentControl Content="{Binding}">
|
||||||
|
<ContentControl.Style>
|
||||||
|
<Style TargetType="{x:Type ContentControl}">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="0">
|
||||||
|
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="1">
|
||||||
|
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}" Value="2">
|
||||||
|
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</ContentControl.Style>
|
||||||
|
</ContentControl>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick"/>
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
|
<ListBox.Style>
|
||||||
|
<Style TargetType="{x:Type ListBox}">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"
|
||||||
|
Value="0">
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
|
||||||
|
<Setter Property="ItemsPanel">
|
||||||
|
<Setter.Value>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<WrapPanel Orientation="Vertical"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"
|
||||||
|
Value="1">
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="ItemsPanel">
|
||||||
|
<Setter.Value>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<WrapPanel Orientation="Horizontal"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"
|
||||||
|
Value="2">
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="ItemsPanel">
|
||||||
|
<Setter.Value>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Vertical"
|
||||||
|
HorizontalAlignment="Stretch"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</ListBox.Style>
|
||||||
|
</ListBox>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="DATAGRID">
|
||||||
|
<DataGrid ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||||
|
SelectedItem="{Binding ItemSelected}"
|
||||||
|
ColumnHeaderStyle="{StaticResource DataGridColumnHeader}"
|
||||||
|
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||||
|
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTemplateColumn Width="5*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||||
|
Style="{StaticResource DataGrid_TxBl}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{Binding sIconSource}"
|
||||||
|
Style="{StaticResource Name_Image}"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Text="{Binding sName}"
|
||||||
|
Style="{StaticResource Name_TxBl}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
|
||||||
|
Width="2*"
|
||||||
|
ElementStyle="{StaticResource DataGridTextColumn_TxBl}">
|
||||||
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||||
|
Style="{StaticResource DataGrid_TxBl}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Binding="{Binding ghTypeItem}"
|
||||||
|
Width="1*"
|
||||||
|
ElementStyle="{StaticResource DataGridTextColumn_TxBl}">
|
||||||
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||||
|
Style="{StaticResource DataGrid_TxBl}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Binding="{Binding sDimension}"
|
||||||
|
Width="1*"
|
||||||
|
ElementStyle="{StaticResource DataGridTextRColumn_TxBl}">
|
||||||
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||||
|
Style="{StaticResource DataGrid_TxBl}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
<DataGrid.InputBindings>
|
||||||
|
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"/>
|
||||||
|
</DataGrid.InputBindings>
|
||||||
|
</DataGrid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="2"
|
||||||
|
Style="{StaticResource TopPanel_Grid}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding FileName_Msg}"
|
||||||
|
Style="{StaticResource FileName_TxBl}"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||||
|
Style="{StaticResource ParameterList_TxBx}"/>
|
||||||
|
<ComboBox Grid.Column="2"
|
||||||
|
ItemsSource="{Binding FilterList}"
|
||||||
|
SelectedItem="{Binding SelFilter, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
DisplayMemberPath="sNameExstension"
|
||||||
|
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||||
|
</Grid>
|
||||||
|
<UniformGrid Grid.Row="3"
|
||||||
|
Rows="1"
|
||||||
|
Style="{StaticResource Button_UniformGrid}">
|
||||||
|
<Button IsDefault="True"
|
||||||
|
Content="OK"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
Style="{StaticResource Ok_Btn}"/>
|
||||||
|
<Button Content="Cancel"
|
||||||
|
IsCancel="True"
|
||||||
|
Command="{Binding Cancel_Command}"
|
||||||
|
Style="{StaticResource Cancel_Btn}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
|
Public Class EgtManageFileDialogV
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
|
||||||
|
|
||||||
|
Private Shadows DialogResult As DialogResult
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Stringa che specifica il titolo da mostrare
|
||||||
|
''' </summary>
|
||||||
|
Public Overloads Property Title As String
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.sTitle
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_EgtManageFileDialogVM.sTitle = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Filter As String
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.sFilter
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_EgtManageFileDialogVM.sFilter = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SelFilter As EgtExstension
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.SelFilter
|
||||||
|
End Get
|
||||||
|
Set(value As EgtExstension)
|
||||||
|
m_EgtManageFileDialogVM.SelFilter = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property InitialDirectory As String
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.sInitialDirectory
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_EgtManageFileDialogVM.sInitialDirectory = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SafeFileName As String
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.sSaveFileName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_EgtManageFileDialogVM.sSaveFileName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FileName As String
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.sFileName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_EgtManageFileDialogVM.sFileName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FilterIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.nFilterIndex
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_EgtManageFileDialogVM.nFilterIndex = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Mode As Integer
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.nMode
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_EgtManageFileDialogVM.nMode = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property CheckFileExists As Boolean
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.bCheckFileExists
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_EgtManageFileDialogVM.bCheckFileExists = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ValidateNames As Boolean
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.bValidateNames
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_EgtManageFileDialogVM.bValidateNames = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property OverwritePrompt As Boolean
|
||||||
|
Get
|
||||||
|
Return m_EgtManageFileDialogVM.bOverwritePrompt
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_EgtManageFileDialogVM.bOverwritePrompt = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONTRUCTORS"
|
||||||
|
|
||||||
|
Sub New(Owner As Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
|
||||||
|
MyBase.New(Owner)
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = EgtManageFileDialogVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_EgtManageFileDialogVM = EgtManageFileDialogVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
|
||||||
|
Me.DialogResult = DialogResult
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Events
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Overloads Function ShowDialog() As DialogResult
|
||||||
|
MyBase.ShowDialog()
|
||||||
|
Return Me.DialogResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub ListBoxItem_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||||
|
m_EgtManageFileDialogVM.MouseDoubleClick()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,944 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Windows.Forms
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports System.Data
|
||||||
|
|
||||||
|
Public Class EgtManageFileDialogVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Public Enum VisualizationContainerType As Integer
|
||||||
|
LISTBOX = 0
|
||||||
|
DATAGRID = 1
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum VisualizationType As Integer
|
||||||
|
LISTTEMPLATE = 0
|
||||||
|
TILESTEMPLATE = 1
|
||||||
|
CONTENTTEMPLATE = 2
|
||||||
|
DETAILSTEMPLATE = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum ModeTypes As Integer
|
||||||
|
FILE = 1
|
||||||
|
FOLDER = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_sTitle As String
|
||||||
|
Public Property sTitle As String
|
||||||
|
Get
|
||||||
|
Return m_sTitle
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sTitle = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Scelta della modalità di salvataggio 1 = file 2 = folder
|
||||||
|
Private m_nMode As Integer
|
||||||
|
Public Property nMode As Integer
|
||||||
|
Get
|
||||||
|
Return m_nMode
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nMode = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bCheckFileExists As Boolean
|
||||||
|
Public Property bCheckFileExists As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bCheckFileExists
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bCheckFileExists = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bValidateNames As Boolean
|
||||||
|
Public Property bValidateNames As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bValidateNames
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bValidateNames = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bOverwritePrompt As Boolean
|
||||||
|
Public Property bOverwritePrompt As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bOverwritePrompt
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bOverwritePrompt = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_RootList As New ObservableCollection(Of EgtDirectory)
|
||||||
|
Public Property RootList As ObservableCollection(Of EgtDirectory)
|
||||||
|
Get
|
||||||
|
Return m_RootList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of EgtDirectory))
|
||||||
|
m_RootList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public m_SelTreeItem As EgtDirectory
|
||||||
|
Public Property SelTreeItem As EgtDirectory
|
||||||
|
Get
|
||||||
|
Return m_SelTreeItem
|
||||||
|
End Get
|
||||||
|
Set(value As EgtDirectory)
|
||||||
|
m_SelTreeItem = value
|
||||||
|
NotifyPropertyChanged(NameOf(SelTreeItem))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub UpdateSelTreeItem(Item As EgtDirectory)
|
||||||
|
m_SelTreeItem = Item
|
||||||
|
NotifyPropertyChanged(NameOf(SelTreeItem))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public m_ItemSelected As EgtDirectory
|
||||||
|
Public Property ItemSelected As EgtDirectory
|
||||||
|
Get
|
||||||
|
Return m_ItemSelected
|
||||||
|
End Get
|
||||||
|
Set(value As EgtDirectory)
|
||||||
|
m_ItemSelected = value
|
||||||
|
Dim Item As EgtItem = TryCast(m_ItemSelected, EgtItem)
|
||||||
|
If Not IsNothing(Item) Then
|
||||||
|
sSaveFileName = Item.sName
|
||||||
|
Else
|
||||||
|
Dim Folder As EgtFolder = TryCast(m_ItemSelected, EgtFolder)
|
||||||
|
If Not IsNothing(Folder) Then
|
||||||
|
sSaveFileName = Folder.sName
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetItemSelected(value As EgtDirectory)
|
||||||
|
m_ItemSelected = value
|
||||||
|
NotifyPropertyChanged(NameOf(ItemSelected))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Percorso del file o della cartella
|
||||||
|
Private m_sSelPath As String
|
||||||
|
Public Overloads Property sSelPath As String
|
||||||
|
Get
|
||||||
|
Return m_sSelPath
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sSelPath = value
|
||||||
|
NotifyPropertyChanged(NameOf(sSelPath))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Textbox per visualizzare il file o la folder selezionata
|
||||||
|
Private m_sSaveFileName As String
|
||||||
|
Public Property sSaveFileName As String
|
||||||
|
Get
|
||||||
|
Return m_sSaveFileName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sSaveFileName = value
|
||||||
|
NotifyPropertyChanged(NameOf(sSaveFileName))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Lista filtri estensione
|
||||||
|
Private m_FilterList As ObservableCollection(Of EgtExstension)
|
||||||
|
Public Property FilterList As ObservableCollection(Of EgtExstension)
|
||||||
|
Get
|
||||||
|
Return m_FilterList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of EgtExstension))
|
||||||
|
m_FilterList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Scelta filtro estensione per visualizzazione
|
||||||
|
Public m_SelFilter As EgtExstension
|
||||||
|
Public Property SelFilter As EgtExstension
|
||||||
|
Get
|
||||||
|
Return m_SelFilter
|
||||||
|
End Get
|
||||||
|
Set(value As EgtExstension)
|
||||||
|
m_SelFilter = value
|
||||||
|
Dim CurrItem As EgtFolder = TryCast(m_SelTreeItem, EgtFolder)
|
||||||
|
If Not IsNothing(CurrItem) Then
|
||||||
|
CollectionViewSource.GetDefaultView(CurrItem.FolderList).Refresh()
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Lista modalita' di visualizzazione
|
||||||
|
Private m_ViewModeList As ObservableCollection(Of IdNameStruct)
|
||||||
|
Public Property ViewModeList As ObservableCollection(Of IdNameStruct)
|
||||||
|
Get
|
||||||
|
Return m_ViewModeList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of IdNameStruct))
|
||||||
|
m_ViewModeList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Scelta modalita' di visualizzazione
|
||||||
|
Private m_SelViewMode As IdNameStruct
|
||||||
|
Public Property SelViewMode As IdNameStruct
|
||||||
|
Get
|
||||||
|
Return m_SelViewMode
|
||||||
|
End Get
|
||||||
|
Set(value As IdNameStruct)
|
||||||
|
m_SelViewMode = value
|
||||||
|
Select Case m_SelViewMode.Id
|
||||||
|
Case VisualizationType.LISTTEMPLATE
|
||||||
|
m_nSelTab = VisualizationContainerType.LISTBOX
|
||||||
|
nSelTempleteListView = 0
|
||||||
|
WriteMainPrivateProfileString(S_TEMPLETESEL, K_CURRTEMPLETESEL, VisualizationType.LISTTEMPLATE)
|
||||||
|
Case VisualizationType.TILESTEMPLATE
|
||||||
|
m_nSelTab = VisualizationContainerType.LISTBOX
|
||||||
|
nSelTempleteListView = 1
|
||||||
|
WriteMainPrivateProfileString(S_TEMPLETESEL, K_CURRTEMPLETESEL, VisualizationType.TILESTEMPLATE)
|
||||||
|
Case VisualizationType.CONTENTTEMPLATE
|
||||||
|
m_nSelTab = VisualizationContainerType.LISTBOX
|
||||||
|
nSelTempleteListView = 2
|
||||||
|
WriteMainPrivateProfileString(S_TEMPLETESEL, K_CURRTEMPLETESEL, VisualizationType.CONTENTTEMPLATE)
|
||||||
|
Case VisualizationType.DETAILSTEMPLATE
|
||||||
|
m_nSelTab = VisualizationContainerType.DATAGRID
|
||||||
|
WriteMainPrivateProfileString(S_TEMPLETESEL, K_CURRTEMPLETESEL, VisualizationType.DETAILSTEMPLATE)
|
||||||
|
End Select
|
||||||
|
NotifyPropertyChanged(NameOf(nSelTab))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Indice modalita' di visualizzazione
|
||||||
|
Private m_nSelViewModeIndex As Integer
|
||||||
|
Public Property nSelViewModeIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_nSelViewModeIndex
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nSelViewModeIndex = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Indice di selezione del TabControl che cambia la ListBox/DataGrid
|
||||||
|
Private m_nSelTab As Integer
|
||||||
|
Public Property nSelTab As Integer
|
||||||
|
Get
|
||||||
|
Return m_nSelTab
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nSelTab = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Initial data from window opening"
|
||||||
|
|
||||||
|
' Indice del filtro estensione impostato durante creazione finestra
|
||||||
|
Private m_nFilterIndex As Integer
|
||||||
|
Public Property nFilterIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_nFilterIndex
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nFilterIndex = value
|
||||||
|
m_SelFilter = m_FilterList.FirstOrDefault(Function(x) x.nIndexExstension = m_nFilterIndex)
|
||||||
|
sFileName = Path.GetFileNameWithoutExtension(sFileName) & m_SelFilter.sExstension.Trim("*"c)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' lista delle estensioni impostata durante creazione finestra
|
||||||
|
Private m_sFilter As String
|
||||||
|
Public Property sFilter As String
|
||||||
|
Get
|
||||||
|
Return m_sFilter
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sFilter = value
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
If Not IsNothing(sFilter) Then
|
||||||
|
Dim FilterListSplit As String() = sFilter.Split("|"c)
|
||||||
|
For i As Integer = 0 To FilterListSplit.Count - 1
|
||||||
|
If i Mod 2 = 0 Then
|
||||||
|
Dim strExstension As New EgtExstension() With {.m_nIndexExstension = nIndex, .m_sNameExstension = FilterListSplit(i), .m_sExstension = FilterListSplit(i + 1)}
|
||||||
|
m_FilterList.Add(strExstension)
|
||||||
|
nIndex += 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Path della cartella iniziale impostata durante creazione finestra
|
||||||
|
Private m_sInitialDirectory As String
|
||||||
|
Public Property sInitialDirectory As String
|
||||||
|
Get
|
||||||
|
Return m_sInitialDirectory
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sInitialDirectory = value
|
||||||
|
If m_sFileName = String.Empty Then m_sSaveFileName = "New.nge"
|
||||||
|
m_sSelPath = m_sInitialDirectory
|
||||||
|
|
||||||
|
Dim DirectoryStart As String() = m_sInitialDirectory.Split("\"c)
|
||||||
|
Dim m_RootListTmp As New ObservableCollection(Of EgtDirectory)
|
||||||
|
Dim dir As EgtDirectory
|
||||||
|
Dim count As Integer = 1
|
||||||
|
Dim currItem As EgtFolder
|
||||||
|
m_RootListTmp = m_RootList
|
||||||
|
|
||||||
|
For Each directory As String In DirectoryStart
|
||||||
|
dir = m_RootListTmp.FirstOrDefault(Function(x) x.sName.Trim("\") = directory)
|
||||||
|
If Not IsNothing(dir) Then
|
||||||
|
dir.IsExpanded = True
|
||||||
|
currItem = TryCast(dir, EgtFolder)
|
||||||
|
m_RootListTmp = currItem.FolderList
|
||||||
|
If count = DirectoryStart.Count Then
|
||||||
|
dir.IsSelected = True
|
||||||
|
Else
|
||||||
|
count += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Nome del file iniziale impostato durante creazione finestra
|
||||||
|
Private m_sFileName As String
|
||||||
|
Public Property sFileName As String
|
||||||
|
Get
|
||||||
|
Return m_sFileName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sFileName = value
|
||||||
|
m_sSaveFileName = m_sFileName
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Initial data from window opening
|
||||||
|
|
||||||
|
' Scelta per la visualizzazione del templete della lista
|
||||||
|
Private m_nSelTempleteListView As Integer
|
||||||
|
Public Property nSelTempleteListView As Integer
|
||||||
|
Get
|
||||||
|
Return m_nSelTempleteListView
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nSelTempleteListView = value
|
||||||
|
NotifyPropertyChanged(NameOf(nSelTempleteListView))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property Name_Msg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(15060) ' Nome
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property LastModify_Msg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(15061) ' Ultima Modifica
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Type_Msg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(15062) ' Tipo
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Dimension_Msg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(15063) ' Dimensione
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property FileName_Msg As String
|
||||||
|
Get
|
||||||
|
' Nome File Nome Cartella
|
||||||
|
Return If(m_nMode = ModeTypes.FILE, EgtMsg(15065), EgtMsg(15066))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
' Comandi
|
||||||
|
Private m_cmdCancel As ICommand
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
Private m_cmdGoBack As ICommand
|
||||||
|
Private m_cmdDoubleClick As ICommand
|
||||||
|
Friend Event m_CloseWindow(bDialogResult As DialogResult)
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONTRUCTORS"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
m_RootList.Clear()
|
||||||
|
EgtDirectory.refUpdateSelTreeItem = AddressOf UpdateSelTreeItem
|
||||||
|
Dim drives As DriveInfo() = DriveInfo.GetDrives().Where(Function(d) d.IsReady).ToArray()
|
||||||
|
|
||||||
|
m_FilterList = New ObservableCollection(Of EgtExstension)
|
||||||
|
|
||||||
|
EgtFolder.SetEgtManageFileDialogVM(Me)
|
||||||
|
|
||||||
|
For i As Integer = 0 To drives.Count() - 1
|
||||||
|
Dim directory As New EgtFolder(drives(i).RootDirectory, Nothing, "\Resources\EgtDialog\Root.png")
|
||||||
|
m_RootList.Add(directory)
|
||||||
|
Next
|
||||||
|
|
||||||
|
m_SelFilter = New EgtExstension()
|
||||||
|
SetVisualizzationList()
|
||||||
|
|
||||||
|
Dim IndexTemplete As Integer = GetMainPrivateProfileInt(S_TEMPLETESEL, K_CURRTEMPLETESEL, VisualizationContainerType.DATAGRID)
|
||||||
|
|
||||||
|
SelViewMode = m_ViewModeList.FirstOrDefault(Function(x) x.Id = IndexTemplete)
|
||||||
|
|
||||||
|
NotifyPropertyChanged(NameOf(RootList))
|
||||||
|
NotifyPropertyChanged(NameOf(FilterList))
|
||||||
|
NotifyPropertyChanged(NameOf(ViewModeList))
|
||||||
|
NotifyPropertyChanged(NameOf(FileName_Msg))
|
||||||
|
NotifyPropertyChanged(NameOf(SelViewMode))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructors
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Inizializza la ComboBox per la scelta dei template
|
||||||
|
''' </summary>
|
||||||
|
Private Sub SetVisualizzationList()
|
||||||
|
m_ViewModeList = New ObservableCollection(Of IdNameStruct)
|
||||||
|
Dim ItemVisualization As New IdNameStruct With {
|
||||||
|
.Id = 0,
|
||||||
|
.Name = EgtMsg(15067) ' Elenco
|
||||||
|
}
|
||||||
|
m_ViewModeList.Add(ItemVisualization)
|
||||||
|
ItemVisualization.Id = 3
|
||||||
|
ItemVisualization.Name = EgtMsg(15068) ' Dettagli
|
||||||
|
m_ViewModeList.Add(ItemVisualization)
|
||||||
|
ItemVisualization.Id = 1
|
||||||
|
ItemVisualization.Name = EgtMsg(15069) ' Riquadri
|
||||||
|
m_ViewModeList.Add(ItemVisualization)
|
||||||
|
ItemVisualization.Id = 2
|
||||||
|
ItemVisualization.Name = EgtMsg(15070) ' Contenuto
|
||||||
|
m_ViewModeList.Add(ItemVisualization)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Ok"
|
||||||
|
|
||||||
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf Ok)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Ok()
|
||||||
|
Dim CurrItem As EgtItem = TryCast(m_ItemSelected, EgtItem)
|
||||||
|
Dim simbolsCharacter As String() = {"<"c, ">"c, ":"c, "'"c, "/"c, "\"c, "|"c, "?"c, "*"c,
|
||||||
|
"CON", "PRN", "AUX", "NUL", "COM0", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
|
||||||
|
"LPT0", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"}
|
||||||
|
|
||||||
|
If nMode = ModeTypes.FILE Then
|
||||||
|
If Not IsNothing(CurrItem) And m_bCheckFileExists And m_bValidateNames Then
|
||||||
|
For Each simbol As String In simbolsCharacter
|
||||||
|
If m_sSaveFileName.Contains(simbol) Then
|
||||||
|
' Errore file contiene simboli non conformi
|
||||||
|
If EgtStone3D.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(15072), sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.Cancel Then
|
||||||
|
sSaveFileName = CurrItem.sName
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
m_sFileName = m_SelTreeItem.sFullName & "\" & m_sSaveFileName
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
ElseIf m_bValidateNames = False And m_bOverwritePrompt Then
|
||||||
|
If Not IsNothing(CurrItem) Then
|
||||||
|
If m_sFileName.Equals(m_sSaveFileName) OrElse m_sSaveFileName.Equals(CurrItem.sName) Then
|
||||||
|
' File già esistente. Vuoi sovrascrivere?
|
||||||
|
If EgtStone3D.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(15073), sTitle, MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
m_sFileName = m_SelTreeItem.sFullName & "\" & m_sSaveFileName
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
m_sFileName = m_SelTreeItem.sFullName & "\" & m_sSaveFileName
|
||||||
|
End If
|
||||||
|
ElseIf nMode = ModeTypes.FOLDER Then
|
||||||
|
For Each simbol As String In simbolsCharacter
|
||||||
|
If m_sSaveFileName.Contains(simbol) Then
|
||||||
|
' Errore file contiene simboli non conformi
|
||||||
|
If EgtStone3D.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(15072), sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.Cancel Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
m_sFileName = m_SelTreeItem.sFullName
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
RaiseEvent m_CloseWindow(DialogResult.OK)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region 'Ok
|
||||||
|
|
||||||
|
#Region "GoBack"
|
||||||
|
|
||||||
|
Public ReadOnly Property GoBack_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdGoBack Is Nothing Then
|
||||||
|
m_cmdGoBack = New Command(AddressOf GoBack)
|
||||||
|
End If
|
||||||
|
Return m_cmdGoBack
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub GoBack()
|
||||||
|
If Not IsNothing(m_SelTreeItem) AndAlso Not IsNothing(m_SelTreeItem.m_ParentFolder) Then
|
||||||
|
If TypeOf m_SelTreeItem.m_ParentFolder Is EgtFolder Then
|
||||||
|
Dim CurrParentFolder As EgtFolder = DirectCast(m_SelTreeItem.m_ParentFolder, EgtFolder)
|
||||||
|
CurrParentFolder.SetIsSelected(True, False)
|
||||||
|
End If
|
||||||
|
m_sSelPath = DirectCast(m_SelTreeItem, EgtFolder).sFullName
|
||||||
|
NotifyPropertyChanged(NameOf(sSelPath))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region 'GoBack
|
||||||
|
|
||||||
|
#Region "Cancel"
|
||||||
|
|
||||||
|
Public ReadOnly Property Cancel_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCancel Is Nothing Then
|
||||||
|
m_cmdCancel = New Command(AddressOf Cancel)
|
||||||
|
End If
|
||||||
|
Return m_cmdCancel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Cancel()
|
||||||
|
RaiseEvent m_CloseWindow(DialogResult.Cancel)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region 'Cancel
|
||||||
|
|
||||||
|
#Region "DoubleClick"
|
||||||
|
|
||||||
|
Public ReadOnly Property DoubleClick_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDoubleClick Is Nothing Then
|
||||||
|
m_cmdDoubleClick = New Command(AddressOf MouseDoubleClick)
|
||||||
|
End If
|
||||||
|
Return m_cmdDoubleClick
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub MouseDoubleClick()
|
||||||
|
m_ItemSelected.IsExpanded = True
|
||||||
|
If TypeOf m_ItemSelected Is EgtFolder Then
|
||||||
|
Dim CurrItemSelected As EgtFolder = DirectCast(m_ItemSelected, EgtFolder)
|
||||||
|
CurrItemSelected.SetIsSelected(True, True)
|
||||||
|
m_sSelPath = CurrItemSelected.sFullName
|
||||||
|
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
|
||||||
|
|
||||||
|
#End Region 'DoubleClick
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class EgtExstension
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Indice estensione
|
||||||
|
Public m_nIndexExstension As Integer
|
||||||
|
Public Property nIndexExstension As Integer
|
||||||
|
Get
|
||||||
|
Return m_nIndexExstension
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nIndexExstension = value
|
||||||
|
NotifyPropertyChanged(NameOf(nIndexExstension))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Nome della stringa Filter Splittata m_sNameExstension = EgtStone3D project
|
||||||
|
Public m_sNameExstension As String
|
||||||
|
Public Property sNameExstension As String
|
||||||
|
Get
|
||||||
|
Return m_sNameExstension
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sNameExstension = value
|
||||||
|
NotifyPropertyChanged(NameOf(sNameExstension))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Estensione della stringa Filter Splittata m_sExstension = *.wme
|
||||||
|
Public m_sExstension As String
|
||||||
|
Public Property sExstension As String
|
||||||
|
Get
|
||||||
|
Return m_sExstension
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sExstension = value
|
||||||
|
NotifyPropertyChanged(NameOf(sExstension))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public MustInherit Class EgtDirectory
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Friend Shared refUpdateSelTreeItem As Action(Of EgtDirectory)
|
||||||
|
|
||||||
|
Friend Shared m_refEgtManageFileDialogVM As EgtManageFileDialogVM
|
||||||
|
Friend Shared Sub SetEgtManageFileDialogVM(EgtManageFileDialogVM As EgtManageFileDialogVM)
|
||||||
|
m_refEgtManageFileDialogVM = EgtManageFileDialogVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected m_bIsSelected As Boolean
|
||||||
|
Public MustOverride Property IsSelected As Boolean
|
||||||
|
|
||||||
|
Protected m_bIsExpanded As Boolean
|
||||||
|
Public Overridable Property IsExpanded As Boolean
|
||||||
|
|
||||||
|
Public MustOverride ReadOnly Property sFullName As String
|
||||||
|
|
||||||
|
Protected m_sName As String
|
||||||
|
Public MustOverride ReadOnly Property sName As String
|
||||||
|
|
||||||
|
Protected m_sIconSource As String
|
||||||
|
Public Overridable ReadOnly Property sIconSource As String
|
||||||
|
Get
|
||||||
|
Return m_sIconSource
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_sTypeItem As String
|
||||||
|
Public MustOverride ReadOnly Property sTypeItem As String
|
||||||
|
|
||||||
|
Protected m_ghTypeItem As String
|
||||||
|
Public Overridable ReadOnly Property ghTypeItem As String
|
||||||
|
|
||||||
|
Protected m_dtLastModifyDate As Date
|
||||||
|
Public MustOverride ReadOnly Property sLastModifyDate As String
|
||||||
|
|
||||||
|
Public m_ParentFolder As EgtFolder
|
||||||
|
Public Property ParentFolder As EgtFolder
|
||||||
|
Get
|
||||||
|
Return m_ParentFolder
|
||||||
|
End Get
|
||||||
|
Set(value As EgtFolder)
|
||||||
|
m_ParentFolder = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class EgtFolder
|
||||||
|
Inherits EgtDirectory
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_ItemList_View As CollectionView = Nothing
|
||||||
|
Private m_TreeItemList_ViewSource As CollectionViewSource = Nothing
|
||||||
|
Private m_TreeItemList_View As CollectionView = Nothing
|
||||||
|
Public ReadOnly Property TreeItemList_View As CollectionView
|
||||||
|
Get
|
||||||
|
Return m_TreeItemList_View
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_DirectoryInfo As DirectoryInfo
|
||||||
|
|
||||||
|
Private m_FolderList As New ObservableCollection(Of EgtDirectory)
|
||||||
|
Public Property FolderList As ObservableCollection(Of EgtDirectory)
|
||||||
|
Get
|
||||||
|
Return m_FolderList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of EgtDirectory))
|
||||||
|
m_FolderList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property sFullName As String
|
||||||
|
Get
|
||||||
|
Return m_DirectoryInfo.FullName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_DirectoryInfo.Name
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property sTypeItem As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(15064) ' Cartella di File
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property sLastModifyDate As String
|
||||||
|
Get
|
||||||
|
Return m_DirectoryInfo.LastWriteTime.ToString("dd/MM/yyyy HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides Property IsExpanded As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsExpanded
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bIsExpanded = value
|
||||||
|
NotifyPropertyChanged(NameOf(IsExpanded))
|
||||||
|
If m_bIsExpanded Then
|
||||||
|
SetFolderList()
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides Property IsSelected As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsSelected
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bIsSelected = value
|
||||||
|
m_refEgtManageFileDialogVM.sSelPath = m_DirectoryInfo.FullName
|
||||||
|
If m_bIsSelected Then
|
||||||
|
SetFolderList()
|
||||||
|
refUpdateSelTreeItem(Me)
|
||||||
|
NotifyPropertyChanged(NameOf(IsSelected))
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetIsSelected(value As Boolean, bRefreshList As Boolean)
|
||||||
|
Dim sSelListItemPath As String = ""
|
||||||
|
If Not IsNothing(m_refEgtManageFileDialogVM.SelTreeItem) Then
|
||||||
|
sSelListItemPath = m_refEgtManageFileDialogVM.SelTreeItem.sFullName
|
||||||
|
End If
|
||||||
|
m_bIsSelected = value
|
||||||
|
m_refEgtManageFileDialogVM.sSelPath = m_DirectoryInfo.FullName
|
||||||
|
If m_bIsSelected Then
|
||||||
|
If bRefreshList Then SetFolderList()
|
||||||
|
refUpdateSelTreeItem(Me)
|
||||||
|
End If
|
||||||
|
If Not IsNothing(sSelListItemPath) Then
|
||||||
|
Dim SelFolderItem As EgtDirectory = m_FolderList.FirstOrDefault(Function(x) x.sFullName = sSelListItemPath)
|
||||||
|
If Not IsNothing(SelFolderItem) Then
|
||||||
|
m_refEgtManageFileDialogVM.SetItemSelected(SelFolderItem)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(IsSelected))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONTRUCTORS"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(DirectoryInfo As DirectoryInfo, Parent As EgtDirectory, Optional IconSource As String = "\Resources\EgtDialog\Folder.png")
|
||||||
|
m_DirectoryInfo = DirectoryInfo
|
||||||
|
m_sIconSource = IconSource
|
||||||
|
Try
|
||||||
|
If DirectoryInfo.EnumerateDirectories.Count > 0 Then
|
||||||
|
m_FolderList.Add(New EgtFolder())
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
m_ParentFolder = Parent
|
||||||
|
|
||||||
|
m_ItemList_View = CollectionViewSource.GetDefaultView(m_FolderList)
|
||||||
|
m_ItemList_View.Filter = AddressOf ItemFilter
|
||||||
|
m_TreeItemList_ViewSource = New CollectionViewSource() With {.Source = m_FolderList}
|
||||||
|
m_TreeItemList_View = m_TreeItemList_ViewSource.View
|
||||||
|
m_TreeItemList_View.Filter = AddressOf TreeItemListFilter
|
||||||
|
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
NotifyPropertyChanged(NameOf(sLastModifyDate))
|
||||||
|
NotifyPropertyChanged(NameOf(sTypeItem))
|
||||||
|
NotifyPropertyChanged(NameOf(sIconSource))
|
||||||
|
NotifyPropertyChanged(NameOf(FolderList))
|
||||||
|
NotifyPropertyChanged(NameOf(ParentFolder))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructors
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione per la visualizzazione delle sole cartelle nell'albero TreeView
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="CurrItem"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Private Function TreeItemListFilter(CurrItem As Object) As Boolean
|
||||||
|
Return TypeOf CurrItem Is EgtFolder
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione per il controllo del filtro per i singoli Item se l'estensione scelta e' .icrs verrano visualizzati tutti i file con l'estensione .icrs
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Item"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Private Function ItemFilter(Item As Object) As Boolean
|
||||||
|
Dim CurrItem As EgtItem = TryCast(Item, EgtItem)
|
||||||
|
If Not IsNothing(CurrItem) AndAlso Not IsNothing(m_refEgtManageFileDialogVM.m_SelFilter.m_sExstension) Then
|
||||||
|
If CurrItem.sTypeItem = m_refEgtManageFileDialogVM.m_SelFilter.m_sExstension.TrimStart("*") Then
|
||||||
|
Return True
|
||||||
|
ElseIf m_refEgtManageFileDialogVM.m_SelFilter.m_sExstension.TrimStart("*") = ".*" Then
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione per popolare la lista FolderList
|
||||||
|
''' </summary>
|
||||||
|
Private Sub SetFolderList()
|
||||||
|
Dim DirectoryList() As DirectoryInfo
|
||||||
|
Dim FileList() As FileInfo
|
||||||
|
Try
|
||||||
|
' ProgramData
|
||||||
|
DirectoryList = m_DirectoryInfo.GetDirectories().Where(Function(file) (file.Attributes And FileAttributes.Hidden And file.Name <> EgtMsg(15071)) = 0).ToArray()
|
||||||
|
FileList = m_DirectoryInfo.GetFiles().Where(Function(file) (file.Attributes And FileAttributes.Hidden) = 0).ToArray()
|
||||||
|
Catch ex As Exception
|
||||||
|
DirectoryList = Nothing
|
||||||
|
FileList = Nothing
|
||||||
|
End Try
|
||||||
|
m_FolderList.Clear()
|
||||||
|
If Not IsNothing(DirectoryList) AndAlso m_FolderList.Count = 0 Then
|
||||||
|
For Each subDir As DirectoryInfo In DirectoryList
|
||||||
|
Dim directory As New EgtFolder(subDir, Me)
|
||||||
|
m_FolderList.Add(directory)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not IsNothing(FileList) Then
|
||||||
|
For Each files As FileInfo In FileList
|
||||||
|
Dim file As New EgtItem(files)
|
||||||
|
m_FolderList.Add(file)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class EgtItem
|
||||||
|
Inherits EgtDirectory
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_FileInfo As FileInfo
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property sFullName As String
|
||||||
|
Get
|
||||||
|
Return m_FileInfo.FullName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_FileInfo.Name
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property sTypeItem As String
|
||||||
|
Get
|
||||||
|
If Not IsNothing(m_FileInfo) AndAlso Not IsNothing(m_FileInfo.Extension) AndAlso Not String.IsNullOrWhiteSpace(m_FileInfo.Extension) Then
|
||||||
|
Return m_FileInfo.Extension
|
||||||
|
Else
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property ghTypeItem As String
|
||||||
|
Get
|
||||||
|
Return If(Not String.IsNullOrWhiteSpace(sTypeItem), "File " & sTypeItem.ToUpper(), "")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sDimension As String
|
||||||
|
Get
|
||||||
|
Return If(m_FileInfo.Length / 1024 / 1024 > 1, String.Format("{0:#,##0.00}", m_FileInfo.Length / 1024 / 1024) & " Mb", String.Format("{0:#,##0.00}", m_FileInfo.Length / 1024) & " Kb")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property sLastModifyDate As String
|
||||||
|
Get
|
||||||
|
Return m_FileInfo.LastWriteTime.ToString("dd/MM/yyyy HH:mm:ss")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides Property IsSelected As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsSelected
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bIsSelected = value
|
||||||
|
refUpdateSelTreeItem(Me)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONTRUCTORS"
|
||||||
|
|
||||||
|
Sub New(FileInfo As FileInfo)
|
||||||
|
m_FileInfo = FileInfo
|
||||||
|
m_sIconSource = "\Resources\EgtDialog\New.png"
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
NotifyPropertyChanged(NameOf(sDimension))
|
||||||
|
NotifyPropertyChanged(NameOf(sLastModifyDate))
|
||||||
|
NotifyPropertyChanged(NameOf(sTypeItem))
|
||||||
|
NotifyPropertyChanged(NameOf(sIconSource))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructors
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<EgtWPFLib5:EgtMainWindow x:Class="EgtMessageBoxV"
|
||||||
|
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 sTitle}"
|
||||||
|
SizeToContent="WidthAndHeight"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Style="{StaticResource Dialog_Window}">
|
||||||
|
|
||||||
|
<Grid Style="{StaticResource EgtMessageBoxMain_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Style="{StaticResource EgtMessageBox_Grid}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{Binding sIconSource}"
|
||||||
|
Style="{StaticResource EgtMessageBox_Image}"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Text="{Binding sMessage}"
|
||||||
|
Style="{StaticResource EgtMessageBox_TxBl}"/>
|
||||||
|
</Grid>
|
||||||
|
<ItemsControl Grid.Row="1"
|
||||||
|
ItemsSource="{Binding ButtonList}"
|
||||||
|
Style="{StaticResource EgtMessageBox_ItemsControl}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Rows="1"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button IsDefault="{Binding bIsDefault}"
|
||||||
|
Content="{Binding sMessage}"
|
||||||
|
Command="{Binding Command_Command}"
|
||||||
|
Style="{StaticResource EgtColorPicker_Btn}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
|
||||||
|
</ItemsControl>
|
||||||
|
</Grid>
|
||||||
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
|
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class EgtMessageBoxV
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
|
||||||
|
|
||||||
|
Private Shadows DialogResult As MessageBoxResult
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONTRUCTOR"
|
||||||
|
|
||||||
|
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
|
||||||
|
MyBase.New(Owner)
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = EgtMessageBoxVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_EgtMessageBoxVM = EgtMessageBoxVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Owner">Finestra di appartenenza</param>
|
||||||
|
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||||
|
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||||
|
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
|
||||||
|
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
|
||||||
|
NewMessagebox.ShowDialog()
|
||||||
|
Return NewMessagebox.DialogResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Owner">Finestra di appartenenza</param>
|
||||||
|
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||||
|
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||||
|
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||||
|
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
|
||||||
|
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
|
||||||
|
NewMessagebox.ShowDialog()
|
||||||
|
Return NewMessagebox.DialogResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Owner">Finestra di appartenenza</param>
|
||||||
|
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||||
|
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||||
|
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||||
|
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||||
|
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
|
||||||
|
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
|
||||||
|
NewMessagebox.ShowDialog()
|
||||||
|
Return NewMessagebox.DialogResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Owner">Finestra di appartenenza</param>
|
||||||
|
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||||
|
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||||
|
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||||
|
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||||
|
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||||
|
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
|
||||||
|
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
|
||||||
|
NewMessagebox.ShowDialog()
|
||||||
|
Return NewMessagebox.DialogResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Owner">Finestra di appartenenza</param>
|
||||||
|
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||||
|
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||||
|
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||||
|
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||||
|
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
|
||||||
|
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||||
|
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
|
||||||
|
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
|
||||||
|
NewMessagebox.ShowDialog()
|
||||||
|
Return NewMessagebox.DialogResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
|
||||||
|
Me.DialogResult = DialogResult
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Events
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.11.35327.3
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EgtStone3D", "EgtStone3D.vbproj", "{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}"
|
||||||
|
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
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {EE454A76-E60D-432C-A4F5-E115AC602892}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,604 @@
|
|||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{10C7D2D3-8D43-4F83-9299-2DF704A55CD6}</ProjectGuid>
|
||||||
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>EgtStone3D</RootNamespace>
|
||||||
|
<AssemblyName>EgtStone3D</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<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>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<IncrementalBuild>true</IncrementalBuild>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>EgtStone3D.xml</DocumentationFile>
|
||||||
|
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DebugSymbols>false</DebugSymbols>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<IncrementalBuild>false</IncrementalBuild>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DocumentationFile>EgtStone3D.xml</DocumentationFile>
|
||||||
|
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionStrict>Off</OptionStrict>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionInfer>On</OptionInfer>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>EgtStone3D.xml</DocumentationFile>
|
||||||
|
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\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>x86</PlatformTarget>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<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>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EgtWPFLib5, Version=2.7.1.1, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<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" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Xaml">
|
||||||
|
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="WindowsFormsIntegration" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ApplicationDefinition Include="Application.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</ApplicationDefinition>
|
||||||
|
<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">
|
||||||
|
<DependentUpon>EgtColorPickerV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EgtManageFileDialog\EgtManageFileDialogV.xaml.vb">
|
||||||
|
<DependentUpon>EgtManageFileDialogV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EgtManageFileDialog\EgtManageFileDialogVM.vb" />
|
||||||
|
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
|
||||||
|
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<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>
|
||||||
|
<Compile Include="Move\MoveVM.vb" />
|
||||||
|
<Compile Include="OptionsWindow\OptionModule.vb" />
|
||||||
|
<Compile Include="OptionsWindow\OptionWindowV.xaml.vb">
|
||||||
|
<DependentUpon>OptionWindowV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<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">
|
||||||
|
<DependentUpon>ProjManagerButtonV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ProjManager\ProjManagerV.xaml.vb">
|
||||||
|
<DependentUpon>ProjManagerV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ProjManager\ProjManagerVM.vb" />
|
||||||
|
<Compile Include="Rotate\RotateVM.vb" />
|
||||||
|
<Compile Include="SceneButton\SceneButtonV.xaml.vb">
|
||||||
|
<DependentUpon>SceneButtonV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SceneButton\SceneButtonVM.vb" />
|
||||||
|
<Compile Include="SceneHost\MySceneHostVM.vb" />
|
||||||
|
<Compile Include="SceneHost\SceneHostV.xaml.vb">
|
||||||
|
<DependentUpon>SceneHostV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SceneUserControl\SceneUserControlV.xaml.vb">
|
||||||
|
<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>
|
||||||
|
<Compile Include="SecondaryWindow\SecondaryWindowVM.vb" />
|
||||||
|
<Compile Include="SelOption\SelOptionV.xaml.vb">
|
||||||
|
<DependentUpon>SelOptionV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SelOption\SelOptionVM.vb" />
|
||||||
|
<Compile Include="SplashScreen\SplashScreenV.xaml.vb">
|
||||||
|
<DependentUpon>SplashScreenV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SVG\SVGVM.vb" />
|
||||||
|
<Compile Include="SVG\SVGV.xaml.vb">
|
||||||
|
<DependentUpon>SVGV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ThemesDataService\ThemesDataServiceM.vb" />
|
||||||
|
<Compile Include="ThemesDataService\ThemesDataServiceVM.vb" />
|
||||||
|
<Compile Include="TopPanel\TopPanel1V.xaml.vb">
|
||||||
|
<DependentUpon>TopPanel1V.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TopPanel\TopPanelButton1V.xaml.vb">
|
||||||
|
<DependentUpon>TopPanelButton1V.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TopPanel\TopPanelButtonV.xaml.vb">
|
||||||
|
<DependentUpon>TopPanelButtonV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TopPanel\TopPanelHome1V.xaml.vb">
|
||||||
|
<DependentUpon>TopPanelHome1V.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<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>
|
||||||
|
<Compile Include="TopPanel\TopPanelViewProspectiveV.xaml.vb">
|
||||||
|
<DependentUpon>TopPanelViewProspectiveV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TopPanel\TopPanelViewV.xaml.vb">
|
||||||
|
<DependentUpon>TopPanelViewV.xaml</DependentUpon>
|
||||||
|
</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" />
|
||||||
|
<Compile Include="Application.xaml.vb">
|
||||||
|
<DependentUpon>Application.xaml</DependentUpon>
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Constants\ConstGen.vb" />
|
||||||
|
<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>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ViewPanelProspective\ViewPanelProspectiveVM.vb" />
|
||||||
|
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
|
||||||
|
<DependentUpon>ViewPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ViewPanel\ViewPanelVM.vb" />
|
||||||
|
<Page Include="AboutBoxWindow\AboutBoxV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="EgtColorPicker\EgtColorPickerV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="EgtManageFileDialog\EgtManageFileDialogV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<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>
|
||||||
|
<Page Include="MainWindow\MainWindowV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="OptionsWindow\OptionWindowV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ProjManager\ProjManagerButtonV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ProjManager\ProjManagerV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="SceneButton\SceneButtonV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="SceneHost\SceneHostV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="SceneUserControl\SceneUserControlV.xaml">
|
||||||
|
<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>
|
||||||
|
</Page>
|
||||||
|
<Page Include="SelOption\SelOptionV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="SplashScreen\SplashScreenV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="SVG\SVGV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="TopPanel\TopPanel1V.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="TopPanel\TopPanelButton1V.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="TopPanel\TopPanelButtonV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="TopPanel\TopPanelHome1V.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="TopPanel\TopPanelHomeV.xaml">
|
||||||
|
<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>
|
||||||
|
</Page>
|
||||||
|
<Page Include="TopPanel\TopPanelListV.xaml">
|
||||||
|
<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>
|
||||||
|
</Page>
|
||||||
|
<Page Include="TopPanel\TopPanelViewProspectiveV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="TopPanel\TopPanelViewV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Utility\EgtStone3DDarkDictionary.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Utility\EgtStone3DDefaultStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Utility\EgtStone3DDictionary.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ViewPanelProspective\ViewPanelProspectiveV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ViewPanel\ViewPanelV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="System.Threading.Tasks" />
|
||||||
|
<Import Include="System.Linq" />
|
||||||
|
<Import Include="System.Xml.Linq" />
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Collections.Generic" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Windows" />
|
||||||
|
<Import Include="System.Windows.Controls" />
|
||||||
|
<Import Include="System.Windows.Data" />
|
||||||
|
<Import Include="System.Windows.Documents" />
|
||||||
|
<Import Include="System.Windows.Input" />
|
||||||
|
<Import Include="System.Windows.Shapes" />
|
||||||
|
<Import Include="System.Windows.Media" />
|
||||||
|
<Import Include="System.Windows.Media.Imaging" />
|
||||||
|
<Import Include="System.Windows.Navigation" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="MainWindow\MainWindowVM.vb" />
|
||||||
|
<Compile Include="My Project\AssemblyInfo.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\MyExtensions\MyWpfExtension.vb">
|
||||||
|
<VBMyExtensionTemplateID>Microsoft.VisualBasic.WPF.MyExtension</VBMyExtensionTemplateID>
|
||||||
|
<VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
|
<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" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ProjManager\newfile.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ProjManager\save.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ProjManager\folder.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Common\Close.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Common\Maximize.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Common\Minimize.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ProjManager\saveas.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Common\Restore.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtDialog\Folder.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtDialog\New.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtDialog\Restore.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtDialog\Root.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ProjManager\settings.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Common\Ok.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\AboutBox\EgalwareLogo.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TopPanel\vista.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ViewPanel\LookFromBACK.png" />
|
||||||
|
<Resource Include="Resources\ViewPanel\LookFromBOTTOM.png" />
|
||||||
|
<Resource Include="Resources\ViewPanel\LookFromFRONT.png" />
|
||||||
|
<Resource Include="Resources\ViewPanel\LookFromLEFT.png" />
|
||||||
|
<Resource Include="Resources\ViewPanel\LookFromRIGHT.png" />
|
||||||
|
<Resource Include="Resources\ViewPanel\LookFromTOP.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SplashScreen\LogoEgalware.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SplashScreen\PictureCicken.jpg" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TopPanelList\autopair.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TopPanelList\avoid intersection.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TopPanelList\explode.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtMessageBox\Asterisk.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtMessageBox\Error.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtMessageBox\Exclamation.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtMessageBox\Hand.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtMessageBox\Information.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtMessageBox\Question.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtMessageBox\Warning.png" />
|
||||||
|
</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>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtStone3D\EgtStone3DR32.exe
|
||||||
|
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtStone3D\EgtStone3DD32.exe</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,265 @@
|
|||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class GridPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_StatusGridText As String = If(OptionModule.m_bGridState, GRID_ON, GRID_OFF)
|
||||||
|
Public ReadOnly Property StatusGridText As String
|
||||||
|
Get
|
||||||
|
Return m_StatusGridText
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetStatusGridText(value As String)
|
||||||
|
m_StatusGridText = value
|
||||||
|
NotifyPropertyChanged(NameOf(StatusGridText))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_GridDimensionText As String = If(OptionModule.m_bMmUnits, LenToString(OptionModule.m_dSnapStepMm, 4), LenToString(OptionModule.m_dSnapStepInch, 4))
|
||||||
|
Public Property GridDimensionText As String
|
||||||
|
Get
|
||||||
|
Return m_GridDimensionText
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_GridDimensionText = value
|
||||||
|
NotifyPropertyChanged(NameOf(GridDimensionText))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_MeasureUnit As String = If(OptionModule.m_bMmUnits, MILLIMETER, INCH)
|
||||||
|
Public ReadOnly Property MeasureUnit As String
|
||||||
|
Get
|
||||||
|
Return m_MeasureUnit
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Sub SetMeasureUnit(nMeasureUnit As Integer)
|
||||||
|
m_MeasureUnit = If(nMeasureUnit = 0, INCH, MILLIMETER)
|
||||||
|
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
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110037) ' Unità di Misura
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Messages
|
||||||
|
|
||||||
|
#Region "ToolTip"
|
||||||
|
|
||||||
|
Public ReadOnly Property ZoomAllToolTip As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(5254) ' Zoom All
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' ToolTip
|
||||||
|
|
||||||
|
' Definizione dei comandi
|
||||||
|
Private m_cmdStatusGrid As ICommand
|
||||||
|
Private m_cmdGridDimension As ICommand
|
||||||
|
Private m_cmdStatusUnits As ICommand
|
||||||
|
Private m_cmdZoomAll As ICommand
|
||||||
|
Private m_cmdShowPopUpCmd As ICommand
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
Map.SetRefGridPanelVM(Me)
|
||||||
|
SetFileGridOnOffSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\GridON.svg")
|
||||||
|
SetFileGridDimSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\GridDIM.svg")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Sub UpdateStatusGrid(bShowGrid As Boolean, bShowGridFrame As Boolean)
|
||||||
|
SetStatusGridText(If(bShowGrid, GRID_ON, GRID_OFF))
|
||||||
|
EgtSetGridShow(bShowGrid, bShowGrid And bShowGridFrame)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub UpdateStatusUnits(bMmUnits As Boolean)
|
||||||
|
SetMeasureUnit(If(bMmUnits, 1, 0)) 'StatusUnitsText = If(bMmUnits, "mm", "in")
|
||||||
|
EgtSetUiUnits(bMmUnits)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub UpdateMessageGridPanel()
|
||||||
|
NotifyPropertyChanged(NameOf(MeasureUnit_Msg))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "StatusGridCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property StatusGridCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdStatusGrid Is Nothing Then
|
||||||
|
m_cmdStatusGrid = New Command(AddressOf StatusGrid)
|
||||||
|
End If
|
||||||
|
Return m_cmdStatusGrid
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub StatusGrid(ByVal param As Object)
|
||||||
|
Dim tmpGridState As Integer
|
||||||
|
OptionModule.m_bGridState = GetMainPrivateProfileInt(S_GENERAL, K_GRIDSTATE, 1)
|
||||||
|
If OptionModule.m_bGridState Then
|
||||||
|
tmpGridState = 0
|
||||||
|
Else
|
||||||
|
tmpGridState = 1
|
||||||
|
End If
|
||||||
|
UpdateStatusGrid(tmpGridState, OptionModule.m_bShowGridFrame)
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_GRIDSTATE, tmpGridState.ToString())
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' StatusGridCommand
|
||||||
|
|
||||||
|
#Region "GridDimensionCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property GridDimensionCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdGridDimension Is Nothing Then
|
||||||
|
m_cmdGridDimension = New Command(AddressOf GridDimension)
|
||||||
|
End If
|
||||||
|
Return m_cmdGridDimension
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub GridDimension(ByVal param As Object)
|
||||||
|
If OptionModule.m_bMmUnits Then
|
||||||
|
StringToLen(m_GridDimensionText, OptionModule.m_dSnapStepMm)
|
||||||
|
EgtSetGridGeo(OptionModule.m_dSnapStepMm, OptionModule.m_nMinLineSStep, OptionModule.m_nMajLineSStep, OptionModule.m_nExtSStep)
|
||||||
|
Else
|
||||||
|
StringToLen(m_GridDimensionText, OptionModule.m_dSnapStepInch)
|
||||||
|
EgtSetGridGeo(OptionModule.m_dSnapStepInch, OptionModule.m_nMinLineSStep, OptionModule.m_nMajLineSStep, OptionModule.m_nExtSStep)
|
||||||
|
End If
|
||||||
|
EgtSetGridColor(OptionModule.m_MinLnColor, OptionModule.m_MajLnColor)
|
||||||
|
Keyboard.ClearFocus()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' GridDimensionCommand
|
||||||
|
|
||||||
|
#Region "StatusUnitsCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property StatusUnitsCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdStatusUnits Is Nothing Then
|
||||||
|
m_cmdStatusUnits = New Command(AddressOf StatusUnits)
|
||||||
|
End If
|
||||||
|
Return m_cmdStatusUnits
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub StatusUnits(ByVal param As Object)
|
||||||
|
Map.refSceneHostVM.StatusUnitsCommand()
|
||||||
|
If OptionModule.m_bMmUnits Then
|
||||||
|
m_GridDimensionText = LenToString(OptionModule.m_dSnapStepMm, 4)
|
||||||
|
Else
|
||||||
|
m_GridDimensionText = LenToString(OptionModule.m_dSnapStepInch, 4)
|
||||||
|
End If
|
||||||
|
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, If(OptionModule.m_bMmUnits, 1, 0).ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' StatusUnitsCommand
|
||||||
|
|
||||||
|
#Region "ZoomAllCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property ZoomAllCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdZoomAll Is Nothing Then
|
||||||
|
m_cmdZoomAll = New Command(AddressOf ZoomAll)
|
||||||
|
End If
|
||||||
|
Return m_cmdZoomAll
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the ZoomAll. This method is invoked by the ZoomAllCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub ZoomAll(ByVal param As Object)
|
||||||
|
Map.refSceneHostVM.MainScene.ZoomAll()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="MainWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EgtStone3D"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="MainWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Class MainWindow
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,387 @@
|
|||||||
|
Imports System.Threading
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
Imports EgtUILib.GenInterface
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports System.Math
|
||||||
|
|
||||||
|
Public Class MainWindowM
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' massimo numero di istanze del programma ammesse
|
||||||
|
Const MAX_INST As Integer = 32
|
||||||
|
|
||||||
|
Private m_objMutex As Mutex
|
||||||
|
|
||||||
|
Private m_sDataRoot As String = String.Empty
|
||||||
|
Friend ReadOnly Property sDataRoot As String
|
||||||
|
Get
|
||||||
|
Return m_sDataRoot
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sDataDir As String = String.Empty
|
||||||
|
Friend ReadOnly Property sDataDir As String
|
||||||
|
Get
|
||||||
|
Return m_sDataDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sConfigDir As String = String.Empty
|
||||||
|
Public ReadOnly Property sConfigDir As String
|
||||||
|
Get
|
||||||
|
Return m_sConfigDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sVein3DDir As String = String.Empty
|
||||||
|
Friend ReadOnly Property sVein3DDir As String
|
||||||
|
Get
|
||||||
|
Return m_sVein3DDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sResourcesDir As String = String.Empty
|
||||||
|
Friend ReadOnly Property sResourcesDir As String
|
||||||
|
Get
|
||||||
|
Return m_sResourcesDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sCreateSolidPath As String = String.Empty
|
||||||
|
Friend ReadOnly Property sCreateSolidPath As String
|
||||||
|
Get
|
||||||
|
Return m_sCreateSolidPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sOperationSolidPath As String = String.Empty
|
||||||
|
Friend ReadOnly Property sOperationSolidPath As String
|
||||||
|
Get
|
||||||
|
Return m_sOperationSolidPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nDebug As Integer = 0
|
||||||
|
Public ReadOnly Property DebugLevel As Integer
|
||||||
|
Get
|
||||||
|
Return m_nDebug
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bFirstInstance As Boolean = False
|
||||||
|
Friend ReadOnly Property bFirstInstance As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bFirstInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nInstance As Integer = 0
|
||||||
|
Friend ReadOnly Property nInstance As Integer
|
||||||
|
Get
|
||||||
|
Return m_nInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nUserLevel As Integer = 1
|
||||||
|
Friend ReadOnly Property nUserLevel As Integer
|
||||||
|
Get
|
||||||
|
Return m_nUserLevel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nKeyLevel As Integer = 0
|
||||||
|
Friend ReadOnly Property nKeyLevel As Integer
|
||||||
|
Get
|
||||||
|
Return m_nKeyLevel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nKeyOptions As UInteger = 0
|
||||||
|
Friend ReadOnly Property nKeyOptions As Integer
|
||||||
|
Get
|
||||||
|
Return m_nKeyOptions
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property sVersion As String
|
||||||
|
Get
|
||||||
|
Return My.Application.Info.Version.Major.ToString() & "." &
|
||||||
|
My.Application.Info.Version.Minor.ToString() &
|
||||||
|
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||||
|
My.Application.Info.Version.Revision.ToString()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_s3dPrintingDir As String
|
||||||
|
Friend ReadOnly Property s3dPrintingDir As String
|
||||||
|
Get
|
||||||
|
Return m_s3dPrintingDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sMaterialsDir As String
|
||||||
|
Friend ReadOnly Property sMaterialsDir As String
|
||||||
|
Get
|
||||||
|
Return m_sMaterialsDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sTempDir As String
|
||||||
|
Friend ReadOnly Property sTempDir As String
|
||||||
|
Get
|
||||||
|
Return m_sTempDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sMachinesRoot As String
|
||||||
|
Friend ReadOnly Property sMachinesRoot As String
|
||||||
|
Get
|
||||||
|
Return m_sMachinesRoot
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sToolMakersDir As String
|
||||||
|
Friend ReadOnly Property sToolMakersDir As String
|
||||||
|
Get
|
||||||
|
Return m_sToolMakersDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sResourcesRoot As String
|
||||||
|
Friend ReadOnly Property sResourcesRoot As String
|
||||||
|
Get
|
||||||
|
Return m_sResourcesRoot
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sLogFile As String
|
||||||
|
Friend ReadOnly Property sLogFile As String
|
||||||
|
Get
|
||||||
|
Return m_sLogFile
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
InitializeEgtEnvironment()
|
||||||
|
LoadLuaFile()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Sub InitializeEgtEnvironment()
|
||||||
|
' Impostazione path radice per i dati
|
||||||
|
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||||
|
If EgtUILib.GetPrivateProfileString(S_DATA, K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & DAT_FILE_NAME) = 0 Then
|
||||||
|
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||||
|
End If
|
||||||
|
' Impostazione direttorio di configurazione
|
||||||
|
m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
|
||||||
|
' Impostazione direttorio per file temporanei
|
||||||
|
m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
|
||||||
|
' Impostazione path Ini file
|
||||||
|
IniFile.m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME
|
||||||
|
' Impostazione path resources dir
|
||||||
|
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||||
|
' Impostazione path machinings e materials dir
|
||||||
|
m_sMaterialsDir = m_sDataRoot & "\" & MATERIALS_DIR
|
||||||
|
' Impostazione direttorio per le macchine
|
||||||
|
If GetMainPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then
|
||||||
|
m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR
|
||||||
|
End If
|
||||||
|
' Impostazione direttorio per toolmakers
|
||||||
|
If GetMainPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", m_sToolMakersDir) = 0 Then
|
||||||
|
m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKERS_DFL_DIR
|
||||||
|
End If
|
||||||
|
' Impostazione direttorio 3dPrinting
|
||||||
|
If GetMainPrivateProfileString(S_PRINTING3D, K_3PRNBASEDIR, "", m_s3dPrintingDir) = 0 Then
|
||||||
|
m_s3dPrintingDir = m_sDataRoot & "\" & _3DPRINTING_DIR
|
||||||
|
End If
|
||||||
|
' Verifico indice di istanza
|
||||||
|
ManageInstance()
|
||||||
|
' Imposto tipo di chiave
|
||||||
|
EgtSetLockType(KEY_TYPE.HW)
|
||||||
|
' Leggo e imposto chiave di protezione
|
||||||
|
Dim sLicFileName As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
|
||||||
|
Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
|
||||||
|
Dim sKey As String = String.Empty
|
||||||
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||||
|
EgtSetKey(sKey)
|
||||||
|
' Impostazioni per chiave di rete
|
||||||
|
Dim bNetKey As Boolean = (GetMainPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
|
||||||
|
EgtSetNetHwKey(bNetKey)
|
||||||
|
Dim sLockId As String = ""
|
||||||
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||||
|
If Not String.IsNullOrEmpty(sLockId) Then
|
||||||
|
EgtSetLockId(sLockId)
|
||||||
|
End If
|
||||||
|
' Recupero livello e opzioni della chiave
|
||||||
|
Dim bKey As Boolean = EgtGetKeyLevel(3279, 100, 0, m_nKeyLevel) And
|
||||||
|
EgtGetKeyOptions(3279, 100, 0, m_nKeyOptions)
|
||||||
|
' Inizializzazione generale di EgtInterface
|
||||||
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
|
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
|
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
|
||||||
|
My.Application.Info.Title.ToString() & " ver. " &
|
||||||
|
My.Application.Info.Version.Major.ToString() &
|
||||||
|
"." & My.Application.Info.Version.Minor.ToString() &
|
||||||
|
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||||
|
My.Application.Info.Version.Revision.ToString()
|
||||||
|
EgtInit(m_nDebug, m_sLogFile, sLogMsg)
|
||||||
|
EgtSetTempDir(m_sTempDir)
|
||||||
|
EgtSetIniFile(IniFile.m_sIniFile)
|
||||||
|
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
||||||
|
Dim sMsgDir As String = String.Empty
|
||||||
|
If GetMainPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
|
||||||
|
sMsgDir = m_sConfigDir
|
||||||
|
End If
|
||||||
|
' Inizializzo OptionModule
|
||||||
|
OptionModule.InitOptionModule()
|
||||||
|
' Leggo lingua corrente
|
||||||
|
Dim sLanguage As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GENERAL, K_MESSAGES, "", sLanguage)
|
||||||
|
' Recupero nome file dei messaggi della lingua corrente
|
||||||
|
Dim sMsgName As String = "EgalTechIta.txt"
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
While True
|
||||||
|
Dim ReadLanguage As Language = GetMainPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex)
|
||||||
|
If IsNothing(ReadLanguage) Then Exit While
|
||||||
|
If String.Compare(ReadLanguage.Name, sLanguage, True) = 0 Then
|
||||||
|
sMsgName = ReadLanguage.FilePath
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
' Leggo file messaggi
|
||||||
|
Dim sMsgFilePath As String = sMsgDir & "\" & sMsgName
|
||||||
|
If Not EgtLoadMessages(sMsgFilePath) Then
|
||||||
|
EgtOutLog("Error in EgtLoadMessages")
|
||||||
|
End If
|
||||||
|
' Leggo e imposto unità di misura per interfaccia utente
|
||||||
|
EgtSetUiUnits(GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
||||||
|
' Leggo e imposto livello utilizzatore
|
||||||
|
m_nUserLevel = Math.Min(m_nKeyLevel, GetMainPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||||
|
' Imposto dir font Nfe e font default
|
||||||
|
Dim sNfeDir As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
||||||
|
Dim sDefFont As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", sDefFont)
|
||||||
|
EgtSetFont(sNfeDir, sDefFont)
|
||||||
|
' imposto dir di default per libreria Lua e lancio libreria di base
|
||||||
|
Dim sLuaLibsDir As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||||
|
EgtSetLuaLibs(sLuaLibsDir)
|
||||||
|
Dim sLuaBaseLib As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||||
|
EgtLuaRequire(sLuaBaseLib)
|
||||||
|
' Leggo tema corrente
|
||||||
|
Dim sThema As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GENERAL, K_THEMA, "", sThema)
|
||||||
|
' Leggo tema toppanel corrente
|
||||||
|
Dim sThemaTopPanel As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GENERAL, K_TOPPANEL, "", sThemaTopPanel)
|
||||||
|
' Impostazione direttorio delle risorse
|
||||||
|
m_sResourcesDir = m_sDataRoot & "\" & RESOURCES_DIR
|
||||||
|
' Info su opzioni chiave
|
||||||
|
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ManageInstance()
|
||||||
|
Dim bCreated As Boolean
|
||||||
|
Try
|
||||||
|
m_objMutex = New Mutex(False, "Global\EgtStone3D", bCreated)
|
||||||
|
Catch
|
||||||
|
bCreated = False
|
||||||
|
End Try
|
||||||
|
m_bFirstInstance = bCreated
|
||||||
|
If bCreated Then
|
||||||
|
' Prima istanza
|
||||||
|
m_nInstance = 1
|
||||||
|
' Aggiorno stato istanze attive
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, m_nInstance.ToString())
|
||||||
|
Else
|
||||||
|
' Leggo il massimo numero di istanze ammesse
|
||||||
|
Dim nMaxInst As Integer = GetMaxInstances()
|
||||||
|
' Cerco il primo indice di istanza libero
|
||||||
|
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||||
|
m_nInstance = 1
|
||||||
|
Dim nMask As Integer = 1
|
||||||
|
While (nTmp And nMask) <> 0 And m_nInstance <= MAX_INST
|
||||||
|
m_nInstance += 1
|
||||||
|
nMask *= 2
|
||||||
|
End While
|
||||||
|
' Se l'indice supera il massimo
|
||||||
|
If m_nInstance > nMaxInst Then
|
||||||
|
' porto in primo piano la prima istanza
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
' processi del programma a 32 bit
|
||||||
|
Dim localProc As Process() = Process.GetProcessesByName("EgtStone3DR32")
|
||||||
|
For Each p As Process In localProc
|
||||||
|
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||||
|
bFound = True
|
||||||
|
ShowWindow(p.MainWindowHandle, 1)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' se non trovati processi a 32 bit provo a 64 bit
|
||||||
|
If Not bFound Then
|
||||||
|
localProc = Process.GetProcessesByName("EgtStone3DR64")
|
||||||
|
For Each p As Process In localProc
|
||||||
|
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||||
|
bFound = True
|
||||||
|
ShowWindow(p.MainWindowHandle, SW.RESTORE)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
' esco dal programma
|
||||||
|
End
|
||||||
|
End If
|
||||||
|
' Aggiorno stato istanze attive
|
||||||
|
nTmp += (1 << (m_nInstance - 1))
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function GetMaxInstances() As Integer
|
||||||
|
' Leggo il massimo numero di istanze ammesse
|
||||||
|
Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXINST, 1)
|
||||||
|
Return Max(1, Min(nMaxInst, MAX_INST))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function GetKeyOption(nKeyOpt As KEY_OPT) As Boolean
|
||||||
|
Return ((m_nKeyOptions And nKeyOpt) <> 0)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Sub Close()
|
||||||
|
' Terminazione generale di EgtInterface
|
||||||
|
EgtExit()
|
||||||
|
' Aggiorno istanze usate
|
||||||
|
m_objMutex.WaitOne(1000)
|
||||||
|
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||||
|
nTmp -= (1 << (m_nInstance - 1))
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||||
|
m_objMutex.ReleaseMutex()
|
||||||
|
' Rilascio mutex
|
||||||
|
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LoadLuaFile()
|
||||||
|
' carico il file LUA con tutte le funzioni di accoppiamento
|
||||||
|
GetMainPrivateProfileString(K_VEIND3D, VEIND3D_DIR, "", m_sVein3DDir)
|
||||||
|
' Path del lua da utilizzare
|
||||||
|
GetMainPrivateProfileString(K_VEIND3D, CREATESOLID_DIR, "", m_sCreateSolidPath)
|
||||||
|
' Path del lua da utilizzare
|
||||||
|
GetMainPrivateProfileString(K_VEIND3D, OPERATIONSOLID_DIR, "", m_sOperationSolidPath)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<EgtWPFLib5:EgtMainWindow x:Class="MainWindowV"
|
||||||
|
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"
|
||||||
|
AllowDrop="True"
|
||||||
|
Drop="MainWindowV_Drop"
|
||||||
|
Style="{StaticResource NoStyle_Window}">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="100"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<EgtStone3D:SceneHostV Grid.Row="1"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
Imports System.Windows.Interop
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Class MainWindowV
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_MainWindowVM As MainWindowVM
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
m_MainWindowVM = New MainWindowVM
|
||||||
|
' La chiamata è richiesta dalla finestra di progettazione.
|
||||||
|
InitializeComponent()
|
||||||
|
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||||
|
Me.DataContext = m_MainWindowVM
|
||||||
|
' creo finestra della scena
|
||||||
|
AddHandler Me.ContentRendered, AddressOf MainWindowV_ContentRendered
|
||||||
|
AddHandler Me.Loaded, AddressOf MainWindowV_Loaded
|
||||||
|
AddHandler Me.Closing, AddressOf MainWindowV_Closing
|
||||||
|
AddHandler Me.StateChanged, AddressOf MainWindowV_StateChanged
|
||||||
|
Map.SetRefMainWindowV(Me)
|
||||||
|
|
||||||
|
Dim Dir_Vein3D As String = String.Empty
|
||||||
|
Dim Path_CreateSolid As String = CREATESOLID_FILENAME
|
||||||
|
Dim Path_OperationSolid As String = OPERATIONSOLID_FILENAME
|
||||||
|
|
||||||
|
' carico il file LUA con tutte le funzioni di accoppiamento
|
||||||
|
GetMainPrivateProfileString(K_VEIND3D, VEIND3D_DIR, "", Dir_Vein3D)
|
||||||
|
' Path del lua da utilizzare
|
||||||
|
GetMainPrivateProfileString(K_VEIND3D, CREATESOLID_DIR, "", Path_CreateSolid)
|
||||||
|
' Path del lua da utilizzare
|
||||||
|
GetMainPrivateProfileString(K_VEIND3D, OPERATIONSOLID_DIR, "", Path_OperationSolid)
|
||||||
|
|
||||||
|
' avvio il file OperationOnSolid.lua
|
||||||
|
Dim sLuaPath As String = Dir_Vein3D & Path_OperationSolid
|
||||||
|
' Verifico esistenza file Matching nel direttorio passato
|
||||||
|
If Not File.Exists(sLuaPath) Then
|
||||||
|
EgtOutLog("Matching error: missing file (" & sLuaPath & ")")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Parsing
|
||||||
|
EgtLuaExecFile(sLuaPath)
|
||||||
|
AssLog(Date.Now.ToString & " Avvio Assembler")
|
||||||
|
EgtLuaSetGlobBoolVar("ASS.bActiveHist", True) ' attivo il salvataggio della storia
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveHist", True) Then AssLog("ASS.bSaveHist = True")
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveTemp", False) Then AssLog("ASS.bSaveTemp = False")
|
||||||
|
|
||||||
|
' avvio il file CreateSOLID_FromPartsInPark.lua
|
||||||
|
sLuaPath = Dir_Vein3D & Path_CreateSolid
|
||||||
|
' Verifico esistenza file Matching nel direttorio passato
|
||||||
|
If Not File.Exists(sLuaPath) Then
|
||||||
|
EgtOutLog("Matching error: missing file (" & sLuaPath & ")")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Parsing
|
||||||
|
EgtLuaExecFile(sLuaPath)
|
||||||
|
|
||||||
|
' avvio il file TemplateTool.lua
|
||||||
|
sLuaPath = Dir_Vein3D & "TemplateTool.lua"
|
||||||
|
' Verifico esistenza file Matching nel direttorio passato
|
||||||
|
If Not File.Exists(sLuaPath) Then
|
||||||
|
EgtOutLog("Matching error: missing file (" & sLuaPath & ")")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Parsing
|
||||||
|
EgtLuaExecFile(sLuaPath)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs)
|
||||||
|
' Carico e imposto posizione finestra
|
||||||
|
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
|
||||||
|
' Recupero e imposto handle finestra principale
|
||||||
|
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||||
|
EgtSetMainWindowHandle(hMainWnd)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs)
|
||||||
|
m_MainWindowVM.ContentRendered()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||||
|
e.Cancel = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Salvo posizione finestra (se non minimizzata)
|
||||||
|
If WindowState <> WindowState.Minimized Then
|
||||||
|
WinPosFromWindowToIni(Me, S_GENERAL, K_WINPLACE)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_StateChanged(sender As Object, e As EventArgs)
|
||||||
|
If Not IsNothing(Map.refSecondaryWindowV) AndAlso Not Map.refSecondaryWindowV.WindowChangingState Then
|
||||||
|
Map.refSecondaryWindowV.WindowState = Me.WindowState
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_Drop(sender As Object, e As DragEventArgs)
|
||||||
|
' Se drag di file
|
||||||
|
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||||
|
' Attivo il programma
|
||||||
|
Me.Activate()
|
||||||
|
' Recupero l'array di stringhe con i nomi del file
|
||||||
|
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||||
|
' Apro il primo come file standard
|
||||||
|
If Map.refSecondaryWindowVM.OpenStdFile(sFiles(0)) Then Return
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Events
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class MainWindowVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Riferimento al Model della MainWindow
|
||||||
|
Private m_MainWindowM As MainWindowM
|
||||||
|
Friend ReadOnly Property MainWindowM As MainWindowM
|
||||||
|
Get
|
||||||
|
Return m_MainWindowM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_OptionWindowVM As OptionWindowVM
|
||||||
|
Friend ReadOnly Property OptionWindowVM As OptionWindowVM
|
||||||
|
Get
|
||||||
|
Return m_OptionWindowVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SceneButtonVM As SceneButtonVM
|
||||||
|
Friend ReadOnly Property SceneButtonVM As SceneButtonVM
|
||||||
|
Get
|
||||||
|
Return m_SceneButtonVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione Comandi
|
||||||
|
Private m_cmdAboutBox As ICommand
|
||||||
|
Private m_cmdCloseApplication As ICommand
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Avvio l'inizializzazione della mappa passandogli il riferimento al MainWindowVM
|
||||||
|
Map.BeginInit(Me)
|
||||||
|
' Creo Model della MainWindow
|
||||||
|
m_MainWindowM = New MainWindowM
|
||||||
|
' Creo SceneButton
|
||||||
|
m_SceneButtonVM = New SceneButtonVM
|
||||||
|
' Creo Option
|
||||||
|
m_OptionWindowVM = New OptionWindowVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Sub ContentRendered()
|
||||||
|
EgtSetView(VT.ISO_SE, False)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub CloseApplication()
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Termino il Model
|
||||||
|
m_MainWindowM.Close()
|
||||||
|
' Termino il programma
|
||||||
|
Application.Current.Shutdown()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "AboutBoxCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property AboutBoxCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdAboutBox Is Nothing Then
|
||||||
|
m_cmdAboutBox = New Command(AddressOf AboutBox)
|
||||||
|
End If
|
||||||
|
Return m_cmdAboutBox
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub AboutBox(ByVal param As Object)
|
||||||
|
Dim AboutBoxWindow As New AboutBoxV
|
||||||
|
AboutBoxWindow.Owner = Application.Current.MainWindow
|
||||||
|
AboutBoxWindow.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' AboutBoxCommand
|
||||||
|
|
||||||
|
#Region "CloseApplicationCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property CloseApplicationCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCloseApplication Is Nothing Then
|
||||||
|
m_cmdCloseApplication = New Command(AddressOf CloseApplication)
|
||||||
|
End If
|
||||||
|
Return m_cmdCloseApplication
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub CloseApplication(ByVal param As Object)
|
||||||
|
CloseApplication()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CloseApplicationCommand
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,240 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class MoveVM
|
||||||
|
Inherits SceneUserControlVM
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_MsgList As New List(Of String)({TopBar_Msg_Stg0, TopBar_Msg_Stg1})
|
||||||
|
Public ReadOnly Property MsgList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_MsgList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Stage As MoveStage = MoveStage.SelectPart
|
||||||
|
Private Property Stage As MoveStage
|
||||||
|
Get
|
||||||
|
Return m_Stage
|
||||||
|
End Get
|
||||||
|
Set(value As MoveStage)
|
||||||
|
m_Stage = value
|
||||||
|
DirectCast(ParamList(0), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||||
|
ChangeTextColor()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg_Stg0 As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110023) ' Seleziona il pezzo da spostare
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg_Stg1 As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110025) ' Inserisci il vettore di spostamento
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Messages
|
||||||
|
|
||||||
|
#End Region ' Fields & properties
|
||||||
|
|
||||||
|
#Region "CONTRUCTOR"
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New()
|
||||||
|
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
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Overrides Sub LoadParamList()
|
||||||
|
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))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AdvanceStage()
|
||||||
|
Stage += 1
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function AtStage()
|
||||||
|
Return Stage
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function ReadMoveInput()
|
||||||
|
' recupero i valori nelle box
|
||||||
|
Dim x_TextBox As _TextBoxParam = DirectCast(ParamList(1), _TextBoxParam)
|
||||||
|
Dim y_TextBox As _TextBoxParam = DirectCast(ParamList(2), _TextBoxParam)
|
||||||
|
Dim z_TextBox As _TextBoxParam = DirectCast(ParamList(3), _TextBoxParam)
|
||||||
|
' verifico che siano validi
|
||||||
|
If String.IsNullOrEmpty(x_TextBox.sValue) Then x_TextBox.sValue = "0"
|
||||||
|
If String.IsNullOrEmpty(y_TextBox.sValue) Then y_TextBox.sValue = "0"
|
||||||
|
If String.IsNullOrEmpty(z_TextBox.sValue) Then z_TextBox.sValue = "0"
|
||||||
|
' restituisco il vettore
|
||||||
|
Return New Vector3d(CDbl(x_TextBox.sValue),
|
||||||
|
CDbl(y_TextBox.sValue),
|
||||||
|
CDbl(z_TextBox.sValue))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overrides Sub Conferma()
|
||||||
|
' se non avevo visualizzato la preview allora sposto il/i pezzo/i
|
||||||
|
If Not Map.refSceneHostVM.m_bPreviewShown Then
|
||||||
|
Dim vtMove As Vector3d = ReadMoveInput()
|
||||||
|
'''' gestione dell'opzione 'AllSelected
|
||||||
|
'If Not AreSameVectorExact(vtMove, New Vector3d) Then
|
||||||
|
' If Not AllOption_Move.IsChecked Then
|
||||||
|
' Move(m_nIdPart, vtMove, True, False)
|
||||||
|
' Else
|
||||||
|
' Dim ListSelected As List(Of PartSolid)
|
||||||
|
' ListSelected = GetAllSelected()
|
||||||
|
' For Each PartSolidInSel As PartSolid In ListSelected
|
||||||
|
' Move(PartSolidInSel.PartId, vtMove, True, False)
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
' m_bPreview = True
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If Map.refSceneHostVM.m_nIdPart <> GDB_ID.NULL And Not AreSameVectorExact(vtMove, New Vector3d) Then
|
||||||
|
SolidManagerM.Move(Map.refSceneHostVM.m_nIdPart, vtMove, False, True)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
''''' gestione dell'opzione 'AllSelected
|
||||||
|
'If Not AllOption_Move.IsChecked Then
|
||||||
|
' ' AddEvent(New ObjectEvent(m_nIdPart, LastTempTransf()))
|
||||||
|
' If EgtLuaSetGlobIntVar("ASS.nTempToSave", -1) Then AssLog("ASS.nTempToSave = -1")
|
||||||
|
' If EgtLuaCallFunction("ASS.AddEventFromTemp") Then AssLog("ASS.AddEventFromTemp()")
|
||||||
|
'Else
|
||||||
|
' Dim ListSelected As List(Of PartSolid)
|
||||||
|
' ListSelected = GetAllSelected()
|
||||||
|
' 'For Each PartSolidInSel As PartSolid In ListSelected
|
||||||
|
' 'AddEvent(New ObjectEvent(PartSolidInSel.PartId, LastTempTransf()))
|
||||||
|
' For nTrasf As Integer = -ListSelected.Count() To 0 Step +1
|
||||||
|
' If EgtLuaSetGlobIntVar("ASS.nTempToSave", nTrasf) Then AssLog("ASS.nTempToSave = " & nTrasf.ToString)
|
||||||
|
' If EgtLuaCallFunction("ASS.AddEventFromTemp") Then AssLog("ASS.AddEventFromTemp()")
|
||||||
|
' Next
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'' devo salvare le operazioni svolte durante l'accoppiamento come parte della storia globale
|
||||||
|
'For nItTime As Integer = -Map.refSceneHostV.m_nTransfNum To -1 Step 1
|
||||||
|
' '' scorro le ultime trasformazioni temporanee
|
||||||
|
' If EgtLuaSetGlobIntVar("ASS.nTempToSave", nItTime) Then AssLog("ASS.nTempToSave = " & nItTime.ToString)
|
||||||
|
' If EgtLuaCallFunction("ASS.AddEventFromTemp") Then AssLog("ASS.AddEventFromTemp()")
|
||||||
|
'Next
|
||||||
|
If EgtLuaSetGlobIntVar("ASS.nTempToSave", Map.refSceneHostVM.m_nTransfNum + 1) Then AssLog("ASS.nTempToSave = " & (Map.refSceneHostVM.m_nTransfNum + 1).ToString)
|
||||||
|
If EgtLuaCallFunction("ASS.AddLastestEventsFromTemp") Then AssLog("ASS.AddLastestEventsFromTemp()")
|
||||||
|
|
||||||
|
DeselectAll()
|
||||||
|
Map.refSceneHostVM.m_bPreviewShown = False
|
||||||
|
' gestisco le attivazioni di undo/redo
|
||||||
|
SolidManagerM.ManageUndoRedo()
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub Annulla()
|
||||||
|
' faccio il reset del pairing
|
||||||
|
If Map.refSceneHostVM.m_nTransfNum > Map.refSceneHostVM.m_MaxTempTime Then
|
||||||
|
Map.refSceneHostVM.m_nTransfNum = Map.refSceneHostVM.m_MaxTempTime
|
||||||
|
End If
|
||||||
|
For op As Integer = Map.refSceneHostVM.m_nTransfNum To 0 Step -1
|
||||||
|
If EgtLuaCallFunction("ASS.UndoTemp") Then AssLog("ASS.UndoTemp()")
|
||||||
|
Next
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub ShowPreview()
|
||||||
|
Dim Btn As SceneBtn = DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_MOVE)
|
||||||
|
If TypeOf (Btn) Is _ToggleButton Then
|
||||||
|
If Not DirectCast(Btn, _ToggleButton).IsChecked Then Return
|
||||||
|
Else
|
||||||
|
EgtOutLog("CONFIG ERR: Il pulsante di Move è stato definito come Button anziché ToggleButton")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim vtMove As Vector3d = ReadMoveInput()
|
||||||
|
If Map.refSceneHostVM.m_nIdPart <> GDB_ID.NULL And Not AreSameVectorExact(vtMove, New Vector3d) Then
|
||||||
|
If Map.refSceneHostVM.m_bPreviewShown = True Then
|
||||||
|
' resetto il movimento precedente
|
||||||
|
If EgtLuaCallFunction("ASS.UndoTemp") Then AssLog("ASS.UndoTemp()")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'''' eventuale gestione di un'opzione 'All Selected
|
||||||
|
'If Not AllOption_Move.IsChecked And m_nIdPart <> -1 Then
|
||||||
|
' Dim PartSolidSelected As PartSolid = GetPartSolid(m_nIdPart)
|
||||||
|
' If IsNothing(PartSolidSelected) Then Return
|
||||||
|
' Move(m_nIdPart, vtMove, False, True)
|
||||||
|
'Else
|
||||||
|
' Dim ListSelected As List(Of PartSolid)
|
||||||
|
' ListSelected = GetAllSelected()
|
||||||
|
' For Each PartSolidInSel As PartSolid In ListSelected
|
||||||
|
' If IsNothing(PartSolidInSel) Then Return
|
||||||
|
' Move(PartSolidInSel.PartId, vtMove, False, True)
|
||||||
|
' Next
|
||||||
|
'End If
|
||||||
|
|
||||||
|
SolidManagerM.Move(Map.refSceneHostVM.m_nIdPart, vtMove, False, True)
|
||||||
|
|
||||||
|
Map.refSceneHostVM.m_bPreviewShown = True
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Close()
|
||||||
|
SolidManagerM.ResetOperationMarks(Map.refSceneHostVM.m_nIdPart)
|
||||||
|
EgtDraw()
|
||||||
|
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_MOVE)
|
||||||
|
If TypeOf (Btn) Is _ToggleButton Then
|
||||||
|
DirectCast(Btn, _ToggleButton).IsChecked = False
|
||||||
|
Else
|
||||||
|
EgtOutLog("CONFIG ERR: Il pulsante di Move è stato definito come Button anziché ToggleButton")
|
||||||
|
End If
|
||||||
|
' resetto la storia temporanea
|
||||||
|
If EgtLuaCallFunction("ASS.ResetTempStory") Then AssLog("ASS.ResetTempStory()")
|
||||||
|
' resetto il contatore per le operazioni temporanee e la variabile che indica se è stata visualizzata la preview
|
||||||
|
Map.refSceneHostVM.m_nTransfNum = 0
|
||||||
|
Map.refSceneHostVM.m_bPreviewShown = False
|
||||||
|
' setto le variabili per il salvataggio della storia normale
|
||||||
|
Dim bSave As Boolean = True
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveHist", bSave) Then AssLog("ASS.bSaveHist = " & bSave.ToString)
|
||||||
|
Dim bSaveTemp As Boolean = False
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveTemp", bSaveTemp) Then AssLog("ASS.bSaveTemp = " & bSaveTemp.ToString)
|
||||||
|
' rimuovo lo UC dalla griglia
|
||||||
|
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_MoveUC)
|
||||||
|
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
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Globalization
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Resources
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
Imports System.Windows
|
||||||
|
|
||||||
|
' Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||||
|
' set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||||
|
' associate a un assembly.
|
||||||
|
|
||||||
|
' Controllare i valori degli attributi degli assembly
|
||||||
|
|
||||||
|
<Assembly: AssemblyTitle("EgtStone3D")>
|
||||||
|
<Assembly: AssemblyDescription("EgtStone3D Debug 32 bit")>
|
||||||
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
|
<Assembly: AssemblyProduct("EgtStone3D")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||||
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
<Assembly: ComVisible(false)>
|
||||||
|
|
||||||
|
'Per iniziare a creare applicazioni localizzabili, impostare
|
||||||
|
'<UICulture>CultureYouAreCodingWith</UICulture> nel file VBPROJ
|
||||||
|
'all'interno di un <PropertyGroup>. Ad esempio, se si utilizza l'inglese (Stati Uniti)
|
||||||
|
'nei file di origine, impostare <UICulture> su "en-US". Rimuovere quindi il commento
|
||||||
|
'dall'attributo NeutralResourceLanguage seguente. Aggiornare "en-US" nella riga
|
||||||
|
'seguente in modo che corrisponda all'impostazione di UICulture nel file di progetto.
|
||||||
|
|
||||||
|
'<Assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)>
|
||||||
|
|
||||||
|
|
||||||
|
'L'attributo ThemeInfo indica la possibile posizione dei dizionari risorse generici e specifici del tema.
|
||||||
|
'Primo parametro: posizione dei dizionari risorse specifici del tema
|
||||||
|
'(da usare se nella pagina non viene trovata una risorsa,
|
||||||
|
' oppure nei dizionari delle risorse dell'applicazione)
|
||||||
|
|
||||||
|
'Parametro 2: posizione del dizionario risorse generico
|
||||||
|
'(da usare se nella pagina non viene trovata una risorsa,
|
||||||
|
'un'applicazione e alcun dizionario risorse specifico del tema)
|
||||||
|
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Se il progetto viene esposto a COM, il GUID seguente verrà usato come ID del typelib
|
||||||
|
<Assembly: Guid("96f84cf6-cf62-45fe-8c15-4e14ec834e55")>
|
||||||
|
|
||||||
|
' Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
|
||||||
|
'
|
||||||
|
' Versione principale
|
||||||
|
' Versione secondaria
|
||||||
|
' Numero di build
|
||||||
|
' Revisione
|
||||||
|
'
|
||||||
|
|
||||||
|
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||||
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
#If _MyType <> "Empty" Then
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
''' <summary>
|
||||||
|
''' Modulo utilizzato per definire le proprietà disponibili nello spazio dei nomi My per WPF
|
||||||
|
''' </summary>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
<Global.Microsoft.VisualBasic.HideModuleName()> _
|
||||||
|
Module MyWpfExtension
|
||||||
|
Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.Computer)
|
||||||
|
Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.User)
|
||||||
|
Private s_Windows As New ThreadSafeObjectProvider(Of MyWindows)
|
||||||
|
Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.Log)
|
||||||
|
''' <summary>
|
||||||
|
''' Restituisce l'oggetto applicazione per l'applicazione in esecuzione
|
||||||
|
''' </summary>
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||||
|
Friend ReadOnly Property Application() As Application
|
||||||
|
Get
|
||||||
|
Return CType(Global.System.Windows.Application.Current, Application)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
''' <summary>
|
||||||
|
''' Restituisce le informazioni sul computer host.
|
||||||
|
''' </summary>
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||||
|
Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.Computer
|
||||||
|
Get
|
||||||
|
Return s_Computer.GetInstance()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
''' <summary>
|
||||||
|
''' Restituisce le informazioni per l'utente corrente. Se si desidera eseguire l'applicazione con le
|
||||||
|
''' credenziali utente di Windows correnti, chiamare My.User.InitializeWithWindowsUser().
|
||||||
|
''' </summary>
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||||
|
Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.User
|
||||||
|
Get
|
||||||
|
Return s_User.GetInstance()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
''' <summary>
|
||||||
|
''' Restituisce il registro applicazioni. I listener possono essere configurati dal file di configurazione dell'applicazione.
|
||||||
|
''' </summary>
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||||
|
Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.Log
|
||||||
|
Get
|
||||||
|
Return s_Log.GetInstance()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Restituisce la raccolta di oggetti Window definiti nel progetto.
|
||||||
|
''' </summary>
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||||
|
Friend ReadOnly Property Windows() As MyWindows
|
||||||
|
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||||
|
Get
|
||||||
|
Return s_Windows.GetInstance()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||||
|
<Global.Microsoft.VisualBasic.MyGroupCollection("System.Windows.Window", "Create__Instance__", "Dispose__Instance__", "My.MyWpfExtenstionModule.Windows")> _
|
||||||
|
Friend NotInheritable Class MyWindows
|
||||||
|
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||||
|
Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Window})(ByVal Instance As T) As T
|
||||||
|
If Instance Is Nothing Then
|
||||||
|
If s_WindowBeingCreated IsNot Nothing Then
|
||||||
|
If s_WindowBeingCreated.ContainsKey(GetType(T)) = True Then
|
||||||
|
Throw New Global.System.InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
s_WindowBeingCreated = New Global.System.Collections.Hashtable()
|
||||||
|
End If
|
||||||
|
s_WindowBeingCreated.Add(GetType(T), Nothing)
|
||||||
|
Return New T()
|
||||||
|
s_WindowBeingCreated.Remove(GetType(T))
|
||||||
|
Else
|
||||||
|
Return Instance
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
|
||||||
|
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||||
|
Private Sub Dispose__Instance__(Of T As Global.System.Windows.Window)(ByRef instance As T)
|
||||||
|
instance = Nothing
|
||||||
|
End Sub
|
||||||
|
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New()
|
||||||
|
End Sub
|
||||||
|
<Global.System.ThreadStatic()> Private Shared s_WindowBeingCreated As Global.System.Collections.Hashtable
|
||||||
|
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function Equals(ByVal o As Object) As Boolean
|
||||||
|
Return MyBase.Equals(o)
|
||||||
|
End Function
|
||||||
|
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function GetHashCode() As Integer
|
||||||
|
Return MyBase.GetHashCode
|
||||||
|
End Function
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
|
||||||
|
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||||
|
Friend Overloads Function [GetType]() As Global.System.Type
|
||||||
|
Return GetType(MyWindows)
|
||||||
|
End Function
|
||||||
|
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function ToString() As String
|
||||||
|
Return MyBase.ToString
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
|
Partial Class Application
|
||||||
|
Inherits Global.System.Windows.Application
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||||
|
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
|
||||||
|
Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo
|
||||||
|
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||||
|
Get
|
||||||
|
Return New Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo(Global.System.Reflection.Assembly.GetExecutingAssembly())
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
#End If
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' This code was generated by a tool.
|
||||||
|
' Runtime Version:$clrversion$
|
||||||
|
'
|
||||||
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
' the code is regenerated.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My.Resources
|
||||||
|
|
||||||
|
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
'class via a tool like ResGen or Visual Studio.
|
||||||
|
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
'with the /str option, or rebuild your VS project.
|
||||||
|
'''<summary>
|
||||||
|
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||||
|
Friend Module Resources
|
||||||
|
|
||||||
|
Private resourceMan As Global.System.Resources.ResourceManager
|
||||||
|
|
||||||
|
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Returns the cached ResourceManager instance used by this class.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||||
|
Get
|
||||||
|
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||||
|
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$safeprojectname$.Resources", GetType(Resources).Assembly)
|
||||||
|
resourceMan = temp
|
||||||
|
End If
|
||||||
|
Return resourceMan
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Overrides the current thread's CurrentUICulture property for all
|
||||||
|
''' resource lookups using this strongly typed resource class.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
|
Get
|
||||||
|
Return resourceCulture
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||||
|
resourceCulture = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' This code was generated by a tool.
|
||||||
|
' Runtime Version:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
' the code is regenerated.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
||||||
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||||
|
|
||||||
|
#Region "My.Settings Auto-Save Functionality"
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||||
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
|
My.Settings.Save()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End If
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Public Shared ReadOnly Property [Default]() As MySettings
|
||||||
|
Get
|
||||||
|
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
If Not addedHandler Then
|
||||||
|
SyncLock addedHandlerLockObject
|
||||||
|
If Not addedHandler Then
|
||||||
|
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||||
|
addedHandler = True
|
||||||
|
End If
|
||||||
|
End SyncLock
|
||||||
|
End If
|
||||||
|
#End If
|
||||||
|
Return defaultInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||||
|
Friend Module MySettingsProperty
|
||||||
|
|
||||||
|
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||||
|
Friend ReadOnly Property Settings() As Global.EgtStone3D.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.EgtStone3D.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
@@ -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>
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Friend Module OptionModule
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Parametri che contengono lista delle lingue disponibili e lingua selezionata
|
||||||
|
Friend m_LanguageList As New ObservableCollection(Of Language)
|
||||||
|
Friend m_SelectedLanguage As Language
|
||||||
|
|
||||||
|
' Colori di sfondo della vista e della griglia
|
||||||
|
Friend m_TopSceneBackground As Color3d
|
||||||
|
Friend m_BotSceneBackground As Color3d
|
||||||
|
Friend m_GridColor As Color3d
|
||||||
|
|
||||||
|
' Flag per visualizzazione spessa delle linee
|
||||||
|
Friend m_bThickLine As Boolean
|
||||||
|
' Flag per visualizzazione smussata delle superfici
|
||||||
|
Friend m_bSmoothTriMesh As Boolean
|
||||||
|
|
||||||
|
' Colore di default in disegno
|
||||||
|
Friend m_DefMaterialColor As Color3d
|
||||||
|
|
||||||
|
' Colore di evidenziazione
|
||||||
|
Friend m_MarkColor As Color3d
|
||||||
|
|
||||||
|
' Colore superfici
|
||||||
|
Friend m_SelSurfColor As Color3d
|
||||||
|
|
||||||
|
' Colore rettangolo di zoom
|
||||||
|
Friend m_RectangleZoomColor As Color3d
|
||||||
|
|
||||||
|
' Colore linea di distanz
|
||||||
|
Friend m_LineDistanceColor As Color3d
|
||||||
|
|
||||||
|
' selezione tema (default=0)
|
||||||
|
Friend m_SelectedThema As Integer = 0
|
||||||
|
|
||||||
|
' selezione tema toppanel (default=0)
|
||||||
|
Friend m_SelectedThemaTopPanel As Integer = 0
|
||||||
|
|
||||||
|
Friend m_bShowGridFrame As Boolean
|
||||||
|
Friend m_bGridState As Integer
|
||||||
|
|
||||||
|
Friend m_bMmUnits As Boolean
|
||||||
|
|
||||||
|
Friend m_MinLnColor As Color3d
|
||||||
|
Friend m_MajLnColor As Color3d
|
||||||
|
|
||||||
|
Friend m_dSnapStepMm As Double
|
||||||
|
Friend m_dSnapStepInch As Double
|
||||||
|
Friend m_nMinLineSStep As Integer
|
||||||
|
Friend m_nMajLineSStep As Integer
|
||||||
|
Friend m_nExtSStep As Integer
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
' inizializzazione lettura variabili ad inizio programma
|
||||||
|
Friend Sub InitOptionModule()
|
||||||
|
' Leggo elenco lingue disponibili da file ini
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
Dim ReadLanguage As Language = GetPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex, IniFile.m_sIniFile)
|
||||||
|
While Not IsNothing(ReadLanguage)
|
||||||
|
OptionModule.m_LanguageList.Add(ReadLanguage)
|
||||||
|
nIndex += 1
|
||||||
|
ReadLanguage = GetPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex, IniFile.m_sIniFile)
|
||||||
|
End While
|
||||||
|
If nIndex = 1 Then
|
||||||
|
EgtOutLog("Error missing languages section in Config.ini")
|
||||||
|
EgtStone3D.EgtMessageBoxV.Show(Application.Current.MainWindow, "Error : missing languages informations", "EgtCAM5", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
End
|
||||||
|
End If
|
||||||
|
' Inizializzo la lingua corrente
|
||||||
|
OptionModule.m_SelectedLanguage = OptionModule.m_LanguageList(0)
|
||||||
|
Dim sMsgName As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GENERAL, K_MESSAGES, "", sMsgName)
|
||||||
|
For Each Language In OptionModule.m_LanguageList
|
||||||
|
If Language.Name = sMsgName Then
|
||||||
|
OptionModule.m_SelectedLanguage = Language
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Inizializzo variabili colori di sfondo scena, griglia
|
||||||
|
Dim BackTopColor As New Color3d(0, 123, 167)
|
||||||
|
GetMainPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
||||||
|
m_TopSceneBackground = BackTopColor
|
||||||
|
Dim BackBotColor As New Color3d(BackTopColor)
|
||||||
|
GetMainPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
|
||||||
|
m_BotSceneBackground = BackBotColor
|
||||||
|
Dim GridColor As New Color3d(0, 0, 0)
|
||||||
|
GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor)
|
||||||
|
m_GridColor = GridColor
|
||||||
|
' Inizializzo flag linee ingrossate
|
||||||
|
m_bThickLine = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1
|
||||||
|
' Inizializzo flag visualizzazione smussata delle superfici
|
||||||
|
m_bSmoothTriMesh = GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0
|
||||||
|
' imposto colore di default
|
||||||
|
Dim DefColor As New Color3d(100, 10, 20)
|
||||||
|
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||||
|
m_DefMaterialColor = DefColor
|
||||||
|
' imposto colore di evidenziazione
|
||||||
|
Dim MarkColor As New Color3d(255, 255, 0)
|
||||||
|
GetMainPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
||||||
|
m_MarkColor = MarkColor
|
||||||
|
' imposto colore per superfici selezionate
|
||||||
|
Dim SelSurfColor As New Color3d(255, 255, 192)
|
||||||
|
GetMainPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
||||||
|
m_SelSurfColor = SelSurfColor
|
||||||
|
' imposto tipo e colore del rettangolo di zoom
|
||||||
|
Dim ZwColor As New Color3d(0, 0, 0)
|
||||||
|
GetMainPrivateProfileZoomWin(S_SCENE, K_ZOOMWIN, True, ZwColor)
|
||||||
|
m_RectangleZoomColor = ZwColor
|
||||||
|
' imposto colore della linea di distanza
|
||||||
|
Dim DstLnColor As New Color3d(255, 0, 0)
|
||||||
|
GetMainPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor)
|
||||||
|
m_LineDistanceColor = DstLnColor
|
||||||
|
' imposto il tema
|
||||||
|
m_SelectedThema = GetMainPrivateProfileInt(S_GENERAL, K_THEMA, 0)
|
||||||
|
' imposto il tema toppanel
|
||||||
|
m_SelectedThemaTopPanel = GetMainPrivateProfileInt(S_GENERAL, K_TOPPANEL, 0)
|
||||||
|
m_bShowGridFrame = (GetMainPrivateProfileInt(S_GRID, K_SHOWFRAME, 1) <> 0)
|
||||||
|
m_bGridState = GetMainPrivateProfileInt(S_GENERAL, K_GRIDSTATE, 1)
|
||||||
|
' imposto unità di misura per interfaccia utente
|
||||||
|
m_bMmUnits = (GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
||||||
|
m_MinLnColor = New Color3d(160, 160, 160)
|
||||||
|
GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, m_MinLnColor)
|
||||||
|
m_MajLnColor = New Color3d(160, 160, 160)
|
||||||
|
GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, m_MajLnColor)
|
||||||
|
m_dSnapStepMm = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
|
||||||
|
m_dSnapStepInch = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 10)
|
||||||
|
m_nMinLineSStep = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
||||||
|
m_nMajLineSStep = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
|
||||||
|
m_nExtSStep = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 50)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
<EgtWPFLib5:EgtMainWindow x:Class="OptionWindowV"
|
||||||
|
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"
|
||||||
|
Style="{StaticResource OptionWindowV_Window}">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.Resources>
|
||||||
|
<EgtStone3D:SelectedComboConverter x:Key="SelectedComboConverter"/>
|
||||||
|
</Grid.Resources>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TabControl Style="{StaticResource OprtionWindow_TC}">
|
||||||
|
<TabItem Header="{Binding GenericMsg}">
|
||||||
|
<Grid Style="{StaticResource TopPanel_Grid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<GroupBox Style="{StaticResource OptionWindow_GrBx}">
|
||||||
|
<GroupBox.Header>
|
||||||
|
<TextBlock Text="{Binding CurrentLanguageMsg}"
|
||||||
|
Style="{StaticResource OptionWindow_TxBl}"/>
|
||||||
|
</GroupBox.Header>
|
||||||
|
<UniformGrid Rows="2"
|
||||||
|
Style="{StaticResource OptionWindow_UniformGrid}">
|
||||||
|
<ComboBox DisplayMemberPath="Name"
|
||||||
|
ItemsSource="{Binding LanguageList}"
|
||||||
|
SelectedItem="{Binding SelectedLanguage, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{StaticResource OptionWindow_CmBx}"/>
|
||||||
|
<TextBlock Text="{Binding LanguageAdvertMsg}"
|
||||||
|
Style="{StaticResource OptionWindow_TxBl}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>
|
||||||
|
<GroupBox Grid.Column="1"
|
||||||
|
Style="{StaticResource OptionWindow_GrBx}">
|
||||||
|
<GroupBox.Header>
|
||||||
|
<TextBlock Text="{Binding TemaMsg}"
|
||||||
|
Style="{StaticResource OptionWindow_TxBl}"/>
|
||||||
|
</GroupBox.Header>
|
||||||
|
<UniformGrid Rows="2"
|
||||||
|
Style="{StaticResource OptionWindow_UniformGrid}">
|
||||||
|
<ComboBox DisplayMemberPath="Name"
|
||||||
|
ItemsSource="{Binding Themes, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedTheme}"
|
||||||
|
Style="{StaticResource OptionWindow_CmBx}"/>
|
||||||
|
<TextBlock Text="{Binding TemaAdvertMsg}"
|
||||||
|
Style="{StaticResource OptionWindow_TxBl}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>
|
||||||
|
<GroupBox Grid.Column="2"
|
||||||
|
Style="{StaticResource OptionWindow_GrBx}">
|
||||||
|
<GroupBox.Header>
|
||||||
|
<TextBlock Text="{Binding TemaTopPanelMsg}"
|
||||||
|
Style="{StaticResource OptionWindow_TxBl}"/>
|
||||||
|
</GroupBox.Header>
|
||||||
|
<UniformGrid Rows="2"
|
||||||
|
Style="{StaticResource OptionWindow_UniformGrid}">
|
||||||
|
<ComboBox ItemsSource="{Binding ListTopPanel, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedTopPanel}"
|
||||||
|
Style="{StaticResource OptionWindow_CmBx}">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource SelectedComboConverter}}"
|
||||||
|
Style="{StaticResource Background_TxBl}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding TemaTopPanelAdvertMsg}"
|
||||||
|
Style="{StaticResource OptionWindow_TxBl}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>
|
||||||
|
<UniformGrid Grid.Row="1"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Columns="2"
|
||||||
|
Style="{StaticResource Background_UniformGrid}">
|
||||||
|
<TextBlock Text="{Binding TopSceneBackgroundMsg}"
|
||||||
|
Style="{StaticResource Background_TxBl}"/>
|
||||||
|
<Button Background="{Binding TopSceneBackground}"
|
||||||
|
Command="{Binding TopSceneBackground_Command}"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<UniformGrid Grid.Row="2"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Columns="2"
|
||||||
|
Style="{StaticResource SceneBackground_UniformGrid}">
|
||||||
|
<TextBlock Text="{Binding BotSceneBackgroundMsg}"
|
||||||
|
Style="{StaticResource Background_TxBl}"/>
|
||||||
|
<Button Background="{Binding BotSceneBackground}"
|
||||||
|
Command="{Binding BotSceneBackground_Command}"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<UniformGrid Grid.Row="3"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Columns="2"
|
||||||
|
Style="{StaticResource SceneBackground_UniformGrid}">
|
||||||
|
<TextBlock Text="{Binding GridColorMsg}"
|
||||||
|
Style="{StaticResource Background_TxBl}"/>
|
||||||
|
<Button Background="{Binding GridColor}"
|
||||||
|
Command="{Binding GridColor_Command}"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<Grid Grid.Row="4"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Grid.ColumnSpan="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding ThickLineMsg}"
|
||||||
|
Style="{StaticResource ColorLine_TxBl}"/>
|
||||||
|
<CheckBox Grid.Column="1"
|
||||||
|
IsChecked="{Binding ThickLine}"
|
||||||
|
Style="{StaticResource ColorLine_ChBx}"/>
|
||||||
|
<TextBlock Grid.Row="1"
|
||||||
|
Text="{Binding SmoothTriMeshMsg}"
|
||||||
|
Style="{StaticResource ColorLine_TxBl}"/>
|
||||||
|
<CheckBox Grid.Row="1"
|
||||||
|
Grid.Column="1"
|
||||||
|
IsChecked="{Binding SmoothTriMesh}"
|
||||||
|
Style="{StaticResource ColorLine_ChBx}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Grid.Row="6"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Style="{StaticResource Licence_Grid}">
|
||||||
|
<Button Content="{Binding UpdateLicenceMsg}"
|
||||||
|
Command="{Binding UpdateLicence_Command}"
|
||||||
|
Style="{StaticResource Licence_Btn}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
Style="{StaticResource RightPanel_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class OptionWindowV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,530 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Drawing
|
||||||
|
|
||||||
|
Public Class OptionWindowVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELD & PROPERTIES"
|
||||||
|
|
||||||
|
Private ReadOnly m_ThemesDataService As New ThemesDataServiceVM()
|
||||||
|
|
||||||
|
Public ReadOnly Property LanguageList As ObservableCollection(Of Language)
|
||||||
|
Get
|
||||||
|
Return OptionModule.m_LanguageList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SelectedLanguage As Language
|
||||||
|
Get
|
||||||
|
Return OptionModule.m_SelectedLanguage
|
||||||
|
End Get
|
||||||
|
Set(value As Language)
|
||||||
|
If value IsNot OptionModule.m_SelectedLanguage Then
|
||||||
|
OptionModule.m_SelectedLanguage = value
|
||||||
|
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
||||||
|
Dim sMsgDir As String = String.Empty
|
||||||
|
If GetMainPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
|
||||||
|
sMsgDir = Map.refMainWindowVM.MainWindowM.sConfigDir
|
||||||
|
End If
|
||||||
|
' Leggo file messaggi
|
||||||
|
Dim sMsgFilePath As String = sMsgDir & "\" & OptionModule.m_SelectedLanguage.FilePath
|
||||||
|
If Not EgtLoadMessages(sMsgFilePath) Then
|
||||||
|
EgtOutLog("Error in EgtLoadMessages")
|
||||||
|
End If
|
||||||
|
UpdateAllMessages()
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, OptionModule.m_SelectedLanguage.Name)
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TopSceneBackground As System.Windows.Media.Brush
|
||||||
|
Get
|
||||||
|
Return New SolidColorBrush(System.Windows.Media.Color.FromArgb(CByte(255),
|
||||||
|
CByte(OptionModule.m_TopSceneBackground.R),
|
||||||
|
CByte(OptionModule.m_TopSceneBackground.G),
|
||||||
|
CByte(OptionModule.m_TopSceneBackground.B)))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property BotSceneBackground As System.Windows.Media.Brush
|
||||||
|
Get
|
||||||
|
Return New SolidColorBrush(System.Windows.Media.Color.FromArgb(CByte(255),
|
||||||
|
CByte(OptionModule.m_BotSceneBackground.R),
|
||||||
|
CByte(OptionModule.m_BotSceneBackground.G),
|
||||||
|
CByte(OptionModule.m_BotSceneBackground.B)))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property GridColor As System.Windows.Media.Brush
|
||||||
|
Get
|
||||||
|
Return New SolidColorBrush(System.Windows.Media.Color.FromArgb(CByte(255),
|
||||||
|
CByte(OptionModule.m_GridColor.R),
|
||||||
|
CByte(OptionModule.m_GridColor.G),
|
||||||
|
CByte(OptionModule.m_GridColor.B)))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ThickLine As Boolean
|
||||||
|
Get
|
||||||
|
Return OptionModule.m_bThickLine
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
OptionModule.m_bThickLine = value
|
||||||
|
WriteMainPrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1"))
|
||||||
|
EgtSetLineAttribs(If(value, 2, 1))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SmoothTriMesh As Boolean
|
||||||
|
Get
|
||||||
|
Return OptionModule.m_bSmoothTriMesh
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
OptionModule.m_bSmoothTriMesh = value
|
||||||
|
WriteMainPrivateProfileString(S_SCENE, K_SHOWTRIAADV, If(value, "1", "0"))
|
||||||
|
EgtSetShowTriaAdv(value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Themes As New ObservableCollection(Of ThemesDataServiceM)
|
||||||
|
Public Property Themes As ObservableCollection(Of ThemesDataServiceM)
|
||||||
|
Get
|
||||||
|
Return m_Themes
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of ThemesDataServiceM))
|
||||||
|
If Not m_Themes.Equals(value) Then
|
||||||
|
m_Themes = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelectedTheme As ThemesDataServiceM
|
||||||
|
Public Property SelectedTheme As ThemesDataServiceM
|
||||||
|
Get
|
||||||
|
Return m_SelectedTheme
|
||||||
|
End Get
|
||||||
|
Set(value As ThemesDataServiceM)
|
||||||
|
m_ThemesDataService.SetTheme(value)
|
||||||
|
m_SelectedTheme = value
|
||||||
|
' salvo in file ini la scelta del tema corrente
|
||||||
|
Dim IndexThema As Integer = Themes.IndexOf(m_SelectedTheme)
|
||||||
|
If IndexThema < 0 Then
|
||||||
|
IndexThema = 0
|
||||||
|
End If
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_THEMA, IndexThema.ToString())
|
||||||
|
m_SelectedThema = IndexThema
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ListTopPanel As New ObservableCollection(Of Integer)({0, 1})
|
||||||
|
Public Property ListTopPanel As ObservableCollection(Of Integer)
|
||||||
|
Get
|
||||||
|
Return m_ListTopPanel
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of Integer))
|
||||||
|
m_ListTopPanel = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelectedTopPanel As Integer = 0
|
||||||
|
Public Property SelectedTopPanel As Integer
|
||||||
|
Get
|
||||||
|
Return m_SelectedTopPanel
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_SelectedTopPanel = value
|
||||||
|
Map.refSceneButtonVM.SetSelTopPanel(value)
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_TOPPANEL, m_SelectedTopPanel.ToString())
|
||||||
|
m_SelectedThemaTopPanel = m_SelectedTopPanel
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdTopSceneBackground As ICommand
|
||||||
|
Private m_cmdBotSceneBackground As ICommand
|
||||||
|
Private m_cmdGridColor As ICommand
|
||||||
|
Private m_cmdUpdateLicenceCmd As ICommand
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property Title As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(5005) ' Opzioni
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CurrentLanguageMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6501) ' Lingua corrente
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property LanguageAdvertMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6502) ' La nuova lingua diventerà corrente dal prossimo avvio del programma.
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TopSceneBackgroundMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6510) ' Colore della vista in alto
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property BotSceneBackgroundMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6511) ' Colore della vista in basso
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property GenericMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6514) ' Generale
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property GridColorMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6517) ' Colore della griglia
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property SmoothTriMeshMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6518) ' Superfici smussate
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ThickLineMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6536) ' Linee spesse
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property UpdateLicenceMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(6553) ' Aggiorna Licenza
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TemaAdvertMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110008) ' Il nuovo tema diventerà corrente quando verrà selezionato.
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TemaMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110009) ' Tema
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TemaTopPanelAdvertMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110032) ' Il nuovo top panel diventerà corrente quando selezionato
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TemaTopPanelMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110031) ' Top Panel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Messages
|
||||||
|
|
||||||
|
#End Region ' Field & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
LoadThemes()
|
||||||
|
LoadTopPanelThemes()
|
||||||
|
Map.SetRefOptionWindowVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che permette di selezionare il colore per modificare la scena
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Col">colore di base</param>
|
||||||
|
''' <param name="NewCol">colore nuovo</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Private Function SelectColor(Col As Color3d, ByRef NewCol As Color3d) As Boolean
|
||||||
|
' Recupero colori custom
|
||||||
|
Dim sCustomColors As String = ""
|
||||||
|
GetMainPrivateProfileString(S_COLORS, K_CUSTOMCOLORS, "", sCustomColors)
|
||||||
|
Dim CustomColors() As String = sCustomColors.Split(","c)
|
||||||
|
Dim nCustomColors As New List(Of Integer)
|
||||||
|
For Each Color In CustomColors
|
||||||
|
Dim nColor As Integer
|
||||||
|
If Integer.TryParse(Color, nColor) Then
|
||||||
|
nCustomColors.Add(nColor)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Creo dialogo colori
|
||||||
|
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
|
||||||
|
.CustomColors = nCustomColors.ToArray(),
|
||||||
|
.Color = Col.ToColor()
|
||||||
|
}
|
||||||
|
' Visualizzo dialogo
|
||||||
|
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
|
||||||
|
'Recupero colore scelto
|
||||||
|
NewCol.FromColor(ColorDlg.Color)
|
||||||
|
''Salvo eventuali modifiche ai colori custom
|
||||||
|
sCustomColors = ""
|
||||||
|
For Each Color In ColorDlg.CustomColors
|
||||||
|
sCustomColors &= Color.ToString() & ","
|
||||||
|
Next
|
||||||
|
sCustomColors = sCustomColors.Trim({" "c, ","c})
|
||||||
|
WriteMainPrivateProfileString(S_COLORS, K_CUSTOMCOLORS, sCustomColors)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Seleziona il tema se presente
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="IndexThema"></param>
|
||||||
|
Public Sub SetThema(IndexThema As Integer)
|
||||||
|
If m_Themes.Count > 0 Then
|
||||||
|
m_ThemesDataService.SetTheme(m_Themes(IndexThema))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che carica i temi del top panel
|
||||||
|
''' </summary>
|
||||||
|
Private Sub LoadTopPanelThemes()
|
||||||
|
' Seleziono elemento in ComboBox
|
||||||
|
m_SelectedTopPanel = m_ListTopPanel(OptionModule.m_SelectedThemaTopPanel)
|
||||||
|
' Attivo il tema toppanel letto sopra
|
||||||
|
If Not IsNothing(Map.refSceneButtonVM) Then Map.refSceneButtonVM.SetSelTopPanel(OptionModule.m_SelectedThemaTopPanel)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Fuzione che carica i temi del dizionario
|
||||||
|
''' </summary>
|
||||||
|
Private Sub LoadThemes()
|
||||||
|
' Popolo la lista temi
|
||||||
|
m_Themes.Add(New ThemesDataServiceM() With {
|
||||||
|
.Name = "Default",
|
||||||
|
.Path = "Utility/EgtStone3DDictionary.xaml"
|
||||||
|
})
|
||||||
|
m_Themes.Add(New ThemesDataServiceM() With {
|
||||||
|
.Name = "Dark",
|
||||||
|
.Path = "Utility/EgtStone3DDarkDictionary.xaml"
|
||||||
|
})
|
||||||
|
' Seleziono elemento in ComboBox
|
||||||
|
m_SelectedTheme = m_Themes(OptionModule.m_SelectedThema)
|
||||||
|
' Attivo il tema letto sopra
|
||||||
|
SetThema(OptionModule.m_SelectedThema)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che aggiorna i messaggi delle opzioni
|
||||||
|
''' </summary>
|
||||||
|
Private Sub UpdateMessageOption()
|
||||||
|
NotifyPropertyChanged(NameOf(Title))
|
||||||
|
NotifyPropertyChanged(NameOf(CurrentLanguageMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(LanguageAdvertMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(TopSceneBackgroundMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(BotSceneBackgroundMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(GenericMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(GridColorMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(SmoothTriMeshMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(ThickLineMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(UpdateLicenceMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(TemaAdvertMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(TemaMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(TemaTopPanelAdvertMsg))
|
||||||
|
NotifyPropertyChanged(NameOf(TemaTopPanelMsg))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che aggiorna tutti i messaggi
|
||||||
|
''' </summary>
|
||||||
|
Friend Sub UpdateAllMessages()
|
||||||
|
UpdateMessageOption()
|
||||||
|
Map.refTopPanelVM.UpdateMessagesTopPanel()
|
||||||
|
Map.refProjManagerVM.UpdateMessageProjManager()
|
||||||
|
Map.refSecondaryWindowVM.UpdateTitle()
|
||||||
|
Map.refViewPanelVM.UpdateMessageViewPanel()
|
||||||
|
Map.refViewPanelProspectiveVM.UpdateMessageViewProspectivePanel()
|
||||||
|
Map.refGridPanelVM.UpdateMessageGridPanel()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "TopSceneBackgroundCmd"
|
||||||
|
|
||||||
|
Public ReadOnly Property TopSceneBackground_Command() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdTopSceneBackground Is Nothing Then
|
||||||
|
m_cmdTopSceneBackground = New Command(AddressOf TopSceneBackgroundCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdTopSceneBackground
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che permette di cambiare sfondo alla parte superiore della scena
|
||||||
|
''' </summary>
|
||||||
|
Public Sub TopSceneBackgroundCmd()
|
||||||
|
' Recupero colore da Ini
|
||||||
|
Dim BackTopColor As New Color3d(192, 192, 192)
|
||||||
|
GetMainPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
||||||
|
' Eseguo modifica con dialogo
|
||||||
|
If SelectColor(BackTopColor, BackTopColor) Then
|
||||||
|
OptionModule.m_TopSceneBackground = BackTopColor
|
||||||
|
Map.refSceneHostVM.MainScene.SetViewBackground(OptionModule.m_TopSceneBackground, OptionModule.m_BotSceneBackground)
|
||||||
|
WritePrivateProfileColor(S_SCENE, K_BACKTOP, OptionModule.m_TopSceneBackground)
|
||||||
|
NotifyPropertyChanged(NameOf(TopSceneBackground))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' TopSceneBackgroundCmd
|
||||||
|
|
||||||
|
#Region "BotSceneBackgroundCmd"
|
||||||
|
|
||||||
|
Public ReadOnly Property BotSceneBackground_Command() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdBotSceneBackground Is Nothing Then
|
||||||
|
m_cmdBotSceneBackground = New Command(AddressOf BotSceneBackgroundCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdBotSceneBackground
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che permette di cambiare sfondo alla parte inferiore della scena
|
||||||
|
''' </summary>
|
||||||
|
Public Sub BotSceneBackgroundCmd()
|
||||||
|
' Recupero colore da Ini
|
||||||
|
Dim BackBotColor As New Color3d(192, 192, 192)
|
||||||
|
GetMainPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
|
||||||
|
' Eseguo modifica con dialogo
|
||||||
|
If SelectColor(BackBotColor, BackBotColor) Then
|
||||||
|
OptionModule.m_BotSceneBackground = BackBotColor
|
||||||
|
Map.refSceneHostVM.MainScene.SetViewBackground(OptionModule.m_TopSceneBackground, OptionModule.m_BotSceneBackground)
|
||||||
|
WritePrivateProfileColor(S_SCENE, K_BACKBOTTOM, OptionModule.m_BotSceneBackground)
|
||||||
|
NotifyPropertyChanged(NameOf(BotSceneBackground))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' BotSceneBackgroundCmd
|
||||||
|
|
||||||
|
#Region "GridColorCmd"
|
||||||
|
|
||||||
|
Public ReadOnly Property GridColor_Command() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdGridColor Is Nothing Then
|
||||||
|
m_cmdGridColor = New Command(AddressOf GridColorCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdGridColor
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che permette di cambiare sfondo alla griglia della scena
|
||||||
|
''' </summary>
|
||||||
|
Public Sub GridColorCmd()
|
||||||
|
' Recupero colore da Ini
|
||||||
|
Dim GridColor As New Color3d(192, 192, 192)
|
||||||
|
GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor)
|
||||||
|
' Eseguo modifica con dialogo
|
||||||
|
If SelectColor(GridColor, GridColor) Then
|
||||||
|
OptionModule.m_GridColor = GridColor
|
||||||
|
EgtSetGridColor(GridColor, GridColor)
|
||||||
|
WritePrivateProfileColor(S_GRID, K_MINLNCOLOR, OptionModule.m_GridColor)
|
||||||
|
WritePrivateProfileColor(S_GRID, K_MAJLNCOLOR, OptionModule.m_GridColor)
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(GridColor))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' GridColorCmd
|
||||||
|
|
||||||
|
#Region "UpdateLicenceCmd"
|
||||||
|
|
||||||
|
Public ReadOnly Property UpdateLicence_Command() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdUpdateLicenceCmd Is Nothing Then
|
||||||
|
m_cmdUpdateLicenceCmd = New Command(AddressOf UpdateLicenceCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdUpdateLicenceCmd
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che permette l'update della licenza
|
||||||
|
''' </summary>
|
||||||
|
Public Sub UpdateLicenceCmd()
|
||||||
|
' Apro dialogo per richiesta file licenza
|
||||||
|
Dim LicDlg As New EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
|
||||||
|
.Title = EgtMsg(110026), ' Licenza
|
||||||
|
.InitialDirectory = Map.refMainWindowVM.MainWindowM.sConfigDir,
|
||||||
|
.Filter = "Licences (.lic)|*.lic",
|
||||||
|
.FilterIndex = 1,
|
||||||
|
.CheckFileExists = True,
|
||||||
|
.ValidateNames = True
|
||||||
|
}
|
||||||
|
If LicDlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||||
|
' Recupero il direttorio del file
|
||||||
|
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
|
||||||
|
' Se il file non è già nel direttorio di configurazione lo copio
|
||||||
|
If Not String.Equals(Path.GetFullPath(sDir), Path.GetFullPath(Map.refMainWindowVM.MainWindowM.sConfigDir), StringComparison.OrdinalIgnoreCase) Then
|
||||||
|
Try
|
||||||
|
File.Copy(LicDlg.FileName, Path.Combine(Map.refMainWindowVM.MainWindowM.sConfigDir, LicDlg.SafeFileName), True)
|
||||||
|
Catch ex As Exception
|
||||||
|
Return
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
' Imposto il nuovo file di licenza nell'Ini
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_LICENCE, LicDlg.SafeFileName)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' UpdateLicenceCmd
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class SelectedComboConverter
|
||||||
|
Implements IValueConverter
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Permette la conversione del tema del top panel selezionato in testo
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="value"></param>
|
||||||
|
''' <param name="targetType"></param>
|
||||||
|
''' <param name="parameter"></param>
|
||||||
|
''' <param name="culture"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
|
||||||
|
If TypeOf value Is Integer Then
|
||||||
|
Select Case value
|
||||||
|
Case 0
|
||||||
|
Return EgtMsg(110031)
|
||||||
|
Case 1
|
||||||
|
Return EgtMsg(110031) & " 1"
|
||||||
|
Case Else
|
||||||
|
Return Nothing
|
||||||
|
End Select
|
||||||
|
Else
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||||
|
Throw New NotImplementedException()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,232 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class PairVM
|
||||||
|
Inherits SceneUserControlVM
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
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 PairStage = PairStage.FirstLine
|
||||||
|
Private Property Stage As PairStage
|
||||||
|
Get
|
||||||
|
Return m_Stage
|
||||||
|
End Get
|
||||||
|
Set(value As PairStage)
|
||||||
|
m_Stage = value
|
||||||
|
DirectCast(ParamList(0), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||||
|
ChangeTextColor()
|
||||||
|
If m_Stage = PairStage.FacePair Then SetAllVisible()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg_Stg0 As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110000) ' Seleziona dal primo Part il lato che vuoi accoppiare
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg_Stg1 As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110020) ' Seleziona dal secondo Part il lato con cui vuoi accoppiare quello appena selezionato
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg_Stg2 As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110021) ' Modifica le impostazioni di accoppiamento; tenendo premuto SHIFT puoi anche selezionare per ogni Part una faccia adiacente ai due lati accoppiati, per farle coincidere
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property FlipOption1_Msg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110001) ' Flip ∥
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property FlipOption2_Msg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110002) ' Flip ⟂
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Messages
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New()
|
||||||
|
Title = EGT_PAIR.ToUpper()
|
||||||
|
'comincio a contare le operazioni temporanee per poterle poi salvare nella eventualmente nella storia
|
||||||
|
Map.refSceneHostVM.m_nTransfNum = 0
|
||||||
|
' setto le variabili di salvataggio per le operazioni temporanee
|
||||||
|
Dim bSave As Boolean = False
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveHist", bSave) Then AssLog("ASS.bSaveHist = " & bSave.ToString)
|
||||||
|
Dim bSaveTemp As Boolean = True
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveTemp", bSaveTemp) Then AssLog("ASS.bSaveTemp = " & bSaveTemp.ToString)
|
||||||
|
|
||||||
|
LoadParamList()
|
||||||
|
|
||||||
|
ActivateButton()
|
||||||
|
RemoveAllUC()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Overrides Sub LoadParamList()
|
||||||
|
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))
|
||||||
|
AddGenericParam(New _CheckBoxParam("FlipOption1", FlipOption1_Msg, Visibility.Collapsed))
|
||||||
|
AddGenericParam(New _CheckBoxParam("FlipOption2", FlipOption2_Msg, Visibility.Collapsed))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AdvanceStage()
|
||||||
|
Stage += 1
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function AtStage()
|
||||||
|
Return Stage
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overrides Sub Conferma()
|
||||||
|
' salvo la storia delle operazioni svolte durante l'accoppiamento
|
||||||
|
Dim PartSolidSel As PartSolidM = SolidManagerM.GetPartSolid(Map.refSceneHostVM.m_nIdPart)
|
||||||
|
If IsNothing(PartSolidSel) Then
|
||||||
|
Annulla()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
If PartSolidSel.nIdLineSecond <> GDB_ID.NULL Then
|
||||||
|
Dim nPartToPair = EgtGetParent(EgtGetParent(PartSolidSel.nIdLineSecond))
|
||||||
|
Dim PartSolidPair As PartSolidM = GetPartSolid(nPartToPair)
|
||||||
|
If IsNothing(PartSolidPair) Then
|
||||||
|
GoTo NoSecondLine
|
||||||
|
End If
|
||||||
|
'' devo salvare le operazioni svolte durante l'accoppiamento come parte della storia globale
|
||||||
|
For nItTime As Integer = -Map.refSceneHostVM.m_nTransfNum To -1 Step 1
|
||||||
|
'' scorro le ultime trasformazioni temporanee
|
||||||
|
If EgtLuaSetGlobIntVar("ASS.nTempToSave", nItTime) Then AssLog("ASS.nTempToSave = " & nItTime.ToString)
|
||||||
|
If EgtLuaCallFunction("ASS.AddEventFromTemp") Then AssLog("ASS.AddEventFromTemp()")
|
||||||
|
Next
|
||||||
|
' concludo l'accoppiamento
|
||||||
|
' aggiorno il vettore dei paired e le info
|
||||||
|
SolidManagerM.UpdatePairInfo(Map.refSceneHostVM.m_nIdPart)
|
||||||
|
Map.refSceneHostVM.nTime += 1
|
||||||
|
'' Aggiorno la vista del TreeView
|
||||||
|
'UpdateTreeViewPart()
|
||||||
|
End If
|
||||||
|
NoSecondLine:
|
||||||
|
' resetto il contatore per le operazioni temporanee
|
||||||
|
Map.refSceneHostVM.m_nTransfNum = 0
|
||||||
|
' gestisco le attivazioni di undo/redo
|
||||||
|
SolidManagerM.ManageUndoRedo()
|
||||||
|
' chiudo lo user control
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub Annulla()
|
||||||
|
' faccio il reset del pairing
|
||||||
|
If Map.refSceneHostVM.m_nTransfNum > Map.refSceneHostVM.m_MaxTempTime Then
|
||||||
|
Map.refSceneHostVM.m_nTransfNum = Map.refSceneHostVM.m_MaxTempTime
|
||||||
|
End If
|
||||||
|
For op As Integer = Map.refSceneHostVM.m_nTransfNum To 0 Step -1
|
||||||
|
If EgtLuaCallFunction("ASS.UndoTemp") Then AssLog("ASS.UndoTemp()")
|
||||||
|
Next
|
||||||
|
'resetto eventuali intersezioni
|
||||||
|
SolidManagerM.ResetInters()
|
||||||
|
' chiudo lo user control
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Close()
|
||||||
|
SolidManagerM.ResetOperationMarks(Map.refSceneHostVM.m_nIdPart)
|
||||||
|
EgtDraw()
|
||||||
|
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_PAIR)
|
||||||
|
If TypeOf (Btn) Is _ToggleButton Then
|
||||||
|
DirectCast(Btn, _ToggleButton).IsChecked = False
|
||||||
|
Else
|
||||||
|
EgtOutLog("CONFIG ERR: Il pulsante di Pair è stato definito come Button anziché ToggleButton")
|
||||||
|
End If
|
||||||
|
If EgtLuaCallFunction("ASS.ResetTempStory") Then AssLog("ASS.ResetTempStory()")
|
||||||
|
Map.refSceneHostVM.m_nTransfNum = 0
|
||||||
|
' setto le variabili per il salvataggio della storia normale
|
||||||
|
Dim bSave As Boolean = True
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveHist", bSave) Then AssLog("ASS.bSaveHist = " & bSave.ToString)
|
||||||
|
Dim bSaveTemp As Boolean = False
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveTemp", bSaveTemp) Then AssLog("ASS.bSaveTemp = " & bSaveTemp.ToString)
|
||||||
|
' rimuovo lo UC dalla griglia
|
||||||
|
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_PairUC)
|
||||||
|
SolidManagerM.ManageUndoRedo()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetAllVisible()
|
||||||
|
ParamList(1).nVisibility = Visibility.Visible
|
||||||
|
ParamList(2).nVisibility = Visibility.Visible
|
||||||
|
ParamList(3).nVisibility = Visibility.Visible
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub PairParts()
|
||||||
|
Dim nId As Integer = Map.refSceneHostVM.m_nIdPart
|
||||||
|
Dim nOpInd As Integer = DirectCast(ParamList(1), _ComboBoxParam).ParamCmBxList.IndexOf(DirectCast(ParamList(1), _ComboBoxParam).SelParamCmBx)
|
||||||
|
Dim bFlip1 As Boolean = DirectCast(ParamList(2), _CheckBoxParam).IsChecked
|
||||||
|
Dim bFlip2 As Boolean = DirectCast(ParamList(3), _CheckBoxParam).IsChecked
|
||||||
|
Dim nTransf As Integer = 0
|
||||||
|
PairPart(nId, nOpInd, bFlip1, bFlip2, Map.refSceneHostVM.m_bFlippedParal, Map.refSceneHostVM.m_bFlippedPerp, nTransf)
|
||||||
|
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"
|
||||||
|
|
||||||
|
Public Overrides Sub OnCheckboxCheckedChanged(sender As Object, checkedState As Boolean)
|
||||||
|
Dim CheckBox As _CheckBoxParam = DirectCast(sender, _CheckBoxParam)
|
||||||
|
Select Case CheckBox.Name
|
||||||
|
Case "FlipOption1"
|
||||||
|
PairParts()
|
||||||
|
Case "FlipOption2"
|
||||||
|
PairParts()
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub OnComboboxSelectionChanged(sender As Object, Selection As ParamCmBx)
|
||||||
|
PairParts()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Events
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,553 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class EditPanelVM
|
||||||
|
Inherits SceneUserControlVM
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
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
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Stage As EditPanelStage = EditPanelStage.SelectPart
|
||||||
|
Private Property Stage As EditPanelStage
|
||||||
|
Get
|
||||||
|
Return m_Stage
|
||||||
|
End Get
|
||||||
|
Set(value As EditPanelStage)
|
||||||
|
m_Stage = value
|
||||||
|
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
|
||||||
|
|
||||||
|
' id del part selezionato per essere modificato
|
||||||
|
Private m_nIdPart As Integer = GDB_ID.NULL
|
||||||
|
Public Property nIdPart As Integer
|
||||||
|
Get
|
||||||
|
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
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg_Stg0 As String
|
||||||
|
Get
|
||||||
|
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
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
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"
|
||||||
|
|
||||||
|
Private Sub UpdatePanelInfoFromPart(nIdPart As Integer)
|
||||||
|
If nIdPart = GDB_ID.NULL Then Return
|
||||||
|
Dim dH As Double = 100
|
||||||
|
EgtGetInfo(nIdPart, "H", dH)
|
||||||
|
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(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))
|
||||||
|
|
||||||
|
' checkbox
|
||||||
|
AddGenericParam(New _CheckBoxParam("ModificaAdiacenti", "Modifica anche altre paretine dello stesso tipo", Visibility.Visible))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AdvanceStage()
|
||||||
|
Stage += 1
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function AtStage()
|
||||||
|
Return Stage
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overrides Sub Conferma()
|
||||||
|
' 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
|
||||||
|
|
||||||
|
Public Overrides Sub Annulla()
|
||||||
|
Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL
|
||||||
|
SceneCmd.DeselectAll()
|
||||||
|
' chiudo lo user control
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Close()
|
||||||
|
SolidManagerM.ResetOperationMarks(Map.refSceneHostVM.m_nIdPart)
|
||||||
|
EgtDraw()
|
||||||
|
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 Edit Panel è stato definito come Button anziché ToggleButton")
|
||||||
|
End If
|
||||||
|
' rimuovo lo UC dalla griglia
|
||||||
|
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditPanelUC)
|
||||||
|
SolidManagerM.ManageUndoRedo()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
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
|
||||||
|
' 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 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(ParamEnum.PANEL_H), _TextBoxParam).GetValue()
|
||||||
|
If EgtLuaSetGlobNumVar("TOOL.dH", dH) Then AssLog("TOOL.dH = " & dH.ToString())
|
||||||
|
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 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")
|
||||||
|
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()
|
||||||
|
EgtLuaSetGlobNumVar("TOOL.dDiamBore", dDiam)
|
||||||
|
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 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
|
||||||
@@ -0,0 +1,480 @@
|
|||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
|
||||||
|
Public Class NewPanelVM
|
||||||
|
Inherits SceneUserControlVM
|
||||||
|
|
||||||
|
#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
|
||||||
|
Return m_MsgList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Stage As NewPanelStage = NewPanelStage.InsertParam
|
||||||
|
Private Property Stage As NewPanelStage
|
||||||
|
Get
|
||||||
|
Return m_Stage
|
||||||
|
End Get
|
||||||
|
Set(value As NewPanelStage)
|
||||||
|
m_Stage = value
|
||||||
|
DirectCast(ParamList(ParamEnum.MSG_ISTRUZ), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg_Stg0 As String
|
||||||
|
Get
|
||||||
|
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
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New()
|
||||||
|
Title = "Aggiungi Paretina".ToUpper()
|
||||||
|
DirectCast(Map.refSceneButtonVM.m_NewPanelUC, SceneUserControlV).Annulla.Visibility = Visibility.Hidden
|
||||||
|
DirectCast(Map.refSceneButtonVM.m_NewPanelUC, SceneUserControlV).Preview.Visibility = Visibility.Hidden
|
||||||
|
LoadParamList()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Overrides Sub LoadParamList()
|
||||||
|
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(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(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("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()
|
||||||
|
Stage += 1
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function AtStage()
|
||||||
|
Return Stage
|
||||||
|
End Function
|
||||||
|
|
||||||
|
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
|
||||||
|
Dim sType As String = DirectCast(Selection, ParamCmBx).Name
|
||||||
|
If sType = EGT_SPLITBOTTOM Then
|
||||||
|
DirectCast(Map.refSceneButtonVM.m_NewPanelUC, SceneUserControlV).Preview.Visibility = 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
|
||||||
|
ElseIf sType = EGT_SINK_SPLITBOTTOM 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 = 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
|
||||||
|
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
|
||||||
|
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()
|
||||||
|
' resetto il tipo di elementi da evidenziare
|
||||||
|
Map.refSceneHostVM.m_SelType = GDB_TY.NONE
|
||||||
|
|
||||||
|
' chiudo lo user control
|
||||||
|
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_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
|
||||||
|
SolidManagerM.ManageUndoRedo()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AddPanel(nId As Integer)
|
||||||
|
Dim ComboBoxParam As _ComboBoxParam = DirectCast(ParamList(ParamEnum.TY_PANEL), _ComboBoxParam)
|
||||||
|
If ComboBoxParam.SelParamCmBx.Name = EGT_SPLASHTOP Then
|
||||||
|
AddSplashTop(nId)
|
||||||
|
ElseIf ComboBoxParam.SelParamCmBx.Name = EGT_WATERFALL Then
|
||||||
|
AddWaterfall(nId)
|
||||||
|
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(ParamEnum.TY_PANEL), _ComboBoxParam).SelParamCmBx.Name
|
||||||
|
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 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(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")
|
||||||
|
' chiamo la funzione per la creazione
|
||||||
|
If EgtLuaCallFunction("TOOL.CreateParetinaFull") Then AssLog("TOOL.CreateParetinaFull()")
|
||||||
|
End Sub
|
||||||
|
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 il frontalino
|
||||||
|
Dim dAngFrontalino As Double = -90
|
||||||
|
If EgtLuaSetGlobNumVar("TOOL.dPairAng", dAngFrontalino) Then AssLog("TOOL.dPairAng = " & dAngFrontalino.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(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), 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 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 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, "SinkSplitBottom", "1")
|
||||||
|
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)
|
||||||
|
Dim PanelList As Array = sPartName.Split(","c)
|
||||||
|
For Each sChild As String In PanelList
|
||||||
|
Dim dPairAng As Double = 0
|
||||||
|
Dim nPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, sChild)
|
||||||
|
EgtGetInfo(nPartId, "PairAng", dPairAng)
|
||||||
|
If dPairAng < 0 Then
|
||||||
|
sPartName = sChild
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
WaterFallList.Add(EgtGetFirstNameInGroup(GDB_ID.ROOT, sPartName))
|
||||||
|
Next
|
||||||
|
' ora che ho la lista dei frontalini posso creare lo split bottom
|
||||||
|
AddSplitBottom(WaterFallList, "SinkSplitBottom", "1")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Module PanelManagerM
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<WrapPanel x:Class="ProjManagerButtonV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
|
||||||
|
<Button ToolTip="{Binding NewFile_Msg}"
|
||||||
|
Command="{Binding NewFileCmd}"
|
||||||
|
Style="{StaticResource Proj_Btn}">
|
||||||
|
<Image Source="/Resources/ProjManager/newfile.png"
|
||||||
|
Style="{StaticResource Proj_Img}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button ToolTip="{Binding OpenFile_Msg}"
|
||||||
|
Command="{Binding OpenFileCmd}"
|
||||||
|
Style="{StaticResource Proj_Btn}">
|
||||||
|
<Image Source="/Resources/ProjManager/folder.png"
|
||||||
|
Style="{StaticResource Proj_Img}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button ToolTip="{Binding Save_Msg}"
|
||||||
|
Command="{Binding SaveFileCmd}"
|
||||||
|
Style="{StaticResource Proj_Btn}">
|
||||||
|
<Image Source="/Resources/ProjManager/save.png"
|
||||||
|
Style="{StaticResource Proj_Img}"/>
|
||||||
|
</Button>
|
||||||
|
</WrapPanel>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class ProjManagerButtonV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<StackPanel x:Class="ProjManagerV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
|
||||||
|
Style="{StaticResource SceneButtonH_StackPanel}">
|
||||||
|
|
||||||
|
<EgtStone3D:ProjManagerButtonV DataContext="{StaticResource ProjManagerVM}"/>
|
||||||
|
|
||||||
|
<RadioButton Content="{Binding HomeTab_Msg}"
|
||||||
|
Command="{Binding HomeCmd}"
|
||||||
|
Style="{StaticResource Home_ToggleButton}"/>
|
||||||
|
<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>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class ProjManagerV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class ProjManagerVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property HomeTab_Msg
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110010).ToUpper() ' Home
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Parametrico_Msg
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110011).ToUpper() ' Parametrico
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property NewFile_Msg
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110012) ' Nuovo File
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property OpenFile_Msg
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110015) ' Apri
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Save_Msg
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110013) ' Salva
|
||||||
|
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
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
Map.SetRefProjManagerVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Sub Save()
|
||||||
|
Map.refSceneHostVM.SaveProject()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Funzione che aggiorna i messaggi del Manager
|
||||||
|
''' </summary>
|
||||||
|
Friend Sub UpdateMessageProjManager()
|
||||||
|
NotifyPropertyChanged(NameOf(HomeTab_Msg))
|
||||||
|
NotifyPropertyChanged(NameOf(Parametrico_Msg))
|
||||||
|
NotifyPropertyChanged(NameOf(NewFile_Msg))
|
||||||
|
NotifyPropertyChanged(NameOf(OpenFile_Msg))
|
||||||
|
NotifyPropertyChanged(NameOf(Save_Msg))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "HomeCmd"
|
||||||
|
|
||||||
|
Public ReadOnly Property HomeCmd As ICommand
|
||||||
|
Get
|
||||||
|
If IsNothing(m_HomeCmd) Then
|
||||||
|
m_HomeCmd = New Command(AddressOf Home)
|
||||||
|
End If
|
||||||
|
Return m_HomeCmd
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Sub Home()
|
||||||
|
Map.refTopPanelVM.SetSelTopOption(TopPanelVM.TopOption.OPTIONS)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' HomeCmd
|
||||||
|
|
||||||
|
#Region "ParametricoCmd"
|
||||||
|
|
||||||
|
Public ReadOnly Property ParametricoCmd As ICommand
|
||||||
|
Get
|
||||||
|
If IsNothing(m_ParametricoCmd) Then
|
||||||
|
m_ParametricoCmd = New Command(AddressOf Parametrico)
|
||||||
|
End If
|
||||||
|
Return m_ParametricoCmd
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Sub Parametrico()
|
||||||
|
Map.refTopPanelVM.SetSelTopOption(TopPanelVM.TopOption.PARAMETRICO)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#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
|
||||||
|
Get
|
||||||
|
If IsNothing(m_NewFileCmd) Then
|
||||||
|
m_NewFileCmd = New Command(AddressOf NewFile)
|
||||||
|
End If
|
||||||
|
Return m_NewFileCmd
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend Sub NewFile()
|
||||||
|
Map.refTopPanelVM.NewProject(True)
|
||||||
|
SolidManagerM.CreatePartSolid()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' NewFileCmd
|
||||||
|
|
||||||
|
#Region "OpenFileCmd"
|
||||||
|
|
||||||
|
Public ReadOnly Property OpenFileCmd As ICommand
|
||||||
|
Get
|
||||||
|
If IsNothing(m_OpenFileCmd) Then
|
||||||
|
m_OpenFileCmd = New Command(AddressOf OpenFile)
|
||||||
|
End If
|
||||||
|
Return m_OpenFileCmd
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend Sub OpenFile()
|
||||||
|
Map.refTopPanelVM.OpenProject("")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' OpenFileCmd
|
||||||
|
|
||||||
|
#Region "SaveFileCmd"
|
||||||
|
|
||||||
|
Public ReadOnly Property SaveFileCmd As ICommand
|
||||||
|
Get
|
||||||
|
If IsNothing(m_SaveFileCmd) Then
|
||||||
|
m_SaveFileCmd = New Command(AddressOf SaveFile)
|
||||||
|
End If
|
||||||
|
Return m_SaveFileCmd
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Sub SaveFile()
|
||||||
|
Save()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' SaveFileCmd
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
|
End Class
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 136 B |
|
After Width: | Height: | Size: 311 B |
|
After Width: | Height: | Size: 254 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 374 B |
|
After Width: | Height: | Size: 254 B |
|
After Width: | Height: | Size: 753 B |
|
After Width: | Height: | Size: 605 B |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 813 B |
|
After Width: | Height: | Size: 616 B |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 547 B |
|
After Width: | Height: | Size: 570 B |
|
After Width: | Height: | Size: 528 B |
|
After Width: | Height: | Size: 563 B |
|
After Width: | Height: | Size: 564 B |
|
After Width: | Height: | Size: 552 B |
@@ -0,0 +1,207 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class RotateVM
|
||||||
|
Inherits SceneUserControlVM
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_MsgList As New List(Of String)({TopBar_Msg0, TopBar_Msg1, TopBar_Msg2})
|
||||||
|
Public ReadOnly Property MsgList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_MsgList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bAxisSelected As Boolean = False
|
||||||
|
Public Property bAxisSelected As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bAxisSelected
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bAxisSelected = value
|
||||||
|
If m_bAxisSelected Then AdvanceStage()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Stage As RotateStage = RotateStage.SelectPart
|
||||||
|
Private Property Stage As RotateStage
|
||||||
|
Get
|
||||||
|
Return m_Stage
|
||||||
|
End Get
|
||||||
|
Set(value As RotateStage)
|
||||||
|
m_Stage = value
|
||||||
|
DirectCast(ParamList(0), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
||||||
|
If m_Stage = RotateStage.SelectAxis Then ShowAxis()
|
||||||
|
If m_Stage = RotateStage.InsertAngle Then DirectCast(ParamList(1), _TextBoxParam).IsEnabled = True
|
||||||
|
ChangeTextColor()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg0 As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110024) ' Seleziona il pezzo da ruotare
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TopBar_Msg1 As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110005) ' Seleziona l'asse di rotazione
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property TopBar_Msg2 As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110022) ' Inserisci l'angolo di rotazione
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Testo_Msg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(110006) ' Angolo
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Messages
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New()
|
||||||
|
Title = EGT_ROTATE.ToUpper()
|
||||||
|
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||||
|
|
||||||
|
'comincio a contare le operazioni temporanee per poterle poi salvare nella eventualmente nella storia
|
||||||
|
Map.refSceneHostVM.m_nTransfNum = 0
|
||||||
|
' setto le variabili di salvataggio per le operazioni temporanee
|
||||||
|
Dim bSave As Boolean = False
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveHist", bSave) Then AssLog("ASS.bSaveHist = " & bSave.ToString)
|
||||||
|
Dim bSaveTemp As Boolean = True
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveTemp", bSaveTemp) Then AssLog("ASS.bSaveTemp = " & bSaveTemp.ToString)
|
||||||
|
|
||||||
|
LoadParamList()
|
||||||
|
Stage = If(Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL, RotateStage.SelectPart, RotateStage.SelectAxis)
|
||||||
|
|
||||||
|
ActivateButton()
|
||||||
|
RemoveAllUC()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Overrides Sub LoadParamList()
|
||||||
|
AddGenericParam(New _TextBlockParam(EGT_MESSAGE, MsgList(Stage), ParamType.STR))
|
||||||
|
' Angolo
|
||||||
|
AddGenericParam(New _TextBoxParam(EgtMsg(110006), 0, ParamType.DOUB, Visibility.Visible, False))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AdvanceStage()
|
||||||
|
Stage += 1
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function AtStage()
|
||||||
|
Return Stage
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub ShowAxis()
|
||||||
|
Dim PartSolidSel As PartSolidM = SolidManagerM.GetPartSolid(Map.refSceneHostVM.m_nIdPart)
|
||||||
|
If IsNothing(PartSolidSel) Then Return
|
||||||
|
PartSolidSel.ShowAxis()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub Conferma()
|
||||||
|
If Not Map.refSceneHostVM.m_bRotated Then AngText_Changed()
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub ShowPreview()
|
||||||
|
AngText_Changed()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub Annulla()
|
||||||
|
' faccio il reset del rotate
|
||||||
|
If Map.refSceneHostVM.m_bRotated Then
|
||||||
|
SolidManagerM.ResetRotation(True, True)
|
||||||
|
End If
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Close()
|
||||||
|
SolidManagerM.ResetOperationMarks(Map.refSceneHostVM.m_nIdPart)
|
||||||
|
EgtDraw()
|
||||||
|
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_ROTATE)
|
||||||
|
If TypeOf (Btn) Is _ToggleButton Then
|
||||||
|
DirectCast(Btn, _ToggleButton).IsChecked = False
|
||||||
|
Else
|
||||||
|
EgtOutLog("CONFIG ERR: Il pulsante di Rotate è stato definito come Button anziché ToggleButton")
|
||||||
|
End If
|
||||||
|
' setto le variabili di salvataggio per le operazioni temporanee
|
||||||
|
Dim bSave As Boolean = True
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveHist", bSave) Then AssLog("ASS.bSaveHist = " & bSave.ToString)
|
||||||
|
Dim bSaveTemp As Boolean = False
|
||||||
|
If EgtLuaSetGlobBoolVar("ASS.bSaveTemp", bSaveTemp) Then AssLog("ASS.bSaveTemp = " & bSaveTemp.ToString)
|
||||||
|
Map.refSceneHostVM.m_bRotated = False
|
||||||
|
Map.refSceneHostVM.m_dAngRot = 0
|
||||||
|
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_RotateUC)
|
||||||
|
SolidManagerM.ManageUndoRedo()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AngText_Changed()
|
||||||
|
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_ROTATE)
|
||||||
|
If TypeOf (Btn) Is _ToggleButton Then
|
||||||
|
If Not DirectCast(Btn, _ToggleButton).IsChecked Then Return
|
||||||
|
Else
|
||||||
|
EgtOutLog("CONFIG ERR: Il pulsante di Rotate è stato definito come Button anziché ToggleButton")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nId As Integer = Map.refSceneHostVM.m_nIdPart
|
||||||
|
If nId = GDB_ID.NULL Then Return
|
||||||
|
Dim sAng As String = DirectCast(ParamList(1), _TextBoxParam).sValue
|
||||||
|
If String.IsNullOrEmpty(sAng) Then Return
|
||||||
|
If Not IsNumeric(sAng) Then Return
|
||||||
|
Dim dAng As Double = CDbl(sAng)
|
||||||
|
If dAng <> 0 Then
|
||||||
|
If Map.refSceneHostVM.m_dAngRot <> 0 Then
|
||||||
|
ResetRotation(False, False)
|
||||||
|
End If
|
||||||
|
Dim PartSolidIdSel = SolidManagerM.GetPartSolid(nId)
|
||||||
|
Dim vtDir As Vector3d
|
||||||
|
Dim ptStart As Point3d
|
||||||
|
If PartSolidIdSel.nIdLineAxisRotate = GDB_ID.NULL Then Return
|
||||||
|
EgtStartPoint(PartSolidIdSel.nIdLineAxisRotate, GDB_ID.ROOT, ptStart)
|
||||||
|
EgtStartVector(PartSolidIdSel.nIdLineAxisRotate, GDB_ID.ROOT, vtDir)
|
||||||
|
SolidManagerM.Rotate(nId, ptStart, vtDir, dAng, False, True)
|
||||||
|
Map.refSceneHostVM.m_bRotated = True
|
||||||
|
Map.refSceneHostVM.m_dAngRot = dAng
|
||||||
|
End If
|
||||||
|
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
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<Viewbox x:Class="SVGV"
|
||||||
|
Name="ViewBoxPark"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<StackPanel>
|
||||||
|
<ContentPresenter Content="{Binding LocalMyCanvas.CurrCanvas}"
|
||||||
|
Visibility="{Binding SVG_Visibility}"/>
|
||||||
|
<Image Source="{Binding Img}"
|
||||||
|
Visibility="{Binding Img_Visibility}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</Viewbox>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
Public Class SVGV
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_SVGVM As SVGVM
|
||||||
|
|
||||||
|
#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().
|
||||||
|
AddHandler Me.Loaded, AddressOf SVGV_Loaded
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub SVGV_Loaded()
|
||||||
|
If System.IO.File.Exists(FileSource) Then
|
||||||
|
m_SVGVM = New SVGVM(FileSource)
|
||||||
|
Me.DataContext = m_SVGVM
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Events
|
||||||
|
|
||||||
|
#Region "PROPERTIES"
|
||||||
|
|
||||||
|
Public Shared ReadOnly FileSourceProperty As DependencyProperty = DependencyProperty.RegisterAttached(
|
||||||
|
NameOf(FileSource),
|
||||||
|
GetType(String),
|
||||||
|
GetType(SVGV),
|
||||||
|
New FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.Inherits))
|
||||||
|
|
||||||
|
' Declare public property.
|
||||||
|
Public Property FileSource As String
|
||||||
|
Get
|
||||||
|
Return CStr(GetValue(FileSourceProperty))
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
SetValue(FileSourceProperty, value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Properties
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,440 @@
|
|||||||
|
Imports System.Globalization
|
||||||
|
Imports System.Xml
|
||||||
|
|
||||||
|
Public Class SVGVM
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_Img As String = String.Empty
|
||||||
|
Public Property Img As String
|
||||||
|
Get
|
||||||
|
Return m_Img
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Img = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Svg As String = String.Empty
|
||||||
|
Public ReadOnly Property Svg As String
|
||||||
|
Get
|
||||||
|
Return m_Svg
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_LocalMyCanvas As MyCanvas
|
||||||
|
Public ReadOnly Property LocalMyCanvas As MyCanvas
|
||||||
|
Get
|
||||||
|
Return m_LocalMyCanvas
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SVG_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public Property SVG_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_SVG_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_SVG_Visibility = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Img_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public Property Img_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_Img_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_Img_Visibility = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New(SVG_File As String)
|
||||||
|
' Verifico estensione
|
||||||
|
If System.IO.Path.GetExtension(SVG_File) = ".png" Then
|
||||||
|
m_Img = SVG_File
|
||||||
|
m_Svg = ""
|
||||||
|
m_Img_Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
m_Svg = SVG_File
|
||||||
|
m_Img = ""
|
||||||
|
m_SVG_Visibility = Visibility.Visible
|
||||||
|
End If
|
||||||
|
Dim CanvWidth As Integer = 145
|
||||||
|
Dim CanvHeight As Integer = CInt(CanvWidth / 1.4)
|
||||||
|
m_LocalMyCanvas = New MyCanvas(CanvWidth, CanvHeight)
|
||||||
|
If System.IO.File.Exists(m_Svg) Then
|
||||||
|
ReadMyXML(m_Svg, m_LocalMyCanvas)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
#Region "ELEMENTI PER LA GESTIONE SVG"
|
||||||
|
|
||||||
|
Public Class MyCanvas
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_CurrCanvas As New Canvas
|
||||||
|
Public Property CurrCanvas As Canvas
|
||||||
|
Get
|
||||||
|
Return m_CurrCanvas
|
||||||
|
End Get
|
||||||
|
Set(value As Canvas)
|
||||||
|
m_CurrCanvas = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ListPath As New List(Of MyPath)
|
||||||
|
Public Property ListPath As List(Of MyPath)
|
||||||
|
Get
|
||||||
|
Return m_ListPath
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of MyPath))
|
||||||
|
m_ListPath = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ViewBoxDim As String
|
||||||
|
Public Property ViewBoxDim As String
|
||||||
|
Get
|
||||||
|
Return m_ViewBoxDim
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_ViewBoxDim = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New(Width As Integer, Height As Integer)
|
||||||
|
m_CurrCanvas.Width = Width
|
||||||
|
m_CurrCanvas.Height = Height
|
||||||
|
m_CurrCanvas.ClipToBounds = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Sub LoadCanvas()
|
||||||
|
For Each ItemPath As MyPath In m_ListPath
|
||||||
|
m_CurrCanvas.Children.Add(ItemPath.CurrPath)
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub UpdateMyPath(CurrPath As MyPath)
|
||||||
|
m_CurrCanvas.Children.Remove(CurrPath.CurrPath)
|
||||||
|
m_CurrCanvas.Children.Add(CurrPath.CurrPath)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class MyPath
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_CurrPath As New System.Windows.Shapes.Path
|
||||||
|
Public Property CurrPath As System.Windows.Shapes.Path
|
||||||
|
Get
|
||||||
|
Return m_CurrPath
|
||||||
|
End Get
|
||||||
|
Set(value As System.Windows.Shapes.Path)
|
||||||
|
m_CurrPath = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_CanvX As Double
|
||||||
|
Public ReadOnly Property CanvX As Double
|
||||||
|
Get
|
||||||
|
Return m_CanvX
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_CanvY As Double
|
||||||
|
Public ReadOnly Property CanvY As Double
|
||||||
|
Get
|
||||||
|
Return m_CanvY
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_DimX As Double
|
||||||
|
Public ReadOnly Property DimX As Double
|
||||||
|
Get
|
||||||
|
Return m_DimX
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_DimY As Double
|
||||||
|
Public ReadOnly Property DimY As Double
|
||||||
|
Get
|
||||||
|
Return m_DimY
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_id As String
|
||||||
|
Public ReadOnly Property id As String
|
||||||
|
Get
|
||||||
|
Return m_id
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_d As String
|
||||||
|
Public ReadOnly Property d As String
|
||||||
|
Get
|
||||||
|
Return m_d
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_fill As String
|
||||||
|
Public Property fill As String
|
||||||
|
Get
|
||||||
|
Return m_fill
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_fill = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_fill_opacity As Double
|
||||||
|
Public Property fill_opacity As Double
|
||||||
|
Get
|
||||||
|
Return m_fill_opacity
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_fill_opacity = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_stroke As String
|
||||||
|
Public Property stroke As String
|
||||||
|
Get
|
||||||
|
Return m_stroke
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_stroke = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_stroke_opacity As Double
|
||||||
|
Public Property stroke_opacity As Double
|
||||||
|
Get
|
||||||
|
Return m_stroke_opacity
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_stroke_opacity = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_stroke_width As Double
|
||||||
|
Public Property stroke_width As Double
|
||||||
|
Get
|
||||||
|
Return m_stroke_width
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_stroke_width = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New(Id As String, D As String, CanvX As Double, CanvY As Double, DimX As Double, DimY As Double, Fill As String, FillOpacity As Double, Stroke As String, StrokeOpacity As Double, StrokeWidthAttribute As Double)
|
||||||
|
m_id = Id
|
||||||
|
m_d = D
|
||||||
|
m_CanvX = CanvX
|
||||||
|
m_CanvY = CanvY
|
||||||
|
m_DimX = DimX
|
||||||
|
m_DimY = DimY
|
||||||
|
m_fill = Fill
|
||||||
|
m_fill_opacity = FillOpacity
|
||||||
|
m_stroke = Stroke
|
||||||
|
m_stroke_opacity = StrokeOpacity
|
||||||
|
m_stroke_width = StrokeWidthAttribute
|
||||||
|
LoadPath()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Sub LoadPath()
|
||||||
|
' Carico la geometria
|
||||||
|
m_CurrPath.Data = Geometry.Parse(d)
|
||||||
|
' Carico il colore di sfondo
|
||||||
|
SetBrushFromRGBString(m_fill, m_CurrPath.Fill)
|
||||||
|
' 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
|
||||||
|
' Calcolo e applico la traslazione e la scalatura
|
||||||
|
Dim myTransformGroup As New TransformGroup()
|
||||||
|
Dim ScaleX As Double = m_CanvX / DimX
|
||||||
|
Dim ScaleY As Double = m_CanvY / DimY
|
||||||
|
Dim OffX As Double = (m_CanvX - Math.Min(ScaleX, ScaleY) * DimX) / 2
|
||||||
|
Dim OffY As Double = (m_CanvY - Math.Min(ScaleX, ScaleY) * DimY) / 2
|
||||||
|
myTransformGroup.Children.Add(New ScaleTransform(Math.Min(ScaleX, ScaleY), Math.Min(ScaleX, ScaleY)))
|
||||||
|
myTransformGroup.Children.Add(New TranslateTransform(OffX, OffY))
|
||||||
|
m_CurrPath.RenderTransform = myTransformGroup
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetBrushFromRGBString(sFill As String, ByRef brFill As Brush)
|
||||||
|
If String.IsNullOrEmpty(sFill) Then
|
||||||
|
brFill = Brushes.DarkRed
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim s1 As String = sFill
|
||||||
|
If s1.Contains("rgb") Then
|
||||||
|
s1 = s1.Replace("rgb(", "")
|
||||||
|
s1 = s1.Replace(")", "")
|
||||||
|
Dim s2 As String = ""
|
||||||
|
For Each s As String In s1.Split(",")
|
||||||
|
s2 &= CInt(s).ToString("x2")
|
||||||
|
Next
|
||||||
|
brFill = New BrushConverter().ConvertFrom("#" & s2)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Module XMLReader
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Public Sub ReadMyXML(FilePath As String, Canv As MyCanvas)
|
||||||
|
'Create the XML Reader
|
||||||
|
Dim m_xmlr As XmlTextReader = New XmlTextReader(FilePath)
|
||||||
|
'Disable whitespace so that you don't have to read over whitespaces
|
||||||
|
m_xmlr.WhitespaceHandling = WhitespaceHandling.None
|
||||||
|
' Leggo la prima riga: '?xml' tag
|
||||||
|
m_xmlr.Read()
|
||||||
|
' Passo a leggere la successiva: 'svg' tag
|
||||||
|
m_xmlr.Read()
|
||||||
|
' Leggo gli attributi di questo tag (dimensioni)
|
||||||
|
Dim ViewBoxDim = m_xmlr.GetAttribute("viewBox")
|
||||||
|
Canv.ViewBoxDim = ViewBoxDim
|
||||||
|
' Elaboro i dati per avere la scalatura del disegno
|
||||||
|
Dim DimViewBox As String() = ViewBoxDim.ToString.Split(" ")
|
||||||
|
Dim DimX As Integer = Math.Abs(CInt(DimViewBox(2))) + Math.Abs(CInt(DimViewBox(0)))
|
||||||
|
Dim DimY As Integer = Math.Abs(CInt(DimViewBox(3))) + Math.Abs(CInt(DimViewBox(1)))
|
||||||
|
|
||||||
|
' Leggo in loop i tag: 'path'
|
||||||
|
While Not m_xmlr.EOF
|
||||||
|
m_xmlr.Read()
|
||||||
|
If Not m_xmlr.IsStartElement() Then
|
||||||
|
Continue While
|
||||||
|
End If
|
||||||
|
' recupero il valore dell'attributo 'id'
|
||||||
|
Dim idAttribute = m_xmlr.GetAttribute("id")
|
||||||
|
' recupero il valore dell'attributo 'd'
|
||||||
|
Dim dAttribute = m_xmlr.GetAttribute("d")
|
||||||
|
' recupero il valore dell'attributo 'fill'
|
||||||
|
Dim fillAttribute = m_xmlr.GetAttribute("fill")
|
||||||
|
' recupero il valore dell'attributo 'fill-opacity'
|
||||||
|
Dim fillOpacityAttribute = m_xmlr.GetAttribute("fill-opacity")
|
||||||
|
' recupero il valore dell'attributo 'stroke'
|
||||||
|
Dim strokeAttribute = m_xmlr.GetAttribute("stroke")
|
||||||
|
' recupero il valore dell'attributo 'stroke-opacity'
|
||||||
|
Dim strokeOpacityAttribute = m_xmlr.GetAttribute("stroke-opacity")
|
||||||
|
' recupero il valore dell'attributo 'stroke - Width'
|
||||||
|
Dim strokeWidthAttribute = m_xmlr.GetAttribute("stroke-width")
|
||||||
|
' carico l'elemento in lista solo se esiste un'immagine
|
||||||
|
If Not String.IsNullOrEmpty(idAttribute) And Not String.IsNullOrEmpty(dAttribute) Then
|
||||||
|
Dim fillOpacity As Double = 1 ' CDbl(fillOpacityAttribute)
|
||||||
|
StringToDouble(fillOpacityAttribute, fillOpacity)
|
||||||
|
Dim strokeOpacity As Double = 1 ' CDbl(strokeOpacityAttribute)
|
||||||
|
StringToDouble(strokeOpacityAttribute, strokeOpacity)
|
||||||
|
Dim strokeWidth As Double = 1
|
||||||
|
StringToDouble(strokeWidthAttribute, strokeWidth)
|
||||||
|
Canv.ListPath.Add(New MyPath(idAttribute, dAttribute, Canv.CurrCanvas.Width, Canv.CurrCanvas.Height, DimX, DimY, fillAttribute, fillOpacity, strokeAttribute, strokeOpacity, strokeWidth))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End While
|
||||||
|
' Libero il file dalla lettura
|
||||||
|
m_xmlr.Close()
|
||||||
|
' popolo la canvas con le Ptah che ho caricato
|
||||||
|
Canv.LoadCanvas()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub WriteMyXML(FilePath As String, Canv As MyCanvas)
|
||||||
|
|
||||||
|
Dim _namespaceDefault As String = "http://www.w3.org/2000/svg"
|
||||||
|
|
||||||
|
Dim doc As New Xml.XmlDocument
|
||||||
|
|
||||||
|
Dim elm As System.Xml.XmlNode
|
||||||
|
Dim elmSub As System.Xml.XmlNode
|
||||||
|
Dim elmMain As Xml.XmlNode
|
||||||
|
|
||||||
|
doc = New Xml.XmlDocument
|
||||||
|
|
||||||
|
elmMain = doc.CreateElement("svg")
|
||||||
|
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("viewBox"))
|
||||||
|
elmSub.Value = Canv.ViewBoxDim
|
||||||
|
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("xmlns"))
|
||||||
|
elmSub.Value = _namespaceDefault
|
||||||
|
|
||||||
|
For Each itemPath As MyPath In Canv.ListPath
|
||||||
|
elm = elmMain.AppendChild(doc.CreateElement("path"))
|
||||||
|
|
||||||
|
elmSub = elm.Attributes.Append(doc.CreateAttribute("id"))
|
||||||
|
elmSub.Value = itemPath.id
|
||||||
|
|
||||||
|
elmSub = elm.Attributes.Append(doc.CreateAttribute("d"))
|
||||||
|
elmSub.Value = itemPath.d
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(itemPath.fill) Then
|
||||||
|
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill"))
|
||||||
|
elmSub.Value = itemPath.fill
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(itemPath.fill_opacity) Then
|
||||||
|
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill-opacity"))
|
||||||
|
elmSub.Value = itemPath.fill_opacity.ToString(CultureInfo.InvariantCulture)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(itemPath.stroke) Then
|
||||||
|
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke"))
|
||||||
|
elmSub.Value = itemPath.stroke
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(itemPath.stroke_opacity) Then
|
||||||
|
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-opacity"))
|
||||||
|
elmSub.Value = itemPath.stroke_opacity.ToString(CultureInfo.InvariantCulture)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(itemPath.stroke_width) Then
|
||||||
|
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-width"))
|
||||||
|
elmSub.Value = itemPath.stroke_width.ToString(CultureInfo.InvariantCulture)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "UTF-8", ""))
|
||||||
|
doc.AppendChild(elmMain)
|
||||||
|
doc.Save(FilePath)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
End Module
|
||||||
|
|
||||||
|
#End Region ' Elementi per la gestione SVG
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
<DockPanel x:Class="SceneButtonV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||||
|
|
||||||
|
<Grid DockPanel.Dock="Top">
|
||||||
|
<TabControl SelectedIndex="{Binding SelTopPanel}"
|
||||||
|
Style="{StaticResource TopPanel_TabControl}">
|
||||||
|
<TabItem Header="TABITEM"
|
||||||
|
Style="{StaticResource SceneButton_TabItem}"/>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!--TOP-->
|
||||||
|
<ItemsControl ItemsSource="{Binding TopListBtn}"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
Style="{StaticResource TopList_ItemsControl}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Style="{StaticResource SceneButtonH_StackPanel}"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.Resources>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||||
|
<Button ToolTip="{Binding Name}"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
|
Command="{Binding CmdBtn}"
|
||||||
|
Style="{StaticResource SceneButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||||
|
<ToggleButton ToolTip="{Binding Name}"
|
||||||
|
Command="{Binding CmdBtn}"
|
||||||
|
IsChecked="{Binding IsChecked}"
|
||||||
|
Style="{StaticResource SceneToggleButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.Resources>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
|
<!--BOTTOM-->
|
||||||
|
<ItemsControl ItemsSource="{Binding BottomListBtn}"
|
||||||
|
Style="{StaticResource BottomList_ItemsControl}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Style="{StaticResource SceneButtonH_StackPanel}"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.Resources>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||||
|
<Button ToolTip="{Binding Name}"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
|
Command="{Binding CmdBtn}"
|
||||||
|
Style="{StaticResource SceneButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||||
|
<ToggleButton Command="{Binding CmdBtn}"
|
||||||
|
IsChecked="{Binding IsChecked}"
|
||||||
|
Style="{StaticResource SceneToggleButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.Resources>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
|
<!--BOTTOM CENTER-->
|
||||||
|
<ItemsControl ItemsSource="{Binding BottomCenterListBtn}"
|
||||||
|
Style="{StaticResource BottomCenterList_ItemsControl}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Style="{StaticResource SceneButtonH_StackPanel}"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.Resources>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||||
|
<Button Content="{Binding Name}"
|
||||||
|
Command="{Binding CmdBtn}"
|
||||||
|
Style="{StaticResource SceneButton}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||||
|
<ToggleButton Command="{Binding CmdBtn}"
|
||||||
|
IsChecked="{Binding IsChecked}"
|
||||||
|
Style="{StaticResource SceneToggleButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_ButtonComboBox}">
|
||||||
|
<Button Content="{Binding Name}"
|
||||||
|
Command="{Binding CmdBtn}"
|
||||||
|
Style="{StaticResource SceneButton}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.Resources>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
|
<!--RIGHT-->
|
||||||
|
<ItemsControl ItemsSource="{Binding RightListBtn}"
|
||||||
|
Style="{StaticResource RightList_ItemsControl}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Style="{StaticResource SceneButtonV_StackPanel}"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.Resources>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||||
|
<Button Command="{Binding CmdBtn}"
|
||||||
|
Style="{StaticResource SceneButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||||
|
<ToggleButton Command="{Binding CmdBtn}"
|
||||||
|
IsChecked="{Binding IsChecked}"
|
||||||
|
Style="{StaticResource SceneToggleButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.Resources>
|
||||||
|
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
|
<!--LEFT colonna 1-->
|
||||||
|
<ItemsControl ItemsSource="{Binding LeftListBtn}"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
Style="{StaticResource LeftList_ItemsControl}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<WrapPanel Style="{StaticResource WrapLeftList_WrapPanel}"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.Resources>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||||
|
<Button ToolTip="{Binding Name}"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
|
Command="{Binding CmdBtn}"
|
||||||
|
Style="{StaticResource SceneButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Button>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||||
|
<ToggleButton Command="{Binding CmdBtn}"
|
||||||
|
IsChecked="{Binding IsChecked}"
|
||||||
|
Style="{StaticResource SceneToggleButton}">
|
||||||
|
<EgtStone3D:SVGV FileSource="{Binding Img, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.Resources>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
|
<Grid Name="MainGrid"
|
||||||
|
Style="{StaticResource MainGrid}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Popup Name="MenuSelType"
|
||||||
|
Style="{StaticResource MenuSelType_PopUp}">
|
||||||
|
<!--<ListBox ItemsSource="{Binding SelTypeList}"
|
||||||
|
SelectedItem="{Binding SelType}"/>-->
|
||||||
|
<!--<TextBlock Text="Scemo chi legge" Background="Red"></TextBlock>-->
|
||||||
|
<EgtStone3D:SelOptionV/>
|
||||||
|
</Popup>
|
||||||
|
</Grid>
|
||||||
|
</DockPanel>
|
||||||