-pulizia codice
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
Module ConstEgtStone3D
|
||||
|
||||
Public Const EGT_ROTATE As String = "Rotate"
|
||||
|
||||
Public Const EGT_PAIR As String = "Pair"
|
||||
|
||||
Public Const ASSEMBLER_FILENAME As String = "AssemblerLog.txt"
|
||||
|
||||
Public Const ASSEMBLER As String = " Avvio Assembler"
|
||||
|
||||
End Module
|
||||
@@ -32,4 +32,11 @@
|
||||
' Sottodirettorio di default per toolmakers
|
||||
Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers"
|
||||
|
||||
' Sottodirettorio del Vein 3D
|
||||
Public Const VEIND3D_DIR As String = "Vein3D_Dir"
|
||||
' Sottodirettorio del Create Solid
|
||||
Public Const CREATESOLID_DIR As String = "CreateSolid"
|
||||
' Sottodirettorio dell'Operation Solid
|
||||
Public Const OPERATIONSOLID_DIR As String = "OperationSolid"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -10,4 +10,6 @@
|
||||
Public Const K_LINEWIDTH As String = "LineWidth"
|
||||
Public Const K_CUSTOMCOLORS As String = "CustomColors"
|
||||
|
||||
Public Const K_VEIND3D As String = "Vein3D"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Constants\ConstEgtStone3D.vb" />
|
||||
<Compile Include="MainWindow\MainWindowV.xaml.vb">
|
||||
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -162,11 +162,11 @@ Public Class MainWindowM
|
||||
Sub New()
|
||||
InitializeEgtEnvironment()
|
||||
' carico il file LUA con tutte le funzioni di accoppiamento
|
||||
GetMainPrivateProfileString("Vein3D", "Vein3D_Dir", "", m_sVein3DDir)
|
||||
GetMainPrivateProfileString(K_VEIND3D, VEIND3D_DIR, "", m_sVein3DDir)
|
||||
' Path del lua da utilizzare
|
||||
GetMainPrivateProfileString("Vein3D", "CreateSolid", "", m_sCreateSolidPath)
|
||||
GetMainPrivateProfileString(K_VEIND3D, CREATESOLID_DIR, "", m_sCreateSolidPath)
|
||||
' Path del lua da utilizzare
|
||||
GetMainPrivateProfileString("Vein3D", "OperationSolid", "", m_sOperationSolidPath)
|
||||
GetMainPrivateProfileString(K_VEIND3D, OPERATIONSOLID_DIR, "", m_sOperationSolidPath)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
AllowDrop="True"
|
||||
ShowInTaskbar="True"
|
||||
Topmost="False"
|
||||
Title="EgtStone3D"
|
||||
Style="{StaticResource NoStyle_Window}">
|
||||
|
||||
<Grid>
|
||||
|
||||
+23
-30
@@ -1,43 +1,36 @@
|
||||
<UserControl x:Class="PairV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:EgtStone3D"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Name ="WinPair" Orientation="Vertical" VerticalAlignment="Top"
|
||||
Margin="5,0,0,0">
|
||||
<TextBlock Name="TopBar"
|
||||
Text="Seleziona dal primo Part il lato che vuoi accoppiare" HorizontalAlignment="Center"
|
||||
Width="Auto"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,10"
|
||||
FontSize="20"/>
|
||||
<ComboBox Name="PairOption"
|
||||
Margin="1,5,1,0"
|
||||
IsEnabled="True"
|
||||
Visibility="Collapsed"/>
|
||||
<CheckBox Name="FlipOption1" Margin="1,5,1,0"
|
||||
Foreground="Black"
|
||||
IsEnabled="True"
|
||||
Visibility="Collapsed">Flip ∥</CheckBox>
|
||||
<CheckBox Name="FlipOption2" Margin="1,5,1,0"
|
||||
Foreground="Black"
|
||||
IsEnabled="True"
|
||||
Visibility="Collapsed">Flip ⟂</CheckBox>
|
||||
xmlns:EgtStone3D="clr-namespace:EgtStone3D">
|
||||
|
||||
<StackPanel Name ="WinPair"
|
||||
Style="{DynamicResource WinPair}">
|
||||
<TextBlock Name="TopBar"
|
||||
Text="{Binding TopBar_Msg}"
|
||||
Style="{DynamicResource TopBar_TxBl}"/>
|
||||
<ComboBox Name="PairOption"
|
||||
Visibility="Collapsed"
|
||||
Style="{DynamicResource PairOption}"/>
|
||||
<CheckBox Name="FlipOption1"
|
||||
Content="{Binding FlipOption1_Msg}"
|
||||
Visibility="Collapsed"
|
||||
Style="{DynamicResource FlipOption}"/>
|
||||
<CheckBox Name="FlipOption2"
|
||||
Content="{Binding FlipOption2_Msg}"
|
||||
Visibility="Collapsed"
|
||||
Style="{DynamicResource FlipOption}"/>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="Conferma"
|
||||
Grid.Column="0"
|
||||
Content="Conferma"/>
|
||||
<Button Name="Annulla"
|
||||
Grid.Column="1"
|
||||
Content="Annulla"/>
|
||||
<Button Grid.Column="0"
|
||||
Name="Conferma"
|
||||
Content="{Binding Conferma_Msg}"/>
|
||||
<Button Grid.Column="1"
|
||||
Name="Annulla"
|
||||
Content="{Binding Annulla_Msg}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
+23
-7
@@ -1,26 +1,42 @@
|
||||
Public Class PairV
|
||||
Private PairOperation As PairVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_PairVM As PairVM
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
PairOperation = New PairVM
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_PairVM = New PairVM
|
||||
Me.DataContext = m_PairVM
|
||||
|
||||
PairOption.ItemsSource = New List(Of String)({"Start-Start", "Start-End", "End-Start", "End-End", "Middle-Middle"})
|
||||
PairOption.SelectedIndex = 1
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Public Sub Conferma_click() Handles Conferma.Click
|
||||
PairOperation.Conferma(Me)
|
||||
m_PairVM.Conferma(Me)
|
||||
End Sub
|
||||
|
||||
Public Sub Annulla_click() Handles Annulla.Click
|
||||
PairOperation.Annulla(Me)
|
||||
m_PairVM.Annulla(Me)
|
||||
End Sub
|
||||
|
||||
Private Sub PairOption_Changed() Handles PairOption.SelectionChanged, FlipOption1.Click, FlipOption2.Click
|
||||
If Not IsNothing(Map.refSceneButtonV.m_PairUC) Then PairOperation.PairPartsAgain()
|
||||
If Not IsNothing(Map.refSceneButtonV.m_PairUC) Then m_PairVM.PairPartsAgain()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
End Class
|
||||
|
||||
+59
-3
@@ -1,12 +1,65 @@
|
||||
Public Class PairVM
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class PairVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property TopBar_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110000)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FlipOption1_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110001)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FlipOption2_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110002)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Conferma_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110003)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Annulla_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110004)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Conferma(PairView As PairV)
|
||||
Map.refSceneButtonV.RemovePairUC(PairView)
|
||||
DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Pair"), _ToggleButton).IsChecked = False
|
||||
DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_PAIR), _ToggleButton).IsChecked = False
|
||||
End Sub
|
||||
|
||||
Public Sub Annulla(PairView As PairV)
|
||||
Map.refSceneButtonV.RemovePairUC(PairView)
|
||||
DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Pair"), _ToggleButton).IsChecked = False
|
||||
DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_PAIR), _ToggleButton).IsChecked = False
|
||||
End Sub
|
||||
|
||||
Public Sub PairPartsAgain()
|
||||
@@ -19,4 +72,7 @@
|
||||
Dim a As Integer = 0
|
||||
'debug
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
@@ -3,10 +3,20 @@ Imports EgtUILib
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class ProjManagerVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Definizione Comandi
|
||||
Private m_NewFileCmd As ICommand
|
||||
Private m_SaveFileCmd As ICommand
|
||||
Private m_OpenFileCmd As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "NewFileCmd"
|
||||
|
||||
Public ReadOnly Property NewFileCmd As ICommand
|
||||
Get
|
||||
If IsNothing(m_NewFileCmd) Then
|
||||
@@ -20,6 +30,10 @@ Public Class ProjManagerVM
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' NewFileCmd
|
||||
|
||||
#Region "OpenFileCmd"
|
||||
|
||||
Public ReadOnly Property OpenFileCmd As ICommand
|
||||
Get
|
||||
If IsNothing(m_OpenFileCmd) Then
|
||||
@@ -48,6 +62,10 @@ Public Class ProjManagerVM
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' OpenFileCmd
|
||||
|
||||
#Region "SaveFileCmd"
|
||||
|
||||
Public ReadOnly Property SaveFileCmd As ICommand
|
||||
Get
|
||||
If IsNothing(m_SaveFileCmd) Then
|
||||
@@ -60,4 +78,9 @@ Public Class ProjManagerVM
|
||||
Private Sub SaveFile()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' SaveFileCmd
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
+20
-29
@@ -1,47 +1,38 @@
|
||||
<UserControl x:Class="RotateV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:EgtStone3D"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Name ="WinRotate" Orientation="Vertical" VerticalAlignment="Top">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<StackPanel Name ="WinRotate"
|
||||
Style="{DynamicResource WinRotate}">
|
||||
<Label Name="TopBar"
|
||||
Content="Seleziona l'asse di rotazione" HorizontalAlignment="Center"
|
||||
Width="Auto"/>
|
||||
Content="Seleziona l'asse di rotazione"
|
||||
Style="{DynamicResource TopBar}"/>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="Testo" Height="26"
|
||||
Foreground="Black"
|
||||
Margin="1,5,1,0"
|
||||
Text="Angolo"
|
||||
TextAlignment="Center"
|
||||
Grid.Column="0"
|
||||
IsEnabled="True"/>
|
||||
<TextBox Name="RotInputData" Height="26"
|
||||
Foreground="Black"
|
||||
Margin="1,5,1,0"
|
||||
Grid.Column="1"
|
||||
Text="0"
|
||||
HorizontalContentAlignment="Right"
|
||||
VerticalContentAlignment="Center"
|
||||
IsEnabled="False"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Name="Testo"
|
||||
Text="Angolo"
|
||||
Style="{DynamicResource Testo_TxBl}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Name="RotInputData"
|
||||
Text="0"
|
||||
Style="{DynamicResource RotInputData_TxBx}"/>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="Conferma"
|
||||
Grid.Column="0"
|
||||
Content="Conferma"/>
|
||||
<Button Name="Annulla"
|
||||
Grid.Column="1"
|
||||
Content="Annulla"/>
|
||||
<Button Grid.Column="0"
|
||||
Name="Conferma"
|
||||
Content="{Binding Conferma_Msg}"/>
|
||||
<Button Grid.Column="1"
|
||||
Name="Annulla"
|
||||
Content="Annulla"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
+23
-5
@@ -1,24 +1,42 @@
|
||||
Public Class RotateV
|
||||
Private RotateOperation As RotateVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_RotateVM As RotateVM
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
RotateOperation = New RotateVM
|
||||
m_RotateVM = New RotateVM
|
||||
Me.DataContext = m_RotateVM
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
Dim PartSolidSel As PartSolidM = SolidManagerM.GetPartSolid(Map.refSceneHostV.m_nIdPart)
|
||||
If IsNothing(PartSolidSel) Then Annulla_click()
|
||||
PartSolidSel.ShowAxis()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub Conferma_click() Handles Conferma.Click
|
||||
RotateOperation.Conferma(Me)
|
||||
m_RotateVM.Conferma(Me)
|
||||
End Sub
|
||||
|
||||
Private Sub Annulla_click() Handles Annulla.Click
|
||||
RotateOperation.Annulla(Me)
|
||||
m_RotateVM.Annulla(Me)
|
||||
End Sub
|
||||
|
||||
Public Sub AngText_Changed() Handles RotInputData.TextChanged
|
||||
If Not IsNothing(Map.refSceneButtonV.m_RotateUC) Then RotateOperation.AngText_Changed()
|
||||
If Not IsNothing(Map.refSceneButtonV.m_RotateUC) Then m_RotateVM.AngText_Changed()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
End Class
|
||||
|
||||
+22
-3
@@ -1,18 +1,34 @@
|
||||
Imports EgtUILib.EgtInterface
|
||||
|
||||
Public Class RotateVM
|
||||
|
||||
Public ReadOnly Property Conferma_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110003)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Annulla_Msg As String
|
||||
Get
|
||||
Return EgtMsg(110004)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Conferma(RotateView As RotateV)
|
||||
Map.refSceneButtonV.RemoveRotateUC(RotateView)
|
||||
DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Rotate"), _ToggleButton).IsChecked = False
|
||||
DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_ROTATE), _ToggleButton).IsChecked = False
|
||||
End Sub
|
||||
|
||||
Public Sub Annulla(RotateView As RotateV)
|
||||
Map.refSceneButtonV.RemoveRotateUC(RotateView)
|
||||
DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Rotate"), _ToggleButton).IsChecked = False
|
||||
DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_ROTATE), _ToggleButton).IsChecked = False
|
||||
End Sub
|
||||
|
||||
Public Sub AngText_Changed()
|
||||
If Not DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton("Rotate"), _ToggleButton).IsChecked Then Return
|
||||
If Not DirectCast(DirectCast(Map.refSceneButtonV.DataContext, SceneButtonVM).GetButton(EGT_ROTATE), _ToggleButton).IsChecked Then Return
|
||||
Dim nId As Integer = Map.refSceneHostV.m_nIdPart
|
||||
If nId = GDB_ID.NULL Then Return
|
||||
Dim sAng As String = Map.refSceneButtonV.m_RotateUC.RotInputData.Text
|
||||
@@ -32,4 +48,7 @@ Public Class RotateVM
|
||||
|
||||
Map.refSceneHostV.m_dAngRot = dAng
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
@@ -5,92 +5,109 @@
|
||||
|
||||
<DockPanel>
|
||||
<!--TOP-->
|
||||
<ItemsControl ItemsSource="{Binding TopListBtn}" DockPanel.Dock="Top" HorizontalAlignment="left">
|
||||
<ItemsControl ItemsSource="{Binding TopListBtn}"
|
||||
Style="{DynamicResource TopList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button ToolTip="{Binding Name}"
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
Command="{Binding CmdBtn}" Style="{DynamicResource SceneButton}">
|
||||
<Image Source="{Binding Img}" Stretch="UniformToFill"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
<ToggleButton Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}" Style="{DynamicResource SceneToggleButton}">
|
||||
<Image Source="{Binding Img}" Stretch="UniformToFill"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
<!--BOTTOM-->
|
||||
<ItemsControl ItemsSource="{Binding BottomListBtn}" DockPanel.Dock="Bottom" HorizontalAlignment="Right" Margin="0,0,0,34">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button Content="{Binding Name}"
|
||||
Command="{Binding CmdBtn}" Style="{DynamicResource SceneButton}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
|
||||
<ToggleButton Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}" Style="{DynamicResource SceneToggleButton}">
|
||||
<Image Source="{Binding Img}" Stretch="UniformToFill"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
<!--RIGHT-->
|
||||
<ItemsControl ItemsSource="{Binding RightListBtn}" DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="0,-32,4,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button Content="{Binding Name}"
|
||||
Command="{Binding CmdBtn}" Style="{DynamicResource SceneButton}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
<ToggleButton Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}" Style="{DynamicResource SceneToggleButton}">
|
||||
<Image Source="{Binding Img}" Stretch="UniformToFill"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
|
||||
</ItemsControl>
|
||||
<!--LEFT colonna 1-->
|
||||
<ItemsControl ItemsSource="{Binding LeftListBtn}" DockPanel.Dock="Left" HorizontalAlignment="Right">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
<StackPanel Style="{DynamicResource SceneButtonH_StackPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button ToolTip="{Binding Name}"
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
Command="{Binding CmdBtn}" Style="{DynamicResource SceneButton}">
|
||||
<Image Source="{Binding Img}" Stretch="UniformToFill"/>
|
||||
Command="{Binding CmdBtn}"
|
||||
Style="{DynamicResource SceneButton}">
|
||||
<Image Source="{Binding Img}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
<ToggleButton Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}" Style="{DynamicResource SceneToggleButton}">
|
||||
<Image Source="{Binding Img}" Stretch="UniformToFill"/>
|
||||
<ToggleButton Command="{Binding CmdBtn}"
|
||||
IsChecked="{Binding IsChecked}"
|
||||
Style="{DynamicResource SceneToggleButton}">
|
||||
<Image Source="{Binding Img}"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
<Grid Background="Transparent" Name ="MainGrid">
|
||||
<!--BOTTOM-->
|
||||
<ItemsControl ItemsSource="{Binding BottomListBtn}"
|
||||
Style="{DynamicResource BottomList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Style="{DynamicResource SceneButtonH_StackPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button Content="{Binding Name}"
|
||||
Command="{Binding CmdBtn}"
|
||||
Style="{DynamicResource SceneButton}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
<ToggleButton Command="{Binding CmdBtn}"
|
||||
IsChecked="{Binding IsChecked}"
|
||||
Style="{DynamicResource SceneToggleButton}">
|
||||
<Image Source="{Binding Img}"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
<!--RIGHT-->
|
||||
<ItemsControl ItemsSource="{Binding RightListBtn}"
|
||||
Style="{DynamicResource RightList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Style="{DynamicResource SceneButtonV_StackPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button Content="{Binding Name}"
|
||||
Command="{Binding CmdBtn}"
|
||||
Style="{DynamicResource SceneButton}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
<ToggleButton Command="{Binding CmdBtn}"
|
||||
IsChecked="{Binding IsChecked}"
|
||||
Style="{DynamicResource SceneToggleButton}">
|
||||
<Image Source="{Binding Img}"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
|
||||
</ItemsControl>
|
||||
<!--LEFT colonna 1-->
|
||||
<ItemsControl ItemsSource="{Binding LeftListBtn}"
|
||||
Style="{DynamicResource LeftList_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Style="{DynamicResource SceneButtonV_StackPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
|
||||
<Button ToolTip="{Binding Name}"
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
Command="{Binding CmdBtn}"
|
||||
Style="{DynamicResource SceneButton}">
|
||||
<Image Source="{Binding Img}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
|
||||
<ToggleButton Command="{Binding CmdBtn}"
|
||||
IsChecked="{Binding IsChecked}"
|
||||
Style="{DynamicResource SceneToggleButton}">
|
||||
<Image Source="{Binding Img}"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
<Grid Name="MainGrid"
|
||||
Style="{DynamicResource MainGrid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
Imports System.Windows.Interop
|
||||
Public Class SceneButtonV
|
||||
|
||||
Public Class SceneButtonV
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_refSceneButtonVM As SceneButtonVM
|
||||
Public m_PairUC As PairV
|
||||
Public m_RotateUC As RotateV
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
@@ -48,6 +50,7 @@ Public Class SceneButtonV
|
||||
MainGrid.Children.Remove(PairUC)
|
||||
PairUC = Nothing
|
||||
End Sub
|
||||
|
||||
Public Sub LoadRotateUC()
|
||||
If IsNothing(m_RotateUC) Then
|
||||
m_RotateUC = New RotateV
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports System.IO
|
||||
|
||||
Public Class MySceneHostVM
|
||||
Inherits SceneHostVM
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib.EgtInterface
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -9,6 +8,8 @@ Public Class SceneHostV
|
||||
|
||||
Private m_MySceneHostVM As MySceneHostVM
|
||||
|
||||
Private m_SelType As Integer = GDB_TY.CRV_LINE
|
||||
|
||||
' variabili per la selezione in over
|
||||
Private m_nIdMouseOverSel As Integer = 0
|
||||
Private m_nIdMarked1 As Integer = 0
|
||||
@@ -75,7 +76,8 @@ Public Class SceneHostV
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
Private m_SelType As Integer = GDB_TY.CRV_LINE
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles MainScene.OnMouseMoveScene
|
||||
OnMouseOver(sender, e, m_SelType)
|
||||
' Se drag non abilitato o già in esecuzione, esco
|
||||
@@ -642,4 +644,6 @@ Line1:
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
End Class
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
Background="Transparent"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtMainWindow}}">
|
||||
<EgtWPFLib5:EgtMainWindow.TitlePanel>
|
||||
<EgtStone3D:ProjManagerV />
|
||||
<EgtStone3D:ProjManagerV/>
|
||||
</EgtWPFLib5:EgtMainWindow.TitlePanel>
|
||||
|
||||
<DockPanel>
|
||||
|
||||
@@ -47,5 +47,4 @@ Public Class SecondaryWindowVM
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
+13
-2
@@ -1,11 +1,19 @@
|
||||
Imports System.IO
|
||||
|
||||
Module AssLogM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Property AssemblerFunctionLog As String = String.Empty
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub InitAssLog()
|
||||
AssemblerFunctionLog = Map.refMainWindowVM.MainWindowM.sDataRoot & "\Temp\" & "AssemblerLog.txt"
|
||||
AssemblerFunctionLog = Map.refMainWindowVM.MainWindowM.sTempDir & "\" & ASSEMBLER_FILENAME
|
||||
File.WriteAllText(AssemblerFunctionLog, String.Empty)
|
||||
AssLog(Date.Now.ToString & " Avvio Assembler")
|
||||
AssLog(Date.Now.ToString & ASSEMBLER)
|
||||
End Sub
|
||||
|
||||
Public Function AssLog(sMsg As String) As Boolean
|
||||
@@ -14,4 +22,7 @@ Module AssLogM
|
||||
AssLogWriter.Close()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Module
|
||||
|
||||
@@ -351,4 +351,148 @@
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region StackPanelStyle-->
|
||||
|
||||
<Style x:Key="WinPair" TargetType="{x:Type StackPanel}">
|
||||
<Setter Property="Orientation" Value="Vertical"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Margin" Value="5,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WinRotate" TargetType="{x:Type StackPanel}">
|
||||
<Setter Property="Orientation" Value="Vertical"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SceneButtonH_StackPanel" TargetType="{x:Type StackPanel}">
|
||||
<Setter Property="Orientation" Value="Horizontal"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SceneButtonV_StackPanel" TargetType="{x:Type StackPanel}">
|
||||
<Setter Property="Orientation" Value="Vertical"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion StackPaneStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region TextBlockStyle-->
|
||||
|
||||
<Style x:Key="TopBar_TxBl" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="Margin" Value="0,0,0,10"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Testo_TxBl" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="Height" Value="26"/>
|
||||
<Setter Property="IsEnabled" Value="True"/>
|
||||
<Setter Property="Margin" Value="1,5,1,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion TextBlockStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region TextBoxStyle-->
|
||||
|
||||
<Style x:Key="RotInputData_TxBx" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Height" Value="26"/>
|
||||
<Setter Property="IsEnabled" Value="False"/>
|
||||
<Setter Property="Margin" Value="1,5,1,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion TextBoxStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region ComboBoxStyle-->
|
||||
|
||||
<Style x:Key="PairOption" TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="IsEnabled" Value="True"/>
|
||||
<Setter Property="Margin" Value="1,5,1,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion ComboBoxStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region CheckBoxStyle-->
|
||||
|
||||
<Style x:Key="FlipOption" TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="IsEnabled" Value="True"/>
|
||||
<Setter Property="Margin" Value="1,5,1,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion CheckBoxStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region LabelStyle-->
|
||||
|
||||
<Style x:Key="TopBar" TargetType="{x:Type Label}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion LabelStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region ImageStyle-->
|
||||
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Stretch" Value="UniformToFill"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion ImageStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region ItemsControlStyle-->
|
||||
|
||||
<Style x:Key="TopList_ItemsControl" TargetType="{x:Type ItemsControl}">
|
||||
<Setter Property="DockPanel.Dock" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="BottomList_ItemsControl" TargetType="{x:Type ItemsControl}">
|
||||
<Setter Property="DockPanel.Dock" Value="Bottom"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="0,0,0,34"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="RightList_ItemsControl" TargetType="{x:Type ItemsControl}">
|
||||
<Setter Property="DockPanel.Dock" Value="Right"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="0,-32,4,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="LeftList_ItemsControl" TargetType="{x:Type ItemsControl}">
|
||||
<Setter Property="DockPanel.Dock" Value="Left"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion ItemsControlStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region GridStyle-->
|
||||
|
||||
<Style x:Key="MainGrid" TargetType="{x:Type Grid}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion GridStyle-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
+5
-1
@@ -1,8 +1,10 @@
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module EstCalc
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
'Friend Function CompoColor(sIniFile As String) As Color3d
|
||||
' Dim InsertColor As New Color3d(89, 210, 210, 25)
|
||||
' Dim IndexColor As Integer = GetPrivateProfileInt(S_COMPO, K_LASTCOLOR, 1, sIniFile)
|
||||
@@ -1089,5 +1091,7 @@ Module EstCalc
|
||||
' Return ( nText <> GDB_ID.NULL)
|
||||
' End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Module
|
||||
|
||||
|
||||
+12
-4
@@ -1,7 +1,9 @@
|
||||
Imports EgtUILib.EgtInterface
|
||||
|
||||
Public Class PartSolidM
|
||||
#Region "properties"
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_PartId As Integer = -1
|
||||
Public ReadOnly Property PartId As Integer
|
||||
Get
|
||||
@@ -180,9 +182,10 @@ Public Class PartSolidM
|
||||
|
||||
Private m_nLayTempId As Integer = -1
|
||||
|
||||
#End Region ' properties
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
#Region "metodi"
|
||||
Sub New(nId As Integer)
|
||||
' salvo il riferimento della VeinMatchingWindow
|
||||
Dim nPartId As Integer = -1
|
||||
@@ -243,6 +246,10 @@ Public Class PartSolidM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub SelectSinglePart()
|
||||
If EgtIsSelectedObj(m_PartId) Then Return
|
||||
Dim bOk As Boolean = EgtSelectObj(m_PartId)
|
||||
@@ -407,5 +414,6 @@ Public Class PartSolidM
|
||||
Return EgtIsSelectedObj(PartId)
|
||||
End Function
|
||||
|
||||
#End Region ' metodi
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
@@ -4,8 +4,15 @@ Imports EgtWPFLib5
|
||||
|
||||
Module SolidManagerM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public m_PartSolidList As New ObservableCollection(Of PartSolidM) '' lista dei PartSolid
|
||||
Public m_nVeinCtx As Integer = DirectCast(Map.refSceneHostV.DataContext, SceneHostVM).MainScene.GetCtx()
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Function GetPartSolid(nId As Integer) As PartSolidM
|
||||
' se la lista non esiste la creo
|
||||
If m_PartSolidList.Count = 0 Then
|
||||
@@ -474,4 +481,6 @@ Module SolidManagerM
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Module
|
||||
|
||||
Reference in New Issue
Block a user